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:
authorJoseph Eagar <joeedh@gmail.com>2009-07-16 10:27:37 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-07-16 10:27:37 +0400
commit0b1649b2b86b52b44bdabf8e3542d8adffb55623 (patch)
tree542e10220a719f2a54e8afbee7b11195b6dac344
parent3bade135035dacfdb4a3833f3fac3bf5811ce7de (diff)
parent0bfc98706ef93f90bd74b195b98c36c7dcea94dd (diff)
merge with 2.5 at r21568
-rw-r--r--CMake/macros.cmake2
-rw-r--r--CMakeLists.txt55
-rw-r--r--SConstruct37
-rw-r--r--config/darwin-config.py9
-rw-r--r--config/irix6-config.py9
-rw-r--r--config/linux2-config.py9
-rw-r--r--config/linuxcross-config.py9
-rw-r--r--config/openbsd3-config.py9
-rw-r--r--config/sunos5-config.py9
-rw-r--r--config/win32-mingw-config.py19
-rw-r--r--config/win32-vc-config.py13
-rw-r--r--config/win64-vc-config.py9
-rw-r--r--extern/CMakeLists.txt5
-rw-r--r--extern/Makefile2
-rw-r--r--extern/SConscript4
-rw-r--r--extern/qhull/CMakeLists.txt45
-rw-r--r--extern/qhull/COPYING.txt37
-rw-r--r--extern/qhull/README.txt318
-rw-r--r--extern/qhull/REGISTER.txt37
-rw-r--r--extern/qhull/SConscript35
-rw-r--r--extern/qhull/VisualC6/qhull.dsw29
-rw-r--r--extern/qhull/VisualC6/qhull/qhull.dsp192
-rw-r--r--extern/qhull/include/qhull/geom.h177
-rw-r--r--extern/qhull/include/qhull/io.h149
-rw-r--r--extern/qhull/include/qhull/mem.h174
-rw-r--r--extern/qhull/include/qhull/merge.h171
-rw-r--r--extern/qhull/include/qhull/poly.h290
-rw-r--r--extern/qhull/include/qhull/qhull.h1048
-rw-r--r--extern/qhull/include/qhull/qhull_a.h127
-rw-r--r--extern/qhull/include/qhull/qset.h468
-rw-r--r--extern/qhull/include/qhull/stat.h520
-rw-r--r--extern/qhull/include/qhull/user.h762
-rw-r--r--extern/qhull/make/msvc_7_0/qhull.vcproj677
-rw-r--r--extern/qhull/make/msvc_9_0/qhull.vcproj877
-rwxr-xr-xextern/qhull/src/Make-config.sh285
-rw-r--r--extern/qhull/src/Makefile55
-rw-r--r--extern/qhull/src/Makefile.txt190
-rw-r--r--extern/qhull/src/geom.c1230
-rw-r--r--extern/qhull/src/geom.h177
-rw-r--r--extern/qhull/src/geom2.c2160
-rw-r--r--extern/qhull/src/global.c2018
-rw-r--r--extern/qhull/src/io.c4089
-rw-r--r--extern/qhull/src/io.h149
-rw-r--r--extern/qhull/src/mem.c447
-rw-r--r--extern/qhull/src/mem.h174
-rw-r--r--extern/qhull/src/merge.c3626
-rw-r--r--extern/qhull/src/merge.h171
-rw-r--r--extern/qhull/src/poly.c1180
-rw-r--r--extern/qhull/src/poly.h290
-rw-r--r--extern/qhull/src/poly2.c3070
-rw-r--r--extern/qhull/src/qconvex.c334
-rw-r--r--extern/qhull/src/qdelaun.c323
-rw-r--r--extern/qhull/src/qhalf.c324
-rw-r--r--extern/qhull/src/qhull.c1395
-rw-r--r--extern/qhull/src/qhull.h1048
-rw-r--r--extern/qhull/src/qhull_a.h127
-rw-r--r--extern/qhull/src/qhull_interface.cpp96
-rw-r--r--extern/qhull/src/qset.c1301
-rw-r--r--extern/qhull/src/qset.h468
-rw-r--r--extern/qhull/src/qvoronoi.c318
-rw-r--r--extern/qhull/src/rbox.c788
-rw-r--r--extern/qhull/src/stat.c700
-rw-r--r--extern/qhull/src/stat.h520
-rw-r--r--extern/qhull/src/unix.c376
-rw-r--r--extern/qhull/src/user.c324
-rw-r--r--extern/qhull/src/user.h762
-rw-r--r--extern/qhull/src/user_eg.c310
-rw-r--r--extern/qhull/src/user_eg2.c532
-rw-r--r--extern/solid/CMakeLists.txt34
-rw-r--r--extern/solid/LICENSE_GPL.txt349
-rw-r--r--extern/solid/LICENSE_QPL.txt110
-rw-r--r--extern/solid/Makefile56
-rw-r--r--extern/solid/README.txt55
-rw-r--r--extern/solid/SConscript34
-rw-r--r--extern/solid/SOLID/SOLID.h279
-rw-r--r--extern/solid/SOLID/SOLID_broad.h75
-rw-r--r--extern/solid/SOLID/SOLID_types.h53
-rw-r--r--extern/solid/VisualC6/broad/broad.dsp132
-rw-r--r--extern/solid/VisualC6/complex/complex.dsp116
-rw-r--r--extern/solid/VisualC6/convex/convex.dsp232
-rw-r--r--extern/solid/VisualC6/dynamics/dynamics.dsp120
-rw-r--r--extern/solid/VisualC6/gldemo/gldemo.dsp102
-rw-r--r--extern/solid/VisualC6/mnm/mnm.dsp100
-rw-r--r--extern/solid/VisualC6/physics/physics.dsp100
-rw-r--r--extern/solid/VisualC6/sample/sample.dsp102
-rw-r--r--extern/solid/VisualC6/solid.dsw89
-rw-r--r--extern/solid/VisualC6/solid/solid.dsp148
-rw-r--r--extern/solid/VisualC6/solid_dll/solid_dll.dsp147
-rw-r--r--extern/solid/include/GEN_MinMax.h76
-rw-r--r--extern/solid/include/GEN_random.h49
-rw-r--r--extern/solid/include/MT/Interval.h180
-rw-r--r--extern/solid/include/MT/Matrix3x3.h380
-rw-r--r--extern/solid/include/MT/Quaternion.h316
-rw-r--r--extern/solid/include/MT/Transform.h189
-rw-r--r--extern/solid/include/MT/Tuple3.h120
-rw-r--r--extern/solid/include/MT/Tuple4.h112
-rw-r--r--extern/solid/include/MT/Vector3.h283
-rw-r--r--extern/solid/include/MT_BBox.h119
-rw-r--r--extern/solid/include/MT_Interval.h33
-rw-r--r--extern/solid/include/MT_Matrix3x3.h34
-rw-r--r--extern/solid/include/MT_Point3.h31
-rw-r--r--extern/solid/include/MT_Quaternion.h35
-rw-r--r--extern/solid/include/MT_Scalar.h158
-rw-r--r--extern/solid/include/MT_Transform.h38
-rw-r--r--extern/solid/include/MT_Vector3.h50
-rw-r--r--extern/solid/include/SOLID.h279
-rw-r--r--extern/solid/include/SOLID_broad.h75
-rw-r--r--extern/solid/include/SOLID_types.h53
-rw-r--r--extern/solid/make/msvc_7_0/broad/broad.vcproj262
-rw-r--r--extern/solid/make/msvc_7_0/complex/complex.vcproj252
-rw-r--r--extern/solid/make/msvc_7_0/convex/convex.vcproj337
-rw-r--r--extern/solid/make/msvc_7_0/solid.vcproj462
-rw-r--r--extern/solid/make/msvc_9_0/broad/broad.vcproj369
-rw-r--r--extern/solid/make/msvc_9_0/complex/complex.vcproj355
-rw-r--r--extern/solid/make/msvc_9_0/convex/convex.vcproj469
-rw-r--r--extern/solid/make/msvc_9_0/solid.vcproj595
-rw-r--r--extern/solid/src/DT_AlgoTable.h47
-rw-r--r--extern/solid/src/DT_C-api.cpp581
-rw-r--r--extern/solid/src/DT_Encounter.cpp111
-rw-r--r--extern/solid/src/DT_Encounter.h84
-rw-r--r--extern/solid/src/DT_Object.cpp276
-rw-r--r--extern/solid/src/DT_Object.h157
-rw-r--r--extern/solid/src/DT_RespTable.cpp184
-rw-r--r--extern/solid/src/DT_RespTable.h139
-rw-r--r--extern/solid/src/DT_Response.h63
-rw-r--r--extern/solid/src/DT_Scene.cpp183
-rw-r--r--extern/solid/src/DT_Scene.h57
-rw-r--r--extern/solid/src/Makefile45
-rw-r--r--extern/solid/src/broad/BP_C-api.cpp77
-rw-r--r--extern/solid/src/broad/BP_Endpoint.h108
-rw-r--r--extern/solid/src/broad/BP_EndpointList.cpp237
-rw-r--r--extern/solid/src/broad/BP_EndpointList.h109
-rw-r--r--extern/solid/src/broad/BP_Proxy.cpp120
-rw-r--r--extern/solid/src/broad/BP_Proxy.h78
-rw-r--r--extern/solid/src/broad/BP_ProxyList.h69
-rw-r--r--extern/solid/src/broad/BP_Scene.cpp151
-rw-r--r--extern/solid/src/broad/BP_Scene.h79
-rw-r--r--extern/solid/src/broad/Makefile41
-rw-r--r--extern/solid/src/complex/DT_BBoxTree.cpp90
-rw-r--r--extern/solid/src/complex/DT_BBoxTree.h540
-rw-r--r--extern/solid/src/complex/DT_CBox.h134
-rw-r--r--extern/solid/src/complex/DT_Complex.cpp327
-rw-r--r--extern/solid/src/complex/DT_Complex.h94
-rw-r--r--extern/solid/src/complex/Makefile42
-rw-r--r--extern/solid/src/convex/DT_Accuracy.cpp30
-rw-r--r--extern/solid/src/convex/DT_Accuracy.h47
-rw-r--r--extern/solid/src/convex/DT_Array.h75
-rw-r--r--extern/solid/src/convex/DT_Box.cpp112
-rw-r--r--extern/solid/src/convex/DT_Box.h62
-rw-r--r--extern/solid/src/convex/DT_Cone.cpp48
-rw-r--r--extern/solid/src/convex/DT_Cone.h45
-rw-r--r--extern/solid/src/convex/DT_Convex.cpp426
-rw-r--r--extern/solid/src/convex/DT_Convex.h64
-rw-r--r--extern/solid/src/convex/DT_Cylinder.cpp39
-rw-r--r--extern/solid/src/convex/DT_Cylinder.h42
-rw-r--r--extern/solid/src/convex/DT_Facet.cpp80
-rw-r--r--extern/solid/src/convex/DT_Facet.h134
-rw-r--r--extern/solid/src/convex/DT_GJK.h438
-rw-r--r--extern/solid/src/convex/DT_Hull.h53
-rw-r--r--extern/solid/src/convex/DT_IndexArray.h33
-rw-r--r--extern/solid/src/convex/DT_LineSegment.cpp36
-rw-r--r--extern/solid/src/convex/DT_LineSegment.h52
-rw-r--r--extern/solid/src/convex/DT_Minkowski.h51
-rw-r--r--extern/solid/src/convex/DT_PenDepth.cpp376
-rw-r--r--extern/solid/src/convex/DT_PenDepth.h36
-rw-r--r--extern/solid/src/convex/DT_Point.cpp36
-rw-r--r--extern/solid/src/convex/DT_Point.h46
-rw-r--r--extern/solid/src/convex/DT_Polyhedron.cpp415
-rw-r--r--extern/solid/src/convex/DT_Polyhedron.h76
-rw-r--r--extern/solid/src/convex/DT_Polytope.cpp69
-rw-r--r--extern/solid/src/convex/DT_Polytope.h51
-rw-r--r--extern/solid/src/convex/DT_Shape.h72
-rw-r--r--extern/solid/src/convex/DT_Sphere.cpp90
-rw-r--r--extern/solid/src/convex/DT_Sphere.h43
-rw-r--r--extern/solid/src/convex/DT_Transform.h53
-rw-r--r--extern/solid/src/convex/DT_Triangle.cpp96
-rw-r--r--extern/solid/src/convex/DT_Triangle.h63
-rw-r--r--extern/solid/src/convex/DT_VertexBase.h84
-rw-r--r--extern/solid/src/convex/Makefile41
-rw-r--r--intern/bsp/test/Makefile2
-rw-r--r--intern/ghost/GHOST_C-api.h11
-rw-r--r--intern/ghost/GHOST_IWindow.h8
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp8
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp15
-rw-r--r--intern/ghost/intern/GHOST_Window.cpp15
-rw-r--r--intern/ghost/intern/GHOST_Window.h16
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp15
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.h9
-rw-r--r--intern/guardedalloc/intern/mallocn.c12
-rw-r--r--intern/iksolver/test/Makefile2
-rw-r--r--intern/moto/include/MT_Matrix3x3.h24
-rw-r--r--intern/string/intern/STR_String.cpp6
-rw-r--r--projectfiles_vc9/blender/BPY_python/BPY_python.vcproj44
-rw-r--r--projectfiles_vc9/blender/blender.sln175
-rw-r--r--projectfiles_vc9/blender/blender.vcproj78
-rw-r--r--projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj24
-rw-r--r--projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj2
-rw-r--r--projectfiles_vc9/blender/editors/ED_editors.vcproj162
-rw-r--r--projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj48
-rw-r--r--projectfiles_vc9/blender/makesrna/RNA_rna.vcproj106
-rw-r--r--projectfiles_vc9/blender/nodes/nodes.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj4
-rw-r--r--projectfiles_vc9/gameengine/converter/KX_converter.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj4
-rw-r--r--projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj8
-rw-r--r--projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj10
-rw-r--r--projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj20
-rw-r--r--projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj12
-rw-r--r--projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj4
-rw-r--r--projectfiles_vc9/kernel/system/SYS_system.vcproj4
-rw-r--r--release/datafiles/blenderbuttonsbin177005 -> 175808 bytes
-rw-r--r--release/io/export_ply.py286
-rw-r--r--release/scripts/bpymodules/dxfLibrary.py184
-rw-r--r--release/scripts/export_obj.py100
-rw-r--r--release/scripts/flt_properties.py1
-rw-r--r--release/scripts/import_obj.py316
-rw-r--r--release/scripts/ply_export.py228
-rw-r--r--release/scripts/textplugin_convert_ge.py2
-rw-r--r--release/scripts/wizard_bolt_factory.py17
-rw-r--r--release/ui/buttons_data_armature.py41
-rw-r--r--release/ui/buttons_data_bone.py73
-rw-r--r--release/ui/buttons_data_camera.py84
-rw-r--r--release/ui/buttons_data_curve.py61
-rw-r--r--release/ui/buttons_data_empty.py5
-rw-r--r--release/ui/buttons_data_lamp.py39
-rw-r--r--release/ui/buttons_data_lattice.py52
-rw-r--r--release/ui/buttons_data_mesh.py224
-rw-r--r--release/ui/buttons_data_modifier.py262
-rw-r--r--release/ui/buttons_data_text.py69
-rw-r--r--release/ui/buttons_material.py314
-rw-r--r--release/ui/buttons_object_constraint.py101
-rw-r--r--release/ui/buttons_objects.py27
-rw-r--r--release/ui/buttons_particle.py659
-rw-r--r--release/ui/buttons_physic_cloth.py207
-rw-r--r--release/ui/buttons_scene.py431
-rw-r--r--release/ui/buttons_texture.py295
-rw-r--r--release/ui/buttons_world.py54
-rw-r--r--release/ui/space_outliner.py4
-rw-r--r--release/ui/space_sequencer.py83
-rw-r--r--release/ui/space_text.py514
-rw-r--r--source/Makefile16
-rw-r--r--source/blender/CMakeLists.txt1
-rw-r--r--source/blender/Makefile2
-rw-r--r--source/blender/SConscript1
-rw-r--r--source/blender/blenfont/BLF_api.h30
-rw-r--r--source/blender/blenfont/intern/blf.c48
-rw-r--r--source/blender/blenfont/intern/blf_font.c44
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c33
-rw-r--r--source/blender/blenfont/intern/blf_internal.h1
-rw-r--r--source/blender/blenfont/intern/blf_internal_types.h10
-rw-r--r--source/blender/blenkernel/BKE_action.h11
-rw-r--r--source/blender/blenkernel/BKE_cloth.h5
-rw-r--r--source/blender/blenkernel/BKE_context.h19
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h1
-rw-r--r--source/blender/blenkernel/BKE_displist.h2
-rw-r--r--source/blender/blenkernel/BKE_effect.h2
-rw-r--r--source/blender/blenkernel/BKE_exotic.h1
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h56
-rw-r--r--source/blender/blenkernel/BKE_fluidsim.h44
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h2
-rw-r--r--source/blender/blenkernel/BKE_material.h15
-rw-r--r--source/blender/blenkernel/BKE_modifier.h14
-rw-r--r--source/blender/blenkernel/BKE_nla.h97
-rw-r--r--source/blender/blenkernel/BKE_node.h3
-rw-r--r--source/blender/blenkernel/BKE_packedFile.h54
-rw-r--r--source/blender/blenkernel/BKE_particle.h17
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h58
-rw-r--r--source/blender/blenkernel/BKE_report.h5
-rw-r--r--source/blender/blenkernel/BKE_screen.h7
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h9
-rw-r--r--source/blender/blenkernel/BKE_writeffmpeg.h22
-rw-r--r--source/blender/blenkernel/depsgraph_private.h2
-rw-r--r--source/blender/blenkernel/intern/BME_tools.c2
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c26
-rw-r--r--source/blender/blenkernel/intern/action.c214
-rw-r--r--source/blender/blenkernel/intern/anim.c13
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c781
-rw-r--r--source/blender/blenkernel/intern/blender.c1
-rw-r--r--source/blender/blenkernel/intern/booleanops.c32
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c2
-rw-r--r--source/blender/blenkernel/intern/cloth.c167
-rw-r--r--source/blender/blenkernel/intern/constraint.c8
-rw-r--r--source/blender/blenkernel/intern/context.c108
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c80
-rw-r--r--source/blender/blenkernel/intern/displist.c46
-rw-r--r--source/blender/blenkernel/intern/effect.c18
-rw-r--r--source/blender/blenkernel/intern/exotic.c613
-rw-r--r--source/blender/blenkernel/intern/fcurve.c1107
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c23
-rw-r--r--source/blender/blenkernel/intern/font.c12
-rw-r--r--source/blender/blenkernel/intern/gpencil.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c8
-rw-r--r--source/blender/blenkernel/intern/image.c21
-rw-r--r--source/blender/blenkernel/intern/implicit.c10
-rw-r--r--source/blender/blenkernel/intern/ipo.c142
-rw-r--r--source/blender/blenkernel/intern/lattice.c105
-rw-r--r--source/blender/blenkernel/intern/material.c56
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/modifier.c362
-rw-r--r--source/blender/blenkernel/intern/multires.c6
-rw-r--r--source/blender/blenkernel/intern/nla.c1444
-rw-r--r--source/blender/blenkernel/intern/node.c1
-rw-r--r--source/blender/blenkernel/intern/object.c57
-rw-r--r--source/blender/blenkernel/intern/packedFile.c227
-rw-r--r--source/blender/blenkernel/intern/particle.c1133
-rw-r--r--source/blender/blenkernel/intern/particle_system.c526
-rw-r--r--source/blender/blenkernel/intern/pointcache.c924
-rw-r--r--source/blender/blenkernel/intern/report.c4
-rw-r--r--source/blender/blenkernel/intern/scene.c26
-rw-r--r--source/blender/blenkernel/intern/screen.c2
-rw-r--r--source/blender/blenkernel/intern/sequence.c69
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c1
-rw-r--r--source/blender/blenkernel/intern/texture.c2
-rw-r--r--source/blender/blenkernel/intern/writeavi.c3
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c317
-rw-r--r--source/blender/blenlib/BLI_editVert.h3
-rw-r--r--source/blender/blenlib/BLI_graph.h1
-rw-r--r--source/blender/blenlib/BLI_listbase.h4
-rw-r--r--source/blender/blenlib/BLI_noise.h2
-rw-r--r--source/blender/blenlib/BLI_rect.h2
-rw-r--r--source/blender/blenlib/BLI_storage.h7
-rw-r--r--source/blender/blenlib/BLI_string.h4
-rw-r--r--source/blender/blenlib/BLI_util.h4
-rw-r--r--source/blender/blenlib/intern/BLI_dynstr.c52
-rw-r--r--source/blender/blenlib/intern/dynamiclist.c2
-rw-r--r--source/blender/blenlib/intern/dynamiclist.h2
-rw-r--r--source/blender/blenlib/intern/fileops.c18
-rw-r--r--source/blender/blenlib/intern/freetypefont.c7
-rw-r--r--source/blender/blenlib/intern/listbase.c2
-rw-r--r--source/blender/blenlib/intern/psfont.c4
-rw-r--r--source/blender/blenlib/intern/storage.c54
-rw-r--r--source/blender/blenlib/intern/string.c2
-rw-r--r--source/blender/blenlib/intern/util.c40
-rw-r--r--source/blender/blenloader/intern/readblenentry.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c388
-rw-r--r--source/blender/blenloader/intern/writefile.c180
-rw-r--r--source/blender/blenpluginapi/intern/Makefile4
-rw-r--r--source/blender/bmesh/bmesh.h3
-rw-r--r--source/blender/bmesh/bmesh_operators.h7
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c80
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c5
-rw-r--r--source/blender/bmesh/operators/subdivideop.c89
-rw-r--r--source/blender/bmesh/operators/subdivideop.h5
-rw-r--r--source/blender/editors/CMakeLists.txt4
-rw-r--r--source/blender/editors/Makefile2
-rw-r--r--source/blender/editors/SConscript1
-rw-r--r--source/blender/editors/animation/Makefile2
-rw-r--r--source/blender/editors/animation/anim_channels.c393
-rw-r--r--source/blender/editors/animation/anim_deps.c70
-rw-r--r--source/blender/editors/animation/anim_draw.c74
-rw-r--r--source/blender/editors/animation/anim_filter.c730
-rw-r--r--source/blender/editors/animation/anim_markers.c4
-rw-r--r--source/blender/editors/animation/anim_ops.c11
-rw-r--r--source/blender/editors/animation/drivers.c68
-rw-r--r--source/blender/editors/animation/keyframes_draw.c309
-rw-r--r--source/blender/editors/animation/keyframes_edit.c24
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c323
-rw-r--r--source/blender/editors/animation/keyingsets.c43
-rw-r--r--source/blender/editors/armature/BIF_retarget.h2
-rw-r--r--source/blender/editors/armature/Makefile2
-rw-r--r--source/blender/editors/armature/armature_intern.h5
-rw-r--r--source/blender/editors/armature/armature_ops.c13
-rw-r--r--source/blender/editors/armature/editarmature.c227
-rw-r--r--source/blender/editors/armature/editarmature_generate.c25
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c2
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c1246
-rw-r--r--source/blender/editors/armature/poselib.c4
-rw-r--r--source/blender/editors/armature/poseobject.c79
-rw-r--r--source/blender/editors/armature/reeb.c14
-rw-r--r--source/blender/editors/armature/reeb.h1
-rw-r--r--source/blender/editors/curve/Makefile2
-rw-r--r--source/blender/editors/curve/curve_intern.h3
-rw-r--r--source/blender/editors/curve/curve_ops.c8
-rw-r--r--source/blender/editors/curve/editcurve.c146
-rw-r--r--source/blender/editors/curve/editfont.c96
-rw-r--r--source/blender/editors/datafiles/B.blend.c5638
-rw-r--r--source/blender/editors/datafiles/Bfont.c2
-rw-r--r--source/blender/editors/datafiles/Makefile2
-rw-r--r--source/blender/editors/datafiles/blenderbuttons.c11029
-rw-r--r--source/blender/editors/gpencil/Makefile2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/include/BIF_gl.h29
-rw-r--r--source/blender/editors/include/BIF_glutil.h4
-rw-r--r--source/blender/editors/include/BIF_transform.h165
-rw-r--r--source/blender/editors/include/ED_anim_api.h100
-rw-r--r--source/blender/editors/include/ED_armature.h17
-rw-r--r--source/blender/editors/include/ED_curve.h6
-rw-r--r--source/blender/editors/include/ED_fileselect.h34
-rw-r--r--source/blender/editors/include/ED_fluidsim.h4
-rw-r--r--source/blender/editors/include/ED_keyframes_draw.h53
-rw-r--r--source/blender/editors/include/ED_keyframing.h30
-rw-r--r--source/blender/editors/include/ED_markers.h2
-rw-r--r--source/blender/editors/include/ED_mesh.h3
-rw-r--r--source/blender/editors/include/ED_object.h9
-rw-r--r--source/blender/editors/include/ED_particle.h2
-rw-r--r--source/blender/editors/include/ED_physics.h (renamed from source/blender/makesdna/DNA_radio_types.h)42
-rw-r--r--source/blender/editors/include/ED_previewrender.h6
-rw-r--r--source/blender/editors/include/ED_retopo.h (renamed from source/blender/editors/include/BIF_retopo.h)5
-rw-r--r--source/blender/editors/include/ED_screen.h3
-rw-r--r--source/blender/editors/include/ED_screen_types.h1
-rw-r--r--source/blender/editors/include/ED_space_api.h1
-rw-r--r--source/blender/editors/include/ED_transform.h150
-rw-r--r--source/blender/editors/include/ED_view3d.h3
-rw-r--r--source/blender/editors/include/UI_icons.h884
-rw-r--r--source/blender/editors/include/UI_interface.h37
-rw-r--r--source/blender/editors/include/UI_resources.h858
-rw-r--r--source/blender/editors/include/UI_view2d.h12
-rw-r--r--source/blender/editors/interface/Makefile2
-rw-r--r--source/blender/editors/interface/interface.c454
-rw-r--r--source/blender/editors/interface/interface_anim.c147
-rw-r--r--source/blender/editors/interface/interface_api.c234
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c587
-rw-r--r--source/blender/editors/interface/interface_icons.c124
-rw-r--r--source/blender/editors/interface/interface_intern.h38
-rw-r--r--source/blender/editors/interface/interface_layout.c362
-rw-r--r--source/blender/editors/interface/interface_panel.c127
-rw-r--r--source/blender/editors/interface/interface_regions.c564
-rw-r--r--source/blender/editors/interface/interface_style.c41
-rw-r--r--source/blender/editors/interface/interface_templates.c860
-rw-r--r--source/blender/editors/interface/interface_utils.c89
-rw-r--r--source/blender/editors/interface/interface_widgets.c469
-rw-r--r--source/blender/editors/interface/keyval.c540
-rw-r--r--source/blender/editors/interface/resources.c58
-rw-r--r--source/blender/editors/interface/view2d.c360
-rw-r--r--source/blender/editors/interface/view2d_ops.c47
-rw-r--r--source/blender/editors/mesh/Makefile2
-rw-r--r--source/blender/editors/mesh/bmesh_select.c14
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c242
-rw-r--r--source/blender/editors/mesh/bmeshutils.c3
-rw-r--r--source/blender/editors/mesh/editmesh.c67
-rw-r--r--source/blender/editors/mesh/editmesh_add.c80
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c9
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c19
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c597
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2929
-rw-r--r--source/blender/editors/mesh/mesh_intern.h31
-rw-r--r--source/blender/editors/mesh/mesh_layers.c434
-rw-r--r--source/blender/editors/mesh/mesh_ops.c245
-rw-r--r--source/blender/editors/mesh/meshtools.c578
-rw-r--r--source/blender/editors/object/Makefile2
-rw-r--r--source/blender/editors/object/editconstraint.c250
-rw-r--r--source/blender/editors/object/editgroup.c2
-rw-r--r--source/blender/editors/object/editkey.c126
-rw-r--r--source/blender/editors/object/editlattice.c174
-rw-r--r--source/blender/editors/object/object_edit.c851
-rw-r--r--source/blender/editors/object/object_intern.h38
-rw-r--r--source/blender/editors/object/object_modifier.c309
-rw-r--r--source/blender/editors/object/object_ops.c50
-rw-r--r--source/blender/editors/object/object_vgroup.c (renamed from source/blender/editors/mesh/editdeform.c)274
-rw-r--r--source/blender/editors/physics/Makefile2
-rw-r--r--source/blender/editors/physics/ed_fluidsim.c113
-rw-r--r--source/blender/editors/physics/ed_pointcache.c385
-rw-r--r--source/blender/editors/physics/editparticle.c62
-rw-r--r--source/blender/editors/preview/Makefile2
-rw-r--r--source/blender/editors/preview/previewrender.c320
-rw-r--r--source/blender/editors/screen/Makefile2
-rw-r--r--source/blender/editors/screen/area.c48
-rw-r--r--source/blender/editors/screen/glutil.c2
-rw-r--r--source/blender/editors/screen/screen_context.c10
-rw-r--r--source/blender/editors/screen/screen_edit.c5
-rw-r--r--source/blender/editors/screen/screen_ops.c284
-rw-r--r--source/blender/editors/sculpt_paint/Makefile2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c17
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c27
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c978
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/space_action/Makefile2
-rw-r--r--source/blender/editors/space_action/action_draw.c111
-rw-r--r--source/blender/editors/space_action/action_edit.c247
-rw-r--r--source/blender/editors/space_action/action_header.c1554
-rw-r--r--source/blender/editors/space_action/action_intern.h35
-rw-r--r--source/blender/editors/space_action/action_ops.c91
-rw-r--r--source/blender/editors/space_action/action_select.c195
-rw-r--r--source/blender/editors/space_action/space_action.c9
-rw-r--r--source/blender/editors/space_api/Makefile2
-rw-r--r--source/blender/editors/space_api/spacetypes.c10
-rw-r--r--source/blender/editors/space_buttons/Makefile2
-rw-r--r--source/blender/editors/space_buttons/SConscript5
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c92
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c6
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h18
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c621
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c40
-rw-r--r--source/blender/editors/space_file/Makefile2
-rw-r--r--source/blender/editors/space_file/file_draw.c223
-rw-r--r--source/blender/editors/space_file/file_header.c187
-rw-r--r--source/blender/editors/space_file/file_intern.h32
-rw-r--r--source/blender/editors/space_file/file_ops.c465
-rw-r--r--source/blender/editors/space_file/file_panels.c164
-rw-r--r--source/blender/editors/space_file/filelist.c96
-rw-r--r--source/blender/editors/space_file/filelist.h7
-rw-r--r--source/blender/editors/space_file/filesel.c104
-rw-r--r--source/blender/editors/space_file/fsmenu.c39
-rw-r--r--source/blender/editors/space_file/fsmenu.h13
-rw-r--r--source/blender/editors/space_file/space_file.c212
-rw-r--r--source/blender/editors/space_file/writeimage.c3
-rw-r--r--source/blender/editors/space_graph/Makefile2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c665
-rw-r--r--source/blender/editors/space_graph/graph_draw.c65
-rw-r--r--source/blender/editors/space_graph/graph_edit.c436
-rw-r--r--source/blender/editors/space_graph/graph_header.c232
-rw-r--r--source/blender/editors/space_graph/graph_intern.h64
-rw-r--r--source/blender/editors/space_graph/graph_ops.c149
-rw-r--r--source/blender/editors/space_graph/graph_select.c113
-rw-r--r--source/blender/editors/space_graph/graph_utils.c288
-rw-r--r--source/blender/editors/space_graph/space_graph.c36
-rw-r--r--source/blender/editors/space_image/Makefile2
-rw-r--r--source/blender/editors/space_image/image_buttons.c89
-rw-r--r--source/blender/editors/space_image/image_draw.c41
-rw-r--r--source/blender/editors/space_image/image_header.c531
-rw-r--r--source/blender/editors/space_image/image_ops.c171
-rw-r--r--source/blender/editors/space_image/space_image.c64
-rw-r--r--source/blender/editors/space_info/Makefile2
-rw-r--r--source/blender/editors/space_info/SConscript3
-rw-r--r--source/blender/editors/space_info/info_header.c507
-rw-r--r--source/blender/editors/space_info/info_intern.h7
-rw-r--r--source/blender/editors/space_info/info_ops.c397
-rw-r--r--source/blender/editors/space_info/space_info.c28
-rw-r--r--source/blender/editors/space_logic/Makefile (renamed from source/blender/radiosity/intern/source/Makefile)31
-rw-r--r--source/blender/editors/space_logic/SConscript15
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c147
-rw-r--r--source/blender/editors/space_logic/logic_header.c126
-rw-r--r--source/blender/editors/space_logic/logic_intern.h58
-rw-r--r--source/blender/editors/space_logic/logic_window.c3351
-rw-r--r--source/blender/editors/space_logic/space_logic.c369
-rw-r--r--source/blender/editors/space_nla/Makefile2
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c426
-rw-r--r--source/blender/editors/space_nla/nla_channels.c516
-rw-r--r--source/blender/editors/space_nla/nla_draw.c1028
-rw-r--r--source/blender/editors/space_nla/nla_edit.c1499
-rw-r--r--source/blender/editors/space_nla/nla_header.c223
-rw-r--r--source/blender/editors/space_nla/nla_intern.h101
-rw-r--r--source/blender/editors/space_nla/nla_ops.c307
-rw-r--r--source/blender/editors/space_nla/nla_select.c614
-rw-r--r--source/blender/editors/space_nla/space_nla.c352
-rw-r--r--source/blender/editors/space_node/Makefile2
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c47
-rw-r--r--source/blender/editors/space_node/node_intern.h1
-rw-r--r--source/blender/editors/space_node/node_ops.c7
-rw-r--r--source/blender/editors/space_node/node_select.c12
-rw-r--r--source/blender/editors/space_node/space_node.c7
-rw-r--r--source/blender/editors/space_outliner/Makefile2
-rw-r--r--source/blender/editors/space_outliner/outliner.c45
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h1
-rw-r--r--source/blender/editors/space_script/Makefile2
-rw-r--r--source/blender/editors/space_script/script_edit.c10
-rw-r--r--source/blender/editors/space_script/space_script.c21
-rw-r--r--source/blender/editors/space_sequencer/Makefile2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c22
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c68
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c19
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c10
-rw-r--r--source/blender/editors/space_sound/Makefile2
-rw-r--r--source/blender/editors/space_text/Makefile2
-rw-r--r--source/blender/editors/space_text/space_text.c14
-rw-r--r--source/blender/editors/space_text/text_draw.c186
-rw-r--r--source/blender/editors/space_text/text_header.c97
-rw-r--r--source/blender/editors/space_text/text_intern.h6
-rw-r--r--source/blender/editors/space_text/text_ops.c126
-rw-r--r--source/blender/editors/space_text/text_python.c8
-rw-r--r--source/blender/editors/space_time/Makefile2
-rw-r--r--source/blender/editors/space_time/time_header.c41
-rw-r--r--source/blender/editors/space_view3d/Makefile2
-rw-r--r--source/blender/editors/space_view3d/SConscript6
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c69
-rw-r--r--source/blender/editors/space_view3d/drawobject.c717
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c167
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c40
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c319
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c1745
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h14
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c31
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c36
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c157
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c82
-rw-r--r--source/blender/editors/transform/Makefile2
-rw-r--r--source/blender/editors/transform/transform.c1319
-rw-r--r--source/blender/editors/transform/transform.h58
-rw-r--r--source/blender/editors/transform/transform_constraints.c207
-rw-r--r--source/blender/editors/transform/transform_conversions.c1441
-rw-r--r--source/blender/editors/transform/transform_generics.c584
-rw-r--r--source/blender/editors/transform/transform_input.c61
-rw-r--r--source/blender/editors/transform/transform_manipulator.c1109
-rw-r--r--source/blender/editors/transform/transform_ndofinput.c11
-rw-r--r--source/blender/editors/transform/transform_numinput.c1
-rw-r--r--source/blender/editors/transform/transform_ops.c265
-rw-r--r--source/blender/editors/transform/transform_orientations.c106
-rw-r--r--source/blender/editors/transform/transform_snap.c22
-rw-r--r--source/blender/editors/util/Makefile2
-rw-r--r--source/blender/editors/util/undo.c22
-rw-r--r--source/blender/editors/uvedit/Makefile2
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c27
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c173
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c22
-rw-r--r--source/blender/gpu/GPU_draw.h4
-rw-r--r--source/blender/gpu/intern/Makefile2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c56
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c4
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
-rw-r--r--source/blender/imbuf/intern/imbuf.h2
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c2
-rw-r--r--source/blender/imbuf/intern/readimage.c21
-rw-r--r--source/blender/makesdna/DNA_action_types.h19
-rw-r--r--source/blender/makesdna/DNA_anim_types.h230
-rw-r--r--source/blender/makesdna/DNA_brush_types.h2
-rw-r--r--source/blender/makesdna/DNA_camera_types.h1
-rw-r--r--source/blender/makesdna/DNA_curve_types.h5
-rw-r--r--source/blender/makesdna/DNA_image_types.h7
-rw-r--r--source/blender/makesdna/DNA_material_types.h8
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h11
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h5
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h10
-rw-r--r--source/blender/makesdna/DNA_object_force.h24
-rw-r--r--source/blender/makesdna/DNA_object_types.h14
-rw-r--r--source/blender/makesdna/DNA_particle_types.h50
-rw-r--r--source/blender/makesdna/DNA_scene_types.h95
-rw-r--r--source/blender/makesdna/DNA_screen_types.h9
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h7
-rw-r--r--source/blender/makesdna/DNA_space_types.h93
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h25
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h4
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h3
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h39
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c5
-rw-r--r--source/blender/makesdna/intern/makesdna.c7
-rw-r--r--source/blender/makesrna/RNA_access.h81
-rw-r--r--source/blender/makesrna/RNA_define.h15
-rw-r--r--source/blender/makesrna/RNA_enum_types.h3
-rw-r--r--source/blender/makesrna/RNA_types.h36
-rw-r--r--source/blender/makesrna/SConscript28
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt10
-rw-r--r--source/blender/makesrna/intern/Makefile28
-rw-r--r--source/blender/makesrna/intern/SConscript26
-rw-r--r--source/blender/makesrna/intern/makesrna.c349
-rw-r--r--source/blender/makesrna/intern/rna_ID.c7
-rw-r--r--source/blender/makesrna/intern/rna_access.c699
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c38
-rw-r--r--source/blender/makesrna/intern/rna_animation.c12
-rw-r--r--source/blender/makesrna/intern/rna_armature.c598
-rw-r--r--source/blender/makesrna/intern/rna_brush.c48
-rw-r--r--source/blender/makesrna/intern/rna_camera.c19
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c73
-rw-r--r--source/blender/makesrna/intern/rna_color.c16
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c297
-rw-r--r--source/blender/makesrna/intern/rna_context.c36
-rw-r--r--source/blender/makesrna/intern/rna_controller.c18
-rw-r--r--source/blender/makesrna/intern/rna_curve.c53
-rw-r--r--source/blender/makesrna/intern/rna_define.c90
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c337
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c157
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c94
-rw-r--r--source/blender/makesrna/intern/rna_internal.h14
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h13
-rw-r--r--source/blender/makesrna/intern/rna_key.c73
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c134
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c137
-rw-r--r--source/blender/makesrna/intern/rna_main.c6
-rw-r--r--source/blender/makesrna/intern/rna_material.c227
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c361
-rw-r--r--source/blender/makesrna/intern/rna_meta.c22
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c285
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c254
-rw-r--r--source/blender/makesrna/intern/rna_object.c418
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c654
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c2
-rw-r--r--source/blender/makesrna/intern/rna_particle.c819
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
-rw-r--r--source/blender/makesrna/intern/rna_property.c12
-rw-r--r--source/blender/makesrna/intern/rna_radio.c140
-rw-r--r--source/blender/makesrna/intern/rna_rna.c138
-rw-r--r--source/blender/makesrna/intern/rna_scene.c844
-rw-r--r--source/blender/makesrna/intern/rna_screen.c41
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c118
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c258
-rw-r--r--source/blender/makesrna/intern/rna_sound.c22
-rw-r--r--source/blender/makesrna/intern/rna_space.c654
-rw-r--r--source/blender/makesrna/intern/rna_texture.c232
-rw-r--r--source/blender/makesrna/intern/rna_ui.c58
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c283
-rw-r--r--source/blender/makesrna/intern/rna_vpaint.c16
-rw-r--r--source/blender/makesrna/intern/rna_wm.c250
-rw-r--r--source/blender/makesrna/intern/rna_world.c110
-rw-r--r--source/blender/nodes/TEX_node.h1
-rw-r--r--source/blender/radiosity/CMakeLists.txt36
-rw-r--r--source/blender/radiosity/Makefile34
-rw-r--r--source/blender/radiosity/SConscript12
-rw-r--r--source/blender/radiosity/extern/include/radio.h173
-rw-r--r--source/blender/radiosity/extern/include/radio_types.h168
-rw-r--r--source/blender/radiosity/intern/Makefile34
-rw-r--r--source/blender/radiosity/intern/source/raddisplay.c477
-rw-r--r--source/blender/radiosity/intern/source/radfactors.c939
-rw-r--r--source/blender/radiosity/intern/source/radio.c390
-rw-r--r--source/blender/radiosity/intern/source/radnode.c1103
-rw-r--r--source/blender/radiosity/intern/source/radpostprocess.c824
-rw-r--r--source/blender/radiosity/intern/source/radpreprocess.c828
-rw-r--r--source/blender/radiosity/intern/source/radrender.c530
-rw-r--r--source/blender/render/extern/include/RE_render_ext.h3
-rw-r--r--source/blender/render/intern/source/convertblender.c238
-rw-r--r--source/blender/render/intern/source/initrender.c3
-rw-r--r--source/blender/render/intern/source/pipeline.c50
-rw-r--r--source/blender/render/intern/source/texture.c6
-rw-r--r--source/blender/render/intern/source/zbuf.c138
-rw-r--r--source/blender/windowmanager/WM_api.h14
-rw-r--r--source/blender/windowmanager/WM_types.h52
-rw-r--r--source/blender/windowmanager/intern/Makefile2
-rw-r--r--source/blender/windowmanager/intern/wm.c12
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c24
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c41
-rw-r--r--source/blender/windowmanager/intern/wm_files.c8
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c5
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c313
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c67
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c6
-rw-r--r--source/blender/windowmanager/wm_cursors.h2
-rw-r--r--source/blender/windowmanager/wm_event_system.h2
-rw-r--r--source/blender/windowmanager/wm_window.h1
-rw-r--r--source/creator/CMakeLists.txt14
-rw-r--r--source/creator/creator.c12
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp104
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt3
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp27
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderCanvas.h10
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.cpp16
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.h7
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp88
-rw-r--r--source/gameengine/BlenderRoutines/Makefile4
-rw-r--r--source/gameengine/BlenderRoutines/SConscript8
-rw-r--r--source/gameengine/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp245
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.h11
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp9
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.h5
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp16
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp40
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.h9
-rw-r--r--source/gameengine/Converter/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp52
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.h15
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp58
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.h11
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp580
-rw-r--r--source/gameengine/Converter/Makefile4
-rw-r--r--source/gameengine/Converter/SConscript6
-rw-r--r--source/gameengine/Expressions/BoolValue.cpp3
-rw-r--r--source/gameengine/Expressions/CMakeLists.txt1
-rw-r--r--source/gameengine/Expressions/InputParser.cpp60
-rw-r--r--source/gameengine/Expressions/IntValue.cpp2
-rw-r--r--source/gameengine/Expressions/KX_Python.h2
-rw-r--r--source/gameengine/Expressions/ListValue.cpp88
-rw-r--r--source/gameengine/Expressions/ListValue.h4
-rw-r--r--source/gameengine/Expressions/Makefile1
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp338
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h101
-rw-r--r--source/gameengine/Expressions/SConscript2
-rw-r--r--source/gameengine/Expressions/StringValue.h2
-rw-r--r--source/gameengine/Expressions/Value.cpp172
-rw-r--r--source/gameengine/Expressions/Value.h16
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.cpp42
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.h13
-rw-r--r--source/gameengine/GameLogic/SCA_ANDController.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_ANDController.h10
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.cpp37
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_AlwaysSensor.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_AlwaysSensor.h12
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.cpp40
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_ExpressionController.cpp5
-rw-r--r--source/gameengine/GameLogic/SCA_ExpressionController.h11
-rw-r--r--source/gameengine/GameLogic/SCA_IActuator.cpp5
-rw-r--r--source/gameengine/GameLogic/SCA_IActuator.h3
-rw-r--r--source/gameengine/GameLogic/SCA_IController.cpp47
-rw-r--r--source/gameengine/GameLogic/SCA_IController.h6
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.cpp44
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h6
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.cpp81
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.h7
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp46
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp73
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp61
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_LogicManager.cpp1
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp47
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_NANDController.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_NANDController.h6
-rw-r--r--source/gameengine/GameLogic/SCA_NORController.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_NORController.h10
-rw-r--r--source/gameengine/GameLogic/SCA_ORController.cpp32
-rw-r--r--source/gameengine/GameLogic/SCA_ORController.h9
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.cpp38
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.h8
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp42
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp63
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h6
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp48
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.h7
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp46
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.h7
-rw-r--r--source/gameengine/GameLogic/SCA_XNORController.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_XNORController.h5
-rw-r--r--source/gameengine/GameLogic/SCA_XORController.cpp31
-rw-r--r--source/gameengine/GameLogic/SCA_XORController.h10
-rw-r--r--source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp412
-rw-r--r--source/gameengine/GamePlayer/common/GPC_PolygonMaterial.h89
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp88
-rw-r--r--source/gameengine/GamePlayer/common/Makefile3
-rw-r--r--source/gameengine/GamePlayer/common/SConscript5
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp3
-rw-r--r--source/gameengine/GamePlayer/common/unix/Makefile2
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt1
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp4
-rw-r--r--source/gameengine/GamePlayer/ghost/Makefile1
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript5
-rw-r--r--source/gameengine/Ketsji/BL_Shader.cpp43
-rw-r--r--source/gameengine/Ketsji/BL_Shader.h6
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt3
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp37
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h7
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp43
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h7
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp43
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.h9
-rw-r--r--source/gameengine/Ketsji/KX_CDActuator.cpp47
-rw-r--r--source/gameengine/Ketsji/KX_CDActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp70
-rw-r--r--source/gameengine/Ketsji/KX_Camera.h7
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.cpp39
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.h8
-rw-r--r--source/gameengine/Ketsji/KX_ClientObjectInfo.h12
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp50
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.cpp42
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintWrapper.h5
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObject.h30
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp592
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.cpp45
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp504
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h46
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp37
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp17
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h2
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp158
-rw-r--r--source/gameengine/Ketsji/KX_Light.h11
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp55
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.h3
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.cpp33
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h5
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp46
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.h9
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.cpp159
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.h18
-rw-r--r--source/gameengine/Ketsji/KX_OdePhysicsController.cpp257
-rw-r--r--source/gameengine/Ketsji/KX_OdePhysicsController.h109
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.cpp37
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp49
-rw-r--r--source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h6
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.cpp61
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.h2
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp44
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.h7
-rw-r--r--source/gameengine/Ketsji/KX_PyConstraintBinding.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.cpp92
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h55
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp147
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp213
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.cpp137
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.cpp40
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.h7
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.cpp39
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.h8
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp45
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp45
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.h8
-rw-r--r--source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp35
-rw-r--r--source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h6
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp45
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h9
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp88
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h10
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp50
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp57
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.h7
-rw-r--r--source/gameengine/Ketsji/KX_StateActuator.cpp41
-rw-r--r--source/gameengine/Ketsji/KX_StateActuator.h9
-rw-r--r--source/gameengine/Ketsji/KX_SumoPhysicsController.cpp244
-rw-r--r--source/gameengine/Ketsji/KX_SumoPhysicsController.h122
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp44
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.h7
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp51
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.cpp44
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.h5
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp96
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.h3
-rw-r--r--source/gameengine/Ketsji/KX_VisibilityActuator.cpp43
-rw-r--r--source/gameengine/Ketsji/KX_VisibilityActuator.h8
-rw-r--r--source/gameengine/Ketsji/Makefile7
-rw-r--r--source/gameengine/Ketsji/SConscript36
-rw-r--r--source/gameengine/Physics/BlOde/Makefile48
-rw-r--r--source/gameengine/Physics/BlOde/OdePhysicsController.cpp625
-rw-r--r--source/gameengine/Physics/BlOde/OdePhysicsController.h164
-rw-r--r--source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp277
-rw-r--r--source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h94
-rw-r--r--source/gameengine/Physics/BlOde/SConscript15
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp24
-rw-r--r--source/gameengine/Physics/Dummy/Makefile2
-rw-r--r--source/gameengine/Physics/Makefile3
-rw-r--r--source/gameengine/Physics/Sumo/CMakeLists.txt46
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/Makefile34
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h11
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_ClientObjectInfo.h16
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Debug.h26
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_FhObject.h56
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h77
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h393
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Props.h58
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h172
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/sample/Makefile25
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/sample/particle.cpp709
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/sample/particle0.cpp695
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/src/Makefile14
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/src/SM_FhObject.cpp180
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/src/SM_MotionState.cpp100
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp1298
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp378
-rw-r--r--source/gameengine/Physics/Sumo/Makefile50
-rw-r--r--source/gameengine/Physics/Sumo/SConscript25
-rw-r--r--source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.cpp66
-rw-r--r--source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.h28
-rw-r--r--source/gameengine/Physics/Sumo/SumoPhysicsController.cpp495
-rw-r--r--source/gameengine/Physics/Sumo/SumoPhysicsController.h192
-rw-r--r--source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp264
-rw-r--r--source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h110
-rw-r--r--source/gameengine/Physics/Sumo/convert.txt35
-rw-r--r--source/gameengine/Physics/Sumo/include/interpolator.h27
-rw-r--r--source/gameengine/Physics/common/Makefile2
-rw-r--r--source/gameengine/PyDoc/API_intro.py29
-rw-r--r--source/gameengine/PyDoc/GameLogic.py21
-rw-r--r--source/gameengine/PyDoc/GameTypes.py16
-rw-r--r--source/gameengine/Rasterizer/RAS_LightObject.h4
-rw-r--r--source/gameengine/SConscript8
-rw-r--r--source/gameengine/VideoTexture/FilterBlueScreen.cpp20
-rw-r--r--source/gameengine/VideoTexture/FilterColor.cpp8
-rw-r--r--source/gameengine/VideoTexture/FilterNormal.cpp4
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp16
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.cpp16
-rw-r--r--source/gameengine/VideoTexture/VideoBase.cpp4
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp4
-rw-r--r--source/gameengine/VideoTexture/blendVideoTex.cpp3
-rw-r--r--source/nan_compile.mk15
-rw-r--r--source/nan_definitions.mk43
-rw-r--r--source/nan_link.mk4
-rw-r--r--tools/Blender.py22
-rwxr-xr-xtools/btools.py25
978 files changed, 59887 insertions, 105533 deletions
diff --git a/CMake/macros.cmake b/CMake/macros.cmake
index bc8892e4b99..44fc2903875 100644
--- a/CMake/macros.cmake
+++ b/CMake/macros.cmake
@@ -61,7 +61,7 @@ MACRO(SETUP_LIBLINKS
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
#TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
- TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+ TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIB} ${LLIBS})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c7ee34cc14..a4796c2eee9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,9 +87,9 @@ INCLUDE(CMake/macros.cmake)
#-----------------------------------------------------------------------------
#Platform specifics
-IF(UNIX)
+IF(UNIX AND NOT APPLE)
IF(WITH_OPENAL)
- INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
+ FIND_PACKAGE(OpenAL)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
SET(OPENAL_LIB ${OPENAL_LIBRARY})
@@ -102,22 +102,12 @@ IF(UNIX)
FIND_LIBRARY(INTL_LIBRARY
NAMES intl
PATHS
- /usr/local/lib
- /usr/lib
/sw/lib
- /opt/local/lib
- /opt/csw/lib
- /opt/lib
)
FIND_LIBRARY(ICONV_LIBRARY
NAMES iconv
PATHS
- /usr/local/lib
- /usr/lib
/sw/lib
- /opt/local/lib
- /opt/csw/lib
- /opt/lib
)
IF(INTL_LIBRARY AND ICONV_LIBRARY)
SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
@@ -136,14 +126,14 @@ IF(UNIX)
)
SET(FREETYPE_LIB freetype)
- INCLUDE(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
+ FIND_PACKAGE(PythonLibs)
SET(PYTHON_INC "${PYTHON_INCLUDE_PATH}" CACHE STRING "")
SET(PYTHON_LIB "${PYTHON_LIBRARIES}" CACHE STRING "")
- INCLUDE(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
+ FIND_PACKAGE(PythonInterp)
SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
- INCLUDE(${CMAKE_ROOT}/Modules/FindSDL.cmake)
+ FIND_PACKAGE(SDL)
SET(SDL_INC ${SDL_INCLUDE_DIR})
SET(SDL_LIB ${SDL_LIBRARY})
@@ -164,11 +154,11 @@ IF(UNIX)
SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
- SET(JPEG_LIB jpeg)
+ FIND_PACKAGE(JPEG REQUIRED)
- SET(PNG_LIB png)
+ FIND_PACKAGE(PNG REQUIRED)
- SET(ZLIB_LIB z)
+ FIND_PACKAGE(ZLIB REQUIRED)
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11 -ldl")
@@ -186,12 +176,13 @@ IF(UNIX)
# Better warnings
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wnested-externs -Wdeclaration-after-statement")
- INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
-ENDIF(UNIX)
+ INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
+ENDIF(UNIX AND NOT APPLE)
IF(WIN32)
- 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)
@@ -202,10 +193,10 @@ IF(WIN32)
ENDIF(CMAKE_CL_64)
SET(PYTHON ${LIBDIR}/python)
- SET(PYTHON_VERSION 2.5)
+ SET(PYTHON_VERSION 2.6)
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
SET(PYTHON_BINARY python)
- SET(PYTHON_LIB python25)
+ SET(PYTHON_LIB python26)
SET(PYTHON_LIBPATH ${PYTHON}/lib)
IF(CMAKE_CL_64)
@@ -219,15 +210,15 @@ IF(WIN32)
ENDIF(CMAKE_CL_64)
IF(CMAKE_CL_64)
- SET(PNG_LIB libpng)
+ SET(PNG_LIBRARIES libpng)
ELSE(CMAKE_CL_64)
- SET(PNG_LIB libpng_st)
+ SET(PNG_LIBRARIES libpng_st)
ENDIF(CMAKE_CL_64)
- SET(JPEG_LIB libjpeg)
+ SET(JPEG_LIBRARY libjpeg)
SET(ZLIB ${LIBDIR}/zlib)
SET(ZLIB_INC ${ZLIB}/include)
- SET(ZLIB_LIB libz)
+ SET(ZLIB_LIBRARIES zlib)
SET(ZLIB_LIBPATH ${ZLIB}/lib)
SET(PTHREADS ${LIBDIR}/pthreads)
@@ -335,7 +326,7 @@ IF(APPLE)
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
IF(WITH_OPENAL)
- INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
+ FIND_PACKAGE(OpenAL)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
SET(OPENAL_LIB ${OPENAL_LIBRARY})
@@ -362,12 +353,12 @@ IF(APPLE)
SET(GETTEXT_LIB intl iconv)
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
- SET(PNG_LIB png)
- SET(JPEG_LIB jpeg)
+ SET(PNG_LIBRARIES png)
+ SET(JPEG_LIBRARY jpeg)
SET(ZLIB /usr)
SET(ZLIB_INC "${ZLIB}/include")
- SET(ZLIB_LIB z)
+ SET(ZLIB_LIBRARIES z)
SET(FREETYPE ${LIBDIR}/freetype)
SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
@@ -438,7 +429,7 @@ ENDIF(WITH_WEBPLUGIN)
#-----------------------------------------------------------------------------
# Configure OpenGL.
-INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
+FIND_PACKAGE(OpenGL)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
#-----------------------------------------------------------------------------
# Extra compile flags
diff --git a/SConstruct b/SConstruct
index ac043f06e7a..dab4dde08a3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -285,9 +285,7 @@ if 'blenderlite' in B.targets:
target_env_defs['WITH_BF_SDL'] = False
target_env_defs['WITH_BF_JPEG'] = False
target_env_defs['WITH_BF_PNG'] = False
- target_env_defs['WITH_BF_ODE'] = False
target_env_defs['WITH_BF_BULLET'] = False
- target_env_defs['WITH_BF_SOLID'] = False
target_env_defs['WITH_BF_BINRELOC'] = False
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['BF_NO_ELBEEM'] = True
@@ -404,6 +402,9 @@ 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')
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
@@ -465,27 +466,17 @@ if env['OURPLATFORM']!='darwin':
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['WITH_BF_PYTHON']:
- #-- .blender/scripts
- scriptpath='release/scripts'
- for dp, dn, df in os.walk(scriptpath):
- if 'CVS' in dn:
- dn.remove('CVS')
- if '.svn' in dn:
- dn.remove('.svn')
- dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
- source=[dp+os.sep+f for f in df]
- scriptinstall.append(env.Install(dir=dir,source=source))
-
- #-- .blender/ui
- scriptpath='release/ui'
- for dp, dn, df in os.walk(scriptpath):
- if 'CVS' in dn:
- dn.remove('CVS')
- if '.svn' in dn:
- dn.remove('.svn')
- dir=env['BF_INSTALLDIR']+'/.blender/ui'+dp[len(scriptpath):]
- source=[dp+os.sep+f for f in df]
- scriptinstall.append(env.Install(dir=dir,source=source))
+ #-- .blender/scripts, .blender/ui, .blender/io
+ scriptpaths=['release/scripts', 'release/ui', 'release/io']
+ for scriptpath in scriptpaths:
+ for dp, dn, df in os.walk(scriptpath):
+ if 'CVS' in dn:
+ dn.remove('CVS')
+ if '.svn' in dn:
+ dn.remove('.svn')
+ dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):]
+ source=[dp+os.sep+f for f in df]
+ scriptinstall.append(env.Install(dir=dir,source=source))
#-- icons
if env['OURPLATFORM']=='linux2':
diff --git a/config/darwin-config.py b/config/darwin-config.py
index 080820f885a..785f1cb42a2 100644
--- a/config/darwin-config.py
+++ b/config/darwin-config.py
@@ -141,20 +141,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE=True
WITH_BF_PLAYER=True
-WITH_BF_ODE = False
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = '${BF_ODE}/include'
-BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/irix6-config.py b/config/irix6-config.py
index 3c8fd0dece4..87af6b29eb1 100644
--- a/config/irix6-config.py
+++ b/config/irix6-config.py
@@ -74,20 +74,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE='false'
-WITH_BF_ODE = 'false'
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = 'true'
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/linux2-config.py b/config/linux2-config.py
index 4cea4bb8e05..86de10c8fb3 100644
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -77,20 +77,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
-WITH_BF_ODE = False
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py
index 2f15ef67e6c..5e5c44ecd69 100644
--- a/config/linuxcross-config.py
+++ b/config/linuxcross-config.py
@@ -74,20 +74,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = False
-WITH_BF_ODE = True
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py
index f27066b43f7..2b0621e2ed3 100644
--- a/config/openbsd3-config.py
+++ b/config/openbsd3-config.py
@@ -61,20 +61,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE=False
-WITH_BF_ODE = False
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = '${BF_ODE}/include'
-BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/sunos5-config.py b/config/sunos5-config.py
index e050a5950aa..dc067b6f568 100644
--- a/config/sunos5-config.py
+++ b/config/sunos5-config.py
@@ -69,20 +69,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE=False
-WITH_BF_ODE = False
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index 5b9b2f9b9dc..eab373d2553 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -3,12 +3,16 @@ LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.5'
+#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 = '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'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
@@ -77,20 +81,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = False
-WITH_BF_ODE = True
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py
index b8886569aa8..a559d76a56c 100644
--- a/config/win32-vc-config.py
+++ b/config/win32-vc-config.py
@@ -9,10 +9,10 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = '2.6'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
-BF_PYTHON_LIB = 'python25'
+BF_PYTHON_LIB = 'python26'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
@@ -90,20 +90,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
-WITH_BF_ODE = True
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
diff --git a/config/win64-vc-config.py b/config/win64-vc-config.py
index fcc6f1ab846..83e27a85574 100644
--- a/config/win64-vc-config.py
+++ b/config/win64-vc-config.py
@@ -93,20 +93,11 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
-WITH_BF_ODE = True
-BF_ODE = LIBDIR + '/ode'
-BF_ODE_INC = BF_ODE + '/include'
-BF_ODE_LIB = BF_ODE + '/lib/libode.a'
-
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
-BF_SOLID = '#extern/solid'
-BF_SOLID_INC = '${BF_SOLID}'
-BF_SOLID_LIB = 'extern_solid'
-
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 8dcace11e7d..b6cfe3b113e 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -24,11 +24,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-IF(WITH_GAMEENGINE)
- ADD_SUBDIRECTORY(qhull)
- ADD_SUBDIRECTORY(solid)
-ENDIF(WITH_GAMEENGINE)
-
IF(WITH_BULLET)
ADD_SUBDIRECTORY(bullet2)
ENDIF(WITH_BULLET)
diff --git a/extern/Makefile b/extern/Makefile
index 8311006444f..61499da8743 100644
--- a/extern/Makefile
+++ b/extern/Makefile
@@ -30,7 +30,7 @@ include nan_definitions.mk
SOURCEDIR = extern
DIR = $(OCGDIR)/extern
-DIRS = qhull/src solid glew/src
+DIRS = glew/src
ifeq ($(WITH_FFMPEG), true)
ifeq ($(NAN_FFMPEG), $(LCGDIR)/ffmpeg)
diff --git a/extern/SConscript b/extern/SConscript
index 126f40b00b3..175613c3d2b 100644
--- a/extern/SConscript
+++ b/extern/SConscript
@@ -4,10 +4,6 @@ Import('env')
SConscript(['glew/SConscript'])
-if env['WITH_BF_GAMEENGINE']:
- if env['WITH_BF_SOLID']:
- SConscript(['qhull/SConscript', 'solid/SConscript'])
-
if env['WITH_BF_BULLET']:
SConscript(['bullet2/src/SConscript'])
diff --git a/extern/qhull/CMakeLists.txt b/extern/qhull/CMakeLists.txt
deleted file mode 100644
index f2ac24afff3..00000000000
--- a/extern/qhull/CMakeLists.txt
+++ /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) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-SET(INC include src)
-
-SET(SRC
- src/geom.c
- src/geom2.c
- src/global.c
- src/io.c
- src/mem.c
- src/merge.c
- src/poly.c
- src/poly2.c
- src/qhull.c
- src/qset.c
- src/stat.c
- src/user.c
-)
-
-BLENDERLIB(extern_qhull "${SRC}" "${INC}")
-#, libtype=['game2','player'], priority=[50, 85]
diff --git a/extern/qhull/COPYING.txt b/extern/qhull/COPYING.txt
deleted file mode 100644
index 1334eba6d0b..00000000000
--- a/extern/qhull/COPYING.txt
+++ /dev/null
@@ -1,37 +0,0 @@
- Qhull, Copyright (c) 1993-2002
-
- The National Science and Technology Research Center for
- Computation and Visualization of Geometric Structures
- (The Geometry Center)
- University of Minnesota
- 400 Lind Hall
- 207 Church Street S.E.
- Minneapolis, MN 55455 USA
-
- email: qhull@geom.umn.edu
-
-This software includes Qhull from The Geometry Center. Qhull is
-copyrighted as noted above. Qhull is free software and may be obtained
-via http from www.geom.umn.edu. It may be freely copied, modified,
-and redistributed under the following conditions:
-
-1. All copyright notices must remain intact in all files.
-
-2. A copy of this text file must be distributed along with any copies
- of Qhull that you redistribute; this includes copies that you have
- modified, or copies of programs or other software products that
- include Qhull.
-
-3. If you modify Qhull, you must include a notice giving the
- name of the person performing the modification, the date of
- modification, and the reason for such modification.
-
-4. When distributing modified versions of Qhull, or other software
- products that include Qhull, you must provide notice that the original
- source code may be obtained as noted above.
-
-5. There is no warranty or other guarantee of fitness for Qhull, it is
- provided solely "as is". Bug reports or fixes may be sent to
- qhull_bug@geom.umn.edu; the authors may or may not act on them as
- they desire.
-
diff --git a/extern/qhull/README.txt b/extern/qhull/README.txt
deleted file mode 100644
index 9ef958a1f47..00000000000
--- a/extern/qhull/README.txt
+++ /dev/null
@@ -1,318 +0,0 @@
-Name
-
- qhull, rbox 2002.1 August 20, 2002
-
-Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection
-
- Documentation:
- html/index.htm
-
- Available from:
- <http://www.geom.umn.edu/software/qhull>
- <http://savannah.gnu.org/projects/qhull>
- <http://www.thesa.com/software/qhull>
-
- Version 1 (simplicial only):
- <http://www.geom.umn.edu/software/qhull/qhull-1.0.tar.gz>
- <http://www.geom.umn.edu/software/qhull/qhull.sit.hqx>
-
- News and a paper:
- <http://www.geom.umn.edu/~bradb/qhull-news.html>
- <http://www.geom.umn.edu/software/qhull/qhull-96.ps>
-
-Purpose
-
- Qhull is a general dimension convex hull program that reads a set
- of points from stdin, and outputs the smallest convex set that contains
- the points to stdout. It also generates Delaunay triangulations, Voronoi
- diagrams, furthest-site Voronoi diagrams, and halfspace intersections
- about a point.
-
- Rbox is a useful tool in generating input for Qhull; it generates
- hypercubes, diamonds, cones, circles, simplices, spirals,
- lattices, and random points.
-
- Qhull produces graphical output for Geomview. This helps with
- understanding the output. <http://www.geomview.org>
-
-
-Environment requirements
-
- Qhull and rbox should run on all 32-bit and 64-bit computers. Use
- an ANSI C or C++ compiler to compile the program. The software is
- self-contained.
-
- Qhull is copyrighted software. Please read COPYING.txt and REGISTER.txt
- before using or distributing Qhull.
-
-To contribute to Qhull
-
- Qhull is on Savannah, http://savannah.gnu.org/projects/qhull/
-
-Qhull on Windows 95, 98, ME, NT, 2000, XP
-
- The zip file contains rbox.exe, qhull.exe, qconvex.exe, qdelaunay.exe,
- qhalf.exe, qvoronoi.exe, documentation files, and source files.
-
- To install Qhull:
- - Unzip the files into a directory. You may use WinZip32 <www.hotfiles.com>
- - Open a DOS window for the directory.
- - In Windows 95, the DOS window needs improvement.
- - Double-click on qhull\eg\qhull-go.bat to call doskey (arrow keys).
- - Increase the size of the screen font to 8x12.
- - If the text is too dim, fix the screen colors with shareware (e.g., crt.exe)
- - If you use qhull a lot, consider using the Cygwin Unix shell,
- Cygwin tools (http://sources.redhat.com/cygwin/)
- - Execute 'qconvex' for a synopsis and examples.
- - Execute 'rbox 10 | qconvex' to compute the convex hull of 10 random points.
- - Execute 'rbox 10 | qconvex i TO file' to write results to 'file'.
- - If an error occurs, Windows 95 sends the error to stdout instead of stderr
- - use 'TO xxx' to send normal output to xxx and error output to stdout
- - Browse the documentation: qhull\html\index.htm
-
-Compiling for Unix
-
- The gzip file, qhull.tgz, contains documentation and source files for
- qhull and rbox.
-
- To unpack the gzip file
- - tar zxf qhull.tgz
- - cd qhull
-
- Compiling with the Debian Make:[R. Laboissiere]
- - cd src
- - ./Make-config.sh
- - cd ..
- - configure
- - make
-
- Compiling with Makefile (i.e., Makefile.txt)
- - cd src
- - in Makefile, check the CC, CCOPTS1, PRINTMAN, and PRINTC defines
- - the defaults are gcc and enscript
- - CCOPTS1 should include the ANSI flag. It defines __STDC__
- - in user.h, check the definitions of qh_SECticks and qh_CPUclock.
- - use '#define qh_CLOCKtype 2' for timing runs longer than 1 hour
- - type: make
- - this builds: qhull qconvex qdelaunay qhalf qvoronoi rbox libqhull.a
- - type: make doc
- - this prints the man page
- - See also qhull/html/index.htm
- - if your compiler reports many errors, it is probably not a ANSI C compiler
- - you will need to set the -ansi switch or find another compiler
- - if your compiler warns about missing prototypes for fprintf() etc.
- - this is ok, your compiler should have these in stdio.h
- - if your compiler warns about missing prototypes for memset() etc.
- - include memory.h in qhull_a.h
- - if your compiler is gcc-2.95.1, you need to set flag -fno-strict-aliasing.
- - This flag is set by default for other versions [Karas, Krishnaswami]
- - if your compiler reports "global.c: storage size of 'qh_qh' isn't known"
- - delete the initializer "={0}" in global.c, stat.c and mem.c
- - if your compiler warns about "stat.c: improper initializer"
- - this is ok, the initializer is not used
- - if you have trouble building libqhull.a with 'ar'
- - try 'make -f Makefile.txt qhullx'
- - if the code compiles, the qhull test case will automatically execute
- - if an error occurs, there's an incompatibility between machines
- - For gcc-2.95.1, you need to set flag -fno-strict-aliasing.
- It is set by default for other versions of gcc [Karas, Krishnaswami]
- - If you can, try a different compiler
- - You can turn off the Qhull memory manager with qh_NOmem in mem.h
- - You can turn off compiler optimization (-O2 in Makefile)
- - If you find the source of the problem, please let us know
- - if you have Geomview (www.geomview.org)
- - try 'rbox 100 | qconvex G >a' and load 'a' into Geomview
- - run 'q_eg' for Geomview examples of Qhull output (see qh-eg.htm)
- - to install the programs and their man pages:
- - define MANDIR and BINDIR
- - type 'make install'
-
-Compiling for Windows NT, 2000, XP with cygwin (www.cygwin.com)
-
- - install cygwin with gcc, make, ar, and ln
- - cd qhull/src
- - make -f Makefile.txt
-
-Compiling for Windows 95, 98, NT, 2000, XP
-
- Qhull compiles as a console application in Visual C++ 5.0 at warning
- level 3.
-
- Visual C++ quickstart for qhull.exe:
- - create a "Win32 console application" called "qhull"
- - add the following files:
- geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c
- qset.c stat.c unix.c user.c
- - create a "Win32 console application" called "rbox"
- - add rbox.c
-
- Visual C++ quickstart for qhull library, qconvex.exe, etc.
- - To simplify setting up lots of projects,
- - create a temporary "Win32 console application" called "source"
- - add all .c files from .../src/...
- - In Tools::Options::Tab
- Set tab size to 8 and indent size to 2
-
- - create a "Win32 console application" called "rbox"
- - move rbox.c from "qhull source"
- - for Project:Settings..., Link
- you only need the default libraries
- - build the project
-
- - create a "Win32 static library" called "library"
- - move these files from "qhull source"
- geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c
- qset.c stat.c user.c
- - set the library file (use the same for debug and release)
- - build the project
-
- - create a "Win32 console application" called "qhull"
- - move unix.c from "qhull source"
- - Set the library file in Project:Settings..., Link
- - Qhull does not use other libraries
-
- - create a "Win32 console application" called "qconvex"
- - move qconvex.c from "qhull source"
- - Set the library file in Project:Settings..., Link
-
- - do the same for qdelaun.c, qhalf, qvoronoi.c, user_eg.c, user_eg2.c
- - delete "qhull sources" since it is no longer needed
- - Set the library file in Project:Settings..., Link
- - use Project:Settings to make any changes
- - use batch build to rebuild everything
-
- Qhull compiles with Borland C++ 5.0 bcc32. A Makefile is included.
- Execute 'make -f MBorland'. If you use the Borland IDE, set the ANSI
- option in Options:Project:Compiler:Source:Language-compliance.
-
- Qhull compiles with Borland C++ 4.02 for Win32 and DOS Power Pack.
- Use 'make -f MBorland -D_DPMI'. Qhull 1.0 compiles with Borland
- C++ 4.02. For rbox 1.0, use "bcc32 -WX -w- -O2-e -erbox -lc rbox.c".
- Use the same options for Qhull 1.0. [D. Zwick]
-
- Qhull compiles with Metrowerks C++ 1.7 with the ANSI option.
-
- If you turn on full warnings, the compiler will report a number of
- unused variables, variables set but not used, and dead code. These are
- intentional. For example, variables may be initialized (unnecessarily)
- to prevent warnings about possible use of uninitialized variables.
-
-Compiling for the Power Macintosh
-
- Qhull compiles for the Power Macintosh with Metrowerk's C compiler.
- It uses the SIOUX interface to read point coordinates and return output.
- There is no graphical output. For project files, see 'Compiling for
- Windows 95'. Instead of using SIOUX, Qhull may be embedded within an
- application.
-
- Version 1 is available for Macintosh computers by download of qhull.sit.hqx
- It reads point coordinates from a standard file and returns output
- to a standard file. There is no graphical output.
-
-
-Compiling for other machines
-
- Some users have reported problems with compiling Qhull under Irix 5.1. It
- compiles under other versions of Irix.
-
- If you have troubles with the memory manager, you can turn it off by
- defining qh_NOmem in mem.h.
-
- You may compile Qhull with a C++ compiler.
-
-
-Distributed files
-
- README.txt // instructions for installing Qhull
- REGISTER.txt // Qhull registration
- COPYING.txt // copyright notice
- Announce.txt // announcement
- Changes.txt // change history for Qhull and rbox
- qh-faq.htm // Frequently asked questions
- qh-home.htm // Home page
- qh-get.htm // Download page
- html/index.htm // Manual
- Makefile.txt // Makefile for Unix or cygwin 'make'
- MBorland // Makefile for Borland C++/Win32
- Make-config.sh // Create Debian configure and automake
-
-src/
- rbox consists of:
- rbox.exe // Win32 executable (.zip only)
- rbox.htm // html manual
- rbox.man // Unix man page
- rbox.txt
- rbox.c // source program
-
- qhull consists of:
- qhull.exe // Win32 executables (.zip only)
- qconvex.exe
- qdelaunay.exe
- qhalf.exe
- qvoronoi.exe
- qhull-go.bat // DOS window
- qconvex.htm // html manuals
- qdelaun.htm
- qdelau_f.htm
- qhalf.htm
- qvoronoi.htm
- qvoron_f.htm
- qh-eg.htm
- qh-impre.htm
- qh-in.htm
- index.htm
- qh-opt*.htm
- qh-quick.htm
- qh--4d.gif,etc. // images for manual
- qhull.man // Unix man page
- qhull.txt
- q_eg // shell script for Geomview examples
- q_egtest // shell script for Geomview test examples
- q_test // shell script to test qhull
-
- top-level source files:
- src/index.htm // index to source files
- qh-...htm // specific files
- user.h // header file of user definable constants
- qhull.h // header file for qhull
- unix.c // Unix front end to qhull
- qhull.c // Quickhull algorithm with partitioning
- user.c // user re-definable functions
- user_eg.c // example of incorporating qhull into a user program
- user_eg2.c // more complex example
- qhull_interface.cpp // call Qhull from C++
-
- other source files:
- qhull_a.h // include file for *.c
- geom.c // geometric routines
- geom2.c
- geom.h
- global.c // global variables
- io.c // input-output routines
- io.h
- mem.c // memory routines, this is stand-alone code
- mem.h
- merge.c // merging of non-convex facets
- merge.h
- poly.c // polyhedron routines
- poly2.c
- poly.h
- qset.c // set routines, this only depends on mem.c
- qset.h
- stat.c // statistics
- stat.h
-
-Authors:
-
- C. Bradford Barber Hannu Huhdanpaa
- bradb@geom.umn.edu hannu@geom.umn.edu
-
- c/o The Geometry Center
- University of Minnesota
- 400 Lind Hall
- 207 Church Street S.E.
- Minneapolis, MN 55455
-
- This software was developed under NSF grants NSF/DMS-8920161 and
- NSF-CCR-91-15793 750-7504 at the Geometry Center and Harvard
- University. If you find Qhull useful, please let us know.
diff --git a/extern/qhull/REGISTER.txt b/extern/qhull/REGISTER.txt
deleted file mode 100644
index 767eb1c0cda..00000000000
--- a/extern/qhull/REGISTER.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Dear User of Geometry Center Software:
-
-We would like to find out how you are using our software. Think of
-Geometry Center software as a new kind of shareware: you share your
-science and successes with us, and we share our software and support
-with you.
-
-If you use Geometry Center software, please send us a note telling
-us what you are doing with it.
-
-We need to know:
-
- (1) What you are working on - an abstract of your work would be
- fine.
-
- (2) What Geometry Center software you use.
-
- (3) How that software has helped you, for example, by increasing
- your productivity or allowing you to do things you could not do
- before. In particular, if you feel that Geometry Center
- software has had a direct bearing on your work, please tell us
- about this.
-
-We encourage you to cite the use of any Geometry Center software you
-have used in your publications.
-
-To cite Qhull, use
-
- Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull
- algorithm for convex hulls," ACM Trans. on Mathematical Software,
- Dec 1996. http://www.geom.umn.edu/software/qhull
-
-Please send e-mail to
-
- qhull@geom.umn.edu
-
-Thank you!
diff --git a/extern/qhull/SConscript b/extern/qhull/SConscript
deleted file mode 100644
index d3db67cddc0..00000000000
--- a/extern/qhull/SConscript
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-import sys
-import os
-
-Import('env')
-defs = ''
-cflags = []
-if sys.platform=='linux2' or sys.platform=='linux-i386':
- cflags += ['-O2','-ansi']
-elif env['OURPLATFORM']=='win32-vc':
- cflags += ['/O2']
-elif env['OURPLATFORM']=='win32-mingw':
- cflags += ['-O2']
-elif sys.platform=='sunos5':
- cflags += ['-O2', '-ansi']
-elif sys.platform=='darwin':
- cflags += ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
-
-sources = ['src/geom.c',
- 'src/geom2.c',
- 'src/global.c',
- 'src/io.c',
- 'src/mem.c',
- 'src/merge.c',
- 'src/poly.c',
- 'src/poly2.c',
- 'src/qhull.c',
- 'src/qset.c',
- 'src/stat.c',
- 'src/user.c']
-
-
-incs = 'include src'
-
-env.BlenderLib ( 'extern_qhull', sources, Split(incs), Split(defs), libtype=['extern'], priority=[50], compileflags = cflags)
diff --git a/extern/qhull/VisualC6/qhull.dsw b/extern/qhull/VisualC6/qhull.dsw
deleted file mode 100644
index 96c68d8e34c..00000000000
--- a/extern/qhull/VisualC6/qhull.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "qhull"=".\qhull\qhull.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/extern/qhull/VisualC6/qhull/qhull.dsp b/extern/qhull/VisualC6/qhull/qhull.dsp
deleted file mode 100644
index 6e059b0994c..00000000000
--- a/extern/qhull/VisualC6/qhull/qhull.dsp
+++ /dev/null
@@ -1,192 +0,0 @@
-# Microsoft Developer Studio Project File - Name="qhull" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=qhull - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "qhull.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "qhull.mak" CFG="qhull - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "qhull - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "qhull - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "qhull - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\lib\windows\qhull\include\qhull\ XCOPY /Y Release\*.lib ..\..\..\..\..\lib\windows\qhull\lib\
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "qhull - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\lib\windows\qhull\include\qhull\ XCOPY /Y Debug\*.lib ..\..\..\..\..\lib\windows\qhull\lib\Debug\
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "qhull - Win32 Release"
-# Name "qhull - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\geom.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\geom2.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\global.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\io.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\mem.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\merge.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\poly.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\poly2.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\qhull.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\qset.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\stat.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\user.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\geom.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\io.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\mem.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\merge.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\poly.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\qhull.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\qhull_a.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\qset.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\stat.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\user.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/qhull/include/qhull/geom.h b/extern/qhull/include/qhull/geom.h
deleted file mode 100644
index 32440cff56f..00000000000
--- a/extern/qhull/include/qhull/geom.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*<html><pre> -<a href="qh-geom.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- geom.h
- header file for geometric routines
-
- see qh-geom.htm and geom.c
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#ifndef qhDEFgeom
-#define qhDEFgeom 1
-
-/* ============ -macros- ======================== */
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fabs_">-</a>
-
- fabs_(a)
- returns the absolute value of a
-*/
-#define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a ))
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fmax_">-</a>
-
- fmax_(a,b)
- returns the maximum value of a and b
-*/
-#define fmax_( a,b ) ( ( a ) < ( b ) ? ( b ) : ( a ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fmin_">-</a>
-
- fmin_(a,b)
- returns the minimum value of a and b
-*/
-#define fmin_( a,b ) ( ( a ) > ( b ) ? ( b ) : ( a ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="maximize_">-</a>
-
- maximize_(maxval, val)
- set maxval to val if val is greater than maxval
-*/
-#define maximize_( maxval, val ) {if (( maxval ) < ( val )) ( maxval )= ( val );}
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="minimize_">-</a>
-
- minimize_(minval, val)
- set minval to val if val is less than minval
-*/
-#define minimize_( minval, val ) {if (( minval ) > ( val )) ( minval )= ( val );}
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="det2_">-</a>
-
- det2_(a1, a2,
- b1, b2)
-
- compute a 2-d determinate
-*/
-#define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 ))
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="det3_">-</a>
-
- det3_(a1, a2, a3,
- b1, b2, b3,
- c1, c2, c3)
-
- compute a 3-d determinate
-*/
-#define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \
- - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="dX">-</a>
-
- dX( p1, p2 )
- dY( p1, p2 )
- dZ( p1, p2 )
-
- given two indices into rows[],
-
- compute the difference between X, Y, or Z coordinates
-*/
-#define dX( p1,p2 ) ( *( rows[p1] ) - *( rows[p2] ))
-#define dY( p1,p2 ) ( *( rows[p1]+1 ) - *( rows[p2]+1 ))
-#define dZ( p1,p2 ) ( *( rows[p1]+2 ) - *( rows[p2]+2 ))
-#define dW( p1,p2 ) ( *( rows[p1]+3 ) - *( rows[p2]+3 ))
-
-/*============= prototypes in alphabetical order, infrequent at end ======= */
-
-void qh_backnormal (realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero);
-void qh_distplane (pointT *point, facetT *facet, realT *dist);
-facetT *qh_findbest (pointT *point, facetT *startfacet,
- boolT bestoutside, boolT isnewfacets, boolT noupper,
- realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT *point,
- facetT *startfacet, boolT noupper, realT *bestdist, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet, realT *dist,
- boolT bestoutside, boolT *isoutside, int *numpart);
-void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero);
-realT qh_getangle(pointT *vect1, pointT *vect2);
-pointT *qh_getcenter(setT *vertices);
-pointT *qh_getcentrum(facetT *facet);
-realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
-void qh_normalize (coordT *normal, int dim, boolT toporient);
-void qh_normalize2 (coordT *normal, int dim, boolT toporient,
- realT *minnorm, boolT *ismin);
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
-
-void qh_setfacetplane(facetT *newfacets);
-void qh_sethyperplane_det (int dim, coordT **rows, coordT *point0,
- boolT toporient, coordT *normal, realT *offset, boolT *nearzero);
-void qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0,
- boolT toporient, coordT *normal, coordT *offset, boolT *nearzero);
-boolT qh_sharpnewfacets (void);
-
-/*========= infrequently used code in geom2.c =============*/
-
-
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension);
-void qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]);
-realT qh_determinant (realT **rows, int dim, boolT *nearzero);
-realT qh_detjoggle (pointT *points, int numpoints, int dimension);
-void qh_detroundoff (void);
-realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero);
-realT qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp);
-realT qh_distround (int dimension, realT maxabs, realT maxsumabs);
-realT qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv);
-realT qh_facetarea (facetT *facet);
-realT qh_facetarea_simplex (int dim, coordT *apex, setT *vertices,
- vertexT *notvertex, boolT toporient, coordT *normal, realT *offset);
-pointT *qh_facetcenter (setT *vertices);
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, facetT **facetlist);
-void qh_getarea (facetT *facetlist);
-boolT qh_gram_schmidt(int dim, realT **rows);
-boolT qh_inthresholds (coordT *normal, realT *angle);
-void qh_joggleinput (void);
-realT *qh_maxabsval (realT *normal, int dim);
-setT *qh_maxmin(pointT *points, int numpoints, int dimension);
-realT qh_maxouter (void);
-void qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex);
-realT qh_minabsval (realT *normal, int dim);
-int qh_mindiff (realT *vecA, realT *vecB, int dim);
-boolT qh_orientoutside (facetT *facet);
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-coordT qh_pointdist(pointT *point1, pointT *point2, int dim);
-void qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol);
-void qh_printpoints (FILE *fp, char *string, setT *points);
-void qh_projectinput (void);
-void qh_projectpoints (signed char *project, int n, realT *points,
- int numpoints, int dim, realT *newpoints, int newdim);
-int qh_rand( void);
-void qh_srand( int seed);
-realT qh_randomfactor (void);
-void qh_randommatrix (realT *buffer, int dim, realT **row);
-void qh_rotateinput (realT **rows);
-void qh_rotatepoints (realT *points, int numpoints, int dim, realT **rows);
-void qh_scaleinput (void);
-void qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
- coordT high, coordT newhigh);
-void qh_scalepoints (pointT *points, int numpoints, int dim,
- realT *newlows, realT *newhighs);
-boolT qh_sethalfspace (int dim, coordT *coords, coordT **nextp,
- coordT *normal, coordT *offset, coordT *feasible);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-pointT *qh_voronoi_center (int dim, setT *points);
-
-#endif /* qhDEFgeom */
-
-
-
diff --git a/extern/qhull/include/qhull/io.h b/extern/qhull/include/qhull/io.h
deleted file mode 100644
index 351d56b3708..00000000000
--- a/extern/qhull/include/qhull/io.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*<html><pre> -<a href="qh-io.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- io.h
- declarations of Input/Output functions
-
- see README, qhull.h and io.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFio
-#define qhDEFio 1
-
-/*============ constants and flags ==================*/
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_MAXfirst">-</a>
-
- qh_MAXfirst
- maximum length of first two lines of stdin
-*/
-#define qh_MAXfirst 200
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_MINradius">-</a>
-
- qh_MINradius
- min radius for Gp and Gv, fraction of maxcoord
-*/
-#define qh_MINradius 0.02
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_GEOMepsilon">-</a>
-
- qh_GEOMepsilon
- adjust outer planes for 'lines closer' and geomview roundoff.
- This prevents bleed through.
-*/
-#define qh_GEOMepsilon 2e-3
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_WHITESPACE">-</a>
-
- qh_WHITESPACE
- possible values of white space
-*/
-#define qh_WHITESPACE " \n\t\v\r\f"
-
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="RIDGE">-</a>
-
- qh_RIDGE
- to select which ridges to print in qh_eachvoronoi
-*/
-typedef enum
-{
- qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
-}
-qh_RIDGE;
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="printvridgeT">-</a>
-
- printvridgeT
- prints results of qh_printvdiagram
-
- see:
- <a href="io.c#printvridge">qh_printvridge</a> for an example
-*/
-typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-
-/*============== -prototypes in alphabetical order =========*/
-
-void dfacet( unsigned id);
-void dvertex( unsigned id);
-void qh_countfacets (facetT *facetlist, setT *facets, boolT printall,
- int *numfacetsp, int *numsimplicialp, int *totneighborsp,
- int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
-setT *qh_detvridge (vertexT *vertex);
-setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex);
-int qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
-int qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder);
-void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-void qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane);
-void qh_markkeep (facetT *facetlist);
-setT *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp);
-void qh_order_vertexneighbors(vertexT *vertex);
-void qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall);
-void qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printcenter (FILE *fp, int format, char *string, facetT *facet);
-void qh_printcentrum (FILE *fp, facetT *facet, realT radius);
-void qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printend4geom (FILE *fp, facetT *facet, int *num, boolT printall);
-void qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printfacet(FILE *fp, facetT *facet);
-void qh_printfacet2math(FILE *fp, facetT *facet, int notfirst);
-void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
- facetT *facet, realT offset, realT color[3]);
-void qh_printfacet3math (FILE *fp, facetT *facet, int notfirst);
-void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
-void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet3vertex(FILE *fp, facetT *facet, int format);
-void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format);
-void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format);
-void qh_printfacetheader(FILE *fp, facetT *facet);
-void qh_printfacetridges(FILE *fp, facetT *facet);
-void qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printhelp_degenerate(FILE *fp);
-void qh_printhelp_singular(FILE *fp);
-void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
- setT *vertices, realT color[3]);
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
-void qh_printpoint(FILE *fp, char *string, pointT *point);
-void qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id);
-void qh_printpoint3 (FILE *fp, pointT *point);
-void qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
-void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
-void qh_printridge(FILE *fp, ridgeT *ridge);
-void qh_printspheres(FILE *fp, setT *vertices, realT radius);
-void qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
-void qh_printvertex(FILE *fp, vertexT *vertex);
-void qh_printvertexlist (FILE *fp, char* string, facetT *facetlist,
- setT *facets, boolT printall);
-void qh_printvertices (FILE *fp, char* string, setT *vertices);
-void qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall);
-void qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void qh_produce_output(void);
-void qh_projectdim3 (pointT *source, pointT *destination);
-int qh_readfeasible (int dim, char *remainder);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-void qh_setfeasible (int dim);
-boolT qh_skipfacet(facetT *facet);
-
-#endif /* qhDEFio */
diff --git a/extern/qhull/include/qhull/mem.h b/extern/qhull/include/qhull/mem.h
deleted file mode 100644
index e9ebd1bb9bc..00000000000
--- a/extern/qhull/include/qhull/mem.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*<html><pre> -<a href="qh-mem.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- mem.h
- prototypes for memory management functions
-
- see qh-mem.htm, mem.c and qset.h
-
- for error handling, writes message and calls
- qh_errexit (qhmem_ERRmem, NULL, NULL) if insufficient memory
- and
- qh_errexit (qhmem_ERRqhull, NULL, NULL) otherwise
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmem
-#define qhDEFmem
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="NOmem">-</a>
-
- qh_NOmem
- turn off quick-fit memory allocation
-
- notes:
- mem.c implements Quickfit memory allocation for about 20% time
- savings. If it fails on your machine, try to locate the
- problem, and send the answer to qhull@geom.umn.edu. If this can
- not be done, define qh_NOmem to use malloc/free instead.
-
- #define qh_NOmem
-*/
-
-/*-------------------------------------------
- to avoid bus errors, memory allocation must consider alignment requirements.
- malloc() automatically takes care of alignment. Since mem.c manages
- its own memory, we need to explicitly specify alignment in
- qh_meminitbuffers().
-
- A safe choice is sizeof(double). sizeof(float) may be used if doubles
- do not occur in data structures and pointers are the same size. Be careful
- of machines (e.g., DEC Alpha) with large pointers. If gcc is available,
- use __alignof__(double) or fmax_(__alignof__(float), __alignof__(void *)).
-
- see <a href="user.h#MEMalign">qh_MEMalign</a> in user.h for qhull's alignment
-*/
-
-#define qhmem_ERRmem 4 /* matches qh_ERRmem in qhull.h */
-#define qhmem_ERRqhull 5 /* matches qh_ERRqhull in qhull.h */
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="ptr_intT">-</a>
-
- ptr_intT
- for casting a void* to an integer-type
-
- notes:
- On 64-bit machines, a pointer may be larger than an 'int'.
- qh_meminit() checks that 'long' holds a 'void*'
-*/
-typedef unsigned long ptr_intT;
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="qhmemT">-</a>
-
- qhmemT
- global memory structure for mem.c
-
- notes:
- users should ignore qhmem except for writing extensions
- qhmem is allocated in mem.c
-
- qhmem could be swapable like qh and qhstat, but then
- multiple qh's and qhmem's would need to keep in synch.
- A swapable qhmem would also waste memory buffers. As long
- as memory operations are atomic, there is no problem with
- multiple qh structures being active at the same time.
- If you need separate address spaces, you can swap the
- contents of qhmem.
-*/
-typedef struct qhmemT qhmemT;
-extern qhmemT qhmem;
-
-struct qhmemT { /* global memory management variables */
- int BUFsize; /* size of memory allocation buffer */
- int BUFinit; /* initial size of memory allocation buffer */
- int TABLEsize; /* actual number of sizes in free list table */
- int NUMsizes; /* maximum number of sizes in free list table */
- int LASTsize; /* last size in free list table */
- int ALIGNmask; /* worst-case alignment, must be 2^n-1 */
- void **freelists; /* free list table, linked by offset 0 */
- int *sizetable; /* size of each freelist */
- int *indextable; /* size->index table */
- void *curbuffer; /* current buffer, linked by offset 0 */
- void *freemem; /* free memory in curbuffer */
- int freesize; /* size of free memory in bytes */
- void *tempstack; /* stack of temporary memory, managed by users */
- FILE *ferr; /* file for reporting errors */
- int IStracing; /* =5 if tracing memory allocations */
- int cntquick; /* count of quick allocations */
- /* remove statistics doesn't effect speed */
- int cntshort; /* count of short allocations */
- int cntlong; /* count of long allocations */
- int curlong; /* current count of inuse, long allocations */
- int freeshort; /* count of short memfrees */
- int freelong; /* count of long memfrees */
- int totshort; /* total size of short allocations */
- int totlong; /* total size of long allocations */
- int maxlong; /* maximum totlong */
- int cntlarger; /* count of setlarger's */
- int totlarger; /* total copied by setlarger */
-};
-
-
-/*==================== -macros ====================*/
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memalloc_">-</a>
-
- qh_memalloc_(size, object, type)
- returns object of size bytes
- assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-
-#ifdef qh_NOmem
-#define qh_memalloc_(size, freelistp, object, type) {\
- object= (type*)qh_memalloc (size); }
-#else /* !qh_NOmem */
-
-#define qh_memalloc_(size, freelistp, object, type) {\
- freelistp= qhmem.freelists + qhmem.indextable[size];\
- if ((object= (type*)*freelistp)) {\
- qhmem.cntquick++; \
- *freelistp= *((void **)*freelistp);\
- }else object= (type*)qh_memalloc (size);}
-#endif
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memfree_">-</a>
-
- qh_memfree_(object, size)
- free up an object
-
- notes:
- object may be NULL
- assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-#ifdef qh_NOmem
-#define qh_memfree_(object, size, freelistp) {\
- qh_memfree (object, size); }
-#else /* !qh_NOmem */
-
-#define qh_memfree_(object, size, freelistp) {\
- if (object) { \
- qhmem .freeshort++;\
- freelistp= qhmem.freelists + qhmem.indextable[size];\
- *((void **)object)= *freelistp;\
- *freelistp= object;}}
-#endif
-
-/*=============== prototypes in alphabetical order ============*/
-
-void *qh_memalloc(int insize);
-void qh_memfree (void *object, int size);
-void qh_memfreeshort (int *curlong, int *totlong);
-void qh_meminit (FILE *ferr);
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes,
- int bufsize, int bufinit);
-void qh_memsetup (void);
-void qh_memsize(int size);
-void qh_memstatistics (FILE *fp);
-
-#endif /* qhDEFmem */
diff --git a/extern/qhull/include/qhull/merge.h b/extern/qhull/include/qhull/merge.h
deleted file mode 100644
index 7fc2afa5967..00000000000
--- a/extern/qhull/include/qhull/merge.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*<html><pre> -<a href="qh-merge.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- merge.h
- header file for merge.c
-
- see qh-merge.htm and merge.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmerge
-#define qhDEFmerge 1
-
-
-/*============ -constants- ==============*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEredundant">-</a>
-
- qh_ANGLEredundant
- indicates redundant merge in mergeT->angle
-*/
-#define qh_ANGLEredundant 6.0
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEdegen">-</a>
-
- qh_ANGLEdegen
- indicates degenerate facet in mergeT->angle
-*/
-#define qh_ANGLEdegen 5.0
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEconcave">-</a>
-
- qh_ANGLEconcave
- offset to indicate concave facets in mergeT->angle
-
- notes:
- concave facets are assigned the range of [2,4] in mergeT->angle
- roundoff error may make the angle less than 2
-*/
-#define qh_ANGLEconcave 1.5
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="MRG">-</a>
-
- MRG... (mergeType)
- indicates the type of a merge (mergeT->type)
-*/
-typedef enum { /* in sort order for facet_mergeset */
- MRGnone= 0,
- MRGcoplanar, /* centrum coplanar */
- MRGanglecoplanar, /* angle coplanar */
- /* could detect half concave ridges */
- MRGconcave, /* concave ridge */
- MRGflip, /* flipped facet. facet1 == facet2 */
- MRGridge, /* duplicate ridge (qh_MERGEridge) */
- /* degen and redundant go onto degen_mergeset */
- MRGdegen, /* degenerate facet (not enough neighbors) facet1 == facet2 */
- MRGredundant, /* redundant facet (vertex subset) */
- /* merge_degenredundant assumes degen < redundant */
- MRGmirror, /* mirror facet from qh_triangulate */
- ENDmrg
-} mergeType;
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_MERGEapex">-</a>
-
- qh_MERGEapex
- flag for qh_mergefacet() to indicate an apex merge
-*/
-#define qh_MERGEapex True
-
-/*============ -structures- ====================*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="mergeT">-</a>
-
- mergeT
- structure used to merge facets
-*/
-
-typedef struct mergeT mergeT;
-struct mergeT { /* initialize in qh_appendmergeset */
- realT angle; /* angle between normals of facet1 and facet2 */
- facetT *facet1; /* will merge facet1 into facet2 */
- facetT *facet2;
- mergeType type;
-};
-
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="FOREACHmerge_">-</a>
-
- FOREACHmerge_( merges ) {...}
- assign 'merge' to each merge in merges
-
- notes:
- uses 'mergeT *merge, **mergep;'
- if qh_mergefacet(),
- restart since qh.facet_mergeset may change
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge)
-
-/*============ prototypes in alphabetical order after pre/postmerge =======*/
-
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle);
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle,
- boolT vneighbors);
-void qh_all_merges (boolT othermerge, boolT vneighbors);
-void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle);
-setT *qh_basevertices( facetT *samecycle);
-void qh_checkconnect (void /* qh new_facets */);
-boolT qh_checkzero (boolT testall);
-void qh_copynonconvex (ridgeT *atridge);
-void qh_degen_redundant_facet (facetT *facet);
-void qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet);
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges);
-void qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
- facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
-void qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
-void qh_forcedmerges( boolT *wasmerge);
-void qh_getmergeset(facetT *facetlist);
-void qh_getmergeset_initial (facetT *facetlist);
-void qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge,
- vertexT *vertex, vertexT *oldvertex, int *hashslot);
-void qh_makeridges(facetT *facet);
-void qh_mark_dupridges(facetT *facetlist);
-void qh_maydropneighbor (facetT *facet);
-int qh_merge_degenredundant (void);
-void qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype);
-void qh_mergecycle (facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_all (facetT *facetlist, boolT *wasmerge);
-void qh_mergecycle_facets( facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet);
-void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex);
-void qh_mergefacet2d (facetT *facet1, facetT *facet2);
-void qh_mergeneighbors(facetT *facet1, facetT *facet2);
-void qh_mergeridges(facetT *facet1, facetT *facet2);
-void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
-void qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2);
-void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
-void qh_mergevertices(setT *vertices1, setT **vertices);
-setT *qh_neighbor_intersections (vertexT *vertex);
-void qh_newvertices (setT *vertices);
-boolT qh_reducevertices (void);
-vertexT *qh_redundant_vertex (vertexT *vertex);
-boolT qh_remove_extravertices (facetT *facet);
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet);
-void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
-void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
- facetT *oldfacet, facetT *neighborA);
-boolT qh_test_appendmerge (facetT *facet, facetT *neighbor);
-boolT qh_test_vneighbors (void /* qh newfacet_list */);
-void qh_tracemerge (facetT *facet1, facetT *facet2);
-void qh_tracemerging (void);
-void qh_updatetested( facetT *facet1, facetT *facet2);
-setT *qh_vertexridges (vertexT *vertex);
-void qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges);
-void qh_willdelete (facetT *facet, facetT *replace);
-
-#endif /* qhDEFmerge */
diff --git a/extern/qhull/include/qhull/poly.h b/extern/qhull/include/qhull/poly.h
deleted file mode 100644
index 294ec9527fc..00000000000
--- a/extern/qhull/include/qhull/poly.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*<html><pre> -<a href="qh-poly.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- poly.h
- header file for poly.c and poly2.c
-
- see qh-poly.htm, qhull.h and poly.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFpoly
-#define qhDEFpoly 1
-
-/*=============== constants ========================== */
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="ALGORITHMfault">-</a>
-
- ALGORITHMfault
- use as argument to checkconvex() to report errors during buildhull
-*/
-#define qh_ALGORITHMfault 0
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="DATAfault">-</a>
-
- DATAfault
- use as argument to checkconvex() to report errors during initialhull
-*/
-#define qh_DATAfault 1
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="DUPLICATEridge">-</a>
-
- DUPLICATEridge
- special value for facet->neighbor to indicate a duplicate ridge
-
- notes:
- set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_DUPLICATEridge ( facetT * ) 1L
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="MERGEridge">-</a>
-
- MERGEridge flag in facet
- special value for facet->neighbor to indicate a merged ridge
-
- notes:
- set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_MERGEridge ( facetT * ) 2L
-
-
-/*============ -structures- ====================*/
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLfacet_">-</a>
-
- FORALLfacet_( facetlist ) { ... }
- assign 'facet' to each facet in facetlist
-
- notes:
- uses 'facetT *facet;'
- assumes last facet is a sentinel
-
- see:
- FORALLfacets
-*/
-#define FORALLfacet_( facetlist ) if ( facetlist ) for( facet=( facetlist );facet && facet->next;facet=facet->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLnew_facets">-</a>
-
- FORALLnew_facets { ... }
- assign 'newfacet' to each facet in qh.newfacet_list
-
- notes:
- uses 'facetT *newfacet;'
- at exit, newfacet==NULL
-*/
-#define FORALLnew_facets for( newfacet=qh newfacet_list;newfacet && newfacet->next;newfacet=newfacet->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvertex_">-</a>
-
- FORALLvertex_( vertexlist ) { ... }
- assign 'vertex' to each vertex in vertexlist
-
- notes:
- uses 'vertexT *vertex;'
- at exit, vertex==NULL
-*/
-#define FORALLvertex_( vertexlist ) for ( vertex=( vertexlist );vertex && vertex->next;vertex= vertex->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvisible_facets">-</a>
-
- FORALLvisible_facets { ... }
- assign 'visible' to each visible facet in qh.visible_list
-
- notes:
- uses 'vacetT *visible;'
- at exit, visible==NULL
-*/
-#define FORALLvisible_facets for (visible=qh visible_list; visible && visible->visible; visible= visible->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLsame_">-</a>
-
- FORALLsame_( newfacet ) { ... }
- assign 'same' to each facet in newfacet->f.samecycle
-
- notes:
- uses 'facetT *same;'
- stops when it returns to newfacet
-*/
-#define FORALLsame_(newfacet) for (same= newfacet->f.samecycle; same != newfacet; same= same->f.samecycle)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLsame_cycle_">-</a>
-
- FORALLsame_cycle_( newfacet ) { ... }
- assign 'same' to each facet in newfacet->f.samecycle
-
- notes:
- uses 'facetT *same;'
- at exit, same == NULL
-*/
-#define FORALLsame_cycle_(newfacet) \
- for (same= newfacet->f.samecycle; \
- same; same= (same == newfacet ? NULL : same->f.samecycle))
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighborA_">-</a>
-
- FOREACHneighborA_( facet ) { ... }
- assign 'neighborA' to each neighbor in facet->neighbors
-
- FOREACHneighborA_( vertex ) { ... }
- assign 'neighborA' to each neighbor in vertex->neighbors
-
- declare:
- facetT *neighborA, **neighborAp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHneighborA_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighborA)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvisible_">-</a>
-
- FOREACHvisible_( facets ) { ... }
- assign 'visible' to each facet in facets
-
- notes:
- uses 'facetT *facet, *facetp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvisible_(facets) FOREACHsetelement_(facetT, facets, visible)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHnewfacet_">-</a>
-
- FOREACHnewfacet_( facets ) { ... }
- assign 'newfacet' to each facet in facets
-
- notes:
- uses 'facetT *newfacet, *newfacetp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHnewfacet_(facets) FOREACHsetelement_(facetT, facets, newfacet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertexA_">-</a>
-
- FOREACHvertexA_( vertices ) { ... }
- assign 'vertexA' to each vertex in vertices
-
- notes:
- uses 'vertexT *vertexA, *vertexAp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertexA_(vertices) FOREACHsetelement_(vertexT, vertices, vertexA)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertexreverse12_">-</a>
-
- FOREACHvertexreverse12_( vertices ) { ... }
- assign 'vertex' to each vertex in vertices
- reverse order of first two vertices
-
- notes:
- uses 'vertexT *vertex, *vertexp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertexreverse12_(vertices) FOREACHsetelementreverse12_(vertexT, vertices, vertex)
-
-
-/*=============== prototypes poly.c in alphabetical order ================*/
-
-void qh_appendfacet(facetT *facet);
-void qh_appendvertex(vertexT *vertex);
-void qh_attachnewfacets (void);
-boolT qh_checkflipped (facetT *facet, realT *dist, boolT allerror);
-void qh_delfacet(facetT *facet);
-void qh_deletevisible(void /*qh visible_list, qh horizon_list*/);
-setT *qh_facetintersect (facetT *facetA, facetT *facetB, int *skipAp,int *skipBp, int extra);
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem);
-facetT *qh_makenewfacet(setT *vertices, boolT toporient, facetT *facet);
-void qh_makenewplanes ( void /* newfacet_list */);
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew);
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew);
-void qh_matchneighbor (facetT *newfacet, int newskip, int hashsize,
- int *hashcount);
-void qh_matchnewfacets (void);
-boolT qh_matchvertices (int firstindex, setT *verticesA, int skipA,
- setT *verticesB, int *skipB, boolT *same);
-facetT *qh_newfacet(void);
-ridgeT *qh_newridge(void);
-int qh_pointid (pointT *point);
-void qh_removefacet(facetT *facet);
-void qh_removevertex(vertexT *vertex);
-void qh_updatevertices (void);
-
-
-/*========== -prototypes poly2.c in alphabetical order ===========*/
-
-void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash);
-void qh_check_bestdist (void);
-void qh_check_maxout (void);
-void qh_check_output (void);
-void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2);
-void qh_check_points(void);
-void qh_checkconvex(facetT *facetlist, int fault);
-void qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp);
-void qh_checkflipped_all (facetT *facetlist);
-void qh_checkpolygon(facetT *facetlist);
-void qh_checkvertex (vertexT *vertex);
-void qh_clearcenters (qh_CENTER type);
-void qh_createsimplex(setT *vertices);
-void qh_delridge(ridgeT *ridge);
-void qh_delvertex (vertexT *vertex);
-setT *qh_facet3vertex (facetT *facet);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
- realT *bestdist, boolT *isoutside);
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
- int *numpart);
-int qh_findgood (facetT *facetlist, int goodhorizon);
-void qh_findgood_all (facetT *facetlist);
-void qh_furthestnext (void /* qh facet_list */);
-void qh_furthestout (facetT *facet);
-void qh_infiniteloop (facetT *facet);
-void qh_initbuild(void);
-void qh_initialhull(setT *vertices);
-setT *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints);
-vertexT *qh_isvertex (pointT *point, setT *vertices);
-vertexT *qh_makenewfacets (pointT *point /*horizon_list, visible_list*/);
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount);
-void qh_nearcoplanar ( void /* qh.facet_list */);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-int qh_newhashtable(int newsize);
-vertexT *qh_newvertex(pointT *point);
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp);
-void qh_outcoplanar (void /* facet_list */);
-pointT *qh_point (int id);
-void qh_point_add (setT *set, pointT *point, void *elem);
-setT *qh_pointfacet (void /*qh facet_list*/);
-setT *qh_pointvertex (void /*qh facet_list*/);
-void qh_prependfacet(facetT *facet, facetT **facetlist);
-void qh_printhashtable(FILE *fp);
-void qh_printlists (void);
-void qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/);
-void qh_setvoronoi_all (void);
-void qh_triangulate (void /*qh facet_list*/);
-void qh_triangulate_facet (facetT *facetA, vertexT **first_vertex);
-void qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB);
-void qh_triangulate_mirror (facetT *facetA, facetT *facetB);
-void qh_triangulate_null (facetT *facetA);
-void qh_vertexintersect(setT **vertexsetA,setT *vertexsetB);
-setT *qh_vertexintersect_new(setT *vertexsetA,setT *vertexsetB);
-void qh_vertexneighbors (void /*qh facet_list*/);
-boolT qh_vertexsubset(setT *vertexsetA, setT *vertexsetB);
-
-
-#endif /* qhDEFpoly */
diff --git a/extern/qhull/include/qhull/qhull.h b/extern/qhull/include/qhull/qhull.h
deleted file mode 100644
index 896ec1e9c18..00000000000
--- a/extern/qhull/include/qhull/qhull.h
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhull.h
- user-level header file for using qhull.a library
-
- see qh-qhull.htm, qhull_a.h
-
- copyright (c) 1993-2002, The Geometry Center
-
- NOTE: access to qh_qh is via the 'qh' macro. This allows
- qh_qh to be either a pointer or a structure. An example
- of using qh is "qh DROPdim" which accesses the DROPdim
- field of qh_qh. Similarly, access to qh_qhstat is via
- the 'qhstat' macro.
-
- includes function prototypes for qhull.c, geom.c, global.c, io.c, user.c
-
- use mem.h for mem.c
- use qset.h for qset.c
-
- see unix.c for an example of using qhull.h
-
- recompile qhull if you change this file
-*/
-
-#ifndef qhDEFqhull
-#define qhDEFqhull 1
-
-/*=========================== -included files ==============*/
-
-#include <setjmp.h>
-#include <float.h>
-#include <time.h>
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <Desk.h>
-#endif
-
-#ifndef __STDC__
-#ifndef __cplusplus
-#if !_MSC_VER
-#error Neither __STDC__ nor __cplusplus is defined. Please use strict ANSI C or C++ to compile
-#error Qhull. You may need to turn off compiler extensions in your project configuration. If
-#error your compiler is a standard C compiler, you can delete this warning from qhull.h
-#endif
-#endif
-#endif
-
-#include "user.h" /* user defineable constants */
-
-/*============ constants and basic types ====================*/
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_VERSION">-</a>
-
- qh_VERSION
- version string by year and date
-
- the revision increases on code changes only
-
- notes:
- change date: Changes.txt, Announce.txt, README.txt, qhull.man
- qhull-news.html, Eudora signatures,
- change version: README.txt, qhull.html, file_id.diz, Makefile
- change year: Copying.txt
- check download size
- recompile user_eg.c, rbox.c, qhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c
- make copy of qhull-news.html as qh-news.htm
-*/
-
-#define qh_VERSION "2002.1 2002/8/20"
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="coordT">-</a>
-
- coordT
- coordinates and coefficients are stored as realT (i.e., double)
-
- notes:
- could use 'float' for data and 'double' for calculations (realT vs. coordT)
- This requires many type casts, and adjusted error bounds.
- Also C compilers may do expressions in double anyway.
-*/
-#define coordT realT
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="pointT">-</a>
-
- pointT
- a point is an array of DIM3 coordinates
-*/
-#define pointT coordT
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="flagT">-</a>
-
- flagT
- Boolean flag as a bit
-*/
-#define flagT unsigned int
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="boolT">-</a>
-
- boolT
- boolean value, either True or False
-
- notes:
- needed for portability
-*/
-#define boolT unsigned int
-#ifdef False
-#undef False
-#endif
-#ifdef True
-#undef True
-#endif
-#define False 0
-#define True 1
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="CENTERtype">-</a>
-
- qh_CENTER
- to distinguish facet->center
-*/
-typedef enum
-{
- qh_ASnone = 0, qh_ASvoronoi, qh_AScentrum
-}
-qh_CENTER;
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_PRINT">-</a>
-
- qh_PRINT
- output formats for printing (qh.PRINTout).
- 'Fa' 'FV' 'Fc' 'FC'
-
-
- notes:
- some of these names are similar to qh names. The similar names are only
- used in switch statements in qh_printbegin() etc.
-*/
-typedef enum {qh_PRINTnone= 0,
- qh_PRINTarea, qh_PRINTaverage, /* 'Fa' 'FV' 'Fc' 'FC' */
- qh_PRINTcoplanars, qh_PRINTcentrums,
- qh_PRINTfacets, qh_PRINTfacets_xridge, /* 'f' 'FF' 'G' 'FI' 'Fi' 'Fn' */
- qh_PRINTgeom, qh_PRINTids, qh_PRINTinner, qh_PRINTneighbors,
- qh_PRINTnormals, qh_PRINTouter, /* 'n' 'Fo' 'i' 'm' 'Fm' 'o' */
- qh_PRINTincidences, qh_PRINTmathematica, qh_PRINTmerges, qh_PRINToff,
- qh_PRINToptions, qh_PRINTpointintersect, /* 'FO' 'Fp' 'FP' 'p' 'FQ' 'FS' */
- qh_PRINTpointnearest, qh_PRINTpoints, qh_PRINTqhull, qh_PRINTsize,
- qh_PRINTsummary, qh_PRINTtriangles, /* 'Fs' 'Ft' 'Fv' 'FN' 'Fx' */
- qh_PRINTvertices, qh_PRINTvneighbors, qh_PRINTextremes,
- qh_PRINTEND} qh_PRINT;
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_ALL">-</a>
-
- qh_ALL
- argument flag for selecting everything
-*/
-#define qh_ALL True
-#define qh_NOupper True /* argument for qh_findbest */
-#define qh_IScheckmax True /* argument for qh_findbesthorizon */
-#define qh_ISnewfacets True /* argument for qh_findbest */
-#define qh_RESETvisible True /* argument for qh_resetlists */
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_ERR">-</a>
-
- qh_ERR
- Qhull exit codes, for indicating errors
-*/
-#define qh_ERRnone 0 /* no error occurred during qhull */
-#define qh_ERRinput 1 /* input inconsistency */
-#define qh_ERRsingular 2 /* singular input data */
-#define qh_ERRprec 3 /* precision error */
-#define qh_ERRmem 4 /* insufficient memory, matches mem.h */
-#define qh_ERRqhull 5 /* internal error detected, matches mem.h */
-
-/* ============ -structures- ====================
- each of the following structures is defined by a typedef
- all realT and coordT fields occur at the beginning of a structure
- (otherwise space may be wasted due to alignment)
- define all flags together and pack into 32-bit number
-*/
-
-typedef struct vertexT vertexT;
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT; /* defined in qset.h */
-#endif
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="facetT">-</a>
-
- facetT
- defines a facet
-
- notes:
- qhull() generates the hull as a list of facets.
-
- topological information:
- f.previous,next doubly-linked list of facets
- f.vertices set of vertices
- f.ridges set of ridges
- f.neighbors set of neighbors
- f.toporient True if facet has top-orientation (else bottom)
-
- geometric information:
- f.offset,normal hyperplane equation
- f.maxoutside offset to outer plane -- all points inside
- f.center centrum for testing convexity
- f.simplicial True if facet is simplicial
- f.flipped True if facet does not include qh.interior_point
-
- for constructing hull:
- f.visible True if facet on list of visible facets (will be deleted)
- f.newfacet True if facet on list of newly created facets
- f.coplanarset set of points coplanar with this facet
- (includes near-inside points for later testing)
- f.outsideset set of points outside of this facet
- f.furthestdist distance to furthest point of outside set
- f.visitid marks visited facets during a loop
- f.replace replacement facet for to-be-deleted, visible facets
- f.samecycle,newcycle cycle of facets for merging into horizon facet
-
- see below for other flags and fields
-*/
-struct facetT {
-#if !qh_COMPUTEfurthest
- coordT furthestdist;/* distance to furthest point of outsideset */
-#endif
-#if qh_MAXoutside
- coordT maxoutside; /* max computed distance of point to facet
- Before QHULLfinished this is an approximation
- since maxdist not always set for mergefacet
- Actual outer plane is +DISTround and
- computed outer plane is +2*DISTround */
-#endif
- coordT offset; /* exact offset of hyperplane from origin */
- coordT *normal; /* normal of hyperplane, hull_dim coefficients */
- /* if tricoplanar, shared with a neighbor */
- union { /* in order of testing */
- realT area; /* area of facet, only in io.c if ->isarea */
- facetT *replace; /* replacement facet if ->visible and NEWfacets
- is NULL only if qh_mergedegen_redundant or interior */
- facetT *samecycle; /* cycle of facets from the same visible/horizon intersection,
- if ->newfacet */
- facetT *newcycle; /* in horizon facet, current samecycle of new facets */
- facetT *trivisible; /* visible facet for ->tricoplanar facets during qh_triangulate() */
- facetT *triowner; /* owner facet for ->tricoplanar, !isarea facets w/ ->keepcentrum */
- }f;
- coordT *center; /* centrum for convexity, qh CENTERtype == qh_AScentrum */
- /* Voronoi center, qh CENTERtype == qh_ASvoronoi */
- /* if tricoplanar, shared with a neighbor */
- facetT *previous; /* previous facet in the facet_list */
- facetT *next; /* next facet in the facet_list */
- setT *vertices; /* vertices for this facet, inverse sorted by ID
- if simplicial, 1st vertex was apex/furthest */
- setT *ridges; /* explicit ridges for nonsimplicial facets.
- for simplicial facets, neighbors defines ridge */
- setT *neighbors; /* neighbors of the facet. If simplicial, the kth
- neighbor is opposite the kth vertex, and the first
- neighbor is the horizon facet for the first vertex*/
- setT *outsideset; /* set of points outside this facet
- if non-empty, last point is furthest
- if NARROWhull, includes coplanars for partitioning*/
- setT *coplanarset; /* set of points coplanar with this facet
- > qh.min_vertex and <= facet->max_outside
- a point is assigned to the furthest facet
- if non-empty, last point is furthest away */
- unsigned visitid; /* visit_id, for visiting all neighbors,
- all uses are independent */
- unsigned id; /* unique identifier from qh facet_id */
- unsigned nummerge:9; /* number of merges */
-#define qh_MAXnummerge 511 /* 2^9-1, 32 flags total, see "flags:" in io.c */
- flagT tricoplanar:1; /* True if TRIangulate and simplicial and coplanar with a neighbor */
- /* all tricoplanars share the same ->center, ->normal, ->offset, ->maxoutside */
- /* all tricoplanars share the same apex */
- /* if ->degenerate, does not span facet (one logical ridge) */
- /* one tricoplanar has ->keepcentrum and ->coplanarset */
- /* during qh_triangulate, f.trivisible points to original facet */
- flagT newfacet:1; /* True if facet on qh newfacet_list (new or merged) */
- flagT visible:1; /* True if visible facet (will be deleted) */
- flagT toporient:1; /* True if created with top orientation
- after merging, use ridge orientation */
- flagT simplicial:1;/* True if simplicial facet, ->ridges may be implicit */
- flagT seen:1; /* used to perform operations only once, like visitid */
- flagT seen2:1; /* used to perform operations only once, like visitid */
- flagT flipped:1; /* True if facet is flipped */
- flagT upperdelaunay:1; /* True if facet is upper envelope of Delaunay triangulation */
- flagT notfurthest:1; /* True if last point of outsideset is not furthest*/
-
-/*-------- flags primarily for output ---------*/
- flagT good:1; /* True if a facet marked good for output */
- flagT isarea:1; /* True if facet->f.area is defined */
-
-/*-------- flags for merging ------------------*/
- flagT dupridge:1; /* True if duplicate ridge in facet */
- flagT mergeridge:1; /* True if facet or neighbor contains a qh_MERGEridge
- ->normal defined (also defined for mergeridge2) */
- flagT mergeridge2:1; /* True if neighbor contains a qh_MERGEridge (mark_dupridges */
- flagT coplanar:1; /* True if horizon facet is coplanar at last use */
- flagT mergehorizon:1; /* True if will merge into horizon (->coplanar) */
- flagT cycledone:1;/* True if mergecycle_all already done */
- flagT tested:1; /* True if facet convexity has been tested (false after merge */
- flagT keepcentrum:1; /* True if keep old centrum after a merge, or marks owner for ->tricoplanar */
- flagT newmerge:1; /* True if facet is newly merged for reducevertices */
- flagT degenerate:1; /* True if facet is degenerate (degen_mergeset or ->tricoplanar) */
- flagT redundant:1; /* True if facet is redundant (degen_mergeset) */
-};
-
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="ridgeT">-</a>
-
- ridgeT
- defines a ridge
-
- notes:
- a ridge is DIM3-1 simplex between two neighboring facets. If the
- facets are non-simplicial, there may be more than one ridge between
- two facets. E.G. a 4-d hypercube has two triangles between each pair
- of neighboring facets.
-
- topological information:
- vertices a set of vertices
- top,bottom neighboring facets with orientation
-
- geometric information:
- tested True if ridge is clearly convex
- nonconvex True if ridge is non-convex
-*/
-struct ridgeT {
- setT *vertices; /* vertices belonging to this ridge, inverse sorted by ID
- NULL if a degen ridge (matchsame) */
- facetT *top; /* top facet this ridge is part of */
- facetT *bottom; /* bottom facet this ridge is part of */
- unsigned id:24; /* unique identifier, =>room for 8 flags */
- flagT seen:1; /* used to perform operations only once */
- flagT tested:1; /* True when ridge is tested for convexity */
- flagT nonconvex:1; /* True if getmergeset detected a non-convex neighbor
- only one ridge between neighbors may have nonconvex */
-};
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="vertexT">-</a>
-
- vertexT
- defines a vertex
-
- topological information:
- next,previous doubly-linked list of all vertices
- neighbors set of adjacent facets (only if qh.VERTEXneighbors)
-
- geometric information:
- point array of DIM3 coordinates
-*/
-struct vertexT {
- vertexT *next; /* next vertex in vertex_list */
- vertexT *previous; /* previous vertex in vertex_list */
- pointT *point; /* hull_dim coordinates (coordT) */
- setT *neighbors; /* neighboring facets of vertex, qh_vertexneighbors()
- inits in io.c or after first merge */
- unsigned visitid; /* for use with qh vertex_visit */
- unsigned id:24; /* unique identifier, =>room for 8 flags */
- flagT seen:1; /* used to perform operations only once */
- flagT seen2:1; /* another seen flag */
- flagT delridge:1; /* vertex was part of a deleted ridge */
- flagT deleted:1; /* true if vertex on qh del_vertices */
- flagT newlist:1; /* true if vertex on qh newvertex_list */
-};
-
-/*======= -global variables -qh ============================*/
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh">-</a>
-
- qh
- all global variables for qhull are in qh, qhmem, and qhstat
-
- notes:
- qhmem is defined in mem.h and qhstat is defined in stat.h
- access to qh_qh is via the "qh" macro. See qh_QHpointer in user.h
-*/
-typedef struct qhT qhT;
-#if qh_QHpointer
-#define qh qh_qh->
-extern qhT *qh_qh; /* allocated in global.c */
-#else
-#define qh qh_qh.
-extern qhT qh_qh;
-#endif
-
-struct qhT {
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-const">-</a>
-
- qh constants
- configuration flags and constants for Qhull
-
- notes:
- The user configures Qhull by defining flags. They are
- copied into qh by qh_setflags(). qh-quick.htm#options defines the flags.
-*/
- boolT ALLpoints; /* true 'Qs' if search all points for initial simplex */
- boolT ANGLEmerge; /* true 'Qa' if sort potential merges by angle */
- boolT APPROXhull; /* true 'Wn' if MINoutside set */
- realT MINoutside; /* 'Wn' min. distance for an outside point */
- boolT ATinfinity; /* true 'Qz' if point num_points-1 is "at-infinity"
- for improving precision in Delaunay triangulations */
- boolT AVOIDold; /* true 'Q4' if avoid old->new merges */
- boolT BESToutside; /* true 'Qf' if partition points into best outsideset */
- boolT CDDinput; /* true 'Pc' if input uses CDD format (1.0/offset first) */
- boolT CDDoutput; /* true 'PC' if print normals in CDD format (offset first) */
- boolT CHECKfrequently; /* true 'Tc' if checking frequently */
- realT premerge_cos; /* 'A-n' cos_max when pre merging */
- realT postmerge_cos; /* 'An' cos_max when post merging */
- boolT DELAUNAY; /* true 'd' if computing DELAUNAY triangulation */
- boolT DOintersections; /* true 'Gh' if print hyperplane intersections */
- int DROPdim; /* drops dim 'GDn' for 4-d -> 3-d output */
- boolT FORCEoutput; /* true 'Po' if forcing output despite degeneracies */
- int GOODpoint; /* 1+n for 'QGn', good facet if visible/not(-) from point n*/
- pointT *GOODpointp; /* the actual point */
- boolT GOODthreshold; /* true if qh lower_threshold/upper_threshold defined
- false if qh SPLITthreshold */
- int GOODvertex; /* 1+n, good facet if vertex for point n */
- pointT *GOODvertexp; /* the actual point */
- boolT HALFspace; /* true 'Hn,n,n' if halfspace intersection */
- int IStracing; /* trace execution, 0=none, 1=least, 4=most, -1=events */
- int KEEParea; /* 'PAn' number of largest facets to keep */
- boolT KEEPcoplanar; /* true 'Qc' if keeping nearest facet for coplanar points */
- boolT KEEPinside; /* true 'Qi' if keeping nearest facet for inside points
- set automatically if 'd Qc' */
- int KEEPmerge; /* 'PMn' number of facets to keep with most merges */
- realT KEEPminArea; /* 'PFn' minimum facet area to keep */
- realT MAXcoplanar; /* 'Un' max distance below a facet to be coplanar*/
- boolT MERGEexact; /* true 'Qx' if exact merges (coplanar, degen, dupridge, flipped) */
- boolT MERGEindependent; /* true 'Q2' if merging independent sets */
- boolT MERGING; /* true if exact-, pre- or post-merging, with angle and centrum tests */
- realT premerge_centrum; /* 'C-n' centrum_radius when pre merging. Default is round-off */
- realT postmerge_centrum; /* 'Cn' centrum_radius when post merging. Default is round-off */
- boolT MERGEvertices; /* true 'Q3' if merging redundant vertices */
- realT MINvisible; /* 'Vn' min. distance for a facet to be visible */
- boolT NOnarrow; /* true 'Q10' if no special processing for narrow distributions */
- boolT NOnearinside; /* true 'Q8' if ignore near-inside points when partitioning */
- boolT NOpremerge; /* true 'Q0' if no defaults for C-0 or Qx */
- boolT ONLYgood; /* true 'Qg' if process points with good visible or horizon facets */
- boolT ONLYmax; /* true 'Qm' if only process points that increase max_outside */
- boolT PICKfurthest; /* true 'Q9' if process furthest of furthest points*/
- boolT POSTmerge; /* true if merging after buildhull (Cn or An) */
- boolT PREmerge; /* true if merging during buildhull (C-n or A-n) */
- /* NOTE: some of these names are similar to qh_PRINT names */
- boolT PRINTcentrums; /* true 'Gc' if printing centrums */
- boolT PRINTcoplanar; /* true 'Gp' if printing coplanar points */
- int PRINTdim; /* print dimension for Geomview output */
- boolT PRINTdots; /* true 'Ga' if printing all points as dots */
- boolT PRINTgood; /* true 'Pg' if printing good facets */
- boolT PRINTinner; /* true 'Gi' if printing inner planes */
- boolT PRINTneighbors; /* true 'PG' if printing neighbors of good facets */
- boolT PRINTnoplanes; /* true 'Gn' if printing no planes */
- boolT PRINToptions1st; /* true 'FO' if printing options to stderr */
- boolT PRINTouter; /* true 'Go' if printing outer planes */
- boolT PRINTprecision; /* false 'Pp' if not reporting precision problems */
- qh_PRINT PRINTout[qh_PRINTEND]; /* list of output formats to print */
- boolT PRINTridges; /* true 'Gr' if print ridges */
- boolT PRINTspheres; /* true 'Gv' if print vertices as spheres */
- boolT PRINTstatistics; /* true 'Ts' if printing statistics to stderr */
- boolT PRINTsummary; /* true 's' if printing summary to stderr */
- boolT PRINTtransparent; /* true 'Gt' if print transparent outer ridges */
- boolT PROJECTdelaunay; /* true if DELAUNAY, no readpoints() and
- need projectinput() for Delaunay in qh_init_B */
- int PROJECTinput; /* number of projected dimensions 'bn:0Bn:0' */
- boolT QUICKhelp; /* true if quick help message for degen input */
- boolT RANDOMdist; /* true if randomly change distplane and setfacetplane */
- realT RANDOMfactor; /* maximum random perturbation */
- realT RANDOMa; /* qh_randomfactor is randr * RANDOMa + RANDOMb */
- realT RANDOMb;
- boolT RANDOMoutside; /* true if select a random outside point */
- int REPORTfreq; /* buildtracing reports every n facets */
- int REPORTfreq2; /* tracemerging reports every REPORTfreq/2 facets */
- int RERUN; /* 'TRn' rerun qhull n times (qh.build_cnt) */
- int ROTATErandom; /* 'QRn' seed, 0 time, >= rotate input */
- boolT SCALEinput; /* true 'Qbk' if scaling input */
- boolT SCALElast; /* true 'Qbb' if scale last coord to max prev coord */
- boolT SETroundoff; /* true 'E' if qh DISTround is predefined */
- boolT SKIPcheckmax; /* true 'Q5' if skip qh_check_maxout */
- boolT SKIPconvex; /* true 'Q6' if skip convexity testing during pre-merge */
- boolT SPLITthresholds; /* true if upper_/lower_threshold defines a region
- used only for printing (not for qh ONLYgood) */
- int STOPcone; /* 'TCn' 1+n for stopping after cone for point n*/
- /* also used by qh_build_withresart for err exit*/
- int STOPpoint; /* 'TVn' 'TV-n' 1+n for stopping after/before(-)
- adding point n */
- int TESTpoints; /* 'QTn' num of test points after qh.num_points. Test points always coplanar. */
- boolT TESTvneighbors; /* true 'Qv' if test vertex neighbors at end */
- int TRACElevel; /* 'Tn' conditional IStracing level */
- int TRACElastrun; /* qh.TRACElevel applies to last qh.RERUN */
- int TRACEpoint; /* 'TPn' start tracing when point n is a vertex */
- realT TRACEdist; /* 'TWn' start tracing when merge distance too big */
- int TRACEmerge; /* 'TMn' start tracing before this merge */
- boolT TRIangulate; /* true 'Qt' if triangulate non-simplicial facets */
- boolT TRInormals; /* true 'Q11' if triangulate duplicates normals (sets Qt) */
- boolT UPPERdelaunay; /* true 'Qu' if computing furthest-site Delaunay */
- boolT VERIFYoutput; /* true 'Tv' if verify output at end of qhull */
- boolT VIRTUALmemory; /* true 'Q7' if depth-first processing in buildhull */
- boolT VORONOI; /* true 'v' if computing Voronoi diagram */
-
- /*--------input constants ---------*/
- realT AREAfactor; /* 1/(hull_dim-1)! for converting det's to area */
- boolT DOcheckmax; /* true if calling qh_check_maxout (qh_initqhull_globals) */
- char *feasible_string; /* feasible point 'Hn,n,n' for halfspace intersection */
- coordT *feasible_point; /* as coordinates, both malloc'd */
- boolT GETarea; /* true 'Fa', 'FA', 'FS', 'PAn', 'PFn' if compute facet area/Voronoi volume in io.c */
- boolT KEEPnearinside; /* true if near-inside points in coplanarset */
- int hull_dim; /* dimension of hull, set by initbuffers */
- int input_dim; /* dimension of input, set by initbuffers */
- int num_points; /* number of input points */
- pointT *first_point; /* array of input points, see POINTSmalloc */
- boolT POINTSmalloc; /* true if qh first_point/num_points allocated */
- pointT *input_points; /* copy of original qh.first_point for input points for qh_joggleinput */
- boolT input_malloc; /* true if qh input_points malloc'd */
- char qhull_command[256];/* command line that invoked this program */
- char rbox_command[256]; /* command line that produced the input points */
- char qhull_options[512];/* descriptive list of options */
- int qhull_optionlen; /* length of last line */
- int qhull_optionsiz; /* size of qhull_options before qh_initbuild */
- boolT VERTEXneighbors; /* true if maintaining vertex neighbors */
- boolT ZEROcentrum; /* true if 'C-0' or 'C-0 Qx'. sets ZEROall_ok */
- realT *upper_threshold; /* don't print if facet->normal[k]>=upper_threshold[k]
- must set either GOODthreshold or SPLITthreshold
- if Delaunay, default is 0.0 for upper envelope */
- realT *lower_threshold; /* don't print if facet->normal[k] <=lower_threshold[k] */
- realT *upper_bound; /* scale point[k] to new upper bound */
- realT *lower_bound; /* scale point[k] to new lower bound
- project if both upper_ and lower_bound == 0 */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-prec">-</a>
-
- qh precision constants
- precision constants for Qhull
-
- notes:
- qh_detroundoff() computes the maximum roundoff error for distance
- and other computations. It also sets default values for the
- qh constants above.
-*/
- realT ANGLEround; /* max round off error for angles */
- realT centrum_radius; /* max centrum radius for convexity (roundoff added) */
- realT cos_max; /* max cosine for convexity (roundoff added) */
- realT DISTround; /* max round off error for distances, 'E' overrides */
- realT MAXabs_coord; /* max absolute coordinate */
- realT MAXlastcoord; /* max last coordinate for qh_scalelast */
- realT MAXsumcoord; /* max sum of coordinates */
- realT MAXwidth; /* max rectilinear width of point coordinates */
- realT MINdenom_1; /* min. abs. value for 1/x */
- realT MINdenom; /* use divzero if denominator < MINdenom */
- realT MINdenom_1_2; /* min. abs. val for 1/x that allows normalization */
- realT MINdenom_2; /* use divzero if denominator < MINdenom_2 */
- realT MINlastcoord; /* min. last coordinate for qh_scalelast */
- boolT NARROWhull; /* set in qh_initialhull if angle < qh_MAXnarrow */
- realT *NEARzero; /* hull_dim array for near zero in gausselim */
- realT NEARinside; /* keep points for qh_check_maxout if close to facet */
- realT ONEmerge; /* max distance for merging simplicial facets */
- realT outside_err; /* application's epsilon for coplanar points
- qh_check_bestdist() qh_check_points() reports error if point outside */
- realT WIDEfacet; /* size of wide facet for skipping ridge in
- area computation and locking centrum */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-intern">-</a>
-
- qh internal constants
- internal constants for Qhull
-*/
- char qhull[sizeof("qhull")]; /* for checking ownership */
- void *old_stat; /* pointer to saved qh_qhstat, qh_save_qhull */
- jmp_buf errexit; /* exit label for qh_errexit, defined by setjmp() */
- char jmpXtra[40]; /* extra bytes in case jmp_buf is defined wrong by compiler */
- jmp_buf restartexit; /* restart label for qh_errexit, defined by setjmp() */
- char jmpXtra2[40]; /* extra bytes in case jmp_buf is defined wrong by compiler*/
- FILE *fin; /* pointer to input file, init by qh_meminit */
- FILE *fout; /* pointer to output file */
- FILE *ferr; /* pointer to error file */
- pointT *interior_point; /* center point of the initial simplex*/
- int normal_size; /* size in bytes for facet normals and point coords*/
- int center_size; /* size in bytes for Voronoi centers */
- int TEMPsize; /* size for small, temporary sets (in quick mem) */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-lists">-</a>
-
- qh facet and vertex lists
- defines lists of facets, new facets, visible facets, vertices, and
- new vertices. Includes counts, next ids, and trace ids.
- see:
- qh_resetlists()
-*/
- facetT *facet_list; /* first facet */
- facetT *facet_tail; /* end of facet_list (dummy facet) */
- facetT *facet_next; /* next facet for buildhull()
- previous facets do not have outside sets
- NARROWhull: previous facets may have coplanar outside sets for qh_outcoplanar */
- facetT *newfacet_list; /* list of new facets to end of facet_list */
- facetT *visible_list; /* list of visible facets preceeding newfacet_list,
- facet->visible set */
- int num_visible; /* current number of visible facets */
- unsigned tracefacet_id; /* set at init, then can print whenever */
- facetT *tracefacet; /* set in newfacet/mergefacet, undone in delfacet*/
- unsigned tracevertex_id; /* set at buildtracing, can print whenever */
- vertexT *tracevertex; /* set in newvertex, undone in delvertex*/
- vertexT *vertex_list; /* list of all vertices, to vertex_tail */
- vertexT *vertex_tail; /* end of vertex_list (dummy vertex) */
- vertexT *newvertex_list; /* list of vertices in newfacet_list, to vertex_tail
- all vertices have 'newlist' set */
- int num_facets; /* number of facets in facet_list
- includes visble faces (num_visible) */
- int num_vertices; /* number of vertices in facet_list */
- int num_outside; /* number of points in outsidesets (for tracing and RANDOMoutside)
- includes coplanar outsideset points for NARROWhull/qh_outcoplanar() */
- int num_good; /* number of good facets (after findgood_all) */
- unsigned facet_id; /* ID of next, new facet from newfacet() */
- unsigned ridge_id; /* ID of next, new ridge from newridge() */
- unsigned vertex_id; /* ID of next, new vertex from newvertex() */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-var">-</a>
-
- qh global variables
- defines minimum and maximum distances, next visit ids, several flags,
- and other global variables.
- initialize in qh_initbuild or qh_maxmin if used in qh_buildhull
-*/
- unsigned long hulltime; /* ignore time to set up input and randomize */
- /* use unsigned to avoid wrap-around errors */
- boolT ALLOWrestart; /* true if qh_precision can use qh.restartexit */
- int build_cnt; /* number of calls to qh_initbuild */
- qh_CENTER CENTERtype; /* current type of facet->center, qh_CENTER */
- int furthest_id; /* pointid of furthest point, for tracing */
- facetT *GOODclosest; /* closest facet to GOODthreshold in qh_findgood */
- realT JOGGLEmax; /* set 'QJn' if randomly joggle input */
- boolT maxoutdone; /* set qh_check_maxout(), cleared by qh_addpoint() */
- realT max_outside; /* maximum distance from a point to a facet,
- before roundoff, not simplicial vertices
- actual outer plane is +DISTround and
- computed outer plane is +2*DISTround */
- realT max_vertex; /* maximum distance (>0) from vertex to a facet,
- before roundoff, due to a merge */
- realT min_vertex; /* minimum distance (<0) from vertex to a facet,
- before roundoff, due to a merge
- if qh.JOGGLEmax, qh_makenewplanes sets it
- recomputed if qh.DOcheckmax, default -qh.DISTround */
- boolT NEWfacets; /* true while visible facets invalid due to new or merge
- from makecone/attachnewfacets to deletevisible */
- boolT findbestnew; /* true if partitioning calls qh_findbestnew */
- boolT findbest_notsharp; /* true if new facets are at least 90 degrees */
- boolT NOerrexit; /* true if qh.errexit is not available */
- realT PRINTcradius; /* radius for printing centrums */
- realT PRINTradius; /* radius for printing vertex spheres and points */
- boolT POSTmerging; /* true when post merging */
- int printoutvar; /* temporary variable for qh_printbegin, etc. */
- int printoutnum; /* number of facets printed */
- boolT QHULLfinished; /* True after qhull() is finished */
- realT totarea; /* 'FA': total facet area computed by qh_getarea */
- realT totvol; /* 'FA': total volume computed by qh_getarea */
- unsigned int visit_id; /* unique ID for searching neighborhoods, */
- unsigned int vertex_visit; /* unique ID for searching vertices */
- boolT ZEROall_ok; /* True if qh_checkzero always succeeds */
- boolT WAScoplanar; /* True if qh_partitioncoplanar (qh_check_maxout) */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-set">-</a>
-
- qh global sets
- defines sets for merging, initial simplex, hashing, extra input points,
- and deleted vertices
-*/
- setT *facet_mergeset; /* temporary set of merges to be done */
- setT *degen_mergeset; /* temporary set of degenerate and redundant merges */
- setT *hash_table; /* hash table for matching ridges in qh_matchfacets
- size is setsize() */
- setT *other_points; /* additional points (first is qh interior_point) */
- setT *del_vertices; /* vertices to partition and delete with visible
- facets. Have deleted set for checkfacet */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-buf">-</a>
-
- qh global buffers
- defines buffers for maxtrix operations, input, and error messages
-*/
- coordT *gm_matrix; /* (dim+1)Xdim matrix for geom.c */
- coordT **gm_row; /* array of gm_matrix rows */
- char* line; /* malloc'd input line of maxline+1 chars */
- int maxline;
- coordT *half_space; /* malloc'd input array for halfspace (qh normal_size+coordT) */
- coordT *temp_malloc; /* malloc'd input array for points */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-static">-</a>
-
- qh static variables
- defines static variables for individual functions
-
- notes:
- do not use 'static' within a function. Multiple instances of qhull
- may exist.
-
- do not assume zero initialization, 'QPn' may cause a restart
-*/
- boolT ERREXITcalled; /* true during errexit (prevents duplicate calls */
- boolT firstcentrum; /* for qh_printcentrum */
- realT last_low; /* qh_scalelast parameters for qh_setdelaunay */
- realT last_high;
- realT last_newhigh;
- unsigned lastreport; /* for qh_buildtracing */
- int mergereport; /* for qh_tracemerging */
- boolT old_randomdist; /* save RANDOMdist when io, tracing, or statistics */
- int ridgeoutnum; /* number of ridges in 4OFF output */
- void *old_qhstat; /* for saving qh_qhstat in save_qhull() */
- setT *old_tempstack; /* for saving qhmem.tempstack in save_qhull */
- setT *coplanarset; /* set of coplanar facets for searching qh_findbesthorizon() */
-};
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="otherfacet_">-</a>
-
- otherfacet_(ridge, facet)
- return neighboring facet for a ridge in facet
-*/
-#define otherfacet_(ridge, facet) \
- (((ridge)->top == (facet)) ? (ridge)->bottom : (ridge)->top)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="getid_">-</a>
-
- getid_(p)
- return ID for facet, ridge, or vertex
- return MAXINT if NULL (-1 causes type conversion error )
-*/
-#define getid_(p) ((p) ? (p)->id : -1)
-
-/*============== FORALL macros ===================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLfacets">-</a>
-
- FORALLfacets { ... }
- assign 'facet' to each facet in qh.facet_list
-
- notes:
- uses 'facetT *facet;'
- assumes last facet is a sentinel
-
- see:
- FORALLfacet_( facetlist )
-*/
-#define FORALLfacets for (facet=qh facet_list;facet && facet->next;facet=facet->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLpoints">-</a>
-
- FORALLpoints { ... }
- assign 'point' to each point in qh.first_point, qh.num_points
-
- declare:
- coordT *point, *pointtemp;
-*/
-#define FORALLpoints FORALLpoint_(qh first_point, qh num_points)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLpoint_">-</a>
-
- FORALLpoint_( points, num) { ... }
- assign 'point' to each point in points array of num points
-
- declare:
- coordT *point, *pointtemp;
-*/
-#define FORALLpoint_(points, num) for(point= (points), \
- pointtemp= (points)+qh hull_dim*(num); point < pointtemp; point += qh hull_dim)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvertices">-</a>
-
- FORALLvertices { ... }
- assign 'vertex' to each vertex in qh.vertex_list
-
- declare:
- vertexT *vertex;
-
- notes:
- assumes qh.vertex_list terminated with a sentinel
-*/
-#define FORALLvertices for (vertex=qh vertex_list;vertex && vertex->next;vertex= vertex->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHfacet_">-</a>
-
- FOREACHfacet_( facets ) { ... }
- assign 'facet' to each facet in facets
-
- declare:
- facetT *facet, **facetp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHfacet_(facets) FOREACHsetelement_(facetT, facets, facet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighbor_">-</a>
-
- FOREACHneighbor_( facet ) { ... }
- assign 'neighbor' to each neighbor in facet->neighbors
-
- FOREACHneighbor_( vertex ) { ... }
- assign 'neighbor' to each neighbor in vertex->neighbors
-
- declare:
- facetT *neighbor, **neighborp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHneighbor_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighbor)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHpoint_">-</a>
-
- FOREACHpoint_( points ) { ... }
- assign 'point' to each point in points set
-
- declare:
- pointT *point, **pointp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHpoint_(points) FOREACHsetelement_(pointT, points, point)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHridge_">-</a>
-
- FOREACHridge_( ridges ) { ... }
- assign 'ridge' to each ridge in ridges set
-
- declare:
- ridgeT *ridge, **ridgep;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHridge_(ridges) FOREACHsetelement_(ridgeT, ridges, ridge)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertex_">-</a>
-
- FOREACHvertex_( vertices ) { ... }
- assign 'vertex' to each vertex in vertices set
-
- declare:
- vertexT *vertex, **vertexp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHfacet_i_">-</a>
-
- FOREACHfacet_i_( facets ) { ... }
- assign 'facet' and 'facet_i' for each facet in facets set
-
- declare:
- facetT *facet;
- int facet_n, facet_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHfacet_i_(facets) FOREACHsetelement_i_(facetT, facets, facet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighbor_i_">-</a>
-
- FOREACHneighbor_i_( facet ) { ... }
- assign 'neighbor' and 'neighbor_i' for each neighbor in facet->neighbors
-
- FOREACHneighbor_i_( vertex ) { ... }
- assign 'neighbor' and 'neighbor_i' for each neighbor in vertex->neighbors
-
- declare:
- facetT *neighbor;
- int neighbor_n, neighbor_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHneighbor_i_(facet) FOREACHsetelement_i_(facetT, facet->neighbors, neighbor)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHpoint_i_">-</a>
-
- FOREACHpoint_i_( points ) { ... }
- assign 'point' and 'point_i' for each point in points set
-
- declare:
- pointT *point;
- int point_n, point_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHpoint_i_(points) FOREACHsetelement_i_(pointT, points, point)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHridge_i_">-</a>
-
- FOREACHridge_i_( ridges ) { ... }
- assign 'ridge' and 'ridge_i' for each ridge in ridges set
-
- declare:
- ridgeT *ridge;
- int ridge_n, ridge_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHridge_i_(ridges) FOREACHsetelement_i_(ridgeT, ridges, ridge)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertex_i_">-</a>
-
- FOREACHvertex_i_( vertices ) { ... }
- assign 'vertex' and 'vertex_i' for each vertex in vertices set
-
- declare:
- vertexT *vertex;
- int vertex_n, vertex_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
- */
-#define FOREACHvertex_i_(vertices) FOREACHsetelement_i_(vertexT, vertices,vertex)
-
-/********* -qhull.c prototypes (duplicated from qhull_a.h) **********************/
-
-void qh_qhull (void);
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void qh_printsummary(FILE *fp);
-
-/********* -user.c prototypes (alphabetical) **********************/
-
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge);
-void qh_errprint(char* string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex);
-int qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc,
- char *qhull_cmd, FILE *outfile, FILE *errfile);
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall);
-void qh_user_memsizes (void);
-
-/***** -geom.c/geom2.c prototypes (duplicated from geom.h) ****************/
-
-facetT *qh_findbest (pointT *point, facetT *startfacet,
- boolT bestoutside, boolT newfacets, boolT noupper,
- realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
- realT *dist, boolT bestoutside, boolT *isoutside, int *numpart);
-boolT qh_gram_schmidt(int dim, realT **rows);
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-void qh_printsummary(FILE *fp);
-void qh_projectinput (void);
-void qh_randommatrix (realT *buffer, int dim, realT **row);
-void qh_rotateinput (realT **rows);
-void qh_scaleinput (void);
-void qh_setdelaunay (int dim, int count, pointT *points);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-
-/***** -global.c prototypes (alphabetical) ***********************/
-
-unsigned long qh_clock (void);
-void qh_checkflags (char *command, char *hiddenflags);
-void qh_freebuffers (void);
-void qh_freeqhull (boolT allmem);
-void qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]);
-void qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_init_qhull_command (int argc, char *argv[]);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_initflags (char *command);
-void qh_initqhull_buffers (void);
-void qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_initqhull_mem (void);
-void qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile);
-void qh_initthresholds (char *command);
-void qh_option (char *option, int *i, realT *r);
-#if qh_QHpointer
-void qh_restore_qhull (qhT **oldqh);
-qhT *qh_save_qhull (void);
-#endif
-
-/***** -io.c prototypes (duplicated from io.h) ***********************/
-
-void dfacet( unsigned id);
-void dvertex( unsigned id);
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void qh_produce_output(void);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-
-
-/********* -mem.c prototypes (duplicated from mem.h) **********************/
-
-void qh_meminit (FILE *ferr);
-void qh_memfreeshort (int *curlong, int *totlong);
-
-/********* -poly.c/poly2.c prototypes (duplicated from poly.h) **********************/
-
-void qh_check_output (void);
-void qh_check_points (void);
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
- realT *bestdist, boolT *isoutside);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-pointT *qh_point (int id);
-setT *qh_pointfacet (void /*qh.facet_list*/);
-int qh_pointid (pointT *point);
-setT *qh_pointvertex (void /*qh.facet_list*/);
-void qh_setvoronoi_all (void);
-void qh_triangulate (void /*qh facet_list*/);
-
-/********* -stat.c prototypes (duplicated from stat.h) **********************/
-
-void qh_collectstatistics (void);
-void qh_printallstatistics (FILE *fp, char *string);
-
-#endif /* qhDEFqhull */
diff --git a/extern/qhull/include/qhull/qhull_a.h b/extern/qhull/include/qhull/qhull_a.h
deleted file mode 100644
index d4e69b071be..00000000000
--- a/extern/qhull/include/qhull/qhull_a.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhull_a.h
- all header files for compiling qhull
-
- see qh-qhull.htm
-
- see qhull.h for user-level definitions
-
- see user.h for user-defineable constants
-
- defines internal functions for qhull.c global.c
-
- copyright (c) 1993-2002, The Geometry Center
-
- Notes: grep for ((" and (" to catch fprintf("lkasdjf");
- full parens around (x?y:z)
- use '#include qhull/qhull_a.h' to avoid name clashes
-*/
-
-#ifndef qhDEFqhulla
-#define qhDEFqhulla
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-#include <string.h>
-#include <math.h>
-#include <float.h> /* some compilers will not need float.h */
-#include <limits.h>
-#include <time.h>
-#include <ctype.h>
-/*** uncomment here and qset.c
- if string.h does not define memcpy()
-#include <memory.h>
-*/
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-#include "geom.h"
-#include "merge.h"
-#include "poly.h"
-#include "io.h"
-#include "stat.h"
-
-#if qh_CLOCKtype == 2 /* defined in user.h from qhull.h */
-#include <sys/types.h>
-#include <sys/times.h>
-#include <unistd.h>
-#endif
-
-#ifdef _MSC_VER /* Microsoft Visual C++ */
-#pragma warning( disable : 4056) /* float constant expression. Looks like a compiler bug */
-#pragma warning( disable : 4146) /* unary minus applied to unsigned type */
-#pragma warning( disable : 4244) /* conversion from 'unsigned long' to 'real' */
-#pragma warning( disable : 4305) /* conversion from 'const double' to 'float' */
-#endif
-
-/* ======= -macros- =========== */
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="traceN">-</a>
-
- traceN((fp.ferr, "format\n", vars));
- calls fprintf if qh.IStracing >= N
-
- notes:
- removing tracing reduces code size but doesn't change execution speed
-*/
-#ifndef qh_NOtrace
-#define trace0(args) {if (qh IStracing) fprintf args;}
-#define trace1(args) {if (qh IStracing >= 1) fprintf args;}
-#define trace2(args) {if (qh IStracing >= 2) fprintf args;}
-#define trace3(args) {if (qh IStracing >= 3) fprintf args;}
-#define trace4(args) {if (qh IStracing >= 4) fprintf args;}
-#define trace5(args) {if (qh IStracing >= 5) fprintf args;}
-#else /* qh_NOtrace */
-#define trace0(args) {}
-#define trace1(args) {}
-#define trace2(args) {}
-#define trace3(args) {}
-#define trace4(args) {}
-#define trace5(args) {}
-#endif /* qh_NOtrace */
-
-/***** -qhull.c prototypes (alphabetical after qhull) ********************/
-
-void qh_qhull (void);
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void qh_buildhull(void);
-void qh_buildtracing (pointT *furthest, facetT *facet);
-void qh_build_withrestart (void);
-void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
-void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
-pointT *qh_nextfurthest (facetT **visible);
-void qh_partitionall(setT *vertices, pointT *points,int npoints);
-void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist);
-void qh_partitionpoint (pointT *point, facetT *facet);
-void qh_partitionvisible(boolT allpoints, int *numpoints);
-void qh_precision (char *reason);
-void qh_printsummary(FILE *fp);
-
-/***** -global.c internal prototypes (alphabetical) ***********************/
-
-void qh_appendprint (qh_PRINT format);
-void qh_freebuild (boolT allmem);
-void qh_freebuffers (void);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-int qh_strtol (const char *s, char **endp);
-double qh_strtod (const char *s, char **endp);
-
-/***** -stat.c internal prototypes (alphabetical) ***********************/
-
-void qh_allstatA (void);
-void qh_allstatB (void);
-void qh_allstatC (void);
-void qh_allstatD (void);
-void qh_allstatE (void);
-void qh_allstatE2 (void);
-void qh_allstatF (void);
-void qh_allstatG (void);
-void qh_allstatH (void);
-void qh_freebuffers (void);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-
-#endif /* qhDEFqhulla */
diff --git a/extern/qhull/include/qhull/qset.h b/extern/qhull/include/qhull/qset.h
deleted file mode 100644
index 6c0ff758de4..00000000000
--- a/extern/qhull/include/qhull/qset.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*<html><pre> -<a href="qh-set.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qset.h
- header file for qset.c that implements set
-
- see qh-set.htm and qset.c
-
- only uses mem.c, malloc/free
-
- for error handling, writes message and calls
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
-
- set operations satisfy the following properties:
- - sets have a max size, the actual size (if different) is stored at the end
- - every set is NULL terminated
- - sets may be sorted or unsorted, the caller must distinguish this
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFset
-#define qhDEFset 1
-
-/*================= -structures- ===============*/
-
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT; /* a set is a sorted or unsorted array of pointers */
-#endif
-
-/*-<a href="qh-set.htm#TOC"
->----------------------------------------</a><a name="setT">-</a>
-
-setT
- a set or list of pointers with maximum size and actual size.
-
-variations:
- unsorted, unique -- a list of unique pointers with NULL terminator
- user guarantees uniqueness
- sorted -- a sorted list of unique pointers with NULL terminator
- qset.c guarantees uniqueness
- unsorted -- a list of pointers terminated with NULL
- indexed -- an array of pointers with NULL elements
-
-structure for set of n elements:
-
- --------------
- | maxsize
- --------------
- | e[0] - a pointer, may be NULL for indexed sets
- --------------
- | e[1]
-
- --------------
- | ...
- --------------
- | e[n-1]
- --------------
- | e[n] = NULL
- --------------
- | ...
- --------------
- | e[maxsize] - n+1 or NULL (determines actual size of set)
- --------------
-
-*/
-
-/*-- setelemT -- internal type to allow both pointers and indices
-*/
-typedef union setelemT setelemT;
-union setelemT {
- void *p;
- int i; /* integer used for e[maxSize] */
-};
-
-struct setT {
- int maxsize; /* maximum number of elements (except NULL) */
- setelemT e[1]; /* array of pointers, tail is NULL */
- /* last slot (unless NULL) is actual size+1
- e[maxsize]==NULL or e[e[maxsize]-1]==NULL */
- /* this may generate a warning since e[] contains
- maxsize elements */
-};
-
-/*=========== -constants- =========================*/
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="SETelemsize">-</a>
-
- SETelemsize
- size of a set element in bytes
-*/
-#define SETelemsize sizeof(setelemT)
-
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHsetelement_">-</a>
-
- FOREACHsetelement_(type, set, variable)
- define FOREACH iterator
-
- declare:
- assumes *variable and **variablep are declared
- no space in "variable)" [DEC Alpha cc compiler]
-
- each iteration:
- variable is set element
- variablep is one beyond variable.
-
- to repeat an element:
- variablep--; / *repeat* /
-
- at exit:
- variable is NULL at end of loop
-
- example:
- #define FOREACHfacet_( facets ) FOREACHsetelement_( facetT, facets, facet )
-
- notes:
- use FOREACHsetelement_i_() if need index or include NULLs
-
- WARNING:
- nested loops can't use the same variable (define another FOREACH)
-
- needs braces if nested inside another FOREACH
- this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##p= (type **)&((set)->e[0].p); \
- (variable= *variable##p++);)
-
-/*-<a href="qh-set.htm#TOC"
- >----------------------------------------</a><a name="FOREACHsetelement_i_">-</a>
-
- FOREACHsetelement_i_(type, set, variable)
- define indexed FOREACH iterator
-
- declare:
- type *variable, variable_n, variable_i;
-
- each iteration:
- variable is set element, may be NULL
- variable_i is index, variable_n is qh_setsize()
-
- to repeat an element:
- variable_i--; variable_n-- repeats for deleted element
-
- at exit:
- variable==NULL and variable_i==variable_n
-
- example:
- #define FOREACHfacet_i_( facets ) FOREACHsetelement_i_( facetT, facets, facet )
-
- WARNING:
- nested loops can't use the same variable (define another FOREACH)
-
- needs braces if nested inside another FOREACH
- this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_i_(type, set, variable) \
- if (((variable= NULL), set)) for (\
- variable##_i= 0, variable= (type *)((set)->e[0].p), \
- variable##_n= qh_setsize(set);\
- variable##_i < variable##_n;\
- variable= (type *)((set)->e[++variable##_i].p) )
-
-/*-<a href="qh-set.htm#TOC"
- >--------------------------------------</a><a name="FOREACHsetelementreverse_">-</a>
-
- FOREACHsetelementreverse_(type, set, variable)-
- define FOREACH iterator in reverse order
-
- declare:
- assumes *variable and **variablep are declared
- also declare 'int variabletemp'
-
- each iteration:
- variable is set element
-
- to repeat an element:
- variabletemp++; / *repeat* /
-
- at exit:
- variable is NULL
-
- example:
- #define FOREACHvertexreverse_( vertices ) FOREACHsetelementreverse_( vertexT, vertices, vertex )
-
- notes:
- use FOREACHsetelementreverse12_() to reverse first two elements
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##temp= qh_setsize(set)-1, variable= qh_setlast(set);\
- variable; variable= \
- ((--variable##temp >= 0) ? SETelemt_(set, variable##temp, type) : NULL))
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHsetelementreverse12_">-</a>
-
- FOREACHsetelementreverse12_(type, set, variable)-
- define FOREACH iterator with e[1] and e[0] reversed
-
- declare:
- assumes *variable and **variablep are declared
-
- each iteration:
- variable is set element
- variablep is one after variable.
-
- to repeat an element:
- variablep--; / *repeat* /
-
- at exit:
- variable is NULL at end of loop
-
- example
- #define FOREACHvertexreverse12_( vertices ) FOREACHsetelementreverse12_( vertexT, vertices, vertex )
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse12_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##p= (type **)&((set)->e[1].p); \
- (variable= *variable##p); \
- variable##p == ((type **)&((set)->e[0].p))?variable##p += 2: \
- (variable##p == ((type **)&((set)->e[1].p))?variable##p--:variable##p++))
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHelem_">-</a>
-
- FOREACHelem_( set )-
- iterate elements in a set
-
- declare:
- void *elem, *elemp;
-
- each iteration:
- elem is set element
- elemp is one beyond
-
- to repeat an element:
- elemp--; / *repeat* /
-
- at exit:
- elem == NULL at end of loop
-
- example:
- FOREACHelem_(set) {
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHelem_(set) FOREACHsetelement_(void, set, elem)
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHset_">-</a>
-
- FOREACHset_( set )-
- iterate a set of sets
-
- declare:
- setT *set, **setp;
-
- each iteration:
- set is set element
- setp is one beyond
-
- to repeat an element:
- setp--; / *repeat* /
-
- at exit:
- set == NULL at end of loop
-
- example
- FOREACHset_(sets) {
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHset_(sets) FOREACHsetelement_(setT, sets, set)
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------------</a><a name="SETindex_">-</a>
-
- SETindex_( set, elem )
- return index of elem in set
-
- notes:
- for use with FOREACH iteration
-
- example:
- i= SETindex_(ridges, ridge)
-*/
-#define SETindex_(set, elem) ((void **)elem##p - (void **)&(set)->e[1].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETref_">-</a>
-
- SETref_( elem )
- l.h.s. for modifying the current element in a FOREACH iteration
-
- example:
- SETref_(ridge)= anotherridge;
-*/
-#define SETref_(elem) (elem##p[-1])
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelem_">-</a>
-
- SETelem_(set, n)
- return the n'th element of set
-
- notes:
- assumes that n is valid [0..size] and that set is defined
- use SETelemt_() for type cast
-*/
-#define SETelem_(set, n) ((set)->e[n].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelemt_">-</a>
-
- SETelemt_(set, n, type)
- return the n'th element of set as a type
-
- notes:
- assumes that n is valid [0..size] and that set is defined
-*/
-#define SETelemt_(set, n, type) ((type*)((set)->e[n].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelemaddr_">-</a>
-
- SETelemaddr_(set, n, type)
- return address of the n'th element of a set
-
- notes:
- assumes that n is valid [0..size] and set is defined
-*/
-#define SETelemaddr_(set, n, type) ((type **)(&((set)->e[n].p)))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETfirst_">-</a>
-
- SETfirst_(set)
- return first element of set
-
-*/
-#define SETfirst_(set) ((set)->e[0].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETfirstt_">-</a>
-
- SETfirstt_(set, type)
- return first element of set as a type
-
-*/
-#define SETfirstt_(set, type) ((type*)((set)->e[0].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETsecond_">-</a>
-
- SETsecond_(set)
- return second element of set
-
-*/
-#define SETsecond_(set) ((set)->e[1].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETsecondt_">-</a>
-
- SETsecondt_(set, type)
- return second element of set as a type
-*/
-#define SETsecondt_(set, type) ((type*)((set)->e[1].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETaddr_">-</a>
-
- SETaddr_(set, type)
- return address of set's elements
-*/
-#define SETaddr_(set,type) ((type **)(&((set)->e[0].p)))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETreturnsize_">-</a>
-
- SETreturnsize_(set, size)
- return size of a set
-
- notes:
- set must be defined
- use qh_setsize(set) unless speed is critical
-*/
-#define SETreturnsize_(set, size) (((size)= ((set)->e[(set)->maxsize].i))?(--(size)):((size)= (set)->maxsize))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETempty_">-</a>
-
- SETempty_(set)
- return true (1) if set is empty
-
- notes:
- set may be NULL
-*/
-#define SETempty_(set) (!set || (SETfirst_(set) ? 0:1))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETtruncate_">-</a>
-
- SETtruncate_(set)
- return first element of set
-
- see:
- qh_settruncate()
-
-*/
-#define SETtruncate_(set, size) {set->e[set->maxsize].i= size+1; /* maybe overwritten */ \
- set->e[size].p= NULL;}
-
-/*======= prototypes in alphabetical order ============*/
-
-void qh_setaddsorted(setT **setp, void *elem);
-void qh_setaddnth(setT **setp, int nth, void *newelem);
-void qh_setappend(setT **setp, void *elem);
-void qh_setappend_set(setT **setp, setT *setA);
-void qh_setappend2ndlast(setT **setp, void *elem);
-void qh_setcheck(setT *set, char *tname, int id);
-void qh_setcompact(setT *set);
-setT *qh_setcopy(setT *set, int extra);
-void *qh_setdel(setT *set, void *elem);
-void *qh_setdellast(setT *set);
-void *qh_setdelnth(setT *set, int nth);
-void *qh_setdelnthsorted(setT *set, int nth);
-void *qh_setdelsorted(setT *set, void *newelem);
-setT *qh_setduplicate( setT *set, int elemsize);
-int qh_setequal(setT *setA, setT *setB);
-int qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB);
-int qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB);
-void qh_setfree(setT **set);
-void qh_setfree2( setT **setp, int elemsize);
-void qh_setfreelong(setT **set);
-int qh_setin(setT *set, void *setelem);
-int qh_setindex(setT *set, void *setelem);
-void qh_setlarger(setT **setp);
-void *qh_setlast(setT *set);
-setT *qh_setnew(int size);
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend);
-void qh_setprint(FILE *fp, char* string, setT *set);
-void qh_setreplace(setT *set, void *oldelem, void *newelem);
-int qh_setsize(setT *set);
-setT *qh_settemp(int setsize);
-void qh_settempfree(setT **set);
-void qh_settempfree_all(void);
-setT *qh_settemppop(void);
-void qh_settemppush(setT *set);
-void qh_settruncate (setT *set, int size);
-int qh_setunique (setT **set, void *elem);
-void qh_setzero (setT *set, int index, int size);
-
-
-#endif /* qhDEFset */
diff --git a/extern/qhull/include/qhull/stat.h b/extern/qhull/include/qhull/stat.h
deleted file mode 100644
index 1dae54ed21d..00000000000
--- a/extern/qhull/include/qhull/stat.h
+++ /dev/null
@@ -1,520 +0,0 @@
- /*<html><pre> -<a href="qh-stat.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- stat.h
- contains all statistics that are collected for qhull
-
- see qh-stat.htm and stat.c
-
- copyright (c) 1993-2002, The Geometry Center
-
- recompile qhull if you change this file
-
- Integer statistics are Z* while real statistics are W*.
-
- define maydebugx to call a routine at every statistic event
-
-*/
-
-#ifndef qhDEFstat
-#define qhDEFstat 1
-
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="KEEPstatistics">-</a>
-
- qh_KEEPstatistics
- 0 turns off statistic gathering (except zzdef/zzinc/zzadd/zzval/wwval)
-*/
-#ifndef qh_KEEPstatistics
-#define qh_KEEPstatistics 1
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="statistics">-</a>
-
- Zxxx for integers, Wxxx for reals
-
- notes:
- be sure that all statistics are defined in stat.c
- otherwise initialization may core dump
- can pick up all statistics by:
- grep '[zw].*_[(][ZW]' *.c >z.x
- remove trailers with query">-</a>
- remove leaders with query-replace-regexp [ ^I]+ (
-*/
-#if qh_KEEPstatistics
-enum statistics { /* alphabetical after Z/W */
- Zacoplanar,
- Wacoplanarmax,
- Wacoplanartot,
- Zangle,
- Wangle,
- Wanglemax,
- Wanglemin,
- Zangletests,
- Wareatot,
- Wareamax,
- Wareamin,
- Zavoidold,
- Wavoidoldmax,
- Wavoidoldtot,
- Zback0,
- Zbestcentrum,
- Zbestdist,
- Zcentrumtests,
- Zcheckpart,
- Zcomputefurthest,
- Zconcave,
- Wconcavemax,
- Wconcavetot,
- Zconcaveridges,
- Zconcaveridge,
- Zcoplanar,
- Wcoplanarmax,
- Wcoplanartot,
- Zcoplanarangle,
- Zcoplanarcentrum,
- Zcoplanarhorizon,
- Zcoplanarinside,
- Zcoplanarpart,
- Zcoplanarridges,
- Wcpu,
- Zcyclefacetmax,
- Zcyclefacettot,
- Zcyclehorizon,
- Zcyclevertex,
- Zdegen,
- Wdegenmax,
- Wdegentot,
- Zdegenvertex,
- Zdelfacetdup,
- Zdelridge,
- Zdelvertextot,
- Zdelvertexmax,
- Zdetsimplex,
- Zdistcheck,
- Zdistconvex,
- Zdistgood,
- Zdistio,
- Zdistplane,
- Zdiststat,
- Zdistvertex,
- Zdistzero,
- Zdoc1,
- Zdoc2,
- Zdoc3,
- Zdoc4,
- Zdoc5,
- Zdoc6,
- Zdoc7,
- Zdoc8,
- Zdoc9,
- Zdoc10,
- Zdoc11,
- Zdoc12,
- Zdropdegen,
- Zdropneighbor,
- Zdupflip,
- Zduplicate,
- Wduplicatemax,
- Wduplicatetot,
- Zdupridge,
- Zdupsame,
- Zflipped,
- Wflippedmax,
- Wflippedtot,
- Zflippedfacets,
- Zfindbest,
- Zfindbestmax,
- Zfindbesttot,
- Zfindcoplanar,
- Zfindfail,
- Zfindhorizon,
- Zfindhorizonmax,
- Zfindhorizontot,
- Zfindjump,
- Zfindnew,
- Zfindnewmax,
- Zfindnewtot,
- Zfindnewjump,
- Zfindnewsharp,
- Zgauss0,
- Zgoodfacet,
- Zhashlookup,
- Zhashridge,
- Zhashridgetest,
- Zhashtests,
- Zinsidevisible,
- Zintersect,
- Zintersectfail,
- Zintersectmax,
- Zintersectnum,
- Zintersecttot,
- Zmaxneighbors,
- Wmaxout,
- Wmaxoutside,
- Zmaxridges,
- Zmaxvertex,
- Zmaxvertices,
- Zmaxvneighbors,
- Zmemfacets,
- Zmempoints,
- Zmemridges,
- Zmemvertices,
- Zmergeflipdup,
- Zmergehorizon,
- Zmergeinittot,
- Zmergeinitmax,
- Zmergeinittot2,
- Zmergeintohorizon,
- Zmergenew,
- Zmergesettot,
- Zmergesetmax,
- Zmergesettot2,
- Zmergesimplex,
- Zmergevertex,
- Wmindenom,
- Wminvertex,
- Zminnorm,
- Zmultiridge,
- Znearlysingular,
- Zneighbor,
- Wnewbalance,
- Wnewbalance2,
- Znewfacettot,
- Znewfacetmax,
- Znewvertex,
- Wnewvertex,
- Wnewvertexmax,
- Znoarea,
- Znonsimplicial,
- Znowsimplicial,
- Znotgood,
- Znotgoodnew,
- Znotmax,
- Znumfacets,
- Znummergemax,
- Znummergetot,
- Znumneighbors,
- Znumridges,
- Znumvertices,
- Znumvisibility,
- Znumvneighbors,
- Zonehorizon,
- Zpartangle,
- Zpartcoplanar,
- Zpartflip,
- Zparthorizon,
- Zpartinside,
- Zpartition,
- Zpartitionall,
- Zpartnear,
- Zpbalance,
- Wpbalance,
- Wpbalance2,
- Zpostfacets,
- Zpremergetot,
- Zprocessed,
- Zremvertex,
- Zremvertexdel,
- Zrenameall,
- Zrenamepinch,
- Zrenameshare,
- Zretry,
- Wretrymax,
- Zridge,
- Wridge,
- Wridgemax,
- Zridge0,
- Wridge0,
- Wridge0max,
- Zridgemid,
- Wridgemid,
- Wridgemidmax,
- Zridgeok,
- Wridgeok,
- Wridgeokmax,
- Zsearchpoints,
- Zsetplane,
- Ztestvneighbor,
- Ztotcheck,
- Ztothorizon,
- Ztotmerge,
- Ztotpartcoplanar,
- Ztotpartition,
- Ztotridges,
- Ztotvertices,
- Ztotvisible,
- Ztricoplanar,
- Ztricoplanarmax,
- Ztricoplanartot,
- Ztridegen,
- Ztrimirror,
- Ztrinull,
- Wvertexmax,
- Wvertexmin,
- Zvertexridge,
- Zvertexridgetot,
- Zvertexridgemax,
- Zvertices,
- Zvisfacettot,
- Zvisfacetmax,
- Zvisvertextot,
- Zvisvertexmax,
- Zwidefacet,
- Zwidevertices,
- ZEND};
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="ZZstat">-</a>
-
- Zxxx/Wxxx statistics that remain defined if qh_KEEPstatistics=0
-
- notes:
- be sure to use zzdef, zzinc, etc. with these statistics (no double checking!)
-*/
-#else
-enum statistics { /* for zzdef etc. macros */
- Zback0,
- Zbestdist,
- Zcentrumtests,
- Zcheckpart,
- Zconcaveridges,
- Zcoplanarhorizon,
- Zcoplanarpart,
- Zcoplanarridges,
- Zcyclefacettot,
- Zcyclehorizon,
- Zdelvertextot,
- Zdistcheck,
- Zdistconvex,
- Zdistzero,
- Zdoc1,
- Zdoc2,
- Zdoc3,
- Zdoc11,
- Zflippedfacets,
- Zgauss0,
- Zminnorm,
- Zmultiridge,
- Znearlysingular,
- Wnewvertexmax,
- Znumvisibility,
- Zpartcoplanar,
- Zpartition,
- Zpartitionall,
- Zprocessed,
- Zretry,
- Zridge,
- Wridge,
- Wridgemax,
- Zridge0,
- Wridge0,
- Wridge0max,
- Zridgemid,
- Wridgemid,
- Wridgemidmax,
- Zridgeok,
- Wridgeok,
- Wridgeokmax,
- Zsetplane,
- Ztotmerge,
- ZEND};
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="ztype">-</a>
-
- ztype
- the type of a statistic sets its initial value.
-
- notes:
- The type should be the same as the macro for collecting the statistic
-*/
-enum ztypes {zdoc,zinc,zadd,zmax,zmin,ZTYPEreal,wadd,wmax,wmin,ZTYPEend};
-
-/*========== macros and constants =============*/
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="MAYdebugx">-</a>
-
- MAYdebugx
- define as maydebug() to be called frequently for error trapping
-*/
-#define MAYdebugx
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zdef_">-</a>
-
- zzdef_, zdef_( type, name, doc, -1)
- define a statistic (assumes 'qhstat.next= 0;')
-
- zdef_( type, name, doc, count)
- define an averaged statistic
- printed as name/count
-*/
-#define zzdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
- qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#if qh_KEEPstatistics
-#define zdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
- qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#else
-#define zdef_(type,name,doc,count)
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zinc_">-</a>
-
- zzinc_( name ), zinc_( name)
- increment an integer statistic
-*/
-#define zzinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#if qh_KEEPstatistics
-#define zinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#else
-#define zinc_(id) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zadd_">-</a>
-
- zzadd_( name, value ), zadd_( name, value ), wadd_( name, value )
- add value to an integer or real statistic
-*/
-#define zzadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wwadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#if qh_KEEPstatistics
-#define zadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#else
-#define zadd_(id, val) {}
-#define wadd_(id, val) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zval_">-</a>
-
- zzval_( name ), zval_( name ), wwval_( name )
- set or return value of a statistic
-*/
-#define zzval_(id) ((qhstat stats[id]).i)
-#define wwval_(id) ((qhstat stats[id]).r)
-#if qh_KEEPstatistics
-#define zval_(id) ((qhstat stats[id]).i)
-#define wval_(id) ((qhstat stats[id]).r)
-#else
-#define zval_(id) qhstat tempi
-#define wval_(id) qhstat tempr
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zmax_">-</a>
-
- zmax_( id, val ), wmax_( id, value )
- maximize id with val
-*/
-#define wwmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#if qh_KEEPstatistics
-#define zmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].i,(val));}
-#define wmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#else
-#define zmax_(id, val) {}
-#define wmax_(id, val) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zmin_">-</a>
-
- zmin_( id, val ), wmin_( id, value )
- minimize id with val
-*/
-#if qh_KEEPstatistics
-#define zmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].i,(val));}
-#define wmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].r,(val));}
-#else
-#define zmin_(id, val) {}
-#define wmin_(id, val) {}
-#endif
-
-/*================== stat.h types ==============*/
-
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="intrealT">-</a>
-
- intrealT
- union of integer and real, used for statistics
-*/
-typedef union intrealT intrealT; /* union of int and realT */
-union intrealT {
- int i;
- realT r;
-};
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="qhstat">-</a>
-
- qhstat
- global data structure for statistics
-
- notes:
- access to qh_qhstat is via the "qhstat" macro. There are two choices
- qh_QHpointer = 1 access globals via a pointer
- enables qh_saveqhull() and qh_restoreqhull()
- = 0 qh_qhstat is a static data structure
- only one instance of qhull() can be active at a time
- default value
- qh_QHpointer is defined in qhull.h
-
- allocated in stat.c
-*/
-typedef struct qhstatT qhstatT;
-#if qh_QHpointer
-#define qhstat qh_qhstat->
-extern qhstatT *qh_qhstat;
-#else
-#define qhstat qh_qhstat.
-extern qhstatT qh_qhstat;
-#endif
-struct qhstatT {
- intrealT stats[ZEND]; /* integer and real statistics */
- unsigned char id[ZEND+10]; /* id's in print order */
- char *doc[ZEND]; /* array of documentation strings */
- short int count[ZEND]; /* -1 if none, else index of count to use */
- char type[ZEND]; /* type, see ztypes above */
- char printed[ZEND]; /* true, if statistic has been printed */
- intrealT init[ZTYPEend]; /* initial values by types, set initstatistics */
-
- int next; /* next index for zdef_ */
- int precision; /* index for precision problems */
- int vridges; /* index for Voronoi ridges */
- int tempi;
- realT tempr;
-};
-
-/*========== function prototypes ===========*/
-
-void qh_allstatA(void);
-void qh_allstatB(void);
-void qh_allstatC(void);
-void qh_allstatD(void);
-void qh_allstatE(void);
-void qh_allstatE2(void);
-void qh_allstatF(void);
-void qh_allstatG(void);
-void qh_allstatH(void);
-void qh_allstatI(void);
-void qh_allstatistics (void);
-void qh_collectstatistics (void);
-void qh_freestatistics (void);
-void qh_initstatistics (void);
-boolT qh_newstats (int index, int *nextindex);
-boolT qh_nostatistic (int i);
-void qh_printallstatistics (FILE *fp, char *string);
-void qh_printstatistics (FILE *fp, char *string);
-void qh_printstatlevel (FILE *fp, int id, int start);
-void qh_printstats (FILE *fp, int index, int *nextindex);
-realT qh_stddev (int num, realT tot, realT tot2, realT *ave);
-
-#endif /* qhDEFstat */
diff --git a/extern/qhull/include/qhull/user.h b/extern/qhull/include/qhull/user.h
deleted file mode 100644
index 79558967a52..00000000000
--- a/extern/qhull/include/qhull/user.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/*<html><pre> -<a href="qh-user.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- user.h
- user redefinable constants
-
- see qh-user.htm. see COPYING for copyright information.
-
- before reading any code, review qhull.h for data structure definitions and
- the "qh" macro.
-*/
-
-#ifndef qhDEFuser
-#define qhDEFuser 1
-
-/*============= data types and configuration macros ==========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="realT">-</a>
-
- realT
- set the size of floating point numbers
-
- qh_REALdigits
- maximimum number of significant digits
-
- qh_REAL_1, qh_REAL_2n, qh_REAL_3n
- format strings for printf
-
- qh_REALmax, qh_REALmin
- maximum and minimum (near zero) values
-
- qh_REALepsilon
- machine roundoff. Maximum roundoff error for addition and multiplication.
-
- notes:
- Select whether to store floating point numbers in single precision (float)
- or double precision (double).
-
- Use 'float' to save about 8% in time and 25% in space. This is particularly
- help if high-d where convex hulls are space limited. Using 'float' also
- reduces the printed size of Qhull's output since numbers have 8 digits of
- precision.
-
- Use 'double' when greater arithmetic precision is needed. This is needed
- for Delaunay triangulations and Voronoi diagrams when you are not merging
- facets.
-
- If 'double' gives insufficient precision, your data probably includes
- degeneracies. If so you should use facet merging (done by default)
- or exact arithmetic (see imprecision section of manual, qh-impre.htm).
- You may also use option 'Po' to force output despite precision errors.
-
- You may use 'long double', but many format statements need to be changed
- and you may need a 'long double' square root routine. S. Grundmann
- (sg@eeiwzb.et.tu-dresden.de) has done this. He reports that the code runs
- much slower with little gain in precision.
-
- WARNING: on some machines, int f(){realT a= REALmax;return (a == REALmax);}
- returns False. Use (a > REALmax/2) instead of (a == REALmax).
-
- REALfloat = 1 all numbers are 'float' type
- = 0 all numbers are 'double' type
-*/
-#define REALfloat 0
-
-#if (REALfloat == 1)
-#define realT float
-#define REALmax FLT_MAX
-#define REALmin FLT_MIN
-#define REALepsilon FLT_EPSILON
-#define qh_REALdigits 8 /* maximum number of significant digits */
-#define qh_REAL_1 "%6.8g "
-#define qh_REAL_2n "%6.8g %6.8g\n"
-#define qh_REAL_3n "%6.8g %6.8g %6.8g\n"
-
-#elif (REALfloat == 0)
-#define realT double
-#define REALmax DBL_MAX
-#define REALmin DBL_MIN
-#define REALepsilon DBL_EPSILON
-#define qh_REALdigits 16 /* maximum number of significant digits */
-#define qh_REAL_1 "%6.16g "
-#define qh_REAL_2n "%6.16g %6.16g\n"
-#define qh_REAL_3n "%6.16g %6.16g %6.16g\n"
-
-#else
-#error unknown float option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="CPUclock">-</a>
-
- qh_CPUclock
- define the clock() function for reporting the total time spent by Qhull
- returns CPU ticks as a 'long int'
- qh_CPUclock is only used for reporting the total time spent by Qhull
-
- qh_SECticks
- the number of clock ticks per second
-
- notes:
- looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds
- to define a custom clock, set qh_CLOCKtype to 0
-
- if your system does not use clock() to return CPU ticks, replace
- qh_CPUclock with the corresponding function. It is converted
- to unsigned long to prevent wrap-around during long runs.
-
-
- Set qh_CLOCKtype to
-
- 1 for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond
- Note: may fail if more than 1 hour elapsed time
-
- 2 use qh_clock() with POSIX times() (see global.c)
-*/
-#define qh_CLOCKtype 1 /* change to the desired number */
-
-#if (qh_CLOCKtype == 1)
-
-#if defined (CLOCKS_PER_SECOND)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SECOND
-
-#elif defined (CLOCKS_PER_SEC)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SEC
-
-#elif defined (CLK_TCK)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLK_TCK
-
-#else
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks 1E6
-#endif
-
-#elif (qh_CLOCKtype == 2)
-#define qh_CPUclock qh_clock() /* return CPU clock */
-#define qh_SECticks 100
-
-#else /* qh_CLOCKtype == ? */
-#error unknown clock option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="RANDOM">-</a>
-
- qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed
- define random number generator
-
- qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax.
- qh_RANDOMseed sets the random number seed for qh_RANDOMint
-
- Set qh_RANDOMtype (default 5) to:
- 1 for random() with 31 bits (UCB)
- 2 for rand() with RAND_MAX or 15 bits (system 5)
- 3 for rand() with 31 bits (Sun)
- 4 for lrand48() with 31 bits (Solaris)
- 5 for qh_rand() with 31 bits (included with Qhull)
-
- notes:
- Random numbers are used by rbox to generate point sets. Random
- numbers are used by Qhull to rotate the input ('QRn' option),
- simulate a randomized algorithm ('Qr' option), and to simulate
- roundoff errors ('Rn' option).
-
- Random number generators differ between systems. Most systems provide
- rand() but the period varies. The period of rand() is not critical
- since qhull does not normally use random numbers.
-
- The default generator is Park & Miller's minimal standard random
- number generator [CACM 31:1195 '88]. It is included with Qhull.
-
- If qh_RANDOMmax is wrong, qhull will report a warning and Geomview
- output will likely be invisible.
-*/
-#define qh_RANDOMtype 5 /* *** change to the desired number *** */
-
-#if (qh_RANDOMtype == 1)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, random()/MAX */
-#define qh_RANDOMint random()
-#define qh_RANDOMseed_(seed) srandom(seed);
-
-#elif (qh_RANDOMtype == 2)
-#ifdef RAND_MAX
-#define qh_RANDOMmax ((realT)RAND_MAX)
-#else
-#define qh_RANDOMmax ((realT)32767) /* 15 bits (System 5) */
-#endif
-#define qh_RANDOMint rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 3)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, Sun */
-#define qh_RANDOMint rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 4)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, lrand38()/MAX */
-#define qh_RANDOMint lrand48()
-#define qh_RANDOMseed_(seed) srand48(seed);
-
-#elif (qh_RANDOMtype == 5)
-#define qh_RANDOMmax ((realT)2147483646UL) /* 31 bits, qh_rand/MAX */
-#define qh_RANDOMint qh_rand()
-#define qh_RANDOMseed_(seed) qh_srand(seed);
-/* unlike rand(), never returns 0 */
-
-#else
-#error: unknown random option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="ORIENTclock">-</a>
-
- qh_ORIENTclock
- 0 for inward pointing normals by Geomview convention
-*/
-#define qh_ORIENTclock 0
-
-
-/*========= performance related constants =========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="HASHfactor">-</a>
-
- qh_HASHfactor
- total hash slots / used hash slots. Must be at least 1.1.
-
- notes:
- =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy
-*/
-#define qh_HASHfactor 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="VERIFYdirect">-</a>
-
- qh_VERIFYdirect
- with 'Tv' verify all points against all facets if op count is smaller
-
- notes:
- if greater, calls qh_check_bestdist() instead
-*/
-#define qh_VERIFYdirect 1000000
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INITIALsearch">-</a>
-
- qh_INITIALsearch
- if qh_INITIALmax, search points up to this dimension
-*/
-#define qh_INITIALsearch 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INITIALmax">-</a>
-
- qh_INITIALmax
- if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
-
- notes:
- from points with non-zero determinants
- use option 'Qs' to override (much slower)
-*/
-#define qh_INITIALmax 8
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEdefault">-</a>
-
- qh_JOGGLEdefault
- default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault
-
- notes:
- rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16
- rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults
- rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults
- rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults
- rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults
- rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults
- rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults
- rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults
- rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults
- the later have about 20 points per facet, each of which may interfere
-
- pick a value large enough to avoid retries on most inputs
-*/
-#define qh_JOGGLEdefault 30000.0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEincrease">-</a>
-
- qh_JOGGLEincrease
- factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain
-*/
-#define qh_JOGGLEincrease 10.0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEretry">-</a>
-
- qh_JOGGLEretry
- if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax
-
- notes:
- try twice at the original value in case of bad luck the first time
-*/
-#define qh_JOGGLEretry 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEagain">-</a>
-
- qh_JOGGLEagain
- every following qh_JOGGLEagain, increase qh.JOGGLEmax
-
- notes:
- 1 is OK since it's already failed qh_JOGGLEretry times
-*/
-#define qh_JOGGLEagain 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEmaxincrease">-</a>
-
- qh_JOGGLEmaxincrease
- maximum qh.JOGGLEmax due to qh_JOGGLEincrease
- relative to qh.MAXwidth
-
- notes:
- qh.joggleinput will retry at this value until qh_JOGGLEmaxretry
-*/
-#define qh_JOGGLEmaxincrease 1e-2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEmaxretry">-</a>
-
- qh_JOGGLEmaxretry
- stop after qh_JOGGLEmaxretry attempts
-*/
-#define qh_JOGGLEmaxretry 100
-
-/*========= memory constants =========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMalign">-</a>
-
- qh_MEMalign
- memory alignment for qh_meminitbuffers() in global.c
-
- notes:
- to avoid bus errors, memory allocation must consider alignment requirements.
- malloc() automatically takes care of alignment. Since mem.c manages
- its own memory, we need to explicitly specify alignment in
- qh_meminitbuffers().
-
- A safe choice is sizeof(double). sizeof(float) may be used if doubles
- do not occur in data structures and pointers are the same size. Be careful
- of machines (e.g., DEC Alpha) with large pointers.
-
- If using gcc, best alignment is
- #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *))
-*/
-#define qh_MEMalign fmax_(sizeof(realT), sizeof(void *))
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMbufsize">-</a>
-
- qh_MEMbufsize
- size of additional memory buffers
-
- notes:
- used for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMbufsize 0x10000 /* allocate 64K memory buffers */
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMinitbuf">-</a>
-
- qh_MEMinitbuf
- size of initial memory buffer
-
- notes:
- use for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMinitbuf 0x20000 /* initially allocate 128K buffer */
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INFINITE">-</a>
-
- qh_INFINITE
- on output, indicates Voronoi center at infinity
-*/
-#define qh_INFINITE -10.101
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DEFAULTbox">-</a>
-
- qh_DEFAULTbox
- default box size (Geomview expects 0.5)
-*/
-#define qh_DEFAULTbox 0.5
-
-/*======= conditional compilation ============================*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="compiler">-</a>
-
- __cplusplus
- defined by C++ compilers
-
- __MSC_VER
- defined by Microsoft Visual C++
-
- __MWERKS__ && __POWERPC__
- defined by Metrowerks when compiling for the Power Macintosh
-
- __STDC__
- defined for strict ANSI C
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="COMPUTEfurthest">-</a>
-
- qh_COMPUTEfurthest
- compute furthest distance to an outside point instead of storing it with the facet
- =1 to compute furthest
-
- notes:
- computing furthest saves memory but costs time
- about 40% more distance tests for partitioning
- removes facet->furthestdist
-*/
-#define qh_COMPUTEfurthest 0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="KEEPstatistics">-</a>
-
- qh_KEEPstatistics
- =0 removes most of statistic gathering and reporting
-
- notes:
- if 0, code size is reduced by about 4%.
-*/
-#define qh_KEEPstatistics 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXoutside">-</a>
-
- qh_MAXoutside
- record outer plane for each facet
- =1 to record facet->maxoutside
-
- notes:
- this takes a realT per facet and slightly slows down qhull
- it produces better outer planes for geomview output
-*/
-#define qh_MAXoutside 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="NOmerge">-</a>
-
- qh_NOmerge
- disables facet merging if defined
-
- notes:
- This saves about 10% space.
-
- Unless 'Q0'
- qh_NOmerge sets 'QJ' to avoid precision errors
-
- #define qh_NOmerge
-
- see:
- <a href="mem.h#NOmem">qh_NOmem</a> in mem.c
-
- see user.c/user_eg.c for removing io.o
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="NOtrace">-</a>
-
- qh_NOtrace
- no tracing if defined
-
- notes:
- This saves about 5% space.
-
- #define qh_NOtrace
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="QHpointer">-</a>
-
- qh_QHpointer
- access global data with pointer or static structure
-
- qh_QHpointer = 1 access globals via a pointer to allocated memory
- enables qh_saveqhull() and qh_restoreqhull()
- costs about 8% in time and 2% in space
-
- = 0 qh_qh and qh_qhstat are static data structures
- only one instance of qhull() can be active at a time
- default value
-
- notes:
- all global variables for qhull are in qh, qhmem, and qhstat
- qh is defined in qhull.h
- qhmem is defined in mem.h
- qhstat is defined in stat.h
-
- see:
- user_eg.c for an example
-*/
-#define qh_QHpointer 0
-#if 0 /* sample code */
- qhT *oldqhA, *oldqhB;
-
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- /* use results from first call to qh_new_qhull */
- oldqhA= qh_save_qhull();
- exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc,
- flags, outfile, errfile);
- /* use results from second call to qh_new_qhull */
- oldqhB= qh_save_qhull();
- qh_restore_qhull (&oldqhA);
- /* use results from first call to qh_new_qhull */
- qh_freeqhull (qh_ALL); /* frees all memory used by first call */
- qh_restore_qhull (&oldqhB);
- /* use results from second call to qh_new_qhull */
- qh_freeqhull (!qh_ALL); /* frees long memory used by second call */
- qh_memfreeshort (&curlong, &totlong); /* frees short memory and memory allocator */
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="QUICKhelp">-</a>
-
- qh_QUICKhelp
- =1 to use abbreviated help messages, e.g., for degenerate inputs
-*/
-#define qh_QUICKhelp 0
-
-/* ============ -merge constants- ====================
-
- These constants effect facet merging. You probably will not need
- to modify these. They effect the performance of facet merging.
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DIMmergeVertex">-</a>
-
- qh_DIMmergeVertex
- max dimension for vertex merging (it is not effective in high-d)
-*/
-#define qh_DIMmergeVertex 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DIMreduceBuild">-</a>
-
- qh_DIMreduceBuild
- max dimension for vertex reduction during build (slow in high-d)
-*/
-#define qh_DIMreduceBuild 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="BESTcentrum">-</a>
-
- qh_BESTcentrum
- if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster)
- else, qh_findbestneighbor() tests all vertices (much better merges)
-
- qh_BESTcentrum2
- if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums
-*/
-#define qh_BESTcentrum 20
-#define qh_BESTcentrum2 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="BESTnonconvex">-</a>
-
- qh_BESTnonconvex
- if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges.
-
- notes:
- It is needed because qh_findbestneighbor is slow for large facets
-*/
-#define qh_BESTnonconvex 15
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnewmerges">-</a>
-
- qh_MAXnewmerges
- if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums.
-
- notes:
- It is needed because postmerge can merge many facets at once
-*/
-#define qh_MAXnewmerges 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnewcentrum">-</a>
-
- qh_MAXnewcentrum
- if <= dim+n vertices (n approximates the number of merges),
- reset the centrum in qh_updatetested() and qh_mergecycle_facets()
-
- notes:
- needed to reduce cost and because centrums may move too much if
- many vertices in high-d
-*/
-#define qh_MAXnewcentrum 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="COPLANARratio">-</a>
-
- qh_COPLANARratio
- for 3-d+ merging, qh.MINvisible is n*premerge_centrum
-
- notes:
- for non-merging, it's DISTround
-*/
-#define qh_COPLANARratio 3
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DISToutside">-</a>
-
- qh_DISToutside
- When is a point clearly outside of a facet?
- Stops search in qh_findbestnew or qh_partitionall
- qh_findbest uses qh.MINoutside since since it is only called if no merges.
-
- notes:
- 'Qf' always searches for best facet
- if !qh.MERGING, same as qh.MINoutside.
- if qh_USEfindbestnew, increase value since neighboring facets may be ill-behaved
- [Note: Zdelvertextot occurs normally with interior points]
- RBOX 1000 s Z1 G1e-13 t1001188774 | QHULL Tv
- When there is a sharp edge, need to move points to a
- clearly good facet; otherwise may be lost in another partitioning.
- if too big then O(n^2) behavior for partitioning in cone
- if very small then important points not processed
- Needed in qh_partitionall for
- RBOX 1000 s Z1 G1e-13 t1001032651 | QHULL Tv
- Needed in qh_findbestnew for many instances of
- RBOX 1000 s Z1 G1e-13 t | QHULL Tv
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_DISToutside ((qh_USEfindbestnew ? 2 : 1) * \
- fmax_((qh MERGING ? 2 : 1)*qh MINoutside, qh max_outside))
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="RATIOnearinside">-</a>
-
- qh_RATIOnearinside
- ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for
- qh_check_maxout().
-
- notes:
- This is overkill since do not know the correct value.
- It effects whether 'Qc' reports all coplanar points
- Not used for 'd' since non-extreme points are coplanar
-*/
-#define qh_RATIOnearinside 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="SEARCHdist">-</a>
-
- qh_SEARCHdist
- When is a facet coplanar with the best facet?
- qh_findbesthorizon: all coplanar facets of the best facet need to be searched.
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_SEARCHdist ((qh_USEfindbestnew ? 2 : 1) * \
- (qh max_outside + 2 * qh DISTround + fmax_( qh MINvisible, qh MAXcoplanar)));
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="USEfindbestnew">-</a>
-
- qh_USEfindbestnew
- Always use qh_findbestnew for qh_partitionpoint, otherwise use
- qh_findbestnew if merged new facet or sharpnewfacets.
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_USEfindbestnew (zzval_(Ztotmerge) > 50)
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="WIDEcoplanar">-</a>
-
- qh_WIDEcoplanar
- n*MAXcoplanar or n*MINvisible for a WIDEfacet
-
- if vertex is further than qh.WIDEfacet from the hyperplane
- then its ridges are not counted in computing the area, and
- the facet's centrum is frozen.
-
- notes:
- qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar,
- qh_WIDEcoplanar * qh.MINvisible);
-*/
-#define qh_WIDEcoplanar 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnarrow">-</a>
-
- qh_MAXnarrow
- max. cosine in initial hull that sets qh.NARROWhull
-
- notes:
- If qh.NARROWhull, the initial partition does not make
- coplanar points. If narrow, a coplanar point can be
- coplanar to two facets of opposite orientations and
- distant from the exact convex hull.
-
- Conservative estimate. Don't actually see problems until it is -1.0
-*/
-#define qh_MAXnarrow -0.99999999
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="WARNnarrow">-</a>
-
- qh_WARNnarrow
- max. cosine in initial hull to warn about qh.NARROWhull
-
- notes:
- this is a conservative estimate.
- Don't actually see problems until it is -1.0. See qh-impre.htm
-*/
-#define qh_WARNnarrow -0.999999999999999
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="ZEROdelaunay">-</a>
-
- qh_ZEROdelaunay
- a zero Delaunay facet occurs for input sites coplanar with their convex hull
- the last normal coefficient of a zero Delaunay facet is within
- qh_ZEROdelaunay * qh.ANGLEround of 0
-
- notes:
- qh_ZEROdelaunay does not allow for joggled input ('QJ').
-
- You can avoid zero Delaunay facets by surrounding the input with a box.
-
- Use option 'PDk:-n' to explicitly define zero Delaunay facets
- k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation)
- n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12')
-*/
-#define qh_ZEROdelaunay 2
-
-#endif /* qh_DEFuser */
-
-
-
diff --git a/extern/qhull/make/msvc_7_0/qhull.vcproj b/extern/qhull/make/msvc_7_0/qhull.vcproj
deleted file mode 100644
index 1b754d8e076..00000000000
--- a/extern/qhull/make/msvc_7_0/qhull.vcproj
+++ /dev/null
@@ -1,677 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="qhull"
- ProjectGUID="{6461F05D-4698-47AB-A8E8-1CA2ACC9948B}"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\qhull"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\qhull"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\qhull\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\qhull\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\qhull\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\qhull\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\qhull.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_7\extern\qhull\include
-XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_7\extern\qhull\include
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\qhull\debug\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\qhull\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\qhull\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\qhull\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\debug\qhull.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_7\extern\qhull\include
-XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_7\extern\qhull\include
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\qhull.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_7\extern\qhull\include
-XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_7\extern\qhull\include
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\qhull\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\qhull.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_7\extern\qhull\include
-XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_7\extern\qhull\include
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\src\geom.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\geom2.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\global.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\io.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\mem.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\merge.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\poly.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\poly2.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\qhull.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\qset.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\stat.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\user.c">
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\src\geom.h">
- </File>
- <File
- RelativePath="..\..\src\io.h">
- </File>
- <File
- RelativePath="..\..\src\mem.h">
- </File>
- <File
- RelativePath="..\..\src\merge.h">
- </File>
- <File
- RelativePath="..\..\src\poly.h">
- </File>
- <File
- RelativePath="..\..\src\qhull.h">
- </File>
- <File
- RelativePath="..\..\src\qhull_a.h">
- </File>
- <File
- RelativePath="..\..\src\qset.h">
- </File>
- <File
- RelativePath="..\..\src\stat.h">
- </File>
- <File
- RelativePath="..\..\src\user.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/qhull/make/msvc_9_0/qhull.vcproj b/extern/qhull/make/msvc_9_0/qhull.vcproj
deleted file mode 100644
index fe5b3e806b6..00000000000
--- a/extern/qhull/make/msvc_9_0/qhull.vcproj
+++ /dev/null
@@ -1,877 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_qhull"
- ProjectGUID="{6461F05D-4698-47AB-A8E8-1CA2ACC9948B}"
- RootNamespace="qhull"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\qhull"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\qhull"
- 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"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\qhull\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\qhull\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\qhull\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\qhull\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\qhull.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\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"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\qhull\debug\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\qhull\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\qhull\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\qhull\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\qhull.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\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"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\qhull.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\qhull\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"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\debug\qhull.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\qhull\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\qhull.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying QHULL files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\qhull\include MKDIR ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\build\msvc_9\extern\qhull\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\src\geom.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\geom2.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\global.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\io.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\mem.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\merge.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\poly.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\poly2.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\qhull.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\qset.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\stat.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\user.c"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\geom.h"
- >
- </File>
- <File
- RelativePath="..\..\src\io.h"
- >
- </File>
- <File
- RelativePath="..\..\src\mem.h"
- >
- </File>
- <File
- RelativePath="..\..\src\merge.h"
- >
- </File>
- <File
- RelativePath="..\..\src\poly.h"
- >
- </File>
- <File
- RelativePath="..\..\src\qhull.h"
- >
- </File>
- <File
- RelativePath="..\..\src\qhull_a.h"
- >
- </File>
- <File
- RelativePath="..\..\src\qset.h"
- >
- </File>
- <File
- RelativePath="..\..\src\stat.h"
- >
- </File>
- <File
- RelativePath="..\..\src\user.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/qhull/src/Make-config.sh b/extern/qhull/src/Make-config.sh
deleted file mode 100755
index 90bbb958599..00000000000
--- a/extern/qhull/src/Make-config.sh
+++ /dev/null
@@ -1,285 +0,0 @@
-#!/bin/sh -e
-#
-# Make-config.sh
-#
-# Setup for Debian build
-#
-# Writes configure.in and Makefile.am files
-# and runs automake and autoconfig
-#
-# Use 'make dist' to build Unix distribution.
-# Use 'configure; make' to build Qhull
-#
-#note:
-# 'configure; make' does not work under cygwin.
-# src/unix.c:354: variable 'qh_qh' can't be auto-imported.
-# Please read the documentation for ld's --enable-auto-import for details.
-
-###################################################
-########### ../configure.in ######################
-###################################################
-
-echo Create ../configure.in
-cat >../configure.in <<\HERE-CONFIGURE
-dnl configure.in for the qhull package
-dnl Author: Rafael Laboissiere <rafael@debian.org>
-dnl Created: Mon Dec 3 21:36:21 CET 2001
-
-AC_INIT(src/qhull.c)
-AM_INIT_AUTOMAKE(qhull, 2002.1)
-
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
-AC_OUTPUT([Makefile src/Makefile html/Makefile eg/Makefile])
-
-HERE-CONFIGURE
-
-###################################################
-########### ../Makefile.am #######################
-###################################################
-
-echo Create ../Makefile.am
-cat >../Makefile.am <<\HERE-TOP
-### Makefile.am for the qhull package (main)
-### Author: Rafael Laboissiere <rafael@debian.org>
-### Created: Mon Dec 3 21:36:21 CET 2001
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-
-# which:
-doc_DATA = \
- Announce.txt \
- COPYING.txt \
- README.txt \
- REGISTER.txt
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
- $(doc_DATA) \
- File_id.diz \
- QHULL-GO.pif
-
-### Subdirectories for Automaking
-
-SUBDIRS = src html eg
-
-HERE-TOP
-
-###################################################
-########### ../eg/Makefile.am ####################
-###################################################
-
-echo Create ../eg/Makefile.am
-cat >../eg/Makefile.am <<\HERE-AM
-### Makefile.am for the qhull package (eg)
-### Author: Rafael Laboissiere <rafael@debian.org>
-### Created: Mon Dec 3 21:36:21 CET 2001
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-examplesdir = $(docdir)/examples
-
-# which:
-examples_DATA = \
- q_eg \
- q_egtest \
- q_test \
- Qhull-go.bat \
- q_test.bat
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = $(examples_DATA)
-
-HERE-AM
-
-###################################################
-########### ../html/Makefile.am ##################
-###################################################
-
-echo Create ../html/Makefile.am
-cat >../html/Makefile.am <<\HERE-HTML
-### Makefile.am for the qhull package (html)
-### Author: Rafael Laboissiere <rafael@debian.org>
-### Created: Mon Dec 3 21:36:21 CET 2001
-
-### Man pages (trick to get around .man extension)
-
-%.1: %.man
- cp $< $@
-CLEANFILES = *.1
-man_MANS = rbox.1 qhull.1
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-htmldir = $(docdir)/html
-
-# which:
-html_DATA = \
- index.htm \
- qconvex.htm \
- qdelau_f.htm \
- qdelaun.htm \
- qh--4d.gif \
- qh--cone.gif \
- qh--dt.gif \
- qh--geom.gif \
- qh--half.gif \
- qh--rand.gif \
- qh-eg.htm \
- qh-faq.htm \
- qh-get.htm \
- qh-home.htm \
- qh-impre.htm \
- qh-in.htm \
- qh-optc.htm \
- qh-optf.htm \
- qh-optg.htm \
- qh-opto.htm \
- qh-optp.htm \
- qh-optq.htm \
- qh-optt.htm \
- qh-quick.htm \
- qhalf.htm \
- qhull.htm \
- qvoron_f.htm \
- qvoronoi.htm \
- rbox.htm
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
- $(html_DATA) \
- qhull.man \
- qhull.txt \
- rbox.man \
- rbox.txt
-
-HERE-HTML
-
-###################################################
-########### ../src/Makefile.am ###################
-###################################################
-
-echo Create ../src/Makefile.am
-cat >../src/Makefile.am <<\HERE-SRC
-### Makefile.am for the qhull package (src)
-### Author: Rafael Laboissiere <rafael@debian.org>
-### Created: Mon Dec 3 21:36:21 CET 2001
-
-### Shared Library
-
-# to:
-lib_LTLIBRARIES = libqhull.la
-
-# from:
-libqhull_la_SOURCES = \
- user.c \
- global.c \
- stat.c \
- io.c \
- geom2.c \
- poly2.c \
- merge.c \
- qhull.c \
- geom.c \
- poly.c \
- qset.c \
- mem.c
-
-# how:
-libqhull_la_LDFLAGS = -version-info 0:0:0 -lm
-
-### Utility programs
-
-# to:
-bin_PROGRAMS = qhull rbox qconvex qdelaunay qvoronoi qhalf
-
-# from:
-qhull_SOURCES = unix.c
-rbox_SOURCES = rbox.c
-qconvex_SOURCES = qconvex.c
-qdelaunay_SOURCES = qdelaun.c
-qvoronoi_SOURCES = qvoronoi.c
-qhalf_SOURCES = qhalf.c
-
-# how:
-qhull_LDADD = libqhull.la
-rbox_LDADD = libqhull.la
-qconvex_LDADD = libqhull.la
-qdelaunay_LDADD = libqhull.la
-qvoronoi_LDADD = libqhull.la
-qhalf_LDADD = libqhull.la
-
-### Include files
-
-pkginclude_HEADERS = \
- geom.h \
- mem.h \
- poly.h \
- qhull_a.h \
- stat.h \
- io.h \
- merge.h \
- qhull.h \
- qset.h \
- user.h
-
-
-### Example programs
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-examplesdir = $(docdir)/examples
-
-# which:
-examples_DATA = \
- user_eg.c \
- user_eg2.c \
- qhull_interface.cpp \
- Makefile.txt \
- Make-config.sh \
- MBorland
-
-doc_DATA = Changes.txt \
- index.htm \
- qh-geom.htm \
- qh-globa.htm \
- qh-io.htm \
- qh-mem.htm \
- qh-merge.htm \
- qh-poly.htm \
- qh-qhull.htm \
- qh-set.htm \
- qh-stat.htm \
- qh-user.htm
-
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
- $(doc_DATA) \
- $(examples_DATA)
-
-HERE-SRC
-
-###################################################
-########### run automake autoconf ################
-###################################################
-
-
-echo Run automake, libtoolize, and autoconf
-cd ..; aclocal &&\
- automake --foreign --add-missing --force-missing && \
- libtoolize --force && \
- autoconf
-
diff --git a/extern/qhull/src/Makefile b/extern/qhull/src/Makefile
deleted file mode 100644
index 81c06758cbb..00000000000
--- a/extern/qhull/src/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
-# vim: tabstop=8
-#
-# $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): GSR
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = qhull
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../include
-
-CSRCS = user.c global.c stat.c io.c geom2.c poly2.c \
- merge.c qhull.c geom.c poly.c qset.c mem.c
-CCSRCS =
-include nan_compile.mk
-
-install: $(ALL_OR_DEBUG)
- @[ -d $(NAN_QHULL) ] || mkdir -p $(NAN_QHULL)
- @[ -d $(NAN_QHULL)/include/qhull ] || mkdir -p $(NAN_QHULL)/include/qhull
- @[ -d $(NAN_QHULL)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_QHULL)/lib/$(DEBUG_DIR)
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_QHULL)/lib/$(DEBUG_DIR)
-ifeq ($(OS),darwin)
- ranlib $(NAN_QHULL)/lib/$(DEBUG_DIR)lib$(LIBNAME).a
-endif
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/qhull/*.h $(NAN_QHULL)/include/qhull
-
-
diff --git a/extern/qhull/src/Makefile.txt b/extern/qhull/src/Makefile.txt
deleted file mode 100644
index e87b66b49bc..00000000000
--- a/extern/qhull/src/Makefile.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-# Unix Makefile for qhull and rbox
-#
-# see README.txt
-#
-# make to produce qhull qconvex qdelaunay qhalf qvoronoi rbox
-# make qvoronoi to produce qvoronoi (etc.)
-# make qhullx to produce qhull qconvex etc. w/o using libqhull.a
-# make doc to print documentation
-# make install to copy qhull, rbox, qhull.1, rbox.1 to BINDIR, MANDIR
-# make new to rebuild qhull and rbox from source
-#
-# make printall to print all files
-# make user_eg to produce user_eg
-# make user_eg2 to produce user_eg2
-# make clean to remove object files and core
-# make cleanall to remove all generated files
-#
-# PRINTMAN -- command for printing manual pages
-# PRINTC -- command for printing C files
-# BINDIR -- directory where to copy executables
-# MANDIR -- directory where to copy manual pages
-# CC -- ANSI C or C++ compiler
-# CCOPTS1 - options used to compile .c files
-# CCOPTS2 -- options used to link .o files
-#
-# CFILES -- .c files for printing
-# HFILES -- .h files for printing
-# DFILES -- documentation files
-# MFILES -- man pages and html files
-# TFILES -- .txt versions of html html files
-# FILES -- all other files
-# OBJS -- specifies the object files of libqhull.a
-#
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/man1
-
-# if you do not have enscript, try a2ps or just use lpr. The files are text.
-PRINTMAN = enscript -2rl
-PRINTC = enscript -2r
-# PRINTMAN = lpr
-# PRINTC = lpr
-
-#for Gnu's gcc compiler -O2 for optimization, -g for debugging, -Wall for check
-#
-CC = gcc
-CCOPTS1 = -O2 -ansi
-
-# for Sun's cc compiler, -fast or O2 for optimization, -g for debugging, -Xc for ANSI
-#CC = cc
-#CCOPTS1 = -Xc -v -fast
-
-# for Silicon Graphics cc compiler, -O2 for optimization, -g for debugging
-#CC = cc
-#CCOPTS1 = -ansi -O2
-
-# for Next cc compiler with fat executable
-#CC = cc
-#CCOPTS1 = -ansi -O2 -arch m68k -arch i386 -arch hppa
-
-# for loader, ld
-CCOPTS2 = $(CCOPTS1)
-
-# OBJS in execution frequency order. CFILES after qhull.c are alphabetical
-OBJS = user.o global.o stat.o io.o geom2.o poly2.o \
- merge.o qhull.o geom.o poly.o qset.o mem.o
-
-CFILES= unix.c qhull.c geom.c geom2.c global.c io.c mem.c merge.c poly.c \
- poly2.c qset.c stat.c user.c qconvex.c qdelaun.c qhalf.c qvoronoi.c
-HFILES= user.h qhull.h qhull_a.h geom.h io.h mem.h merge.h poly.h qset.h stat.h
-TXTFILES= ../Announce.txt ../REGISTER.txt ../COPYING.txt ../README.txt Changes.txt
-DOCFILES= ../html/rbox.txt ../html/qhull.txt
-FILES= Makefile rbox.c user_eg.c ../eg/q_test ../eg/q_egtest ../eg/q_eg
-HTMFILES= qhull.man rbox.man qh-in.htm qh-optg.htm qh-optt.htm qh-optp.htm \
- index.htm qh-quick.htm qh-impre.htm qh-eg.htm \
- qh-optc.htm qh-opto.htm qh-optf.htm qh-optq.htm \
- qh-c.htm qh-faq.htm qhull.htm qconvex.htm qdelaun.htm \
- qh-geom.htm qh-globa.htm qh-io.htm qh-mem.htm qh-merge.htm \
- qh-poly.htm qh-qhull.htm qh-set.htm qh-stat.htm qh-user.htm \
- qdelau_f.htm qhalf.htm qvoronoi.htm qvoron_f.htm rbox.htm
-
-all: rbox qconvex qdelaunay qhalf qvoronoi qhull
-
-unix.o: qhull.h user.h mem.h
-qconvex.o: qhull.h user.h mem.h
-qdelaun.o: qhull.h user.h mem.h
-qhalf.o: qhull.h user.h mem.h
-qvoronoi.o: qhull.h user.h mem.h
-qhull.o: $(HFILES)
-geom.o: $(HFILES)
-geom2.o: $(HFILES)
-global.o: $(HFILES)
-io.o: $(HFILES)
-mem.o: mem.h
-merge.o: $(HFILES)
-poly.o: $(HFILES)
-poly2.o: $(HFILES)
-qset.o: qset.h mem.h
-stat.o: $(HFILES)
-user.o: $(HFILES)
-
-.c.o:
- $(CC) -c $(CCOPTS1) $<
-
-clean:
- rm -f *.o ../core qconvex qdelaunay qhalf qvoronoi qhull libqhull.a \
- *.exe
-
-cleanall: clean
- rm -f *~ ../rbox ../qhull ../qhalf ../qconvex ../qdelaunay ../qhalf\
- ../qvoronoi ../user_eg ../user_eg2 ../*.exe >/dev/null
-
-doc:
- $(PRINTMAN) $(TXTFILES) $(DOCFILES)
-
-install: all
- cp ../qconvex $(BINDIR)/qconvex
- cp ../qdelaunay $(BINDIR)/qdelaunay
- cp ../qhalf $(BINDIR)/qhalf
- cp ../qhull $(BINDIR)/qhull
- cp ../qvoronoi $(BINDIR)/qvoronoi
- cp ../rbox $(BINDIR)/rbox
- cp ../html/qhull.man $(MANDIR)/qhull.1
- cp ../html/rbox.man $(MANDIR)/rbox.1
-
-new: cleanall all
-
-printall: doc printh printc printf
-
-printh:
- $(PRINTC) $(HFILES)
-
-printc:
- $(PRINTC) $(CFILES)
-
-printf:
- $(PRINTC) $(FILES)
-
-libqhull.a: $(OBJS)
- @echo if 'ar' or 'ranlib' fails, try 'make qhullx'
- ar r libqhull.a $(OBJS)
- @echo the next line may need to be removed.
- -test -x /bin/ranlib -o -x /usr/bin/ranlib && ranlib libqhull.a
-
-# don't use ../qconvex. Does not work on Red Hat Linux
-qconvex: qconvex.o libqhull.a
- $(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lqhull -lm
- cp qconvex ..
-
-qdelaunay: qdelaun.o libqhull.a
- $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lqhull -lm
- cp qdelaunay ..
-
-qhalf: qhalf.o libqhull.a
- $(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lqhull -lm
- cp qhalf ..
-
-qvoronoi: qvoronoi.o libqhull.a
- $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lqhull -lm
- cp qvoronoi ..
-
-qhull: unix.o libqhull.a
- $(CC) -o qhull $(CCOPTS2) unix.o -L. -lqhull -lm
- cp qhull ..
- -chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
- -cd ..; ./rbox D4 | ./qhull
-
-# compile qhull without using libqhull.a
-qhullx: qconvex.o qdelaun.o qhalf.o qvoronoi.o unix.o $(OBJS)
- $(CC) -o qconvex $(CCOPTS2) qconvex.o $(OBJS) -lm
- $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o $(OBJS) -lm
- $(CC) -o qhalf $(CCOPTS2) qhalf.o $(OBJS) -lm
- $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o $(OBJS) -lm
- $(CC) -o qhull $(CCOPTS2) unix.o $(OBJS) -lm
- cp qconvex qdelaunay qhalf qvoronoi qhull ..
- -chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
- -cd ..; ./rbox D4 | ./qhull
-
-rbox: rbox.o
- $(CC) -o rbox rbox.o $(CCOPTS2) -lm
- cp rbox ..
-
-user_eg: user_eg.o libqhull.a
- $(CC) -o user_eg $(CCOPTS2) user_eg.o -L. -lqhull -lm
- cp user_eg ..
-
-user_eg2: user_eg2.o libqhull.a
- $(CC) -o user_eg2 $(CCOPTS2) user_eg2.o -L. -lqhull -lm
- cp user_eg2 ..
-
-# end of Makefile
diff --git a/extern/qhull/src/geom.c b/extern/qhull/src/geom.c
deleted file mode 100644
index ca4bcaf2541..00000000000
--- a/extern/qhull/src/geom.c
+++ /dev/null
@@ -1,1230 +0,0 @@
-/*<html><pre> -<a href="qh-geom.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- geom.c
- geometric routines of qhull
-
- see qh-geom.htm and geom.h
-
- copyright (c) 1993-2002 The Geometry Center
-
- infrequent code goes into geom2.c
-*/
-
-#include "qhull_a.h"
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="distplane">-</a>
-
- qh_distplane( point, facet, dist )
- return distance from point to facet
-
- returns:
- dist
- if qh.RANDOMdist, joggles result
-
- notes:
- dist > 0 if point is above facet (i.e., outside)
- does not error (for sortfacets)
-
- see:
- qh_distnorm in geom2.c
-*/
-void qh_distplane (pointT *point, facetT *facet, realT *dist) {
- coordT *normal= facet->normal, *coordp, randr;
- int k;
-
- switch(qh hull_dim){
- case 2:
- *dist= facet->offset + point[0] * normal[0] + point[1] * normal[1];
- break;
- case 3:
- *dist= facet->offset + point[0] * normal[0] + point[1] * normal[1] + point[2] * normal[2];
- break;
- case 4:
- *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3];
- break;
- case 5:
- *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4];
- break;
- case 6:
- *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5];
- break;
- case 7:
- *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5]+point[6]*normal[6];
- break;
- case 8:
- *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5]+point[6]*normal[6]+point[7]*normal[7];
- break;
- default:
- *dist= facet->offset;
- coordp= point;
- for (k= qh hull_dim; k--; )
- *dist += *coordp++ * *normal++;
- break;
- }
- zinc_(Zdistplane);
- if (!qh RANDOMdist && qh IStracing < 4)
- return;
- if (qh RANDOMdist) {
- randr= qh_RANDOMint;
- *dist += (2.0 * randr / qh_RANDOMmax - 1.0) *
- qh RANDOMfactor * qh MAXabs_coord;
- }
- if (qh IStracing >= 4) {
- fprintf (qh ferr, "qh_distplane: ");
- fprintf (qh ferr, qh_REAL_1, *dist);
- fprintf (qh ferr, "from p%d to f%d\n", qh_pointid(point), facet->id);
- }
- return;
-} /* distplane */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="findbest">-</a>
-
- qh_findbest( point, startfacet, bestoutside, qh_ISnewfacets, qh_NOupper, dist, isoutside, numpart )
- find facet that is furthest below a point
- for upperDelaunay facets
- returns facet only if !qh_NOupper and clearly above
-
- input:
- starts search at 'startfacet' (can not be flipped)
- if !bestoutside (qh_ALL), stops at qh.MINoutside
-
- returns:
- best facet (reports error if NULL)
- early out if isoutside defined and bestdist > qh.MINoutside
- dist is distance to facet
- isoutside is true if point is outside of facet
- numpart counts the number of distance tests
-
- see also:
- qh_findbestnew()
-
- notes:
- If merging (testhorizon), searches horizon facets of coplanar best facets because
- after qh_distplane, this and qh_partitionpoint are the most expensive in 3-d
- avoid calls to distplane, function calls, and real number operations.
- caller traces result
- Optimized for outside points. Tried recording a search set for qh_findhorizon.
- Made code more complicated.
-
- when called by qh_partitionvisible():
- indicated by qh_ISnewfacets
- qh.newfacet_list is list of simplicial, new facets
- qh_findbestnew set if qh_sharpnewfacets returns True (to use qh_findbestnew)
- qh.bestfacet_notsharp set if qh_sharpnewfacets returns False
-
- when called by qh_findfacet(), qh_partitionpoint(), qh_partitioncoplanar(),
- qh_check_bestdist(), qh_addpoint()
- indicated by !qh_ISnewfacets
- returns best facet in neighborhood of given facet
- this is best facet overall if dist > - qh.MAXcoplanar
- or hull has at least a "spherical" curvature
-
- design:
- initialize and test for early exit
- repeat while there are better facets
- for each neighbor of facet
- exit if outside facet found
- test for better facet
- if point is inside and partitioning
- test for new facets with a "sharp" intersection
- if so, future calls go to qh_findbestnew()
- test horizon facets
-*/
-facetT *qh_findbest (pointT *point, facetT *startfacet,
- boolT bestoutside, boolT isnewfacets, boolT noupper,
- realT *dist, boolT *isoutside, int *numpart) {
- realT bestdist= -REALmax/2 /* avoid underflow */;
- facetT *facet, *neighbor, **neighborp, *bestfacet= NULL;
- /* facetT *bestfacet_all= startfacet; */
- int oldtrace= qh IStracing;
- unsigned int visitid= ++qh visit_id;
- int numpartnew=0;
- boolT testhorizon = True; /* needed if precise, e.g., rbox c D6 | qhull Q0 Tv */
-
- zinc_(Zfindbest);
- if (qh IStracing >= 3 || (qh TRACElevel && qh TRACEpoint >= 0 && qh TRACEpoint == qh_pointid (point))) {
- if (qh TRACElevel > qh IStracing)
- qh IStracing= qh TRACElevel;
- fprintf (qh ferr, "qh_findbest: point p%d starting at f%d isnewfacets? %d, unless %d exit if > %2.2g\n",
- qh_pointid(point), startfacet->id, isnewfacets, bestoutside, qh MINoutside);
- fprintf(qh ferr, " testhorizon? %d noupper? %d", testhorizon, noupper);
- fprintf (qh ferr, " Last point added was p%d.", qh furthest_id);
- fprintf(qh ferr, " Last merge was #%d. max_outside %2.2g\n", zzval_(Ztotmerge), qh max_outside);
- }
- if (isoutside)
- *isoutside= True;
- if (!startfacet->flipped) { /* test startfacet */
- *numpart= 1;
- qh_distplane (point, startfacet, dist); /* this code is duplicated below */
- if (!bestoutside && *dist >= qh MINoutside
- && (!startfacet->upperdelaunay || !noupper)) {
- bestfacet= startfacet;
- goto LABELreturn_best;
- }
- bestdist= *dist;
- if (!startfacet->upperdelaunay) {
- bestfacet= startfacet;
- }
- }else
- *numpart= 0;
- startfacet->visitid= visitid;
- facet= startfacet;
- while (facet) {
- trace4((qh ferr, "qh_findbest: neighbors of f%d, bestdist %2.2g f%d\n",
- facet->id, bestdist, getid_(bestfacet)));
- FOREACHneighbor_(facet) {
- if (!neighbor->newfacet && isnewfacets)
- continue;
- if (neighbor->visitid == visitid)
- continue;
- neighbor->visitid= visitid;
- if (!neighbor->flipped) { /* code duplicated above */
- (*numpart)++;
- qh_distplane (point, neighbor, dist);
- if (*dist > bestdist) {
- if (!bestoutside && *dist >= qh MINoutside
- && (!neighbor->upperdelaunay || !noupper)) {
- bestfacet= neighbor;
- goto LABELreturn_best;
- }
- if (!neighbor->upperdelaunay) {
- bestfacet= neighbor;
- bestdist= *dist;
- }
- break; /* switch to neighor */
- } /* end of *dist>bestdist */
- } /* end of !flipped */
- } /* end of FOREACHneighbor */
- facet= neighbor; /* non-NULL only if *dist>bestdist */
- } /* end of while facet (directed search) */
- if (isnewfacets) {
- if (!bestfacet) {
- bestdist= -REALmax/2;
- bestfacet= qh_findbestnew (point, startfacet->next, &bestdist, bestoutside, isoutside, &numpartnew);
- testhorizon= False; /* qh_findbestnew calls qh_findbesthorizon */
- }else if (!qh findbest_notsharp && bestdist < - qh DISTround) {
- if (qh_sharpnewfacets()) {
- /* seldom used, qh_findbestnew will retest all facets */
- zinc_(Zfindnewsharp);
- bestfacet= qh_findbestnew (point, bestfacet, &bestdist, bestoutside, isoutside, &numpartnew);
- testhorizon= False; /* qh_findbestnew calls qh_findbesthorizon */
- qh findbestnew= True;
- }else
- qh findbest_notsharp= True;
- }
- }
- if (!bestfacet) {
- fprintf(qh ferr, "\n\
-qh_findbest: all neighbors of facet %d are flipped or upper Delaunay.\n\
-Please report this error to qhull_bug@geom.umn.edu with the input and all of the output.\n",
- startfacet->id);
- qh_errexit (qh_ERRqhull, startfacet, NULL);
- }
- if (testhorizon)
- bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, bestfacet, noupper, &bestdist, &numpartnew);
- *dist= bestdist;
- if (isoutside && bestdist < qh MINoutside)
- *isoutside= False;
-LABELreturn_best:
- zadd_(Zfindbesttot, *numpart);
- zmax_(Zfindbestmax, *numpart);
- (*numpart) += numpartnew;
- qh IStracing= oldtrace;
- return bestfacet;
-} /* findbest */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="findbesthorizon">-</a>
-
- qh_findbesthorizon( qh_IScheckmax, point, startfacet, qh_NOupper, &bestdist, &numpart )
- search coplanar and better horizon facets from startfacet/bestdist
- ischeckmax turns off statistics and minsearch update
- all arguments must be initialized
- returns (ischeckmax):
- best facet
- returns (!ischeckmax):
- best facet that is not upperdelaunay
- allows upperdelaunay that is clearly outside
- returns:
- bestdist is distance to bestfacet
- numpart -- updates number of distance tests
-
- notes:
- no early out -- use qh_findbest() or qh_findbestnew()
- Searches coplanar or better horizon facets
-
- when called by qh_check_maxout() (qh_IScheckmax)
- startfacet must be closest to the point
- Otherwise, if point is beyond and below startfacet, startfacet may be a local minimum
- even though other facets are below the point.
- updates facet->maxoutside for good, visited facets
- may return NULL
-
- searchdist is qh.max_outside + 2 * DISTround
- + max( MINvisible('Vn'), MAXcoplanar('Un'));
- This setting is a guess. It must be at least max_outside + 2*DISTround
- because a facet may have a geometric neighbor across a vertex
-
- design:
- for each horizon facet of coplanar best facets
- continue if clearly inside
- unless upperdelaunay or clearly outside
- update best facet
-*/
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT* point, facetT *startfacet, boolT noupper, realT *bestdist, int *numpart) {
- facetT *bestfacet= startfacet;
- realT dist;
- facetT *neighbor, **neighborp, *facet;
- facetT *nextfacet= NULL; /* optimize last facet of coplanarset */
- int numpartinit= *numpart, coplanarset_size;
- unsigned int visitid= ++qh visit_id;
- boolT newbest= False; /* for tracing */
- realT minsearch, searchdist; /* skip facets that are too far from point */
-
- if (!ischeckmax) {
- zinc_(Zfindhorizon);
- }else {
-#if qh_MAXoutside
- if ((!qh ONLYgood || startfacet->good) && *bestdist > startfacet->maxoutside)
- startfacet->maxoutside= *bestdist;
-#endif
- }
- searchdist= qh_SEARCHdist; /* multiple of qh.max_outside and precision constants */
- minsearch= *bestdist - searchdist;
- if (ischeckmax) {
- /* Always check coplanar facets. Needed for RBOX 1000 s Z1 G1e-13 t996564279 | QHULL Tv */
- minimize_(minsearch, -searchdist);
- }
- coplanarset_size= 0;
- facet= startfacet;
- while (True) {
- trace4((qh ferr, "qh_findbesthorizon: neighbors of f%d bestdist %2.2g f%d ischeckmax? %d noupper? %d minsearch %2.2g searchdist %2.2g\n",
- facet->id, *bestdist, getid_(bestfacet), ischeckmax, noupper,
- minsearch, searchdist));
- FOREACHneighbor_(facet) {
- if (neighbor->visitid == visitid)
- continue;
- neighbor->visitid= visitid;
- if (!neighbor->flipped) {
- qh_distplane (point, neighbor, &dist);
- (*numpart)++;
- if (dist > *bestdist) {
- if (!neighbor->upperdelaunay || ischeckmax || (!noupper && dist >= qh MINoutside)) {
- bestfacet= neighbor;
- *bestdist= dist;
- newbest= True;
- if (!ischeckmax) {
- minsearch= dist - searchdist;
- if (dist > *bestdist + searchdist) {
- zinc_(Zfindjump); /* everything in qh.coplanarset at least searchdist below */
- coplanarset_size= 0;
- }
- }
- }
- }else if (dist < minsearch)
- continue; /* if ischeckmax, dist can't be positive */
-#if qh_MAXoutside
- if (ischeckmax && dist > neighbor->maxoutside)
- neighbor->maxoutside= dist;
-#endif
- } /* end of !flipped */
- if (nextfacet) {
- if (!coplanarset_size++) {
- SETfirst_(qh coplanarset)= nextfacet;
- SETtruncate_(qh coplanarset, 1);
- }else
- qh_setappend (&qh coplanarset, nextfacet); /* Was needed for RBOX 1000 s W1e-13 P0 t996547055 | QHULL d Qbb Qc Tv
- and RBOX 1000 s Z1 G1e-13 t996564279 | qhull Tv */
- }
- nextfacet= neighbor;
- } /* end of EACHneighbor */
- facet= nextfacet;
- if (facet)
- nextfacet= NULL;
- else if (!coplanarset_size)
- break;
- else if (!--coplanarset_size) {
- facet= SETfirst_(qh coplanarset);
- SETtruncate_(qh coplanarset, 0);
- }else
- facet= (facetT*)qh_setdellast (qh coplanarset);
- } /* while True, for each facet in qh.coplanarset */
- if (!ischeckmax) {
- zadd_(Zfindhorizontot, *numpart - numpartinit);
- zmax_(Zfindhorizonmax, *numpart - numpartinit);
- if (newbest)
- zinc_(Zparthorizon);
- }
- trace4((qh ferr, "qh_findbesthorizon: newbest? %d bestfacet f%d bestdist %2.2g\n", newbest, getid_(bestfacet), *bestdist));
- return bestfacet;
-} /* findbesthorizon */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="findbestnew">-</a>
-
- qh_findbestnew( point, startfacet, dist, isoutside, numpart )
- find best newfacet for point
- searches all of qh.newfacet_list starting at startfacet
- searches horizon facets of coplanar best newfacets
- searches all facets if startfacet == qh.facet_list
- returns:
- best new or horizon facet that is not upperdelaunay
- early out if isoutside and not 'Qf'
- dist is distance to facet
- isoutside is true if point is outside of facet
- numpart is number of distance tests
-
- notes:
- Always used for merged new facets (see qh_USEfindbestnew)
- Avoids upperdelaunay facet unless (isoutside and outside)
-
- Uses qh.visit_id, qh.coplanarset.
- If share visit_id with qh_findbest, coplanarset is incorrect.
-
- If merging (testhorizon), searches horizon facets of coplanar best facets because
- a point maybe coplanar to the bestfacet, below its horizon facet,
- and above a horizon facet of a coplanar newfacet. For example,
- rbox 1000 s Z1 G1e-13 | qhull
- rbox 1000 s W1e-13 P0 t992110337 | QHULL d Qbb Qc
-
- qh_findbestnew() used if
- qh_sharpnewfacets -- newfacets contains a sharp angle
- if many merges, qh_premerge found a merge, or 'Qf' (qh.findbestnew)
-
- see also:
- qh_partitionall() and qh_findbest()
-
- design:
- for each new facet starting from startfacet
- test distance from point to facet
- return facet if clearly outside
- unless upperdelaunay and a lowerdelaunay exists
- update best facet
- test horizon facets
-*/
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
- realT *dist, boolT bestoutside, boolT *isoutside, int *numpart) {
- realT bestdist= -REALmax/2; /*, minsearch= -REALmax/2;*/
- facetT *bestfacet= NULL, *facet;
- int oldtrace= qh IStracing, i;
- unsigned int visitid= ++qh visit_id;
- realT distoutside= 0.0;
- boolT isdistoutside; /* True if distoutside is defined */
- boolT testhorizon = True; /* needed if precise, e.g., rbox c D6 | qhull Q0 Tv */
-
- if (!startfacet) {
- if (qh MERGING)
- fprintf(qh ferr, "qhull precision error (qh_findbestnew): merging has formed and deleted a cone of new facets. Can not continue.\n");
- else
- fprintf(qh ferr, "qhull internal error (qh_findbestnew): no new facets for point p%d\n",
- qh furthest_id);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- zinc_(Zfindnew);
- if (qh BESToutside || bestoutside)
- isdistoutside= False;
- else {
- isdistoutside= True;
- distoutside= qh_DISToutside; /* multiple of qh.MINoutside & qh.max_outside, see user.h */
- }
- if (isoutside)
- *isoutside= True;
- *numpart= 0;
- if (qh IStracing >= 3 || (qh TRACElevel && qh TRACEpoint >= 0 && qh TRACEpoint == qh_pointid (point))) {
- if (qh TRACElevel > qh IStracing)
- qh IStracing= qh TRACElevel;
- fprintf(qh ferr, "qh_findbestnew: point p%d facet f%d. Stop? %d if dist > %2.2g\n",
- qh_pointid(point), startfacet->id, isdistoutside, distoutside);
- fprintf(qh ferr, " Last point added p%d visitid %d.", qh furthest_id, visitid);
- fprintf(qh ferr, " Last merge was #%d.\n", zzval_(Ztotmerge));
- }
- /* visit all new facets starting with startfacet, maybe qh facet_list */
- for (i= 0, facet= startfacet; i < 2; i++, facet= qh newfacet_list) {
- FORALLfacet_(facet) {
- if (facet == startfacet && i)
- break;
- facet->visitid= visitid;
- if (!facet->flipped) {
- qh_distplane (point, facet, dist);
- (*numpart)++;
- if (*dist > bestdist) {
- if (!facet->upperdelaunay || *dist >= qh MINoutside) {
- bestfacet= facet;
- if (isdistoutside && *dist >= distoutside)
- goto LABELreturn_bestnew;
- bestdist= *dist;
- }
- }
- } /* end of !flipped */
- } /* FORALLfacet from startfacet or qh newfacet_list */
- }
- if (testhorizon || !bestfacet)
- bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, bestfacet ? bestfacet : startfacet,
- !qh_NOupper, &bestdist, numpart);
- *dist= bestdist;
- if (isoutside && *dist < qh MINoutside)
- *isoutside= False;
-LABELreturn_bestnew:
- zadd_(Zfindnewtot, *numpart);
- zmax_(Zfindnewmax, *numpart);
- trace4((qh ferr, "qh_findbestnew: bestfacet f%d bestdist %2.2g\n", getid_(bestfacet), *dist));
- qh IStracing= oldtrace;
- return bestfacet;
-} /* findbestnew */
-
-/* ============ hyperplane functions -- keep code together [?] ============ */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="backnormal">-</a>
-
- qh_backnormal( rows, numrow, numcol, sign, normal, nearzero )
- given an upper-triangular rows array and a sign,
- solve for normal equation x using back substitution over rows U
-
- returns:
- normal= x
-
- if will not be able to divzero() when normalized (qh.MINdenom_2 and qh.MINdenom_1_2),
- if fails on last row
- this means that the hyperplane intersects [0,..,1]
- sets last coordinate of normal to sign
- otherwise
- sets tail of normal to [...,sign,0,...], i.e., solves for b= [0...0]
- sets nearzero
-
- notes:
- assumes numrow == numcol-1
-
- see Golub & van Loan 4.4-9 for back substitution
-
- solves Ux=b where Ax=b and PA=LU
- b= [0,...,0,sign or 0] (sign is either -1 or +1)
- last row of A= [0,...,0,1]
-
- 1) Ly=Pb == y=b since P only permutes the 0's of b
-
- design:
- for each row from end
- perform back substitution
- if near zero
- use qh_divzero for division
- if zero divide and not last row
- set tail of normal to 0
-*/
-void qh_backnormal (realT **rows, int numrow, int numcol, boolT sign,
- coordT *normal, boolT *nearzero) {
- int i, j;
- coordT *normalp, *normal_tail, *ai, *ak;
- realT diagonal;
- boolT waszero;
- int zerocol= -1;
-
- normalp= normal + numcol - 1;
- *normalp--= (sign ? -1.0 : 1.0);
- for(i= numrow; i--; ) {
- *normalp= 0.0;
- ai= rows[i] + i + 1;
- ak= normalp+1;
- for(j= i+1; j < numcol; j++)
- *normalp -= *ai++ * *ak++;
- diagonal= (rows[i])[i];
- if (fabs_(diagonal) > qh MINdenom_2)
- *(normalp--) /= diagonal;
- else {
- waszero= False;
- *normalp= qh_divzero (*normalp, diagonal, qh MINdenom_1_2, &waszero);
- if (waszero) {
- zerocol= i;
- *(normalp--)= (sign ? -1.0 : 1.0);
- for (normal_tail= normalp+2; normal_tail < normal + numcol; normal_tail++)
- *normal_tail= 0.0;
- }else
- normalp--;
- }
- }
- if (zerocol != -1) {
- zzinc_(Zback0);
- *nearzero= True;
- trace4((qh ferr, "qh_backnormal: zero diagonal at column %d.\n", i));
- qh_precision ("zero diagonal on back substitution");
- }
-} /* backnormal */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="gausselim">-</a>
-
- qh_gausselim( rows, numrow, numcol, sign )
- Gaussian elimination with partial pivoting
-
- returns:
- rows is upper triangular (includes row exchanges)
- flips sign for each row exchange
- sets nearzero if pivot[k] < qh.NEARzero[k], else clears it
-
- notes:
- if nearzero, the determinant's sign may be incorrect.
- assumes numrow <= numcol
-
- design:
- for each row
- determine pivot and exchange rows if necessary
- test for near zero
- perform gaussian elimination step
-*/
-void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero) {
- realT *ai, *ak, *rowp, *pivotrow;
- realT n, pivot, pivot_abs= 0.0, temp;
- int i, j, k, pivoti, flip=0;
-
- *nearzero= False;
- for(k= 0; k < numrow; k++) {
- pivot_abs= fabs_((rows[k])[k]);
- pivoti= k;
- for(i= k+1; i < numrow; i++) {
- if ((temp= fabs_((rows[i])[k])) > pivot_abs) {
- pivot_abs= temp;
- pivoti= i;
- }
- }
- if (pivoti != k) {
- rowp= rows[pivoti];
- rows[pivoti]= rows[k];
- rows[k]= rowp;
- *sign ^= 1;
- flip ^= 1;
- }
- if (pivot_abs <= qh NEARzero[k]) {
- *nearzero= True;
- if (pivot_abs == 0.0) { /* remainder of column == 0 */
- if (qh IStracing >= 4) {
- fprintf (qh ferr, "qh_gausselim: 0 pivot at column %d. (%2.2g < %2.2g)\n", k, pivot_abs, qh DISTround);
- qh_printmatrix (qh ferr, "Matrix:", rows, numrow, numcol);
- }
- zzinc_(Zgauss0);
- qh_precision ("zero pivot for Gaussian elimination");
- goto LABELnextcol;
- }
- }
- pivotrow= rows[k] + k;
- pivot= *pivotrow++; /* signed value of pivot, and remainder of row */
- for(i= k+1; i < numrow; i++) {
- ai= rows[i] + k;
- ak= pivotrow;
- n= (*ai++)/pivot; /* divzero() not needed since |pivot| >= |*ai| */
- for(j= numcol - (k+1); j--; )
- *ai++ -= n * *ak++;
- }
- LABELnextcol:
- ;
- }
- wmin_(Wmindenom, pivot_abs); /* last pivot element */
- if (qh IStracing >= 5)
- qh_printmatrix (qh ferr, "qh_gausselem: result", rows, numrow, numcol);
-} /* gausselim */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="getangle">-</a>
-
- qh_getangle( vect1, vect2 )
- returns the dot product of two vectors
- if qh.RANDOMdist, joggles result
-
- notes:
- the angle may be > 1.0 or < -1.0 because of roundoff errors
-
-*/
-realT qh_getangle(pointT *vect1, pointT *vect2) {
- realT angle= 0, randr;
- int k;
-
- for(k= qh hull_dim; k--; )
- angle += *vect1++ * *vect2++;
- if (qh RANDOMdist) {
- randr= qh_RANDOMint;
- angle += (2.0 * randr / qh_RANDOMmax - 1.0) *
- qh RANDOMfactor;
- }
- trace4((qh ferr, "qh_getangle: %2.2g\n", angle));
- return(angle);
-} /* getangle */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="getcenter">-</a>
-
- qh_getcenter( vertices )
- returns arithmetic center of a set of vertices as a new point
-
- notes:
- allocates point array for center
-*/
-pointT *qh_getcenter(setT *vertices) {
- int k;
- pointT *center, *coord;
- vertexT *vertex, **vertexp;
- int count= qh_setsize(vertices);
-
- if (count < 2) {
- fprintf (qh ferr, "qhull internal error (qh_getcenter): not defined for %d points\n", count);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- center= (pointT *)qh_memalloc(qh normal_size);
- for (k=0; k < qh hull_dim; k++) {
- coord= center+k;
- *coord= 0.0;
- FOREACHvertex_(vertices)
- *coord += vertex->point[k];
- *coord /= count;
- }
- return(center);
-} /* getcenter */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="getcentrum">-</a>
-
- qh_getcentrum( facet )
- returns the centrum for a facet as a new point
-
- notes:
- allocates the centrum
-*/
-pointT *qh_getcentrum(facetT *facet) {
- realT dist;
- pointT *centrum, *point;
-
- point= qh_getcenter(facet->vertices);
- zzinc_(Zcentrumtests);
- qh_distplane (point, facet, &dist);
- centrum= qh_projectpoint(point, facet, dist);
- qh_memfree(point, qh normal_size);
- trace4((qh ferr, "qh_getcentrum: for f%d, %d vertices dist= %2.2g\n",
- facet->id, qh_setsize(facet->vertices), dist));
- return centrum;
-} /* getcentrum */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="getdistance">-</a>
-
- qh_getdistance( facet, neighbor, mindist, maxdist )
- returns the maxdist and mindist distance of any vertex from neighbor
-
- returns:
- the max absolute value
-
- design:
- for each vertex of facet that is not in neighbor
- test the distance from vertex to neighbor
-*/
-realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist) {
- vertexT *vertex, **vertexp;
- realT dist, maxd, mind;
-
- FOREACHvertex_(facet->vertices)
- vertex->seen= False;
- FOREACHvertex_(neighbor->vertices)
- vertex->seen= True;
- mind= 0.0;
- maxd= 0.0;
- FOREACHvertex_(facet->vertices) {
- if (!vertex->seen) {
- zzinc_(Zbestdist);
- qh_distplane(vertex->point, neighbor, &dist);
- if (dist < mind)
- mind= dist;
- else if (dist > maxd)
- maxd= dist;
- }
- }
- *mindist= mind;
- *maxdist= maxd;
- mind= -mind;
- if (maxd > mind)
- return maxd;
- else
- return mind;
-} /* getdistance */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="normalize">-</a>
-
- qh_normalize( normal, dim, toporient )
- normalize a vector and report if too small
- does not use min norm
-
- see:
- qh_normalize2
-*/
-void qh_normalize (coordT *normal, int dim, boolT toporient) {
- qh_normalize2( normal, dim, toporient, NULL, NULL);
-} /* normalize */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="normalize2">-</a>
-
- qh_normalize2( normal, dim, toporient, minnorm, ismin )
- normalize a vector and report if too small
- qh.MINdenom/MINdenom1 are the upper limits for divide overflow
-
- returns:
- normalized vector
- flips sign if !toporient
- if minnorm non-NULL,
- sets ismin if normal < minnorm
-
- notes:
- if zero norm
- sets all elements to sqrt(1.0/dim)
- if divide by zero (divzero ())
- sets largest element to +/-1
- bumps Znearlysingular
-
- design:
- computes norm
- test for minnorm
- if not near zero
- normalizes normal
- else if zero norm
- sets normal to standard value
- else
- uses qh_divzero to normalize
- if nearzero
- sets norm to direction of maximum value
-*/
-void qh_normalize2 (coordT *normal, int dim, boolT toporient,
- realT *minnorm, boolT *ismin) {
- int k;
- realT *colp, *maxp, norm= 0, temp, *norm1, *norm2, *norm3;
- boolT zerodiv;
-
- norm1= normal+1;
- norm2= normal+2;
- norm3= normal+3;
- if (dim == 2)
- norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1));
- else if (dim == 3)
- norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2));
- else if (dim == 4) {
- norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2)
- + (*norm3)*(*norm3));
- }else if (dim > 4) {
- norm= (*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2)
- + (*norm3)*(*norm3);
- for (k= dim-4, colp= normal+4; k--; colp++)
- norm += (*colp) * (*colp);
- norm= sqrt(norm);
- }
- if (minnorm) {
- if (norm < *minnorm)
- *ismin= True;
- else
- *ismin= False;
- }
- wmin_(Wmindenom, norm);
- if (norm > qh MINdenom) {
- if (!toporient)
- norm= -norm;
- *normal /= norm;
- *norm1 /= norm;
- if (dim == 2)
- ; /* all done */
- else if (dim == 3)
- *norm2 /= norm;
- else if (dim == 4) {
- *norm2 /= norm;
- *norm3 /= norm;
- }else if (dim >4) {
- *norm2 /= norm;
- *norm3 /= norm;
- for (k= dim-4, colp= normal+4; k--; )
- *colp++ /= norm;
- }
- }else if (norm == 0.0) {
- temp= sqrt (1.0/dim);
- for (k= dim, colp= normal; k--; )
- *colp++ = temp;
- }else {
- if (!toporient)
- norm= -norm;
- for (k= dim, colp= normal; k--; colp++) { /* k used below */
- temp= qh_divzero (*colp, norm, qh MINdenom_1, &zerodiv);
- if (!zerodiv)
- *colp= temp;
- else {
- maxp= qh_maxabsval(normal, dim);
- temp= ((*maxp * norm >= 0.0) ? 1.0 : -1.0);
- for (k= dim, colp= normal; k--; colp++)
- *colp= 0.0;
- *maxp= temp;
- zzinc_(Znearlysingular);
- trace0((qh ferr, "qh_normalize: norm=%2.2g too small during p%d\n",
- norm, qh furthest_id));
- return;
- }
- }
- }
-} /* normalize */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="projectpoint">-</a>
-
- qh_projectpoint( point, facet, dist )
- project point onto a facet by dist
-
- returns:
- returns a new point
-
- notes:
- if dist= distplane(point,facet)
- this projects point to hyperplane
- assumes qh_memfree_() is valid for normal_size
-*/
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist) {
- pointT *newpoint, *np, *normal;
- int normsize= qh normal_size,k;
- void **freelistp; /* used !qh_NOmem */
-
- qh_memalloc_(normsize, freelistp, newpoint, pointT);
- np= newpoint;
- normal= facet->normal;
- for(k= qh hull_dim; k--; )
- *(np++)= *point++ - dist * *normal++;
- return(newpoint);
-} /* projectpoint */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="setfacetplane">-</a>
-
- qh_setfacetplane( facet )
- sets the hyperplane for a facet
- if qh.RANDOMdist, joggles hyperplane
-
- notes:
- uses global buffers qh.gm_matrix and qh.gm_row
- overwrites facet->normal if already defined
- updates Wnewvertex if PRINTstatistics
- sets facet->upperdelaunay if upper envelope of Delaunay triangulation
-
- design:
- copy vertex coordinates to qh.gm_matrix/gm_row
- compute determinate
- if nearzero
- recompute determinate with gaussian elimination
- if nearzero
- force outside orientation by testing interior point
-*/
-void qh_setfacetplane(facetT *facet) {
- pointT *point;
- vertexT *vertex, **vertexp;
- int k,i, normsize= qh normal_size, oldtrace= 0;
- realT dist;
- void **freelistp; /* used !qh_NOmem */
- coordT *coord, *gmcoord;
- pointT *point0= SETfirstt_(facet->vertices, vertexT)->point;
- boolT nearzero= False;
-
- zzinc_(Zsetplane);
- if (!facet->normal)
- qh_memalloc_(normsize, freelistp, facet->normal, coordT);
- if (facet == qh tracefacet) {
- oldtrace= qh IStracing;
- qh IStracing= 5;
- fprintf (qh ferr, "qh_setfacetplane: facet f%d created.\n", facet->id);
- fprintf (qh ferr, " Last point added to hull was p%d.", qh furthest_id);
- if (zzval_(Ztotmerge))
- fprintf(qh ferr, " Last merge was #%d.", zzval_(Ztotmerge));
- fprintf (qh ferr, "\n\nCurrent summary is:\n");
- qh_printsummary (qh ferr);
- }
- if (qh hull_dim <= 4) {
- i= 0;
- if (qh RANDOMdist) {
- gmcoord= qh gm_matrix;
- FOREACHvertex_(facet->vertices) {
- qh gm_row[i++]= gmcoord;
- coord= vertex->point;
- for (k= qh hull_dim; k--; )
- *(gmcoord++)= *coord++ * qh_randomfactor();
- }
- }else {
- FOREACHvertex_(facet->vertices)
- qh gm_row[i++]= vertex->point;
- }
- qh_sethyperplane_det(qh hull_dim, qh gm_row, point0, facet->toporient,
- facet->normal, &facet->offset, &nearzero);
- }
- if (qh hull_dim > 4 || nearzero) {
- i= 0;
- gmcoord= qh gm_matrix;
- FOREACHvertex_(facet->vertices) {
- if (vertex->point != point0) {
- qh gm_row[i++]= gmcoord;
- coord= vertex->point;
- point= point0;
- for(k= qh hull_dim; k--; )
- *(gmcoord++)= *coord++ - *point++;
- }
- }
- qh gm_row[i]= gmcoord; /* for areasimplex */
- if (qh RANDOMdist) {
- gmcoord= qh gm_matrix;
- for (i= qh hull_dim-1; i--; ) {
- for (k= qh hull_dim; k--; )
- *(gmcoord++) *= qh_randomfactor();
- }
- }
- qh_sethyperplane_gauss(qh hull_dim, qh gm_row, point0, facet->toporient,
- facet->normal, &facet->offset, &nearzero);
- if (nearzero) {
- if (qh_orientoutside (facet)) {
- trace0((qh ferr, "qh_setfacetplane: flipped orientation after testing interior_point during p%d\n", qh furthest_id));
- /* this is part of using Gaussian Elimination. For example in 5-d
- 1 1 1 1 0
- 1 1 1 1 1
- 0 0 0 1 0
- 0 1 0 0 0
- 1 0 0 0 0
- norm= 0.38 0.38 -0.76 0.38 0
- has a determinate of 1, but g.e. after subtracting pt. 0 has
- 0's in the diagonal, even with full pivoting. It does work
- if you subtract pt. 4 instead. */
- }
- }
- }
- facet->upperdelaunay= False;
- if (qh DELAUNAY) {
- if (qh UPPERdelaunay) { /* matches qh_triangulate_facet and qh.lower_threshold in qh_initbuild */
- if (facet->normal[qh hull_dim -1] >= qh ANGLEround * qh_ZEROdelaunay)
- facet->upperdelaunay= True;
- }else {
- if (facet->normal[qh hull_dim -1] > -qh ANGLEround * qh_ZEROdelaunay)
- facet->upperdelaunay= True;
- }
- }
- if (qh PRINTstatistics || qh IStracing || qh TRACElevel || qh JOGGLEmax < REALmax) {
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- FOREACHvertex_(facet->vertices) {
- if (vertex->point != point0) {
- boolT istrace= False;
- zinc_(Zdiststat);
- qh_distplane(vertex->point, facet, &dist);
- dist= fabs_(dist);
- zinc_(Znewvertex);
- wadd_(Wnewvertex, dist);
- if (dist > wwval_(Wnewvertexmax)) {
- wwval_(Wnewvertexmax)= dist;
- if (dist > qh max_outside) {
- qh max_outside= dist; /* used by qh_maxouter() */
- if (dist > qh TRACEdist)
- istrace= True;
- }
- }else if (-dist > qh TRACEdist)
- istrace= True;
- if (istrace) {
- fprintf (qh ferr, "qh_setfacetplane: ====== vertex p%d (v%d) increases max_outside to %2.2g for new facet f%d last p%d\n",
- qh_pointid(vertex->point), vertex->id, dist, facet->id, qh furthest_id);
- qh_errprint ("DISTANT", facet, NULL, NULL, NULL);
- }
- }
- }
- qh RANDOMdist= qh old_randomdist;
- }
- if (qh IStracing >= 3) {
- fprintf (qh ferr, "qh_setfacetplane: f%d offset %2.2g normal: ",
- facet->id, facet->offset);
- for (k=0; k < qh hull_dim; k++)
- fprintf (qh ferr, "%2.2g ", facet->normal[k]);
- fprintf (qh ferr, "\n");
- }
- if (facet == qh tracefacet)
- qh IStracing= oldtrace;
-} /* setfacetplane */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="sethyperplane_det">-</a>
-
- qh_sethyperplane_det( dim, rows, point0, toporient, normal, offset, nearzero )
- given dim X dim array indexed by rows[], one row per point,
- toporient (flips all signs),
- and point0 (any row)
- set normalized hyperplane equation from oriented simplex
-
- returns:
- normal (normalized)
- offset (places point0 on the hyperplane)
- sets nearzero if hyperplane not through points
-
- notes:
- only defined for dim == 2..4
- rows[] is not modified
- solves det(P-V_0, V_n-V_0, ..., V_1-V_0)=0, i.e. every point is on hyperplane
- see Bower & Woodworth, A programmer's geometry, Butterworths 1983.
-
- derivation of 3-d minnorm
- Goal: all vertices V_i within qh.one_merge of hyperplane
- Plan: exactly translate the facet so that V_0 is the origin
- exactly rotate the facet so that V_1 is on the x-axis and y_2=0.
- exactly rotate the effective perturbation to only effect n_0
- this introduces a factor of sqrt(3)
- n_0 = ((y_2-y_0)*(z_1-z_0) - (z_2-z_0)*(y_1-y_0)) / norm
- Let M_d be the max coordinate difference
- Let M_a be the greater of M_d and the max abs. coordinate
- Let u be machine roundoff and distround be max error for distance computation
- The max error for n_0 is sqrt(3) u M_a M_d / norm. n_1 is approx. 1 and n_2 is approx. 0
- The max error for distance of V_1 is sqrt(3) u M_a M_d M_d / norm. Offset=0 at origin
- Then minnorm = 1.8 u M_a M_d M_d / qh.ONEmerge
- Note that qh.one_merge is approx. 45.5 u M_a and norm is usually about M_d M_d
-
- derivation of 4-d minnorm
- same as above except rotate the facet so that V_1 on x-axis and w_2, y_3, w_3=0
- [if two vertices fixed on x-axis, can rotate the other two in yzw.]
- n_0 = det3_(...) = y_2 det2_(z_1, w_1, z_3, w_3) = - y_2 w_1 z_3
- [all other terms contain at least two factors nearly zero.]
- The max error for n_0 is sqrt(4) u M_a M_d M_d / norm
- Then minnorm = 2 u M_a M_d M_d M_d / qh.ONEmerge
- Note that qh.one_merge is approx. 82 u M_a and norm is usually about M_d M_d M_d
-*/
-void qh_sethyperplane_det (int dim, coordT **rows, coordT *point0,
- boolT toporient, coordT *normal, realT *offset, boolT *nearzero) {
- realT maxround, dist;
- int i;
- pointT *point;
-
-
- if (dim == 2) {
- normal[0]= dY(1,0);
- normal[1]= dX(0,1);
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
- *offset= -(point0[0]*normal[0]+point0[1]*normal[1]);
- *nearzero= False; /* since nearzero norm => incident points */
- }else if (dim == 3) {
- normal[0]= det2_(dY(2,0), dZ(2,0),
- dY(1,0), dZ(1,0));
- normal[1]= det2_(dX(1,0), dZ(1,0),
- dX(2,0), dZ(2,0));
- normal[2]= det2_(dX(2,0), dY(2,0),
- dX(1,0), dY(1,0));
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
- *offset= -(point0[0]*normal[0] + point0[1]*normal[1]
- + point0[2]*normal[2]);
- maxround= qh DISTround;
- for (i=dim; i--; ) {
- point= rows[i];
- if (point != point0) {
- dist= *offset + (point[0]*normal[0] + point[1]*normal[1]
- + point[2]*normal[2]);
- if (dist > maxround || dist < -maxround) {
- *nearzero= True;
- break;
- }
- }
- }
- }else if (dim == 4) {
- normal[0]= - det3_(dY(2,0), dZ(2,0), dW(2,0),
- dY(1,0), dZ(1,0), dW(1,0),
- dY(3,0), dZ(3,0), dW(3,0));
- normal[1]= det3_(dX(2,0), dZ(2,0), dW(2,0),
- dX(1,0), dZ(1,0), dW(1,0),
- dX(3,0), dZ(3,0), dW(3,0));
- normal[2]= - det3_(dX(2,0), dY(2,0), dW(2,0),
- dX(1,0), dY(1,0), dW(1,0),
- dX(3,0), dY(3,0), dW(3,0));
- normal[3]= det3_(dX(2,0), dY(2,0), dZ(2,0),
- dX(1,0), dY(1,0), dZ(1,0),
- dX(3,0), dY(3,0), dZ(3,0));
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
- *offset= -(point0[0]*normal[0] + point0[1]*normal[1]
- + point0[2]*normal[2] + point0[3]*normal[3]);
- maxround= qh DISTround;
- for (i=dim; i--; ) {
- point= rows[i];
- if (point != point0) {
- dist= *offset + (point[0]*normal[0] + point[1]*normal[1]
- + point[2]*normal[2] + point[3]*normal[3]);
- if (dist > maxround || dist < -maxround) {
- *nearzero= True;
- break;
- }
- }
- }
- }
- if (*nearzero) {
- zzinc_(Zminnorm);
- trace0((qh ferr, "qh_sethyperplane_det: degenerate norm during p%d.\n", qh furthest_id));
- zzinc_(Znearlysingular);
- }
-} /* sethyperplane_det */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="sethyperplane_gauss">-</a>
-
- qh_sethyperplane_gauss( dim, rows, point0, toporient, normal, offset, nearzero )
- given (dim-1) X dim array of rows[i]= V_{i+1} - V_0 (point0)
- set normalized hyperplane equation from oriented simplex
-
- returns:
- normal (normalized)
- offset (places point0 on the hyperplane)
-
- notes:
- if nearzero
- orientation may be incorrect because of incorrect sign flips in gausselim
- solves [V_n-V_0,...,V_1-V_0, 0 .. 0 1] * N == [0 .. 0 1]
- or [V_n-V_0,...,V_1-V_0, 0 .. 0 1] * N == [0]
- i.e., N is normal to the hyperplane, and the unnormalized
- distance to [0 .. 1] is either 1 or 0
-
- design:
- perform gaussian elimination
- flip sign for negative values
- perform back substitution
- normalize result
- compute offset
-*/
-void qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0,
- boolT toporient, coordT *normal, coordT *offset, boolT *nearzero) {
- coordT *pointcoord, *normalcoef;
- int k;
- boolT sign= toporient, nearzero2= False;
-
- qh_gausselim(rows, dim-1, dim, &sign, nearzero);
- for(k= dim-1; k--; ) {
- if ((rows[k])[k] < 0)
- sign ^= 1;
- }
- if (*nearzero) {
- zzinc_(Znearlysingular);
- trace0((qh ferr, "qh_sethyperplane_gauss: nearly singular or axis parallel hyperplane during p%d.\n", qh furthest_id));
- qh_backnormal(rows, dim-1, dim, sign, normal, &nearzero2);
- }else {
- qh_backnormal(rows, dim-1, dim, sign, normal, &nearzero2);
- if (nearzero2) {
- zzinc_(Znearlysingular);
- trace0((qh ferr, "qh_sethyperplane_gauss: singular or axis parallel hyperplane at normalization during p%d.\n", qh furthest_id));
- }
- }
- if (nearzero2)
- *nearzero= True;
- qh_normalize2(normal, dim, True, NULL, NULL);
- pointcoord= point0;
- normalcoef= normal;
- *offset= -(*pointcoord++ * *normalcoef++);
- for(k= dim-1; k--; )
- *offset -= *pointcoord++ * *normalcoef++;
-} /* sethyperplane_gauss */
-
-
-
diff --git a/extern/qhull/src/geom.h b/extern/qhull/src/geom.h
deleted file mode 100644
index 32440cff56f..00000000000
--- a/extern/qhull/src/geom.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*<html><pre> -<a href="qh-geom.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- geom.h
- header file for geometric routines
-
- see qh-geom.htm and geom.c
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#ifndef qhDEFgeom
-#define qhDEFgeom 1
-
-/* ============ -macros- ======================== */
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fabs_">-</a>
-
- fabs_(a)
- returns the absolute value of a
-*/
-#define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a ))
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fmax_">-</a>
-
- fmax_(a,b)
- returns the maximum value of a and b
-*/
-#define fmax_( a,b ) ( ( a ) < ( b ) ? ( b ) : ( a ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="fmin_">-</a>
-
- fmin_(a,b)
- returns the minimum value of a and b
-*/
-#define fmin_( a,b ) ( ( a ) > ( b ) ? ( b ) : ( a ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="maximize_">-</a>
-
- maximize_(maxval, val)
- set maxval to val if val is greater than maxval
-*/
-#define maximize_( maxval, val ) {if (( maxval ) < ( val )) ( maxval )= ( val );}
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="minimize_">-</a>
-
- minimize_(minval, val)
- set minval to val if val is less than minval
-*/
-#define minimize_( minval, val ) {if (( minval ) > ( val )) ( minval )= ( val );}
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="det2_">-</a>
-
- det2_(a1, a2,
- b1, b2)
-
- compute a 2-d determinate
-*/
-#define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 ))
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="det3_">-</a>
-
- det3_(a1, a2, a3,
- b1, b2, b3,
- c1, c2, c3)
-
- compute a 3-d determinate
-*/
-#define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \
- - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) )
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="dX">-</a>
-
- dX( p1, p2 )
- dY( p1, p2 )
- dZ( p1, p2 )
-
- given two indices into rows[],
-
- compute the difference between X, Y, or Z coordinates
-*/
-#define dX( p1,p2 ) ( *( rows[p1] ) - *( rows[p2] ))
-#define dY( p1,p2 ) ( *( rows[p1]+1 ) - *( rows[p2]+1 ))
-#define dZ( p1,p2 ) ( *( rows[p1]+2 ) - *( rows[p2]+2 ))
-#define dW( p1,p2 ) ( *( rows[p1]+3 ) - *( rows[p2]+3 ))
-
-/*============= prototypes in alphabetical order, infrequent at end ======= */
-
-void qh_backnormal (realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero);
-void qh_distplane (pointT *point, facetT *facet, realT *dist);
-facetT *qh_findbest (pointT *point, facetT *startfacet,
- boolT bestoutside, boolT isnewfacets, boolT noupper,
- realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT *point,
- facetT *startfacet, boolT noupper, realT *bestdist, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet, realT *dist,
- boolT bestoutside, boolT *isoutside, int *numpart);
-void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero);
-realT qh_getangle(pointT *vect1, pointT *vect2);
-pointT *qh_getcenter(setT *vertices);
-pointT *qh_getcentrum(facetT *facet);
-realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
-void qh_normalize (coordT *normal, int dim, boolT toporient);
-void qh_normalize2 (coordT *normal, int dim, boolT toporient,
- realT *minnorm, boolT *ismin);
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
-
-void qh_setfacetplane(facetT *newfacets);
-void qh_sethyperplane_det (int dim, coordT **rows, coordT *point0,
- boolT toporient, coordT *normal, realT *offset, boolT *nearzero);
-void qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0,
- boolT toporient, coordT *normal, coordT *offset, boolT *nearzero);
-boolT qh_sharpnewfacets (void);
-
-/*========= infrequently used code in geom2.c =============*/
-
-
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension);
-void qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]);
-realT qh_determinant (realT **rows, int dim, boolT *nearzero);
-realT qh_detjoggle (pointT *points, int numpoints, int dimension);
-void qh_detroundoff (void);
-realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero);
-realT qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp);
-realT qh_distround (int dimension, realT maxabs, realT maxsumabs);
-realT qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv);
-realT qh_facetarea (facetT *facet);
-realT qh_facetarea_simplex (int dim, coordT *apex, setT *vertices,
- vertexT *notvertex, boolT toporient, coordT *normal, realT *offset);
-pointT *qh_facetcenter (setT *vertices);
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, facetT **facetlist);
-void qh_getarea (facetT *facetlist);
-boolT qh_gram_schmidt(int dim, realT **rows);
-boolT qh_inthresholds (coordT *normal, realT *angle);
-void qh_joggleinput (void);
-realT *qh_maxabsval (realT *normal, int dim);
-setT *qh_maxmin(pointT *points, int numpoints, int dimension);
-realT qh_maxouter (void);
-void qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex);
-realT qh_minabsval (realT *normal, int dim);
-int qh_mindiff (realT *vecA, realT *vecB, int dim);
-boolT qh_orientoutside (facetT *facet);
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-coordT qh_pointdist(pointT *point1, pointT *point2, int dim);
-void qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol);
-void qh_printpoints (FILE *fp, char *string, setT *points);
-void qh_projectinput (void);
-void qh_projectpoints (signed char *project, int n, realT *points,
- int numpoints, int dim, realT *newpoints, int newdim);
-int qh_rand( void);
-void qh_srand( int seed);
-realT qh_randomfactor (void);
-void qh_randommatrix (realT *buffer, int dim, realT **row);
-void qh_rotateinput (realT **rows);
-void qh_rotatepoints (realT *points, int numpoints, int dim, realT **rows);
-void qh_scaleinput (void);
-void qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
- coordT high, coordT newhigh);
-void qh_scalepoints (pointT *points, int numpoints, int dim,
- realT *newlows, realT *newhighs);
-boolT qh_sethalfspace (int dim, coordT *coords, coordT **nextp,
- coordT *normal, coordT *offset, coordT *feasible);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-pointT *qh_voronoi_center (int dim, setT *points);
-
-#endif /* qhDEFgeom */
-
-
-
diff --git a/extern/qhull/src/geom2.c b/extern/qhull/src/geom2.c
deleted file mode 100644
index bd58ce1282b..00000000000
--- a/extern/qhull/src/geom2.c
+++ /dev/null
@@ -1,2160 +0,0 @@
-/*<html><pre> -<a href="qh-geom.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
-
- geom2.c
- infrequently used geometric routines of qhull
-
- see qh-geom.htm and geom.h
-
- copyright (c) 1993-2002 The Geometry Center
-
- frequently used code goes into geom.c
-*/
-
-#include "qhull_a.h"
-
-/*================== functions in alphabetic order ============*/
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="copypoints">-</a>
-
- qh_copypoints( points, numpoints, dimension)
- return malloc'd copy of points
-*/
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension) {
- int size;
- coordT *newpoints;
-
- size= numpoints * dimension * sizeof(coordT);
- if (!(newpoints=(coordT*)malloc(size))) {
- fprintf(qh ferr, "qhull error: insufficient memory to copy %d points\n",
- numpoints);
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- memcpy ((char *)newpoints, (char *)points, size);
- return newpoints;
-} /* copypoints */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="crossproduct">-</a>
-
- qh_crossproduct( dim, vecA, vecB, vecC )
- crossproduct of 2 dim vectors
- C= A x B
-
- notes:
- from Glasner, Graphics Gems I, p. 639
- only defined for dim==3
-*/
-void qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]){
-
- if (dim == 3) {
- vecC[0]= det2_(vecA[1], vecA[2],
- vecB[1], vecB[2]);
- vecC[1]= - det2_(vecA[0], vecA[2],
- vecB[0], vecB[2]);
- vecC[2]= det2_(vecA[0], vecA[1],
- vecB[0], vecB[1]);
- }
-} /* vcross */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="determinant">-</a>
-
- qh_determinant( rows, dim, nearzero )
- compute signed determinant of a square matrix
- uses qh.NEARzero to test for degenerate matrices
-
- returns:
- determinant
- overwrites rows and the matrix
- if dim == 2 or 3
- nearzero iff determinant < qh NEARzero[dim-1]
- (not quite correct, not critical)
- if dim >= 4
- nearzero iff diagonal[k] < qh NEARzero[k]
-*/
-realT qh_determinant (realT **rows, int dim, boolT *nearzero) {
- realT det=0;
- int i;
- boolT sign= False;
-
- *nearzero= False;
- if (dim < 2) {
- fprintf (qh ferr, "qhull internal error (qh_determinate): only implemented for dimension >= 2\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }else if (dim == 2) {
- det= det2_(rows[0][0], rows[0][1],
- rows[1][0], rows[1][1]);
- if (fabs_(det) < qh NEARzero[1]) /* not really correct, what should this be? */
- *nearzero= True;
- }else if (dim == 3) {
- det= det3_(rows[0][0], rows[0][1], rows[0][2],
- rows[1][0], rows[1][1], rows[1][2],
- rows[2][0], rows[2][1], rows[2][2]);
- if (fabs_(det) < qh NEARzero[2]) /* not really correct, what should this be? */
- *nearzero= True;
- }else {
- qh_gausselim(rows, dim, dim, &sign, nearzero); /* if nearzero, diagonal still ok*/
- det= 1.0;
- for (i= dim; i--; )
- det *= (rows[i])[i];
- if (sign)
- det= -det;
- }
- return det;
-} /* determinant */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="detjoggle">-</a>
-
- qh_detjoggle( points, numpoints, dimension )
- determine default max joggle for point array
- as qh_distround * qh_JOGGLEdefault
-
- returns:
- initial value for JOGGLEmax from points and REALepsilon
-
- notes:
- computes DISTround since qh_maxmin not called yet
- if qh SCALElast, last dimension will be scaled later to MAXwidth
-
- loop duplicated from qh_maxmin
-*/
-realT qh_detjoggle (pointT *points, int numpoints, int dimension) {
- realT abscoord, distround, joggle, maxcoord, mincoord;
- pointT *point, *pointtemp;
- realT maxabs= -REALmax;
- realT sumabs= 0;
- realT maxwidth= 0;
- int k;
-
- for (k= 0; k < dimension; k++) {
- if (qh SCALElast && k == dimension-1)
- abscoord= maxwidth;
- else if (qh DELAUNAY && k == dimension-1) /* will qh_setdelaunay() */
- abscoord= 2 * maxabs * maxabs; /* may be low by qh hull_dim/2 */
- else {
- maxcoord= -REALmax;
- mincoord= REALmax;
- FORALLpoint_(points, numpoints) {
- maximize_(maxcoord, point[k]);
- minimize_(mincoord, point[k]);
- }
- maximize_(maxwidth, maxcoord-mincoord);
- abscoord= fmax_(maxcoord, -mincoord);
- }
- sumabs += abscoord;
- maximize_(maxabs, abscoord);
- } /* for k */
- distround= qh_distround (qh hull_dim, maxabs, sumabs);
- joggle= distround * qh_JOGGLEdefault;
- maximize_(joggle, REALepsilon * qh_JOGGLEdefault);
- trace2((qh ferr, "qh_detjoggle: joggle=%2.2g maxwidth=%2.2g\n", joggle, maxwidth));
- return joggle;
-} /* detjoggle */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="detroundoff">-</a>
-
- qh_detroundoff()
- determine maximum roundoff errors from
- REALepsilon, REALmax, REALmin, qh.hull_dim, qh.MAXabs_coord,
- qh.MAXsumcoord, qh.MAXwidth, qh.MINdenom_1
-
- accounts for qh.SETroundoff, qh.RANDOMdist, qh MERGEexact
- qh.premerge_cos, qh.postmerge_cos, qh.premerge_centrum,
- qh.postmerge_centrum, qh.MINoutside,
- qh_RATIOnearinside, qh_COPLANARratio, qh_WIDEcoplanar
-
- returns:
- sets qh.DISTround, etc. (see below)
- appends precision constants to qh.qhull_options
-
- see:
- qh_maxmin() for qh.NEARzero
-
- design:
- determine qh.DISTround for distance computations
- determine minimum denominators for qh_divzero
- determine qh.ANGLEround for angle computations
- adjust qh.premerge_cos,... for roundoff error
- determine qh.ONEmerge for maximum error due to a single merge
- determine qh.NEARinside, qh.MAXcoplanar, qh.MINvisible,
- qh.MINoutside, qh.WIDEfacet
- initialize qh.max_vertex and qh.minvertex
-*/
-void qh_detroundoff (void) {
-
- qh_option ("_max-width", NULL, &qh MAXwidth);
- if (!qh SETroundoff) {
- qh DISTround= qh_distround (qh hull_dim, qh MAXabs_coord, qh MAXsumcoord);
- if (qh RANDOMdist)
- qh DISTround += qh RANDOMfactor * qh MAXabs_coord;
- qh_option ("Error-roundoff", NULL, &qh DISTround);
- }
- qh MINdenom= qh MINdenom_1 * qh MAXabs_coord;
- qh MINdenom_1_2= sqrt (qh MINdenom_1 * qh hull_dim) ; /* if will be normalized */
- qh MINdenom_2= qh MINdenom_1_2 * qh MAXabs_coord;
- /* for inner product */
- qh ANGLEround= 1.01 * qh hull_dim * REALepsilon;
- if (qh RANDOMdist)
- qh ANGLEround += qh RANDOMfactor;
- if (qh premerge_cos < REALmax/2) {
- qh premerge_cos -= qh ANGLEround;
- if (qh RANDOMdist)
- qh_option ("Angle-premerge-with-random", NULL, &qh premerge_cos);
- }
- if (qh postmerge_cos < REALmax/2) {
- qh postmerge_cos -= qh ANGLEround;
- if (qh RANDOMdist)
- qh_option ("Angle-postmerge-with-random", NULL, &qh postmerge_cos);
- }
- qh premerge_centrum += 2 * qh DISTround; /*2 for centrum and distplane()*/
- qh postmerge_centrum += 2 * qh DISTround;
- if (qh RANDOMdist && (qh MERGEexact || qh PREmerge))
- qh_option ("Centrum-premerge-with-random", NULL, &qh premerge_centrum);
- if (qh RANDOMdist && qh POSTmerge)
- qh_option ("Centrum-postmerge-with-random", NULL, &qh postmerge_centrum);
- { /* compute ONEmerge, max vertex offset for merging simplicial facets */
- realT maxangle= 1.0, maxrho;
-
- minimize_(maxangle, qh premerge_cos);
- minimize_(maxangle, qh postmerge_cos);
- /* max diameter * sin theta + DISTround for vertex to its hyperplane */
- qh ONEmerge= sqrt (qh hull_dim) * qh MAXwidth *
- sqrt (1.0 - maxangle * maxangle) + qh DISTround;
- maxrho= qh hull_dim * qh premerge_centrum + qh DISTround;
- maximize_(qh ONEmerge, maxrho);
- maxrho= qh hull_dim * qh postmerge_centrum + qh DISTround;
- maximize_(qh ONEmerge, maxrho);
- if (qh MERGING)
- qh_option ("_one-merge", NULL, &qh ONEmerge);
- }
- qh NEARinside= qh ONEmerge * qh_RATIOnearinside; /* only used if qh KEEPnearinside */
- if (qh JOGGLEmax < REALmax/2 && (qh KEEPcoplanar || qh KEEPinside)) {
- realT maxdist; /* adjust qh.NEARinside for joggle */
- qh KEEPnearinside= True;
- maxdist= sqrt (qh hull_dim) * qh JOGGLEmax + qh DISTround;
- maxdist= 2*maxdist; /* vertex and coplanar point can joggle in opposite directions */
- maximize_(qh NEARinside, maxdist); /* must agree with qh_nearcoplanar() */
- }
- if (qh KEEPnearinside)
- qh_option ("_near-inside", NULL, &qh NEARinside);
- if (qh JOGGLEmax < qh DISTround) {
- fprintf (qh ferr, "qhull error: the joggle for 'QJn', %.2g, is below roundoff for distance computations, %.2g\n",
- qh JOGGLEmax, qh DISTround);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh MINvisible > REALmax/2) {
- if (!qh MERGING)
- qh MINvisible= qh DISTround;
- else if (qh hull_dim <= 3)
- qh MINvisible= qh premerge_centrum;
- else
- qh MINvisible= qh_COPLANARratio * qh premerge_centrum;
- if (qh APPROXhull && qh MINvisible > qh MINoutside)
- qh MINvisible= qh MINoutside;
- qh_option ("Visible-distance", NULL, &qh MINvisible);
- }
- if (qh MAXcoplanar > REALmax/2) {
- qh MAXcoplanar= qh MINvisible;
- qh_option ("U-coplanar-distance", NULL, &qh MAXcoplanar);
- }
- if (!qh APPROXhull) { /* user may specify qh MINoutside */
- qh MINoutside= 2 * qh MINvisible;
- if (qh premerge_cos < REALmax/2)
- maximize_(qh MINoutside, (1- qh premerge_cos) * qh MAXabs_coord);
- qh_option ("Width-outside", NULL, &qh MINoutside);
- }
- qh WIDEfacet= qh MINoutside;
- maximize_(qh WIDEfacet, qh_WIDEcoplanar * qh MAXcoplanar);
- maximize_(qh WIDEfacet, qh_WIDEcoplanar * qh MINvisible);
- qh_option ("_wide-facet", NULL, &qh WIDEfacet);
- if (qh MINvisible > qh MINoutside + 3 * REALepsilon
- && !qh BESToutside && !qh FORCEoutput)
- fprintf (qh ferr, "qhull input warning: minimum visibility V%.2g is greater than \nminimum outside W%.2g. Flipped facets are likely.\n",
- qh MINvisible, qh MINoutside);
- qh max_vertex= qh DISTround;
- qh min_vertex= -qh DISTround;
- /* numeric constants reported in printsummary */
-} /* detroundoff */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="detsimplex">-</a>
-
- qh_detsimplex( apex, points, dim, nearzero )
- compute determinant of a simplex with point apex and base points
-
- returns:
- signed determinant and nearzero from qh_determinant
-
- notes:
- uses qh.gm_matrix/qh.gm_row (assumes they're big enough)
-
- design:
- construct qm_matrix by subtracting apex from points
- compute determinate
-*/
-realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero) {
- pointT *coorda, *coordp, *gmcoord, *point, **pointp;
- coordT **rows;
- int k, i=0;
- realT det;
-
- zinc_(Zdetsimplex);
- gmcoord= qh gm_matrix;
- rows= qh gm_row;
- FOREACHpoint_(points) {
- if (i == dim)
- break;
- rows[i++]= gmcoord;
- coordp= point;
- coorda= apex;
- for (k= dim; k--; )
- *(gmcoord++)= *coordp++ - *coorda++;
- }
- if (i < dim) {
- fprintf (qh ferr, "qhull internal error (qh_detsimplex): #points %d < dimension %d\n",
- i, dim);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- det= qh_determinant (rows, dim, nearzero);
- trace2((qh ferr, "qh_detsimplex: det=%2.2g for point p%d, dim %d, nearzero? %d\n",
- det, qh_pointid(apex), dim, *nearzero));
- return det;
-} /* detsimplex */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="distnorm">-</a>
-
- qh_distnorm( dim, point, normal, offset )
- return distance from point to hyperplane at normal/offset
-
- returns:
- dist
-
- notes:
- dist > 0 if point is outside of hyperplane
-
- see:
- qh_distplane in geom.c
-*/
-realT qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp) {
- coordT *normalp= normal, *coordp= point;
- realT dist;
- int k;
-
- dist= *offsetp;
- for (k= dim; k--; )
- dist += *(coordp++) * *(normalp++);
- return dist;
-} /* distnorm */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="distround">-</a>
-
- qh_distround ( dimension, maxabs, maxsumabs )
- compute maximum round-off error for a distance computation
- to a normalized hyperplane
- maxabs is the maximum absolute value of a coordinate
- maxsumabs is the maximum possible sum of absolute coordinate values
-
- returns:
- max dist round for REALepsilon
-
- notes:
- calculate roundoff error according to
- Lemma 3.2-1 of Golub and van Loan "Matrix Computation"
- use sqrt(dim) since one vector is normalized
- or use maxsumabs since one vector is < 1
-*/
-realT qh_distround (int dimension, realT maxabs, realT maxsumabs) {
- realT maxdistsum, maxround;
-
- maxdistsum= sqrt (dimension) * maxabs;
- minimize_( maxdistsum, maxsumabs);
- maxround= REALepsilon * (dimension * maxdistsum * 1.01 + maxabs);
- /* adds maxabs for offset */
- trace4((qh ferr, "qh_distround: %2.2g maxabs %2.2g maxsumabs %2.2g maxdistsum %2.2g\n",
- maxround, maxabs, maxsumabs, maxdistsum));
- return maxround;
-} /* distround */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="divzero">-</a>
-
- qh_divzero( numer, denom, mindenom1, zerodiv )
- divide by a number that's nearly zero
- mindenom1= minimum denominator for dividing into 1.0
-
- returns:
- quotient
- sets zerodiv and returns 0.0 if it would overflow
-
- design:
- if numer is nearly zero and abs(numer) < abs(denom)
- return numer/denom
- else if numer is nearly zero
- return 0 and zerodiv
- else if denom/numer non-zero
- return numer/denom
- else
- return 0 and zerodiv
-*/
-realT qh_divzero (realT numer, realT denom, realT mindenom1, boolT *zerodiv) {
- realT temp, numerx, denomx;
-
-
- if (numer < mindenom1 && numer > -mindenom1) {
- numerx= fabs_(numer);
- denomx= fabs_(denom);
- if (numerx < denomx) {
- *zerodiv= False;
- return numer/denom;
- }else {
- *zerodiv= True;
- return 0.0;
- }
- }
- temp= denom/numer;
- if (temp > mindenom1 || temp < -mindenom1) {
- *zerodiv= False;
- return numer/denom;
- }else {
- *zerodiv= True;
- return 0.0;
- }
-} /* divzero */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="facetarea">-</a>
-
- qh_facetarea( facet )
- return area for a facet
-
- notes:
- if non-simplicial,
- uses centrum to triangulate facet and sums the projected areas.
- if (qh DELAUNAY),
- computes projected area instead for last coordinate
- assumes facet->normal exists
- projecting tricoplanar facets to the hyperplane does not appear to make a difference
-
- design:
- if simplicial
- compute area
- else
- for each ridge
- compute area from centrum to ridge
- negate area if upper Delaunay facet
-*/
-realT qh_facetarea (facetT *facet) {
- vertexT *apex;
- pointT *centrum;
- realT area= 0.0;
- ridgeT *ridge, **ridgep;
-
- if (facet->simplicial) {
- apex= SETfirstt_(facet->vertices, vertexT);
- area= qh_facetarea_simplex (qh hull_dim, apex->point, facet->vertices,
- apex, facet->toporient, facet->normal, &facet->offset);
- }else {
- if (qh CENTERtype == qh_AScentrum)
- centrum= facet->center;
- else
- centrum= qh_getcentrum (facet);
- FOREACHridge_(facet->ridges)
- area += qh_facetarea_simplex (qh hull_dim, centrum, ridge->vertices,
- NULL, (ridge->top == facet), facet->normal, &facet->offset);
- if (qh CENTERtype != qh_AScentrum)
- qh_memfree (centrum, qh normal_size);
- }
- if (facet->upperdelaunay && qh DELAUNAY)
- area= -area; /* the normal should be [0,...,1] */
- trace4((qh ferr, "qh_facetarea: f%d area %2.2g\n", facet->id, area));
- return area;
-} /* facetarea */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="facetarea_simplex">-</a>
-
- qh_facetarea_simplex( dim, apex, vertices, notvertex, toporient, normal, offset )
- return area for a simplex defined by
- an apex, a base of vertices, an orientation, and a unit normal
- if simplicial or tricoplanar facet,
- notvertex is defined and it is skipped in vertices
-
- returns:
- computes area of simplex projected to plane [normal,offset]
- returns 0 if vertex too far below plane (qh WIDEfacet)
- vertex can't be apex of tricoplanar facet
-
- notes:
- if (qh DELAUNAY),
- computes projected area instead for last coordinate
- uses qh gm_matrix/gm_row and qh hull_dim
- helper function for qh_facetarea
-
- design:
- if Notvertex
- translate simplex to apex
- else
- project simplex to normal/offset
- translate simplex to apex
- if Delaunay
- set last row/column to 0 with -1 on diagonal
- else
- set last row to Normal
- compute determinate
- scale and flip sign for area
-*/
-realT qh_facetarea_simplex (int dim, coordT *apex, setT *vertices,
- vertexT *notvertex, boolT toporient, coordT *normal, realT *offset) {
- pointT *coorda, *coordp, *gmcoord;
- coordT **rows, *normalp;
- int k, i=0;
- realT area, dist;
- vertexT *vertex, **vertexp;
- boolT nearzero;
-
- gmcoord= qh gm_matrix;
- rows= qh gm_row;
- FOREACHvertex_(vertices) {
- if (vertex == notvertex)
- continue;
- rows[i++]= gmcoord;
- coorda= apex;
- coordp= vertex->point;
- normalp= normal;
- if (notvertex) {
- for (k= dim; k--; )
- *(gmcoord++)= *coordp++ - *coorda++;
- }else {
- dist= *offset;
- for (k= dim; k--; )
- dist += *coordp++ * *normalp++;
- if (dist < -qh WIDEfacet) {
- zinc_(Znoarea);
- return 0.0;
- }
- coordp= vertex->point;
- normalp= normal;
- for (k= dim; k--; )
- *(gmcoord++)= (*coordp++ - dist * *normalp++) - *coorda++;
- }
- }
- if (i != dim-1) {
- fprintf (qh ferr, "qhull internal error (qh_facetarea_simplex): #points %d != dim %d -1\n",
- i, dim);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- rows[i]= gmcoord;
- if (qh DELAUNAY) {
- for (i= 0; i < dim-1; i++)
- rows[i][dim-1]= 0.0;
- for (k= dim; k--; )
- *(gmcoord++)= 0.0;
- rows[dim-1][dim-1]= -1.0;
- }else {
- normalp= normal;
- for (k= dim; k--; )
- *(gmcoord++)= *normalp++;
- }
- zinc_(Zdetsimplex);
- area= qh_determinant (rows, dim, &nearzero);
- if (toporient)
- area= -area;
- area *= qh AREAfactor;
- trace4((qh ferr, "qh_facetarea_simplex: area=%2.2g for point p%d, toporient %d, nearzero? %d\n",
- area, qh_pointid(apex), toporient, nearzero));
- return area;
-} /* facetarea_simplex */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="facetcenter">-</a>
-
- qh_facetcenter( vertices )
- return Voronoi center (Voronoi vertex) for a facet's vertices
-
- returns:
- return temporary point equal to the center
-
- see:
- qh_voronoi_center()
-*/
-pointT *qh_facetcenter (setT *vertices) {
- setT *points= qh_settemp (qh_setsize (vertices));
- vertexT *vertex, **vertexp;
- pointT *center;
-
- FOREACHvertex_(vertices)
- qh_setappend (&points, vertex->point);
- center= qh_voronoi_center (qh hull_dim-1, points);
- qh_settempfree (&points);
- return center;
-} /* facetcenter */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="findgooddist">-</a>
-
- qh_findgooddist( point, facetA, dist, facetlist )
- find best good facet visible for point from facetA
- assumes facetA is visible from point
-
- returns:
- best facet, i.e., good facet that is furthest from point
- distance to best facet
- NULL if none
-
- moves good, visible facets (and some other visible facets)
- to end of qh facet_list
-
- notes:
- uses qh visit_id
-
- design:
- initialize bestfacet if facetA is good
- move facetA to end of facetlist
- for each facet on facetlist
- for each unvisited neighbor of facet
- move visible neighbors to end of facetlist
- update best good neighbor
- if no good neighbors, update best facet
-*/
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp,
- facetT **facetlist) {
- realT bestdist= -REALmax, dist;
- facetT *neighbor, **neighborp, *bestfacet=NULL, *facet;
- boolT goodseen= False;
-
- if (facetA->good) {
- zinc_(Zcheckpart); /* calls from check_bestdist occur after print stats */
- qh_distplane (point, facetA, &bestdist);
- bestfacet= facetA;
- goodseen= True;
- }
- qh_removefacet (facetA);
- qh_appendfacet (facetA);
- *facetlist= facetA;
- facetA->visitid= ++qh visit_id;
- FORALLfacet_(*facetlist) {
- FOREACHneighbor_(facet) {
- if (neighbor->visitid == qh visit_id)
- continue;
- neighbor->visitid= qh visit_id;
- if (goodseen && !neighbor->good)
- continue;
- zinc_(Zcheckpart);
- qh_distplane (point, neighbor, &dist);
- if (dist > 0) {
- qh_removefacet (neighbor);
- qh_appendfacet (neighbor);
- if (neighbor->good) {
- goodseen= True;
- if (dist > bestdist) {
- bestdist= dist;
- bestfacet= neighbor;
- }
- }
- }
- }
- }
- if (bestfacet) {
- *distp= bestdist;
- trace2((qh ferr, "qh_findgooddist: p%d is %2.2g above good facet f%d\n",
- qh_pointid(point), bestdist, bestfacet->id));
- return bestfacet;
- }
- trace4((qh ferr, "qh_findgooddist: no good facet for p%d above f%d\n",
- qh_pointid(point), facetA->id));
- return NULL;
-} /* findgooddist */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="getarea">-</a>
-
- qh_getarea( facetlist )
- set area of all facets in facetlist
- collect statistics
-
- returns:
- sets qh totarea/totvol to total area and volume of convex hull
- for Delaunay triangulation, computes projected area of the lower or upper hull
- ignores upper hull if qh ATinfinity
-
- notes:
- could compute outer volume by expanding facet area by rays from interior
- the following attempt at perpendicular projection underestimated badly:
- qh.totoutvol += (-dist + facet->maxoutside + qh DISTround)
- * area/ qh hull_dim;
- design:
- for each facet on facetlist
- compute facet->area
- update qh.totarea and qh.totvol
-*/
-void qh_getarea (facetT *facetlist) {
- realT area;
- realT dist;
- facetT *facet;
-
- if (qh REPORTfreq)
- fprintf (qh ferr, "computing area of each facet and volume of the convex hull\n");
- else
- trace1((qh ferr, "qh_getarea: computing volume and area for each facet\n"));
- qh totarea= qh totvol= 0.0;
- FORALLfacet_(facetlist) {
- if (!facet->normal)
- continue;
- if (facet->upperdelaunay && qh ATinfinity)
- continue;
- facet->f.area= area= qh_facetarea (facet);
- facet->isarea= True;
- if (qh DELAUNAY) {
- if (facet->upperdelaunay == qh UPPERdelaunay)
- qh totarea += area;
- }else {
- qh totarea += area;
- qh_distplane (qh interior_point, facet, &dist);
- qh totvol += -dist * area/ qh hull_dim;
- }
- if (qh PRINTstatistics) {
- wadd_(Wareatot, area);
- wmax_(Wareamax, area);
- wmin_(Wareamin, area);
- }
- }
-} /* getarea */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="gram_schmidt">-</a>
-
- qh_gram_schmidt( dim, row )
- implements Gram-Schmidt orthogonalization by rows
-
- returns:
- false if zero norm
- overwrites rows[dim][dim]
-
- notes:
- see Golub & van Loan Algorithm 6.2-2
- overflow due to small divisors not handled
-
- design:
- for each row
- compute norm for row
- if non-zero, normalize row
- for each remaining rowA
- compute inner product of row and rowA
- reduce rowA by row * inner product
-*/
-boolT qh_gram_schmidt(int dim, realT **row) {
- realT *rowi, *rowj, norm;
- int i, j, k;
-
- for(i=0; i < dim; i++) {
- rowi= row[i];
- for (norm= 0.0, k= dim; k--; rowi++)
- norm += *rowi * *rowi;
- norm= sqrt(norm);
- wmin_(Wmindenom, norm);
- if (norm == 0.0) /* either 0 or overflow due to sqrt */
- return False;
- for(k= dim; k--; )
- *(--rowi) /= norm;
- for(j= i+1; j < dim; j++) {
- rowj= row[j];
- for(norm= 0.0, k=dim; k--; )
- norm += *rowi++ * *rowj++;
- for(k=dim; k--; )
- *(--rowj) -= *(--rowi) * norm;
- }
- }
- return True;
-} /* gram_schmidt */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="inthresholds">-</a>
-
- qh_inthresholds( normal, angle )
- return True if normal within qh.lower_/upper_threshold
-
- returns:
- estimate of angle by summing of threshold diffs
- angle may be NULL
- smaller "angle" is better
-
- notes:
- invalid if qh.SPLITthresholds
-
- see:
- qh.lower_threshold in qh_initbuild()
- qh_initthresholds()
-
- design:
- for each dimension
- test threshold
-*/
-boolT qh_inthresholds (coordT *normal, realT *angle) {
- boolT within= True;
- int k;
- realT threshold;
-
- if (angle)
- *angle= 0.0;
- for(k= 0; k < qh hull_dim; k++) {
- threshold= qh lower_threshold[k];
- if (threshold > -REALmax/2) {
- if (normal[k] < threshold)
- within= False;
- if (angle) {
- threshold -= normal[k];
- *angle += fabs_(threshold);
- }
- }
- if (qh upper_threshold[k] < REALmax/2) {
- threshold= qh upper_threshold[k];
- if (normal[k] > threshold)
- within= False;
- if (angle) {
- threshold -= normal[k];
- *angle += fabs_(threshold);
- }
- }
- }
- return within;
-} /* inthresholds */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="joggleinput">-</a>
-
- qh_joggleinput()
- randomly joggle input to Qhull by qh.JOGGLEmax
- initial input is qh.first_point/qh.num_points of qh.hull_dim
- repeated calls use qh.input_points/qh.num_points
-
- returns:
- joggles points at qh.first_point/qh.num_points
- copies data to qh.input_points/qh.input_malloc if first time
- determines qh.JOGGLEmax if it was zero
- if qh.DELAUNAY
- computes the Delaunay projection of the joggled points
-
- notes:
- if qh.DELAUNAY, unnecessarily joggles the last coordinate
- the initial 'QJn' may be set larger than qh_JOGGLEmaxincrease
-
- design:
- if qh.DELAUNAY
- set qh.SCALElast for reduced precision errors
- if first call
- initialize qh.input_points to the original input points
- if qh.JOGGLEmax == 0
- determine default qh.JOGGLEmax
- else
- increase qh.JOGGLEmax according to qh.build_cnt
- joggle the input by adding a random number in [-qh.JOGGLEmax,qh.JOGGLEmax]
- if qh.DELAUNAY
- sets the Delaunay projection
-*/
-void qh_joggleinput (void) {
- int size, i, seed;
- coordT *coordp, *inputp;
- realT randr, randa, randb;
-
- if (!qh input_points) { /* first call */
- qh input_points= qh first_point;
- qh input_malloc= qh POINTSmalloc;
- size= qh num_points * qh hull_dim * sizeof(coordT);
- if (!(qh first_point=(coordT*)malloc(size))) {
- fprintf(qh ferr, "qhull error: insufficient memory to joggle %d points\n",
- qh num_points);
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- qh POINTSmalloc= True;
- if (qh JOGGLEmax == 0.0) {
- qh JOGGLEmax= qh_detjoggle (qh input_points, qh num_points, qh hull_dim);
- qh_option ("QJoggle", NULL, &qh JOGGLEmax);
- }
- }else { /* repeated call */
- if (!qh RERUN && qh build_cnt > qh_JOGGLEretry) {
- if (((qh build_cnt-qh_JOGGLEretry-1) % qh_JOGGLEagain) == 0) {
- realT maxjoggle= qh MAXwidth * qh_JOGGLEmaxincrease;
- if (qh JOGGLEmax < maxjoggle) {
- qh JOGGLEmax *= qh_JOGGLEincrease;
- minimize_(qh JOGGLEmax, maxjoggle);
- }
- }
- }
- qh_option ("QJoggle", NULL, &qh JOGGLEmax);
- }
- if (qh build_cnt > 1 && qh JOGGLEmax > fmax_(qh MAXwidth/4, 0.1)) {
- fprintf (qh ferr, "qhull error: the current joggle for 'QJn', %.2g, is too large for the width\nof the input. If possible, recompile Qhull with higher-precision reals.\n",
- qh JOGGLEmax);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- /* for some reason, using qh ROTATErandom and qh_RANDOMseed does not repeat the run. Use 'TRn' instead */
- seed= qh_RANDOMint;
- qh_option ("_joggle-seed", &seed, NULL);
- trace0((qh ferr, "qh_joggleinput: joggle input by %2.2g with seed %d\n",
- qh JOGGLEmax, seed));
- inputp= qh input_points;
- coordp= qh first_point;
- randa= 2.0 * qh JOGGLEmax/qh_RANDOMmax;
- randb= -qh JOGGLEmax;
- size= qh num_points * qh hull_dim;
- for (i= size; i--; ) {
- randr= qh_RANDOMint;
- *(coordp++)= *(inputp++) + (randr * randa + randb);
- }
- if (qh DELAUNAY) {
- qh last_low= qh last_high= qh last_newhigh= REALmax;
- qh_setdelaunay (qh hull_dim, qh num_points, qh first_point);
- }
-} /* joggleinput */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="maxabsval">-</a>
-
- qh_maxabsval( normal, dim )
- return pointer to maximum absolute value of a dim vector
- returns NULL if dim=0
-*/
-realT *qh_maxabsval (realT *normal, int dim) {
- realT maxval= -REALmax;
- realT *maxp= NULL, *colp, absval;
- int k;
-
- for (k= dim, colp= normal; k--; colp++) {
- absval= fabs_(*colp);
- if (absval > maxval) {
- maxval= absval;
- maxp= colp;
- }
- }
- return maxp;
-} /* maxabsval */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="maxmin">-</a>
-
- qh_maxmin( points, numpoints, dimension )
- return max/min points for each dimension
- determine max and min coordinates
-
- returns:
- returns a temporary set of max and min points
- may include duplicate points. Does not include qh.GOODpoint
- sets qh.NEARzero, qh.MAXabs_coord, qh.MAXsumcoord, qh.MAXwidth
- qh.MAXlastcoord, qh.MINlastcoord
- initializes qh.max_outside, qh.min_vertex, qh.WAScoplanar, qh.ZEROall_ok
-
- notes:
- loop duplicated in qh_detjoggle()
-
- design:
- initialize global precision variables
- checks definition of REAL...
- for each dimension
- for each point
- collect maximum and minimum point
- collect maximum of maximums and minimum of minimums
- determine qh.NEARzero for Gaussian Elimination
-*/
-setT *qh_maxmin(pointT *points, int numpoints, int dimension) {
- int k;
- realT maxcoord, temp;
- pointT *minimum, *maximum, *point, *pointtemp;
- setT *set;
-
- qh max_outside= 0.0;
- qh MAXabs_coord= 0.0;
- qh MAXwidth= -REALmax;
- qh MAXsumcoord= 0.0;
- qh min_vertex= 0.0;
- qh WAScoplanar= False;
- if (qh ZEROcentrum)
- qh ZEROall_ok= True;
- if (REALmin < REALepsilon && REALmin < REALmax && REALmin > -REALmax
- && REALmax > 0.0 && -REALmax < 0.0)
- ; /* all ok */
- else {
- fprintf (qh ferr, "qhull error: floating point constants in user.h are wrong\n\
-REALepsilon %g REALmin %g REALmax %g -REALmax %g\n",
- REALepsilon, REALmin, REALmax, -REALmax);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- set= qh_settemp(2*dimension);
- for(k= 0; k < dimension; k++) {
- if (points == qh GOODpointp)
- minimum= maximum= points + dimension;
- else
- minimum= maximum= points;
- FORALLpoint_(points, numpoints) {
- if (point == qh GOODpointp)
- continue;
- if (maximum[k] < point[k])
- maximum= point;
- else if (minimum[k] > point[k])
- minimum= point;
- }
- if (k == dimension-1) {
- qh MINlastcoord= minimum[k];
- qh MAXlastcoord= maximum[k];
- }
- if (qh SCALElast && k == dimension-1)
- maxcoord= qh MAXwidth;
- else {
- maxcoord= fmax_(maximum[k], -minimum[k]);
- if (qh GOODpointp) {
- temp= fmax_(qh GOODpointp[k], -qh GOODpointp[k]);
- maximize_(maxcoord, temp);
- }
- temp= maximum[k] - minimum[k];
- maximize_(qh MAXwidth, temp);
- }
- maximize_(qh MAXabs_coord, maxcoord);
- qh MAXsumcoord += maxcoord;
- qh_setappend (&set, maximum);
- qh_setappend (&set, minimum);
- /* calculation of qh NEARzero is based on error formula 4.4-13 of
- Golub & van Loan, authors say n^3 can be ignored and 10 be used in
- place of rho */
- qh NEARzero[k]= 80 * qh MAXsumcoord * REALepsilon;
- }
- if (qh IStracing >=1)
- qh_printpoints (qh ferr, "qh_maxmin: found the max and min points (by dim):", set);
- return(set);
-} /* maxmin */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="maxouter">-</a>
-
- qh_maxouter()
- return maximum distance from facet to outer plane
- normally this is qh.max_outside+qh.DISTround
- does not include qh.JOGGLEmax
-
- see:
- qh_outerinner()
-
- notes:
- need to add another qh.DISTround if testing actual point with computation
-
- for joggle:
- qh_setfacetplane() updated qh.max_outer for Wnewvertexmax (max distance to vertex)
- need to use Wnewvertexmax since could have a coplanar point for a high
- facet that is replaced by a low facet
- need to add qh.JOGGLEmax if testing input points
-*/
-realT qh_maxouter (void) {
- realT dist;
-
- dist= fmax_(qh max_outside, qh DISTround);
- dist += qh DISTround;
- trace4((qh ferr, "qh_maxouter: max distance from facet to outer plane is %2.2g max_outside is %2.2g\n", dist, qh max_outside));
- return dist;
-} /* maxouter */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="maxsimplex">-</a>
-
- qh_maxsimplex( dim, maxpoints, points, numpoints, simplex )
- determines maximum simplex for a set of points
- starts from points already in simplex
- skips qh.GOODpointp (assumes that it isn't in maxpoints)
-
- returns:
- simplex with dim+1 points
-
- notes:
- assumes at least pointsneeded points in points
- maximizes determinate for x,y,z,w, etc.
- uses maxpoints as long as determinate is clearly non-zero
-
- design:
- initialize simplex with at least two points
- (find points with max or min x coordinate)
- for each remaining dimension
- add point that maximizes the determinate
- (use points from maxpoints first)
-*/
-void qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex) {
- pointT *point, **pointp, *pointtemp, *maxpoint, *minx=NULL, *maxx=NULL;
- boolT nearzero, maxnearzero= False;
- int k, sizinit;
- realT maxdet= -REALmax, det, mincoord= REALmax, maxcoord= -REALmax;
-
- sizinit= qh_setsize (*simplex);
- if (sizinit < 2) {
- if (qh_setsize (maxpoints) >= 2) {
- FOREACHpoint_(maxpoints) {
- if (maxcoord < point[0]) {
- maxcoord= point[0];
- maxx= point;
- }
- if (mincoord > point[0]) {
- mincoord= point[0];
- minx= point;
- }
- }
- }else {
- FORALLpoint_(points, numpoints) {
- if (point == qh GOODpointp)
- continue;
- if (maxcoord < point[0]) {
- maxcoord= point[0];
- maxx= point;
- }
- if (mincoord > point[0]) {
- mincoord= point[0];
- minx= point;
- }
- }
- }
- qh_setunique (simplex, minx);
- if (qh_setsize (*simplex) < 2)
- qh_setunique (simplex, maxx);
- sizinit= qh_setsize (*simplex);
- if (sizinit < 2) {
- qh_precision ("input has same x coordinate");
- if (zzval_(Zsetplane) > qh hull_dim+1) {
- fprintf (qh ferr, "qhull precision error (qh_maxsimplex for voronoi_center):\n%d points with the same x coordinate.\n",
- qh_setsize(maxpoints)+numpoints);
- qh_errexit (qh_ERRprec, NULL, NULL);
- }else {
- fprintf (qh ferr, "qhull input error: input is less than %d-dimensional since it has the same x coordinate\n", qh hull_dim);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- }
- }
- for(k= sizinit; k < dim+1; k++) {
- maxpoint= NULL;
- maxdet= -REALmax;
- FOREACHpoint_(maxpoints) {
- if (!qh_setin (*simplex, point)) {
- det= qh_detsimplex(point, *simplex, k, &nearzero);
- if ((det= fabs_(det)) > maxdet) {
- maxdet= det;
- maxpoint= point;
- maxnearzero= nearzero;
- }
- }
- }
- if (!maxpoint || maxnearzero) {
- zinc_(Zsearchpoints);
- if (!maxpoint) {
- trace0((qh ferr, "qh_maxsimplex: searching all points for %d-th initial vertex.\n", k+1));
- }else {
- trace0((qh ferr, "qh_maxsimplex: searching all points for %d-th initial vertex, better than p%d det %2.2g\n",
- k+1, qh_pointid(maxpoint), maxdet));
- }
- FORALLpoint_(points, numpoints) {
- if (point == qh GOODpointp)
- continue;
- if (!qh_setin (*simplex, point)) {
- det= qh_detsimplex(point, *simplex, k, &nearzero);
- if ((det= fabs_(det)) > maxdet) {
- maxdet= det;
- maxpoint= point;
- maxnearzero= nearzero;
- }
- }
- }
- } /* !maxpoint */
- if (!maxpoint) {
- fprintf (qh ferr, "qhull internal error (qh_maxsimplex): not enough points available\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh_setappend(simplex, maxpoint);
- trace1((qh ferr, "qh_maxsimplex: selected point p%d for %d`th initial vertex, det=%2.2g\n",
- qh_pointid(maxpoint), k+1, maxdet));
- } /* k */
-} /* maxsimplex */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="minabsval">-</a>
-
- qh_minabsval( normal, dim )
- return minimum absolute value of a dim vector
-*/
-realT qh_minabsval (realT *normal, int dim) {
- realT minval= 0;
- realT maxval= 0;
- realT *colp;
- int k;
-
- for (k= dim, colp= normal; k--; colp++) {
- maximize_(maxval, *colp);
- minimize_(minval, *colp);
- }
- return fmax_(maxval, -minval);
-} /* minabsval */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="mindiff">-</a>
-
- qh_mindif( vecA, vecB, dim )
- return index of min abs. difference of two vectors
-*/
-int qh_mindiff (realT *vecA, realT *vecB, int dim) {
- realT mindiff= REALmax, diff;
- realT *vecAp= vecA, *vecBp= vecB;
- int k, mink= 0;
-
- for (k= 0; k < dim; k++) {
- diff= *vecAp++ - *vecBp++;
- diff= fabs_(diff);
- if (diff < mindiff) {
- mindiff= diff;
- mink= k;
- }
- }
- return mink;
-} /* mindiff */
-
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="orientoutside">-</a>
-
- qh_orientoutside( facet )
- make facet outside oriented via qh.interior_point
-
- returns:
- True if facet reversed orientation.
-*/
-boolT qh_orientoutside (facetT *facet) {
- int k;
- realT dist;
-
- qh_distplane (qh interior_point, facet, &dist);
- if (dist > 0) {
- for (k= qh hull_dim; k--; )
- facet->normal[k]= -facet->normal[k];
- facet->offset= -facet->offset;
- return True;
- }
- return False;
-} /* orientoutside */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="outerinner">-</a>
-
- qh_outerinner( facet, outerplane, innerplane )
- if facet and qh.maxoutdone (i.e., qh_check_maxout)
- returns outer and inner plane for facet
- else
- returns maximum outer and inner plane
- accounts for qh.JOGGLEmax
-
- see:
- qh_maxouter(), qh_check_bestdist(), qh_check_points()
-
- notes:
- outerplaner or innerplane may be NULL
-
- includes qh.DISTround for actual points
- adds another qh.DISTround if testing with floating point arithmetic
-*/
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane) {
- realT dist, mindist;
- vertexT *vertex, **vertexp;
-
- if (outerplane) {
- if (!qh_MAXoutside || !facet || !qh maxoutdone) {
- *outerplane= qh_maxouter(); /* includes qh.DISTround */
- }else { /* qh_MAXoutside ... */
-#if qh_MAXoutside
- *outerplane= facet->maxoutside + qh DISTround;
-#endif
-
- }
- if (qh JOGGLEmax < REALmax/2)
- *outerplane += qh JOGGLEmax * sqrt (qh hull_dim);
- }
- if (innerplane) {
- if (facet) {
- mindist= REALmax;
- FOREACHvertex_(facet->vertices) {
- zinc_(Zdistio);
- qh_distplane (vertex->point, facet, &dist);
- minimize_(mindist, dist);
- }
- *innerplane= mindist - qh DISTround;
- }else
- *innerplane= qh min_vertex - qh DISTround;
- if (qh JOGGLEmax < REALmax/2)
- *innerplane -= qh JOGGLEmax * sqrt (qh hull_dim);
- }
-} /* outerinner */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="pointdist">-</a>
-
- qh_pointdist( point1, point2, dim )
- return distance between two points
-
- notes:
- returns distance squared if 'dim' is negative
-*/
-coordT qh_pointdist(pointT *point1, pointT *point2, int dim) {
- coordT dist, diff;
- int k;
-
- dist= 0.0;
- for (k= (dim > 0 ? dim : -dim); k--; ) {
- diff= *point1++ - *point2++;
- dist += diff * diff;
- }
- if (dim > 0)
- return(sqrt(dist));
- return dist;
-} /* pointdist */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="printmatrix">-</a>
-
- qh_printmatrix( fp, string, rows, numrow, numcol )
- print matrix to fp given by row vectors
- print string as header
-
- notes:
- print a vector by qh_printmatrix(fp, "", &vect, 1, len)
-*/
-void qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol) {
- realT *rowp;
- realT r; /*bug fix*/
- int i,k;
-
- fprintf (fp, "%s\n", string);
- for (i= 0; i < numrow; i++) {
- rowp= rows[i];
- for (k= 0; k < numcol; k++) {
- r= *rowp++;
- fprintf (fp, "%6.3g ", r);
- }
- fprintf (fp, "\n");
- }
-} /* printmatrix */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="printpoints">-</a>
-
- qh_printpoints( fp, string, points )
- print pointids to fp for a set of points
- if string, prints string and 'p' point ids
-*/
-void qh_printpoints (FILE *fp, char *string, setT *points) {
- pointT *point, **pointp;
-
- if (string) {
- fprintf (fp, "%s", string);
- FOREACHpoint_(points)
- fprintf (fp, " p%d", qh_pointid(point));
- fprintf (fp, "\n");
- }else {
- FOREACHpoint_(points)
- fprintf (fp, " %d", qh_pointid(point));
- fprintf (fp, "\n");
- }
-} /* printpoints */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="projectinput">-</a>
-
- qh_projectinput()
- project input points using qh.lower_bound/upper_bound and qh DELAUNAY
- if qh.lower_bound[k]=qh.upper_bound[k]= 0,
- removes dimension k
- if halfspace intersection
- removes dimension k from qh.feasible_point
- input points in qh first_point, num_points, input_dim
-
- returns:
- new point array in qh first_point of qh hull_dim coordinates
- sets qh POINTSmalloc
- if qh DELAUNAY
- projects points to paraboloid
- lowbound/highbound is also projected
- if qh ATinfinity
- adds point "at-infinity"
- if qh POINTSmalloc
- frees old point array
-
- notes:
- checks that qh.hull_dim agrees with qh.input_dim, PROJECTinput, and DELAUNAY
-
-
- design:
- sets project[k] to -1 (delete), 0 (keep), 1 (add for Delaunay)
- determines newdim and newnum for qh hull_dim and qh num_points
- projects points to newpoints
- projects qh.lower_bound to itself
- projects qh.upper_bound to itself
- if qh DELAUNAY
- if qh ATINFINITY
- projects points to paraboloid
- computes "infinity" point as vertex average and 10% above all points
- else
- uses qh_setdelaunay to project points to paraboloid
-*/
-void qh_projectinput (void) {
- int k,i;
- int newdim= qh input_dim, newnum= qh num_points;
- signed char *project;
- int size= (qh input_dim+1)*sizeof(*project);
- pointT *newpoints, *coord, *infinity;
- realT paraboloid, maxboloid= 0;
-
- project= (signed char*)qh_memalloc (size);
- memset ((char*)project, 0, size);
- for (k= 0; k < qh input_dim; k++) { /* skip Delaunay bound */
- if (qh lower_bound[k] == 0 && qh upper_bound[k] == 0) {
- project[k]= -1;
- newdim--;
- }
- }
- if (qh DELAUNAY) {
- project[k]= 1;
- newdim++;
- if (qh ATinfinity)
- newnum++;
- }
- if (newdim != qh hull_dim) {
- fprintf(qh ferr, "qhull internal error (qh_projectinput): dimension after projection %d != hull_dim %d\n", newdim, qh hull_dim);
- qh_errexit(qh_ERRqhull, NULL, NULL);
- }
- if (!(newpoints=(coordT*)malloc(newnum*newdim*sizeof(coordT)))){
- fprintf(qh ferr, "qhull error: insufficient memory to project %d points\n",
- qh num_points);
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- qh_projectpoints (project, qh input_dim+1, qh first_point,
- qh num_points, qh input_dim, newpoints, newdim);
- trace1((qh ferr, "qh_projectinput: updating lower and upper_bound\n"));
- qh_projectpoints (project, qh input_dim+1, qh lower_bound,
- 1, qh input_dim+1, qh lower_bound, newdim+1);
- qh_projectpoints (project, qh input_dim+1, qh upper_bound,
- 1, qh input_dim+1, qh upper_bound, newdim+1);
- if (qh HALFspace) {
- if (!qh feasible_point) {
- fprintf(qh ferr, "qhull internal error (qh_projectinput): HALFspace defined without qh.feasible_point\n");
- qh_errexit(qh_ERRqhull, NULL, NULL);
- }
- qh_projectpoints (project, qh input_dim, qh feasible_point,
- 1, qh input_dim, qh feasible_point, newdim);
- }
- qh_memfree(project, ((qh input_dim+1)*sizeof(*project)));
- if (qh POINTSmalloc)
- free (qh first_point);
- qh first_point= newpoints;
- qh POINTSmalloc= True;
- if (qh DELAUNAY && qh ATinfinity) {
- coord= qh first_point;
- infinity= qh first_point + qh hull_dim * qh num_points;
- for (k=qh hull_dim-1; k--; )
- infinity[k]= 0.0;
- for (i=qh num_points; i--; ) {
- paraboloid= 0.0;
- for (k=qh hull_dim-1; k--; ) {
- paraboloid += *coord * *coord;
- infinity[k] += *coord;
- coord++;
- }
- *(coord++)= paraboloid;
- maximize_(maxboloid, paraboloid);
- }
- /* coord == infinity */
- for (k=qh hull_dim-1; k--; )
- *(coord++) /= qh num_points;
- *(coord++)= maxboloid * 1.1;
- qh num_points++;
- trace0((qh ferr, "qh_projectinput: projected points to paraboloid for Delaunay\n"));
- }else if (qh DELAUNAY) /* !qh ATinfinity */
- qh_setdelaunay( qh hull_dim, qh num_points, qh first_point);
-} /* projectinput */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="projectpoints">-</a>
-
- qh_projectpoints( project, n, points, numpoints, dim, newpoints, newdim )
- project points/numpoints/dim to newpoints/newdim
- if project[k] == -1
- delete dimension k
- if project[k] == 1
- add dimension k by duplicating previous column
- n is size of project
-
- notes:
- newpoints may be points if only adding dimension at end
-
- design:
- check that 'project' and 'newdim' agree
- for each dimension
- if project == -1
- skip dimension
- else
- determine start of column in newpoints
- determine start of column in points
- if project == +1, duplicate previous column
- copy dimension (column) from points to newpoints
-*/
-void qh_projectpoints (signed char *project, int n, realT *points,
- int numpoints, int dim, realT *newpoints, int newdim) {
- int testdim= dim, oldk=0, newk=0, i,j=0,k;
- realT *newp, *oldp;
-
- for (k= 0; k < n; k++)
- testdim += project[k];
- if (testdim != newdim) {
- fprintf (qh ferr, "qhull internal error (qh_projectpoints): newdim %d should be %d after projection\n",
- newdim, testdim);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- for (j= 0; j<n; j++) {
- if (project[j] == -1)
- oldk++;
- else {
- newp= newpoints+newk++;
- if (project[j] == +1) {
- if (oldk >= dim)
- continue;
- oldp= points+oldk;
- }else
- oldp= points+oldk++;
- for (i=numpoints; i--; ) {
- *newp= *oldp;
- newp += newdim;
- oldp += dim;
- }
- }
- if (oldk >= dim)
- break;
- }
- trace1((qh ferr, "qh_projectpoints: projected %d points from dim %d to dim %d\n",
- numpoints, dim, newdim));
-} /* projectpoints */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="rand">-</a>
-
- qh_rand()
- qh_srand( seed )
- generate pseudo-random number between 1 and 2^31 -2
-
- notes:
- from Park & Miller's minimimal standard random number generator
- Communications of the ACM, 31:1192-1201, 1988.
- does not use 0 or 2^31 -1
- this is silently enforced by qh_srand()
- can make 'Rn' much faster by moving qh_rand to qh_distplane
-*/
-int qh_rand_seed= 1; /* define as global variable instead of using qh */
-
-int qh_rand( void) {
-#define qh_rand_a 16807
-#define qh_rand_m 2147483647
-#define qh_rand_q 127773 /* m div a */
-#define qh_rand_r 2836 /* m mod a */
- int lo, hi, test;
- int seed = qh_rand_seed;
-
- hi = seed / qh_rand_q; /* seed div q */
- lo = seed % qh_rand_q; /* seed mod q */
- test = qh_rand_a * lo - qh_rand_r * hi;
- if (test > 0)
- seed= test;
- else
- seed= test + qh_rand_m;
- qh_rand_seed= seed;
- /* seed = seed < qh_RANDOMmax/2 ? 0 : qh_RANDOMmax; for testing */
- /* seed = qh_RANDOMmax; for testing */
- return seed;
-} /* rand */
-
-void qh_srand( int seed) {
- if (seed < 1)
- qh_rand_seed= 1;
- else if (seed >= qh_rand_m)
- qh_rand_seed= qh_rand_m - 1;
- else
- qh_rand_seed= seed;
-} /* qh_srand */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="randomfactor">-</a>
-
- qh_randomfactor()
- return a random factor within qh.RANDOMmax of 1.0
-
- notes:
- qh.RANDOMa/b are defined in global.c
-*/
-realT qh_randomfactor (void) {
- realT randr;
-
- randr= qh_RANDOMint;
- return randr * qh RANDOMa + qh RANDOMb;
-} /* randomfactor */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="randommatrix">-</a>
-
- qh_randommatrix( buffer, dim, rows )
- generate a random dim X dim matrix in range [-1,1]
- assumes buffer is [dim+1, dim]
-
- returns:
- sets buffer to random numbers
- sets rows to rows of buffer
- sets row[dim] as scratch row
-*/
-void qh_randommatrix (realT *buffer, int dim, realT **rows) {
- int i, k;
- realT **rowi, *coord, realr;
-
- coord= buffer;
- rowi= rows;
- for (i=0; i < dim; i++) {
- *(rowi++)= coord;
- for (k=0; k < dim; k++) {
- realr= qh_RANDOMint;
- *(coord++)= 2.0 * realr/(qh_RANDOMmax+1) - 1.0;
- }
- }
- *rowi= coord;
-} /* randommatrix */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="rotateinput">-</a>
-
- qh_rotateinput( rows )
- rotate input using row matrix
- input points given by qh first_point, num_points, hull_dim
- assumes rows[dim] is a scratch buffer
- if qh POINTSmalloc, overwrites input points, else mallocs a new array
-
- returns:
- rotated input
- sets qh POINTSmalloc
-
- design:
- see qh_rotatepoints
-*/
-void qh_rotateinput (realT **rows) {
-
- if (!qh POINTSmalloc) {
- qh first_point= qh_copypoints (qh first_point, qh num_points, qh hull_dim);
- qh POINTSmalloc= True;
- }
- qh_rotatepoints (qh first_point, qh num_points, qh hull_dim, rows);
-} /* rotateinput */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="rotatepoints">-</a>
-
- qh_rotatepoints( points, numpoints, dim, row )
- rotate numpoints points by a d-dim row matrix
- assumes rows[dim] is a scratch buffer
-
- returns:
- rotated points in place
-
- design:
- for each point
- for each coordinate
- use row[dim] to compute partial inner product
- for each coordinate
- rotate by partial inner product
-*/
-void qh_rotatepoints (realT *points, int numpoints, int dim, realT **row) {
- realT *point, *rowi, *coord= NULL, sum, *newval;
- int i,j,k;
-
- if (qh IStracing >= 1)
- qh_printmatrix (qh ferr, "qh_rotatepoints: rotate points by", row, dim, dim);
- for (point= points, j= numpoints; j--; point += dim) {
- newval= row[dim];
- for (i= 0; i < dim; i++) {
- rowi= row[i];
- coord= point;
- for (sum= 0.0, k= dim; k--; )
- sum += *rowi++ * *coord++;
- *(newval++)= sum;
- }
- for (k= dim; k--; )
- *(--coord)= *(--newval);
- }
-} /* rotatepoints */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="scaleinput">-</a>
-
- qh_scaleinput()
- scale input points using qh low_bound/high_bound
- input points given by qh first_point, num_points, hull_dim
- if qh POINTSmalloc, overwrites input points, else mallocs a new array
-
- returns:
- scales coordinates of points to low_bound[k], high_bound[k]
- sets qh POINTSmalloc
-
- design:
- see qh_scalepoints
-*/
-void qh_scaleinput (void) {
-
- if (!qh POINTSmalloc) {
- qh first_point= qh_copypoints (qh first_point, qh num_points, qh hull_dim);
- qh POINTSmalloc= True;
- }
- qh_scalepoints (qh first_point, qh num_points, qh hull_dim,
- qh lower_bound, qh upper_bound);
-} /* scaleinput */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="scalelast">-</a>
-
- qh_scalelast( points, numpoints, dim, low, high, newhigh )
- scale last coordinate to [0,m] for Delaunay triangulations
- input points given by points, numpoints, dim
-
- returns:
- changes scale of last coordinate from [low, high] to [0, newhigh]
- overwrites last coordinate of each point
- saves low/high/newhigh in qh.last_low, etc. for qh_setdelaunay()
-
- notes:
- when called by qh_setdelaunay, low/high may not match actual data
-
- design:
- compute scale and shift factors
- apply to last coordinate of each point
-*/
-void qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
- coordT high, coordT newhigh) {
- realT scale, shift;
- coordT *coord;
- int i;
- boolT nearzero= False;
-
- trace4((qh ferr, "qh_scalelast: scale last coordinate from [%2.2g, %2.2g] to [0,%2.2g]\n",
- low, high, newhigh));
- qh last_low= low;
- qh last_high= high;
- qh last_newhigh= newhigh;
- scale= qh_divzero (newhigh, high - low,
- qh MINdenom_1, &nearzero);
- if (nearzero) {
- if (qh DELAUNAY)
- fprintf (qh ferr, "qhull input error: can not scale last coordinate. Input is cocircular\n or cospherical. Use option 'Qz' to add a point at infinity.\n");
- else
- fprintf (qh ferr, "qhull input error: can not scale last coordinate. New bounds [0, %2.2g] are too wide for\nexisting bounds [%2.2g, %2.2g] (width %2.2g)\n",
- newhigh, low, high, high-low);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- shift= - low * newhigh / (high-low);
- coord= points + dim - 1;
- for (i= numpoints; i--; coord += dim)
- *coord= *coord * scale + shift;
-} /* scalelast */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="scalepoints">-</a>
-
- qh_scalepoints( points, numpoints, dim, newlows, newhighs )
- scale points to new lowbound and highbound
- retains old bound when newlow= -REALmax or newhigh= +REALmax
-
- returns:
- scaled points
- overwrites old points
-
- design:
- for each coordinate
- compute current low and high bound
- compute scale and shift factors
- scale all points
- enforce new low and high bound for all points
-*/
-void qh_scalepoints (pointT *points, int numpoints, int dim,
- realT *newlows, realT *newhighs) {
- int i,k;
- realT shift, scale, *coord, low, high, newlow, newhigh, mincoord, maxcoord;
- boolT nearzero= False;
-
- for (k= 0; k < dim; k++) {
- newhigh= newhighs[k];
- newlow= newlows[k];
- if (newhigh > REALmax/2 && newlow < -REALmax/2)
- continue;
- low= REALmax;
- high= -REALmax;
- for (i= numpoints, coord= points+k; i--; coord += dim) {
- minimize_(low, *coord);
- maximize_(high, *coord);
- }
- if (newhigh > REALmax/2)
- newhigh= high;
- if (newlow < -REALmax/2)
- newlow= low;
- if (qh DELAUNAY && k == dim-1 && newhigh < newlow) {
- fprintf (qh ferr, "qhull input error: 'Qb%d' or 'QB%d' inverts paraboloid since high bound %.2g < low bound %.2g\n",
- k, k, newhigh, newlow);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- scale= qh_divzero (newhigh - newlow, high - low,
- qh MINdenom_1, &nearzero);
- if (nearzero) {
- fprintf (qh ferr, "qhull input error: %d'th dimension's new bounds [%2.2g, %2.2g] too wide for\nexisting bounds [%2.2g, %2.2g]\n",
- k, newlow, newhigh, low, high);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- shift= (newlow * high - low * newhigh)/(high-low);
- coord= points+k;
- for (i= numpoints; i--; coord += dim)
- *coord= *coord * scale + shift;
- coord= points+k;
- if (newlow < newhigh) {
- mincoord= newlow;
- maxcoord= newhigh;
- }else {
- mincoord= newhigh;
- maxcoord= newlow;
- }
- for (i= numpoints; i--; coord += dim) {
- minimize_(*coord, maxcoord); /* because of roundoff error */
- maximize_(*coord, mincoord);
- }
- trace0((qh ferr, "qh_scalepoints: scaled %d'th coordinate [%2.2g, %2.2g] to [%.2g, %.2g] for %d points by %2.2g and shifted %2.2g\n",
- k, low, high, newlow, newhigh, numpoints, scale, shift));
- }
-} /* scalepoints */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="setdelaunay">-</a>
-
- qh_setdelaunay( dim, count, points )
- project count points to dim-d paraboloid for Delaunay triangulation
-
- dim is one more than the dimension of the input set
- assumes dim is at least 3 (i.e., at least a 2-d Delaunay triangulation)
-
- points is a dim*count realT array. The first dim-1 coordinates
- are the coordinates of the first input point. array[dim] is
- the first coordinate of the second input point. array[2*dim] is
- the first coordinate of the third input point.
-
- if qh.last_low defined (i.e., 'Qbb' called qh_scalelast)
- calls qh_scalelast to scale the last coordinate the same as the other points
-
- returns:
- for each point
- sets point[dim-1] to sum of squares of coordinates
- scale points to 'Qbb' if needed
-
- notes:
- to project one point, use
- qh_setdelaunay (qh hull_dim, 1, point)
-
- Do not use options 'Qbk', 'QBk', or 'QbB' since they scale
- the coordinates after the original projection.
-
-*/
-void qh_setdelaunay (int dim, int count, pointT *points) {
- int i, k;
- coordT *coordp, coord;
- realT paraboloid;
-
- trace0((qh ferr, "qh_setdelaunay: project %d points to paraboloid for Delaunay triangulation\n", count));
- coordp= points;
- for (i= 0; i < count; i++) {
- coord= *coordp++;
- paraboloid= coord*coord;
- for (k= dim-2; k--; ) {
- coord= *coordp++;
- paraboloid += coord*coord;
- }
- *coordp++ = paraboloid;
- }
- if (qh last_low < REALmax/2)
- qh_scalelast (points, count, dim, qh last_low, qh last_high, qh last_newhigh);
-} /* setdelaunay */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="sethalfspace">-</a>
-
- qh_sethalfspace( dim, coords, nextp, normal, offset, feasible )
- set point to dual of halfspace relative to feasible point
- halfspace is normal coefficients and offset.
-
- returns:
- false if feasible point is outside of hull (error message already reported)
- overwrites coordinates for point at dim coords
- nextp= next point (coords)
-
- design:
- compute distance from feasible point to halfspace
- divide each normal coefficient by -dist
-*/
-boolT qh_sethalfspace (int dim, coordT *coords, coordT **nextp,
- coordT *normal, coordT *offset, coordT *feasible) {
- coordT *normp= normal, *feasiblep= feasible, *coordp= coords;
- realT dist;
- realT r; /*bug fix*/
- int k;
- boolT zerodiv;
-
- dist= *offset;
- for (k= dim; k--; )
- dist += *(normp++) * *(feasiblep++);
- if (dist > 0)
- goto LABELerroroutside;
- normp= normal;
- if (dist < -qh MINdenom) {
- for (k= dim; k--; )
- *(coordp++)= *(normp++) / -dist;
- }else {
- for (k= dim; k--; ) {
- *(coordp++)= qh_divzero (*(normp++), -dist, qh MINdenom_1, &zerodiv);
- if (zerodiv)
- goto LABELerroroutside;
- }
- }
- *nextp= coordp;
- if (qh IStracing >= 4) {
- fprintf (qh ferr, "qh_sethalfspace: halfspace at offset %6.2g to point: ", *offset);
- for (k= dim, coordp= coords; k--; ) {
- r= *coordp++;
- fprintf (qh ferr, " %6.2g", r);
- }
- fprintf (qh ferr, "\n");
- }
- return True;
-LABELerroroutside:
- feasiblep= feasible;
- normp= normal;
- fprintf(qh ferr, "qhull input error: feasible point is not clearly inside halfspace\nfeasible point: ");
- for (k= dim; k--; )
- fprintf (qh ferr, qh_REAL_1, r=*(feasiblep++));
- fprintf (qh ferr, "\n halfspace: ");
- for (k= dim; k--; )
- fprintf (qh ferr, qh_REAL_1, r=*(normp++));
- fprintf (qh ferr, "\n at offset: ");
- fprintf (qh ferr, qh_REAL_1, *offset);
- fprintf (qh ferr, " and distance: ");
- fprintf (qh ferr, qh_REAL_1, dist);
- fprintf (qh ferr, "\n");
- return False;
-} /* sethalfspace */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="sethalfspace_all">-</a>
-
- qh_sethalfspace_all( dim, count, halfspaces, feasible )
- generate dual for halfspace intersection with feasible point
- array of count halfspaces
- each halfspace is normal coefficients followed by offset
- the origin is inside the halfspace if the offset is negative
-
- returns:
- malloc'd array of count X dim-1 points
-
- notes:
- call before qh_init_B or qh_initqhull_globals
- unused/untested code: please email bradb@shore.net if this works ok for you
- If using option 'Fp', also set qh feasible_point. It is a malloc'd array
- that is freed by qh_freebuffers.
-
- design:
- see qh_sethalfspace
-*/
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible) {
- int i, newdim;
- pointT *newpoints;
- coordT *coordp, *normalp, *offsetp;
-
- trace0((qh ferr, "qh_sethalfspace_all: compute dual for halfspace intersection\n"));
- newdim= dim - 1;
- if (!(newpoints=(coordT*)malloc(count*newdim*sizeof(coordT)))){
- fprintf(qh ferr, "qhull error: insufficient memory to compute dual of %d halfspaces\n",
- count);
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- coordp= newpoints;
- normalp= halfspaces;
- for (i= 0; i < count; i++) {
- offsetp= normalp + newdim;
- if (!qh_sethalfspace (newdim, coordp, &coordp, normalp, offsetp, feasible)) {
- fprintf (qh ferr, "The halfspace was at index %d\n", i);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- normalp= offsetp + 1;
- }
- return newpoints;
-} /* sethalfspace_all */
-
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="sharpnewfacets">-</a>
-
- qh_sharpnewfacets()
-
- returns:
- true if could be an acute angle (facets in different quadrants)
-
- notes:
- for qh_findbest
-
- design:
- for all facets on qh.newfacet_list
- if two facets are in different quadrants
- set issharp
-*/
-boolT qh_sharpnewfacets () {
- facetT *facet;
- boolT issharp = False;
- int *quadrant, k;
-
- quadrant= (int*)qh_memalloc (qh hull_dim * sizeof(int));
- FORALLfacet_(qh newfacet_list) {
- if (facet == qh newfacet_list) {
- for (k= qh hull_dim; k--; )
- quadrant[ k]= (facet->normal[ k] > 0);
- }else {
- for (k= qh hull_dim; k--; ) {
- if (quadrant[ k] != (facet->normal[ k] > 0)) {
- issharp= True;
- break;
- }
- }
- }
- if (issharp)
- break;
- }
- qh_memfree( quadrant, qh hull_dim * sizeof(int));
- trace3((qh ferr, "qh_sharpnewfacets: %d\n", issharp));
- return issharp;
-} /* sharpnewfacets */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="voronoi_center">-</a>
-
- qh_voronoi_center( dim, points )
- return Voronoi center for a set of points
- dim is the orginal dimension of the points
- gh.gm_matrix/qh.gm_row are scratch buffers
-
- returns:
- center as a temporary point
- if non-simplicial,
- returns center for max simplex of points
-
- notes:
- from Bowyer & Woodwark, A Programmer's Geometry, 1983, p. 65
-
- design:
- if non-simplicial
- determine max simplex for points
- translate point0 of simplex to origin
- compute sum of squares of diagonal
- compute determinate
- compute Voronoi center (see Bowyer & Woodwark)
-*/
-pointT *qh_voronoi_center (int dim, setT *points) {
- pointT *point, **pointp, *point0;
- pointT *center= (pointT*)qh_memalloc (qh center_size);
- setT *simplex;
- int i, j, k, size= qh_setsize(points);
- coordT *gmcoord;
- realT *diffp, sum2, *sum2row, *sum2p, det, factor;
- boolT nearzero, infinite;
-
- if (size == dim+1)
- simplex= points;
- else if (size < dim+1) {
- fprintf (qh ferr, "qhull internal error (qh_voronoi_center):\n need at least %d points to construct a Voronoi center\n",
- dim+1);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }else {
- simplex= qh_settemp (dim+1);
- qh_maxsimplex (dim, points, NULL, 0, &simplex);
- }
- point0= SETfirstt_(simplex, pointT);
- gmcoord= qh gm_matrix;
- for (k=0; k < dim; k++) {
- qh gm_row[k]= gmcoord;
- FOREACHpoint_(simplex) {
- if (point != point0)
- *(gmcoord++)= point[k] - point0[k];
- }
- }
- sum2row= gmcoord;
- for (i=0; i < dim; i++) {
- sum2= 0.0;
- for (k= 0; k < dim; k++) {
- diffp= qh gm_row[k] + i;
- sum2 += *diffp * *diffp;
- }
- *(gmcoord++)= sum2;
- }
- det= qh_determinant (qh gm_row, dim, &nearzero);
- factor= qh_divzero (0.5, det, qh MINdenom, &infinite);
- if (infinite) {
- for (k=dim; k--; )
- center[k]= qh_INFINITE;
- if (qh IStracing)
- qh_printpoints (qh ferr, "qh_voronoi_center: at infinity for ", simplex);
- }else {
- for (i=0; i < dim; i++) {
- gmcoord= qh gm_matrix;
- sum2p= sum2row;
- for (k=0; k < dim; k++) {
- qh gm_row[k]= gmcoord;
- if (k == i) {
- for (j= dim; j--; )
- *(gmcoord++)= *sum2p++;
- }else {
- FOREACHpoint_(simplex) {
- if (point != point0)
- *(gmcoord++)= point[k] - point0[k];
- }
- }
- }
- center[i]= qh_determinant (qh gm_row, dim, &nearzero)*factor + point0[i];
- }
-#ifndef qh_NOtrace
- if (qh IStracing >= 3) {
- fprintf (qh ferr, "qh_voronoi_center: det %2.2g factor %2.2g ", det, factor);
- qh_printmatrix (qh ferr, "center:", &center, 1, dim);
- if (qh IStracing >= 5) {
- qh_printpoints (qh ferr, "points", simplex);
- FOREACHpoint_(simplex)
- fprintf (qh ferr, "p%d dist %.2g, ", qh_pointid (point),
- qh_pointdist (point, center, dim));
- fprintf (qh ferr, "\n");
- }
- }
-#endif
- }
- if (simplex != points)
- qh_settempfree (&simplex);
- return center;
-} /* voronoi_center */
-
diff --git a/extern/qhull/src/global.c b/extern/qhull/src/global.c
deleted file mode 100644
index d3e141aa985..00000000000
--- a/extern/qhull/src/global.c
+++ /dev/null
@@ -1,2018 +0,0 @@
-/*<html><pre> -<a href="qh-globa.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- global.c
- initializes all the globals of the qhull application
-
- see README
-
- see qhull.h for qh.globals and function prototypes
-
- see qhull_a.h for internal functions
-
- copyright (c) 1993-2002, The Geometry Center
- */
-
-#include "qhull_a.h"
-
-/*========= qh definition =======================*/
-
-#if qh_QHpointer
-qhT *qh_qh= NULL; /* pointer to all global variables */
-#else
-qhT qh_qh; /* all global variables.
- Add "= {0}" if this causes a compiler error.
- Also qh_qhstat in stat.c and qhmem in mem.c. */
-#endif
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="appendprint">-</a>
-
- qh_appendprint( printFormat )
- append printFormat to qh.PRINTout unless already defined
-*/
-void qh_appendprint (qh_PRINT format) {
- int i;
-
- for (i=0; i < qh_PRINTEND; i++) {
- if (qh PRINTout[i] == format && format != qh_PRINTqhull)
- break;
- if (!qh PRINTout[i]) {
- qh PRINTout[i]= format;
- break;
- }
- }
-} /* appendprint */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="checkflags">-</a>
-
- qh_checkflags( commandStr, hiddenFlags )
- errors if commandStr contains hiddenFlags
- hiddenFlags starts and ends with a space and is space deliminated (checked)
-
- notes:
- ignores first word (e.g., "qconvex i")
- use qh_strtol/strtod since strtol/strtod may or may not skip trailing spaces
-
- see:
- qh_initflags() initializes Qhull according to commandStr
-*/
-void qh_checkflags(char *command, char *hiddenflags) {
- char *s= command, *t, *chkerr, key, opt, prevopt;
- char chkkey[]= " ";
- char chkopt[]= " ";
- char chkopt2[]= " ";
-
- if (*hiddenflags != ' ' || hiddenflags[strlen(hiddenflags)-1] != ' ') {
- fprintf(qh ferr, "qhull error (qh_checkflags): hiddenflags must start and end with a space: \"%s\"", hiddenflags);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (strpbrk(hiddenflags, ",\n\r\t")) {
- fprintf(qh ferr, "qhull error (qh_checkflags): hiddenflags contains commas, newlines, or tabs: \"%s\"", hiddenflags);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- while (*s && !isspace(*s)) /* skip program name */
- s++;
- while (*s) {
- while (*s && isspace(*s))
- s++;
- if (*s == '-')
- s++;
- if (!*s)
- break;
- key = *s++;
- chkerr = NULL;
- if (key == '\'') { /* TO 'file name' */
- t= strchr(s, '\'');
- if (!t) {
- fprintf(qh ferr, "qhull error (qh_checkflags): missing the 2nd single-quote for:\n%s\n", s-1);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- s= t+1;
- continue;
- }
- chkkey[1]= key;
- if (strstr(hiddenflags, chkkey)) {
- chkerr= chkkey;
- }else if (isupper(key)) {
- opt= ' ';
- prevopt= ' ';
- chkopt[1]= key;
- chkopt2[1]= key;
- while (!chkerr && *s && !isspace(*s)) {
- opt= *s++;
- if (isalpha(opt)) {
- chkopt[2]= opt;
- if (strstr(hiddenflags, chkopt))
- chkerr= chkopt;
- if (prevopt != ' ') {
- chkopt2[2]= prevopt;
- chkopt2[3]= opt;
- if (strstr(hiddenflags, chkopt2))
- chkerr= chkopt2;
- }
- }else if (key == 'Q' && isdigit(opt) && prevopt != 'b'
- && (prevopt == ' ' || islower(prevopt))) {
- chkopt[2]= opt;
- if (strstr(hiddenflags, chkopt))
- chkerr= chkopt;
- }else {
- qh_strtod (s-1, &t);
- if (s < t)
- s= t;
- }
- prevopt= opt;
- }
- }
- if (chkerr) {
- *chkerr= '\'';
- chkerr[strlen(chkerr)-1]= '\'';
- fprintf(qh ferr, "qhull error: option %s is not used with this program.\n It may be used with qhull.\n", chkerr);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- }
-} /* checkflags */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="clock">-</a>
-
- qh_clock()
- return user CPU time in 100ths (qh_SECtick)
- only defined for qh_CLOCKtype == 2
-
- notes:
- use first value to determine time 0
- from Stevens '92 8.15
-*/
-unsigned long qh_clock (void) {
-
-#if (qh_CLOCKtype == 2)
- struct tms time;
- static long clktck; /* initialized first call */
- double ratio, cpu;
- unsigned long ticks;
-
- if (!clktck) {
- if ((clktck= sysconf (_SC_CLK_TCK)) < 0) {
- fprintf (qh ferr, "qhull internal error (qh_clock): sysconf() failed. Use qh_CLOCKtype 1 in user.h\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- }
- if (times (&time) == -1) {
- fprintf (qh ferr, "qhull internal error (qh_clock): times() failed. Use qh_CLOCKtype 1 in user.h\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- ratio= qh_SECticks / (double)clktck;
- ticks= time.tms_utime * ratio;
- return ticks;
-#else
- fprintf (qh ferr, "qhull internal error (qh_clock): use qh_CLOCKtype 2 in user.h\n");
- qh_errexit (qh_ERRqhull, NULL, NULL); /* never returns */
- return 0;
-#endif
-} /* clock */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="freebuffers">-</a>
-
- qh_freebuffers()
- free up global memory buffers
-
- notes:
- must match qh_initbuffers()
-*/
-void qh_freebuffers (void) {
-
- trace5((qh ferr, "qh_freebuffers: freeing up global memory buffers\n"));
- /* allocated by qh_initqhull_buffers */
- qh_memfree (qh NEARzero, qh hull_dim * sizeof(realT));
- qh_memfree (qh lower_threshold, (qh input_dim+1) * sizeof(realT));
- qh_memfree (qh upper_threshold, (qh input_dim+1) * sizeof(realT));
- qh_memfree (qh lower_bound, (qh input_dim+1) * sizeof(realT));
- qh_memfree (qh upper_bound, (qh input_dim+1) * sizeof(realT));
- qh_memfree (qh gm_matrix, (qh hull_dim+1) * qh hull_dim * sizeof(coordT));
- qh_memfree (qh gm_row, (qh hull_dim+1) * sizeof(coordT *));
- qh NEARzero= qh lower_threshold= qh upper_threshold= NULL;
- qh lower_bound= qh upper_bound= NULL;
- qh gm_matrix= NULL;
- qh gm_row= NULL;
- qh_setfree (&qh other_points);
- qh_setfree (&qh del_vertices);
- qh_setfree (&qh coplanarset);
- if (qh line) /* allocated by qh_readinput, freed if no error */
- free (qh line);
- if (qh half_space)
- free (qh half_space);
- if (qh temp_malloc)
- free (qh temp_malloc);
- if (qh feasible_point) /* allocated by qh_readfeasible */
- free (qh feasible_point);
- if (qh feasible_string) /* allocated by qh_initflags */
- free (qh feasible_string);
- qh line= qh feasible_string= NULL;
- qh half_space= qh feasible_point= qh temp_malloc= NULL;
- /* usually allocated by qh_readinput */
- if (qh first_point && qh POINTSmalloc) {
- free(qh first_point);
- qh first_point= NULL;
- }
- if (qh input_points && qh input_malloc) { /* set by qh_joggleinput */
- free (qh input_points);
- qh input_points= NULL;
- }
- trace5((qh ferr, "qh_freebuffers: finished\n"));
-} /* freebuffers */
-
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="freebuild">-</a>
-
- qh_freebuild( allmem )
- free global memory used by qh_initbuild and qh_buildhull
- if !allmem,
- does not free short memory (freed by qh_memfreeshort)
-
- design:
- free centrums
- free each vertex
- mark unattached ridges
- for each facet
- free ridges
- free outside set, coplanar set, neighbor set, ridge set, vertex set
- free facet
- free hash table
- free interior point
- free merge set
- free temporary sets
-*/
-void qh_freebuild (boolT allmem) {
- facetT *facet;
- vertexT *vertex;
- ridgeT *ridge, **ridgep;
- mergeT *merge, **mergep;
-
- trace1((qh ferr, "qh_freebuild: free memory from qh_inithull and qh_buildhull\n"));
- if (qh del_vertices)
- qh_settruncate (qh del_vertices, 0);
- if (allmem) {
- qh_clearcenters (qh_ASnone);
- while ((vertex= qh vertex_list)) {
- if (vertex->next)
- qh_delvertex (vertex);
- else {
- qh_memfree (vertex, sizeof(vertexT));
- qh newvertex_list= qh vertex_list= NULL;
- }
- }
- }else if (qh VERTEXneighbors) {
- FORALLvertices
- qh_setfreelong (&(vertex->neighbors));
- }
- qh VERTEXneighbors= False;
- qh GOODclosest= NULL;
- if (allmem) {
- FORALLfacets {
- FOREACHridge_(facet->ridges)
- ridge->seen= False;
- }
- FORALLfacets {
- if (facet->visible) {
- FOREACHridge_(facet->ridges) {
- if (!otherfacet_(ridge, facet)->visible)
- ridge->seen= True; /* an unattached ridge */
- }
- }
- }
- while ((facet= qh facet_list)) {
- FOREACHridge_(facet->ridges) {
- if (ridge->seen) {
- qh_setfree(&(ridge->vertices));
- qh_memfree(ridge, sizeof(ridgeT));
- }else
- ridge->seen= True;
- }
- qh_setfree (&(facet->outsideset));
- qh_setfree (&(facet->coplanarset));
- qh_setfree (&(facet->neighbors));
- qh_setfree (&(facet->ridges));
- qh_setfree (&(facet->vertices));
- if (facet->next)
- qh_delfacet (facet);
- else {
- qh_memfree (facet, sizeof(facetT));
- qh visible_list= qh newfacet_list= qh facet_list= NULL;
- }
- }
- }else {
- FORALLfacets {
- qh_setfreelong (&(facet->outsideset));
- qh_setfreelong (&(facet->coplanarset));
- if (!facet->simplicial) {
- qh_setfreelong (&(facet->neighbors));
- qh_setfreelong (&(facet->ridges));
- qh_setfreelong (&(facet->vertices));
- }
- }
- }
- qh_setfree (&(qh hash_table));
- qh_memfree (qh interior_point, qh normal_size);
- qh interior_point= NULL;
- FOREACHmerge_(qh facet_mergeset) /* usually empty */
- qh_memfree (merge, sizeof(mergeT));
- qh facet_mergeset= NULL; /* temp set */
- qh degen_mergeset= NULL; /* temp set */
- qh_settempfree_all();
-} /* freebuild */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="freeqhull">-</a>
-
- qh_freeqhull( allmem )
- free global memory
- if !allmem,
- does not free short memory (freed by qh_memfreeshort)
-
- notes:
- sets qh.NOerrexit in case caller forgets to
-
- design:
- free global and temporary memory from qh_initbuild and qh_buildhull
- free buffers
- free statistics
-*/
-void qh_freeqhull (boolT allmem) {
-
- trace1((qh ferr, "qh_freeqhull: free global memory\n"));
- qh NOerrexit= True; /* no more setjmp since called at exit */
- qh_freebuild (allmem);
- qh_freebuffers();
- qh_freestatistics();
-#if qh_QHpointer
- free (qh_qh);
- qh_qh= NULL;
-#else
- memset((char *)&qh_qh, 0, sizeof(qhT));
- qh NOerrexit= True;
-#endif
-} /* freeqhull */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="init_A">-</a>
-
- qh_init_A( infile, outfile, errfile, argc, argv )
- initialize memory and stdio files
- convert input options to option string (qh.qhull_command)
-
- notes:
- infile may be NULL if qh_readpoints() is not called
-
- errfile should always be defined. It is used for reporting
- errors. outfile is used for output and format options.
-
- argc/argv may be 0/NULL
-
- called before error handling initialized
- qh_errexit() may not be used
-*/
-void qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]) {
- qh_meminit (errfile);
- qh_initqhull_start (infile, outfile, errfile);
- qh_init_qhull_command (argc, argv);
-} /* init_A */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="init_B">-</a>
-
- qh_init_B( points, numpoints, dim, ismalloc )
- initialize globals for points array
-
- points has numpoints dim-dimensional points
- points[0] is the first coordinate of the first point
- points[1] is the second coordinate of the first point
- points[dim] is the first coordinate of the second point
-
- ismalloc=True
- Qhull will call free(points) on exit or input transformation
- ismalloc=False
- Qhull will allocate a new point array if needed for input transformation
-
- qh.qhull_command
- is the option string.
- It is defined by qh_init_B(), qh_qhull_command(), or qh_initflags
-
- returns:
- if qh.PROJECTinput or (qh.DELAUNAY and qh.PROJECTdelaunay)
- projects the input to a new point array
-
- if qh.DELAUNAY,
- qh.hull_dim is increased by one
- if qh.ATinfinity,
- qh_projectinput adds point-at-infinity for Delaunay tri.
-
- if qh.SCALEinput
- changes the upper and lower bounds of the input, see qh_scaleinput()
-
- if qh.ROTATEinput
- rotates the input by a random rotation, see qh_rotateinput()
- if qh.DELAUNAY
- rotates about the last coordinate
-
- notes:
- called after points are defined
- qh_errexit() may be used
-*/
-void qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc) {
- qh_initqhull_globals (points, numpoints, dim, ismalloc);
- if (qhmem.LASTsize == 0)
- qh_initqhull_mem();
- /* mem.c and qset.c are initialized */
- qh_initqhull_buffers();
- qh_initthresholds (qh qhull_command);
- if (qh PROJECTinput || (qh DELAUNAY && qh PROJECTdelaunay))
- qh_projectinput();
- if (qh SCALEinput)
- qh_scaleinput();
- if (qh ROTATErandom >= 0) {
- qh_randommatrix (qh gm_matrix, qh hull_dim, qh gm_row);
- if (qh DELAUNAY) {
- int k, lastk= qh hull_dim-1;
- for (k= 0; k < lastk; k++) {
- qh gm_row[k][lastk]= 0.0;
- qh gm_row[lastk][k]= 0.0;
- }
- qh gm_row[lastk][lastk]= 1.0;
- }
- qh_gram_schmidt (qh hull_dim, qh gm_row);
- qh_rotateinput (qh gm_row);
- }
-} /* init_B */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="init_qhull_command">-</a>
-
- qh_init_qhull_command( argc, argv )
- build qh.qhull_command from argc/argv
-
- returns:
- a space-deliminated string of options (just as typed)
-
- notes:
- makes option string easy to input and output
-
- argc/argv may be 0/NULL
-*/
-void qh_init_qhull_command(int argc, char *argv[]) {
- int i;
- char *s;
-
- if (argc) {
- if ((s= strrchr( argv[0], '\\'))) /* Borland gives full path */
- strcpy (qh qhull_command, s+1);
- else
- strcpy (qh qhull_command, argv[0]);
- if ((s= strstr (qh qhull_command, ".EXE"))
- || (s= strstr (qh qhull_command, ".exe")))
- *s= '\0';
- }
- for (i=1; i < argc; i++) {
- if (strlen (qh qhull_command) + strlen(argv[i]) + 1 < sizeof(qh qhull_command)) {
- strcat (qh qhull_command, " ");
- strcat (qh qhull_command, argv[i]);
- }else {
- fprintf (qh ferr, "qhull input error: more than %d characters in command line\n",
- (int)sizeof(qh qhull_command));
- exit (1); /* can not use qh_errexit */
- }
- }
-} /* init_qhull_command */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initflags">-</a>
-
- qh_initflags( commandStr )
- set flags and initialized constants from commandStr
-
- returns:
- sets qh.qhull_command to command if needed
-
- notes:
- ignores first word (e.g., "qhull d")
- use qh_strtol/strtod since strtol/strtod may or may not skip trailing spaces
-
- see:
- qh_initthresholds() continues processing of 'Pdn' and 'PDn'
- 'prompt' in unix.c for documentation
-
- design:
- for each space-deliminated option group
- if top-level option
- check syntax
- append approriate option to option string
- set appropriate global variable or append printFormat to print options
- else
- for each sub-option
- check syntax
- append approriate option to option string
- set appropriate global variable or append printFormat to print options
-
-
-*/
-void qh_initflags(char *command) {
- int k, i, lastproject;
- char *s= command, *t, *prev_s, *start, key;
- boolT isgeom= False, wasproject;
- realT r;
-
- if (command != &qh qhull_command[0]) {
- *qh qhull_command= '\0';
- strncat( qh qhull_command, command, sizeof( qh qhull_command));
- }
- while (*s && !isspace(*s)) /* skip program name */
- s++;
- while (*s) {
- while (*s && isspace(*s))
- s++;
- if (*s == '-')
- s++;
- if (!*s)
- break;
- prev_s= s;
- switch (*s++) {
- case 'd':
- qh_option ("delaunay", NULL, NULL);
- qh DELAUNAY= True;
- break;
- case 'f':
- qh_option ("facets", NULL, NULL);
- qh_appendprint (qh_PRINTfacets);
- break;
- case 'i':
- qh_option ("incidence", NULL, NULL);
- qh_appendprint (qh_PRINTincidences);
- break;
- case 'm':
- qh_option ("mathematica", NULL, NULL);
- qh_appendprint (qh_PRINTmathematica);
- break;
- case 'n':
- qh_option ("normals", NULL, NULL);
- qh_appendprint (qh_PRINTnormals);
- break;
- case 'o':
- qh_option ("offFile", NULL, NULL);
- qh_appendprint (qh_PRINToff);
- break;
- case 'p':
- qh_option ("points", NULL, NULL);
- qh_appendprint (qh_PRINTpoints);
- break;
- case 's':
- qh_option ("summary", NULL, NULL);
- qh PRINTsummary= True;
- break;
- case 'v':
- qh_option ("voronoi", NULL, NULL);
- qh VORONOI= True;
- qh DELAUNAY= True;
- break;
- case 'A':
- if (!isdigit(*s) && *s != '.' && *s != '-')
- fprintf(qh ferr, "qhull warning: no maximum cosine angle given for option 'An'. Ignored.\n");
- else {
- if (*s == '-') {
- qh premerge_cos= -qh_strtod (s, &s);
- qh_option ("Angle-premerge-", NULL, &qh premerge_cos);
- qh PREmerge= True;
- }else {
- qh postmerge_cos= qh_strtod (s, &s);
- qh_option ("Angle-postmerge", NULL, &qh postmerge_cos);
- qh POSTmerge= True;
- }
- qh MERGING= True;
- }
- break;
- case 'C':
- if (!isdigit(*s) && *s != '.' && *s != '-')
- fprintf(qh ferr, "qhull warning: no centrum radius given for option 'Cn'. Ignored.\n");
- else {
- if (*s == '-') {
- qh premerge_centrum= -qh_strtod (s, &s);
- qh_option ("Centrum-premerge-", NULL, &qh premerge_centrum);
- qh PREmerge= True;
- }else {
- qh postmerge_centrum= qh_strtod (s, &s);
- qh_option ("Centrum-postmerge", NULL, &qh postmerge_centrum);
- qh POSTmerge= True;
- }
- qh MERGING= True;
- }
- break;
- case 'E':
- if (*s == '-')
- fprintf(qh ferr, "qhull warning: negative maximum roundoff given for option 'An'. Ignored.\n");
- else if (!isdigit(*s))
- fprintf(qh ferr, "qhull warning: no maximum roundoff given for option 'En'. Ignored.\n");
- else {
- qh DISTround= qh_strtod (s, &s);
- qh_option ("Distance-roundoff", NULL, &qh DISTround);
- qh SETroundoff= True;
- }
- break;
- case 'H':
- start= s;
- qh HALFspace= True;
- qh_strtod (s, &t);
- while (t > s) {
- if (*t && !isspace (*t)) {
- if (*t == ',')
- t++;
- else
- fprintf (qh ferr, "qhull warning: origin for Halfspace intersection should be 'Hn,n,n,...'\n");
- }
- s= t;
- qh_strtod (s, &t);
- }
- if (start < t) {
- if (!(qh feasible_string= (char*)calloc (t-start+1, 1))) {
- fprintf(qh ferr, "qhull error: insufficient memory for 'Hn,n,n'\n");
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- strncpy (qh feasible_string, start, t-start);
- qh_option ("Halfspace-about", NULL, NULL);
- qh_option (qh feasible_string, NULL, NULL);
- }else
- qh_option ("Halfspace", NULL, NULL);
- break;
- case 'R':
- if (!isdigit(*s))
- fprintf(qh ferr, "qhull warning: missing random perturbation for option 'Rn'. Ignored\n");
- else {
- qh RANDOMfactor= qh_strtod (s, &s);
- qh_option ("Random_perturb", NULL, &qh RANDOMfactor);
- qh RANDOMdist= True;
- }
- break;
- case 'V':
- if (!isdigit(*s) && *s != '-')
- fprintf(qh ferr, "qhull warning: missing visible distance for option 'Vn'. Ignored\n");
- else {
- qh MINvisible= qh_strtod (s, &s);
- qh_option ("Visible", NULL, &qh MINvisible);
- }
- break;
- case 'U':
- if (!isdigit(*s) && *s != '-')
- fprintf(qh ferr, "qhull warning: missing coplanar distance for option 'Un'. Ignored\n");
- else {
- qh MAXcoplanar= qh_strtod (s, &s);
- qh_option ("U-coplanar", NULL, &qh MAXcoplanar);
- }
- break;
- case 'W':
- if (*s == '-')
- fprintf(qh ferr, "qhull warning: negative outside width for option 'Wn'. Ignored.\n");
- else if (!isdigit(*s))
- fprintf(qh ferr, "qhull warning: missing outside width for option 'Wn'. Ignored\n");
- else {
- qh MINoutside= qh_strtod (s, &s);
- qh_option ("W-outside", NULL, &qh MINoutside);
- qh APPROXhull= True;
- }
- break;
- /************ sub menus ***************/
- case 'F':
- while (*s && !isspace(*s)) {
- switch(*s++) {
- case 'a':
- qh_option ("Farea", NULL, NULL);
- qh_appendprint (qh_PRINTarea);
- qh GETarea= True;
- break;
- case 'A':
- qh_option ("FArea-total", NULL, NULL);
- qh GETarea= True;
- break;
- case 'c':
- qh_option ("Fcoplanars", NULL, NULL);
- qh_appendprint (qh_PRINTcoplanars);
- break;
- case 'C':
- qh_option ("FCentrums", NULL, NULL);
- qh_appendprint (qh_PRINTcentrums);
- break;
- case 'd':
- qh_option ("Fd-cdd-in", NULL, NULL);
- qh CDDinput= True;
- break;
- case 'D':
- qh_option ("FD-cdd-out", NULL, NULL);
- qh CDDoutput= True;
- break;
- case 'F':
- qh_option ("FFacets-xridge", NULL, NULL);
- qh_appendprint (qh_PRINTfacets_xridge);
- break;
- case 'i':
- qh_option ("Finner", NULL, NULL);
- qh_appendprint (qh_PRINTinner);
- break;
- case 'I':
- qh_option ("FIDs", NULL, NULL);
- qh_appendprint (qh_PRINTids);
- break;
- case 'm':
- qh_option ("Fmerges", NULL, NULL);
- qh_appendprint (qh_PRINTmerges);
- break;
- case 'n':
- qh_option ("Fneighbors", NULL, NULL);
- qh_appendprint (qh_PRINTneighbors);
- break;
- case 'N':
- qh_option ("FNeighbors-vertex", NULL, NULL);
- qh_appendprint (qh_PRINTvneighbors);
- break;
- case 'o':
- qh_option ("Fouter", NULL, NULL);
- qh_appendprint (qh_PRINTouter);
- break;
- case 'O':
- if (qh PRINToptions1st) {
- qh_option ("FOptions", NULL, NULL);
- qh_appendprint (qh_PRINToptions);
- }else
- qh PRINToptions1st= True;
- break;
- case 'p':
- qh_option ("Fpoint-intersect", NULL, NULL);
- qh_appendprint (qh_PRINTpointintersect);
- break;
- case 'P':
- qh_option ("FPoint-nearest", NULL, NULL);
- qh_appendprint (qh_PRINTpointnearest);
- break;
- case 'Q':
- qh_option ("FQhull", NULL, NULL);
- qh_appendprint (qh_PRINTqhull);
- break;
- case 's':
- qh_option ("Fsummary", NULL, NULL);
- qh_appendprint (qh_PRINTsummary);
- break;
- case 'S':
- qh_option ("FSize", NULL, NULL);
- qh_appendprint (qh_PRINTsize);
- qh GETarea= True;
- break;
- case 't':
- qh_option ("Ftriangles", NULL, NULL);
- qh_appendprint (qh_PRINTtriangles);
- break;
- case 'v':
- /* option set in qh_initqhull_globals */
- qh_appendprint (qh_PRINTvertices);
- break;
- case 'V':
- qh_option ("FVertex-average", NULL, NULL);
- qh_appendprint (qh_PRINTaverage);
- break;
- case 'x':
- qh_option ("Fxtremes", NULL, NULL);
- qh_appendprint (qh_PRINTextremes);
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'F' output option %c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- }
- break;
- case 'G':
- isgeom= True;
- qh_appendprint (qh_PRINTgeom);
- while (*s && !isspace(*s)) {
- switch(*s++) {
- case 'a':
- qh_option ("Gall-points", NULL, NULL);
- qh PRINTdots= True;
- break;
- case 'c':
- qh_option ("Gcentrums", NULL, NULL);
- qh PRINTcentrums= True;
- break;
- case 'h':
- qh_option ("Gintersections", NULL, NULL);
- qh DOintersections= True;
- break;
- case 'i':
- qh_option ("Ginner", NULL, NULL);
- qh PRINTinner= True;
- break;
- case 'n':
- qh_option ("Gno-planes", NULL, NULL);
- qh PRINTnoplanes= True;
- break;
- case 'o':
- qh_option ("Gouter", NULL, NULL);
- qh PRINTouter= True;
- break;
- case 'p':
- qh_option ("Gpoints", NULL, NULL);
- qh PRINTcoplanar= True;
- break;
- case 'r':
- qh_option ("Gridges", NULL, NULL);
- qh PRINTridges= True;
- break;
- case 't':
- qh_option ("Gtransparent", NULL, NULL);
- qh PRINTtransparent= True;
- break;
- case 'v':
- qh_option ("Gvertices", NULL, NULL);
- qh PRINTspheres= True;
- break;
- case 'D':
- if (!isdigit (*s))
- fprintf (qh ferr, "qhull input error: missing dimension for option 'GDn'\n");
- else {
- if (qh DROPdim >= 0)
- fprintf (qh ferr, "qhull warning: can only drop one dimension. Previous 'GD%d' ignored\n",
- qh DROPdim);
- qh DROPdim= qh_strtol (s, &s);
- qh_option ("GDrop-dim", &qh DROPdim, NULL);
- }
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'G' print option %c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- }
- break;
- case 'P':
- while (*s && !isspace(*s)) {
- switch(*s++) {
- case 'd': case 'D': /* see qh_initthresholds() */
- key= s[-1];
- i= qh_strtol (s, &s);
- r= 0;
- if (*s == ':') {
- s++;
- r= qh_strtod (s, &s);
- }
- if (key == 'd')
- qh_option ("Pdrop-facets-dim-less", &i, &r);
- else
- qh_option ("PDrop-facets-dim-more", &i, &r);
- break;
- case 'g':
- qh_option ("Pgood-facets", NULL, NULL);
- qh PRINTgood= True;
- break;
- case 'G':
- qh_option ("PGood-facet-neighbors", NULL, NULL);
- qh PRINTneighbors= True;
- break;
- case 'o':
- qh_option ("Poutput-forced", NULL, NULL);
- qh FORCEoutput= True;
- break;
- case 'p':
- qh_option ("Pprecision-ignore", NULL, NULL);
- qh PRINTprecision= False;
- break;
- case 'A':
- if (!isdigit (*s))
- fprintf (qh ferr, "qhull input error: missing facet count for keep area option 'PAn'\n");
- else {
- qh KEEParea= qh_strtol (s, &s);
- qh_option ("PArea-keep", &qh KEEParea, NULL);
- qh GETarea= True;
- }
- break;
- case 'F':
- if (!isdigit (*s))
- fprintf (qh ferr, "qhull input error: missing facet area for option 'PFn'\n");
- else {
- qh KEEPminArea= qh_strtod (s, &s);
- qh_option ("PFacet-area-keep", NULL, &qh KEEPminArea);
- qh GETarea= True;
- }
- break;
- case 'M':
- if (!isdigit (*s))
- fprintf (qh ferr, "qhull input error: missing merge count for option 'PMn'\n");
- else {
- qh KEEPmerge= qh_strtol (s, &s);
- qh_option ("PMerge-keep", &qh KEEPmerge, NULL);
- }
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'P' print option %c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- }
- break;
- case 'Q':
- lastproject= -1;
- while (*s && !isspace(*s)) {
- switch(*s++) {
- case 'b': case 'B': /* handled by qh_initthresholds */
- key= s[-1];
- if (key == 'b' && *s == 'B') {
- s++;
- r= qh_DEFAULTbox;
- qh SCALEinput= True;
- qh_option ("QbBound-unit-box", NULL, &r);
- break;
- }
- if (key == 'b' && *s == 'b') {
- s++;
- qh SCALElast= True;
- qh_option ("Qbbound-last", NULL, NULL);
- break;
- }
- k= qh_strtol (s, &s);
- r= 0.0;
- wasproject= False;
- if (*s == ':') {
- s++;
- if ((r= qh_strtod(s, &s)) == 0.0) {
- t= s; /* need true dimension for memory allocation */
- while (*t && !isspace(*t)) {
- if (toupper(*t++) == 'B'
- && k == qh_strtol (t, &t)
- && *t++ == ':'
- && qh_strtod(t, &t) == 0.0) {
- qh PROJECTinput++;
- trace2((qh ferr, "qh_initflags: project dimension %d\n", k));
- qh_option ("Qb-project-dim", &k, NULL);
- wasproject= True;
- lastproject= k;
- break;
- }
- }
- }
- }
- if (!wasproject) {
- if (lastproject == k && r == 0.0)
- lastproject= -1; /* doesn't catch all possible sequences */
- else if (key == 'b') {
- qh SCALEinput= True;
- if (r == 0.0)
- r= -qh_DEFAULTbox;
- qh_option ("Qbound-dim-low", &k, &r);
- }else {
- qh SCALEinput= True;
- if (r == 0.0)
- r= qh_DEFAULTbox;
- qh_option ("QBound-dim-high", &k, &r);
- }
- }
- break;
- case 'c':
- qh_option ("Qcoplanar-keep", NULL, NULL);
- qh KEEPcoplanar= True;
- break;
- case 'f':
- qh_option ("Qfurthest-outside", NULL, NULL);
- qh BESToutside= True;
- break;
- case 'g':
- qh_option ("Qgood-facets-only", NULL, NULL);
- qh ONLYgood= True;
- break;
- case 'i':
- qh_option ("Qinterior-keep", NULL, NULL);
- qh KEEPinside= True;
- break;
- case 'm':
- qh_option ("Qmax-outside-only", NULL, NULL);
- qh ONLYmax= True;
- break;
- case 'r':
- qh_option ("Qrandom-outside", NULL, NULL);
- qh RANDOMoutside= True;
- break;
- case 's':
- qh_option ("Qsearch-initial-simplex", NULL, NULL);
- qh ALLpoints= True;
- break;
- case 't':
- qh_option ("Qtriangulate", NULL, NULL);
- qh TRIangulate= True;
- break;
- case 'T':
- qh_option ("QTestPoints", NULL, NULL);
- if (!isdigit (*s))
- fprintf (qh ferr, "qhull input error: missing number of test points for option 'QTn'\n");
- else {
- qh TESTpoints= qh_strtol (s, &s);
- qh_option ("QTestPoints", &qh TESTpoints, NULL);
- }
- break;
- case 'u':
- qh_option ("QupperDelaunay", NULL, NULL);
- qh UPPERdelaunay= True;
- break;
- case 'v':
- qh_option ("Qvertex-neighbors-convex", NULL, NULL);
- qh TESTvneighbors= True;
- break;
- case 'x':
- qh_option ("Qxact-merge", NULL, NULL);
- qh MERGEexact= True;
- break;
- case 'z':
- qh_option ("Qz-infinity-point", NULL, NULL);
- qh ATinfinity= True;
- break;
- case '0':
- qh_option ("Q0-no-premerge", NULL, NULL);
- qh NOpremerge= True;
- break;
- case '1':
- if (!isdigit(*s)) {
- qh_option ("Q1-no-angle-sort", NULL, NULL);
- qh ANGLEmerge= False;
- break;
- }
- switch(*s++) {
- case '0':
- qh_option ("Q10-no-narrow", NULL, NULL);
- qh NOnarrow= True;
- break;
- case '1':
- qh_option ("Q11-trinormals Qtriangulate", NULL, NULL);
- qh TRInormals= True;
- qh TRIangulate= True;
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'Q' qhull option 1%c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- break;
- case '2':
- qh_option ("Q2-no-merge-independent", NULL, NULL);
- qh MERGEindependent= False;
- goto LABELcheckdigit;
- break; /* no warnings */
- case '3':
- qh_option ("Q3-no-merge-vertices", NULL, NULL);
- qh MERGEvertices= False;
- LABELcheckdigit:
- if (isdigit(*s))
- fprintf (qh ferr, "qhull warning: can not follow '1', '2', or '3' with a digit. '%c' skipped.\n",
- *s++);
- break;
- case '4':
- qh_option ("Q4-avoid-old-into-new", NULL, NULL);
- qh AVOIDold= True;
- break;
- case '5':
- qh_option ("Q5-no-check-outer", NULL, NULL);
- qh SKIPcheckmax= True;
- break;
- case '6':
- qh_option ("Q6-no-concave-merge", NULL, NULL);
- qh SKIPconvex= True;
- break;
- case '7':
- qh_option ("Q7-no-breadth-first", NULL, NULL);
- qh VIRTUALmemory= True;
- break;
- case '8':
- qh_option ("Q8-no-near-inside", NULL, NULL);
- qh NOnearinside= True;
- break;
- case '9':
- qh_option ("Q9-pick-furthest", NULL, NULL);
- qh PICKfurthest= True;
- break;
- case 'G':
- i= qh_strtol (s, &t);
- if (qh GOODpoint)
- fprintf (qh ferr, "qhull warning: good point already defined for option 'QGn'. Ignored\n");
- else if (s == t)
- fprintf (qh ferr, "qhull warning: missing good point id for option 'QGn'. Ignored\n");
- else if (i < 0 || *s == '-') {
- qh GOODpoint= i-1;
- qh_option ("QGood-if-dont-see-point", &i, NULL);
- }else {
- qh GOODpoint= i+1;
- qh_option ("QGood-if-see-point", &i, NULL);
- }
- s= t;
- break;
- case 'J':
- if (!isdigit(*s) && *s != '-')
- qh JOGGLEmax= 0.0;
- else {
- qh JOGGLEmax= (realT) qh_strtod (s, &s);
- qh_option ("QJoggle", NULL, &qh JOGGLEmax);
- }
- break;
- case 'R':
- if (!isdigit(*s) && *s != '-')
- fprintf (qh ferr, "qhull warning: missing random seed for option 'QRn'. Ignored\n");
- else {
- qh ROTATErandom= i= qh_strtol(s, &s);
- if (i > 0)
- qh_option ("QRotate-id", &i, NULL );
- else if (i < -1)
- qh_option ("QRandom-seed", &i, NULL );
- }
- break;
- case 'V':
- i= qh_strtol (s, &t);
- if (qh GOODvertex)
- fprintf (qh ferr, "qhull warning: good vertex already defined for option 'QVn'. Ignored\n");
- else if (s == t)
- fprintf (qh ferr, "qhull warning: no good point id given for option 'QVn'. Ignored\n");
- else if (i < 0) {
- qh GOODvertex= i - 1;
- qh_option ("QV-good-facets-not-point", &i, NULL);
- }else {
- qh_option ("QV-good-facets-point", &i, NULL);
- qh GOODvertex= i + 1;
- }
- s= t;
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'Q' qhull option %c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- }
- break;
- case 'T':
- while (*s && !isspace(*s)) {
- if (isdigit(*s) || *s == '-')
- qh IStracing= qh_strtol(s, &s);
- else switch(*s++) {
- case 'c':
- qh_option ("Tcheck-frequently", NULL, NULL);
- qh CHECKfrequently= True;
- break;
- case 's':
- qh_option ("Tstatistics", NULL, NULL);
- qh PRINTstatistics= True;
- break;
- case 'v':
- qh_option ("Tverify", NULL, NULL);
- qh VERIFYoutput= True;
- break;
- case 'z':
- if (!qh fout)
- fprintf (qh ferr, "qhull warning: output file undefined (stdout). Option 'Tz' ignored.\n");
- else {
- qh_option ("Tz-stdout", NULL, NULL);
- qh ferr= qh fout;
- qhmem.ferr= qh fout;
- }
- break;
- case 'C':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing point id for cone for trace option 'TCn'. Ignored\n");
- else {
- i= qh_strtol (s, &s);
- qh_option ("TCone-stop", &i, NULL);
- qh STOPcone= i + 1;
- }
- break;
- case 'F':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing frequency count for trace option 'TFn'. Ignored\n");
- else {
- qh REPORTfreq= qh_strtol (s, &s);
- qh_option ("TFacet-log", &qh REPORTfreq, NULL);
- qh REPORTfreq2= qh REPORTfreq/2; /* for tracemerging() */
- }
- break;
- case 'I':
- if (s[0] != ' ' || s[1] == '\"' || s[1] == '\'' ||isspace (s[1])) {
- s++;
- fprintf (qh ferr, "qhull warning: option 'TI' mistyped.\nUse 'TI', one space, file name, and space or end-of-line.\nDo not use quotes. Option 'FI' ignored.\n");
- }else { /* not a procedure because of qh_option (filename, NULL, NULL); */
- char filename[500], *t= filename;
-
- s++;
- while (*s) {
- if (t - filename >= sizeof (filename)-2) {
- fprintf (qh ferr, "qhull error: filename for 'TI' too long.\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (isspace (*s))
- break;
- *(t++)= *s++;
- }
- *t= '\0';
- if (!freopen (filename, "r", stdin)) {
- fprintf (qh ferr, "qhull error: could not open file \"%s\".", filename);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }else {
- qh_option ("TInput-file", NULL, NULL);
- qh_option (filename, NULL, NULL);
- }
- }
- break;
- case 'O':
- if (s[0] != ' ' || s[1] == '\"' || isspace (s[1])) {
- s++;
- fprintf (qh ferr, "qhull warning: option 'TO' mistyped.\nUse 'TO', one space, file name, and space or end-of-line.\nThe file name may be enclosed in single quotes.\nDo not use double quotes. Option 'FO' ignored.\n");
- }else { /* not a procedure because of qh_option (filename, NULL, NULL); */
- char filename[500], *t= filename;
- boolT isquote= False;
-
- s++;
- if (*s == '\'') {
- isquote= True;
- s++;
- }
- while (*s) {
- if (t - filename >= sizeof (filename)-2) {
- fprintf (qh ferr, "qhull error: filename for 'TO' too long.\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (isquote) {
- if (*s == '\'') {
- s++;
- isquote= False;
- break;
- }
- }else if (isspace (*s))
- break;
- *(t++)= *s++;
- }
- *t= '\0';
- if (isquote)
- fprintf (qh ferr, "qhull error: missing end quote for option 'TO'. Rest of line ignored.\n");
- else if (!freopen (filename, "w", stdout)) {
- fprintf (qh ferr, "qhull error: could not open file \"%s\".", filename);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }else {
- qh_option ("TOutput-file", NULL, NULL);
- qh_option (filename, NULL, NULL);
- }
- }
- break;
- case 'P':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing point id for trace option 'TPn'. Ignored\n");
- else {
- qh TRACEpoint= qh_strtol (s, &s);
- qh_option ("Trace-point", &qh TRACEpoint, NULL);
- }
- break;
- case 'M':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing merge id for trace option 'TMn'. Ignored\n");
- else {
- qh TRACEmerge= qh_strtol (s, &s);
- qh_option ("Trace-merge", &qh TRACEmerge, NULL);
- }
- break;
- case 'R':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing rerun count for trace option 'TRn'. Ignored\n");
- else {
- qh RERUN= qh_strtol (s, &s);
- qh_option ("TRerun", &qh RERUN, NULL);
- }
- break;
- case 'V':
- i= qh_strtol (s, &t);
- if (s == t)
- fprintf (qh ferr, "qhull warning: missing furthest point id for trace option 'TVn'. Ignored\n");
- else if (i < 0) {
- qh STOPpoint= i - 1;
- qh_option ("TV-stop-before-point", &i, NULL);
- }else {
- qh STOPpoint= i + 1;
- qh_option ("TV-stop-after-point", &i, NULL);
- }
- s= t;
- break;
- case 'W':
- if (!isdigit(*s))
- fprintf (qh ferr, "qhull warning: missing max width for trace option 'TWn'. Ignored\n");
- else {
- qh TRACEdist= (realT) qh_strtod (s, &s);
- qh_option ("TWide-trace", NULL, &qh TRACEdist);
- }
- break;
- default:
- s--;
- fprintf (qh ferr, "qhull warning: unknown 'T' trace option %c, rest ignored\n", (int)s[0]);
- while (*++s && !isspace(*s));
- break;
- }
- }
- break;
- default:
- fprintf (qh ferr, "qhull warning: unknown flag %c (%x)\n", (int)s[-1],
- (int)s[-1]);
- break;
- }
- if (s-1 == prev_s && *s && !isspace(*s)) {
- fprintf (qh ferr, "qhull warning: missing space after flag %c (%x); reserved for menu. Skipped.\n",
- (int)*prev_s, (int)*prev_s);
- while (*s && !isspace(*s))
- s++;
- }
- }
- if (isgeom && !qh FORCEoutput && qh PRINTout[1])
- fprintf (qh ferr, "qhull warning: additional output formats are not compatible with Geomview\n");
- /* set derived values in qh_initqhull_globals */
-} /* initflags */
-
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initqhull_buffers">-</a>
-
- qh_initqhull_buffers()
- initialize global memory buffers
-
- notes:
- must match qh_freebuffers()
-*/
-void qh_initqhull_buffers (void) {
- int k;
-
- qh TEMPsize= (qhmem.LASTsize - sizeof (setT))/SETelemsize;
- if (qh TEMPsize <= 0 || qh TEMPsize > qhmem.LASTsize)
- qh TEMPsize= 8; /* e.g., if qh_NOmem */
- qh other_points= qh_setnew (qh TEMPsize);
- qh del_vertices= qh_setnew (qh TEMPsize);
- qh coplanarset= qh_setnew (qh TEMPsize);
- qh NEARzero= (realT *)qh_memalloc(qh hull_dim * sizeof(realT));
- qh lower_threshold= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
- qh upper_threshold= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
- qh lower_bound= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
- qh upper_bound= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
- for(k= qh input_dim+1; k--; ) {
- qh lower_threshold[k]= -REALmax;
- qh upper_threshold[k]= REALmax;
- qh lower_bound[k]= -REALmax;
- qh upper_bound[k]= REALmax;
- }
- qh gm_matrix= (coordT *)qh_memalloc((qh hull_dim+1) * qh hull_dim * sizeof(coordT));
- qh gm_row= (coordT **)qh_memalloc((qh hull_dim+1) * sizeof(coordT *));
-} /* initqhull_buffers */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initqhull_globals">-</a>
-
- qh_initqhull_globals( points, numpoints, dim, ismalloc )
- initialize globals
- if ismalloc
- points were malloc'd and qhull should free at end
-
- returns:
- sets qh.first_point, num_points, input_dim, hull_dim and others
- seeds random number generator (seed=1 if tracing)
- modifies qh.hull_dim if ((qh.DELAUNAY and qh.PROJECTdelaunay) or qh.PROJECTinput)
- adjust user flags as needed
- also checks DIM3 dependencies and constants
-
- notes:
- do not use qh_point() since an input transformation may move them elsewhere
-
- see:
- qh_initqhull_start() sets default values for non-zero globals
-
- design:
- initialize points array from input arguments
- test for qh.ZEROcentrum
- (i.e., use opposite vertex instead of cetrum for convexity testing)
- test for qh.PRINTgood (i.e., only print 'good' facets)
- initialize qh.CENTERtype, qh.normal_size,
- qh.center_size, qh.TRACEpoint/level,
- initialize and test random numbers
- check for conflicting print output options
-*/
-void qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc) {
- int seed, pointsneeded, extra= 0, i, randi, k;
- boolT printgeom= False, printmath= False, printcoplanar= False;
- realT randr;
- realT factorial;
-
- time_t timedata;
-
- trace0((qh ferr, "qh_initqhull_globals: for %s | %s\n", qh rbox_command,
- qh qhull_command));
- qh POINTSmalloc= ismalloc;
- qh first_point= points;
- qh num_points= numpoints;
- qh hull_dim= qh input_dim= dim;
- if (!qh NOpremerge && !qh MERGEexact && !qh PREmerge && qh JOGGLEmax > REALmax/2) {
- qh MERGING= True;
- if (qh hull_dim <= 4) {
- qh PREmerge= True;
- qh_option ("_pre-merge", NULL, NULL);
- }else {
- qh MERGEexact= True;
- qh_option ("Qxact_merge", NULL, NULL);
- }
- }else if (qh MERGEexact)
- qh MERGING= True;
- if (!qh NOpremerge && qh JOGGLEmax > REALmax/2) {
-#ifdef qh_NOmerge
- qh JOGGLEmax= 0.0;
-#endif
- }
- if (qh TRIangulate && qh JOGGLEmax < REALmax/2 && qh PRINTprecision)
- fprintf(qh ferr, "qhull warning: joggle ('QJ') always produces simplicial output. Triangulated output ('Qt') does nothing.\n");
- if (qh JOGGLEmax < REALmax/2 && qh DELAUNAY && !qh SCALEinput && !qh SCALElast) {
- qh SCALElast= True;
- qh_option ("Qbbound-last-qj", NULL, NULL);
- }
- if (qh MERGING && !qh POSTmerge && qh premerge_cos > REALmax/2
- && qh premerge_centrum == 0) {
- qh ZEROcentrum= True;
- qh ZEROall_ok= True;
- qh_option ("_zero-centrum", NULL, NULL);
- }
- if (qh JOGGLEmax < REALmax/2 && REALepsilon > 2e-8 && qh PRINTprecision)
- fprintf(qh ferr, "qhull warning: real epsilon, %2.2g, is probably too large for joggle ('QJn')\nRecompile with double precision reals (see user.h).\n",
- REALepsilon);
-#ifdef qh_NOmerge
- if (qh MERGING) {
- fprintf (qh ferr, "qhull input error: merging not installed (qh_NOmerge + 'Qx', 'Cn' or 'An')\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
-#endif
- if (!(qh PRINTgood || qh PRINTneighbors)) {
- if (qh KEEParea || qh KEEPminArea < REALmax/2 || qh KEEPmerge || qh DELAUNAY
- || (!qh ONLYgood && (qh GOODvertex || qh GOODpoint))) {
- qh PRINTgood= True;
- qh_option ("Pgood", NULL, NULL);
- }
- }
- if (qh DELAUNAY && qh KEEPcoplanar && !qh KEEPinside) {
- qh KEEPinside= True;
- qh_option ("Qinterior-keep", NULL, NULL);
- }
- if (qh DELAUNAY && qh HALFspace) {
- fprintf (qh ferr, "qhull input error: can not use Delaunay ('d') or Voronoi ('v') with halfspace intersection ('H')\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (!qh DELAUNAY && (qh UPPERdelaunay || qh ATinfinity)) {
- fprintf (qh ferr, "qhull input error: use upper-Delaunay ('Qu') or infinity-point ('Qz') with Delaunay ('d') or Voronoi ('v')\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh UPPERdelaunay && qh ATinfinity) {
- fprintf (qh ferr, "qhull input error: can not use infinity-point ('Qz') with upper-Delaunay ('Qu')\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh SCALElast && !qh DELAUNAY && qh PRINTprecision)
- fprintf (qh ferr, "qhull input warning: option 'Qbb' (scale-last-coordinate) is normally used with 'd' or 'v'\n");
- qh DOcheckmax= (!qh SKIPcheckmax && qh MERGING );
- qh KEEPnearinside= (qh DOcheckmax && !(qh KEEPinside && qh KEEPcoplanar)
- && !qh NOnearinside);
- if (qh MERGING)
- qh CENTERtype= qh_AScentrum;
- else if (qh VORONOI)
- qh CENTERtype= qh_ASvoronoi;
- if (qh TESTvneighbors && !qh MERGING) {
- fprintf(qh ferr, "qhull input error: test vertex neighbors ('Qv') needs a merge option\n");
- qh_errexit (qh_ERRinput, NULL ,NULL);
- }
- if (qh PROJECTinput || (qh DELAUNAY && qh PROJECTdelaunay)) {
- qh hull_dim -= qh PROJECTinput;
- if (qh DELAUNAY) {
- qh hull_dim++;
- extra= 1;
- }
- }
- if (qh hull_dim <= 1) {
- fprintf(qh ferr, "qhull error: dimension %d must be > 1\n", qh hull_dim);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- for (k= 2, factorial=1.0; k < qh hull_dim; k++)
- factorial *= k;
- qh AREAfactor= 1.0 / factorial;
- trace2((qh ferr, "qh_initqhull_globals: initialize globals. dim %d numpoints %d malloc? %d projected %d to hull_dim %d\n",
- dim, numpoints, ismalloc, qh PROJECTinput, qh hull_dim));
- qh normal_size= qh hull_dim * sizeof(coordT);
- qh center_size= qh normal_size - sizeof(coordT);
- pointsneeded= qh hull_dim+1;
- if (qh hull_dim > qh_DIMmergeVertex) {
- qh MERGEvertices= False;
- qh_option ("Q3-no-merge-vertices-dim-high", NULL, NULL);
- }
- if (qh GOODpoint)
- pointsneeded++;
-#ifdef qh_NOtrace
- if (qh IStracing) {
- fprintf (qh ferr, "qhull input error: tracing is not installed (qh_NOtrace in user.h)");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
-#endif
- if (qh RERUN > 1) {
- qh TRACElastrun= qh IStracing; /* qh_build_withrestart duplicates next conditional */
- if (qh IStracing != -1)
- qh IStracing= 0;
- }else if (qh TRACEpoint != -1 || qh TRACEdist < REALmax/2 || qh TRACEmerge) {
- qh TRACElevel= (qh IStracing? qh IStracing : 3);
- qh IStracing= 0;
- }
- if (qh ROTATErandom == 0 || qh ROTATErandom == -1) {
- seed= time (&timedata);
- if (qh ROTATErandom == -1) {
- seed= -seed;
- qh_option ("QRandom-seed", &seed, NULL );
- }else
- qh_option ("QRotate-random", &seed, NULL);
- qh ROTATErandom= seed;
- }
- seed= qh ROTATErandom;
- if (seed == INT_MIN) /* default value */
- seed= 1;
- else if (seed < 0)
- seed= -seed;
- qh_RANDOMseed_(seed);
- randr= 0.0;
- for (i= 1000; i--; ) {
- randi= qh_RANDOMint;
- randr += randi;
- if (randi > qh_RANDOMmax) {
- fprintf (qh ferr, "\
-qhull configuration error (qh_RANDOMmax in user.h):\n\
- random integer %d > qh_RANDOMmax (%.8g)\n",
- randi, qh_RANDOMmax);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- }
- qh_RANDOMseed_(seed);
- randr = randr/1000;
- if (randr < qh_RANDOMmax/10
- || randr > qh_RANDOMmax * 5)
- fprintf (qh ferr, "\
-qhull configuration warning (qh_RANDOMmax in user.h):\n\
- average of 1000 random integers (%.2g) is much different than expected (%.2g).\n\
- Is qh_RANDOMmax (%.2g) wrong?\n",
- randr, qh_RANDOMmax/2.0, qh_RANDOMmax);
- qh RANDOMa= 2.0 * qh RANDOMfactor/qh_RANDOMmax;
- qh RANDOMb= 1.0 - qh RANDOMfactor;
- if (qh_HASHfactor < 1.1) {
- fprintf(qh ferr, "qhull internal error (qh_initqhull_globals): qh_HASHfactor %d must be at least 1.1. Qhull uses linear hash probing\n",
- qh_HASHfactor);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- if (numpoints+extra < pointsneeded) {
- fprintf(qh ferr,"qhull input error: not enough points (%d) to construct initial simplex (need %d)\n",
- numpoints, pointsneeded);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (qh PRINTtransparent) {
- if (qh hull_dim != 4 || !qh DELAUNAY || qh VORONOI || qh DROPdim >= 0) {
- fprintf(qh ferr,"qhull input error: transparent Delaunay ('Gt') needs 3-d Delaunay ('d') w/o 'GDn'\n");
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- qh DROPdim = 3;
- qh PRINTridges = True;
- }
- for (i= qh_PRINTEND; i--; ) {
- if (qh PRINTout[i] == qh_PRINTgeom)
- printgeom= True;
- else if (qh PRINTout[i] == qh_PRINTmathematica)
- printmath= True;
- else if (qh PRINTout[i] == qh_PRINTcoplanars)
- printcoplanar= True;
- else if (qh PRINTout[i] == qh_PRINTpointnearest)
- printcoplanar= True;
- else if (qh PRINTout[i] == qh_PRINTpointintersect && !qh HALFspace) {
- fprintf (qh ferr, "qhull input error: option 'Fp' is only used for \nhalfspace intersection ('Hn,n,n').\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }else if (qh PRINTout[i] == qh_PRINTtriangles && (qh HALFspace || qh VORONOI)) {
- fprintf (qh ferr, "qhull input error: option 'Ft' is not available for Voronoi vertices or halfspace intersection\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }else if (qh PRINTout[i] == qh_PRINTcentrums && qh VORONOI) {
- fprintf (qh ferr, "qhull input error: option 'FC' is not available for Voronoi vertices ('v')\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }else if (qh PRINTout[i] == qh_PRINTvertices) {
- if (qh VORONOI)
- qh_option ("Fvoronoi", NULL, NULL);
- else
- qh_option ("Fvertices", NULL, NULL);
- }
- }
- if (printcoplanar && qh DELAUNAY && qh JOGGLEmax < REALmax/2) {
- if (qh PRINTprecision)
- fprintf (qh ferr, "qhull input warning: 'QJ' (joggle) will usually prevent coincident input sites for options 'Fc' and 'FP'\n");
- }
- if (!qh KEEPcoplanar && !qh KEEPinside && !qh ONLYgood) {
- if ((qh PRINTcoplanar && qh PRINTspheres) || printcoplanar) {
- qh KEEPcoplanar = True;
- qh_option ("Qcoplanar", NULL, NULL);
- }
- }
- if (printmath && (qh hull_dim > 3 || qh VORONOI)) {
- fprintf (qh ferr, "qhull input error: Mathematica output is only available for 2-d and 3-d convex hulls and 2-d Delaunay triangulations\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (printgeom) {
- if (qh hull_dim > 4) {
- fprintf (qh ferr, "qhull input error: Geomview output is only available for 2-d, 3-d and 4-d\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh PRINTnoplanes && !(qh PRINTcoplanar + qh PRINTcentrums
- + qh PRINTdots + qh PRINTspheres + qh DOintersections + qh PRINTridges)) {
- fprintf (qh ferr, "qhull input error: no output specified for Geomview\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh VORONOI && (qh hull_dim > 3 || qh DROPdim >= 0)) {
- fprintf (qh ferr, "qhull input error: Geomview output for Voronoi diagrams only for 2-d\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- /* can not warn about furthest-site Geomview output: no lower_threshold */
- if (qh hull_dim == 4 && qh DROPdim == -1 &&
- (qh PRINTcoplanar || qh PRINTspheres || qh PRINTcentrums)) {
- fprintf (qh ferr, "qhull input warning: coplanars, vertices, and centrums output not\n\
-available for 4-d output (ignored). Could use 'GDn' instead.\n");
- qh PRINTcoplanar= qh PRINTspheres= qh PRINTcentrums= False;
- }
- }
- qh PRINTdim= qh hull_dim;
- if (qh DROPdim >=0) { /* after Geomview checks */
- if (qh DROPdim < qh hull_dim) {
- qh PRINTdim--;
- if (!printgeom || qh hull_dim < 3)
- fprintf (qh ferr, "qhull input warning: drop dimension 'GD%d' is only available for 3-d/4-d Geomview\n", qh DROPdim);
- }else
- qh DROPdim= -1;
- }else if (qh VORONOI) {
- qh DROPdim= qh hull_dim-1;
- qh PRINTdim= qh hull_dim-1;
- }
-} /* initqhull_globals */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initqhull_mem">-</a>
-
- qh_initqhull_mem( )
- initialize mem.c for qhull
- qh.hull_dim and qh.normal_size determine some of the allocation sizes
- if qh.MERGING,
- includes ridgeT
- calls qh_user_memsizes() to add up to 10 additional sizes for quick allocation
- (see numsizes below)
-
- returns:
- mem.c already for qh_memalloc/qh_memfree (errors if called beforehand)
-
- notes:
- qh_produceoutput() prints memsizes
-
-*/
-void qh_initqhull_mem (void) {
- int numsizes;
- int i;
-
- numsizes= 8+10;
- qh_meminitbuffers (qh IStracing, qh_MEMalign, numsizes,
- qh_MEMbufsize,qh_MEMinitbuf);
- qh_memsize(sizeof(vertexT));
- if (qh MERGING) {
- qh_memsize(sizeof(ridgeT));
- qh_memsize(sizeof(mergeT));
- }
- qh_memsize(sizeof(facetT));
- i= sizeof(setT) + (qh hull_dim - 1) * SETelemsize; /* ridge.vertices */
- qh_memsize(i);
- qh_memsize(qh normal_size); /* normal */
- i += SETelemsize; /* facet.vertices, .ridges, .neighbors */
- qh_memsize(i);
- qh_user_memsizes();
- qh_memsetup();
-} /* initqhull_mem */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initqhull_start">-</a>
-
- qh_initqhull_start( infile, outfile, errfile )
- start initialization of qhull
- initialize statistics, stdio, default values for global variables
-
- see:
- qh_maxmin() determines the precision constants
-*/
-void qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile) {
-
- qh_CPUclock; /* start the clock */
-#if qh_QHpointer
- if (!(qh_qh= (qhT *)malloc (sizeof(qhT)))) {
- fprintf (errfile, "qhull error (qh_initqhull_globals): insufficient memory\n");
- exit (qh_ERRmem); /* no error handler */
- }
- memset((char *)qh_qh, 0, sizeof(qhT)); /* every field is 0, FALSE, NULL */
-#else
- memset((char *)&qh_qh, 0, sizeof(qhT));
-#endif
- strcat (qh qhull, "qhull");
- qh_initstatistics();
- qh ANGLEmerge= True;
- qh DROPdim= -1;
- qh ferr= errfile;
- qh fin= infile;
- qh fout= outfile;
- qh furthest_id= -1;
- qh JOGGLEmax= REALmax;
- qh KEEPminArea = REALmax;
- qh last_low= REALmax;
- qh last_high= REALmax;
- qh last_newhigh= REALmax;
- qh max_outside= 0.0;
- qh max_vertex= 0.0;
- qh MAXabs_coord= 0.0;
- qh MAXsumcoord= 0.0;
- qh MAXwidth= -REALmax;
- qh MERGEindependent= True;
- qh MINdenom_1= fmax_(1.0/REALmax, REALmin); /* used by qh_scalepoints */
- qh MINoutside= 0.0;
- qh MINvisible= REALmax;
- qh MAXcoplanar= REALmax;
- qh outside_err= REALmax;
- qh premerge_centrum= 0.0;
- qh premerge_cos= REALmax;
- qh PRINTprecision= True;
- qh PRINTradius= 0.0;
- qh postmerge_cos= REALmax;
- qh postmerge_centrum= 0.0;
- qh ROTATErandom= INT_MIN;
- qh MERGEvertices= True;
- qh totarea= 0.0;
- qh totvol= 0.0;
- qh TRACEdist= REALmax;
- qh TRACEpoint= -1; /* recompile or use 'TPn' */
- qh tracefacet_id= UINT_MAX; /* recompile to trace a facet */
- qh tracevertex_id= UINT_MAX; /* recompile to trace a vertex */
- qh_RANDOMseed_(1);
-} /* initqhull_start */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="initthresholds">-</a>
-
- qh_initthresholds( commandString )
- set thresholds for printing and scaling from commandString
-
- returns:
- sets qh.GOODthreshold or qh.SPLITthreshold if 'Pd0D1' used
-
- see:
- qh_initflags(), 'Qbk' 'QBk' 'Pdk' and 'PDk'
- qh_inthresholds()
-
- design:
- for each 'Pdn' or 'PDn' option
- check syntax
- set qh.lower_threshold or qh.upper_threshold
- set qh.GOODthreshold if an unbounded threshold is used
- set qh.SPLITthreshold if a bounded threshold is used
-*/
-void qh_initthresholds(char *command) {
- realT value;
- int index, maxdim, k;
- char *s= command;
- char key;
-
- maxdim= qh input_dim;
- if (qh DELAUNAY && (qh PROJECTdelaunay || qh PROJECTinput))
- maxdim++;
- while (*s) {
- if (*s == '-')
- s++;
- if (*s == 'P') {
- s++;
- while (*s && !isspace(key= *s++)) {
- if (key == 'd' || key == 'D') {
- if (!isdigit(*s)) {
- fprintf(qh ferr, "qhull warning: no dimension given for Print option '%c' at: %s. Ignored\n",
- key, s-1);
- continue;
- }
- index= qh_strtol (s, &s);
- if (index >= qh hull_dim) {
- fprintf(qh ferr, "qhull warning: dimension %d for Print option '%c' is >= %d. Ignored\n",
- index, key, qh hull_dim);
- continue;
- }
- if (*s == ':') {
- s++;
- value= qh_strtod(s, &s);
- if (fabs((double)value) > 1.0) {
- fprintf(qh ferr, "qhull warning: value %2.4g for Print option %c is > +1 or < -1. Ignored\n",
- value, key);
- continue;
- }
- }else
- value= 0.0;
- if (key == 'd')
- qh lower_threshold[index]= value;
- else
- qh upper_threshold[index]= value;
- }
- }
- }else if (*s == 'Q') {
- s++;
- while (*s && !isspace(key= *s++)) {
- if (key == 'b' && *s == 'B') {
- s++;
- for (k=maxdim; k--; ) {
- qh lower_bound[k]= -qh_DEFAULTbox;
- qh upper_bound[k]= qh_DEFAULTbox;
- }
- }else if (key == 'b' && *s == 'b')
- s++;
- else if (key == 'b' || key == 'B') {
- if (!isdigit(*s)) {
- fprintf(qh ferr, "qhull warning: no dimension given for Qhull option %c. Ignored\n",
- key);
- continue;
- }
- index= qh_strtol (s, &s);
- if (index >= maxdim) {
- fprintf(qh ferr, "qhull warning: dimension %d for Qhull option %c is >= %d. Ignored\n",
- index, key, maxdim);
- continue;
- }
- if (*s == ':') {
- s++;
- value= qh_strtod(s, &s);
- }else if (key == 'b')
- value= -qh_DEFAULTbox;
- else
- value= qh_DEFAULTbox;
- if (key == 'b')
- qh lower_bound[index]= value;
- else
- qh upper_bound[index]= value;
- }
- }
- }else {
- while (*s && !isspace (*s))
- s++;
- }
- while (isspace (*s))
- s++;
- }
- for (k= qh hull_dim; k--; ) {
- if (qh lower_threshold[k] > -REALmax/2) {
- qh GOODthreshold= True;
- if (qh upper_threshold[k] < REALmax/2) {
- qh SPLITthresholds= True;
- qh GOODthreshold= False;
- break;
- }
- }else if (qh upper_threshold[k] < REALmax/2)
- qh GOODthreshold= True;
- }
-} /* initthresholds */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="option">-</a>
-
- qh_option( option, intVal, realVal )
- add an option description to qh.qhull_options
-
- notes:
- will be printed with statistics ('Ts') and errors
- strlen(option) < 40
-*/
-void qh_option (char *option, int *i, realT *r) {
- char buf[200];
- int len, maxlen;
-
- sprintf (buf, " %s", option);
- if (i)
- sprintf (buf+strlen(buf), " %d", *i);
- if (r)
- sprintf (buf+strlen(buf), " %2.2g", *r);
- len= strlen(buf);
- qh qhull_optionlen += len;
- maxlen= sizeof (qh qhull_options) - len -1;
- maximize_(maxlen, 0);
- if (qh qhull_optionlen >= 80 && maxlen > 0) {
- qh qhull_optionlen= len;
- strncat (qh qhull_options, "\n", maxlen--);
- }
- strncat (qh qhull_options, buf, maxlen);
-} /* option */
-
-#if qh_QHpointer
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="restore_qhull">-</a>
-
- qh_restore_qhull( oldqh )
- restores a previously saved qhull
- also restores qh_qhstat and qhmem.tempstack
-
- notes:
- errors if current qhull hasn't been saved or freed
- uses qhmem for error reporting
-
- NOTE 1998/5/11:
- Freeing memory after qh_save_qhull and qh_restore_qhull
- is complicated. The procedures will be redesigned.
-
- see:
- qh_save_qhull()
-*/
-void qh_restore_qhull (qhT **oldqh) {
-
- if (*oldqh && strcmp ((*oldqh)->qhull, "qhull")) {
- fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): %p is not a qhull data structure\n",
- *oldqh);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- if (qh_qh) {
- fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): did not save or free existing qhull\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- if (!*oldqh || !(*oldqh)->old_qhstat) {
- fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): did not previously save qhull %p\n",
- *oldqh);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh_qh= *oldqh;
- *oldqh= NULL;
- qh_qhstat= qh old_qhstat;
- qhmem.tempstack= qh old_tempstack;
- trace1((qh ferr, "qh_restore_qhull: restored qhull from %p\n", *oldqh));
-} /* restore_qhull */
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="save_qhull">-</a>
-
- qh_save_qhull( )
- saves qhull for a later qh_restore_qhull
- also saves qh_qhstat and qhmem.tempstack
-
- returns:
- qh_qh=NULL
-
- notes:
- need to initialize qhull or call qh_restore_qhull before continuing
-
- NOTE 1998/5/11:
- Freeing memory after qh_save_qhull and qh_restore_qhull
- is complicated. The procedures will be redesigned.
-
- see:
- qh_restore_qhull()
-*/
-qhT *qh_save_qhull (void) {
- qhT *oldqh;
-
- trace1((qhmem.ferr, "qh_save_qhull: save qhull %p\n", qh_qh));
- if (!qh_qh) {
- fprintf (qhmem.ferr, "qhull internal error (qh_save_qhull): qhull not initialized\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh old_qhstat= qh_qhstat;
- qh_qhstat= NULL;
- qh old_tempstack= qhmem.tempstack;
- qhmem.tempstack= NULL;
- oldqh= qh_qh;
- qh_qh= NULL;
- return oldqh;
-} /* save_qhull */
-
-#endif
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="strtol">-</a>
-
- qh_strtol( s, endp) qh_strtod( s, endp)
- internal versions of strtol() and strtod()
- does not skip trailing spaces
- notes:
- some implementations of strtol()/strtod() skip trailing spaces
-*/
-double qh_strtod (const char *s, char **endp) {
- double result;
-
- result= strtod (s, endp);
- if (s < (*endp) && (*endp)[-1] == ' ')
- (*endp)--;
- return result;
-} /* strtod */
-
-int qh_strtol (const char *s, char **endp) {
- int result;
-
- result= (int) strtol (s, endp, 10);
- if (s< (*endp) && (*endp)[-1] == ' ')
- (*endp)--;
- return result;
-} /* strtol */
diff --git a/extern/qhull/src/io.c b/extern/qhull/src/io.c
deleted file mode 100644
index 9b0ccdd0b24..00000000000
--- a/extern/qhull/src/io.c
+++ /dev/null
@@ -1,4089 +0,0 @@
-/*<html><pre> -<a href="qh-io.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- io.c
- Input/Output routines of qhull application
-
- see qh-io.htm and io.h
-
- see user.c for qh_errprint and qh_printfacetlist
-
- unix.c calls qh_readpoints and qh_produce_output
-
- unix.c and user.c are the only callers of io.c functions
- This allows the user to avoid loading io.o from qhull.a
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*========= -prototypes for internal functions ========= */
-
-static int qh_compare_facetarea(const void *p1, const void *p2);
-static int qh_compare_facetmerge(const void *p1, const void *p2);
-static int qh_compare_facetvisit(const void *p1, const void *p2);
-int qh_compare_vertexpoint(const void *p1, const void *p2); /* not used */
-
-/*========= -functions in alphabetical order after qh_produce_output() =====*/
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="produce_output">-</a>
-
- qh_produce_output()
- prints out the result of qhull in desired format
- if qh.GETarea
- computes and prints area and volume
- qh.PRINTout[] is an array of output formats
-
- notes:
- prints output in qh.PRINTout order
-*/
-void qh_produce_output(void) {
- int i, tempsize= qh_setsize ((setT*)qhmem.tempstack), d_1;
-
- if (qh VORONOI) {
- qh_clearcenters (qh_ASvoronoi);
- qh_vertexneighbors();
- }
- if (qh TRIangulate) {
- qh_triangulate();
- if (qh VERIFYoutput && !qh CHECKfrequently)
- qh_checkpolygon (qh facet_list);
- }
- qh_findgood_all (qh facet_list);
- if (qh GETarea)
- qh_getarea(qh facet_list);
- if (qh KEEParea || qh KEEPmerge || qh KEEPminArea < REALmax/2)
- qh_markkeep (qh facet_list);
- if (qh PRINTsummary)
- qh_printsummary(qh ferr);
- else if (qh PRINTout[0] == qh_PRINTnone)
- qh_printsummary(qh fout);
- for (i= 0; i < qh_PRINTEND; i++)
- qh_printfacets (qh fout, qh PRINTout[i], qh facet_list, NULL, !qh_ALL);
- qh_allstatistics();
- if (qh PRINTprecision && !qh MERGING && (qh JOGGLEmax > REALmax/2 || qh RERUN))
- qh_printstats (qh ferr, qhstat precision, NULL);
- if (qh VERIFYoutput && (zzval_(Zridge) > 0 || zzval_(Zridgemid) > 0))
- qh_printstats (qh ferr, qhstat vridges, NULL);
- if (qh PRINTstatistics) {
- qh_collectstatistics();
- qh_printstatistics(qh ferr, "");
- qh_memstatistics (qh ferr);
- d_1= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;
- fprintf(qh ferr, "\
- size in bytes: merge %ld ridge %ld vertex %ld facet %ld\n\
- normal %d ridge vertices %d facet vertices or neighbors %ld\n",
- sizeof(mergeT), sizeof(ridgeT),
- sizeof(vertexT), sizeof(facetT),
- qh normal_size, d_1, d_1 + SETelemsize);
- }
- if (qh_setsize ((setT*)qhmem.tempstack) != tempsize) {
- fprintf (qh ferr, "qhull internal error (qh_produce_output): temporary sets not empty (%d)\n",
- qh_setsize ((setT*)qhmem.tempstack));
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
-} /* produce_output */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="dfacet">-</a>
-
- dfacet( id )
- print facet by id, for debugging
-
-*/
-void dfacet (unsigned id) {
- facetT *facet;
-
- FORALLfacets {
- if (facet->id == id) {
- qh_printfacet (qh fout, facet);
- break;
- }
- }
-} /* dfacet */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="dvertex">-</a>
-
- dvertex( id )
- print vertex by id, for debugging
-*/
-void dvertex (unsigned id) {
- vertexT *vertex;
-
- FORALLvertices {
- if (vertex->id == id) {
- qh_printvertex (qh fout, vertex);
- break;
- }
- }
-} /* dvertex */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="compare_vertexpoint">-</a>
-
- qh_compare_vertexpoint( p1, p2 )
- used by qsort() to order vertices by point id
-*/
-int qh_compare_vertexpoint(const void *p1, const void *p2) {
- vertexT *a= *((vertexT **)p1), *b= *((vertexT **)p2);
-
- return ((qh_pointid(a->point) > qh_pointid(b->point)?1:-1));
-} /* compare_vertexpoint */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="compare_facetarea">-</a>
-
- qh_compare_facetarea( p1, p2 )
- used by qsort() to order facets by area
-*/
-static int qh_compare_facetarea(const void *p1, const void *p2) {
- facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
-
- if (!a->isarea)
- return -1;
- if (!b->isarea)
- return 1;
- if (a->f.area > b->f.area)
- return 1;
- else if (a->f.area == b->f.area)
- return 0;
- return -1;
-} /* compare_facetarea */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="compare_facetmerge">-</a>
-
- qh_compare_facetmerge( p1, p2 )
- used by qsort() to order facets by number of merges
-*/
-static int qh_compare_facetmerge(const void *p1, const void *p2) {
- facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
-
- return (a->nummerge - b->nummerge);
-} /* compare_facetvisit */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="compare_facetvisit">-</a>
-
- qh_compare_facetvisit( p1, p2 )
- used by qsort() to order facets by visit id or id
-*/
-static int qh_compare_facetvisit(const void *p1, const void *p2) {
- facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
- int i,j;
-
- if (!(i= a->visitid))
- i= - a->id; /* do not convert to int */
- if (!(j= b->visitid))
- j= - b->id;
- return (i - j);
-} /* compare_facetvisit */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="countfacets">-</a>
-
- qh_countfacets( facetlist, facets, printall,
- numfacets, numsimplicial, totneighbors, numridges, numcoplanar, numtricoplanars )
- count good facets for printing and set visitid
- if allfacets, ignores qh_skipfacet()
-
- notes:
- qh_printsummary and qh_countfacets must match counts
-
- returns:
- numfacets, numsimplicial, total neighbors, numridges, coplanars
- each facet with ->visitid indicating 1-relative position
- ->visitid==0 indicates not good
-
- notes
- numfacets >= numsimplicial
- if qh.NEWfacets,
- does not count visible facets (matches qh_printafacet)
-
- design:
- for all facets on facetlist and in facets set
- unless facet is skipped or visible (i.e., will be deleted)
- mark facet->visitid
- update counts
-*/
-void qh_countfacets (facetT *facetlist, setT *facets, boolT printall,
- int *numfacetsp, int *numsimplicialp, int *totneighborsp, int *numridgesp, int *numcoplanarsp, int *numtricoplanarsp) {
- facetT *facet, **facetp;
- int numfacets= 0, numsimplicial= 0, numridges= 0, totneighbors= 0, numcoplanars= 0, numtricoplanars= 0;
-
- FORALLfacet_(facetlist) {
- if ((facet->visible && qh NEWfacets)
- || (!printall && qh_skipfacet(facet)))
- facet->visitid= 0;
- else {
- facet->visitid= ++numfacets;
- totneighbors += qh_setsize (facet->neighbors);
- if (facet->simplicial) {
- numsimplicial++;
- if (facet->keepcentrum && facet->tricoplanar)
- numtricoplanars++;
- }else
- numridges += qh_setsize (facet->ridges);
- if (facet->coplanarset)
- numcoplanars += qh_setsize (facet->coplanarset);
- }
- }
- FOREACHfacet_(facets) {
- if ((facet->visible && qh NEWfacets)
- || (!printall && qh_skipfacet(facet)))
- facet->visitid= 0;
- else {
- facet->visitid= ++numfacets;
- totneighbors += qh_setsize (facet->neighbors);
- if (facet->simplicial){
- numsimplicial++;
- if (facet->keepcentrum && facet->tricoplanar)
- numtricoplanars++;
- }else
- numridges += qh_setsize (facet->ridges);
- if (facet->coplanarset)
- numcoplanars += qh_setsize (facet->coplanarset);
- }
- }
- qh visit_id += numfacets+1;
- *numfacetsp= numfacets;
- *numsimplicialp= numsimplicial;
- *totneighborsp= totneighbors;
- *numridgesp= numridges;
- *numcoplanarsp= numcoplanars;
- *numtricoplanarsp= numtricoplanars;
-} /* countfacets */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="detvnorm">-</a>
-
- qh_detvnorm( vertex, vertexA, centers, offset )
- compute separating plane of the Voronoi diagram for a pair of input sites
- centers= set of facets (i.e., Voronoi vertices)
- facet->visitid= 0 iff vertex-at-infinity (i.e., unbounded)
-
- assumes:
- qh_ASvoronoi and qh_vertexneighbors() already set
-
- returns:
- norm
- a pointer into qh.gm_matrix to qh.hull_dim-1 reals
- copy the data before reusing qh.gm_matrix
- offset
- if 'QVn'
- sign adjusted so that qh.GOODvertexp is inside
- else
- sign adjusted so that vertex is inside
-
- qh.gm_matrix= simplex of points from centers relative to first center
-
- notes:
- in io.c so that code for 'v Tv' can be removed by removing io.c
- returns pointer into qh.gm_matrix to avoid tracking of temporary memory
-
- design:
- determine midpoint of input sites
- build points as the set of Voronoi vertices
- select a simplex from points (if necessary)
- include midpoint if the Voronoi region is unbounded
- relocate the first vertex of the simplex to the origin
- compute the normalized hyperplane through the simplex
- orient the hyperplane toward 'QVn' or 'vertex'
- if 'Tv' or 'Ts'
- if bounded
- test that hyperplane is the perpendicular bisector of the input sites
- test that Voronoi vertices not in the simplex are still on the hyperplane
- free up temporary memory
-*/
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp) {
- facetT *facet, **facetp;
- int i, k, pointid, pointidA, point_i, point_n;
- setT *simplex= NULL;
- pointT *point, **pointp, *point0, *midpoint, *normal, *inpoint;
- coordT *coord, *gmcoord, *normalp;
- setT *points= qh_settemp (qh TEMPsize);
- boolT nearzero= False;
- boolT unbounded= False;
- int numcenters= 0;
- int dim= qh hull_dim - 1;
- realT dist, offset, angle, zero= 0.0;
-
- midpoint= qh gm_matrix + qh hull_dim * qh hull_dim; /* last row */
- for (k= 0; k < dim; k++)
- midpoint[k]= (vertex->point[k] + vertexA->point[k])/2;
- FOREACHfacet_(centers) {
- numcenters++;
- if (!facet->visitid)
- unbounded= True;
- else {
- if (!facet->center)
- facet->center= qh_facetcenter (facet->vertices);
- qh_setappend (&points, facet->center);
- }
- }
- if (numcenters > dim) {
- simplex= qh_settemp (qh TEMPsize);
- qh_setappend (&simplex, vertex->point);
- if (unbounded)
- qh_setappend (&simplex, midpoint);
- qh_maxsimplex (dim, points, NULL, 0, &simplex);
- qh_setdelnth (simplex, 0);
- }else if (numcenters == dim) {
- if (unbounded)
- qh_setappend (&points, midpoint);
- simplex= points;
- }else {
- fprintf(qh ferr, "qh_detvnorm: too few points (%d) to compute separating plane\n", numcenters);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- i= 0;
- gmcoord= qh gm_matrix;
- point0= SETfirstt_(simplex, pointT);
- FOREACHpoint_(simplex) {
- if (qh IStracing >= 4)
- qh_printmatrix(qh ferr, "qh_detvnorm: Voronoi vertex or midpoint",
- &point, 1, dim);
- if (point != point0) {
- qh gm_row[i++]= gmcoord;
- coord= point0;
- for (k= dim; k--; )
- *(gmcoord++)= *point++ - *coord++;
- }
- }
- qh gm_row[i]= gmcoord; /* does not overlap midpoint, may be used later for qh_areasimplex */
- normal= gmcoord;
- qh_sethyperplane_gauss (dim, qh gm_row, point0, True,
- normal, &offset, &nearzero);
- if (qh GOODvertexp == vertexA->point)
- inpoint= vertexA->point;
- else
- inpoint= vertex->point;
- zinc_(Zdistio);
- dist= qh_distnorm (dim, inpoint, normal, &offset);
- if (dist > 0) {
- offset= -offset;
- normalp= normal;
- for (k= dim; k--; ) {
- *normalp= -(*normalp);
- normalp++;
- }
- }
- if (qh VERIFYoutput || qh PRINTstatistics) {
- pointid= qh_pointid (vertex->point);
- pointidA= qh_pointid (vertexA->point);
- if (!unbounded) {
- zinc_(Zdiststat);
- dist= qh_distnorm (dim, midpoint, normal, &offset);
- if (dist < 0)
- dist= -dist;
- zzinc_(Zridgemid);
- wwmax_(Wridgemidmax, dist);
- wwadd_(Wridgemid, dist);
- trace4((qh ferr, "qh_detvnorm: points %d %d midpoint dist %2.2g\n",
- pointid, pointidA, dist));
- for (k= 0; k < dim; k++)
- midpoint[k]= vertexA->point[k] - vertex->point[k]; /* overwrites midpoint! */
- qh_normalize (midpoint, dim, False);
- angle= qh_distnorm (dim, midpoint, normal, &zero); /* qh_detangle uses dim+1 */
- if (angle < 0.0)
- angle= angle + 1.0;
- else
- angle= angle - 1.0;
- if (angle < 0.0)
- angle -= angle;
- trace4((qh ferr, "qh_detvnorm: points %d %d angle %2.2g nearzero %d\n",
- pointid, pointidA, angle, nearzero));
- if (nearzero) {
- zzinc_(Zridge0);
- wwmax_(Wridge0max, angle);
- wwadd_(Wridge0, angle);
- }else {
- zzinc_(Zridgeok)
- wwmax_(Wridgeokmax, angle);
- wwadd_(Wridgeok, angle);
- }
- }
- if (simplex != points) {
- FOREACHpoint_i_(points) {
- if (!qh_setin (simplex, point)) {
- facet= SETelemt_(centers, point_i, facetT);
- zinc_(Zdiststat);
- dist= qh_distnorm (dim, point, normal, &offset);
- if (dist < 0)
- dist= -dist;
- zzinc_(Zridge);
- wwmax_(Wridgemax, dist);
- wwadd_(Wridge, dist);
- trace4((qh ferr, "qh_detvnorm: points %d %d Voronoi vertex %d dist %2.2g\n",
- pointid, pointidA, facet->visitid, dist));
- }
- }
- }
- }
- *offsetp= offset;
- if (simplex != points)
- qh_settempfree (&simplex);
- qh_settempfree (&points);
- return normal;
-} /* detvnorm */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="detvridge">-</a>
-
- qh_detvridge( vertexA )
- determine Voronoi ridge from 'seen' neighbors of vertexA
- include one vertex-at-infinite if an !neighbor->visitid
-
- returns:
- temporary set of centers (facets, i.e., Voronoi vertices)
- sorted by center id
-*/
-setT *qh_detvridge (vertexT *vertex) {
- setT *centers= qh_settemp (qh TEMPsize);
- setT *tricenters= qh_settemp (qh TEMPsize);
- facetT *neighbor, **neighborp;
- boolT firstinf= True;
-
- FOREACHneighbor_(vertex) {
- if (neighbor->seen) {
- if (neighbor->visitid) {
- if (!neighbor->tricoplanar || qh_setunique (&tricenters, neighbor->center))
- qh_setappend (&centers, neighbor);
- }else if (firstinf) {
- firstinf= False;
- qh_setappend (&centers, neighbor);
- }
- }
- }
- qsort (SETaddr_(centers, facetT), qh_setsize (centers),
- sizeof (facetT *), qh_compare_facetvisit);
- qh_settempfree (&tricenters);
- return centers;
-} /* detvridge */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="detvridge3">-</a>
-
- qh_detvridge3( atvertex, vertex )
- determine 3-d Voronoi ridge from 'seen' neighbors of atvertex and vertex
- include one vertex-at-infinite for !neighbor->visitid
- assumes all facet->seen2= True
-
- returns:
- temporary set of centers (facets, i.e., Voronoi vertices)
- listed in adjacency order (not oriented)
- all facet->seen2= True
-
- design:
- mark all neighbors of atvertex
- for each adjacent neighbor of both atvertex and vertex
- if neighbor selected
- add neighbor to set of Voronoi vertices
-*/
-setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex) {
- setT *centers= qh_settemp (qh TEMPsize);
- setT *tricenters= qh_settemp (qh TEMPsize);
- facetT *neighbor, **neighborp, *facet= NULL;
- boolT firstinf= True;
-
- FOREACHneighbor_(atvertex)
- neighbor->seen2= False;
- FOREACHneighbor_(vertex) {
- if (!neighbor->seen2) {
- facet= neighbor;
- break;
- }
- }
- while (facet) {
- facet->seen2= True;
- if (neighbor->seen) {
- if (facet->visitid) {
- if (!facet->tricoplanar || qh_setunique (&tricenters, facet->center))
- qh_setappend (&centers, facet);
- }else if (firstinf) {
- firstinf= False;
- qh_setappend (&centers, facet);
- }
- }
- FOREACHneighbor_(facet) {
- if (!neighbor->seen2) {
- if (qh_setin (vertex->neighbors, neighbor))
- break;
- else
- neighbor->seen2= True;
- }
- }
- facet= neighbor;
- }
- if (qh CHECKfrequently) {
- FOREACHneighbor_(vertex) {
- if (!neighbor->seen2) {
- fprintf (stderr, "qh_detvridge3: neigbors of vertex p%d are not connected at facet %d\n",
- qh_pointid (vertex->point), neighbor->id);
- qh_errexit (qh_ERRqhull, neighbor, NULL);
- }
- }
- }
- FOREACHneighbor_(atvertex)
- neighbor->seen2= True;
- qh_settempfree (&tricenters);
- return centers;
-} /* detvridge3 */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="eachvoronoi">-</a>
-
- qh_eachvoronoi( fp, printvridge, vertex, visitall, innerouter, inorder )
- if visitall,
- visit all Voronoi ridges for vertex (i.e., an input site)
- else
- visit all unvisited Voronoi ridges for vertex
- all vertex->seen= False if unvisited
- assumes
- all facet->seen= False
- all facet->seen2= True (for qh_detvridge3)
- all facet->visitid == 0 if vertex_at_infinity
- == index of Voronoi vertex
- >= qh.num_facets if ignored
- innerouter:
- qh_RIDGEall-- both inner (bounded) and outer (unbounded) ridges
- qh_RIDGEinner- only inner
- qh_RIDGEouter- only outer
-
- if inorder
- orders vertices for 3-d Voronoi diagrams
-
- returns:
- number of visited ridges (does not include previously visited ridges)
-
- if printvridge,
- calls printvridge( fp, vertex, vertexA, centers)
- fp== any pointer (assumes FILE*)
- vertex,vertexA= pair of input sites that define a Voronoi ridge
- centers= set of facets (i.e., Voronoi vertices)
- ->visitid == index or 0 if vertex_at_infinity
- ordered for 3-d Voronoi diagram
- notes:
- uses qh.vertex_visit
-
- see:
- qh_eachvoronoi_all()
-
- design:
- mark selected neighbors of atvertex
- for each selected neighbor (either Voronoi vertex or vertex-at-infinity)
- for each unvisited vertex
- if atvertex and vertex share more than d-1 neighbors
- bump totalcount
- if printvridge defined
- build the set of shared neighbors (i.e., Voronoi vertices)
- call printvridge
-*/
-int qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder) {
- boolT unbounded;
- int count;
- facetT *neighbor, **neighborp, *neighborA, **neighborAp;
- setT *centers;
- setT *tricenters= qh_settemp (qh TEMPsize);
-
- vertexT *vertex, **vertexp;
- boolT firstinf;
- unsigned int numfacets= (unsigned int)qh num_facets;
- int totridges= 0;
-
- qh vertex_visit++;
- atvertex->seen= True;
- if (visitall) {
- FORALLvertices
- vertex->seen= False;
- }
- FOREACHneighbor_(atvertex) {
- if (neighbor->visitid < numfacets)
- neighbor->seen= True;
- }
- FOREACHneighbor_(atvertex) {
- if (neighbor->seen) {
- FOREACHvertex_(neighbor->vertices) {
- if (vertex->visitid != qh vertex_visit && !vertex->seen) {
- vertex->visitid= qh vertex_visit;
- count= 0;
- firstinf= True;
- qh_settruncate (tricenters, 0);
- FOREACHneighborA_(vertex) {
- if (neighborA->seen) {
- if (neighborA->visitid) {
- if (!neighborA->tricoplanar || qh_setunique (&tricenters, neighborA->center))
- count++;
- }else if (firstinf) {
- count++;
- firstinf= False;
- }
- }
- }
- if (count >= qh hull_dim - 1) { /* e.g., 3 for 3-d Voronoi */
- if (firstinf) {
- if (innerouter == qh_RIDGEouter)
- continue;
- unbounded= False;
- }else {
- if (innerouter == qh_RIDGEinner)
- continue;
- unbounded= True;
- }
- totridges++;
- trace4((qh ferr, "qh_eachvoronoi: Voronoi ridge of %d vertices between sites %d and %d\n",
- count, qh_pointid (atvertex->point), qh_pointid (vertex->point)));
- if (printvridge) {
- if (inorder && qh hull_dim == 3+1) /* 3-d Voronoi diagram */
- centers= qh_detvridge3 (atvertex, vertex);
- else
- centers= qh_detvridge (vertex);
- (*printvridge) (fp, atvertex, vertex, centers, unbounded);
- qh_settempfree (&centers);
- }
- }
- }
- }
- }
- }
- FOREACHneighbor_(atvertex)
- neighbor->seen= False;
- qh_settempfree (&tricenters);
- return totridges;
-} /* eachvoronoi */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="eachvoronoi_all">-</a>
-
- qh_eachvoronoi_all( fp, printvridge, isupper, innerouter, inorder )
- visit all Voronoi ridges
-
- innerouter:
- see qh_eachvoronoi()
-
- if inorder
- orders vertices for 3-d Voronoi diagrams
-
- returns
- total number of ridges
-
- if isupper == facet->upperdelaunay (i.e., a Vornoi vertex)
- facet->visitid= Voronoi vertex index (same as 'o' format)
- else
- facet->visitid= 0
-
- if printvridge,
- calls printvridge( fp, vertex, vertexA, centers)
- [see qh_eachvoronoi]
-
- notes:
- Not used for qhull.exe
- same effect as qh_printvdiagram but ridges not sorted by point id
-*/
-int qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder) {
- facetT *facet;
- vertexT *vertex;
- int numcenters= 1; /* vertex 0 is vertex-at-infinity */
- int totridges= 0;
-
- qh_clearcenters (qh_ASvoronoi);
- qh_vertexneighbors();
- maximize_(qh visit_id, (unsigned) qh num_facets);
- FORALLfacets {
- facet->visitid= 0;
- facet->seen= False;
- facet->seen2= True;
- }
- FORALLfacets {
- if (facet->upperdelaunay == isupper)
- facet->visitid= numcenters++;
- }
- FORALLvertices
- vertex->seen= False;
- FORALLvertices {
- if (qh GOODvertex > 0 && qh_pointid(vertex->point)+1 != qh GOODvertex)
- continue;
- totridges += qh_eachvoronoi (fp, printvridge, vertex,
- !qh_ALL, innerouter, inorder);
- }
- return totridges;
-} /* eachvoronoi_all */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="facet2point">-</a>
-
- qh_facet2point( facet, point0, point1, mindist )
- return two projected temporary vertices for a 2-d facet
- may be non-simplicial
-
- returns:
- point0 and point1 oriented and projected to the facet
- returns mindist (maximum distance below plane)
-*/
-void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist) {
- vertexT *vertex0, *vertex1;
- realT dist;
-
- if (facet->toporient ^ qh_ORIENTclock) {
- vertex0= SETfirstt_(facet->vertices, vertexT);
- vertex1= SETsecondt_(facet->vertices, vertexT);
- }else {
- vertex1= SETfirstt_(facet->vertices, vertexT);
- vertex0= SETsecondt_(facet->vertices, vertexT);
- }
- zadd_(Zdistio, 2);
- qh_distplane(vertex0->point, facet, &dist);
- *mindist= dist;
- *point0= qh_projectpoint(vertex0->point, facet, dist);
- qh_distplane(vertex1->point, facet, &dist);
- minimize_(*mindist, dist);
- *point1= qh_projectpoint(vertex1->point, facet, dist);
-} /* facet2point */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="facetvertices">-</a>
-
- qh_facetvertices( facetlist, facets, allfacets )
- returns temporary set of vertices in a set and/or list of facets
- if allfacets, ignores qh_skipfacet()
-
- returns:
- vertices with qh.vertex_visit
-
- notes:
- optimized for allfacets of facet_list
-
- design:
- if allfacets of facet_list
- create vertex set from vertex_list
- else
- for each selected facet in facets or facetlist
- append unvisited vertices to vertex set
-*/
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets) {
- setT *vertices;
- facetT *facet, **facetp;
- vertexT *vertex, **vertexp;
-
- qh vertex_visit++;
- if (facetlist == qh facet_list && allfacets && !facets) {
- vertices= qh_settemp (qh num_vertices);
- FORALLvertices {
- vertex->visitid= qh vertex_visit;
- qh_setappend (&vertices, vertex);
- }
- }else {
- vertices= qh_settemp (qh TEMPsize);
- FORALLfacet_(facetlist) {
- if (!allfacets && qh_skipfacet (facet))
- continue;
- FOREACHvertex_(facet->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- vertex->visitid= qh vertex_visit;
- qh_setappend (&vertices, vertex);
- }
- }
- }
- }
- FOREACHfacet_(facets) {
- if (!allfacets && qh_skipfacet (facet))
- continue;
- FOREACHvertex_(facet->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- vertex->visitid= qh vertex_visit;
- qh_setappend (&vertices, vertex);
- }
- }
- }
- return vertices;
-} /* facetvertices */
-
-/*-<a href="qh-geom.htm#TOC"
- >-------------------------------</a><a name="geomplanes">-</a>
-
- qh_geomplanes( facet, outerplane, innerplane )
- return outer and inner planes for Geomview
- qh.PRINTradius is size of vertices and points (includes qh.JOGGLEmax)
-
- notes:
- assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
-*/
-void qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane) {
- realT radius;
-
- if (qh MERGING || qh JOGGLEmax < REALmax/2) {
- qh_outerinner (facet, outerplane, innerplane);
- radius= qh PRINTradius;
- if (qh JOGGLEmax < REALmax/2)
- radius -= qh JOGGLEmax * sqrt (qh hull_dim); /* already accounted for in qh_outerinner() */
- *outerplane += radius;
- *innerplane -= radius;
- if (qh PRINTcoplanar || qh PRINTspheres) {
- *outerplane += qh MAXabs_coord * qh_GEOMepsilon;
- *innerplane -= qh MAXabs_coord * qh_GEOMepsilon;
- }
- }else
- *innerplane= *outerplane= 0;
-} /* geomplanes */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="markkeep">-</a>
-
- qh_markkeep( facetlist )
- mark good facets that meet qh.KEEParea, qh.KEEPmerge, and qh.KEEPminArea
- ignores visible facets (not part of convex hull)
-
- returns:
- may clear facet->good
- recomputes qh.num_good
-
- design:
- get set of good facets
- if qh.KEEParea
- sort facets by area
- clear facet->good for all but n largest facets
- if qh.KEEPmerge
- sort facets by merge count
- clear facet->good for all but n most merged facets
- if qh.KEEPminarea
- clear facet->good if area too small
- update qh.num_good
-*/
-void qh_markkeep (facetT *facetlist) {
- facetT *facet, **facetp;
- setT *facets= qh_settemp (qh num_facets);
- int size, count;
-
- trace2((qh ferr, "qh_markkeep: only keep %d largest and/or %d most merged facets and/or min area %.2g\n",
- qh KEEParea, qh KEEPmerge, qh KEEPminArea));
- FORALLfacet_(facetlist) {
- if (!facet->visible && facet->good)
- qh_setappend (&facets, facet);
- }
- size= qh_setsize (facets);
- if (qh KEEParea) {
- qsort (SETaddr_(facets, facetT), size,
- sizeof (facetT *), qh_compare_facetarea);
- if ((count= size - qh KEEParea) > 0) {
- FOREACHfacet_(facets) {
- facet->good= False;
- if (--count == 0)
- break;
- }
- }
- }
- if (qh KEEPmerge) {
- qsort (SETaddr_(facets, facetT), size,
- sizeof (facetT *), qh_compare_facetmerge);
- if ((count= size - qh KEEPmerge) > 0) {
- FOREACHfacet_(facets) {
- facet->good= False;
- if (--count == 0)
- break;
- }
- }
- }
- if (qh KEEPminArea < REALmax/2) {
- FOREACHfacet_(facets) {
- if (!facet->isarea || facet->f.area < qh KEEPminArea)
- facet->good= False;
- }
- }
- qh_settempfree (&facets);
- count= 0;
- FORALLfacet_(facetlist) {
- if (facet->good)
- count++;
- }
- qh num_good= count;
-} /* markkeep */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="markvoronoi">-</a>
-
- qh_markvoronoi( facetlist, facets, printall, islower, numcenters )
- mark voronoi vertices for printing by site pairs
-
- returns:
- temporary set of vertices indexed by pointid
- islower set if printing lower hull (i.e., at least one facet is lower hull)
- numcenters= total number of Voronoi vertices
- bumps qh.printoutnum for vertex-at-infinity
- clears all facet->seen and sets facet->seen2
-
- if selected
- facet->visitid= Voronoi vertex id
- else if upper hull (or 'Qu' and lower hull)
- facet->visitid= 0
- else
- facet->visitid >= qh num_facets
-
- notes:
- ignores qh.ATinfinity, if defined
-*/
-setT *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp) {
- int numcenters=0;
- facetT *facet, **facetp;
- setT *vertices;
- boolT islower= False;
-
- qh printoutnum++;
- qh_clearcenters (qh_ASvoronoi); /* in case, qh_printvdiagram2 called by user */
- qh_vertexneighbors();
- vertices= qh_pointvertex();
- if (qh ATinfinity)
- SETelem_(vertices, qh num_points-1)= NULL;
- qh visit_id++;
- maximize_(qh visit_id, (unsigned) qh num_facets);
- FORALLfacet_(facetlist) {
- if (printall || !qh_skipfacet (facet)) {
- if (!facet->upperdelaunay) {
- islower= True;
- break;
- }
- }
- }
- FOREACHfacet_(facets) {
- if (printall || !qh_skipfacet (facet)) {
- if (!facet->upperdelaunay) {
- islower= True;
- break;
- }
- }
- }
- FORALLfacets {
- if (facet->normal && (facet->upperdelaunay == islower))
- facet->visitid= 0; /* facetlist or facets may overwrite */
- else
- facet->visitid= qh visit_id;
- facet->seen= False;
- facet->seen2= True;
- }
- numcenters++; /* qh_INFINITE */
- FORALLfacet_(facetlist) {
- if (printall || !qh_skipfacet (facet))
- facet->visitid= numcenters++;
- }
- FOREACHfacet_(facets) {
- if (printall || !qh_skipfacet (facet))
- facet->visitid= numcenters++;
- }
- *islowerp= islower;
- *numcentersp= numcenters;
- trace2((qh ferr, "qh_markvoronoi: islower %d numcenters %d\n", islower, numcenters));
- return vertices;
-} /* markvoronoi */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="order_vertexneighbors">-</a>
-
- qh_order_vertexneighbors( vertex )
- order facet neighbors of a 2-d or 3-d vertex by adjacency
-
- notes:
- does not orient the neighbors
-
- design:
- initialize a new neighbor set with the first facet in vertex->neighbors
- while vertex->neighbors non-empty
- select next neighbor in the previous facet's neighbor set
- set vertex->neighbors to the new neighbor set
-*/
-void qh_order_vertexneighbors(vertexT *vertex) {
- setT *newset;
- facetT *facet, *neighbor, **neighborp;
-
- trace4((qh ferr, "qh_order_vertexneighbors: order neighbors of v%d for 3-d\n", vertex->id));
- newset= qh_settemp (qh_setsize (vertex->neighbors));
- facet= (facetT*)qh_setdellast (vertex->neighbors);
- qh_setappend (&newset, facet);
- while (qh_setsize (vertex->neighbors)) {
- FOREACHneighbor_(vertex) {
- if (qh_setin (facet->neighbors, neighbor)) {
- qh_setdel(vertex->neighbors, neighbor);
- qh_setappend (&newset, neighbor);
- facet= neighbor;
- break;
- }
- }
- if (!neighbor) {
- fprintf (qh ferr, "qhull internal error (qh_order_vertexneighbors): no neighbor of v%d for f%d\n",
- vertex->id, facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- }
- qh_setfree (&vertex->neighbors);
- qh_settemppop ();
- vertex->neighbors= newset;
-} /* order_vertexneighbors */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printafacet">-</a>
-
- qh_printafacet( fp, format, facet, printall )
- print facet to fp in given output format (see qh.PRINTout)
-
- returns:
- nop if !printall and qh_skipfacet()
- nop if visible facet and NEWfacets and format != PRINTfacets
- must match qh_countfacets
-
- notes
- preserves qh.visit_id
- facet->normal may be null if PREmerge/MERGEexact and STOPcone before merge
-
- see
- qh_printbegin() and qh_printend()
-
- design:
- test for printing facet
- call appropriate routine for format
- or output results directly
-*/
-void qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall) {
- realT color[4], offset, dist, outerplane, innerplane;
- boolT zerodiv;
- coordT *point, *normp, *coordp, **pointp, *feasiblep;
- int k;
- vertexT *vertex, **vertexp;
- facetT *neighbor, **neighborp;
-
- if (!printall && qh_skipfacet (facet))
- return;
- if (facet->visible && qh NEWfacets && format != qh_PRINTfacets)
- return;
- qh printoutnum++;
- switch (format) {
- case qh_PRINTarea:
- if (facet->isarea) {
- fprintf (fp, qh_REAL_1, facet->f.area);
- fprintf (fp, "\n");
- }else
- fprintf (fp, "0\n");
- break;
- case qh_PRINTcoplanars:
- fprintf (fp, "%d", qh_setsize (facet->coplanarset));
- FOREACHpoint_(facet->coplanarset)
- fprintf (fp, " %d", qh_pointid (point));
- fprintf (fp, "\n");
- break;
- case qh_PRINTcentrums:
- qh_printcenter (fp, format, NULL, facet);
- break;
- case qh_PRINTfacets:
- qh_printfacet (fp, facet);
- break;
- case qh_PRINTfacets_xridge:
- qh_printfacetheader (fp, facet);
- break;
- case qh_PRINTgeom: /* either 2 , 3, or 4-d by qh_printbegin */
- if (!facet->normal)
- break;
- for (k= qh hull_dim; k--; ) {
- color[k]= (facet->normal[k]+1.0)/2.0;
- maximize_(color[k], -1.0);
- minimize_(color[k], +1.0);
- }
- qh_projectdim3 (color, color);
- if (qh PRINTdim != qh hull_dim)
- qh_normalize2 (color, 3, True, NULL, NULL);
- if (qh hull_dim <= 2)
- qh_printfacet2geom (fp, facet, color);
- else if (qh hull_dim == 3) {
- if (facet->simplicial)
- qh_printfacet3geom_simplicial (fp, facet, color);
- else
- qh_printfacet3geom_nonsimplicial (fp, facet, color);
- }else {
- if (facet->simplicial)
- qh_printfacet4geom_simplicial (fp, facet, color);
- else
- qh_printfacet4geom_nonsimplicial (fp, facet, color);
- }
- break;
- case qh_PRINTids:
- fprintf (fp, "%d\n", facet->id);
- break;
- case qh_PRINTincidences:
- case qh_PRINToff:
- case qh_PRINTtriangles:
- if (qh hull_dim == 3 && format != qh_PRINTtriangles)
- qh_printfacet3vertex (fp, facet, format);
- else if (facet->simplicial || qh hull_dim == 2 || format == qh_PRINToff)
- qh_printfacetNvertex_simplicial (fp, facet, format);
- else
- qh_printfacetNvertex_nonsimplicial (fp, facet, qh printoutvar++, format);
- break;
- case qh_PRINTinner:
- qh_outerinner (facet, NULL, &innerplane);
- offset= facet->offset - innerplane;
- goto LABELprintnorm;
- break; /* prevent warning */
- case qh_PRINTmerges:
- fprintf (fp, "%d\n", facet->nummerge);
- break;
- case qh_PRINTnormals:
- offset= facet->offset;
- goto LABELprintnorm;
- break; /* prevent warning */
- case qh_PRINTouter:
- qh_outerinner (facet, &outerplane, NULL);
- offset= facet->offset - outerplane;
- LABELprintnorm:
- if (!facet->normal) {
- fprintf (fp, "no normal for facet f%d\n", facet->id);
- break;
- }
- if (qh CDDoutput) {
- fprintf (fp, qh_REAL_1, -offset);
- for (k=0; k < qh hull_dim; k++)
- fprintf (fp, qh_REAL_1, -facet->normal[k]);
- }else {
- for (k=0; k < qh hull_dim; k++)
- fprintf (fp, qh_REAL_1, facet->normal[k]);
- fprintf (fp, qh_REAL_1, offset);
- }
- fprintf (fp, "\n");
- break;
- case qh_PRINTmathematica: /* either 2 or 3-d by qh_printbegin */
- if (qh hull_dim == 2)
- qh_printfacet2math (fp, facet, qh printoutvar++);
- else
- qh_printfacet3math (fp, facet, qh printoutvar++);
- break;
- case qh_PRINTneighbors:
- fprintf (fp, "%d", qh_setsize (facet->neighbors));
- FOREACHneighbor_(facet)
- fprintf (fp, " %d",
- neighbor->visitid ? neighbor->visitid - 1: - neighbor->id);
- fprintf (fp, "\n");
- break;
- case qh_PRINTpointintersect:
- if (!qh feasible_point) {
- fprintf (fp, "qhull input error (qh_printafacet): option 'Fp' needs qh feasible_point\n");
- qh_errexit( qh_ERRinput, NULL, NULL);
- }
- if (facet->offset > 0)
- goto LABELprintinfinite;
- point= coordp= (coordT*)qh_memalloc (qh normal_size);
- normp= facet->normal;
- feasiblep= qh feasible_point;
- if (facet->offset < -qh MINdenom) {
- for (k= qh hull_dim; k--; )
- *(coordp++)= (*(normp++) / - facet->offset) + *(feasiblep++);
- }else {
- for (k= qh hull_dim; k--; ) {
- *(coordp++)= qh_divzero (*(normp++), facet->offset, qh MINdenom_1,
- &zerodiv) + *(feasiblep++);
- if (zerodiv) {
- qh_memfree (point, qh normal_size);
- goto LABELprintinfinite;
- }
- }
- }
- qh_printpoint (fp, NULL, point);
- qh_memfree (point, qh normal_size);
- break;
- LABELprintinfinite:
- for (k= qh hull_dim; k--; )
- fprintf (fp, qh_REAL_1, qh_INFINITE);
- fprintf (fp, "\n");
- break;
- case qh_PRINTpointnearest:
- FOREACHpoint_(facet->coplanarset) {
- int id, id2;
- vertex= qh_nearvertex (facet, point, &dist);
- id= qh_pointid (vertex->point);
- id2= qh_pointid (point);
- fprintf (fp, "%d %d %d " qh_REAL_1 "\n", id, id2, facet->id, dist);
- }
- break;
- case qh_PRINTpoints: /* VORONOI only by qh_printbegin */
- if (qh CDDoutput)
- fprintf (fp, "1 ");
- qh_printcenter (fp, format, NULL, facet);
- break;
- case qh_PRINTvertices:
- fprintf (fp, "%d", qh_setsize (facet->vertices));
- FOREACHvertex_(facet->vertices)
- fprintf (fp, " %d", qh_pointid (vertex->point));
- fprintf (fp, "\n");
- break;
- }
-} /* printafacet */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printbegin">-</a>
-
- qh_printbegin( )
- prints header for all output formats
-
- returns:
- checks for valid format
-
- notes:
- uses qh.visit_id for 3/4off
- changes qh.interior_point if printing centrums
- qh_countfacets clears facet->visitid for non-good facets
-
- see
- qh_printend() and qh_printafacet()
-
- design:
- count facets and related statistics
- print header for format
-*/
-void qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
- int numfacets, numsimplicial, numridges, totneighbors, numcoplanars, numtricoplanars;
- int i, num;
- facetT *facet, **facetp;
- vertexT *vertex, **vertexp;
- setT *vertices;
- pointT *point, **pointp, *pointtemp;
-
- qh printoutnum= 0;
- qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial,
- &totneighbors, &numridges, &numcoplanars, &numtricoplanars);
- switch (format) {
- case qh_PRINTnone:
- break;
- case qh_PRINTarea:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINTcoplanars:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINTcentrums:
- if (qh CENTERtype == qh_ASnone)
- qh_clearcenters (qh_AScentrum);
- fprintf (fp, "%d\n%d\n", qh hull_dim, numfacets);
- break;
- case qh_PRINTfacets:
- case qh_PRINTfacets_xridge:
- if (facetlist)
- qh_printvertexlist (fp, "Vertices and facets:\n", facetlist, facets, printall);
- break;
- case qh_PRINTgeom:
- if (qh hull_dim > 4) /* qh_initqhull_globals also checks */
- goto LABELnoformat;
- if (qh VORONOI && qh hull_dim > 3) /* PRINTdim == DROPdim == hull_dim-1 */
- goto LABELnoformat;
- if (qh hull_dim == 2 && (qh PRINTridges || qh DOintersections))
- fprintf (qh ferr, "qhull warning: output for ridges and intersections not implemented in 2-d\n");
- if (qh hull_dim == 4 && (qh PRINTinner || qh PRINTouter ||
- (qh PRINTdim == 4 && qh PRINTcentrums)))
- fprintf (qh ferr, "qhull warning: output for outer/inner planes and centrums not implemented in 4-d\n");
- if (qh PRINTdim == 4 && (qh PRINTspheres))
- fprintf (qh ferr, "qhull warning: output for vertices not implemented in 4-d\n");
- if (qh PRINTdim == 4 && qh DOintersections && qh PRINTnoplanes)
- fprintf (qh ferr, "qhull warning: 'Gnh' generates no output in 4-d\n");
- if (qh PRINTdim == 2) {
- fprintf(fp, "{appearance {linewidth 3} LIST # %s | %s\n",
- qh rbox_command, qh qhull_command);
- }else if (qh PRINTdim == 3) {
- fprintf(fp, "{appearance {+edge -evert linewidth 2} LIST # %s | %s\n",
- qh rbox_command, qh qhull_command);
- }else if (qh PRINTdim == 4) {
- qh visit_id++;
- num= 0;
- FORALLfacet_(facetlist) /* get number of ridges to be printed */
- qh_printend4geom (NULL, facet, &num, printall);
- FOREACHfacet_(facets)
- qh_printend4geom (NULL, facet, &num, printall);
- qh ridgeoutnum= num;
- qh printoutvar= 0; /* counts number of ridges in output */
- fprintf (fp, "LIST # %s | %s\n", qh rbox_command, qh qhull_command);
- }
- if (qh PRINTdots) {
- qh printoutnum++;
- num= qh num_points + qh_setsize (qh other_points);
- if (qh DELAUNAY && qh ATinfinity)
- num--;
- if (qh PRINTdim == 4)
- fprintf (fp, "4VECT %d %d 1\n", num, num);
- else
- fprintf (fp, "VECT %d %d 1\n", num, num);
- for (i= num; i--; ) {
- if (i % 20 == 0)
- fprintf (fp, "\n");
- fprintf (fp, "1 ");
- }
- fprintf (fp, "# 1 point per line\n1 ");
- for (i= num-1; i--; ) {
- if (i % 20 == 0)
- fprintf (fp, "\n");
- fprintf (fp, "0 ");
- }
- fprintf (fp, "# 1 color for all\n");
- FORALLpoints {
- if (!qh DELAUNAY || !qh ATinfinity || qh_pointid(point) != qh num_points-1) {
- if (qh PRINTdim == 4)
- qh_printpoint (fp, NULL, point);
- else
- qh_printpoint3 (fp, point);
- }
- }
- FOREACHpoint_(qh other_points) {
- if (qh PRINTdim == 4)
- qh_printpoint (fp, NULL, point);
- else
- qh_printpoint3 (fp, point);
- }
- fprintf (fp, "0 1 1 1 # color of points\n");
- }
- if (qh PRINTdim == 4 && !qh PRINTnoplanes)
- /* 4dview loads up multiple 4OFF objects slowly */
- fprintf(fp, "4OFF %d %d 1\n", 3*qh ridgeoutnum, qh ridgeoutnum);
- qh PRINTcradius= 2 * qh DISTround; /* include test DISTround */
- if (qh PREmerge) {
- maximize_(qh PRINTcradius, qh premerge_centrum + qh DISTround);
- }else if (qh POSTmerge)
- maximize_(qh PRINTcradius, qh postmerge_centrum + qh DISTround);
- qh PRINTradius= qh PRINTcradius;
- if (qh PRINTspheres + qh PRINTcoplanar)
- maximize_(qh PRINTradius, qh MAXabs_coord * qh_MINradius);
- if (qh premerge_cos < REALmax/2) {
- maximize_(qh PRINTradius, (1- qh premerge_cos) * qh MAXabs_coord);
- }else if (!qh PREmerge && qh POSTmerge && qh postmerge_cos < REALmax/2) {
- maximize_(qh PRINTradius, (1- qh postmerge_cos) * qh MAXabs_coord);
- }
- maximize_(qh PRINTradius, qh MINvisible);
- if (qh JOGGLEmax < REALmax/2)
- qh PRINTradius += qh JOGGLEmax * sqrt (qh hull_dim);
- if (qh PRINTdim != 4 &&
- (qh PRINTcoplanar || qh PRINTspheres || qh PRINTcentrums)) {
- vertices= qh_facetvertices (facetlist, facets, printall);
- if (qh PRINTspheres && qh PRINTdim <= 3)
- qh_printspheres (fp, vertices, qh PRINTradius);
- if (qh PRINTcoplanar || qh PRINTcentrums) {
- qh firstcentrum= True;
- if (qh PRINTcoplanar&& !qh PRINTspheres) {
- FOREACHvertex_(vertices)
- qh_printpointvect2 (fp, vertex->point, NULL,
- qh interior_point, qh PRINTradius);
- }
- FORALLfacet_(facetlist) {
- if (!printall && qh_skipfacet(facet))
- continue;
- if (!facet->normal)
- continue;
- if (qh PRINTcentrums && qh PRINTdim <= 3)
- qh_printcentrum (fp, facet, qh PRINTcradius);
- if (!qh PRINTcoplanar)
- continue;
- FOREACHpoint_(facet->coplanarset)
- qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
- FOREACHpoint_(facet->outsideset)
- qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
- }
- FOREACHfacet_(facets) {
- if (!printall && qh_skipfacet(facet))
- continue;
- if (!facet->normal)
- continue;
- if (qh PRINTcentrums && qh PRINTdim <= 3)
- qh_printcentrum (fp, facet, qh PRINTcradius);
- if (!qh PRINTcoplanar)
- continue;
- FOREACHpoint_(facet->coplanarset)
- qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
- FOREACHpoint_(facet->outsideset)
- qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
- }
- }
- qh_settempfree (&vertices);
- }
- qh visit_id++; /* for printing hyperplane intersections */
- break;
- case qh_PRINTids:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINTincidences:
- if (qh VORONOI && qh PRINTprecision)
- fprintf (qh ferr, "qhull warning: writing Delaunay. Use 'p' or 'o' for Voronoi centers\n");
- qh printoutvar= qh vertex_id; /* centrum id for non-simplicial facets */
- if (qh hull_dim <= 3)
- fprintf(fp, "%d\n", numfacets);
- else
- fprintf(fp, "%d\n", numsimplicial+numridges);
- break;
- case qh_PRINTinner:
- case qh_PRINTnormals:
- case qh_PRINTouter:
- if (qh CDDoutput)
- fprintf (fp, "%s | %s\nbegin\n %d %d real\n", qh rbox_command,
- qh qhull_command, numfacets, qh hull_dim+1);
- else
- fprintf (fp, "%d\n%d\n", qh hull_dim+1, numfacets);
- break;
- case qh_PRINTmathematica:
- if (qh hull_dim > 3) /* qh_initbuffers also checks */
- goto LABELnoformat;
- if (qh VORONOI)
- fprintf (qh ferr, "qhull warning: output is the Delaunay triangulation\n");
- fprintf(fp, "{\n");
- qh printoutvar= 0; /* counts number of facets for notfirst */
- break;
- case qh_PRINTmerges:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINTpointintersect:
- fprintf (fp, "%d\n%d\n", qh hull_dim, numfacets);
- break;
- case qh_PRINTneighbors:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINToff:
- case qh_PRINTtriangles:
- if (qh VORONOI)
- goto LABELnoformat;
- num = qh hull_dim;
- if (format == qh_PRINToff || qh hull_dim == 2)
- fprintf (fp, "%d\n%d %d %d\n", num,
- qh num_points+qh_setsize (qh other_points), numfacets, totneighbors/2);
- else { /* qh_PRINTtriangles */
- qh printoutvar= qh num_points+qh_setsize (qh other_points); /* first centrum */
- if (qh DELAUNAY)
- num--; /* drop last dimension */
- fprintf (fp, "%d\n%d %d %d\n", num, qh printoutvar
- + numfacets - numsimplicial, numsimplicial + numridges, totneighbors/2);
- }
- FORALLpoints
- qh_printpointid (qh fout, NULL, num, point, -1);
- FOREACHpoint_(qh other_points)
- qh_printpointid (qh fout, NULL, num, point, -1);
- if (format == qh_PRINTtriangles && qh hull_dim > 2) {
- FORALLfacets {
- if (!facet->simplicial && facet->visitid)
- qh_printcenter (qh fout, format, NULL, facet);
- }
- }
- break;
- case qh_PRINTpointnearest:
- fprintf (fp, "%d\n", numcoplanars);
- break;
- case qh_PRINTpoints:
- if (!qh VORONOI)
- goto LABELnoformat;
- if (qh CDDoutput)
- fprintf (fp, "%s | %s\nbegin\n%d %d real\n", qh rbox_command,
- qh qhull_command, numfacets, qh hull_dim);
- else
- fprintf (fp, "%d\n%d\n", qh hull_dim-1, numfacets);
- break;
- case qh_PRINTvertices:
- fprintf (fp, "%d\n", numfacets);
- break;
- case qh_PRINTsummary:
- default:
- LABELnoformat:
- fprintf (qh ferr, "qhull internal error (qh_printbegin): can not use this format for dimension %d\n",
- qh hull_dim);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
-} /* printbegin */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printcenter">-</a>
-
- qh_printcenter( fp, string, facet )
- print facet->center as centrum or Voronoi center
- string may be NULL. Don't include '%' codes.
- nop if qh CENTERtype neither CENTERvoronoi nor CENTERcentrum
- if upper envelope of Delaunay triangulation and point at-infinity
- prints qh_INFINITE instead;
-
- notes:
- defines facet->center if needed
- if format=PRINTgeom, adds a 0 if would otherwise be 2-d
-*/
-void qh_printcenter (FILE *fp, int format, char *string, facetT *facet) {
- int k, num;
-
- if (qh CENTERtype != qh_ASvoronoi && qh CENTERtype != qh_AScentrum)
- return;
- if (string)
- fprintf (fp, string, facet->id);
- if (qh CENTERtype == qh_ASvoronoi) {
- num= qh hull_dim-1;
- if (!facet->normal || !facet->upperdelaunay || !qh ATinfinity) {
- if (!facet->center)
- facet->center= qh_facetcenter (facet->vertices);
- for (k=0; k < num; k++)
- fprintf (fp, qh_REAL_1, facet->center[k]);
- }else {
- for (k=0; k < num; k++)
- fprintf (fp, qh_REAL_1, qh_INFINITE);
- }
- }else /* qh CENTERtype == qh_AScentrum */ {
- num= qh hull_dim;
- if (format == qh_PRINTtriangles && qh DELAUNAY)
- num--;
- if (!facet->center)
- facet->center= qh_getcentrum (facet);
- for (k=0; k < num; k++)
- fprintf (fp, qh_REAL_1, facet->center[k]);
- }
- if (format == qh_PRINTgeom && num == 2)
- fprintf (fp, " 0\n");
- else
- fprintf (fp, "\n");
-} /* printcenter */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printcentrum">-</a>
-
- qh_printcentrum( fp, facet, radius )
- print centrum for a facet in OOGL format
- radius defines size of centrum
- 2-d or 3-d only
-
- returns:
- defines facet->center if needed
-*/
-void qh_printcentrum (FILE *fp, facetT *facet, realT radius) {
- pointT *centrum, *projpt;
- boolT tempcentrum= False;
- realT xaxis[4], yaxis[4], normal[4], dist;
- realT green[3]={0, 1, 0};
- vertexT *apex;
- int k;
-
- if (qh CENTERtype == qh_AScentrum) {
- if (!facet->center)
- facet->center= qh_getcentrum (facet);
- centrum= facet->center;
- }else {
- centrum= qh_getcentrum (facet);
- tempcentrum= True;
- }
- fprintf (fp, "{appearance {-normal -edge normscale 0} ");
- if (qh firstcentrum) {
- qh firstcentrum= False;
- fprintf (fp, "{INST geom { define centrum CQUAD # f%d\n\
--0.3 -0.3 0.0001 0 0 1 1\n\
- 0.3 -0.3 0.0001 0 0 1 1\n\
- 0.3 0.3 0.0001 0 0 1 1\n\
--0.3 0.3 0.0001 0 0 1 1 } transform { \n", facet->id);
- }else
- fprintf (fp, "{INST geom { : centrum } transform { # f%d\n", facet->id);
- apex= SETfirstt_(facet->vertices, vertexT);
- qh_distplane(apex->point, facet, &dist);
- projpt= qh_projectpoint(apex->point, facet, dist);
- for (k= qh hull_dim; k--; ) {
- xaxis[k]= projpt[k] - centrum[k];
- normal[k]= facet->normal[k];
- }
- if (qh hull_dim == 2) {
- xaxis[2]= 0;
- normal[2]= 0;
- }else if (qh hull_dim == 4) {
- qh_projectdim3 (xaxis, xaxis);
- qh_projectdim3 (normal, normal);
- qh_normalize2 (normal, qh PRINTdim, True, NULL, NULL);
- }
- qh_crossproduct (3, xaxis, normal, yaxis);
- fprintf (fp, "%8.4g %8.4g %8.4g 0\n", xaxis[0], xaxis[1], xaxis[2]);
- fprintf (fp, "%8.4g %8.4g %8.4g 0\n", yaxis[0], yaxis[1], yaxis[2]);
- fprintf (fp, "%8.4g %8.4g %8.4g 0\n", normal[0], normal[1], normal[2]);
- qh_printpoint3 (fp, centrum);
- fprintf (fp, "1 }}}\n");
- qh_memfree (projpt, qh normal_size);
- qh_printpointvect (fp, centrum, facet->normal, NULL, radius, green);
- if (tempcentrum)
- qh_memfree (centrum, qh normal_size);
-} /* printcentrum */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printend">-</a>
-
- qh_printend( fp, format )
- prints trailer for all output formats
-
- see:
- qh_printbegin() and qh_printafacet()
-
-*/
-void qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
- int num;
- facetT *facet, **facetp;
-
- if (!qh printoutnum)
- fprintf (qh ferr, "qhull warning: no facets printed\n");
- switch (format) {
- case qh_PRINTgeom:
- if (qh hull_dim == 4 && qh DROPdim < 0 && !qh PRINTnoplanes) {
- qh visit_id++;
- num= 0;
- FORALLfacet_(facetlist)
- qh_printend4geom (fp, facet,&num, printall);
- FOREACHfacet_(facets)
- qh_printend4geom (fp, facet, &num, printall);
- if (num != qh ridgeoutnum || qh printoutvar != qh ridgeoutnum) {
- fprintf (qh ferr, "qhull internal error (qh_printend): number of ridges %d != number printed %d and at end %d\n", qh ridgeoutnum, qh printoutvar, num);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- }else
- fprintf(fp, "}\n");
- break;
- case qh_PRINTinner:
- case qh_PRINTnormals:
- case qh_PRINTouter:
- if (qh CDDoutput)
- fprintf (fp, "end\n");
- break;
- case qh_PRINTmathematica:
- fprintf(fp, "}\n");
- break;
- case qh_PRINTpoints:
- if (qh CDDoutput)
- fprintf (fp, "end\n");
- break;
- }
-} /* printend */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printend4geom">-</a>
-
- qh_printend4geom( fp, facet, numridges, printall )
- helper function for qh_printbegin/printend
-
- returns:
- number of printed ridges
-
- notes:
- just counts printed ridges if fp=NULL
- uses facet->visitid
- must agree with qh_printfacet4geom...
-
- design:
- computes color for facet from its normal
- prints each ridge of facet
-*/
-void qh_printend4geom (FILE *fp, facetT *facet, int *nump, boolT printall) {
- realT color[3];
- int i, num= *nump;
- facetT *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
-
- if (!printall && qh_skipfacet(facet))
- return;
- if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
- return;
- if (!facet->normal)
- return;
- if (fp) {
- for (i=0; i < 3; i++) {
- color[i]= (facet->normal[i]+1.0)/2.0;
- maximize_(color[i], -1.0);
- minimize_(color[i], +1.0);
- }
- }
- facet->visitid= qh visit_id;
- if (facet->simplicial) {
- FOREACHneighbor_(facet) {
- if (neighbor->visitid != qh visit_id) {
- if (fp)
- fprintf (fp, "3 %d %d %d %8.4g %8.4g %8.4g 1 # f%d f%d\n",
- 3*num, 3*num+1, 3*num+2, color[0], color[1], color[2],
- facet->id, neighbor->id);
- num++;
- }
- }
- }else {
- FOREACHridge_(facet->ridges) {
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->visitid != qh visit_id) {
- if (fp)
- fprintf (fp, "3 %d %d %d %8.4g %8.4g %8.4g 1 #r%d f%d f%d\n",
- 3*num, 3*num+1, 3*num+2, color[0], color[1], color[2],
- ridge->id, facet->id, neighbor->id);
- num++;
- }
- }
- }
- *nump= num;
-} /* printend4geom */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printextremes">-</a>
-
- qh_printextremes( fp, facetlist, facets, printall )
- print extreme points for convex hulls or halfspace intersections
-
- notes:
- #points, followed by ids, one per line
-
- sorted by id
- same order as qh_printpoints_out if no coplanar/interior points
-*/
-void qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall) {
- setT *vertices, *points;
- pointT *point;
- vertexT *vertex, **vertexp;
- int id;
- int numpoints=0, point_i, point_n;
- int allpoints= qh num_points + qh_setsize (qh other_points);
-
- points= qh_settemp (allpoints);
- qh_setzero (points, 0, allpoints);
- vertices= qh_facetvertices (facetlist, facets, printall);
- FOREACHvertex_(vertices) {
- id= qh_pointid (vertex->point);
- if (id >= 0) {
- SETelem_(points, id)= vertex->point;
- numpoints++;
- }
- }
- qh_settempfree (&vertices);
- fprintf (fp, "%d\n", numpoints);
- FOREACHpoint_i_(points) {
- if (point)
- fprintf (fp, "%d\n", point_i);
- }
- qh_settempfree (&points);
-} /* printextremes */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printextremes_2d">-</a>
-
- qh_printextremes_2d( fp, facetlist, facets, printall )
- prints point ids for facets in qh_ORIENTclock order
-
- notes:
- #points, followed by ids, one per line
- if facetlist/facets are disjoint than the output includes skips
- errors if facets form a loop
- does not print coplanar points
-*/
-void qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall) {
- int numfacets, numridges, totneighbors, numcoplanars, numsimplicial, numtricoplanars;
- setT *vertices;
- facetT *facet, *startfacet, *nextfacet;
- vertexT *vertexA, *vertexB;
-
- qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial,
- &totneighbors, &numridges, &numcoplanars, &numtricoplanars); /* marks qh visit_id */
- vertices= qh_facetvertices (facetlist, facets, printall);
- fprintf(fp, "%d\n", qh_setsize (vertices));
- qh_settempfree (&vertices);
- if (!numfacets)
- return;
- facet= startfacet= facetlist ? facetlist : SETfirstt_(facets, facetT);
- qh vertex_visit++;
- qh visit_id++;
- do {
- if (facet->toporient ^ qh_ORIENTclock) {
- vertexA= SETfirstt_(facet->vertices, vertexT);
- vertexB= SETsecondt_(facet->vertices, vertexT);
- nextfacet= SETfirstt_(facet->neighbors, facetT);
- }else {
- vertexA= SETsecondt_(facet->vertices, vertexT);
- vertexB= SETfirstt_(facet->vertices, vertexT);
- nextfacet= SETsecondt_(facet->neighbors, facetT);
- }
- if (facet->visitid == qh visit_id) {
- fprintf(qh ferr, "qh_printextremes_2d: loop in facet list. facet %d nextfacet %d\n",
- facet->id, nextfacet->id);
- qh_errexit2 (qh_ERRqhull, facet, nextfacet);
- }
- if (facet->visitid) {
- if (vertexA->visitid != qh vertex_visit) {
- vertexA->visitid= qh vertex_visit;
- fprintf(fp, "%d\n", qh_pointid (vertexA->point));
- }
- if (vertexB->visitid != qh vertex_visit) {
- vertexB->visitid= qh vertex_visit;
- fprintf(fp, "%d\n", qh_pointid (vertexB->point));
- }
- }
- facet->visitid= qh visit_id;
- facet= nextfacet;
- }while (facet && facet != startfacet);
-} /* printextremes_2d */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printextremes_d">-</a>
-
- qh_printextremes_d( fp, facetlist, facets, printall )
- print extreme points of input sites for Delaunay triangulations
-
- notes:
- #points, followed by ids, one per line
-
- unordered
-*/
-void qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall) {
- setT *vertices;
- vertexT *vertex, **vertexp;
- boolT upperseen, lowerseen;
- facetT *neighbor, **neighborp;
- int numpoints=0;
-
- vertices= qh_facetvertices (facetlist, facets, printall);
- qh_vertexneighbors();
- FOREACHvertex_(vertices) {
- upperseen= lowerseen= False;
- FOREACHneighbor_(vertex) {
- if (neighbor->upperdelaunay)
- upperseen= True;
- else
- lowerseen= True;
- }
- if (upperseen && lowerseen) {
- vertex->seen= True;
- numpoints++;
- }else
- vertex->seen= False;
- }
- fprintf (fp, "%d\n", numpoints);
- FOREACHvertex_(vertices) {
- if (vertex->seen)
- fprintf (fp, "%d\n", qh_pointid (vertex->point));
- }
- qh_settempfree (&vertices);
-} /* printextremes_d */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet">-</a>
-
- qh_printfacet( fp, facet )
- prints all fields of a facet to fp
-
- notes:
- ridges printed in neighbor order
-*/
-void qh_printfacet(FILE *fp, facetT *facet) {
-
- qh_printfacetheader (fp, facet);
- if (facet->ridges)
- qh_printfacetridges (fp, facet);
-} /* printfacet */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet2geom">-</a>
-
- qh_printfacet2geom( fp, facet, color )
- print facet as part of a 2-d VECT for Geomview
-
- notes:
- assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
- mindist is calculated within io.c. maxoutside is calculated elsewhere
- so a DISTround error may have occured.
-*/
-void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]) {
- pointT *point0, *point1;
- realT mindist, innerplane, outerplane;
- int k;
-
- qh_facet2point (facet, &point0, &point1, &mindist);
- qh_geomplanes (facet, &outerplane, &innerplane);
- if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
- qh_printfacet2geom_points(fp, point0, point1, facet, outerplane, color);
- if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
- outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
- for(k= 3; k--; )
- color[k]= 1.0 - color[k];
- qh_printfacet2geom_points(fp, point0, point1, facet, innerplane, color);
- }
- qh_memfree (point1, qh normal_size);
- qh_memfree (point0, qh normal_size);
-} /* printfacet2geom */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet2geom_points">-</a>
-
- qh_printfacet2geom_points( fp, point1, point2, facet, offset, color )
- prints a 2-d facet as a VECT with 2 points at some offset.
- The points are on the facet's plane.
-*/
-void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
- facetT *facet, realT offset, realT color[3]) {
- pointT *p1= point1, *p2= point2;
-
- fprintf(fp, "VECT 1 2 1 2 1 # f%d\n", facet->id);
- if (offset != 0.0) {
- p1= qh_projectpoint (p1, facet, -offset);
- p2= qh_projectpoint (p2, facet, -offset);
- }
- fprintf(fp, "%8.4g %8.4g %8.4g\n%8.4g %8.4g %8.4g\n",
- p1[0], p1[1], 0.0, p2[0], p2[1], 0.0);
- if (offset != 0.0) {
- qh_memfree (p1, qh normal_size);
- qh_memfree (p2, qh normal_size);
- }
- fprintf(fp, "%8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]);
-} /* printfacet2geom_points */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet2math">-</a>
-
- qh_printfacet2math( fp, facet, notfirst )
- print 2-d Mathematica output for a facet
- may be non-simplicial
-
- notes:
- use %16.8f since Mathematica 2.2 does not handle exponential format
-*/
-void qh_printfacet2math(FILE *fp, facetT *facet, int notfirst) {
- pointT *point0, *point1;
- realT mindist;
-
- qh_facet2point (facet, &point0, &point1, &mindist);
- if (notfirst)
- fprintf(fp, ",");
- fprintf(fp, "Line[{{%16.8f, %16.8f}, {%16.8f, %16.8f}}]\n",
- point0[0], point0[1], point1[0], point1[1]);
- qh_memfree (point1, qh normal_size);
- qh_memfree (point0, qh normal_size);
-} /* printfacet2math */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet3geom_nonsimplicial">-</a>
-
- qh_printfacet3geom_nonsimplicial( fp, facet, color )
- print Geomview OFF for a 3-d nonsimplicial facet.
- if DOintersections, prints ridges to unvisited neighbors (qh visit_id)
-
- notes
- uses facet->visitid for intersections and ridges
-*/
-void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]) {
- ridgeT *ridge, **ridgep;
- setT *projectedpoints, *vertices;
- vertexT *vertex, **vertexp, *vertexA, *vertexB;
- pointT *projpt, *point, **pointp;
- facetT *neighbor;
- realT dist, outerplane, innerplane;
- int cntvertices, k;
- realT black[3]={0, 0, 0}, green[3]={0, 1, 0};
-
- qh_geomplanes (facet, &outerplane, &innerplane);
- vertices= qh_facet3vertex (facet); /* oriented */
- cntvertices= qh_setsize(vertices);
- projectedpoints= qh_settemp(cntvertices);
- FOREACHvertex_(vertices) {
- zinc_(Zdistio);
- qh_distplane(vertex->point, facet, &dist);
- projpt= qh_projectpoint(vertex->point, facet, dist);
- qh_setappend (&projectedpoints, projpt);
- }
- if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
- qh_printfacet3geom_points(fp, projectedpoints, facet, outerplane, color);
- if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
- outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
- for (k=3; k--; )
- color[k]= 1.0 - color[k];
- qh_printfacet3geom_points(fp, projectedpoints, facet, innerplane, color);
- }
- FOREACHpoint_(projectedpoints)
- qh_memfree (point, qh normal_size);
- qh_settempfree(&projectedpoints);
- qh_settempfree(&vertices);
- if ((qh DOintersections || qh PRINTridges)
- && (!facet->visible || !qh NEWfacets)) {
- facet->visitid= qh visit_id;
- FOREACHridge_(facet->ridges) {
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->visitid != qh visit_id) {
- if (qh DOintersections)
- qh_printhyperplaneintersection(fp, facet, neighbor, ridge->vertices, black);
- if (qh PRINTridges) {
- vertexA= SETfirstt_(ridge->vertices, vertexT);
- vertexB= SETsecondt_(ridge->vertices, vertexT);
- qh_printline3geom (fp, vertexA->point, vertexB->point, green);
- }
- }
- }
- }
-} /* printfacet3geom_nonsimplicial */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet3geom_points">-</a>
-
- qh_printfacet3geom_points( fp, points, facet, offset )
- prints a 3-d facet as OFF Geomview object.
- offset is relative to the facet's hyperplane
- Facet is determined as a list of points
-*/
-void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]) {
- int k, n= qh_setsize(points), i;
- pointT *point, **pointp;
- setT *printpoints;
-
- fprintf(fp, "{ OFF %d 1 1 # f%d\n", n, facet->id);
- if (offset != 0.0) {
- printpoints= qh_settemp (n);
- FOREACHpoint_(points)
- qh_setappend (&printpoints, qh_projectpoint(point, facet, -offset));
- }else
- printpoints= points;
- FOREACHpoint_(printpoints) {
- for (k=0; k < qh hull_dim; k++) {
- if (k == qh DROPdim)
- fprintf(fp, "0 ");
- else
- fprintf(fp, "%8.4g ", point[k]);
- }
- if (printpoints != points)
- qh_memfree (point, qh normal_size);
- fprintf (fp, "\n");
- }
- if (printpoints != points)
- qh_settempfree (&printpoints);
- fprintf(fp, "%d ", n);
- for(i= 0; i < n; i++)
- fprintf(fp, "%d ", i);
- fprintf(fp, "%8.4g %8.4g %8.4g 1.0 }\n", color[0], color[1], color[2]);
-} /* printfacet3geom_points */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet3geom_simplicial">-</a>
-
- qh_printfacet3geom_simplicial( )
- print Geomview OFF for a 3-d simplicial facet.
-
- notes:
- may flip color
- uses facet->visitid for intersections and ridges
-
- assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
- innerplane may be off by qh DISTround. Maxoutside is calculated elsewhere
- so a DISTround error may have occured.
-*/
-void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]) {
- setT *points, *vertices;
- vertexT *vertex, **vertexp, *vertexA, *vertexB;
- facetT *neighbor, **neighborp;
- realT outerplane, innerplane;
- realT black[3]={0, 0, 0}, green[3]={0, 1, 0};
- int k;
-
- qh_geomplanes (facet, &outerplane, &innerplane);
- vertices= qh_facet3vertex (facet);
- points= qh_settemp (qh TEMPsize);
- FOREACHvertex_(vertices)
- qh_setappend(&points, vertex->point);
- if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
- qh_printfacet3geom_points(fp, points, facet, outerplane, color);
- if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
- outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
- for (k= 3; k--; )
- color[k]= 1.0 - color[k];
- qh_printfacet3geom_points(fp, points, facet, innerplane, color);
- }
- qh_settempfree(&points);
- qh_settempfree(&vertices);
- if ((qh DOintersections || qh PRINTridges)
- && (!facet->visible || !qh NEWfacets)) {
- facet->visitid= qh visit_id;
- FOREACHneighbor_(facet) {
- if (neighbor->visitid != qh visit_id) {
- vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
- SETindex_(facet->neighbors, neighbor), 0);
- if (qh DOintersections)
- qh_printhyperplaneintersection(fp, facet, neighbor, vertices, black);
- if (qh PRINTridges) {
- vertexA= SETfirstt_(vertices, vertexT);
- vertexB= SETsecondt_(vertices, vertexT);
- qh_printline3geom (fp, vertexA->point, vertexB->point, green);
- }
- qh_setfree(&vertices);
- }
- }
- }
-} /* printfacet3geom_simplicial */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet3math">-</a>
-
- qh_printfacet3math( fp, facet, notfirst )
- print 3-d Mathematica output for a facet
-
- notes:
- may be non-simplicial
- use %16.8f since Mathematica 2.2 does not handle exponential format
-*/
-void qh_printfacet3math (FILE *fp, facetT *facet, int notfirst) {
- vertexT *vertex, **vertexp;
- setT *points, *vertices;
- pointT *point, **pointp;
- boolT firstpoint= True;
- realT dist;
-
- if (notfirst)
- fprintf(fp, ",\n");
- vertices= qh_facet3vertex (facet);
- points= qh_settemp (qh_setsize (vertices));
- FOREACHvertex_(vertices) {
- zinc_(Zdistio);
- qh_distplane(vertex->point, facet, &dist);
- point= qh_projectpoint(vertex->point, facet, dist);
- qh_setappend (&points, point);
- }
- fprintf(fp, "Polygon[{");
- FOREACHpoint_(points) {
- if (firstpoint)
- firstpoint= False;
- else
- fprintf(fp, ",\n");
- fprintf(fp, "{%16.8f, %16.8f, %16.8f}", point[0], point[1], point[2]);
- }
- FOREACHpoint_(points)
- qh_memfree (point, qh normal_size);
- qh_settempfree(&points);
- qh_settempfree(&vertices);
- fprintf(fp, "}]");
-} /* printfacet3math */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet3vertex">-</a>
-
- qh_printfacet3vertex( fp, facet, format )
- print vertices in a 3-d facet as point ids
-
- notes:
- prints number of vertices first if format == qh_PRINToff
- the facet may be non-simplicial
-*/
-void qh_printfacet3vertex(FILE *fp, facetT *facet, int format) {
- vertexT *vertex, **vertexp;
- setT *vertices;
-
- vertices= qh_facet3vertex (facet);
- if (format == qh_PRINToff)
- fprintf (fp, "%d ", qh_setsize (vertices));
- FOREACHvertex_(vertices)
- fprintf (fp, "%d ", qh_pointid(vertex->point));
- fprintf (fp, "\n");
- qh_settempfree(&vertices);
-} /* printfacet3vertex */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet4geom_nonsimplicial">-</a>
-
- qh_printfacet4geom_nonsimplicial( )
- print Geomview 4OFF file for a 4d nonsimplicial facet
- prints all ridges to unvisited neighbors (qh.visit_id)
- if qh.DROPdim
- prints in OFF format
-
- notes:
- must agree with printend4geom()
-*/
-void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]) {
- facetT *neighbor;
- ridgeT *ridge, **ridgep;
- vertexT *vertex, **vertexp;
- pointT *point;
- int k;
- realT dist;
-
- facet->visitid= qh visit_id;
- if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
- return;
- FOREACHridge_(facet->ridges) {
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->visitid == qh visit_id)
- continue;
- if (qh PRINTtransparent && !neighbor->good)
- continue;
- if (qh DOintersections)
- qh_printhyperplaneintersection(fp, facet, neighbor, ridge->vertices, color);
- else {
- if (qh DROPdim >= 0)
- fprintf(fp, "OFF 3 1 1 # f%d\n", facet->id);
- else {
- qh printoutvar++;
- fprintf (fp, "# r%d between f%d f%d\n", ridge->id, facet->id, neighbor->id);
- }
- FOREACHvertex_(ridge->vertices) {
- zinc_(Zdistio);
- qh_distplane(vertex->point,facet, &dist);
- point=qh_projectpoint(vertex->point,facet, dist);
- for(k= 0; k < qh hull_dim; k++) {
- if (k != qh DROPdim)
- fprintf(fp, "%8.4g ", point[k]);
- }
- fprintf (fp, "\n");
- qh_memfree (point, qh normal_size);
- }
- if (qh DROPdim >= 0)
- fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g\n", color[0], color[1], color[2]);
- }
- }
-} /* printfacet4geom_nonsimplicial */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacet4geom_simplicial">-</a>
-
- qh_printfacet4geom_simplicial( fp, facet, color )
- print Geomview 4OFF file for a 4d simplicial facet
- prints triangles for unvisited neighbors (qh.visit_id)
-
- notes:
- must agree with printend4geom()
-*/
-void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]) {
- setT *vertices;
- facetT *neighbor, **neighborp;
- vertexT *vertex, **vertexp;
- int k;
-
- facet->visitid= qh visit_id;
- if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
- return;
- FOREACHneighbor_(facet) {
- if (neighbor->visitid == qh visit_id)
- continue;
- if (qh PRINTtransparent && !neighbor->good)
- continue;
- vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
- SETindex_(facet->neighbors, neighbor), 0);
- if (qh DOintersections)
- qh_printhyperplaneintersection(fp, facet, neighbor, vertices, color);
- else {
- if (qh DROPdim >= 0)
- fprintf(fp, "OFF 3 1 1 # ridge between f%d f%d\n",
- facet->id, neighbor->id);
- else {
- qh printoutvar++;
- fprintf (fp, "# ridge between f%d f%d\n", facet->id, neighbor->id);
- }
- FOREACHvertex_(vertices) {
- for(k= 0; k < qh hull_dim; k++) {
- if (k != qh DROPdim)
- fprintf(fp, "%8.4g ", vertex->point[k]);
- }
- fprintf (fp, "\n");
- }
- if (qh DROPdim >= 0)
- fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g\n", color[0], color[1], color[2]);
- }
- qh_setfree(&vertices);
- }
-} /* printfacet4geom_simplicial */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacetNvertex_nonsimplicial">-</a>
-
- qh_printfacetNvertex_nonsimplicial( fp, facet, id, format )
- print vertices for an N-d non-simplicial facet
- triangulates each ridge to the id
-*/
-void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format) {
- vertexT *vertex, **vertexp;
- ridgeT *ridge, **ridgep;
-
- if (facet->visible && qh NEWfacets)
- return;
- FOREACHridge_(facet->ridges) {
- if (format == qh_PRINTtriangles)
- fprintf(fp, "%d ", qh hull_dim);
- fprintf(fp, "%d ", id);
- if ((ridge->top == facet) ^ qh_ORIENTclock) {
- FOREACHvertex_(ridge->vertices)
- fprintf(fp, "%d ", qh_pointid(vertex->point));
- }else {
- FOREACHvertexreverse12_(ridge->vertices)
- fprintf(fp, "%d ", qh_pointid(vertex->point));
- }
- fprintf(fp, "\n");
- }
-} /* printfacetNvertex_nonsimplicial */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacetNvertex_simplicial">-</a>
-
- qh_printfacetNvertex_simplicial( fp, facet, format )
- print vertices for an N-d simplicial facet
- prints vertices for non-simplicial facets
- 2-d facets (orientation preserved by qh_mergefacet2d)
- PRINToff ('o') for 4-d and higher
-*/
-void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format) {
- vertexT *vertex, **vertexp;
-
- if (format == qh_PRINToff || format == qh_PRINTtriangles)
- fprintf (fp, "%d ", qh_setsize (facet->vertices));
- if ((facet->toporient ^ qh_ORIENTclock)
- || (qh hull_dim > 2 && !facet->simplicial)) {
- FOREACHvertex_(facet->vertices)
- fprintf(fp, "%d ", qh_pointid(vertex->point));
- }else {
- FOREACHvertexreverse12_(facet->vertices)
- fprintf(fp, "%d ", qh_pointid(vertex->point));
- }
- fprintf(fp, "\n");
-} /* printfacetNvertex_simplicial */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacetheader">-</a>
-
- qh_printfacetheader( fp, facet )
- prints header fields of a facet to fp
-
- notes:
- for 'f' output and debugging
-*/
-void qh_printfacetheader(FILE *fp, facetT *facet) {
- pointT *point, **pointp, *furthest;
- facetT *neighbor, **neighborp;
- realT dist;
-
- if (facet == qh_MERGEridge) {
- fprintf (fp, " MERGEridge\n");
- return;
- }else if (facet == qh_DUPLICATEridge) {
- fprintf (fp, " DUPLICATEridge\n");
- return;
- }else if (!facet) {
- fprintf (fp, " NULLfacet\n");
- return;
- }
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- fprintf(fp, "- f%d\n", facet->id);
- fprintf(fp, " - flags:");
- if (facet->toporient)
- fprintf(fp, " top");
- else
- fprintf(fp, " bottom");
- if (facet->simplicial)
- fprintf(fp, " simplicial");
- if (facet->tricoplanar)
- fprintf(fp, " tricoplanar");
- if (facet->upperdelaunay)
- fprintf(fp, " upperDelaunay");
- if (facet->visible)
- fprintf(fp, " visible");
- if (facet->newfacet)
- fprintf(fp, " new");
- if (facet->tested)
- fprintf(fp, " tested");
- if (!facet->good)
- fprintf(fp, " notG");
- if (facet->seen)
- fprintf(fp, " seen");
- if (facet->coplanar)
- fprintf(fp, " coplanar");
- if (facet->mergehorizon)
- fprintf(fp, " mergehorizon");
- if (facet->keepcentrum)
- fprintf(fp, " keepcentrum");
- if (facet->dupridge)
- fprintf(fp, " dupridge");
- if (facet->mergeridge && !facet->mergeridge2)
- fprintf(fp, " mergeridge1");
- if (facet->mergeridge2)
- fprintf(fp, " mergeridge2");
- if (facet->newmerge)
- fprintf(fp, " newmerge");
- if (facet->flipped)
- fprintf(fp, " flipped");
- if (facet->notfurthest)
- fprintf(fp, " notfurthest");
- if (facet->degenerate)
- fprintf(fp, " degenerate");
- if (facet->redundant)
- fprintf(fp, " redundant");
- fprintf(fp, "\n");
- if (facet->isarea)
- fprintf(fp, " - area: %2.2g\n", facet->f.area);
- else if (qh NEWfacets && facet->visible && facet->f.replace)
- fprintf(fp, " - replacement: f%d\n", facet->f.replace->id);
- else if (facet->newfacet) {
- if (facet->f.samecycle && facet->f.samecycle != facet)
- fprintf(fp, " - shares same visible/horizon as f%d\n", facet->f.samecycle->id);
- }else if (facet->tricoplanar /* !isarea */) {
- if (facet->f.triowner)
- fprintf(fp, " - owner of normal & centrum is facet f%d\n", facet->f.triowner->id);
- }else if (facet->f.newcycle)
- fprintf(fp, " - was horizon to f%d\n", facet->f.newcycle->id);
- if (facet->nummerge)
- fprintf(fp, " - merges: %d\n", facet->nummerge);
- qh_printpointid(fp, " - normal: ", qh hull_dim, facet->normal, -1);
- fprintf(fp, " - offset: %10.7g\n", facet->offset);
- if (qh CENTERtype == qh_ASvoronoi || facet->center)
- qh_printcenter (fp, qh_PRINTfacets, " - center: ", facet);
-#if qh_MAXoutside
- if (facet->maxoutside > qh DISTround)
- fprintf(fp, " - maxoutside: %10.7g\n", facet->maxoutside);
-#endif
- if (!SETempty_(facet->outsideset)) {
- furthest= (pointT*)qh_setlast(facet->outsideset);
- if (qh_setsize (facet->outsideset) < 6) {
- fprintf(fp, " - outside set (furthest p%d):\n", qh_pointid(furthest));
- FOREACHpoint_(facet->outsideset)
- qh_printpoint(fp, " ", point);
- }else if (qh_setsize (facet->outsideset) < 21) {
- qh_printpoints(fp, " - outside set:", facet->outsideset);
- }else {
- fprintf(fp, " - outside set: %d points.", qh_setsize(facet->outsideset));
- qh_printpoint(fp, " Furthest", furthest);
- }
-#if !qh_COMPUTEfurthest
- fprintf(fp, " - furthest distance= %2.2g\n", facet->furthestdist);
-#endif
- }
- if (!SETempty_(facet->coplanarset)) {
- furthest= (pointT*)qh_setlast(facet->coplanarset);
- if (qh_setsize (facet->coplanarset) < 6) {
- fprintf(fp, " - coplanar set (furthest p%d):\n", qh_pointid(furthest));
- FOREACHpoint_(facet->coplanarset)
- qh_printpoint(fp, " ", point);
- }else if (qh_setsize (facet->coplanarset) < 21) {
- qh_printpoints(fp, " - coplanar set:", facet->coplanarset);
- }else {
- fprintf(fp, " - coplanar set: %d points.", qh_setsize(facet->coplanarset));
- qh_printpoint(fp, " Furthest", furthest);
- }
- zinc_(Zdistio);
- qh_distplane (furthest, facet, &dist);
- fprintf(fp, " furthest distance= %2.2g\n", dist);
- }
- qh_printvertices (fp, " - vertices:", facet->vertices);
- fprintf(fp, " - neighboring facets: ");
- FOREACHneighbor_(facet) {
- if (neighbor == qh_MERGEridge)
- fprintf(fp, " MERGE");
- else if (neighbor == qh_DUPLICATEridge)
- fprintf(fp, " DUP");
- else
- fprintf(fp, " f%d", neighbor->id);
- }
- fprintf(fp, "\n");
- qh RANDOMdist= qh old_randomdist;
-} /* printfacetheader */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacetridges">-</a>
-
- qh_printfacetridges( fp, facet )
- prints ridges of a facet to fp
-
- notes:
- ridges printed in neighbor order
- assumes the ridges exist
- for 'f' output
-*/
-void qh_printfacetridges(FILE *fp, facetT *facet) {
- facetT *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
- int numridges= 0;
-
-
- if (facet->visible && qh NEWfacets) {
- fprintf(fp, " - ridges (ids may be garbage):");
- FOREACHridge_(facet->ridges)
- fprintf(fp, " r%d", ridge->id);
- fprintf(fp, "\n");
- }else {
- fprintf(fp, " - ridges:\n");
- FOREACHridge_(facet->ridges)
- ridge->seen= False;
- if (qh hull_dim == 3) {
- ridge= SETfirstt_(facet->ridges, ridgeT);
- while (ridge && !ridge->seen) {
- ridge->seen= True;
- qh_printridge(fp, ridge);
- numridges++;
- ridge= qh_nextridge3d (ridge, facet, NULL);
- }
- }else {
- FOREACHneighbor_(facet) {
- FOREACHridge_(facet->ridges) {
- if (otherfacet_(ridge,facet) == neighbor) {
- ridge->seen= True;
- qh_printridge(fp, ridge);
- numridges++;
- }
- }
- }
- }
- if (numridges != qh_setsize (facet->ridges)) {
- fprintf (fp, " - all ridges:");
- FOREACHridge_(facet->ridges)
- fprintf (fp, " r%d", ridge->id);
- fprintf (fp, "\n");
- }
- FOREACHridge_(facet->ridges) {
- if (!ridge->seen)
- qh_printridge(fp, ridge);
- }
- }
-} /* printfacetridges */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printfacets">-</a>
-
- qh_printfacets( fp, format, facetlist, facets, printall )
- prints facetlist and/or facet set in output format
-
- notes:
- also used for specialized formats ('FO' and summary)
- turns off 'Rn' option since want actual numbers
-*/
-void qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
- int numfacets, numsimplicial, numridges, totneighbors, numcoplanars, numtricoplanars;
- facetT *facet, **facetp;
- setT *vertices;
- coordT *center;
- realT outerplane, innerplane;
-
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- if (qh CDDoutput && (format == qh_PRINTcentrums || format == qh_PRINTpointintersect || format == qh_PRINToff))
- fprintf (qh ferr, "qhull warning: CDD format is not available for centrums, halfspace\nintersections, and OFF file format.\n");
- if (format == qh_PRINTnone)
- ; /* print nothing */
- else if (format == qh_PRINTaverage) {
- vertices= qh_facetvertices (facetlist, facets, printall);
- center= qh_getcenter (vertices);
- fprintf (fp, "%d 1\n", qh hull_dim);
- qh_printpointid (fp, NULL, qh hull_dim, center, -1);
- qh_memfree (center, qh normal_size);
- qh_settempfree (&vertices);
- }else if (format == qh_PRINTextremes) {
- if (qh DELAUNAY)
- qh_printextremes_d (fp, facetlist, facets, printall);
- else if (qh hull_dim == 2)
- qh_printextremes_2d (fp, facetlist, facets, printall);
- else
- qh_printextremes (fp, facetlist, facets, printall);
- }else if (format == qh_PRINToptions)
- fprintf(fp, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
- else if (format == qh_PRINTpoints && !qh VORONOI)
- qh_printpoints_out (fp, facetlist, facets, printall);
- else if (format == qh_PRINTqhull)
- fprintf (fp, "%s | %s\n", qh rbox_command, qh qhull_command);
- else if (format == qh_PRINTsize) {
- fprintf (fp, "0\n2 ");
- fprintf (fp, qh_REAL_1, qh totarea);
- fprintf (fp, qh_REAL_1, qh totvol);
- fprintf (fp, "\n");
- }else if (format == qh_PRINTsummary) {
- qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial,
- &totneighbors, &numridges, &numcoplanars, &numtricoplanars);
- vertices= qh_facetvertices (facetlist, facets, printall);
- fprintf (fp, "10 %d %d %d %d %d %d %d %d %d %d\n2 ", qh hull_dim,
- qh num_points + qh_setsize (qh other_points),
- qh num_vertices, qh num_facets - qh num_visible,
- qh_setsize (vertices), numfacets, numcoplanars,
- numfacets - numsimplicial, zzval_(Zdelvertextot),
- numtricoplanars);
- qh_settempfree (&vertices);
- qh_outerinner (NULL, &outerplane, &innerplane);
- fprintf (fp, qh_REAL_2n, outerplane, innerplane);
- }else if (format == qh_PRINTvneighbors)
- qh_printvneighbors (fp, facetlist, facets, printall);
- else if (qh VORONOI && format == qh_PRINToff)
- qh_printvoronoi (fp, format, facetlist, facets, printall);
- else if (qh VORONOI && format == qh_PRINTgeom) {
- qh_printbegin (fp, format, facetlist, facets, printall);
- qh_printvoronoi (fp, format, facetlist, facets, printall);
- qh_printend (fp, format, facetlist, facets, printall);
- }else if (qh VORONOI
- && (format == qh_PRINTvertices || format == qh_PRINTinner || format == qh_PRINTouter))
- qh_printvdiagram (fp, format, facetlist, facets, printall);
- else {
- qh_printbegin (fp, format, facetlist, facets, printall);
- FORALLfacet_(facetlist)
- qh_printafacet (fp, format, facet, printall);
- FOREACHfacet_(facets)
- qh_printafacet (fp, format, facet, printall);
- qh_printend (fp, format, facetlist, facets, printall);
- }
- qh RANDOMdist= qh old_randomdist;
-} /* printfacets */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printhelp_degenerate">-</a>
-
- qh_printhelp_degenerate( fp )
- prints descriptive message for precision error
-
- notes:
- no message if qh_QUICKhelp
-*/
-void qh_printhelp_degenerate(FILE *fp) {
-
- if (qh MERGEexact || qh PREmerge || qh JOGGLEmax < REALmax/2)
- fprintf(fp, "\n\
-A Qhull error has occurred. Qhull should have corrected the above\n\
-precision error. Please send the input and all of the output to\n\
-qhull_bug@geom.umn.edu\n");
- else if (!qh_QUICKhelp) {
- fprintf(fp, "\n\
-Precision problems were detected during construction of the convex hull.\n\
-This occurs because convex hull algorithms assume that calculations are\n\
-exact, but floating-point arithmetic has roundoff errors.\n\
-\n\
-To correct for precision problems, do not use 'Q0'. By default, Qhull\n\
-selects 'C-0' or 'Qx' and merges non-convex facets. With option 'QJ',\n\
-Qhull joggles the input to prevent precision problems. See \"Imprecision\n\
-in Qhull\" (qh-impre.htm).\n\
-\n\
-If you use 'Q0', the output may include\n\
-coplanar ridges, concave ridges, and flipped facets. In 4-d and higher,\n\
-Qhull may produce a ridge with four neighbors or two facets with the same \n\
-vertices. Qhull reports these events when they occur. It stops when a\n\
-concave ridge, flipped facet, or duplicate facet occurs.\n");
-#if REALfloat
- fprintf (fp, "\
-\n\
-Qhull is currently using single precision arithmetic. The following\n\
-will probably remove the precision problems:\n\
- - recompile qhull for double precision (#define REALfloat 0 in user.h).\n");
-#endif
- if (qh DELAUNAY && !qh SCALElast && qh MAXabs_coord > 1e4)
- fprintf( fp, "\
-\n\
-When computing the Delaunay triangulation of coordinates > 1.0,\n\
- - use 'Qbb' to scale the last coordinate to [0,m] (max previous coordinate)\n");
- if (qh DELAUNAY && !qh ATinfinity)
- fprintf( fp, "\
-When computing the Delaunay triangulation:\n\
- - use 'Qz' to add a point at-infinity. This reduces precision problems.\n");
-
- fprintf(fp, "\
-\n\
-If you need triangular output:\n\
- - use option 'Qt' to triangulate the output\n\
- - use option 'QJ' to joggle the input points and remove precision errors\n\
- - use option 'Ft'. It triangulates non-simplicial facets with added points.\n\
-\n\
-If you must use 'Q0',\n\
-try one or more of the following options. They can not guarantee an output.\n\
- - use 'QbB' to scale the input to a cube.\n\
- - use 'Po' to produce output and prevent partitioning for flipped facets\n\
- - use 'V0' to set min. distance to visible facet as 0 instead of roundoff\n\
- - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
- - options 'Qf', 'Qbb', and 'QR0' may also help\n",
- qh DISTround);
- fprintf(fp, "\
-\n\
-To guarantee simplicial output:\n\
- - use option 'Qt' to triangulate the output\n\
- - use option 'QJ' to joggle the input points and remove precision errors\n\
- - use option 'Ft' to triangulate the output by adding points\n\
- - use exact arithmetic (see \"Imprecision in Qhull\", qh-impre.htm)\n\
-");
- }
-} /* printhelp_degenerate */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printhelp_singular">-</a>
-
- qh_printhelp_singular( fp )
- prints descriptive message for singular input
-*/
-void qh_printhelp_singular(FILE *fp) {
- facetT *facet;
- vertexT *vertex, **vertexp;
- realT min, max, *coord, dist;
- int i,k;
-
- fprintf(fp, "\n\
-The input to qhull appears to be less than %d dimensional, or a\n\
-computation has overflowed.\n\n\
-Qhull could not construct a clearly convex simplex from points:\n",
- qh hull_dim);
- qh_printvertexlist (fp, "", qh facet_list, NULL, qh_ALL);
- if (!qh_QUICKhelp)
- fprintf(fp, "\n\
-The center point is coplanar with a facet, or a vertex is coplanar\n\
-with a neighboring facet. The maximum round off error for\n\
-computing distances is %2.2g. The center point, facets and distances\n\
-to the center point are as follows:\n\n", qh DISTround);
- qh_printpointid (fp, "center point", qh hull_dim, qh interior_point, -1);
- fprintf (fp, "\n");
- FORALLfacets {
- fprintf (fp, "facet");
- FOREACHvertex_(facet->vertices)
- fprintf (fp, " p%d", qh_pointid(vertex->point));
- zinc_(Zdistio);
- qh_distplane(qh interior_point, facet, &dist);
- fprintf (fp, " distance= %4.2g\n", dist);
- }
- if (!qh_QUICKhelp) {
- if (qh HALFspace)
- fprintf (fp, "\n\
-These points are the dual of the given halfspaces. They indicate that\n\
-the intersection is degenerate.\n");
- fprintf (fp,"\n\
-These points either have a maximum or minimum x-coordinate, or\n\
-they maximize the determinant for k coordinates. Trial points\n\
-are first selected from points that maximize a coordinate.\n");
- if (qh hull_dim >= qh_INITIALmax)
- fprintf (fp, "\n\
-Because of the high dimension, the min x-coordinate and max-coordinate\n\
-points are used if the determinant is non-zero. Option 'Qs' will\n\
-do a better, though much slower, job. Instead of 'Qs', you can change\n\
-the points by randomly rotating the input with 'QR0'.\n");
- }
- fprintf (fp, "\nThe min and max coordinates for each dimension are:\n");
- for (k=0; k < qh hull_dim; k++) {
- min= REALmax;
- max= -REALmin;
- for (i=qh num_points, coord= qh first_point+k; i--; coord += qh hull_dim) {
- maximize_(max, *coord);
- minimize_(min, *coord);
- }
- fprintf (fp, " %d: %8.4g %8.4g difference= %4.4g\n", k, min, max, max-min);
- }
- if (!qh_QUICKhelp) {
- fprintf (fp, "\n\
-If the input should be full dimensional, you have several options that\n\
-may determine an initial simplex:\n\
- - use 'QJ' to joggle the input and make it full dimensional\n\
- - use 'QbB' to scale the points to the unit cube\n\
- - use 'QR0' to randomly rotate the input for different maximum points\n\
- - use 'Qs' to search all points for the initial simplex\n\
- - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
- - trace execution with 'T3' to see the determinant for each point.\n",
- qh DISTround);
-#if REALfloat
- fprintf (fp, "\
- - recompile qhull for double precision (#define REALfloat 0 in qhull.h).\n");
-#endif
- fprintf (fp, "\n\
-If the input is lower dimensional:\n\
- - use 'QJ' to joggle the input and make it full dimensional\n\
- - use 'Qbk:0Bk:0' to delete coordinate k from the input. You should\n\
- pick the coordinate with the least range. The hull will have the\n\
- correct topology.\n\
- - determine the flat containing the points, rotate the points\n\
- into a coordinate plane, and delete the other coordinates.\n\
- - add one or more points to make the input full dimensional.\n\
-");
- if (qh DELAUNAY && !qh ATinfinity)
- fprintf (fp, "\n\n\
-This is a Delaunay triangulation and the input is co-circular or co-spherical:\n\
- - use 'Qz' to add a point \"at infinity\" (i.e., above the paraboloid)\n\
- - or use 'QJ' to joggle the input and avoid co-circular data\n");
- }
-} /* printhelp_singular */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printhyperplaneintersection">-</a>
-
- qh_printhyperplaneintersection( fp, facet1, facet2, vertices, color )
- print Geomview OFF or 4OFF for the intersection of two hyperplanes in 3-d or 4-d
-*/
-void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
- setT *vertices, realT color[3]) {
- realT costheta, denominator, dist1, dist2, s, t, mindenom, p[4];
- vertexT *vertex, **vertexp;
- int i, k;
- boolT nearzero1, nearzero2;
-
- costheta= qh_getangle(facet1->normal, facet2->normal);
- denominator= 1 - costheta * costheta;
- i= qh_setsize(vertices);
- if (qh hull_dim == 3)
- fprintf(fp, "VECT 1 %d 1 %d 1 ", i, i);
- else if (qh hull_dim == 4 && qh DROPdim >= 0)
- fprintf(fp, "OFF 3 1 1 ");
- else
- qh printoutvar++;
- fprintf (fp, "# intersect f%d f%d\n", facet1->id, facet2->id);
- mindenom= 1 / (10.0 * qh MAXabs_coord);
- FOREACHvertex_(vertices) {
- zadd_(Zdistio, 2);
- qh_distplane(vertex->point, facet1, &dist1);
- qh_distplane(vertex->point, facet2, &dist2);
- s= qh_divzero (-dist1 + costheta * dist2, denominator,mindenom,&nearzero1);
- t= qh_divzero (-dist2 + costheta * dist1, denominator,mindenom,&nearzero2);
- if (nearzero1 || nearzero2)
- s= t= 0.0;
- for(k= qh hull_dim; k--; )
- p[k]= vertex->point[k] + facet1->normal[k] * s + facet2->normal[k] * t;
- if (qh PRINTdim <= 3) {
- qh_projectdim3 (p, p);
- fprintf(fp, "%8.4g %8.4g %8.4g # ", p[0], p[1], p[2]);
- }else
- fprintf(fp, "%8.4g %8.4g %8.4g %8.4g # ", p[0], p[1], p[2], p[3]);
- if (nearzero1+nearzero2)
- fprintf (fp, "p%d (coplanar facets)\n", qh_pointid (vertex->point));
- else
- fprintf (fp, "projected p%d\n", qh_pointid (vertex->point));
- }
- if (qh hull_dim == 3)
- fprintf(fp, "%8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]);
- else if (qh hull_dim == 4 && qh DROPdim >= 0)
- fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]);
-} /* printhyperplaneintersection */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printline3geom">-</a>
-
- qh_printline3geom( fp, pointA, pointB, color )
- prints a line as a VECT
- prints 0's for qh.DROPdim
-
- notes:
- if pointA == pointB,
- it's a 1 point VECT
-*/
-void qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]) {
- int k;
- realT pA[4], pB[4];
-
- qh_projectdim3(pointA, pA);
- qh_projectdim3(pointB, pB);
- if ((fabs(pA[0] - pB[0]) > 1e-3) ||
- (fabs(pA[1] - pB[1]) > 1e-3) ||
- (fabs(pA[2] - pB[2]) > 1e-3)) {
- fprintf (fp, "VECT 1 2 1 2 1\n");
- for (k= 0; k < 3; k++)
- fprintf (fp, "%8.4g ", pB[k]);
- fprintf (fp, " # p%d\n", qh_pointid (pointB));
- }else
- fprintf (fp, "VECT 1 1 1 1 1\n");
- for (k=0; k < 3; k++)
- fprintf (fp, "%8.4g ", pA[k]);
- fprintf (fp, " # p%d\n", qh_pointid (pointA));
- fprintf (fp, "%8.4g %8.4g %8.4g 1\n", color[0], color[1], color[2]);
-}
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printneighborhood">-</a>
-
- qh_printneighborhood( fp, format, facetA, facetB, printall )
- print neighborhood of one or two facets
-
- notes:
- calls qh_findgood_all()
- bumps qh.visit_id
-*/
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall) {
- facetT *neighbor, **neighborp, *facet;
- setT *facets;
-
- if (format == qh_PRINTnone)
- return;
- qh_findgood_all (qh facet_list);
- if (facetA == facetB)
- facetB= NULL;
- facets= qh_settemp (2*(qh_setsize (facetA->neighbors)+1));
- qh visit_id++;
- for (facet= facetA; facet; facet= ((facet == facetA) ? facetB : NULL)) {
- if (facet->visitid != qh visit_id) {
- facet->visitid= qh visit_id;
- qh_setappend (&facets, facet);
- }
- FOREACHneighbor_(facet) {
- if (neighbor->visitid == qh visit_id)
- continue;
- neighbor->visitid= qh visit_id;
- if (printall || !qh_skipfacet (neighbor))
- qh_setappend (&facets, neighbor);
- }
- }
- qh_printfacets (fp, format, NULL, facets, printall);
- qh_settempfree (&facets);
-} /* printneighborhood */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printpoint">-</a>
-
- qh_printpoint( fp, string, point )
- qh_printpointid( fp, string, dim, point, id )
- prints the coordinates of a point
-
- returns:
- if string is defined
- prints 'string p%d' (skips p%d if id=-1)
-
- notes:
- nop if point is NULL
- prints id unless it is undefined (-1)
-*/
-void qh_printpoint(FILE *fp, char *string, pointT *point) {
- int id= qh_pointid( point);
-
- qh_printpointid( fp, string, qh hull_dim, point, id);
-} /* printpoint */
-
-void qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id) {
- int k;
- realT r; /*bug fix*/
-
- if (!point)
- return;
- if (string) {
- fputs (string, fp);
- if (id != -1)
- fprintf(fp, " p%d: ", id);
- }
- for(k= dim; k--; ) {
- r= *point++;
- if (string)
- fprintf(fp, " %8.4g", r);
- else
- fprintf(fp, qh_REAL_1, r);
- }
- fprintf(fp, "\n");
-} /* printpointid */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printpoint3">-</a>
-
- qh_printpoint3( fp, point )
- prints 2-d, 3-d, or 4-d point as Geomview 3-d coordinates
-*/
-void qh_printpoint3 (FILE *fp, pointT *point) {
- int k;
- realT p[4];
-
- qh_projectdim3 (point, p);
- for (k=0; k < 3; k++)
- fprintf (fp, "%8.4g ", p[k]);
- fprintf (fp, " # p%d\n", qh_pointid (point));
-} /* printpoint3 */
-
-/*----------------------------------------
--printpoints- print pointids for a set of points starting at index
- see geom.c
-*/
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printpoints_out">-</a>
-
- qh_printpoints_out( fp, facetlist, facets, printall )
- prints vertices, coplanar/inside points, for facets by their point coordinates
- allows qh.CDDoutput
-
- notes:
- same format as qhull input
- if no coplanar/interior points,
- same order as qh_printextremes
-*/
-void qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall) {
- int allpoints= qh num_points + qh_setsize (qh other_points);
- int numpoints=0, point_i, point_n;
- setT *vertices, *points;
- facetT *facet, **facetp;
- pointT *point, **pointp;
- vertexT *vertex, **vertexp;
- int id;
-
- points= qh_settemp (allpoints);
- qh_setzero (points, 0, allpoints);
- vertices= qh_facetvertices (facetlist, facets, printall);
- FOREACHvertex_(vertices) {
- id= qh_pointid (vertex->point);
- if (id >= 0)
- SETelem_(points, id)= vertex->point;
- }
- if (qh KEEPinside || qh KEEPcoplanar || qh KEEPnearinside) {
- FORALLfacet_(facetlist) {
- if (!printall && qh_skipfacet(facet))
- continue;
- FOREACHpoint_(facet->coplanarset) {
- id= qh_pointid (point);
- if (id >= 0)
- SETelem_(points, id)= point;
- }
- }
- FOREACHfacet_(facets) {
- if (!printall && qh_skipfacet(facet))
- continue;
- FOREACHpoint_(facet->coplanarset) {
- id= qh_pointid (point);
- if (id >= 0)
- SETelem_(points, id)= point;
- }
- }
- }
- qh_settempfree (&vertices);
- FOREACHpoint_i_(points) {
- if (point)
- numpoints++;
- }
- if (qh CDDoutput)
- fprintf (fp, "%s | %s\nbegin\n%d %d real\n", qh rbox_command,
- qh qhull_command, numpoints, qh hull_dim + 1);
- else
- fprintf (fp, "%d\n%d\n", qh hull_dim, numpoints);
- FOREACHpoint_i_(points) {
- if (point) {
- if (qh CDDoutput)
- fprintf (fp, "1 ");
- qh_printpoint (fp, NULL, point);
- }
- }
- if (qh CDDoutput)
- fprintf (fp, "end\n");
- qh_settempfree (&points);
-} /* printpoints_out */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printpointvect">-</a>
-
- qh_printpointvect( fp, point, normal, center, radius, color )
- prints a 2-d, 3-d, or 4-d point as 3-d VECT's relative to normal or to center point
-*/
-void qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]) {
- realT diff[4], pointA[4];
- int k;
-
- for (k= qh hull_dim; k--; ) {
- if (center)
- diff[k]= point[k]-center[k];
- else if (normal)
- diff[k]= normal[k];
- else
- diff[k]= 0;
- }
- if (center)
- qh_normalize2 (diff, qh hull_dim, True, NULL, NULL);
- for (k= qh hull_dim; k--; )
- pointA[k]= point[k]+diff[k] * radius;
- qh_printline3geom (fp, point, pointA, color);
-} /* printpointvect */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printpointvect2">-</a>
-
- qh_printpointvect2( fp, point, normal, center, radius )
- prints a 2-d, 3-d, or 4-d point as 2 3-d VECT's for an imprecise point
-*/
-void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius) {
- realT red[3]={1, 0, 0}, yellow[3]={1, 1, 0};
-
- qh_printpointvect (fp, point, normal, center, radius, red);
- qh_printpointvect (fp, point, normal, center, -radius, yellow);
-} /* printpointvect2 */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printridge">-</a>
-
- qh_printridge( fp, ridge )
- prints the information in a ridge
-
- notes:
- for qh_printfacetridges()
-*/
-void qh_printridge(FILE *fp, ridgeT *ridge) {
-
- fprintf(fp, " - r%d", ridge->id);
- if (ridge->tested)
- fprintf (fp, " tested");
- if (ridge->nonconvex)
- fprintf (fp, " nonconvex");
- fprintf (fp, "\n");
- qh_printvertices (fp, " vertices:", ridge->vertices);
- if (ridge->top && ridge->bottom)
- fprintf(fp, " between f%d and f%d\n",
- ridge->top->id, ridge->bottom->id);
-} /* printridge */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printspheres">-</a>
-
- qh_printspheres( fp, vertices, radius )
- prints 3-d vertices as OFF spheres
-
- notes:
- inflated octahedron from Stuart Levy earth/mksphere2
-*/
-void qh_printspheres(FILE *fp, setT *vertices, realT radius) {
- vertexT *vertex, **vertexp;
-
- qh printoutnum++;
- fprintf (fp, "{appearance {-edge -normal normscale 0} {\n\
-INST geom {define vsphere OFF\n\
-18 32 48\n\
-\n\
-0 0 1\n\
-1 0 0\n\
-0 1 0\n\
--1 0 0\n\
-0 -1 0\n\
-0 0 -1\n\
-0.707107 0 0.707107\n\
-0 -0.707107 0.707107\n\
-0.707107 -0.707107 0\n\
--0.707107 0 0.707107\n\
--0.707107 -0.707107 0\n\
-0 0.707107 0.707107\n\
--0.707107 0.707107 0\n\
-0.707107 0.707107 0\n\
-0.707107 0 -0.707107\n\
-0 0.707107 -0.707107\n\
--0.707107 0 -0.707107\n\
-0 -0.707107 -0.707107\n\
-\n\
-3 0 6 11\n\
-3 0 7 6 \n\
-3 0 9 7 \n\
-3 0 11 9\n\
-3 1 6 8 \n\
-3 1 8 14\n\
-3 1 13 6\n\
-3 1 14 13\n\
-3 2 11 13\n\
-3 2 12 11\n\
-3 2 13 15\n\
-3 2 15 12\n\
-3 3 9 12\n\
-3 3 10 9\n\
-3 3 12 16\n\
-3 3 16 10\n\
-3 4 7 10\n\
-3 4 8 7\n\
-3 4 10 17\n\
-3 4 17 8\n\
-3 5 14 17\n\
-3 5 15 14\n\
-3 5 16 15\n\
-3 5 17 16\n\
-3 6 13 11\n\
-3 7 8 6\n\
-3 9 10 7\n\
-3 11 12 9\n\
-3 14 8 17\n\
-3 15 13 14\n\
-3 16 12 15\n\
-3 17 10 16\n} transforms { TLIST\n");
- FOREACHvertex_(vertices) {
- fprintf(fp, "%8.4g 0 0 0 # v%d\n 0 %8.4g 0 0\n0 0 %8.4g 0\n",
- radius, vertex->id, radius, radius);
- qh_printpoint3 (fp, vertex->point);
- fprintf (fp, "1\n");
- }
- fprintf (fp, "}}}\n");
-} /* printspheres */
-
-
-/*----------------------------------------------
--printsummary-
- see qhull.c
-*/
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvdiagram">-</a>
-
- qh_printvdiagram( fp, format, facetlist, facets, printall )
- print voronoi diagram
- # of pairs of input sites
- #indices site1 site2 vertex1 ...
-
- sites indexed by input point id
- point 0 is the first input point
- vertices indexed by 'o' and 'p' order
- vertex 0 is the 'vertex-at-infinity'
- vertex 1 is the first Voronoi vertex
-
- see:
- qh_printvoronoi()
- qh_eachvoronoi_all()
-
- notes:
- if all facets are upperdelaunay,
- prints upper hull (furthest-site Voronoi diagram)
-*/
-void qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
- setT *vertices;
- int totcount, numcenters;
- boolT islower;
- qh_RIDGE innerouter= qh_RIDGEall;
- printvridgeT printvridge= NULL;
-
- if (format == qh_PRINTvertices) {
- innerouter= qh_RIDGEall;
- printvridge= qh_printvridge;
- }else if (format == qh_PRINTinner) {
- innerouter= qh_RIDGEinner;
- printvridge= qh_printvnorm;
- }else if (format == qh_PRINTouter) {
- innerouter= qh_RIDGEouter;
- printvridge= qh_printvnorm;
- }else {
- fprintf(qh ferr, "qh_printvdiagram: unknown print format %d.\n", format);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- vertices= qh_markvoronoi (facetlist, facets, printall, &islower, &numcenters);
- totcount= qh_printvdiagram2 (NULL, NULL, vertices, innerouter, False);
- fprintf (fp, "%d\n", totcount);
- totcount= qh_printvdiagram2 (fp, printvridge, vertices, innerouter, True /* inorder*/);
- qh_settempfree (&vertices);
-#if 0 /* for testing qh_eachvoronoi_all */
- fprintf (fp, "\n");
- totcount= qh_eachvoronoi_all(fp, printvridge, qh UPPERdelaunay, innerouter, True /* inorder*/);
- fprintf (fp, "%d\n", totcount);
-#endif
-} /* printvdiagram */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvdiagram2">-</a>
-
- qh_printvdiagram2( fp, printvridge, vertices, innerouter, inorder )
- visit all pairs of input sites (vertices) for selected Voronoi vertices
- vertices may include NULLs
-
- innerouter:
- qh_RIDGEall print inner ridges (bounded) and outer ridges (unbounded)
- qh_RIDGEinner print only inner ridges
- qh_RIDGEouter print only outer ridges
-
- inorder:
- print 3-d Voronoi vertices in order
-
- assumes:
- qh_markvoronoi marked facet->visitid for Voronoi vertices
- all facet->seen= False
- all facet->seen2= True
-
- returns:
- total number of Voronoi ridges
- if printvridge,
- calls printvridge( fp, vertex, vertexA, centers) for each ridge
- [see qh_eachvoronoi()]
-
- see:
- qh_eachvoronoi_all()
-*/
-int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder) {
- int totcount= 0;
- int vertex_i, vertex_n;
- vertexT *vertex;
-
- FORALLvertices
- vertex->seen= False;
- FOREACHvertex_i_(vertices) {
- if (vertex) {
- if (qh GOODvertex > 0 && qh_pointid(vertex->point)+1 != qh GOODvertex)
- continue;
- totcount += qh_eachvoronoi (fp, printvridge, vertex, !qh_ALL, innerouter, inorder);
- }
- }
- return totcount;
-} /* printvdiagram2 */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvertex">-</a>
-
- qh_printvertex( fp, vertex )
- prints the information in a vertex
-*/
-void qh_printvertex(FILE *fp, vertexT *vertex) {
- pointT *point;
- int k, count= 0;
- facetT *neighbor, **neighborp;
- realT r; /*bug fix*/
-
- if (!vertex) {
- fprintf (fp, " NULLvertex\n");
- return;
- }
- fprintf(fp, "- p%d (v%d):", qh_pointid(vertex->point), vertex->id);
- point= vertex->point;
- if (point) {
- for(k= qh hull_dim; k--; ) {
- r= *point++;
- fprintf(fp, " %5.2g", r);
- }
- }
- if (vertex->deleted)
- fprintf(fp, " deleted");
- if (vertex->delridge)
- fprintf (fp, " ridgedeleted");
- fprintf(fp, "\n");
- if (vertex->neighbors) {
- fprintf(fp, " neighbors:");
- FOREACHneighbor_(vertex) {
- if (++count % 100 == 0)
- fprintf (fp, "\n ");
- fprintf(fp, " f%d", neighbor->id);
- }
- fprintf(fp, "\n");
- }
-} /* printvertex */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvertexlist">-</a>
-
- qh_printvertexlist( fp, string, facetlist, facets, printall )
- prints vertices used by a facetlist or facet set
- tests qh_skipfacet() if !printall
-*/
-void qh_printvertexlist (FILE *fp, char* string, facetT *facetlist,
- setT *facets, boolT printall) {
- vertexT *vertex, **vertexp;
- setT *vertices;
-
- vertices= qh_facetvertices (facetlist, facets, printall);
- fputs (string, fp);
- FOREACHvertex_(vertices)
- qh_printvertex(fp, vertex);
- qh_settempfree (&vertices);
-} /* printvertexlist */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvertices">-</a>
-
- qh_printvertices( fp, string, vertices )
- prints vertices in a set
-*/
-void qh_printvertices(FILE *fp, char* string, setT *vertices) {
- vertexT *vertex, **vertexp;
-
- fputs (string, fp);
- FOREACHvertex_(vertices)
- fprintf (fp, " p%d (v%d)", qh_pointid(vertex->point), vertex->id);
- fprintf(fp, "\n");
-} /* printvertices */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvneighbors">-</a>
-
- qh_printvneighbors( fp, facetlist, facets, printall )
- print vertex neighbors of vertices in facetlist and facets ('FN')
-
- notes:
- qh_countfacets clears facet->visitid for non-printed facets
-
- design:
- collect facet count and related statistics
- if necessary, build neighbor sets for each vertex
- collect vertices in facetlist and facets
- build a point array for point->vertex and point->coplanar facet
- for each point
- list vertex neighbors or coplanar facet
-*/
-void qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall) {
- int numfacets, numsimplicial, numridges, totneighbors, numneighbors, numcoplanars, numtricoplanars;
- setT *vertices, *vertex_points, *coplanar_points;
- int numpoints= qh num_points + qh_setsize (qh other_points);
- vertexT *vertex, **vertexp;
- int vertex_i, vertex_n;
- facetT *facet, **facetp, *neighbor, **neighborp;
- pointT *point, **pointp;
-
- qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial,
- &totneighbors, &numridges, &numcoplanars, &numtricoplanars); /* sets facet->visitid */
- fprintf (fp, "%d\n", numpoints);
- qh_vertexneighbors();
- vertices= qh_facetvertices (facetlist, facets, printall);
- vertex_points= qh_settemp (numpoints);
- coplanar_points= qh_settemp (numpoints);
- qh_setzero (vertex_points, 0, numpoints);
- qh_setzero (coplanar_points, 0, numpoints);
- FOREACHvertex_(vertices)
- qh_point_add (vertex_points, vertex->point, vertex);
- FORALLfacet_(facetlist) {
- FOREACHpoint_(facet->coplanarset)
- qh_point_add (coplanar_points, point, facet);
- }
- FOREACHfacet_(facets) {
- FOREACHpoint_(facet->coplanarset)
- qh_point_add (coplanar_points, point, facet);
- }
- FOREACHvertex_i_(vertex_points) {
- if (vertex) {
- numneighbors= qh_setsize (vertex->neighbors);
- fprintf (fp, "%d", numneighbors);
- if (qh hull_dim == 3)
- qh_order_vertexneighbors (vertex);
- else if (qh hull_dim >= 4)
- qsort (SETaddr_(vertex->neighbors, facetT), numneighbors,
- sizeof (facetT *), qh_compare_facetvisit);
- FOREACHneighbor_(vertex)
- fprintf (fp, " %d",
- neighbor->visitid ? neighbor->visitid - 1 : - neighbor->id);
- fprintf (fp, "\n");
- }else if ((facet= SETelemt_(coplanar_points, vertex_i, facetT)))
- fprintf (fp, "1 %d\n",
- facet->visitid ? facet->visitid - 1 : - facet->id);
- else
- fprintf (fp, "0\n");
- }
- qh_settempfree (&coplanar_points);
- qh_settempfree (&vertex_points);
- qh_settempfree (&vertices);
-} /* printvneighbors */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvoronoi">-</a>
-
- qh_printvoronoi( fp, format, facetlist, facets, printall )
- print voronoi diagram in 'o' or 'G' format
- for 'o' format
- prints voronoi centers for each facet and for infinity
- for each vertex, lists ids of printed facets or infinity
- assumes facetlist and facets are disjoint
- for 'G' format
- prints an OFF object
- adds a 0 coordinate to center
- prints infinity but does not list in vertices
-
- see:
- qh_printvdiagram()
-
- notes:
- if 'o',
- prints a line for each point except "at-infinity"
- if all facets are upperdelaunay,
- reverses lower and upper hull
-*/
-void qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
- int k, numcenters, numvertices= 0, numneighbors, numinf, vid=1, vertex_i, vertex_n;
- facetT *facet, **facetp, *neighbor, **neighborp;
- setT *vertices;
- vertexT *vertex;
- boolT islower;
- unsigned int numfacets= (unsigned int) qh num_facets;
-
- vertices= qh_markvoronoi (facetlist, facets, printall, &islower, &numcenters);
- FOREACHvertex_i_(vertices) {
- if (vertex) {
- numvertices++;
- numneighbors = numinf = 0;
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid == 0)
- numinf= 1;
- else if (neighbor->visitid < numfacets)
- numneighbors++;
- }
- if (numinf && !numneighbors) {
- SETelem_(vertices, vertex_i)= NULL;
- numvertices--;
- }
- }
- }
- if (format == qh_PRINTgeom)
- fprintf (fp, "{appearance {+edge -face} OFF %d %d 1 # Voronoi centers and cells\n",
- numcenters, numvertices);
- else
- fprintf (fp, "%d\n%d %d 1\n", qh hull_dim-1, numcenters, qh_setsize(vertices));
- if (format == qh_PRINTgeom) {
- for (k= qh hull_dim-1; k--; )
- fprintf (fp, qh_REAL_1, 0.0);
- fprintf (fp, " 0 # infinity not used\n");
- }else {
- for (k= qh hull_dim-1; k--; )
- fprintf (fp, qh_REAL_1, qh_INFINITE);
- fprintf (fp, "\n");
- }
- FORALLfacet_(facetlist) {
- if (facet->visitid && facet->visitid < numfacets) {
- if (format == qh_PRINTgeom)
- fprintf (fp, "# %d f%d\n", vid++, facet->id);
- qh_printcenter (fp, format, NULL, facet);
- }
- }
- FOREACHfacet_(facets) {
- if (facet->visitid && facet->visitid < numfacets) {
- if (format == qh_PRINTgeom)
- fprintf (fp, "# %d f%d\n", vid++, facet->id);
- qh_printcenter (fp, format, NULL, facet);
- }
- }
- FOREACHvertex_i_(vertices) {
- numneighbors= 0;
- numinf=0;
- if (vertex) {
- if (qh hull_dim == 3)
- qh_order_vertexneighbors(vertex);
- else if (qh hull_dim >= 4)
- qsort (SETaddr_(vertex->neighbors, vertexT),
- qh_setsize (vertex->neighbors),
- sizeof (facetT *), qh_compare_facetvisit);
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid == 0)
- numinf= 1;
- else if (neighbor->visitid < numfacets)
- numneighbors++;
- }
- }
- if (format == qh_PRINTgeom) {
- if (vertex) {
- fprintf (fp, "%d", numneighbors);
- if (vertex) {
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid && neighbor->visitid < numfacets)
- fprintf (fp, " %d", neighbor->visitid);
- }
- }
- fprintf (fp, " # p%d (v%d)\n", vertex_i, vertex->id);
- }else
- fprintf (fp, " # p%d is coplanar or isolated\n", vertex_i);
- }else {
- if (numinf)
- numneighbors++;
- fprintf (fp, "%d", numneighbors);
- if (vertex) {
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid == 0) {
- if (numinf) {
- numinf= 0;
- fprintf (fp, " %d", neighbor->visitid);
- }
- }else if (neighbor->visitid < numfacets)
- fprintf (fp, " %d", neighbor->visitid);
- }
- }
- fprintf (fp, "\n");
- }
- }
- if (format == qh_PRINTgeom)
- fprintf (fp, "}\n");
- qh_settempfree (&vertices);
-} /* printvoronoi */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvnorm">-</a>
-
- qh_printvnorm( fp, vertex, vertexA, centers, unbounded )
- print one separating plane of the Voronoi diagram for a pair of input sites
- unbounded==True if centers includes vertex-at-infinity
-
- assumes:
- qh_ASvoronoi and qh_vertexneighbors() already set
-
- see:
- qh_printvdiagram()
- qh_eachvoronoi()
-*/
-void qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded) {
- pointT *normal;
- realT offset;
- int k;
-
- normal= qh_detvnorm (vertex, vertexA, centers, &offset);
- fprintf (fp, "%d %d %d ",
- 2+qh hull_dim, qh_pointid (vertex->point), qh_pointid (vertexA->point));
- for (k= 0; k< qh hull_dim-1; k++)
- fprintf (fp, qh_REAL_1, normal[k]);
- fprintf (fp, qh_REAL_1, offset);
- fprintf (fp, "\n");
-} /* printvnorm */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="printvridge">-</a>
-
- qh_printvridge( fp, vertex, vertexA, centers, unbounded )
- print one ridge of the Voronoi diagram for a pair of input sites
- unbounded==True if centers includes vertex-at-infinity
-
- see:
- qh_printvdiagram()
-
- notes:
- the user may use a different function
-*/
-void qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded) {
- facetT *facet, **facetp;
-
- fprintf (fp, "%d %d %d", qh_setsize (centers)+2,
- qh_pointid (vertex->point), qh_pointid (vertexA->point));
- FOREACHfacet_(centers)
- fprintf (fp, " %d", facet->visitid);
- fprintf (fp, "\n");
-} /* printvridge */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="projectdim3">-</a>
-
- qh_projectdim3( source, destination )
- project 2-d 3-d or 4-d point to a 3-d point
- uses qh.DROPdim and qh.hull_dim
- source and destination may be the same
-
- notes:
- allocate 4 elements to destination just in case
-*/
-void qh_projectdim3 (pointT *source, pointT *destination) {
- int i,k;
-
- for (k= 0, i=0; k < qh hull_dim; k++) {
- if (qh hull_dim == 4) {
- if (k != qh DROPdim)
- destination[i++]= source[k];
- }else if (k == qh DROPdim)
- destination[i++]= 0;
- else
- destination[i++]= source[k];
- }
- while (i < 3)
- destination[i++]= 0.0;
-} /* projectdim3 */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="readfeasible">-</a>
-
- qh_readfeasible( dim, remainder )
- read feasible point from remainder string and qh.fin
-
- returns:
- number of lines read from qh.fin
- sets qh.FEASIBLEpoint with malloc'd coordinates
-
- notes:
- checks for qh.HALFspace
- assumes dim > 1
-
- see:
- qh_setfeasible
-*/
-int qh_readfeasible (int dim, char *remainder) {
- boolT isfirst= True;
- int linecount= 0, tokcount= 0;
- char *s, *t, firstline[qh_MAXfirst+1];
- coordT *coords, value;
-
- if (!qh HALFspace) {
- fprintf (qh ferr, "qhull input error: feasible point (dim 1 coords) is only valid for halfspace intersection\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh feasible_string)
- fprintf (qh ferr, "qhull input warning: feasible point (dim 1 coords) overrides 'Hn,n,n' feasible point for halfspace intersection\n");
- if (!(qh feasible_point= (coordT*)malloc (dim* sizeof(coordT)))) {
- fprintf(qh ferr, "qhull error: insufficient memory for feasible point\n");
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- coords= qh feasible_point;
- while ((s= (isfirst ? remainder : fgets(firstline, qh_MAXfirst, qh fin)))) {
- if (isfirst)
- isfirst= False;
- else
- linecount++;
- while (*s) {
- while (isspace(*s))
- s++;
- value= qh_strtod (s, &t);
- if (s == t)
- break;
- s= t;
- *(coords++)= value;
- if (++tokcount == dim) {
- while (isspace (*s))
- s++;
- qh_strtod (s, &t);
- if (s != t) {
- fprintf (qh ferr, "qhull input error: coordinates for feasible point do not finish out the line: %s\n",
- s);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- return linecount;
- }
- }
- }
- fprintf (qh ferr, "qhull input error: only %d coordinates. Could not read %d-d feasible point.\n",
- tokcount, dim);
- qh_errexit (qh_ERRinput, NULL, NULL);
- return 0;
-} /* readfeasible */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="readpoints">-</a>
-
- qh_readpoints( numpoints, dimension, ismalloc )
- read points from qh.fin into qh.first_point, qh.num_points
- qh.fin is lines of coordinates, one per vertex, first line number of points
- if 'rbox D4',
- gives message
- if qh.ATinfinity,
- adds point-at-infinity for Delaunay triangulations
-
- returns:
- number of points, array of point coordinates, dimension, ismalloc True
- if qh.DELAUNAY & !qh.PROJECTinput, projects points to paraboloid
- and clears qh.PROJECTdelaunay
- if qh.HALFspace, reads optional feasible point, reads halfspaces,
- converts to dual.
-
- for feasible point in "cdd format" in 3-d:
- 3 1
- coordinates
- comments
- begin
- n 4 real/integer
- ...
- end
-
- notes:
- dimension will change in qh_initqhull_globals if qh.PROJECTinput
- uses malloc() since qh_mem not initialized
- FIXUP: this routine needs rewriting
-*/
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc) {
- coordT *points, *coords, *infinity= NULL;
- realT paraboloid, maxboloid= -REALmax, value;
- realT *coordp= NULL, *offsetp= NULL, *normalp= NULL;
- char *s, *t, firstline[qh_MAXfirst+1];
- int diminput=0, numinput=0, dimfeasible= 0, newnum, k, tempi;
- int firsttext=0, firstshort=0, firstlong=0, firstpoint=0;
- int tokcount= 0, linecount=0, maxcount, coordcount=0;
- boolT islong, isfirst= True, wasbegin= False;
- boolT isdelaunay= qh DELAUNAY && !qh PROJECTinput;
-
- if (qh CDDinput) {
- while ((s= fgets(firstline, qh_MAXfirst, qh fin))) {
- linecount++;
- if (qh HALFspace && linecount == 1 && isdigit(*s)) {
- dimfeasible= qh_strtol (s, &s);
- while (isspace(*s))
- s++;
- if (qh_strtol (s, &s) == 1)
- linecount += qh_readfeasible (dimfeasible, s);
- else
- dimfeasible= 0;
- }else if (!memcmp (firstline, "begin", 5) || !memcmp (firstline, "BEGIN", 5))
- break;
- else if (!*qh rbox_command)
- strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
- }
- if (!s) {
- fprintf (qh ferr, "qhull input error: missing \"begin\" for cdd-formated input\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- }
- while(!numinput && (s= fgets(firstline, qh_MAXfirst, qh fin))) {
- linecount++;
- if (!memcmp (s, "begin", 5) || !memcmp (s, "BEGIN", 5))
- wasbegin= True;
- while (*s) {
- while (isspace(*s))
- s++;
- if (!*s)
- break;
- if (!isdigit(*s)) {
- if (!*qh rbox_command) {
- strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
- firsttext= linecount;
- }
- break;
- }
- if (!diminput)
- diminput= qh_strtol (s, &s);
- else {
- numinput= qh_strtol (s, &s);
- if (numinput == 1 && diminput >= 2 && qh HALFspace && !qh CDDinput) {
- linecount += qh_readfeasible (diminput, s); /* checks if ok */
- dimfeasible= diminput;
- diminput= numinput= 0;
- }else
- break;
- }
- }
- }
- if (!s) {
- fprintf(qh ferr, "qhull input error: short input file. Did not find dimension and number of points\n");
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (diminput > numinput) {
- tempi= diminput; /* exchange dim and n, e.g., for cdd input format */
- diminput= numinput;
- numinput= tempi;
- }
- if (diminput < 2) {
- fprintf(qh ferr,"qhull input error: dimension %d (first number) should be at least 2\n",
- diminput);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (isdelaunay) {
- qh PROJECTdelaunay= False;
- if (qh CDDinput)
- *dimension= diminput;
- else
- *dimension= diminput+1;
- *numpoints= numinput;
- if (qh ATinfinity)
- (*numpoints)++;
- }else if (qh HALFspace) {
- *dimension= diminput - 1;
- *numpoints= numinput;
- if (diminput < 3) {
- fprintf(qh ferr,"qhull input error: dimension %d (first number, includes offset) should be at least 3 for halfspaces\n",
- diminput);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (dimfeasible) {
- if (dimfeasible != *dimension) {
- fprintf(qh ferr,"qhull input error: dimension %d of feasible point is not one less than dimension %d for halfspaces\n",
- dimfeasible, diminput);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- }else
- qh_setfeasible (*dimension);
- }else {
- if (qh CDDinput)
- *dimension= diminput-1;
- else
- *dimension= diminput;
- *numpoints= numinput;
- }
- qh normal_size= *dimension * sizeof(coordT); /* for tracing with qh_printpoint */
- if (qh HALFspace) {
- qh half_space= coordp= (coordT*) malloc (qh normal_size + sizeof(coordT));
- if (qh CDDinput) {
- offsetp= qh half_space;
- normalp= offsetp + 1;
- }else {
- normalp= qh half_space;
- offsetp= normalp + *dimension;
- }
- }
- qh maxline= diminput * (qh_REALdigits + 5);
- maximize_(qh maxline, 500);
- qh line= (char*)malloc ((qh maxline+1) * sizeof (char));
- *ismalloc= True; /* use malloc since memory not setup */
- coords= points= qh temp_malloc=
- (coordT*)malloc((*numpoints)*(*dimension)*sizeof(coordT));
- if (!coords || !qh line || (qh HALFspace && !qh half_space)) {
- fprintf(qh ferr, "qhull error: insufficient memory to read %d points\n",
- numinput);
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- if (isdelaunay && qh ATinfinity) {
- infinity= points + numinput * (*dimension);
- for (k= (*dimension) - 1; k--; )
- infinity[k]= 0.0;
- }
- maxcount= numinput * diminput;
- paraboloid= 0.0;
- while ((s= (isfirst ? s : fgets(qh line, qh maxline, qh fin)))) {
- if (!isfirst) {
- linecount++;
- if (*s == 'e' || *s == 'E') {
- if (!memcmp (s, "end", 3) || !memcmp (s, "END", 3)) {
- if (qh CDDinput )
- break;
- else if (wasbegin)
- fprintf (qh ferr, "qhull input warning: the input appears to be in cdd format. If so, use 'Fd'\n");
- }
- }
- }
- islong= False;
- while (*s) {
- while (isspace(*s))
- s++;
- value= qh_strtod (s, &t);
- if (s == t) {
- if (!*qh rbox_command)
- strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
- if (*s && !firsttext)
- firsttext= linecount;
- if (!islong && !firstshort && coordcount)
- firstshort= linecount;
- break;
- }
- if (!firstpoint)
- firstpoint= linecount;
- s= t;
- if (++tokcount > maxcount)
- continue;
- if (qh HALFspace) {
- if (qh CDDinput)
- *(coordp++)= -value; /* both coefficients and offset */
- else
- *(coordp++)= value;
- }else {
- *(coords++)= value;
- if (qh CDDinput && !coordcount) {
- if (value != 1.0) {
- fprintf (qh ferr, "qhull input error: for cdd format, point at line %d does not start with '1'\n",
- linecount);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- coords--;
- }else if (isdelaunay) {
- paraboloid += value * value;
- if (qh ATinfinity) {
- if (qh CDDinput)
- infinity[coordcount-1] += value;
- else
- infinity[coordcount] += value;
- }
- }
- }
- if (++coordcount == diminput) {
- coordcount= 0;
- if (isdelaunay) {
- *(coords++)= paraboloid;
- maximize_(maxboloid, paraboloid);
- paraboloid= 0.0;
- }else if (qh HALFspace) {
- if (!qh_sethalfspace (*dimension, coords, &coords, normalp, offsetp, qh feasible_point)) {
- fprintf (qh ferr, "The halfspace was on line %d\n", linecount);
- if (wasbegin)
- fprintf (qh ferr, "The input appears to be in cdd format. If so, you should use option 'Fd'\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- coordp= qh half_space;
- }
- while (isspace(*s))
- s++;
- if (*s) {
- islong= True;
- if (!firstlong)
- firstlong= linecount;
- }
- }
- }
- if (!islong && !firstshort && coordcount)
- firstshort= linecount;
- if (!isfirst && s - qh line >= qh maxline) {
- fprintf(qh ferr, "qhull input error: line %d contained more than %d characters\n",
- linecount, (int) (s - qh line));
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- isfirst= False;
- }
- if (tokcount != maxcount) {
- newnum= fmin_(numinput, tokcount/diminput);
- fprintf(qh ferr,"\
-qhull warning: instead of %d %d-dimensional points, input contains\n\
-%d points and %d extra coordinates. Line %d is the first\npoint",
- numinput, diminput, tokcount/diminput, tokcount % diminput, firstpoint);
- if (firsttext)
- fprintf(qh ferr, ", line %d is the first comment", firsttext);
- if (firstshort)
- fprintf(qh ferr, ", line %d is the first short\nline", firstshort);
- if (firstlong)
- fprintf(qh ferr, ", line %d is the first long line", firstlong);
- fprintf(qh ferr, ". Continue with %d points.\n", newnum);
- numinput= newnum;
- if (isdelaunay && qh ATinfinity) {
- for (k= tokcount % diminput; k--; )
- infinity[k] -= *(--coords);
- *numpoints= newnum+1;
- }else {
- coords -= tokcount % diminput;
- *numpoints= newnum;
- }
- }
- if (isdelaunay && qh ATinfinity) {
- for (k= (*dimension) -1; k--; )
- infinity[k] /= numinput;
- if (coords == infinity)
- coords += (*dimension) -1;
- else {
- for (k= 0; k < (*dimension) -1; k++)
- *(coords++)= infinity[k];
- }
- *(coords++)= maxboloid * 1.1;
- }
- if (qh rbox_command[0]) {
- qh rbox_command[strlen(qh rbox_command)-1]= '\0';
- if (!strcmp (qh rbox_command, "./rbox D4"))
- fprintf (qh ferr, "\n\
-This is the qhull test case. If any errors or core dumps occur,\n\
-recompile qhull with 'make new'. If errors still occur, there is\n\
-an incompatibility. You should try a different compiler. You can also\n\
-change the choices in user.h. If you discover the source of the problem,\n\
-please send mail to qhull_bug@geom.umn.edu.\n\
-\n\
-Type 'qhull' for a short list of options.\n");
- }
- free (qh line);
- qh line= NULL;
- if (qh half_space) {
- free (qh half_space);
- qh half_space= NULL;
- }
- qh temp_malloc= NULL;
- trace1((qh ferr,"qh_readpoints: read in %d %d-dimensional points\n",
- numinput, diminput));
- return(points);
-} /* readpoints */
-
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="setfeasible">-</a>
-
- qh_setfeasible( dim )
- set qh.FEASIBLEpoint from qh.feasible_string in "n,n,n" or "n n n" format
-
- notes:
- "n,n,n" already checked by qh_initflags()
- see qh_readfeasible()
-*/
-void qh_setfeasible (int dim) {
- int tokcount= 0;
- char *s;
- coordT *coords, value;
-
- if (!(s= qh feasible_string)) {
- fprintf(qh ferr, "\
-qhull input error: halfspace intersection needs a feasible point.\n\
-Either prepend the input with 1 point or use 'Hn,n,n'. See manual.\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (!(qh feasible_point= (pointT*)malloc (dim* sizeof(coordT)))) {
- fprintf(qh ferr, "qhull error: insufficient memory for 'Hn,n,n'\n");
- qh_errexit(qh_ERRmem, NULL, NULL);
- }
- coords= qh feasible_point;
- while (*s) {
- value= qh_strtod (s, &s);
- if (++tokcount > dim) {
- fprintf (qh ferr, "qhull input warning: more coordinates for 'H%s' than dimension %d\n",
- qh feasible_string, dim);
- break;
- }
- *(coords++)= value;
- if (*s)
- s++;
- }
- while (++tokcount <= dim)
- *(coords++)= 0.0;
-} /* setfeasible */
-
-/*-<a href="qh-io.htm#TOC"
- >-------------------------------</a><a name="skipfacet">-</a>
-
- qh_skipfacet( facet )
- returns 'True' if this facet is not to be printed
-
- notes:
- based on the user provided slice thresholds and 'good' specifications
-*/
-boolT qh_skipfacet(facetT *facet) {
- facetT *neighbor, **neighborp;
-
- if (qh PRINTneighbors) {
- if (facet->good)
- return !qh PRINTgood;
- FOREACHneighbor_(facet) {
- if (neighbor->good)
- return False;
- }
- return True;
- }else if (qh PRINTgood)
- return !facet->good;
- else if (!facet->normal)
- return True;
- return (!qh_inthresholds (facet->normal, NULL));
-} /* skipfacet */
-
diff --git a/extern/qhull/src/io.h b/extern/qhull/src/io.h
deleted file mode 100644
index 351d56b3708..00000000000
--- a/extern/qhull/src/io.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*<html><pre> -<a href="qh-io.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- io.h
- declarations of Input/Output functions
-
- see README, qhull.h and io.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFio
-#define qhDEFio 1
-
-/*============ constants and flags ==================*/
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_MAXfirst">-</a>
-
- qh_MAXfirst
- maximum length of first two lines of stdin
-*/
-#define qh_MAXfirst 200
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_MINradius">-</a>
-
- qh_MINradius
- min radius for Gp and Gv, fraction of maxcoord
-*/
-#define qh_MINradius 0.02
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_GEOMepsilon">-</a>
-
- qh_GEOMepsilon
- adjust outer planes for 'lines closer' and geomview roundoff.
- This prevents bleed through.
-*/
-#define qh_GEOMepsilon 2e-3
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="qh_WHITESPACE">-</a>
-
- qh_WHITESPACE
- possible values of white space
-*/
-#define qh_WHITESPACE " \n\t\v\r\f"
-
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="RIDGE">-</a>
-
- qh_RIDGE
- to select which ridges to print in qh_eachvoronoi
-*/
-typedef enum
-{
- qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
-}
-qh_RIDGE;
-
-/*-<a href="qh-io.htm#TOC"
- >--------------------------------</a><a name="printvridgeT">-</a>
-
- printvridgeT
- prints results of qh_printvdiagram
-
- see:
- <a href="io.c#printvridge">qh_printvridge</a> for an example
-*/
-typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-
-/*============== -prototypes in alphabetical order =========*/
-
-void dfacet( unsigned id);
-void dvertex( unsigned id);
-void qh_countfacets (facetT *facetlist, setT *facets, boolT printall,
- int *numfacetsp, int *numsimplicialp, int *totneighborsp,
- int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
-setT *qh_detvridge (vertexT *vertex);
-setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex);
-int qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
-int qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder);
-void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-void qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane);
-void qh_markkeep (facetT *facetlist);
-setT *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp);
-void qh_order_vertexneighbors(vertexT *vertex);
-void qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall);
-void qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printcenter (FILE *fp, int format, char *string, facetT *facet);
-void qh_printcentrum (FILE *fp, facetT *facet, realT radius);
-void qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printend4geom (FILE *fp, facetT *facet, int *num, boolT printall);
-void qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printfacet(FILE *fp, facetT *facet);
-void qh_printfacet2math(FILE *fp, facetT *facet, int notfirst);
-void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
- facetT *facet, realT offset, realT color[3]);
-void qh_printfacet3math (FILE *fp, facetT *facet, int notfirst);
-void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
-void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet3vertex(FILE *fp, facetT *facet, int format);
-void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format);
-void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format);
-void qh_printfacetheader(FILE *fp, facetT *facet);
-void qh_printfacetridges(FILE *fp, facetT *facet);
-void qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printhelp_degenerate(FILE *fp);
-void qh_printhelp_singular(FILE *fp);
-void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
- setT *vertices, realT color[3]);
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
-void qh_printpoint(FILE *fp, char *string, pointT *point);
-void qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id);
-void qh_printpoint3 (FILE *fp, pointT *point);
-void qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
-void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
-void qh_printridge(FILE *fp, ridgeT *ridge);
-void qh_printspheres(FILE *fp, setT *vertices, realT radius);
-void qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
-void qh_printvertex(FILE *fp, vertexT *vertex);
-void qh_printvertexlist (FILE *fp, char* string, facetT *facetlist,
- setT *facets, boolT printall);
-void qh_printvertices (FILE *fp, char* string, setT *vertices);
-void qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall);
-void qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void qh_produce_output(void);
-void qh_projectdim3 (pointT *source, pointT *destination);
-int qh_readfeasible (int dim, char *remainder);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-void qh_setfeasible (int dim);
-boolT qh_skipfacet(facetT *facet);
-
-#endif /* qhDEFio */
diff --git a/extern/qhull/src/mem.c b/extern/qhull/src/mem.c
deleted file mode 100644
index 72934626684..00000000000
--- a/extern/qhull/src/mem.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/*<html><pre> -<a href="qh-mem.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- mem.c
- memory management routines for qhull
-
- This is a standalone program.
-
- To initialize memory:
-
- qh_meminit (stderr);
- qh_meminitbuffers (qh IStracing, qh_MEMalign, 7, qh_MEMbufsize,qh_MEMinitbuf);
- qh_memsize(sizeof(facetT));
- qh_memsize(sizeof(facetT));
- ...
- qh_memsetup();
-
- To free up all memory buffers:
- qh_memfreeshort (&curlong, &totlong);
-
- if qh_NOmem,
- malloc/free is used instead of mem.c
-
- notes:
- uses Quickfit algorithm (freelists for commonly allocated sizes)
- assumes small sizes for freelists (it discards the tail of memory buffers)
-
- see:
- qh-mem.htm and mem.h
- global.c (qh_initbuffers) for an example of using mem.c
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "mem.h"
-
-#ifndef qhDEFqhull
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-void qh_errexit(int exitcode, facetT *, ridgeT *);
-#endif
-
-/*============ -global data structure ==============
- see mem.h for definition
-*/
-
-qhmemT qhmem= {0}; /* remove "= {0}" if this causes a compiler error */
-
-#ifndef qh_NOmem
-
-/*============= internal functions ==============*/
-
-static int qh_intcompare(const void *i, const void *j);
-
-/*========== functions in alphabetical order ======== */
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="intcompare">-</a>
-
- qh_intcompare( i, j )
- used by qsort and bsearch to compare two integers
-*/
-static int qh_intcompare(const void *i, const void *j) {
- return(*((int *)i) - *((int *)j));
-} /* intcompare */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memalloc">-</a>
-
- qh_memalloc( insize )
- returns object of insize bytes
- qhmem is the global memory structure
-
- returns:
- pointer to allocated memory
- errors if insufficient memory
-
- notes:
- use explicit type conversion to avoid type warnings on some compilers
- actual object may be larger than insize
- use qh_memalloc_() for inline code for quick allocations
- logs allocations if 'T5'
-
- design:
- if size < qhmem.LASTsize
- if qhmem.freelists[size] non-empty
- return first object on freelist
- else
- round up request to size of qhmem.freelists[size]
- allocate new allocation buffer if necessary
- allocate object from allocation buffer
- else
- allocate object with malloc()
-*/
-void *qh_memalloc(int insize) {
- void **freelistp, *newbuffer;
- int index, size;
- int outsize, bufsize;
- void *object;
-
- if ((unsigned) insize <= (unsigned) qhmem.LASTsize) {
- index= qhmem.indextable[insize];
- freelistp= qhmem.freelists+index;
- if ((object= *freelistp)) {
- qhmem.cntquick++;
- *freelistp= *((void **)*freelistp); /* replace freelist with next object */
- return (object);
- }else {
- outsize= qhmem.sizetable[index];
- qhmem.cntshort++;
- if (outsize > qhmem .freesize) {
- if (!qhmem.curbuffer)
- bufsize= qhmem.BUFinit;
- else
- bufsize= qhmem.BUFsize;
- qhmem.totshort += bufsize;
- if (!(newbuffer= malloc(bufsize))) {
- fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
- qh_errexit(qhmem_ERRmem, NULL, NULL);
- }
- *((void **)newbuffer)= qhmem.curbuffer; /* prepend newbuffer to curbuffer
- list */
- qhmem.curbuffer= newbuffer;
- size= (sizeof(void **) + qhmem.ALIGNmask) & ~qhmem.ALIGNmask;
- qhmem.freemem= (void *)((char *)newbuffer+size);
- qhmem.freesize= bufsize - size;
- }
- object= qhmem.freemem;
- qhmem.freemem= (void *)((char *)qhmem.freemem + outsize);
- qhmem.freesize -= outsize;
- return object;
- }
- }else { /* long allocation */
- if (!qhmem.indextable) {
- fprintf (qhmem.ferr, "qhull internal error (qh_memalloc): qhmem has not been initialized.\n");
- qh_errexit(qhmem_ERRqhull, NULL, NULL);
- }
- outsize= insize;
- qhmem .cntlong++;
- qhmem .curlong++;
- qhmem .totlong += outsize;
- if (qhmem.maxlong < qhmem.totlong)
- qhmem.maxlong= qhmem.totlong;
- if (!(object= malloc(outsize))) {
- fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
- qh_errexit(qhmem_ERRmem, NULL, NULL);
- }
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_memalloc long: %d bytes at %p\n", outsize, object);
- }
- return (object);
-} /* memalloc */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memfree">-</a>
-
- qh_memfree( object, size )
- free up an object of size bytes
- size is insize from qh_memalloc
-
- notes:
- object may be NULL
- type checking warns if using (void **)object
- use qh_memfree_() for quick free's of small objects
-
- design:
- if size <= qhmem.LASTsize
- append object to corresponding freelist
- else
- call free(object)
-*/
-void qh_memfree(void *object, int size) {
- void **freelistp;
-
- if (!object)
- return;
- if (size <= qhmem.LASTsize) {
- qhmem .freeshort++;
- freelistp= qhmem.freelists + qhmem.indextable[size];
- *((void **)object)= *freelistp;
- *freelistp= object;
- }else {
- qhmem .freelong++;
- qhmem .totlong -= size;
- free (object);
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_memfree long: %d bytes at %p\n", size, object);
- }
-} /* memfree */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="memfreeshort">-</a>
-
- qh_memfreeshort( curlong, totlong )
- frees up all short and qhmem memory allocations
-
- returns:
- number and size of current long allocations
-*/
-void qh_memfreeshort (int *curlong, int *totlong) {
- void *buffer, *nextbuffer;
-
- *curlong= qhmem .cntlong - qhmem .freelong;
- *totlong= qhmem .totlong;
- for(buffer= qhmem.curbuffer; buffer; buffer= nextbuffer) {
- nextbuffer= *((void **) buffer);
- free(buffer);
- }
- qhmem.curbuffer= NULL;
- if (qhmem .LASTsize) {
- free (qhmem .indextable);
- free (qhmem .freelists);
- free (qhmem .sizetable);
- }
- memset((char *)&qhmem, 0, sizeof qhmem); /* every field is 0, FALSE, NULL */
-} /* memfreeshort */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="meminit">-</a>
-
- qh_meminit( ferr )
- initialize qhmem and test sizeof( void*)
-*/
-void qh_meminit (FILE *ferr) {
-
- memset((char *)&qhmem, 0, sizeof qhmem); /* every field is 0, FALSE, NULL */
- qhmem.ferr= ferr;
- if (sizeof(void*) < sizeof(int)) {
- fprintf (ferr, "qhull internal error (qh_meminit): sizeof(void*) < sizeof(int). qset.c will not work\n");
- exit (1); /* can not use qh_errexit() */
- }
-} /* meminit */
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="meminitbuffers">-</a>
-
- qh_meminitbuffers( tracelevel, alignment, numsizes, bufsize, bufinit )
- initialize qhmem
- if tracelevel >= 5, trace memory allocations
- alignment= desired address alignment for memory allocations
- numsizes= number of freelists
- bufsize= size of additional memory buffers for short allocations
- bufinit= size of initial memory buffer for short allocations
-*/
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes, int bufsize, int bufinit) {
-
- qhmem.IStracing= tracelevel;
- qhmem.NUMsizes= numsizes;
- qhmem.BUFsize= bufsize;
- qhmem.BUFinit= bufinit;
- qhmem.ALIGNmask= alignment-1;
- if (qhmem.ALIGNmask & ~qhmem.ALIGNmask) {
- fprintf (qhmem.ferr, "qhull internal error (qh_meminit): memory alignment %d is not a power of 2\n", alignment);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- qhmem.sizetable= (int *) calloc (numsizes, sizeof(int));
- qhmem.freelists= (void **) calloc (numsizes, sizeof(void *));
- if (!qhmem.sizetable || !qhmem.freelists) {
- fprintf(qhmem.ferr, "qhull error (qh_meminit): insufficient memory\n");
- qh_errexit (qhmem_ERRmem, NULL, NULL);
- }
- if (qhmem.IStracing >= 1)
- fprintf (qhmem.ferr, "qh_meminitbuffers: memory initialized with alignment %d\n", alignment);
-} /* meminitbuffers */
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="memsetup">-</a>
-
- qh_memsetup()
- set up memory after running memsize()
-*/
-void qh_memsetup (void) {
- int k,i;
-
- qsort(qhmem.sizetable, qhmem.TABLEsize, sizeof(int), qh_intcompare);
- qhmem.LASTsize= qhmem.sizetable[qhmem.TABLEsize-1];
- if (qhmem .LASTsize >= qhmem .BUFsize || qhmem.LASTsize >= qhmem .BUFinit) {
- fprintf (qhmem.ferr, "qhull error (qh_memsetup): largest mem size %d is >= buffer size %d or initial buffer size %d\n",
- qhmem .LASTsize, qhmem .BUFsize, qhmem .BUFinit);
- qh_errexit(qhmem_ERRmem, NULL, NULL);
- }
- if (!(qhmem.indextable= (int *)malloc((qhmem.LASTsize+1) * sizeof(int)))) {
- fprintf(qhmem.ferr, "qhull error (qh_memsetup): insufficient memory\n");
- qh_errexit(qhmem_ERRmem, NULL, NULL);
- }
- for(k=qhmem.LASTsize+1; k--; )
- qhmem.indextable[k]= k;
- i= 0;
- for(k= 0; k <= qhmem.LASTsize; k++) {
- if (qhmem.indextable[k] <= qhmem.sizetable[i])
- qhmem.indextable[k]= i;
- else
- qhmem.indextable[k]= ++i;
- }
-} /* memsetup */
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="memsize">-</a>
-
- qh_memsize( size )
- define a free list for this size
-*/
-void qh_memsize(int size) {
- int k;
-
- if (qhmem .LASTsize) {
- fprintf (qhmem .ferr, "qhull error (qh_memsize): called after qhmem_setup\n");
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- size= (size + qhmem.ALIGNmask) & ~qhmem.ALIGNmask;
- for(k= qhmem.TABLEsize; k--; ) {
- if (qhmem.sizetable[k] == size)
- return;
- }
- if (qhmem.TABLEsize < qhmem.NUMsizes)
- qhmem.sizetable[qhmem.TABLEsize++]= size;
- else
- fprintf(qhmem.ferr, "qhull warning (memsize): free list table has room for only %d sizes\n", qhmem.NUMsizes);
-} /* memsize */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="memstatistics">-</a>
-
- qh_memstatistics( fp )
- print out memory statistics
-
- notes:
- does not account for wasted memory at the end of each block
-*/
-void qh_memstatistics (FILE *fp) {
- int i, count, totfree= 0;
- void *object;
-
- for (i=0; i < qhmem.TABLEsize; i++) {
- count=0;
- for (object= qhmem .freelists[i]; object; object= *((void **)object))
- count++;
- totfree += qhmem.sizetable[i] * count;
- }
- fprintf (fp, "\nmemory statistics:\n\
-%7d quick allocations\n\
-%7d short allocations\n\
-%7d long allocations\n\
-%7d short frees\n\
-%7d long frees\n\
-%7d bytes of short memory in use\n\
-%7d bytes of short memory in freelists\n\
-%7d bytes of long memory allocated (except for input)\n\
-%7d bytes of long memory in use (in %d pieces)\n\
-%7d bytes per memory buffer (initially %d bytes)\n",
- qhmem .cntquick, qhmem.cntshort, qhmem.cntlong,
- qhmem .freeshort, qhmem.freelong,
- qhmem .totshort - qhmem .freesize - totfree,
- totfree,
- qhmem .maxlong, qhmem .totlong, qhmem .cntlong - qhmem .freelong,
- qhmem .BUFsize, qhmem .BUFinit);
- if (qhmem.cntlarger) {
- fprintf (fp, "%7d calls to qh_setlarger\n%7.2g average copy size\n",
- qhmem.cntlarger, ((float) qhmem.totlarger)/ qhmem.cntlarger);
- fprintf (fp, " freelists (bytes->count):");
- }
- for (i=0; i < qhmem.TABLEsize; i++) {
- count=0;
- for (object= qhmem .freelists[i]; object; object= *((void **)object))
- count++;
- fprintf (fp, " %d->%d", qhmem.sizetable[i], count);
- }
- fprintf (fp, "\n\n");
-} /* memstatistics */
-
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="NOmem">-</a>
-
- qh_NOmem
- turn off quick-fit memory allocation
-
- notes:
- uses malloc() and free() instead
-*/
-#else /* qh_NOmem */
-
-void *qh_memalloc(int insize) {
- void *object;
-
- if (!(object= malloc(insize))) {
- fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
- qh_errexit(qhmem_ERRmem, NULL, NULL);
- }
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_memalloc long: %d bytes at %p\n", insize, object);
- return object;
-}
-
-void qh_memfree(void *object, int size) {
-
- if (!object)
- return;
- free (object);
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_memfree long: %d bytes at %p\n", size, object);
-}
-
-void qh_memfreeshort (int *curlong, int *totlong) {
-
- memset((char *)&qhmem, 0, sizeof qhmem); /* every field is 0, FALSE, NULL */
- *curlong= 0;
- *totlong= 0;
-}
-
-void qh_meminit (FILE *ferr) {
-
- memset((char *)&qhmem, 0, sizeof qhmem); /* every field is 0, FALSE, NULL */
- qhmem.ferr= ferr;
- if (sizeof(void*) < sizeof(int)) {
- fprintf (ferr, "qhull internal error (qh_meminit): sizeof(void*) < sizeof(int). qset.c will not work\n");
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
-}
-
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes, int bufsize, int bufinit) {
-
- qhmem.IStracing= tracelevel;
-
-}
-
-void qh_memsetup (void) {
-
-}
-
-void qh_memsize(int size) {
-
-}
-
-void qh_memstatistics (FILE *fp) {
-
-}
-
-#endif /* qh_NOmem */
diff --git a/extern/qhull/src/mem.h b/extern/qhull/src/mem.h
deleted file mode 100644
index e9ebd1bb9bc..00000000000
--- a/extern/qhull/src/mem.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*<html><pre> -<a href="qh-mem.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- mem.h
- prototypes for memory management functions
-
- see qh-mem.htm, mem.c and qset.h
-
- for error handling, writes message and calls
- qh_errexit (qhmem_ERRmem, NULL, NULL) if insufficient memory
- and
- qh_errexit (qhmem_ERRqhull, NULL, NULL) otherwise
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmem
-#define qhDEFmem
-
-/*-<a href="qh-mem.htm#TOC"
- >-------------------------------</a><a name="NOmem">-</a>
-
- qh_NOmem
- turn off quick-fit memory allocation
-
- notes:
- mem.c implements Quickfit memory allocation for about 20% time
- savings. If it fails on your machine, try to locate the
- problem, and send the answer to qhull@geom.umn.edu. If this can
- not be done, define qh_NOmem to use malloc/free instead.
-
- #define qh_NOmem
-*/
-
-/*-------------------------------------------
- to avoid bus errors, memory allocation must consider alignment requirements.
- malloc() automatically takes care of alignment. Since mem.c manages
- its own memory, we need to explicitly specify alignment in
- qh_meminitbuffers().
-
- A safe choice is sizeof(double). sizeof(float) may be used if doubles
- do not occur in data structures and pointers are the same size. Be careful
- of machines (e.g., DEC Alpha) with large pointers. If gcc is available,
- use __alignof__(double) or fmax_(__alignof__(float), __alignof__(void *)).
-
- see <a href="user.h#MEMalign">qh_MEMalign</a> in user.h for qhull's alignment
-*/
-
-#define qhmem_ERRmem 4 /* matches qh_ERRmem in qhull.h */
-#define qhmem_ERRqhull 5 /* matches qh_ERRqhull in qhull.h */
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="ptr_intT">-</a>
-
- ptr_intT
- for casting a void* to an integer-type
-
- notes:
- On 64-bit machines, a pointer may be larger than an 'int'.
- qh_meminit() checks that 'long' holds a 'void*'
-*/
-typedef unsigned long ptr_intT;
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="qhmemT">-</a>
-
- qhmemT
- global memory structure for mem.c
-
- notes:
- users should ignore qhmem except for writing extensions
- qhmem is allocated in mem.c
-
- qhmem could be swapable like qh and qhstat, but then
- multiple qh's and qhmem's would need to keep in synch.
- A swapable qhmem would also waste memory buffers. As long
- as memory operations are atomic, there is no problem with
- multiple qh structures being active at the same time.
- If you need separate address spaces, you can swap the
- contents of qhmem.
-*/
-typedef struct qhmemT qhmemT;
-extern qhmemT qhmem;
-
-struct qhmemT { /* global memory management variables */
- int BUFsize; /* size of memory allocation buffer */
- int BUFinit; /* initial size of memory allocation buffer */
- int TABLEsize; /* actual number of sizes in free list table */
- int NUMsizes; /* maximum number of sizes in free list table */
- int LASTsize; /* last size in free list table */
- int ALIGNmask; /* worst-case alignment, must be 2^n-1 */
- void **freelists; /* free list table, linked by offset 0 */
- int *sizetable; /* size of each freelist */
- int *indextable; /* size->index table */
- void *curbuffer; /* current buffer, linked by offset 0 */
- void *freemem; /* free memory in curbuffer */
- int freesize; /* size of free memory in bytes */
- void *tempstack; /* stack of temporary memory, managed by users */
- FILE *ferr; /* file for reporting errors */
- int IStracing; /* =5 if tracing memory allocations */
- int cntquick; /* count of quick allocations */
- /* remove statistics doesn't effect speed */
- int cntshort; /* count of short allocations */
- int cntlong; /* count of long allocations */
- int curlong; /* current count of inuse, long allocations */
- int freeshort; /* count of short memfrees */
- int freelong; /* count of long memfrees */
- int totshort; /* total size of short allocations */
- int totlong; /* total size of long allocations */
- int maxlong; /* maximum totlong */
- int cntlarger; /* count of setlarger's */
- int totlarger; /* total copied by setlarger */
-};
-
-
-/*==================== -macros ====================*/
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memalloc_">-</a>
-
- qh_memalloc_(size, object, type)
- returns object of size bytes
- assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-
-#ifdef qh_NOmem
-#define qh_memalloc_(size, freelistp, object, type) {\
- object= (type*)qh_memalloc (size); }
-#else /* !qh_NOmem */
-
-#define qh_memalloc_(size, freelistp, object, type) {\
- freelistp= qhmem.freelists + qhmem.indextable[size];\
- if ((object= (type*)*freelistp)) {\
- qhmem.cntquick++; \
- *freelistp= *((void **)*freelistp);\
- }else object= (type*)qh_memalloc (size);}
-#endif
-
-/*-<a href="qh-mem.htm#TOC"
- >--------------------------------</a><a name="memfree_">-</a>
-
- qh_memfree_(object, size)
- free up an object
-
- notes:
- object may be NULL
- assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-#ifdef qh_NOmem
-#define qh_memfree_(object, size, freelistp) {\
- qh_memfree (object, size); }
-#else /* !qh_NOmem */
-
-#define qh_memfree_(object, size, freelistp) {\
- if (object) { \
- qhmem .freeshort++;\
- freelistp= qhmem.freelists + qhmem.indextable[size];\
- *((void **)object)= *freelistp;\
- *freelistp= object;}}
-#endif
-
-/*=============== prototypes in alphabetical order ============*/
-
-void *qh_memalloc(int insize);
-void qh_memfree (void *object, int size);
-void qh_memfreeshort (int *curlong, int *totlong);
-void qh_meminit (FILE *ferr);
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes,
- int bufsize, int bufinit);
-void qh_memsetup (void);
-void qh_memsize(int size);
-void qh_memstatistics (FILE *fp);
-
-#endif /* qhDEFmem */
diff --git a/extern/qhull/src/merge.c b/extern/qhull/src/merge.c
deleted file mode 100644
index 34ecda1865f..00000000000
--- a/extern/qhull/src/merge.c
+++ /dev/null
@@ -1,3626 +0,0 @@
-/*<html><pre> -<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="TOP">-</a>
-
- merge.c
- merges non-convex facets
-
- see qh-merge.htm and merge.h
-
- other modules call qh_premerge() and qh_postmerge()
-
- the user may call qh_postmerge() to perform additional merges.
-
- To remove deleted facets and vertices (qhull() in qhull.c):
- qh_partitionvisible (!qh_ALL, &numoutside); // visible_list, newfacet_list
- qh_deletevisible (); // qh.visible_list
- qh_resetlists (False, qh_RESETvisible); // qh.visible_list newvertex_list newfacet_list
-
- assumes qh.CENTERtype= centrum
-
- merges occur in qh_mergefacet and in qh_mergecycle
- vertex->neighbors not set until the first merge occurs
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-#ifndef qh_NOmerge
-
-/*=========== internal prototypes =========*/
-
-static int qh_compareangle(const void *p1, const void *p2);
-static int qh_comparemerge(const void *p1, const void *p2);
-static int qh_comparevisit (const void *p1, const void *p2);
-
-
-/*===== functions (alphabetical after premerge and postmerge) ======*/
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="premerge">-</a>
-
- qh_premerge( apex, maxcentrum )
- pre-merge nonconvex facets in qh.newfacet_list for apex
- maxcentrum defines coplanar and concave (qh_test_appendmerge)
-
- returns:
- deleted facets added to qh.visible_list with facet->visible set
-
- notes:
- uses globals, qh.MERGEexact, qh.PREmerge
-
- design:
- mark duplicate ridges in qh.newfacet_list
- merge facet cycles in qh.newfacet_list
- merge duplicate ridges and concave facets in qh.newfacet_list
- check merged facet cycles for degenerate and redundant facets
- merge degenerate and redundant facets
- collect coplanar and concave facets
- merge concave, coplanar, degenerate, and redundant facets
-*/
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle) {
- boolT othermerge= False;
- facetT *newfacet;
-
- if (qh ZEROcentrum && qh_checkzero(!qh_ALL))
- return;
- trace2((qh ferr, "qh_premerge: premerge centrum %2.2g angle %2.2g for apex v%d facetlist f%d\n",
- maxcentrum, maxangle, apex->id, getid_(qh newfacet_list)));
- if (qh IStracing >= 4 && qh num_facets < 50)
- qh_printlists();
- qh centrum_radius= maxcentrum;
- qh cos_max= maxangle;
- qh degen_mergeset= qh_settemp (qh TEMPsize);
- qh facet_mergeset= qh_settemp (qh TEMPsize);
- if (qh hull_dim >=3) {
- qh_mark_dupridges (qh newfacet_list); /* facet_mergeset */
- qh_mergecycle_all (qh newfacet_list, &othermerge);
- qh_forcedmerges (&othermerge /* qh facet_mergeset */);
- FORALLnew_facets { /* test samecycle merges */
- if (!newfacet->simplicial && !newfacet->mergeridge)
- qh_degen_redundant_neighbors (newfacet, NULL);
- }
- if (qh_merge_degenredundant())
- othermerge= True;
- }else /* qh hull_dim == 2 */
- qh_mergecycle_all (qh newfacet_list, &othermerge);
- qh_flippedmerges (qh newfacet_list, &othermerge);
- if (!qh MERGEexact || zzval_(Ztotmerge)) {
- zinc_(Zpremergetot);
- qh POSTmerging= False;
- qh_getmergeset_initial (qh newfacet_list);
- qh_all_merges (othermerge, False);
- }
- qh_settempfree(&qh facet_mergeset);
- qh_settempfree(&qh degen_mergeset);
-} /* premerge */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="postmerge">-</a>
-
- qh_postmerge( reason, maxcentrum, maxangle, vneighbors )
- post-merge nonconvex facets as defined by maxcentrum and maxangle
- 'reason' is for reporting progress
- if vneighbors,
- calls qh_test_vneighbors at end of qh_all_merge
- if firstmerge,
- calls qh_reducevertices before qh_getmergeset
-
- returns:
- if first call (qh.visible_list != qh.facet_list),
- builds qh.facet_newlist, qh.newvertex_list
- deleted facets added to qh.visible_list with facet->visible
- qh.visible_list == qh.facet_list
-
- notes:
-
-
- design:
- if first call
- set qh.visible_list and qh.newfacet_list to qh.facet_list
- add all facets to qh.newfacet_list
- mark non-simplicial facets, facet->newmerge
- set qh.newvertext_list to qh.vertex_list
- add all vertices to qh.newvertex_list
- if a pre-merge occured
- set vertex->delridge {will retest the ridge}
- if qh.MERGEexact
- call qh_reducevertices()
- if no pre-merging
- merge flipped facets
- determine non-convex facets
- merge all non-convex facets
-*/
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle,
- boolT vneighbors) {
- facetT *newfacet;
- boolT othermerges= False;
- vertexT *vertex;
-
- if (qh REPORTfreq || qh IStracing) {
- qh_buildtracing (NULL, NULL);
- qh_printsummary (qh ferr);
- if (qh PRINTstatistics)
- qh_printallstatistics (qh ferr, "reason");
- fprintf (qh ferr, "\n%s with 'C%.2g' and 'A%.2g'\n",
- reason, maxcentrum, maxangle);
- }
- trace2((qh ferr, "qh_postmerge: postmerge. test vneighbors? %d\n",
- vneighbors));
- qh centrum_radius= maxcentrum;
- qh cos_max= maxangle;
- qh POSTmerging= True;
- qh degen_mergeset= qh_settemp (qh TEMPsize);
- qh facet_mergeset= qh_settemp (qh TEMPsize);
- if (qh visible_list != qh facet_list) { /* first call */
- qh NEWfacets= True;
- qh visible_list= qh newfacet_list= qh facet_list;
- FORALLnew_facets {
- newfacet->newfacet= True;
- if (!newfacet->simplicial)
- newfacet->newmerge= True;
- zinc_(Zpostfacets);
- }
- qh newvertex_list= qh vertex_list;
- FORALLvertices
- vertex->newlist= True;
- if (qh VERTEXneighbors) { /* a merge has occurred */
- FORALLvertices
- vertex->delridge= True; /* test for redundant, needed? */
- if (qh MERGEexact) {
- if (qh hull_dim <= qh_DIMreduceBuild)
- qh_reducevertices(); /* was skipped during pre-merging */
- }
- }
- if (!qh PREmerge && !qh MERGEexact)
- qh_flippedmerges (qh newfacet_list, &othermerges);
- }
- qh_getmergeset_initial (qh newfacet_list);
- qh_all_merges (False, vneighbors);
- qh_settempfree(&qh facet_mergeset);
- qh_settempfree(&qh degen_mergeset);
-} /* post_merge */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="all_merges">-</a>
-
- qh_all_merges( othermerge, vneighbors )
- merge all non-convex facets
-
- set othermerge if already merged facets (for qh_reducevertices)
- if vneighbors
- tests vertex neighbors for convexity at end
- qh.facet_mergeset lists the non-convex ridges in qh_newfacet_list
- qh.degen_mergeset is defined
- if qh.MERGEexact && !qh.POSTmerging,
- does not merge coplanar facets
-
- returns:
- deleted facets added to qh.visible_list with facet->visible
- deleted vertices added qh.delvertex_list with vertex->delvertex
-
- notes:
- unless !qh.MERGEindependent,
- merges facets in independent sets
- uses qh.newfacet_list as argument since merges call qh_removefacet()
-
- design:
- while merges occur
- for each merge in qh.facet_mergeset
- unless one of the facets was already merged in this pass
- merge the facets
- test merged facets for additional merges
- add merges to qh.facet_mergeset
- if vertices record neighboring facets
- rename redundant vertices
- update qh.facet_mergeset
- if vneighbors ??
- tests vertex neighbors for convexity at end
-*/
-void qh_all_merges (boolT othermerge, boolT vneighbors) {
- facetT *facet1, *facet2;
- mergeT *merge;
- boolT wasmerge= True, isreduce;
- void **freelistp; /* used !qh_NOmem */
- vertexT *vertex;
- mergeType mergetype;
- int numcoplanar=0, numconcave=0, numdegenredun= 0, numnewmerges= 0;
-
- trace2((qh ferr, "qh_all_merges: starting to merge facets beginning from f%d\n",
- getid_(qh newfacet_list)));
- while (True) {
- wasmerge= False;
- while (qh_setsize (qh facet_mergeset)) {
- while ((merge= (mergeT*)qh_setdellast(qh facet_mergeset))) {
- facet1= merge->facet1;
- facet2= merge->facet2;
- mergetype= merge->type;
- qh_memfree_(merge, sizeof(mergeT), freelistp);
- if (facet1->visible || facet2->visible) /*deleted facet*/
- continue;
- if ((facet1->newfacet && !facet1->tested)
- || (facet2->newfacet && !facet2->tested)) {
- if (qh MERGEindependent && mergetype <= MRGanglecoplanar)
- continue; /* perform independent sets of merges */
- }
- qh_merge_nonconvex (facet1, facet2, mergetype);
- numdegenredun += qh_merge_degenredundant();
- numnewmerges++;
- wasmerge= True;
- if (mergetype == MRGconcave)
- numconcave++;
- else /* MRGcoplanar or MRGanglecoplanar */
- numcoplanar++;
- } /* while setdellast */
- if (qh POSTmerging && qh hull_dim <= qh_DIMreduceBuild
- && numnewmerges > qh_MAXnewmerges) {
- numnewmerges= 0;
- qh_reducevertices(); /* otherwise large post merges too slow */
- }
- qh_getmergeset (qh newfacet_list); /* facet_mergeset */
- } /* while mergeset */
- if (qh VERTEXneighbors) {
- isreduce= False;
- if (qh hull_dim >=4 && qh POSTmerging) {
- FORALLvertices
- vertex->delridge= True;
- isreduce= True;
- }
- if ((wasmerge || othermerge) && (!qh MERGEexact || qh POSTmerging)
- && qh hull_dim <= qh_DIMreduceBuild) {
- othermerge= False;
- isreduce= True;
- }
- if (isreduce) {
- if (qh_reducevertices()) {
- qh_getmergeset (qh newfacet_list); /* facet_mergeset */
- continue;
- }
- }
- }
- if (vneighbors && qh_test_vneighbors(/* qh newfacet_list */))
- continue;
- break;
- } /* while (True) */
- if (qh CHECKfrequently && !qh MERGEexact) {
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- qh_checkconvex (qh newfacet_list, qh_ALGORITHMfault);
- /* qh_checkconnect (); [this is slow and it changes the facet order] */
- qh RANDOMdist= qh old_randomdist;
- }
- trace1((qh ferr, "qh_all_merges: merged %d coplanar facets %d concave facets and %d degen or redundant facets.\n",
- numcoplanar, numconcave, numdegenredun));
- if (qh IStracing >= 4 && qh num_facets < 50)
- qh_printlists ();
-} /* all_merges */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="appendmergeset">-</a>
-
- qh_appendmergeset( facet, neighbor, mergetype, angle )
- appends an entry to qh.facet_mergeset or qh.degen_mergeset
-
- angle ignored if NULL or !qh.ANGLEmerge
-
- returns:
- merge appended to facet_mergeset or degen_mergeset
- sets ->degenerate or ->redundant if degen_mergeset
-
- see:
- qh_test_appendmerge()
-
- design:
- allocate merge entry
- if regular merge
- append to qh.facet_mergeset
- else if degenerate merge and qh.facet_mergeset is all degenerate
- append to qh.degen_mergeset
- else if degenerate merge
- prepend to qh.degen_mergeset
- else if redundant merge
- append to qh.degen_mergeset
-*/
-void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle) {
- mergeT *merge, *lastmerge;
- void **freelistp; /* used !qh_NOmem */
-
- if (facet->redundant)
- return;
- if (facet->degenerate && mergetype == MRGdegen)
- return;
- qh_memalloc_(sizeof(mergeT), freelistp, merge, mergeT);
- merge->facet1= facet;
- merge->facet2= neighbor;
- merge->type= mergetype;
- if (angle && qh ANGLEmerge)
- merge->angle= *angle;
- if (mergetype < MRGdegen)
- qh_setappend (&(qh facet_mergeset), merge);
- else if (mergetype == MRGdegen) {
- facet->degenerate= True;
- if (!(lastmerge= (mergeT*)qh_setlast (qh degen_mergeset))
- || lastmerge->type == MRGdegen)
- qh_setappend (&(qh degen_mergeset), merge);
- else
- qh_setaddnth (&(qh degen_mergeset), 0, merge);
- }else if (mergetype == MRGredundant) {
- facet->redundant= True;
- qh_setappend (&(qh degen_mergeset), merge);
- }else /* mergetype == MRGmirror */ {
- if (facet->redundant || neighbor->redundant) {
- fprintf(qh ferr, "qhull error (qh_appendmergeset): facet f%d or f%d is already a mirrored facet\n",
- facet->id, neighbor->id);
- qh_errexit2 (qh_ERRqhull, facet, neighbor);
- }
- if (!qh_setequal (facet->vertices, neighbor->vertices)) {
- fprintf(qh ferr, "qhull error (qh_appendmergeset): mirrored facets f%d and f%d do not have the same vertices\n",
- facet->id, neighbor->id);
- qh_errexit2 (qh_ERRqhull, facet, neighbor);
- }
- facet->redundant= True;
- neighbor->redundant= True;
- qh_setappend (&(qh degen_mergeset), merge);
- }
-} /* appendmergeset */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="basevertices">-</a>
-
- qh_basevertices( samecycle )
- return temporary set of base vertices for samecycle
- samecycle is first facet in the cycle
- assumes apex is SETfirst_( samecycle->vertices )
-
- returns:
- vertices (settemp)
- all ->seen are cleared
-
- notes:
- uses qh_vertex_visit;
-
- design:
- for each facet in samecycle
- for each unseen vertex in facet->vertices
- append to result
-*/
-setT *qh_basevertices (facetT *samecycle) {
- facetT *same;
- vertexT *apex, *vertex, **vertexp;
- setT *vertices= qh_settemp (qh TEMPsize);
-
- apex= SETfirstt_(samecycle->vertices, vertexT);
- apex->visitid= ++qh vertex_visit;
- FORALLsame_cycle_(samecycle) {
- if (same->mergeridge)
- continue;
- FOREACHvertex_(same->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- qh_setappend (&vertices, vertex);
- vertex->visitid= qh vertex_visit;
- vertex->seen= False;
- }
- }
- }
- trace4((qh ferr, "qh_basevertices: found %d vertices\n",
- qh_setsize (vertices)));
- return vertices;
-} /* basevertices */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="checkconnect">-</a>
-
- qh_checkconnect()
- check that new facets are connected
- new facets are on qh.newfacet_list
-
- notes:
- this is slow and it changes the order of the facets
- uses qh.visit_id
-
- design:
- move first new facet to end of qh.facet_list
- for all newly appended facets
- append unvisited neighbors to end of qh.facet_list
- for all new facets
- report error if unvisited
-*/
-void qh_checkconnect (void /* qh newfacet_list */) {
- facetT *facet, *newfacet, *errfacet= NULL, *neighbor, **neighborp;
-
- facet= qh newfacet_list;
- qh_removefacet (facet);
- qh_appendfacet (facet);
- facet->visitid= ++qh visit_id;
- FORALLfacet_(facet) {
- FOREACHneighbor_(facet) {
- if (neighbor->visitid != qh visit_id) {
- qh_removefacet (neighbor);
- qh_appendfacet (neighbor);
- neighbor->visitid= qh visit_id;
- }
- }
- }
- FORALLnew_facets {
- if (newfacet->visitid == qh visit_id)
- break;
- fprintf(qh ferr, "qhull error: f%d is not attached to the new facets\n",
- newfacet->id);
- errfacet= newfacet;
- }
- if (errfacet)
- qh_errexit (qh_ERRqhull, errfacet, NULL);
-} /* checkconnect */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="checkzero">-</a>
-
- qh_checkzero( testall )
- check that facets are clearly convex for qh.DISTround with qh.MERGEexact
-
- if testall,
- test all facets for qh.MERGEexact post-merging
- else
- test qh.newfacet_list
-
- if qh.MERGEexact,
- allows coplanar ridges
- skips convexity test while qh.ZEROall_ok
-
- returns:
- True if all facets !flipped, !dupridge, normal
- if all horizon facets are simplicial
- if all vertices are clearly below neighbor
- if all opposite vertices of horizon are below
- clears qh.ZEROall_ok if any problems or coplanar facets
-
- notes:
- uses qh.vertex_visit
- horizon facets may define multiple new facets
-
- design:
- for all facets in qh.newfacet_list or qh.facet_list
- check for flagged faults (flipped, etc.)
- for all facets in qh.newfacet_list or qh.facet_list
- for each neighbor of facet
- skip horizon facets for qh.newfacet_list
- test the opposite vertex
- if qh.newfacet_list
- test the other vertices in the facet's horizon facet
-*/
-boolT qh_checkzero (boolT testall) {
- facetT *facet, *neighbor, **neighborp;
- facetT *horizon, *facetlist;
- int neighbor_i;
- vertexT *vertex, **vertexp;
- realT dist;
-
- if (testall)
- facetlist= qh facet_list;
- else {
- facetlist= qh newfacet_list;
- FORALLfacet_(facetlist) {
- horizon= SETfirstt_(facet->neighbors, facetT);
- if (!horizon->simplicial)
- goto LABELproblem;
- if (facet->flipped || facet->dupridge || !facet->normal)
- goto LABELproblem;
- }
- if (qh MERGEexact && qh ZEROall_ok) {
- trace2((qh ferr, "qh_checkzero: skip convexity check until first pre-merge\n"));
- return True;
- }
- }
- FORALLfacet_(facetlist) {
- qh vertex_visit++;
- neighbor_i= 0;
- horizon= NULL;
- FOREACHneighbor_(facet) {
- if (!neighbor_i && !testall) {
- horizon= neighbor;
- neighbor_i++;
- continue; /* horizon facet tested in qh_findhorizon */
- }
- vertex= SETelemt_(facet->vertices, neighbor_i++, vertexT);
- vertex->visitid= qh vertex_visit;
- zzinc_(Zdistzero);
- qh_distplane (vertex->point, neighbor, &dist);
- if (dist >= -qh DISTround) {
- qh ZEROall_ok= False;
- if (!qh MERGEexact || testall || dist > qh DISTround)
- goto LABELnonconvex;
- }
- }
- if (!testall) {
- FOREACHvertex_(horizon->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- zzinc_(Zdistzero);
- qh_distplane (vertex->point, facet, &dist);
- if (dist >= -qh DISTround) {
- qh ZEROall_ok= False;
- if (!qh MERGEexact || dist > qh DISTround)
- goto LABELnonconvex;
- }
- break;
- }
- }
- }
- }
- trace2((qh ferr, "qh_checkzero: testall %d, facets are %s\n", testall,
- (qh MERGEexact && !testall) ?
- "not concave, flipped, or duplicate ridged" : "clearly convex"));
- return True;
-
- LABELproblem:
- qh ZEROall_ok= False;
- trace2((qh ferr, "qh_checkzero: facet f%d needs pre-merging\n",
- facet->id));
- return False;
-
- LABELnonconvex:
- trace2((qh ferr, "qh_checkzero: facet f%d and f%d are not clearly convex. v%d dist %.2g\n",
- facet->id, neighbor->id, vertex->id, dist));
- return False;
-} /* checkzero */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="compareangle">-</a>
-
- qh_compareangle( angle1, angle2 )
- used by qsort() to order merges by angle
-*/
-static int qh_compareangle(const void *p1, const void *p2) {
- mergeT *a= *((mergeT **)p1), *b= *((mergeT **)p2);
-
- return ((a->angle > b->angle) ? 1 : -1);
-} /* compareangle */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="comparemerge">-</a>
-
- qh_comparemerge( merge1, merge2 )
- used by qsort() to order merges
-*/
-static int qh_comparemerge(const void *p1, const void *p2) {
- mergeT *a= *((mergeT **)p1), *b= *((mergeT **)p2);
-
- return (a->type - b->type);
-} /* comparemerge */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="comparevisit">-</a>
-
- qh_comparevisit( vertex1, vertex2 )
- used by qsort() to order vertices by their visitid
-*/
-static int qh_comparevisit (const void *p1, const void *p2) {
- vertexT *a= *((vertexT **)p1), *b= *((vertexT **)p2);
-
- return (a->visitid - b->visitid);
-} /* comparevisit */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="copynonconvex">-</a>
-
- qh_copynonconvex( atridge )
- set non-convex flag on other ridges (if any) between same neighbors
-
- notes:
- may be faster if use smaller ridge set
-
- design:
- for each ridge of atridge's top facet
- if ridge shares the same neighbor
- set nonconvex flag
-*/
-void qh_copynonconvex (ridgeT *atridge) {
- facetT *facet, *otherfacet;
- ridgeT *ridge, **ridgep;
-
- facet= atridge->top;
- otherfacet= atridge->bottom;
- FOREACHridge_(facet->ridges) {
- if (otherfacet == otherfacet_(ridge, facet) && ridge != atridge) {
- ridge->nonconvex= True;
- trace4((qh ferr, "qh_copynonconvex: moved nonconvex flag from r%d to r%d\n",
- atridge->id, ridge->id));
- break;
- }
- }
-} /* copynonconvex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="degen_redundant_facet">-</a>
-
- qh_degen_redundant_facet( facet )
- check facet for degen. or redundancy
-
- notes:
- bumps vertex_visit
- called if a facet was redundant but no longer is (qh_merge_degenredundant)
- qh_appendmergeset() only appends first reference to facet (i.e., redundant)
-
- see:
- qh_degen_redundant_neighbors()
-
- design:
- test for redundant neighbor
- test for degenerate facet
-*/
-void qh_degen_redundant_facet (facetT *facet) {
- vertexT *vertex, **vertexp;
- facetT *neighbor, **neighborp;
-
- trace4((qh ferr, "qh_degen_redundant_facet: test facet f%d for degen/redundant\n",
- facet->id));
- FOREACHneighbor_(facet) {
- qh vertex_visit++;
- FOREACHvertex_(neighbor->vertices)
- vertex->visitid= qh vertex_visit;
- FOREACHvertex_(facet->vertices) {
- if (vertex->visitid != qh vertex_visit)
- break;
- }
- if (!vertex) {
- qh_appendmergeset (facet, neighbor, MRGredundant, NULL);
- trace2((qh ferr, "qh_degen_redundant_facet: f%d is contained in f%d. merge\n", facet->id, neighbor->id));
- return;
- }
- }
- if (qh_setsize (facet->neighbors) < qh hull_dim) {
- qh_appendmergeset (facet, facet, MRGdegen, NULL);
- trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate.\n", facet->id));
- }
-} /* degen_redundant_facet */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="degen_redundant_neighbors">-</a>
-
- qh_degen_redundant_neighbors( facet, delfacet, )
- append degenerate and redundant neighbors to facet_mergeset
- if delfacet,
- only checks neighbors of both delfacet and facet
- also checks current facet for degeneracy
-
- notes:
- bumps vertex_visit
- called for each qh_mergefacet() and qh_mergecycle()
- merge and statistics occur in merge_nonconvex
- qh_appendmergeset() only appends first reference to facet (i.e., redundant)
- it appends redundant facets after degenerate ones
-
- a degenerate facet has fewer than hull_dim neighbors
- a redundant facet's vertices is a subset of its neighbor's vertices
- tests for redundant merges first (appendmergeset is nop for others)
- in a merge, only needs to test neighbors of merged facet
-
- see:
- qh_merge_degenredundant() and qh_degen_redundant_facet()
-
- design:
- test for degenerate facet
- test for redundant neighbor
- test for degenerate neighbor
-*/
-void qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet) {
- vertexT *vertex, **vertexp;
- facetT *neighbor, **neighborp;
- int size;
-
- trace4((qh ferr, "qh_degen_redundant_neighbors: test neighbors of f%d with delfacet f%d\n",
- facet->id, getid_(delfacet)));
- if ((size= qh_setsize (facet->neighbors)) < qh hull_dim) {
- qh_appendmergeset (facet, facet, MRGdegen, NULL);
- trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate with %d neighbors.\n", facet->id, size));
- }
- if (!delfacet)
- delfacet= facet;
- qh vertex_visit++;
- FOREACHvertex_(facet->vertices)
- vertex->visitid= qh vertex_visit;
- FOREACHneighbor_(delfacet) {
- /* uses early out instead of checking vertex count */
- if (neighbor == facet)
- continue;
- FOREACHvertex_(neighbor->vertices) {
- if (vertex->visitid != qh vertex_visit)
- break;
- }
- if (!vertex) {
- qh_appendmergeset (neighbor, facet, MRGredundant, NULL);
- trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is contained in f%d. merge\n", neighbor->id, facet->id));
- }
- }
- FOREACHneighbor_(delfacet) { /* redundant merges occur first */
- if (neighbor == facet)
- continue;
- if ((size= qh_setsize (neighbor->neighbors)) < qh hull_dim) {
- qh_appendmergeset (neighbor, neighbor, MRGdegen, NULL);
- trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate with %d neighbors. Neighbor of f%d.\n", neighbor->id, size, facet->id));
- }
- }
-} /* degen_redundant_neighbors */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="find_newvertex">-</a>
-
- qh_find_newvertex( oldvertex, vertices, ridges )
- locate new vertex for renaming old vertex
- vertices is a set of possible new vertices
- vertices sorted by number of deleted ridges
-
- returns:
- newvertex or NULL
- each ridge includes both vertex and oldvertex
- vertices sorted by number of deleted ridges
-
- notes:
- modifies vertex->visitid
- new vertex is in one of the ridges
- renaming will not cause a duplicate ridge
- renaming will minimize the number of deleted ridges
- newvertex may not be adjacent in the dual (though unlikely)
-
- design:
- for each vertex in vertices
- set vertex->visitid to number of references in ridges
- remove unvisited vertices
- set qh.vertex_visit above all possible values
- sort vertices by number of references in ridges
- add each ridge to qh.hash_table
- for each vertex in vertices
- look for a vertex that would not cause a duplicate ridge after a rename
-*/
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges) {
- vertexT *vertex, **vertexp;
- setT *newridges;
- ridgeT *ridge, **ridgep;
- int size, hashsize;
- int hash;
-
-#ifndef qh_NOtrace
- if (qh IStracing >= 4) {
- fprintf (qh ferr, "qh_find_newvertex: find new vertex for v%d from ",
- oldvertex->id);
- FOREACHvertex_(vertices)
- fprintf (qh ferr, "v%d ", vertex->id);
- FOREACHridge_(ridges)
- fprintf (qh ferr, "r%d ", ridge->id);
- fprintf (qh ferr, "\n");
- }
-#endif
- FOREACHvertex_(vertices)
- vertex->visitid= 0;
- FOREACHridge_(ridges) {
- FOREACHvertex_(ridge->vertices)
- vertex->visitid++;
- }
- FOREACHvertex_(vertices) {
- if (!vertex->visitid) {
- qh_setdelnth (vertices, SETindex_(vertices,vertex));
- vertexp--; /* repeat since deleted this vertex */
- }
- }
- qh vertex_visit += qh_setsize (ridges);
- if (!qh_setsize (vertices)) {
- trace4((qh ferr, "qh_find_newvertex: vertices not in ridges for v%d\n",
- oldvertex->id));
- return NULL;
- }
- qsort (SETaddr_(vertices, vertexT), qh_setsize (vertices),
- sizeof (vertexT *), qh_comparevisit);
- /* can now use qh vertex_visit */
- if (qh PRINTstatistics) {
- size= qh_setsize (vertices);
- zinc_(Zintersect);
- zadd_(Zintersecttot, size);
- zmax_(Zintersectmax, size);
- }
- hashsize= qh_newhashtable (qh_setsize (ridges));
- FOREACHridge_(ridges)
- qh_hashridge (qh hash_table, hashsize, ridge, oldvertex);
- FOREACHvertex_(vertices) {
- newridges= qh_vertexridges (vertex);
- FOREACHridge_(newridges) {
- if (qh_hashridge_find (qh hash_table, hashsize, ridge, vertex, oldvertex, &hash)) {
- zinc_(Zdupridge);
- break;
- }
- }
- qh_settempfree (&newridges);
- if (!ridge)
- break; /* found a rename */
- }
- if (vertex) {
- /* counted in qh_renamevertex */
- trace2((qh ferr, "qh_find_newvertex: found v%d for old v%d from %d vertices and %d ridges.\n",
- vertex->id, oldvertex->id, qh_setsize (vertices), qh_setsize (ridges)));
- }else {
- zinc_(Zfindfail);
- trace0((qh ferr, "qh_find_newvertex: no vertex for renaming v%d (all duplicated ridges) during p%d\n",
- oldvertex->id, qh furthest_id));
- }
- qh_setfree (&qh hash_table);
- return vertex;
-} /* find_newvertex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="findbest_test">-</a>
-
- qh_findbest_test( testcentrum, facet, neighbor, bestfacet, dist, mindist, maxdist )
- test neighbor of facet for qh_findbestneighbor()
- if testcentrum,
- tests centrum (assumes it is defined)
- else
- tests vertices
-
- returns:
- if a better facet (i.e., vertices/centrum of facet closer to neighbor)
- updates bestfacet, dist, mindist, and maxdist
-*/
-void qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
- facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp) {
- realT dist, mindist, maxdist;
-
- if (testcentrum) {
- zzinc_(Zbestdist);
- qh_distplane(facet->center, neighbor, &dist);
- dist *= qh hull_dim; /* estimate furthest vertex */
- if (dist < 0) {
- maxdist= 0;
- mindist= dist;
- dist= -dist;
- }else
- maxdist= dist;
- }else
- dist= qh_getdistance (facet, neighbor, &mindist, &maxdist);
- if (dist < *distp) {
- *bestfacet= neighbor;
- *mindistp= mindist;
- *maxdistp= maxdist;
- *distp= dist;
- }
-} /* findbest_test */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="findbestneighbor">-</a>
-
- qh_findbestneighbor( facet, dist, mindist, maxdist )
- finds best neighbor (least dist) of a facet for merging
-
- returns:
- returns min and max distances and their max absolute value
-
- notes:
- avoids merging old into new
- assumes ridge->nonconvex only set on one ridge between a pair of facets
- could use an early out predicate but not worth it
-
- design:
- if a large facet
- will test centrum
- else
- will test vertices
- if a large facet
- test nonconvex neighbors for best merge
- else
- test all neighbors for the best merge
- if testing centrum
- get distance information
-*/
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp) {
- facetT *neighbor, **neighborp, *bestfacet= NULL;
- ridgeT *ridge, **ridgep;
- boolT nonconvex= True, testcentrum= False;
- int size= qh_setsize (facet->vertices);
-
- *distp= REALmax;
- if (size > qh_BESTcentrum2 * qh hull_dim + qh_BESTcentrum) {
- testcentrum= True;
- zinc_(Zbestcentrum);
- if (!facet->center)
- facet->center= qh_getcentrum (facet);
- }
- if (size > qh hull_dim + qh_BESTnonconvex) {
- FOREACHridge_(facet->ridges) {
- if (ridge->nonconvex) {
- neighbor= otherfacet_(ridge, facet);
- qh_findbest_test (testcentrum, facet, neighbor,
- &bestfacet, distp, mindistp, maxdistp);
- }
- }
- }
- if (!bestfacet) {
- nonconvex= False;
- FOREACHneighbor_(facet)
- qh_findbest_test (testcentrum, facet, neighbor,
- &bestfacet, distp, mindistp, maxdistp);
- }
- if (!bestfacet) {
- fprintf (qh ferr, "qhull internal error (qh_findbestneighbor): no neighbors for f%d\n", facet->id);
-
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- if (testcentrum)
- qh_getdistance (facet, bestfacet, mindistp, maxdistp);
- trace3((qh ferr, "qh_findbestneighbor: f%d is best neighbor for f%d testcentrum? %d nonconvex? %d dist %2.2g min %2.2g max %2.2g\n",
- bestfacet->id, facet->id, testcentrum, nonconvex, *distp, *mindistp, *maxdistp));
- return(bestfacet);
-} /* findbestneighbor */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="flippedmerges">-</a>
-
- qh_flippedmerges( facetlist, wasmerge )
- merge flipped facets into best neighbor
- assumes qh.facet_mergeset at top of temporary stack
-
- returns:
- no flipped facets on facetlist
- sets wasmerge if merge occurred
- degen/redundant merges passed through
-
- notes:
- othermerges not needed since qh.facet_mergeset is empty before & after
- keep it in case of change
-
- design:
- append flipped facets to qh.facetmergeset
- for each flipped merge
- find best neighbor
- merge facet into neighbor
- merge degenerate and redundant facets
- remove flipped merges from qh.facet_mergeset
-*/
-void qh_flippedmerges(facetT *facetlist, boolT *wasmerge) {
- facetT *facet, *neighbor, *facet1;
- realT dist, mindist, maxdist;
- mergeT *merge, **mergep;
- setT *othermerges;
- int nummerge=0;
-
- trace4((qh ferr, "qh_flippedmerges: begin\n"));
- FORALLfacet_(facetlist) {
- if (facet->flipped && !facet->visible)
- qh_appendmergeset (facet, facet, MRGflip, NULL);
- }
- othermerges= qh_settemppop(); /* was facet_mergeset */
- qh facet_mergeset= qh_settemp (qh TEMPsize);
- qh_settemppush (othermerges);
- FOREACHmerge_(othermerges) {
- facet1= merge->facet1;
- if (merge->type != MRGflip || facet1->visible)
- continue;
- if (qh TRACEmerge-1 == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- neighbor= qh_findbestneighbor (facet1, &dist, &mindist, &maxdist);
- trace0((qh ferr, "qh_flippedmerges: merge flipped f%d into f%d dist %2.2g during p%d\n",
- facet1->id, neighbor->id, dist, qh furthest_id));
- qh_mergefacet (facet1, neighbor, &mindist, &maxdist, !qh_MERGEapex);
- nummerge++;
- if (qh PRINTstatistics) {
- zinc_(Zflipped);
- wadd_(Wflippedtot, dist);
- wmax_(Wflippedmax, dist);
- }
- qh_merge_degenredundant();
- }
- FOREACHmerge_(othermerges) {
- if (merge->facet1->visible || merge->facet2->visible)
- qh_memfree (merge, sizeof(mergeT));
- else
- qh_setappend (&qh facet_mergeset, merge);
- }
- qh_settempfree (&othermerges);
- if (nummerge)
- *wasmerge= True;
- trace1((qh ferr, "qh_flippedmerges: merged %d flipped facets into a good neighbor\n", nummerge));
-} /* flippedmerges */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="forcedmerges">-</a>
-
- qh_forcedmerges( wasmerge )
- merge duplicated ridges
-
- returns:
- removes all duplicate ridges on facet_mergeset
- wasmerge set if merge
- qh.facet_mergeset may include non-forced merges (none for now)
- qh.degen_mergeset includes degen/redun merges
-
- notes:
- duplicate ridges occur when the horizon is pinched,
- i.e. a subridge occurs in more than two horizon ridges.
- could rename vertices that pinch the horizon
- assumes qh_merge_degenredundant() has not be called
- othermerges isn't needed since facet_mergeset is empty afterwards
- keep it in case of change
-
- design:
- for each duplicate ridge
- find current facets by chasing f.replace links
- determine best direction for facet
- merge one facet into the other
- remove duplicate ridges from qh.facet_mergeset
-*/
-void qh_forcedmerges(boolT *wasmerge) {
- facetT *facet1, *facet2;
- mergeT *merge, **mergep;
- realT dist1, dist2, mindist1, mindist2, maxdist1, maxdist2;
- setT *othermerges;
- int nummerge=0, numflip=0;
-
- if (qh TRACEmerge-1 == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- trace4((qh ferr, "qh_forcedmerges: begin\n"));
- othermerges= qh_settemppop(); /* was facet_mergeset */
- qh facet_mergeset= qh_settemp (qh TEMPsize);
- qh_settemppush (othermerges);
- FOREACHmerge_(othermerges) {
- if (merge->type != MRGridge)
- continue;
- facet1= merge->facet1;
- facet2= merge->facet2;
- while (facet1->visible) /* must exist, no qh_merge_degenredunant */
- facet1= facet1->f.replace; /* previously merged facet */
- while (facet2->visible)
- facet2= facet2->f.replace; /* previously merged facet */
- if (facet1 == facet2)
- continue;
- if (!qh_setin (facet2->neighbors, facet1)) {
- fprintf (qh ferr, "qhull internal error (qh_forcedmerges): f%d and f%d had a duplicate ridge but as f%d and f%d they are no longer neighbors\n",
- merge->facet1->id, merge->facet2->id, facet1->id, facet2->id);
- qh_errexit2 (qh_ERRqhull, facet1, facet2);
- }
- if (qh TRACEmerge-1 == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- dist1= qh_getdistance (facet1, facet2, &mindist1, &maxdist1);
- dist2= qh_getdistance (facet2, facet1, &mindist2, &maxdist2);
- trace0((qh ferr, "qh_forcedmerges: duplicate ridge between f%d and f%d, dist %2.2g and reverse dist %2.2g during p%d\n",
- facet1->id, facet2->id, dist1, dist2, qh furthest_id));
- if (dist1 < dist2)
- qh_mergefacet (facet1, facet2, &mindist1, &maxdist1, !qh_MERGEapex);
- else {
- qh_mergefacet (facet2, facet1, &mindist2, &maxdist2, !qh_MERGEapex);
- dist1= dist2;
- facet1= facet2;
- }
- if (facet1->flipped) {
- zinc_(Zmergeflipdup);
- numflip++;
- }else
- nummerge++;
- if (qh PRINTstatistics) {
- zinc_(Zduplicate);
- wadd_(Wduplicatetot, dist1);
- wmax_(Wduplicatemax, dist1);
- }
- }
- FOREACHmerge_(othermerges) {
- if (merge->type == MRGridge)
- qh_memfree (merge, sizeof(mergeT));
- else
- qh_setappend (&qh facet_mergeset, merge);
- }
- qh_settempfree (&othermerges);
- if (nummerge)
- *wasmerge= True;
- trace1((qh ferr, "qh_forcedmerges: merged %d facets and %d flipped facets across duplicated ridges\n",
- nummerge, numflip));
-} /* forcedmerges */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="getmergeset">-</a>
-
- qh_getmergeset( facetlist )
- determines nonconvex facets on facetlist
- tests !tested ridges and nonconvex ridges of !tested facets
-
- returns:
- returns sorted qh.facet_mergeset of facet-neighbor pairs to be merged
- all ridges tested
-
- notes:
- assumes no nonconvex ridges with both facets tested
- uses facet->tested/ridge->tested to prevent duplicate tests
- can not limit tests to modified ridges since the centrum changed
- uses qh.visit_id
-
- see:
- qh_getmergeset_initial()
-
- design:
- for each facet on facetlist
- for each ridge of facet
- if untested ridge
- test ridge for convexity
- if non-convex
- append ridge to qh.facet_mergeset
- sort qh.facet_mergeset by angle
-*/
-void qh_getmergeset(facetT *facetlist) {
- facetT *facet, *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
- int nummerges;
-
- nummerges= qh_setsize (qh facet_mergeset);
- trace4((qh ferr, "qh_getmergeset: started.\n"));
- qh visit_id++;
- FORALLfacet_(facetlist) {
- if (facet->tested)
- continue;
- facet->visitid= qh visit_id;
- facet->tested= True; /* must be non-simplicial due to merge */
- FOREACHneighbor_(facet)
- neighbor->seen= False;
- FOREACHridge_(facet->ridges) {
- if (ridge->tested && !ridge->nonconvex)
- continue;
- /* if tested & nonconvex, need to append merge */
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->seen) {
- ridge->tested= True;
- ridge->nonconvex= False;
- }else if (neighbor->visitid != qh visit_id) {
- ridge->tested= True;
- ridge->nonconvex= False;
- neighbor->seen= True; /* only one ridge is marked nonconvex */
- if (qh_test_appendmerge (facet, neighbor))
- ridge->nonconvex= True;
- }
- }
- }
- nummerges= qh_setsize (qh facet_mergeset);
- if (qh ANGLEmerge)
- qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_compareangle);
- else
- qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_comparemerge);
- if (qh POSTmerging) {
- zadd_(Zmergesettot2, nummerges);
- }else {
- zadd_(Zmergesettot, nummerges);
- zmax_(Zmergesetmax, nummerges);
- }
- trace2((qh ferr, "qh_getmergeset: %d merges found\n", nummerges));
-} /* getmergeset */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="getmergeset_initial">-</a>
-
- qh_getmergeset_initial( facetlist )
- determine initial qh.facet_mergeset for facets
- tests all facet/neighbor pairs on facetlist
-
- returns:
- sorted qh.facet_mergeset with nonconvex ridges
- sets facet->tested, ridge->tested, and ridge->nonconvex
-
- notes:
- uses visit_id, assumes ridge->nonconvex is False
-
- see:
- qh_getmergeset()
-
- design:
- for each facet on facetlist
- for each untested neighbor of facet
- test facet and neighbor for convexity
- if non-convex
- append merge to qh.facet_mergeset
- mark one of the ridges as nonconvex
- sort qh.facet_mergeset by angle
-*/
-void qh_getmergeset_initial (facetT *facetlist) {
- facetT *facet, *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
- int nummerges;
-
- qh visit_id++;
- FORALLfacet_(facetlist) {
- facet->visitid= qh visit_id;
- facet->tested= True;
- FOREACHneighbor_(facet) {
- if (neighbor->visitid != qh visit_id) {
- if (qh_test_appendmerge (facet, neighbor)) {
- FOREACHridge_(neighbor->ridges) {
- if (facet == otherfacet_(ridge, neighbor)) {
- ridge->nonconvex= True;
- break; /* only one ridge is marked nonconvex */
- }
- }
- }
- }
- }
- FOREACHridge_(facet->ridges)
- ridge->tested= True;
- }
- nummerges= qh_setsize (qh facet_mergeset);
- if (qh ANGLEmerge)
- qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_compareangle);
- else
- qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_comparemerge);
- if (qh POSTmerging) {
- zadd_(Zmergeinittot2, nummerges);
- }else {
- zadd_(Zmergeinittot, nummerges);
- zmax_(Zmergeinitmax, nummerges);
- }
- trace2((qh ferr, "qh_getmergeset_initial: %d merges found\n", nummerges));
-} /* getmergeset_initial */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="hashridge">-</a>
-
- qh_hashridge( hashtable, hashsize, ridge, oldvertex )
- add ridge to hashtable without oldvertex
-
- notes:
- assumes hashtable is large enough
-
- design:
- determine hash value for ridge without oldvertex
- find next empty slot for ridge
-*/
-void qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex) {
- int hash;
- ridgeT *ridgeA;
-
- hash= (int)qh_gethash (hashsize, ridge->vertices, qh hull_dim-1, 0, oldvertex);
- while (True) {
- if (!(ridgeA= SETelemt_(hashtable, hash, ridgeT))) {
- SETelem_(hashtable, hash)= ridge;
- break;
- }else if (ridgeA == ridge)
- break;
- if (++hash == hashsize)
- hash= 0;
- }
-} /* hashridge */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="hashridge_find">-</a>
-
- qh_hashridge_find( hashtable, hashsize, ridge, vertex, oldvertex, hashslot )
- returns matching ridge without oldvertex in hashtable
- for ridge without vertex
- if oldvertex is NULL
- matches with any one skip
-
- returns:
- matching ridge or NULL
- if no match,
- if ridge already in table
- hashslot= -1
- else
- hashslot= next NULL index
-
- notes:
- assumes hashtable is large enough
- can't match ridge to itself
-
- design:
- get hash value for ridge without vertex
- for each hashslot
- return match if ridge matches ridgeA without oldvertex
-*/
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge,
- vertexT *vertex, vertexT *oldvertex, int *hashslot) {
- int hash;
- ridgeT *ridgeA;
-
- *hashslot= 0;
- zinc_(Zhashridge);
- hash= (int)qh_gethash (hashsize, ridge->vertices, qh hull_dim-1, 0, vertex);
- while ((ridgeA= SETelemt_(hashtable, hash, ridgeT))) {
- if (ridgeA == ridge)
- *hashslot= -1;
- else {
- zinc_(Zhashridgetest);
- if (qh_setequal_except (ridge->vertices, vertex, ridgeA->vertices, oldvertex))
- return ridgeA;
- }
- if (++hash == hashsize)
- hash= 0;
- }
- if (!*hashslot)
- *hashslot= hash;
- return NULL;
-} /* hashridge_find */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="makeridges">-</a>
-
- qh_makeridges( facet )
- creates explicit ridges between simplicial facets
-
- returns:
- facet with ridges and without qh_MERGEridge
- ->simplicial is False
-
- notes:
- allows qh_MERGEridge flag
- uses existing ridges
- duplicate neighbors ok if ridges already exist (qh_mergecycle_ridges)
-
- see:
- qh_mergecycle_ridges()
-
- design:
- look for qh_MERGEridge neighbors
- mark neighbors that already have ridges
- for each unprocessed neighbor of facet
- create a ridge for neighbor and facet
- if any qh_MERGEridge neighbors
- delete qh_MERGEridge flags (already handled by qh_mark_dupridges)
-*/
-void qh_makeridges(facetT *facet) {
- facetT *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
- int neighbor_i, neighbor_n;
- boolT toporient, mergeridge= False;
-
- if (!facet->simplicial)
- return;
- trace4((qh ferr, "qh_makeridges: make ridges for f%d\n", facet->id));
- facet->simplicial= False;
- FOREACHneighbor_(facet) {
- if (neighbor == qh_MERGEridge)
- mergeridge= True;
- else
- neighbor->seen= False;
- }
- FOREACHridge_(facet->ridges)
- otherfacet_(ridge, facet)->seen= True;
- FOREACHneighbor_i_(facet) {
- if (neighbor == qh_MERGEridge)
- continue; /* fixed by qh_mark_dupridges */
- else if (!neighbor->seen) { /* no current ridges */
- ridge= qh_newridge();
- ridge->vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
- neighbor_i, 0);
- toporient= facet->toporient ^ (neighbor_i & 0x1);
- if (toporient) {
- ridge->top= facet;
- ridge->bottom= neighbor;
- }else {
- ridge->top= neighbor;
- ridge->bottom= facet;
- }
-#if 0 /* this also works */
- flip= (facet->toporient ^ neighbor->toporient)^(skip1 & 0x1) ^ (skip2 & 0x1);
- if (facet->toporient ^ (skip1 & 0x1) ^ flip) {
- ridge->top= neighbor;
- ridge->bottom= facet;
- }else {
- ridge->top= facet;
- ridge->bottom= neighbor;
- }
-#endif
- qh_setappend(&(facet->ridges), ridge);
- qh_setappend(&(neighbor->ridges), ridge);
- }
- }
- if (mergeridge) {
- while (qh_setdel (facet->neighbors, qh_MERGEridge))
- ; /* delete each one */
- }
-} /* makeridges */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mark_dupridges">-</a>
-
- qh_mark_dupridges( facetlist )
- add duplicated ridges to qh.facet_mergeset
- facet->dupridge is true
-
- returns:
- duplicate ridges on qh.facet_mergeset
- ->mergeridge/->mergeridge2 set
- duplicate ridges marked by qh_MERGEridge and both sides facet->dupridge
- no MERGEridges in neighbor sets
-
- notes:
- duplicate ridges occur when the horizon is pinched,
- i.e. a subridge occurs in more than two horizon ridges.
- could rename vertices that pinch the horizon
- uses qh.visit_id
-
- design:
- for all facets on facetlist
- if facet contains a duplicate ridge
- for each neighbor of facet
- if neighbor marked qh_MERGEridge (one side of the merge)
- set facet->mergeridge
- else
- if neighbor contains a duplicate ridge
- and the back link is qh_MERGEridge
- append duplicate ridge to qh.facet_mergeset
- for each duplicate ridge
- make ridge sets in preparation for merging
- remove qh_MERGEridge from neighbor set
- for each duplicate ridge
- restore the missing neighbor from the neighbor set that was qh_MERGEridge
- add the missing ridge for this neighbor
-*/
-void qh_mark_dupridges(facetT *facetlist) {
- facetT *facet, *neighbor, **neighborp;
- int nummerge=0;
- mergeT *merge, **mergep;
-
-
- trace4((qh ferr, "qh_mark_dupridges: identify duplicate ridges\n"));
- FORALLfacet_(facetlist) {
- if (facet->dupridge) {
- FOREACHneighbor_(facet) {
- if (neighbor == qh_MERGEridge) {
- facet->mergeridge= True;
- continue;
- }
- if (neighbor->dupridge
- && !qh_setin (neighbor->neighbors, facet)) { /* qh_MERGEridge */
- qh_appendmergeset (facet, neighbor, MRGridge, NULL);
- facet->mergeridge2= True;
- facet->mergeridge= True;
- nummerge++;
- }
- }
- }
- }
- if (!nummerge)
- return;
- FORALLfacet_(facetlist) { /* gets rid of qh_MERGEridge */
- if (facet->mergeridge && !facet->mergeridge2)
- qh_makeridges (facet);
- }
- FOREACHmerge_(qh facet_mergeset) { /* restore the missing neighbors */
- if (merge->type == MRGridge) {
- qh_setappend (&merge->facet2->neighbors, merge->facet1);
- qh_makeridges (merge->facet1); /* and the missing ridges */
- }
- }
- trace1((qh ferr, "qh_mark_dupridges: found %d duplicated ridges\n",
- nummerge));
-} /* mark_dupridges */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="maydropneighbor">-</a>
-
- qh_maydropneighbor( facet )
- drop neighbor relationship if no ridge between facet and neighbor
-
- returns:
- neighbor sets updated
- appends degenerate facets to qh.facet_mergeset
-
- notes:
- won't cause redundant facets since vertex inclusion is the same
- may drop vertex and neighbor if no ridge
- uses qh.visit_id
-
- design:
- visit all neighbors with ridges
- for each unvisited neighbor of facet
- delete neighbor and facet from the neighbor sets
- if neighbor becomes degenerate
- append neighbor to qh.degen_mergeset
- if facet is degenerate
- append facet to qh.degen_mergeset
-*/
-void qh_maydropneighbor (facetT *facet) {
- ridgeT *ridge, **ridgep;
- realT angledegen= qh_ANGLEdegen;
- facetT *neighbor, **neighborp;
-
- qh visit_id++;
- trace4((qh ferr, "qh_maydropneighbor: test f%d for no ridges to a neighbor\n",
- facet->id));
- FOREACHridge_(facet->ridges) {
- ridge->top->visitid= qh visit_id;
- ridge->bottom->visitid= qh visit_id;
- }
- FOREACHneighbor_(facet) {
- if (neighbor->visitid != qh visit_id) {
- trace0((qh ferr, "qh_maydropneighbor: facets f%d and f%d are no longer neighbors during p%d\n",
- facet->id, neighbor->id, qh furthest_id));
- zinc_(Zdropneighbor);
- qh_setdel (facet->neighbors, neighbor);
- neighborp--; /* repeat, deleted a neighbor */
- qh_setdel (neighbor->neighbors, facet);
- if (qh_setsize (neighbor->neighbors) < qh hull_dim) {
- zinc_(Zdropdegen);
- qh_appendmergeset (neighbor, neighbor, MRGdegen, &angledegen);
- trace2((qh ferr, "qh_maydropneighbors: f%d is degenerate.\n", neighbor->id));
- }
- }
- }
- if (qh_setsize (facet->neighbors) < qh hull_dim) {
- zinc_(Zdropdegen);
- qh_appendmergeset (facet, facet, MRGdegen, &angledegen);
- trace2((qh ferr, "qh_maydropneighbors: f%d is degenerate.\n", facet->id));
- }
-} /* maydropneighbor */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="merge_degenredundant">-</a>
-
- qh_merge_degenredundant()
- merge all degenerate and redundant facets
- qh.degen_mergeset contains merges from qh_degen_redundant_neighbors()
-
- returns:
- number of merges performed
- resets facet->degenerate/redundant
- if deleted (visible) facet has no neighbors
- sets ->f.replace to NULL
-
- notes:
- redundant merges happen before degenerate ones
- merging and renaming vertices can result in degen/redundant facets
-
- design:
- for each merge on qh.degen_mergeset
- if redundant merge
- if non-redundant facet merged into redundant facet
- recheck facet for redundancy
- else
- merge redundant facet into other facet
-*/
-int qh_merge_degenredundant (void) {
- int size;
- mergeT *merge;
- facetT *bestneighbor, *facet1, *facet2;
- realT dist, mindist, maxdist;
- vertexT *vertex, **vertexp;
- int nummerges= 0;
- mergeType mergetype;
-
- while ((merge= (mergeT*)qh_setdellast (qh degen_mergeset))) {
- facet1= merge->facet1;
- facet2= merge->facet2;
- mergetype= merge->type;
- qh_memfree (merge, sizeof(mergeT));
- if (facet1->visible)
- continue;
- facet1->degenerate= False;
- facet1->redundant= False;
- if (qh TRACEmerge-1 == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- if (mergetype == MRGredundant) {
- zinc_(Zneighbor);
- while (facet2->visible) {
- if (!facet2->f.replace) {
- fprintf (qh ferr, "qhull internal error (qh_merge_degenredunant): f%d redundant but f%d has no replacement\n",
- facet1->id, facet2->id);
- qh_errexit2 (qh_ERRqhull, facet1, facet2);
- }
- facet2= facet2->f.replace;
- }
- if (facet1 == facet2) {
- qh_degen_redundant_facet (facet1); /* in case of others */
- continue;
- }
- trace2((qh ferr, "qh_merge_degenredundant: facet f%d is contained in f%d, will merge\n",
- facet1->id, facet2->id));
- qh_mergefacet(facet1, facet2, NULL, NULL, !qh_MERGEapex);
- /* merge distance is already accounted for */
- nummerges++;
- }else { /* mergetype == MRGdegen, other merges may have fixed */
- if (!(size= qh_setsize (facet1->neighbors))) {
- zinc_(Zdelfacetdup);
- trace2((qh ferr, "qh_merge_degenredundant: facet f%d has no neighbors. Deleted\n", facet1->id));
- qh_willdelete (facet1, NULL);
- FOREACHvertex_(facet1->vertices) {
- qh_setdel (vertex->neighbors, facet1);
- if (!SETfirst_(vertex->neighbors)) {
- zinc_(Zdegenvertex);
- trace2((qh ferr, "qh_merge_degenredundant: deleted v%d because f%d has no neighbors\n",
- vertex->id, facet1->id));
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
- }
- }
- nummerges++;
- }else if (size < qh hull_dim) {
- bestneighbor= qh_findbestneighbor(facet1, &dist, &mindist, &maxdist);
- trace2((qh ferr, "qh_merge_degenredundant: facet f%d has %d neighbors, merge into f%d dist %2.2g\n",
- facet1->id, size, bestneighbor->id, dist));
- qh_mergefacet(facet1, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
- nummerges++;
- if (qh PRINTstatistics) {
- zinc_(Zdegen);
- wadd_(Wdegentot, dist);
- wmax_(Wdegenmax, dist);
- }
- } /* else, another merge fixed the degeneracy and redundancy tested */
- }
- }
- return nummerges;
-} /* merge_degenredundant */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="merge_nonconvex">-</a>
-
- qh_merge_nonconvex( facet1, facet2, mergetype )
- remove non-convex ridge between facet1 into facet2
- mergetype gives why the facet's are non-convex
-
- returns:
- merges one of the facets into the best neighbor
-
- design:
- if one of the facets is a new facet
- prefer merging new facet into old facet
- find best neighbors for both facets
- merge the nearest facet into its best neighbor
- update the statistics
-*/
-void qh_merge_nonconvex (facetT *facet1, facetT *facet2, mergeType mergetype) {
- facetT *bestfacet, *bestneighbor, *neighbor;
- realT dist, dist2, mindist, mindist2, maxdist, maxdist2;
-
- if (qh TRACEmerge-1 == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- trace3((qh ferr, "qh_merge_nonconvex: merge #%d for f%d and f%d type %d\n",
- zzval_(Ztotmerge) + 1, facet1->id, facet2->id, mergetype));
- /* concave or coplanar */
- if (!facet1->newfacet) {
- bestfacet= facet2; /* avoid merging old facet if new is ok */
- facet2= facet1;
- facet1= bestfacet;
- }else
- bestfacet= facet1;
- bestneighbor= qh_findbestneighbor(bestfacet, &dist, &mindist, &maxdist);
- neighbor= qh_findbestneighbor(facet2, &dist2, &mindist2, &maxdist2);
- if (dist < dist2) {
- qh_mergefacet(bestfacet, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
- }else if (qh AVOIDold && !facet2->newfacet
- && ((mindist >= -qh MAXcoplanar && maxdist <= qh max_outside)
- || dist * 1.5 < dist2)) {
- zinc_(Zavoidold);
- wadd_(Wavoidoldtot, dist);
- wmax_(Wavoidoldmax, dist);
- trace2((qh ferr, "qh_merge_nonconvex: avoid merging old facet f%d dist %2.2g. Use f%d dist %2.2g instead\n",
- facet2->id, dist2, facet1->id, dist2));
- qh_mergefacet(bestfacet, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
- }else {
- qh_mergefacet(facet2, neighbor, &mindist2, &maxdist2, !qh_MERGEapex);
- dist= dist2;
- }
- if (qh PRINTstatistics) {
- if (mergetype == MRGanglecoplanar) {
- zinc_(Zacoplanar);
- wadd_(Wacoplanartot, dist);
- wmax_(Wacoplanarmax, dist);
- }else if (mergetype == MRGconcave) {
- zinc_(Zconcave);
- wadd_(Wconcavetot, dist);
- wmax_(Wconcavemax, dist);
- }else { /* MRGcoplanar */
- zinc_(Zcoplanar);
- wadd_(Wcoplanartot, dist);
- wmax_(Wcoplanarmax, dist);
- }
- }
-} /* merge_nonconvex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle">-</a>
-
- qh_mergecycle( samecycle, newfacet )
- merge a cycle of facets starting at samecycle into a newfacet
- newfacet is a horizon facet with ->normal
- samecycle facets are simplicial from an apex
-
- returns:
- initializes vertex neighbors on first merge
- samecycle deleted (placed on qh.visible_list)
- newfacet at end of qh.facet_list
- deleted vertices on qh.del_vertices
-
- see:
- qh_mergefacet()
- called by qh_mergecycle_all() for multiple, same cycle facets
-
- design:
- make vertex neighbors if necessary
- make ridges for newfacet
- merge neighbor sets of samecycle into newfacet
- merge ridges of samecycle into newfacet
- merge vertex neighbors of samecycle into newfacet
- make apex of samecycle the apex of newfacet
- if newfacet wasn't a new facet
- add its vertices to qh.newvertex_list
- delete samecycle facets a make newfacet a newfacet
-*/
-void qh_mergecycle (facetT *samecycle, facetT *newfacet) {
- int traceonce= False, tracerestore= 0;
- vertexT *apex;
-#ifndef qh_NOtrace
- facetT *same;
-#endif
-
- if (newfacet->tricoplanar) {
- if (!qh TRInormals) {
- fprintf (qh ferr, "qh_mergecycle: does not work for tricoplanar facets. Use option 'Q11'\n");
- qh_errexit (qh_ERRqhull, newfacet, NULL);
- }
- newfacet->tricoplanar= False;
- newfacet->keepcentrum= False;
- }
- if (!qh VERTEXneighbors)
- qh_vertexneighbors();
- zzinc_(Ztotmerge);
- if (qh REPORTfreq2 && qh POSTmerging) {
- if (zzval_(Ztotmerge) > qh mergereport + qh REPORTfreq2)
- qh_tracemerging();
- }
-#ifndef qh_NOtrace
- if (qh TRACEmerge == zzval_(Ztotmerge))
- qhmem.IStracing= qh IStracing= qh TRACElevel;
- trace2((qh ferr, "qh_mergecycle: merge #%d for facets from cycle f%d into coplanar horizon f%d\n",
- zzval_(Ztotmerge), samecycle->id, newfacet->id));
- if (newfacet == qh tracefacet) {
- tracerestore= qh IStracing;
- qh IStracing= 4;
- fprintf (qh ferr, "qh_mergecycle: ========= trace merge %d of samecycle %d into trace f%d, furthest is p%d\n",
- zzval_(Ztotmerge), samecycle->id, newfacet->id, qh furthest_id);
- traceonce= True;
- }
- if (qh IStracing >=4) {
- fprintf (qh ferr, " same cycle:");
- FORALLsame_cycle_(samecycle)
- fprintf(qh ferr, " f%d", same->id);
- fprintf (qh ferr, "\n");
- }
- if (qh IStracing >=4)
- qh_errprint ("MERGING CYCLE", samecycle, newfacet, NULL, NULL);
-#endif /* !qh_NOtrace */
- apex= SETfirstt_(samecycle->vertices, vertexT);
- qh_makeridges (newfacet);
- qh_mergecycle_neighbors (samecycle, newfacet);
- qh_mergecycle_ridges (samecycle, newfacet);
- qh_mergecycle_vneighbors (samecycle, newfacet);
- if (SETfirstt_(newfacet->vertices, vertexT) != apex)
- qh_setaddnth (&newfacet->vertices, 0, apex); /* apex has last id */
- if (!newfacet->newfacet)
- qh_newvertices (newfacet->vertices);
- qh_mergecycle_facets (samecycle, newfacet);
- qh_tracemerge (samecycle, newfacet);
- /* check for degen_redundant_neighbors after qh_forcedmerges() */
- if (traceonce) {
- fprintf (qh ferr, "qh_mergecycle: end of trace facet\n");
- qh IStracing= tracerestore;
- }
-} /* mergecycle */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle_all">-</a>
-
- qh_mergecycle_all( facetlist, wasmerge )
- merge all samecycles of coplanar facets into horizon
- don't merge facets with ->mergeridge (these already have ->normal)
- all facets are simplicial from apex
- all facet->cycledone == False
-
- returns:
- all newfacets merged into coplanar horizon facets
- deleted vertices on qh.del_vertices
- sets wasmerge if any merge
-
- see:
- calls qh_mergecycle for multiple, same cycle facets
-
- design:
- for each facet on facetlist
- skip facets with duplicate ridges and normals
- check that facet is in a samecycle (->mergehorizon)
- if facet only member of samecycle
- sets vertex->delridge for all vertices except apex
- merge facet into horizon
- else
- mark all facets in samecycle
- remove facets with duplicate ridges from samecycle
- merge samecycle into horizon (deletes facets from facetlist)
-*/
-void qh_mergecycle_all (facetT *facetlist, boolT *wasmerge) {
- facetT *facet, *same, *prev, *horizon;
- facetT *samecycle= NULL, *nextfacet, *nextsame;
- vertexT *apex, *vertex, **vertexp;
- int cycles=0, total=0, facets, nummerge;
-
- trace2((qh ferr, "qh_mergecycle_all: begin\n"));
- for (facet= facetlist; facet && (nextfacet= facet->next); facet= nextfacet) {
- if (facet->normal)
- continue;
- if (!facet->mergehorizon) {
- fprintf (qh ferr, "qh_mergecycle_all: f%d without normal\n", facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- horizon= SETfirstt_(facet->neighbors, facetT);
- if (facet->f.samecycle == facet) {
- zinc_(Zonehorizon);
- /* merge distance done in qh_findhorizon */
- apex= SETfirstt_(facet->vertices, vertexT);
- FOREACHvertex_(facet->vertices) {
- if (vertex != apex)
- vertex->delridge= True;
- }
- horizon->f.newcycle= NULL;
- qh_mergefacet (facet, horizon, NULL, NULL, qh_MERGEapex);
- }else {
- samecycle= facet;
- facets= 0;
- prev= facet;
- for (same= facet->f.samecycle; same; /* FORALLsame_cycle_(facet) */
- same= (same == facet ? NULL :nextsame)) { /* ends at facet */
- nextsame= same->f.samecycle;
- if (same->cycledone || same->visible)
- qh_infiniteloop (same);
- same->cycledone= True;
- if (same->normal) {
- prev->f.samecycle= same->f.samecycle; /* unlink ->mergeridge */
- same->f.samecycle= NULL;
- }else {
- prev= same;
- facets++;
- }
- }
- while (nextfacet && nextfacet->cycledone) /* will delete samecycle */
- nextfacet= nextfacet->next;
- horizon->f.newcycle= NULL;
- qh_mergecycle (samecycle, horizon);
- nummerge= horizon->nummerge + facets;
- if (nummerge > qh_MAXnummerge)
- horizon->nummerge= qh_MAXnummerge;
- else
- horizon->nummerge= nummerge;
- zzinc_(Zcyclehorizon);
- total += facets;
- zzadd_(Zcyclefacettot, facets);
- zmax_(Zcyclefacetmax, facets);
- }
- cycles++;
- }
- if (cycles)
- *wasmerge= True;
- trace1((qh ferr, "qh_mergecycle_all: merged %d same cycles or facets into coplanar horizons\n", cycles));
-} /* mergecycle_all */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle_facets">-</a>
-
- qh_mergecycle_facets( samecycle, newfacet )
- finish merge of samecycle into newfacet
-
- returns:
- samecycle prepended to visible_list for later deletion and partitioning
- each facet->f.replace == newfacet
-
- newfacet moved to end of qh.facet_list
- makes newfacet a newfacet (get's facet1->id if it was old)
- sets newfacet->newmerge
- clears newfacet->center (unless merging into a large facet)
- clears newfacet->tested and ridge->tested for facet1
-
- adds neighboring facets to facet_mergeset if redundant or degenerate
-
- design:
- make newfacet a new facet and set its flags
- move samecycle facets to qh.visible_list for later deletion
- unless newfacet is large
- remove its centrum
-*/
-void qh_mergecycle_facets (facetT *samecycle, facetT *newfacet) {
- facetT *same, *next;
-
- trace4((qh ferr, "qh_mergecycle_facets: make newfacet new and samecycle deleted\n"));
- qh_removefacet(newfacet); /* append as a newfacet to end of qh facet_list */
- qh_appendfacet(newfacet);
- newfacet->newfacet= True;
- newfacet->simplicial= False;
- newfacet->newmerge= True;
-
- for (same= samecycle->f.samecycle; same; same= (same == samecycle ? NULL : next)) {
- next= same->f.samecycle; /* reused by willdelete */
- qh_willdelete (same, newfacet);
- }
- if (newfacet->center
- && qh_setsize (newfacet->vertices) <= qh hull_dim + qh_MAXnewcentrum) {
- qh_memfree (newfacet->center, qh normal_size);
- newfacet->center= NULL;
- }
- trace3((qh ferr, "qh_mergecycle_facets: merged facets from cycle f%d into f%d\n",
- samecycle->id, newfacet->id));
-} /* mergecycle_facets */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle_neighbors">-</a>
-
- qh_mergecycle_neighbors( samecycle, newfacet )
- add neighbors for samecycle facets to newfacet
-
- returns:
- newfacet with updated neighbors and vice-versa
- newfacet has ridges
- all neighbors of newfacet marked with qh.visit_id
- samecycle facets marked with qh.visit_id-1
- ridges updated for simplicial neighbors of samecycle with a ridge
-
- notes:
- assumes newfacet not in samecycle
- usually, samecycle facets are new, simplicial facets without internal ridges
- not so if horizon facet is coplanar to two different samecycles
-
- see:
- qh_mergeneighbors()
-
- design:
- check samecycle
- delete neighbors from newfacet that are also in samecycle
- for each neighbor of a facet in samecycle
- if neighbor is simplicial
- if first visit
- move the neighbor relation to newfacet
- update facet links for its ridges
- else
- make ridges for neighbor
- remove samecycle reference
- else
- update neighbor sets
-*/
-void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet) {
- facetT *same, *neighbor, **neighborp;
- int delneighbors= 0, newneighbors= 0;
- unsigned int samevisitid;
- ridgeT *ridge, **ridgep;
-
- samevisitid= ++qh visit_id;
- FORALLsame_cycle_(samecycle) {
- if (same->visitid == samevisitid || same->visible)
- qh_infiniteloop (samecycle);
- same->visitid= samevisitid;
- }
- newfacet->visitid= ++qh visit_id;
- trace4((qh ferr, "qh_mergecycle_neighbors: delete shared neighbors from newfacet\n"));
- FOREACHneighbor_(newfacet) {
- if (neighbor->visitid == samevisitid) {
- SETref_(neighbor)= NULL; /* samecycle neighbors deleted */
- delneighbors++;
- }else
- neighbor->visitid= qh visit_id;
- }
- qh_setcompact (newfacet->neighbors);
-
- trace4((qh ferr, "qh_mergecycle_neighbors: update neighbors\n"));
- FORALLsame_cycle_(samecycle) {
- FOREACHneighbor_(same) {
- if (neighbor->visitid == samevisitid)
- continue;
- if (neighbor->simplicial) {
- if (neighbor->visitid != qh visit_id) {
- qh_setappend (&newfacet->neighbors, neighbor);
- qh_setreplace (neighbor->neighbors, same, newfacet);
- newneighbors++;
- neighbor->visitid= qh visit_id;
- FOREACHridge_(neighbor->ridges) { /* update ridge in case of qh_makeridges */
- if (ridge->top == same) {
- ridge->top= newfacet;
- break;
- }else if (ridge->bottom == same) {
- ridge->bottom= newfacet;
- break;
- }
- }
- }else {
- qh_makeridges (neighbor);
- qh_setdel (neighbor->neighbors, same);
- /* same can't be horizon facet for neighbor */
- }
- }else { /* non-simplicial neighbor */
- qh_setdel (neighbor->neighbors, same);
- if (neighbor->visitid != qh visit_id) {
- qh_setappend (&neighbor->neighbors, newfacet);
- qh_setappend (&newfacet->neighbors, neighbor);
- neighbor->visitid= qh visit_id;
- newneighbors++;
- }
- }
- }
- }
- trace2((qh ferr, "qh_mergecycle_neighbors: deleted %d neighbors and added %d\n",
- delneighbors, newneighbors));
-} /* mergecycle_neighbors */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle_ridges">-</a>
-
- qh_mergecycle_ridges( samecycle, newfacet )
- add ridges/neighbors for facets in samecycle to newfacet
- all new/old neighbors of newfacet marked with qh.visit_id
- facets in samecycle marked with qh.visit_id-1
- newfacet marked with qh.visit_id
-
- returns:
- newfacet has merged ridges
-
- notes:
- ridge already updated for simplicial neighbors of samecycle with a ridge
-
- see:
- qh_mergeridges()
- qh_makeridges()
-
- design:
- remove ridges between newfacet and samecycle
- for each facet in samecycle
- for each ridge in facet
- update facet pointers in ridge
- skip ridges processed in qh_mergecycle_neighors
- free ridges between newfacet and samecycle
- free ridges between facets of samecycle (on 2nd visit)
- append remaining ridges to newfacet
- if simpilicial facet
- for each neighbor of facet
- if simplicial facet
- and not samecycle facet or newfacet
- make ridge between neighbor and newfacet
-*/
-void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet) {
- facetT *same, *neighbor= NULL;
- int numold=0, numnew=0;
- int neighbor_i, neighbor_n;
- unsigned int samevisitid;
- ridgeT *ridge, **ridgep;
- boolT toporient;
- void **freelistp; /* used !qh_NOmem */
-
- trace4((qh ferr, "qh_mergecycle_ridges: delete shared ridges from newfacet\n"));
- samevisitid= qh visit_id -1;
- FOREACHridge_(newfacet->ridges) {
- neighbor= otherfacet_(ridge, newfacet);
- if (neighbor->visitid == samevisitid)
- SETref_(ridge)= NULL; /* ridge free'd below */
- }
- qh_setcompact (newfacet->ridges);
-
- trace4((qh ferr, "qh_mergecycle_ridges: add ridges to newfacet\n"));
- FORALLsame_cycle_(samecycle) {
- FOREACHridge_(same->ridges) {
- if (ridge->top == same) {
- ridge->top= newfacet;
- neighbor= ridge->bottom;
- }else if (ridge->bottom == same) {
- ridge->bottom= newfacet;
- neighbor= ridge->top;
- }else if (ridge->top == newfacet || ridge->bottom == newfacet) {
- qh_setappend (&newfacet->ridges, ridge);
- numold++; /* already set by qh_mergecycle_neighbors */
- continue;
- }else {
- fprintf (qh ferr, "qhull internal error (qh_mergecycle_ridges): bad ridge r%d\n", ridge->id);
- qh_errexit (qh_ERRqhull, NULL, ridge);
- }
- if (neighbor == newfacet) {
- qh_setfree(&(ridge->vertices));
- qh_memfree_(ridge, sizeof(ridgeT), freelistp);
- numold++;
- }else if (neighbor->visitid == samevisitid) {
- qh_setdel (neighbor->ridges, ridge);
- qh_setfree(&(ridge->vertices));
- qh_memfree_(ridge, sizeof(ridgeT), freelistp);
- numold++;
- }else {
- qh_setappend (&newfacet->ridges, ridge);
- numold++;
- }
- }
- if (same->ridges)
- qh_settruncate (same->ridges, 0);
- if (!same->simplicial)
- continue;
- FOREACHneighbor_i_(same) { /* note: !newfact->simplicial */
- if (neighbor->visitid != samevisitid && neighbor->simplicial) {
- ridge= qh_newridge();
- ridge->vertices= qh_setnew_delnthsorted (same->vertices, qh hull_dim,
- neighbor_i, 0);
- toporient= same->toporient ^ (neighbor_i & 0x1);
- if (toporient) {
- ridge->top= newfacet;
- ridge->bottom= neighbor;
- }else {
- ridge->top= neighbor;
- ridge->bottom= newfacet;
- }
- qh_setappend(&(newfacet->ridges), ridge);
- qh_setappend(&(neighbor->ridges), ridge);
- numnew++;
- }
- }
- }
-
- trace2((qh ferr, "qh_mergecycle_ridges: found %d old ridges and %d new ones\n",
- numold, numnew));
-} /* mergecycle_ridges */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergecycle_vneighbors">-</a>
-
- qh_mergecycle_vneighbors( samecycle, newfacet )
- create vertex neighbors for newfacet from vertices of facets in samecycle
- samecycle marked with visitid == qh.visit_id - 1
-
- returns:
- newfacet vertices with updated neighbors
- marks newfacet with qh.visit_id-1
- deletes vertices that are merged away
- sets delridge on all vertices (faster here than in mergecycle_ridges)
-
- see:
- qh_mergevertex_neighbors()
-
- design:
- for each vertex of samecycle facet
- set vertex->delridge
- delete samecycle facets from vertex neighbors
- append newfacet to vertex neighbors
- if vertex only in newfacet
- delete it from newfacet
- add it to qh.del_vertices for later deletion
-*/
-void qh_mergecycle_vneighbors (facetT *samecycle, facetT *newfacet) {
- facetT *neighbor, **neighborp;
- unsigned int mergeid;
- vertexT *vertex, **vertexp, *apex;
- setT *vertices;
-
- trace4((qh ferr, "qh_mergecycle_vneighbors: update vertex neighbors for newfacet\n"));
- mergeid= qh visit_id - 1;
- newfacet->visitid= mergeid;
- vertices= qh_basevertices (samecycle); /* temp */
- apex= SETfirstt_(samecycle->vertices, vertexT);
- qh_setappend (&vertices, apex);
- FOREACHvertex_(vertices) {
- vertex->delridge= True;
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid == mergeid)
- SETref_(neighbor)= NULL;
- }
- qh_setcompact (vertex->neighbors);
- qh_setappend (&vertex->neighbors, newfacet);
- if (!SETsecond_(vertex->neighbors)) {
- zinc_(Zcyclevertex);
- trace2((qh ferr, "qh_mergecycle_vneighbors: deleted v%d when merging cycle f%d into f%d\n",
- vertex->id, samecycle->id, newfacet->id));
- qh_setdelsorted (newfacet->vertices, vertex);
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
- }
- }
- qh_settempfree (&vertices);
- trace3((qh ferr, "qh_mergecycle_vneighbors: merged vertices from cycle f%d into f%d\n",
- samecycle->id, newfacet->id));
-} /* mergecycle_vneighbors */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergefacet">-</a>
-
- qh_mergefacet( facet1, facet2, mindist, maxdist, mergeapex )
- merges facet1 into facet2
- mergeapex==qh_MERGEapex if merging new facet into coplanar horizon
-
- returns:
- qh.max_outside and qh.min_vertex updated
- initializes vertex neighbors on first merge
-
- returns:
- facet2 contains facet1's vertices, neighbors, and ridges
- facet2 moved to end of qh.facet_list
- makes facet2 a newfacet
- sets facet2->newmerge set
- clears facet2->center (unless merging into a large facet)
- clears facet2->tested and ridge->tested for facet1
-
- facet1 prepended to visible_list for later deletion and partitioning
- facet1->f.replace == facet2
-
- adds neighboring facets to facet_mergeset if redundant or degenerate
-
- notes:
- mindist/maxdist may be NULL
- traces merge if fmax_(maxdist,-mindist) > TRACEdist
-
- see:
- qh_mergecycle()
-
- design:
- trace merge and check for degenerate simplex
- make ridges for both facets
- update qh.max_outside, qh.max_vertex, qh.min_vertex
- update facet2->maxoutside and keepcentrum
- update facet2->nummerge
- update tested flags for facet2
- if facet1 is simplicial
- merge facet1 into facet2
- else
- merge facet1's neighbors into facet2
- merge facet1's ridges into facet2
- merge facet1's vertices into facet2
- merge facet1's vertex neighbors into facet2
- add facet2's vertices to qh.new_vertexlist
- unless qh_MERGEapex
- test facet2 for degenerate or redundant neighbors
- move facet1 to qh.visible_list for later deletion
- move facet2 to end of qh.newfacet_list
-*/
-void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex) {
- boolT traceonce= False;
- vertexT *vertex, **vertexp;
- int tracerestore=0, nummerge;
-
- if (facet1->tricoplanar || facet2->tricoplanar) {
- if (!qh TRInormals) {
- fprintf (qh ferr, "qh_mergefacet: does not work for tricoplanar facets. Use option 'Q11'\n");
- qh_errexit2 (qh_ERRqhull, facet1, facet2);
- }
- if (facet2->tricoplanar) {
- facet2->tricoplanar= False;
- facet2->keepcentrum= False;
- }
- }
- zzinc_(Ztotmerge);
- if (qh REPORTfreq2 && qh POSTmerging) {
- if (zzval_(Ztotmerge) > qh mergereport + qh REPORTfreq2)
- qh_tracemerging();
- }
-#ifndef qh_NOtrace
- if (qh build_cnt >= qh RERUN) {
- if (mindist && (-*mindist > qh TRACEdist || *maxdist > qh TRACEdist)) {
- tracerestore= 0;
- qh IStracing= qh TRACElevel;
- traceonce= True;
- fprintf (qh ferr, "qh_mergefacet: ========= trace wide merge #%d (%2.2g) for f%d into f%d, last point was p%d\n", zzval_(Ztotmerge),
- fmax_(-*mindist, *maxdist), facet1->id, facet2->id, qh furthest_id);
- }else if (facet1 == qh tracefacet || facet2 == qh tracefacet) {
- tracerestore= qh IStracing;
- qh IStracing= 4;
- traceonce= True;
- fprintf (qh ferr, "qh_mergefacet: ========= trace merge #%d involving f%d, furthest is p%d\n",
- zzval_(Ztotmerge), qh tracefacet_id, qh furthest_id);
- }
- }
- if (qh IStracing >= 2) {
- realT mergemin= -2;
- realT mergemax= -2;
-
- if (mindist) {
- mergemin= *mindist;
- mergemax= *maxdist;
- }
- fprintf (qh ferr, "qh_mergefacet: #%d merge f%d into f%d, mindist= %2.2g, maxdist= %2.2g\n",
- zzval_(Ztotmerge), facet1->id, facet2->id, mergemin, mergemax);
- }
-#endif /* !qh_NOtrace */
- if (facet1 == facet2 || facet1->visible || facet2->visible) {
- fprintf (qh ferr, "qhull internal error (qh_mergefacet): either f%d and f%d are the same or one is a visible facet\n",
- facet1->id, facet2->id);
- qh_errexit2 (qh_ERRqhull, facet1, facet2);
- }
- if (qh num_facets - qh num_visible <= qh hull_dim + 1) {
- fprintf(qh ferr, "\n\
-qhull precision error: Only %d facets remain. Can not merge another\n\
-pair. The input is too degenerate or the convexity constraints are\n\
-too strong.\n", qh hull_dim+1);
- if (qh hull_dim >= 5 && !qh MERGEexact)
- fprintf(qh ferr, "Option 'Qx' may avoid this problem.\n");
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (!qh VERTEXneighbors)
- qh_vertexneighbors();
- qh_makeridges(facet1);
- qh_makeridges(facet2);
- if (qh IStracing >=4)
- qh_errprint ("MERGING", facet1, facet2, NULL, NULL);
- if (mindist) {
- maximize_(qh max_outside, *maxdist);
- maximize_(qh max_vertex, *maxdist);
-#if qh_MAXoutside
- maximize_(facet2->maxoutside, *maxdist);
-#endif
- minimize_(qh min_vertex, *mindist);
- if (!facet2->keepcentrum
- && (*maxdist > qh WIDEfacet || *mindist < -qh WIDEfacet)) {
- facet2->keepcentrum= True;
- zinc_(Zwidefacet);
- }
- }
- nummerge= facet1->nummerge + facet2->nummerge + 1;
- if (nummerge >= qh_MAXnummerge)
- facet2->nummerge= qh_MAXnummerge;
- else
- facet2->nummerge= nummerge;
- facet2->newmerge= True;
- facet2->dupridge= False;
- qh_updatetested (facet1, facet2);
- if (qh hull_dim > 2 && qh_setsize (facet1->vertices) == qh hull_dim)
- qh_mergesimplex (facet1, facet2, mergeapex);
- else {
- qh vertex_visit++;
- FOREACHvertex_(facet2->vertices)
- vertex->visitid= qh vertex_visit;
- if (qh hull_dim == 2)
- qh_mergefacet2d(facet1, facet2);
- else {
- qh_mergeneighbors(facet1, facet2);
- qh_mergevertices(facet1->vertices, &facet2->vertices);
- }
- qh_mergeridges(facet1, facet2);
- qh_mergevertex_neighbors(facet1, facet2);
- if (!facet2->newfacet)
- qh_newvertices (facet2->vertices);
- }
- if (!mergeapex)
- qh_degen_redundant_neighbors (facet2, facet1);
- if (facet2->coplanar || !facet2->newfacet) {
- zinc_(Zmergeintohorizon);
- }else if (!facet1->newfacet && facet2->newfacet) {
- zinc_(Zmergehorizon);
- }else {
- zinc_(Zmergenew);
- }
- qh_willdelete (facet1, facet2);
- qh_removefacet(facet2); /* append as a newfacet to end of qh facet_list */
- qh_appendfacet(facet2);
- facet2->newfacet= True;
- facet2->tested= False;
- qh_tracemerge (facet1, facet2);
- if (traceonce) {
- fprintf (qh ferr, "qh_mergefacet: end of wide tracing\n");
- qh IStracing= tracerestore;
- }
-} /* mergefacet */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergefacet2d">-</a>
-
- qh_mergefacet2d( facet1, facet2 )
- in 2d, merges neighbors and vertices of facet1 into facet2
-
- returns:
- build ridges for neighbors if necessary
- facet2 looks like a simplicial facet except for centrum, ridges
- neighbors are opposite the corresponding vertex
- maintains orientation of facet2
-
- notes:
- qh_mergefacet() retains non-simplicial structures
- they are not needed in 2d, but later routines may use them
- preserves qh.vertex_visit for qh_mergevertex_neighbors()
-
- design:
- get vertices and neighbors
- determine new vertices and neighbors
- set new vertices and neighbors and adjust orientation
- make ridges for new neighbor if needed
-*/
-void qh_mergefacet2d (facetT *facet1, facetT *facet2) {
- vertexT *vertex1A, *vertex1B, *vertex2A, *vertex2B, *vertexA, *vertexB;
- facetT *neighbor1A, *neighbor1B, *neighbor2A, *neighbor2B, *neighborA, *neighborB;
-
- vertex1A= SETfirstt_(facet1->vertices, vertexT);
- vertex1B= SETsecondt_(facet1->vertices, vertexT);
- vertex2A= SETfirstt_(facet2->vertices, vertexT);
- vertex2B= SETsecondt_(facet2->vertices, vertexT);
- neighbor1A= SETfirstt_(facet1->neighbors, facetT);
- neighbor1B= SETsecondt_(facet1->neighbors, facetT);
- neighbor2A= SETfirstt_(facet2->neighbors, facetT);
- neighbor2B= SETsecondt_(facet2->neighbors, facetT);
- if (vertex1A == vertex2A) {
- vertexA= vertex1B;
- vertexB= vertex2B;
- neighborA= neighbor2A;
- neighborB= neighbor1A;
- }else if (vertex1A == vertex2B) {
- vertexA= vertex1B;
- vertexB= vertex2A;
- neighborA= neighbor2B;
- neighborB= neighbor1A;
- }else if (vertex1B == vertex2A) {
- vertexA= vertex1A;
- vertexB= vertex2B;
- neighborA= neighbor2A;
- neighborB= neighbor1B;
- }else { /* 1B == 2B */
- vertexA= vertex1A;
- vertexB= vertex2A;
- neighborA= neighbor2B;
- neighborB= neighbor1B;
- }
- /* vertexB always from facet2, neighborB always from facet1 */
- if (vertexA->id > vertexB->id) {
- SETfirst_(facet2->vertices)= vertexA;
- SETsecond_(facet2->vertices)= vertexB;
- if (vertexB == vertex2A)
- facet2->toporient= !facet2->toporient;
- SETfirst_(facet2->neighbors)= neighborA;
- SETsecond_(facet2->neighbors)= neighborB;
- }else {
- SETfirst_(facet2->vertices)= vertexB;
- SETsecond_(facet2->vertices)= vertexA;
- if (vertexB == vertex2B)
- facet2->toporient= !facet2->toporient;
- SETfirst_(facet2->neighbors)= neighborB;
- SETsecond_(facet2->neighbors)= neighborA;
- }
- qh_makeridges (neighborB);
- qh_setreplace(neighborB->neighbors, facet1, facet2);
- trace4((qh ferr, "qh_mergefacet2d: merged v%d and neighbor f%d of f%d into f%d\n",
- vertexA->id, neighborB->id, facet1->id, facet2->id));
-} /* mergefacet2d */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergeneighbors">-</a>
-
- qh_mergeneighbors( facet1, facet2 )
- merges the neighbors of facet1 into facet2
-
- see:
- qh_mergecycle_neighbors()
-
- design:
- for each neighbor of facet1
- if neighbor is also a neighbor of facet2
- if neighbor is simpilicial
- make ridges for later deletion as a degenerate facet
- update its neighbor set
- else
- move the neighbor relation to facet2
- remove the neighbor relation for facet1 and facet2
-*/
-void qh_mergeneighbors(facetT *facet1, facetT *facet2) {
- facetT *neighbor, **neighborp;
-
- trace4((qh ferr, "qh_mergeneighbors: merge neighbors of f%d and f%d\n",
- facet1->id, facet2->id));
- qh visit_id++;
- FOREACHneighbor_(facet2) {
- neighbor->visitid= qh visit_id;
- }
- FOREACHneighbor_(facet1) {
- if (neighbor->visitid == qh visit_id) {
- if (neighbor->simplicial) /* is degen, needs ridges */
- qh_makeridges (neighbor);
- if (SETfirstt_(neighbor->neighbors, facetT) != facet1) /*keep newfacet->horizon*/
- qh_setdel (neighbor->neighbors, facet1);
- else {
- qh_setdel(neighbor->neighbors, facet2);
- qh_setreplace(neighbor->neighbors, facet1, facet2);
- }
- }else if (neighbor != facet2) {
- qh_setappend(&(facet2->neighbors), neighbor);
- qh_setreplace(neighbor->neighbors, facet1, facet2);
- }
- }
- qh_setdel(facet1->neighbors, facet2); /* here for makeridges */
- qh_setdel(facet2->neighbors, facet1);
-} /* mergeneighbors */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergeridges">-</a>
-
- qh_mergeridges( facet1, facet2 )
- merges the ridge set of facet1 into facet2
-
- returns:
- may delete all ridges for a vertex
- sets vertex->delridge on deleted ridges
-
- see:
- qh_mergecycle_ridges()
-
- design:
- delete ridges between facet1 and facet2
- mark (delridge) vertices on these ridges for later testing
- for each remaining ridge
- rename facet1 to facet2
-*/
-void qh_mergeridges(facetT *facet1, facetT *facet2) {
- ridgeT *ridge, **ridgep;
- vertexT *vertex, **vertexp;
-
- trace4((qh ferr, "qh_mergeridges: merge ridges of f%d and f%d\n",
- facet1->id, facet2->id));
- FOREACHridge_(facet2->ridges) {
- if ((ridge->top == facet1) || (ridge->bottom == facet1)) {
- FOREACHvertex_(ridge->vertices)
- vertex->delridge= True;
- qh_delridge(ridge); /* expensive in high-d, could rebuild */
- ridgep--; /*repeat*/
- }
- }
- FOREACHridge_(facet1->ridges) {
- if (ridge->top == facet1)
- ridge->top= facet2;
- else
- ridge->bottom= facet2;
- qh_setappend(&(facet2->ridges), ridge);
- }
-} /* mergeridges */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergesimplex">-</a>
-
- qh_mergesimplex( facet1, facet2, mergeapex )
- merge simplicial facet1 into facet2
- mergeapex==qh_MERGEapex if merging samecycle into horizon facet
- vertex id is latest (most recently created)
- facet1 may be contained in facet2
- ridges exist for both facets
-
- returns:
- facet2 with updated vertices, ridges, neighbors
- updated neighbors for facet1's vertices
- facet1 not deleted
- sets vertex->delridge on deleted ridges
-
- notes:
- special case code since this is the most common merge
- called from qh_mergefacet()
-
- design:
- if qh_MERGEapex
- add vertices of facet2 to qh.new_vertexlist if necessary
- add apex to facet2
- else
- for each ridge between facet1 and facet2
- set vertex->delridge
- determine the apex for facet1 (i.e., vertex to be merged)
- unless apex already in facet2
- insert apex into vertices for facet2
- add vertices of facet2 to qh.new_vertexlist if necessary
- add apex to qh.new_vertexlist if necessary
- for each vertex of facet1
- if apex
- rename facet1 to facet2 in its vertex neighbors
- else
- delete facet1 from vertex neighors
- if only in facet2
- add vertex to qh.del_vertices for later deletion
- for each ridge of facet1
- delete ridges between facet1 and facet2
- append other ridges to facet2 after renaming facet to facet2
-*/
-void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex) {
- vertexT *vertex, **vertexp, *apex;
- ridgeT *ridge, **ridgep;
- boolT issubset= False;
- int vertex_i= -1, vertex_n;
- facetT *neighbor, **neighborp, *otherfacet;
-
- if (mergeapex) {
- if (!facet2->newfacet)
- qh_newvertices (facet2->vertices); /* apex is new */
- apex= SETfirstt_(facet1->vertices, vertexT);
- if (SETfirstt_(facet2->vertices, vertexT) != apex)
- qh_setaddnth (&facet2->vertices, 0, apex); /* apex has last id */
- else
- issubset= True;
- }else {
- zinc_(Zmergesimplex);
- FOREACHvertex_(facet1->vertices)
- vertex->seen= False;
- FOREACHridge_(facet1->ridges) {
- if (otherfacet_(ridge, facet1) == facet2) {
- FOREACHvertex_(ridge->vertices) {
- vertex->seen= True;
- vertex->delridge= True;
- }
- break;
- }
- }
- FOREACHvertex_(facet1->vertices) {
- if (!vertex->seen)
- break; /* must occur */
- }
- apex= vertex;
- trace4((qh ferr, "qh_mergesimplex: merge apex v%d of f%d into facet f%d\n",
- apex->id, facet1->id, facet2->id));
- FOREACHvertex_i_(facet2->vertices) {
- if (vertex->id < apex->id) {
- break;
- }else if (vertex->id == apex->id) {
- issubset= True;
- break;
- }
- }
- if (!issubset)
- qh_setaddnth (&facet2->vertices, vertex_i, apex);
- if (!facet2->newfacet)
- qh_newvertices (facet2->vertices);
- else if (!apex->newlist) {
- qh_removevertex (apex);
- qh_appendvertex (apex);
- }
- }
- trace4((qh ferr, "qh_mergesimplex: update vertex neighbors of f%d\n",
- facet1->id));
- FOREACHvertex_(facet1->vertices) {
- if (vertex == apex && !issubset)
- qh_setreplace (vertex->neighbors, facet1, facet2);
- else {
- qh_setdel (vertex->neighbors, facet1);
- if (!SETsecond_(vertex->neighbors))
- qh_mergevertex_del (vertex, facet1, facet2);
- }
- }
- trace4((qh ferr, "qh_mergesimplex: merge ridges and neighbors of f%d into f%d\n",
- facet1->id, facet2->id));
- qh visit_id++;
- FOREACHneighbor_(facet2)
- neighbor->visitid= qh visit_id;
- FOREACHridge_(facet1->ridges) {
- otherfacet= otherfacet_(ridge, facet1);
- if (otherfacet == facet2) {
- qh_setdel (facet2->ridges, ridge);
- qh_setfree(&(ridge->vertices));
- qh_memfree (ridge, sizeof(ridgeT));
- qh_setdel (facet2->neighbors, facet1);
- }else {
- qh_setappend (&facet2->ridges, ridge);
- if (otherfacet->visitid != qh visit_id) {
- qh_setappend (&facet2->neighbors, otherfacet);
- qh_setreplace (otherfacet->neighbors, facet1, facet2);
- otherfacet->visitid= qh visit_id;
- }else {
- if (otherfacet->simplicial) /* is degen, needs ridges */
- qh_makeridges (otherfacet);
- if (SETfirstt_(otherfacet->neighbors, facetT) != facet1)
- qh_setdel (otherfacet->neighbors, facet1);
- else { /*keep newfacet->neighbors->horizon*/
- qh_setdel(otherfacet->neighbors, facet2);
- qh_setreplace(otherfacet->neighbors, facet1, facet2);
- }
- }
- if (ridge->top == facet1) /* wait until after qh_makeridges */
- ridge->top= facet2;
- else
- ridge->bottom= facet2;
- }
- }
- SETfirst_(facet1->ridges)= NULL; /* it will be deleted */
- trace3((qh ferr, "qh_mergesimplex: merged simplex f%d apex v%d into facet f%d\n",
- facet1->id, getid_(apex), facet2->id));
-} /* mergesimplex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergevertex_del">-</a>
-
- qh_mergevertex_del( vertex, facet1, facet2 )
- delete a vertex because of merging facet1 into facet2
-
- returns:
- deletes vertex from facet2
- adds vertex to qh.del_vertices for later deletion
-*/
-void qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2) {
-
- zinc_(Zmergevertex);
- trace2((qh ferr, "qh_mergevertex_del: deleted v%d when merging f%d into f%d\n",
- vertex->id, facet1->id, facet2->id));
- qh_setdelsorted (facet2->vertices, vertex);
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
-} /* mergevertex_del */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergevertex_neighbors">-</a>
-
- qh_mergevertex_neighbors( facet1, facet2 )
- merge the vertex neighbors of facet1 to facet2
-
- returns:
- if vertex is current qh.vertex_visit
- deletes facet1 from vertex->neighbors
- else
- renames facet1 to facet2 in vertex->neighbors
- deletes vertices if only one neighbor
-
- notes:
- assumes vertex neighbor sets are good
-*/
-void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2) {
- vertexT *vertex, **vertexp;
-
- trace4((qh ferr, "qh_mergevertex_neighbors: merge vertex neighbors of f%d and f%d\n",
- facet1->id, facet2->id));
- if (qh tracevertex) {
- fprintf (qh ferr, "qh_mergevertex_neighbors: of f%d and f%d at furthest p%d f0= %p\n",
- facet1->id, facet2->id, qh furthest_id, qh tracevertex->neighbors->e[0].p);
- qh_errprint ("TRACE", NULL, NULL, NULL, qh tracevertex);
- }
- FOREACHvertex_(facet1->vertices) {
- if (vertex->visitid != qh vertex_visit)
- qh_setreplace(vertex->neighbors, facet1, facet2);
- else {
- qh_setdel(vertex->neighbors, facet1);
- if (!SETsecond_(vertex->neighbors))
- qh_mergevertex_del (vertex, facet1, facet2);
- }
- }
- if (qh tracevertex)
- qh_errprint ("TRACE", NULL, NULL, NULL, qh tracevertex);
-} /* mergevertex_neighbors */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="mergevertices">-</a>
-
- qh_mergevertices( vertices1, vertices2 )
- merges the vertex set of facet1 into facet2
-
- returns:
- replaces vertices2 with merged set
- preserves vertex_visit for qh_mergevertex_neighbors
- updates qh.newvertex_list
-
- design:
- create a merged set of both vertices (in inverse id order)
-*/
-void qh_mergevertices(setT *vertices1, setT **vertices2) {
- int newsize= qh_setsize(vertices1)+qh_setsize(*vertices2) - qh hull_dim + 1;
- setT *mergedvertices;
- vertexT *vertex, **vertexp, **vertex2= SETaddr_(*vertices2, vertexT);
-
- mergedvertices= qh_settemp (newsize);
- FOREACHvertex_(vertices1) {
- if (!*vertex2 || vertex->id > (*vertex2)->id)
- qh_setappend (&mergedvertices, vertex);
- else {
- while (*vertex2 && (*vertex2)->id > vertex->id)
- qh_setappend (&mergedvertices, *vertex2++);
- if (!*vertex2 || (*vertex2)->id < vertex->id)
- qh_setappend (&mergedvertices, vertex);
- else
- qh_setappend (&mergedvertices, *vertex2++);
- }
- }
- while (*vertex2)
- qh_setappend (&mergedvertices, *vertex2++);
- if (newsize < qh_setsize (mergedvertices)) {
- fprintf (qh ferr, "qhull internal error (qh_mergevertices): facets did not share a ridge\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh_setfree(vertices2);
- *vertices2= mergedvertices;
- qh_settemppop ();
-} /* mergevertices */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="neighbor_intersections">-</a>
-
- qh_neighbor_intersections( vertex )
- return intersection of all vertices in vertex->neighbors except for vertex
-
- returns:
- returns temporary set of vertices
- does not include vertex
- NULL if a neighbor is simplicial
- NULL if empty set
-
- notes:
- used for renaming vertices
-
- design:
- initialize the intersection set with vertices of the first two neighbors
- delete vertex from the intersection
- for each remaining neighbor
- intersect its vertex set with the intersection set
- return NULL if empty
- return the intersection set
-*/
-setT *qh_neighbor_intersections (vertexT *vertex) {
- facetT *neighbor, **neighborp, *neighborA, *neighborB;
- setT *intersect;
- int neighbor_i, neighbor_n;
-
- FOREACHneighbor_(vertex) {
- if (neighbor->simplicial)
- return NULL;
- }
- neighborA= SETfirstt_(vertex->neighbors, facetT);
- neighborB= SETsecondt_(vertex->neighbors, facetT);
- zinc_(Zintersectnum);
- if (!neighborA)
- return NULL;
- if (!neighborB)
- intersect= qh_setcopy (neighborA->vertices, 0);
- else
- intersect= qh_vertexintersect_new (neighborA->vertices, neighborB->vertices);
- qh_settemppush (intersect);
- qh_setdelsorted (intersect, vertex);
- FOREACHneighbor_i_(vertex) {
- if (neighbor_i >= 2) {
- zinc_(Zintersectnum);
- qh_vertexintersect (&intersect, neighbor->vertices);
- if (!SETfirst_(intersect)) {
- zinc_(Zintersectfail);
- qh_settempfree (&intersect);
- return NULL;
- }
- }
- }
- trace3((qh ferr, "qh_neighbor_intersections: %d vertices in neighbor intersection of v%d\n",
- qh_setsize (intersect), vertex->id));
- return intersect;
-} /* neighbor_intersections */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="newvertices">-</a>
-
- qh_newvertices( vertices )
- add vertices to end of qh.vertex_list (marks as new vertices)
-
- returns:
- vertices on qh.newvertex_list
- vertex->newlist set
-*/
-void qh_newvertices (setT *vertices) {
- vertexT *vertex, **vertexp;
-
- FOREACHvertex_(vertices) {
- if (!vertex->newlist) {
- qh_removevertex (vertex);
- qh_appendvertex (vertex);
- }
- }
-} /* newvertices */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="reducevertices">-</a>
-
- qh_reducevertices()
- reduce extra vertices, shared vertices, and redundant vertices
- facet->newmerge is set if merged since last call
- if !qh.MERGEvertices, only removes extra vertices
-
- returns:
- True if also merged degen_redundant facets
- vertices are renamed if possible
- clears facet->newmerge and vertex->delridge
-
- notes:
- ignored if 2-d
-
- design:
- merge any degenerate or redundant facets
- for each newly merged facet
- remove extra vertices
- if qh.MERGEvertices
- for each newly merged facet
- for each vertex
- if vertex was on a deleted ridge
- rename vertex if it is shared
- remove delridge flag from new vertices
-*/
-boolT qh_reducevertices (void) {
- int numshare=0, numrename= 0;
- boolT degenredun= False;
- facetT *newfacet;
- vertexT *vertex, **vertexp;
-
- if (qh hull_dim == 2)
- return False;
- if (qh_merge_degenredundant())
- degenredun= True;
- LABELrestart:
- FORALLnew_facets {
- if (newfacet->newmerge) {
- if (!qh MERGEvertices)
- newfacet->newmerge= False;
- qh_remove_extravertices (newfacet);
- }
- }
- if (!qh MERGEvertices)
- return False;
- FORALLnew_facets {
- if (newfacet->newmerge) {
- newfacet->newmerge= False;
- FOREACHvertex_(newfacet->vertices) {
- if (vertex->delridge) {
- if (qh_rename_sharedvertex (vertex, newfacet)) {
- numshare++;
- vertexp--; /* repeat since deleted vertex */
- }
- }
- }
- }
- }
- FORALLvertex_(qh newvertex_list) {
- if (vertex->delridge && !vertex->deleted) {
- vertex->delridge= False;
- if (qh hull_dim >= 4 && qh_redundant_vertex (vertex)) {
- numrename++;
- if (qh_merge_degenredundant()) {
- degenredun= True;
- goto LABELrestart;
- }
- }
- }
- }
- trace1((qh ferr, "qh_reducevertices: renamed %d shared vertices and %d redundant vertices. Degen? %d\n",
- numshare, numrename, degenredun));
- return degenredun;
-} /* reducevertices */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="redundant_vertex">-</a>
-
- qh_redundant_vertex( vertex )
- detect and rename a redundant vertex
- vertices have full vertex->neighbors
-
- returns:
- returns true if find a redundant vertex
- deletes vertex (vertex->deleted)
-
- notes:
- only needed if vertex->delridge and hull_dim >= 4
- may add degenerate facets to qh.facet_mergeset
- doesn't change vertex->neighbors or create redundant facets
-
- design:
- intersect vertices of all facet neighbors of vertex
- determine ridges for these vertices
- if find a new vertex for vertex amoung these ridges and vertices
- rename vertex to the new vertex
-*/
-vertexT *qh_redundant_vertex (vertexT *vertex) {
- vertexT *newvertex= NULL;
- setT *vertices, *ridges;
-
- trace3((qh ferr, "qh_redundant_vertex: check if v%d can be renamed\n", vertex->id));
- if ((vertices= qh_neighbor_intersections (vertex))) {
- ridges= qh_vertexridges (vertex);
- if ((newvertex= qh_find_newvertex (vertex, vertices, ridges)))
- qh_renamevertex (vertex, newvertex, ridges, NULL, NULL);
- qh_settempfree (&ridges);
- qh_settempfree (&vertices);
- }
- return newvertex;
-} /* redundant_vertex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="remove_extravertices">-</a>
-
- qh_remove_extravertices( facet )
- remove extra vertices from non-simplicial facets
-
- returns:
- returns True if it finds them
-
- design:
- for each vertex in facet
- if vertex not in a ridge (i.e., no longer used)
- delete vertex from facet
- delete facet from vertice's neighbors
- unless vertex in another facet
- add vertex to qh.del_vertices for later deletion
-*/
-boolT qh_remove_extravertices (facetT *facet) {
- ridgeT *ridge, **ridgep;
- vertexT *vertex, **vertexp;
- boolT foundrem= False;
-
- trace4((qh ferr, "qh_remove_extravertices: test f%d for extra vertices\n",
- facet->id));
- FOREACHvertex_(facet->vertices)
- vertex->seen= False;
- FOREACHridge_(facet->ridges) {
- FOREACHvertex_(ridge->vertices)
- vertex->seen= True;
- }
- FOREACHvertex_(facet->vertices) {
- if (!vertex->seen) {
- foundrem= True;
- zinc_(Zremvertex);
- qh_setdelsorted (facet->vertices, vertex);
- qh_setdel (vertex->neighbors, facet);
- if (!qh_setsize (vertex->neighbors)) {
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
- zinc_(Zremvertexdel);
- trace2((qh ferr, "qh_remove_extravertices: v%d deleted because it's lost all ridges\n", vertex->id));
- }else
- trace3((qh ferr, "qh_remove_extravertices: v%d removed from f%d because it's lost all ridges\n", vertex->id, facet->id));
- vertexp--; /*repeat*/
- }
- }
- return foundrem;
-} /* remove_extravertices */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="rename_sharedvertex">-</a>
-
- qh_rename_sharedvertex( vertex, facet )
- detect and rename if shared vertex in facet
- vertices have full ->neighbors
-
- returns:
- newvertex or NULL
- the vertex may still exist in other facets (i.e., a neighbor was pinched)
- does not change facet->neighbors
- updates vertex->neighbors
-
- notes:
- a shared vertex for a facet is only in ridges to one neighbor
- this may undo a pinched facet
-
- it does not catch pinches involving multiple facets. These appear
- to be difficult to detect, since an exhaustive search is too expensive.
-
- design:
- if vertex only has two neighbors
- determine the ridges that contain the vertex
- determine the vertices shared by both neighbors
- if can find a new vertex in this set
- rename the vertex to the new vertex
-*/
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet) {
- facetT *neighbor, **neighborp, *neighborA= NULL;
- setT *vertices, *ridges;
- vertexT *newvertex;
-
- if (qh_setsize (vertex->neighbors) == 2) {
- neighborA= SETfirstt_(vertex->neighbors, facetT);
- if (neighborA == facet)
- neighborA= SETsecondt_(vertex->neighbors, facetT);
- }else if (qh hull_dim == 3)
- return NULL;
- else {
- qh visit_id++;
- FOREACHneighbor_(facet)
- neighbor->visitid= qh visit_id;
- FOREACHneighbor_(vertex) {
- if (neighbor->visitid == qh visit_id) {
- if (neighborA)
- return NULL;
- neighborA= neighbor;
- }
- }
- if (!neighborA) {
- fprintf (qh ferr, "qhull internal error (qh_rename_sharedvertex): v%d's neighbors not in f%d\n",
- vertex->id, facet->id);
- qh_errprint ("ERRONEOUS", facet, NULL, NULL, vertex);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- }
- /* the vertex is shared by facet and neighborA */
- ridges= qh_settemp (qh TEMPsize);
- neighborA->visitid= ++qh visit_id;
- qh_vertexridges_facet (vertex, facet, &ridges);
- trace2((qh ferr, "qh_rename_sharedvertex: p%d (v%d) is shared by f%d (%d ridges) and f%d\n",
- qh_pointid(vertex->point), vertex->id, facet->id, qh_setsize (ridges), neighborA->id));
- zinc_(Zintersectnum);
- vertices= qh_vertexintersect_new (facet->vertices, neighborA->vertices);
- qh_setdel (vertices, vertex);
- qh_settemppush (vertices);
- if ((newvertex= qh_find_newvertex (vertex, vertices, ridges)))
- qh_renamevertex (vertex, newvertex, ridges, facet, neighborA);
- qh_settempfree (&vertices);
- qh_settempfree (&ridges);
- return newvertex;
-} /* rename_sharedvertex */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="renameridgevertex">-</a>
-
- qh_renameridgevertex( ridge, oldvertex, newvertex )
- renames oldvertex as newvertex in ridge
-
- returns:
-
- design:
- delete oldvertex from ridge
- if newvertex already in ridge
- copy ridge->noconvex to another ridge if possible
- delete the ridge
- else
- insert newvertex into the ridge
- adjust the ridge's orientation
-*/
-void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex) {
- int nth= 0, oldnth;
- facetT *temp;
- vertexT *vertex, **vertexp;
-
- oldnth= qh_setindex (ridge->vertices, oldvertex);
- qh_setdelnthsorted (ridge->vertices, oldnth);
- FOREACHvertex_(ridge->vertices) {
- if (vertex == newvertex) {
- zinc_(Zdelridge);
- if (ridge->nonconvex) /* only one ridge has nonconvex set */
- qh_copynonconvex (ridge);
- qh_delridge (ridge);
- trace2((qh ferr, "qh_renameridgevertex: ridge r%d deleted. It contained both v%d and v%d\n",
- ridge->id, oldvertex->id, newvertex->id));
- return;
- }
- if (vertex->id < newvertex->id)
- break;
- nth++;
- }
- qh_setaddnth(&ridge->vertices, nth, newvertex);
- if (abs(oldnth - nth)%2) {
- trace3((qh ferr, "qh_renameridgevertex: swapped the top and bottom of ridge r%d\n",
- ridge->id));
- temp= ridge->top;
- ridge->top= ridge->bottom;
- ridge->bottom= temp;
- }
-} /* renameridgevertex */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="renamevertex">-</a>
-
- qh_renamevertex( oldvertex, newvertex, ridges, oldfacet, neighborA )
- renames oldvertex as newvertex in ridges
- gives oldfacet/neighborA if oldvertex is shared between two facets
-
- returns:
- oldvertex may still exist afterwards
-
-
- notes:
- can not change neighbors of newvertex (since it's a subset)
-
- design:
- for each ridge in ridges
- rename oldvertex to newvertex and delete degenerate ridges
- if oldfacet not defined
- for each neighbor of oldvertex
- delete oldvertex from neighbor's vertices
- remove extra vertices from neighbor
- add oldvertex to qh.del_vertices
- else if oldvertex only between oldfacet and neighborA
- delete oldvertex from oldfacet and neighborA
- add oldvertex to qh.del_vertices
- else oldvertex is in oldfacet and neighborA and other facets (i.e., pinched)
- delete oldvertex from oldfacet
- delete oldfacet from oldvertice's neighbors
- remove extra vertices (e.g., oldvertex) from neighborA
-*/
-void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges, facetT *oldfacet, facetT *neighborA) {
- facetT *neighbor, **neighborp;
- ridgeT *ridge, **ridgep;
- boolT istrace= False;
-
- if (qh IStracing >= 2 || oldvertex->id == qh tracevertex_id ||
- newvertex->id == qh tracevertex_id)
- istrace= True;
- FOREACHridge_(ridges)
- qh_renameridgevertex (ridge, oldvertex, newvertex);
- if (!oldfacet) {
- zinc_(Zrenameall);
- if (istrace)
- fprintf (qh ferr, "qh_renamevertex: renamed v%d to v%d in several facets\n",
- oldvertex->id, newvertex->id);
- FOREACHneighbor_(oldvertex) {
- qh_maydropneighbor (neighbor);
- qh_setdelsorted (neighbor->vertices, oldvertex);
- if (qh_remove_extravertices (neighbor))
- neighborp--; /* neighbor may be deleted */
- }
- if (!oldvertex->deleted) {
- oldvertex->deleted= True;
- qh_setappend (&qh del_vertices, oldvertex);
- }
- }else if (qh_setsize (oldvertex->neighbors) == 2) {
- zinc_(Zrenameshare);
- if (istrace)
- fprintf (qh ferr, "qh_renamevertex: renamed v%d to v%d in oldfacet f%d\n",
- oldvertex->id, newvertex->id, oldfacet->id);
- FOREACHneighbor_(oldvertex)
- qh_setdelsorted (neighbor->vertices, oldvertex);
- oldvertex->deleted= True;
- qh_setappend (&qh del_vertices, oldvertex);
- }else {
- zinc_(Zrenamepinch);
- if (istrace || qh IStracing)
- fprintf (qh ferr, "qh_renamevertex: renamed pinched v%d to v%d between f%d and f%d\n",
- oldvertex->id, newvertex->id, oldfacet->id, neighborA->id);
- qh_setdelsorted (oldfacet->vertices, oldvertex);
- qh_setdel (oldvertex->neighbors, oldfacet);
- qh_remove_extravertices (neighborA);
- }
-} /* renamevertex */
-
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="test_appendmerge">-</a>
-
- qh_test_appendmerge( facet, neighbor )
- tests facet/neighbor for convexity
- appends to mergeset if non-convex
- if pre-merging,
- nop if qh.SKIPconvex, or qh.MERGEexact and coplanar
-
- returns:
- true if appends facet/neighbor to mergeset
- sets facet->center as needed
- does not change facet->seen
-
- design:
- if qh.cos_max is defined
- if the angle between facet normals is too shallow
- append an angle-coplanar merge to qh.mergeset
- return True
- make facet's centrum if needed
- if facet's centrum is above the neighbor
- set isconcave
- else
- if facet's centrum is not below the neighbor
- set iscoplanar
- make neighbor's centrum if needed
- if neighbor's centrum is above the facet
- set isconcave
- else if neighbor's centrum is not below the facet
- set iscoplanar
- if isconcave or iscoplanar
- get angle if needed
- append concave or coplanar merge to qh.mergeset
-*/
-boolT qh_test_appendmerge (facetT *facet, facetT *neighbor) {
- realT dist, dist2= -REALmax, angle= -REALmax;
- boolT isconcave= False, iscoplanar= False, okangle= False;
-
- if (qh SKIPconvex && !qh POSTmerging)
- return False;
- if ((!qh MERGEexact || qh POSTmerging) && qh cos_max < REALmax/2) {
- angle= qh_getangle(facet->normal, neighbor->normal);
- zinc_(Zangletests);
- if (angle > qh cos_max) {
- zinc_(Zcoplanarangle);
- qh_appendmergeset(facet, neighbor, MRGanglecoplanar, &angle);
- trace2((qh ferr, "qh_test_appendmerge: coplanar angle %4.4g between f%d and f%d\n",
- angle, facet->id, neighbor->id));
- return True;
- }else
- okangle= True;
- }
- if (!facet->center)
- facet->center= qh_getcentrum (facet);
- zzinc_(Zcentrumtests);
- qh_distplane(facet->center, neighbor, &dist);
- if (dist > qh centrum_radius)
- isconcave= True;
- else {
- if (dist > -qh centrum_radius)
- iscoplanar= True;
- if (!neighbor->center)
- neighbor->center= qh_getcentrum (neighbor);
- zzinc_(Zcentrumtests);
- qh_distplane(neighbor->center, facet, &dist2);
- if (dist2 > qh centrum_radius)
- isconcave= True;
- else if (!iscoplanar && dist2 > -qh centrum_radius)
- iscoplanar= True;
- }
- if (!isconcave && (!iscoplanar || (qh MERGEexact && !qh POSTmerging)))
- return False;
- if (!okangle && qh ANGLEmerge) {
- angle= qh_getangle(facet->normal, neighbor->normal);
- zinc_(Zangletests);
- }
- if (isconcave) {
- zinc_(Zconcaveridge);
- if (qh ANGLEmerge)
- angle += qh_ANGLEconcave + 0.5;
- qh_appendmergeset(facet, neighbor, MRGconcave, &angle);
- trace0((qh ferr, "qh_test_appendmerge: concave f%d to f%d dist %4.4g and reverse dist %4.4g angle %4.4g during p%d\n",
- facet->id, neighbor->id, dist, dist2, angle, qh furthest_id));
- }else /* iscoplanar */ {
- zinc_(Zcoplanarcentrum);
- qh_appendmergeset(facet, neighbor, MRGcoplanar, &angle);
- trace2((qh ferr, "qh_test_appendmerge: coplanar f%d to f%d dist %4.4g, reverse dist %4.4g angle %4.4g\n",
- facet->id, neighbor->id, dist, dist2, angle));
- }
- return True;
-} /* test_appendmerge */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="test_vneighbors">-</a>
-
- qh_test_vneighbors()
- test vertex neighbors for convexity
- tests all facets on qh.newfacet_list
-
- returns:
- true if non-convex vneighbors appended to qh.facet_mergeset
- initializes vertex neighbors if needed
-
- notes:
- assumes all facet neighbors have been tested
- this can be expensive
- this does not guarantee that a centrum is below all facets
- but it is unlikely
- uses qh.visit_id
-
- design:
- build vertex neighbors if necessary
- for all new facets
- for all vertices
- for each unvisited facet neighbor of the vertex
- test new facet and neighbor for convexity
-*/
-boolT qh_test_vneighbors (void /* qh newfacet_list */) {
- facetT *newfacet, *neighbor, **neighborp;
- vertexT *vertex, **vertexp;
- int nummerges= 0;
-
- trace1((qh ferr, "qh_test_vneighbors: testing vertex neighbors for convexity\n"));
- if (!qh VERTEXneighbors)
- qh_vertexneighbors();
- FORALLnew_facets
- newfacet->seen= False;
- FORALLnew_facets {
- newfacet->seen= True;
- newfacet->visitid= qh visit_id++;
- FOREACHneighbor_(newfacet)
- newfacet->visitid= qh visit_id;
- FOREACHvertex_(newfacet->vertices) {
- FOREACHneighbor_(vertex) {
- if (neighbor->seen || neighbor->visitid == qh visit_id)
- continue;
- if (qh_test_appendmerge (newfacet, neighbor))
- nummerges++;
- }
- }
- }
- zadd_(Ztestvneighbor, nummerges);
- trace1((qh ferr, "qh_test_vneighbors: found %d non-convex, vertex neighbors\n",
- nummerges));
- return (nummerges > 0);
-} /* test_vneighbors */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="tracemerge">-</a>
-
- qh_tracemerge( facet1, facet2 )
- print trace message after merge
-*/
-void qh_tracemerge (facetT *facet1, facetT *facet2) {
- boolT waserror= False;
-
-#ifndef qh_NOtrace
- if (qh IStracing >= 4)
- qh_errprint ("MERGED", facet2, NULL, NULL, NULL);
- if (facet2 == qh tracefacet || (qh tracevertex && qh tracevertex->newlist)) {
- fprintf (qh ferr, "qh_tracemerge: trace facet and vertex after merge of f%d and f%d, furthest p%d\n", facet1->id, facet2->id, qh furthest_id);
- if (facet2 != qh tracefacet)
- qh_errprint ("TRACE", qh tracefacet,
- (qh tracevertex && qh tracevertex->neighbors) ?
- SETfirstt_(qh tracevertex->neighbors, facetT) : NULL,
- NULL, qh tracevertex);
- }
- if (qh tracevertex) {
- if (qh tracevertex->deleted)
- fprintf (qh ferr, "qh_tracemerge: trace vertex deleted at furthest p%d\n",
- qh furthest_id);
- else
- qh_checkvertex (qh tracevertex);
- }
- if (qh tracefacet) {
- qh_checkfacet (qh tracefacet, True, &waserror);
- if (waserror)
- qh_errexit (qh_ERRqhull, qh tracefacet, NULL);
- }
-#endif /* !qh_NOtrace */
- if (qh CHECKfrequently || qh IStracing >= 4) { /* can't check polygon here */
- qh_checkfacet (facet2, True, &waserror);
- if (waserror)
- qh_errexit(qh_ERRqhull, NULL, NULL);
- }
-} /* tracemerge */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="tracemerging">-</a>
-
- qh_tracemerging()
- print trace message during POSTmerging
-
- returns:
- updates qh.mergereport
-
- notes:
- called from qh_mergecycle() and qh_mergefacet()
-
- see:
- qh_buildtracing()
-*/
-void qh_tracemerging (void) {
- realT cpu;
- int total;
- time_t timedata;
- struct tm *tp;
-
- qh mergereport= zzval_(Ztotmerge);
- time (&timedata);
- tp= localtime (&timedata);
- cpu= qh_CPUclock;
- cpu /= qh_SECticks;
- total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
- fprintf (qh ferr, "\n\
-At %d:%d:%d & %2.5g CPU secs, qhull has merged %d facets. The hull\n\
- contains %d facets and %d vertices.\n",
- tp->tm_hour, tp->tm_min, tp->tm_sec, cpu,
- total, qh num_facets - qh num_visible,
- qh num_vertices-qh_setsize (qh del_vertices));
-} /* tracemerging */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="updatetested">-</a>
-
- qh_updatetested( facet1, facet2 )
- clear facet2->tested and facet1->ridge->tested for merge
-
- returns:
- deletes facet2->center unless it's already large
- if so, clears facet2->ridge->tested
-
- design:
- clear facet2->tested
- clear ridge->tested for facet1's ridges
- if facet2 has a centrum
- if facet2 is large
- set facet2->keepcentrum
- else if facet2 has 3 vertices due to many merges, or not large and post merging
- clear facet2->keepcentrum
- unless facet2->keepcentrum
- clear facet2->center to recompute centrum later
- clear ridge->tested for facet2's ridges
-*/
-void qh_updatetested (facetT *facet1, facetT *facet2) {
- ridgeT *ridge, **ridgep;
- int size;
-
- facet2->tested= False;
- FOREACHridge_(facet1->ridges)
- ridge->tested= False;
- if (!facet2->center)
- return;
- size= qh_setsize (facet2->vertices);
- if (!facet2->keepcentrum) {
- if (size > qh hull_dim + qh_MAXnewcentrum) {
- facet2->keepcentrum= True;
- zinc_(Zwidevertices);
- }
- }else if (size <= qh hull_dim + qh_MAXnewcentrum) {
- /* center and keepcentrum was set */
- if (size == qh hull_dim || qh POSTmerging)
- facet2->keepcentrum= False; /* if many merges need to recompute centrum */
- }
- if (!facet2->keepcentrum) {
- qh_memfree (facet2->center, qh normal_size);
- facet2->center= NULL;
- FOREACHridge_(facet2->ridges)
- ridge->tested= False;
- }
-} /* updatetested */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="vertexridges">-</a>
-
- qh_vertexridges( vertex )
- return temporary set of ridges adjacent to a vertex
- vertex->neighbors defined
-
- ntoes:
- uses qh.visit_id
- does not include implicit ridges for simplicial facets
-
- design:
- for each neighbor of vertex
- add ridges that include the vertex to ridges
-*/
-setT *qh_vertexridges (vertexT *vertex) {
- facetT *neighbor, **neighborp;
- setT *ridges= qh_settemp (qh TEMPsize);
- int size;
-
- qh visit_id++;
- FOREACHneighbor_(vertex)
- neighbor->visitid= qh visit_id;
- FOREACHneighbor_(vertex) {
- if (*neighborp) /* no new ridges in last neighbor */
- qh_vertexridges_facet (vertex, neighbor, &ridges);
- }
- if (qh PRINTstatistics || qh IStracing) {
- size= qh_setsize (ridges);
- zinc_(Zvertexridge);
- zadd_(Zvertexridgetot, size);
- zmax_(Zvertexridgemax, size);
- trace3((qh ferr, "qh_vertexridges: found %d ridges for v%d\n",
- size, vertex->id));
- }
- return ridges;
-} /* vertexridges */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="vertexridges_facet">-</a>
-
- qh_vertexridges_facet( vertex, facet, ridges )
- add adjacent ridges for vertex in facet
- neighbor->visitid==qh.visit_id if it hasn't been visited
-
- returns:
- ridges updated
- sets facet->visitid to qh.visit_id-1
-
- design:
- for each ridge of facet
- if ridge of visited neighbor (i.e., unprocessed)
- if vertex in ridge
- append ridge to vertex
- mark facet processed
-*/
-void qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges) {
- ridgeT *ridge, **ridgep;
- facetT *neighbor;
-
- FOREACHridge_(facet->ridges) {
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->visitid == qh visit_id
- && qh_setin (ridge->vertices, vertex))
- qh_setappend (ridges, ridge);
- }
- facet->visitid= qh visit_id-1;
-} /* vertexridges_facet */
-
-/*-<a href="qh-merge.htm#TOC"
- >-------------------------------</a><a name="willdelete">-</a>
-
- qh_willdelete( facet, replace )
- moves facet to visible list
- sets facet->f.replace to replace (may be NULL)
-
- returns:
- bumps qh.num_visible
-*/
-void qh_willdelete (facetT *facet, facetT *replace) {
-
- qh_removefacet(facet);
- qh_prependfacet (facet, &qh visible_list);
- qh num_visible++;
- facet->visible= True;
- facet->f.replace= replace;
-} /* willdelete */
-
-#else /* qh_NOmerge */
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle) {
-}
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle,
- boolT vneighbors) {
-}
-boolT qh_checkzero (boolT testall) {
- }
-#endif /* qh_NOmerge */
-
diff --git a/extern/qhull/src/merge.h b/extern/qhull/src/merge.h
deleted file mode 100644
index 7fc2afa5967..00000000000
--- a/extern/qhull/src/merge.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*<html><pre> -<a href="qh-merge.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- merge.h
- header file for merge.c
-
- see qh-merge.htm and merge.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmerge
-#define qhDEFmerge 1
-
-
-/*============ -constants- ==============*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEredundant">-</a>
-
- qh_ANGLEredundant
- indicates redundant merge in mergeT->angle
-*/
-#define qh_ANGLEredundant 6.0
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEdegen">-</a>
-
- qh_ANGLEdegen
- indicates degenerate facet in mergeT->angle
-*/
-#define qh_ANGLEdegen 5.0
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_ANGLEconcave">-</a>
-
- qh_ANGLEconcave
- offset to indicate concave facets in mergeT->angle
-
- notes:
- concave facets are assigned the range of [2,4] in mergeT->angle
- roundoff error may make the angle less than 2
-*/
-#define qh_ANGLEconcave 1.5
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="MRG">-</a>
-
- MRG... (mergeType)
- indicates the type of a merge (mergeT->type)
-*/
-typedef enum { /* in sort order for facet_mergeset */
- MRGnone= 0,
- MRGcoplanar, /* centrum coplanar */
- MRGanglecoplanar, /* angle coplanar */
- /* could detect half concave ridges */
- MRGconcave, /* concave ridge */
- MRGflip, /* flipped facet. facet1 == facet2 */
- MRGridge, /* duplicate ridge (qh_MERGEridge) */
- /* degen and redundant go onto degen_mergeset */
- MRGdegen, /* degenerate facet (not enough neighbors) facet1 == facet2 */
- MRGredundant, /* redundant facet (vertex subset) */
- /* merge_degenredundant assumes degen < redundant */
- MRGmirror, /* mirror facet from qh_triangulate */
- ENDmrg
-} mergeType;
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="qh_MERGEapex">-</a>
-
- qh_MERGEapex
- flag for qh_mergefacet() to indicate an apex merge
-*/
-#define qh_MERGEapex True
-
-/*============ -structures- ====================*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="mergeT">-</a>
-
- mergeT
- structure used to merge facets
-*/
-
-typedef struct mergeT mergeT;
-struct mergeT { /* initialize in qh_appendmergeset */
- realT angle; /* angle between normals of facet1 and facet2 */
- facetT *facet1; /* will merge facet1 into facet2 */
- facetT *facet2;
- mergeType type;
-};
-
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-merge.htm#TOC"
- >--------------------------------</a><a name="FOREACHmerge_">-</a>
-
- FOREACHmerge_( merges ) {...}
- assign 'merge' to each merge in merges
-
- notes:
- uses 'mergeT *merge, **mergep;'
- if qh_mergefacet(),
- restart since qh.facet_mergeset may change
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge)
-
-/*============ prototypes in alphabetical order after pre/postmerge =======*/
-
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle);
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle,
- boolT vneighbors);
-void qh_all_merges (boolT othermerge, boolT vneighbors);
-void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle);
-setT *qh_basevertices( facetT *samecycle);
-void qh_checkconnect (void /* qh new_facets */);
-boolT qh_checkzero (boolT testall);
-void qh_copynonconvex (ridgeT *atridge);
-void qh_degen_redundant_facet (facetT *facet);
-void qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet);
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges);
-void qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
- facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
-void qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
-void qh_forcedmerges( boolT *wasmerge);
-void qh_getmergeset(facetT *facetlist);
-void qh_getmergeset_initial (facetT *facetlist);
-void qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge,
- vertexT *vertex, vertexT *oldvertex, int *hashslot);
-void qh_makeridges(facetT *facet);
-void qh_mark_dupridges(facetT *facetlist);
-void qh_maydropneighbor (facetT *facet);
-int qh_merge_degenredundant (void);
-void qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype);
-void qh_mergecycle (facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_all (facetT *facetlist, boolT *wasmerge);
-void qh_mergecycle_facets( facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
-void qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet);
-void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex);
-void qh_mergefacet2d (facetT *facet1, facetT *facet2);
-void qh_mergeneighbors(facetT *facet1, facetT *facet2);
-void qh_mergeridges(facetT *facet1, facetT *facet2);
-void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
-void qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2);
-void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
-void qh_mergevertices(setT *vertices1, setT **vertices);
-setT *qh_neighbor_intersections (vertexT *vertex);
-void qh_newvertices (setT *vertices);
-boolT qh_reducevertices (void);
-vertexT *qh_redundant_vertex (vertexT *vertex);
-boolT qh_remove_extravertices (facetT *facet);
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet);
-void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
-void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
- facetT *oldfacet, facetT *neighborA);
-boolT qh_test_appendmerge (facetT *facet, facetT *neighbor);
-boolT qh_test_vneighbors (void /* qh newfacet_list */);
-void qh_tracemerge (facetT *facet1, facetT *facet2);
-void qh_tracemerging (void);
-void qh_updatetested( facetT *facet1, facetT *facet2);
-setT *qh_vertexridges (vertexT *vertex);
-void qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges);
-void qh_willdelete (facetT *facet, facetT *replace);
-
-#endif /* qhDEFmerge */
diff --git a/extern/qhull/src/poly.c b/extern/qhull/src/poly.c
deleted file mode 100644
index 6319e43d66a..00000000000
--- a/extern/qhull/src/poly.c
+++ /dev/null
@@ -1,1180 +0,0 @@
-/*<html><pre> -<a href="qh-poly.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- poly.c
- implements polygons and simplices
-
- see qh-poly.htm, poly.h and qhull.h
-
- infrequent code is in poly2.c
- (all but top 50 and their callers 12/3/95)
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*======== functions in alphabetical order ==========*/
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="appendfacet">-</a>
-
- qh_appendfacet( facet )
- appends facet to end of qh.facet_list,
-
- returns:
- updates qh.newfacet_list, facet_next, facet_list
- increments qh.numfacets
-
- notes:
- assumes qh.facet_list/facet_tail is defined (createsimplex)
-
- see:
- qh_removefacet()
-
-*/
-void qh_appendfacet(facetT *facet) {
- facetT *tail= qh facet_tail;
-
- if (tail == qh newfacet_list)
- qh newfacet_list= facet;
- if (tail == qh facet_next)
- qh facet_next= facet;
- facet->previous= tail->previous;
- facet->next= tail;
- if (tail->previous)
- tail->previous->next= facet;
- else
- qh facet_list= facet;
- tail->previous= facet;
- qh num_facets++;
- trace4((qh ferr, "qh_appendfacet: append f%d to facet_list\n", facet->id));
-} /* appendfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="appendvertex">-</a>
-
- qh_appendvertex( vertex )
- appends vertex to end of qh.vertex_list,
-
- returns:
- sets vertex->newlist
- updates qh.vertex_list, newvertex_list
- increments qh.num_vertices
-
- notes:
- assumes qh.vertex_list/vertex_tail is defined (createsimplex)
-
-*/
-void qh_appendvertex (vertexT *vertex) {
- vertexT *tail= qh vertex_tail;
-
- if (tail == qh newvertex_list)
- qh newvertex_list= vertex;
- vertex->newlist= True;
- vertex->previous= tail->previous;
- vertex->next= tail;
- if (tail->previous)
- tail->previous->next= vertex;
- else
- qh vertex_list= vertex;
- tail->previous= vertex;
- qh num_vertices++;
- trace4((qh ferr, "qh_appendvertex: append v%d to vertex_list\n", vertex->id));
-} /* appendvertex */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="attachnewfacets">-</a>
-
- qh_attachnewfacets( )
- attach horizon facets to new facets in qh.newfacet_list
- newfacets have neighbor and ridge links to horizon but not vice versa
- only needed for qh.ONLYgood
-
- returns:
- set qh.NEWfacets
- horizon facets linked to new facets
- ridges changed from visible facets to new facets
- simplicial ridges deleted
- qh.visible_list, no ridges valid
- facet->f.replace is a newfacet (if any)
-
- design:
- delete interior ridges and neighbor sets by
- for each visible, non-simplicial facet
- for each ridge
- if last visit or if neighbor is simplicial
- if horizon neighbor
- delete ridge for horizon's ridge set
- delete ridge
- erase neighbor set
- attach horizon facets and new facets by
- for all new facets
- if corresponding horizon facet is simplicial
- locate corresponding visible facet {may be more than one}
- link visible facet to new facet
- replace visible facet with new facet in horizon
- else it's non-simplicial
- for all visible neighbors of the horizon facet
- link visible neighbor to new facet
- delete visible neighbor from horizon facet
- append new facet to horizon's neighbors
- the first ridge of the new facet is the horizon ridge
- link the new facet into the horizon ridge
-*/
-void qh_attachnewfacets (void ) {
- facetT *newfacet= NULL, *neighbor, **neighborp, *horizon, *visible;
- ridgeT *ridge, **ridgep;
-
- qh NEWfacets= True;
- trace3((qh ferr, "qh_attachnewfacets: delete interior ridges\n"));
- qh visit_id++;
- FORALLvisible_facets {
- visible->visitid= qh visit_id;
- if (visible->ridges) {
- FOREACHridge_(visible->ridges) {
- neighbor= otherfacet_(ridge, visible);
- if (neighbor->visitid == qh visit_id
- || (!neighbor->visible && neighbor->simplicial)) {
- if (!neighbor->visible) /* delete ridge for simplicial horizon */
- qh_setdel (neighbor->ridges, ridge);
- qh_setfree (&(ridge->vertices)); /* delete on 2nd visit */
- qh_memfree (ridge, sizeof(ridgeT));
- }
- }
- SETfirst_(visible->ridges)= NULL;
- }
- SETfirst_(visible->neighbors)= NULL;
- }
- trace1((qh ferr, "qh_attachnewfacets: attach horizon facets to new facets\n"));
- FORALLnew_facets {
- horizon= SETfirstt_(newfacet->neighbors, facetT);
- if (horizon->simplicial) {
- visible= NULL;
- FOREACHneighbor_(horizon) { /* may have more than one horizon ridge */
- if (neighbor->visible) {
- if (visible) {
- if (qh_setequal_skip (newfacet->vertices, 0, horizon->vertices,
- SETindex_(horizon->neighbors, neighbor))) {
- visible= neighbor;
- break;
- }
- }else
- visible= neighbor;
- }
- }
- if (visible) {
- visible->f.replace= newfacet;
- qh_setreplace (horizon->neighbors, visible, newfacet);
- }else {
- fprintf (qh ferr, "qhull internal error (qh_attachnewfacets): couldn't find visible facet for horizon f%d of newfacet f%d\n",
- horizon->id, newfacet->id);
- qh_errexit2 (qh_ERRqhull, horizon, newfacet);
- }
- }else { /* non-simplicial, with a ridge for newfacet */
- FOREACHneighbor_(horizon) { /* may hold for many new facets */
- if (neighbor->visible) {
- neighbor->f.replace= newfacet;
- qh_setdelnth (horizon->neighbors,
- SETindex_(horizon->neighbors, neighbor));
- neighborp--; /* repeat */
- }
- }
- qh_setappend (&horizon->neighbors, newfacet);
- ridge= SETfirstt_(newfacet->ridges, ridgeT);
- if (ridge->top == horizon)
- ridge->bottom= newfacet;
- else
- ridge->top= newfacet;
- }
- } /* newfacets */
- if (qh PRINTstatistics) {
- FORALLvisible_facets {
- if (!visible->f.replace)
- zinc_(Zinsidevisible);
- }
- }
-} /* attachnewfacets */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkflipped">-</a>
-
- qh_checkflipped( facet, dist, allerror )
- checks facet orientation to interior point
-
- if allerror set,
- tests against qh.DISTround
- else
- tests against 0 since tested against DISTround before
-
- returns:
- False if it flipped orientation (sets facet->flipped)
- distance if non-NULL
-*/
-boolT qh_checkflipped (facetT *facet, realT *distp, boolT allerror) {
- realT dist;
-
- if (facet->flipped && !distp)
- return False;
- zzinc_(Zdistcheck);
- qh_distplane(qh interior_point, facet, &dist);
- if (distp)
- *distp= dist;
- if ((allerror && dist > -qh DISTround)|| (!allerror && dist >= 0.0)) {
- facet->flipped= True;
- zzinc_(Zflippedfacets);
- trace0((qh ferr, "qh_checkflipped: facet f%d is flipped, distance= %6.12g during p%d\n",
- facet->id, dist, qh furthest_id));
- qh_precision ("flipped facet");
- return False;
- }
- return True;
-} /* checkflipped */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="delfacet">-</a>
-
- qh_delfacet( facet )
- removes facet from facet_list and frees up its memory
-
- notes:
- assumes vertices and ridges already freed
-*/
-void qh_delfacet(facetT *facet) {
- void **freelistp; /* used !qh_NOmem */
-
- trace4((qh ferr, "qh_delfacet: delete f%d\n", facet->id));
- if (facet == qh tracefacet)
- qh tracefacet= NULL;
- if (facet == qh GOODclosest)
- qh GOODclosest= NULL;
- qh_removefacet(facet);
- if (!facet->tricoplanar || facet->keepcentrum) {
- qh_memfree_(facet->normal, qh normal_size, freelistp);
- if (qh CENTERtype == qh_ASvoronoi) { /* uses macro calls */
- qh_memfree_(facet->center, qh center_size, freelistp);
- }else /* AScentrum */ {
- qh_memfree_(facet->center, qh normal_size, freelistp);
- }
- }
- qh_setfree(&(facet->neighbors));
- if (facet->ridges)
- qh_setfree(&(facet->ridges));
- qh_setfree(&(facet->vertices));
- if (facet->outsideset)
- qh_setfree(&(facet->outsideset));
- if (facet->coplanarset)
- qh_setfree(&(facet->coplanarset));
- qh_memfree_(facet, sizeof(facetT), freelistp);
-} /* delfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="deletevisible">-</a>
-
- qh_deletevisible()
- delete visible facets and vertices
-
- returns:
- deletes each facet and removes from facetlist
- at exit, qh.visible_list empty (== qh.newfacet_list)
-
- notes:
- ridges already deleted
- horizon facets do not reference facets on qh.visible_list
- new facets in qh.newfacet_list
- uses qh.visit_id;
-*/
-void qh_deletevisible (void /*qh visible_list*/) {
- facetT *visible, *nextfacet;
- vertexT *vertex, **vertexp;
- int numvisible= 0, numdel= qh_setsize(qh del_vertices);
-
- trace1((qh ferr, "qh_deletevisible: delete %d visible facets and %d vertices\n",
- qh num_visible, numdel));
- for (visible= qh visible_list; visible && visible->visible;
- visible= nextfacet) { /* deleting current */
- nextfacet= visible->next;
- numvisible++;
- qh_delfacet(visible);
- }
- if (numvisible != qh num_visible) {
- fprintf (qh ferr, "qhull internal error (qh_deletevisible): qh num_visible %d is not number of visible facets %d\n",
- qh num_visible, numvisible);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh num_visible= 0;
- zadd_(Zvisfacettot, numvisible);
- zmax_(Zvisfacetmax, numvisible);
- zzadd_(Zdelvertextot, numdel);
- zmax_(Zdelvertexmax, numdel);
- FOREACHvertex_(qh del_vertices)
- qh_delvertex (vertex);
- qh_settruncate (qh del_vertices, 0);
-} /* deletevisible */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="facetintersect">-</a>
-
- qh_facetintersect( facetA, facetB, skipa, skipB, prepend )
- return vertices for intersection of two simplicial facets
- may include 1 prepended entry (if more, need to settemppush)
-
- returns:
- returns set of qh.hull_dim-1 + prepend vertices
- returns skipped index for each test and checks for exactly one
-
- notes:
- does not need settemp since set in quick memory
-
- see also:
- qh_vertexintersect and qh_vertexintersect_new
- use qh_setnew_delnthsorted to get nth ridge (no skip information)
-
- design:
- locate skipped vertex by scanning facet A's neighbors
- locate skipped vertex by scanning facet B's neighbors
- intersect the vertex sets
-*/
-setT *qh_facetintersect (facetT *facetA, facetT *facetB,
- int *skipA,int *skipB, int prepend) {
- setT *intersect;
- int dim= qh hull_dim, i, j;
- facetT **neighborsA, **neighborsB;
-
- neighborsA= SETaddr_(facetA->neighbors, facetT);
- neighborsB= SETaddr_(facetB->neighbors, facetT);
- i= j= 0;
- if (facetB == *neighborsA++)
- *skipA= 0;
- else if (facetB == *neighborsA++)
- *skipA= 1;
- else if (facetB == *neighborsA++)
- *skipA= 2;
- else {
- for (i= 3; i < dim; i++) {
- if (facetB == *neighborsA++) {
- *skipA= i;
- break;
- }
- }
- }
- if (facetA == *neighborsB++)
- *skipB= 0;
- else if (facetA == *neighborsB++)
- *skipB= 1;
- else if (facetA == *neighborsB++)
- *skipB= 2;
- else {
- for (j= 3; j < dim; j++) {
- if (facetA == *neighborsB++) {
- *skipB= j;
- break;
- }
- }
- }
- if (i >= dim || j >= dim) {
- fprintf (qh ferr, "qhull internal error (qh_facetintersect): f%d or f%d not in others neighbors\n",
- facetA->id, facetB->id);
- qh_errexit2 (qh_ERRqhull, facetA, facetB);
- }
- intersect= qh_setnew_delnthsorted (facetA->vertices, qh hull_dim, *skipA, prepend);
- trace4((qh ferr, "qh_facetintersect: f%d skip %d matches f%d skip %d\n",
- facetA->id, *skipA, facetB->id, *skipB));
- return(intersect);
-} /* facetintersect */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="gethash">-</a>
-
- qh_gethash( hashsize, set, size, firstindex, skipelem )
- return hashvalue for a set with firstindex and skipelem
-
- notes:
- assumes at least firstindex+1 elements
- assumes skipelem is NULL, in set, or part of hash
-
- hashes memory addresses which may change over different runs of the same data
- using sum for hash does badly in high d
-*/
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem) {
- void **elemp= SETelemaddr_(set, firstindex, void);
- ptr_intT hash = 0, elem;
- int i;
-
- switch (size-firstindex) {
- case 1:
- hash= (ptr_intT)(*elemp) - (ptr_intT) skipelem;
- break;
- case 2:
- hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] - (ptr_intT) skipelem;
- break;
- case 3:
- hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
- - (ptr_intT) skipelem;
- break;
- case 4:
- hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
- + (ptr_intT)elemp[3] - (ptr_intT) skipelem;
- break;
- case 5:
- hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
- + (ptr_intT)elemp[3] + (ptr_intT)elemp[4] - (ptr_intT) skipelem;
- break;
- case 6:
- hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
- + (ptr_intT)elemp[3] + (ptr_intT)elemp[4]+ (ptr_intT)elemp[5]
- - (ptr_intT) skipelem;
- break;
- default:
- hash= 0;
- i= 3;
- do { /* this is about 10% in 10-d */
- if ((elem= (ptr_intT)*elemp++) != (ptr_intT)skipelem) {
- hash ^= (elem << i) + (elem >> (32-i));
- i += 3;
- if (i >= 32)
- i -= 32;
- }
- }while(*elemp);
- break;
- }
- hash %= (ptr_intT) hashsize;
- /* hash= 0; for debugging purposes */
- return hash;
-} /* gethash */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="makenewfacet">-</a>
-
- qh_makenewfacet( vertices, toporient, horizon )
- creates a toporient? facet from vertices
-
- returns:
- returns newfacet
- adds newfacet to qh.facet_list
- newfacet->vertices= vertices
- if horizon
- newfacet->neighbor= horizon, but not vice versa
- newvertex_list updated with vertices
-*/
-facetT *qh_makenewfacet(setT *vertices, boolT toporient,facetT *horizon) {
- facetT *newfacet;
- vertexT *vertex, **vertexp;
-
- FOREACHvertex_(vertices) {
- if (!vertex->newlist) {
- qh_removevertex (vertex);
- qh_appendvertex (vertex);
- }
- }
- newfacet= qh_newfacet();
- newfacet->vertices= vertices;
- newfacet->toporient= toporient;
- if (horizon)
- qh_setappend(&(newfacet->neighbors), horizon);
- qh_appendfacet(newfacet);
- return(newfacet);
-} /* makenewfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="makenewplanes">-</a>
-
- qh_makenewplanes()
- make new hyperplanes for facets on qh.newfacet_list
-
- returns:
- all facets have hyperplanes or are marked for merging
- doesn't create hyperplane if horizon is coplanar (will merge)
- updates qh.min_vertex if qh.JOGGLEmax
-
- notes:
- facet->f.samecycle is defined for facet->mergehorizon facets
-*/
-void qh_makenewplanes (void /* newfacet_list */) {
- facetT *newfacet;
-
- FORALLnew_facets {
- if (!newfacet->mergehorizon)
- qh_setfacetplane (newfacet);
- }
- if (qh JOGGLEmax < REALmax/2)
- minimize_(qh min_vertex, -wwval_(Wnewvertexmax));
-} /* makenewplanes */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="makenew_nonsimplicial">-</a>
-
- qh_makenew_nonsimplicial( visible, apex, numnew )
- make new facets for ridges of a visible facet
-
- returns:
- first newfacet, bumps numnew as needed
- attaches new facets if !qh.ONLYgood
- marks ridge neighbors for simplicial visible
- if (qh.ONLYgood)
- ridges on newfacet, horizon, and visible
- else
- ridge and neighbors between newfacet and horizon
- visible facet's ridges are deleted
-
- notes:
- qh.visit_id if visible has already been processed
- sets neighbor->seen for building f.samecycle
- assumes all 'seen' flags initially false
-
- design:
- for each ridge of visible facet
- get neighbor of visible facet
- if neighbor was already processed
- delete the ridge (will delete all visible facets later)
- if neighbor is a horizon facet
- create a new facet
- if neighbor coplanar
- adds newfacet to f.samecycle for later merging
- else
- updates neighbor's neighbor set
- (checks for non-simplicial facet with multiple ridges to visible facet)
- updates neighbor's ridge set
- (checks for simplicial neighbor to non-simplicial visible facet)
- (deletes ridge if neighbor is simplicial)
-
-*/
-#ifndef qh_NOmerge
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew) {
- void **freelistp; /* used !qh_NOmem */
- ridgeT *ridge, **ridgep;
- facetT *neighbor, *newfacet= NULL, *samecycle;
- setT *vertices;
- boolT toporient;
- int ridgeid;
-
- FOREACHridge_(visible->ridges) {
- ridgeid= ridge->id;
- neighbor= otherfacet_(ridge, visible);
- if (neighbor->visible) {
- if (!qh ONLYgood) {
- if (neighbor->visitid == qh visit_id) {
- qh_setfree (&(ridge->vertices)); /* delete on 2nd visit */
- qh_memfree_(ridge, sizeof(ridgeT), freelistp);
- }
- }
- }else { /* neighbor is an horizon facet */
- toporient= (ridge->top == visible);
- vertices= qh_setnew (qh hull_dim); /* makes sure this is quick */
- qh_setappend (&vertices, apex);
- qh_setappend_set (&vertices, ridge->vertices);
- newfacet= qh_makenewfacet(vertices, toporient, neighbor);
- (*numnew)++;
- if (neighbor->coplanar) {
- newfacet->mergehorizon= True;
- if (!neighbor->seen) {
- newfacet->f.samecycle= newfacet;
- neighbor->f.newcycle= newfacet;
- }else {
- samecycle= neighbor->f.newcycle;
- newfacet->f.samecycle= samecycle->f.samecycle;
- samecycle->f.samecycle= newfacet;
- }
- }
- if (qh ONLYgood) {
- if (!neighbor->simplicial)
- qh_setappend(&(newfacet->ridges), ridge);
- }else { /* qh_attachnewfacets */
- if (neighbor->seen) {
- if (neighbor->simplicial) {
- fprintf (qh ferr, "qhull internal error (qh_makenew_nonsimplicial): simplicial f%d sharing two ridges with f%d\n",
- neighbor->id, visible->id);
- qh_errexit2 (qh_ERRqhull, neighbor, visible);
- }
- qh_setappend (&(neighbor->neighbors), newfacet);
- }else
- qh_setreplace (neighbor->neighbors, visible, newfacet);
- if (neighbor->simplicial) {
- qh_setdel (neighbor->ridges, ridge);
- qh_setfree (&(ridge->vertices));
- qh_memfree (ridge, sizeof(ridgeT));
- }else {
- qh_setappend(&(newfacet->ridges), ridge);
- if (toporient)
- ridge->top= newfacet;
- else
- ridge->bottom= newfacet;
- }
- trace4((qh ferr, "qh_makenew_nonsimplicial: created facet f%d from v%d and r%d of horizon f%d\n",
- newfacet->id, apex->id, ridgeid, neighbor->id));
- }
- }
- neighbor->seen= True;
- } /* for each ridge */
- if (!qh ONLYgood)
- SETfirst_(visible->ridges)= NULL;
- return newfacet;
-} /* makenew_nonsimplicial */
-#else /* qh_NOmerge */
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew) {
- return NULL;
-}
-#endif /* qh_NOmerge */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="makenew_simplicial">-</a>
-
- qh_makenew_simplicial( visible, apex, numnew )
- make new facets for simplicial visible facet and apex
-
- returns:
- attaches new facets if (!qh.ONLYgood)
- neighbors between newfacet and horizon
-
- notes:
- nop if neighbor->seen or neighbor->visible (see qh_makenew_nonsimplicial)
-
- design:
- locate neighboring horizon facet for visible facet
- determine vertices and orientation
- create new facet
- if coplanar,
- add new facet to f.samecycle
- update horizon facet's neighbor list
-*/
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew) {
- facetT *neighbor, **neighborp, *newfacet= NULL;
- setT *vertices;
- boolT flip, toporient;
- int horizonskip, visibleskip;
-
- FOREACHneighbor_(visible) {
- if (!neighbor->seen && !neighbor->visible) {
- vertices= qh_facetintersect(neighbor,visible, &horizonskip, &visibleskip, 1);
- SETfirst_(vertices)= apex;
- flip= ((horizonskip & 0x1) ^ (visibleskip & 0x1));
- if (neighbor->toporient)
- toporient= horizonskip & 0x1;
- else
- toporient= (horizonskip & 0x1) ^ 0x1;
- newfacet= qh_makenewfacet(vertices, toporient, neighbor);
- (*numnew)++;
- if (neighbor->coplanar && (qh PREmerge || qh MERGEexact)) {
-#ifndef qh_NOmerge
- newfacet->f.samecycle= newfacet;
- newfacet->mergehorizon= True;
-#endif
- }
- if (!qh ONLYgood)
- SETelem_(neighbor->neighbors, horizonskip)= newfacet;
- trace4((qh ferr, "qh_makenew_simplicial: create facet f%d top %d from v%d and horizon f%d skip %d top %d and visible f%d skip %d, flip? %d\n",
- newfacet->id, toporient, apex->id, neighbor->id, horizonskip,
- neighbor->toporient, visible->id, visibleskip, flip));
- }
- }
- return newfacet;
-} /* makenew_simplicial */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="matchneighbor">-</a>
-
- qh_matchneighbor( newfacet, newskip, hashsize, hashcount )
- either match subridge of newfacet with neighbor or add to hash_table
-
- returns:
- duplicate ridges are unmatched and marked by qh_DUPLICATEridge
-
- notes:
- ridge is newfacet->vertices w/o newskip vertex
- do not allocate memory (need to free hash_table cleanly)
- uses linear hash chains
-
- see also:
- qh_matchduplicates
-
- design:
- for each possible matching facet in qh.hash_table
- if vertices match
- set ismatch, if facets have opposite orientation
- if ismatch and matching facet doesn't have a match
- match the facets by updating their neighbor sets
- else
- indicate a duplicate ridge
- set facet hyperplane for later testing
- add facet to hashtable
- unless the other facet was already a duplicate ridge
- mark both facets with a duplicate ridge
- add other facet (if defined) to hash table
-*/
-void qh_matchneighbor (facetT *newfacet, int newskip, int hashsize, int *hashcount) {
- boolT newfound= False; /* True, if new facet is already in hash chain */
- boolT same, ismatch;
- int hash, scan;
- facetT *facet, *matchfacet;
- int skip, matchskip;
-
- hash= (int)qh_gethash (hashsize, newfacet->vertices, qh hull_dim, 1,
- SETelem_(newfacet->vertices, newskip));
- trace4((qh ferr, "qh_matchneighbor: newfacet f%d skip %d hash %d hashcount %d\n",
- newfacet->id, newskip, hash, *hashcount));
- zinc_(Zhashlookup);
- for (scan= hash; (facet= SETelemt_(qh hash_table, scan, facetT));
- scan= (++scan >= hashsize ? 0 : scan)) {
- if (facet == newfacet) {
- newfound= True;
- continue;
- }
- zinc_(Zhashtests);
- if (qh_matchvertices (1, newfacet->vertices, newskip, facet->vertices, &skip, &same)) {
- if (SETelem_(newfacet->vertices, newskip) ==
- SETelem_(facet->vertices, skip)) {
- qh_precision ("two facets with the same vertices");
- fprintf (qh ferr, "qhull precision error: Vertex sets are the same for f%d and f%d. Can not force output.\n",
- facet->id, newfacet->id);
- qh_errexit2 (qh_ERRprec, facet, newfacet);
- }
- ismatch= (same == (newfacet->toporient ^ facet->toporient));
- matchfacet= SETelemt_(facet->neighbors, skip, facetT);
- if (ismatch && !matchfacet) {
- SETelem_(facet->neighbors, skip)= newfacet;
- SETelem_(newfacet->neighbors, newskip)= facet;
- (*hashcount)--;
- trace4((qh ferr, "qh_matchneighbor: f%d skip %d matched with new f%d skip %d\n",
- facet->id, skip, newfacet->id, newskip));
- return;
- }
- if (!qh PREmerge && !qh MERGEexact) {
- qh_precision ("a ridge with more than two neighbors");
- fprintf (qh ferr, "qhull precision error: facets f%d, f%d and f%d meet at a ridge with more than 2 neighbors. Can not continue.\n",
- facet->id, newfacet->id, getid_(matchfacet));
- qh_errexit2 (qh_ERRprec, facet, newfacet);
- }
- SETelem_(newfacet->neighbors, newskip)= qh_DUPLICATEridge;
- newfacet->dupridge= True;
- if (!newfacet->normal)
- qh_setfacetplane (newfacet);
- qh_addhash (newfacet, qh hash_table, hashsize, hash);
- (*hashcount)++;
- if (!facet->normal)
- qh_setfacetplane (facet);
- if (matchfacet != qh_DUPLICATEridge) {
- SETelem_(facet->neighbors, skip)= qh_DUPLICATEridge;
- facet->dupridge= True;
- if (!facet->normal)
- qh_setfacetplane (facet);
- if (matchfacet) {
- matchskip= qh_setindex (matchfacet->neighbors, facet);
- SETelem_(matchfacet->neighbors, matchskip)= qh_DUPLICATEridge;
- matchfacet->dupridge= True;
- if (!matchfacet->normal)
- qh_setfacetplane (matchfacet);
- qh_addhash (matchfacet, qh hash_table, hashsize, hash);
- *hashcount += 2;
- }
- }
- trace4((qh ferr, "qh_matchneighbor: new f%d skip %d duplicates ridge for f%d skip %d matching f%d ismatch %d at hash %d\n",
- newfacet->id, newskip, facet->id, skip,
- (matchfacet == qh_DUPLICATEridge ? -2 : getid_(matchfacet)),
- ismatch, hash));
- return; /* end of duplicate ridge */
- }
- }
- if (!newfound)
- SETelem_(qh hash_table, scan)= newfacet; /* same as qh_addhash */
- (*hashcount)++;
- trace4((qh ferr, "qh_matchneighbor: no match for f%d skip %d at hash %d\n",
- newfacet->id, newskip, hash));
-} /* matchneighbor */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="matchnewfacets">-</a>
-
- qh_matchnewfacets()
- match newfacets in qh.newfacet_list to their newfacet neighbors
-
- returns:
- qh.newfacet_list with full neighbor sets
- get vertices with nth neighbor by deleting nth vertex
- if qh.PREmerge/MERGEexact or qh.FORCEoutput
- sets facet->flippped if flipped normal (also prevents point partitioning)
- if duplicate ridges and qh.PREmerge/MERGEexact
- sets facet->dupridge
- missing neighbor links identifies extra ridges to be merging (qh_MERGEridge)
-
- notes:
- newfacets already have neighbor[0] (horizon facet)
- assumes qh.hash_table is NULL
- vertex->neighbors has not been updated yet
- do not allocate memory after qh.hash_table (need to free it cleanly)
-
- design:
- delete neighbor sets for all new facets
- initialize a hash table
- for all new facets
- match facet with neighbors
- if unmatched facets (due to duplicate ridges)
- for each new facet with a duplicate ridge
- match it with a facet
- check for flipped facets
-*/
-void qh_matchnewfacets (void /* qh newfacet_list */) {
- int numnew=0, hashcount=0, newskip;
- facetT *newfacet, *neighbor;
- int dim= qh hull_dim, hashsize, neighbor_i, neighbor_n;
- setT *neighbors;
-#ifndef qh_NOtrace
- int facet_i, facet_n, numfree= 0;
- facetT *facet;
-#endif
-
- trace1((qh ferr, "qh_matchnewfacets: match neighbors for new facets.\n"));
- FORALLnew_facets {
- numnew++;
- { /* inline qh_setzero (newfacet->neighbors, 1, qh hull_dim); */
- neighbors= newfacet->neighbors;
- neighbors->e[neighbors->maxsize].i= dim+1; /*may be overwritten*/
- memset ((char *)SETelemaddr_(neighbors, 1, void), 0, dim * SETelemsize);
- }
- }
- qh_newhashtable (numnew*(qh hull_dim-1)); /* twice what is normally needed,
- but every ridge could be DUPLICATEridge */
- hashsize= qh_setsize (qh hash_table);
- FORALLnew_facets {
- for (newskip=1; newskip<qh hull_dim; newskip++) /* furthest/horizon already matched */
- qh_matchneighbor (newfacet, newskip, hashsize, &hashcount);
-#if 0 /* use the following to trap hashcount errors */
- {
- int count= 0, k;
- facetT *facet, *neighbor;
-
- count= 0;
- FORALLfacet_(qh newfacet_list) { /* newfacet already in use */
- for (k=1; k < qh hull_dim; k++) {
- neighbor= SETelemt_(facet->neighbors, k, facetT);
- if (!neighbor || neighbor == qh_DUPLICATEridge)
- count++;
- }
- if (facet == newfacet)
- break;
- }
- if (count != hashcount) {
- fprintf (qh ferr, "qh_matchnewfacets: after adding facet %d, hashcount %d != count %d\n",
- newfacet->id, hashcount, count);
- qh_errexit (qh_ERRqhull, newfacet, NULL);
- }
- }
-#endif /* end of trap code */
- }
- if (hashcount) {
- FORALLnew_facets {
- if (newfacet->dupridge) {
- FOREACHneighbor_i_(newfacet) {
- if (neighbor == qh_DUPLICATEridge) {
- qh_matchduplicates (newfacet, neighbor_i, hashsize, &hashcount);
- /* this may report MERGEfacet */
- }
- }
- }
- }
- }
- if (hashcount) {
- fprintf (qh ferr, "qhull internal error (qh_matchnewfacets): %d neighbors did not match up\n",
- hashcount);
- qh_printhashtable (qh ferr);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
-#ifndef qh_NOtrace
- if (qh IStracing >= 2) {
- FOREACHfacet_i_(qh hash_table) {
- if (!facet)
- numfree++;
- }
- fprintf (qh ferr, "qh_matchnewfacets: %d new facets, %d unused hash entries . hashsize %d\n",
- numnew, numfree, qh_setsize (qh hash_table));
- }
-#endif /* !qh_NOtrace */
- qh_setfree (&qh hash_table);
- if (qh PREmerge || qh MERGEexact) {
- if (qh IStracing >= 4)
- qh_printfacetlist (qh newfacet_list, NULL, qh_ALL);
- FORALLnew_facets {
- if (newfacet->normal)
- qh_checkflipped (newfacet, NULL, qh_ALL);
- }
- }else if (qh FORCEoutput)
- qh_checkflipped_all (qh newfacet_list); /* prints warnings for flipped */
-} /* matchnewfacets */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="matchvertices">-</a>
-
- qh_matchvertices( firstindex, verticesA, skipA, verticesB, skipB, same )
- tests whether vertices match with a single skip
- starts match at firstindex since all new facets have a common vertex
-
- returns:
- true if matched vertices
- skip index for each set
- sets same iff vertices have the same orientation
-
- notes:
- assumes skipA is in A and both sets are the same size
-
- design:
- set up pointers
- scan both sets checking for a match
- test orientation
-*/
-boolT qh_matchvertices (int firstindex, setT *verticesA, int skipA,
- setT *verticesB, int *skipB, boolT *same) {
- vertexT **elemAp, **elemBp, **skipBp=NULL, **skipAp;
-
- elemAp= SETelemaddr_(verticesA, firstindex, vertexT);
- elemBp= SETelemaddr_(verticesB, firstindex, vertexT);
- skipAp= SETelemaddr_(verticesA, skipA, vertexT);
- do if (elemAp != skipAp) {
- while (*elemAp != *elemBp++) {
- if (skipBp)
- return False;
- skipBp= elemBp; /* one extra like FOREACH */
- }
- }while(*(++elemAp));
- if (!skipBp)
- skipBp= ++elemBp;
- *skipB= SETindex_(verticesB, skipB);
- *same= !(((ptr_intT)skipA & 0x1) ^ ((ptr_intT)*skipB & 0x1));
- trace4((qh ferr, "qh_matchvertices: matched by skip %d (v%d) and skip %d (v%d) same? %d\n",
- skipA, (*skipAp)->id, *skipB, (*(skipBp-1))->id, *same));
- return (True);
-} /* matchvertices */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="newfacet">-</a>
-
- qh_newfacet()
- return a new facet
-
- returns:
- all fields initialized or cleared (NULL)
- preallocates neighbors set
-*/
-facetT *qh_newfacet(void) {
- facetT *facet;
- void **freelistp; /* used !qh_NOmem */
-
- qh_memalloc_(sizeof(facetT), freelistp, facet, facetT);
- memset ((char *)facet, 0, sizeof(facetT));
- if (qh facet_id == qh tracefacet_id)
- qh tracefacet= facet;
- facet->id= qh facet_id++;
- facet->neighbors= qh_setnew(qh hull_dim);
-#if !qh_COMPUTEfurthest
- facet->furthestdist= 0.0;
-#endif
-#if qh_MAXoutside
- if (qh FORCEoutput && qh APPROXhull)
- facet->maxoutside= qh MINoutside;
- else
- facet->maxoutside= qh DISTround;
-#endif
- facet->simplicial= True;
- facet->good= True;
- facet->newfacet= True;
- trace4((qh ferr, "qh_newfacet: created facet f%d\n", facet->id));
- return (facet);
-} /* newfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="newridge">-</a>
-
- qh_newridge()
- return a new ridge
-*/
-ridgeT *qh_newridge(void) {
- ridgeT *ridge;
- void **freelistp; /* used !qh_NOmem */
-
- qh_memalloc_(sizeof(ridgeT), freelistp, ridge, ridgeT);
- memset ((char *)ridge, 0, sizeof(ridgeT));
- zinc_(Ztotridges);
- if (qh ridge_id == 0xFFFFFF) {
- fprintf(qh ferr, "\
-qhull warning: more than %d ridges. ID field overflows and two ridges\n\
-may have the same identifier. Otherwise output ok.\n", 0xFFFFFF);
- }
- ridge->id= qh ridge_id++;
- trace4((qh ferr, "qh_newridge: created ridge r%d\n", ridge->id));
- return (ridge);
-} /* newridge */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="pointid">-</a>
-
- qh_pointid( )
- return id for a point,
- returns -3 if null, -2 if interior, or -1 if not known
-
- alternative code:
- unsigned long id;
- id= ((unsigned long)point - (unsigned long)qh.first_point)/qh.normal_size;
-
- notes:
- if point not in point array
- the code does a comparison of unrelated pointers.
-*/
-int qh_pointid (pointT *point) {
- long offset, id;
-
- if (!point)
- id= -3;
- else if (point == qh interior_point)
- id= -2;
- else if (point >= qh first_point
- && point < qh first_point + qh num_points * qh hull_dim) {
- offset= point - qh first_point;
- id= offset / qh hull_dim;
- }else if ((id= qh_setindex (qh other_points, point)) != -1)
- id += qh num_points;
- else
- id= -1;
- return (int) id;
-} /* pointid */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="removefacet">-</a>
-
- qh_removefacet( facet )
- unlinks facet from qh.facet_list,
-
- returns:
- updates qh.facet_list .newfacet_list .facet_next visible_list
- decrements qh.num_facets
-
- see:
- qh_appendfacet
-*/
-void qh_removefacet(facetT *facet) {
- facetT *next= facet->next, *previous= facet->previous;
-
- if (facet == qh newfacet_list)
- qh newfacet_list= next;
- if (facet == qh facet_next)
- qh facet_next= next;
- if (facet == qh visible_list)
- qh visible_list= next;
- if (previous) {
- previous->next= next;
- next->previous= previous;
- }else { /* 1st facet in qh facet_list */
- qh facet_list= next;
- qh facet_list->previous= NULL;
- }
- qh num_facets--;
- trace4((qh ferr, "qh_removefacet: remove f%d from facet_list\n", facet->id));
-} /* removefacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="removevertex">-</a>
-
- qh_removevertex( vertex )
- unlinks vertex from qh.vertex_list,
-
- returns:
- updates qh.vertex_list .newvertex_list
- decrements qh.num_vertices
-*/
-void qh_removevertex(vertexT *vertex) {
- vertexT *next= vertex->next, *previous= vertex->previous;
-
- if (vertex == qh newvertex_list)
- qh newvertex_list= next;
- if (previous) {
- previous->next= next;
- next->previous= previous;
- }else { /* 1st vertex in qh vertex_list */
- qh vertex_list= vertex->next;
- qh vertex_list->previous= NULL;
- }
- qh num_vertices--;
- trace4((qh ferr, "qh_removevertex: remove v%d from vertex_list\n", vertex->id));
-} /* removevertex */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="updatevertices">-</a>
-
- qh_updatevertices()
- update vertex neighbors and delete interior vertices
-
- returns:
- if qh.VERTEXneighbors, updates neighbors for each vertex
- if qh.newvertex_list,
- removes visible neighbors from vertex neighbors
- if qh.newfacet_list
- adds new facets to vertex neighbors
- if qh.visible_list
- interior vertices added to qh.del_vertices for later partitioning
-
- design:
- if qh.VERTEXneighbors
- deletes references to visible facets from vertex neighbors
- appends new facets to the neighbor list for each vertex
- checks all vertices of visible facets
- removes visible facets from neighbor lists
- marks unused vertices for deletion
-*/
-void qh_updatevertices (void /*qh newvertex_list, newfacet_list, visible_list*/) {
- facetT *newfacet= NULL, *neighbor, **neighborp, *visible;
- vertexT *vertex, **vertexp;
-
- trace3((qh ferr, "qh_updatevertices: delete interior vertices and update vertex->neighbors\n"));
- if (qh VERTEXneighbors) {
- FORALLvertex_(qh newvertex_list) {
- FOREACHneighbor_(vertex) {
- if (neighbor->visible)
- SETref_(neighbor)= NULL;
- }
- qh_setcompact (vertex->neighbors);
- }
- FORALLnew_facets {
- FOREACHvertex_(newfacet->vertices)
- qh_setappend (&vertex->neighbors, newfacet);
- }
- FORALLvisible_facets {
- FOREACHvertex_(visible->vertices) {
- if (!vertex->newlist && !vertex->deleted) {
- FOREACHneighbor_(vertex) { /* this can happen under merging */
- if (!neighbor->visible)
- break;
- }
- if (neighbor)
- qh_setdel (vertex->neighbors, visible);
- else {
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
- trace2((qh ferr, "qh_updatevertices: delete vertex p%d (v%d) in f%d\n",
- qh_pointid(vertex->point), vertex->id, visible->id));
- }
- }
- }
- }
- }else { /* !VERTEXneighbors */
- FORALLvisible_facets {
- FOREACHvertex_(visible->vertices) {
- if (!vertex->newlist && !vertex->deleted) {
- vertex->deleted= True;
- qh_setappend (&qh del_vertices, vertex);
- trace2((qh ferr, "qh_updatevertices: delete vertex p%d (v%d) in f%d\n",
- qh_pointid(vertex->point), vertex->id, visible->id));
- }
- }
- }
- }
-} /* updatevertices */
-
-
-
diff --git a/extern/qhull/src/poly.h b/extern/qhull/src/poly.h
deleted file mode 100644
index 294ec9527fc..00000000000
--- a/extern/qhull/src/poly.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*<html><pre> -<a href="qh-poly.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- poly.h
- header file for poly.c and poly2.c
-
- see qh-poly.htm, qhull.h and poly.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFpoly
-#define qhDEFpoly 1
-
-/*=============== constants ========================== */
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="ALGORITHMfault">-</a>
-
- ALGORITHMfault
- use as argument to checkconvex() to report errors during buildhull
-*/
-#define qh_ALGORITHMfault 0
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="DATAfault">-</a>
-
- DATAfault
- use as argument to checkconvex() to report errors during initialhull
-*/
-#define qh_DATAfault 1
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="DUPLICATEridge">-</a>
-
- DUPLICATEridge
- special value for facet->neighbor to indicate a duplicate ridge
-
- notes:
- set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_DUPLICATEridge ( facetT * ) 1L
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="MERGEridge">-</a>
-
- MERGEridge flag in facet
- special value for facet->neighbor to indicate a merged ridge
-
- notes:
- set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_MERGEridge ( facetT * ) 2L
-
-
-/*============ -structures- ====================*/
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLfacet_">-</a>
-
- FORALLfacet_( facetlist ) { ... }
- assign 'facet' to each facet in facetlist
-
- notes:
- uses 'facetT *facet;'
- assumes last facet is a sentinel
-
- see:
- FORALLfacets
-*/
-#define FORALLfacet_( facetlist ) if ( facetlist ) for( facet=( facetlist );facet && facet->next;facet=facet->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLnew_facets">-</a>
-
- FORALLnew_facets { ... }
- assign 'newfacet' to each facet in qh.newfacet_list
-
- notes:
- uses 'facetT *newfacet;'
- at exit, newfacet==NULL
-*/
-#define FORALLnew_facets for( newfacet=qh newfacet_list;newfacet && newfacet->next;newfacet=newfacet->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvertex_">-</a>
-
- FORALLvertex_( vertexlist ) { ... }
- assign 'vertex' to each vertex in vertexlist
-
- notes:
- uses 'vertexT *vertex;'
- at exit, vertex==NULL
-*/
-#define FORALLvertex_( vertexlist ) for ( vertex=( vertexlist );vertex && vertex->next;vertex= vertex->next )
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvisible_facets">-</a>
-
- FORALLvisible_facets { ... }
- assign 'visible' to each visible facet in qh.visible_list
-
- notes:
- uses 'vacetT *visible;'
- at exit, visible==NULL
-*/
-#define FORALLvisible_facets for (visible=qh visible_list; visible && visible->visible; visible= visible->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLsame_">-</a>
-
- FORALLsame_( newfacet ) { ... }
- assign 'same' to each facet in newfacet->f.samecycle
-
- notes:
- uses 'facetT *same;'
- stops when it returns to newfacet
-*/
-#define FORALLsame_(newfacet) for (same= newfacet->f.samecycle; same != newfacet; same= same->f.samecycle)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLsame_cycle_">-</a>
-
- FORALLsame_cycle_( newfacet ) { ... }
- assign 'same' to each facet in newfacet->f.samecycle
-
- notes:
- uses 'facetT *same;'
- at exit, same == NULL
-*/
-#define FORALLsame_cycle_(newfacet) \
- for (same= newfacet->f.samecycle; \
- same; same= (same == newfacet ? NULL : same->f.samecycle))
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighborA_">-</a>
-
- FOREACHneighborA_( facet ) { ... }
- assign 'neighborA' to each neighbor in facet->neighbors
-
- FOREACHneighborA_( vertex ) { ... }
- assign 'neighborA' to each neighbor in vertex->neighbors
-
- declare:
- facetT *neighborA, **neighborAp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHneighborA_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighborA)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvisible_">-</a>
-
- FOREACHvisible_( facets ) { ... }
- assign 'visible' to each facet in facets
-
- notes:
- uses 'facetT *facet, *facetp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvisible_(facets) FOREACHsetelement_(facetT, facets, visible)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHnewfacet_">-</a>
-
- FOREACHnewfacet_( facets ) { ... }
- assign 'newfacet' to each facet in facets
-
- notes:
- uses 'facetT *newfacet, *newfacetp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHnewfacet_(facets) FOREACHsetelement_(facetT, facets, newfacet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertexA_">-</a>
-
- FOREACHvertexA_( vertices ) { ... }
- assign 'vertexA' to each vertex in vertices
-
- notes:
- uses 'vertexT *vertexA, *vertexAp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertexA_(vertices) FOREACHsetelement_(vertexT, vertices, vertexA)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertexreverse12_">-</a>
-
- FOREACHvertexreverse12_( vertices ) { ... }
- assign 'vertex' to each vertex in vertices
- reverse order of first two vertices
-
- notes:
- uses 'vertexT *vertex, *vertexp;'
- see <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertexreverse12_(vertices) FOREACHsetelementreverse12_(vertexT, vertices, vertex)
-
-
-/*=============== prototypes poly.c in alphabetical order ================*/
-
-void qh_appendfacet(facetT *facet);
-void qh_appendvertex(vertexT *vertex);
-void qh_attachnewfacets (void);
-boolT qh_checkflipped (facetT *facet, realT *dist, boolT allerror);
-void qh_delfacet(facetT *facet);
-void qh_deletevisible(void /*qh visible_list, qh horizon_list*/);
-setT *qh_facetintersect (facetT *facetA, facetT *facetB, int *skipAp,int *skipBp, int extra);
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem);
-facetT *qh_makenewfacet(setT *vertices, boolT toporient, facetT *facet);
-void qh_makenewplanes ( void /* newfacet_list */);
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew);
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew);
-void qh_matchneighbor (facetT *newfacet, int newskip, int hashsize,
- int *hashcount);
-void qh_matchnewfacets (void);
-boolT qh_matchvertices (int firstindex, setT *verticesA, int skipA,
- setT *verticesB, int *skipB, boolT *same);
-facetT *qh_newfacet(void);
-ridgeT *qh_newridge(void);
-int qh_pointid (pointT *point);
-void qh_removefacet(facetT *facet);
-void qh_removevertex(vertexT *vertex);
-void qh_updatevertices (void);
-
-
-/*========== -prototypes poly2.c in alphabetical order ===========*/
-
-void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash);
-void qh_check_bestdist (void);
-void qh_check_maxout (void);
-void qh_check_output (void);
-void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2);
-void qh_check_points(void);
-void qh_checkconvex(facetT *facetlist, int fault);
-void qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp);
-void qh_checkflipped_all (facetT *facetlist);
-void qh_checkpolygon(facetT *facetlist);
-void qh_checkvertex (vertexT *vertex);
-void qh_clearcenters (qh_CENTER type);
-void qh_createsimplex(setT *vertices);
-void qh_delridge(ridgeT *ridge);
-void qh_delvertex (vertexT *vertex);
-setT *qh_facet3vertex (facetT *facet);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
- realT *bestdist, boolT *isoutside);
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
- int *numpart);
-int qh_findgood (facetT *facetlist, int goodhorizon);
-void qh_findgood_all (facetT *facetlist);
-void qh_furthestnext (void /* qh facet_list */);
-void qh_furthestout (facetT *facet);
-void qh_infiniteloop (facetT *facet);
-void qh_initbuild(void);
-void qh_initialhull(setT *vertices);
-setT *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints);
-vertexT *qh_isvertex (pointT *point, setT *vertices);
-vertexT *qh_makenewfacets (pointT *point /*horizon_list, visible_list*/);
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount);
-void qh_nearcoplanar ( void /* qh.facet_list */);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-int qh_newhashtable(int newsize);
-vertexT *qh_newvertex(pointT *point);
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp);
-void qh_outcoplanar (void /* facet_list */);
-pointT *qh_point (int id);
-void qh_point_add (setT *set, pointT *point, void *elem);
-setT *qh_pointfacet (void /*qh facet_list*/);
-setT *qh_pointvertex (void /*qh facet_list*/);
-void qh_prependfacet(facetT *facet, facetT **facetlist);
-void qh_printhashtable(FILE *fp);
-void qh_printlists (void);
-void qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/);
-void qh_setvoronoi_all (void);
-void qh_triangulate (void /*qh facet_list*/);
-void qh_triangulate_facet (facetT *facetA, vertexT **first_vertex);
-void qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB);
-void qh_triangulate_mirror (facetT *facetA, facetT *facetB);
-void qh_triangulate_null (facetT *facetA);
-void qh_vertexintersect(setT **vertexsetA,setT *vertexsetB);
-setT *qh_vertexintersect_new(setT *vertexsetA,setT *vertexsetB);
-void qh_vertexneighbors (void /*qh facet_list*/);
-boolT qh_vertexsubset(setT *vertexsetA, setT *vertexsetB);
-
-
-#endif /* qhDEFpoly */
diff --git a/extern/qhull/src/poly2.c b/extern/qhull/src/poly2.c
deleted file mode 100644
index 713faab8bed..00000000000
--- a/extern/qhull/src/poly2.c
+++ /dev/null
@@ -1,3070 +0,0 @@
-/*<html><pre> -<a href="qh-poly.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- poly2.c
- implements polygons and simplices
-
- see qh-poly.htm, poly.h and qhull.h
-
- frequently used code is in poly.c
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*======== functions in alphabetical order ==========*/
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="addhash">-</a>
-
- qh_addhash( newelem, hashtable, hashsize, hash )
- add newelem to linear hash table at hash if not already there
-*/
-void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash) {
- int scan;
- void *elem;
-
- for (scan= (int)hash; (elem= SETelem_(hashtable, scan));
- scan= (++scan >= hashsize ? 0 : scan)) {
- if (elem == newelem)
- break;
- }
- /* loop terminates because qh_HASHfactor >= 1.1 by qh_initbuffers */
- if (!elem)
- SETelem_(hashtable, scan)= newelem;
-} /* addhash */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="check_bestdist">-</a>
-
- qh_check_bestdist()
- check that all points are within max_outside of the nearest facet
- if qh.ONLYgood,
- ignores !good facets
-
- see:
- qh_check_maxout(), qh_outerinner()
-
- notes:
- only called from qh_check_points()
- seldom used since qh.MERGING is almost always set
- if notverified>0 at end of routine
- some points were well inside the hull. If the hull contains
- a lens-shaped component, these points were not verified. Use
- options 'Qi Tv' to verify all points. (Exhaustive check also verifies)
-
- design:
- determine facet for each point (if any)
- for each point
- start with the assigned facet or with the first facet
- find the best facet for the point and check all coplanar facets
- error if point is outside of facet
-*/
-void qh_check_bestdist (void) {
- boolT waserror= False, unassigned;
- facetT *facet, *bestfacet, *errfacet1= NULL, *errfacet2= NULL;
- facetT *facetlist;
- realT dist, maxoutside, maxdist= -REALmax;
- pointT *point;
- int numpart= 0, facet_i, facet_n, notgood= 0, notverified= 0;
- setT *facets;
-
- trace1((qh ferr, "qh_check_bestdist: check points below nearest facet. Facet_list f%d\n",
- qh facet_list->id));
- maxoutside= qh_maxouter();
- maxoutside += qh DISTround;
- /* one more qh.DISTround for check computation */
- trace1((qh ferr, "qh_check_bestdist: check that all points are within %2.2g of best facet\n", maxoutside));
- facets= qh_pointfacet (/*qh facet_list*/);
- if (!qh_QUICKhelp && qh PRINTprecision)
- fprintf (qh ferr, "\n\
-qhull output completed. Verifying that %d points are\n\
-below %2.2g of the nearest %sfacet.\n",
- qh_setsize(facets), maxoutside, (qh ONLYgood ? "good " : ""));
- FOREACHfacet_i_(facets) { /* for each point with facet assignment */
- if (facet)
- unassigned= False;
- else {
- unassigned= True;
- facet= qh facet_list;
- }
- point= qh_point(facet_i);
- if (point == qh GOODpointp)
- continue;
- qh_distplane(point, facet, &dist);
- numpart++;
- bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, facet, qh_NOupper, &dist, &numpart);
- /* occurs after statistics reported */
- maximize_(maxdist, dist);
- if (dist > maxoutside) {
- if (qh ONLYgood && !bestfacet->good
- && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
- && dist > maxoutside))
- notgood++;
- else {
- waserror= True;
- fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n",
- facet_i, bestfacet->id, dist, maxoutside);
- if (errfacet1 != bestfacet) {
- errfacet2= errfacet1;
- errfacet1= bestfacet;
- }
- }
- }else if (unassigned && dist < -qh MAXcoplanar)
- notverified++;
- }
- qh_settempfree (&facets);
- if (notverified && !qh DELAUNAY && !qh_QUICKhelp && qh PRINTprecision)
- fprintf(qh ferr, "\n%d points were well inside the hull. If the hull contains\n\
-a lens-shaped component, these points were not verified. Use\n\
-options 'Qci Tv' to verify all points.\n", notverified);
- if (maxdist > qh outside_err) {
- fprintf( qh ferr, "qhull precision error (qh_check_bestdist): a coplanar point is %6.2g from convex hull. The maximum value (qh.outside_err) is %6.2g\n",
- maxdist, qh outside_err);
- qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
- }else if (waserror && qh outside_err > REALmax/2)
- qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
- else if (waserror)
- ; /* the error was logged to qh.ferr but does not effect the output */
- trace0((qh ferr, "qh_check_bestdist: max distance outside %2.2g\n", maxdist));
-} /* check_bestdist */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="check_maxout">-</a>
-
- qh_check_maxout()
- updates qh.max_outside by checking all points against bestfacet
- if qh.ONLYgood, ignores !good facets
-
- returns:
- updates facet->maxoutside via qh_findbesthorizon()
- sets qh.maxoutdone
- if printing qh.min_vertex (qh_outerinner),
- it is updated to the current vertices
- removes inside/coplanar points from coplanarset as needed
-
- notes:
- defines coplanar as min_vertex instead of MAXcoplanar
- may not need to check near-inside points because of qh.MAXcoplanar
- and qh.KEEPnearinside (before it was -DISTround)
-
- see also:
- qh_check_bestdist()
-
- design:
- if qh.min_vertex is needed
- for all neighbors of all vertices
- test distance from vertex to neighbor
- determine facet for each point (if any)
- for each point with an assigned facet
- find the best facet for the point and check all coplanar facets
- (updates outer planes)
- remove near-inside points from coplanar sets
-*/
-#ifndef qh_NOmerge
-void qh_check_maxout (void) {
- facetT *facet, *bestfacet, *neighbor, **neighborp, *facetlist;
- realT dist, maxoutside, minvertex, old_maxoutside;
- pointT *point;
- int numpart= 0, facet_i, facet_n, notgood= 0;
- setT *facets, *vertices;
- vertexT *vertex;
-
- trace1((qh ferr, "qh_check_maxout: check and update maxoutside for each facet.\n"));
- maxoutside= minvertex= 0;
- if (qh VERTEXneighbors
- && (qh PRINTsummary || qh KEEPinside || qh KEEPcoplanar
- || qh TRACElevel || qh PRINTstatistics
- || qh PRINTout[0] == qh_PRINTsummary || qh PRINTout[0] == qh_PRINTnone)) {
- trace1((qh ferr, "qh_check_maxout: determine actual maxoutside and minvertex\n"));
- vertices= qh_pointvertex (/*qh facet_list*/);
- FORALLvertices {
- FOREACHneighbor_(vertex) {
- zinc_(Zdistvertex); /* distance also computed by main loop below */
- qh_distplane (vertex->point, neighbor, &dist);
- minimize_(minvertex, dist);
- if (-dist > qh TRACEdist || dist > qh TRACEdist
- || neighbor == qh tracefacet || vertex == qh tracevertex)
- fprintf (qh ferr, "qh_check_maxout: p%d (v%d) is %.2g from f%d\n",
- qh_pointid (vertex->point), vertex->id, dist, neighbor->id);
- }
- }
- if (qh MERGING) {
- wmin_(Wminvertex, qh min_vertex);
- }
- qh min_vertex= minvertex;
- qh_settempfree (&vertices);
- }
- facets= qh_pointfacet (/*qh facet_list*/);
- do {
- old_maxoutside= fmax_(qh max_outside, maxoutside);
- FOREACHfacet_i_(facets) { /* for each point with facet assignment */
- if (facet) {
- point= qh_point(facet_i);
- if (point == qh GOODpointp)
- continue;
- zinc_(Ztotcheck);
- qh_distplane(point, facet, &dist);
- numpart++;
- bestfacet= qh_findbesthorizon (qh_IScheckmax, point, facet, !qh_NOupper, &dist, &numpart);
- if (bestfacet && dist > maxoutside) {
- if (qh ONLYgood && !bestfacet->good
- && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
- && dist > maxoutside))
- notgood++;
- else
- maxoutside= dist;
- }
- if (dist > qh TRACEdist || (bestfacet && bestfacet == qh tracefacet))
- fprintf (qh ferr, "qh_check_maxout: p%d is %.2g above f%d\n",
- qh_pointid (point), dist, bestfacet->id);
- }
- }
- }while
- (maxoutside > 2*old_maxoutside);
- /* if qh.maxoutside increases substantially, qh_SEARCHdist is not valid
- e.g., RBOX 5000 s Z1 G1e-13 t1001200614 | qhull */
- zzadd_(Zcheckpart, numpart);
- qh_settempfree (&facets);
- wval_(Wmaxout)= maxoutside - qh max_outside;
- wmax_(Wmaxoutside, qh max_outside);
- qh max_outside= maxoutside;
- qh_nearcoplanar (/*qh.facet_list*/);
- qh maxoutdone= True;
- trace1((qh ferr, "qh_check_maxout: maxoutside %2.2g, min_vertex %2.2g, outside of not good %d\n",
- maxoutside, qh min_vertex, notgood));
-} /* check_maxout */
-#else /* qh_NOmerge */
-void qh_check_maxout (void) {
-}
-#endif
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="check_output">-</a>
-
- qh_check_output()
- performs the checks at the end of qhull algorithm
- Maybe called after voronoi output. Will recompute otherwise centrums are Voronoi centers instead
-*/
-void qh_check_output (void) {
- int i;
-
- if (qh STOPcone)
- return;
- if (qh VERIFYoutput | qh IStracing | qh CHECKfrequently) {
- qh_checkpolygon (qh facet_list);
- qh_checkflipped_all (qh facet_list);
- qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
- }else if (!qh MERGING && qh_newstats (qhstat precision, &i)) {
- qh_checkflipped_all (qh facet_list);
- qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
- }
-} /* check_output */
-
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="check_point">-</a>
-
- qh_check_point( point, facet, maxoutside, maxdist, errfacet1, errfacet2 )
- check that point is less than maxoutside from facet
-*/
-void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2) {
- realT dist;
-
- /* occurs after statistics reported */
- qh_distplane(point, facet, &dist);
- if (dist > *maxoutside) {
- if (*errfacet1 != facet) {
- *errfacet2= *errfacet1;
- *errfacet1= facet;
- }
- fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n",
- qh_pointid(point), facet->id, dist, *maxoutside);
- }
- maximize_(*maxdist, dist);
-} /* qh_check_point */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="check_points">-</a>
-
- qh_check_points()
- checks that all points are inside all facets
-
- notes:
- if many points and qh_check_maxout not called (i.e., !qh.MERGING),
- calls qh_findbesthorizon (seldom done).
- ignores flipped facets
- maxoutside includes 2 qh.DISTrounds
- one qh.DISTround for the computed distances in qh_check_points
- qh_printafacet and qh_printsummary needs only one qh.DISTround
- the computation for qh.VERIFYdirect does not account for qh.other_points
-
- design:
- if many points
- use qh_check_bestdist()
- else
- for all facets
- for all points
- check that point is inside facet
-*/
-void qh_check_points (void) {
- facetT *facet, *errfacet1= NULL, *errfacet2= NULL;
- realT total, maxoutside, maxdist= -REALmax;
- pointT *point, **pointp, *pointtemp;
- boolT testouter;
-
- maxoutside= qh_maxouter();
- maxoutside += qh DISTround;
- /* one more qh.DISTround for check computation */
- trace1((qh ferr, "qh_check_points: check all points below %2.2g of all facet planes\n",
- maxoutside));
- if (qh num_good) /* miss counts other_points and !good facets */
- total= (float) qh num_good * qh num_points;
- else
- total= (float) qh num_facets * qh num_points;
- if (total >= qh_VERIFYdirect && !qh maxoutdone) {
- if (!qh_QUICKhelp && qh SKIPcheckmax && qh MERGING)
- fprintf (qh ferr, "\n\
-qhull input warning: merging without checking outer planes ('Q5' or 'Po').\n\
-Verify may report that a point is outside of a facet.\n");
- qh_check_bestdist();
- }else {
- if (qh_MAXoutside && qh maxoutdone)
- testouter= True;
- else
- testouter= False;
- if (!qh_QUICKhelp) {
- if (qh MERGEexact)
- fprintf (qh ferr, "\n\
-qhull input warning: exact merge ('Qx'). Verify may report that a point\n\
-is outside of a facet. See qh-optq.htm#Qx\n");
- else if (qh SKIPcheckmax || qh NOnearinside)
- fprintf (qh ferr, "\n\
-qhull input warning: no outer plane check ('Q5') or no processing of\n\
-near-inside points ('Q8'). Verify may report that a point is outside\n\
-of a facet.\n");
- }
- if (qh PRINTprecision) {
- if (testouter)
- fprintf (qh ferr, "\n\
-Output completed. Verifying that all points are below outer planes of\n\
-all %sfacets. Will make %2.0f distance computations.\n",
- (qh ONLYgood ? "good " : ""), total);
- else
- fprintf (qh ferr, "\n\
-Output completed. Verifying that all points are below %2.2g of\n\
-all %sfacets. Will make %2.0f distance computations.\n",
- maxoutside, (qh ONLYgood ? "good " : ""), total);
- }
- FORALLfacets {
- if (!facet->good && qh ONLYgood)
- continue;
- if (facet->flipped)
- continue;
- if (!facet->normal) {
- fprintf( qh ferr, "qhull warning (qh_check_points): missing normal for facet f%d\n", facet->id);
- continue;
- }
- if (testouter) {
-#if qh_MAXoutside
- maxoutside= facet->maxoutside + 2* qh DISTround;
- /* one DISTround to actual point and another to computed point */
-#endif
- }
- FORALLpoints {
- if (point != qh GOODpointp)
- qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
- }
- FOREACHpoint_(qh other_points) {
- if (point != qh GOODpointp)
- qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
- }
- }
- if (maxdist > qh outside_err) {
- fprintf( qh ferr, "qhull precision error (qh_check_points): a coplanar point is %6.2g from convex hull. The maximum value (qh.outside_err) is %6.2g\n",
- maxdist, qh outside_err );
- qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
- }else if (errfacet1 && qh outside_err > REALmax/2)
- qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
- else if (errfacet1)
- ; /* the error was logged to qh.ferr but does not effect the output */
- trace0((qh ferr, "qh_check_points: max distance outside %2.2g\n", maxdist));
- }
-} /* check_points */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkconvex">-</a>
-
- qh_checkconvex( facetlist, fault )
- check that each ridge in facetlist is convex
- fault = qh_DATAfault if reporting errors
- = qh_ALGORITHMfault otherwise
-
- returns:
- counts Zconcaveridges and Zcoplanarridges
- errors if concaveridge or if merging an coplanar ridge
-
- note:
- if not merging,
- tests vertices for neighboring simplicial facets
- else if ZEROcentrum,
- tests vertices for neighboring simplicial facets
- else
- tests centrums of neighboring facets
-
- design:
- for all facets
- report flipped facets
- if ZEROcentrum and simplicial neighbors
- test vertices for neighboring simplicial facets
- else
- test centrum against all neighbors
-*/
-void qh_checkconvex(facetT *facetlist, int fault) {
- facetT *facet, *neighbor, **neighborp, *errfacet1=NULL, *errfacet2=NULL;
- vertexT *vertex;
- realT dist;
- pointT *centrum;
- boolT waserror= False, centrum_warning= False, tempcentrum= False, allsimplicial;
- int neighbor_i;
-
- trace1((qh ferr, "qh_checkconvex: check all ridges are convex\n"));
- if (!qh RERUN) {
- zzval_(Zconcaveridges)= 0;
- zzval_(Zcoplanarridges)= 0;
- }
- FORALLfacet_(facetlist) {
- if (facet->flipped) {
- qh_precision ("flipped facet");
- fprintf (qh ferr, "qhull precision error: f%d is flipped (interior point is outside)\n",
- facet->id);
- errfacet1= facet;
- waserror= True;
- continue;
- }
- if (qh MERGING && (!qh ZEROcentrum || !facet->simplicial || facet->tricoplanar))
- allsimplicial= False;
- else {
- allsimplicial= True;
- neighbor_i= 0;
- FOREACHneighbor_(facet) {
- vertex= SETelemt_(facet->vertices, neighbor_i++, vertexT);
- if (!neighbor->simplicial || neighbor->tricoplanar) {
- allsimplicial= False;
- continue;
- }
- qh_distplane (vertex->point, neighbor, &dist);
- if (dist > -qh DISTround) {
- if (fault == qh_DATAfault) {
- qh_precision ("coplanar or concave ridge");
- fprintf (qh ferr, "qhull precision error: initial simplex is not convex. Distance=%.2g\n", dist);
- qh_errexit(qh_ERRsingular, NULL, NULL);
- }
- if (dist > qh DISTround) {
- zzinc_(Zconcaveridges);
- qh_precision ("concave ridge");
- fprintf (qh ferr, "qhull precision error: f%d is concave to f%d, since p%d (v%d) is %6.4g above\n",
- facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist);
- errfacet1= facet;
- errfacet2= neighbor;
- waserror= True;
- }else if (qh ZEROcentrum) {
- if (dist > 0) { /* qh_checkzero checks that dist < - qh DISTround */
- zzinc_(Zcoplanarridges);
- qh_precision ("coplanar ridge");
- fprintf (qh ferr, "qhull precision error: f%d is clearly not convex to f%d, since p%d (v%d) is %6.4g above\n",
- facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist);
- errfacet1= facet;
- errfacet2= neighbor;
- waserror= True;
- }
- }else {
- zzinc_(Zcoplanarridges);
- qh_precision ("coplanar ridge");
- trace0((qh ferr, "qhull precision error: f%d may be coplanar to f%d, since p%d (v%d) is within %6.4g during p%d\n",
- facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist, qh furthest_id));
- }
- }
- }
- }
- if (!allsimplicial) {
- if (qh CENTERtype == qh_AScentrum) {
- if (!facet->center)
- facet->center= qh_getcentrum (facet);
- centrum= facet->center;
- }else {
- if (!centrum_warning && (!facet->simplicial || facet->tricoplanar)) {
- centrum_warning= True;
- fprintf (qh ferr, "qhull note: recomputing centrums for convexity test. This may lead to false, precision errors.\n");
- }
- centrum= qh_getcentrum(facet);
- tempcentrum= True;
- }
- FOREACHneighbor_(facet) {
- if (qh ZEROcentrum && facet->simplicial && neighbor->simplicial)
- continue;
- if (facet->tricoplanar || neighbor->tricoplanar)
- continue;
- zzinc_(Zdistconvex);
- qh_distplane (centrum, neighbor, &dist);
- if (dist > qh DISTround) {
- zzinc_(Zconcaveridges);
- qh_precision ("concave ridge");
- fprintf (qh ferr, "qhull precision error: f%d is concave to f%d. Centrum of f%d is %6.4g above f%d\n",
- facet->id, neighbor->id, facet->id, dist, neighbor->id);
- errfacet1= facet;
- errfacet2= neighbor;
- waserror= True;
- }else if (dist >= 0.0) { /* if arithmetic always rounds the same,
- can test against centrum radius instead */
- zzinc_(Zcoplanarridges);
- qh_precision ("coplanar ridge");
- fprintf (qh ferr, "qhull precision error: f%d is coplanar or concave to f%d. Centrum of f%d is %6.4g above f%d\n",
- facet->id, neighbor->id, facet->id, dist, neighbor->id);
- errfacet1= facet;
- errfacet2= neighbor;
- waserror= True;
- }
- }
- if (tempcentrum)
- qh_memfree(centrum, qh normal_size);
- }
- }
- if (waserror && !qh FORCEoutput)
- qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
-} /* checkconvex */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkfacet">-</a>
-
- qh_checkfacet( facet, newmerge, waserror )
- checks for consistency errors in facet
- newmerge set if from merge.c
-
- returns:
- sets waserror if any error occurs
-
- checks:
- vertex ids are inverse sorted
- unless newmerge, at least hull_dim neighbors and vertices (exactly if simplicial)
- if non-simplicial, at least as many ridges as neighbors
- neighbors are not duplicated
- ridges are not duplicated
- in 3-d, ridges=verticies
- (qh.hull_dim-1) ridge vertices
- neighbors are reciprocated
- ridge neighbors are facet neighbors and a ridge for every neighbor
- simplicial neighbors match facetintersect
- vertex intersection matches vertices of common ridges
- vertex neighbors and facet vertices agree
- all ridges have distinct vertex sets
-
- notes:
- uses neighbor->seen
-
- design:
- check sets
- check vertices
- check sizes of neighbors and vertices
- check for qh_MERGEridge and qh_DUPLICATEridge flags
- check neighbor set
- check ridge set
- check ridges, neighbors, and vertices
-*/
-void qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp) {
- facetT *neighbor, **neighborp, *errother=NULL;
- ridgeT *ridge, **ridgep, *errridge= NULL, *ridge2;
- vertexT *vertex, **vertexp;
- unsigned previousid= INT_MAX;
- int numneighbors, numvertices, numridges=0, numRvertices=0;
- boolT waserror= False;
- int skipA, skipB, ridge_i, ridge_n, i;
- setT *intersection;
-
- if (facet->visible) {
- fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d is on the visible_list\n",
- facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- if (!facet->normal) {
- fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d does not have a normal\n",
- facet->id);
- waserror= True;
- }
- qh_setcheck (facet->vertices, "vertices for f", facet->id);
- qh_setcheck (facet->ridges, "ridges for f", facet->id);
- qh_setcheck (facet->outsideset, "outsideset for f", facet->id);
- qh_setcheck (facet->coplanarset, "coplanarset for f", facet->id);
- qh_setcheck (facet->neighbors, "neighbors for f", facet->id);
- FOREACHvertex_(facet->vertices) {
- if (vertex->deleted) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): deleted vertex v%d in f%d\n", vertex->id, facet->id);
- qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
- waserror= True;
- }
- if (vertex->id >= previousid) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): vertices of f%d are not in descending id order at v%d\n", facet->id, vertex->id);
- waserror= True;
- break;
- }
- previousid= vertex->id;
- }
- numneighbors= qh_setsize(facet->neighbors);
- numvertices= qh_setsize(facet->vertices);
- numridges= qh_setsize(facet->ridges);
- if (facet->simplicial) {
- if (numvertices+numneighbors != 2*qh hull_dim
- && !facet->degenerate && !facet->redundant) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): for simplicial facet f%d, #vertices %d + #neighbors %d != 2*qh hull_dim\n",
- facet->id, numvertices, numneighbors);
- qh_setprint (qh ferr, "", facet->neighbors);
- waserror= True;
- }
- }else { /* non-simplicial */
- if (!newmerge
- &&(numvertices < qh hull_dim || numneighbors < qh hull_dim)
- && !facet->degenerate && !facet->redundant) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, #vertices %d or #neighbors %d < qh hull_dim\n",
- facet->id, numvertices, numneighbors);
- waserror= True;
- }
- /* in 3-d, can get a vertex twice in an edge list, e.g., RBOX 1000 s W1e-13 t995849315 D2 | QHULL d Tc Tv TP624 TW1e-13 T4 */
- if (numridges < numneighbors
- ||(qh hull_dim == 3 && numvertices > numridges && !qh NEWfacets)
- ||(qh hull_dim == 2 && numridges + numvertices + numneighbors != 6)) {
- if (!facet->degenerate && !facet->redundant) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, #ridges %d < #neighbors %d or (3-d) > #vertices %d or (2-d) not all 2\n",
- facet->id, numridges, numneighbors, numvertices);
- waserror= True;
- }
- }
- }
- FOREACHneighbor_(facet) {
- if (neighbor == qh_MERGEridge || neighbor == qh_DUPLICATEridge) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d still has a MERGE or DUP neighbor\n", facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- neighbor->seen= True;
- }
- FOREACHneighbor_(facet) {
- if (!qh_setin(neighbor->neighbors, facet)) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has neighbor f%d, but f%d does not have neighbor f%d\n",
- facet->id, neighbor->id, neighbor->id, facet->id);
- errother= neighbor;
- waserror= True;
- }
- if (!neighbor->seen) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has a duplicate neighbor f%d\n",
- facet->id, neighbor->id);
- errother= neighbor;
- waserror= True;
- }
- neighbor->seen= False;
- }
- FOREACHridge_(facet->ridges) {
- qh_setcheck (ridge->vertices, "vertices for r", ridge->id);
- ridge->seen= False;
- }
- FOREACHridge_(facet->ridges) {
- if (ridge->seen) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has a duplicate ridge r%d\n",
- facet->id, ridge->id);
- errridge= ridge;
- waserror= True;
- }
- ridge->seen= True;
- numRvertices= qh_setsize(ridge->vertices);
- if (numRvertices != qh hull_dim - 1) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): ridge between f%d and f%d has %d vertices\n",
- ridge->top->id, ridge->bottom->id, numRvertices);
- errridge= ridge;
- waserror= True;
- }
- neighbor= otherfacet_(ridge, facet);
- neighbor->seen= True;
- if (!qh_setin(facet->neighbors, neighbor)) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, neighbor f%d of ridge r%d not in facet\n",
- facet->id, neighbor->id, ridge->id);
- errridge= ridge;
- waserror= True;
- }
- }
- if (!facet->simplicial) {
- FOREACHneighbor_(facet) {
- if (!neighbor->seen) {
- fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d does not have a ridge for neighbor f%d\n",
- facet->id, neighbor->id);
- errother= neighbor;
- waserror= True;
- }
- intersection= qh_vertexintersect_new(facet->vertices, neighbor->vertices);
- qh_settemppush (intersection);
- FOREACHvertex_(facet->vertices) {
- vertex->seen= False;
- vertex->seen2= False;
- }
- FOREACHvertex_(intersection)
- vertex->seen= True;
- FOREACHridge_(facet->ridges) {
- if (neighbor != otherfacet_(ridge, facet))
- continue;
- FOREACHvertex_(ridge->vertices) {
- if (!vertex->seen) {
- fprintf (qh ferr, "qhull internal error (qh_checkfacet): vertex v%d in r%d not in f%d intersect f%d\n",
- vertex->id, ridge->id, facet->id, neighbor->id);
- qh_errexit (qh_ERRqhull, facet, ridge);
- }
- vertex->seen2= True;
- }
- }
- if (!newmerge) {
- FOREACHvertex_(intersection) {
- if (!vertex->seen2) {
- if (qh IStracing >=3 || !qh MERGING) {
- fprintf (qh ferr, "qhull precision error (qh_checkfacet): vertex v%d in f%d intersect f%d but\n\
- not in a ridge. This is ok under merging. Last point was p%d\n",
- vertex->id, facet->id, neighbor->id, qh furthest_id);
- if (!qh FORCEoutput && !qh MERGING) {
- qh_errprint ("ERRONEOUS", facet, neighbor, NULL, vertex);
- if (!qh MERGING)
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- }
- }
- }
- }
- qh_settempfree (&intersection);
- }
- }else { /* simplicial */
- FOREACHneighbor_(facet) {
- if (neighbor->simplicial) {
- skipA= SETindex_(facet->neighbors, neighbor);
- skipB= qh_setindex (neighbor->neighbors, facet);
- if (!qh_setequal_skip (facet->vertices, skipA, neighbor->vertices, skipB)) {
- fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d skip %d and neighbor f%d skip %d do not match \n",
- facet->id, skipA, neighbor->id, skipB);
- errother= neighbor;
- waserror= True;
- }
- }
- }
- }
- if (qh hull_dim < 5 && (qh IStracing > 2 || qh CHECKfrequently)) {
- FOREACHridge_i_(facet->ridges) { /* expensive */
- for (i= ridge_i+1; i < ridge_n; i++) {
- ridge2= SETelemt_(facet->ridges, i, ridgeT);
- if (qh_setequal (ridge->vertices, ridge2->vertices)) {
- fprintf (qh ferr, "qh_checkfacet: ridges r%d and r%d have the same vertices\n",
- ridge->id, ridge2->id);
- errridge= ridge;
- waserror= True;
- }
- }
- }
- }
- if (waserror) {
- qh_errprint("ERRONEOUS", facet, errother, errridge, NULL);
- *waserrorp= True;
- }
-} /* checkfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkflipped_all">-</a>
-
- qh_checkflipped_all( facetlist )
- checks orientation of facets in list against interior point
-*/
-void qh_checkflipped_all (facetT *facetlist) {
- facetT *facet;
- boolT waserror= False;
- realT dist;
-
- if (facetlist == qh facet_list)
- zzval_(Zflippedfacets)= 0;
- FORALLfacet_(facetlist) {
- if (facet->normal && !qh_checkflipped (facet, &dist, !qh_ALL)) {
- fprintf(qh ferr, "qhull precision error: facet f%d is flipped, distance= %6.12g\n",
- facet->id, dist);
- if (!qh FORCEoutput) {
- qh_errprint("ERRONEOUS", facet, NULL, NULL, NULL);
- waserror= True;
- }
- }
- }
- if (waserror) {
- fprintf (qh ferr, "\n\
-A flipped facet occurs when its distance to the interior point is\n\
-greater than %2.2g, the maximum roundoff error.\n", -qh DISTround);
- qh_errexit(qh_ERRprec, NULL, NULL);
- }
-} /* checkflipped_all */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkpolygon">-</a>
-
- qh_checkpolygon( facetlist )
- checks the correctness of the structure
-
- notes:
- call with either qh.facet_list or qh.newfacet_list
- checks num_facets and num_vertices if qh.facet_list
-
- design:
- for each facet
- checks facet and outside set
- initializes vertexlist
- for each facet
- checks vertex set
- if checking all facets (qh.facetlist)
- check facet count
- if qh.VERTEXneighbors
- check vertex neighbors and count
- check vertex count
-*/
-void qh_checkpolygon(facetT *facetlist) {
- facetT *facet;
- vertexT *vertex, **vertexp, *vertexlist;
- int numfacets= 0, numvertices= 0, numridges= 0;
- int totvneighbors= 0, totvertices= 0;
- boolT waserror= False, nextseen= False, visibleseen= False;
-
- trace1((qh ferr, "qh_checkpolygon: check all facets from f%d\n", facetlist->id));
- if (facetlist != qh facet_list || qh ONLYgood)
- nextseen= True;
- FORALLfacet_(facetlist) {
- if (facet == qh visible_list)
- visibleseen= True;
- if (!facet->visible) {
- if (!nextseen) {
- if (facet == qh facet_next)
- nextseen= True;
- else if (qh_setsize (facet->outsideset)) {
- if (!qh NARROWhull
-#if !qh_COMPUTEfurthest
- || facet->furthestdist >= qh MINoutside
-#endif
- ) {
- fprintf (qh ferr, "qhull internal error (qh_checkpolygon): f%d has outside points before qh facet_next\n",
- facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- }
- }
- numfacets++;
- qh_checkfacet(facet, False, &waserror);
- }
- }
- if (qh visible_list && !visibleseen && facetlist == qh facet_list) {
- fprintf (qh ferr, "qhull internal error (qh_checkpolygon): visible list f%d no longer on facet list\n", qh visible_list->id);
- qh_printlists();
- qh_errexit (qh_ERRqhull, qh visible_list, NULL);
- }
- if (facetlist == qh facet_list)
- vertexlist= qh vertex_list;
- else if (facetlist == qh newfacet_list)
- vertexlist= qh newvertex_list;
- else
- vertexlist= NULL;
- FORALLvertex_(vertexlist) {
- vertex->seen= False;
- vertex->visitid= 0;
- }
- FORALLfacet_(facetlist) {
- if (facet->visible)
- continue;
- if (facet->simplicial)
- numridges += qh hull_dim;
- else
- numridges += qh_setsize (facet->ridges);
- FOREACHvertex_(facet->vertices) {
- vertex->visitid++;
- if (!vertex->seen) {
- vertex->seen= True;
- numvertices++;
- if (qh_pointid (vertex->point) == -1) {
- fprintf (qh ferr, "qhull internal error (qh_checkpolygon): unknown point %p for vertex v%d first_point %p\n",
- vertex->point, vertex->id, qh first_point);
- waserror= True;
- }
- }
- }
- }
- qh vertex_visit += numfacets;
- if (facetlist == qh facet_list) {
- if (numfacets != qh num_facets - qh num_visible) {
- fprintf(qh ferr, "qhull internal error (qh_checkpolygon): actual number of facets is %d, cumulative facet count is %d - %d visible facets\n",
- numfacets, qh num_facets, qh num_visible);
- waserror= True;
- }
- qh vertex_visit++;
- if (qh VERTEXneighbors) {
- FORALLvertices {
- qh_setcheck (vertex->neighbors, "neighbors for v", vertex->id);
- if (vertex->deleted)
- continue;
- totvneighbors += qh_setsize (vertex->neighbors);
- }
- FORALLfacet_(facetlist)
- totvertices += qh_setsize (facet->vertices);
- if (totvneighbors != totvertices) {
- fprintf(qh ferr, "qhull internal error (qh_checkpolygon): vertex neighbors inconsistent. Totvneighbors %d, totvertices %d\n",
- totvneighbors, totvertices);
- waserror= True;
- }
- }
- if (numvertices != qh num_vertices - qh_setsize(qh del_vertices)) {
- fprintf(qh ferr, "qhull internal error (qh_checkpolygon): actual number of vertices is %d, cumulative vertex count is %d\n",
- numvertices, qh num_vertices - qh_setsize(qh del_vertices));
- waserror= True;
- }
- if (qh hull_dim == 2 && numvertices != numfacets) {
- fprintf (qh ferr, "qhull internal error (qh_checkpolygon): #vertices %d != #facets %d\n",
- numvertices, numfacets);
- waserror= True;
- }
- if (qh hull_dim == 3 && numvertices + numfacets - numridges/2 != 2) {
- fprintf (qh ferr, "qhull warning: #vertices %d + #facets %d - #edges %d != 2\n\
- A vertex appears twice in a edge list. May occur during merging.",
- numvertices, numfacets, numridges/2);
- /* occurs if lots of merging and a vertex ends up twice in an edge list. e.g., RBOX 1000 s W1e-13 t995849315 D2 | QHULL d Tc Tv */
- }
- }
- if (waserror)
- qh_errexit(qh_ERRqhull, NULL, NULL);
-} /* checkpolygon */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="checkvertex">-</a>
-
- qh_checkvertex( vertex )
- check vertex for consistency
- checks vertex->neighbors
-
- notes:
- neighbors checked efficiently in checkpolygon
-*/
-void qh_checkvertex (vertexT *vertex) {
- boolT waserror= False;
- facetT *neighbor, **neighborp, *errfacet=NULL;
-
- if (qh_pointid (vertex->point) == -1) {
- fprintf (qh ferr, "qhull internal error (qh_checkvertex): unknown point id %p\n", vertex->point);
- waserror= True;
- }
- if (vertex->id >= qh vertex_id) {
- fprintf (qh ferr, "qhull internal error (qh_checkvertex): unknown vertex id %d\n", vertex->id);
- waserror= True;
- }
- if (!waserror && !vertex->deleted) {
- if (qh_setsize (vertex->neighbors)) {
- FOREACHneighbor_(vertex) {
- if (!qh_setin (neighbor->vertices, vertex)) {
- fprintf (qh ferr, "qhull internal error (qh_checkvertex): neighbor f%d does not contain v%d\n", neighbor->id, vertex->id);
- errfacet= neighbor;
- waserror= True;
- }
- }
- }
- }
- if (waserror) {
- qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
- qh_errexit (qh_ERRqhull, errfacet, NULL);
- }
-} /* checkvertex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="clearcenters">-</a>
-
- qh_clearcenters( type )
- clear old data from facet->center
-
- notes:
- sets new centertype
- nop if CENTERtype is the same
-*/
-void qh_clearcenters (qh_CENTER type) {
- facetT *facet;
-
- if (qh CENTERtype != type) {
- FORALLfacets {
- if (qh CENTERtype == qh_ASvoronoi){
- if (facet->center) {
- qh_memfree (facet->center, qh center_size);
- facet->center= NULL;
- }
- }else /* qh CENTERtype == qh_AScentrum */ {
- if (facet->center) {
- qh_memfree (facet->center, qh normal_size);
- facet->center= NULL;
- }
- }
- }
- qh CENTERtype= type;
- }
- trace2((qh ferr, "qh_clearcenters: switched to center type %d\n", type));
-} /* clearcenters */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="createsimplex">-</a>
-
- qh_createsimplex( vertices )
- creates a simplex from a set of vertices
-
- returns:
- initializes qh.facet_list to the simplex
- initializes qh.newfacet_list, .facet_tail
- initializes qh.vertex_list, .newvertex_list, .vertex_tail
-
- design:
- initializes lists
- for each vertex
- create a new facet
- for each new facet
- create its neighbor set
-*/
-void qh_createsimplex(setT *vertices) {
- facetT *facet= NULL, *newfacet;
- boolT toporient= True;
- int vertex_i, vertex_n, nth;
- setT *newfacets= qh_settemp (qh hull_dim+1);
- vertexT *vertex;
-
- qh facet_list= qh newfacet_list= qh facet_tail= qh_newfacet();
- qh num_facets= qh num_vertices= qh num_visible= 0;
- qh vertex_list= qh newvertex_list= qh vertex_tail= qh_newvertex(NULL);
- FOREACHvertex_i_(vertices) {
- newfacet= qh_newfacet();
- newfacet->vertices= qh_setnew_delnthsorted (vertices, vertex_n,
- vertex_i, 0);
- newfacet->toporient= toporient;
- qh_appendfacet(newfacet);
- newfacet->newfacet= True;
- qh_appendvertex (vertex);
- qh_setappend (&newfacets, newfacet);
- toporient ^= True;
- }
- FORALLnew_facets {
- nth= 0;
- FORALLfacet_(qh newfacet_list) {
- if (facet != newfacet)
- SETelem_(newfacet->neighbors, nth++)= facet;
- }
- qh_settruncate (newfacet->neighbors, qh hull_dim);
- }
- qh_settempfree (&newfacets);
- trace1((qh ferr, "qh_createsimplex: created simplex\n"));
-} /* createsimplex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="delridge">-</a>
-
- qh_delridge( ridge )
- deletes ridge from data structures it belongs to
- frees up its memory
-
- notes:
- in merge.c, caller sets vertex->delridge for each vertex
- ridges also freed in qh_freeqhull
-*/
-void qh_delridge(ridgeT *ridge) {
- void **freelistp; /* used !qh_NOmem */
-
- qh_setdel(ridge->top->ridges, ridge);
- qh_setdel(ridge->bottom->ridges, ridge);
- qh_setfree(&(ridge->vertices));
- qh_memfree_(ridge, sizeof(ridgeT), freelistp);
-} /* delridge */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="delvertex">-</a>
-
- qh_delvertex( vertex )
- deletes a vertex and frees its memory
-
- notes:
- assumes vertex->adjacencies have been updated if needed
- unlinks from vertex_list
-*/
-void qh_delvertex (vertexT *vertex) {
-
- if (vertex == qh tracevertex)
- qh tracevertex= NULL;
- qh_removevertex (vertex);
- qh_setfree (&vertex->neighbors);
- qh_memfree(vertex, sizeof(vertexT));
-} /* delvertex */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="facet3vertex">-</a>
-
- qh_facet3vertex( )
- return temporary set of 3-d vertices in qh_ORIENTclock order
-
- design:
- if simplicial facet
- build set from facet->vertices with facet->toporient
- else
- for each ridge in order
- build set from ridge's vertices
-*/
-setT *qh_facet3vertex (facetT *facet) {
- ridgeT *ridge, *firstridge;
- vertexT *vertex;
- int cntvertices, cntprojected=0;
- setT *vertices;
-
- cntvertices= qh_setsize(facet->vertices);
- vertices= qh_settemp (cntvertices);
- if (facet->simplicial) {
- if (cntvertices != 3) {
- fprintf (qh ferr, "qhull internal error (qh_facet3vertex): only %d vertices for simplicial facet f%d\n",
- cntvertices, facet->id);
- qh_errexit(qh_ERRqhull, facet, NULL);
- }
- qh_setappend (&vertices, SETfirst_(facet->vertices));
- if (facet->toporient ^ qh_ORIENTclock)
- qh_setappend (&vertices, SETsecond_(facet->vertices));
- else
- qh_setaddnth (&vertices, 0, SETsecond_(facet->vertices));
- qh_setappend (&vertices, SETelem_(facet->vertices, 2));
- }else {
- ridge= firstridge= SETfirstt_(facet->ridges, ridgeT); /* no infinite */
- while ((ridge= qh_nextridge3d (ridge, facet, &vertex))) {
- qh_setappend (&vertices, vertex);
- if (++cntprojected > cntvertices || ridge == firstridge)
- break;
- }
- if (!ridge || cntprojected != cntvertices) {
- fprintf (qh ferr, "qhull internal error (qh_facet3vertex): ridges for facet %d don't match up. got at least %d\n",
- facet->id, cntprojected);
- qh_errexit(qh_ERRqhull, facet, ridge);
- }
- }
- return vertices;
-} /* facet3vertex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="findbestfacet">-</a>
-
- qh_findbestfacet( point, bestoutside, bestdist, isoutside )
- find facet that is furthest below a point
-
- for Delaunay triangulations,
- Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
- Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates.
-
- returns:
- if bestoutside is set (e.g., qh_ALL)
- returns best facet that is not upperdelaunay
- if Delaunay and inside, point is outside circumsphere of bestfacet
- else
- returns first facet below point
- if point is inside, returns nearest, !upperdelaunay facet
- distance to facet
- isoutside set if outside of facet
-
- notes:
- this works for all distributions
- if inside, qh_findbestfacet performs an exhaustive search
- this may be too conservative. Sometimes it is clearly required.
- qh_findbestfacet is not used by qhull.
- uses qh.visit_id and qh.coplanarset
-
- see:
- <a href="geom.c#findbest">qh_findbest</a>
-*/
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
- realT *bestdist, boolT *isoutside) {
- facetT *bestfacet= NULL;
- int numpart, totpart= 0;
-
- bestfacet= qh_findbest (point, qh facet_list,
- bestoutside, !qh_ISnewfacets, bestoutside /* qh_NOupper */,
- bestdist, isoutside, &totpart);
- if (*bestdist < -qh DISTround) {
- bestfacet= qh_findfacet_all (point, bestdist, isoutside, &numpart);
- totpart += numpart;
- if ((isoutside && bestoutside)
- || (!isoutside && bestfacet->upperdelaunay)) {
- bestfacet= qh_findbest (point, bestfacet,
- bestoutside, False, bestoutside,
- bestdist, isoutside, &totpart);
- totpart += numpart;
- }
- }
- trace3((qh ferr, "qh_findbestfacet: f%d dist %2.2g isoutside %d totpart %d\n",
- bestfacet->id, *bestdist, *isoutside, totpart));
- return bestfacet;
-} /* findbestfacet */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="findfacet_all">-</a>
-
- qh_findfacet_all( point, bestdist, isoutside, numpart )
- exhaustive search for facet below a point
-
- for Delaunay triangulations,
- Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
- Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates.
-
- returns:
- returns first facet below point
- if point is inside,
- returns nearest facet
- distance to facet
- isoutside if point is outside of the hull
- number of distance tests
-*/
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
- int *numpart) {
- facetT *bestfacet= NULL, *facet;
- realT dist;
- int totpart= 0;
-
- *bestdist= REALmin;
- *isoutside= False;
- FORALLfacets {
- if (facet->flipped || !facet->normal)
- continue;
- totpart++;
- qh_distplane (point, facet, &dist);
- if (dist > *bestdist) {
- *bestdist= dist;
- bestfacet= facet;
- if (dist > qh MINoutside) {
- *isoutside= True;
- break;
- }
- }
- }
- *numpart= totpart;
- trace3((qh ferr, "qh_findfacet_all: f%d dist %2.2g isoutside %d totpart %d\n",
- getid_(bestfacet), *bestdist, *isoutside, totpart));
- return bestfacet;
-} /* findfacet_all */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="findgood">-</a>
-
- qh_findgood( facetlist, goodhorizon )
- identify good facets for qh.PRINTgood
- if qh.GOODvertex>0
- facet includes point as vertex
- if !match, returns goodhorizon
- inactive if qh.MERGING
- if qh.GOODpoint
- facet is visible or coplanar (>0) or not visible (<0)
- if qh.GOODthreshold
- facet->normal matches threshold
- if !goodhorizon and !match,
- selects facet with closest angle
- sets GOODclosest
-
- returns:
- number of new, good facets found
- determines facet->good
- may update qh.GOODclosest
-
- notes:
- qh_findgood_all further reduces the good region
-
- design:
- count good facets
- mark good facets for qh.GOODpoint
- mark good facets for qh.GOODthreshold
- if necessary
- update qh.GOODclosest
-*/
-int qh_findgood (facetT *facetlist, int goodhorizon) {
- facetT *facet, *bestfacet= NULL;
- realT angle, bestangle= REALmax, dist;
- int numgood=0;
-
- FORALLfacet_(facetlist) {
- if (facet->good)
- numgood++;
- }
- if (qh GOODvertex>0 && !qh MERGING) {
- FORALLfacet_(facetlist) {
- if (!qh_isvertex (qh GOODvertexp, facet->vertices)) {
- facet->good= False;
- numgood--;
- }
- }
- }
- if (qh GOODpoint && numgood) {
- FORALLfacet_(facetlist) {
- if (facet->good && facet->normal) {
- zinc_(Zdistgood);
- qh_distplane (qh GOODpointp, facet, &dist);
- if ((qh GOODpoint > 0) ^ (dist > 0.0)) {
- facet->good= False;
- numgood--;
- }
- }
- }
- }
- if (qh GOODthreshold && (numgood || goodhorizon || qh GOODclosest)) {
- FORALLfacet_(facetlist) {
- if (facet->good && facet->normal) {
- if (!qh_inthresholds (facet->normal, &angle)) {
- facet->good= False;
- numgood--;
- if (angle < bestangle) {
- bestangle= angle;
- bestfacet= facet;
- }
- }
- }
- }
- if (!numgood && (!goodhorizon || qh GOODclosest)) {
- if (qh GOODclosest) {
- if (qh GOODclosest->visible)
- qh GOODclosest= NULL;
- else {
- qh_inthresholds (qh GOODclosest->normal, &angle);
- if (angle < bestangle)
- bestfacet= qh GOODclosest;
- }
- }
- if (bestfacet && bestfacet != qh GOODclosest) {
- if (qh GOODclosest)
- qh GOODclosest->good= False;
- qh GOODclosest= bestfacet;
- bestfacet->good= True;
- numgood++;
- trace2((qh ferr, "qh_findgood: f%d is closest (%2.2g) to thresholds\n",
- bestfacet->id, bestangle));
- return numgood;
- }
- }else if (qh GOODclosest) { /* numgood > 0 */
- qh GOODclosest->good= False;
- qh GOODclosest= NULL;
- }
- }
- zadd_(Zgoodfacet, numgood);
- trace2((qh ferr, "qh_findgood: found %d good facets with %d good horizon\n",
- numgood, goodhorizon));
- if (!numgood && qh GOODvertex>0 && !qh MERGING)
- return goodhorizon;
- return numgood;
-} /* findgood */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="findgood_all">-</a>
-
- qh_findgood_all( facetlist )
- apply other constraints for good facets (used by qh.PRINTgood)
- if qh.GOODvertex
- facet includes (>0) or doesn't include (<0) point as vertex
- if last good facet and ONLYgood, prints warning and continues
- if qh.SPLITthresholds
- facet->normal matches threshold, or if none, the closest one
- calls qh_findgood
- nop if good not used
-
- returns:
- clears facet->good if not good
- sets qh.num_good
-
- notes:
- this is like qh_findgood but more restrictive
-
- design:
- uses qh_findgood to mark good facets
- marks facets for qh.GOODvertex
- marks facets for qh.SPLITthreholds
-*/
-void qh_findgood_all (facetT *facetlist) {
- facetT *facet, *bestfacet=NULL;
- realT angle, bestangle= REALmax;
- int numgood=0, startgood;
-
- if (!qh GOODvertex && !qh GOODthreshold && !qh GOODpoint
- && !qh SPLITthresholds)
- return;
- if (!qh ONLYgood)
- qh_findgood (qh facet_list, 0);
- FORALLfacet_(facetlist) {
- if (facet->good)
- numgood++;
- }
- if (qh GOODvertex <0 || (qh GOODvertex > 0 && qh MERGING)) {
- FORALLfacet_(facetlist) {
- if (facet->good && ((qh GOODvertex > 0) ^ !!qh_isvertex (qh GOODvertexp, facet->vertices))) {
- if (!--numgood) {
- if (qh ONLYgood) {
- fprintf (qh ferr, "qhull warning: good vertex p%d does not match last good facet f%d. Ignored.\n",
- qh_pointid(qh GOODvertexp), facet->id);
- return;
- }else if (qh GOODvertex > 0)
- fprintf (qh ferr, "qhull warning: point p%d is not a vertex ('QV%d').\n",
- qh GOODvertex-1, qh GOODvertex-1);
- else
- fprintf (qh ferr, "qhull warning: point p%d is a vertex for every facet ('QV-%d').\n",
- -qh GOODvertex - 1, -qh GOODvertex - 1);
- }
- facet->good= False;
- }
- }
- }
- startgood= numgood;
- if (qh SPLITthresholds) {
- FORALLfacet_(facetlist) {
- if (facet->good) {
- if (!qh_inthresholds (facet->normal, &angle)) {
- facet->good= False;
- numgood--;
- if (angle < bestangle) {
- bestangle= angle;
- bestfacet= facet;
- }
- }
- }
- }
- if (!numgood && bestfacet) {
- bestfacet->good= True;
- numgood++;
- trace0((qh ferr, "qh_findgood_all: f%d is closest (%2.2g) to thresholds\n",
- bestfacet->id, bestangle));
- return;
- }
- }
- qh num_good= numgood;
- trace0((qh ferr, "qh_findgood_all: %d good facets remain out of %d facets\n",
- numgood, startgood));
-} /* findgood_all */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="furthestnext">-</a>
-
- qh_furthestnext()
- set qh.facet_next to facet with furthest of all furthest points
- searches all facets on qh.facet_list
-
- notes:
- this may help avoid precision problems
-*/
-void qh_furthestnext (void /* qh facet_list */) {
- facetT *facet, *bestfacet= NULL;
- realT dist, bestdist= -REALmax;
-
- FORALLfacets {
- if (facet->outsideset) {
-#if qh_COMPUTEfurthest
- pointT *furthest;
- furthest= (pointT*)qh_setlast (facet->outsideset);
- zinc_(Zcomputefurthest);
- qh_distplane (furthest, facet, &dist);
-#else
- dist= facet->furthestdist;
-#endif
- if (dist > bestdist) {
- bestfacet= facet;
- bestdist= dist;
- }
- }
- }
- if (bestfacet) {
- qh_removefacet (bestfacet);
- qh_prependfacet (bestfacet, &qh facet_next);
- trace1((qh ferr, "qh_furthestnext: made f%d next facet (dist %.2g)\n",
- bestfacet->id, bestdist));
- }
-} /* furthestnext */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="furthestout">-</a>
-
- qh_furthestout( facet )
- make furthest outside point the last point of outsideset
-
- returns:
- updates facet->outsideset
- clears facet->notfurthest
- sets facet->furthestdist
-
- design:
- determine best point of outsideset
- make it the last point of outsideset
-*/
-void qh_furthestout (facetT *facet) {
- pointT *point, **pointp, *bestpoint= NULL;
- realT dist, bestdist= -REALmax;
-
- FOREACHpoint_(facet->outsideset) {
- qh_distplane (point, facet, &dist);
- zinc_(Zcomputefurthest);
- if (dist > bestdist) {
- bestpoint= point;
- bestdist= dist;
- }
- }
- if (bestpoint) {
- qh_setdel (facet->outsideset, point);
- qh_setappend (&facet->outsideset, point);
-#if !qh_COMPUTEfurthest
- facet->furthestdist= bestdist;
-#endif
- }
- facet->notfurthest= False;
- trace3((qh ferr, "qh_furthestout: p%d is furthest outside point of f%d\n",
- qh_pointid (point), facet->id));
-} /* furthestout */
-
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="infiniteloop">-</a>
-
- qh_infiniteloop( facet )
- report infinite loop error due to facet
-*/
-void qh_infiniteloop (facetT *facet) {
-
- fprintf (qh ferr, "qhull internal error (qh_infiniteloop): potential infinite loop detected\n");
- qh_errexit (qh_ERRqhull, facet, NULL);
-} /* qh_infiniteloop */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="initbuild">-</a>
-
- qh_initbuild()
- initialize hull and outside sets with point array
- qh.FIRSTpoint/qh.NUMpoints is point array
- if qh.GOODpoint
- adds qh.GOODpoint to initial hull
-
- returns:
- qh_facetlist with initial hull
- points partioned into outside sets, coplanar sets, or inside
- initializes qh.GOODpointp, qh.GOODvertexp,
-
- design:
- initialize global variables used during qh_buildhull
- determine precision constants and points with max/min coordinate values
- if qh.SCALElast, scale last coordinate (for 'd')
- build initial simplex
- partition input points into facets of initial simplex
- set up lists
- if qh.ONLYgood
- check consistency
- add qh.GOODvertex if defined
-*/
-void qh_initbuild( void) {
- setT *maxpoints, *vertices;
- facetT *facet;
- int i, numpart;
- realT dist;
- boolT isoutside;
-
- qh furthest_id= -1;
- qh lastreport= 0;
- qh facet_id= qh vertex_id= qh ridge_id= 0;
- qh visit_id= qh vertex_visit= 0;
- qh maxoutdone= False;
-
- if (qh GOODpoint > 0)
- qh GOODpointp= qh_point (qh GOODpoint-1);
- else if (qh GOODpoint < 0)
- qh GOODpointp= qh_point (-qh GOODpoint-1);
- if (qh GOODvertex > 0)
- qh GOODvertexp= qh_point (qh GOODvertex-1);
- else if (qh GOODvertex < 0)
- qh GOODvertexp= qh_point (-qh GOODvertex-1);
- if ((qh GOODpoint
- && (qh GOODpointp < qh first_point /* also catches !GOODpointp */
- || qh GOODpointp > qh_point (qh num_points-1)))
- || (qh GOODvertex
- && (qh GOODvertexp < qh first_point /* also catches !GOODvertexp */
- || qh GOODvertexp > qh_point (qh num_points-1)))) {
- fprintf (qh ferr, "qhull input error: either QGn or QVn point is > p%d\n",
- qh num_points-1);
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- maxpoints= qh_maxmin(qh first_point, qh num_points, qh hull_dim);
- if (qh SCALElast)
- qh_scalelast (qh first_point, qh num_points, qh hull_dim,
- qh MINlastcoord, qh MAXlastcoord, qh MAXwidth);
- qh_detroundoff();
- if (qh DELAUNAY && qh upper_threshold[qh hull_dim-1] > REALmax/2
- && qh lower_threshold[qh hull_dim-1] < -REALmax/2) {
- for (i= qh_PRINTEND; i--; ) {
- if (qh PRINTout[i] == qh_PRINTgeom && qh DROPdim < 0
- && !qh GOODthreshold && !qh SPLITthresholds)
- break; /* in this case, don't set upper_threshold */
- }
- if (i < 0) {
- if (qh UPPERdelaunay) { /* matches qh.upperdelaunay in qh_setfacetplane */
- qh lower_threshold[qh hull_dim-1]= qh ANGLEround * qh_ZEROdelaunay;
- qh GOODthreshold= True;
- }else {
- qh upper_threshold[qh hull_dim-1]= -qh ANGLEround * qh_ZEROdelaunay;
- if (!qh GOODthreshold)
- qh SPLITthresholds= True; /* build upper-convex hull even if Qg */
- /* qh_initqhull_globals errors if Qg without Pdk/etc. */
- }
- }
- }
- vertices= qh_initialvertices(qh hull_dim, maxpoints, qh first_point, qh num_points);
- qh_initialhull (vertices); /* initial qh facet_list */
- qh_partitionall (vertices, qh first_point, qh num_points);
- if (qh PRINToptions1st || qh TRACElevel || qh IStracing) {
- if (qh TRACElevel || qh IStracing)
- fprintf (qh ferr, "\nTrace level %d for %s | %s\n",
- qh IStracing ? qh IStracing : qh TRACElevel, qh rbox_command, qh qhull_command);
- fprintf (qh ferr, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
- }
- qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
- qh facet_next= qh facet_list;
- qh_furthestnext (/* qh facet_list */);
- if (qh PREmerge) {
- qh cos_max= qh premerge_cos;
- qh centrum_radius= qh premerge_centrum;
- }
- if (qh ONLYgood) {
- if (qh GOODvertex > 0 && qh MERGING) {
- fprintf (qh ferr, "qhull input error: 'Qg QVn' (only good vertex) does not work with merging.\nUse 'QJ' to joggle the input or 'Q0' to turn off merging.\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (!(qh GOODthreshold || qh GOODpoint
- || (!qh MERGEexact && !qh PREmerge && qh GOODvertexp))) {
- fprintf (qh ferr, "qhull input error: 'Qg' (ONLYgood) needs a good threshold ('Pd0D0'), a\n\
-good point (QGn or QG-n), or a good vertex with 'QJ' or 'Q0' (QVn).\n");
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (qh GOODvertex > 0 && !qh MERGING /* matches qh_partitionall */
- && !qh_isvertex (qh GOODvertexp, vertices)) {
- facet= qh_findbestnew (qh GOODvertexp, qh facet_list,
- &dist, !qh_ALL, &isoutside, &numpart);
- zadd_(Zdistgood, numpart);
- if (!isoutside) {
- fprintf (qh ferr, "qhull input error: point for QV%d is inside initial simplex. It can not be made a vertex.\n",
- qh_pointid(qh GOODvertexp));
- qh_errexit (qh_ERRinput, NULL, NULL);
- }
- if (!qh_addpoint (qh GOODvertexp, facet, False)) {
- qh_settempfree(&vertices);
- qh_settempfree(&maxpoints);
- return;
- }
- }
- qh_findgood (qh facet_list, 0);
- }
- qh_settempfree(&vertices);
- qh_settempfree(&maxpoints);
- trace1((qh ferr, "qh_initbuild: initial hull created and points partitioned\n"));
-} /* initbuild */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="initialhull">-</a>
-
- qh_initialhull( vertices )
- constructs the initial hull as a DIM3 simplex of vertices
-
- design:
- creates a simplex (initializes lists)
- determines orientation of simplex
- sets hyperplanes for facets
- doubles checks orientation (in case of axis-parallel facets with Gaussian elimination)
- checks for flipped facets and qh.NARROWhull
- checks the result
-*/
-void qh_initialhull(setT *vertices) {
- facetT *facet, *firstfacet, *neighbor, **neighborp;
- realT dist, angle, minangle= REALmax;
-#ifndef qh_NOtrace
- int k;
-#endif
-
- qh_createsimplex(vertices); /* qh facet_list */
- qh_resetlists (False, qh_RESETvisible);
- qh facet_next= qh facet_list; /* advance facet when processed */
- qh interior_point= qh_getcenter(vertices);
- firstfacet= qh facet_list;
- qh_setfacetplane(firstfacet);
- zinc_(Znumvisibility); /* needs to be in printsummary */
- qh_distplane(qh interior_point, firstfacet, &dist);
- if (dist > 0) {
- FORALLfacets
- facet->toporient ^= True;
- }
- FORALLfacets
- qh_setfacetplane(facet);
- FORALLfacets {
- if (!qh_checkflipped (facet, NULL, qh_ALL)) {/* due to axis-parallel facet */
- trace1((qh ferr, "qh_initialhull: initial orientation incorrect. Correct all facets\n"));
- facet->flipped= False;
- FORALLfacets {
- facet->toporient ^= True;
- qh_orientoutside (facet);
- }
- break;
- }
- }
- FORALLfacets {
- if (!qh_checkflipped (facet, NULL, !qh_ALL)) { /* can happen with 'R0.1' */
- qh_precision ("initial facet is coplanar with interior point");
- fprintf (qh ferr, "qhull precision error: initial facet %d is coplanar with the interior point\n",
- facet->id);
- qh_errexit (qh_ERRsingular, facet, NULL);
- }
- FOREACHneighbor_(facet) {
- angle= qh_getangle (facet->normal, neighbor->normal);
- minimize_( minangle, angle);
- }
- }
- if (minangle < qh_MAXnarrow && !qh NOnarrow) {
- realT diff= 1.0 + minangle;
-
- qh NARROWhull= True;
- qh_option ("_narrow-hull", NULL, &diff);
- if (minangle < qh_WARNnarrow && !qh RERUN && qh PRINTprecision)
- fprintf (qh ferr, "qhull precision warning: \n\
-The initial hull is narrow (cosine of min. angle is %.16f).\n\
-A coplanar point may lead to a wide facet. Options 'QbB' (scale to unit box)\n\
-or 'Qbb' (scale last coordinate) may remove this warning. Use 'Pp' to skip\n\
-this warning. See 'Limitations' in qh-impre.htm.\n",
- -minangle); /* convert from angle between normals to angle between facets */
- }
- zzval_(Zprocessed)= qh hull_dim+1;
- qh_checkpolygon (qh facet_list);
- qh_checkconvex(qh facet_list, qh_DATAfault);
-#ifndef qh_NOtrace
- if (qh IStracing >= 1) {
- fprintf(qh ferr, "qh_initialhull: simplex constructed, interior point:");
- for (k=0; k < qh hull_dim; k++)
- fprintf (qh ferr, " %6.4g", qh interior_point[k]);
- fprintf (qh ferr, "\n");
- }
-#endif
-} /* initialhull */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="initialvertices">-</a>
-
- qh_initialvertices( dim, maxpoints, points, numpoints )
- determines a non-singular set of initial vertices
- maxpoints may include duplicate points
-
- returns:
- temporary set of dim+1 vertices in descending order by vertex id
- if qh.RANDOMoutside && !qh.ALLpoints
- picks random points
- if dim >= qh_INITIALmax,
- uses min/max x and max points with non-zero determinants
-
- notes:
- unless qh.ALLpoints,
- uses maxpoints as long as determinate is non-zero
-*/
-setT *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints) {
- pointT *point, **pointp;
- setT *vertices, *simplex, *tested;
- realT randr;
- int index, point_i, point_n, k;
- boolT nearzero= False;
-
- vertices= qh_settemp (dim + 1);
- simplex= qh_settemp (dim+1);
- if (qh ALLpoints)
- qh_maxsimplex (dim, NULL, points, numpoints, &simplex);
- else if (qh RANDOMoutside) {
- while (qh_setsize (simplex) != dim+1) {
- randr= qh_RANDOMint;
- randr= randr/(qh_RANDOMmax+1);
- index= (int)floor(qh num_points * randr);
- while (qh_setin (simplex, qh_point (index))) {
- index++; /* in case qh_RANDOMint always returns the same value */
- index= index < qh num_points ? index : 0;
- }
- qh_setappend (&simplex, qh_point (index));
- }
- }else if (qh hull_dim >= qh_INITIALmax) {
- tested= qh_settemp (dim+1);
- qh_setappend (&simplex, SETfirst_(maxpoints)); /* max and min X coord */
- qh_setappend (&simplex, SETsecond_(maxpoints));
- qh_maxsimplex (fmin_(qh_INITIALsearch, dim), maxpoints, points, numpoints, &simplex);
- k= qh_setsize (simplex);
- FOREACHpoint_i_(maxpoints) {
- if (point_i & 0x1) { /* first pick up max. coord. points */
- if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
- qh_detsimplex(point, simplex, k, &nearzero);
- if (nearzero)
- qh_setappend (&tested, point);
- else {
- qh_setappend (&simplex, point);
- if (++k == dim) /* use search for last point */
- break;
- }
- }
- }
- }
- while (k != dim && (point= (pointT*)qh_setdellast (maxpoints))) {
- if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
- qh_detsimplex (point, simplex, k, &nearzero);
- if (nearzero)
- qh_setappend (&tested, point);
- else {
- qh_setappend (&simplex, point);
- k++;
- }
- }
- }
- index= 0;
- while (k != dim && (point= qh_point (index++))) {
- if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
- qh_detsimplex (point, simplex, k, &nearzero);
- if (!nearzero){
- qh_setappend (&simplex, point);
- k++;
- }
- }
- }
- qh_settempfree (&tested);
- qh_maxsimplex (dim, maxpoints, points, numpoints, &simplex);
- }else
- qh_maxsimplex (dim, maxpoints, points, numpoints, &simplex);
- FOREACHpoint_(simplex)
- qh_setaddnth (&vertices, 0, qh_newvertex(point)); /* descending order */
- qh_settempfree (&simplex);
- return vertices;
-} /* initialvertices */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="isvertex">-</a>
-
- qh_isvertex( )
- returns vertex if point is in vertex set, else returns NULL
-
- notes:
- for qh.GOODvertex
-*/
-vertexT *qh_isvertex (pointT *point, setT *vertices) {
- vertexT *vertex, **vertexp;
-
- FOREACHvertex_(vertices) {
- if (vertex->point == point)
- return vertex;
- }
- return NULL;
-} /* isvertex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="makenewfacets">-</a>
-
- qh_makenewfacets( point )
- make new facets from point and qh.visible_list
-
- returns:
- qh.newfacet_list= list of new facets with hyperplanes and ->newfacet
- qh.newvertex_list= list of vertices in new facets with ->newlist set
-
- if (qh.ONLYgood)
- newfacets reference horizon facets, but not vice versa
- ridges reference non-simplicial horizon ridges, but not vice versa
- does not change existing facets
- else
- sets qh.NEWfacets
- new facets attached to horizon facets and ridges
- for visible facets,
- visible->r.replace is corresponding new facet
-
- see also:
- qh_makenewplanes() -- make hyperplanes for facets
- qh_attachnewfacets() -- attachnewfacets if not done here (qh ONLYgood)
- qh_matchnewfacets() -- match up neighbors
- qh_updatevertices() -- update vertex neighbors and delvertices
- qh_deletevisible() -- delete visible facets
- qh_checkpolygon() --check the result
- qh_triangulate() -- triangulate a non-simplicial facet
-
- design:
- for each visible facet
- make new facets to its horizon facets
- update its f.replace
- clear its neighbor set
-*/
-vertexT *qh_makenewfacets (pointT *point /*visible_list*/) {
- facetT *visible, *newfacet= NULL, *newfacet2= NULL, *neighbor, **neighborp;
- vertexT *apex;
- int numnew=0;
-
- qh newfacet_list= qh facet_tail;
- qh newvertex_list= qh vertex_tail;
- apex= qh_newvertex(point);
- qh_appendvertex (apex);
- qh visit_id++;
- if (!qh ONLYgood)
- qh NEWfacets= True;
- FORALLvisible_facets {
- FOREACHneighbor_(visible)
- neighbor->seen= False;
- if (visible->ridges) {
- visible->visitid= qh visit_id;
- newfacet2= qh_makenew_nonsimplicial (visible, apex, &numnew);
- }
- if (visible->simplicial)
- newfacet= qh_makenew_simplicial (visible, apex, &numnew);
- if (!qh ONLYgood) {
- if (newfacet2) /* newfacet is null if all ridges defined */
- newfacet= newfacet2;
- if (newfacet)
- visible->f.replace= newfacet;
- else
- zinc_(Zinsidevisible);
- SETfirst_(visible->neighbors)= NULL;
- }
- }
- trace1((qh ferr, "qh_makenewfacets: created %d new facets from point p%d to horizon\n",
- numnew, qh_pointid(point)));
- if (qh IStracing >= 4)
- qh_printfacetlist (qh newfacet_list, NULL, qh_ALL);
- return apex;
-} /* makenewfacets */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="matchduplicates">-</a>
-
- qh_matchduplicates( atfacet, atskip, hashsize, hashcount )
- match duplicate ridges in qh.hash_table for atfacet/atskip
- duplicates marked with ->dupridge and qh_DUPLICATEridge
-
- returns:
- picks match with worst merge (min distance apart)
- updates hashcount
-
- see also:
- qh_matchneighbor
-
- notes:
-
- design:
- compute hash value for atfacet and atskip
- repeat twice -- once to make best matches, once to match the rest
- for each possible facet in qh.hash_table
- if it is a matching facet and pass 2
- make match
- unless tricoplanar, mark match for merging (qh_MERGEridge)
- [e.g., tricoplanar RBOX s 1000 t993602376 | QHULL C-1e-3 d Qbb FA Qt]
- if it is a matching facet and pass 1
- test if this is a better match
- if pass 1,
- make best match (it will not be merged)
-*/
-#ifndef qh_NOmerge
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount) {
- boolT same, ismatch;
- int hash, scan;
- facetT *facet, *newfacet, *maxmatch= NULL, *maxmatch2= NULL, *nextfacet;
- int skip, newskip, nextskip= 0, maxskip= 0, maxskip2= 0, makematch;
- realT maxdist= -REALmax, mindist, dist2, low, high;
-
- hash= (int)qh_gethash (hashsize, atfacet->vertices, qh hull_dim, 1,
- SETelem_(atfacet->vertices, atskip));
- trace2((qh ferr, "qh_matchduplicates: find duplicate matches for f%d skip %d hash %d hashcount %d\n",
- atfacet->id, atskip, hash, *hashcount));
- for (makematch= 0; makematch < 2; makematch++) {
- qh visit_id++;
- for (newfacet= atfacet, newskip= atskip; newfacet; newfacet= nextfacet, newskip= nextskip) {
- zinc_(Zhashlookup);
- nextfacet= NULL;
- newfacet->visitid= qh visit_id;
- for (scan= hash; (facet= SETelemt_(qh hash_table, scan, facetT));
- scan= (++scan >= hashsize ? 0 : scan)) {
- if (!facet->dupridge || facet->visitid == qh visit_id)
- continue;
- zinc_(Zhashtests);
- if (qh_matchvertices (1, newfacet->vertices, newskip, facet->vertices, &skip, &same)) {
- ismatch= (same == (newfacet->toporient ^ facet->toporient));
- if (SETelemt_(facet->neighbors, skip, facetT) != qh_DUPLICATEridge) {
- if (!makematch) {
- fprintf (qh ferr, "qhull internal error (qh_matchduplicates): missing dupridge at f%d skip %d for new f%d skip %d hash %d\n",
- facet->id, skip, newfacet->id, newskip, hash);
- qh_errexit2 (qh_ERRqhull, facet, newfacet);
- }
- }else if (ismatch && makematch) {
- if (SETelemt_(newfacet->neighbors, newskip, facetT) == qh_DUPLICATEridge) {
- SETelem_(facet->neighbors, skip)= newfacet;
- if (newfacet->tricoplanar)
- SETelem_(newfacet->neighbors, newskip)= facet;
- else
- SETelem_(newfacet->neighbors, newskip)= qh_MERGEridge;
- *hashcount -= 2; /* removed two unmatched facets */
- trace4((qh ferr, "qh_matchduplicates: duplicate f%d skip %d matched with new f%d skip %d merge\n",
- facet->id, skip, newfacet->id, newskip));
- }
- }else if (ismatch) {
- mindist= qh_getdistance (facet, newfacet, &low, &high);
- dist2= qh_getdistance (newfacet, facet, &low, &high);
- minimize_(mindist, dist2);
- if (mindist > maxdist) {
- maxdist= mindist;
- maxmatch= facet;
- maxskip= skip;
- maxmatch2= newfacet;
- maxskip2= newskip;
- }
- trace3((qh ferr, "qh_matchduplicates: duplicate f%d skip %d new f%d skip %d at dist %2.2g, max is now f%d f%d\n",
- facet->id, skip, newfacet->id, newskip, mindist,
- maxmatch->id, maxmatch2->id));
- }else { /* !ismatch */
- nextfacet= facet;
- nextskip= skip;
- }
- }
- if (makematch && !facet
- && SETelemt_(facet->neighbors, skip, facetT) == qh_DUPLICATEridge) {
- fprintf (qh ferr, "qhull internal error (qh_matchduplicates): no MERGEridge match for duplicate f%d skip %d at hash %d\n",
- newfacet->id, newskip, hash);
- qh_errexit (qh_ERRqhull, newfacet, NULL);
- }
- }
- } /* end of for each new facet at hash */
- if (!makematch) {
- if (!maxmatch) {
- fprintf (qh ferr, "qhull internal error (qh_matchduplicates): no maximum match at duplicate f%d skip %d at hash %d\n",
- atfacet->id, atskip, hash);
- qh_errexit (qh_ERRqhull, atfacet, NULL);
- }
- SETelem_(maxmatch->neighbors, maxskip)= maxmatch2;
- SETelem_(maxmatch2->neighbors, maxskip2)= maxmatch;
- *hashcount -= 2; /* removed two unmatched facets */
- zzinc_(Zmultiridge);
- trace0((qh ferr, "qh_matchduplicates: duplicate f%d skip %d matched with new f%d skip %d keep\n",
- maxmatch->id, maxskip, maxmatch2->id, maxskip2));
- qh_precision ("ridge with multiple neighbors");
- if (qh IStracing >= 4)
- qh_errprint ("DUPLICATED/MATCH", maxmatch, maxmatch2, NULL, NULL);
- }
- }
-} /* matchduplicates */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="nearcoplanar">-</a>
-
- qh_nearcoplanar()
- for all facets, remove near-inside points from facet->coplanarset</li>
- coplanar points defined by innerplane from qh_outerinner()
-
- returns:
- if qh KEEPcoplanar && !qh KEEPinside
- facet->coplanarset only contains coplanar points
- if qh.JOGGLEmax
- drops inner plane by another qh.JOGGLEmax diagonal since a
- vertex could shift out while a coplanar point shifts in
-
- notes:
- used for qh.PREmerge and qh.JOGGLEmax
- must agree with computation of qh.NEARcoplanar in qh_detroundoff()
- design:
- if not keeping coplanar or inside points
- free all coplanar sets
- else if not keeping both coplanar and inside points
- remove !coplanar or !inside points from coplanar sets
-*/
-void qh_nearcoplanar ( void /* qh.facet_list */) {
- facetT *facet;
- pointT *point, **pointp;
- int numpart;
- realT dist, innerplane;
-
- if (!qh KEEPcoplanar && !qh KEEPinside) {
- FORALLfacets {
- if (facet->coplanarset)
- qh_setfree( &facet->coplanarset);
- }
- }else if (!qh KEEPcoplanar || !qh KEEPinside) {
- qh_outerinner (NULL, NULL, &innerplane);
- if (qh JOGGLEmax < REALmax/2)
- innerplane -= qh JOGGLEmax * sqrt (qh hull_dim);
- numpart= 0;
- FORALLfacets {
- if (facet->coplanarset) {
- FOREACHpoint_(facet->coplanarset) {
- numpart++;
- qh_distplane (point, facet, &dist);
- if (dist < innerplane) {
- if (!qh KEEPinside)
- SETref_(point)= NULL;
- }else if (!qh KEEPcoplanar)
- SETref_(point)= NULL;
- }
- qh_setcompact (facet->coplanarset);
- }
- }
- zzadd_(Zcheckpart, numpart);
- }
-} /* nearcoplanar */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="nearvertex">-</a>
-
- qh_nearvertex( facet, point, bestdist )
- return nearest vertex in facet to point
-
- returns:
- vertex and its distance
-
- notes:
- if qh.DELAUNAY
- distance is measured in the input set
- searches neighboring tricoplanar facets (requires vertexneighbors)
- Slow implementation. Recomputes vertex set for each point.
- The vertex set could be stored in the qh.keepcentrum facet.
-*/
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp) {
- realT bestdist= REALmax, dist;
- vertexT *bestvertex= NULL, *vertex, **vertexp, *apex;
- coordT *center;
- facetT *neighbor, **neighborp;
- setT *vertices;
- int dim= qh hull_dim;
-
- if (qh DELAUNAY)
- dim--;
- if (facet->tricoplanar) {
- if (!qh VERTEXneighbors || !facet->center) {
- fprintf(qh ferr, "qhull internal error (qh_nearvertex): qh.VERTEXneighbors and facet->center required for tricoplanar facets\n");
- qh_errexit(qh_ERRqhull, NULL, NULL);
- }
- vertices= qh_settemp (qh TEMPsize);
- apex= SETfirst_(facet->vertices);
- center= facet->center;
- FOREACHneighbor_(apex) {
- if (neighbor->center == center) {
- FOREACHvertex_(neighbor->vertices)
- qh_setappend(&vertices, vertex);
- }
- }
- }else
- vertices= facet->vertices;
- FOREACHvertex_(vertices) {
- dist= qh_pointdist (vertex->point, point, -dim);
- if (dist < bestdist) {
- bestdist= dist;
- bestvertex= vertex;
- }
- }
- if (facet->tricoplanar)
- qh_settempfree (&vertices);
- *bestdistp= sqrt (bestdist);
- return bestvertex;
-} /* nearvertex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="newhashtable">-</a>
-
- qh_newhashtable( newsize )
- returns size of qh.hash_table of at least newsize slots
-
- notes:
- assumes qh.hash_table is NULL
- qh_HASHfactor determines the number of extra slots
- size is not divisible by 2, 3, or 5
-*/
-int qh_newhashtable(int newsize) {
- int size;
-
- size= ((newsize+1)*qh_HASHfactor) | 0x1; /* odd number */
- while (True) {
- if ((size%3) && (size%5))
- break;
- size += 2;
- /* loop terminates because there is an infinite number of primes */
- }
- qh hash_table= qh_setnew (size);
- qh_setzero (qh hash_table, 0, size);
- return size;
-} /* newhashtable */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="newvertex">-</a>
-
- qh_newvertex( point )
- returns a new vertex for point
-*/
-vertexT *qh_newvertex(pointT *point) {
- vertexT *vertex;
-
- zinc_(Ztotvertices);
- vertex= (vertexT *)qh_memalloc(sizeof(vertexT));
- memset ((char *) vertex, 0, sizeof (vertexT));
- if (qh vertex_id == 0xFFFFFF) {
- fprintf(qh ferr, "qhull input error: more than %d vertices. ID field overflows and two vertices\n\
-may have the same identifier. Vertices not sorted correctly.\n", 0xFFFFFF);
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- if (qh vertex_id == qh tracevertex_id)
- qh tracevertex= vertex;
- vertex->id= qh vertex_id++;
- vertex->point= point;
- trace4((qh ferr, "qh_newvertex: vertex p%d (v%d) created\n", qh_pointid(vertex->point),
- vertex->id));
- return (vertex);
-} /* newvertex */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="nextridge3d">-</a>
-
- qh_nextridge3d( atridge, facet, vertex )
- return next ridge and vertex for a 3d facet
-
- notes:
- in qh_ORIENTclock order
- this is a O(n^2) implementation to trace all ridges
- be sure to stop on any 2nd visit
-
- design:
- for each ridge
- exit if it is the ridge after atridge
-*/
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp) {
- vertexT *atvertex, *vertex, *othervertex;
- ridgeT *ridge, **ridgep;
-
- if ((atridge->top == facet) ^ qh_ORIENTclock)
- atvertex= SETsecondt_(atridge->vertices, vertexT);
- else
- atvertex= SETfirstt_(atridge->vertices, vertexT);
- FOREACHridge_(facet->ridges) {
- if (ridge == atridge)
- continue;
- if ((ridge->top == facet) ^ qh_ORIENTclock) {
- othervertex= SETsecondt_(ridge->vertices, vertexT);
- vertex= SETfirstt_(ridge->vertices, vertexT);
- }else {
- vertex= SETsecondt_(ridge->vertices, vertexT);
- othervertex= SETfirstt_(ridge->vertices, vertexT);
- }
- if (vertex == atvertex) {
- if (vertexp)
- *vertexp= othervertex;
- return ridge;
- }
- }
- return NULL;
-} /* nextridge3d */
-#else /* qh_NOmerge */
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount) {
-}
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp) {
-
- return NULL;
-}
-#endif /* qh_NOmerge */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="outcoplanar">-</a>
-
- qh_outcoplanar()
- move points from all facets' outsidesets to their coplanarsets
-
- notes:
- for post-processing under qh.NARROWhull
-
- design:
- for each facet
- for each outside point for facet
- partition point into coplanar set
-*/
-void qh_outcoplanar (void /* facet_list */) {
- pointT *point, **pointp;
- facetT *facet;
- realT dist;
-
- trace1((qh ferr, "qh_outcoplanar: move outsideset to coplanarset for qh NARROWhull\n"));
- FORALLfacets {
- FOREACHpoint_(facet->outsideset) {
- qh num_outside--;
- if (qh KEEPcoplanar || qh KEEPnearinside) {
- qh_distplane (point, facet, &dist);
- zinc_(Zpartition);
- qh_partitioncoplanar (point, facet, &dist);
- }
- }
- qh_setfree (&facet->outsideset);
- }
-} /* outcoplanar */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="point">-</a>
-
- qh_point( id )
- return point for a point id, or NULL if unknown
-
- alternative code:
- return ((pointT *)((unsigned long)qh.first_point
- + (unsigned long)((id)*qh.normal_size)));
-*/
-pointT *qh_point (int id) {
-
- if (id < 0)
- return NULL;
- if (id < qh num_points)
- return qh first_point + id * qh hull_dim;
- id -= qh num_points;
- if (id < qh_setsize (qh other_points))
- return SETelemt_(qh other_points, id, pointT);
- return NULL;
-} /* point */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="point_add">-</a>
-
- qh_point_add( set, point, elem )
- stores elem at set[point.id]
-
- returns:
- access function for qh_pointfacet and qh_pointvertex
-
- notes:
- checks point.id
-*/
-void qh_point_add (setT *set, pointT *point, void *elem) {
- int id, size;
-
- SETreturnsize_(set, size);
- if ((id= qh_pointid(point)) < 0)
- fprintf (qh ferr, "qhull internal warning (point_add): unknown point %p id %d\n",
- point, id);
- else if (id >= size) {
- fprintf (qh ferr, "qhull internal errror (point_add): point p%d is out of bounds (%d)\n",
- id, size);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }else
- SETelem_(set, id)= elem;
-} /* point_add */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="pointfacet">-</a>
-
- qh_pointfacet()
- return temporary set of facet for each point
- the set is indexed by point id
-
- notes:
- vertices assigned to one of the facets
- coplanarset assigned to the facet
- outside set assigned to the facet
- NULL if no facet for point (inside)
- includes qh.GOODpointp
-
- access:
- FOREACHfacet_i_(facets) { ... }
- SETelem_(facets, i)
-
- design:
- for each facet
- add each vertex
- add each coplanar point
- add each outside point
-*/
-setT *qh_pointfacet (void /*qh facet_list*/) {
- int numpoints= qh num_points + qh_setsize (qh other_points);
- setT *facets;
- facetT *facet;
- vertexT *vertex, **vertexp;
- pointT *point, **pointp;
-
- facets= qh_settemp (numpoints);
- qh_setzero (facets, 0, numpoints);
- qh vertex_visit++;
- FORALLfacets {
- FOREACHvertex_(facet->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- vertex->visitid= qh vertex_visit;
- qh_point_add (facets, vertex->point, facet);
- }
- }
- FOREACHpoint_(facet->coplanarset)
- qh_point_add (facets, point, facet);
- FOREACHpoint_(facet->outsideset)
- qh_point_add (facets, point, facet);
- }
- return facets;
-} /* pointfacet */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="pointvertex">-</a>
-
- qh_pointvertex( )
- return temporary set of vertices indexed by point id
- entry is NULL if no vertex for a point
- this will include qh.GOODpointp
-
- access:
- FOREACHvertex_i_(vertices) { ... }
- SETelem_(vertices, i)
-*/
-setT *qh_pointvertex (void /*qh facet_list*/) {
- int numpoints= qh num_points + qh_setsize (qh other_points);
- setT *vertices;
- vertexT *vertex;
-
- vertices= qh_settemp (numpoints);
- qh_setzero (vertices, 0, numpoints);
- FORALLvertices
- qh_point_add (vertices, vertex->point, vertex);
- return vertices;
-} /* pointvertex */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="prependfacet">-</a>
-
- qh_prependfacet( facet, facetlist )
- prepend facet to the start of a facetlist
-
- returns:
- increments qh.numfacets
- updates facetlist, qh.facet_list, facet_next
-
- notes:
- be careful of prepending since it can lose a pointer.
- e.g., can lose _next by deleting and then prepending before _next
-*/
-void qh_prependfacet(facetT *facet, facetT **facetlist) {
- facetT *prevfacet, *list;
-
-
- trace4((qh ferr, "qh_prependfacet: prepend f%d before f%d\n",
- facet->id, getid_(*facetlist)));
- if (!*facetlist)
- (*facetlist)= qh facet_tail;
- list= *facetlist;
- prevfacet= list->previous;
- facet->previous= prevfacet;
- if (prevfacet)
- prevfacet->next= facet;
- list->previous= facet;
- facet->next= *facetlist;
- if (qh facet_list == list) /* this may change *facetlist */
- qh facet_list= facet;
- if (qh facet_next == list)
- qh facet_next= facet;
- *facetlist= facet;
- qh num_facets++;
-} /* prependfacet */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="printhashtable">-</a>
-
- qh_printhashtable( fp )
- print hash table to fp
-
- notes:
- not in I/O to avoid bringing io.c in
-
- design:
- for each hash entry
- if defined
- if unmatched or will merge (NULL, qh_MERGEridge, qh_DUPLICATEridge)
- print entry and neighbors
-*/
-void qh_printhashtable(FILE *fp) {
- facetT *facet, *neighbor;
- int id, facet_i, facet_n, neighbor_i= 0, neighbor_n= 0;
- vertexT *vertex, **vertexp;
-
- FOREACHfacet_i_(qh hash_table) {
- if (facet) {
- FOREACHneighbor_i_(facet) {
- if (!neighbor || neighbor == qh_MERGEridge || neighbor == qh_DUPLICATEridge)
- break;
- }
- if (neighbor_i == neighbor_n)
- continue;
- fprintf (fp, "hash %d f%d ", facet_i, facet->id);
- FOREACHvertex_(facet->vertices)
- fprintf (fp, "v%d ", vertex->id);
- fprintf (fp, "\n neighbors:");
- FOREACHneighbor_i_(facet) {
- if (neighbor == qh_MERGEridge)
- id= -3;
- else if (neighbor == qh_DUPLICATEridge)
- id= -2;
- else
- id= getid_(neighbor);
- fprintf (fp, " %d", id);
- }
- fprintf (fp, "\n");
- }
- }
-} /* printhashtable */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="printlists">-</a>
-
- qh_printlists( fp )
- print out facet and vertex list for debugging (without 'f/v' tags)
-*/
-void qh_printlists (void) {
- facetT *facet;
- vertexT *vertex;
- int count= 0;
-
- fprintf (qh ferr, "qh_printlists: facets:");
- FORALLfacets {
- if (++count % 100 == 0)
- fprintf (qh ferr, "\n ");
- fprintf (qh ferr, " %d", facet->id);
- }
- fprintf (qh ferr, "\n new facets %d visible facets %d next facet for qh_addpoint %d\n vertices (new %d):",
- getid_(qh newfacet_list), getid_(qh visible_list), getid_(qh facet_next),
- getid_(qh newvertex_list));
- count = 0;
- FORALLvertices {
- if (++count % 100 == 0)
- fprintf (qh ferr, "\n ");
- fprintf (qh ferr, " %d", vertex->id);
- }
- fprintf (qh ferr, "\n");
-} /* printlists */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="resetlists">-</a>
-
- qh_resetlists( stats, qh_RESETvisible )
- reset newvertex_list, newfacet_list, visible_list
- if stats,
- maintains statistics
-
- returns:
- visible_list is empty if qh_deletevisible was called
-*/
-void qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/) {
- vertexT *vertex;
- facetT *newfacet, *visible;
- int totnew=0, totver=0;
-
- if (stats) {
- FORALLvertex_(qh newvertex_list)
- totver++;
- FORALLnew_facets
- totnew++;
- zadd_(Zvisvertextot, totver);
- zmax_(Zvisvertexmax, totver);
- zadd_(Znewfacettot, totnew);
- zmax_(Znewfacetmax, totnew);
- }
- FORALLvertex_(qh newvertex_list)
- vertex->newlist= False;
- qh newvertex_list= NULL;
- FORALLnew_facets
- newfacet->newfacet= False;
- qh newfacet_list= NULL;
- if (resetVisible) {
- FORALLvisible_facets {
- visible->f.replace= NULL;
- visible->visible= False;
- }
- qh num_visible= 0;
- }
- qh visible_list= NULL; /* may still have visible facets via qh_triangulate */
- qh NEWfacets= False;
-} /* resetlists */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="setvoronoi_all">-</a>
-
- qh_setvoronoi_all()
- compute Voronoi centers for all facets
- includes upperDelaunay facets if qh.UPPERdelaunay ('Qu')
-
- returns:
- facet->center is the Voronoi center
-
- notes:
- this is unused/untested code
- please email bradb@shore.net if this works ok for you
-
- use:
- FORALLvertices {...} to locate the vertex for a point.
- FOREACHneighbor_(vertex) {...} to visit the Voronoi centers for a Voronoi cell.
-*/
-void qh_setvoronoi_all (void) {
- facetT *facet;
-
- qh_clearcenters (qh_ASvoronoi);
- qh_vertexneighbors();
-
- FORALLfacets {
- if (!facet->normal || !facet->upperdelaunay || qh UPPERdelaunay) {
- if (!facet->center)
- facet->center= qh_facetcenter (facet->vertices);
- }
- }
-} /* setvoronoi_all */
-
-#ifndef qh_NOmerge
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="triangulate">-</a>
-
- qh_triangulate()
- triangulate non-simplicial facets on qh.facet_list,
- if qh.CENTERtype=qh_ASvoronoi, sets Voronoi centers of non-simplicial facets
-
- returns:
- all facets simplicial
- each tricoplanar facet has ->f.triowner == owner of ->center,normal,etc.
-
- notes:
- call after qh_check_output since may switch to Voronoi centers
- Output may overwrite ->f.triowner with ->f.area
-*/
-void qh_triangulate (void /*qh facet_list*/) {
- facetT *facet, *nextfacet, *owner;
- int onlygood= qh ONLYgood;
- facetT *neighbor, *visible= NULL, *facet1, *facet2, *new_facet_list= NULL;
- facetT *orig_neighbor= NULL, *otherfacet;
- vertexT *new_vertex_list= NULL;
- mergeT *merge;
- mergeType mergetype;
- int neighbor_i, neighbor_n;
-
- trace1((qh ferr, "qh_triangulate: triangulate non-simplicial facets\n"));
- if (qh hull_dim == 2)
- return;
- if (qh VORONOI) { /* otherwise lose Voronoi centers [could rebuild vertex set from tricoplanar] */
- qh_clearcenters (qh_ASvoronoi);
- qh_vertexneighbors();
- }
- qh ONLYgood= False; /* for makenew_nonsimplicial */
- qh visit_id++;
- qh NEWfacets= True;
- qh degen_mergeset= qh_settemp (qh TEMPsize);
- qh newvertex_list= qh vertex_tail;
- for (facet= qh facet_list; facet && facet->next; facet= nextfacet) { /* non-simplicial facets moved to end */
- nextfacet= facet->next;
- if (facet->visible || facet->simplicial)
- continue;
- /* triangulate all non-simplicial facets, otherwise merging does not work, e.g., RBOX c P-0.1 P+0.1 P+0.1 D3 | QHULL d Qt Tv */
- if (!new_facet_list)
- new_facet_list= facet; /* will be moved to end */
- qh_triangulate_facet (facet, &new_vertex_list);
- }
- trace2((qh ferr, "qh_triangulate: delete null facets from f%d -- apex same as second vertex\n", getid_(new_facet_list)));
- for (facet= new_facet_list; facet && facet->next; facet= nextfacet) { /* null facets moved to end */
- nextfacet= facet->next;
- if (facet->visible)
- continue;
- if (facet->ridges) {
- if (qh_setsize(facet->ridges) > 0) {
- fprintf( qh ferr, "qhull error (qh_triangulate): ridges still defined for f%d\n", facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- qh_setfree (&facet->ridges);
- }
- if (SETfirst_(facet->vertices) == SETsecond_(facet->vertices)) {
- zinc_(Ztrinull);
- qh_triangulate_null (facet);
- }
- }
- trace2((qh ferr, "qh_triangulate: delete %d or more mirror facets -- same vertices and neighbors\n", qh_setsize(qh degen_mergeset)));
- qh visible_list= qh facet_tail;
- while ((merge= (mergeT*)qh_setdellast (qh degen_mergeset))) {
- facet1= merge->facet1;
- facet2= merge->facet2;
- mergetype= merge->type;
- qh_memfree (merge, sizeof(mergeT));
- if (mergetype == MRGmirror) {
- zinc_(Ztrimirror);
- qh_triangulate_mirror (facet1, facet2);
- }
- }
- qh_settempfree(&qh degen_mergeset);
- trace2((qh ferr, "qh_triangulate: update neighbor lists for vertices from v%d\n", getid_(new_vertex_list)));
- qh newvertex_list= new_vertex_list; /* all vertices of new facets */
- qh visible_list= NULL;
- qh_updatevertices(/*qh newvertex_list, empty newfacet_list and visible_list*/);
- qh_resetlists (False, !qh_RESETvisible /*qh newvertex_list, empty newfacet_list and visible_list*/);
-
- trace2((qh ferr, "qh_triangulate: identify degenerate tricoplanar facets from f%d\n", getid_(new_facet_list)));
- trace2((qh ferr, "qh_triangulate: and replace facet->f.triowner with tricoplanar facets that own center, normal, etc.\n"));
- FORALLfacet_(new_facet_list) {
- if (facet->tricoplanar && !facet->visible) {
- FOREACHneighbor_i_(facet) {
- if (neighbor_i == 0) { /* first iteration */
- if (neighbor->tricoplanar)
- orig_neighbor= neighbor->f.triowner;
- else
- orig_neighbor= neighbor;
- }else {
- if (neighbor->tricoplanar)
- otherfacet= neighbor->f.triowner;
- else
- otherfacet= neighbor;
- if (orig_neighbor == otherfacet) {
- zinc_(Ztridegen);
- facet->degenerate= True;
- break;
- }
- }
- }
- }
- }
-
- trace2((qh ferr, "qh_triangulate: delete visible facets -- non-simplicial, null, and mirrored facets\n"));
- owner= NULL;
- visible= NULL;
- for (facet= new_facet_list; facet && facet->next; facet= nextfacet) { /* may delete facet */
- nextfacet= facet->next;
- if (facet->visible) {
- if (facet->tricoplanar) { /* a null or mirrored facet */
- qh_delfacet(facet);
- qh num_visible--;
- }else { /* a non-simplicial facet followed by its tricoplanars */
- if (visible && !owner) {
- /* RBOX 200 s D5 t1001471447 | QHULL Qt C-0.01 Qx Qc Tv Qt -- f4483 had 6 vertices/neighbors and 8 ridges */
- trace2((qh ferr, "qh_triangulate: all tricoplanar facets degenerate for non-simplicial facet f%d\n",
- visible->id));
- qh_delfacet(visible);
- qh num_visible--;
- }
- visible= facet;
- owner= NULL;
- }
- }else if (facet->tricoplanar) {
- if (facet->f.triowner != visible) {
- fprintf( qh ferr, "qhull error (qh_triangulate): tricoplanar facet f%d not owned by its visible, non-simplicial facet f%d\n", facet->id, getid_(visible));
- qh_errexit2 (qh_ERRqhull, facet, visible);
- }
- if (owner)
- facet->f.triowner= owner;
- else if (!facet->degenerate) {
- owner= facet;
- nextfacet= visible->next; /* rescan tricoplanar facets with owner */
- facet->keepcentrum= True; /* one facet owns ->normal, etc. */
- facet->coplanarset= visible->coplanarset;
- facet->outsideset= visible->outsideset;
- visible->coplanarset= NULL;
- visible->outsideset= NULL;
- if (!qh TRInormals) { /* center and normal copied to tricoplanar facets */
- visible->center= NULL;
- visible->normal= NULL;
- }
- qh_delfacet(visible);
- qh num_visible--;
- }
- }
- }
- if (visible && !owner) {
- trace2((qh ferr, "qh_triangulate: all tricoplanar facets degenerate for last non-simplicial facet f%d\n",
- visible->id));
- qh_delfacet(visible);
- qh num_visible--;
- }
- qh NEWfacets= False;
- qh ONLYgood= onlygood; /* restore value */
- if (qh CHECKfrequently)
- qh_checkpolygon (qh facet_list);
-} /* triangulate */
-
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="triangulate_facet">-</a>
-
- qh_triangulate_facet (facetA)
- triangulate a non-simplicial facet
- if qh.CENTERtype=qh_ASvoronoi, sets its Voronoi center
- returns:
- qh.newfacet_list == simplicial facets
- facet->tricoplanar set and ->keepcentrum false
- facet->degenerate set if duplicated apex
- facet->f.trivisible set to facetA
- facet->center copied from facetA (created if qh_ASvoronoi)
- qh_eachvoronoi, qh_detvridge, qh_detvridge3 assume centers copied
- facet->normal,offset,maxoutside copied from facetA
-
- notes:
- qh_makenew_nonsimplicial uses neighbor->seen for the same
-
- see also:
- qh_addpoint() -- add a point
- qh_makenewfacets() -- construct a cone of facets for a new vertex
-
- design:
- if qh_ASvoronoi,
- compute Voronoi center (facet->center)
- select first vertex (highest ID to preserve ID ordering of ->vertices)
- triangulate from vertex to ridges
- copy facet->center, normal, offset
- update vertex neighbors
-*/
-void qh_triangulate_facet (facetT *facetA, vertexT **first_vertex) {
- facetT *newfacet;
- facetT *neighbor, **neighborp;
- vertexT *apex;
- int numnew=0;
-
- trace3((qh ferr, "qh_triangulate_facet: triangulate facet f%d\n", facetA->id));
-
- if (qh IStracing >= 4)
- qh_printfacet (qh ferr, facetA);
- FOREACHneighbor_(facetA) {
- neighbor->seen= False;
- neighbor->coplanar= False;
- }
- if (qh CENTERtype == qh_ASvoronoi && !facetA->center /* matches upperdelaunay in qh_setfacetplane() */
- && fabs_(facetA->normal[qh hull_dim -1]) >= qh ANGLEround * qh_ZEROdelaunay) {
- facetA->center= qh_facetcenter (facetA->vertices);
- }
- qh_willdelete (facetA, NULL);
- qh newfacet_list= qh facet_tail;
- facetA->visitid= qh visit_id;
- apex= SETfirst_(facetA->vertices);
- qh_makenew_nonsimplicial (facetA, apex, &numnew);
- SETfirst_(facetA->neighbors)= NULL;
- FORALLnew_facets {
- newfacet->tricoplanar= True;
- newfacet->f.trivisible= facetA;
- newfacet->degenerate= False;
- newfacet->upperdelaunay= facetA->upperdelaunay;
- newfacet->good= facetA->good;
- if (qh TRInormals) {
- newfacet->keepcentrum= True;
- newfacet->normal= qh_copypoints (facetA->normal, 1, qh hull_dim);
- if (qh CENTERtype == qh_AScentrum)
- newfacet->center= qh_getcentrum (newfacet);
- else
- newfacet->center= qh_copypoints (facetA->center, 1, qh hull_dim);
- }else {
- newfacet->keepcentrum= False;
- newfacet->normal= facetA->normal;
- newfacet->center= facetA->center;
- }
- newfacet->offset= facetA->offset;
-#if qh_MAXoutside
- newfacet->maxoutside= facetA->maxoutside;
-#endif
- }
- qh_matchnewfacets(/*qh newfacet_list*/);
- zinc_(Ztricoplanar);
- zadd_(Ztricoplanartot, numnew);
- zmax_(Ztricoplanarmax, numnew);
- qh visible_list= NULL;
- if (!(*first_vertex))
- (*first_vertex)= qh newvertex_list;
- qh newvertex_list= NULL;
- qh_updatevertices(/*qh newfacet_list, empty visible_list and newvertex_list*/);
- qh_resetlists (False, !qh_RESETvisible /*qh newfacet_list, empty visible_list and newvertex_list*/);
-} /* triangulate_facet */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="triangulate_link">-</a>
-
- qh_triangulate_link (oldfacetA, facetA, oldfacetB, facetB)
- relink facetA to facetB via oldfacets
- returns:
- adds mirror facets to qh degen_mergeset (4-d and up only)
- design:
- if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB) {
- int errmirror= False;
-
- trace3((qh ferr, "qh_triangulate_link: relink old facets f%d and f%d between neighbors f%d and f%d\n",
- oldfacetA->id, oldfacetB->id, facetA->id, facetB->id));
- if (qh_setin (facetA->neighbors, facetB)) {
- if (!qh_setin (facetB->neighbors, facetA))
- errmirror= True;
- else
- qh_appendmergeset (facetA, facetB, MRGmirror, NULL);
- }else if (qh_setin (facetB->neighbors, facetA))
- errmirror= True;
- if (errmirror) {
- fprintf( qh ferr, "qhull error (qh_triangulate_link): mirror facets f%d and f%d do not match for old facets f%d and f%d\n",
- facetA->id, facetB->id, oldfacetA->id, oldfacetB->id);
- qh_errexit2 (qh_ERRqhull, facetA, facetB);
- }
- qh_setreplace (facetB->neighbors, oldfacetB, facetA);
- qh_setreplace (facetA->neighbors, oldfacetA, facetB);
-} /* triangulate_link */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="triangulate_mirror">-</a>
-
- qh_triangulate_mirror (facetA, facetB)
- delete mirrored facets from qh_triangulate_null() and qh_triangulate_mirror
- a mirrored facet shares the same vertices of a logical ridge
- design:
- since a null facet duplicates the first two vertices, the opposing neighbors absorb the null facet
- if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_mirror (facetT *facetA, facetT *facetB) {
- facetT *neighbor, *neighborB;
- int neighbor_i, neighbor_n;
-
- trace3((qh ferr, "qh_triangulate_mirror: delete mirrored facets f%d and f%d\n",
- facetA->id, facetB->id));
- FOREACHneighbor_i_(facetA) {
- neighborB= SETelemt_(facetB->neighbors, neighbor_i, facetT);
- if (neighbor == neighborB)
- continue; /* occurs twice */
- qh_triangulate_link (facetA, neighbor, facetB, neighborB);
- }
- qh_willdelete (facetA, NULL);
- qh_willdelete (facetB, NULL);
-} /* triangulate_mirror */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="triangulate_null">-</a>
-
- qh_triangulate_null (facetA)
- remove null facetA from qh_triangulate_facet()
- a null facet has vertex #1 (apex) == vertex #2
- returns:
- adds facetA to ->visible for deletion after qh_updatevertices
- qh degen_mergeset contains mirror facets (4-d and up only)
- design:
- since a null facet duplicates the first two vertices, the opposing neighbors absorb the null facet
- if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_null (facetT *facetA) {
- facetT *neighbor, *otherfacet;
-
- trace3((qh ferr, "qh_triangulate_null: delete null facet f%d\n", facetA->id));
- neighbor= SETfirst_(facetA->neighbors);
- otherfacet= SETsecond_(facetA->neighbors);
- qh_triangulate_link (facetA, neighbor, facetA, otherfacet);
- qh_willdelete (facetA, NULL);
-} /* triangulate_null */
-
-#else /* qh_NOmerge */
-void qh_triangulate (void) {
-}
-#endif /* qh_NOmerge */
-
- /*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="vertexintersect">-</a>
-
- qh_vertexintersect( vertexsetA, vertexsetB )
- intersects two vertex sets (inverse id ordered)
- vertexsetA is a temporary set at the top of qhmem.tempstack
-
- returns:
- replaces vertexsetA with the intersection
-
- notes:
- could overwrite vertexsetA if currently too slow
-*/
-void qh_vertexintersect(setT **vertexsetA,setT *vertexsetB) {
- setT *intersection;
-
- intersection= qh_vertexintersect_new (*vertexsetA, vertexsetB);
- qh_settempfree (vertexsetA);
- *vertexsetA= intersection;
- qh_settemppush (intersection);
-} /* vertexintersect */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="vertexintersect_new">-</a>
-
- qh_vertexintersect_new( )
- intersects two vertex sets (inverse id ordered)
-
- returns:
- a new set
-*/
-setT *qh_vertexintersect_new (setT *vertexsetA,setT *vertexsetB) {
- setT *intersection= qh_setnew (qh hull_dim - 1);
- vertexT **vertexA= SETaddr_(vertexsetA, vertexT);
- vertexT **vertexB= SETaddr_(vertexsetB, vertexT);
-
- while (*vertexA && *vertexB) {
- if (*vertexA == *vertexB) {
- qh_setappend(&intersection, *vertexA);
- vertexA++; vertexB++;
- }else {
- if ((*vertexA)->id > (*vertexB)->id)
- vertexA++;
- else
- vertexB++;
- }
- }
- return intersection;
-} /* vertexintersect_new */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="vertexneighbors">-</a>
-
- qh_vertexneighbors()
- for each vertex in qh.facet_list,
- determine its neighboring facets
-
- returns:
- sets qh.VERTEXneighbors
- nop if qh.VERTEXneighbors already set
- qh_addpoint() will maintain them
-
- notes:
- assumes all vertex->neighbors are NULL
-
- design:
- for each facet
- for each vertex
- append facet to vertex->neighbors
-*/
-void qh_vertexneighbors (void /*qh facet_list*/) {
- facetT *facet;
- vertexT *vertex, **vertexp;
-
- if (qh VERTEXneighbors)
- return;
- trace1((qh ferr, "qh_vertexneighbors: determing neighboring facets for each vertex\n"));
- qh vertex_visit++;
- FORALLfacets {
- if (facet->visible)
- continue;
- FOREACHvertex_(facet->vertices) {
- if (vertex->visitid != qh vertex_visit) {
- vertex->visitid= qh vertex_visit;
- vertex->neighbors= qh_setnew (qh hull_dim);
- }
- qh_setappend (&vertex->neighbors, facet);
- }
- }
- qh VERTEXneighbors= True;
-} /* vertexneighbors */
-
-/*-<a href="qh-poly.htm#TOC"
- >-------------------------------</a><a name="vertexsubset">-</a>
-
- qh_vertexsubset( vertexsetA, vertexsetB )
- returns True if vertexsetA is a subset of vertexsetB
- assumes vertexsets are sorted
-
- note:
- empty set is a subset of any other set
-*/
-boolT qh_vertexsubset(setT *vertexsetA, setT *vertexsetB) {
- vertexT **vertexA= (vertexT **) SETaddr_(vertexsetA, vertexT);
- vertexT **vertexB= (vertexT **) SETaddr_(vertexsetB, vertexT);
-
- while (True) {
- if (!*vertexA)
- return True;
- if (!*vertexB)
- return False;
- if ((*vertexA)->id > (*vertexB)->id)
- return False;
- if (*vertexA == *vertexB)
- vertexA++;
- vertexB++;
- }
- return False; /* avoid warnings */
-} /* vertexsubset */
diff --git a/extern/qhull/src/qconvex.c b/extern/qhull/src/qconvex.c
deleted file mode 100644
index 67b78646e50..00000000000
--- a/extern/qhull/src/qconvex.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qconvex.c
- compute convex hulls using qhull
-
- see unix.c for full interface
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-
-#elif __cplusplus
-extern "C" {
- int isatty (int);
-}
-
-#elif _MSC_VER
-#include <io.h>
-#define isatty _isatty
-
-#else
-int isatty (int); /* returns 1 if stdin is a tty
- if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt">-</a>
-
- qh_prompt
- long prompt for qconvex
-
- notes:
- restricted version of qhull.c
-
- see:
- concise prompt below
-*/
-
-/* duplicated in qconvex.htm */
-char hidden_options[]=" d v H Qbb Qf Qg Qm Qr Qu Qv Qx Qz TR E V Fp Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qconvex- compute the convex hull\n\
- http://www.geom.umn.edu/software/qhull %s\n\
-\n\
-input (stdin):\n\
- first lines: dimension and number of points (or vice-versa).\n\
- other lines: point coordinates, best if one point per line\n\
- comments: start with a non-numeric character\n\
-\n\
-options:\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Qc - keep coplanar points with nearest facet\n\
- Qi - keep interior points with nearest facet\n\
-\n\
-Qhull control options:\n\
- Qbk:n - scale coord k so that low bound is n\n\
- QBk:n - scale coord k so that upper bound is n (QBk is %2.2g)\n\
- QbB - scale input to unit cube centered at the origin\n\
- Qbk:0Bk:0 - remove k-th coordinate from input\n\
- QJn - randomly joggle input in range [-n,n]\n\
- QRn - random rotation (n=seed, n=0 time, n=-1 time/no rotate)\n\
-%s%s%s%s"; /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
- Qs - search all points for the initial simplex\n\
- QGn - good facet if visible from point n, -n for not visible\n\
- QVn - good facet if it includes point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
- T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
- Tc - check frequently during execution\n\
- Ts - print statistics\n\
- Tv - verify result: structure, convexity, and point inclusion\n\
- Tz - send all output to stdout\n\
- TFn - report summary when n or more facets created\n\
- TI file - input data from file, no spaces or single quotes\n\
- TO file - output results to file, may be enclosed in single quotes\n\
- TPn - turn on tracing when point n added to hull\n\
- TMn - turn on tracing at merge n\n\
- TWn - trace merge facets when width > n\n\
- TVn - stop qhull after adding point n, -n for before (see TCn)\n\
- TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
- Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\
- An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\
- C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
- Rn - randomly perturb computations by a factor of [1-n,1+n]\n\
- Un - max distance below plane for a new, coplanar point\n\
- Wn - min facet width for outside point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
- f - facet dump\n\
- G - Geomview output (see below)\n\
- i - vertices incident to each facet\n\
- m - Mathematica output (2-d and 3-d)\n\
- n - normals with offsets\n\
- o - OFF file format (dim, points and facets; Voronoi regions)\n\
- p - point coordinates \n\
- s - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
- Fa - area for each facet\n\
- FA - compute total area and volume for option 's'\n\
- Fc - count plus coplanar points for each facet\n\
- use 'Qc' (default) for coplanar and 'Qi' for interior\n\
- FC - centrum for each facet\n\
- Fd - use cdd format for input (homogeneous with offset first)\n\
- FD - use cdd format for numeric output (offset first)\n\
- FF - facet dump without ridges\n\
- Fi - inner plane for each facet\n\
- FI - ID for each facet\n\
- Fm - merge count for each facet (511 max)\n\
- Fn - count plus neighboring facets for each facet\n\
- FN - count plus neighboring facets for each point\n\
- Fo - outer plane (or max_outside) for each facet\n\
- FO - options and precision constants\n\
- FP - nearest vertex for each coplanar point\n\
- FQ - command used for qconvex\n\
- Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
- for output: #vertices, #facets,\n\
- #coplanar points, #non-simplicial facets\n\
- #real (2), max outer plane, min vertex\n\
- FS - sizes: #int (0) \n\
- #real(2) tot area, tot volume\n\
- Ft - triangulation with centrums for non-simplicial facets (OFF format)\n\
- Fv - count plus vertices for each facet\n\
- FV - average of vertices (a feasible point for 'H')\n\
- Fx - extreme points (in order for 2-d)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview output (2-d, 3-d, and 4-d)\n\
- Ga - all points as dots\n\
- Gp - coplanar points and vertices as radii\n\
- Gv - vertices as spheres\n\
- Gi - inner planes only\n\
- Gn - no planes\n\
- Go - outer planes only\n\
- Gc - centrums\n\
- Gh - hyperplane intersections\n\
- Gr - ridges\n\
- GDn - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
- PAn - keep n largest facets by area\n\
- Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
- PDk:n - drop facet if normal[k] >= n\n\
- Pg - print good facets (needs 'QGn' or 'QVn')\n\
- PFn - keep facets whose area is at least n\n\
- PG - print neighbors of good facets\n\
- PMn - keep n facets with most merges\n\
- Po - force output. If error, output neighborhood of facet\n\
- Pp - do not report precision problems\n\
-\n\
- . - list of all options\n\
- - - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt2">-</a>
-
- qh_prompt2
- synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qconvex- compute the convex hull. Qhull %s\n\
- input (stdin): dimension, number of points, point coordinates\n\
- comments start with a non-numeric character\n\
-\n\
-options (qconvex.htm):\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Tv - verify result: structure, convexity, and point inclusion\n\
- . - concise list of all options\n\
- - - one-line description of all options\n\
-\n\
-output options (subset):\n\
- s - summary of results (default)\n\
- i - vertices incident to each facet\n\
- n - normals with offsets\n\
- p - vertex coordinates (includes coplanar points if 'Qc')\n\
- Fx - extreme points (convex hull vertices)\n\
- FA - compute total area and volume\n\
- o - OFF format (dim, n, points, facets)\n\
- G - Geomview output (2-d, 3-d, and 4-d)\n\
- m - Mathematica output (2-d and 3-d)\n\
- QVn - print facets that include point n, -n if not\n\
- TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
- rbox c D2 | qconvex s n rbox c D2 | qconvex i\n\
- rbox c D2 | qconvex o rbox 1000 s | qconvex s Tv FA\n\
- rbox c d D2 | qconvex s Qc Fx rbox y 1000 W0 | qconvex s n\n\
- rbox y 1000 W0 | qconvex s QJ rbox d G1 D12 | qconvex QR0 FA Pp\n\
- rbox c D7 | qconvex FA TF1000\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt3">-</a>
-
- qh_prompt3
- concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- incidences mathematica normals OFF_format points\n\
- summary facet_dump\n\
-\n\
- Farea FArea_total Fcoplanars FCentrums Fd_cdd_in\n\
- FD_cdd_out FFacet_xridge Finner FIDs Fmerges\n\
- Fneighbors FNeigh_vertex Fouter FOptions FPoint_near\n\
- FQhull Fsummary FSize Fvertices FVertex_ave\n\
- Fxtremes\n\
-\n\
- Gvertices Gpoints Gall_points Gno_planes Ginner\n\
- Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\
-\n\
- PArea_keep Pdrop d0:0D0 PFacet_area_keep Pgood PGood_neighbors\n\
- PMerge_keep Poutput_forced Pprecision_not\n\
-\n\
- QbBound 0:0.5 QbB_scale_box Qcoplanar QGood_point Qinterior\n\
- QJoggle Qrandom QRotate Qsearch_1st Qtriangulate\n\
- QVertex_good\n\
-\n\
- T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\
- TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\
- TWide_trace TVertex_stop TCone_stop\n\
-\n\
- Angle_max Centrum_size Random_dist Ucoplanar_max Wide_outside\n\
-";
-
-/*-<a href="qh-qhull.htm"
- >-------------------------------</a><a name="main">-</a>
-
- main( argc, argv )
- processes the command line, calls qhull() to do the work, and exits
-
- design:
- initializes data structures
- reads points
- finishes initialization
- computes convex hull and other structures
- checks the result
- writes the output
- frees memory
-*/
-int main(int argc, char *argv[]) {
- int curlong, totlong; /* used !qh_NOmem */
- int exitcode, numpoints, dim;
- coordT *points;
- boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= false;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
-
- if ((argc == 1) && isatty( 0 /*stdin*/)) {
- fprintf(stdout, qh_prompt2, qh_VERSION);
- exit(qh_ERRnone);
- }
- if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompta, qh_VERSION, qh_DEFAULTbox,
- qh_promptb, qh_promptc, qh_promptd, qh_prompte);
- exit(qh_ERRnone);
- }
- if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompt3, qh_VERSION);
- exit(qh_ERRnone);
- }
- qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */
- exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
- if (!exitcode) {
- qh_checkflags (qh qhull_command, hidden_options);
- qh_initflags (qh qhull_command);
- points= qh_readpoints (&numpoints, &dim, &ismalloc);
- if (dim >= 5) {
- qh_option ("Qxact_merge", NULL, NULL);
- qh MERGEexact= True; /* 'Qx' always */
- }
- qh_init_B (points, numpoints, dim, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_produce_output();
- if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- exitcode= qh_ERRnone;
- }
- qh NOerrexit= True; /* no more setjmp */
-#ifdef qh_NOmem
- qh_freeqhull( True);
-#else
- qh_freeqhull( False);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-#endif
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qdelaun.c b/extern/qhull/src/qdelaun.c
deleted file mode 100644
index 0e49d9c381e..00000000000
--- a/extern/qhull/src/qdelaun.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qdelaun.c
- compute Delaunay triangulations and furthest-point Delaunay
- triangulations using qhull
-
- see unix.c for full interface
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-
-#elif __cplusplus
-extern "C" {
- int isatty (int);
-}
-
-#elif _MSC_VER
-#include <io.h>
-#define isatty _isatty
-
-#else
-int isatty (int); /* returns 1 if stdin is a tty
- if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt">-</a>
-
- qh_prompt
- long prompt for qhull
-
- notes:
- restricted version of qhull.c
-
- see:
- concise prompt below
-*/
-
-/* duplicated in qdelau_f.htm and qdelaun.htm */
-char hidden_options[]=" d n v H U Qb QB Qc Qf Qg Qi Qm Qr QR Qv Qx TR E V FC Fi Fo Ft Fp FV Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qdelaunay- compute the Delaunay triangulation\n\
- http://www.geom.umn.edu/software/qhull %s\n\
-\n\
-input (stdin):\n\
- first lines: dimension and number of points (or vice-versa).\n\
- other lines: point coordinates, best if one point per line\n\
- comments: start with a non-numeric character\n\
-\n\
-options:\n\
- Qu - compute furthest-site Delaunay triangulation\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
-\n\
-Qhull control options:\n\
- QJn - randomly joggle input in range [-n,n]\n\
-%s%s%s%s"; /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
- Qs - search all points for the initial simplex\n\
- Qz - add point-at-infinity to Delaunay triangulation\n\
- QGn - print Delaunay region if visible from point n, -n if not\n\
- QVn - print Delaunay regions that include point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
- T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
- Tc - check frequently during execution\n\
- Ts - print statistics\n\
- Tv - verify result: structure, convexity, and in-circle test\n\
- Tz - send all output to stdout\n\
- TFn - report summary when n or more facets created\n\
- TI file - input data from file, no spaces or single quotes\n\
- TO file - output results to file, may be enclosed in single quotes\n\
- TPn - turn on tracing when point n added to hull\n\
- TMn - turn on tracing at merge n\n\
- TWn - trace merge facets when width > n\n\
- TVn - stop qhull after adding point n, -n for before (see TCn)\n\
- TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
- Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\
- An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\
- C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
- Rn - randomly perturb computations by a factor of [1-n,1+n]\n\
- Wn - min facet width for outside point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
- f - facet dump\n\
- G - Geomview output (see below)\n\
- i - vertices incident to each Delaunay region\n\
- m - Mathematica output (2-d only, lifted to a paraboloid)\n\
- o - OFF format (dim, points, and facets as a paraboloid)\n\
- p - point coordinates (lifted to a paraboloid)\n\
- s - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
- Fa - area for each Delaunay region\n\
- FA - compute total area for option 's'\n\
- Fc - count plus coincident points for each Delaunay region\n\
- Fd - use cdd format for input (homogeneous with offset first)\n\
- FD - use cdd format for numeric output (offset first)\n\
- FF - facet dump without ridges\n\
- FI - ID of each Delaunay region\n\
- Fm - merge count for each Delaunay region (511 max)\n\
- Fn - count plus neighboring region for each Delaunay region\n\
- FN - count plus neighboring region for each point\n\
- FO - options and precision constants\n\
- FP - nearest point and distance for each coincident point\n\
- FQ - command used for qdelaunay\n\
- Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
- for output: #vertices, #Delaunay regions,\n\
- #coincident points, #non-simplicial regions\n\
- #real (2), max outer plane, min vertex\n\
- FS - sizes: #int (0)\n\
- #real(2) tot area, 0\n\
- Fv - count plus vertices for each Delaunay region\n\
- Fx - extreme points of Delaunay triangulation (on convex hull)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d and 3-d)\n\
- Ga - all points as dots\n\
- Gp - coplanar points and vertices as radii\n\
- Gv - vertices as spheres\n\
- Gi - inner planes only\n\
- Gn - no planes\n\
- Go - outer planes only\n\
- Gc - centrums\n\
- Gh - hyperplane intersections\n\
- Gr - ridges\n\
- GDn - drop dimension n in 3-d and 4-d output\n\
- Gt - transparent outer ridges to view 3-d Delaunay\n\
-\n\
-Print options:\n\
- PAn - keep n largest Delaunay regions by area\n\
- Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
- PDk:n - drop facet if normal[k] >= n\n\
- Pg - print good Delaunay regions (needs 'QGn' or 'QVn')\n\
- PFn - keep Delaunay regions whose area is at least n\n\
- PG - print neighbors of good regions (needs 'QGn' or 'QVn')\n\
- PMn - keep n Delaunay regions with most merges\n\
- Po - force output. If error, output neighborhood of facet\n\
- Pp - do not report precision problems\n\
-\n\
- . - list of all options\n\
- - - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt2">-</a>
-
- qh_prompt2
- synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qdelaunay- compute the Delaunay triangulation. Qhull %s\n\
- input (stdin): dimension, number of points, point coordinates\n\
- comments start with a non-numeric character\n\
-\n\
-options (qdelaun.htm):\n\
- Qu - furthest-site Delaunay triangulation\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Tv - verify result: structure, convexity, and in-circle test\n\
- . - concise list of all options\n\
- - - one-line description of all options\n\
-\n\
-output options (subset):\n\
- s - summary of results (default)\n\
- i - vertices incident to each Delaunay region\n\
- Fx - extreme points (vertices of the convex hull)\n\
- o - OFF format (shows the points lifted to a paraboloid)\n\
- G - Geomview output (2-d and 3-d points lifted to a paraboloid)\n\
- m - Mathematica output (2-d inputs lifted to a paraboloid)\n\
- QVn - print Delaunay regions that include point n, -n if not\n\
- TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
- rbox c P0 D2 | qdelaunay s o rbox c P0 D2 | qdelaunay i\n\
- rbox c P0 D2 | qdelaunay Fv rbox c P0 D2 | qdelaunay s Qu Fv\n\
- rbox c G1 d D2 | qdelaunay s i rbox c G1 d D2 | qdelaunay Qt\n\
- rbox M3,4 z 100 D2 | qdelaunay s rbox M3,4 z 100 D2 | qdelaunay s Qt\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt3">-</a>
-
- qh_prompt3
- concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- incidences mathematica OFF_format points_lifted summary\n\
- facet_dump\n\
-\n\
- Farea FArea_total Fcoincident Fd_cdd_in FD_cdd_out\n\
- FF_dump_xridge FIDs Fmerges Fneighbors FNeigh_vertex\n\
- FOptions FPoint_near FQdelaun Fsummary FSize\n\
- Fvertices Fxtremes\n\
-\n\
- Gvertices Gpoints Gall_points Gno_planes Ginner\n\
- Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\
- Gtransparent\n\
-\n\
- PArea_keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\
- PGood_neighbors PMerge_keep Poutput_forced Pprecision_not\n\
-\n\
- QGood_point QJoggle Qsearch_1st Qtriangulate QupperDelaunay\n\
- QVertex_good Qzinfinite\n\
-\n\
- T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\
- TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\
- TWide_trace TVertex_stop TCone_stop\n\
-\n\
- Angle_max Centrum_size Random_dist Wide_outside\n\
-";
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="main">-</a>
-
- main( argc, argv )
- processes the command line, calls qhull() to do the work, and exits
-
- design:
- initializes data structures
- reads points
- finishes initialization
- computes convex hull and other structures
- checks the result
- writes the output
- frees memory
-*/
-int main(int argc, char *argv[]) {
- int curlong, totlong; /* used !qh_NOmem */
- int exitcode, numpoints, dim;
- coordT *points;
- boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= false;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
-
- if ((argc == 1) && isatty( 0 /*stdin*/)) {
- fprintf(stdout, qh_prompt2, qh_VERSION);
- exit(qh_ERRnone);
- }
- if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompta, qh_VERSION,
- qh_promptb, qh_promptc, qh_promptd, qh_prompte);
- exit(qh_ERRnone);
- }
- if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompt3, qh_VERSION);
- exit(qh_ERRnone);
- }
- qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */
- exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
- if (!exitcode) {
- qh_option ("delaunay Qbbound-last", NULL, NULL);
- qh DELAUNAY= True; /* 'd' */
- qh SCALElast= True; /* 'Qbb' */
- qh KEEPcoplanar= True; /* 'Qc', to keep coplanars in 'p' */
- qh_checkflags (qh qhull_command, hidden_options);
- qh_initflags (qh qhull_command);
- points= qh_readpoints (&numpoints, &dim, &ismalloc);
- if (dim >= 5) {
- qh_option ("Qxact_merge", NULL, NULL);
- qh MERGEexact= True; /* 'Qx' always */
- }
- qh_init_B (points, numpoints, dim, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_produce_output();
- if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- exitcode= qh_ERRnone;
- }
- qh NOerrexit= True; /* no more setjmp */
-#ifdef qh_NOmem
- qh_freeqhull( True);
-#else
- qh_freeqhull( False);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-#endif
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qhalf.c b/extern/qhull/src/qhalf.c
deleted file mode 100644
index a2b3875dd7f..00000000000
--- a/extern/qhull/src/qhalf.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhalf.c
- compute the intersection of halfspaces about a point
-
- see unix.c for full interface
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-
-#elif __cplusplus
-extern "C" {
- int isatty (int);
-}
-
-#elif _MSC_VER
-#include <io.h>
-#define isatty _isatty
-
-#else
-int isatty (int); /* returns 1 if stdin is a tty
- if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt">-</a>
-
- qh_prompt
- long prompt for qhull
-
- notes:
- restricted version of qhull.c
-
- see:
- concise prompt below
-*/
-
-/* duplicated in qhalf.htm */
-char hidden_options[]=" d n v Qbb QbB Qf Qg Qm Qr QR Qv Qx Qz TR E V Fa FA FC FD FS Ft FV Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qhalf- compute the intersection of halfspaces about a point\n\
- http://www.geom.umn.edu/software/qhull %s\n\
-\n\
-input (stdin):\n\
- optional interior point: dimension, 1, coordinates\n\
- first lines: dimension+1 and number of halfspaces\n\
- other lines: halfspace coefficients followed by offset\n\
- comments: start with a non-numeric character\n\
-\n\
-options:\n\
- Hn,n - specify coordinates of interior point\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Qc - keep coplanar halfspaces\n\
- Qi - keep other redundant halfspaces\n\
-\n\
-Qhull control options:\n\
- QJn - randomly joggle input in range [-n,n]\n\
-%s%s%s%s"; /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
- Qbk:0Bk:0 - remove k-th coordinate from input\n\
- Qs - search all halfspaces for the initial simplex\n\
- QGn - print intersection if visible to halfspace n, -n for not\n\
- QVn - print intersections for halfspace n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
- T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
- Tc - check frequently during execution\n\
- Ts - print statistics\n\
- Tv - verify result: structure, convexity, and redundancy\n\
- Tz - send all output to stdout\n\
- TFn - report summary when n or more facets created\n\
- TI file - input data from file, no spaces or single quotes\n\
- TO file - output results to file, may be enclosed in single quotes\n\
- TPn - turn on tracing when halfspace n added to intersection\n\
- TMn - turn on tracing at merge n\n\
- TWn - trace merge facets when width > n\n\
- TVn - stop qhull after adding halfspace n, -n for before (see TCn)\n\
- TCn - stop qhull after building cone for halfspace n (see TVn)\n\
-\n\
-Precision options:\n\
- Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\
- An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\
- C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
- Rn - randomly perturb computations by a factor of [1-n,1+n]\n\
- Un - max distance below plane for a new, coplanar halfspace\n\
- Wn - min facet width for outside halfspace (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
- f - facet dump\n\
- G - Geomview output (dual convex hull)\n\
- i - non-redundant halfspaces incident to each intersection\n\
- m - Mathematica output (dual convex hull)\n\
- o - OFF format (dual convex hull: dimension, points, and facets)\n\
- p - vertex coordinates of dual convex hull (coplanars if 'Qc' or 'Qi')\n\
- s - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
- Fc - count plus redundant halfspaces for each intersection\n\
- - Qc (default) for coplanar and Qi for other redundant\n\
- Fd - use cdd format for input (homogeneous with offset first)\n\
- FF - facet dump without ridges\n\
- FI - ID of each intersection\n\
- Fm - merge count for each intersection (511 max)\n\
- Fn - count plus neighboring intersections for each intersection\n\
- FN - count plus intersections for each non-redundant halfspace\n\
- FO - options and precision constants\n\
- Fp - dim, count, and intersection coordinates\n\
- FP - nearest halfspace and distance for each redundant halfspace\n\
- FQ - command used for qhalf\n\
- Fs - summary: #int (8), dim, #halfspaces, #non-redundant, #intersections\n\
- for output: #non-redundant, #intersections, #coplanar\n\
- halfspaces, #non-simplicial intersections\n\
- #real (2), max outer plane, min vertex\n\
- Fv - count plus non-redundant halfspaces for each intersection\n\
- Fx - non-redundant halfspaces\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview output (2-d, 3-d and 4-d; dual convex hull)\n\
- Ga - all points (i.e., transformed halfspaces) as dots\n\
- Gp - coplanar points and vertices as radii\n\
- Gv - vertices (i.e., non-redundant halfspaces) as spheres\n\
- Gi - inner planes (i.e., halfspace intersections) only\n\
- Gn - no planes\n\
- Go - outer planes only\n\
- Gc - centrums\n\
- Gh - hyperplane intersections\n\
- Gr - ridges\n\
- GDn - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
- PAn - keep n largest facets (i.e., intersections) by area\n\
- Pdk:n- drop facet if normal[k] <= n (default 0.0)\n\
- PDk:n- drop facet if normal[k] >= n\n\
- Pg - print good facets (needs 'QGn' or 'QVn')\n\
- PFn - keep facets whose area is at least n\n\
- PG - print neighbors of good facets\n\
- PMn - keep n facets with most merges\n\
- Po - force output. If error, output neighborhood of facet\n\
- Pp - do not report precision problems\n\
-\n\
- . - list of all options\n\
- - - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt2">-</a>
-
- qh_prompt2
- synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qhalf- halfspace intersection about a point. Qhull %s\n\
- input (stdin): [dim, 1, interior point], dim+1, n, coefficients+offset\n\
- comments start with a non-numeric character\n\
-\n\
-options (qhalf.htm):\n\
- Hn,n - specify coordinates of interior point\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Tv - verify result: structure, convexity, and redundancy\n\
- . - concise list of all options\n\
- - - one-line description of all options\n\
-\n\
-output options (subset):\n\
- s - summary of results (default)\n\
- Fp - intersection coordinates\n\
- Fv - non-redundant halfspaces incident to each intersection\n\
- Fx - non-redundant halfspaces\n\
- o - OFF file format (dual convex hull)\n\
- G - Geomview output (dual convex hull)\n\
- m - Mathematica output (dual convex hull)\n\
- QVn - print intersections for halfspace n, -n if not\n\
- TO file - output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
- rbox d | qconvex FQ n | qhalf s H0,0,0 Fp\n\
- rbox c | qconvex FQ FV n | qhalf s i\n\
- rbox c | qconvex FQ FV n | qhalf s o\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt3">-</a>
-
- qh_prompt3
- concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper_case options take an argument.\n\
-\n\
- incidences Geomview mathematica OFF_format point_dual\n\
- summary facet_dump\n\
-\n\
- Fc_redundant Fd_cdd_in FF_dump_xridge FIDs Fmerges\n\
- Fneighbors FN_intersect FOptions Fp_coordinates FP_nearest\n\
- FQhalf Fsummary Fv_halfspace Fx_non_redundant\n\
-\n\
- Gvertices Gpoints Gall_points Gno_planes Ginner\n\
- Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\
-\n\
- PArea_keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\
- PGood_neighbors PMerge_keep Poutput_forced Pprecision_not\n\
-\n\
- Qbk:0Bk:0_drop Qcoplanar QG_half_good Qi_redundant QJoggle\n\
- Qsearch_1st Qtriangulate QVertex_good\n\
-\n\
- T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\
- TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\
- TWide_trace TVertex_stop TCone_stop\n\
-\n\
- Angle_max Centrum_size Random_dist Ucoplanar_max Wide_outside\n\
-";
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="main">-</a>
-
- main( argc, argv )
- processes the command line, calls qhull() to do the work, and exits
-
- design:
- initializes data structures
- reads points
- finishes initialization
- computes convex hull and other structures
- checks the result
- writes the output
- frees memory
-*/
-int main(int argc, char *argv[]) {
- int curlong, totlong; /* used !qh_NOmem */
- int exitcode, numpoints, dim;
- coordT *points;
- boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= false;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
-
- if ((argc == 1) && isatty( 0 /*stdin*/)) {
- fprintf(stdout, qh_prompt2, qh_VERSION);
- exit(qh_ERRnone);
- }
- if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompta, qh_VERSION,
- qh_promptb, qh_promptc, qh_promptd, qh_prompte);
- exit(qh_ERRnone);
- }
- if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompt3, qh_VERSION);
- exit(qh_ERRnone);
- }
- qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */
- exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
- if (!exitcode) {
- qh_option ("Halfspace", NULL, NULL);
- qh HALFspace= True; /* 'H' */
- qh_checkflags (qh qhull_command, hidden_options);
- qh_initflags (qh qhull_command);
- if (qh SCALEinput) {
- fprintf(qh ferr, "\
-qhull error: options 'Qbk:n' and 'QBk:n' are not used with qhalf.\n\
- Use 'Qbk:0Bk:0 to drop dimension k.\n");
- qh_errexit(qh_ERRinput, NULL, NULL);
- }
- points= qh_readpoints (&numpoints, &dim, &ismalloc);
- if (dim >= 5) {
- qh_option ("Qxact_merge", NULL, NULL);
- qh MERGEexact= True; /* 'Qx' always */
- }
- qh_init_B (points, numpoints, dim, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_produce_output();
- if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- exitcode= qh_ERRnone;
- }
- qh NOerrexit= True; /* no more setjmp */
-#ifdef qh_NOmem
- qh_freeqhull( True);
-#else
- qh_freeqhull( False);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-#endif
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qhull.c b/extern/qhull/src/qhull.c
deleted file mode 100644
index dc835bb4f28..00000000000
--- a/extern/qhull/src/qhull.c
+++ /dev/null
@@ -1,1395 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhull.c
- Quickhull algorithm for convex hulls
-
- qhull() and top-level routines
-
- see qh-qhull.htm, qhull.h, unix.c
-
- see qhull_a.h for internal functions
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*============= functions in alphabetic order after qhull() =======*/
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="qhull">-</a>
-
- qh_qhull()
- compute DIM3 convex hull of qh.num_points starting at qh.first_point
- qh contains all global options and variables
-
- returns:
- returns polyhedron
- qh.facet_list, qh.num_facets, qh.vertex_list, qh.num_vertices,
-
- returns global variables
- qh.hulltime, qh.max_outside, qh.interior_point, qh.max_vertex, qh.min_vertex
-
- returns precision constants
- qh.ANGLEround, centrum_radius, cos_max, DISTround, MAXabs_coord, ONEmerge
-
- notes:
- unless needed for output
- qh.max_vertex and qh.min_vertex are max/min due to merges
-
- see:
- to add individual points to either qh.num_points
- use qh_addpoint()
-
- if qh.GETarea
- qh_produceoutput() returns qh.totarea and qh.totvol via qh_getarea()
-
- design:
- record starting time
- initialize hull and partition points
- build convex hull
- unless early termination
- update facet->maxoutside for vertices, coplanar, and near-inside points
- error if temporary sets exist
- record end time
-*/
-void qh_qhull (void) {
- int numoutside;
-
- qh hulltime= qh_CPUclock;
- if (qh RERUN || qh JOGGLEmax < REALmax/2)
- qh_build_withrestart();
- else {
- qh_initbuild();
- qh_buildhull();
- }
- if (!qh STOPpoint && !qh STOPcone) {
- if (qh ZEROall_ok && !qh TESTvneighbors && qh MERGEexact)
- qh_checkzero( qh_ALL);
- if (qh ZEROall_ok && !qh TESTvneighbors && !qh WAScoplanar) {
- trace2((qh ferr, "qh_qhull: all facets are clearly convex and no coplanar points. Post-merging and check of maxout not needed.\n"));
- qh DOcheckmax= False;
- }else {
- if (qh MERGEexact || (qh hull_dim > qh_DIMreduceBuild && qh PREmerge))
- qh_postmerge ("First post-merge", qh premerge_centrum, qh premerge_cos,
- (qh POSTmerge ? False : qh TESTvneighbors));
- else if (!qh POSTmerge && qh TESTvneighbors)
- qh_postmerge ("For testing vertex neighbors", qh premerge_centrum,
- qh premerge_cos, True);
- if (qh POSTmerge)
- qh_postmerge ("For post-merging", qh postmerge_centrum,
- qh postmerge_cos, qh TESTvneighbors);
- if (qh visible_list == qh facet_list) { /* i.e., merging done */
- qh findbestnew= True;
- qh_partitionvisible (/*visible_list, newfacet_list*/ !qh_ALL, &numoutside);
- qh findbestnew= False;
- qh_deletevisible (/*qh visible_list*/);
- qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
- }
- }
- if (qh DOcheckmax){
- if (qh REPORTfreq) {
- qh_buildtracing (NULL, NULL);
- fprintf (qh ferr, "\nTesting all coplanar points.\n");
- }
- qh_check_maxout();
- }
- if (qh KEEPnearinside && !qh maxoutdone)
- qh_nearcoplanar();
- }
- if (qh_setsize ((setT*)qhmem.tempstack) != 0) {
- fprintf (qh ferr, "qhull internal error (qh_qhull): temporary sets not empty (%d)\n",
- qh_setsize ((setT*)qhmem.tempstack));
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- qh hulltime= qh_CPUclock - qh hulltime;
- qh QHULLfinished= True;
- trace1((qh ferr, "qh_qhull: algorithm completed\n"));
-} /* qhull */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="addpoint">-</a>
-
- qh_addpoint( furthest, facet, checkdist )
- add point (usually furthest point) above facet to hull
- if checkdist,
- check that point is above facet.
- if point is not outside of the hull, uses qh_partitioncoplanar()
- assumes that facet is defined by qh_findbestfacet()
- else if facet specified,
- assumes that point is above facet (major damage if below)
- for Delaunay triangulations,
- Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
- Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates.
-
- returns:
- returns False if user requested an early termination
- qh.visible_list, newfacet_list, delvertex_list, NEWfacets may be defined
- updates qh.facet_list, qh.num_facets, qh.vertex_list, qh.num_vertices
- clear qh.maxoutdone (will need to call qh_check_maxout() for facet->maxoutside)
- if unknown point, adds a pointer to qh.other_points
- do not deallocate the point's coordinates
-
- notes:
- assumes point is near its best facet and not at a local minimum of a lens
- distributions. Use qh_findbestfacet to avoid this case.
- uses qh.visible_list, qh.newfacet_list, qh.delvertex_list, qh.NEWfacets
-
- see also:
- qh_triangulate() -- triangulate non-simplicial facets
-
- design:
- check point in qh.first_point/.num_points
- if checkdist
- if point not above facet
- partition coplanar point
- exit
- exit if pre STOPpoint requested
- find horizon and visible facets for point
- make new facets for point to horizon
- make hyperplanes for point
- compute balance statistics
- match neighboring new facets
- update vertex neighbors and delete interior vertices
- exit if STOPcone requested
- merge non-convex new facets
- if merge found, many merges, or 'Qf'
- use qh_findbestnew() instead of qh_findbest()
- partition outside points from visible facets
- delete visible facets
- check polyhedron if requested
- exit if post STOPpoint requested
- reset working lists of facets and vertices
-*/
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist) {
- int goodvisible, goodhorizon;
- vertexT *vertex;
- facetT *newfacet;
- realT dist, newbalance, pbalance;
- boolT isoutside= False;
- int numpart, numpoints, numnew, firstnew;
-
- qh maxoutdone= False;
- if (qh_pointid (furthest) == -1)
- qh_setappend (&qh other_points, furthest);
- if (!facet) {
- fprintf (qh ferr, "qh_addpoint: NULL facet. Need to call qh_findbestfacet first\n");
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- if (checkdist) {
- facet= qh_findbest (furthest, facet, !qh_ALL, !qh_ISnewfacets, !qh_NOupper,
- &dist, &isoutside, &numpart);
- zzadd_(Zpartition, numpart);
- if (!isoutside) {
- zinc_(Znotmax); /* last point of outsideset is no longer furthest. */
- facet->notfurthest= True;
- qh_partitioncoplanar (furthest, facet, &dist);
- return True;
- }
- }
- qh_buildtracing (furthest, facet);
- if (qh STOPpoint < 0 && qh furthest_id == -qh STOPpoint-1) {
- facet->notfurthest= True;
- return False;
- }
- qh_findhorizon (furthest, facet, &goodvisible, &goodhorizon);
- if (qh ONLYgood && !(goodvisible+goodhorizon) && !qh GOODclosest) {
- zinc_(Znotgood);
- facet->notfurthest= True;
- /* last point of outsideset is no longer furthest. This is ok
- since all points of the outside are likely to be bad */
- qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
- return True;
- }
- zzinc_(Zprocessed);
- firstnew= qh facet_id;
- vertex= qh_makenewfacets (furthest /*visible_list, attaches if !ONLYgood */);
- qh_makenewplanes (/* newfacet_list */);
- numnew= qh facet_id - firstnew;
- newbalance= numnew - (realT) (qh num_facets-qh num_visible)
- * qh hull_dim/qh num_vertices;
- wadd_(Wnewbalance, newbalance);
- wadd_(Wnewbalance2, newbalance * newbalance);
- if (qh ONLYgood
- && !qh_findgood (qh newfacet_list, goodhorizon) && !qh GOODclosest) {
- FORALLnew_facets
- qh_delfacet (newfacet);
- qh_delvertex (vertex);
- qh_resetlists (True, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
- zinc_(Znotgoodnew);
- facet->notfurthest= True;
- return True;
- }
- if (qh ONLYgood)
- qh_attachnewfacets(/*visible_list*/);
- qh_matchnewfacets();
- qh_updatevertices();
- if (qh STOPcone && qh furthest_id == qh STOPcone-1) {
- facet->notfurthest= True;
- return False; /* visible_list etc. still defined */
- }
- qh findbestnew= False;
- if (qh PREmerge || qh MERGEexact) {
- qh_premerge (vertex, qh premerge_centrum, qh premerge_cos);
- if (qh_USEfindbestnew)
- qh findbestnew= True;
- else {
- FORALLnew_facets {
- if (!newfacet->simplicial) {
- qh findbestnew= True; /* use qh_findbestnew instead of qh_findbest*/
- break;
- }
- }
- }
- }else if (qh BESToutside)
- qh findbestnew= True;
- qh_partitionvisible (/*visible_list, newfacet_list*/ !qh_ALL, &numpoints);
- qh findbestnew= False;
- qh findbest_notsharp= False;
- zinc_(Zpbalance);
- pbalance= numpoints - (realT) qh hull_dim /* assumes all points extreme */
- * (qh num_points - qh num_vertices)/qh num_vertices;
- wadd_(Wpbalance, pbalance);
- wadd_(Wpbalance2, pbalance * pbalance);
- qh_deletevisible (/*qh visible_list*/);
- zmax_(Zmaxvertex, qh num_vertices);
- qh NEWfacets= False;
- if (qh IStracing >= 4) {
- if (qh num_facets < 2000)
- qh_printlists();
- qh_printfacetlist (qh newfacet_list, NULL, True);
- qh_checkpolygon (qh facet_list);
- }else if (qh CHECKfrequently) {
- if (qh num_facets < 50)
- qh_checkpolygon (qh facet_list);
- else
- qh_checkpolygon (qh newfacet_list);
- }
- if (qh STOPpoint > 0 && qh furthest_id == qh STOPpoint-1)
- return False;
- qh_resetlists (True, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
- /* qh_triangulate(); to test qh.TRInormals */
- trace2((qh ferr, "qh_addpoint: added p%d new facets %d new balance %2.2g point balance %2.2g\n",
- qh_pointid (furthest), numnew, newbalance, pbalance));
- return True;
-} /* addpoint */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="build_withrestart">-</a>
-
- qh_build_withrestart()
- allow restarts due to qh.JOGGLEmax while calling qh_buildhull()
- qh.FIRSTpoint/qh.NUMpoints is point array
- it may be moved by qh_joggleinput()
-*/
-void qh_build_withrestart (void) {
- int restart;
-
- qh ALLOWrestart= True;
- while (True) {
- restart= setjmp (qh restartexit); /* simple statement for CRAY J916 */
- if (restart) { /* only from qh_precision() */
- zzinc_(Zretry);
- wmax_(Wretrymax, qh JOGGLEmax);
- qh ERREXITcalled= False;
- qh STOPcone= True; /* if break, prevents normal output */
- }
- if (!qh RERUN && qh JOGGLEmax < REALmax/2) {
- if (qh build_cnt > qh_JOGGLEmaxretry) {
- fprintf(qh ferr, "\n\
-qhull precision error: %d attempts to construct a convex hull\n\
- with joggled input. Increase joggle above 'QJ%2.2g'\n\
- or modify qh_JOGGLE... parameters in user.h\n",
- qh build_cnt, qh JOGGLEmax);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- if (qh build_cnt && !restart)
- break;
- }else if (qh build_cnt && qh build_cnt >= qh RERUN)
- break;
- qh STOPcone= False;
- qh_freebuild (True); /* first call is a nop */
- qh build_cnt++;
- if (!qh qhull_optionsiz)
- qh qhull_optionsiz= strlen (qh qhull_options);
- else {
- qh qhull_options [qh qhull_optionsiz]= '\0';
- qh qhull_optionlen= 80;
- }
- qh_option("_run", &qh build_cnt, NULL);
- if (qh build_cnt == qh RERUN) {
- qh IStracing= qh TRACElastrun; /* duplicated from qh_initqhull_globals */
- if (qh TRACEpoint != -1 || qh TRACEdist < REALmax/2 || qh TRACEmerge) {
- qh TRACElevel= (qh IStracing? qh IStracing : 3);
- qh IStracing= 0;
- }
- qhmem.IStracing= qh IStracing;
- }
- if (qh JOGGLEmax < REALmax/2)
- qh_joggleinput();
- qh_initbuild();
- qh_buildhull();
- if (qh JOGGLEmax < REALmax/2 && !qh MERGING)
- qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
- }
- qh ALLOWrestart= False;
-} /* qh_build_withrestart */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="buildhull">-</a>
-
- qh_buildhull()
- construct a convex hull by adding outside points one at a time
-
- returns:
-
- notes:
- may be called multiple times
- checks facet and vertex lists for incorrect flags
- to recover from STOPcone, call qh_deletevisible and qh_resetlists
-
- design:
- check visible facet and newfacet flags
- check newlist vertex flags and qh.STOPcone/STOPpoint
- for each facet with a furthest outside point
- add point to facet
- exit if qh.STOPcone or qh.STOPpoint requested
- if qh.NARROWhull for initial simplex
- partition remaining outside points to coplanar sets
-*/
-void qh_buildhull(void) {
- facetT *facet;
- pointT *furthest;
- vertexT *vertex;
- int id;
-
- trace1((qh ferr, "qh_buildhull: start build hull\n"));
- FORALLfacets {
- if (facet->visible || facet->newfacet) {
- fprintf (qh ferr, "qhull internal error (qh_buildhull): visible or new facet f%d in facet list\n",
- facet->id);
- qh_errexit (qh_ERRqhull, facet, NULL);
- }
- }
- FORALLvertices {
- if (vertex->newlist) {
- fprintf (qh ferr, "qhull internal error (qh_buildhull): new vertex f%d in vertex list\n",
- vertex->id);
- qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- id= qh_pointid (vertex->point);
- if ((qh STOPpoint>0 && id == qh STOPpoint-1) ||
- (qh STOPpoint<0 && id == -qh STOPpoint-1) ||
- (qh STOPcone>0 && id == qh STOPcone-1)) {
- trace1((qh ferr,"qh_buildhull: stop point or cone P%d in initial hull\n", id));
- return;
- }
- }
- qh facet_next= qh facet_list; /* advance facet when processed */
- while ((furthest= qh_nextfurthest (&facet))) {
- qh num_outside--; /* if ONLYmax, furthest may not be outside */
- if (!qh_addpoint (furthest, facet, qh ONLYmax))
- break;
- }
- if (qh NARROWhull) /* move points from outsideset to coplanarset */
- qh_outcoplanar( /* facet_list */ );
- if (qh num_outside && !furthest) {
- fprintf (qh ferr, "qhull internal error (qh_buildhull): %d outside points were never processed.\n", qh num_outside);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }
- trace1((qh ferr, "qh_buildhull: completed the hull construction\n"));
-} /* buildhull */
-
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="buildtracing">-</a>
-
- qh_buildtracing( furthest, facet )
- trace an iteration of qh_buildhull() for furthest point and facet
- if !furthest, prints progress message
-
- returns:
- tracks progress with qh.lastreport
- updates qh.furthest_id (-3 if furthest is NULL)
- also resets visit_id, vertext_visit on wrap around
-
- see:
- qh_tracemerging()
-
- design:
- if !furthest
- print progress message
- exit
- if 'TFn' iteration
- print progress message
- else if tracing
- trace furthest point and facet
- reset qh.visit_id and qh.vertex_visit if overflow may occur
- set qh.furthest_id for tracing
-*/
-void qh_buildtracing (pointT *furthest, facetT *facet) {
- realT dist= 0;
- float cpu;
- int total, furthestid;
- time_t timedata;
- struct tm *tp;
- vertexT *vertex;
-
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- if (!furthest) {
- time (&timedata);
- tp= localtime (&timedata);
- cpu= qh_CPUclock - qh hulltime;
- cpu /= qh_SECticks;
- total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
- fprintf (qh ferr, "\n\
-At %02d:%02d:%02d & %2.5g CPU secs, qhull has created %d facets and merged %d.\n\
- The current hull contains %d facets and %d vertices. Last point was p%d\n",
- tp->tm_hour, tp->tm_min, tp->tm_sec, cpu, qh facet_id -1,
- total, qh num_facets, qh num_vertices, qh furthest_id);
- return;
- }
- furthestid= qh_pointid (furthest);
- if (qh TRACEpoint == furthestid) {
- qh IStracing= qh TRACElevel;
- qhmem.IStracing= qh TRACElevel;
- }else if (qh TRACEpoint != -1 && qh TRACEdist < REALmax/2) {
- qh IStracing= 0;
- qhmem.IStracing= 0;
- }
- if (qh REPORTfreq && (qh facet_id-1 > qh lastreport+qh REPORTfreq)) {
- qh lastreport= qh facet_id-1;
- time (&timedata);
- tp= localtime (&timedata);
- cpu= qh_CPUclock - qh hulltime;
- cpu /= qh_SECticks;
- total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
- zinc_(Zdistio);
- qh_distplane (furthest, facet, &dist);
- fprintf (qh ferr, "\n\
-At %02d:%02d:%02d & %2.5g CPU secs, qhull has created %d facets and merged %d.\n\
- The current hull contains %d facets and %d vertices. There are %d\n\
- outside points. Next is point p%d (v%d), %2.2g above f%d.\n",
- tp->tm_hour, tp->tm_min, tp->tm_sec, cpu, qh facet_id -1,
- total, qh num_facets, qh num_vertices, qh num_outside+1,
- furthestid, qh vertex_id, dist, getid_(facet));
- }else if (qh IStracing >=1) {
- cpu= qh_CPUclock - qh hulltime;
- cpu /= qh_SECticks;
- qh_distplane (furthest, facet, &dist);
- fprintf (qh ferr, "qh_addpoint: add p%d (v%d) to hull of %d facets (%2.2g above f%d) and %d outside at %4.4g CPU secs. Previous was p%d.\n",
- furthestid, qh vertex_id, qh num_facets, dist,
- getid_(facet), qh num_outside+1, cpu, qh furthest_id);
- }
- if (qh visit_id > (unsigned) INT_MAX) {
- qh visit_id= 0;
- FORALLfacets
- facet->visitid= qh visit_id;
- }
- if (qh vertex_visit > (unsigned) INT_MAX) {
- qh vertex_visit= 0;
- FORALLvertices
- vertex->visitid= qh vertex_visit;
- }
- qh furthest_id= furthestid;
- qh RANDOMdist= qh old_randomdist;
-} /* buildtracing */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="errexit2">-</a>
-
- qh_errexit2( exitcode, facet, otherfacet )
- return exitcode to system after an error
- report two facets
-
- returns:
- assumes exitcode non-zero
-
- see:
- normally use qh_errexit() in user.c (reports a facet and a ridge)
-*/
-void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet) {
-
- qh_errprint("ERRONEOUS", facet, otherfacet, NULL, NULL);
- qh_errexit (exitcode, NULL, NULL);
-} /* errexit2 */
-
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="findhorizon">-</a>
-
- qh_findhorizon( point, facet, goodvisible, goodhorizon )
- given a visible facet, find the point's horizon and visible facets
- for all facets, !facet-visible
-
- returns:
- returns qh.visible_list/num_visible with all visible facets
- marks visible facets with ->visible
- updates count of good visible and good horizon facets
- updates qh.max_outside, qh.max_vertex, facet->maxoutside
-
- see:
- similar to qh_delpoint()
-
- design:
- move facet to qh.visible_list at end of qh.facet_list
- for all visible facets
- for each unvisited neighbor of a visible facet
- compute distance of point to neighbor
- if point above neighbor
- move neighbor to end of qh.visible_list
- else if point is coplanar with neighbor
- update qh.max_outside, qh.max_vertex, neighbor->maxoutside
- mark neighbor coplanar (will create a samecycle later)
- update horizon statistics
-*/
-void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible, int *goodhorizon) {
- facetT *neighbor, **neighborp, *visible;
- int numhorizon= 0, coplanar= 0;
- realT dist;
-
- trace1((qh ferr,"qh_findhorizon: find horizon for point p%d facet f%d\n",qh_pointid(point),facet->id));
- *goodvisible= *goodhorizon= 0;
- zinc_(Ztotvisible);
- qh_removefacet(facet); /* visible_list at end of qh facet_list */
- qh_appendfacet(facet);
- qh num_visible= 1;
- if (facet->good)
- (*goodvisible)++;
- qh visible_list= facet;
- facet->visible= True;
- facet->f.replace= NULL;
- if (qh IStracing >=4)
- qh_errprint ("visible", facet, NULL, NULL, NULL);
- qh visit_id++;
- FORALLvisible_facets {
- if (visible->tricoplanar && !qh TRInormals) {
- fprintf (qh ferr, "qh_findhorizon: does not work for tricoplanar facets. Use option 'Q11'\n");
- qh_errexit (qh_ERRqhull, visible, NULL);
- }
- visible->visitid= qh visit_id;
- FOREACHneighbor_(visible) {
- if (neighbor->visitid == qh visit_id)
- continue;
- neighbor->visitid= qh visit_id;
- zzinc_(Znumvisibility);
- qh_distplane(point, neighbor, &dist);
- if (dist > qh MINvisible) {
- zinc_(Ztotvisible);
- qh_removefacet(neighbor); /* append to end of qh visible_list */
- qh_appendfacet(neighbor);
- neighbor->visible= True;
- neighbor->f.replace= NULL;
- qh num_visible++;
- if (neighbor->good)
- (*goodvisible)++;
- if (qh IStracing >=4)
- qh_errprint ("visible", neighbor, NULL, NULL, NULL);
- }else {
- if (dist > - qh MAXcoplanar) {
- neighbor->coplanar= True;
- zzinc_(Zcoplanarhorizon);
- qh_precision ("coplanar horizon");
- coplanar++;
- if (qh MERGING) {
- if (dist > 0) {
- maximize_(qh max_outside, dist);
- maximize_(qh max_vertex, dist);
-#if qh_MAXoutside
- maximize_(neighbor->maxoutside, dist);
-#endif
- }else
- minimize_(qh min_vertex, dist); /* due to merge later */
- }
- trace2((qh ferr, "qh_findhorizon: point p%d is coplanar to horizon f%d, dist=%2.7g < qh MINvisible (%2.7g)\n",
- qh_pointid(point), neighbor->id, dist, qh MINvisible));
- }else
- neighbor->coplanar= False;
- zinc_(Ztothorizon);
- numhorizon++;
- if (neighbor->good)
- (*goodhorizon)++;
- if (qh IStracing >=4)
- qh_errprint ("horizon", neighbor, NULL, NULL, NULL);
- }
- }
- }
- if (!numhorizon) {
- qh_precision ("empty horizon");
- fprintf(qh ferr, "qhull precision error (qh_findhorizon): empty horizon\n\
-Point p%d was above all facets.\n", qh_pointid(point));
- qh_printfacetlist (qh facet_list, NULL, True);
- qh_errexit(qh_ERRprec, NULL, NULL);
- }
- trace1((qh ferr, "qh_findhorizon: %d horizon facets (good %d), %d visible (good %d), %d coplanar\n",
- numhorizon, *goodhorizon, qh num_visible, *goodvisible, coplanar));
- if (qh IStracing >= 4 && qh num_facets < 50)
- qh_printlists ();
-} /* findhorizon */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="nextfurthest">-</a>
-
- qh_nextfurthest( visible )
- returns next furthest point and visible facet for qh_addpoint()
- starts search at qh.facet_next
-
- returns:
- removes furthest point from outside set
- NULL if none available
- advances qh.facet_next over facets with empty outside sets
-
- design:
- for each facet from qh.facet_next
- if empty outside set
- advance qh.facet_next
- else if qh.NARROWhull
- determine furthest outside point
- if furthest point is not outside
- advance qh.facet_next (point will be coplanar)
- remove furthest point from outside set
-*/
-pointT *qh_nextfurthest (facetT **visible) {
- facetT *facet;
- int size, index;
- realT randr, dist;
- pointT *furthest;
-
- while ((facet= qh facet_next) != qh facet_tail) {
- if (!facet->outsideset) {
- qh facet_next= facet->next;
- continue;
- }
- SETreturnsize_(facet->outsideset, size);
- if (!size) {
- qh_setfree (&facet->outsideset);
- qh facet_next= facet->next;
- continue;
- }
- if (qh NARROWhull) {
- if (facet->notfurthest)
- qh_furthestout (facet);
- furthest= (pointT*)qh_setlast (facet->outsideset);
-#if qh_COMPUTEfurthest
- qh_distplane (furthest, facet, &dist);
- zinc_(Zcomputefurthest);
-#else
- dist= facet->furthestdist;
-#endif
- if (dist < qh MINoutside) { /* remainder of outside set is coplanar for qh_outcoplanar */
- qh facet_next= facet->next;
- continue;
- }
- }
- if (!qh RANDOMoutside && !qh VIRTUALmemory) {
- if (qh PICKfurthest) {
- qh_furthestnext (/* qh facet_list */);
- facet= qh facet_next;
- }
- *visible= facet;
- return ((pointT*)qh_setdellast (facet->outsideset));
- }
- if (qh RANDOMoutside) {
- int outcoplanar = 0;
- if (qh NARROWhull) {
- FORALLfacets {
- if (facet == qh facet_next)
- break;
- if (facet->outsideset)
- outcoplanar += qh_setsize( facet->outsideset);
- }
- }
- randr= qh_RANDOMint;
- randr= randr/(qh_RANDOMmax+1);
- index= (int)floor((qh num_outside - outcoplanar) * randr);
- FORALLfacet_(qh facet_next) {
- if (facet->outsideset) {
- SETreturnsize_(facet->outsideset, size);
- if (!size)
- qh_setfree (&facet->outsideset);
- else if (size > index) {
- *visible= facet;
- return ((pointT*)qh_setdelnth (facet->outsideset, index));
- }else
- index -= size;
- }
- }
- fprintf (qh ferr, "qhull internal error (qh_nextfurthest): num_outside %d is too low\nby at least %d, or a random real %g >= 1.0\n",
- qh num_outside, index+1, randr);
- qh_errexit (qh_ERRqhull, NULL, NULL);
- }else { /* VIRTUALmemory */
- facet= qh facet_tail->previous;
- if (!(furthest= (pointT*)qh_setdellast(facet->outsideset))) {
- if (facet->outsideset)
- qh_setfree (&facet->outsideset);
- qh_removefacet (facet);
- qh_prependfacet (facet, &qh facet_list);
- continue;
- }
- *visible= facet;
- return furthest;
- }
- }
- return NULL;
-} /* nextfurthest */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="partitionall">-</a>
-
- qh_partitionall( vertices, points, numpoints )
- partitions all points in points/numpoints to the outsidesets of facets
- vertices= vertices in qh.facet_list (not partitioned)
-
- returns:
- builds facet->outsideset
- does not partition qh.GOODpoint
- if qh.ONLYgood && !qh.MERGING,
- does not partition qh.GOODvertex
-
- notes:
- faster if qh.facet_list sorted by anticipated size of outside set
-
- design:
- initialize pointset with all points
- remove vertices from pointset
- remove qh.GOODpointp from pointset (unless it's qh.STOPcone or qh.STOPpoint)
- for all facets
- for all remaining points in pointset
- compute distance from point to facet
- if point is outside facet
- remove point from pointset (by not reappending)
- update bestpoint
- append point or old bestpoint to facet's outside set
- append bestpoint to facet's outside set (furthest)
- for all points remaining in pointset
- partition point into facets' outside sets and coplanar sets
-*/
-void qh_partitionall(setT *vertices, pointT *points, int numpoints){
- setT *pointset;
- vertexT *vertex, **vertexp;
- pointT *point, **pointp, *bestpoint;
- int size, point_i, point_n, point_end, remaining, i, id;
- facetT *facet;
- realT bestdist= -REALmax, dist, distoutside;
-
- trace1((qh ferr, "qh_partitionall: partition all points into outside sets\n"));
- pointset= qh_settemp (numpoints);
- qh num_outside= 0;
- pointp= SETaddr_(pointset, pointT);
- for (i=numpoints, point= points; i--; point += qh hull_dim)
- *(pointp++)= point;
- qh_settruncate (pointset, numpoints);
- FOREACHvertex_(vertices) {
- if ((id= qh_pointid(vertex->point)) >= 0)
- SETelem_(pointset, id)= NULL;
- }
- id= qh_pointid (qh GOODpointp);
- if (id >=0 && qh STOPcone-1 != id && -qh STOPpoint-1 != id)
- SETelem_(pointset, id)= NULL;
- if (qh GOODvertexp && qh ONLYgood && !qh MERGING) { /* matches qhull()*/
- if ((id= qh_pointid(qh GOODvertexp)) >= 0)
- SETelem_(pointset, id)= NULL;
- }
- if (!qh BESToutside) { /* matches conditional for qh_partitionpoint below */
- distoutside= qh_DISToutside; /* multiple of qh.MINoutside & qh.max_outside, see user.h */
- zval_(Ztotpartition)= qh num_points - qh hull_dim - 1; /*misses GOOD... */
- remaining= qh num_facets;
- point_end= numpoints;
- FORALLfacets {
- size= point_end/(remaining--) + 100;
- facet->outsideset= qh_setnew (size);
- bestpoint= NULL;
- point_end= 0;
- FOREACHpoint_i_(pointset) {
- if (point) {
- zzinc_(Zpartitionall);
- qh_distplane (point, facet, &dist);
- if (dist < distoutside)
- SETelem_(pointset, point_end++)= point;
- else {
- qh num_outside++;
- if (!bestpoint) {
- bestpoint= point;
- bestdist= dist;
- }else if (dist > bestdist) {
- qh_setappend (&facet->outsideset, bestpoint);
- bestpoint= point;
- bestdist= dist;
- }else
- qh_setappend (&facet->outsideset, point);
- }
- }
- }
- if (bestpoint) {
- qh_setappend (&facet->outsideset, bestpoint);
-#if !qh_COMPUTEfurthest
- facet->furthestdist= bestdist;
-#endif
- }else
- qh_setfree (&facet->outsideset);
- qh_settruncate (pointset, point_end);
- }
- }
- /* if !qh BESToutside, pointset contains points not assigned to outsideset */
- if (qh BESToutside || qh MERGING || qh KEEPcoplanar || qh KEEPinside) {
- qh findbestnew= True;
- FOREACHpoint_i_(pointset) {
- if (point)
- qh_partitionpoint(point, qh facet_list);
- }
- qh findbestnew= False;
- }
- zzadd_(Zpartitionall, zzval_(Zpartition));
- zzval_(Zpartition)= 0;
- qh_settempfree(&pointset);
- if (qh IStracing >= 4)
- qh_printfacetlist (qh facet_list, NULL, True);
-} /* partitionall */
-
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="partitioncoplanar">-</a>
-
- qh_partitioncoplanar( point, facet, dist )
- partition coplanar point to a facet
- dist is distance from point to facet
- if dist NULL,
- searches for bestfacet and does nothing if inside
- if qh.findbestnew set,
- searches new facets instead of using qh_findbest()
-
- returns:
- qh.max_ouside updated
- if qh.KEEPcoplanar or qh.KEEPinside
- point assigned to best coplanarset
-
- notes:
- facet->maxoutside is updated at end by qh_check_maxout
-
- design:
- if dist undefined
- find best facet for point
- if point sufficiently below facet (depends on qh.NEARinside and qh.KEEPinside)
- exit
- if keeping coplanar/nearinside/inside points
- if point is above furthest coplanar point
- append point to coplanar set (it is the new furthest)
- update qh.max_outside
- else
- append point one before end of coplanar set
- else if point is clearly outside of qh.max_outside and bestfacet->coplanarset
- and bestfacet is more than perpendicular to facet
- repartition the point using qh_findbest() -- it may be put on an outsideset
- else
- update qh.max_outside
-*/
-void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist) {
- facetT *bestfacet;
- pointT *oldfurthest;
- realT bestdist, dist2, angle;
- int numpart= 0, oldfindbest;
- boolT isoutside;
-
- qh WAScoplanar= True;
- if (!dist) {
- if (qh findbestnew)
- bestfacet= qh_findbestnew (point, facet, &bestdist, qh_ALL, &isoutside, &numpart);
- else
- bestfacet= qh_findbest (point, facet, qh_ALL, !qh_ISnewfacets, qh DELAUNAY,
- &bestdist, &isoutside, &numpart);
- zinc_(Ztotpartcoplanar);
- zzadd_(Zpartcoplanar, numpart);
- if (!qh DELAUNAY && !qh KEEPinside) { /* for 'd', bestdist skips upperDelaunay facets */
- if (qh KEEPnearinside) {
- if (bestdist < -qh NEARinside) {
- zinc_(Zcoplanarinside);
- trace4((qh ferr, "qh_partitioncoplanar: point p%d is more than near-inside facet f%d dist %2.2g findbestnew %d\n",
- qh_pointid(point), bestfacet->id, bestdist, qh findbestnew));
- return;
- }
- }else if (bestdist < -qh MAXcoplanar) {
- trace4((qh ferr, "qh_partitioncoplanar: point p%d is inside facet f%d dist %2.2g findbestnew %d\n",
- qh_pointid(point), bestfacet->id, bestdist, qh findbestnew));
- zinc_(Zcoplanarinside);
- return;
- }
- }
- }else {
- bestfacet= facet;
- bestdist= *dist;
- }
- if (bestdist > qh max_outside) {
- if (!dist && facet != bestfacet) {
- zinc_(Zpartangle);
- angle= qh_getangle(facet->normal, bestfacet->normal);
- if (angle < 0) {
- /* typically due to deleted vertex and coplanar facets, e.g.,
- RBOX 1000 s Z1 G1e-13 t1001185205 | QHULL Tv */
- zinc_(Zpartflip);
- trace2((qh ferr, "qh_partitioncoplanar: repartition point p%d from f%d. It is above flipped facet f%d dist %2.2g\n",
- qh_pointid(point), facet->id, bestfacet->id, bestdist));
- oldfindbest= qh findbestnew;
- qh findbestnew= False;
- qh_partitionpoint(point, bestfacet);
- qh findbestnew= oldfindbest;
- return;
- }
- }
- qh max_outside= bestdist;
- if (bestdist > qh TRACEdist) {
- fprintf (qh ferr, "qh_partitioncoplanar: ====== p%d from f%d increases max_outside to %2.2g of f%d last p%d\n",
- qh_pointid(point), facet->id, bestdist, bestfacet->id, qh furthest_id);
- qh_errprint ("DISTANT", facet, bestfacet, NULL, NULL);
- }
- }
- if (qh KEEPcoplanar + qh KEEPinside + qh KEEPnearinside) {
- oldfurthest= (pointT*)qh_setlast (bestfacet->coplanarset);
- if (oldfurthest) {
- zinc_(Zcomputefurthest);
- qh_distplane (oldfurthest, bestfacet, &dist2);
- }
- if (!oldfurthest || dist2 < bestdist)
- qh_setappend(&bestfacet->coplanarset, point);
- else
- qh_setappend2ndlast(&bestfacet->coplanarset, point);
- }
- trace4((qh ferr, "qh_partitioncoplanar: point p%d is coplanar with facet f%d (or inside) dist %2.2g\n",
- qh_pointid(point), bestfacet->id, bestdist));
-} /* partitioncoplanar */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="partitionpoint">-</a>
-
- qh_partitionpoint( point, facet )
- assigns point to an outside set, coplanar set, or inside set (i.e., dropt)
- if qh.findbestnew
- uses qh_findbestnew() to search all new facets
- else
- uses qh_findbest()
-
- notes:
- after qh_distplane(), this and qh_findbest() are most expensive in 3-d
-
- design:
- find best facet for point
- (either exhaustive search of new facets or directed search from facet)
- if qh.NARROWhull
- retain coplanar and nearinside points as outside points
- if point is outside bestfacet
- if point above furthest point for bestfacet
- append point to outside set (it becomes the new furthest)
- if outside set was empty
- move bestfacet to end of qh.facet_list (i.e., after qh.facet_next)
- update bestfacet->furthestdist
- else
- append point one before end of outside set
- else if point is coplanar to bestfacet
- if keeping coplanar points or need to update qh.max_outside
- partition coplanar point into bestfacet
- else if near-inside point
- partition as coplanar point into bestfacet
- else is an inside point
- if keeping inside points
- partition as coplanar point into bestfacet
-*/
-void qh_partitionpoint (pointT *point, facetT *facet) {
- realT bestdist;
- boolT isoutside;
- facetT *bestfacet;
- int numpart;
-#if qh_COMPUTEfurthest
- realT dist;
-#endif
-
- if (qh findbestnew)
- bestfacet= qh_findbestnew (point, facet, &bestdist, qh BESToutside, &isoutside, &numpart);
- else
- bestfacet= qh_findbest (point, facet, qh BESToutside, qh_ISnewfacets, !qh_NOupper,
- &bestdist, &isoutside, &numpart);
- zinc_(Ztotpartition);
- zzadd_(Zpartition, numpart);
- if (qh NARROWhull) {
- if (qh DELAUNAY && !isoutside && bestdist >= -qh MAXcoplanar)
- qh_precision ("nearly incident point (narrow hull)");
- if (qh KEEPnearinside) {
- if (bestdist >= -qh NEARinside)
- isoutside= True;
- }else if (bestdist >= -qh MAXcoplanar)
- isoutside= True;
- }
-
- if (isoutside) {
- if (!bestfacet->outsideset
- || !qh_setlast (bestfacet->outsideset)) {
- qh_setappend(&(bestfacet->outsideset), point);
- if (!bestfacet->newfacet) {
- qh_removefacet (bestfacet); /* make sure it's after qh facet_next */
- qh_appendfacet (bestfacet);
- }
-#if !qh_COMPUTEfurthest
- bestfacet->furthestdist= bestdist;
-#endif
- }else {
-#if qh_COMPUTEfurthest
- zinc_(Zcomputefurthest);
- qh_distplane (oldfurthest, bestfacet, &dist);
- if (dist < bestdist)
- qh_setappend(&(bestfacet->outsideset), point);
- else
- qh_setappend2ndlast(&(bestfacet->outsideset), point);
-#else
- if (bestfacet->furthestdist < bestdist) {
- qh_setappend(&(bestfacet->outsideset), point);
- bestfacet->furthestdist= bestdist;
- }else
- qh_setappend2ndlast(&(bestfacet->outsideset), point);
-#endif
- }
- qh num_outside++;
- trace4((qh ferr, "qh_partitionpoint: point p%d is outside facet f%d new? %d(or narrowhull)\n",
- qh_pointid(point), bestfacet->id, bestfacet->newfacet));
- }else if (qh DELAUNAY || bestdist >= -qh MAXcoplanar) { /* for 'd', bestdist skips upperDelaunay facets */
- zzinc_(Zcoplanarpart);
- if (qh DELAUNAY)
- qh_precision ("nearly incident point");
- if ((qh KEEPcoplanar + qh KEEPnearinside) || bestdist > qh max_outside)
- qh_partitioncoplanar (point, bestfacet, &bestdist);
- else {
- trace4((qh ferr, "qh_partitionpoint: point p%d is coplanar to facet f%d (dropped)\n",
- qh_pointid(point), bestfacet->id));
- }
- }else if (qh KEEPnearinside && bestdist > -qh NEARinside) {
- zinc_(Zpartnear);
- qh_partitioncoplanar (point, bestfacet, &bestdist);
- }else {
- zinc_(Zpartinside);
- trace4((qh ferr, "qh_partitionpoint: point p%d is inside all facets, closest to f%d dist %2.2g\n",
- qh_pointid(point), bestfacet->id, bestdist));
- if (qh KEEPinside)
- qh_partitioncoplanar (point, bestfacet, &bestdist);
- }
-} /* partitionpoint */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="partitionvisible">-</a>
-
- qh_partitionvisible( allpoints, numoutside )
- partitions points in visible facets to qh.newfacet_list
- qh.visible_list= visible facets
- for visible facets
- 1st neighbor (if any) points to a horizon facet or a new facet
- if allpoints (not used),
- repartitions coplanar points
-
- returns:
- updates outside sets and coplanar sets of qh.newfacet_list
- updates qh.num_outside (count of outside points)
-
- notes:
- qh.findbest_notsharp should be clear (extra work if set)
-
- design:
- for all visible facets with outside set or coplanar set
- select a newfacet for visible facet
- if outside set
- partition outside set into new facets
- if coplanar set and keeping coplanar/near-inside/inside points
- if allpoints
- partition coplanar set into new facets, may be assigned outside
- else
- partition coplanar set into coplanar sets of new facets
- for each deleted vertex
- if allpoints
- partition vertex into new facets, may be assigned outside
- else
- partition vertex into coplanar sets of new facets
-*/
-void qh_partitionvisible(/*visible_list*/ boolT allpoints, int *numoutside) {
- facetT *visible, *newfacet;
- pointT *point, **pointp;
- int coplanar=0, size;
- unsigned count;
- vertexT *vertex, **vertexp;
-
- if (qh ONLYmax)
- maximize_(qh MINoutside, qh max_vertex);
- *numoutside= 0;
- FORALLvisible_facets {
- if (!visible->outsideset && !visible->coplanarset)
- continue;
- newfacet= visible->f.replace;
- count= 0;
- while (newfacet && newfacet->visible) {
- newfacet= newfacet->f.replace;
- if (count++ > qh facet_id)
- qh_infiniteloop (visible);
- }
- if (!newfacet)
- newfacet= qh newfacet_list;
- if (newfacet == qh facet_tail) {
- fprintf (qh ferr, "qhull precision error (qh_partitionvisible): all new facets deleted as\n degenerate facets. Can not continue.\n");
- qh_errexit (qh_ERRprec, NULL, NULL);
- }
- if (visible->outsideset) {
- size= qh_setsize (visible->outsideset);
- *numoutside += size;
- qh num_outside -= size;
- FOREACHpoint_(visible->outsideset)
- qh_partitionpoint (point, newfacet);
- }
- if (visible->coplanarset && (qh KEEPcoplanar + qh KEEPinside + qh KEEPnearinside)) {
- size= qh_setsize (visible->coplanarset);
- coplanar += size;
- FOREACHpoint_(visible->coplanarset) {
- if (allpoints) /* not used */
- qh_partitionpoint (point, newfacet);
- else
- qh_partitioncoplanar (point, newfacet, NULL);
- }
- }
- }
- FOREACHvertex_(qh del_vertices) {
- if (vertex->point) {
- if (allpoints) /* not used */
- qh_partitionpoint (vertex->point, qh newfacet_list);
- else
- qh_partitioncoplanar (vertex->point, qh newfacet_list, NULL);
- }
- }
- trace1((qh ferr,"qh_partitionvisible: partitioned %d points from outsidesets and %d points from coplanarsets\n", *numoutside, coplanar));
-} /* partitionvisible */
-
-
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="precision">-</a>
-
- qh_precision( reason )
- restart on precision errors if not merging and if 'QJn'
-*/
-void qh_precision (char *reason) {
-
- if (qh ALLOWrestart && !qh PREmerge && !qh MERGEexact) {
- if (qh JOGGLEmax < REALmax/2) {
- trace0((qh ferr, "qh_precision: qhull restart because of %s\n", reason));
- longjmp(qh restartexit, qh_ERRprec);
- }
- }
-} /* qh_precision */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="printsummary">-</a>
-
- qh_printsummary( fp )
- prints summary to fp
-
- notes:
- not in io.c so that user_eg.c can prevent io.c from loading
- qh_printsummary and qh_countfacets must match counts
-
- design:
- determine number of points, vertices, and coplanar points
- print summary
-*/
-void qh_printsummary(FILE *fp) {
- realT ratio, outerplane, innerplane;
- float cpu;
- int size, id, nummerged, numvertices, numcoplanars= 0, nonsimplicial=0;
- int goodused;
- facetT *facet;
- char *s;
- int numdel= zzval_(Zdelvertextot);
- int numtricoplanars= 0;
-
- size= qh num_points + qh_setsize (qh other_points);
- numvertices= qh num_vertices - qh_setsize (qh del_vertices);
- id= qh_pointid (qh GOODpointp);
- FORALLfacets {
- if (facet->coplanarset)
- numcoplanars += qh_setsize( facet->coplanarset);
- if (facet->good) {
- if (facet->simplicial) {
- if (facet->keepcentrum && facet->tricoplanar)
- numtricoplanars++;
- }else if (qh_setsize(facet->vertices) != qh hull_dim)
- nonsimplicial++;
- }
- }
- if (id >=0 && qh STOPcone-1 != id && -qh STOPpoint-1 != id)
- size--;
- if (qh STOPcone || qh STOPpoint)
- fprintf (fp, "\nAt a premature exit due to 'TVn', 'TCn', 'TRn', or precision error.");
- if (qh UPPERdelaunay)
- goodused= qh GOODvertex + qh GOODpoint + qh SPLITthresholds;
- else if (qh DELAUNAY)
- goodused= qh GOODvertex + qh GOODpoint + qh GOODthreshold;
- else
- goodused= qh num_good;
- nummerged= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
- if (qh VORONOI) {
- if (qh UPPERdelaunay)
- fprintf (fp, "\n\
-Furthest-site Voronoi vertices by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- else
- fprintf (fp, "\n\
-Voronoi diagram by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- fprintf(fp, " Number of Voronoi regions%s: %d\n",
- qh ATinfinity ? " and at-infinity" : "", numvertices);
- if (numdel)
- fprintf(fp, " Total number of deleted points due to merging: %d\n", numdel);
- if (numcoplanars - numdel > 0)
- fprintf(fp, " Number of nearly incident points: %d\n", numcoplanars - numdel);
- else if (size - numvertices - numdel > 0)
- fprintf(fp, " Total number of nearly incident points: %d\n", size - numvertices - numdel);
- fprintf(fp, " Number of%s Voronoi vertices: %d\n",
- goodused ? " 'good'" : "", qh num_good);
- if (nonsimplicial)
- fprintf(fp, " Number of%s non-simplicial Voronoi vertices: %d\n",
- goodused ? " 'good'" : "", nonsimplicial);
- }else if (qh DELAUNAY) {
- if (qh UPPERdelaunay)
- fprintf (fp, "\n\
-Furthest-site Delaunay triangulation by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- else
- fprintf (fp, "\n\
-Delaunay triangulation by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- fprintf(fp, " Number of input sites%s: %d\n",
- qh ATinfinity ? " and at-infinity" : "", numvertices);
- if (numdel)
- fprintf(fp, " Total number of deleted points due to merging: %d\n", numdel);
- if (numcoplanars - numdel > 0)
- fprintf(fp, " Number of nearly incident points: %d\n", numcoplanars - numdel);
- else if (size - numvertices - numdel > 0)
- fprintf(fp, " Total number of nearly incident points: %d\n", size - numvertices - numdel);
- fprintf(fp, " Number of%s Delaunay regions: %d\n",
- goodused ? " 'good'" : "", qh num_good);
- if (nonsimplicial)
- fprintf(fp, " Number of%s non-simplicial Delaunay regions: %d\n",
- goodused ? " 'good'" : "", nonsimplicial);
- }else if (qh HALFspace) {
- fprintf (fp, "\n\
-Halfspace intersection by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- fprintf(fp, " Number of halfspaces: %d\n", size);
- fprintf(fp, " Number of non-redundant halfspaces: %d\n", numvertices);
- if (numcoplanars) {
- if (qh KEEPinside && qh KEEPcoplanar)
- s= "similar and redundant";
- else if (qh KEEPinside)
- s= "redundant";
- else
- s= "similar";
- fprintf(fp, " Number of %s halfspaces: %d\n", s, numcoplanars);
- }
- fprintf(fp, " Number of intersection points: %d\n", qh num_facets - qh num_visible);
- if (goodused)
- fprintf(fp, " Number of 'good' intersection points: %d\n", qh num_good);
- if (nonsimplicial)
- fprintf(fp, " Number of%s non-simplicial intersection points: %d\n",
- goodused ? " 'good'" : "", nonsimplicial);
- }else {
- fprintf (fp, "\n\
-Convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
- fprintf(fp, " Number of vertices: %d\n", numvertices);
- if (numcoplanars) {
- if (qh KEEPinside && qh KEEPcoplanar)
- s= "coplanar and interior";
- else if (qh KEEPinside)
- s= "interior";
- else
- s= "coplanar";
- fprintf(fp, " Number of %s points: %d\n", s, numcoplanars);
- }
- fprintf(fp, " Number of facets: %d\n", qh num_facets - qh num_visible);
- if (goodused)
- fprintf(fp, " Number of 'good' facets: %d\n", qh num_good);
- if (nonsimplicial)
- fprintf(fp, " Number of%s non-simplicial facets: %d\n",
- goodused ? " 'good'" : "", nonsimplicial);
- }
- if (numtricoplanars)
- fprintf(fp, " Number of triangulated facets: %d\n", numtricoplanars);
- fprintf(fp, "\nStatistics for: %s | %s",
- qh rbox_command, qh qhull_command);
- if (qh ROTATErandom != INT_MIN)
- fprintf(fp, " QR%d\n\n", qh ROTATErandom);
- else
- fprintf(fp, "\n\n");
- fprintf(fp, " Number of points processed: %d\n", zzval_(Zprocessed));
- fprintf(fp, " Number of hyperplanes created: %d\n", zzval_(Zsetplane));
- if (qh DELAUNAY)
- fprintf(fp, " Number of facets in hull: %d\n", qh num_facets - qh num_visible);
- fprintf(fp, " Number of distance tests for qhull: %d\n", zzval_(Zpartition)+
- zzval_(Zpartitionall)+zzval_(Znumvisibility)+zzval_(Zpartcoplanar));
-#if 0 /* NOTE: must print before printstatistics() */
- {realT stddev, ave;
- fprintf(fp, " average new facet balance: %2.2g\n",
- wval_(Wnewbalance)/zval_(Zprocessed));
- stddev= qh_stddev (zval_(Zprocessed), wval_(Wnewbalance),
- wval_(Wnewbalance2), &ave);
- fprintf(fp, " new facet standard deviation: %2.2g\n", stddev);
- fprintf(fp, " average partition balance: %2.2g\n",
- wval_(Wpbalance)/zval_(Zpbalance));
- stddev= qh_stddev (zval_(Zpbalance), wval_(Wpbalance),
- wval_(Wpbalance2), &ave);
- fprintf(fp, " partition standard deviation: %2.2g\n", stddev);
- }
-#endif
- if (nummerged) {
- fprintf(fp," Number of distance tests for merging: %d\n",zzval_(Zbestdist)+
- zzval_(Zcentrumtests)+zzval_(Zdistconvex)+zzval_(Zdistcheck)+
- zzval_(Zdistzero));
- fprintf(fp," Number of distance tests for checking: %d\n",zzval_(Zcheckpart));
- fprintf(fp," Number of merged facets: %d\n", nummerged);
- }
- if (!qh RANDOMoutside && qh QHULLfinished) {
- cpu= qh hulltime;
- cpu /= qh_SECticks;
- wval_(Wcpu)= cpu;
- fprintf (fp, " CPU seconds to compute hull (after input): %2.4g\n", cpu);
- }
- if (qh RERUN) {
- if (!qh PREmerge && !qh MERGEexact)
- fprintf(fp, " Percentage of runs with precision errors: %4.1f\n",
- zzval_(Zretry)*100.0/qh build_cnt); /* careful of order */
- }else if (qh JOGGLEmax < REALmax/2) {
- if (zzval_(Zretry))
- fprintf(fp, " After %d retries, input joggled by: %2.2g\n",
- zzval_(Zretry), qh JOGGLEmax);
- else
- fprintf(fp, " Input joggled by: %2.2g\n", qh JOGGLEmax);
- }
- if (qh totarea != 0.0)
- fprintf(fp, " %s facet area: %2.8g\n",
- zzval_(Ztotmerge) ? "Approximate" : "Total", qh totarea);
- if (qh totvol != 0.0)
- fprintf(fp, " %s volume: %2.8g\n",
- zzval_(Ztotmerge) ? "Approximate" : "Total", qh totvol);
- if (qh MERGING) {
- qh_outerinner (NULL, &outerplane, &innerplane);
- if (outerplane > 2 * qh DISTround) {
- fprintf(fp, " Maximum distance of %spoint above facet: %2.2g",
- (qh QHULLfinished ? "" : "merged "), outerplane);
- ratio= outerplane/(qh ONEmerge + qh DISTround);
- /* don't report ratio if MINoutside is large */
- if (ratio > 0.05 && 2* qh ONEmerge > qh MINoutside && qh JOGGLEmax > REALmax/2)
- fprintf (fp, " (%.1fx)\n", ratio);
- else
- fprintf (fp, "\n");
- }
- if (innerplane < -2 * qh DISTround) {
- fprintf(fp, " Maximum distance of %svertex below facet: %2.2g",
- (qh QHULLfinished ? "" : "merged "), innerplane);
- ratio= -innerplane/(qh ONEmerge+qh DISTround);
- if (ratio > 0.05 && qh JOGGLEmax > REALmax/2)
- fprintf (fp, " (%.1fx)\n", ratio);
- else
- fprintf (fp, "\n");
- }
- }
- fprintf(fp, "\n");
-} /* printsummary */
-
-
diff --git a/extern/qhull/src/qhull.h b/extern/qhull/src/qhull.h
deleted file mode 100644
index 896ec1e9c18..00000000000
--- a/extern/qhull/src/qhull.h
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhull.h
- user-level header file for using qhull.a library
-
- see qh-qhull.htm, qhull_a.h
-
- copyright (c) 1993-2002, The Geometry Center
-
- NOTE: access to qh_qh is via the 'qh' macro. This allows
- qh_qh to be either a pointer or a structure. An example
- of using qh is "qh DROPdim" which accesses the DROPdim
- field of qh_qh. Similarly, access to qh_qhstat is via
- the 'qhstat' macro.
-
- includes function prototypes for qhull.c, geom.c, global.c, io.c, user.c
-
- use mem.h for mem.c
- use qset.h for qset.c
-
- see unix.c for an example of using qhull.h
-
- recompile qhull if you change this file
-*/
-
-#ifndef qhDEFqhull
-#define qhDEFqhull 1
-
-/*=========================== -included files ==============*/
-
-#include <setjmp.h>
-#include <float.h>
-#include <time.h>
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <Desk.h>
-#endif
-
-#ifndef __STDC__
-#ifndef __cplusplus
-#if !_MSC_VER
-#error Neither __STDC__ nor __cplusplus is defined. Please use strict ANSI C or C++ to compile
-#error Qhull. You may need to turn off compiler extensions in your project configuration. If
-#error your compiler is a standard C compiler, you can delete this warning from qhull.h
-#endif
-#endif
-#endif
-
-#include "user.h" /* user defineable constants */
-
-/*============ constants and basic types ====================*/
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_VERSION">-</a>
-
- qh_VERSION
- version string by year and date
-
- the revision increases on code changes only
-
- notes:
- change date: Changes.txt, Announce.txt, README.txt, qhull.man
- qhull-news.html, Eudora signatures,
- change version: README.txt, qhull.html, file_id.diz, Makefile
- change year: Copying.txt
- check download size
- recompile user_eg.c, rbox.c, qhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c
- make copy of qhull-news.html as qh-news.htm
-*/
-
-#define qh_VERSION "2002.1 2002/8/20"
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="coordT">-</a>
-
- coordT
- coordinates and coefficients are stored as realT (i.e., double)
-
- notes:
- could use 'float' for data and 'double' for calculations (realT vs. coordT)
- This requires many type casts, and adjusted error bounds.
- Also C compilers may do expressions in double anyway.
-*/
-#define coordT realT
-
-/*-<a href="qh-geom.htm#TOC"
- >--------------------------------</a><a name="pointT">-</a>
-
- pointT
- a point is an array of DIM3 coordinates
-*/
-#define pointT coordT
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="flagT">-</a>
-
- flagT
- Boolean flag as a bit
-*/
-#define flagT unsigned int
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="boolT">-</a>
-
- boolT
- boolean value, either True or False
-
- notes:
- needed for portability
-*/
-#define boolT unsigned int
-#ifdef False
-#undef False
-#endif
-#ifdef True
-#undef True
-#endif
-#define False 0
-#define True 1
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="CENTERtype">-</a>
-
- qh_CENTER
- to distinguish facet->center
-*/
-typedef enum
-{
- qh_ASnone = 0, qh_ASvoronoi, qh_AScentrum
-}
-qh_CENTER;
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_PRINT">-</a>
-
- qh_PRINT
- output formats for printing (qh.PRINTout).
- 'Fa' 'FV' 'Fc' 'FC'
-
-
- notes:
- some of these names are similar to qh names. The similar names are only
- used in switch statements in qh_printbegin() etc.
-*/
-typedef enum {qh_PRINTnone= 0,
- qh_PRINTarea, qh_PRINTaverage, /* 'Fa' 'FV' 'Fc' 'FC' */
- qh_PRINTcoplanars, qh_PRINTcentrums,
- qh_PRINTfacets, qh_PRINTfacets_xridge, /* 'f' 'FF' 'G' 'FI' 'Fi' 'Fn' */
- qh_PRINTgeom, qh_PRINTids, qh_PRINTinner, qh_PRINTneighbors,
- qh_PRINTnormals, qh_PRINTouter, /* 'n' 'Fo' 'i' 'm' 'Fm' 'o' */
- qh_PRINTincidences, qh_PRINTmathematica, qh_PRINTmerges, qh_PRINToff,
- qh_PRINToptions, qh_PRINTpointintersect, /* 'FO' 'Fp' 'FP' 'p' 'FQ' 'FS' */
- qh_PRINTpointnearest, qh_PRINTpoints, qh_PRINTqhull, qh_PRINTsize,
- qh_PRINTsummary, qh_PRINTtriangles, /* 'Fs' 'Ft' 'Fv' 'FN' 'Fx' */
- qh_PRINTvertices, qh_PRINTvneighbors, qh_PRINTextremes,
- qh_PRINTEND} qh_PRINT;
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_ALL">-</a>
-
- qh_ALL
- argument flag for selecting everything
-*/
-#define qh_ALL True
-#define qh_NOupper True /* argument for qh_findbest */
-#define qh_IScheckmax True /* argument for qh_findbesthorizon */
-#define qh_ISnewfacets True /* argument for qh_findbest */
-#define qh_RESETvisible True /* argument for qh_resetlists */
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="qh_ERR">-</a>
-
- qh_ERR
- Qhull exit codes, for indicating errors
-*/
-#define qh_ERRnone 0 /* no error occurred during qhull */
-#define qh_ERRinput 1 /* input inconsistency */
-#define qh_ERRsingular 2 /* singular input data */
-#define qh_ERRprec 3 /* precision error */
-#define qh_ERRmem 4 /* insufficient memory, matches mem.h */
-#define qh_ERRqhull 5 /* internal error detected, matches mem.h */
-
-/* ============ -structures- ====================
- each of the following structures is defined by a typedef
- all realT and coordT fields occur at the beginning of a structure
- (otherwise space may be wasted due to alignment)
- define all flags together and pack into 32-bit number
-*/
-
-typedef struct vertexT vertexT;
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT; /* defined in qset.h */
-#endif
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="facetT">-</a>
-
- facetT
- defines a facet
-
- notes:
- qhull() generates the hull as a list of facets.
-
- topological information:
- f.previous,next doubly-linked list of facets
- f.vertices set of vertices
- f.ridges set of ridges
- f.neighbors set of neighbors
- f.toporient True if facet has top-orientation (else bottom)
-
- geometric information:
- f.offset,normal hyperplane equation
- f.maxoutside offset to outer plane -- all points inside
- f.center centrum for testing convexity
- f.simplicial True if facet is simplicial
- f.flipped True if facet does not include qh.interior_point
-
- for constructing hull:
- f.visible True if facet on list of visible facets (will be deleted)
- f.newfacet True if facet on list of newly created facets
- f.coplanarset set of points coplanar with this facet
- (includes near-inside points for later testing)
- f.outsideset set of points outside of this facet
- f.furthestdist distance to furthest point of outside set
- f.visitid marks visited facets during a loop
- f.replace replacement facet for to-be-deleted, visible facets
- f.samecycle,newcycle cycle of facets for merging into horizon facet
-
- see below for other flags and fields
-*/
-struct facetT {
-#if !qh_COMPUTEfurthest
- coordT furthestdist;/* distance to furthest point of outsideset */
-#endif
-#if qh_MAXoutside
- coordT maxoutside; /* max computed distance of point to facet
- Before QHULLfinished this is an approximation
- since maxdist not always set for mergefacet
- Actual outer plane is +DISTround and
- computed outer plane is +2*DISTround */
-#endif
- coordT offset; /* exact offset of hyperplane from origin */
- coordT *normal; /* normal of hyperplane, hull_dim coefficients */
- /* if tricoplanar, shared with a neighbor */
- union { /* in order of testing */
- realT area; /* area of facet, only in io.c if ->isarea */
- facetT *replace; /* replacement facet if ->visible and NEWfacets
- is NULL only if qh_mergedegen_redundant or interior */
- facetT *samecycle; /* cycle of facets from the same visible/horizon intersection,
- if ->newfacet */
- facetT *newcycle; /* in horizon facet, current samecycle of new facets */
- facetT *trivisible; /* visible facet for ->tricoplanar facets during qh_triangulate() */
- facetT *triowner; /* owner facet for ->tricoplanar, !isarea facets w/ ->keepcentrum */
- }f;
- coordT *center; /* centrum for convexity, qh CENTERtype == qh_AScentrum */
- /* Voronoi center, qh CENTERtype == qh_ASvoronoi */
- /* if tricoplanar, shared with a neighbor */
- facetT *previous; /* previous facet in the facet_list */
- facetT *next; /* next facet in the facet_list */
- setT *vertices; /* vertices for this facet, inverse sorted by ID
- if simplicial, 1st vertex was apex/furthest */
- setT *ridges; /* explicit ridges for nonsimplicial facets.
- for simplicial facets, neighbors defines ridge */
- setT *neighbors; /* neighbors of the facet. If simplicial, the kth
- neighbor is opposite the kth vertex, and the first
- neighbor is the horizon facet for the first vertex*/
- setT *outsideset; /* set of points outside this facet
- if non-empty, last point is furthest
- if NARROWhull, includes coplanars for partitioning*/
- setT *coplanarset; /* set of points coplanar with this facet
- > qh.min_vertex and <= facet->max_outside
- a point is assigned to the furthest facet
- if non-empty, last point is furthest away */
- unsigned visitid; /* visit_id, for visiting all neighbors,
- all uses are independent */
- unsigned id; /* unique identifier from qh facet_id */
- unsigned nummerge:9; /* number of merges */
-#define qh_MAXnummerge 511 /* 2^9-1, 32 flags total, see "flags:" in io.c */
- flagT tricoplanar:1; /* True if TRIangulate and simplicial and coplanar with a neighbor */
- /* all tricoplanars share the same ->center, ->normal, ->offset, ->maxoutside */
- /* all tricoplanars share the same apex */
- /* if ->degenerate, does not span facet (one logical ridge) */
- /* one tricoplanar has ->keepcentrum and ->coplanarset */
- /* during qh_triangulate, f.trivisible points to original facet */
- flagT newfacet:1; /* True if facet on qh newfacet_list (new or merged) */
- flagT visible:1; /* True if visible facet (will be deleted) */
- flagT toporient:1; /* True if created with top orientation
- after merging, use ridge orientation */
- flagT simplicial:1;/* True if simplicial facet, ->ridges may be implicit */
- flagT seen:1; /* used to perform operations only once, like visitid */
- flagT seen2:1; /* used to perform operations only once, like visitid */
- flagT flipped:1; /* True if facet is flipped */
- flagT upperdelaunay:1; /* True if facet is upper envelope of Delaunay triangulation */
- flagT notfurthest:1; /* True if last point of outsideset is not furthest*/
-
-/*-------- flags primarily for output ---------*/
- flagT good:1; /* True if a facet marked good for output */
- flagT isarea:1; /* True if facet->f.area is defined */
-
-/*-------- flags for merging ------------------*/
- flagT dupridge:1; /* True if duplicate ridge in facet */
- flagT mergeridge:1; /* True if facet or neighbor contains a qh_MERGEridge
- ->normal defined (also defined for mergeridge2) */
- flagT mergeridge2:1; /* True if neighbor contains a qh_MERGEridge (mark_dupridges */
- flagT coplanar:1; /* True if horizon facet is coplanar at last use */
- flagT mergehorizon:1; /* True if will merge into horizon (->coplanar) */
- flagT cycledone:1;/* True if mergecycle_all already done */
- flagT tested:1; /* True if facet convexity has been tested (false after merge */
- flagT keepcentrum:1; /* True if keep old centrum after a merge, or marks owner for ->tricoplanar */
- flagT newmerge:1; /* True if facet is newly merged for reducevertices */
- flagT degenerate:1; /* True if facet is degenerate (degen_mergeset or ->tricoplanar) */
- flagT redundant:1; /* True if facet is redundant (degen_mergeset) */
-};
-
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="ridgeT">-</a>
-
- ridgeT
- defines a ridge
-
- notes:
- a ridge is DIM3-1 simplex between two neighboring facets. If the
- facets are non-simplicial, there may be more than one ridge between
- two facets. E.G. a 4-d hypercube has two triangles between each pair
- of neighboring facets.
-
- topological information:
- vertices a set of vertices
- top,bottom neighboring facets with orientation
-
- geometric information:
- tested True if ridge is clearly convex
- nonconvex True if ridge is non-convex
-*/
-struct ridgeT {
- setT *vertices; /* vertices belonging to this ridge, inverse sorted by ID
- NULL if a degen ridge (matchsame) */
- facetT *top; /* top facet this ridge is part of */
- facetT *bottom; /* bottom facet this ridge is part of */
- unsigned id:24; /* unique identifier, =>room for 8 flags */
- flagT seen:1; /* used to perform operations only once */
- flagT tested:1; /* True when ridge is tested for convexity */
- flagT nonconvex:1; /* True if getmergeset detected a non-convex neighbor
- only one ridge between neighbors may have nonconvex */
-};
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="vertexT">-</a>
-
- vertexT
- defines a vertex
-
- topological information:
- next,previous doubly-linked list of all vertices
- neighbors set of adjacent facets (only if qh.VERTEXneighbors)
-
- geometric information:
- point array of DIM3 coordinates
-*/
-struct vertexT {
- vertexT *next; /* next vertex in vertex_list */
- vertexT *previous; /* previous vertex in vertex_list */
- pointT *point; /* hull_dim coordinates (coordT) */
- setT *neighbors; /* neighboring facets of vertex, qh_vertexneighbors()
- inits in io.c or after first merge */
- unsigned visitid; /* for use with qh vertex_visit */
- unsigned id:24; /* unique identifier, =>room for 8 flags */
- flagT seen:1; /* used to perform operations only once */
- flagT seen2:1; /* another seen flag */
- flagT delridge:1; /* vertex was part of a deleted ridge */
- flagT deleted:1; /* true if vertex on qh del_vertices */
- flagT newlist:1; /* true if vertex on qh newvertex_list */
-};
-
-/*======= -global variables -qh ============================*/
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh">-</a>
-
- qh
- all global variables for qhull are in qh, qhmem, and qhstat
-
- notes:
- qhmem is defined in mem.h and qhstat is defined in stat.h
- access to qh_qh is via the "qh" macro. See qh_QHpointer in user.h
-*/
-typedef struct qhT qhT;
-#if qh_QHpointer
-#define qh qh_qh->
-extern qhT *qh_qh; /* allocated in global.c */
-#else
-#define qh qh_qh.
-extern qhT qh_qh;
-#endif
-
-struct qhT {
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-const">-</a>
-
- qh constants
- configuration flags and constants for Qhull
-
- notes:
- The user configures Qhull by defining flags. They are
- copied into qh by qh_setflags(). qh-quick.htm#options defines the flags.
-*/
- boolT ALLpoints; /* true 'Qs' if search all points for initial simplex */
- boolT ANGLEmerge; /* true 'Qa' if sort potential merges by angle */
- boolT APPROXhull; /* true 'Wn' if MINoutside set */
- realT MINoutside; /* 'Wn' min. distance for an outside point */
- boolT ATinfinity; /* true 'Qz' if point num_points-1 is "at-infinity"
- for improving precision in Delaunay triangulations */
- boolT AVOIDold; /* true 'Q4' if avoid old->new merges */
- boolT BESToutside; /* true 'Qf' if partition points into best outsideset */
- boolT CDDinput; /* true 'Pc' if input uses CDD format (1.0/offset first) */
- boolT CDDoutput; /* true 'PC' if print normals in CDD format (offset first) */
- boolT CHECKfrequently; /* true 'Tc' if checking frequently */
- realT premerge_cos; /* 'A-n' cos_max when pre merging */
- realT postmerge_cos; /* 'An' cos_max when post merging */
- boolT DELAUNAY; /* true 'd' if computing DELAUNAY triangulation */
- boolT DOintersections; /* true 'Gh' if print hyperplane intersections */
- int DROPdim; /* drops dim 'GDn' for 4-d -> 3-d output */
- boolT FORCEoutput; /* true 'Po' if forcing output despite degeneracies */
- int GOODpoint; /* 1+n for 'QGn', good facet if visible/not(-) from point n*/
- pointT *GOODpointp; /* the actual point */
- boolT GOODthreshold; /* true if qh lower_threshold/upper_threshold defined
- false if qh SPLITthreshold */
- int GOODvertex; /* 1+n, good facet if vertex for point n */
- pointT *GOODvertexp; /* the actual point */
- boolT HALFspace; /* true 'Hn,n,n' if halfspace intersection */
- int IStracing; /* trace execution, 0=none, 1=least, 4=most, -1=events */
- int KEEParea; /* 'PAn' number of largest facets to keep */
- boolT KEEPcoplanar; /* true 'Qc' if keeping nearest facet for coplanar points */
- boolT KEEPinside; /* true 'Qi' if keeping nearest facet for inside points
- set automatically if 'd Qc' */
- int KEEPmerge; /* 'PMn' number of facets to keep with most merges */
- realT KEEPminArea; /* 'PFn' minimum facet area to keep */
- realT MAXcoplanar; /* 'Un' max distance below a facet to be coplanar*/
- boolT MERGEexact; /* true 'Qx' if exact merges (coplanar, degen, dupridge, flipped) */
- boolT MERGEindependent; /* true 'Q2' if merging independent sets */
- boolT MERGING; /* true if exact-, pre- or post-merging, with angle and centrum tests */
- realT premerge_centrum; /* 'C-n' centrum_radius when pre merging. Default is round-off */
- realT postmerge_centrum; /* 'Cn' centrum_radius when post merging. Default is round-off */
- boolT MERGEvertices; /* true 'Q3' if merging redundant vertices */
- realT MINvisible; /* 'Vn' min. distance for a facet to be visible */
- boolT NOnarrow; /* true 'Q10' if no special processing for narrow distributions */
- boolT NOnearinside; /* true 'Q8' if ignore near-inside points when partitioning */
- boolT NOpremerge; /* true 'Q0' if no defaults for C-0 or Qx */
- boolT ONLYgood; /* true 'Qg' if process points with good visible or horizon facets */
- boolT ONLYmax; /* true 'Qm' if only process points that increase max_outside */
- boolT PICKfurthest; /* true 'Q9' if process furthest of furthest points*/
- boolT POSTmerge; /* true if merging after buildhull (Cn or An) */
- boolT PREmerge; /* true if merging during buildhull (C-n or A-n) */
- /* NOTE: some of these names are similar to qh_PRINT names */
- boolT PRINTcentrums; /* true 'Gc' if printing centrums */
- boolT PRINTcoplanar; /* true 'Gp' if printing coplanar points */
- int PRINTdim; /* print dimension for Geomview output */
- boolT PRINTdots; /* true 'Ga' if printing all points as dots */
- boolT PRINTgood; /* true 'Pg' if printing good facets */
- boolT PRINTinner; /* true 'Gi' if printing inner planes */
- boolT PRINTneighbors; /* true 'PG' if printing neighbors of good facets */
- boolT PRINTnoplanes; /* true 'Gn' if printing no planes */
- boolT PRINToptions1st; /* true 'FO' if printing options to stderr */
- boolT PRINTouter; /* true 'Go' if printing outer planes */
- boolT PRINTprecision; /* false 'Pp' if not reporting precision problems */
- qh_PRINT PRINTout[qh_PRINTEND]; /* list of output formats to print */
- boolT PRINTridges; /* true 'Gr' if print ridges */
- boolT PRINTspheres; /* true 'Gv' if print vertices as spheres */
- boolT PRINTstatistics; /* true 'Ts' if printing statistics to stderr */
- boolT PRINTsummary; /* true 's' if printing summary to stderr */
- boolT PRINTtransparent; /* true 'Gt' if print transparent outer ridges */
- boolT PROJECTdelaunay; /* true if DELAUNAY, no readpoints() and
- need projectinput() for Delaunay in qh_init_B */
- int PROJECTinput; /* number of projected dimensions 'bn:0Bn:0' */
- boolT QUICKhelp; /* true if quick help message for degen input */
- boolT RANDOMdist; /* true if randomly change distplane and setfacetplane */
- realT RANDOMfactor; /* maximum random perturbation */
- realT RANDOMa; /* qh_randomfactor is randr * RANDOMa + RANDOMb */
- realT RANDOMb;
- boolT RANDOMoutside; /* true if select a random outside point */
- int REPORTfreq; /* buildtracing reports every n facets */
- int REPORTfreq2; /* tracemerging reports every REPORTfreq/2 facets */
- int RERUN; /* 'TRn' rerun qhull n times (qh.build_cnt) */
- int ROTATErandom; /* 'QRn' seed, 0 time, >= rotate input */
- boolT SCALEinput; /* true 'Qbk' if scaling input */
- boolT SCALElast; /* true 'Qbb' if scale last coord to max prev coord */
- boolT SETroundoff; /* true 'E' if qh DISTround is predefined */
- boolT SKIPcheckmax; /* true 'Q5' if skip qh_check_maxout */
- boolT SKIPconvex; /* true 'Q6' if skip convexity testing during pre-merge */
- boolT SPLITthresholds; /* true if upper_/lower_threshold defines a region
- used only for printing (not for qh ONLYgood) */
- int STOPcone; /* 'TCn' 1+n for stopping after cone for point n*/
- /* also used by qh_build_withresart for err exit*/
- int STOPpoint; /* 'TVn' 'TV-n' 1+n for stopping after/before(-)
- adding point n */
- int TESTpoints; /* 'QTn' num of test points after qh.num_points. Test points always coplanar. */
- boolT TESTvneighbors; /* true 'Qv' if test vertex neighbors at end */
- int TRACElevel; /* 'Tn' conditional IStracing level */
- int TRACElastrun; /* qh.TRACElevel applies to last qh.RERUN */
- int TRACEpoint; /* 'TPn' start tracing when point n is a vertex */
- realT TRACEdist; /* 'TWn' start tracing when merge distance too big */
- int TRACEmerge; /* 'TMn' start tracing before this merge */
- boolT TRIangulate; /* true 'Qt' if triangulate non-simplicial facets */
- boolT TRInormals; /* true 'Q11' if triangulate duplicates normals (sets Qt) */
- boolT UPPERdelaunay; /* true 'Qu' if computing furthest-site Delaunay */
- boolT VERIFYoutput; /* true 'Tv' if verify output at end of qhull */
- boolT VIRTUALmemory; /* true 'Q7' if depth-first processing in buildhull */
- boolT VORONOI; /* true 'v' if computing Voronoi diagram */
-
- /*--------input constants ---------*/
- realT AREAfactor; /* 1/(hull_dim-1)! for converting det's to area */
- boolT DOcheckmax; /* true if calling qh_check_maxout (qh_initqhull_globals) */
- char *feasible_string; /* feasible point 'Hn,n,n' for halfspace intersection */
- coordT *feasible_point; /* as coordinates, both malloc'd */
- boolT GETarea; /* true 'Fa', 'FA', 'FS', 'PAn', 'PFn' if compute facet area/Voronoi volume in io.c */
- boolT KEEPnearinside; /* true if near-inside points in coplanarset */
- int hull_dim; /* dimension of hull, set by initbuffers */
- int input_dim; /* dimension of input, set by initbuffers */
- int num_points; /* number of input points */
- pointT *first_point; /* array of input points, see POINTSmalloc */
- boolT POINTSmalloc; /* true if qh first_point/num_points allocated */
- pointT *input_points; /* copy of original qh.first_point for input points for qh_joggleinput */
- boolT input_malloc; /* true if qh input_points malloc'd */
- char qhull_command[256];/* command line that invoked this program */
- char rbox_command[256]; /* command line that produced the input points */
- char qhull_options[512];/* descriptive list of options */
- int qhull_optionlen; /* length of last line */
- int qhull_optionsiz; /* size of qhull_options before qh_initbuild */
- boolT VERTEXneighbors; /* true if maintaining vertex neighbors */
- boolT ZEROcentrum; /* true if 'C-0' or 'C-0 Qx'. sets ZEROall_ok */
- realT *upper_threshold; /* don't print if facet->normal[k]>=upper_threshold[k]
- must set either GOODthreshold or SPLITthreshold
- if Delaunay, default is 0.0 for upper envelope */
- realT *lower_threshold; /* don't print if facet->normal[k] <=lower_threshold[k] */
- realT *upper_bound; /* scale point[k] to new upper bound */
- realT *lower_bound; /* scale point[k] to new lower bound
- project if both upper_ and lower_bound == 0 */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-prec">-</a>
-
- qh precision constants
- precision constants for Qhull
-
- notes:
- qh_detroundoff() computes the maximum roundoff error for distance
- and other computations. It also sets default values for the
- qh constants above.
-*/
- realT ANGLEround; /* max round off error for angles */
- realT centrum_radius; /* max centrum radius for convexity (roundoff added) */
- realT cos_max; /* max cosine for convexity (roundoff added) */
- realT DISTround; /* max round off error for distances, 'E' overrides */
- realT MAXabs_coord; /* max absolute coordinate */
- realT MAXlastcoord; /* max last coordinate for qh_scalelast */
- realT MAXsumcoord; /* max sum of coordinates */
- realT MAXwidth; /* max rectilinear width of point coordinates */
- realT MINdenom_1; /* min. abs. value for 1/x */
- realT MINdenom; /* use divzero if denominator < MINdenom */
- realT MINdenom_1_2; /* min. abs. val for 1/x that allows normalization */
- realT MINdenom_2; /* use divzero if denominator < MINdenom_2 */
- realT MINlastcoord; /* min. last coordinate for qh_scalelast */
- boolT NARROWhull; /* set in qh_initialhull if angle < qh_MAXnarrow */
- realT *NEARzero; /* hull_dim array for near zero in gausselim */
- realT NEARinside; /* keep points for qh_check_maxout if close to facet */
- realT ONEmerge; /* max distance for merging simplicial facets */
- realT outside_err; /* application's epsilon for coplanar points
- qh_check_bestdist() qh_check_points() reports error if point outside */
- realT WIDEfacet; /* size of wide facet for skipping ridge in
- area computation and locking centrum */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-intern">-</a>
-
- qh internal constants
- internal constants for Qhull
-*/
- char qhull[sizeof("qhull")]; /* for checking ownership */
- void *old_stat; /* pointer to saved qh_qhstat, qh_save_qhull */
- jmp_buf errexit; /* exit label for qh_errexit, defined by setjmp() */
- char jmpXtra[40]; /* extra bytes in case jmp_buf is defined wrong by compiler */
- jmp_buf restartexit; /* restart label for qh_errexit, defined by setjmp() */
- char jmpXtra2[40]; /* extra bytes in case jmp_buf is defined wrong by compiler*/
- FILE *fin; /* pointer to input file, init by qh_meminit */
- FILE *fout; /* pointer to output file */
- FILE *ferr; /* pointer to error file */
- pointT *interior_point; /* center point of the initial simplex*/
- int normal_size; /* size in bytes for facet normals and point coords*/
- int center_size; /* size in bytes for Voronoi centers */
- int TEMPsize; /* size for small, temporary sets (in quick mem) */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-lists">-</a>
-
- qh facet and vertex lists
- defines lists of facets, new facets, visible facets, vertices, and
- new vertices. Includes counts, next ids, and trace ids.
- see:
- qh_resetlists()
-*/
- facetT *facet_list; /* first facet */
- facetT *facet_tail; /* end of facet_list (dummy facet) */
- facetT *facet_next; /* next facet for buildhull()
- previous facets do not have outside sets
- NARROWhull: previous facets may have coplanar outside sets for qh_outcoplanar */
- facetT *newfacet_list; /* list of new facets to end of facet_list */
- facetT *visible_list; /* list of visible facets preceeding newfacet_list,
- facet->visible set */
- int num_visible; /* current number of visible facets */
- unsigned tracefacet_id; /* set at init, then can print whenever */
- facetT *tracefacet; /* set in newfacet/mergefacet, undone in delfacet*/
- unsigned tracevertex_id; /* set at buildtracing, can print whenever */
- vertexT *tracevertex; /* set in newvertex, undone in delvertex*/
- vertexT *vertex_list; /* list of all vertices, to vertex_tail */
- vertexT *vertex_tail; /* end of vertex_list (dummy vertex) */
- vertexT *newvertex_list; /* list of vertices in newfacet_list, to vertex_tail
- all vertices have 'newlist' set */
- int num_facets; /* number of facets in facet_list
- includes visble faces (num_visible) */
- int num_vertices; /* number of vertices in facet_list */
- int num_outside; /* number of points in outsidesets (for tracing and RANDOMoutside)
- includes coplanar outsideset points for NARROWhull/qh_outcoplanar() */
- int num_good; /* number of good facets (after findgood_all) */
- unsigned facet_id; /* ID of next, new facet from newfacet() */
- unsigned ridge_id; /* ID of next, new ridge from newridge() */
- unsigned vertex_id; /* ID of next, new vertex from newvertex() */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-var">-</a>
-
- qh global variables
- defines minimum and maximum distances, next visit ids, several flags,
- and other global variables.
- initialize in qh_initbuild or qh_maxmin if used in qh_buildhull
-*/
- unsigned long hulltime; /* ignore time to set up input and randomize */
- /* use unsigned to avoid wrap-around errors */
- boolT ALLOWrestart; /* true if qh_precision can use qh.restartexit */
- int build_cnt; /* number of calls to qh_initbuild */
- qh_CENTER CENTERtype; /* current type of facet->center, qh_CENTER */
- int furthest_id; /* pointid of furthest point, for tracing */
- facetT *GOODclosest; /* closest facet to GOODthreshold in qh_findgood */
- realT JOGGLEmax; /* set 'QJn' if randomly joggle input */
- boolT maxoutdone; /* set qh_check_maxout(), cleared by qh_addpoint() */
- realT max_outside; /* maximum distance from a point to a facet,
- before roundoff, not simplicial vertices
- actual outer plane is +DISTround and
- computed outer plane is +2*DISTround */
- realT max_vertex; /* maximum distance (>0) from vertex to a facet,
- before roundoff, due to a merge */
- realT min_vertex; /* minimum distance (<0) from vertex to a facet,
- before roundoff, due to a merge
- if qh.JOGGLEmax, qh_makenewplanes sets it
- recomputed if qh.DOcheckmax, default -qh.DISTround */
- boolT NEWfacets; /* true while visible facets invalid due to new or merge
- from makecone/attachnewfacets to deletevisible */
- boolT findbestnew; /* true if partitioning calls qh_findbestnew */
- boolT findbest_notsharp; /* true if new facets are at least 90 degrees */
- boolT NOerrexit; /* true if qh.errexit is not available */
- realT PRINTcradius; /* radius for printing centrums */
- realT PRINTradius; /* radius for printing vertex spheres and points */
- boolT POSTmerging; /* true when post merging */
- int printoutvar; /* temporary variable for qh_printbegin, etc. */
- int printoutnum; /* number of facets printed */
- boolT QHULLfinished; /* True after qhull() is finished */
- realT totarea; /* 'FA': total facet area computed by qh_getarea */
- realT totvol; /* 'FA': total volume computed by qh_getarea */
- unsigned int visit_id; /* unique ID for searching neighborhoods, */
- unsigned int vertex_visit; /* unique ID for searching vertices */
- boolT ZEROall_ok; /* True if qh_checkzero always succeeds */
- boolT WAScoplanar; /* True if qh_partitioncoplanar (qh_check_maxout) */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-set">-</a>
-
- qh global sets
- defines sets for merging, initial simplex, hashing, extra input points,
- and deleted vertices
-*/
- setT *facet_mergeset; /* temporary set of merges to be done */
- setT *degen_mergeset; /* temporary set of degenerate and redundant merges */
- setT *hash_table; /* hash table for matching ridges in qh_matchfacets
- size is setsize() */
- setT *other_points; /* additional points (first is qh interior_point) */
- setT *del_vertices; /* vertices to partition and delete with visible
- facets. Have deleted set for checkfacet */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-buf">-</a>
-
- qh global buffers
- defines buffers for maxtrix operations, input, and error messages
-*/
- coordT *gm_matrix; /* (dim+1)Xdim matrix for geom.c */
- coordT **gm_row; /* array of gm_matrix rows */
- char* line; /* malloc'd input line of maxline+1 chars */
- int maxline;
- coordT *half_space; /* malloc'd input array for halfspace (qh normal_size+coordT) */
- coordT *temp_malloc; /* malloc'd input array for points */
-
-/*-<a href="qh-globa.htm#TOC"
- >--------------------------------</a><a name="qh-static">-</a>
-
- qh static variables
- defines static variables for individual functions
-
- notes:
- do not use 'static' within a function. Multiple instances of qhull
- may exist.
-
- do not assume zero initialization, 'QPn' may cause a restart
-*/
- boolT ERREXITcalled; /* true during errexit (prevents duplicate calls */
- boolT firstcentrum; /* for qh_printcentrum */
- realT last_low; /* qh_scalelast parameters for qh_setdelaunay */
- realT last_high;
- realT last_newhigh;
- unsigned lastreport; /* for qh_buildtracing */
- int mergereport; /* for qh_tracemerging */
- boolT old_randomdist; /* save RANDOMdist when io, tracing, or statistics */
- int ridgeoutnum; /* number of ridges in 4OFF output */
- void *old_qhstat; /* for saving qh_qhstat in save_qhull() */
- setT *old_tempstack; /* for saving qhmem.tempstack in save_qhull */
- setT *coplanarset; /* set of coplanar facets for searching qh_findbesthorizon() */
-};
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="otherfacet_">-</a>
-
- otherfacet_(ridge, facet)
- return neighboring facet for a ridge in facet
-*/
-#define otherfacet_(ridge, facet) \
- (((ridge)->top == (facet)) ? (ridge)->bottom : (ridge)->top)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="getid_">-</a>
-
- getid_(p)
- return ID for facet, ridge, or vertex
- return MAXINT if NULL (-1 causes type conversion error )
-*/
-#define getid_(p) ((p) ? (p)->id : -1)
-
-/*============== FORALL macros ===================*/
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLfacets">-</a>
-
- FORALLfacets { ... }
- assign 'facet' to each facet in qh.facet_list
-
- notes:
- uses 'facetT *facet;'
- assumes last facet is a sentinel
-
- see:
- FORALLfacet_( facetlist )
-*/
-#define FORALLfacets for (facet=qh facet_list;facet && facet->next;facet=facet->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLpoints">-</a>
-
- FORALLpoints { ... }
- assign 'point' to each point in qh.first_point, qh.num_points
-
- declare:
- coordT *point, *pointtemp;
-*/
-#define FORALLpoints FORALLpoint_(qh first_point, qh num_points)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLpoint_">-</a>
-
- FORALLpoint_( points, num) { ... }
- assign 'point' to each point in points array of num points
-
- declare:
- coordT *point, *pointtemp;
-*/
-#define FORALLpoint_(points, num) for(point= (points), \
- pointtemp= (points)+qh hull_dim*(num); point < pointtemp; point += qh hull_dim)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FORALLvertices">-</a>
-
- FORALLvertices { ... }
- assign 'vertex' to each vertex in qh.vertex_list
-
- declare:
- vertexT *vertex;
-
- notes:
- assumes qh.vertex_list terminated with a sentinel
-*/
-#define FORALLvertices for (vertex=qh vertex_list;vertex && vertex->next;vertex= vertex->next)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHfacet_">-</a>
-
- FOREACHfacet_( facets ) { ... }
- assign 'facet' to each facet in facets
-
- declare:
- facetT *facet, **facetp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHfacet_(facets) FOREACHsetelement_(facetT, facets, facet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighbor_">-</a>
-
- FOREACHneighbor_( facet ) { ... }
- assign 'neighbor' to each neighbor in facet->neighbors
-
- FOREACHneighbor_( vertex ) { ... }
- assign 'neighbor' to each neighbor in vertex->neighbors
-
- declare:
- facetT *neighbor, **neighborp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHneighbor_(facet) FOREACHsetelement_(facetT, facet->neighbors, neighbor)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHpoint_">-</a>
-
- FOREACHpoint_( points ) { ... }
- assign 'point' to each point in points set
-
- declare:
- pointT *point, **pointp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHpoint_(points) FOREACHsetelement_(pointT, points, point)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHridge_">-</a>
-
- FOREACHridge_( ridges ) { ... }
- assign 'ridge' to each ridge in ridges set
-
- declare:
- ridgeT *ridge, **ridgep;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHridge_(ridges) FOREACHsetelement_(ridgeT, ridges, ridge)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertex_">-</a>
-
- FOREACHvertex_( vertices ) { ... }
- assign 'vertex' to each vertex in vertices set
-
- declare:
- vertexT *vertex, **vertexp;
-
- see:
- <a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
-*/
-#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHfacet_i_">-</a>
-
- FOREACHfacet_i_( facets ) { ... }
- assign 'facet' and 'facet_i' for each facet in facets set
-
- declare:
- facetT *facet;
- int facet_n, facet_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHfacet_i_(facets) FOREACHsetelement_i_(facetT, facets, facet)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHneighbor_i_">-</a>
-
- FOREACHneighbor_i_( facet ) { ... }
- assign 'neighbor' and 'neighbor_i' for each neighbor in facet->neighbors
-
- FOREACHneighbor_i_( vertex ) { ... }
- assign 'neighbor' and 'neighbor_i' for each neighbor in vertex->neighbors
-
- declare:
- facetT *neighbor;
- int neighbor_n, neighbor_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHneighbor_i_(facet) FOREACHsetelement_i_(facetT, facet->neighbors, neighbor)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHpoint_i_">-</a>
-
- FOREACHpoint_i_( points ) { ... }
- assign 'point' and 'point_i' for each point in points set
-
- declare:
- pointT *point;
- int point_n, point_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHpoint_i_(points) FOREACHsetelement_i_(pointT, points, point)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHridge_i_">-</a>
-
- FOREACHridge_i_( ridges ) { ... }
- assign 'ridge' and 'ridge_i' for each ridge in ridges set
-
- declare:
- ridgeT *ridge;
- int ridge_n, ridge_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
-*/
-#define FOREACHridge_i_(ridges) FOREACHsetelement_i_(ridgeT, ridges, ridge)
-
-/*-<a href="qh-poly.htm#TOC"
- >--------------------------------</a><a name="FOREACHvertex_i_">-</a>
-
- FOREACHvertex_i_( vertices ) { ... }
- assign 'vertex' and 'vertex_i' for each vertex in vertices set
-
- declare:
- vertexT *vertex;
- int vertex_n, vertex_i;
-
- see:
- <a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
- */
-#define FOREACHvertex_i_(vertices) FOREACHsetelement_i_(vertexT, vertices,vertex)
-
-/********* -qhull.c prototypes (duplicated from qhull_a.h) **********************/
-
-void qh_qhull (void);
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void qh_printsummary(FILE *fp);
-
-/********* -user.c prototypes (alphabetical) **********************/
-
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge);
-void qh_errprint(char* string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex);
-int qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc,
- char *qhull_cmd, FILE *outfile, FILE *errfile);
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall);
-void qh_user_memsizes (void);
-
-/***** -geom.c/geom2.c prototypes (duplicated from geom.h) ****************/
-
-facetT *qh_findbest (pointT *point, facetT *startfacet,
- boolT bestoutside, boolT newfacets, boolT noupper,
- realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
- realT *dist, boolT bestoutside, boolT *isoutside, int *numpart);
-boolT qh_gram_schmidt(int dim, realT **rows);
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-void qh_printsummary(FILE *fp);
-void qh_projectinput (void);
-void qh_randommatrix (realT *buffer, int dim, realT **row);
-void qh_rotateinput (realT **rows);
-void qh_scaleinput (void);
-void qh_setdelaunay (int dim, int count, pointT *points);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-
-/***** -global.c prototypes (alphabetical) ***********************/
-
-unsigned long qh_clock (void);
-void qh_checkflags (char *command, char *hiddenflags);
-void qh_freebuffers (void);
-void qh_freeqhull (boolT allmem);
-void qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]);
-void qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_init_qhull_command (int argc, char *argv[]);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_initflags (char *command);
-void qh_initqhull_buffers (void);
-void qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc);
-void qh_initqhull_mem (void);
-void qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile);
-void qh_initthresholds (char *command);
-void qh_option (char *option, int *i, realT *r);
-#if qh_QHpointer
-void qh_restore_qhull (qhT **oldqh);
-qhT *qh_save_qhull (void);
-#endif
-
-/***** -io.c prototypes (duplicated from io.h) ***********************/
-
-void dfacet( unsigned id);
-void dvertex( unsigned id);
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void qh_produce_output(void);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-
-
-/********* -mem.c prototypes (duplicated from mem.h) **********************/
-
-void qh_meminit (FILE *ferr);
-void qh_memfreeshort (int *curlong, int *totlong);
-
-/********* -poly.c/poly2.c prototypes (duplicated from poly.h) **********************/
-
-void qh_check_output (void);
-void qh_check_points (void);
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
- realT *bestdist, boolT *isoutside);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-pointT *qh_point (int id);
-setT *qh_pointfacet (void /*qh.facet_list*/);
-int qh_pointid (pointT *point);
-setT *qh_pointvertex (void /*qh.facet_list*/);
-void qh_setvoronoi_all (void);
-void qh_triangulate (void /*qh facet_list*/);
-
-/********* -stat.c prototypes (duplicated from stat.h) **********************/
-
-void qh_collectstatistics (void);
-void qh_printallstatistics (FILE *fp, char *string);
-
-#endif /* qhDEFqhull */
diff --git a/extern/qhull/src/qhull_a.h b/extern/qhull/src/qhull_a.h
deleted file mode 100644
index d4e69b071be..00000000000
--- a/extern/qhull/src/qhull_a.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qhull_a.h
- all header files for compiling qhull
-
- see qh-qhull.htm
-
- see qhull.h for user-level definitions
-
- see user.h for user-defineable constants
-
- defines internal functions for qhull.c global.c
-
- copyright (c) 1993-2002, The Geometry Center
-
- Notes: grep for ((" and (" to catch fprintf("lkasdjf");
- full parens around (x?y:z)
- use '#include qhull/qhull_a.h' to avoid name clashes
-*/
-
-#ifndef qhDEFqhulla
-#define qhDEFqhulla
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-#include <string.h>
-#include <math.h>
-#include <float.h> /* some compilers will not need float.h */
-#include <limits.h>
-#include <time.h>
-#include <ctype.h>
-/*** uncomment here and qset.c
- if string.h does not define memcpy()
-#include <memory.h>
-*/
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-#include "geom.h"
-#include "merge.h"
-#include "poly.h"
-#include "io.h"
-#include "stat.h"
-
-#if qh_CLOCKtype == 2 /* defined in user.h from qhull.h */
-#include <sys/types.h>
-#include <sys/times.h>
-#include <unistd.h>
-#endif
-
-#ifdef _MSC_VER /* Microsoft Visual C++ */
-#pragma warning( disable : 4056) /* float constant expression. Looks like a compiler bug */
-#pragma warning( disable : 4146) /* unary minus applied to unsigned type */
-#pragma warning( disable : 4244) /* conversion from 'unsigned long' to 'real' */
-#pragma warning( disable : 4305) /* conversion from 'const double' to 'float' */
-#endif
-
-/* ======= -macros- =========== */
-
-/*-<a href="qh-qhull.htm#TOC"
- >--------------------------------</a><a name="traceN">-</a>
-
- traceN((fp.ferr, "format\n", vars));
- calls fprintf if qh.IStracing >= N
-
- notes:
- removing tracing reduces code size but doesn't change execution speed
-*/
-#ifndef qh_NOtrace
-#define trace0(args) {if (qh IStracing) fprintf args;}
-#define trace1(args) {if (qh IStracing >= 1) fprintf args;}
-#define trace2(args) {if (qh IStracing >= 2) fprintf args;}
-#define trace3(args) {if (qh IStracing >= 3) fprintf args;}
-#define trace4(args) {if (qh IStracing >= 4) fprintf args;}
-#define trace5(args) {if (qh IStracing >= 5) fprintf args;}
-#else /* qh_NOtrace */
-#define trace0(args) {}
-#define trace1(args) {}
-#define trace2(args) {}
-#define trace3(args) {}
-#define trace4(args) {}
-#define trace5(args) {}
-#endif /* qh_NOtrace */
-
-/***** -qhull.c prototypes (alphabetical after qhull) ********************/
-
-void qh_qhull (void);
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void qh_buildhull(void);
-void qh_buildtracing (pointT *furthest, facetT *facet);
-void qh_build_withrestart (void);
-void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
-void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
-pointT *qh_nextfurthest (facetT **visible);
-void qh_partitionall(setT *vertices, pointT *points,int npoints);
-void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist);
-void qh_partitionpoint (pointT *point, facetT *facet);
-void qh_partitionvisible(boolT allpoints, int *numpoints);
-void qh_precision (char *reason);
-void qh_printsummary(FILE *fp);
-
-/***** -global.c internal prototypes (alphabetical) ***********************/
-
-void qh_appendprint (qh_PRINT format);
-void qh_freebuild (boolT allmem);
-void qh_freebuffers (void);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-int qh_strtol (const char *s, char **endp);
-double qh_strtod (const char *s, char **endp);
-
-/***** -stat.c internal prototypes (alphabetical) ***********************/
-
-void qh_allstatA (void);
-void qh_allstatB (void);
-void qh_allstatC (void);
-void qh_allstatD (void);
-void qh_allstatE (void);
-void qh_allstatE2 (void);
-void qh_allstatF (void);
-void qh_allstatG (void);
-void qh_allstatH (void);
-void qh_freebuffers (void);
-void qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-
-#endif /* qhDEFqhulla */
diff --git a/extern/qhull/src/qhull_interface.cpp b/extern/qhull/src/qhull_interface.cpp
deleted file mode 100644
index 6ecc640e82b..00000000000
--- a/extern/qhull/src/qhull_interface.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*<html><pre> -<a href="qh-user.htm"
- >-------------------------------</a><a name="TOP">-</a>
-*/
-
-#include <iostream.h>
-#include <conio.h>
-
-//--- Include qhull, so it works from with in a C++ source file
-//---
-//--- In MVC one cannot just do:
-//---
-//--- extern "C"
-//--- {
-//--- #include "qhull_a.h"
-//--- }
-//---
-//--- Because qhull_a.h includes math.h, which can not appear
-//--- inside a extern "C" declaration.
-//---
-//--- Maybe that why Numerical recipes in C avoid this problem, by removing
-//--- standard include headers from its header files and add them in the
-//--- respective source files instead.
-//---
-//--- [K. Erleben]
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <qhull/qhull.h>
-#include <qhull/mem.h>
-#include <qhull/qset.h>
-#include <qhull/geom.h>
-#include <qhull/merge.h>
-#include <qhull/poly.h>
-#include <qhull/io.h>
-#include <qhull/stat.h>
-#if defined(__cplusplus)
-}
-#endif
-
-/*********************************************************************/
-/* */
-/* */
-/* */
-/* */
-/*********************************************************************/
-
-void compute_convex_hull(void)
-{
- int dim; /* dimension of points */
- int numpoints; /* number of points */
- coordT *points; /* array of coordinates for each point */
- boolT ismalloc; /* True if qhull should free points in qh_freeqhull() or reallocation */
- char flags[]= "qhull Tv"; /* option flags for qhull, see qh_opt.htm */
- FILE *outfile= stdout; /* output from qh_produce_output()
- use NULL to skip qh_produce_output() */
- FILE *errfile= stderr; /* error messages from qhull code */
- int exitcode; /* 0 if no error from qhull */
- facetT *facet; /* set by FORALLfacets */
- int curlong, totlong; /* memory remaining after qh_memfreeshort */
-
- /* initialize dim, numpoints, points[], ismalloc here */
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- if (!exitcode) { /* if no error */
- /* 'qh facet_list' contains the convex hull */
- FORALLfacets {
- /* ... your code ... */
- }
- }
- qh_freeqhull(!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (errfile, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-};
-
-/*********************************************************************/
-/* */
-/* */
-/* */
-/* */
-/*********************************************************************/
-
-void main()
-{
- cout << "Hello world" << endl;
-
- cout << "Press any key..." << endl;
-
- while(!_kbhit());
-
-};
diff --git a/extern/qhull/src/qset.c b/extern/qhull/src/qset.c
deleted file mode 100644
index 9e78464c07e..00000000000
--- a/extern/qhull/src/qset.c
+++ /dev/null
@@ -1,1301 +0,0 @@
-/*<html><pre> -<a href="qh-set.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qset.c
- implements set manipulations needed for quickhull
-
- see qh-set.htm and qset.h
-
- copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include <stdio.h>
-#include <string.h>
-/*** uncomment here and qhull_a.h
- if string.h does not define memcpy()
-#include <memory.h>
-*/
-#include "qset.h"
-#include "mem.h"
-
-#ifndef qhDEFqhull
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-void qh_errexit(int exitcode, facetT *, ridgeT *);
-#endif
-
-/*=============== internal macros ===========================*/
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="SETsizeaddr_">-</a>
-
- SETsizeaddr_(set)
- return pointer to actual size+1 of set (set CANNOT be NULL!!)
-
- notes:
- *SETsizeaddr==NULL or e[*SETsizeaddr-1].p==NULL
-*/
-#define SETsizeaddr_(set) (&((set)->e[(set)->maxsize].i))
-
-/*============ functions in alphabetical order ===================*/
-
-/*-<a href="qh-set.htm#TOC"
- >--------------------------------<a name="setaddnth">-</a>
-
- qh_setaddnth( setp, nth, newelem)
- adds newelem as n'th element of sorted or unsorted *setp
-
- notes:
- *setp and newelem must be defined
- *setp may be a temp set
- nth=0 is first element
- errors if nth is out of bounds
-
- design:
- expand *setp if empty or full
- move tail of *setp up one
- insert newelem
-*/
-void qh_setaddnth(setT **setp, int nth, void *newelem) {
- int *sizep, oldsize, i;
- void **oldp, **newp;
-
- if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
- qh_setlarger(setp);
- sizep= SETsizeaddr_(*setp);
- }
- oldsize= *sizep - 1;
- if (nth < 0 || nth > oldsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
- qh_setprint (qhmem.ferr, "", *setp);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- (*sizep)++;
- oldp= SETelemaddr_(*setp, oldsize, void); /* NULL */
- newp= oldp+1;
- for (i= oldsize-nth+1; i--; ) /* move at least NULL */
- *(newp--)= *(oldp--); /* may overwrite *sizep */
- *newp= newelem;
-} /* setaddnth */
-
-
-/*-<a href="qh-set.htm#TOC"
- >--------------------------------<a name="setaddsorted">-</a>
-
- setaddsorted( setp, newelem )
- adds an newelem into sorted *setp
-
- notes:
- *setp and newelem must be defined
- *setp may be a temp set
- nop if newelem already in set
-
- design:
- find newelem's position in *setp
- insert newelem
-*/
-void qh_setaddsorted(setT **setp, void *newelem) {
- int newindex=0;
- void *elem, **elemp;
-
- FOREACHelem_(*setp) { /* could use binary search instead */
- if (elem < newelem)
- newindex++;
- else if (elem == newelem)
- return;
- else
- break;
- }
- qh_setaddnth(setp, newindex, newelem);
-} /* setaddsorted */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setappend">-</a>
-
- qh_setappend( setp, newelem)
- append newelem to *setp
-
- notes:
- *setp may be a temp set
- *setp and newelem may be NULL
-
- design:
- expand *setp if empty or full
- append newelem to *setp
-
-*/
-void qh_setappend(setT **setp, void *newelem) {
- int *sizep;
- void **endp;
-
- if (!newelem)
- return;
- if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
- qh_setlarger(setp);
- sizep= SETsizeaddr_(*setp);
- }
- *(endp= &((*setp)->e[(*sizep)++ - 1].p))= newelem;
- *(++endp)= NULL;
-} /* setappend */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setappend_set">-</a>
-
- qh_setappend_set( setp, setA)
- appends setA to *setp
-
- notes:
- *setp can not be a temp set
- *setp and setA may be NULL
-
- design:
- setup for copy
- expand *setp if it is too small
- append all elements of setA to *setp
-*/
-void qh_setappend_set(setT **setp, setT *setA) {
- int *sizep, sizeA, size;
- setT *oldset;
-
- if (!setA)
- return;
- SETreturnsize_(setA, sizeA);
- if (!*setp)
- *setp= qh_setnew (sizeA);
- sizep= SETsizeaddr_(*setp);
- if (!(size= *sizep))
- size= (*setp)->maxsize;
- else
- size--;
- if (size + sizeA > (*setp)->maxsize) {
- oldset= *setp;
- *setp= qh_setcopy (oldset, sizeA);
- qh_setfree (&oldset);
- sizep= SETsizeaddr_(*setp);
- }
- *sizep= size+sizeA+1; /* memcpy may overwrite */
- if (sizeA > 0)
- memcpy((char *)&((*setp)->e[size].p), (char *)&(setA->e[0].p), SETelemsize *(sizeA+1));
-} /* setappend_set */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setappend2ndlast">-</a>
-
- qh_setappend2ndlast( setp, newelem )
- makes newelem the next to the last element in *setp
-
- notes:
- *setp must have at least one element
- newelem must be defined
- *setp may be a temp set
-
- design:
- expand *setp if empty or full
- move last element of *setp up one
- insert newelem
-*/
-void qh_setappend2ndlast(setT **setp, void *newelem) {
- int *sizep;
- void **endp, **lastp;
-
- if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
- qh_setlarger(setp);
- sizep= SETsizeaddr_(*setp);
- }
- endp= SETelemaddr_(*setp, (*sizep)++ -1, void); /* NULL */
- lastp= endp-1;
- *(endp++)= *lastp;
- *endp= NULL; /* may overwrite *sizep */
- *lastp= newelem;
-} /* setappend2ndlast */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setcheck">-</a>
-
- qh_setcheck( set, typename, id )
- check set for validity
- report errors with typename and id
-
- design:
- checks that maxsize, actual size, and NULL terminator agree
-*/
-void qh_setcheck(setT *set, char *tname, int id) {
- int maxsize, size;
- int waserr= 0;
-
- if (!set)
- return;
- SETreturnsize_(set, size);
- maxsize= set->maxsize;
- if (size > maxsize || !maxsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setcheck): actual size %d of %s%d is greater than max size %d\n",
- size, tname, id, maxsize);
- waserr= 1;
- }else if (set->e[size].p) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setcheck): %s%d (size %d max %d) is not null terminated.\n",
- tname, id, maxsize, size-1);
- waserr= 1;
- }
- if (waserr) {
- qh_setprint (qhmem.ferr, "ERRONEOUS", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
-} /* setcheck */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setcompact">-</a>
-
- qh_setcompact( set )
- remove internal NULLs from an unsorted set
-
- returns:
- updated set
-
- notes:
- set may be NULL
- it would be faster to swap tail of set into holes, like qh_setdel
-
- design:
- setup pointers into set
- skip NULLs while copying elements to start of set
- update the actual size
-*/
-void qh_setcompact(setT *set) {
- int size;
- void **destp, **elemp, **endp, **firstp;
-
- if (!set)
- return;
- SETreturnsize_(set, size);
- destp= elemp= firstp= SETaddr_(set, void);
- endp= destp + size;
- while (1) {
- if (!(*destp++ = *elemp++)) {
- destp--;
- if (elemp > endp)
- break;
- }
- }
- qh_settruncate (set, destp-firstp);
-} /* setcompact */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setcopy">-</a>
-
- qh_setcopy( set, extra )
- make a copy of a sorted or unsorted set with extra slots
-
- returns:
- new set
-
- design:
- create a newset with extra slots
- copy the elements to the newset
-
-*/
-setT *qh_setcopy(setT *set, int extra) {
- setT *newset;
- int size;
-
- if (extra < 0)
- extra= 0;
- SETreturnsize_(set, size);
- newset= qh_setnew(size+extra);
- *SETsizeaddr_(newset)= size+1; /* memcpy may overwrite */
- memcpy((char *)&(newset->e[0].p), (char *)&(set->e[0].p), SETelemsize *(size+1));
- return (newset);
-} /* setcopy */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setdel">-</a>
-
- qh_setdel( set, oldelem )
- delete oldelem from an unsorted set
-
- returns:
- returns oldelem if found
- returns NULL otherwise
-
- notes:
- set may be NULL
- oldelem must not be NULL;
- only deletes one copy of oldelem in set
-
- design:
- locate oldelem
- update actual size if it was full
- move the last element to the oldelem's location
-*/
-void *qh_setdel(setT *set, void *oldelem) {
- void **elemp, **lastp;
- int *sizep;
-
- if (!set)
- return NULL;
- elemp= SETaddr_(set, void);
- while (*elemp != oldelem && *elemp)
- elemp++;
- if (*elemp) {
- sizep= SETsizeaddr_(set);
- if (!(*sizep)--) /* if was a full set */
- *sizep= set->maxsize; /* *sizep= (maxsize-1)+ 1 */
- lastp= SETelemaddr_(set, *sizep-1, void);
- *elemp= *lastp; /* may overwrite itself */
- *lastp= NULL;
- return oldelem;
- }
- return NULL;
-} /* setdel */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setdellast">-</a>
-
- qh_setdellast( set)
- return last element of set or NULL
-
- notes:
- deletes element from set
- set may be NULL
-
- design:
- return NULL if empty
- if full set
- delete last element and set actual size
- else
- delete last element and update actual size
-*/
-void *qh_setdellast(setT *set) {
- int setsize; /* actually, actual_size + 1 */
- int maxsize;
- int *sizep;
- void *returnvalue;
-
- if (!set || !(set->e[0].p))
- return NULL;
- sizep= SETsizeaddr_(set);
- if ((setsize= *sizep)) {
- returnvalue= set->e[setsize - 2].p;
- set->e[setsize - 2].p= NULL;
- (*sizep)--;
- }else {
- maxsize= set->maxsize;
- returnvalue= set->e[maxsize - 1].p;
- set->e[maxsize - 1].p= NULL;
- *sizep= maxsize;
- }
- return returnvalue;
-} /* setdellast */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setdelnth">-</a>
-
- qh_setdelnth( set, nth )
- deletes nth element from unsorted set
- 0 is first element
-
- returns:
- returns the element (needs type conversion)
-
- notes:
- errors if nth invalid
-
- design:
- setup points and check nth
- delete nth element and overwrite with last element
-*/
-void *qh_setdelnth(setT *set, int nth) {
- void **elemp, **lastp, *elem;
- int *sizep;
-
-
- elemp= SETelemaddr_(set, nth, void);
- sizep= SETsizeaddr_(set);
- if (!(*sizep)--) /* if was a full set */
- *sizep= set->maxsize; /* *sizep= (maxsize-1)+ 1 */
- if (nth < 0 || nth >= *sizep) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- lastp= SETelemaddr_(set, *sizep-1, void);
- elem= *elemp;
- *elemp= *lastp; /* may overwrite itself */
- *lastp= NULL;
- return elem;
-} /* setdelnth */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setdelnthsorted">-</a>
-
- qh_setdelnthsorted( set, nth )
- deletes nth element from sorted set
-
- returns:
- returns the element (use type conversion)
-
- notes:
- errors if nth invalid
-
- see also:
- setnew_delnthsorted
-
- design:
- setup points and check nth
- copy remaining elements down one
- update actual size
-*/
-void *qh_setdelnthsorted(setT *set, int nth) {
- void **newp, **oldp, *elem;
- int *sizep;
-
- sizep= SETsizeaddr_(set);
- if (nth < 0 || (*sizep && nth >= *sizep-1) || nth >= set->maxsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- newp= SETelemaddr_(set, nth, void);
- elem= *newp;
- oldp= newp+1;
- while ((*(newp++)= *(oldp++)))
- ; /* copy remaining elements and NULL */
- if (!(*sizep)--) /* if was a full set */
- *sizep= set->maxsize; /* *sizep= (max size-1)+ 1 */
- return elem;
-} /* setdelnthsorted */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setdelsorted">-</a>
-
- qh_setdelsorted( set, oldelem )
- deletes oldelem from sorted set
-
- returns:
- returns oldelem if it was deleted
-
- notes:
- set may be NULL
-
- design:
- locate oldelem in set
- copy remaining elements down one
- update actual size
-*/
-void *qh_setdelsorted(setT *set, void *oldelem) {
- void **newp, **oldp;
- int *sizep;
-
- if (!set)
- return NULL;
- newp= SETaddr_(set, void);
- while(*newp != oldelem && *newp)
- newp++;
- if (*newp) {
- oldp= newp+1;
- while ((*(newp++)= *(oldp++)))
- ; /* copy remaining elements */
- sizep= SETsizeaddr_(set);
- if (!(*sizep)--) /* if was a full set */
- *sizep= set->maxsize; /* *sizep= (max size-1)+ 1 */
- return oldelem;
- }
- return NULL;
-} /* setdelsorted */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setduplicate">-</a>
-
- qh_setduplicate( set, elemsize )
- duplicate a set of elemsize elements
-
- notes:
- use setcopy if retaining old elements
-
- design:
- create a new set
- for each elem of the old set
- create a newelem
- append newelem to newset
-*/
-setT *qh_setduplicate (setT *set, int elemsize) {
- void *elem, **elemp, *newElem;
- setT *newSet;
- int size;
-
- if (!(size= qh_setsize (set)))
- return NULL;
- newSet= qh_setnew (size);
- FOREACHelem_(set) {
- newElem= qh_memalloc (elemsize);
- memcpy (newElem, elem, elemsize);
- qh_setappend (&newSet, newElem);
- }
- return newSet;
-} /* setduplicate */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setequal">-</a>
-
- qh_setequal( )
- returns 1 if two sorted sets are equal, otherwise returns 0
-
- notes:
- either set may be NULL
-
- design:
- check size of each set
- setup pointers
- compare elements of each set
-*/
-int qh_setequal(setT *setA, setT *setB) {
- void **elemAp, **elemBp;
- int sizeA, sizeB;
-
- SETreturnsize_(setA, sizeA);
- SETreturnsize_(setB, sizeB);
- if (sizeA != sizeB)
- return 0;
- if (!sizeA)
- return 1;
- elemAp= SETaddr_(setA, void);
- elemBp= SETaddr_(setB, void);
- if (!memcmp((char *)elemAp, (char *)elemBp, sizeA*SETelemsize))
- return 1;
- return 0;
-} /* setequal */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setequal_except">-</a>
-
- qh_setequal_except( setA, skipelemA, setB, skipelemB )
- returns 1 if sorted setA and setB are equal except for skipelemA & B
-
- returns:
- false if either skipelemA or skipelemB are missing
-
- notes:
- neither set may be NULL
-
- if skipelemB is NULL,
- can skip any one element of setB
-
- design:
- setup pointers
- search for skipelemA, skipelemB, and mismatches
- check results
-*/
-int qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB) {
- void **elemA, **elemB;
- int skip=0;
-
- elemA= SETaddr_(setA, void);
- elemB= SETaddr_(setB, void);
- while (1) {
- if (*elemA == skipelemA) {
- skip++;
- elemA++;
- }
- if (skipelemB) {
- if (*elemB == skipelemB) {
- skip++;
- elemB++;
- }
- }else if (*elemA != *elemB) {
- skip++;
- if (!(skipelemB= *elemB++))
- return 0;
- }
- if (!*elemA)
- break;
- if (*elemA++ != *elemB++)
- return 0;
- }
- if (skip != 2 || *elemB)
- return 0;
- return 1;
-} /* setequal_except */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setequal_skip">-</a>
-
- qh_setequal_skip( setA, skipA, setB, skipB )
- returns 1 if sorted setA and setB are equal except for elements skipA & B
-
- returns:
- false if different size
-
- notes:
- neither set may be NULL
-
- design:
- setup pointers
- search for mismatches while skipping skipA and skipB
-*/
-int qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB) {
- void **elemA, **elemB, **skipAp, **skipBp;
-
- elemA= SETaddr_(setA, void);
- elemB= SETaddr_(setB, void);
- skipAp= SETelemaddr_(setA, skipA, void);
- skipBp= SETelemaddr_(setB, skipB, void);
- while (1) {
- if (elemA == skipAp)
- elemA++;
- if (elemB == skipBp)
- elemB++;
- if (!*elemA)
- break;
- if (*elemA++ != *elemB++)
- return 0;
- }
- if (*elemB)
- return 0;
- return 1;
-} /* setequal_skip */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setfree">-</a>
-
- qh_setfree( setp )
- frees the space occupied by a sorted or unsorted set
-
- returns:
- sets setp to NULL
-
- notes:
- set may be NULL
-
- design:
- free array
- free set
-*/
-void qh_setfree(setT **setp) {
- int size;
- void **freelistp; /* used !qh_NOmem */
-
- if (*setp) {
- size= sizeof(setT) + ((*setp)->maxsize)*SETelemsize;
- if (size <= qhmem.LASTsize) {
- qh_memfree_(*setp, size, freelistp);
- }else
- qh_memfree (*setp, size);
- *setp= NULL;
- }
-} /* setfree */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setfree2">-</a>
-
- qh_setfree2( setp, elemsize )
- frees the space occupied by a set and its elements
-
- notes:
- set may be NULL
-
- design:
- free each element
- free set
-*/
-void qh_setfree2 (setT **setp, int elemsize) {
- void *elem, **elemp;
-
- FOREACHelem_(*setp)
- qh_memfree (elem, elemsize);
- qh_setfree (setp);
-} /* setfree2 */
-
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setfreelong">-</a>
-
- qh_setfreelong( setp )
- frees a set only if it's in long memory
-
- returns:
- sets setp to NULL if it is freed
-
- notes:
- set may be NULL
-
- design:
- if set is large
- free it
-*/
-void qh_setfreelong(setT **setp) {
- int size;
-
- if (*setp) {
- size= sizeof(setT) + ((*setp)->maxsize)*SETelemsize;
- if (size > qhmem.LASTsize) {
- qh_memfree (*setp, size);
- *setp= NULL;
- }
- }
-} /* setfreelong */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setin">-</a>
-
- qh_setin( set, setelem )
- returns 1 if setelem is in a set, 0 otherwise
-
- notes:
- set may be NULL or unsorted
-
- design:
- scans set for setelem
-*/
-int qh_setin(setT *set, void *setelem) {
- void *elem, **elemp;
-
- FOREACHelem_(set) {
- if (elem == setelem)
- return 1;
- }
- return 0;
-} /* setin */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setindex">-</a>
-
- qh_setindex( set, atelem )
- returns the index of atelem in set.
- returns -1, if not in set or maxsize wrong
-
- notes:
- set may be NULL and may contain nulls.
-
- design:
- checks maxsize
- scans set for atelem
-*/
-int qh_setindex(setT *set, void *atelem) {
- void **elem;
- int size, i;
-
- SETreturnsize_(set, size);
- if (size > set->maxsize)
- return -1;
- elem= SETaddr_(set, void);
- for (i=0; i < size; i++) {
- if (*elem++ == atelem)
- return i;
- }
- return -1;
-} /* setindex */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setlarger">-</a>
-
- qh_setlarger( oldsetp )
- returns a larger set that contains all elements of *oldsetp
-
- notes:
- the set is at least twice as large
- if temp set, updates qhmem.tempstack
-
- design:
- creates a new set
- copies the old set to the new set
- updates pointers in tempstack
- deletes the old set
-*/
-void qh_setlarger(setT **oldsetp) {
- int size= 1, *sizep;
- setT *newset, *set, **setp, *oldset;
- void **oldp, **newp;
-
- if (*oldsetp) {
- oldset= *oldsetp;
- SETreturnsize_(oldset, size);
- qhmem.cntlarger++;
- qhmem.totlarger += size+1;
- newset= qh_setnew(2 * size);
- oldp= SETaddr_(oldset, void);
- newp= SETaddr_(newset, void);
- memcpy((char *)newp, (char *)oldp, (size+1) * SETelemsize);
- sizep= SETsizeaddr_(newset);
- *sizep= size+1;
- FOREACHset_((setT *)qhmem.tempstack) {
- if (set == oldset)
- *(setp-1)= newset;
- }
- qh_setfree(oldsetp);
- }else
- newset= qh_setnew(3);
- *oldsetp= newset;
-} /* setlarger */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setlast">-</a>
-
- qh_setlast( )
- return last element of set or NULL (use type conversion)
-
- notes:
- set may be NULL
-
- design:
- return last element
-*/
-void *qh_setlast(setT *set) {
- int size;
-
- if (set) {
- size= *SETsizeaddr_(set);
- if (!size)
- return SETelem_(set, set->maxsize - 1);
- else if (size > 1)
- return SETelem_(set, size - 2);
- }
- return NULL;
-} /* setlast */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setnew">-</a>
-
- qh_setnew( setsize )
- creates and allocates space for a set
-
- notes:
- setsize means the number of elements (NOT including the NULL terminator)
- use qh_settemp/qh_setfreetemp if set is temporary
-
- design:
- allocate memory for set
- roundup memory if small set
- initialize as empty set
-*/
-setT *qh_setnew(int setsize) {
- setT *set;
- int sizereceived; /* used !qh_NOmem */
- int size;
- void **freelistp; /* used !qh_NOmem */
-
- if (!setsize)
- setsize++;
- size= sizeof(setT) + setsize * SETelemsize;
- if ((unsigned) size <= (unsigned) qhmem.LASTsize) {
- qh_memalloc_(size, freelistp, set, setT);
-#ifndef qh_NOmem
- sizereceived= qhmem.sizetable[ qhmem.indextable[size]];
- if (sizereceived > size)
- setsize += (sizereceived - size)/SETelemsize;
-#endif
- }else
- set= (setT*)qh_memalloc (size);
- set->maxsize= setsize;
- set->e[setsize].i= 1;
- set->e[0].p= NULL;
- return (set);
-} /* setnew */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setnew_delnthsorted">-</a>
-
- qh_setnew_delnthsorted( set, size, nth, prepend )
- creates a sorted set not containing nth element
- if prepend, the first prepend elements are undefined
-
- notes:
- set must be defined
- checks nth
- see also: setdelnthsorted
-
- design:
- create new set
- setup pointers and allocate room for prepend'ed entries
- append head of old set to new set
- append tail of old set to new set
-*/
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend) {
- setT *newset;
- void **oldp, **newp;
- int tailsize= size - nth -1, newsize;
-
- if (tailsize < 0) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- newsize= size-1 + prepend;
- newset= qh_setnew(newsize);
- newset->e[newset->maxsize].i= newsize+1; /* may be overwritten */
- oldp= SETaddr_(set, void);
- newp= SETaddr_(newset, void) + prepend;
- switch (nth) {
- case 0:
- break;
- case 1:
- *(newp++)= *oldp++;
- break;
- case 2:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- case 3:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- case 4:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- default:
- memcpy((char *)newp, (char *)oldp, nth * SETelemsize);
- newp += nth;
- oldp += nth;
- break;
- }
- oldp++;
- switch (tailsize) {
- case 0:
- break;
- case 1:
- *(newp++)= *oldp++;
- break;
- case 2:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- case 3:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- case 4:
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- *(newp++)= *oldp++;
- break;
- default:
- memcpy((char *)newp, (char *)oldp, tailsize * SETelemsize);
- newp += tailsize;
- }
- *newp= NULL;
- return(newset);
-} /* setnew_delnthsorted */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setprint">-</a>
-
- qh_setprint( fp, string, set )
- print set elements to fp with identifying string
-
- notes:
- never errors
-*/
-void qh_setprint(FILE *fp, char* string, setT *set) {
- int size, k;
-
- if (!set)
- fprintf (fp, "%s set is null\n", string);
- else {
- SETreturnsize_(set, size);
- fprintf (fp, "%s set=%p maxsize=%d size=%d elems=",
- string, set, set->maxsize, size);
- if (size > set->maxsize)
- size= set->maxsize+1;
- for (k=0; k < size; k++)
- fprintf(fp, " %p", set->e[k].p);
- fprintf(fp, "\n");
- }
-} /* setprint */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setreplace">-</a>
-
- qh_setreplace( set, oldelem, newelem )
- replaces oldelem in set with newelem
-
- notes:
- errors if oldelem not in the set
- newelem may be NULL, but it turns the set into an indexed set (no FOREACH)
-
- design:
- find oldelem
- replace with newelem
-*/
-void qh_setreplace(setT *set, void *oldelem, void *newelem) {
- void **elemp;
-
- elemp= SETaddr_(set, void);
- while(*elemp != oldelem && *elemp)
- elemp++;
- if (*elemp)
- *elemp= newelem;
- else {
- fprintf (qhmem.ferr, "qhull internal error (qh_setreplace): elem %p not found in set\n",
- oldelem);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
-} /* setreplace */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setsize">-</a>
-
- qh_setsize( set )
- returns the size of a set
-
- notes:
- errors if set's maxsize is incorrect
- same as SETreturnsize_(set)
-
- design:
- determine actual size of set from maxsize
-*/
-int qh_setsize(setT *set) {
- int size, *sizep;
-
- if (!set)
- return (0);
- sizep= SETsizeaddr_(set);
- if ((size= *sizep)) {
- size--;
- if (size > set->maxsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setsize): current set size %d is greater than maximum size %d\n",
- size, set->maxsize);
- qh_setprint (qhmem.ferr, "set: ", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- }else
- size= set->maxsize;
- return size;
-} /* setsize */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settemp">-</a>
-
- qh_settemp( setsize )
- return a stacked, temporary set of upto setsize elements
-
- notes:
- use settempfree or settempfree_all to release from qhmem.tempstack
- see also qh_setnew
-
- design:
- allocate set
- append to qhmem.tempstack
-
-*/
-setT *qh_settemp(int setsize) {
- setT *newset;
-
- newset= qh_setnew (setsize);
- qh_setappend ((setT **)&qhmem.tempstack, newset);
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_settemp: temp set %p of %d elements, depth %d\n",
- newset, newset->maxsize, qh_setsize ((setT*)qhmem.tempstack));
- return newset;
-} /* settemp */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settempfree">-</a>
-
- qh_settempfree( set )
- free temporary set at top of qhmem.tempstack
-
- notes:
- nop if set is NULL
- errors if set not from previous qh_settemp
-
- to locate errors:
- use 'T2' to find source and then find mis-matching qh_settemp
-
- design:
- check top of qhmem.tempstack
- free it
-*/
-void qh_settempfree(setT **set) {
- setT *stackedset;
-
- if (!*set)
- return;
- stackedset= qh_settemppop ();
- if (stackedset != *set) {
- qh_settemppush(stackedset);
- fprintf (qhmem.ferr, "qhull internal error (qh_settempfree): set %p (size %d) was not last temporary allocated (depth %d, set %p, size %d)\n",
- *set, qh_setsize(*set), qh_setsize((setT*)qhmem.tempstack)+1,
- stackedset, qh_setsize(stackedset));
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- qh_setfree (set);
-} /* settempfree */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settempfree_all">-</a>
-
- qh_settempfree_all( )
- free all temporary sets in qhmem.tempstack
-
- design:
- for each set in tempstack
- free set
- free qhmem.tempstack
-*/
-void qh_settempfree_all(void) {
- setT *set, **setp;
-
- FOREACHset_((setT *)qhmem.tempstack)
- qh_setfree(&set);
- qh_setfree((setT **)&qhmem.tempstack);
-} /* settempfree_all */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settemppop">-</a>
-
- qh_settemppop( )
- pop and return temporary set from qhmem.tempstack
-
- notes:
- the returned set is permanent
-
- design:
- pop and check top of qhmem.tempstack
-*/
-setT *qh_settemppop(void) {
- setT *stackedset;
-
- stackedset= (setT*)qh_setdellast((setT *)qhmem.tempstack);
- if (!stackedset) {
- fprintf (qhmem.ferr, "qhull internal error (qh_settemppop): pop from empty temporary stack\n");
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_settemppop: depth %d temp set %p of %d elements\n",
- qh_setsize((setT*)qhmem.tempstack)+1, stackedset, qh_setsize(stackedset));
- return stackedset;
-} /* settemppop */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settemppush">-</a>
-
- qh_settemppush( set )
- push temporary set unto qhmem.tempstack (makes it temporary)
-
- notes:
- duplicates settemp() for tracing
-
- design:
- append set to tempstack
-*/
-void qh_settemppush(setT *set) {
-
- qh_setappend ((setT**)&qhmem.tempstack, set);
- if (qhmem.IStracing >= 5)
- fprintf (qhmem.ferr, "qh_settemppush: depth %d temp set %p of %d elements\n",
- qh_setsize((setT*)qhmem.tempstack), set, qh_setsize(set));
-} /* settemppush */
-
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="settruncate">-</a>
-
- qh_settruncate( set, size )
- truncate set to size elements
-
- notes:
- set must be defined
-
- see:
- SETtruncate_
-
- design:
- check size
- update actual size of set
-*/
-void qh_settruncate (setT *set, int size) {
-
- if (size < 0 || size > set->maxsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_settruncate): size %d out of bounds for set:\n", size);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- set->e[set->maxsize].i= size+1; /* maybe overwritten */
- set->e[size].p= NULL;
-} /* settruncate */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setunique">-</a>
-
- qh_setunique( set, elem )
- add elem to unsorted set unless it is already in set
-
- notes:
- returns 1 if it is appended
-
- design:
- if elem not in set
- append elem to set
-*/
-int qh_setunique (setT **set, void *elem) {
-
- if (!qh_setin (*set, elem)) {
- qh_setappend (set, elem);
- return 1;
- }
- return 0;
-} /* setunique */
-
-/*-<a href="qh-set.htm#TOC"
- >-------------------------------<a name="setzero">-</a>
-
- qh_setzero( set, index, size )
- zero elements from index on
- set actual size of set to size
-
- notes:
- set must be defined
- the set becomes an indexed set (can not use FOREACH...)
-
- see also:
- qh_settruncate
-
- design:
- check index and size
- update actual size
- zero elements starting at e[index]
-*/
-void qh_setzero (setT *set, int index, int size) {
- int count;
-
- if (index < 0 || index >= size || size > set->maxsize) {
- fprintf (qhmem.ferr, "qhull internal error (qh_setzero): index %d or size %d out of bounds for set:\n", index, size);
- qh_setprint (qhmem.ferr, "", set);
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
- }
- set->e[set->maxsize].i= size+1; /* may be overwritten */
- count= size - index + 1; /* +1 for NULL terminator */
- memset ((char *)SETelemaddr_(set, index, void), 0, count * SETelemsize);
-} /* setzero */
-
-
diff --git a/extern/qhull/src/qset.h b/extern/qhull/src/qset.h
deleted file mode 100644
index 6c0ff758de4..00000000000
--- a/extern/qhull/src/qset.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*<html><pre> -<a href="qh-set.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qset.h
- header file for qset.c that implements set
-
- see qh-set.htm and qset.c
-
- only uses mem.c, malloc/free
-
- for error handling, writes message and calls
- qh_errexit (qhmem_ERRqhull, NULL, NULL);
-
- set operations satisfy the following properties:
- - sets have a max size, the actual size (if different) is stored at the end
- - every set is NULL terminated
- - sets may be sorted or unsorted, the caller must distinguish this
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFset
-#define qhDEFset 1
-
-/*================= -structures- ===============*/
-
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT; /* a set is a sorted or unsorted array of pointers */
-#endif
-
-/*-<a href="qh-set.htm#TOC"
->----------------------------------------</a><a name="setT">-</a>
-
-setT
- a set or list of pointers with maximum size and actual size.
-
-variations:
- unsorted, unique -- a list of unique pointers with NULL terminator
- user guarantees uniqueness
- sorted -- a sorted list of unique pointers with NULL terminator
- qset.c guarantees uniqueness
- unsorted -- a list of pointers terminated with NULL
- indexed -- an array of pointers with NULL elements
-
-structure for set of n elements:
-
- --------------
- | maxsize
- --------------
- | e[0] - a pointer, may be NULL for indexed sets
- --------------
- | e[1]
-
- --------------
- | ...
- --------------
- | e[n-1]
- --------------
- | e[n] = NULL
- --------------
- | ...
- --------------
- | e[maxsize] - n+1 or NULL (determines actual size of set)
- --------------
-
-*/
-
-/*-- setelemT -- internal type to allow both pointers and indices
-*/
-typedef union setelemT setelemT;
-union setelemT {
- void *p;
- int i; /* integer used for e[maxSize] */
-};
-
-struct setT {
- int maxsize; /* maximum number of elements (except NULL) */
- setelemT e[1]; /* array of pointers, tail is NULL */
- /* last slot (unless NULL) is actual size+1
- e[maxsize]==NULL or e[e[maxsize]-1]==NULL */
- /* this may generate a warning since e[] contains
- maxsize elements */
-};
-
-/*=========== -constants- =========================*/
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="SETelemsize">-</a>
-
- SETelemsize
- size of a set element in bytes
-*/
-#define SETelemsize sizeof(setelemT)
-
-
-/*=========== -macros- =========================*/
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHsetelement_">-</a>
-
- FOREACHsetelement_(type, set, variable)
- define FOREACH iterator
-
- declare:
- assumes *variable and **variablep are declared
- no space in "variable)" [DEC Alpha cc compiler]
-
- each iteration:
- variable is set element
- variablep is one beyond variable.
-
- to repeat an element:
- variablep--; / *repeat* /
-
- at exit:
- variable is NULL at end of loop
-
- example:
- #define FOREACHfacet_( facets ) FOREACHsetelement_( facetT, facets, facet )
-
- notes:
- use FOREACHsetelement_i_() if need index or include NULLs
-
- WARNING:
- nested loops can't use the same variable (define another FOREACH)
-
- needs braces if nested inside another FOREACH
- this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##p= (type **)&((set)->e[0].p); \
- (variable= *variable##p++);)
-
-/*-<a href="qh-set.htm#TOC"
- >----------------------------------------</a><a name="FOREACHsetelement_i_">-</a>
-
- FOREACHsetelement_i_(type, set, variable)
- define indexed FOREACH iterator
-
- declare:
- type *variable, variable_n, variable_i;
-
- each iteration:
- variable is set element, may be NULL
- variable_i is index, variable_n is qh_setsize()
-
- to repeat an element:
- variable_i--; variable_n-- repeats for deleted element
-
- at exit:
- variable==NULL and variable_i==variable_n
-
- example:
- #define FOREACHfacet_i_( facets ) FOREACHsetelement_i_( facetT, facets, facet )
-
- WARNING:
- nested loops can't use the same variable (define another FOREACH)
-
- needs braces if nested inside another FOREACH
- this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_i_(type, set, variable) \
- if (((variable= NULL), set)) for (\
- variable##_i= 0, variable= (type *)((set)->e[0].p), \
- variable##_n= qh_setsize(set);\
- variable##_i < variable##_n;\
- variable= (type *)((set)->e[++variable##_i].p) )
-
-/*-<a href="qh-set.htm#TOC"
- >--------------------------------------</a><a name="FOREACHsetelementreverse_">-</a>
-
- FOREACHsetelementreverse_(type, set, variable)-
- define FOREACH iterator in reverse order
-
- declare:
- assumes *variable and **variablep are declared
- also declare 'int variabletemp'
-
- each iteration:
- variable is set element
-
- to repeat an element:
- variabletemp++; / *repeat* /
-
- at exit:
- variable is NULL
-
- example:
- #define FOREACHvertexreverse_( vertices ) FOREACHsetelementreverse_( vertexT, vertices, vertex )
-
- notes:
- use FOREACHsetelementreverse12_() to reverse first two elements
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##temp= qh_setsize(set)-1, variable= qh_setlast(set);\
- variable; variable= \
- ((--variable##temp >= 0) ? SETelemt_(set, variable##temp, type) : NULL))
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHsetelementreverse12_">-</a>
-
- FOREACHsetelementreverse12_(type, set, variable)-
- define FOREACH iterator with e[1] and e[0] reversed
-
- declare:
- assumes *variable and **variablep are declared
-
- each iteration:
- variable is set element
- variablep is one after variable.
-
- to repeat an element:
- variablep--; / *repeat* /
-
- at exit:
- variable is NULL at end of loop
-
- example
- #define FOREACHvertexreverse12_( vertices ) FOREACHsetelementreverse12_( vertexT, vertices, vertex )
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse12_(type, set, variable) \
- if (((variable= NULL), set)) for(\
- variable##p= (type **)&((set)->e[1].p); \
- (variable= *variable##p); \
- variable##p == ((type **)&((set)->e[0].p))?variable##p += 2: \
- (variable##p == ((type **)&((set)->e[1].p))?variable##p--:variable##p++))
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHelem_">-</a>
-
- FOREACHelem_( set )-
- iterate elements in a set
-
- declare:
- void *elem, *elemp;
-
- each iteration:
- elem is set element
- elemp is one beyond
-
- to repeat an element:
- elemp--; / *repeat* /
-
- at exit:
- elem == NULL at end of loop
-
- example:
- FOREACHelem_(set) {
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHelem_(set) FOREACHsetelement_(void, set, elem)
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------</a><a name="FOREACHset_">-</a>
-
- FOREACHset_( set )-
- iterate a set of sets
-
- declare:
- setT *set, **setp;
-
- each iteration:
- set is set element
- setp is one beyond
-
- to repeat an element:
- setp--; / *repeat* /
-
- at exit:
- set == NULL at end of loop
-
- example
- FOREACHset_(sets) {
-
- notes:
- WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHset_(sets) FOREACHsetelement_(setT, sets, set)
-
-/*-<a href="qh-set.htm#TOC"
- >-----------------------------------------</a><a name="SETindex_">-</a>
-
- SETindex_( set, elem )
- return index of elem in set
-
- notes:
- for use with FOREACH iteration
-
- example:
- i= SETindex_(ridges, ridge)
-*/
-#define SETindex_(set, elem) ((void **)elem##p - (void **)&(set)->e[1].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETref_">-</a>
-
- SETref_( elem )
- l.h.s. for modifying the current element in a FOREACH iteration
-
- example:
- SETref_(ridge)= anotherridge;
-*/
-#define SETref_(elem) (elem##p[-1])
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelem_">-</a>
-
- SETelem_(set, n)
- return the n'th element of set
-
- notes:
- assumes that n is valid [0..size] and that set is defined
- use SETelemt_() for type cast
-*/
-#define SETelem_(set, n) ((set)->e[n].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelemt_">-</a>
-
- SETelemt_(set, n, type)
- return the n'th element of set as a type
-
- notes:
- assumes that n is valid [0..size] and that set is defined
-*/
-#define SETelemt_(set, n, type) ((type*)((set)->e[n].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETelemaddr_">-</a>
-
- SETelemaddr_(set, n, type)
- return address of the n'th element of a set
-
- notes:
- assumes that n is valid [0..size] and set is defined
-*/
-#define SETelemaddr_(set, n, type) ((type **)(&((set)->e[n].p)))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETfirst_">-</a>
-
- SETfirst_(set)
- return first element of set
-
-*/
-#define SETfirst_(set) ((set)->e[0].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETfirstt_">-</a>
-
- SETfirstt_(set, type)
- return first element of set as a type
-
-*/
-#define SETfirstt_(set, type) ((type*)((set)->e[0].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETsecond_">-</a>
-
- SETsecond_(set)
- return second element of set
-
-*/
-#define SETsecond_(set) ((set)->e[1].p)
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETsecondt_">-</a>
-
- SETsecondt_(set, type)
- return second element of set as a type
-*/
-#define SETsecondt_(set, type) ((type*)((set)->e[1].p))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETaddr_">-</a>
-
- SETaddr_(set, type)
- return address of set's elements
-*/
-#define SETaddr_(set,type) ((type **)(&((set)->e[0].p)))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETreturnsize_">-</a>
-
- SETreturnsize_(set, size)
- return size of a set
-
- notes:
- set must be defined
- use qh_setsize(set) unless speed is critical
-*/
-#define SETreturnsize_(set, size) (((size)= ((set)->e[(set)->maxsize].i))?(--(size)):((size)= (set)->maxsize))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETempty_">-</a>
-
- SETempty_(set)
- return true (1) if set is empty
-
- notes:
- set may be NULL
-*/
-#define SETempty_(set) (!set || (SETfirst_(set) ? 0:1))
-
-/*-<a href="qh-set.htm#TOC"
- >---------------------------------------</a><a name="SETtruncate_">-</a>
-
- SETtruncate_(set)
- return first element of set
-
- see:
- qh_settruncate()
-
-*/
-#define SETtruncate_(set, size) {set->e[set->maxsize].i= size+1; /* maybe overwritten */ \
- set->e[size].p= NULL;}
-
-/*======= prototypes in alphabetical order ============*/
-
-void qh_setaddsorted(setT **setp, void *elem);
-void qh_setaddnth(setT **setp, int nth, void *newelem);
-void qh_setappend(setT **setp, void *elem);
-void qh_setappend_set(setT **setp, setT *setA);
-void qh_setappend2ndlast(setT **setp, void *elem);
-void qh_setcheck(setT *set, char *tname, int id);
-void qh_setcompact(setT *set);
-setT *qh_setcopy(setT *set, int extra);
-void *qh_setdel(setT *set, void *elem);
-void *qh_setdellast(setT *set);
-void *qh_setdelnth(setT *set, int nth);
-void *qh_setdelnthsorted(setT *set, int nth);
-void *qh_setdelsorted(setT *set, void *newelem);
-setT *qh_setduplicate( setT *set, int elemsize);
-int qh_setequal(setT *setA, setT *setB);
-int qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB);
-int qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB);
-void qh_setfree(setT **set);
-void qh_setfree2( setT **setp, int elemsize);
-void qh_setfreelong(setT **set);
-int qh_setin(setT *set, void *setelem);
-int qh_setindex(setT *set, void *setelem);
-void qh_setlarger(setT **setp);
-void *qh_setlast(setT *set);
-setT *qh_setnew(int size);
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend);
-void qh_setprint(FILE *fp, char* string, setT *set);
-void qh_setreplace(setT *set, void *oldelem, void *newelem);
-int qh_setsize(setT *set);
-setT *qh_settemp(int setsize);
-void qh_settempfree(setT **set);
-void qh_settempfree_all(void);
-setT *qh_settemppop(void);
-void qh_settemppush(setT *set);
-void qh_settruncate (setT *set, int size);
-int qh_setunique (setT **set, void *elem);
-void qh_setzero (setT *set, int index, int size);
-
-
-#endif /* qhDEFset */
diff --git a/extern/qhull/src/qvoronoi.c b/extern/qhull/src/qvoronoi.c
deleted file mode 100644
index ebeb7367b87..00000000000
--- a/extern/qhull/src/qvoronoi.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- qvoronoi.c
- compute Voronoi diagrams and furthest-point Voronoi
- diagrams using qhull
-
- see unix.c for full interface
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-
-#elif __cplusplus
-extern "C" {
- int isatty (int);
-}
-
-#elif _MSC_VER
-#include <io.h>
-#define isatty _isatty
-
-#else
-int isatty (int); /* returns 1 if stdin is a tty
- if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*-<a href="qh-qhull.c#TOC"
- >-------------------------------</a><a name="prompt">-</a>
-
- qh_prompt
- long prompt for qhull
-
- notes:
- restricted version of qhull.c
-
- see:
- concise prompt below
-*/
-
-/* duplicated in qvoron_f.htm and qvoronoi.htm */
-char hidden_options[]=" d n m v H U Qb QB Qc Qf Qg Qi Qm Qr QR Qv Qx TR E V Fa FA FC Fp FS Ft FV Pv Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qvoronoi- compute the Voronoi diagram\n\
- http://www.geom.umn.edu/software/qhull %s\n\
-\n\
-input (stdin):\n\
- first lines: dimension and number of points (or vice-versa).\n\
- other lines: point coordinates, best if one point per line\n\
- comments: start with a non-numeric character\n\
-\n\
-options:\n\
- Qu - compute furthest-site Voronoi diagram\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
-\n\
-Qhull control options:\n\
- Qz - add point-at-infinity to Voronoi diagram\n\
- QJn - randomly joggle input in range [-n,n]\n\
-%s%s%s%s"; /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
- Qs - search all points for the initial simplex\n\
- QGn - Voronoi vertices if visible from point n, -n if not\n\
- QVn - Voronoi vertices for input point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
- T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
- Tc - check frequently during execution\n\
- Ts - statistics\n\
- Tv - verify result: structure, convexity, and in-circle test\n\
- Tz - send all output to stdout\n\
- TFn - report summary when n or more facets created\n\
- TI file - input data from file, no spaces or single quotes\n\
- TO file - output results to file, may be enclosed in single quotes\n\
- TPn - turn on tracing when point n added to hull\n\
- TMn - turn on tracing at merge n\n\
- TWn - trace merge facets when width > n\n\
- TVn - stop qhull after adding point n, -n for before (see TCn)\n\
- TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
- Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\
- An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\
- C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
- Rn - randomly perturb computations by a factor of [1-n,1+n]\n\
- Wn - min facet width for non-coincident point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
- s - summary to stderr\n\
- p - Voronoi vertices\n\
- o - OFF format (dim, Voronoi vertices, and Voronoi regions)\n\
- i - Delaunay regions (use 'Pp' to avoid warning)\n\
- f - facet dump\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
- Fc - count plus coincident points (by Voronoi vertex)\n\
- Fd - use cdd format for input (homogeneous with offset first)\n\
- FD - use cdd format for output (offset first)\n\
- FF - facet dump without ridges\n\
- Fi - separating hyperplanes for bounded Voronoi regions\n\
- FI - ID for each Voronoi vertex\n\
- Fm - merge count for each Voronoi vertex (511 max)\n\
- Fn - count plus neighboring Voronoi vertices for each Voronoi vertex\n\
- FN - count and Voronoi vertices for each Voronoi region\n\
- Fo - separating hyperplanes for unbounded Voronoi regions\n\
- FO - options and precision constants\n\
- FP - nearest point and distance for each coincident point\n\
- FQ - command used for qvoronoi\n\
- Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
- for output: #Voronoi regions, #Voronoi vertices,\n\
- #coincident points, #non-simplicial regions\n\
- #real (2), max outer plane and min vertex\n\
- Fv - Voronoi diagram as Voronoi vertices between adjacent input sites\n\
- Fx - extreme points of Delaunay triangulation (on convex hull)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d only)\n\
- Ga - all points as dots\n\
- Gp - coplanar points and vertices as radii\n\
- Gv - vertices as spheres\n\
- Gi - inner planes only\n\
- Gn - no planes\n\
- Go - outer planes only\n\
- Gc - centrums\n\
- Gh - hyperplane intersections\n\
- Gr - ridges\n\
- GDn - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
- PAn - keep n largest Voronoi vertices by 'area'\n\
- Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
- PDk:n - drop facet if normal[k] >= n\n\
- Pg - print good Voronoi vertices (needs 'QGn' or 'QVn')\n\
- PFn - keep Voronoi vertices whose 'area' is at least n\n\
- PG - print neighbors of good Voronoi vertices\n\
- PMn - keep n Voronoi vertices with most merges\n\
- Po - force output. If error, output neighborhood of facet\n\
- Pp - do not report precision problems\n\
-\n\
- . - list of all options\n\
- - - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt2">-</a>
-
- qh_prompt2
- synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qvoronoi- compute the Voronoi diagram. Qhull %s\n\
- input (stdin): dimension, number of points, point coordinates\n\
- comments start with a non-numeric character\n\
-\n\
-options (qvoronoi.htm):\n\
- Qu - compute furthest-site Voronoi diagram\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Tv - verify result: structure, convexity, and in-circle test\n\
- . - concise list of all options\n\
- - - one-line description of all options\n\
-\n\
-output options (subset):\n\
- s - summary of results (default)\n\
- p - Voronoi vertices\n\
- o - OFF file format (dim, Voronoi vertices, and Voronoi regions)\n\
- FN - count and Voronoi vertices for each Voronoi region\n\
- Fv - Voronoi diagram as Voronoi vertices between adjacent input sites\n\
- Fi - separating hyperplanes for bounded regions, 'Fo' for unbounded\n\
- G - Geomview output (2-d only)\n\
- QVn - Voronoi vertices for input point n, -n if not\n\
- TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-rbox c P0 D2 | qvoronoi s o rbox c P0 D2 | qvoronoi Fi\n\
-rbox c P0 D2 | qvoronoi Fo rbox c P0 D2 | qvoronoi Fv\n\
-rbox c P0 D2 | qvoronoi s Qu Fv rbox c P0 D2 | qvoronoi Qu Fo\n\
-rbox c G1 d D2 | qvoronoi s p rbox c G1 d D2 | qvoronoi QJ s p\n\
-rbox c P0 D2 | qvoronoi s Fv QV0\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt3">-</a>
-
- qh_prompt3
- concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- OFF_format p_vertices i_delaunay summary facet_dump\n\
-\n\
- Fcoincident Fd_cdd_in FD_cdd_out FF-dump-xridge Fi_bounded\n\
- Fxtremes Fmerges Fneighbors FNeigh_region FOptions\n\
- Fo_unbounded FPoint_near FQvoronoi Fsummary Fvoronoi\n\
- FIDs\n\
-\n\
- Gvertices Gpoints Gall_points Gno_planes Ginner\n\
- Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\
-\n\
- PArea_keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\
- PGood_neighbors PMerge_keep Poutput_forced Pprecision_not\n\
-\n\
- QG_vertex_good QJoggle Qsearch_1st Qtriangulate Qupper_voronoi\n\
- QV_point_good Qzinfinite\n\
-\n\
- T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\
- TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\
- TWide_trace TVertex_stop TCone_stop\n\
-\n\
- Angle_max Centrum_size Random_dist Wide_outside\n\
-";
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="main">-</a>
-
- main( argc, argv )
- processes the command line, calls qhull() to do the work, and exits
-
- design:
- initializes data structures
- reads points
- finishes initialization
- computes convex hull and other structures
- checks the result
- writes the output
- frees memory
-*/
-int main(int argc, char *argv[]) {
- int curlong, totlong; /* used !qh_NOmem */
- int exitcode, numpoints, dim;
- coordT *points;
- boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= false;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
-
- if ((argc == 1) && isatty( 0 /*stdin*/)) {
- fprintf(stdout, qh_prompt2, qh_VERSION);
- exit(qh_ERRnone);
- }
- if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompta, qh_VERSION,
- qh_promptb, qh_promptc, qh_promptd, qh_prompte);
- exit(qh_ERRnone);
- }
- if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompt3, qh_VERSION);
- exit(qh_ERRnone);
- }
- qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */
- exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
- if (!exitcode) {
- qh_option ("voronoi _bbound-last _coplanar-keep", NULL, NULL);
- qh DELAUNAY= True; /* 'v' */
- qh VORONOI= True;
- qh SCALElast= True; /* 'Qbb' */
- qh_checkflags (qh qhull_command, hidden_options);
- qh_initflags (qh qhull_command);
- points= qh_readpoints (&numpoints, &dim, &ismalloc);
- if (dim >= 5) {
- qh_option ("_merge-exact", NULL, NULL);
- qh MERGEexact= True; /* 'Qx' always */
- }
- qh_init_B (points, numpoints, dim, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_produce_output();
- if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- exitcode= qh_ERRnone;
- }
- qh NOerrexit= True; /* no more setjmp */
-#ifdef qh_NOmem
- qh_freeqhull( True);
-#else
- qh_freeqhull( False);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-#endif
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/rbox.c b/extern/qhull/src/rbox.c
deleted file mode 100644
index 1c288bddc96..00000000000
--- a/extern/qhull/src/rbox.c
+++ /dev/null
@@ -1,788 +0,0 @@
-/*<html><pre> -<a href="index.htm#TOC"
- >-------------------------------</a><a name="TOP">-</a>
-
- rbox.c
- Generate input points for qhull.
-
- notes:
- 50 points generated for 'rbox D4'
-
- This code needs a full rewrite. It needs separate procedures for each
- distribution with common, helper procedures.
-
- WARNING:
- incorrect range if qh_RANDOMmax is defined wrong (user.h)
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include <limits.h>
-#include <time.h>
-
-#include "user.h"
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-#endif
-
-#ifdef _MSC_VER /* Microsoft Visual C++ */
-#pragma warning( disable : 4244) /* conversion from double to int */
-#endif
-
-#define MINVALUE 0.8
-#define MAXdim 200
-#define PI 3.1415926535897932384
-#define DEFAULTzbox 1e6
-
-char prompt[]= "\n\
--rbox- generate various point distributions. Default is random in cube.\n\
-\n\
-args (any order, space separated): Version: 2001/06/24\n\
- 3000 number of random points in cube, lens, spiral, sphere or grid\n\
- D3 dimension 3-d\n\
- c add a unit cube to the output ('c G2.0' sets size)\n\
- d add a unit diamond to the output ('d G2.0' sets size)\n\
- l generate a regular 3-d spiral\n\
- r generate a regular polygon, ('r s Z1 G0.1' makes a cone)\n\
- s generate cospherical points\n\
- x generate random points in simplex, may use 'r' or 'Wn'\n\
- y same as 'x', plus simplex\n\
- Pn,m,r add point [n,m,r] first, pads with 0\n\
-\n\
- Ln lens distribution of radius n. Also 's', 'r', 'G', 'W'.\n\
- Mn,m,r lattice (Mesh) rotated by [n,-m,0], [m,n,0], [0,0,r], ...\n\
- '27 M1,0,1' is {0,1,2} x {0,1,2} x {0,1,2}. Try 'M3,4 z'.\n\
- W0.1 random distribution within 0.1 of the cube's or sphere's surface\n\
- Z0.5 s random points in a 0.5 disk projected to a sphere\n\
- Z0.5 s G0.6 same as Z0.5 within a 0.6 gap\n\
-\n\
- Bn bounding box coordinates, default %2.2g\n\
- h output as homogeneous coordinates for cdd\n\
- n remove command line from the first line of output\n\
- On offset coordinates by n\n\
- t use time as the random number seed (default is command line)\n\
- tn use n as the random number seed\n\
- z print integer coordinates, default 'Bn' is %2.2g\n\
-";
-
-/* ------------------------------ prototypes ----------------*/
-int roundi( double a);
-void out1( double a);
-void out2n( double a, double b);
-void out3n( double a, double b, double c);
-int qh_rand( void);
-void qh_srand( int seed);
-
-
-/* ------------------------------ globals -------------------*/
-
- FILE *fp;
- int isinteger= 0;
- double out_offset= 0.0;
-
-
-/*--------------------------------------------
--rbox- main procedure of rbox application
-*/
-int main(int argc, char **argv) {
- int i,j,k;
- int gendim;
- int cubesize, diamondsize, seed=0, count, apex;
- int dim=3 , numpoints= 0, totpoints, addpoints=0;
- int issphere=0, isaxis=0, iscdd= 0, islens= 0, isregular=0, iswidth=0, addcube=0;
- int isgap=0, isspiral=0, NOcommand= 0, adddiamond=0, istime=0;
- int isbox=0, issimplex=0, issimplex2=0, ismesh=0;
- double width=0.0, gap=0.0, radius= 0.0;
- double coord[MAXdim], offset, meshm=3.0, meshn=4.0, meshr=5.0;
- double *simplex, *simplexp;
- int nthroot, mult[MAXdim];
- double norm, factor, randr, rangap, lensangle= 0, lensbase= 1;
- double anglediff, angle, x, y, cube= 0.0, diamond= 0.0;
- double box= qh_DEFAULTbox; /* scale all numbers before output */
- double randmax= qh_RANDOMmax;
- char command[200], *s, seedbuf[200];
- time_t timedata;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= False;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf ( stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
- if (argc == 1) {
- printf (prompt, box, DEFAULTzbox);
- exit(1);
- }
- if ((s = strrchr( argv[0], '\\'))) /* Borland gives full path */
- strcpy (command, s+1);
- else
- strcpy (command, argv[0]);
- if ((s= strstr (command, ".EXE"))
- || (s= strstr (command, ".exe")))
- *s= '\0';
- /* ============= read flags =============== */
- for (i=1; i < argc; i++) {
- if (strlen (command) + strlen(argv[i]) + 1 < sizeof(command) ) {
- strcat (command, " ");
- strcat (command, argv[i]);
- }
- if (isdigit (argv[i][0])) {
- numpoints= atoi (argv[i]);
- continue;
- }
- if (argv[i][0] == '-')
- (argv[i])++;
- switch (argv[i][0]) {
- case 'c':
- addcube= 1;
- if (i+1 < argc && argv[i+1][0] == 'G')
- cube= (double) atof (&argv[++i][1]);
- break;
- case 'd':
- adddiamond= 1;
- if (i+1 < argc && argv[i+1][0] == 'G')
- diamond= (double) atof (&argv[++i][1]);
- break;
- case 'h':
- iscdd= 1;
- break;
- case 'l':
- isspiral= 1;
- break;
- case 'n':
- NOcommand= 1;
- break;
- case 'r':
- isregular= 1;
- break;
- case 's':
- issphere= 1;
- break;
- case 't':
- istime= 1;
- if (isdigit (argv[i][1]))
- seed= atoi (&argv[i][1]);
- else {
- seed= time (&timedata);
- sprintf (seedbuf, "%d", seed);
- strcat (command, seedbuf);
- }
- break;
- case 'x':
- issimplex= 1;
- break;
- case 'y':
- issimplex2= 1;
- break;
- case 'z':
- isinteger= 1;
- break;
- case 'B':
- box= (double) atof (&argv[i][1]);
- isbox= 1;
- break;
- case 'D':
- dim= atoi (&argv[i][1]);
- if (dim < 1
- || dim > MAXdim) {
- fprintf (stderr, "rbox error: dim %d too large or too small\n", dim);
- exit (1);
- }
- break;
- case 'G':
- if (argv[i][1])
- gap= (double) atof (&argv[i][1]);
- else
- gap= 0.5;
- isgap= 1;
- break;
- case 'L':
- if (argv[i][1])
- radius= (double) atof (&argv[i][1]);
- else
- radius= 10;
- islens= 1;
- break;
- case 'M':
- ismesh= 1;
- s= argv[i]+1;
- if (*s)
- meshn= strtod (s, &s);
- if (*s == ',')
- meshm= strtod (++s, &s);
- else
- meshm= 0.0;
- if (*s == ',')
- meshr= strtod (++s, &s);
- else
- meshr= sqrt (meshn*meshn + meshm*meshm);
- if (*s) {
- fprintf (stderr, "rbox warning: assuming 'M3,4,5' since mesh args are not integers or reals\n");
- meshn= 3.0, meshm=4.0, meshr=5.0;
- }
- break;
- case 'O':
- out_offset= (double) atof (&argv[i][1]);
- break;
- case 'P':
- addpoints++;
- break;
- case 'W':
- width= (double) atof (&argv[i][1]);
- iswidth= 1;
- break;
- case 'Z':
- if (argv[i][1])
- radius= (double) atof (&argv[i][1]);
- else
- radius= 1.0;
- isaxis= 1;
- break;
- default:
- fprintf (stderr, "rbox warning: unknown flag %s.\nExecute 'rbox' without arguments for documentation.\n", argv[i]);
- }
- }
- /* ============= defaults, constants, and sizes =============== */
- if (isinteger && !isbox)
- box= DEFAULTzbox;
- if (addcube) {
- cubesize= floor(ldexp(1.0,dim)+0.5);
- if (cube == 0.0)
- cube= box;
- }else
- cubesize= 0;
- if (adddiamond) {
- diamondsize= 2*dim;
- if (diamond == 0.0)
- diamond= box;
- }else
- diamondsize= 0;
- if (islens) {
- if (isaxis) {
- fprintf (stderr, "rbox error: can not combine 'Ln' with 'Zn'\n");
- exit(1);
- }
- if (radius <= 1.0) {
- fprintf (stderr, "rbox error: lens radius %.2g should be greater than 1.0\n",
- radius);
- exit(1);
- }
- lensangle= asin (1.0/radius);
- lensbase= radius * cos (lensangle);
- }
- if (!numpoints) {
- if (issimplex2)
- ; /* ok */
- else if (isregular + issimplex + islens + issphere + isaxis + isspiral + iswidth + ismesh) {
- fprintf (stderr, "rbox error: missing count\n");
- exit(1);
- }else if (adddiamond + addcube + addpoints)
- ; /* ok */
- else {
- numpoints= 50; /* ./rbox D4 is the test case */
- issphere= 1;
- }
- }
- if ((issimplex + islens + isspiral + ismesh > 1)
- || (issimplex + issphere + isspiral + ismesh > 1)) {
- fprintf (stderr, "rbox error: can only specify one of 'l', 's', 'x', 'Ln', or 'Mn,m,r' ('Ln s' is ok).\n");
- exit(1);
- }
- fp= stdout;
- /* ============= print header with total points =============== */
- if (issimplex || ismesh)
- totpoints= numpoints;
- else if (issimplex2)
- totpoints= numpoints+dim+1;
- else if (isregular) {
- totpoints= numpoints;
- if (dim == 2) {
- if (islens)
- totpoints += numpoints - 2;
- }else if (dim == 3) {
- if (islens)
- totpoints += 2 * numpoints;
- else if (isgap)
- totpoints += 1 + numpoints;
- else
- totpoints += 2;
- }
- }else
- totpoints= numpoints + isaxis;
- totpoints += cubesize + diamondsize + addpoints;
- if (iscdd)
- fprintf(fp, "%s\nbegin\n %d %d %s\n",
- NOcommand ? "" : command,
- totpoints, dim+1,
- isinteger ? "integer" : "real");
- else if (NOcommand)
- fprintf(fp, "%d\n%d\n", dim, totpoints);
- else
- fprintf(fp, "%d %s\n%d\n", dim, command, totpoints);
- /* ============= seed randoms =============== */
- if (istime == 0) {
- for (s=command; *s; s++) {
- if (issimplex2 && *s == 'y') /* make 'y' same seed as 'x' */
- i= 'x';
- else
- i= *s;
- seed= 11*seed + i;
- }
- } /* else, seed explicitly set to n or to time */
- qh_RANDOMseed_(seed);
- /* ============= explicit points =============== */
- for (i=1; i < argc; i++) {
- if (argv[i][0] == 'P') {
- s= argv[i]+1;
- count= 0;
- if (iscdd)
- out1( 1.0);
- while (*s) {
- out1( strtod (s, &s));
- count++;
- if (*s) {
- if (*s++ != ',') {
- fprintf (stderr, "rbox error: missing comma after coordinate in %s\n\n", argv[i]);
- exit (1);
- }
- }
- }
- if (count < dim) {
- for (k= dim-count; k--; )
- out1( 0.0);
- }else if (count > dim) {
- fprintf (stderr, "rbox error: %d coordinates instead of %d coordinates in %s\n\n",
- count, dim, argv[i]);
- exit (1);
- }
- fprintf (fp, "\n");
- }
- }
- /* ============= simplex distribution =============== */
- if (issimplex+issimplex2) {
- if (!(simplex= malloc( dim * (dim+1) * sizeof(double)))) {
- fprintf (stderr, "insufficient memory for simplex\n");
- exit(0);
- }
- simplexp= simplex;
- if (isregular) {
- for (i= 0; i<dim; i++) {
- for (k= 0; k<dim; k++)
- *(simplexp++)= i==k ? 1.0 : 0.0;
- }
- for (k= 0; k<dim; k++)
- *(simplexp++)= -1.0;
- }else {
- for (i= 0; i<dim+1; i++) {
- for (k= 0; k<dim; k++) {
- randr= qh_RANDOMint;
- *(simplexp++)= 2.0 * randr/randmax - 1.0;
- }
- }
- }
- if (issimplex2) {
- simplexp= simplex;
- for (i= 0; i<dim+1; i++) {
- if (iscdd)
- out1( 1.0);
- for (k= 0; k<dim; k++)
- out1( *(simplexp++) * box);
- fprintf (fp, "\n");
- }
- }
- for (j= 0; j<numpoints; j++) {
- if (iswidth)
- apex= qh_RANDOMint % (dim+1);
- else
- apex= -1;
- for (k= 0; k<dim; k++)
- coord[k]= 0.0;
- norm= 0.0;
- for (i= 0; i<dim+1; i++) {
- randr= qh_RANDOMint;
- factor= randr/randmax;
- if (i == apex)
- factor *= width;
- norm += factor;
- for (k= 0; k<dim; k++) {
- simplexp= simplex + i*dim + k;
- coord[k] += factor * (*simplexp);
- }
- }
- for (k= 0; k<dim; k++)
- coord[k] /= norm;
- if (iscdd)
- out1( 1.0);
- for (k=0; k < dim; k++)
- out1( coord[k] * box);
- fprintf (fp, "\n");
- }
- isregular= 0; /* continue with isbox */
- numpoints= 0;
- }
- /* ============= mesh distribution =============== */
- if (ismesh) {
- nthroot= pow (numpoints, 1.0/dim) + 0.99999;
- for (k= dim; k--; )
- mult[k]= 0;
- for (i= 0; i < numpoints; i++) {
- for (k= 0; k < dim; k++) {
- if (k == 0)
- out1( mult[0] * meshn + mult[1] * (-meshm));
- else if (k == 1)
- out1( mult[0] * meshm + mult[1] * meshn);
- else
- out1( mult[k] * meshr );
- }
- fprintf (fp, "\n");
- for (k= 0; k < dim; k++) {
- if (++mult[k] < nthroot)
- break;
- mult[k]= 0;
- }
- }
- }
-
- /* ============= regular points for 's' =============== */
- else if (isregular && !islens) {
- if (dim != 2 && dim != 3) {
- fprintf(stderr, "rbox error: regular points can be used only in 2-d and 3-d\n\n");
- exit(1);
- }
- if (!isaxis || radius == 0.0) {
- isaxis= 1;
- radius= 1.0;
- }
- if (dim == 3) {
- if (iscdd)
- out1( 1.0);
- out3n( 0.0, 0.0, -box);
- if (!isgap) {
- if (iscdd)
- out1( 1.0);
- out3n( 0.0, 0.0, box);
- }
- }
- angle= 0.0;
- anglediff= 2.0 * PI/numpoints;
- for (i=0; i < numpoints; i++) {
- angle += anglediff;
- x= radius * cos (angle);
- y= radius * sin (angle);
- if (dim == 2) {
- if (iscdd)
- out1( 1.0);
- out2n( x*box, y*box);
- }else {
- norm= sqrt (1.0 + x*x + y*y);
- if (iscdd)
- out1( 1.0);
- out3n( box*x/norm, box*y/norm, box/norm);
- if (isgap) {
- x *= 1-gap;
- y *= 1-gap;
- norm= sqrt (1.0 + x*x + y*y);
- if (iscdd)
- out1( 1.0);
- out3n( box*x/norm, box*y/norm, box/norm);
- }
- }
- }
- }
- /* ============= regular points for 'r Ln D2' =============== */
- else if (isregular && islens && dim == 2) {
- double cos_0;
-
- angle= lensangle;
- anglediff= 2 * lensangle/(numpoints - 1);
- cos_0= cos (lensangle);
- for (i=0; i < numpoints; i++, angle -= anglediff) {
- x= radius * sin (angle);
- y= radius * (cos (angle) - cos_0);
- if (iscdd)
- out1( 1.0);
- out2n( x*box, y*box);
- if (i != 0 && i != numpoints - 1) {
- if (iscdd)
- out1( 1.0);
- out2n( x*box, -y*box);
- }
- }
- }
- /* ============= regular points for 'r Ln D3' =============== */
- else if (isregular && islens && dim != 2) {
- if (dim != 3) {
- fprintf(stderr, "rbox error: regular points can be used only in 2-d and 3-d\n\n");
- exit(1);
- }
- angle= 0.0;
- anglediff= 2* PI/numpoints;
- if (!isgap) {
- isgap= 1;
- gap= 0.5;
- }
- offset= sqrt (radius * radius - (1-gap)*(1-gap)) - lensbase;
- for (i=0; i < numpoints; i++, angle += anglediff) {
- x= cos (angle);
- y= sin (angle);
- if (iscdd)
- out1( 1.0);
- out3n( box*x, box*y, 0);
- x *= 1-gap;
- y *= 1-gap;
- if (iscdd)
- out1( 1.0);
- out3n( box*x, box*y, box * offset);
- if (iscdd)
- out1( 1.0);
- out3n( box*x, box*y, -box * offset);
- }
- }
- /* ============= apex of 'Zn' distribution + gendim =============== */
- else {
- if (isaxis) {
- gendim= dim-1;
- if (iscdd)
- out1( 1.0);
- for (j=0; j < gendim; j++)
- out1( 0.0);
- out1( -box);
- fprintf (fp, "\n");
- }else if (islens)
- gendim= dim-1;
- else
- gendim= dim;
- /* ============= generate random point in unit cube =============== */
- for (i=0; i < numpoints; i++) {
- norm= 0.0;
- for (j=0; j < gendim; j++) {
- randr= qh_RANDOMint;
- coord[j]= 2.0 * randr/randmax - 1.0;
- norm += coord[j] * coord[j];
- }
- norm= sqrt (norm);
- /* ============= dim-1 point of 'Zn' distribution ========== */
- if (isaxis) {
- if (!isgap) {
- isgap= 1;
- gap= 1.0;
- }
- randr= qh_RANDOMint;
- rangap= 1.0 - gap * randr/randmax;
- factor= radius * rangap / norm;
- for (j=0; j<gendim; j++)
- coord[j]= factor * coord[j];
- /* ============= dim-1 point of 'Ln s' distribution =========== */
- }else if (islens && issphere) {
- if (!isgap) {
- isgap= 1;
- gap= 1.0;
- }
- randr= qh_RANDOMint;
- rangap= 1.0 - gap * randr/randmax;
- factor= rangap / norm;
- for (j=0; j<gendim; j++)
- coord[j]= factor * coord[j];
- /* ============= dim-1 point of 'Ln' distribution ========== */
- }else if (islens && !issphere) {
- if (!isgap) {
- isgap= 1;
- gap= 1.0;
- }
- j= qh_RANDOMint % gendim;
- if (coord[j] < 0)
- coord[j]= -1.0 - coord[j] * gap;
- else
- coord[j]= 1.0 - coord[j] * gap;
- /* ============= point of 'l' distribution =============== */
- }else if (isspiral) {
- if (dim != 3) {
- fprintf(stderr, "rbox error: spiral distribution is available only in 3d\n\n");
- exit(1);
- }
- coord[0]= cos(2*PI*i/(numpoints - 1));
- coord[1]= sin(2*PI*i/(numpoints - 1));
- coord[2]= 2.0*(double)i/(double)(numpoints-1) - 1.0;
- /* ============= point of 's' distribution =============== */
- }else if (issphere) {
- factor= 1.0/norm;
- if (iswidth) {
- randr= qh_RANDOMint;
- factor *= 1.0 - width * randr/randmax;
- }
- for (j=0; j<dim; j++)
- coord[j]= factor * coord[j];
- }
- /* ============= project 'Zn s' point in to sphere =============== */
- if (isaxis && issphere) {
- coord[dim-1]= 1.0;
- norm= 1.0;
- for (j=0; j<gendim; j++)
- norm += coord[j] * coord[j];
- norm= sqrt (norm);
- for (j=0; j<dim; j++)
- coord[j]= coord[j] / norm;
- if (iswidth) {
- randr= qh_RANDOMint;
- coord[dim-1] *= 1 - width * randr/randmax;
- }
- /* ============= project 'Zn' point onto cube =============== */
- }else if (isaxis && !issphere) { /* not very interesting */
- randr= qh_RANDOMint;
- coord[dim-1]= 2.0 * randr/randmax - 1.0;
- /* ============= project 'Ln' point out to sphere =============== */
- }else if (islens) {
- coord[dim-1]= lensbase;
- for (j=0, norm= 0; j<dim; j++)
- norm += coord[j] * coord[j];
- norm= sqrt (norm);
- for (j=0; j<dim; j++)
- coord[j]= coord[j] * radius/ norm;
- coord[dim-1] -= lensbase;
- if (iswidth) {
- randr= qh_RANDOMint;
- coord[dim-1] *= 1 - width * randr/randmax;
- }
- if (qh_RANDOMint > randmax/2)
- coord[dim-1]= -coord[dim-1];
- /* ============= project 'Wn' point toward boundary =============== */
- }else if (iswidth && !issphere) {
- j= qh_RANDOMint % gendim;
- if (coord[j] < 0)
- coord[j]= -1.0 - coord[j] * width;
- else
- coord[j]= 1.0 - coord[j] * width;
- }
- /* ============= write point =============== */
- if (iscdd)
- out1( 1.0);
- for (k=0; k < dim; k++)
- out1( coord[k] * box);
- fprintf (fp, "\n");
- }
- }
- /* ============= write cube vertices =============== */
- if (addcube) {
- for (j=0; j<cubesize; j++) {
- if (iscdd)
- out1( 1.0);
- for (k=dim-1; k>=0; k--) {
- if (j & ( 1 << k))
- out1( cube);
- else
- out1( -cube);
- }
- fprintf (fp, "\n");
- }
- }
- /* ============= write diamond vertices =============== */
- if (adddiamond) {
- for (j=0; j<diamondsize; j++) {
- if (iscdd)
- out1( 1.0);
- for (k=dim-1; k>=0; k--) {
- if (j/2 != k)
- out1( 0.0);
- else if (j & 0x1)
- out1( diamond);
- else
- out1( -diamond);
- }
- fprintf (fp, "\n");
- }
- }
- if (iscdd)
- fprintf (fp, "end\nhull\n");
- return 0;
- } /* rbox */
-
-/*------------------------------------------------
--outxxx - output functions
-*/
-int roundi( double a) {
- if (a < 0.0) {
- if (a - 0.5 < INT_MIN) {
- fprintf(stderr, "rbox input error: coordinate %2.2g is too large. Reduce 'Bn'\n", a);
- exit (1);
- }
- return a - 0.5;
- }else {
- if (a + 0.5 > INT_MAX) {
- fprintf(stderr, "rbox input error: coordinate %2.2g is too large. Reduce 'Bn'\n", a);
- exit (1);
- }
- return a + 0.5;
- }
-} /* roundi */
-
-void out1(double a) {
-
- if (isinteger)
- fprintf(fp, "%d ", roundi( a+out_offset));
- else
- fprintf(fp, qh_REAL_1, a+out_offset);
-} /* out1 */
-
-void out2n( double a, double b) {
-
- if (isinteger)
- fprintf(fp, "%d %d\n", roundi(a+out_offset), roundi(b+out_offset));
- else
- fprintf(fp, qh_REAL_2n, a+out_offset, b+out_offset);
-} /* out2n */
-
-void out3n( double a, double b, double c) {
-
- if (isinteger)
- fprintf(fp, "%d %d %d\n", roundi(a+out_offset), roundi(b+out_offset), roundi(c+out_offset));
- else
- fprintf(fp, qh_REAL_3n, a+out_offset, b+out_offset, c+out_offset);
-} /* out3n */
-
-/*-------------------------------------------------
--rand & srand- generate pseudo-random number between 1 and 2^31 -2
- from Park & Miller's minimimal standard random number generator
- Communications of the ACM, 31:1192-1201, 1988.
-notes:
- does not use 0 or 2^31 -1
- this is silently enforced by qh_srand()
- copied from geom2.c
-*/
-static int seed = 1; /* global static */
-
-int qh_rand( void) {
-#define qh_rand_a 16807
-#define qh_rand_m 2147483647
-#define qh_rand_q 127773 /* m div a */
-#define qh_rand_r 2836 /* m mod a */
- int lo, hi, test;
-
- hi = seed / qh_rand_q; /* seed div q */
- lo = seed % qh_rand_q; /* seed mod q */
- test = qh_rand_a * lo - qh_rand_r * hi;
- if (test > 0)
- seed= test;
- else
- seed= test + qh_rand_m;
- return seed;
-} /* rand */
-
-void qh_srand( int newseed) {
- if (newseed < 1)
- seed= 1;
- else if (newseed >= qh_rand_m)
- seed= qh_rand_m - 1;
- else
- seed= newseed;
-} /* qh_srand */
-
diff --git a/extern/qhull/src/stat.c b/extern/qhull/src/stat.c
deleted file mode 100644
index ede0323cb88..00000000000
--- a/extern/qhull/src/stat.c
+++ /dev/null
@@ -1,700 +0,0 @@
-/*<html><pre> -<a href="qh-stat.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- stat.c
- contains all statistics that are collected for qhull
-
- see qh-stat.htm and stat.h
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*============ global data structure ==========*/
-
-#if qh_QHpointer
-qhstatT *qh_qhstat=NULL; /* global data structure */
-#else
-qhstatT qh_qhstat; /* add "={0}" if this causes a compiler error */
-#endif
-
-/*========== functions in alphabetic order ================*/
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="allstatA">-</a>
-
- qh_allstatA()
- define statistics in groups of 20
-
- notes:
- (otherwise, 'gcc -O2' uses too much memory)
- uses qhstat.next
-*/
-void qh_allstatA (void) {
-
- /* zdef_(type,name,doc,average) */
- zzdef_(zdoc, Zdoc2, "precision statistics", -1);
- zdef_(zinc, Znewvertex, NULL, -1);
- zdef_(wadd, Wnewvertex, "ave. distance of a new vertex to a facet (not 0s)", Znewvertex);
- zzdef_(wmax, Wnewvertexmax, "max. distance of a new vertex to a facet", -1);
- zdef_(wmax, Wvertexmax, "max. distance of an output vertex to a facet", -1);
- zdef_(wmin, Wvertexmin, "min. distance of an output vertex to a facet", -1);
- zdef_(wmin, Wmindenom, "min. denominator in hyperplane computation", -1);
-
- qhstat precision= qhstat next; /* call qh_precision for each of these */
- zzdef_(zdoc, Zdoc3, "precision problems (corrected unless 'Q0' or an error)", -1);
- zzdef_(zinc, Zcoplanarridges, "coplanar half ridges in output", -1);
- zzdef_(zinc, Zconcaveridges, "concave half ridges in output", -1);
- zzdef_(zinc, Zflippedfacets, "flipped facets", -1);
- zzdef_(zinc, Zcoplanarhorizon, "coplanar horizon facets for new vertices", -1);
- zzdef_(zinc, Zcoplanarpart, "coplanar points during partitioning", -1);
- zzdef_(zinc, Zminnorm, "degenerate hyperplanes recomputed with gaussian elimination", -1);
- zzdef_(zinc, Znearlysingular, "nearly singular or axis-parallel hyperplanes", -1);
- zzdef_(zinc, Zback0, "zero divisors during back substitute", -1);
- zzdef_(zinc, Zgauss0, "zero divisors during gaussian elimination", -1);
- zzdef_(zinc, Zmultiridge, "ridges with multiple neighbors", -1);
-}
-void qh_allstatB (void) {
- zzdef_(zdoc, Zdoc1, "summary information", -1);
- zdef_(zinc, Zvertices, "number of vertices in output", -1);
- zdef_(zinc, Znumfacets, "number of facets in output", -1);
- zdef_(zinc, Znonsimplicial, "number of non-simplicial facets in output", -1);
- zdef_(zinc, Znowsimplicial, "number of simplicial facets that were merged", -1);
- zdef_(zinc, Znumridges, "number of ridges in output", -1);
- zdef_(zadd, Znumridges, "average number of ridges per facet", Znumfacets);
- zdef_(zmax, Zmaxridges, "maximum number of ridges", -1);
- zdef_(zadd, Znumneighbors, "average number of neighbors per facet", Znumfacets);
- zdef_(zmax, Zmaxneighbors, "maximum number of neighbors", -1);
- zdef_(zadd, Znumvertices, "average number of vertices per facet", Znumfacets);
- zdef_(zmax, Zmaxvertices, "maximum number of vertices", -1);
- zdef_(zadd, Znumvneighbors, "average number of neighbors per vertex", Zvertices);
- zdef_(zmax, Zmaxvneighbors, "maximum number of neighbors", -1);
- zdef_(wadd, Wcpu, "cpu seconds for qhull after input", -1);
- zdef_(zinc, Ztotvertices, "vertices created altogether", -1);
- zzdef_(zinc, Zsetplane, "facets created altogether", -1);
- zdef_(zinc, Ztotridges, "ridges created altogether", -1);
- zdef_(zinc, Zpostfacets, "facets before post merge", -1);
- zdef_(zadd, Znummergetot, "average merges per facet (at most 511)", Znumfacets);
- zdef_(zmax, Znummergemax, " maximum merges for a facet (at most 511)", -1);
- zdef_(zinc, Zangle, NULL, -1);
- zdef_(wadd, Wangle, "average angle (cosine) of facet normals for all ridges", Zangle);
- zdef_(wmax, Wanglemax, " maximum angle (cosine) of facet normals across a ridge", -1);
- zdef_(wmin, Wanglemin, " minimum angle (cosine) of facet normals across a ridge", -1);
- zdef_(wadd, Wareatot, "total area of facets", -1);
- zdef_(wmax, Wareamax, " maximum facet area", -1);
- zdef_(wmin, Wareamin, " minimum facet area", -1);
-}
-void qh_allstatC (void) {
- zdef_(zdoc, Zdoc9, "build hull statistics", -1);
- zzdef_(zinc, Zprocessed, "points processed", -1);
- zzdef_(zinc, Zretry, "retries due to precision problems", -1);
- zdef_(wmax, Wretrymax, " max. random joggle", -1);
- zdef_(zmax, Zmaxvertex, "max. vertices at any one time", -1);
- zdef_(zinc, Ztotvisible, "ave. visible facets per iteration", Zprocessed);
- zdef_(zinc, Zinsidevisible, " ave. visible facets without an horizon neighbor", Zprocessed);
- zdef_(zadd, Zvisfacettot, " ave. facets deleted per iteration", Zprocessed);
- zdef_(zmax, Zvisfacetmax, " maximum", -1);
- zdef_(zadd, Zvisvertextot, "ave. visible vertices per iteration", Zprocessed);
- zdef_(zmax, Zvisvertexmax, " maximum", -1);
- zdef_(zinc, Ztothorizon, "ave. horizon facets per iteration", Zprocessed);
- zdef_(zadd, Znewfacettot, "ave. new or merged facets per iteration", Zprocessed);
- zdef_(zmax, Znewfacetmax, " maximum (includes initial simplex)", -1);
- zdef_(wadd, Wnewbalance, "average new facet balance", Zprocessed);
- zdef_(wadd, Wnewbalance2, " standard deviation", -1);
- zdef_(wadd, Wpbalance, "average partition balance", Zpbalance);
- zdef_(wadd, Wpbalance2, " standard deviation", -1);
- zdef_(zinc, Zpbalance, " number of trials", -1);
- zdef_(zinc, Zsearchpoints, "searches of all points for initial simplex", -1);
- zdef_(zinc, Zdetsimplex, "determinants computed (area & initial hull)", -1);
- zdef_(zinc, Znoarea, "determinants not computed because vertex too low", -1);
- zdef_(zinc, Znotmax, "points ignored (not above max_outside)", -1);
- zdef_(zinc, Znotgood, "points ignored (not above a good facet)", -1);
- zdef_(zinc, Znotgoodnew, "points ignored (didn't create a good new facet)", -1);
- zdef_(zinc, Zgoodfacet, "good facets found", -1);
- zzdef_(zinc, Znumvisibility, "distance tests for facet visibility", -1);
- zdef_(zinc, Zdistvertex, "distance tests to report minimum vertex", -1);
- zdef_(zinc, Ztotcheck, "points checked for facets' outer planes", -1);
- zzdef_(zinc, Zcheckpart, " ave. distance tests per check", Ztotcheck);
-}
-void qh_allstatD(void) {
- zdef_(zdoc, Zdoc4, "partitioning statistics (see previous for outer planes)", -1);
- zzdef_(zadd, Zdelvertextot, "total vertices deleted", -1);
- zdef_(zmax, Zdelvertexmax, " maximum vertices deleted per iteration", -1);
- zdef_(zinc, Zfindbest, "calls to findbest", -1);
- zdef_(zadd, Zfindbesttot, " ave. facets tested", Zfindbest);
- zdef_(zmax, Zfindbestmax, " max. facets tested", -1);
- zdef_(zadd, Zfindcoplanar, " ave. coplanar search", Zfindbest);
- zdef_(zinc, Zfindnew, "calls to findbestnew", -1);
- zdef_(zadd, Zfindnewtot, " ave. facets tested", Zfindnew);
- zdef_(zmax, Zfindnewmax, " max. facets tested", -1);
- zdef_(zinc, Zfindnewjump, " ave. clearly better", Zfindnew);
- zdef_(zinc, Zfindnewsharp, " calls due to qh_sharpnewfacets", -1);
- zdef_(zinc, Zfindhorizon, "calls to findhorizon", -1);
- zdef_(zadd, Zfindhorizontot, " ave. facets tested", Zfindhorizon);
- zdef_(zmax, Zfindhorizonmax, " max. facets tested", -1);
- zdef_(zinc, Zfindjump, " ave. clearly better", Zfindhorizon);
- zdef_(zinc, Zparthorizon, " horizon facets better than bestfacet", -1);
- zdef_(zinc, Zpartangle, "angle tests for repartitioned coplanar points", -1);
- zdef_(zinc, Zpartflip, " repartitioned coplanar points for flipped orientation", -1);
- zdef_(zinc, Zpartinside, "inside points", -1);
- zdef_(zinc, Zpartnear, " inside points kept with a facet", -1);
- zdef_(zinc, Zcoplanarinside, " inside points that were coplanar with a facet", -1);
- zdef_(wadd, Wmaxout, "difference in max_outside at final check", -1);
-}
-void qh_allstatE(void) {
- zzdef_(zinc, Zpartitionall, "distance tests for initial partition", -1);
- zdef_(zinc, Ztotpartition, "partitions of a point", -1);
- zzdef_(zinc, Zpartition, "distance tests for partitioning", -1);
- zzdef_(zinc, Zdistcheck, "distance tests for checking flipped facets", -1);
- zzdef_(zinc, Zdistconvex, "distance tests for checking convexity", -1);
- zdef_(zinc, Zdistgood, "distance tests for checking good point", -1);
- zdef_(zinc, Zdistio, "distance tests for output", -1);
- zdef_(zinc, Zdiststat, "distance tests for statistics", -1);
- zdef_(zinc, Zdistplane, "total number of distance tests", -1);
- zdef_(zinc, Ztotpartcoplanar, "partitions of coplanar points or deleted vertices", -1);
- zzdef_(zinc, Zpartcoplanar, " distance tests for these partitions", -1);
- zdef_(zinc, Zcomputefurthest, "distance tests for computing furthest", -1);
-}
-void qh_allstatE2(void) {
- zdef_(zdoc, Zdoc5, "statistics for matching ridges", -1);
- zdef_(zinc, Zhashlookup, "total lookups for matching ridges of new facets", -1);
- zdef_(zinc, Zhashtests, "average number of tests to match a ridge", Zhashlookup);
- zdef_(zinc, Zhashridge, "total lookups of subridges (duplicates and boundary)", -1);
- zdef_(zinc, Zhashridgetest, "average number of tests per subridge", Zhashridge);
- zdef_(zinc, Zdupsame, "duplicated ridges in same merge cycle", -1);
- zdef_(zinc, Zdupflip, "duplicated ridges with flipped facets", -1);
-
- zdef_(zdoc, Zdoc6, "statistics for determining merges", -1);
- zdef_(zinc, Zangletests, "angles computed for ridge convexity", -1);
- zdef_(zinc, Zbestcentrum, "best merges used centrum instead of vertices",-1);
- zzdef_(zinc, Zbestdist, "distance tests for best merge", -1);
- zzdef_(zinc, Zcentrumtests, "distance tests for centrum convexity", -1);
- zzdef_(zinc, Zdistzero, "distance tests for checking simplicial convexity", -1);
- zdef_(zinc, Zcoplanarangle, "coplanar angles in getmergeset", -1);
- zdef_(zinc, Zcoplanarcentrum, "coplanar centrums in getmergeset", -1);
- zdef_(zinc, Zconcaveridge, "concave ridges in getmergeset", -1);
-}
-void qh_allstatF(void) {
- zdef_(zdoc, Zdoc7, "statistics for merging", -1);
- zdef_(zinc, Zpremergetot, "merge iterations", -1);
- zdef_(zadd, Zmergeinittot, "ave. initial non-convex ridges per iteration", Zpremergetot);
- zdef_(zadd, Zmergeinitmax, " maximum", -1);
- zdef_(zadd, Zmergesettot, " ave. additional non-convex ridges per iteration", Zpremergetot);
- zdef_(zadd, Zmergesetmax, " maximum additional in one pass", -1);
- zdef_(zadd, Zmergeinittot2, "initial non-convex ridges for post merging", -1);
- zdef_(zadd, Zmergesettot2, " additional non-convex ridges", -1);
- zdef_(wmax, Wmaxoutside, "max distance of vertex or coplanar point above facet (w/roundoff)", -1);
- zdef_(wmin, Wminvertex, "max distance of merged vertex below facet (or roundoff)", -1);
- zdef_(zinc, Zwidefacet, "centrums frozen due to a wide merge", -1);
- zdef_(zinc, Zwidevertices, "centrums frozen due to extra vertices", -1);
- zzdef_(zinc, Ztotmerge, "total number of facets or cycles of facets merged", -1);
- zdef_(zinc, Zmergesimplex, "merged a simplex", -1);
- zdef_(zinc, Zonehorizon, "simplices merged into coplanar horizon", -1);
- zzdef_(zinc, Zcyclehorizon, "cycles of facets merged into coplanar horizon", -1);
- zzdef_(zadd, Zcyclefacettot, " ave. facets per cycle", Zcyclehorizon);
- zdef_(zmax, Zcyclefacetmax, " max. facets", -1);
- zdef_(zinc, Zmergeintohorizon, "new facets merged into horizon", -1);
- zdef_(zinc, Zmergenew, "new facets merged", -1);
- zdef_(zinc, Zmergehorizon, "horizon facets merged into new facets", -1);
- zdef_(zinc, Zmergevertex, "vertices deleted by merging", -1);
- zdef_(zinc, Zcyclevertex, "vertices deleted by merging into coplanar horizon", -1);
- zdef_(zinc, Zdegenvertex, "vertices deleted by degenerate facet", -1);
- zdef_(zinc, Zmergeflipdup, "merges due to flipped facets in duplicated ridge", -1);
- zdef_(zinc, Zneighbor, "merges due to redundant neighbors", -1);
- zdef_(zadd, Ztestvneighbor, "non-convex vertex neighbors", -1);
-}
-void qh_allstatG(void) {
- zdef_(zinc, Zacoplanar, "merges due to angle coplanar facets", -1);
- zdef_(wadd, Wacoplanartot, " average merge distance", Zacoplanar);
- zdef_(wmax, Wacoplanarmax, " maximum merge distance", -1);
- zdef_(zinc, Zcoplanar, "merges due to coplanar facets", -1);
- zdef_(wadd, Wcoplanartot, " average merge distance", Zcoplanar);
- zdef_(wmax, Wcoplanarmax, " maximum merge distance", -1);
- zdef_(zinc, Zconcave, "merges due to concave facets", -1);
- zdef_(wadd, Wconcavetot, " average merge distance", Zconcave);
- zdef_(wmax, Wconcavemax, " maximum merge distance", -1);
- zdef_(zinc, Zavoidold, "coplanar/concave merges due to avoiding old merge", -1);
- zdef_(wadd, Wavoidoldtot, " average merge distance", Zavoidold);
- zdef_(wmax, Wavoidoldmax, " maximum merge distance", -1);
- zdef_(zinc, Zdegen, "merges due to degenerate facets", -1);
- zdef_(wadd, Wdegentot, " average merge distance", Zdegen);
- zdef_(wmax, Wdegenmax, " maximum merge distance", -1);
- zdef_(zinc, Zflipped, "merges due to removing flipped facets", -1);
- zdef_(wadd, Wflippedtot, " average merge distance", Zflipped);
- zdef_(wmax, Wflippedmax, " maximum merge distance", -1);
- zdef_(zinc, Zduplicate, "merges due to duplicated ridges", -1);
- zdef_(wadd, Wduplicatetot, " average merge distance", Zduplicate);
- zdef_(wmax, Wduplicatemax, " maximum merge distance", -1);
-}
-void qh_allstatH(void) {
- zdef_(zdoc, Zdoc8, "renamed vertex statistics", -1);
- zdef_(zinc, Zrenameshare, "renamed vertices shared by two facets", -1);
- zdef_(zinc, Zrenamepinch, "renamed vertices in a pinched facet", -1);
- zdef_(zinc, Zrenameall, "renamed vertices shared by multiple facets", -1);
- zdef_(zinc, Zfindfail, "rename failures due to duplicated ridges", -1);
- zdef_(zinc, Zdupridge, " duplicate ridges detected", -1);
- zdef_(zinc, Zdelridge, "deleted ridges due to renamed vertices", -1);
- zdef_(zinc, Zdropneighbor, "dropped neighbors due to renamed vertices", -1);
- zdef_(zinc, Zdropdegen, "degenerate facets due to dropped neighbors", -1);
- zdef_(zinc, Zdelfacetdup, " facets deleted because of no neighbors", -1);
- zdef_(zinc, Zremvertex, "vertices removed from facets due to no ridges", -1);
- zdef_(zinc, Zremvertexdel, " deleted", -1);
- zdef_(zinc, Zintersectnum, "vertex intersections for locating redundant vertices", -1);
- zdef_(zinc, Zintersectfail, "intersections failed to find a redundant vertex", -1);
- zdef_(zinc, Zintersect, "intersections found redundant vertices", -1);
- zdef_(zadd, Zintersecttot, " ave. number found per vertex", Zintersect);
- zdef_(zmax, Zintersectmax, " max. found for a vertex", -1);
- zdef_(zinc, Zvertexridge, NULL, -1);
- zdef_(zadd, Zvertexridgetot, " ave. number of ridges per tested vertex", Zvertexridge);
- zdef_(zmax, Zvertexridgemax, " max. number of ridges per tested vertex", -1);
-
- zdef_(zdoc, Zdoc10, "memory usage statistics (in bytes)", -1);
- zdef_(zadd, Zmemfacets, "for facets and their normals, neighbor and vertex sets", -1);
- zdef_(zadd, Zmemvertices, "for vertices and their neighbor sets", -1);
- zdef_(zadd, Zmempoints, "for input points and outside and coplanar sets",-1);
- zdef_(zadd, Zmemridges, "for ridges and their vertex sets", -1);
-} /* allstat */
-
-void qh_allstatI(void) {
- qhstat vridges= qhstat next;
- zzdef_(zdoc, Zdoc11, "Voronoi ridge statistics", -1);
- zzdef_(zinc, Zridge, "non-simplicial Voronoi vertices for all ridges", -1);
- zzdef_(wadd, Wridge, " ave. distance to ridge", Zridge);
- zzdef_(wmax, Wridgemax, " max. distance to ridge", -1);
- zzdef_(zinc, Zridgemid, "bounded ridges", -1);
- zzdef_(wadd, Wridgemid, " ave. distance of midpoint to ridge", Zridgemid);
- zzdef_(wmax, Wridgemidmax, " max. distance of midpoint to ridge", -1);
- zzdef_(zinc, Zridgeok, "bounded ridges with ok normal", -1);
- zzdef_(wadd, Wridgeok, " ave. angle to ridge", Zridgeok);
- zzdef_(wmax, Wridgeokmax, " max. angle to ridge", -1);
- zzdef_(zinc, Zridge0, "bounded ridges with near-zero normal", -1);
- zzdef_(wadd, Wridge0, " ave. angle to ridge", Zridge0);
- zzdef_(wmax, Wridge0max, " max. angle to ridge", -1);
-
- zdef_(zdoc, Zdoc12, "Triangulation statistics (Qt)", -1);
- zdef_(zinc, Ztricoplanar, "non-simplicial facets triangulated", -1);
- zdef_(zadd, Ztricoplanartot, " ave. new facets created (may be deleted)", Ztricoplanar);
- zdef_(zmax, Ztricoplanarmax, " max. new facets created", -1);
- zdef_(zinc, Ztrinull, "null new facets deleted (duplicated vertex)", -1);
- zdef_(zinc, Ztrimirror, "mirrored pairs of new facets deleted (same vertices)", -1);
- zdef_(zinc, Ztridegen, "degenerate new facets in output (same ridge)", -1);
-} /* allstat */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="allstatistics">-</a>
-
- qh_allstatistics()
- reset printed flag for all statistics
-*/
-void qh_allstatistics (void) {
- int i;
-
- for (i=ZEND; i--; )
- qhstat printed[i]= False;
-} /* allstatistics */
-
-#if qh_KEEPstatistics
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="collectstatistics">-</a>
-
- qh_collectstatistics()
- collect statistics for qh.facet_list
-
-*/
-void qh_collectstatistics (void) {
- facetT *facet, *neighbor, **neighborp;
- vertexT *vertex, **vertexp;
- realT dotproduct, dist;
- int sizneighbors, sizridges, sizvertices, i;
-
- qh old_randomdist= qh RANDOMdist;
- qh RANDOMdist= False;
- zval_(Zmempoints)= qh num_points * qh normal_size +
- sizeof (qhT) + sizeof (qhstatT);
- zval_(Zmemfacets)= 0;
- zval_(Zmemridges)= 0;
- zval_(Zmemvertices)= 0;
- zval_(Zangle)= 0;
- wval_(Wangle)= 0.0;
- zval_(Znumridges)= 0;
- zval_(Znumfacets)= 0;
- zval_(Znumneighbors)= 0;
- zval_(Znumvertices)= 0;
- zval_(Znumvneighbors)= 0;
- zval_(Znummergetot)= 0;
- zval_(Znummergemax)= 0;
- zval_(Zvertices)= qh num_vertices - qh_setsize (qh del_vertices);
- if (qh MERGING || qh APPROXhull || qh JOGGLEmax < REALmax/2)
- wmax_(Wmaxoutside, qh max_outside);
- if (qh MERGING)
- wmin_(Wminvertex, qh min_vertex);
- FORALLfacets
- facet->seen= False;
- if (qh DELAUNAY) {
- FORALLfacets {
- if (facet->upperdelaunay != qh UPPERdelaunay)
- facet->seen= True; /* remove from angle statistics */
- }
- }
- FORALLfacets {
- if (facet->visible && qh NEWfacets)
- continue;
- sizvertices= qh_setsize (facet->vertices);
- sizneighbors= qh_setsize (facet->neighbors);
- sizridges= qh_setsize (facet->ridges);
- zinc_(Znumfacets);
- zadd_(Znumvertices, sizvertices);
- zmax_(Zmaxvertices, sizvertices);
- zadd_(Znumneighbors, sizneighbors);
- zmax_(Zmaxneighbors, sizneighbors);
- zadd_(Znummergetot, facet->nummerge);
- i= facet->nummerge; /* avoid warnings */
- zmax_(Znummergemax, i);
- if (!facet->simplicial) {
- if (sizvertices == qh hull_dim) {
- zinc_(Znowsimplicial);
- }else {
- zinc_(Znonsimplicial);
- }
- }
- if (sizridges) {
- zadd_(Znumridges, sizridges);
- zmax_(Zmaxridges, sizridges);
- }
- zadd_(Zmemfacets, sizeof (facetT) + qh normal_size + 2*sizeof (setT)
- + SETelemsize * (sizneighbors + sizvertices));
- if (facet->ridges) {
- zadd_(Zmemridges,
- sizeof (setT) + SETelemsize * sizridges + sizridges *
- (sizeof (ridgeT) + sizeof (setT) + SETelemsize * (qh hull_dim-1))/2);
- }
- if (facet->outsideset)
- zadd_(Zmempoints, sizeof (setT) + SETelemsize * qh_setsize (facet->outsideset));
- if (facet->coplanarset)
- zadd_(Zmempoints, sizeof (setT) + SETelemsize * qh_setsize (facet->coplanarset));
- if (facet->seen) /* Delaunay upper envelope */
- continue;
- facet->seen= True;
- FOREACHneighbor_(facet) {
- if (neighbor == qh_DUPLICATEridge || neighbor == qh_MERGEridge
- || neighbor->seen || !facet->normal || !neighbor->normal)
- continue;
- dotproduct= qh_getangle(facet->normal, neighbor->normal);
- zinc_(Zangle);
- wadd_(Wangle, dotproduct);
- wmax_(Wanglemax, dotproduct)
- wmin_(Wanglemin, dotproduct)
- }
- if (facet->normal) {
- FOREACHvertex_(facet->vertices) {
- zinc_(Zdiststat);
- qh_distplane(vertex->point, facet, &dist);
- wmax_(Wvertexmax, dist);
- wmin_(Wvertexmin, dist);
- }
- }
- }
- FORALLvertices {
- if (vertex->deleted)
- continue;
- zadd_(Zmemvertices, sizeof (vertexT));
- if (vertex->neighbors) {
- sizneighbors= qh_setsize (vertex->neighbors);
- zadd_(Znumvneighbors, sizneighbors);
- zmax_(Zmaxvneighbors, sizneighbors);
- zadd_(Zmemvertices, sizeof (vertexT) + SETelemsize * sizneighbors);
- }
- }
- qh RANDOMdist= qh old_randomdist;
-} /* collectstatistics */
-#endif /* qh_KEEPstatistics */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="freestatistics">-</a>
-
- qh_freestatistics( )
- free memory used for statistics
-*/
-void qh_freestatistics (void) {
-
-#if qh_QHpointer
- free (qh_qhstat);
- qh_qhstat= NULL;
-#endif
-} /* freestatistics */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="initstatistics">-</a>
-
- qh_initstatistics( )
- allocate and initialize statistics
-
- notes:
- uses malloc() instead of qh_memalloc() since mem.c not set up yet
-*/
-void qh_initstatistics (void) {
- int i;
- realT realx;
- int intx;
-
-#if qh_QHpointer
- if (!(qh_qhstat= (qhstatT *)malloc (sizeof(qhstatT)))) {
- fprintf (qhmem.ferr, "qhull error (qh_initstatistics): insufficient memory\n");
- exit (1); /* can not use qh_errexit() */
- }
-#endif
-
- qhstat next= 0;
- qh_allstatA();
- qh_allstatB();
- qh_allstatC();
- qh_allstatD();
- qh_allstatE();
- qh_allstatE2();
- qh_allstatF();
- qh_allstatG();
- qh_allstatH();
- qh_allstatI();
- if (qhstat next > sizeof(qhstat id)) {
- fprintf (qhmem.ferr, "qhull error (qh_initstatistics): increase size of qhstat.id[].\n\
- qhstat.next %d should be <= sizeof(qhstat id) %ld\n", qhstat next, sizeof(qhstat id));
-#if 0 /* for locating error, Znumridges should be duplicated */
- for (i=0; i < ZEND; i++) {
- int j;
- for (j=i+1; j < ZEND; j++) {
- if (qhstat id[i] == qhstat id[j]) {
- fprintf (qhmem.ferr, "qhull error (qh_initstatistics): duplicated statistic %d at indices %d and %d\n",
- qhstat id[i], i, j);
- }
- }
- }
-#endif
- exit (1); /* can not use qh_errexit() */
- }
- qhstat init[zinc].i= 0;
- qhstat init[zadd].i= 0;
- qhstat init[zmin].i= INT_MAX;
- qhstat init[zmax].i= INT_MIN;
- qhstat init[wadd].r= 0;
- qhstat init[wmin].r= REALmax;
- qhstat init[wmax].r= -REALmax;
- for (i=0; i < ZEND; i++) {
- if (qhstat type[i] > ZTYPEreal) {
- realx= qhstat init[(unsigned char)(qhstat type[i])].r;
- qhstat stats[i].r= realx;
- }else if (qhstat type[i] != zdoc) {
- intx= qhstat init[(unsigned char)(qhstat type[i])].i;
- qhstat stats[i].i= intx;
- }
- }
-} /* initstatistics */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="newstats">-</a>
-
- qh_newstats( )
- returns True if statistics for zdoc
-
- returns:
- next zdoc
-*/
-boolT qh_newstats (int index, int *nextindex) {
- boolT isnew= False;
- int start, i;
-
- if (qhstat type[qhstat id[index]] == zdoc)
- start= index+1;
- else
- start= index;
- for (i= start; i < qhstat next && qhstat type[qhstat id[i]] != zdoc; i++) {
- if (!qh_nostatistic(qhstat id[i]) && !qhstat printed[qhstat id[i]])
- isnew= True;
- }
- *nextindex= i;
- return isnew;
-} /* newstats */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="nostatistic">-</a>
-
- qh_nostatistic( index )
- true if no statistic to print
-*/
-boolT qh_nostatistic (int i) {
-
- if ((qhstat type[i] > ZTYPEreal
- &&qhstat stats[i].r == qhstat init[(unsigned char)(qhstat type[i])].r)
- || (qhstat type[i] < ZTYPEreal
- &&qhstat stats[i].i == qhstat init[(unsigned char)(qhstat type[i])].i))
- return True;
- return False;
-} /* nostatistic */
-
-#if qh_KEEPstatistics
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="printallstatistics">-</a>
-
- qh_printallstatistics( fp, string )
- print all statistics with header 'string'
-*/
-void qh_printallstatistics (FILE *fp, char *string) {
-
- qh_allstatistics();
- qh_collectstatistics();
- qh_printstatistics (fp, string);
- qh_memstatistics (fp);
-}
-
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="printstatistics">-</a>
-
- qh_printstatistics( fp, string )
- print statistics to a file with header 'string'
- skips statistics with qhstat.printed[] (reset with qh_allstatistics)
-
- see:
- qh_printallstatistics()
-*/
-void qh_printstatistics (FILE *fp, char *string) {
- int i, k;
- realT ave;
-
- if (qh num_points != qh num_vertices) {
- wval_(Wpbalance)= 0;
- wval_(Wpbalance2)= 0;
- }else
- wval_(Wpbalance2)= qh_stddev (zval_(Zpbalance), wval_(Wpbalance),
- wval_(Wpbalance2), &ave);
- wval_(Wnewbalance2)= qh_stddev (zval_(Zprocessed), wval_(Wnewbalance),
- wval_(Wnewbalance2), &ave);
- fprintf (fp, "\n\
-%s\n\
- qhull invoked by: %s | %s\n%s with options:\n%s\n", string, qh rbox_command,
- qh qhull_command, qh_VERSION, qh qhull_options);
- fprintf (fp, "\nprecision constants:\n\
- %6.2g max. abs. coordinate in the (transformed) input ('Qbd:n')\n\
- %6.2g max. roundoff error for distance computation ('En')\n\
- %6.2g max. roundoff error for angle computations\n\
- %6.2g min. distance for outside points ('Wn')\n\
- %6.2g min. distance for visible facets ('Vn')\n\
- %6.2g max. distance for coplanar facets ('Un')\n\
- %6.2g max. facet width for recomputing centrum and area\n\
-",
- qh MAXabs_coord, qh DISTround, qh ANGLEround, qh MINoutside,
- qh MINvisible, qh MAXcoplanar, qh WIDEfacet);
- if (qh KEEPnearinside)
- fprintf(fp, "\
- %6.2g max. distance for near-inside points\n", qh NEARinside);
- if (qh premerge_cos < REALmax/2) fprintf (fp, "\
- %6.2g max. cosine for pre-merge angle\n", qh premerge_cos);
- if (qh PREmerge) fprintf (fp, "\
- %6.2g radius of pre-merge centrum\n", qh premerge_centrum);
- if (qh postmerge_cos < REALmax/2) fprintf (fp, "\
- %6.2g max. cosine for post-merge angle\n", qh postmerge_cos);
- if (qh POSTmerge) fprintf (fp, "\
- %6.2g radius of post-merge centrum\n", qh postmerge_centrum);
- fprintf (fp, "\
- %6.2g max. distance for merging two simplicial facets\n\
- %6.2g max. roundoff error for arithmetic operations\n\
- %6.2g min. denominator for divisions\n\
- zero diagonal for Gauss: ", qh ONEmerge, REALepsilon, qh MINdenom);
- for (k=0; k < qh hull_dim; k++)
- fprintf (fp, "%6.2e ", qh NEARzero[k]);
- fprintf (fp, "\n\n");
- for (i=0 ; i < qhstat next; )
- qh_printstats (fp, i, &i);
-} /* printstatistics */
-#endif /* qh_KEEPstatistics */
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="printstatlevel">-</a>
-
- qh_printstatlevel( fp, id )
- print level information for a statistic
-
- notes:
- nop if id >= ZEND, printed, or same as initial value
-*/
-void qh_printstatlevel (FILE *fp, int id, int start) {
-#define NULLfield " "
-
- if (id >= ZEND || qhstat printed[id])
- return;
- if (qhstat type[id] == zdoc) {
- fprintf (fp, "%s\n", qhstat doc[id]);
- return;
- }
- start= 0; /* not used */
- if (qh_nostatistic(id) || !qhstat doc[id])
- return;
- qhstat printed[id]= True;
- if (qhstat count[id] != -1
- && qhstat stats[(unsigned char)(qhstat count[id])].i == 0)
- fprintf (fp, " *0 cnt*");
- else if (qhstat type[id] >= ZTYPEreal && qhstat count[id] == -1)
- fprintf (fp, "%7.2g", qhstat stats[id].r);
- else if (qhstat type[id] >= ZTYPEreal && qhstat count[id] != -1)
- fprintf (fp, "%7.2g", qhstat stats[id].r/ qhstat stats[(unsigned char)(qhstat count[id])].i);
- else if (qhstat type[id] < ZTYPEreal && qhstat count[id] == -1)
- fprintf (fp, "%7d", qhstat stats[id].i);
- else if (qhstat type[id] < ZTYPEreal && qhstat count[id] != -1)
- fprintf (fp, "%7.3g", (realT) qhstat stats[id].i / qhstat stats[(unsigned char)(qhstat count[id])].i);
- fprintf (fp, " %s\n", qhstat doc[id]);
-} /* printstatlevel */
-
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="printstats">-</a>
-
- qh_printstats( fp, index, nextindex )
- print statistics for a zdoc group
-
- returns:
- next zdoc if non-null
-*/
-void qh_printstats (FILE *fp, int index, int *nextindex) {
- int j, nexti;
-
- if (qh_newstats (index, &nexti)) {
- fprintf (fp, "\n");
- for (j=index; j<nexti; j++)
- qh_printstatlevel (fp, qhstat id[j], 0);
- }
- if (nextindex)
- *nextindex= nexti;
-} /* printstats */
-
-#if qh_KEEPstatistics
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="stddev">-</a>
-
- qh_stddev( num, tot, tot2, ave )
- compute the standard deviation and average from statistics
-
- tot2 is the sum of the squares
- notes:
- computes r.m.s.:
- (x-ave)^2
- == x^2 - 2x tot/num + (tot/num)^2
- == tot2 - 2 tot tot/num + tot tot/num
- == tot2 - tot ave
-*/
-realT qh_stddev (int num, realT tot, realT tot2, realT *ave) {
- realT stddev;
-
- *ave= tot/num;
- stddev= sqrt (tot2/num - *ave * *ave);
- return stddev;
-} /* stddev */
-
-#endif /* qh_KEEPstatistics */
-
-#if !qh_KEEPstatistics
-void qh_collectstatistics (void) {}
-void qh_printallstatistics (FILE *fp, char *string) {};
-void qh_printstatistics (FILE *fp, char *string) {}
-#endif
-
diff --git a/extern/qhull/src/stat.h b/extern/qhull/src/stat.h
deleted file mode 100644
index 1dae54ed21d..00000000000
--- a/extern/qhull/src/stat.h
+++ /dev/null
@@ -1,520 +0,0 @@
- /*<html><pre> -<a href="qh-stat.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- stat.h
- contains all statistics that are collected for qhull
-
- see qh-stat.htm and stat.c
-
- copyright (c) 1993-2002, The Geometry Center
-
- recompile qhull if you change this file
-
- Integer statistics are Z* while real statistics are W*.
-
- define maydebugx to call a routine at every statistic event
-
-*/
-
-#ifndef qhDEFstat
-#define qhDEFstat 1
-
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="KEEPstatistics">-</a>
-
- qh_KEEPstatistics
- 0 turns off statistic gathering (except zzdef/zzinc/zzadd/zzval/wwval)
-*/
-#ifndef qh_KEEPstatistics
-#define qh_KEEPstatistics 1
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="statistics">-</a>
-
- Zxxx for integers, Wxxx for reals
-
- notes:
- be sure that all statistics are defined in stat.c
- otherwise initialization may core dump
- can pick up all statistics by:
- grep '[zw].*_[(][ZW]' *.c >z.x
- remove trailers with query">-</a>
- remove leaders with query-replace-regexp [ ^I]+ (
-*/
-#if qh_KEEPstatistics
-enum statistics { /* alphabetical after Z/W */
- Zacoplanar,
- Wacoplanarmax,
- Wacoplanartot,
- Zangle,
- Wangle,
- Wanglemax,
- Wanglemin,
- Zangletests,
- Wareatot,
- Wareamax,
- Wareamin,
- Zavoidold,
- Wavoidoldmax,
- Wavoidoldtot,
- Zback0,
- Zbestcentrum,
- Zbestdist,
- Zcentrumtests,
- Zcheckpart,
- Zcomputefurthest,
- Zconcave,
- Wconcavemax,
- Wconcavetot,
- Zconcaveridges,
- Zconcaveridge,
- Zcoplanar,
- Wcoplanarmax,
- Wcoplanartot,
- Zcoplanarangle,
- Zcoplanarcentrum,
- Zcoplanarhorizon,
- Zcoplanarinside,
- Zcoplanarpart,
- Zcoplanarridges,
- Wcpu,
- Zcyclefacetmax,
- Zcyclefacettot,
- Zcyclehorizon,
- Zcyclevertex,
- Zdegen,
- Wdegenmax,
- Wdegentot,
- Zdegenvertex,
- Zdelfacetdup,
- Zdelridge,
- Zdelvertextot,
- Zdelvertexmax,
- Zdetsimplex,
- Zdistcheck,
- Zdistconvex,
- Zdistgood,
- Zdistio,
- Zdistplane,
- Zdiststat,
- Zdistvertex,
- Zdistzero,
- Zdoc1,
- Zdoc2,
- Zdoc3,
- Zdoc4,
- Zdoc5,
- Zdoc6,
- Zdoc7,
- Zdoc8,
- Zdoc9,
- Zdoc10,
- Zdoc11,
- Zdoc12,
- Zdropdegen,
- Zdropneighbor,
- Zdupflip,
- Zduplicate,
- Wduplicatemax,
- Wduplicatetot,
- Zdupridge,
- Zdupsame,
- Zflipped,
- Wflippedmax,
- Wflippedtot,
- Zflippedfacets,
- Zfindbest,
- Zfindbestmax,
- Zfindbesttot,
- Zfindcoplanar,
- Zfindfail,
- Zfindhorizon,
- Zfindhorizonmax,
- Zfindhorizontot,
- Zfindjump,
- Zfindnew,
- Zfindnewmax,
- Zfindnewtot,
- Zfindnewjump,
- Zfindnewsharp,
- Zgauss0,
- Zgoodfacet,
- Zhashlookup,
- Zhashridge,
- Zhashridgetest,
- Zhashtests,
- Zinsidevisible,
- Zintersect,
- Zintersectfail,
- Zintersectmax,
- Zintersectnum,
- Zintersecttot,
- Zmaxneighbors,
- Wmaxout,
- Wmaxoutside,
- Zmaxridges,
- Zmaxvertex,
- Zmaxvertices,
- Zmaxvneighbors,
- Zmemfacets,
- Zmempoints,
- Zmemridges,
- Zmemvertices,
- Zmergeflipdup,
- Zmergehorizon,
- Zmergeinittot,
- Zmergeinitmax,
- Zmergeinittot2,
- Zmergeintohorizon,
- Zmergenew,
- Zmergesettot,
- Zmergesetmax,
- Zmergesettot2,
- Zmergesimplex,
- Zmergevertex,
- Wmindenom,
- Wminvertex,
- Zminnorm,
- Zmultiridge,
- Znearlysingular,
- Zneighbor,
- Wnewbalance,
- Wnewbalance2,
- Znewfacettot,
- Znewfacetmax,
- Znewvertex,
- Wnewvertex,
- Wnewvertexmax,
- Znoarea,
- Znonsimplicial,
- Znowsimplicial,
- Znotgood,
- Znotgoodnew,
- Znotmax,
- Znumfacets,
- Znummergemax,
- Znummergetot,
- Znumneighbors,
- Znumridges,
- Znumvertices,
- Znumvisibility,
- Znumvneighbors,
- Zonehorizon,
- Zpartangle,
- Zpartcoplanar,
- Zpartflip,
- Zparthorizon,
- Zpartinside,
- Zpartition,
- Zpartitionall,
- Zpartnear,
- Zpbalance,
- Wpbalance,
- Wpbalance2,
- Zpostfacets,
- Zpremergetot,
- Zprocessed,
- Zremvertex,
- Zremvertexdel,
- Zrenameall,
- Zrenamepinch,
- Zrenameshare,
- Zretry,
- Wretrymax,
- Zridge,
- Wridge,
- Wridgemax,
- Zridge0,
- Wridge0,
- Wridge0max,
- Zridgemid,
- Wridgemid,
- Wridgemidmax,
- Zridgeok,
- Wridgeok,
- Wridgeokmax,
- Zsearchpoints,
- Zsetplane,
- Ztestvneighbor,
- Ztotcheck,
- Ztothorizon,
- Ztotmerge,
- Ztotpartcoplanar,
- Ztotpartition,
- Ztotridges,
- Ztotvertices,
- Ztotvisible,
- Ztricoplanar,
- Ztricoplanarmax,
- Ztricoplanartot,
- Ztridegen,
- Ztrimirror,
- Ztrinull,
- Wvertexmax,
- Wvertexmin,
- Zvertexridge,
- Zvertexridgetot,
- Zvertexridgemax,
- Zvertices,
- Zvisfacettot,
- Zvisfacetmax,
- Zvisvertextot,
- Zvisvertexmax,
- Zwidefacet,
- Zwidevertices,
- ZEND};
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="ZZstat">-</a>
-
- Zxxx/Wxxx statistics that remain defined if qh_KEEPstatistics=0
-
- notes:
- be sure to use zzdef, zzinc, etc. with these statistics (no double checking!)
-*/
-#else
-enum statistics { /* for zzdef etc. macros */
- Zback0,
- Zbestdist,
- Zcentrumtests,
- Zcheckpart,
- Zconcaveridges,
- Zcoplanarhorizon,
- Zcoplanarpart,
- Zcoplanarridges,
- Zcyclefacettot,
- Zcyclehorizon,
- Zdelvertextot,
- Zdistcheck,
- Zdistconvex,
- Zdistzero,
- Zdoc1,
- Zdoc2,
- Zdoc3,
- Zdoc11,
- Zflippedfacets,
- Zgauss0,
- Zminnorm,
- Zmultiridge,
- Znearlysingular,
- Wnewvertexmax,
- Znumvisibility,
- Zpartcoplanar,
- Zpartition,
- Zpartitionall,
- Zprocessed,
- Zretry,
- Zridge,
- Wridge,
- Wridgemax,
- Zridge0,
- Wridge0,
- Wridge0max,
- Zridgemid,
- Wridgemid,
- Wridgemidmax,
- Zridgeok,
- Wridgeok,
- Wridgeokmax,
- Zsetplane,
- Ztotmerge,
- ZEND};
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >-------------------------------</a><a name="ztype">-</a>
-
- ztype
- the type of a statistic sets its initial value.
-
- notes:
- The type should be the same as the macro for collecting the statistic
-*/
-enum ztypes {zdoc,zinc,zadd,zmax,zmin,ZTYPEreal,wadd,wmax,wmin,ZTYPEend};
-
-/*========== macros and constants =============*/
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="MAYdebugx">-</a>
-
- MAYdebugx
- define as maydebug() to be called frequently for error trapping
-*/
-#define MAYdebugx
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zdef_">-</a>
-
- zzdef_, zdef_( type, name, doc, -1)
- define a statistic (assumes 'qhstat.next= 0;')
-
- zdef_( type, name, doc, count)
- define an averaged statistic
- printed as name/count
-*/
-#define zzdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
- qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#if qh_KEEPstatistics
-#define zdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
- qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#else
-#define zdef_(type,name,doc,count)
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zinc_">-</a>
-
- zzinc_( name ), zinc_( name)
- increment an integer statistic
-*/
-#define zzinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#if qh_KEEPstatistics
-#define zinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#else
-#define zinc_(id) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zadd_">-</a>
-
- zzadd_( name, value ), zadd_( name, value ), wadd_( name, value )
- add value to an integer or real statistic
-*/
-#define zzadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wwadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#if qh_KEEPstatistics
-#define zadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#else
-#define zadd_(id, val) {}
-#define wadd_(id, val) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zval_">-</a>
-
- zzval_( name ), zval_( name ), wwval_( name )
- set or return value of a statistic
-*/
-#define zzval_(id) ((qhstat stats[id]).i)
-#define wwval_(id) ((qhstat stats[id]).r)
-#if qh_KEEPstatistics
-#define zval_(id) ((qhstat stats[id]).i)
-#define wval_(id) ((qhstat stats[id]).r)
-#else
-#define zval_(id) qhstat tempi
-#define wval_(id) qhstat tempr
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zmax_">-</a>
-
- zmax_( id, val ), wmax_( id, value )
- maximize id with val
-*/
-#define wwmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#if qh_KEEPstatistics
-#define zmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].i,(val));}
-#define wmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#else
-#define zmax_(id, val) {}
-#define wmax_(id, val) {}
-#endif
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="zmin_">-</a>
-
- zmin_( id, val ), wmin_( id, value )
- minimize id with val
-*/
-#if qh_KEEPstatistics
-#define zmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].i,(val));}
-#define wmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].r,(val));}
-#else
-#define zmin_(id, val) {}
-#define wmin_(id, val) {}
-#endif
-
-/*================== stat.h types ==============*/
-
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="intrealT">-</a>
-
- intrealT
- union of integer and real, used for statistics
-*/
-typedef union intrealT intrealT; /* union of int and realT */
-union intrealT {
- int i;
- realT r;
-};
-
-/*-<a href="qh-stat.htm#TOC"
- >--------------------------------</a><a name="qhstat">-</a>
-
- qhstat
- global data structure for statistics
-
- notes:
- access to qh_qhstat is via the "qhstat" macro. There are two choices
- qh_QHpointer = 1 access globals via a pointer
- enables qh_saveqhull() and qh_restoreqhull()
- = 0 qh_qhstat is a static data structure
- only one instance of qhull() can be active at a time
- default value
- qh_QHpointer is defined in qhull.h
-
- allocated in stat.c
-*/
-typedef struct qhstatT qhstatT;
-#if qh_QHpointer
-#define qhstat qh_qhstat->
-extern qhstatT *qh_qhstat;
-#else
-#define qhstat qh_qhstat.
-extern qhstatT qh_qhstat;
-#endif
-struct qhstatT {
- intrealT stats[ZEND]; /* integer and real statistics */
- unsigned char id[ZEND+10]; /* id's in print order */
- char *doc[ZEND]; /* array of documentation strings */
- short int count[ZEND]; /* -1 if none, else index of count to use */
- char type[ZEND]; /* type, see ztypes above */
- char printed[ZEND]; /* true, if statistic has been printed */
- intrealT init[ZTYPEend]; /* initial values by types, set initstatistics */
-
- int next; /* next index for zdef_ */
- int precision; /* index for precision problems */
- int vridges; /* index for Voronoi ridges */
- int tempi;
- realT tempr;
-};
-
-/*========== function prototypes ===========*/
-
-void qh_allstatA(void);
-void qh_allstatB(void);
-void qh_allstatC(void);
-void qh_allstatD(void);
-void qh_allstatE(void);
-void qh_allstatE2(void);
-void qh_allstatF(void);
-void qh_allstatG(void);
-void qh_allstatH(void);
-void qh_allstatI(void);
-void qh_allstatistics (void);
-void qh_collectstatistics (void);
-void qh_freestatistics (void);
-void qh_initstatistics (void);
-boolT qh_newstats (int index, int *nextindex);
-boolT qh_nostatistic (int i);
-void qh_printallstatistics (FILE *fp, char *string);
-void qh_printstatistics (FILE *fp, char *string);
-void qh_printstatlevel (FILE *fp, int id, int start);
-void qh_printstats (FILE *fp, int index, int *nextindex);
-realT qh_stddev (int num, realT tot, realT tot2, realT *ave);
-
-#endif /* qhDEFstat */
diff --git a/extern/qhull/src/unix.c b/extern/qhull/src/unix.c
deleted file mode 100644
index 5ec5feab16c..00000000000
--- a/extern/qhull/src/unix.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- unix.c
- command line interface to qhull
- includes SIOUX interface for Macintoshes
-
- see qh-qhull.htm
-
- copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include <SIOUX.h>
-#include <Files.h>
-#include <console.h>
-#include <Desk.h>
-
-#elif __cplusplus
-extern "C" {
- int isatty (int);
-}
-
-#elif _MSC_VER
-#include <io.h>
-#define isatty _isatty
-
-#else
-int isatty (int); /* returns 1 if stdin is a tty
- if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt">-</a>
-
- qh_prompt
- long prompt for qhull
-
- see:
- concise prompt below
-*/
-char qh_prompta[]= "\n\
-qhull- compute convex hulls and related structures.\n\
- http://www.geom.umn.edu/software/qhull %s\n\
-\n\
-input (stdin):\n\
- first lines: dimension and number of points (or vice-versa).\n\
- other lines: point coordinates, best if one point per line\n\
- comments: start with a non-numeric character\n\
- halfspaces: use dim plus one and put offset after coefficients.\n\
- May be preceeded by a single interior point ('H').\n\
-\n\
-options:\n\
- d - Delaunay triangulation by lifting points to a paraboloid\n\
- d Qu - furthest-site Delaunay triangulation (upper convex hull)\n\
- v - Voronoi diagram (dual of the Delaunay triangulation)\n\
- v Qu - furthest-site Voronoi diagram\n\
- Hn,n,... - halfspace intersection about point [n,n,0,...]\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Qc - keep coplanar points with nearest facet\n\
- Qi - keep interior points with nearest facet\n\
-\n\
-Qhull control options:\n\
- Qbk:n - scale coord k so that low bound is n\n\
- QBk:n - scale coord k so that upper bound is n (QBk is %2.2g)\n\
- QbB - scale input to unit cube centered at the origin\n\
- Qbb - scale last coordinate to [0,m] for Delaunay triangulations\n\
- Qbk:0Bk:0 - remove k-th coordinate from input\n\
- QJn - randomly joggle input in range [-n,n]\n\
- QRn - random rotation (n=seed, n=0 time, n=-1 time/no rotate)\n\
-%s%s%s%s"; /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
- Qf - partition point to furthest outside facet\n\
- Qg - only build good facets (needs 'QGn', 'QVn', or 'PdD')\n\
- Qm - only process points that would increase max_outside\n\
- Qr - process random outside points instead of furthest ones\n\
- Qs - search all points for the initial simplex\n\
- Qu - for 'd' or 'v', compute upper hull without point at-infinity\n\
- returns furthest-site Delaunay triangulation\n\
- Qv - test vertex neighbors for convexity\n\
- Qx - exact pre-merges (skips coplanar and angle-coplanar facets)\n\
- Qz - add point-at-infinity to Delaunay triangulation\n\
- QGn - good facet if visible from point n, -n for not visible\n\
- QVn - good facet if it includes point n, -n if not\n\
- Q0 - turn off default premerge with 'C-0'/'Qx'\n\
- Q1 - sort merges by type instead of angle\n\
- Q2 - merge all non-convex at once instead of independent sets\n\
- Q3 - do not merge redundant vertices\n\
- Q4 - avoid old->new merges\n\
- Q5 - do not correct outer planes at end of qhull\n\
- Q6 - do not pre-merge concave or coplanar facets\n\
- Q7 - depth-first processing instead of breadth-first\n\
- Q8 - do not process near-inside points\n\
- Q9 - process furthest of furthest points\n\
- Q10 - no special processing for narrow distributions\n\
- Q11 - copy normals and recompute centrums for tricoplanar facets\n\
-\n\
-";
-char qh_promptc[]= "\
-Topts- Trace options:\n\
- T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
- Tc - check frequently during execution\n\
- Ts - print statistics\n\
- Tv - verify result: structure, convexity, and point inclusion\n\
- Tz - send all output to stdout\n\
- TFn - report summary when n or more facets created\n\
- TI file - input data from file, no spaces or single quotes\n\
- TO file - output results to file, may be enclosed in single quotes\n\
- TPn - turn on tracing when point n added to hull\n\
- TMn - turn on tracing at merge n\n\
- TWn - trace merge facets when width > n\n\
- TRn - rerun qhull n times. Use with 'QJn'\n\
- TVn - stop qhull after adding point n, -n for before (see TCn)\n\
- TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
- Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\
- An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\
- C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
- En - max roundoff error for distance computation\n\
- Rn - randomly perturb computations by a factor of [1-n,1+n]\n\
- Vn - min distance above plane for a visible facet (default 3C-n or En)\n\
- Un - max distance below plane for a new, coplanar point (default Vn)\n\
- Wn - min facet width for outside point (before roundoff, default 2Vn)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
- f - facet dump\n\
- G - Geomview output (see below)\n\
- i - vertices incident to each facet\n\
- m - Mathematica output (2-d and 3-d)\n\
- o - OFF format (dim, points and facets; Voronoi regions)\n\
- n - normals with offsets\n\
- p - vertex coordinates or Voronoi vertices (coplanar points if 'Qc')\n\
- s - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
- Fa - area for each facet\n\
- FA - compute total area and volume for option 's'\n\
- Fc - count plus coplanar points for each facet\n\
- use 'Qc' (default) for coplanar and 'Qi' for interior\n\
- FC - centrum or Voronoi center for each facet\n\
- Fd - use cdd format for input (homogeneous with offset first)\n\
- FD - use cdd format for numeric output (offset first)\n\
- FF - facet dump without ridges\n\
- Fi - inner plane for each facet\n\
- for 'v', separating hyperplanes for bounded Voronoi regions\n\
- FI - ID of each facet\n\
- Fm - merge count for each facet (511 max)\n\
- Fn - count plus neighboring facets for each facet\n\
- FN - count plus neighboring facets for each point\n\
- Fo - outer plane (or max_outside) for each facet\n\
- for 'v', separating hyperplanes for unbounded Voronoi regions\n\
- FO - options and precision constants\n\
- Fp - dim, count, and intersection coordinates (halfspace only)\n\
- FP - nearest vertex and distance for each coplanar point\n\
- FQ - command used for qhull\n\
- Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
- output: #vertices, #facets, #coplanars, #nonsimplicial\n\
- #real (2), max outer plane, min vertex\n\
- FS - sizes: #int (0)\n\
- #real(2) tot area, tot volume\n\
- Ft - triangulation with centrums for non-simplicial facets (OFF format)\n\
- Fv - count plus vertices for each facet\n\
- for 'v', Voronoi diagram as Voronoi vertices for pairs of sites\n\
- FV - average of vertices (a feasible point for 'H')\n\
- Fx - extreme points (in order for 2-d)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d, 3-d, and 4-d; 2-d Voronoi)\n\
- Ga - all points as dots\n\
- Gp - coplanar points and vertices as radii\n\
- Gv - vertices as spheres\n\
- Gi - inner planes only\n\
- Gn - no planes\n\
- Go - outer planes only\n\
- Gc - centrums\n\
- Gh - hyperplane intersections\n\
- Gr - ridges\n\
- GDn - drop dimension n in 3-d and 4-d output\n\
- Gt - for 3-d 'd', transparent outer ridges\n\
-\n\
-Print options:\n\
- PAn - keep n largest facets by area\n\
- Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
- PDk:n - drop facet if normal[k] >= n\n\
- Pg - print good facets (needs 'QGn' or 'QVn')\n\
- PFn - keep facets whose area is at least n\n\
- PG - print neighbors of good facets\n\
- PMn - keep n facets with most merges\n\
- Po - force output. If error, output neighborhood of facet\n\
- Pp - do not report precision problems\n\
-\n\
- . - list of all options\n\
- - - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt2">-</a>
-
- qh_prompt2
- synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qhull- compute convex hulls and related structures. %s\n\
- input (stdin): dimension, n, point coordinates\n\
- comments start with a non-numeric character\n\
- halfspace: use dim+1 and put offsets after coefficients\n\
-\n\
-options (qh-quick.htm):\n\
- d - Delaunay triangulation by lifting points to a paraboloid\n\
- d Qu - furthest-site Delaunay triangulation (upper convex hull)\n\
- v - Voronoi diagram as the dual of the Delaunay triangulation\n\
- v Qu - furthest-site Voronoi diagram\n\
- H1,1 - Halfspace intersection about [1,1,0,...] via polar duality\n\
- Qt - triangulated output\n\
- QJ - joggled input instead of merged facets\n\
- Tv - verify result: structure, convexity, and point inclusion\n\
- . - concise list of all options\n\
- - - one-line description of all options\n\
-\n\
-Output options (subset):\n\
- s - summary of results (default)\n\
- i - vertices incident to each facet\n\
- n - normals with offsets\n\
- p - vertex coordinates (if 'Qc', includes coplanar points)\n\
- if 'v', Voronoi vertices\n\
- Fp - halfspace intersections\n\
- Fx - extreme points (convex hull vertices)\n\
- FA - compute total area and volume\n\
- o - OFF format (if 'v', outputs Voronoi regions)\n\
- G - Geomview output (2-d, 3-d and 4-d)\n\
- m - Mathematica output (2-d and 3-d)\n\
- QVn - print facets that include point n, -n if not\n\
- TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
- rbox c d D2 | qhull Qc s f Fx | more rbox 1000 s | qhull Tv s FA\n\
- rbox 10 D2 | qhull d QJ s i TO result rbox 10 D2 | qhull v QJ p\n\
- rbox 10 D2 | qhull d Qu QJ m rbox 10 D2 | qhull v Qu QJ o\n\
- rbox c | qhull n rbox c | qhull FV n | qhull H Fp\n\
- rbox d D12 | qhull QR0 FA rbox c D7 | qhull FA TF1000\n\
- rbox y 1000 W0 | qhull rbox 10 | qhull v QJ o Fv\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="prompt3">-</a>
-
- qh_prompt3
- concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- delaunay voronoi Geomview Halfspace facet_dump\n\
- incidences mathematica normals OFF_format points\n\
- summary\n\
-\n\
- Farea FArea-total Fcoplanars FCentrums Fd-cdd-in\n\
- FD-cdd-out FF-dump-xridge Finner FIDs Fmerges\n\
- Fneighbors FNeigh-vertex Fouter FOptions Fpoint-intersect\n\
- FPoint_near FQhull Fsummary FSize Ftriangles\n\
- Fvertices Fvoronoi FVertex-ave Fxtremes\n\
-\n\
- Gvertices Gpoints Gall_points Gno_planes Ginner\n\
- Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\
- Gtransparent\n\
-\n\
- PArea-keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\
- PGood_neighbors PMerge-keep Poutput_forced Pprecision_not\n\
-\n\
- QbBound 0:0.5 Qbk:0Bk:0_drop QbB-scale-box Qbb-scale-last Qcoplanar\n\
- Qfurthest Qgood_only QGood_point Qinterior Qmax_out\n\
- QJoggle Qrandom QRotate Qsearch_1st Qtriangulate\n\
- QupperDelaunay QVertex_good Qvneighbors Qxact_merge Qzinfinite\n\
-\n\
- Q0_no_premerge Q1_no_angle Q2_no_independ Q3_no_redundant Q4_no_old\n\
- Q5_no_check_out Q6_no_concave Q7_depth_first Q8_no_near_in Q9_pick_furthest\n\
- Q10_no_narrow Q11_trinormals\n\
-\n\
- T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\
- TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\
- TRerun TWide_trace TVertex_stop TCone_stop\n\
-\n\
- Angle_max Centrum_size Error_round Random_dist Visible_min\n\
- Ucoplanar_max Wide_outside\n\
-";
-
-/*-<a href="qh-qhull.htm#TOC"
- >-------------------------------</a><a name="main">-</a>
-
- main( argc, argv )
- processes the command line, calls qhull() to do the work, and exits
-
- design:
- initializes data structures
- reads points
- finishes initialization
- computes convex hull and other structures
- checks the result
- writes the output
- frees memory
-*/
-int main(int argc, char *argv[]) {
- int curlong, totlong; /* used !qh_NOmem */
- int exitcode, numpoints, dim;
- coordT *points;
- boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
- char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
- SIOUXSettings.showstatusline= false;
- SIOUXSettings.tabspaces= 1;
- SIOUXSettings.rows= 40;
- if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/
- || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
- || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
- fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
- argc= ccommand(&argv);
-#endif
-
- if ((argc == 1) && isatty( 0 /*stdin*/)) {
- fprintf(stdout, qh_prompt2, qh_VERSION);
- exit(qh_ERRnone);
- }
- if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompta, qh_VERSION, qh_DEFAULTbox,
- qh_promptb, qh_promptc, qh_promptd, qh_prompte);
- exit(qh_ERRnone);
- }
- if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
- fprintf(stdout, qh_prompt3, qh_VERSION);
- exit(qh_ERRnone);
- }
- qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */
- exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
- if (!exitcode) {
- qh_initflags (qh qhull_command);
- points= qh_readpoints (&numpoints, &dim, &ismalloc);
- qh_init_B (points, numpoints, dim, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_produce_output();
- if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- exitcode= qh_ERRnone;
- }
- qh NOerrexit= True; /* no more setjmp */
-#ifdef qh_NOmem
- qh_freeqhull( True);
-#else
- qh_freeqhull( False);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
-#endif
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/user.c b/extern/qhull/src/user.c
deleted file mode 100644
index 94b31aaf99f..00000000000
--- a/extern/qhull/src/user.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*<html><pre> -<a href="qh-user.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- user.c
- user redefinable functions
-
- see README.txt see COPYING.txt for copyright information.
-
- see qhull.h for data structures, macros, and user-callable functions.
-
- see user_eg.c, unix.c, and qhull_interface.cpp for examples.
-
- see user.h for user-definable constants
-
- use qh_NOmem in mem.h to turn off memory management
- use qh_NOmerge in user.h to turn off facet merging
- set qh_KEEPstatistics in user.h to 0 to turn off statistics
-
- This is unsupported software. You're welcome to make changes,
- but you're on your own if something goes wrong. Use 'Tc' to
- check frequently. Usually qhull will report an error if
- a data structure becomes inconsistent. If so, it also reports
- the last point added to the hull, e.g., 102. You can then trace
- the execution of qhull with "T4P102".
-
- Please report any errors that you fix to qhull@geom.umn.edu
-
- call_qhull is a template for calling qhull from within your application
-
- if you recompile and load this module, then user.o will not be loaded
- from qhull.a
-
- you can add additional quick allocation sizes in qh_user_memsizes
-
- if the other functions here are redefined to not use qh_print...,
- then io.o will not be loaded from qhull.a. See user_eg.c for an
- example. We recommend keeping io.o for the extra debugging
- information it supplies.
-*/
-
-#include "qhull_a.h"
-
-/*-<a href="qh-user.htm#TOC"
- >-------------------------------</a><a name="call_qhull">-</a>
-
- qh_call_qhull( void )
- template for calling qhull from inside your program
- remove #if 0, #endif to compile
-
- returns:
- exit code (see qh_ERR... in qhull.h)
- all memory freed
-
- notes:
- This can be called any number of times.
-
- see:
- qh_call_qhull_once()
-
-*/
-#if 0
-{
- int dim; /* dimension of points */
- int numpoints; /* number of points */
- coordT *points; /* array of coordinates for each point */
- boolT ismalloc; /* True if qhull should free points in qh_freeqhull() or reallocation */
- char flags[]= "qhull Tv"; /* option flags for qhull, see qh_opt.htm */
- FILE *outfile= stdout; /* output from qh_produce_output()
- use NULL to skip qh_produce_output() */
- FILE *errfile= stderr; /* error messages from qhull code */
- int exitcode; /* 0 if no error from qhull */
- facetT *facet; /* set by FORALLfacets */
- int curlong, totlong; /* memory remaining after qh_memfreeshort */
-
- /* initialize dim, numpoints, points[], ismalloc here */
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- if (!exitcode) { /* if no error */
- /* 'qh facet_list' contains the convex hull */
- FORALLfacets {
- /* ... your code ... */
- }
- }
- qh_freeqhull(!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong)
- fprintf (errfile, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-}
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >-------------------------------</a><a name="new_qhull">-</a>
-
- qh_new_qhull( dim, numpoints, points, ismalloc, qhull_cmd, outfile, errfile )
- build new qhull data structure and return exitcode (0 if no errors)
-
- notes:
- do not modify points until finished with results.
- The qhull data structure contains pointers into the points array.
- do not call qhull functions before qh_new_qhull().
- The qhull data structure is not initialized until qh_new_qhull().
-
- outfile may be null
- qhull_cmd must start with "qhull "
- projects points to a new point array for Delaunay triangulations ('d' and 'v')
- transforms points into a new point array for halfspace intersection ('H')
-
-
- To allow multiple, concurrent calls to qhull()
- - set qh_QHpointer in user.h
- - use qh_save_qhull and qh_restore_qhull to swap the global data structure between calls.
- - use qh_freeqhull(qh_ALL) to free intermediate convex hulls
-
- see:
- user_eg.c for an example
-*/
-int qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc,
- char *qhull_cmd, FILE *outfile, FILE *errfile) {
- int exitcode, hulldim;
- boolT new_ismalloc;
- static boolT firstcall = True;
- coordT *new_points;
-
- if (firstcall) {
- qh_meminit (errfile);
- firstcall= False;
- }
- if (strncmp (qhull_cmd,"qhull ", 6)) {
- fprintf (errfile, "qh_new_qhull: start qhull_cmd argument with \"qhull \"\n");
- exit(1);
- }
- qh_initqhull_start (NULL, outfile, errfile);
- trace1(( qh ferr, "qh_new_qhull: build new Qhull for %d %d-d points with %s\n", numpoints, dim, qhull_cmd));
- exitcode = setjmp (qh errexit);
- if (!exitcode)
- {
- qh NOerrexit = False;
- qh_initflags (qhull_cmd);
- if (qh DELAUNAY)
- qh PROJECTdelaunay= True;
- if (qh HALFspace) {
- /* points is an array of halfspaces,
- the last coordinate of each halfspace is its offset */
- hulldim= dim-1;
- qh_setfeasible (hulldim);
- new_points= qh_sethalfspace_all (dim, numpoints, points, qh feasible_point);
- new_ismalloc= True;
- if (ismalloc)
- free (points);
- }else {
- hulldim= dim;
- new_points= points;
- new_ismalloc= ismalloc;
- }
- qh_init_B (new_points, numpoints, hulldim, new_ismalloc);
- qh_qhull();
- qh_check_output();
- if (outfile)
- qh_produce_output();
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points();
- }
- qh NOerrexit = True;
- return exitcode;
-} /* new_qhull */
-
-/*-<a href="qh-user.htm#TOC"
- >-------------------------------</a><a name="errexit">-</a>
-
- qh_errexit( exitcode, facet, ridge )
- report and exit from an error
- report facet and ridge if non-NULL
- reports useful information such as last point processed
- set qh.FORCEoutput to print neighborhood of facet
-
- see:
- qh_errexit2() in qhull.c for printing 2 facets
-
- design:
- check for error within error processing
- compute qh.hulltime
- print facet and ridge (if any)
- report commandString, options, qh.furthest_id
- print summary and statistics (including precision statistics)
- if qh_ERRsingular
- print help text for singular data set
- exit program via long jump (if defined) or exit()
-*/
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge) {
-
- if (qh ERREXITcalled) {
- fprintf (qh ferr, "\nqhull error while processing previous error. Exit program\n");
- exit(1);
- }
- qh ERREXITcalled= True;
- if (!qh QHULLfinished)
- qh hulltime= qh_CPUclock - qh hulltime;
- qh_errprint("ERRONEOUS", facet, NULL, ridge, NULL);
- fprintf (qh ferr, "\nWhile executing: %s | %s\n", qh rbox_command, qh qhull_command);
- fprintf(qh ferr, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
- if (qh furthest_id >= 0) {
- fprintf(qh ferr, "Last point added to hull was p%d.", qh furthest_id);
- if (zzval_(Ztotmerge))
- fprintf(qh ferr, " Last merge was #%d.", zzval_(Ztotmerge));
- if (qh QHULLfinished)
- fprintf(qh ferr, "\nQhull has finished constructing the hull.");
- else if (qh POSTmerging)
- fprintf(qh ferr, "\nQhull has started post-merging.");
- fprintf (qh ferr, "\n");
- }
- if (qh FORCEoutput && (qh QHULLfinished || (!facet && !ridge)))
- qh_produce_output();
- else {
- if (exitcode != qh_ERRsingular && zzval_(Zsetplane) > qh hull_dim+1) {
- fprintf (qh ferr, "\nAt error exit:\n");
- qh_printsummary (qh ferr);
- if (qh PRINTstatistics) {
- qh_collectstatistics();
- qh_printstatistics(qh ferr, "at error exit");
- qh_memstatistics (qh ferr);
- }
- }
- if (qh PRINTprecision)
- qh_printstats (qh ferr, qhstat precision, NULL);
- }
- if (!exitcode)
- exitcode= qh_ERRqhull;
- else if (exitcode == qh_ERRsingular)
- qh_printhelp_singular(qh ferr);
- else if (exitcode == qh_ERRprec && !qh PREmerge)
- qh_printhelp_degenerate (qh ferr);
- if (qh NOerrexit) {
- fprintf (qh ferr, "qhull error while ending program. Exit program\n");
- exit(1);
- }
- qh NOerrexit= True;
- longjmp(qh errexit, exitcode);
-} /* errexit */
-
-
-/*-<a href="qh-user.htm#TOC"
- >-------------------------------</a><a name="errprint">-</a>
-
- qh_errprint( fp, string, atfacet, otherfacet, atridge, atvertex )
- prints out the information of facets and ridges to fp
- also prints neighbors and geomview output
-
- notes:
- except for string, any parameter may be NULL
-*/
-void qh_errprint(char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex) {
- int i;
-
- if (atfacet) {
- fprintf(qh ferr, "%s FACET:\n", string);
- qh_printfacet(qh ferr, atfacet);
- }
- if (otherfacet) {
- fprintf(qh ferr, "%s OTHER FACET:\n", string);
- qh_printfacet(qh ferr, otherfacet);
- }
- if (atridge) {
- fprintf(qh ferr, "%s RIDGE:\n", string);
- qh_printridge(qh ferr, atridge);
- if (atridge->top && atridge->top != atfacet && atridge->top != otherfacet)
- qh_printfacet(qh ferr, atridge->top);
- if (atridge->bottom
- && atridge->bottom != atfacet && atridge->bottom != otherfacet)
- qh_printfacet(qh ferr, atridge->bottom);
- if (!atfacet)
- atfacet= atridge->top;
- if (!otherfacet)
- otherfacet= otherfacet_(atridge, atfacet);
- }
- if (atvertex) {
- fprintf(qh ferr, "%s VERTEX:\n", string);
- qh_printvertex (qh ferr, atvertex);
- }
- if (qh fout && qh FORCEoutput && atfacet && !qh QHULLfinished && !qh IStracing) {
- fprintf(qh ferr, "ERRONEOUS and NEIGHBORING FACETS to output\n");
- for (i= 0; i < qh_PRINTEND; i++) /* use fout for geomview output */
- qh_printneighborhood (qh fout, qh PRINTout[i], atfacet, otherfacet,
- !qh_ALL);
- }
-} /* errprint */
-
-
-/*-<a href="qh-user.htm#TOC"
- >-------------------------------</a><a name="printfacetlist">-</a>
-
- qh_printfacetlist( fp, facetlist, facets, printall )
- print all fields for a facet list and/or set of facets to fp
- if !printall,
- only prints good facets
-
- notes:
- also prints all vertices
-*/
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall) {
- facetT *facet, **facetp;
-
- qh_printbegin (qh ferr, qh_PRINTfacets, facetlist, facets, printall);
- FORALLfacet_(facetlist)
- qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);
- FOREACHfacet_(facets)
- qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);
- qh_printend (qh ferr, qh_PRINTfacets, facetlist, facets, printall);
-} /* printfacetlist */
-
-
-/*-<a href="qh-globa.htm#TOC"
- >-------------------------------</a><a name="user_memsizes">-</a>
-
- qh_user_memsizes()
- allocate up to 10 additional, quick allocation sizes
-
- notes:
- increase maximum number of allocations in qh_initqhull_mem()
-*/
-void qh_user_memsizes (void) {
-
- /* qh_memsize (size); */
-} /* user_memsizes */
-
diff --git a/extern/qhull/src/user.h b/extern/qhull/src/user.h
deleted file mode 100644
index 79558967a52..00000000000
--- a/extern/qhull/src/user.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/*<html><pre> -<a href="qh-user.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- user.h
- user redefinable constants
-
- see qh-user.htm. see COPYING for copyright information.
-
- before reading any code, review qhull.h for data structure definitions and
- the "qh" macro.
-*/
-
-#ifndef qhDEFuser
-#define qhDEFuser 1
-
-/*============= data types and configuration macros ==========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="realT">-</a>
-
- realT
- set the size of floating point numbers
-
- qh_REALdigits
- maximimum number of significant digits
-
- qh_REAL_1, qh_REAL_2n, qh_REAL_3n
- format strings for printf
-
- qh_REALmax, qh_REALmin
- maximum and minimum (near zero) values
-
- qh_REALepsilon
- machine roundoff. Maximum roundoff error for addition and multiplication.
-
- notes:
- Select whether to store floating point numbers in single precision (float)
- or double precision (double).
-
- Use 'float' to save about 8% in time and 25% in space. This is particularly
- help if high-d where convex hulls are space limited. Using 'float' also
- reduces the printed size of Qhull's output since numbers have 8 digits of
- precision.
-
- Use 'double' when greater arithmetic precision is needed. This is needed
- for Delaunay triangulations and Voronoi diagrams when you are not merging
- facets.
-
- If 'double' gives insufficient precision, your data probably includes
- degeneracies. If so you should use facet merging (done by default)
- or exact arithmetic (see imprecision section of manual, qh-impre.htm).
- You may also use option 'Po' to force output despite precision errors.
-
- You may use 'long double', but many format statements need to be changed
- and you may need a 'long double' square root routine. S. Grundmann
- (sg@eeiwzb.et.tu-dresden.de) has done this. He reports that the code runs
- much slower with little gain in precision.
-
- WARNING: on some machines, int f(){realT a= REALmax;return (a == REALmax);}
- returns False. Use (a > REALmax/2) instead of (a == REALmax).
-
- REALfloat = 1 all numbers are 'float' type
- = 0 all numbers are 'double' type
-*/
-#define REALfloat 0
-
-#if (REALfloat == 1)
-#define realT float
-#define REALmax FLT_MAX
-#define REALmin FLT_MIN
-#define REALepsilon FLT_EPSILON
-#define qh_REALdigits 8 /* maximum number of significant digits */
-#define qh_REAL_1 "%6.8g "
-#define qh_REAL_2n "%6.8g %6.8g\n"
-#define qh_REAL_3n "%6.8g %6.8g %6.8g\n"
-
-#elif (REALfloat == 0)
-#define realT double
-#define REALmax DBL_MAX
-#define REALmin DBL_MIN
-#define REALepsilon DBL_EPSILON
-#define qh_REALdigits 16 /* maximum number of significant digits */
-#define qh_REAL_1 "%6.16g "
-#define qh_REAL_2n "%6.16g %6.16g\n"
-#define qh_REAL_3n "%6.16g %6.16g %6.16g\n"
-
-#else
-#error unknown float option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="CPUclock">-</a>
-
- qh_CPUclock
- define the clock() function for reporting the total time spent by Qhull
- returns CPU ticks as a 'long int'
- qh_CPUclock is only used for reporting the total time spent by Qhull
-
- qh_SECticks
- the number of clock ticks per second
-
- notes:
- looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds
- to define a custom clock, set qh_CLOCKtype to 0
-
- if your system does not use clock() to return CPU ticks, replace
- qh_CPUclock with the corresponding function. It is converted
- to unsigned long to prevent wrap-around during long runs.
-
-
- Set qh_CLOCKtype to
-
- 1 for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond
- Note: may fail if more than 1 hour elapsed time
-
- 2 use qh_clock() with POSIX times() (see global.c)
-*/
-#define qh_CLOCKtype 1 /* change to the desired number */
-
-#if (qh_CLOCKtype == 1)
-
-#if defined (CLOCKS_PER_SECOND)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SECOND
-
-#elif defined (CLOCKS_PER_SEC)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SEC
-
-#elif defined (CLK_TCK)
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks CLK_TCK
-
-#else
-#define qh_CPUclock ((unsigned long)clock()) /* return CPU clock */
-#define qh_SECticks 1E6
-#endif
-
-#elif (qh_CLOCKtype == 2)
-#define qh_CPUclock qh_clock() /* return CPU clock */
-#define qh_SECticks 100
-
-#else /* qh_CLOCKtype == ? */
-#error unknown clock option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="RANDOM">-</a>
-
- qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed
- define random number generator
-
- qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax.
- qh_RANDOMseed sets the random number seed for qh_RANDOMint
-
- Set qh_RANDOMtype (default 5) to:
- 1 for random() with 31 bits (UCB)
- 2 for rand() with RAND_MAX or 15 bits (system 5)
- 3 for rand() with 31 bits (Sun)
- 4 for lrand48() with 31 bits (Solaris)
- 5 for qh_rand() with 31 bits (included with Qhull)
-
- notes:
- Random numbers are used by rbox to generate point sets. Random
- numbers are used by Qhull to rotate the input ('QRn' option),
- simulate a randomized algorithm ('Qr' option), and to simulate
- roundoff errors ('Rn' option).
-
- Random number generators differ between systems. Most systems provide
- rand() but the period varies. The period of rand() is not critical
- since qhull does not normally use random numbers.
-
- The default generator is Park & Miller's minimal standard random
- number generator [CACM 31:1195 '88]. It is included with Qhull.
-
- If qh_RANDOMmax is wrong, qhull will report a warning and Geomview
- output will likely be invisible.
-*/
-#define qh_RANDOMtype 5 /* *** change to the desired number *** */
-
-#if (qh_RANDOMtype == 1)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, random()/MAX */
-#define qh_RANDOMint random()
-#define qh_RANDOMseed_(seed) srandom(seed);
-
-#elif (qh_RANDOMtype == 2)
-#ifdef RAND_MAX
-#define qh_RANDOMmax ((realT)RAND_MAX)
-#else
-#define qh_RANDOMmax ((realT)32767) /* 15 bits (System 5) */
-#endif
-#define qh_RANDOMint rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 3)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, Sun */
-#define qh_RANDOMint rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 4)
-#define qh_RANDOMmax ((realT)0x7fffffffUL) /* 31 bits, lrand38()/MAX */
-#define qh_RANDOMint lrand48()
-#define qh_RANDOMseed_(seed) srand48(seed);
-
-#elif (qh_RANDOMtype == 5)
-#define qh_RANDOMmax ((realT)2147483646UL) /* 31 bits, qh_rand/MAX */
-#define qh_RANDOMint qh_rand()
-#define qh_RANDOMseed_(seed) qh_srand(seed);
-/* unlike rand(), never returns 0 */
-
-#else
-#error: unknown random option
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="ORIENTclock">-</a>
-
- qh_ORIENTclock
- 0 for inward pointing normals by Geomview convention
-*/
-#define qh_ORIENTclock 0
-
-
-/*========= performance related constants =========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="HASHfactor">-</a>
-
- qh_HASHfactor
- total hash slots / used hash slots. Must be at least 1.1.
-
- notes:
- =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy
-*/
-#define qh_HASHfactor 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="VERIFYdirect">-</a>
-
- qh_VERIFYdirect
- with 'Tv' verify all points against all facets if op count is smaller
-
- notes:
- if greater, calls qh_check_bestdist() instead
-*/
-#define qh_VERIFYdirect 1000000
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INITIALsearch">-</a>
-
- qh_INITIALsearch
- if qh_INITIALmax, search points up to this dimension
-*/
-#define qh_INITIALsearch 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INITIALmax">-</a>
-
- qh_INITIALmax
- if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
-
- notes:
- from points with non-zero determinants
- use option 'Qs' to override (much slower)
-*/
-#define qh_INITIALmax 8
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEdefault">-</a>
-
- qh_JOGGLEdefault
- default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault
-
- notes:
- rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16
- rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults
- rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults
- rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults
- rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults
- rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults
- rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults
- rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults
- rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults
- the later have about 20 points per facet, each of which may interfere
-
- pick a value large enough to avoid retries on most inputs
-*/
-#define qh_JOGGLEdefault 30000.0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEincrease">-</a>
-
- qh_JOGGLEincrease
- factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain
-*/
-#define qh_JOGGLEincrease 10.0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEretry">-</a>
-
- qh_JOGGLEretry
- if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax
-
- notes:
- try twice at the original value in case of bad luck the first time
-*/
-#define qh_JOGGLEretry 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEagain">-</a>
-
- qh_JOGGLEagain
- every following qh_JOGGLEagain, increase qh.JOGGLEmax
-
- notes:
- 1 is OK since it's already failed qh_JOGGLEretry times
-*/
-#define qh_JOGGLEagain 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEmaxincrease">-</a>
-
- qh_JOGGLEmaxincrease
- maximum qh.JOGGLEmax due to qh_JOGGLEincrease
- relative to qh.MAXwidth
-
- notes:
- qh.joggleinput will retry at this value until qh_JOGGLEmaxretry
-*/
-#define qh_JOGGLEmaxincrease 1e-2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="JOGGLEmaxretry">-</a>
-
- qh_JOGGLEmaxretry
- stop after qh_JOGGLEmaxretry attempts
-*/
-#define qh_JOGGLEmaxretry 100
-
-/*========= memory constants =========*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMalign">-</a>
-
- qh_MEMalign
- memory alignment for qh_meminitbuffers() in global.c
-
- notes:
- to avoid bus errors, memory allocation must consider alignment requirements.
- malloc() automatically takes care of alignment. Since mem.c manages
- its own memory, we need to explicitly specify alignment in
- qh_meminitbuffers().
-
- A safe choice is sizeof(double). sizeof(float) may be used if doubles
- do not occur in data structures and pointers are the same size. Be careful
- of machines (e.g., DEC Alpha) with large pointers.
-
- If using gcc, best alignment is
- #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *))
-*/
-#define qh_MEMalign fmax_(sizeof(realT), sizeof(void *))
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMbufsize">-</a>
-
- qh_MEMbufsize
- size of additional memory buffers
-
- notes:
- used for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMbufsize 0x10000 /* allocate 64K memory buffers */
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MEMinitbuf">-</a>
-
- qh_MEMinitbuf
- size of initial memory buffer
-
- notes:
- use for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMinitbuf 0x20000 /* initially allocate 128K buffer */
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="INFINITE">-</a>
-
- qh_INFINITE
- on output, indicates Voronoi center at infinity
-*/
-#define qh_INFINITE -10.101
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DEFAULTbox">-</a>
-
- qh_DEFAULTbox
- default box size (Geomview expects 0.5)
-*/
-#define qh_DEFAULTbox 0.5
-
-/*======= conditional compilation ============================*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="compiler">-</a>
-
- __cplusplus
- defined by C++ compilers
-
- __MSC_VER
- defined by Microsoft Visual C++
-
- __MWERKS__ && __POWERPC__
- defined by Metrowerks when compiling for the Power Macintosh
-
- __STDC__
- defined for strict ANSI C
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="COMPUTEfurthest">-</a>
-
- qh_COMPUTEfurthest
- compute furthest distance to an outside point instead of storing it with the facet
- =1 to compute furthest
-
- notes:
- computing furthest saves memory but costs time
- about 40% more distance tests for partitioning
- removes facet->furthestdist
-*/
-#define qh_COMPUTEfurthest 0
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="KEEPstatistics">-</a>
-
- qh_KEEPstatistics
- =0 removes most of statistic gathering and reporting
-
- notes:
- if 0, code size is reduced by about 4%.
-*/
-#define qh_KEEPstatistics 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXoutside">-</a>
-
- qh_MAXoutside
- record outer plane for each facet
- =1 to record facet->maxoutside
-
- notes:
- this takes a realT per facet and slightly slows down qhull
- it produces better outer planes for geomview output
-*/
-#define qh_MAXoutside 1
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="NOmerge">-</a>
-
- qh_NOmerge
- disables facet merging if defined
-
- notes:
- This saves about 10% space.
-
- Unless 'Q0'
- qh_NOmerge sets 'QJ' to avoid precision errors
-
- #define qh_NOmerge
-
- see:
- <a href="mem.h#NOmem">qh_NOmem</a> in mem.c
-
- see user.c/user_eg.c for removing io.o
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="NOtrace">-</a>
-
- qh_NOtrace
- no tracing if defined
-
- notes:
- This saves about 5% space.
-
- #define qh_NOtrace
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="QHpointer">-</a>
-
- qh_QHpointer
- access global data with pointer or static structure
-
- qh_QHpointer = 1 access globals via a pointer to allocated memory
- enables qh_saveqhull() and qh_restoreqhull()
- costs about 8% in time and 2% in space
-
- = 0 qh_qh and qh_qhstat are static data structures
- only one instance of qhull() can be active at a time
- default value
-
- notes:
- all global variables for qhull are in qh, qhmem, and qhstat
- qh is defined in qhull.h
- qhmem is defined in mem.h
- qhstat is defined in stat.h
-
- see:
- user_eg.c for an example
-*/
-#define qh_QHpointer 0
-#if 0 /* sample code */
- qhT *oldqhA, *oldqhB;
-
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- /* use results from first call to qh_new_qhull */
- oldqhA= qh_save_qhull();
- exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc,
- flags, outfile, errfile);
- /* use results from second call to qh_new_qhull */
- oldqhB= qh_save_qhull();
- qh_restore_qhull (&oldqhA);
- /* use results from first call to qh_new_qhull */
- qh_freeqhull (qh_ALL); /* frees all memory used by first call */
- qh_restore_qhull (&oldqhB);
- /* use results from second call to qh_new_qhull */
- qh_freeqhull (!qh_ALL); /* frees long memory used by second call */
- qh_memfreeshort (&curlong, &totlong); /* frees short memory and memory allocator */
-#endif
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="QUICKhelp">-</a>
-
- qh_QUICKhelp
- =1 to use abbreviated help messages, e.g., for degenerate inputs
-*/
-#define qh_QUICKhelp 0
-
-/* ============ -merge constants- ====================
-
- These constants effect facet merging. You probably will not need
- to modify these. They effect the performance of facet merging.
-*/
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DIMmergeVertex">-</a>
-
- qh_DIMmergeVertex
- max dimension for vertex merging (it is not effective in high-d)
-*/
-#define qh_DIMmergeVertex 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DIMreduceBuild">-</a>
-
- qh_DIMreduceBuild
- max dimension for vertex reduction during build (slow in high-d)
-*/
-#define qh_DIMreduceBuild 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="BESTcentrum">-</a>
-
- qh_BESTcentrum
- if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster)
- else, qh_findbestneighbor() tests all vertices (much better merges)
-
- qh_BESTcentrum2
- if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums
-*/
-#define qh_BESTcentrum 20
-#define qh_BESTcentrum2 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="BESTnonconvex">-</a>
-
- qh_BESTnonconvex
- if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges.
-
- notes:
- It is needed because qh_findbestneighbor is slow for large facets
-*/
-#define qh_BESTnonconvex 15
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnewmerges">-</a>
-
- qh_MAXnewmerges
- if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums.
-
- notes:
- It is needed because postmerge can merge many facets at once
-*/
-#define qh_MAXnewmerges 2
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnewcentrum">-</a>
-
- qh_MAXnewcentrum
- if <= dim+n vertices (n approximates the number of merges),
- reset the centrum in qh_updatetested() and qh_mergecycle_facets()
-
- notes:
- needed to reduce cost and because centrums may move too much if
- many vertices in high-d
-*/
-#define qh_MAXnewcentrum 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="COPLANARratio">-</a>
-
- qh_COPLANARratio
- for 3-d+ merging, qh.MINvisible is n*premerge_centrum
-
- notes:
- for non-merging, it's DISTround
-*/
-#define qh_COPLANARratio 3
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="DISToutside">-</a>
-
- qh_DISToutside
- When is a point clearly outside of a facet?
- Stops search in qh_findbestnew or qh_partitionall
- qh_findbest uses qh.MINoutside since since it is only called if no merges.
-
- notes:
- 'Qf' always searches for best facet
- if !qh.MERGING, same as qh.MINoutside.
- if qh_USEfindbestnew, increase value since neighboring facets may be ill-behaved
- [Note: Zdelvertextot occurs normally with interior points]
- RBOX 1000 s Z1 G1e-13 t1001188774 | QHULL Tv
- When there is a sharp edge, need to move points to a
- clearly good facet; otherwise may be lost in another partitioning.
- if too big then O(n^2) behavior for partitioning in cone
- if very small then important points not processed
- Needed in qh_partitionall for
- RBOX 1000 s Z1 G1e-13 t1001032651 | QHULL Tv
- Needed in qh_findbestnew for many instances of
- RBOX 1000 s Z1 G1e-13 t | QHULL Tv
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_DISToutside ((qh_USEfindbestnew ? 2 : 1) * \
- fmax_((qh MERGING ? 2 : 1)*qh MINoutside, qh max_outside))
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="RATIOnearinside">-</a>
-
- qh_RATIOnearinside
- ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for
- qh_check_maxout().
-
- notes:
- This is overkill since do not know the correct value.
- It effects whether 'Qc' reports all coplanar points
- Not used for 'd' since non-extreme points are coplanar
-*/
-#define qh_RATIOnearinside 5
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="SEARCHdist">-</a>
-
- qh_SEARCHdist
- When is a facet coplanar with the best facet?
- qh_findbesthorizon: all coplanar facets of the best facet need to be searched.
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_SEARCHdist ((qh_USEfindbestnew ? 2 : 1) * \
- (qh max_outside + 2 * qh DISTround + fmax_( qh MINvisible, qh MAXcoplanar)));
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="USEfindbestnew">-</a>
-
- qh_USEfindbestnew
- Always use qh_findbestnew for qh_partitionpoint, otherwise use
- qh_findbestnew if merged new facet or sharpnewfacets.
-
- See:
- qh_DISToutside -- when is a point clearly outside of a facet
- qh_SEARCHdist -- when is facet coplanar with the best facet?
- qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_USEfindbestnew (zzval_(Ztotmerge) > 50)
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="WIDEcoplanar">-</a>
-
- qh_WIDEcoplanar
- n*MAXcoplanar or n*MINvisible for a WIDEfacet
-
- if vertex is further than qh.WIDEfacet from the hyperplane
- then its ridges are not counted in computing the area, and
- the facet's centrum is frozen.
-
- notes:
- qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar,
- qh_WIDEcoplanar * qh.MINvisible);
-*/
-#define qh_WIDEcoplanar 6
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="MAXnarrow">-</a>
-
- qh_MAXnarrow
- max. cosine in initial hull that sets qh.NARROWhull
-
- notes:
- If qh.NARROWhull, the initial partition does not make
- coplanar points. If narrow, a coplanar point can be
- coplanar to two facets of opposite orientations and
- distant from the exact convex hull.
-
- Conservative estimate. Don't actually see problems until it is -1.0
-*/
-#define qh_MAXnarrow -0.99999999
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="WARNnarrow">-</a>
-
- qh_WARNnarrow
- max. cosine in initial hull to warn about qh.NARROWhull
-
- notes:
- this is a conservative estimate.
- Don't actually see problems until it is -1.0. See qh-impre.htm
-*/
-#define qh_WARNnarrow -0.999999999999999
-
-/*-<a href="qh-user.htm#TOC"
- >--------------------------------</a><a name="ZEROdelaunay">-</a>
-
- qh_ZEROdelaunay
- a zero Delaunay facet occurs for input sites coplanar with their convex hull
- the last normal coefficient of a zero Delaunay facet is within
- qh_ZEROdelaunay * qh.ANGLEround of 0
-
- notes:
- qh_ZEROdelaunay does not allow for joggled input ('QJ').
-
- You can avoid zero Delaunay facets by surrounding the input with a box.
-
- Use option 'PDk:-n' to explicitly define zero Delaunay facets
- k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation)
- n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12')
-*/
-#define qh_ZEROdelaunay 2
-
-#endif /* qh_DEFuser */
-
-
-
diff --git a/extern/qhull/src/user_eg.c b/extern/qhull/src/user_eg.c
deleted file mode 100644
index 97e4aa7a89a..00000000000
--- a/extern/qhull/src/user_eg.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/*<html><pre> -<a href="qh-user.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- user_eg.c
- sample code for calling qhull() from an application
-
- call with:
-
- user_eg "cube/diamond options" "delaunay options" "halfspace options"
-
- for example:
-
- user_eg # return summaries
-
- user_eg "n" "o" "Fp" # return normals, OFF, points
-
- user_eg "n Qt" "o" "Fp" # triangulated cube
-
- user_eg "QR0 p" "QR0 v p" "QR0 Fp" # rotate input and return points
- # 'v' returns Voronoi
- # transform is rotated for halfspaces
-
- main() makes three runs of qhull.
-
- 1) compute the convex hull of a cube
-
- 2a) compute the Delaunay triangulation of random points
-
- 2b) find the Delaunay triangle closest to a point.
-
- 3) compute the halfspace intersection of a diamond
-
- notes:
-
- For another example, see main() in unix.c and user_eg2.c.
- These examples, call qh_qhull() directly. They allow
- tighter control on the code loaded with Qhull.
-
- For a simple C++ example, see qhull_interface.cpp
-
- Summaries are sent to stderr if other output formats are used
-
- compiled by 'make user_eg'
-
- see qhull.h for data structures, macros, and user-callable functions.
-*/
-
-#include "qhull_a.h"
-
-/*-------------------------------------------------
--internal function prototypes
-*/
-void print_summary (void);
-void makecube (coordT *points, int numpoints, int dim);
-void makeDelaunay (coordT *points, int numpoints, int dim, int seed);
-void findDelaunay (int dim);
-void makehalf (coordT *points, int numpoints, int dim);
-
-/*-------------------------------------------------
--print_summary()
-*/
-void print_summary (void) {
- facetT *facet;
- int k;
-
- printf ("\n%d vertices and %d facets with normals:\n",
- qh num_vertices, qh num_facets);
- FORALLfacets {
- for (k=0; k < qh hull_dim; k++)
- printf ("%6.2g ", facet->normal[k]);
- printf ("\n");
- }
-}
-
-/*--------------------------------------------------
--makecube- set points to vertices of cube
- points is numpoints X dim
-*/
-void makecube (coordT *points, int numpoints, int dim) {
- int j,k;
- coordT *point;
-
- for (j=0; j<numpoints; j++) {
- point= points + j*dim;
- for (k=dim; k--; ) {
- if (j & ( 1 << k))
- point[k]= 1.0;
- else
- point[k]= -1.0;
- }
- }
-} /*.makecube.*/
-
-/*--------------------------------------------------
--makeDelaunay- set points for dim Delaunay triangulation of random points
- points is numpoints X dim.
-notes:
- makeDelaunay() in user_eg2.c uses qh_setdelaunay() to project points in place.
-*/
-void makeDelaunay (coordT *points, int numpoints, int dim, int seed) {
- int j,k;
- coordT *point, realr;
-
-
- printf ("seed: %d\n", seed);
- qh_RANDOMseed_( seed);
- for (j=0; j<numpoints; j++) {
- point= points + j*dim;
- for (k= 0; k < dim; k++) {
- realr= qh_RANDOMint;
- point[k]= 2.0 * realr/(qh_RANDOMmax+1) - 1.0;
- }
- }
-} /*.makeDelaunay.*/
-
-/*--------------------------------------------------
--findDelaunay- find Delaunay triangle for [0.5,0.5,...]
- assumes dim < 100
-notes:
- calls qh_setdelaunay() to project the point to a parabaloid
-*/
-void findDelaunay (int dim) {
- int k;
- coordT point[ 100];
- boolT isoutside;
- realT bestdist;
- facetT *facet;
- vertexT *vertex, **vertexp;
-
- for (k= 0; k < dim; k++)
- point[k]= 0.5;
- qh_setdelaunay (dim+1, 1, point);
- facet= qh_findbestfacet (point, qh_ALL, &bestdist, &isoutside);
- FOREACHvertex_(facet->vertices) {
- for (k=0; k < dim; k++)
- printf ("%5.2f ", vertex->point[k]);
- printf ("\n");
- }
-} /*.findDelaunay.*/
-
-/*--------------------------------------------------
--makehalf- set points to halfspaces for a (dim)-dimensional diamond
- points is numpoints X dim+1
-
- each halfspace consists of dim coefficients followed by an offset
-*/
-void makehalf (coordT *points, int numpoints, int dim) {
- int j,k;
- coordT *point;
-
- for (j=0; j<numpoints; j++) {
- point= points + j*(dim+1);
- point[dim]= -1.0; /* offset */
- for (k=dim; k--; ) {
- if (j & ( 1 << k))
- point[k]= 1.0;
- else
- point[k]= -1.0;
- }
- }
-} /*.makehalf.*/
-
-#define DIM 3 /* dimension of points, must be < 31 for SIZEcube */
-#define SIZEcube (1<<DIM)
-#define SIZEdiamond (2*DIM)
-#define TOTpoints (SIZEcube + SIZEdiamond)
-
-/*--------------------------------------------------
--main- derived from call_qhull in user.c
-
- see program header
-
- this contains three runs of Qhull for convex hull, Delaunay
- triangulation or Voronoi vertices, and halfspace intersection
-
-*/
-int main (int argc, char *argv[]) {
- int dim= DIM; /* dimension of points */
- int numpoints; /* number of points */
- coordT points[(DIM+1)*TOTpoints]; /* array of coordinates for each point */
- coordT *rows[TOTpoints];
- boolT ismalloc= False; /* True if qhull should free points in qh_freeqhull() or reallocation */
- char flags[250]; /* option flags for qhull, see qh_opt.htm */
- FILE *outfile= stdout; /* output from qh_produce_output()
- use NULL to skip qh_produce_output() */
- FILE *errfile= stderr; /* error messages from qhull code */
- int exitcode; /* 0 if no error from qhull */
- facetT *facet; /* set by FORALLfacets */
- int curlong, totlong; /* memory remaining after qh_memfreeshort */
- int i;
-
- printf ("This is the output from user_eg.c\n\n\
-It shows how qhull() may be called from an application. It is not part\n\
-of qhull itself. If it appears accidently, please remove user_eg.c from\n\
-your project.\n\n");
-
- /*
- Run 1: convex hull
- */
- printf( "\ncompute convex hull of cube after rotating input\n");
- sprintf (flags, "qhull s Tcv %s", argc >= 2 ? argv[1] : "");
- numpoints= SIZEcube;
- makecube (points, numpoints, DIM);
- for (i=numpoints; i--; )
- rows[i]= points+dim*i;
- qh_printmatrix (outfile, "input", rows, numpoints, dim);
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- if (!exitcode) { /* if no error */
- /* 'qh facet_list' contains the convex hull */
- print_summary();
- FORALLfacets {
- /* ... your code ... */
- }
- }
- qh_freeqhull(!qh_ALL); /* free long memory */
- qh_memfreeshort (&curlong, &totlong); /* free short memory and memory allocator */
- if (curlong || totlong)
- fprintf (errfile, "qhull internal warning (user_eg, #1): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-
- /*
- Run 2: Delaunay triangulation
- */
-
- printf( "\ncompute 3-d Delaunay triangulation\n");
- sprintf (flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
- numpoints= SIZEcube;
- makeDelaunay (points, numpoints, dim, time(NULL));
- for (i=numpoints; i--; )
- rows[i]= points+dim*i;
- qh_printmatrix (outfile, "input", rows, numpoints, dim);
- exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
- flags, outfile, errfile);
- if (!exitcode) { /* if no error */
- /* 'qh facet_list' contains the convex hull */
- /* If you want a Voronoi diagram ('v') and do not request output (i.e., outfile=NULL),
- call qh_setvoronoi_all() after qh_new_qhull(). */
- print_summary();
- FORALLfacets {
- /* ... your code ... */
- }
- printf( "\nfind 3-d Delaunay triangle closest to [0.5, 0.5, ...]\n");
- exitcode= setjmp (qh errexit);
- if (!exitcode) {
- /* Trap Qhull errors in findDelaunay(). Without the setjmp(), Qhull
- will exit() after reporting an error */
- qh NOerrexit= False;
- findDelaunay (DIM);
- }
- qh NOerrexit= True;
- }
-#if qh_QHpointer /* see user.h */
- {
- qhT *oldqhA, *oldqhB;
- coordT pointsB[DIM*TOTpoints]; /* array of coordinates for each point */
-
-
- printf( "\nsave first triangulation and compute a new triangulation\n");
- oldqhA= qh_save_qhull();
- sprintf (flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
- numpoints= SIZEcube;
- makeDelaunay (pointsB, numpoints, dim, time(NULL)+1);
- for (i=numpoints; i--; )
- rows[i]= pointsB+dim*i;
- qh_printmatrix (outfile, "input", rows, numpoints, dim);
- exitcode= qh_new_qhull (dim, numpoints, pointsB, ismalloc,
- flags, outfile, errfile);
- if (!exitcode)
- print_summary();
- printf( "\nsave second triangulation and restore first one\n");
- oldqhB= qh_save_qhull();
- qh_restore_qhull (&oldqhA);
- print_summary();
- printf( "\nfree first triangulation and restore second one.\n");
- qh_freeqhull (qh_ALL); /* free short and long memory used by first call */
- /* do not use qh_memfreeshort */
- qh_restore_qhull (&oldqhB);
- print_summary();
- }
-#endif
- qh_freeqhull(!qh_ALL); /* free long memory */
- qh_memfreeshort (&curlong, &totlong); /* free short memory and memory allocator */
- if (curlong || totlong)
- fprintf (errfile, "qhull internal warning (user_eg, #2): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-
- /*
- Run 3: halfspace intersection about the origin
- */
- printf( "\ncompute halfspace intersection about the origin for a diamond\n");
- sprintf (flags, "qhull H0 s Tcv %s", argc >= 4 ? argv[3] : "Fp");
- numpoints= SIZEcube;
- makehalf (points, numpoints, dim);
- for (i=numpoints; i--; )
- rows[i]= points+(dim+1)*i;
- qh_printmatrix (outfile, "input as halfspace coefficients + offsets", rows, numpoints, dim+1);
- /* use qh_sethalfspace_all to transform the halfspaces yourself.
- If so, set 'qh feasible_point and do not use option 'Hn,...' [it would retransform the halfspaces]
- */
- exitcode= qh_new_qhull (dim+1, numpoints, points, ismalloc,
- flags, outfile, errfile);
- if (!exitcode)
- print_summary();
- qh_freeqhull (!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong) /* could also check previous runs */
- fprintf (stderr, "qhull internal warning (user_eg, #3): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
- return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/user_eg2.c b/extern/qhull/src/user_eg2.c
deleted file mode 100644
index 1eb42ccfe8a..00000000000
--- a/extern/qhull/src/user_eg2.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*<html><pre> -<a href="qh-qhull.htm"
- >-------------------------------</a><a name="TOP">-</a>
-
- user_eg2.c
-
- sample code for calling qhull() from an application.
-
- See user_eg.c for a simpler method using qh_new_qhull().
- The method used here and in unix.c gives you additional
- control over Qhull.
-
- call with:
-
- user_eg2 "triangulated cube/diamond options" "delaunay options" "halfspace options"
-
- for example:
-
- user_eg2 # return summaries
-
- user_eg2 "n" "o" "Fp" # return normals, OFF, points
-
- user_eg2 "QR0 p" "QR0 v p" "QR0 Fp" # rotate input and return points
- # 'v' returns Voronoi
- # transform is rotated for halfspaces
-
- main() makes three runs of qhull.
-
- 1) compute the convex hull of a cube, and incrementally add a diamond
-
- 2a) compute the Delaunay triangulation of random points, and add points.
-
- 2b) find the Delaunay triangle closest to a point.
-
- 3) compute the halfspace intersection of a diamond, and add a cube
-
- notes:
-
- summaries are sent to stderr if other output formats are used
-
- derived from unix.c and compiled by 'make user_eg2'
-
- see qhull.h for data structures, macros, and user-callable functions.
-
- If you want to control all output to stdio and input to stdin,
- set the #if below to "1" and delete all lines that contain "io.c".
- This prevents the loading of io.o. Qhull will
- still write to 'qh ferr' (stderr) for error reporting and tracing.
-
- Defining #if 1, also prevents user.o from being loaded.
-*/
-
-#include "qhull_a.h"
-
-/*-------------------------------------------------
--internal function prototypes
-*/
-void print_summary (void);
-void makecube (coordT *points, int numpoints, int dim);
-void adddiamond (coordT *points, int numpoints, int numnew, int dim);
-void makeDelaunay (coordT *points, int numpoints, int dim);
-void addDelaunay (coordT *points, int numpoints, int numnew, int dim);
-void findDelaunay (int dim);
-void makehalf (coordT *points, int numpoints, int dim);
-void addhalf (coordT *points, int numpoints, int numnew, int dim, coordT *feasible);
-
-/*-------------------------------------------------
--print_summary()
-*/
-void print_summary (void) {
- facetT *facet;
- int k;
-
- printf ("\n%d vertices and %d facets with normals:\n",
- qh num_vertices, qh num_facets);
- FORALLfacets {
- for (k=0; k < qh hull_dim; k++)
- printf ("%6.2g ", facet->normal[k]);
- printf ("\n");
- }
-}
-
-/*--------------------------------------------------
--makecube- set points to vertices of cube
- points is numpoints X dim
-*/
-void makecube (coordT *points, int numpoints, int dim) {
- int j,k;
- coordT *point;
-
- for (j=0; j<numpoints; j++) {
- point= points + j*dim;
- for (k=dim; k--; ) {
- if (j & ( 1 << k))
- point[k]= 1.0;
- else
- point[k]= -1.0;
- }
- }
-} /*.makecube.*/
-
-/*--------------------------------------------------
--adddiamond- add diamond to convex hull
- points is numpoints+numnew X dim.
-
-notes:
- qh_addpoint() does not make a copy of the point coordinates.
-
- For inside points and some outside points, qh_findbestfacet performs
- an exhaustive search for a visible facet. Algorithms that retain
- previously constructed hulls should be faster for on-line construction
- of the convex hull.
-*/
-void adddiamond (coordT *points, int numpoints, int numnew, int dim) {
- int j,k;
- coordT *point;
- facetT *facet;
- boolT isoutside;
- realT bestdist;
-
- for (j= 0; j < numnew ; j++) {
- point= points + (numpoints+j)*dim;
- if (points == qh first_point) /* in case of 'QRn' */
- qh num_points= numpoints+j+1;
- /* qh num_points sets the size of the points array. You may
- allocate the points elsewhere. If so, qh_addpoint records
- the point's address in qh other_points
- */
- for (k=dim; k--; ) {
- if (j/2 == k)
- point[k]= (j & 1) ? 2.0 : -2.0;
- else
- point[k]= 0.0;
- }
- facet= qh_findbestfacet (point, !qh_ALL, &bestdist, &isoutside);
- if (isoutside) {
- if (!qh_addpoint (point, facet, False))
- break; /* user requested an early exit with 'TVn' or 'TCn' */
- }
- printf ("%d vertices and %d facets\n",
- qh num_vertices, qh num_facets);
- /* qh_produce_output(); */
- }
- if (qh DOcheckmax)
- qh_check_maxout();
- else if (qh KEEPnearinside)
- qh_nearcoplanar();
-} /*.adddiamond.*/
-
-/*--------------------------------------------------
--makeDelaunay- set points for dim-1 Delaunay triangulation of random points
- points is numpoints X dim. Each point is projected to a paraboloid.
-*/
-void makeDelaunay (coordT *points, int numpoints, int dim) {
- int j,k, seed;
- coordT *point, realr;
-
- seed= time(NULL);
- printf ("seed: %d\n", seed);
- qh_RANDOMseed_( seed);
- for (j=0; j<numpoints; j++) {
- point= points + j*dim;
- for (k= 0; k < dim-1; k++) {
- realr= qh_RANDOMint;
- point[k]= 2.0 * realr/(qh_RANDOMmax+1) - 1.0;
- }
- }
- qh_setdelaunay (dim, numpoints, points);
-} /*.makeDelaunay.*/
-
-/*--------------------------------------------------
--addDelaunay- add points to dim-1 Delaunay triangulation
- points is numpoints+numnew X dim. Each point is projected to a paraboloid.
-notes:
- qh_addpoint() does not make a copy of the point coordinates.
-
- Since qh_addpoint() is not given a visible facet, it performs a directed
- search of all facets. Algorithms that retain previously
- constructed hulls may be faster.
-*/
-void addDelaunay (coordT *points, int numpoints, int numnew, int dim) {
- int j,k;
- coordT *point, realr;
- facetT *facet;
- realT bestdist;
- boolT isoutside;
-
- for (j= 0; j < numnew ; j++) {
- point= points + (numpoints+j)*dim;
- if (points == qh first_point) /* in case of 'QRn' */
- qh num_points= numpoints+j+1;
- /* qh num_points sets the size of the points array. You may
- allocate the point elsewhere. If so, qh_addpoint records
- the point's address in qh other_points
- */
- for (k= 0; k < dim-1; k++) {
- realr= qh_RANDOMint;
- point[k]= 2.0 * realr/(qh_RANDOMmax+1) - 1.0;
- }
- qh_setdelaunay (dim, 1, point);
- facet= qh_findbestfacet (point, !qh_ALL, &bestdist, &isoutside);
- if (isoutside) {
- if (!qh_addpoint (point, facet, False))
- break; /* user requested an early exit with 'TVn' or 'TCn' */
- }
- qh_printpoint (stdout, "added point", point);
- printf ("%d points, %d extra points, %d vertices, and %d facets in total\n",
- qh num_points, qh_setsize (qh other_points),
- qh num_vertices, qh num_facets);
-
- /* qh_produce_output(); */
- }
- if (qh DOcheckmax)
- qh_check_maxout();
- else if (qh KEEPnearinside)
- qh_nearcoplanar();
-} /*.addDelaunay.*/
-
-/*--------------------------------------------------
--findDelaunay- find Delaunay triangle for [0.5,0.5,...]
- assumes dim < 100
-*/
-void findDelaunay (int dim) {
- int k;
- coordT point[ 100];
- boolT isoutside;
- realT bestdist;
- facetT *facet;
- vertexT *vertex, **vertexp;
-
- for (k= 0; k < dim-1; k++)
- point[k]= 0.5;
- qh_setdelaunay (dim, 1, point);
- facet= qh_findbestfacet (point, qh_ALL, &bestdist, &isoutside);
- FOREACHvertex_(facet->vertices) {
- for (k=0; k < dim-1; k++)
- printf ("%5.2f ", vertex->point[k]);
- printf ("\n");
- }
-} /*.findDelaunay.*/
-
-/*--------------------------------------------------
--makehalf- set points to halfspaces for a (dim)-d diamond
- points is numpoints X dim+1
-
- each halfspace consists of dim coefficients followed by an offset
-*/
-void makehalf (coordT *points, int numpoints, int dim) {
- int j,k;
- coordT *point;
-
- for (j=0; j<numpoints; j++) {
- point= points + j*(dim+1);
- point[dim]= -1.0; /* offset */
- for (k=dim; k--; ) {
- if (j & ( 1 << k))
- point[k]= 1.0;
- else
- point[k]= -1.0;
- }
- }
-} /*.makehalf.*/
-
-/*--------------------------------------------------
--addhalf- add halfspaces for a (dim)-d cube to the intersection
- points is numpoints+numnew X dim+1
-notes:
- assumes dim < 100.
-
- For makehalf(), points is the initial set of halfspaces with offsets.
- It is transformed by qh_sethalfspace_all into a
- (dim)-d set of newpoints. Qhull computed the convex hull of newpoints -
- this is equivalent to the halfspace intersection of the
- orginal halfspaces.
-
- For addhalf(), the remainder of points stores the transforms of
- the added halfspaces. Qhull computes the convex hull of newpoints
- and the added points. qh_addpoint() does not make a copy of these points.
-
- Since halfspace intersection is equivalent to a convex hull,
- qh_findbestfacet may perform an exhaustive search
- for a visible facet. Algorithms that retain previously constructed
- intersections should be faster for on-line construction.
-*/
-void addhalf (coordT *points, int numpoints, int numnew, int dim, coordT *feasible) {
- int j,k;
- coordT *point, normal[100], offset, *next;
- facetT *facet;
- boolT isoutside;
- realT bestdist;
-
- for (j= 0; j < numnew ; j++) {
- offset= -1.0;
- for (k=dim; k--; ) {
- if (j/2 == k) {
- normal[k]= sqrt (dim); /* to normalize as in makehalf */
- if (j & 1)
- normal[k]= -normal[k];
- }else
- normal[k]= 0.0;
- }
- point= points + (numpoints+j)* (dim+1); /* does not use point[dim] */
- qh_sethalfspace (dim, point, &next, normal, &offset, feasible);
- facet= qh_findbestfacet (point, !qh_ALL, &bestdist, &isoutside);
- if (isoutside) {
- if (!qh_addpoint (point, facet, False))
- break; /* user requested an early exit with 'TVn' or 'TCn' */
- }
- qh_printpoint (stdout, "added offset -1 and normal", normal);
- printf ("%d points, %d extra points, %d vertices, and %d facets in total\n",
- qh num_points, qh_setsize (qh other_points),
- qh num_vertices, qh num_facets);
- /* qh_produce_output(); */
- }
- if (qh DOcheckmax)
- qh_check_maxout();
- else if (qh KEEPnearinside)
- qh_nearcoplanar();
-} /*.addhalf.*/
-
-#define DIM 3 /* dimension of points, must be < 31 for SIZEcube */
-#define SIZEcube (1<<DIM)
-#define SIZEdiamond (2*DIM)
-#define TOTpoints (SIZEcube + SIZEdiamond)
-
-/*--------------------------------------------------
--main- derived from call_qhull in user.c
-
- see program header
-
- this contains three runs of Qhull for convex hull, Delaunay
- triangulation or Voronoi vertices, and halfspace intersection
-
-*/
-int main (int argc, char *argv[]) {
- boolT ismalloc;
- int curlong, totlong, exitcode;
- char options [2000];
-
- printf ("This is the output from user_eg2.c\n\n\
-It shows how qhull() may be called from an application. It is not part\n\
-of qhull itself. If it appears accidently, please remove user_eg2.c from\n\
-your project.\n\n");
- ismalloc= False; /* True if qh_freeqhull should 'free(array)' */
- /*
- Run 1: convex hull
- */
- qh_init_A (stdin, stdout, stderr, 0, NULL);
- exitcode= setjmp (qh errexit);
- if (!exitcode) {
- coordT array[TOTpoints][DIM];
-
- strcat (qh rbox_command, "user_eg cube");
- sprintf (options, "qhull s Tcv Q11 %s ", argc >= 2 ? argv[1] : "");
- qh_initflags (options);
- printf( "\ncompute triangulated convex hull of cube after rotating input\n");
- makecube (array[0], SIZEcube, DIM);
- qh_init_B (array[0], SIZEcube, DIM, ismalloc);
- qh_qhull();
- qh_check_output();
- qh_triangulate(); /* requires option 'Q11' if want to add points */
- print_summary ();
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- printf( "\nadd points in a diamond\n");
- adddiamond (array[0], SIZEcube, SIZEdiamond, DIM);
- qh_check_output();
- print_summary ();
- qh_produce_output(); /* delete this line to help avoid io.c */
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- }
- qh NOerrexit= True;
- qh_freeqhull (!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- /*
- Run 2: Delaunay triangulation
- */
- qh_init_A (stdin, stdout, stderr, 0, NULL);
- exitcode= setjmp (qh errexit);
- if (!exitcode) {
- coordT array[TOTpoints][DIM];
-
- strcat (qh rbox_command, "user_eg Delaunay");
- sprintf (options, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
- qh_initflags (options);
- printf( "\ncompute 2-d Delaunay triangulation\n");
- makeDelaunay (array[0], SIZEcube, DIM);
- /* Instead of makeDelaunay with qh_setdelaunay, you may
- produce a 2-d array of points, set DIM to 2, and set
- qh PROJECTdelaunay to True. qh_init_B will call
- qh_projectinput to project the points to the paraboloid
- and add a point "at-infinity".
- */
- qh_init_B (array[0], SIZEcube, DIM, ismalloc);
- qh_qhull();
- /* If you want Voronoi ('v') without qh_produce_output(), call
- qh_setvoronoi_all() after qh_qhull() */
- qh_check_output();
- print_summary ();
- qh_produce_output(); /* delete this line to help avoid io.c */
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- printf( "\nadd points to triangulation\n");
- addDelaunay (array[0], SIZEcube, SIZEdiamond, DIM);
- qh_check_output();
- qh_produce_output(); /* delete this line to help avoid io.c */
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- printf( "\nfind Delaunay triangle closest to [0.5, 0.5, ...]\n");
- findDelaunay (DIM);
- }
- qh NOerrexit= True;
- qh_freeqhull (!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- /*
- Run 3: halfspace intersection
- */
- qh_init_A (stdin, stdout, stderr, 0, NULL);
- exitcode= setjmp (qh errexit);
- if (!exitcode) {
- coordT array[TOTpoints][DIM+1]; /* +1 for halfspace offset */
- pointT *points;
-
- strcat (qh rbox_command, "user_eg halfspaces");
- sprintf (options, "qhull H0 s Tcv %s", argc >= 4 ? argv[3] : "");
- qh_initflags (options);
- printf( "\ncompute halfspace intersection about the origin for a diamond\n");
- makehalf (array[0], SIZEcube, DIM);
- qh_setfeasible (DIM); /* from io.c, sets qh feasible_point from 'Hn,n' */
- /* you may malloc and set qh feasible_point directly. It is only used for
- option 'Fp' */
- points= qh_sethalfspace_all ( DIM+1, SIZEcube, array[0], qh feasible_point);
- qh_init_B (points, SIZEcube, DIM, True); /* qh_freeqhull frees points */
- qh_qhull();
- qh_check_output();
- qh_produce_output(); /* delete this line to help avoid io.c */
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- printf( "\nadd halfspaces for cube to intersection\n");
- addhalf (array[0], SIZEcube, SIZEdiamond, DIM, qh feasible_point);
- qh_check_output();
- qh_produce_output(); /* delete this line to help avoid io.c */
- if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
- qh_check_points ();
- }
- qh NOerrexit= True;
- qh NOerrexit= True;
- qh_freeqhull (!qh_ALL);
- qh_memfreeshort (&curlong, &totlong);
- if (curlong || totlong) /* could also check previous runs */
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
- return exitcode;
-} /* main */
-
-#if 1 /* use 1 to prevent loading of io.o and user.o */
-/*-------------------------------------------
--errexit- return exitcode to system after an error
- assumes exitcode non-zero
- prints useful information
- see qh_errexit2() in qhull.c for 2 facets
-*/
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge) {
-
- if (qh ERREXITcalled) {
- fprintf (qh ferr, "qhull error while processing previous error. Exit program\n");
- exit(1);
- }
- qh ERREXITcalled= True;
- if (!qh QHULLfinished)
- qh hulltime= (unsigned)clock() - qh hulltime;
- fprintf (qh ferr, "\nWhile executing: %s | %s\n", qh rbox_command, qh qhull_command);
- fprintf(qh ferr, "Options selected:\n%s\n", qh qhull_options);
- if (qh furthest_id >= 0) {
- fprintf(qh ferr, "\nLast point added to hull was p%d", qh furthest_id);
- if (zzval_(Ztotmerge))
- fprintf(qh ferr, " Last merge was #%d.", zzval_(Ztotmerge));
- if (qh QHULLfinished)
- fprintf(qh ferr, "\nQhull has finished constructing the hull.");
- else if (qh POSTmerging)
- fprintf(qh ferr, "\nQhull has started post-merging");
- fprintf(qh ferr, "\n\n");
- }
- if (qh NOerrexit) {
- fprintf (qh ferr, "qhull error while ending program. Exit program\n");
- exit(1);
- }
- if (!exitcode)
- exitcode= qh_ERRqhull;
- qh NOerrexit= True;
- longjmp(qh errexit, exitcode);
-} /* errexit */
-
-
-/*-------------------------------------------
--errprint- prints out the information of the erroneous object
- any parameter may be NULL, also prints neighbors and geomview output
-*/
-void qh_errprint(char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex) {
-
- fprintf (qh ferr, "%s facets f%d f%d ridge r%d vertex v%d\n",
- string, getid_(atfacet), getid_(otherfacet), getid_(atridge),
- getid_(atvertex));
-} /* errprint */
-
-
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall) {
- facetT *facet, **facetp;
-
- /* remove these calls to help avoid io.c */
- qh_printbegin (qh ferr, qh_PRINTfacets, facetlist, facets, printall);/*io.c*/
- FORALLfacet_(facetlist) /*io.c*/
- qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall); /*io.c*/
- FOREACHfacet_(facets) /*io.c*/
- qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall); /*io.c*/
- qh_printend (qh ferr, qh_PRINTfacets, facetlist, facets, printall); /*io.c*/
-
- FORALLfacet_(facetlist)
- fprintf( qh ferr, "facet f%d\n", facet->id);
-} /* printfacetlist */
-
-
-
-/*-----------------------------------------
--user_memsizes- allocate up to 10 additional, quick allocation sizes
-*/
-void qh_user_memsizes (void) {
-
- /* qh_memsize (size); */
-} /* user_memsizes */
-
-#endif
diff --git a/extern/solid/CMakeLists.txt b/extern/solid/CMakeLists.txt
deleted file mode 100644
index 7840dd6b423..00000000000
--- a/extern/solid/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): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-SET(INC include src src/broad src/complex src/convex ../qhull/include)
-
-FILE(GLOB SRC src/*.cpp src/convex/*.cpp src/complex/*.cpp src/broad/*.cpp)
-
-ADD_DEFINITIONS(-DUSE_DOUBLES -DQHULL -D_LIB)
-
-BLENDERLIB(extern_solid "${SRC}" "${INC}")
-#, libtype=['game2','player'], priority=[45, 75]
diff --git a/extern/solid/LICENSE_GPL.txt b/extern/solid/LICENSE_GPL.txt
deleted file mode 100644
index 07db89585a2..00000000000
--- a/extern/solid/LICENSE_GPL.txt
+++ /dev/null
@@ -1,349 +0,0 @@
-
- The SOLID library is Copyright (C) 2001-2003 Dtecta.
-
- You may use, distribute and copy the SOLID library under the terms of
- GNU General Public License version 2, which is displayed below.
-
--------------------------------------------------------------------------
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) <year> <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) year 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/solid/LICENSE_QPL.txt b/extern/solid/LICENSE_QPL.txt
deleted file mode 100644
index 3fca00466e2..00000000000
--- a/extern/solid/LICENSE_QPL.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-
- The SOLID library is Copyright (C) 2001-2003 Dtecta.
-
- You may use, distribute and copy the SOLID library under the terms of
- the Q Public License, which is displayed below.
-
--------------------------------------------------------------------------
- THE Q PUBLIC LICENSE
- version 1.0
-
- Copyright (C) 1999-2000 Trolltech AS, Norway.
- Everyone is permitted to copy and
- distribute this license document.
-
-The intent of this license is to establish freedom to share and change the
-software regulated by this license under the open source model.
-
-This license applies to any software containing a notice placed by the
-copyright holder saying that it may be distributed under the terms of
-the Q Public License version 1.0. Such software is herein referred to as
-the Software. This license covers modification and distribution of the
-Software, use of third-party application programs based on the Software,
-and development of free software which uses the Software.
-
- Granted Rights
-
-1. You are granted the non-exclusive rights set forth in this license
- provided you agree to and comply with any and all conditions in this
- license. Whole or partial distribution of the Software, or software
- items that link with the Software, in any form signifies acceptance of
- this license.
-
-2. You may copy and distribute the Software in unmodified form provided
- that the entire package, including - but not restricted to - copyright,
- trademark notices and disclaimers, as released by the initial developer
- of the Software, is distributed.
-
-3. You may make modifications to the Software and distribute your
- modifications, in a form that is separate from the Software, such as
- patches. The following restrictions apply to modifications:
-
- a. Modifications must not alter or remove any copyright notices in
- the Software.
-
- b. When modifications to the Software are released under this
- license, a non-exclusive royalty-free right is granted to the
- initial developer of the Software to distribute your modification
- in future versions of the Software provided such versions remain
- available under these terms in addition to any other license(s) of
- the initial developer.
-
-4. You may distribute machine-executable forms of the Software or
- machine-executable forms of modified versions of the Software, provided
- that you meet these restrictions:
-
- a. You must include this license document in the distribution.
-
- b. You must ensure that all recipients of the machine-executable forms
- are also able to receive the complete machine-readable source code
- to the distributed Software, including all modifications, without
- any charge beyond the costs of data transfer, and place prominent
- notices in the distribution explaining this.
-
- c. You must ensure that all modifications included in the
- machine-executable forms are available under the terms of this
- license.
-
-5. You may use the original or modified versions of the Software to
- compile, link and run application programs legally developed by you
- or by others.
-
-6. You may develop application programs, reusable components and other
- software items that link with the original or modified versions of the
- Software. These items, when distributed, are subject to the following
- requirements:
-
- a. You must ensure that all recipients of machine-executable forms of
- these items are also able to receive and use the complete
- machine-readable source code to the items without any charge
- beyond the costs of data transfer.
-
- b. You must explicitly license all recipients of your items to use
- and re-distribute original and modified versions of the items in
- both machine-executable and source code forms. The recipients must
- be able to do so without any charges whatsoever, and they must be
- able to re-distribute to anyone they choose.
-
-
- c. If the items are not available to the general public, and the
- initial developer of the Software requests a copy of the items,
- then you must supply one.
-
- Limitations of Liability
-
-In no event shall the initial developers or copyright holders be liable
-for any damages whatsoever, including - but not restricted to - lost
-revenue or profits or other direct, indirect, special, incidental or
-consequential damages, even if they have been advised of the possibility
-of such damages, except to the extent invariable law, if any, provides
-otherwise.
-
- No Warranty
-
-The Software and this license document are provided AS IS with NO WARRANTY
-OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE.
- Choice of Law
-
-This license is governed by the Laws of Norway. Disputes shall be settled
-by Oslo City Court.
diff --git a/extern/solid/Makefile b/extern/solid/Makefile
deleted file mode 100644
index 206dc21c3fb..00000000000
--- a/extern/solid/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
-# vim: tabstop=8
-#
-# $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): GSR
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-include nan_definitions.mk
-
-SOURCEDIR = extern/solid
-LIBNAMES = solid solid_broad solid_convex solid_complex
-DIR = $(OCGDIR)/extern/
-DIRS = src
-
-include nan_subdirs.mk
-
-install: $(ALL_OR_DEBUG)
- @[ -d $(NAN_SOLID) ] || mkdir -p $(NAN_SOLID)
- @[ -d $(NAN_SOLID)/include/SOLID ] || mkdir -p $(NAN_SOLID)/include/SOLID
- @[ -d $(NAN_SOLID)/include/SOLID/MT ] || mkdir -p $(NAN_SOLID)/include/SOLID/MT
- @[ -d $(NAN_SOLID)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_SOLID)/lib/$(DEBUG_DIR)
- @for i in $(LIBNAMES); do \
- $(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$$i/$(DEBUG_DIR)lib$$i.a $(NAN_SOLID)/lib/$(DEBUG_DIR) ; \
- if [ $(OS) = darwin ] ; then \
- ranlib $(NAN_SOLID)/lib/$(DEBUG_DIR)lib$$i.a ; \
- fi ; \
- done
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/*.h $(NAN_SOLID)/include/SOLID
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/MT/*.h $(NAN_SOLID)/include/SOLID/MT
-
-
diff --git a/extern/solid/README.txt b/extern/solid/README.txt
deleted file mode 100644
index 348d92b35cb..00000000000
--- a/extern/solid/README.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-
- SOLID - Software Library for Interference Detection
-
-SOLID is a software library containing functions for performing
-intersection tests and proximity queries that are useful in the context
-of collision detection. Collision detection is the process of detecting
-pairs of geometric objects that are intersecting or are within a given
-proximity of each other. In particular, SOLID is useful for detecting
-collisions between objects that are moving relatively of each other over
-time. The motions of objects are controlled by the client application,
-and are not determined or affected by SOLID.
-
-This open-source edition of SOLID version 3 is released under the terms of
-either the GNU Public License (GPL) or the Q Public License (QPL). This means
-that for software created with SOLID version 3 you must comply with the terms
-of one of these licenses. You may choose wich of these licenses best suits
-your purpose. See the following files contained in this distribution for a
-complete list of terms and conditions of these licenses:
-
- LICENSE_QPL.txt The Q Public License
- LICENSE_GPL.txt The GNU General Public License
-
-These licenses do not permit the use of SOLID 3 in closed-source software
-products. For enquiries about commercial use of SOLID, please contact
-info@dtecta.com.
-
-SOLID 3 uses Qhull from The Geometry Center of the University of Minnesota.
-Qhull is copyrighted as noted below. Qhull is free software and may be
-obtained via anonymous ftp from geom.umn.edu.
-
- Qhull, Copyright (c) 1993-2002
-
- The National Science and Technology Research Center for
- Computation and Visualization of Geometric Structures
- (The Geometry Center)
- University of Minnesota
- 400 Lind Hall
- 207 Church Street S.E.
- Minneapolis, MN 55455 USA
-
- email: qhull@geom.umn.edu
-
-Installation
-
-For details on how to install SOLID see the documention in the 'doc' directory.
-
-Platforms
-
-SOLID 3 has been tested on the following platforms:
-
- Linux IA32 gcc 2.95.3, gcc 3.3
- Win32 MSVC++ 6.0 SP4, MSVC++ 7.1
-
-
-
diff --git a/extern/solid/SConscript b/extern/solid/SConscript
deleted file mode 100644
index 8c54442ca73..00000000000
--- a/extern/solid/SConscript
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-import sys
-
-Import('env')
-
-defs = 'USE_DOUBLES QHULL _LIB'
-cflags = []
-
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
- defs += ' WIN32 NDEBUG _WINDOWS _LIB'
- cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
-elif env['OURPLATFORM']=='win32-mingw':
- defs += ' NDEBUG'
- cflags += ['-O2']
-elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5':
- defs += ' NDEBUG'
- cflags += ['-O2']
-elif sys.platform=='darwin' :
- defs += ' NDEBUG'
- cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
-
-else:
- print "################################################"
- print
- print "Check if solid builds on your platform correctly"
- print "Add your platform specific defines"
- print "and cflags / cxxflags to the"
- print "extern/solid/SConscript file"
-
-sources = env.Glob('src/*.cpp') + env.Glob('src/convex/*.cpp') + env.Glob('src/complex/*.cpp') + env.Glob('src/broad/*.cpp')
-
-incs = 'include src src/broad src/complex src/convex ../qhull/include'
-
-env.BlenderLib ( libname='extern_solid', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[10] , compileflags = cflags)
diff --git a/extern/solid/SOLID/SOLID.h b/extern/solid/SOLID/SOLID.h
deleted file mode 100644
index 37d74340f8c..00000000000
--- a/extern/solid/SOLID/SOLID.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_H
-#define SOLID_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- DT_DECLARE_HANDLE(DT_ObjectHandle);
- DT_DECLARE_HANDLE(DT_SceneHandle);
- DT_DECLARE_HANDLE(DT_ShapeHandle);
- DT_DECLARE_HANDLE(DT_VertexBaseHandle);
- DT_DECLARE_HANDLE(DT_RespTableHandle);
- DT_DECLARE_HANDLE(DT_ArchiveHandle);
-
- typedef unsigned int DT_ResponseClass;
-
- typedef enum DT_ResponseType {
- DT_NO_RESPONSE, /* No response (obsolete) */
- DT_BROAD_RESPONSE,
- DT_SIMPLE_RESPONSE, /* No collision data */
- DT_WITNESSED_RESPONSE, /* A point common to both objects
- is returned as collision data
- */
- DT_DEPTH_RESPONSE /* The penetration depth is returned
- as collision data. The penetration depth
- is the shortest vector over which one
- object needs to be translated in order
- to bring the objects in touching contact.
- */
- } DT_ResponseType;
-
-/* For witnessed response, the following structure represents a common point. The world
- coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector.
-
- For depth response, the following structure represents the penetration depth.
- 'point1' en 'point2' are the witness points of the penetration depth in world coordinates.
- The penetration depth vector in world coordinates is represented by 'normal'.
-*/
-
- typedef struct DT_CollData {
- DT_Vector3 point1; /* Point in object1 in world coordinates */
- DT_Vector3 point2; /* Point in object2 in world coordinates */
- DT_Vector3 normal; /* point2 - point1 */
- } DT_CollData;
-
-/* A response callback is called by SOLID for each pair of collding objects. 'client-data'
- is a pointer to an arbitrary structure in the client application. The client objects are
- pointers to structures in the client application associated with the coliding objects.
- 'coll_data' is the collision data computed by SOLID.
-*/
-
- typedef DT_Bool (*DT_ResponseCallback)(void *client_data,
- void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data);
-
-/* Shape definition */
-
-
- extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z);
- extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height);
- extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height);
- extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius);
- extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point);
- extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target);
- extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
- extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-
- extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride);
- extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer);
-
- extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_EndComplexShape();
-
- extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_EndPolytope();
-
- extern DECLSPEC void DT_Begin();
- extern DECLSPEC void DT_End();
-
- extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex);
- extern DECLSPEC void DT_VertexIndex(DT_Index index);
-
- extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices);
- extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count);
-
- extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape);
-
-/* Object */
-
- extern DECLSPEC DT_ObjectHandle DT_CreateObject(
- void *client_object, /* pointer to object in client memory */
- DT_ShapeHandle shape /* the shape or geometry of the object */
- );
-
- extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object);
-
-
-
- extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position);
- extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation);
- extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling);
-
-/* The margin is an offset from the actual shape. The actual geometry of an
- object is the set of points whose distance to the transformed shape is at
- most the margin. During the lifetime of an object the margin can be
- modified.
-*/
-
- extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin);
-
-
-/* These commands assume a column-major 4x4 OpenGL matrix representation */
-
- extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m);
- extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m);
-
- extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m);
- extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m);
-
- extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max);
-
-
- extern DECLSPEC DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 v);
-/* This next command returns the distance between the objects. De returned
- closest points are given in world coordinates.
-*/
- extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2);
-
- extern DECLSPEC DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point);
-
- extern DECLSPEC DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2);
-
-/* Scene */
-
- extern DECLSPEC DT_SceneHandle DT_CreateScene();
- extern DECLSPEC void DT_DestroyScene(DT_SceneHandle scene);
-
- extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object);
- extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object);
-
-/* Note that objects can be assigned to multiple scenes! */
-
-/* Response */
-
-/* Response tables are defined independent of the scenes in which they are used.
- Multiple response tables can be used in one scene, and a response table
- can be shared among scenes.
-*/
- extern DECLSPEC DT_RespTableHandle DT_CreateRespTable();
- extern DECLSPEC void DT_DestroyRespTable(DT_RespTableHandle respTable);
-
-/* Responses are defined on (pairs of) response classes. Each response table
- maintains its set of response classes.
-*/
- extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable);
-
-/* To each object for which a response is defined in the response table a
- response class needs to be assigned.
-*/
-
- extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable,
- DT_ObjectHandle object,
- DT_ResponseClass responseClass);
-
- extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable,
- DT_ObjectHandle object);
-
- extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable,
- DT_ObjectHandle object1,
- DT_ObjectHandle object2,
- const DT_CollData *coll_data);
-
-/* For each pair of objects multiple responses can be defined. A response is a callback
- together with its response type and client data. */
-
-/* Responses can be defined for all pairs of response classes... */
- extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
-
- extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response);
-/* ...per response class... */
- extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
-
- extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response);
-
-/* ... and per pair of response classes...*/
- extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
- extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response);
-
-/* The next command calls the response callbacks for all intersecting pairs of objects in a scene.
- 'DT_Test' returns the number of pairs of objects for which callbacks have been called.
-*/
-
- extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable);
-
-/* Set the maximum relative error in the closest points and penetration depth
- computation. The default for `max_error' is 1.0e-3. Larger errors result
- in better performance. Non-positive error tolerances are ignored.
-*/
-
- extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error);
-
-/* Set the maximum tolerance on relative errors due to rounding. The default for `tol_error'
- is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small
- results in missed collisions. Non-positive error tolerances are ignored.
-*/
-
- extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error);
-
-
-/* This function returns the client pointer to the first object in a scene hit by the ray
- (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point
- on the object in local coordinates. 'normal' is the normal to the surface of the object in
- world coordinates. The ignore_client pointer is used to make one of the objects transparent.
-
- NB: Currently ray tests are implemented for spheres, boxes, and meshes only!!
-*/
-
- extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-/* Similar, only here a single object is tested and a boolean is returned */
-
- extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/SOLID/SOLID_broad.h b/extern/solid/SOLID/SOLID_broad.h
deleted file mode 100644
index 74e4214fa67..00000000000
--- a/extern/solid/SOLID/SOLID_broad.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_BROAD_H
-#define SOLID_BROAD_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- DT_DECLARE_HANDLE(BP_SceneHandle);
- DT_DECLARE_HANDLE(BP_ProxyHandle);
-
- typedef void (*BP_Callback)(void *client_data,
- void *object1,
- void *object2);
-
- typedef bool (*BP_RayCastCallback)(void *client_data,
- void *object,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda);
-
- extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data,
- BP_Callback beginOverlap,
- BP_Callback endOverlap);
-
- extern DECLSPEC void BP_DestroyScene(BP_SceneHandle scene);
-
- extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene,
- void *object,
- const DT_Vector3 min,
- const DT_Vector3 max);
-
- extern DECLSPEC void BP_DestroyProxy(BP_SceneHandle scene,
- BP_ProxyHandle proxy);
-
- extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy,
- const DT_Vector3 min,
- const DT_Vector3 max);
-
- extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene,
- BP_RayCastCallback objectRayCast,
- void *client_data,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/SOLID/SOLID_types.h b/extern/solid/SOLID/SOLID_types.h
deleted file mode 100644
index 630594e447f..00000000000
--- a/extern/solid/SOLID/SOLID_types.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_TYPES_H
-#define SOLID_TYPES_H
-
-#ifndef DECLSPEC
-# ifdef WIN32
-# define DECLSPEC __declspec(dllexport)
-# else
-# define DECLSPEC
-# endif
-#endif
-
-#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-
-
-typedef unsigned short DT_Index;
-typedef unsigned short DT_Count;
-typedef unsigned int DT_Size;
-typedef float DT_Scalar;
-typedef int DT_Bool;
-
-#define DT_FALSE 0
-#define DT_TRUE 1
-
-#define DT_CONTINUE 0
-#define DT_DONE 1
-
-typedef DT_Scalar DT_Vector3[3];
-typedef DT_Scalar DT_Quaternion[4];
-
-#endif
diff --git a/extern/solid/VisualC6/broad/broad.dsp b/extern/solid/VisualC6/broad/broad.dsp
deleted file mode 100644
index 1161d68fcd6..00000000000
--- a/extern/solid/VisualC6/broad/broad.dsp
+++ /dev/null
@@ -1,132 +0,0 @@
-# Microsoft Developer Studio Project File - Name="broad" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=broad - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "broad.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "broad.mak" CFG="broad - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "broad - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "broad - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "broad - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "broad - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "broad - Win32 Release"
-# Name "broad - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\broad\BP_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_EndpointList.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Proxy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Endpoint.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_EndpointList.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_ProxyList.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Scene.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/complex/complex.dsp b/extern/solid/VisualC6/complex/complex.dsp
deleted file mode 100644
index 74ea67b9e23..00000000000
--- a/extern/solid/VisualC6/complex/complex.dsp
+++ /dev/null
@@ -1,116 +0,0 @@
-# Microsoft Developer Studio Project File - Name="complex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=complex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "complex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "complex.mak" CFG="complex - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "complex - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "complex - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "complex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "complex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "complex - Win32 Release"
-# Name "complex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_BBoxTree.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_Complex.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_BBoxTree.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_CBox.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_Complex.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/convex/convex.dsp b/extern/solid/VisualC6/convex/convex.dsp
deleted file mode 100644
index ec9caace9d9..00000000000
--- a/extern/solid/VisualC6/convex/convex.dsp
+++ /dev/null
@@ -1,232 +0,0 @@
-# Microsoft Developer Studio Project File - Name="convex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=convex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "convex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "convex.mak" CFG="convex - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "convex - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "convex - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "convex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../../qhull/include" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "convex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../../qhull/include" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "convex - Win32 Release"
-# Name "convex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Accuracy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Box.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cone.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Convex.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cylinder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Facet.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_LineSegment.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_PenDepth.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Point.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polyhedron.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polytope.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Sphere.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Triangle.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Accuracy.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Array.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Box.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cone.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Convex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cylinder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Facet.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_GJK.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Hull.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_IndexArray.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_LineSegment.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Minkowski.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_PenDepth.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Point.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polyhedron.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polytope.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Shape.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Sphere.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Transform.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Triangle.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_VertexBase.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/dynamics/dynamics.dsp b/extern/solid/VisualC6/dynamics/dynamics.dsp
deleted file mode 100644
index 9659cbf8a56..00000000000
--- a/extern/solid/VisualC6/dynamics/dynamics.dsp
+++ /dev/null
@@ -1,120 +0,0 @@
-# Microsoft Developer Studio Project File - Name="dynamics" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=dynamics - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "dynamics.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "dynamics.mak" CFG="dynamics - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "dynamics - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "dynamics - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "dynamics - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "dynamics - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "dynamics - Win32 Release"
-# Name "dynamics - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Dynamic.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Kinetic.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\RigidBody.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Dynamic.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Kinetic.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\RigidBody.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/gldemo/gldemo.dsp b/extern/solid/VisualC6/gldemo/gldemo.dsp
deleted file mode 100644
index f3cde286161..00000000000
--- a/extern/solid/VisualC6/gldemo/gldemo.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="gldemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=gldemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "gldemo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "gldemo.mak" CFG="gldemo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "gldemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "gldemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "gldemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "gldemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "gldemo - Win32 Release"
-# Name "gldemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\gldemo.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/mnm/mnm.dsp b/extern/solid/VisualC6/mnm/mnm.dsp
deleted file mode 100644
index 2df6d951794..00000000000
--- a/extern/solid/VisualC6/mnm/mnm.dsp
+++ /dev/null
@@ -1,100 +0,0 @@
-# Microsoft Developer Studio Project File - Name="mnm" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=mnm - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "mnm.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "mnm.mak" CFG="mnm - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "mnm - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mnm - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "mnm - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "mnm - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "mnm - Win32 Release"
-# Name "mnm - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\mnm.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/physics/physics.dsp b/extern/solid/VisualC6/physics/physics.dsp
deleted file mode 100644
index dd69b6a35b2..00000000000
--- a/extern/solid/VisualC6/physics/physics.dsp
+++ /dev/null
@@ -1,100 +0,0 @@
-# Microsoft Developer Studio Project File - Name="physics" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=physics - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "physics.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "physics.mak" CFG="physics - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "physics - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "physics - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "physics - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "physics - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "physics - Win32 Release"
-# Name "physics - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\physics.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/sample/sample.dsp b/extern/solid/VisualC6/sample/sample.dsp
deleted file mode 100644
index c6e0423cd04..00000000000
--- a/extern/solid/VisualC6/sample/sample.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="sample" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sample - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sample.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sample.mak" CFG="sample - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sample - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sample - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sample - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "sample - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "sample - Win32 Release"
-# Name "sample - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\sample.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/solid.dsw b/extern/solid/VisualC6/solid.dsw
deleted file mode 100644
index 397cc4bf371..00000000000
--- a/extern/solid/VisualC6/solid.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "broad"=".\broad\broad.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "complex"=".\complex\complex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "convex"=".\convex\convex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name qhull
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "qhull"="..\..\qhull\VisualC6\qhull\qhull.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "solid"=".\solid\solid.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name broad
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name complex
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name convex
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/extern/solid/VisualC6/solid/solid.dsp b/extern/solid/VisualC6/solid/solid.dsp
deleted file mode 100644
index 4ac7459c2f9..00000000000
--- a/extern/solid/VisualC6/solid/solid.dsp
+++ /dev/null
@@ -1,148 +0,0 @@
-# Microsoft Developer Studio Project File - Name="solid" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=solid - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "solid.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "solid.mak" CFG="solid - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "solid - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "solid - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "solid - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\lib\windows\solid\include\solid\ XCOPY /Y Release\*.lib ..\..\..\..\..\lib\windows\solid\lib\
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "solid - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\lib\windows\solid\include\solid\ XCOPY /Y Debug\*.lib ..\..\..\..\..\lib\windows\solid\lib\Debug\
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "solid - Win32 Release"
-# Name "solid - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\DT_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\DT_AlgoTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Response.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/solid_dll/solid_dll.dsp b/extern/solid/VisualC6/solid_dll/solid_dll.dsp
deleted file mode 100644
index eed092502e0..00000000000
--- a/extern/solid/VisualC6/solid_dll/solid_dll.dsp
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="solid_dll" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=solid_dll - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "solid_dll.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "solid_dll.mak" CFG="solid_dll - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "solid_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "solid_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "solid_dll - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "../../lib/win32/vc6"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "USE_DOUBLES" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/win32/vc6/solid.dll"
-
-!ELSEIF "$(CFG)" == "solid_dll - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "../../lib/win32/vc6"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../lib/win32/vc6/solidd.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "solid_dll - Win32 Release"
-# Name "solid_dll - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\DT_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\DT_AlgoTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Response.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/include/GEN_MinMax.h b/extern/solid/include/GEN_MinMax.h
deleted file mode 100644
index 9ea961cfe4f..00000000000
--- a/extern/solid/include/GEN_MinMax.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef GEN_MINMAX_H
-#define GEN_MINMAX_H
-
-template <class T>
-inline const T& GEN_min(const T& a, const T& b)
-{
- return b < a ? b : a;
-}
-
-template <class T>
-inline const T& GEN_max(const T& a, const T& b)
-{
- return a < b ? b : a;
-}
-
-template <class T>
-inline const T& GEN_clamped(const T& a, const T& lb, const T& ub)
-{
- return a < lb ? lb : (ub < a ? ub : a);
-}
-
-template <class T>
-inline void GEN_set_min(T& a, const T& b)
-{
- if (b < a)
- {
- a = b;
- }
-}
-
-template <class T>
-inline void GEN_set_max(T& a, const T& b)
-{
- if (a < b)
- {
- a = b;
- }
-}
-
-template <class T>
-inline void GEN_clamp(T& a, const T& lb, const T& ub)
-{
- if (a < lb)
- {
- a = lb;
- }
- else if (ub < a)
- {
- a = ub;
- }
-}
-
-#endif
diff --git a/extern/solid/include/GEN_random.h b/extern/solid/include/GEN_random.h
deleted file mode 100644
index 4690a05511a..00000000000
--- a/extern/solid/include/GEN_random.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef GEN_RANDOM_H
-#define GEN_RANDOM_H
-
-#ifdef MT19937
-
-#include <limits.h>
-#include <mt19937.h>
-
-#define GEN_RAND_MAX UINT_MAX
-
-inline void GEN_srand(unsigned int seed) { init_genrand(seed); }
-inline unsigned int GEN_rand() { return genrand_int32(); }
-
-#else
-
-#include <stdlib.h>
-
-#define GEN_RAND_MAX RAND_MAX
-
-inline void GEN_srand(unsigned int seed) { srand(seed); }
-inline unsigned int GEN_rand() { return rand(); }
-
-#endif
-
-#endif
-
diff --git a/extern/solid/include/MT/Interval.h b/extern/solid/include/MT/Interval.h
deleted file mode 100644
index c6ba2fc1681..00000000000
--- a/extern/solid/include/MT/Interval.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef INTERVAL_H
-#define INTERVAL_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include <iostream>
-#include <algorithm>
-
-namespace MT {
-
- template <typename Scalar>
- class Interval {
- public:
- Interval() {}
-
-
-#if _MSC_VER <= 1200
- explicit Interval(const Scalar& x)
- : m_lb(x), m_ub(x)
- {}
-
-
- Interval(const Scalar& lb, const Scalar& ub)
- : m_lb(lb), m_ub(ub)
- {
- assert(lb <= ub);
- }
-#else
- template <typename Scalar2>
- explicit Interval(const Scalar2& x)
- : m_lb(x), m_ub(x)
- {}
-
- template <typename Scalar2>
- Interval(const Scalar2& lb, const Scalar2& ub)
- : m_lb(lb), m_ub(ub)
- {
- assert(lb <= ub);
- }
-
- template <typename Scalar2>
- Interval(const Interval<Scalar2>& z)
- {
- *this = z;
- }
-
- template <typename Scalar2>
- Interval<Scalar>& operator=(const Interval<Scalar2>& z)
- {
- m_lb = Scalar(z.lower());
- m_ub = Scalar(z.upper());
- return *this;
- }
-#endif
-
-
-
- Scalar& lower() { return m_lb; }
- const Scalar& lower() const { return m_lb; }
-
- Scalar& upper() { return m_ub; }
- const Scalar& upper() const { return m_ub; }
-
- Scalar center() const { return (m_lb + m_ub) * Scalar(0.5); }
- Scalar extent() const { return (m_ub - m_lb) * Scalar(0.5); }
-
-
- protected:
- Scalar m_lb, m_ub;
- };
-
- template <typename Scalar>
- inline Interval<Scalar>
- operator+(const Interval<Scalar>& z1, const Interval<Scalar>& z2)
- {
- return Interval<Scalar>(z1.lower() + z2.lower(),
- z1.upper() + z2.upper());
- }
-
- template <typename Scalar>
- inline Interval<Scalar>
- operator-(const Interval<Scalar>& z1, const Interval<Scalar>& z2)
- {
- return Interval<Scalar>(z1.lower() - z2.upper(),
- z1.upper() - z2.lower());
- }
-
- template <typename Scalar>
- inline std::ostream&
- operator<<(std::ostream& os, const Interval<Scalar>& z)
- {
- return os << '[' << z.lower() << ", " << z.upper() << ']';
- }
-
- template <typename Scalar>
- inline Scalar
- median(const Interval<Scalar>& z)
- {
- return (z.lower() + z.upper()) * Scalar(0.5);
- }
-
- template <typename Scalar>
- inline Scalar
- width(const Interval<Scalar>& z)
- {
- return z.upper() - z.lower();
- }
-
- template <typename Scalar>
- inline bool
- overlap(const Interval<Scalar>& z1, const Interval<Scalar>& z2)
- {
- return z1.lower() <= z2.upper() && z2.lower() <= z1.upper();
- }
-
- template <typename Scalar>
- inline bool
- in(const Interval<Scalar>& z1, const Interval<Scalar>& z2)
- {
- return z2.lower() <= z1.lower() && z1.upper() <= z2.upper();
- }
-
- template <typename Scalar>
- inline bool
- in(Scalar x, const Interval<Scalar>& z)
- {
- return z.lower() <= x && x <= z.upper();
- }
-
- template <typename Scalar>
- inline Interval<Scalar>
- widen(const Interval<Scalar>& z, const Scalar& x)
- {
- return Interval<Scalar>(z.lower() - x, z.upper() + x);
- }
-
- template<typename Scalar>
- inline Interval<Scalar>
- hull(const Interval<Scalar>& z1, const Interval<Scalar>& z2)
- {
- return Interval<Scalar>(GEN_min(z1.lower(), z2.lower()),
- GEN_max(z1.upper(), z2.upper()));
- }
-
- template<typename Scalar>
- inline Interval<Scalar>
- operator+(Scalar x, const Interval<Scalar>& z)
- {
- return Interval<Scalar>(x + z.lower(), x + z.upper());
- }
-}
-
-#endif
diff --git a/extern/solid/include/MT/Matrix3x3.h b/extern/solid/include/MT/Matrix3x3.h
deleted file mode 100644
index 85e0d4cac84..00000000000
--- a/extern/solid/include/MT/Matrix3x3.h
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MATRIX3X3_H
-#define MATRIX3X3_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include "Vector3.h"
-#include "Quaternion.h"
-
-namespace MT {
-
- // Row-major 3x3 matrix
-
- template <typename Scalar>
- class Matrix3x3 {
- public:
- Matrix3x3() {}
-
- template <typename Scalar2>
- explicit Matrix3x3(const Scalar2 *m) { setValue(m); }
-
- explicit Matrix3x3(const Quaternion<Scalar>& q) { setRotation(q); }
-
- template <typename Scalar2>
- Matrix3x3(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
- {
- setEuler(yaw, pitch, roll);
- }
-
- template <typename Scalar2>
- Matrix3x3(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz,
- const Scalar2& yx, const Scalar2& yy, const Scalar2& yz,
- const Scalar2& zx, const Scalar2& zy, const Scalar2& zz)
- {
- setValue(xx, xy, xz,
- yx, yy, yz,
- zx, zy, zz);
- }
-
- Vector3<Scalar>& operator[](int i)
- {
- assert(0 <= i && i < 3);
- return m_el[i];
- }
-
- const Vector3<Scalar>& operator[](int i) const
- {
- assert(0 <= i && i < 3);
- return m_el[i];
- }
-
- Matrix3x3<Scalar>& operator*=(const Matrix3x3<Scalar>& m);
-
- template <typename Scalar2>
- void setValue(const Scalar2 *m)
- {
- m_el[0][0] = Scalar(m[0]);
- m_el[1][0] = Scalar(m[1]);
- m_el[2][0] = Scalar(m[2]);
- m_el[0][1] = Scalar(m[4]);
- m_el[1][1] = Scalar(m[5]);
- m_el[2][1] = Scalar(m[6]);
- m_el[0][2] = Scalar(m[8]);
- m_el[1][2] = Scalar(m[9]);
- m_el[2][2] = Scalar(m[10]);
- }
-
- template <typename Scalar2>
- void setValue(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz,
- const Scalar2& yx, const Scalar2& yy, const Scalar2& yz,
- const Scalar2& zx, const Scalar2& zy, const Scalar2& zz)
- {
- m_el[0][0] = Scalar(xx);
- m_el[0][1] = Scalar(xy);
- m_el[0][2] = Scalar(xz);
- m_el[1][0] = Scalar(yx);
- m_el[1][1] = Scalar(yy);
- m_el[1][2] = Scalar(yz);
- m_el[2][0] = Scalar(zx);
- m_el[2][1] = Scalar(zy);
- m_el[2][2] = Scalar(zz);
- }
-
- void setRotation(const Quaternion<Scalar>& q)
- {
- Scalar d = q.length2();
- assert(d != Scalar(0.0));
- Scalar s = Scalar(2.0) / d;
- Scalar xs = q[0] * s, ys = q[1] * s, zs = q[2] * s;
- Scalar wx = q[3] * xs, wy = q[3] * ys, wz = q[3] * zs;
- Scalar xx = q[0] * xs, xy = q[0] * ys, xz = q[0] * zs;
- Scalar yy = q[1] * ys, yz = q[1] * zs, zz = q[2] * zs;
- setValue(Scalar(1.0) - (yy + zz), xy - wz, xz + wy,
- xy + wz, Scalar(1.0) - (xx + zz), yz - wx,
- xz - wy, yz + wx, Scalar(1.0) - (xx + yy));
- }
-
- template <typename Scalar2>
- void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
- {
- Scalar cy(Scalar_traits<Scalar>::cos(yaw));
- Scalar sy(Scalar_traits<Scalar>::sin(yaw));
- Scalar cp(Scalar_traits<Scalar>::cos(pitch));
- Scalar sp(Scalar_traits<Scalar>::sin(pitch));
- Scalar cr(Scalar_traits<Scalar>::cos(roll));
- Scalar sr(Scalar_traits<Scalar>::sin(roll));
- Scalar cc = cy * cr;
- Scalar cs = cy * sr;
- Scalar sc = sy * cr;
- Scalar ss = sy * sr;
- setValue(cy * cp, -sc + sp * cs, ss - sp * cc,
- sy * cp, cc + sp * ss, -cs + sp * sc,
- -sp, cp * sr, cp * cr);
- }
- void setIdentity()
- {
- setValue(Scalar(1.0), Scalar(0.0), Scalar(0.0),
- Scalar(0.0), Scalar(1.0), Scalar(0.0),
- Scalar(0.0), Scalar(0.0), Scalar(1.0));
- }
-
- template <typename Scalar2>
- void getValue(Scalar2 *m) const
- {
- m[0] = Scalar2(m_el[0][0]);
- m[1] = Scalar2(m_el[1][0]);
- m[2] = Scalar2(m_el[2][0]);
- m[3] = Scalar2(0.0);
- m[4] = Scalar2(m_el[0][1]);
- m[5] = Scalar2(m_el[1][1]);
- m[6] = Scalar2(m_el[2][1]);
- m[7] = Scalar2(0.0);
- m[8] = Scalar2(m_el[0][2]);
- m[9] = Scalar2(m_el[1][2]);
- m[10] = Scalar2(m_el[2][2]);
- m[11] = Scalar2(0.0);
- }
-
- void getRotation(Quaternion<Scalar>& q) const
- {
- Scalar trace = m_el[0][0] + m_el[1][1] + m_el[2][2];
-
- if (trace > Scalar(0.0))
- {
- Scalar s = Scalar_traits<Scalar>::sqrt(trace + Scalar(1.0));
- q[3] = s * Scalar(0.5);
- s = Scalar(0.5) / s;
-
- q[0] = (m_el[2][1] - m_el[1][2]) * s;
- q[1] = (m_el[0][2] - m_el[2][0]) * s;
- q[2] = (m_el[1][0] - m_el[0][1]) * s;
- }
- else
- {
- int i = m_el[0][0] < m_el[1][1] ?
- (m_el[1][1] < m_el[2][2] ? 2 : 1) :
- (m_el[0][0] < m_el[2][2] ? 2 : 0);
- int j = (i + 1) % 3;
- int k = (i + 2) % 3;
-
- Scalar s = Scalar_traits<Scalar>::sqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + Scalar(1.0));
- q[i] = s * Scalar(0.5);
- s = Scalar(0.5) / s;
-
- q[3] = (m_el[k][j] - m_el[j][k]) * s;
- q[j] = (m_el[j][i] + m_el[i][j]) * s;
- q[k] = (m_el[k][i] + m_el[i][k]) * s;
- }
- }
-
-
-
- template <typename Scalar2>
- void getEuler(Scalar2& yaw, Scalar2& pitch, Scalar2& roll) const
- {
- pitch = Scalar2(Scalar_traits<Scalar>::asin(-m_el[2][0]));
- if (pitch < Scalar_traits<Scalar2>::TwoTimesPi())
- {
- if (pitch > Scalar_traits<Scalar2>::TwoTimesPi())
- {
- yaw = Scalar2(Scalar_traits<Scalar>::atan2(m_el[1][0], m_el[0][0]));
- roll = Scalar2(Scalar_traits<Scalar>::atan2(m_el[2][1], m_el[2][2]));
- }
- else
- {
- yaw = Scalar2(-Scalar_traits<Scalar>::atan2(-m_el[0][1], m_el[0][2]));
- roll = Scalar2(0.0);
- }
- }
- else
- {
- yaw = Scalar2(Scalar_traits<Scalar>::atan2(-m_el[0][1], m_el[0][2]));
- roll = Scalar2(0.0);
- }
- }
-
- Vector3<Scalar> getScaling() const
- {
- return Vector3<Scalar>(m_el[0][0] * m_el[0][0] + m_el[1][0] * m_el[1][0] + m_el[2][0] * m_el[2][0],
- m_el[0][1] * m_el[0][1] + m_el[1][1] * m_el[1][1] + m_el[2][1] * m_el[2][1],
- m_el[0][2] * m_el[0][2] + m_el[1][2] * m_el[1][2] + m_el[2][2] * m_el[2][2]);
- }
-
-
- Matrix3x3<Scalar> scaled(const Vector3<Scalar>& s) const
- {
- return Matrix3x3<Scalar>(m_el[0][0] * s[0], m_el[0][1] * s[1], m_el[0][2] * s[2],
- m_el[1][0] * s[0], m_el[1][1] * s[1], m_el[1][2] * s[2],
- m_el[2][0] * s[0], m_el[2][1] * s[1], m_el[2][2] * s[2]);
- }
-
- Scalar determinant() const;
- Matrix3x3<Scalar> adjoint() const;
- Matrix3x3<Scalar> absolute() const;
- Matrix3x3<Scalar> transpose() const;
- Matrix3x3<Scalar> inverse() const;
-
- Matrix3x3<Scalar> transposeTimes(const Matrix3x3<Scalar>& m) const;
- Matrix3x3<Scalar> timesTranspose(const Matrix3x3<Scalar>& m) const;
-
- Scalar tdot(int c, const Vector3<Scalar>& v) const
- {
- return m_el[0][c] * v[0] + m_el[1][c] * v[1] + m_el[2][c] * v[2];
- }
-
- protected:
- Scalar cofac(int r1, int c1, int r2, int c2) const
- {
- return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1];
- }
-
- Vector3<Scalar> m_el[3];
- };
-
- template <typename Scalar>
- inline std::ostream&
- operator<<(std::ostream& os, const Matrix3x3<Scalar>& m)
- {
- return os << m[0] << std::endl << m[1] << std::endl << m[2] << std::endl;
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>&
- Matrix3x3<Scalar>::operator*=(const Matrix3x3<Scalar>& m)
- {
- setValue(m.tdot(0, m_el[0]), m.tdot(1, m_el[0]), m.tdot(2, m_el[0]),
- m.tdot(0, m_el[1]), m.tdot(1, m_el[1]), m.tdot(2, m_el[1]),
- m.tdot(0, m_el[2]), m.tdot(1, m_el[2]), m.tdot(2, m_el[2]));
- return *this;
- }
-
- template <typename Scalar>
- inline Scalar
- Matrix3x3<Scalar>::determinant() const
- {
- return triple((*this)[0], (*this)[1], (*this)[2]);
- }
-
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::absolute() const
- {
- return Matrix3x3<Scalar>(
- Scalar_traits<Scalar>::abs(m_el[0][0]), Scalar_traits<Scalar>::abs(m_el[0][1]), Scalar_traits<Scalar>::abs(m_el[0][2]),
- Scalar_traits<Scalar>::abs(m_el[1][0]), Scalar_traits<Scalar>::abs(m_el[1][1]), Scalar_traits<Scalar>::abs(m_el[1][2]),
- Scalar_traits<Scalar>::abs(m_el[2][0]), Scalar_traits<Scalar>::abs(m_el[2][1]), Scalar_traits<Scalar>::abs(m_el[2][2]));
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::transpose() const
- {
- return Matrix3x3<Scalar>(m_el[0][0], m_el[1][0], m_el[2][0],
- m_el[0][1], m_el[1][1], m_el[2][1],
- m_el[0][2], m_el[1][2], m_el[2][2]);
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::adjoint() const
- {
- return Matrix3x3<Scalar>(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2),
- cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0),
- cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1));
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::inverse() const
- {
- Vector3<Scalar> co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1));
- Scalar det = (*this)[0].dot(co);
- assert(det != Scalar(0.0));
- Scalar s = Scalar(1.0) / det;
- return Matrix3x3<Scalar>(co[0] * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
- co[1] * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
- co[2] * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s);
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::transposeTimes(const Matrix3x3<Scalar>& m) const
- {
- return Matrix3x3<Scalar>(
- m_el[0][0] * m[0][0] + m_el[1][0] * m[1][0] + m_el[2][0] * m[2][0],
- m_el[0][0] * m[0][1] + m_el[1][0] * m[1][1] + m_el[2][0] * m[2][1],
- m_el[0][0] * m[0][2] + m_el[1][0] * m[1][2] + m_el[2][0] * m[2][2],
- m_el[0][1] * m[0][0] + m_el[1][1] * m[1][0] + m_el[2][1] * m[2][0],
- m_el[0][1] * m[0][1] + m_el[1][1] * m[1][1] + m_el[2][1] * m[2][1],
- m_el[0][1] * m[0][2] + m_el[1][1] * m[1][2] + m_el[2][1] * m[2][2],
- m_el[0][2] * m[0][0] + m_el[1][2] * m[1][0] + m_el[2][2] * m[2][0],
- m_el[0][2] * m[0][1] + m_el[1][2] * m[1][1] + m_el[2][2] * m[2][1],
- m_el[0][2] * m[0][2] + m_el[1][2] * m[1][2] + m_el[2][2] * m[2][2]);
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- Matrix3x3<Scalar>::timesTranspose(const Matrix3x3<Scalar>& m) const
- {
- return Matrix3x3<Scalar>(
- m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]),
- m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]),
- m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2]));
-
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator*(const Matrix3x3<Scalar>& m, const Vector3<Scalar>& v)
- {
- return Vector3<Scalar>(m[0].dot(v), m[1].dot(v), m[2].dot(v));
- }
-
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator*(const Vector3<Scalar>& v, const Matrix3x3<Scalar>& m)
- {
- return Vector3<Scalar>(m.tdot(0, v), m.tdot(1, v), m.tdot(2, v));
- }
-
- template <typename Scalar>
- inline Matrix3x3<Scalar>
- operator*(const Matrix3x3<Scalar>& m1, const Matrix3x3<Scalar>& m2)
- {
- return Matrix3x3<Scalar>(
- m2.tdot(0, m1[0]), m2.tdot(1, m1[0]), m2.tdot(2, m1[0]),
- m2.tdot(0, m1[1]), m2.tdot(1, m1[1]), m2.tdot(2, m1[1]),
- m2.tdot(0, m1[2]), m2.tdot(1, m1[2]), m2.tdot(2, m1[2]));
- }
-}
-
-#endif
diff --git a/extern/solid/include/MT/Quaternion.h b/extern/solid/include/MT/Quaternion.h
deleted file mode 100644
index a925f21cd5d..00000000000
--- a/extern/solid/include/MT/Quaternion.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef QUATERNION_H
-#define QUATERNION_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include "Tuple4.h"
-#include "Vector3.h"
-
-namespace MT {
-
- template <typename Scalar>
- class Quaternion : public Tuple4<Scalar> {
- public:
- Quaternion() {}
-
- template <typename Scalar2>
- explicit Quaternion(const Scalar2 *v) : Tuple4<Scalar>(v) {}
-
- template <typename Scalar2>
- Quaternion(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w)
- : Tuple4<Scalar>(x, y, z, w)
- {}
-
- Quaternion(const Vector3<Scalar>& axis, const Scalar& angle)
- {
- setRotation(axis, angle);
- }
-
- template <typename Scalar2>
- Quaternion(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
- {
- setEuler(yaw, pitch, roll);
- }
-
- void setRotation(const Vector3<Scalar>& axis, const Scalar& angle)
- {
- Scalar d = axis.length();
- assert(d != Scalar(0.0));
- Scalar s = Scalar_traits<Scalar>::sin(angle * Scalar(0.5)) / d;
- setValue(axis[0] * s, axis[1] * s, axis[2] * s,
- Scalar_traits<Scalar>::cos(angle * Scalar(0.5)));
- }
-
- template <typename Scalar2>
- void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
- {
- Scalar halfYaw = Scalar(yaw) * Scalar(0.5);
- Scalar halfPitch = Scalar(pitch) * Scalar(0.5);
- Scalar halfRoll = Scalar(roll) * Scalar(0.5);
- Scalar cosYaw = Scalar_traits<Scalar>::cos(halfYaw);
- Scalar sinYaw = Scalar_traits<Scalar>::sin(halfYaw);
- Scalar cosPitch = Scalar_traits<Scalar>::cos(halfPitch);
- Scalar sinPitch = Scalar_traits<Scalar>::sin(halfPitch);
- Scalar cosRoll = Scalar_traits<Scalar>::cos(halfRoll);
- Scalar sinRoll = Scalar_traits<Scalar>::sin(halfRoll);
- setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
- cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
- sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
- cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
- }
-
- Quaternion<Scalar>& operator+=(const Quaternion<Scalar>& q)
- {
- this->m_co[0] += q[0]; this->m_co[1] += q[1]; this->m_co[2] += q[2]; this->m_co[3] += q[3];
- return *this;
- }
-
- Quaternion<Scalar>& operator-=(const Quaternion<Scalar>& q)
- {
- this->m_co[0] -= q[0]; this->m_co[1] -= q[1]; this->m_co[2] -= q[2]; this->m_co[3] -= q[3];
- return *this;
- }
-
- Quaternion<Scalar>& operator*=(const Scalar& s)
- {
- this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; this->m_co[3] *= s;
- return *this;
- }
-
- Quaternion<Scalar>& operator/=(const Scalar& s)
- {
- assert(s != Scalar(0.0));
- return *this *= Scalar(1.0) / s;
- }
-
- Quaternion<Scalar>& operator*=(const Quaternion<Scalar>& q)
- {
- setValue(this->m_co[3] * q[0] + this->m_co[0] * q[3] + this->m_co[1] * q[2] - this->m_co[2] * q[1],
- this->m_co[3] * q[1] + this->m_co[1] * q[3] + this->m_co[2] * q[0] - this->m_co[0] * q[2],
- this->m_co[3] * q[2] + this->m_co[2] * q[3] + this->m_co[0] * q[1] - this->m_co[1] * q[0],
- this->m_co[3] * q[3] - this->m_co[0] * q[0] - this->m_co[1] * q[1] - this->m_co[2] * q[2]);
- return *this;
- }
-
- Scalar dot(const Quaternion<Scalar>& q) const
- {
- return this->m_co[0] * q[0] + this->m_co[1] * q[1] + this->m_co[2] * q[2] + this->m_co[3] * q[3];
- }
-
- Scalar length2() const
- {
- return dot(*this);
- }
-
- Scalar length() const
- {
- return Scalar_traits<Scalar>::sqrt(length2());
- }
-
- Quaternion<Scalar>& normalize()
- {
- return *this /= length();
- }
-
- Quaternion<Scalar> normalized() const
- {
- return *this / length();
- }
-
- Scalar angle(const Quaternion<Scalar>& q) const
- {
- Scalar s = Scalar_traits<Scalar>::sqrt(length2() * q.length2());
- assert(s != Scalar(0.0));
- return Scalar_traits<Scalar>::acos(dot(q) / s);
- }
-
- Quaternion<Scalar> conjugate() const
- {
- return Quaternion<Scalar>(-this->m_co[0], -this->m_co[1], -this->m_co[2], this->m_co[3]);
- }
-
- Quaternion<Scalar> inverse() const
- {
- return conjugate / length2();
- }
-
- Quaternion<Scalar> slerp(const Quaternion<Scalar>& q, const Scalar& t) const
- {
- Scalar theta = angle(q);
- if (theta != Scalar(0.0))
- {
- Scalar d = Scalar(1.0) / Scalar_traits<Scalar>::sin(theta);
- Scalar s0 = Scalar_traits<Scalar>::sin((Scalar(1.0) - t) * theta);
- Scalar s1 = Scalar_traits<Scalar>::sin(t * theta);
- return Quaternion<Scalar>((this->m_co[0] * s0 + q[0] * s1) * d,
- (this->m_co[1] * s0 + q[1] * s1) * d,
- (this->m_co[2] * s0 + q[2] * s1) * d,
- (this->m_co[3] * s0 + q[3] * s1) * d);
- }
- else
- {
- return *this;
- }
- }
-
- static Quaternion<Scalar> random()
- {
- // From: "Uniform Random Rotations", Ken Shoemake, Graphics Gems III,
- // pg. 124-132
- Scalar x0 = Scalar_traits<Scalar>::random();
- Scalar r1 = Scalar_traits<Scalar>::sqrt(Scalar(1.0) - x0);
- Scalar r2 = Scalar_traits<Scalar>::sqrt(x0);
- Scalar t1 = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random();
- Scalar t2 = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random();
- Scalar c1 = Scalar_traits<Scalar>::cos(t1);
- Scalar s1 = Scalar_traits<Scalar>::sin(t1);
- Scalar c2 = Scalar_traits<Scalar>::cos(t2);
- Scalar s2 = Scalar_traits<Scalar>::sin(t2);
- return Quaternion<Scalar>(s1 * r1, c1 * r1, s2 * r2, c2 * r2);
- }
-
- };
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator+(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2)
- {
- return Quaternion<Scalar>(q1[0] + q2[0], q1[1] + q2[1], q1[2] + q2[2], q1[3] + q2[3]);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator-(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2)
- {
- return Quaternion<Scalar>(q1[0] - q2[0], q1[1] - q2[1], q1[2] - q2[2], q1[3] - q2[3]);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator-(const Quaternion<Scalar>& q)
- {
- return Quaternion<Scalar>(-q[0], -q[1], -q[2], -q[3]);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator*(const Quaternion<Scalar>& q, const Scalar& s)
- {
- return Quaternion<Scalar>(q[0] * s, q[1] * s, q[2] * s, q[3] * s);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator*(const Scalar& s, const Quaternion<Scalar>& q)
- {
- return q * s;
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator*(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) {
- return Quaternion<Scalar>(q1[3] * q2[0] + q1[0] * q2[3] + q1[1] * q2[2] - q1[2] * q2[1],
- q1[3] * q2[1] + q1[1] * q2[3] + q1[2] * q2[0] - q1[0] * q2[2],
- q1[3] * q2[2] + q1[2] * q2[3] + q1[0] * q2[1] - q1[1] * q2[0],
- q1[3] * q2[3] - q1[0] * q2[0] - q1[1] * q2[1] - q1[2] * q2[2]);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator*(const Quaternion<Scalar>& q, const Vector3<Scalar>& w)
- {
- return Quaternion<Scalar>( q[3] * w[0] + q[1] * w[2] - q[2] * w[1],
- q[3] * w[1] + q[2] * w[0] - q[0] * w[2],
- q[3] * w[2] + q[0] * w[1] - q[1] * w[0],
- -q[0] * w[0] - q[1] * w[1] - q[2] * w[2]);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- operator*(const Vector3<Scalar>& w, const Quaternion<Scalar>& q)
- {
- return Quaternion<Scalar>( w[0] * q[3] + w[1] * q[2] - w[2] * q[1],
- w[1] * q[3] + w[2] * q[0] - w[0] * q[2],
- w[2] * q[3] + w[0] * q[1] - w[1] * q[0],
- -w[0] * q[0] - w[1] * q[1] - w[2] * q[2]);
- }
-
- template <typename Scalar>
- inline Scalar
- dot(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2)
- {
- return q1.dot(q2);
- }
-
- template <typename Scalar>
- inline Scalar
- length2(const Quaternion<Scalar>& q)
- {
- return q.length2();
- }
-
- template <typename Scalar>
- inline Scalar
- length(const Quaternion<Scalar>& q)
- {
- return q.length();
- }
-
- template <typename Scalar>
- inline Scalar
- angle(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2)
- {
- return q1.angle(q2);
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- conjugate(const Quaternion<Scalar>& q)
- {
- return q.conjugate();
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- inverse(const Quaternion<Scalar>& q)
- {
- return q.inverse();
- }
-
- template <typename Scalar>
- inline Quaternion<Scalar>
- slerp(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2, const Scalar& t)
- {
- return q1.slerp(q2, t);
- }
-
-}
-
-#endif
diff --git a/extern/solid/include/MT/Transform.h b/extern/solid/include/MT/Transform.h
deleted file mode 100644
index b80dc1bc18b..00000000000
--- a/extern/solid/include/MT/Transform.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TRANSFORM_H
-#define TRANSFORM_H
-
-#include "Vector3.h"
-#include "Matrix3x3.h"
-
-namespace MT {
-
- template <typename Scalar>
- class Transform {
- enum {
- TRANSLATION = 0x01,
- ROTATION = 0x02,
- RIGID = TRANSLATION | ROTATION,
- SCALING = 0x04,
- LINEAR = ROTATION | SCALING,
- AFFINE = TRANSLATION | LINEAR
- };
-
- public:
- Transform() {}
-
- template <typename Scalar2>
- explicit Transform(const Scalar2 *m) { setValue(m); }
-
- explicit Transform(const Quaternion<Scalar>& q,
- const Vector3<Scalar>& c = Vector3<Scalar>(Scalar(0), Scalar(0), Scalar(0)))
- : m_basis(q),
- m_origin(c),
- m_type(RIGID)
- {}
-
- explicit Transform(const Matrix3x3<Scalar>& b,
- const Vector3<Scalar>& c = Vector3<Scalar>(Scalar(0), Scalar(0), Scalar(0)),
- unsigned int type = AFFINE)
- : m_basis(b),
- m_origin(c),
- m_type(type)
- {}
-
- Vector3<Scalar> operator()(const Vector3<Scalar>& x) const
- {
- return Vector3<Scalar>(m_basis[0].dot(x) + m_origin[0],
- m_basis[1].dot(x) + m_origin[1],
- m_basis[2].dot(x) + m_origin[2]);
- }
-
- Vector3<Scalar> operator*(const Vector3<Scalar>& x) const
- {
- return (*this)(x);
- }
-
- Matrix3x3<Scalar>& getBasis() { return m_basis; }
- const Matrix3x3<Scalar>& getBasis() const { return m_basis; }
-
- Vector3<Scalar>& getOrigin() { return m_origin; }
- const Vector3<Scalar>& getOrigin() const { return m_origin; }
-
- Quaternion<Scalar> getRotation() const { return m_basis.getRotation(); }
- template <typename Scalar2>
- void setValue(const Scalar2 *m)
- {
- m_basis.setValue(m);
- m_origin.setValue(&m[12]);
- m_type = AFFINE;
- }
-
- template <typename Scalar2>
- void getValue(Scalar2 *m) const
- {
- m_basis.getValue(m);
- m_origin.getValue(&m[12]);
- m[15] = Scalar2(1.0);
- }
-
- void setOrigin(const Vector3<Scalar>& origin)
- {
- m_origin = origin;
- m_type |= TRANSLATION;
- }
-
- void setBasis(const Matrix3x3<Scalar>& basis)
- {
- m_basis = basis;
- m_type |= LINEAR;
- }
-
- void setRotation(const Quaternion<Scalar>& q)
- {
- m_basis.setRotation(q);
- m_type = (m_type & ~LINEAR) | ROTATION;
- }
-
- void scale(const Vector3<Scalar>& scaling)
- {
- m_basis = m_basis.scaled(scaling);
- m_type |= SCALING;
- }
-
- void setIdentity()
- {
- m_basis.setIdentity();
- m_origin.setValue(Scalar(0.0), Scalar(0.0), Scalar(0.0));
- m_type = 0x0;
- }
-
- bool isIdentity() const { return m_type == 0x0; }
-
- Transform<Scalar>& operator*=(const Transform<Scalar>& t)
- {
- m_origin += m_basis * t.m_origin;
- m_basis *= t.m_basis;
- m_type |= t.m_type;
- return *this;
- }
-
- Transform<Scalar> inverse() const
- {
- Matrix3x3<Scalar> inv = (m_type & SCALING) ?
- m_basis.inverse() :
- m_basis.transpose();
-
- return Transform<Scalar>(inv, inv * -m_origin, m_type);
- }
-
- Transform<Scalar> inverseTimes(const Transform<Scalar>& t) const;
-
- Transform<Scalar> operator*(const Transform<Scalar>& t) const;
-
- private:
-
- Matrix3x3<Scalar> m_basis;
- Vector3<Scalar> m_origin;
- unsigned int m_type;
- };
-
-
- template <typename Scalar>
- inline Transform<Scalar>
- Transform<Scalar>::inverseTimes(const Transform<Scalar>& t) const
- {
- Vector3<Scalar> v = t.getOrigin() - m_origin;
- if (m_type & SCALING)
- {
- Matrix3x3<Scalar> inv = m_basis.inverse();
- return Transform<Scalar>(inv * t.getBasis(), inv * v,
- m_type | t.m_type);
- }
- else
- {
- return Transform<Scalar>(m_basis.transposeTimes(t.m_basis),
- v * m_basis, m_type | t.m_type);
- }
- }
-
- template <typename Scalar>
- inline Transform<Scalar>
- Transform<Scalar>::operator*(const Transform<Scalar>& t) const
- {
- return Transform<Scalar>(m_basis * t.m_basis,
- (*this)(t.m_origin),
- m_type | t.m_type);
- }
-}
-
-#endif
diff --git a/extern/solid/include/MT/Tuple3.h b/extern/solid/include/MT/Tuple3.h
deleted file mode 100644
index 52ea33b7f58..00000000000
--- a/extern/solid/include/MT/Tuple3.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TUPLE3_H
-#define TUPLE3_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include <iostream>
-
-namespace MT {
-
- template <typename Scalar>
- class Tuple3 {
- public:
- Tuple3() {}
-
- template <typename Scalar2>
- explicit Tuple3(const Scalar2 *v)
- {
- setValue(v);
- }
-
- template <typename Scalar2>
- Tuple3(const Scalar2& x, const Scalar2& y, const Scalar2& z)
- {
- setValue(x, y, z);
- }
-
- template <typename Scalar2>
- Tuple3(const Tuple3<Scalar2>& t)
- {
- *this = t;
- }
-
- template <typename Scalar2>
- Tuple3<Scalar>& operator=(const Tuple3<Scalar2>& t)
- {
- m_co[0] = Scalar(t[0]);
- m_co[1] = Scalar(t[1]);
- m_co[2] = Scalar(t[2]);
- return *this;
- }
-
- operator Scalar *() { return m_co; }
- operator const Scalar *() const { return m_co; }
-
- Scalar& operator[](int i) { return m_co[i]; }
- const Scalar& operator[](int i) const { return m_co[i]; }
-
- Scalar& x() { return m_co[0]; }
- const Scalar& x() const { return m_co[0]; }
-
- Scalar& y() { return m_co[1]; }
- const Scalar& y() const { return m_co[1]; }
-
- Scalar& z() { return m_co[2]; }
- const Scalar& z() const { return m_co[2]; }
-
- template <typename Scalar2>
- void setValue(const Scalar2 *v)
- {
- m_co[0] = Scalar(v[0]);
- m_co[1] = Scalar(v[1]);
- m_co[2] = Scalar(v[2]);
- }
-
- template <typename Scalar2>
- void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z)
- {
- m_co[0] = Scalar(x);
- m_co[1] = Scalar(y);
- m_co[2] = Scalar(z);
- }
-
- template <typename Scalar2>
- void getValue(Scalar2 *v) const
- {
- v[0] = Scalar2(m_co[0]);
- v[1] = Scalar2(m_co[1]);
- v[2] = Scalar2(m_co[2]);
- }
-
- protected:
- Scalar m_co[3];
- };
-
- template <typename Scalar>
- inline std::ostream&
- operator<<(std::ostream& os, const Tuple3<Scalar>& t)
- {
- return os << t[0] << ' ' << t[1] << ' ' << t[2];
- }
-}
-
-#endif
diff --git a/extern/solid/include/MT/Tuple4.h b/extern/solid/include/MT/Tuple4.h
deleted file mode 100644
index 6930541271e..00000000000
--- a/extern/solid/include/MT/Tuple4.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TUPLE4_H
-#define TUPLE4_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include <iostream>
-
-namespace MT {
-
- template <typename Scalar>
- class Tuple4 {
- public:
- Tuple4() {}
-
- template <typename Scalar2>
- explicit Tuple4(const Scalar2 *v)
- {
- setValue(v);
- }
-
- template <typename Scalar2>
- Tuple4(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w)
- {
- setValue(x, y, z, w);
- }
-
- operator Scalar *() { return m_co; }
- operator const Scalar *() const { return m_co; }
-
- Scalar& operator[](int i) { return m_co[i]; }
- const Scalar& operator[](int i) const { return m_co[i]; }
-
- Scalar& x() { return m_co[0]; }
- const Scalar& x() const { return m_co[0]; }
-
- Scalar& y() { return m_co[1]; }
- const Scalar& y() const { return m_co[1]; }
-
- Scalar& z() { return m_co[2]; }
- const Scalar& z() const { return m_co[2]; }
-
- Scalar& w() { return m_co[3]; }
- const Scalar& w() const { return m_co[3]; }
-
- template <typename Scalar2>
- void setValue(const Scalar2 *v)
- {
- m_co[0] = Scalar(v[0]);
- m_co[1] = Scalar(v[1]);
- m_co[2] = Scalar(v[2]);
- m_co[3] = Scalar(v[3]);
- }
-
- template <typename Scalar2>
- void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w)
- {
- m_co[0] = Scalar(x);
- m_co[1] = Scalar(y);
- m_co[2] = Scalar(z);
- m_co[3] = Scalar(w);
- }
-
- template <typename Scalar2>
- void getValue(Scalar2 *v) const
- {
- v[0] = Scalar2(m_co[0]);
- v[1] = Scalar2(m_co[1]);
- v[2] = Scalar2(m_co[2]);
- v[3] = Scalar2(m_co[3]);
- }
-
- protected:
- Scalar m_co[4];
- };
-
- template <typename Scalar>
- inline std::ostream&
- operator<<(std::ostream& os, const Tuple4<Scalar>& t)
- {
- return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3];
- }
-
-}
-
-#endif
diff --git a/extern/solid/include/MT/Vector3.h b/extern/solid/include/MT/Vector3.h
deleted file mode 100644
index b569c003f59..00000000000
--- a/extern/solid/include/MT/Vector3.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef VECTOR3_H
-#define VECTOR3_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-#include "Tuple3.h"
-
-namespace MT {
-
- template <typename Scalar>
- class Vector3 : public Tuple3<Scalar> {
- public:
- Vector3() {}
-
- template <typename Scalar2>
- explicit Vector3(const Scalar2 *v) : Tuple3<Scalar>(v) {}
-
- template <typename Scalar2>
- Vector3(const Scalar2& x, const Scalar2& y, const Scalar2& z)
- : Tuple3<Scalar>(x, y, z)
- {}
-
- Vector3<Scalar>& operator+=(const Vector3<Scalar>& v)
- {
- this->m_co[0] += v[0]; this->m_co[1] += v[1]; this->m_co[2] += v[2];
- return *this;
- }
-
- Vector3<Scalar>& operator-=(const Vector3<Scalar>& v)
- {
- this->m_co[0] -= v[0]; this->m_co[1] -= v[1]; this->m_co[2] -= v[2];
- return *this;
- }
-
- Vector3<Scalar>& operator*=(const Scalar& s)
- {
- this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s;
- return *this;
- }
-
- Vector3<Scalar>& operator/=(const Scalar& s)
- {
- assert(s != Scalar(0.0));
- return *this *= Scalar(1.0) / s;
- }
-
- Scalar dot(const Vector3<Scalar>& v) const
- {
- return this->m_co[0] * v[0] + this->m_co[1] * v[1] + this->m_co[2] * v[2];
- }
-
- Scalar length2() const
- {
- return dot(*this);
- }
-
- Scalar length() const
- {
- return Scalar_traits<Scalar>::sqrt(length2());
- }
-
- Scalar distance2(const Vector3<Scalar>& v) const
- {
- return (v - *this).length2();
- }
-
- Scalar distance(const Vector3<Scalar>& v) const
- {
- return (v - *this).length();
- }
-
- Vector3<Scalar>& normalize()
- {
- return *this /= length();
- }
-
- Vector3<Scalar> normalized() const
- {
- return *this / length();
- }
-
- Scalar angle(const Vector3<Scalar>& v) const
- {
- Scalar s = Scalar_traits<Scalar>::sqrt(length2() * v.length2());
- assert(s != Scalar(0.0));
- return Scalar_traits<Scalar>::acos(dot(v) / s);
- }
-
- Vector3<Scalar> absolute() const
- {
- return Vector3<Scalar>(Scalar_traits<Scalar>::abs(this->m_co[0]),
- Scalar_traits<Scalar>::abs(this->m_co[1]),
- Scalar_traits<Scalar>::abs(this->m_co[2]));
- }
-
- Vector3<Scalar> cross(const Vector3<Scalar>& v) const
- {
- return Vector3<Scalar>(this->m_co[1] * v[2] - this->m_co[2] * v[1],
- this->m_co[2] * v[0] - this->m_co[0] * v[2],
- this->m_co[0] * v[1] - this->m_co[1] * v[0]);
- }
-
- Scalar triple(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) const
- {
- return this->m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) +
- this->m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) +
- this->m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]);
- }
-
- int minAxis() const
- {
- return this->m_co[0] < this->m_co[1] ? (this->m_co[0] < this->m_co[2] ? 0 : 2) : (this->m_co[1] < this->m_co[2] ? 1 : 2);
- }
-
- int maxAxis() const
- {
- return this->m_co[0] < this->m_co[1] ? (this->m_co[1] < this->m_co[2] ? 2 : 1) : (this->m_co[0] < this->m_co[2] ? 2 : 0);
- }
-
- int furthestAxis() const
- {
- return absolute().minAxis();
- }
-
- int closestAxis() const
- {
- return absolute().maxAxis();
- }
-
- Vector3<Scalar> lerp(const Vector3<Scalar>& v, const Scalar& t) const
- {
- return Vector3<Scalar>(this->m_co[0] + (v[0] - this->m_co[0]) * t,
- this->m_co[1] + (v[1] - this->m_co[1]) * t,
- this->m_co[2] + (v[2] - this->m_co[2]) * t);
- }
-
- static Vector3<Scalar> random()
- {
- Scalar z = Scalar(2.0) * Scalar_traits<Scalar>::random() - Scalar(1.0);
- Scalar r = Scalar_traits<Scalar>::sqrt(Scalar(1.0) - z * z);
- Scalar t = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random();
- return Vector3<Scalar>(r * Scalar_traits<Scalar>::cos(t),
- r * Scalar_traits<Scalar>::sin(t),
- z);
- }
- };
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator+(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return Vector3<Scalar>(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator-(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return Vector3<Scalar>(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator-(const Vector3<Scalar>& v)
- {
- return Vector3<Scalar>(-v[0], -v[1], -v[2]);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator*(const Vector3<Scalar>& v, const Scalar& s)
- {
- return Vector3<Scalar>(v[0] * s, v[1] * s, v[2] * s);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator*(const Scalar& s, const Vector3<Scalar>& v)
- {
- return v * s;
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- operator/(const Vector3<Scalar>& v, const Scalar& s)
- {
- assert(s != Scalar(0.0));
- return v * (Scalar(1.0) / s);
- }
-
- template <typename Scalar>
- inline Scalar
- dot(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return v1.dot(v2);
- }
-
- template <typename Scalar>
- inline Scalar
- length2(const Vector3<Scalar>& v)
- {
- return v.length2();
- }
-
- template <typename Scalar>
- inline Scalar
- length(const Vector3<Scalar>& v)
- {
- return v.length();
- }
-
- template <typename Scalar>
- inline Scalar
- distance2(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return v1.distance2(v2);
- }
-
- template <typename Scalar>
- inline Scalar
- distance(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return v1.distance(v2);
- }
-
- template <typename Scalar>
- inline Scalar
- angle(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return v1.angle(v2);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- cross(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2)
- {
- return v1.cross(v2);
- }
-
- template <typename Scalar>
- inline Scalar
- triple(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2, const Vector3<Scalar>& v3)
- {
- return v1.triple(v2, v3);
- }
-
- template <typename Scalar>
- inline Vector3<Scalar>
- lerp(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2, const Scalar& t)
- {
- return v1.lerp(v2, t);
- }
-
-}
-
-#endif
diff --git a/extern/solid/include/MT_BBox.h b/extern/solid/include/MT_BBox.h
deleted file mode 100644
index b5dc537e0d9..00000000000
--- a/extern/solid/include/MT_BBox.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_BBOX_H
-#define MT_BBOX_H
-
-#include "MT_Scalar.h"
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-
-#include <MT/Tuple3.h>
-#include "MT_Interval.h"
-
-
-
-class MT_BBox : public MT::Tuple3<MT_Interval> {
-public:
- MT_BBox() {}
- MT_BBox(const MT_Point3& p)
- : MT::Tuple3<MT_Interval>(MT_Interval(p[0]),
- MT_Interval(p[1]),
- MT_Interval(p[2]))
- {}
- MT_BBox(const MT_Point3& lb, const MT_Point3& ub)
- : MT::Tuple3<MT_Interval>(MT_Interval(lb[0], ub[0]),
- MT_Interval(lb[1], ub[1]),
- MT_Interval(lb[2], ub[2]))
- {}
- MT_BBox(const MT_Interval& x, const MT_Interval& y, const MT_Interval& z)
- : MT::Tuple3<MT_Interval>(x, y, z)
- {}
-
- MT_Point3 getMin() const
- {
- return MT_Point3(m_co[0].lower(), m_co[1].lower(), m_co[2].lower());
- }
-
- MT_Point3 getMax() const
- {
- return MT_Point3(m_co[0].upper(), m_co[1].upper(), m_co[2].upper());
- }
-
- MT_Point3 getCenter() const
- {
- return MT_Point3(MT::median(m_co[0]), MT::median(m_co[1]), MT::median(m_co[2]));
- }
-
- MT_Vector3 getExtent() const
- {
- return MT_Vector3(MT::width(m_co[0]) * MT_Scalar(0.5), MT::width(m_co[1]) * MT_Scalar(0.5), MT::width(m_co[2]) * MT_Scalar(0.5));
- }
-
- void extend(const MT_Vector3& v)
- {
- m_co[0] = MT::widen(m_co[0], v[0]);
- m_co[1] = MT::widen(m_co[1], v[1]);
- m_co[2] = MT::widen(m_co[2], v[2]);
- }
-
- bool overlaps(const MT_BBox& b) const
- {
- return MT::overlap(m_co[0], b[0]) &&
- MT::overlap(m_co[1], b[1]) &&
- MT::overlap(m_co[2], b[2]);
- }
-
- bool inside(const MT_BBox& b) const
- {
- return MT::in(m_co[0], b[0]) &&
- MT::in(m_co[1], b[1]) &&
- MT::in(m_co[2], b[2]);
- }
-
- MT_BBox hull(const MT_BBox& b) const
- {
- return MT_BBox(MT::hull(m_co[0], b[0]),
- MT::hull(m_co[1], b[1]),
- MT::hull(m_co[2], b[2]));
- }
-
- bool contains(const MT_Point3& p) const
- {
- return MT::in(p[0], m_co[0]) && MT::in(p[1], m_co[1]) && MT::in(p[2], m_co[2]);
- }
-};
-
-inline MT_BBox operator+(const MT_BBox& b1, const MT_BBox& b2)
-{
- return MT_BBox(b1[0] + b2[0], b1[1] + b2[1], b1[2] + b2[2]);
-}
-
-inline MT_BBox operator-(const MT_BBox& b1, const MT_BBox& b2)
-{
- return MT_BBox(b1[0] - b2[0], b1[1] - b2[1], b1[2] - b2[2]);
-}
-
-#endif
-
-
diff --git a/extern/solid/include/MT_Interval.h b/extern/solid/include/MT_Interval.h
deleted file mode 100644
index 25ebfd0a67d..00000000000
--- a/extern/solid/include/MT_Interval.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_INTERVAL_H
-#define MT_INTERVAL_H
-
-#include <MT/Interval.h>
-
-#include "MT_Scalar.h"
-
-typedef MT::Interval<MT_Scalar> MT_Interval;
-
-#endif
diff --git a/extern/solid/include/MT_Matrix3x3.h b/extern/solid/include/MT_Matrix3x3.h
deleted file mode 100644
index f7572f90fa2..00000000000
--- a/extern/solid/include/MT_Matrix3x3.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_MATRIX3X3_H
-#define MT_MATRIX3X3_H
-
-#include "MT_Scalar.h"
-#include <MT/Matrix3x3.h>
-
-typedef MT::Matrix3x3<MT_Scalar> MT_Matrix3x3;
-
-
-
-#endif
diff --git a/extern/solid/include/MT_Point3.h b/extern/solid/include/MT_Point3.h
deleted file mode 100644
index ca84f652b65..00000000000
--- a/extern/solid/include/MT_Point3.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_POINT3_H
-#define MT_POINT3_H
-
-#include "MT_Vector3.h"
-
-typedef MT_Vector3 MT_Point3;
-
-#endif
diff --git a/extern/solid/include/MT_Quaternion.h b/extern/solid/include/MT_Quaternion.h
deleted file mode 100644
index ca860db711c..00000000000
--- a/extern/solid/include/MT_Quaternion.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_QUATERNION_H
-#define MT_QUATERNION_H
-
-#include "MT_Scalar.h"
-#include <MT/Quaternion.h>
-
-typedef MT::Quaternion<MT_Scalar> MT_Quaternion;
-
-#endif
-
-
-
diff --git a/extern/solid/include/MT_Scalar.h b/extern/solid/include/MT_Scalar.h
deleted file mode 100644
index 663a1f1839c..00000000000
--- a/extern/solid/include/MT_Scalar.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_SCALAR_H
-#define MT_SCALAR_H
-
-#if defined (__sun__) || defined ( __sun ) || defined (__sparc) || defined (__sparc__) || defined (__sgi)
-#include <math.h>
-#include <float.h>
-#else
-#include <cmath>
-#include <cstdlib>
-#include <cfloat>
-#endif
-
-#undef max
-
-#include "SOLID_types.h"
-
-#include "GEN_MinMax.h"
-#include "GEN_random.h"
-
-template <typename Scalar>
-struct Scalar_traits {};
-
-template<>
-struct Scalar_traits<float> {
- static float TwoTimesPi() { return 6.283185307179586232f; }
- static float epsilon() { return FLT_EPSILON; }
- static float max() { return FLT_MAX; }
-
- static float random() { return float(GEN_rand()) / float(GEN_RAND_MAX); }
-#if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__)
- static float sqrt(float x) { return ::sqrt(x); }
- static float abs(float x) { return ::fabs(x); }
-
- static float cos(float x) { return ::cos(x); }
- static float sin(float x) { return ::sin(x); }
- static float tan(float x) { return ::tan(x); }
-
- static float acos(float x) { return ::acos(x); }
- static float asin(float x) { return ::asin(x); }
- static float atan(float x) { return ::atan(x); }
- static float atan2(float x, float y) { return ::atan2(x, y); }
-
- static float exp(float x) { return ::exp(x); }
- static float log(float x) { return ::log(x); }
- static float pow(float x, float y) { return ::pow(x, y); }
-
-#else
- static float sqrt(float x) { return ::sqrtf(x); }
- static float abs(float x) { return ::fabsf(x); }
-
- static float cos(float x) { return ::cosf(x); }
- static float sin(float x) { return ::sinf(x); }
- static float tan(float x) { return ::tanf(x); }
-
- static float acos(float x) { return ::acosf(x); }
- static float asin(float x) { return ::asinf(x); }
- static float atan(float x) { return ::atanf(x); }
- static float atan2(float x, float y) { return ::atan2f(x, y); }
-
- static float exp(float x) { return ::expf(x); }
- static float log(float x) { return ::logf(x); }
- static float pow(float x, float y) { return ::powf(x, y); }
-#endif
-};
-
-template<>
-struct Scalar_traits<double> {
- static double TwoTimesPi() { return 6.283185307179586232; }
- static double epsilon() { return DBL_EPSILON; }
- static double max() { return DBL_MAX; }
-
- static double random() { return double(GEN_rand()) / double(GEN_RAND_MAX); }
- static double sqrt(double x) { return ::sqrt(x); }
- static double abs(double x) { return ::fabs(x); }
-
- static double cos(double x) { return ::cos(x); }
- static double sin(double x) { return ::sin(x); }
- static double tan(double x) { return ::tan(x); }
-
- static double acos(double x) { return ::acos(x); }
- static double asin(double x) { return ::asin(x); }
- static double atan(double x) { return ::atan(x); }
- static double atan2(double x, double y) { return ::atan2(x, y); }
-
- static double exp(double x) { return ::exp(x); }
- static double log(double x) { return ::log(x); }
- static double pow(double x, double y) { return ::pow(x, y); }
-};
-
-#ifdef USE_TRACER
-#include "MT_ScalarTracer.h"
-
-#ifdef USE_DOUBLES
-typedef MT_ScalarTracer<double> MT_Scalar;
-#else
-typedef MT_ScalarTracer<float> MT_Scalar;
-#endif
-
-#else
-
-#ifdef USE_DOUBLES
-typedef double MT_Scalar;
-#else
-typedef float MT_Scalar;
-#endif
-
-#endif
-
-
-const MT_Scalar MT_2_PI = Scalar_traits<MT_Scalar>::TwoTimesPi();
-const MT_Scalar MT_PI = MT_2_PI * MT_Scalar(0.5);
-const MT_Scalar MT_HALF_PI = MT_2_PI * MT_Scalar(0.25);
-const MT_Scalar MT_RADS_PER_DEG = MT_2_PI / MT_Scalar(360.0);
-const MT_Scalar MT_DEGS_PER_RAD = MT_Scalar(360.0) / MT_2_PI;
-
-const MT_Scalar MT_EPSILON = Scalar_traits<MT_Scalar>::epsilon();
-const MT_Scalar MT_INFINITY = Scalar_traits<MT_Scalar>::max();
-
-inline MT_Scalar MT_random() { return Scalar_traits<MT_Scalar>::random(); }
-inline MT_Scalar MT_abs(MT_Scalar x) { return Scalar_traits<MT_Scalar>::abs(x); }
-inline MT_Scalar MT_sqrt(MT_Scalar x) { return Scalar_traits<MT_Scalar>::sqrt(x); }
-
-inline MT_Scalar MT_cos(MT_Scalar x) { return Scalar_traits<MT_Scalar>::cos(x); }
-inline MT_Scalar MT_sin(MT_Scalar x) { return Scalar_traits<MT_Scalar>::sin(x); }
-inline MT_Scalar MT_tan(MT_Scalar x) { return Scalar_traits<MT_Scalar>::tan(x); }
-
-inline MT_Scalar MT_acos(MT_Scalar x) { return Scalar_traits<MT_Scalar>::acos(x); }
-inline MT_Scalar MT_asin(MT_Scalar x) { return Scalar_traits<MT_Scalar>::asin(x); }
-inline MT_Scalar MT_atan(MT_Scalar x) { return Scalar_traits<MT_Scalar>::atan(x); }
-inline MT_Scalar MT_atan2(MT_Scalar x, MT_Scalar y) { return Scalar_traits<MT_Scalar>::atan2(x, y); }
-
-inline MT_Scalar MT_radians(MT_Scalar x) { return x * MT_RADS_PER_DEG; }
-inline MT_Scalar MT_degrees(MT_Scalar x) { return x * MT_DEGS_PER_RAD; }
-
-#endif
diff --git a/extern/solid/include/MT_Transform.h b/extern/solid/include/MT_Transform.h
deleted file mode 100644
index 66f92428054..00000000000
--- a/extern/solid/include/MT_Transform.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_TRANSFORM_H
-#define MT_TRANSFORM_H
-
-#include "MT_Scalar.h"
-#include <MT/Transform.h>
-
-typedef MT::Matrix3x3<MT_Scalar> MT_Matrix3x3;
-typedef MT::Transform<MT_Scalar> MT_Transform;
-
-#endif
-
-
-
-
-
diff --git a/extern/solid/include/MT_Vector3.h b/extern/solid/include/MT_Vector3.h
deleted file mode 100644
index d50e80dc287..00000000000
--- a/extern/solid/include/MT_Vector3.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_VECTOR3_H
-#define MT_VECTOR3_H
-
-#include "MT_Scalar.h"
-#include <MT/Vector3.h>
-
-typedef MT::Vector3<MT_Scalar> MT_Vector3;
-
-#ifdef CPU_CMP
-
-inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2)
-{
- const unsigned int *i1 = (const unsigned int *)&p1;
- const unsigned int *i2 = (const unsigned int *)&p2;
- return i1[0] == i2[0] && i1[1] == i2[1] && i1[2] == i2[2];
-}
-
-#else
-
-inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2)
-{
- return p1[0] == p2[0] && p1[1] == p2[1] && p1[2] == p2[2];
-}
-
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID.h b/extern/solid/include/SOLID.h
deleted file mode 100644
index 96d40f1ea6b..00000000000
--- a/extern/solid/include/SOLID.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_H
-#define SOLID_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- DT_DECLARE_HANDLE(DT_ObjectHandle);
- DT_DECLARE_HANDLE(DT_SceneHandle);
- DT_DECLARE_HANDLE(DT_ShapeHandle);
- DT_DECLARE_HANDLE(DT_VertexBaseHandle);
- DT_DECLARE_HANDLE(DT_RespTableHandle);
- DT_DECLARE_HANDLE(DT_ArchiveHandle);
-
- typedef unsigned int DT_ResponseClass;
-
- typedef enum DT_ResponseType {
- DT_NO_RESPONSE, /* No response (obsolete) */
- DT_BROAD_RESPONSE, /* Broad phase response is returned. */
- DT_SIMPLE_RESPONSE, /* No collision data */
- DT_WITNESSED_RESPONSE, /* A point common to both objects
- is returned as collision data
- */
- DT_DEPTH_RESPONSE /* The penetration depth is returned
- as collision data. The penetration depth
- is the shortest vector over which one
- object needs to be translated in order
- to bring the objects in touching contact.
- */
- } DT_ResponseType;
-
-/* For witnessed response, the following structure represents a common point. The world
- coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector.
-
- For depth response, the following structure represents the penetration depth.
- 'point1' en 'point2' are the witness points of the penetration depth in world coordinates.
- The penetration depth vector in world coordinates is represented by 'normal'.
-*/
-
- typedef struct DT_CollData {
- DT_Vector3 point1; /* Point in object1 in world coordinates */
- DT_Vector3 point2; /* Point in object2 in world coordinates */
- DT_Vector3 normal; /* point2 - point1 */
- } DT_CollData;
-
-/* A response callback is called by SOLID for each pair of collding objects. 'client-data'
- is a pointer to an arbitrary structure in the client application. The client objects are
- pointers to structures in the client application associated with the coliding objects.
- 'coll_data' is the collision data computed by SOLID.
-*/
-
- typedef DT_Bool (*DT_ResponseCallback)(void *client_data,
- void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data);
-
-/* Shape definition */
-
-
- extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z);
- extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height);
- extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height);
- extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius);
- extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point);
- extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target);
- extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
- extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-
- extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride);
- extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer);
-
- extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_EndComplexShape();
-
- extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase);
- extern DECLSPEC void DT_EndPolytope();
-
- extern DECLSPEC void DT_Begin();
- extern DECLSPEC void DT_End();
-
- extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex);
- extern DECLSPEC void DT_VertexIndex(DT_Index index);
-
- extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices);
- extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count);
-
- extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape);
-
-/* Object */
-
- extern DECLSPEC DT_ObjectHandle DT_CreateObject(
- void *client_object, /* pointer to object in client memory */
- DT_ShapeHandle shape /* the shape or geometry of the object */
- );
-
- extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object);
-
-
-
- extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position);
- extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation);
- extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling);
-
-/* The margin is an offset from the actual shape. The actual geometry of an
- object is the set of points whose distance to the transformed shape is at
- most the margin. During the lifetime of an object the margin can be
- modified.
-*/
-
- extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin);
-
-
-/* These commands assume a column-major 4x4 OpenGL matrix representation */
-
- extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m);
- extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m);
-
- extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m);
- extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m);
-
- extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max);
-
-
- extern DECLSPEC DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 v);
-/* This next command returns the distance between the objects. De returned
- closest points are given in world coordinates.
-*/
- extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2);
-
- extern DECLSPEC DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point);
-
- extern DECLSPEC DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2);
-
-/* Scene */
-
- extern DECLSPEC DT_SceneHandle DT_CreateScene();
- extern DECLSPEC void DT_DestroyScene(DT_SceneHandle scene);
-
- extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object);
- extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object);
-
-/* Note that objects can be assigned to multiple scenes! */
-
-/* Response */
-
-/* Response tables are defined independent of the scenes in which they are used.
- Multiple response tables can be used in one scene, and a response table
- can be shared among scenes.
-*/
- extern DECLSPEC DT_RespTableHandle DT_CreateRespTable();
- extern DECLSPEC void DT_DestroyRespTable(DT_RespTableHandle respTable);
-
-/* Responses are defined on (pairs of) response classes. Each response table
- maintains its set of response classes.
-*/
- extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable);
-
-/* To each object for which a response is defined in the response table a
- response class needs to be assigned.
-*/
-
- extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable,
- DT_ObjectHandle object,
- DT_ResponseClass responseClass);
-
- extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable,
- DT_ObjectHandle object);
-
- extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable,
- DT_ObjectHandle object1,
- DT_ObjectHandle object2,
- const DT_CollData *coll_data);
-
-/* For each pair of objects multiple responses can be defined. A response is a callback
- together with its response type and client data. */
-
-/* Responses can be defined for all pairs of response classes... */
- extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
-
- extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response);
-/* ...per response class... */
- extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
-
- extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response);
-
-/* ... and per pair of response classes...*/
- extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data);
- extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response);
-
-/* The next command calls the response callbacks for all intersecting pairs of objects in a scene.
- 'DT_Test' returns the number of pairs of objects for which callbacks have been called.
-*/
-
- extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable);
-
-/* Set the maximum relative error in the closest points and penetration depth
- computation. The default for `max_error' is 1.0e-3. Larger errors result
- in better performance. Non-positive error tolerances are ignored.
-*/
-
- extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error);
-
-/* Set the maximum tolerance on relative errors due to rounding. The default for `tol_error'
- is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small
- results in missed collisions. Non-positive error tolerances are ignored.
-*/
-
- extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error);
-
-
-/* This function returns the client pointer to the first object in a scene hit by the ray
- (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point
- on the object in local coordinates. 'normal' is the normal to the surface of the object in
- world coordinates. The ignore_client pointer is used to make one of the objects transparent.
-
- NB: Currently ray tests are implemented for spheres, boxes, and meshes only!!
-*/
-
- extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-/* Similar, only here a single object is tested and a boolean is returned */
-
- extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID_broad.h b/extern/solid/include/SOLID_broad.h
deleted file mode 100644
index 74e4214fa67..00000000000
--- a/extern/solid/include/SOLID_broad.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_BROAD_H
-#define SOLID_BROAD_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- DT_DECLARE_HANDLE(BP_SceneHandle);
- DT_DECLARE_HANDLE(BP_ProxyHandle);
-
- typedef void (*BP_Callback)(void *client_data,
- void *object1,
- void *object2);
-
- typedef bool (*BP_RayCastCallback)(void *client_data,
- void *object,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda);
-
- extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data,
- BP_Callback beginOverlap,
- BP_Callback endOverlap);
-
- extern DECLSPEC void BP_DestroyScene(BP_SceneHandle scene);
-
- extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene,
- void *object,
- const DT_Vector3 min,
- const DT_Vector3 max);
-
- extern DECLSPEC void BP_DestroyProxy(BP_SceneHandle scene,
- BP_ProxyHandle proxy);
-
- extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy,
- const DT_Vector3 min,
- const DT_Vector3 max);
-
- extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene,
- BP_RayCastCallback objectRayCast,
- void *client_data,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID_types.h b/extern/solid/include/SOLID_types.h
deleted file mode 100644
index 630594e447f..00000000000
--- a/extern/solid/include/SOLID_types.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_TYPES_H
-#define SOLID_TYPES_H
-
-#ifndef DECLSPEC
-# ifdef WIN32
-# define DECLSPEC __declspec(dllexport)
-# else
-# define DECLSPEC
-# endif
-#endif
-
-#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-
-
-typedef unsigned short DT_Index;
-typedef unsigned short DT_Count;
-typedef unsigned int DT_Size;
-typedef float DT_Scalar;
-typedef int DT_Bool;
-
-#define DT_FALSE 0
-#define DT_TRUE 1
-
-#define DT_CONTINUE 0
-#define DT_DONE 1
-
-typedef DT_Scalar DT_Vector3[3];
-typedef DT_Scalar DT_Quaternion[4];
-
-#endif
diff --git a/extern/solid/make/msvc_7_0/broad/broad.vcproj b/extern/solid/make/msvc_7_0/broad/broad.vcproj
deleted file mode 100644
index adb56424e60..00000000000
--- a/extern/solid/make/msvc_7_0/broad/broad.vcproj
+++ /dev/null
@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="broad"
- ProjectGUID="{0112CAD5-3584-412A-A2E5-1315A00437B4}"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\broad.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\broad.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\broad.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\broad.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\..\src\broad\BP_C-api.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_EndpointList.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Proxy.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Scene.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\src\broad\BP_Endpoint.h">
- </File>
- <File
- RelativePath="..\..\src\broad\BP_EndpointList.h">
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Proxy.h">
- </File>
- <File
- RelativePath="..\..\src\broad\BP_ProxyList.h">
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Scene.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_7_0/complex/complex.vcproj b/extern/solid/make/msvc_7_0/complex/complex.vcproj
deleted file mode 100644
index 2a895fa28d3..00000000000
--- a/extern/solid/make/msvc_7_0/complex/complex.vcproj
+++ /dev/null
@@ -1,252 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="complex"
- ProjectGUID="{B83C6BED-11EC-46C8-AFFA-121EEDE94373}"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\complex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\complex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\complex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\complex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\..\src\complex\DT_BBoxTree.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\complex\DT_Complex.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\src\complex\DT_BBoxTree.h">
- </File>
- <File
- RelativePath="..\..\src\complex\DT_CBox.h">
- </File>
- <File
- RelativePath="..\..\src\complex\DT_Complex.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_7_0/convex/convex.vcproj b/extern/solid/make/msvc_7_0/convex/convex.vcproj
deleted file mode 100644
index da088b5972f..00000000000
--- a/extern/solid/make/msvc_7_0/convex/convex.vcproj
+++ /dev/null
@@ -1,337 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="convex"
- ProjectGUID="{524264F4-DF21-4B79-847F-E7CA643ECD0B}"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\convex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\convex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\convex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\convex.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\..\src\convex\DT_Accuracy.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Box.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cone.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Convex.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cylinder.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Facet.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_LineSegment.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_PenDepth.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Point.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polyhedron.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polytope.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Sphere.cpp">
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Triangle.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\src\convex\DT_Accuracy.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Array.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Box.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cone.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Convex.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cylinder.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Facet.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_GJK.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Hull.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_IndexArray.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_LineSegment.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Minkowski.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_PenDepth.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Point.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polyhedron.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polytope.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Shape.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Sphere.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Transform.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Triangle.h">
- </File>
- <File
- RelativePath="..\..\src\convex\DT_VertexBase.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_7_0/solid.vcproj b/extern/solid/make/msvc_7_0/solid.vcproj
deleted file mode 100644
index d9e6332987c..00000000000
--- a/extern/solid/make/msvc_7_0/solid.vcproj
+++ /dev/null
@@ -1,462 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="solid"
- ProjectGUID="{D696C86B-0B53-4471-A50D-5B983A6FA4AD}"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\debug\solid.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\solid.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\solid.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\solid.lib"
- SuppressStartupBanner="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
-IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID
-ECHO Done
-"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\src\DT_C-api.cpp">
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.cpp">
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Object.cpp">
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.cpp">
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.cpp">
- <FileConfiguration
- Name="Blender Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\src\DT_AlgoTable.h">
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.h">
- </File>
- <File
- RelativePath="..\..\src\DT_Object.h">
- </File>
- <File
- RelativePath="..\..\src\DT_Response.h">
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.h">
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/broad/broad.vcproj b/extern/solid/make/msvc_9_0/broad/broad.vcproj
deleted file mode 100644
index c58cb08b2c3..00000000000
--- a/extern/solid/make/msvc_9_0/broad/broad.vcproj
+++ /dev/null
@@ -1,369 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_broad"
- ProjectGUID="{0112CAD5-3584-412A-A2E5-1315A00437B4}"
- RootNamespace="broad"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad"
- 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="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\broad.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\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="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\broad.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\solid\broad\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\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="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- 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\broad.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\solid\broad\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\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="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\broad.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"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\broad\BP_C-api.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_EndpointList.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Proxy.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Scene.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\broad\BP_Endpoint.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_EndpointList.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Proxy.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_ProxyList.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Scene.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/complex/complex.vcproj b/extern/solid/make/msvc_9_0/complex/complex.vcproj
deleted file mode 100644
index 1828c489fc6..00000000000
--- a/extern/solid/make/msvc_9_0/complex/complex.vcproj
+++ /dev/null
@@ -1,355 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_complex"
- ProjectGUID="{B83C6BED-11EC-46C8-AFFA-121EEDE94373}"
- RootNamespace="complex"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex"
- 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="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\complex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\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="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\complex.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\solid\complex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\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="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- 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\complex.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\solid\complex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\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="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\complex.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"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\complex\DT_BBoxTree.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\complex\DT_Complex.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\complex\DT_BBoxTree.h"
- >
- </File>
- <File
- RelativePath="..\..\src\complex\DT_CBox.h"
- >
- </File>
- <File
- RelativePath="..\..\src\complex\DT_Complex.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/convex/convex.vcproj b/extern/solid/make/msvc_9_0/convex/convex.vcproj
deleted file mode 100644
index cb35a0ea199..00000000000
--- a/extern/solid/make/msvc_9_0/convex/convex.vcproj
+++ /dev/null
@@ -1,469 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_convex"
- ProjectGUID="{524264F4-DF21-4B79-847F-E7CA643ECD0B}"
- RootNamespace="convex"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\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="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\convex.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\solid\convex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex"
- 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="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\convex.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\solid\convex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\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="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- 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\convex.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\solid\convex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\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="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\convex.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"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\convex\DT_Accuracy.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Box.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cone.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Convex.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cylinder.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Facet.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_LineSegment.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_PenDepth.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Point.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polyhedron.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polytope.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Sphere.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Triangle.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\convex\DT_Accuracy.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Array.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Box.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cone.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Convex.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cylinder.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Facet.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_GJK.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Hull.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_IndexArray.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_LineSegment.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Minkowski.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_PenDepth.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Point.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polyhedron.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polytope.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Shape.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Sphere.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Transform.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Triangle.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_VertexBase.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/solid.vcproj b/extern/solid/make/msvc_9_0/solid.vcproj
deleted file mode 100644
index ed81c374696..00000000000
--- a/extern/solid/make/msvc_9_0/solid.vcproj
+++ /dev/null
@@ -1,595 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_solid"
- ProjectGUID="{D696C86B-0B53-4471-A50D-5B983A6FA4AD}"
- RootNamespace="solid"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\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="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid"
- 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="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\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="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- 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\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\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="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- 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\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\src\DT_C-api.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Object.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\DT_AlgoTable.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Object.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Response.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/src/DT_AlgoTable.h b/extern/solid/src/DT_AlgoTable.h
deleted file mode 100644
index 0749ca7fdd9..00000000000
--- a/extern/solid/src/DT_AlgoTable.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ALGOTABLE_H
-#define DT_ALGOTABLE_H
-
-#include "DT_Shape.h"
-
-template <typename Function, int NUM_TYPES = 8>
-class AlgoTable {
-public:
- void addEntry(DT_ShapeType type1, DT_ShapeType type2, Function function)
- {
- table[type2][type1] = function;
- table[type1][type2] = function;
- }
-
- Function lookup(DT_ShapeType type1, DT_ShapeType type2) const
- {
- return table[type1][type2];
- }
-
-private:
- Function table[NUM_TYPES][NUM_TYPES];
-};
-
-#endif
diff --git a/extern/solid/src/DT_C-api.cpp b/extern/solid/src/DT_C-api.cpp
deleted file mode 100644
index ac16deda87d..00000000000
--- a/extern/solid/src/DT_C-api.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-
-#include "SOLID.h"
-
-#include "DT_Box.h"
-#include "DT_Cone.h"
-#include "DT_Cylinder.h"
-#include "DT_Sphere.h"
-#include "DT_Complex.h"
-#include "DT_Polytope.h"
-#include "DT_Polyhedron.h"
-#include "DT_Point.h"
-#include "DT_LineSegment.h"
-#include "DT_Triangle.h"
-#include "DT_Minkowski.h"
-#include "DT_Hull.h"
-
-#include "DT_Response.h"
-#include "DT_RespTable.h"
-
-#include "DT_Scene.h"
-#include "DT_Object.h"
-
-#include "DT_VertexBase.h"
-
-#include "DT_Accuracy.h"
-
-typedef MT::Tuple3<DT_Scalar> T_Vertex;
-typedef std::vector<T_Vertex> T_VertexBuf;
-typedef std::vector<DT_Index> T_IndexBuf;
-typedef std::vector<const DT_Convex *> T_PolyList;
-
-static T_VertexBuf vertexBuf;
-static T_IndexBuf indexBuf;
-static T_PolyList polyList;
-
-static DT_Complex *currentComplex = 0;
-static DT_Polyhedron *currentPolyhedron = 0;
-static DT_VertexBase *currentBase = 0;
-
-
-
-
-
-
-DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride)
-{
- return (DT_VertexBaseHandle)new DT_VertexBase(pointer, stride);
-}
-
-void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase)
-{
- delete (DT_VertexBase *)vertexBase;
-}
-
-void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer)
-{
- DT_VertexBase *base = (DT_VertexBase *)vertexBase;
- base->setPointer(pointer);
- const DT_ComplexList& complexList = base->getComplexList();
- DT_ComplexList::const_iterator it;
- for (it = complexList.begin(); it != complexList.end(); ++it)
- {
- (*it)->refit();
- }
-}
-
-
-DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z)
-{
- return (DT_ShapeHandle)new DT_Box(MT_Scalar(x) * MT_Scalar(0.5),
- MT_Scalar(y) * MT_Scalar(0.5),
- MT_Scalar(z) * MT_Scalar(0.5));
-}
-
-DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height)
-{
- return (DT_ShapeHandle)new DT_Cone(MT_Scalar(radius), MT_Scalar(height));
-}
-
-DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height)
-{
- return (DT_ShapeHandle)new DT_Cylinder(MT_Scalar(radius), MT_Scalar(height));
-}
-
-DT_ShapeHandle DT_NewSphere(DT_Scalar radius)
-{
- return (DT_ShapeHandle)new DT_Sphere(MT_Scalar(radius));
-}
-
-DT_ShapeHandle DT_NewPoint(const DT_Vector3 point)
-{
- return (DT_ShapeHandle)new DT_Point(MT_Point3(point));
-}
-
-DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target)
-{
- return (DT_ShapeHandle)new DT_LineSegment(MT_Point3(source), MT_Point3(target));
-}
-
-DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2)
-{
- if (((DT_Shape *)shape1)->getType() != CONVEX ||
- ((DT_Shape *)shape2)->getType() != CONVEX)
- {
- return 0;
- }
-
- return (DT_ShapeHandle)new DT_Minkowski(*(DT_Convex *)shape1, *(DT_Convex *)shape2);
-}
-
-DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2)
-{
- if (((DT_Shape *)shape1)->getType() != CONVEX ||
- ((DT_Shape *)shape2)->getType() != CONVEX)
- {
- return 0;
- }
-
- return (DT_ShapeHandle)new DT_Hull(*(DT_Convex *)shape1, *(DT_Convex *)shape2);
-}
-
-DT_ShapeHandle DT_NewComplexShape(const DT_VertexBaseHandle vertexBase)
-{
- if (!currentComplex)
- {
- currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase;
- currentComplex = new DT_Complex(currentBase);
- }
- return (DT_ShapeHandle)currentComplex;
-}
-
-void DT_EndComplexShape()
-{
- if (currentComplex)
- {
- if (currentBase->getPointer() == 0)
- {
- T_Vertex *vertexArray = new T_Vertex[vertexBuf.size()];
- assert(vertexArray);
- std::copy(vertexBuf.begin(), vertexBuf.end(), &vertexArray[0]);
- currentBase->setPointer(vertexArray, true);
- }
-
- vertexBuf.clear();
-
- currentComplex->finish(polyList.size(), &polyList[0]);
- polyList.clear();
- currentComplex = 0;
- currentBase = 0;
- }
-}
-
-DT_ShapeHandle DT_NewPolytope(const DT_VertexBaseHandle vertexBase)
-{
- if (!currentPolyhedron)
- {
- currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase;
- currentPolyhedron = new DT_Polyhedron;
-
- }
- return (DT_ShapeHandle)currentPolyhedron;
-}
-
-void DT_EndPolytope()
-{
- if (currentPolyhedron)
- {
- if (currentBase->getPointer() == 0)
- {
- currentBase->setPointer(&vertexBuf[0]);
- new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]);
-
- delete currentBase;
- }
- else
- {
- new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]);
- }
- vertexBuf.clear();
- indexBuf.clear();
- currentPolyhedron = 0;
- currentBase = 0;
- }
-}
-
-void DT_Begin()
-{}
-
-void DT_End()
-{
- if (currentComplex)
- {
- DT_VertexIndices(indexBuf.size(), &indexBuf[0]);
- indexBuf.clear();
- }
-}
-
-void DT_Vertex(const DT_Vector3 vertex)
-{
- MT::Vector3<DT_Scalar> p(vertex);
- int i = GEN_max((int)vertexBuf.size() - 20, 0);
- int n = static_cast<int>(vertexBuf.size());
-
- while (i != n && !(vertexBuf[i] == p))
- {
- ++i;
- }
-
- if (i == n)
- {
- vertexBuf.push_back(p);
- }
- indexBuf.push_back(i);
-}
-
-
-void DT_VertexIndex(DT_Index index) { indexBuf.push_back(index); }
-
-void DT_VertexIndices(DT_Count count, const DT_Index *indices)
-{
- if (currentComplex)
- {
- DT_Convex *poly = count == 3 ?
- static_cast<DT_Convex *>(new DT_Triangle(currentBase, indices[0], indices[1], indices[2])) :
- static_cast<DT_Convex *>(new DT_Polytope(currentBase, count, indices));
- polyList.push_back(poly);
-
- }
-
- if (currentPolyhedron)
- {
- int i;
- for (i = 0; i < count; ++i)
- {
- indexBuf.push_back(indices[i]);
- }
- }
-}
-
-void DT_VertexRange(DT_Index first, DT_Count count)
-{
- DT_Index *indices = new DT_Index[count];
-
- DT_Index i;
- for (i = 0; i != count; ++i)
- {
- indices[i] = first + i;
- }
- DT_VertexIndices(count, indices);
-
- delete [] indices;
-}
-
-void DT_DeleteShape(DT_ShapeHandle shape)
-{
- delete (DT_Shape *)shape;
-}
-
-
-
-
-// Scene
-
-
-DT_SceneHandle DT_CreateScene()
-{
- return (DT_SceneHandle)new DT_Scene;
-}
-
-void DT_DestroyScene(DT_SceneHandle scene)
-{
- delete (DT_Scene *)scene;
-}
-
-void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object)
-{
- assert(scene);
- assert(object);
- ((DT_Scene *)scene)->addObject(*(DT_Object *)object);
-}
-
-void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object)
-{
- assert(scene);
- assert(object);
- ((DT_Scene *)scene)->removeObject(*(DT_Object *)object);
-}
-
-
-// Object instantiation
-
-
-DT_ObjectHandle DT_CreateObject(void *client_object,
- DT_ShapeHandle shape)
-{
- return (DT_ObjectHandle)new DT_Object(client_object, *(DT_Shape *)shape);
-}
-
-void DT_DestroyObject(DT_ObjectHandle object)
-{
- delete (DT_Object *)object;
-}
-
-void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin)
-{
- ((DT_Object *)object)->setMargin(MT_Scalar(margin));
-}
-
-
-void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling)
-{
- ((DT_Object *)object)->setScaling(MT_Vector3(scaling));
-}
-
-void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position)
-{
- ((DT_Object *)object)->setPosition(MT_Point3(position));
-}
-
-void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation)
-{
- ((DT_Object *)object)->setOrientation(MT_Quaternion(orientation));
-}
-
-
-void DT_SetMatrixf(DT_ObjectHandle object, const float *m)
-{
- ((DT_Object *)object)->setMatrix(m);
-}
-
-void DT_GetMatrixf(DT_ObjectHandle object, float *m)
-{
- ((DT_Object *)object)->getMatrix(m);
-}
-
-void DT_SetMatrixd(DT_ObjectHandle object, const double *m)
-{
- ((DT_Object *)object)->setMatrix(m);
-}
-void DT_GetMatrixd(DT_ObjectHandle object, double *m)
-{
- ((DT_Object *)object)->getMatrix(m);
-}
-
-void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max)
-{
- const MT_BBox& bbox = ((DT_Object *)object)->getBBox();
- bbox.getMin().getValue(min);
- bbox.getMax().getValue(max);
-}
-
-DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2, DT_Vector3 vec)
-{
- MT_Vector3 v;
- DT_Bool result = intersect(*(DT_Object*)object1, *(DT_Object*)object2, v);
- v.getValue(vec);
- return result;
-}
-
-DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2)
-{
- MT_Point3 p1, p2;
-
- MT_Scalar result = closest_points(*(DT_Object *)object1,
- *(DT_Object *)object2,
- p1, p2);
- p1.getValue(point1);
- p2.getValue(point2);
-
- return MT_sqrt(result);
-}
-
-DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point)
-{
- MT_Point3 p1, p2;
- MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- bool result = common_point(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2);
-
- if (result)
- {
- p1.getValue(point);
- }
-
- return result;
-}
-
-DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
- DT_Vector3 point1, DT_Vector3 point2)
-{
- MT_Point3 p1, p2;
- MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- bool result = penetration_depth(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2);
-
- if (result)
- {
- p1.getValue(point1);
- p2.getValue(point2);
- }
-
- return result;
-}
-
-// Response
-
-DT_RespTableHandle DT_CreateRespTable()
-{
- return (DT_RespTableHandle)new DT_RespTable;
-}
-
-void DT_DestroyRespTable(DT_RespTableHandle respTable)
-{
- delete (DT_RespTable *)respTable;
-}
-
-DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable)
-{
- return ((DT_RespTable *)respTable)->genResponseClass();
-}
-
-void DT_SetResponseClass(DT_RespTableHandle respTable, DT_ObjectHandle object,
- DT_ResponseClass responseClass)
-{
- ((DT_RespTable *)respTable)->setResponseClass(object, responseClass);
-}
-
-void DT_ClearResponseClass(DT_RespTableHandle respTable,
- DT_ObjectHandle object)
-{
- ((DT_RespTable *)respTable)->clearResponseClass(object);
-}
-
-void DT_CallResponse(DT_RespTableHandle respTable,
- DT_ObjectHandle object1,
- DT_ObjectHandle object2,
- const DT_CollData *coll_data)
-{
- const DT_ResponseList& responseList =
- ((DT_RespTable *)respTable)->find(object1, object2);
-
- if (responseList.getType() != DT_NO_RESPONSE)
- {
- responseList(((DT_Object *)object1)->getClientObject(),
- ((DT_Object *)object2)->getClientObject(),
- coll_data);
- }
-}
-
-
-void DT_AddDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data)
-{
- ((DT_RespTable *)respTable)->addDefault(DT_Response(response, type, client_data));
-}
-
-void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
- DT_ResponseCallback response)
-{
- ((DT_RespTable *)respTable)->removeDefault(DT_Response(response));
-}
-
-void DT_AddClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data)
-{
- ((DT_RespTable *)respTable)->addSingle(responseClass,
- DT_Response(response, type, client_data));
-}
-
-void DT_RemoveClassResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass,
- DT_ResponseCallback response)
-{
- ((DT_RespTable *)respTable)->removeSingle(responseClass,
- DT_Response(response));
-}
-
-void DT_AddPairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response,
- DT_ResponseType type, void *client_data)
-{
- ((DT_RespTable *)respTable)->addPair(responseClass1, responseClass2,
- DT_Response(response, type, client_data));
-}
-
-void DT_RemovePairResponse(DT_RespTableHandle respTable,
- DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- DT_ResponseCallback response)
-{
- ((DT_RespTable *)respTable)->removePair(responseClass1, responseClass2,
- DT_Response(response));
-}
-
-
-// Runtime
-
-void DT_SetAccuracy(DT_Scalar max_error)
-{
- if (max_error > MT_Scalar(0.0))
- {
- DT_Accuracy::setAccuracy(MT_Scalar(max_error));
- }
-}
-
-void DT_SetTolerance(DT_Scalar tol_error)
-{
- if (tol_error > MT_Scalar(0.0))
- {
- DT_Accuracy::setTolerance(MT_Scalar(tol_error));
- }
-}
-
-DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable)
-{
- return ((DT_Scene *)scene)->handleCollisions((DT_RespTable *)respTable);
-}
-
-void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal)
-{
- DT_Scalar lambda = max_param;
-
- void *client_object = ((DT_Scene *)scene)->rayCast(ignore_client, source, target,
- lambda, normal);
- if (client_object)
- {
- *param = lambda;
- }
- return client_object;
-}
-
-DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar max_param, DT_Scalar *param, DT_Vector3 hit_normal)
-{
- MT_Scalar lambda = MT_Scalar(max_param);
- MT_Vector3 normal;
-
- bool result = ((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target),
- lambda, normal);
-
- if (result)
- {
- *param = lambda;
- normal.getValue(hit_normal);
- }
- return result;
-}
-
diff --git a/extern/solid/src/DT_Encounter.cpp b/extern/solid/src/DT_Encounter.cpp
deleted file mode 100644
index 36de33154a3..00000000000
--- a/extern/solid/src/DT_Encounter.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_RespTable.h"
-#include "DT_Encounter.h"
-#include "DT_Object.h"
-#include "GEN_MinMax.h"
-
-DT_Bool DT_Encounter::exactTest(const DT_RespTable *respTable, int& count) const
-{
- const DT_ResponseList& responseList = respTable->find(m_obj_ptr1, m_obj_ptr2);
-
- switch (responseList.getType())
- {
- case DT_BROAD_RESPONSE:
- return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ?
- responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) :
- responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0);
- case DT_SIMPLE_RESPONSE:
- if (intersect(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis))
- {
- ++count;
- return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ?
- responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) :
- responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0);
-
- }
- break;
- case DT_WITNESSED_RESPONSE: {
- MT_Point3 p1, p2;
-
- if (common_point(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2))
- {
- ++count;
- if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2))
- {
- DT_CollData coll_data;
-
- p1.getValue(coll_data.point1);
- p2.getValue(coll_data.point2);
-
- return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data);
- }
- else
- {
- DT_CollData coll_data;
-
- p1.getValue(coll_data.point2);
- p2.getValue(coll_data.point1);
-
- return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data);
- }
- }
- break;
- }
- case DT_DEPTH_RESPONSE: {
- MT_Point3 p1, p2;
-
- if (penetration_depth(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2))
- {
- ++count;
- if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2))
- {
- DT_CollData coll_data;
-
- p1.getValue(coll_data.point1);
- p2.getValue(coll_data.point2);
- (p2 - p1).getValue(coll_data.normal);
-
- return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data);
- }
- else
- {
- DT_CollData coll_data;
-
- p1.getValue(coll_data.point2);
- p2.getValue(coll_data.point1);
- (p1 - p2).getValue(coll_data.normal);
-
- return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data);
- }
- }
- break;
- }
- case DT_NO_RESPONSE:
- break;
- default:
- assert(false);
- }
- return DT_CONTINUE;
-}
diff --git a/extern/solid/src/DT_Encounter.h b/extern/solid/src/DT_Encounter.h
deleted file mode 100644
index f20ea3936b0..00000000000
--- a/extern/solid/src/DT_Encounter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ENCOUNTER_H
-#define DT_ENCOUNTER_H
-
-#include <set>
-
-#include "MT_Vector3.h"
-#include "DT_Object.h"
-#include "DT_Shape.h"
-
-class DT_RespTable;
-
-class DT_Encounter {
-public:
- DT_Encounter() {}
- DT_Encounter(DT_Object *obj_ptr1, DT_Object *obj_ptr2)
- : m_sep_axis(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0))
- {
- assert(obj_ptr1 != obj_ptr2);
- if (obj_ptr2->getType() < obj_ptr1->getType() ||
- (obj_ptr2->getType() == obj_ptr1->getType() &&
- obj_ptr2 < obj_ptr1))
- {
- m_obj_ptr1 = obj_ptr2;
- m_obj_ptr2 = obj_ptr1;
- }
- else
- {
- m_obj_ptr1 = obj_ptr1;
- m_obj_ptr2 = obj_ptr2;
- }
- }
-
- DT_Object *first() const { return m_obj_ptr1; }
- DT_Object *second() const { return m_obj_ptr2; }
- const MT_Vector3& separatingAxis() const { return m_sep_axis; }
-
- DT_Bool exactTest(const DT_RespTable *respTable, int& count) const;
-
-private:
- DT_Object *m_obj_ptr1;
- DT_Object *m_obj_ptr2;
- mutable MT_Vector3 m_sep_axis;
-};
-
-inline bool operator<(const DT_Encounter& a, const DT_Encounter& b)
-{
- return a.first() < b.first() ||
- (a.first() == b.first() && a.second() < b.second());
-}
-
-
-
-inline std::ostream& operator<<(std::ostream& os, const DT_Encounter& a) {
- return os << '(' << a.first() << ", " << a.second() << ')';
-}
-
-
-
-typedef std::set<DT_Encounter> DT_EncounterTable;
-
-#endif
diff --git a/extern/solid/src/DT_Object.cpp b/extern/solid/src/DT_Object.cpp
deleted file mode 100644
index ed43a7bdaf2..00000000000
--- a/extern/solid/src/DT_Object.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Object.h"
-#include "DT_AlgoTable.h"
-#include "DT_Convex.h"
-#include "DT_Complex.h"
-#include "DT_LineSegment.h"
-#include "DT_Transform.h"
-#include "DT_Minkowski.h"
-#include "DT_Sphere.h"
-
-void DT_Object::setBBox()
-{
- m_bbox = m_shape.bbox(m_xform, m_margin);
- DT_Vector3 min, max;
- m_bbox.getMin().getValue(min);
- m_bbox.getMax().getValue(max);
-
- T_ProxyList::const_iterator it;
- for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
- {
- BP_SetBBox(*it, min, max);
- }
-}
-
-bool DT_Object::ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& lambda, MT_Vector3& normal) const
-{
- MT_Transform inv_xform = m_xform.inverse();
- MT_Point3 local_source = inv_xform(source);
- MT_Point3 local_target = inv_xform(target);
- MT_Vector3 local_normal;
-
- bool result = m_shape.ray_cast(local_source, local_target, lambda, local_normal);
-
- if (result)
- {
- normal = local_normal * inv_xform.getBasis();
- MT_Scalar len = normal.length();
- if (len > MT_Scalar(0.0))
- {
- normal /= len;
- }
- }
-
- return result;
-}
-
-
-typedef AlgoTable<Intersect> IntersectTable;
-typedef AlgoTable<Common_point> Common_pointTable;
-typedef AlgoTable<Penetration_depth> Penetration_depthTable;
-typedef AlgoTable<Closest_points> Closest_pointsTable;
-
-
-bool intersectConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v)
-{
- DT_Transform ta(a2w, (const DT_Convex&)a);
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return intersect((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v);
-}
-
-bool intersectComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v)
-{
- if (a.getType() == COMPLEX)
- {
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return intersect((const DT_Complex&)a, a2w, a_margin,
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v);
- }
-
- bool r = intersectComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v);
- v *= -1.;
- return r;
-}
-
-bool intersectComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v)
-{
- return intersect((const DT_Complex&)a, a2w, a_margin,
- (const DT_Complex&)b, b2w, b_margin, v);
-}
-
-IntersectTable *intersectInitialize()
-{
- IntersectTable *p = new IntersectTable;
- p->addEntry(COMPLEX, COMPLEX, intersectComplexComplex);
- p->addEntry(COMPLEX, CONVEX, intersectComplexConvex);
- p->addEntry(CONVEX, CONVEX, intersectConvexConvex);
- return p;
-}
-
-bool intersect(const DT_Object& a, const DT_Object& b, MT_Vector3& v)
-{
- static IntersectTable *intersectTable = intersectInitialize();
- Intersect intersect = intersectTable->lookup(a.getType(), b.getType());
- return intersect(a.m_shape, a.m_xform, a.m_margin,
- b.m_shape, b.m_xform, b.m_margin, v);
-}
-
-bool common_pointConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta(a2w, (const DT_Convex&)a);
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return common_point((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v, pa, pb);
-}
-
-bool common_pointComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- if (a.getType() == COMPLEX)
- {
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return common_point((const DT_Complex&)a, a2w, a_margin,
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v, pa, pb);
- }
-
- bool r = common_pointComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa);
- v *= -1.;
- return r;
-}
-
-bool common_pointComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- return common_point((const DT_Complex&)a, a2w, a_margin,
- (const DT_Complex&)b, b2w, b_margin, v, pa, pb);
-}
-
-Common_pointTable *common_pointInitialize()
-{
- Common_pointTable *p = new Common_pointTable;
- p->addEntry(COMPLEX, COMPLEX, common_pointComplexComplex);
- p->addEntry(COMPLEX, CONVEX, common_pointComplexConvex);
- p->addEntry(CONVEX, CONVEX, common_pointConvexConvex);
- return p;
-}
-
-bool common_point(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- static Common_pointTable *common_pointTable = common_pointInitialize();
- Common_point common_point = common_pointTable->lookup(a.getType(), b.getType());
- return common_point(a.m_shape, a.m_xform, a.m_margin,
- b.m_shape, b.m_xform, b.m_margin, v, pa, pb);
-}
-
-
-
-bool penetration_depthConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- return hybrid_penetration_depth(DT_Transform(a2w, (const DT_Convex&)a), a_margin,
- DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb);
-}
-
-bool penetration_depthComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- if (a.getType() == COMPLEX)
- return penetration_depth((const DT_Complex&)a, a2w, a_margin,
- DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb);
-
- bool r = penetration_depthComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa);
- v *= -1.;
- return r;
-}
-
-bool penetration_depthComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- return penetration_depth((const DT_Complex&)a, a2w, a_margin, (const DT_Complex&)b, b2w, b_margin, v, pa, pb);
-}
-
-Penetration_depthTable *penetration_depthInitialize()
-{
- Penetration_depthTable *p = new Penetration_depthTable;
- p->addEntry(COMPLEX, COMPLEX, penetration_depthComplexComplex);
- p->addEntry(COMPLEX, CONVEX, penetration_depthComplexConvex);
- p->addEntry(CONVEX, CONVEX, penetration_depthConvexConvex);
- return p;
-}
-
-bool penetration_depth(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- static Penetration_depthTable *penetration_depthTable = penetration_depthInitialize();
- Penetration_depth penetration_depth = penetration_depthTable->lookup(a.getType(), b.getType());
- return penetration_depth(a.m_shape, a.m_xform, a.m_margin,
- b.m_shape, b.m_xform, b.m_margin, v, pa, pb);
-}
-
-
-MT_Scalar closest_pointsConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta(a2w, (const DT_Convex&)a);
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return closest_points((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), MT_INFINITY, pa, pb);
-}
-
-MT_Scalar closest_pointsComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3& pa, MT_Point3& pb)
-{
- if (a.getType() == COMPLEX)
- {
- DT_Transform tb(b2w, (const DT_Convex&)b);
- return closest_points((const DT_Complex&)a, a2w, a_margin,
- (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), pa, pb);
- }
-
- return closest_pointsComplexConvex(b, b2w, b_margin, a, a2w, a_margin, pb, pa);
-}
-
-MT_Scalar closest_pointsComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3& pa, MT_Point3& pb)
-{
- return closest_points((const DT_Complex&)a, a2w, a_margin,
- (const DT_Complex&)b, b2w, b_margin, pa, pb);
-}
-
-Closest_pointsTable *closest_pointsInitialize()
-{
- Closest_pointsTable *p = new Closest_pointsTable;
- p->addEntry(COMPLEX, COMPLEX, closest_pointsComplexComplex);
- p->addEntry(COMPLEX, CONVEX, closest_pointsComplexConvex);
- p->addEntry(CONVEX, CONVEX, closest_pointsConvexConvex);
- return p;
-}
-
-MT_Scalar closest_points(const DT_Object& a, const DT_Object& b,
- MT_Point3& pa, MT_Point3& pb)
-{
- static Closest_pointsTable *closest_pointsTable = closest_pointsInitialize();
- Closest_points closest_points = closest_pointsTable->lookup(a.getType(), b.getType());
- return closest_points(a.m_shape, a.m_xform, a.m_margin,
- b.m_shape, b.m_xform, b.m_margin, pa, pb);
-}
-
diff --git a/extern/solid/src/DT_Object.h b/extern/solid/src/DT_Object.h
deleted file mode 100644
index 78beee2ab57..00000000000
--- a/extern/solid/src/DT_Object.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_OBJECT_H
-#define DT_OBJECT_H
-
-#include <vector>
-
-#include "SOLID.h"
-#include "SOLID_broad.h"
-
-#include "MT_Transform.h"
-#include "MT_Quaternion.h"
-#include "MT_BBox.h"
-#include "DT_Shape.h"
-
-class DT_Convex;
-
-class DT_Object {
-public:
- DT_Object(void *client_object, const DT_Shape& shape) :
- m_client_object(client_object),
- m_shape(shape),
- m_margin(MT_Scalar(0.0))
- {
- m_xform.setIdentity();
- setBBox();
- }
-
- void setMargin(MT_Scalar margin)
- {
- m_margin = margin;
- setBBox();
- }
-
- void setScaling(const MT_Vector3& scaling)
- {
- m_xform.scale(scaling);
- setBBox();
- }
-
- void setPosition(const MT_Point3& pos)
- {
- m_xform.setOrigin(pos);
- setBBox();
- }
-
- void setOrientation(const MT_Quaternion& orn)
- {
- m_xform.setRotation(orn);
- setBBox();
- }
-
- void setMatrix(const float *m)
- {
- m_xform.setValue(m);
- assert(m_xform.getBasis().determinant() != MT_Scalar(0.0));
- setBBox();
- }
-
- void setMatrix(const double *m)
- {
- m_xform.setValue(m);
- assert(m_xform.getBasis().determinant() != MT_Scalar(0.0));
- setBBox();
- }
-
- void getMatrix(float *m) const
- {
- m_xform.getValue(m);
- }
-
- void getMatrix(double *m) const
- {
- m_xform.getValue(m);
- }
-
- void setBBox();
-
- const MT_BBox& getBBox() const { return m_bbox; }
-
- DT_ResponseClass getResponseClass() const { return m_responseClass; }
-
- void setResponseClass(DT_ResponseClass responseClass)
- {
- m_responseClass = responseClass;
- }
-
- DT_ShapeType getType() const { return m_shape.getType(); }
-
- void *getClientObject() const { return m_client_object; }
-
- bool ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const;
-
- void addProxy(BP_ProxyHandle proxy) { m_proxies.push_back(proxy); }
-
- void removeProxy(BP_ProxyHandle proxy)
- {
- T_ProxyList::iterator it = std::find(m_proxies.begin(), m_proxies.end(), proxy);
- if (it != m_proxies.end()) {
- m_proxies.erase(it);
- }
- }
-
-
- friend bool intersect(const DT_Object&, const DT_Object&, MT_Vector3& v);
-
- friend bool common_point(const DT_Object&, const DT_Object&, MT_Vector3&,
- MT_Point3&, MT_Point3&);
-
- friend bool penetration_depth(const DT_Object&, const DT_Object&,
- MT_Vector3&, MT_Point3&, MT_Point3&);
-
- friend MT_Scalar closest_points(const DT_Object&, const DT_Object&,
- MT_Point3&, MT_Point3&);
-
-private:
- typedef std::vector<BP_ProxyHandle> T_ProxyList;
-
- void *m_client_object;
- DT_ResponseClass m_responseClass;
- const DT_Shape& m_shape;
- MT_Scalar m_margin;
- MT_Transform m_xform;
- T_ProxyList m_proxies;
- MT_BBox m_bbox;
-};
-
-#endif
-
-
-
-
-
-
-
diff --git a/extern/solid/src/DT_RespTable.cpp b/extern/solid/src/DT_RespTable.cpp
deleted file mode 100644
index 20fbfc06aac..00000000000
--- a/extern/solid/src/DT_RespTable.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_RespTable.h"
-
-#include <assert.h>
-
-DT_ResponseList DT_RespTable::g_emptyResponseList;
-
-DT_RespTable::~DT_RespTable()
-{
- DT_ResponseClass i;
- for (i = 0; i < m_responseClass; ++i)
- {
- delete [] m_table[i];
- }
-}
-
-DT_ResponseClass DT_RespTable::genResponseClass()
-{
- DT_ResponseClass newClass = m_responseClass++;
- DT_ResponseList *newList = new DT_ResponseList[m_responseClass];
- assert(newList);
- m_table.push_back(newList);
- m_singleList.resize(m_responseClass);
- DT_ResponseClass i;
- for (i = 0; i < m_responseClass; ++i)
- {
- newList[i].append(m_default);
- newList[i].append(m_singleList[i]);
- }
- return newClass;
-}
-
-void DT_RespTable::setResponseClass(void *object,
- DT_ResponseClass responseClass)
-{
- assert(responseClass < m_responseClass);
- m_objectMap[object] = responseClass;
-}
-
-DT_ResponseClass DT_RespTable::getResponseClass(void *object) const
-{
- T_ObjectMap::const_iterator it = m_objectMap.find(object);
- assert(it != m_objectMap.end());
- return (*it).second;
-}
-
-void DT_RespTable::clearResponseClass(void *object)
-{
- m_objectMap.erase(object);
-}
-
-const DT_ResponseList& DT_RespTable::find(void *object1, void *object2) const
-{
- T_ObjectMap::const_iterator it = m_objectMap.find(object1);
- if (it != m_objectMap.end())
- {
- DT_ResponseClass responseClass1 = (*it).second;
- it = m_objectMap.find(object2);
- if (it != m_objectMap.end())
- {
- DT_ResponseClass responseClass2 = (*it).second;
- if (responseClass1 < responseClass2)
- {
- std::swap(responseClass1, responseClass2);
- }
- return m_table[responseClass1][responseClass2];
- }
- }
- return g_emptyResponseList;
-}
-
-void DT_RespTable::addDefault(const DT_Response& response)
-{
- m_default.addResponse(response);
- DT_ResponseClass i;
- for (i = 0; i < m_responseClass; ++i)
- {
- DT_ResponseClass j;
- for (j = 0; j <= i; ++j)
- {
- m_table[i][j].addResponse(response);
- }
- }
-}
-
-void DT_RespTable::removeDefault(const DT_Response& response)
-{
- m_default.removeResponse(response);
- DT_ResponseClass i;
- for (i = 0; i < m_responseClass; ++i)
- {
- DT_ResponseClass j;
- for (j = 0; j <= i; ++j)
- {
- m_table[i][j].removeResponse(response);
- }
- }
-}
-
-void DT_RespTable::addSingle(DT_ResponseClass responseClass,
- const DT_Response& response)
-{
- assert(responseClass < m_responseClass);
- m_singleList[responseClass].addResponse(response);
- DT_ResponseClass j;
- for (j = 0; j < responseClass; ++j)
- {
- m_table[responseClass][j].addResponse(response);
- }
-
- DT_ResponseClass i;
- for (i = responseClass; i < m_responseClass; ++i)
- {
- m_table[i][responseClass].addResponse(response);
- }
-}
-
-void DT_RespTable::removeSingle(DT_ResponseClass responseClass,
- const DT_Response& response)
-{
- assert(responseClass < m_responseClass);
- m_singleList[responseClass].removeResponse(response);
- DT_ResponseClass j;
- for (j = 0; j < responseClass; ++j)
- {
- m_table[responseClass][j].removeResponse(response);
- }
-
- DT_ResponseClass i;
- for (i = responseClass; i < m_responseClass; ++i)
- {
- m_table[i][responseClass].removeResponse(response);
- }
-}
-
-void DT_RespTable::addPair(DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- const DT_Response& response)
-{
- assert(responseClass1 < m_responseClass);
- assert(responseClass2 < m_responseClass);
- if (responseClass1 < responseClass2)
- {
- std::swap(responseClass1, responseClass2);
- }
- m_table[responseClass1][responseClass2].addResponse(response);
-}
-
-
-void DT_RespTable::removePair(DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- const DT_Response& response)
-{
- assert(responseClass1 < m_responseClass);
- assert(responseClass2 < m_responseClass);
- if (responseClass1 < responseClass2)
- {
- std::swap(responseClass1, responseClass2);
- }
- m_table[responseClass1][responseClass2].removeResponse(response);
-}
-
diff --git a/extern/solid/src/DT_RespTable.h b/extern/solid/src/DT_RespTable.h
deleted file mode 100644
index 9a17f562937..00000000000
--- a/extern/solid/src/DT_RespTable.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_RESPTABLE_H
-#define DT_RESPTABLE_H
-
-#include <algorithm>
-#include <vector>
-#include <list>
-#include <map>
-#include "GEN_MinMax.h"
-#include "DT_Response.h"
-
-class DT_ResponseList : public std::list<DT_Response> {
-public:
- DT_ResponseList() : m_type(DT_NO_RESPONSE) {}
-
- DT_ResponseType getType() const { return m_type; }
-
- void addResponse(const DT_Response& response)
- {
- if (response.getType() != DT_NO_RESPONSE)
- {
- push_back(response);
- GEN_set_max(m_type, response.getType());
- }
- }
-
- void removeResponse(const DT_Response& response)
- {
- iterator it = std::find(begin(), end(), response);
- if (it != end())
- {
- erase(it);
- m_type = DT_NO_RESPONSE;
- for (it = begin(); it != end(); ++it)
- {
- GEN_set_max(m_type, (*it).getType());
- }
- }
- }
-
- void append(const DT_ResponseList& responseList)
- {
- if (responseList.getType() != DT_NO_RESPONSE)
- {
- const_iterator it;
- for (it = responseList.begin(); it != responseList.end(); ++it)
- {
- addResponse(*it);
- }
- }
- }
-
- DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const
- {
- DT_Bool done = DT_CONTINUE;
- const_iterator it;
- for (it = begin(); !done && it != end(); ++it)
- {
- done = (*it)(a, b, coll_data);
- }
- return done;
- }
-
-private:
- DT_ResponseType m_type;
-};
-
-class DT_RespTable {
-private:
- typedef std::map<void *, DT_ResponseClass> T_ObjectMap;
- typedef std::vector<DT_ResponseList *> T_PairTable;
- typedef std::vector<DT_ResponseList> T_SingleList;
-
-public:
- DT_RespTable() : m_responseClass(0) {}
-
- ~DT_RespTable();
-
- DT_ResponseClass genResponseClass();
-
- void setResponseClass(void *object, DT_ResponseClass responseClass);
- DT_ResponseClass getResponseClass(void *object) const;
-
- void clearResponseClass(void *object);
-
- const DT_ResponseList& find(void *object1, void *object2) const;
-
- void addDefault(const DT_Response& response);
- void removeDefault(const DT_Response& response);
-
- void addSingle(DT_ResponseClass responseClass,
- const DT_Response& response);
- void removeSingle(DT_ResponseClass responseClass,
- const DT_Response& response);
-
- void addPair(DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- const DT_Response& response);
- void removePair(DT_ResponseClass responseClass1,
- DT_ResponseClass responseClass2,
- const DT_Response& response);
-
-private:
- static DT_ResponseList g_emptyResponseList;
-
- T_ObjectMap m_objectMap;
- DT_ResponseClass m_responseClass;
- T_PairTable m_table;
- T_SingleList m_singleList;
- DT_ResponseList m_default;
-};
-
-#endif
-
-
-
-
diff --git a/extern/solid/src/DT_Response.h b/extern/solid/src/DT_Response.h
deleted file mode 100644
index e58d9bb9944..00000000000
--- a/extern/solid/src/DT_Response.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_RESPONSE_H
-#define DT_RESPONSE_H
-
-#include "SOLID.h"
-
-class DT_Response {
-public:
- DT_Response(DT_ResponseCallback response = 0,
- DT_ResponseType type = DT_NO_RESPONSE,
- void *client_data = 0)
- : m_response(response),
- m_type(type),
- m_client_data(client_data) {}
-
- DT_ResponseType getType() const { return m_type; }
-
- DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const
- {
- return (*m_response)(m_client_data, a, b, coll_data);
- }
-
- friend bool operator==(const DT_Response& a, const DT_Response& b)
- {
- return a.m_response == b.m_response;
- }
-
- friend bool operator!=(const DT_Response& a, const DT_Response& b)
- {
- return a.m_response != b.m_response;
- }
-
-private:
- DT_ResponseCallback m_response;
- DT_ResponseType m_type;
- void *m_client_data;
-};
-
-#endif
-
-
diff --git a/extern/solid/src/DT_Scene.cpp b/extern/solid/src/DT_Scene.cpp
deleted file mode 100644
index 56cea1633ca..00000000000
--- a/extern/solid/src/DT_Scene.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Scene.h"
-#include "DT_Object.h"
-#include "DT_Convex.h"
-
-//#define DEBUG
-
-static void beginOverlap(void *client_data, void *object1, void *object2)
-{
- DT_Encounter e((DT_Object *)object1, (DT_Object *)object2);
- DT_EncounterTable *encounterTable = static_cast<DT_EncounterTable *>(client_data);
-
-#ifdef DEBUG
- std::cout << "Begin: " << e << std::endl;
-#endif
-
- encounterTable->insert(e);
-}
-
-
-static void endOverlap(void *client_data, void *object1, void *object2)
-{
- DT_Encounter e((DT_Object *)object1, (DT_Object *)object2);
- DT_EncounterTable *encounterTable = static_cast<DT_EncounterTable *>(client_data);
-
-#ifdef DEBUG
- std::cout << "End: " << e << std::endl;
-#endif
-
- assert(encounterTable->find(e) != encounterTable->end());
- encounterTable->erase(e);
-}
-
-struct DT_RayCastData {
- DT_RayCastData(const void *ignore)
- : m_ignore(ignore)
- {}
-
- const void *m_ignore;
- MT_Vector3 m_normal;
-};
-
-static bool objectRayCast(void *client_data,
- void *object,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda)
-{
- DT_RayCastData *data = static_cast<DT_RayCastData *>(client_data);
- if (((DT_Object *)object)->getClientObject() != data->m_ignore)
- {
- MT_Scalar param = MT_Scalar(*lambda);
-
- if (((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target),
- param, data->m_normal))
- {
- *lambda = param;
- return true;
- }
- }
- return false;
-}
-
-DT_Scene::DT_Scene()
- : m_broadphase(BP_CreateScene(&m_encounterTable, &beginOverlap, &endOverlap))
-{}
-
-DT_Scene::~DT_Scene()
-{
- BP_DestroyScene(m_broadphase);
-}
-
-void DT_Scene::addObject(DT_Object &object)
-{
- const MT_BBox& bbox = object.getBBox();
- DT_Vector3 min, max;
- bbox.getMin().getValue(min);
- bbox.getMax().getValue(max);
- BP_ProxyHandle proxy = BP_CreateProxy(m_broadphase, &object, min, max);
-
-#ifdef DEBUG
- DT_EncounterTable::iterator it;
- std::cout << "Add " << &object << ':';
- for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it) {
- std::cout << ' ' << (*it);
- }
- std::cout << std::endl;
-#endif
- object.addProxy(proxy);
- m_objectList.push_back(std::make_pair(&object, proxy));
-}
-
-
-
-void DT_Scene::removeObject(DT_Object& object)
-{
- T_ObjectList::iterator it = m_objectList.begin();
-
- while (it != m_objectList.end() && &object != (*it).first)
- {
- ++it;
- }
-
- if (it != m_objectList.end())
- {
- object.removeProxy((*it).second);
- BP_DestroyProxy(m_broadphase, (*it).second);
- m_objectList.erase(it);
-
-#ifdef DEBUG
- std::cout << "Remove " << &object << ':';
- DT_EncounterTable::iterator it;
- for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it)
- {
- std::cout << ' ' << (*it);
- assert((*it).first() != &object &&
- (*it).second() != &object);
- }
- std::cout << std::endl;
-#endif
- }
-}
-
-
-
-int DT_Scene::handleCollisions(const DT_RespTable *respTable)
-{
- int count = 0;
-
- assert(respTable);
-
- DT_EncounterTable::iterator it;
- for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it)
- {
- if ((*it).exactTest(respTable, count))
- {
- break;
- }
-
- }
- return count;
-}
-
-void *DT_Scene::rayCast(const void *ignore_client,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar& lambda, DT_Vector3 normal) const
-{
- DT_RayCastData data(ignore_client);
- DT_Object *object = (DT_Object *)BP_RayCast(m_broadphase,
- &objectRayCast,
- &data,
- source, target,
- &lambda);
- if (object)
- {
- data.m_normal.getValue(normal);
- return object->getClientObject();
- }
-
- return 0;
-}
diff --git a/extern/solid/src/DT_Scene.h b/extern/solid/src/DT_Scene.h
deleted file mode 100644
index 9b061910312..00000000000
--- a/extern/solid/src/DT_Scene.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SCENE_H
-#define DT_SCENE_H
-
-#include <vector>
-
-#include "SOLID_broad.h"
-#include "DT_Encounter.h"
-
-class DT_Object;
-class DT_RespTable;
-
-class DT_Scene {
-public:
- DT_Scene();
- ~DT_Scene();
-
- void addObject(DT_Object& object);
- void removeObject(DT_Object& object);
-
- int handleCollisions(const DT_RespTable *respTable);
-
- void *rayCast(const void *ignore_client,
- const DT_Vector3 source, const DT_Vector3 target,
- DT_Scalar& lambda, DT_Vector3 normal) const;
-
-private:
- typedef std::vector<std::pair<DT_Object *, BP_ProxyHandle> > T_ObjectList;
-
- BP_SceneHandle m_broadphase;
- T_ObjectList m_objectList;
- DT_EncounterTable m_encounterTable;
-};
-
-#endif
diff --git a/extern/solid/src/Makefile b/extern/solid/src/Makefile
deleted file mode 100644
index e8ef7a606c9..00000000000
--- a/extern/solid/src/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 *****
-#
-#
-
-SOURCEDIR = extern/solid/src
-LIBNAME = solid
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-DIRS = broad complex convex
-
-include nan_subdirs.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../include -I$(NAN_QHULL)/include
-CPPFLAGS += -Iconvex -Icomplex
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk
-
diff --git a/extern/solid/src/broad/BP_C-api.cpp b/extern/solid/src/broad/BP_C-api.cpp
deleted file mode 100644
index 43e1172927b..00000000000
--- a/extern/solid/src/broad/BP_C-api.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "SOLID_broad.h"
-
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-
-BP_SceneHandle BP_CreateScene(void *client_data,
- BP_Callback beginOverlap,
- BP_Callback endOverlap)
-{
- return (BP_SceneHandle)new BP_Scene(client_data,
- beginOverlap,
- endOverlap);
-}
-
-
-void BP_DestroyScene(BP_SceneHandle scene)
-{
- delete (BP_Scene *)scene;
-}
-
-
-BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, void *object,
- const DT_Vector3 min, const DT_Vector3 max)
-{
- return (BP_ProxyHandle)
- ((BP_Scene *)scene)->createProxy(object, min, max);
-}
-
-
-void BP_DestroyProxy(BP_SceneHandle scene, BP_ProxyHandle proxy)
-{
- ((BP_Scene *)scene)->destroyProxy((BP_Proxy *)proxy);
-}
-
-
-
-void BP_SetBBox(BP_ProxyHandle proxy, const DT_Vector3 min, const DT_Vector3 max)
-{
- ((BP_Proxy *)proxy)->setBBox(min, max);
-}
-
-void *BP_RayCast(BP_SceneHandle scene,
- BP_RayCastCallback objectRayCast,
- void *client_data,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar *lambda)
-{
- return ((BP_Scene *)scene)->rayCast(objectRayCast,
- client_data,
- source, target,
- *lambda);
-}
-
diff --git a/extern/solid/src/broad/BP_Endpoint.h b/extern/solid/src/broad/BP_Endpoint.h
deleted file mode 100644
index 8de6e67ce65..00000000000
--- a/extern/solid/src/broad/BP_Endpoint.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_ENDPOINT_H
-#define BP_ENDPOINT_H
-
-#include "SOLID_types.h"
-
-class BP_Proxy;
-
-class BP_Link {
-public:
- BP_Link() {}
- explicit BP_Link(BP_Proxy *proxy) :
- m_proxy(proxy)
- {}
-
- DT_Index m_index;
- DT_Count m_count;
- BP_Proxy *m_proxy;
-};
-
-typedef unsigned int Uint32;
-
-class BP_Endpoint {
-public:
- enum {
- MINIMUM = 0x00000000,
- MAXIMUM = 0x80000000,
- TYPEBIT = 0x00000001
- };
-
- BP_Endpoint() {}
- BP_Endpoint(DT_Scalar pos, Uint32 type, BP_Link *link)
- : m_link(link)
- {
- setPos(pos, type);
- }
-
- DT_Scalar getPos() const { return m_pos; }
- DT_Index& getIndex() const { return m_link->m_index; }
- DT_Count& getCount() const { return m_link->m_count; }
- BP_Proxy *getProxy() const { return m_link->m_proxy; }
-
- DT_Index getEndIndex() const { return (m_link + 1)->m_index; }
-
- Uint32 getType() const
- {
- return (m_bits & TYPEBIT) ? (~m_bits & MAXIMUM) : (m_bits & MAXIMUM);
- }
-
- void setPos(DT_Scalar pos, Uint32 type)
- {
- m_pos = pos;
- if ((m_bits & MAXIMUM) == type)
- {
- m_bits &= ~TYPEBIT;
- }
- else
- {
- m_bits |= TYPEBIT;
- }
- }
-
-private:
- union {
- DT_Scalar m_pos;
- Uint32 m_bits;
- };
- BP_Link *m_link;
-};
-
-inline bool operator<(const BP_Endpoint& a, const BP_Endpoint& b)
-{
- return a.getPos() < b.getPos();
-}
-
-#endif
-
-
-
-
-
-
-
-
-
-
diff --git a/extern/solid/src/broad/BP_EndpointList.cpp b/extern/solid/src/broad/BP_EndpointList.cpp
deleted file mode 100644
index aa094ffeb0a..00000000000
--- a/extern/solid/src/broad/BP_EndpointList.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include <float.h>
-#include <algorithm>
-
-#include "BP_EndpointList.h"
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-#include "BP_ProxyList.h"
-
-DT_Index BP_EndpointList::stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const
-{
- DT_Index result = std::upper_bound(begin(), end(), pos) - begin();
-
- if (result != 0)
- {
- DT_Index i = result - 1;
- DT_Count count = (*this)[i].getCount();
- while (count)
- {
- const BP_Endpoint& endpoint = (*this)[i];
- if (endpoint.getType() == BP_Endpoint::MINIMUM &&
- pos < (*this)[endpoint.getEndIndex()])
- {
- proxies.add(endpoint.getProxy());
- --count;
- }
- assert(i != 0 || count == 0);
- --i;
- }
- }
- return result;
-}
-
-DT_Scalar BP_EndpointList::nextLambda(DT_Index& index,
- DT_Scalar source,
- DT_Scalar delta) const
-{
- if (delta != 0.0f)
- {
- if (delta < 0.0f)
- {
- if (index != 0)
- {
- return ((*this)[--index].getPos() - source) / delta;
- }
- }
- else
- {
- if (index != size())
- {
- return ((*this)[index++].getPos() - source) / delta;
- }
- }
- }
- return FLT_MAX;
-}
-
-
-void BP_EndpointList::range(const BP_Endpoint& min,
- const BP_Endpoint& max,
- DT_Index& first, DT_Index& last,
- BP_ProxyList& proxies) const
-{
- first = stab(min, proxies);
- last = std::upper_bound(begin(), end(), max) - begin();
-
- DT_Index i;
- for (i = first; i != last; ++i)
- {
- const BP_Endpoint& endpoint = (*this)[i];
- if (endpoint.getType() == BP_Endpoint::MINIMUM)
- {
- proxies.add(endpoint.getProxy());
- }
- }
-}
-
-void BP_EndpointList::addInterval(const BP_Endpoint& min,
- const BP_Endpoint& max,
- BP_ProxyList& proxies)
-{
- assert(invariant());
- DT_Index first, last;
- range(min, max, first, last, proxies);
- insert(begin() + last, max);
- insert(begin() + first, min);
- ++last;
-
- (*this)[first].getCount() = first != 0 ? (*this)[first - 1].getCount() : 0;
- (*this)[last].getCount() = (*this)[last - 1].getCount();
-
-
- DT_Index i;
- for (i = first; i != last; ++i)
- {
- ++(*this)[i].getCount();
- (*this)[i].getIndex() = i;
- }
- for (; i != size(); ++i)
- {
- (*this)[i].getIndex() = i;
- }
-
- assert(invariant());
-}
-
-void BP_EndpointList::removeInterval(DT_Index first, DT_Index last,
- BP_ProxyList& proxies)
-{
- assert(invariant());
-
- BP_Endpoint min = (*this)[first];
- BP_Endpoint max = (*this)[last];
-
- erase(begin() + last);
- erase(begin() + first);
- --last;
-
- DT_Index i;
- for (i = first; i != last; ++i)
- {
- --(*this)[i].getCount();
- (*this)[i].getIndex() = i;
- }
- for (; i != size(); ++i)
- {
- (*this)[i].getIndex() = i;
- }
-
- range(min, max, first, last, proxies);
-
- assert(invariant());
-}
-
-void BP_EndpointList::move(DT_Index index, DT_Scalar pos, Uint32 type,
- BP_Scene& scene, T_Overlap overlap)
-{
- assert(invariant());
-
- BP_Endpoint endpoint = (*this)[index];
- DT_Scalar delta = pos - endpoint.getPos();
-
- if (delta != DT_Scalar(0.0))
- {
- endpoint.setPos(pos, type);
- if (delta < DT_Scalar(0.0))
- {
- while (index != 0 && endpoint < (*this)[index - 1])
- {
- (*this)[index] = (*this)[index - 1];
- (*this)[index].getIndex() = index;
- encounters((*this)[index], endpoint, scene, overlap);
- --index;
- }
- }
- else
- {
- DT_Index last = size() - 1;
- while (index != last && (*this)[index + 1] < endpoint)
- {
- (*this)[index] = (*this)[index + 1];
- (*this)[index].getIndex() = index;
- encounters(endpoint, (*this)[index], scene, overlap);
- ++index;
- }
- }
- (*this)[index] = endpoint;
- (*this)[index].getIndex() = index;
- }
-
- assert(invariant());
-}
-
-void BP_EndpointList::encounters(const BP_Endpoint& a, const BP_Endpoint& b,
- BP_Scene& scene, T_Overlap overlap)
-{
- assert(a.getProxy() != b.getProxy());
-
- if (a.getType() != b.getType())
- {
- if (a.getType() == BP_Endpoint::MAXIMUM)
- {
- if (overlap(*a.getProxy(), *b.getProxy()))
- {
- scene.callBeginOverlap(a.getProxy()->getObject(),
- b.getProxy()->getObject());
- }
- ++a.getCount();
- ++b.getCount();
- }
- else
- {
- if (overlap(*a.getProxy(), *b.getProxy()))
- {
- scene.callEndOverlap(a.getProxy()->getObject(),
- b.getProxy()->getObject());
- }
- --a.getCount();
- --b.getCount();
- }
- }
- else
- {
- if (a.getType() == BP_Endpoint::MAXIMUM)
- {
- --a.getCount();
- ++b.getCount();
- }
- else
- {
- ++a.getCount();
- --b.getCount();
- }
- }
-}
diff --git a/extern/solid/src/broad/BP_EndpointList.h b/extern/solid/src/broad/BP_EndpointList.h
deleted file mode 100644
index 6154991ed3d..00000000000
--- a/extern/solid/src/broad/BP_EndpointList.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_ENDPOINTLIST_H
-#define BP_ENDPOINTLIST_H
-
-//#define PARANOID
-
-#include <vector>
-
-#include "BP_Endpoint.h"
-#include "BP_ProxyList.h"
-
-class BP_Scene;
-
-typedef bool (*T_Overlap)(const BP_Proxy& a, const BP_Proxy& b);
-
-class BP_EndpointList : public std::vector<BP_Endpoint> {
-public:
- BP_EndpointList() {}
-
- DT_Index stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const;
-
- DT_Index stab(DT_Scalar pos, BP_ProxyList& proxies) const
- {
- return stab(BP_Endpoint(pos, BP_Endpoint::MINIMUM, 0), proxies);
- }
-
-
- void range(const BP_Endpoint& min, const BP_Endpoint& max,
- DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const;
-
- void range(DT_Scalar lb, DT_Scalar ub, DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const
- {
- range(BP_Endpoint(lb, BP_Endpoint::MINIMUM, 0),
- BP_Endpoint(ub, BP_Endpoint::MAXIMUM, 0),
- first, last, proxies);
- }
-
- void addInterval(const BP_Endpoint& min, const BP_Endpoint& max, BP_ProxyList& proxies);
- void removeInterval(DT_Index first, DT_Index last, BP_ProxyList& proxies);
-
- void move(DT_Index index, DT_Scalar pos, Uint32 type, BP_Scene& scene, T_Overlap overlap);
-
- DT_Scalar nextLambda(DT_Index& index, DT_Scalar source, DT_Scalar target) const;
-
-
-private:
- void encounters(const BP_Endpoint& a, const BP_Endpoint& b,
- BP_Scene& scene, T_Overlap overlap);
-
-
-#ifdef PARANOID
- bool invariant() const
- {
- DT_Count count = 0;
- DT_Index i;
- for (i = 0; i != size(); ++i)
- {
- const BP_Endpoint& endpoint = (*this)[i];
-
- if (endpoint.getType() == BP_Endpoint::MINIMUM)
- {
- ++count;
- }
- else
- {
- --count;
- }
- if (endpoint.getCount() != count)
- {
- return false;
- }
- if (endpoint.getIndex() != i)
- {
- return false;
- }
- }
- return true;
- }
-#else
- bool invariant() const { return true; }
-#endif
-
-};
-
-
-
-#endif
diff --git a/extern/solid/src/broad/BP_Proxy.cpp b/extern/solid/src/broad/BP_Proxy.cpp
deleted file mode 100644
index e8007df240d..00000000000
--- a/extern/solid/src/broad/BP_Proxy.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include <new>
-
-#include "BP_Proxy.h"
-#include "BP_Scene.h"
-
-BP_Proxy::BP_Proxy(void *object,
- BP_Scene& scene)
- : m_object(object),
- m_scene(scene)
-{
- int i;
- for (i = 0; i < 3; ++i)
- {
- new (&m_interval[i]) BP_Interval(this);
- }
-}
-
-void BP_Proxy::add(const DT_Vector3 min,
- const DT_Vector3 max,
- BP_ProxyList& proxies)
-{
- int i;
- for (i = 0; i < 3; ++i)
- {
- m_scene.getList(i).addInterval(
- BP_Endpoint(min[i], BP_Endpoint::MINIMUM, &m_interval[i].m_min),
- BP_Endpoint(max[i], BP_Endpoint::MAXIMUM, &m_interval[i].m_max),
- proxies);
- }
-}
-
-void BP_Proxy::remove(BP_ProxyList& proxies)
-{
- int i;
- for (i = 0; i < 3; ++i)
- {
- m_scene.getList(i).removeInterval(
- m_interval[i].m_min.m_index,
- m_interval[i].m_max.m_index,
- proxies);
- }
-}
-
-DT_Scalar BP_Proxy::getMin(int i) const
-{
- return m_scene.getList(i)[m_interval[i].m_min.m_index].getPos();
-}
-
-DT_Scalar BP_Proxy::getMax(int i) const
-{
- return m_scene.getList(i)[m_interval[i].m_max.m_index].getPos();
-}
-
-bool overlapXY(const BP_Proxy& a, const BP_Proxy& b)
-{
- return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) &&
- a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1);
-}
-
-bool overlapXZ(const BP_Proxy& a, const BP_Proxy& b)
-{
- return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) &&
- a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2);
-}
-
-bool overlapYZ(const BP_Proxy& a, const BP_Proxy& b)
-{
- return a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1) &&
- a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2);
-}
-
-void BP_Proxy::setBBox(const DT_Vector3 min, const DT_Vector3 max)
-{
- static T_Overlap overlap[3] = { overlapYZ, overlapXZ, overlapXY };
-
- int i;
- for (i = 0; i < 3; ++i)
- {
- if (min[i] > getMax(i))
- {
- m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i],
- BP_Endpoint::MAXIMUM, m_scene, overlap[i]);
- m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i],
- BP_Endpoint::MINIMUM, m_scene, overlap[i]);
- }
- else
- {
- m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i],
- BP_Endpoint::MINIMUM, m_scene, overlap[i]);
- m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i],
- BP_Endpoint::MAXIMUM, m_scene, overlap[i]);
- }
- }
-}
-
-
-
diff --git a/extern/solid/src/broad/BP_Proxy.h b/extern/solid/src/broad/BP_Proxy.h
deleted file mode 100644
index b4500ddca44..00000000000
--- a/extern/solid/src/broad/BP_Proxy.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_PROXY_H
-#define BP_PROXY_H
-
-#include "BP_Endpoint.h"
-#include "BP_ProxyList.h"
-
-class BP_Interval {
-public:
- BP_Interval() {}
- BP_Interval(BP_Proxy *proxy) :
- m_min(proxy),
- m_max(proxy)
- {}
-
- BP_Link m_min;
- BP_Link m_max;
-};
-
-class BP_Scene;
-
-class BP_Proxy {
-public:
- BP_Proxy(void *object, BP_Scene& scene);
-
- void add(const DT_Vector3 min,
- const DT_Vector3 max,
- BP_ProxyList& proxies);
-
- void remove(BP_ProxyList& proxies);
-
- void setBBox(const DT_Vector3 min, const DT_Vector3 max);
-
- void *getObject() { return m_object; }
-
- DT_Scalar getMin(int i) const;
- DT_Scalar getMax(int i) const;
-
-private:
- BP_Interval m_interval[3];
- void *m_object;
- BP_Scene& m_scene;
-};
-
-inline bool BP_overlap(const BP_Proxy *a, const BP_Proxy *b)
-{
- return a->getMin(0) <= b->getMax(0) && b->getMin(0) <= a->getMax(0) &&
- a->getMin(1) <= b->getMax(1) && b->getMin(1) <= a->getMax(1) &&
- a->getMin(2) <= b->getMax(2) && b->getMin(2) <= a->getMax(2);
-}
-
-#endif
-
-
-
-
diff --git a/extern/solid/src/broad/BP_ProxyList.h b/extern/solid/src/broad/BP_ProxyList.h
deleted file mode 100644
index 2f449777d2d..00000000000
--- a/extern/solid/src/broad/BP_ProxyList.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_PROXYLIST_H
-#define BP_PROXYLIST_H
-
-#include <assert.h>
-
-#include <vector>
-#include <algorithm>
-#include <utility>
-
-class BP_Proxy;
-
-typedef std::pair<BP_Proxy *, unsigned int> BP_ProxyEntry;
-
-inline bool operator<(const BP_ProxyEntry& a, const BP_ProxyEntry& b)
-{
- return a.first < b.first;
-}
-
-class BP_ProxyList : public std::vector<BP_ProxyEntry> {
-public:
- BP_ProxyList(size_t n = 20) : std::vector<BP_ProxyEntry>(n) {}
-
- iterator add(BP_Proxy *proxy)
- {
- BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0);
- iterator it = std::lower_bound(begin(), end(), entry);
- if (it == end() || (*it).first != proxy)
- {
- it = insert(it, entry);
- }
- ++(*it).second;
- return it;
- }
-
- void remove(BP_Proxy *proxy)
- {
- BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0);
- iterator it = std::lower_bound(begin(), end(), entry);
- if (it != end() && (*it).first == proxy && --(*it).second == 0)
- {
- erase(it);
- }
- }
-};
-
-#endif
diff --git a/extern/solid/src/broad/BP_Scene.cpp b/extern/solid/src/broad/BP_Scene.cpp
deleted file mode 100644
index c0cd83ba311..00000000000
--- a/extern/solid/src/broad/BP_Scene.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-
-#include <algorithm>
-
-BP_Proxy *BP_Scene::createProxy(void *object,
- const DT_Vector3 min,
- const DT_Vector3 max)
-{
- BP_Proxy *proxy = new BP_Proxy(object, *this);
-
- proxy->add(min, max, m_proxies);
-
- BP_ProxyList::iterator it;
- for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
- {
- if ((*it).second == 3)
- {
- callBeginOverlap(proxy->getObject(), (*it).first->getObject());
- }
- }
-
- m_proxies.clear();
-
- return proxy;
-}
-
-void BP_Scene::destroyProxy(BP_Proxy *proxy)
-{
- proxy->remove(m_proxies);
-
- BP_ProxyList::iterator it;
- for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
- {
- if ((*it).second == 3)
- {
- callEndOverlap(proxy->getObject(), (*it).first->getObject());
- }
- }
-
- m_proxies.clear();
-
- delete proxy;
-}
-
-void *BP_Scene::rayCast(BP_RayCastCallback objectRayCast,
- void *client_data,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar& lambda) const
-{
- void *client_object = 0;
-
- DT_Index index[3];
- index[0] = m_endpointList[0].stab(source[0], m_proxies);
- index[1] = m_endpointList[1].stab(source[1], m_proxies);
- index[2] = m_endpointList[2].stab(source[2], m_proxies);
-
- BP_ProxyList::iterator it;
- for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
- {
- if ((*it).second == 3 &&
- (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
- {
- client_object = (*it).first->getObject();
- }
- }
-
- DT_Vector3 delta;
- delta[0] = target[0] - source[0];
- delta[1] = target[1] - source[1];
- delta[2] = target[2] - source[2];
-
- DT_Vector3 lambdas;
- lambdas[0] = m_endpointList[0].nextLambda(index[0], source[0], delta[0]);
- lambdas[1] = m_endpointList[1].nextLambda(index[1], source[1], delta[1]);
- lambdas[2] = m_endpointList[2].nextLambda(index[2], source[2], delta[2]);
- int closest = lambdas[0] < lambdas[1] ? (lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2);
-
- while (lambdas[closest] < lambda)
- {
- if (delta[closest] < 0.0f)
- {
- const BP_Endpoint& endpoint = m_endpointList[closest][index[closest]];
-
- if (endpoint.getType() == BP_Endpoint::MAXIMUM)
- {
- it = m_proxies.add(endpoint.getProxy());
- if ((*it).second == 3 &&
- (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
- {
- client_object = (*it).first->getObject();
- }
- }
- else
- {
- m_proxies.remove(endpoint.getProxy());
- }
- }
- else
- {
- const BP_Endpoint& endpoint = m_endpointList[closest][index[closest] - 1];
-
- if (endpoint.getType() == BP_Endpoint::MINIMUM)
- {
- it = m_proxies.add(endpoint.getProxy());
- if ((*it).second == 3 &&
- (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
- {
- client_object = (*it).first->getObject();
- }
- }
- else
- {
- m_proxies.remove(endpoint.getProxy());
- }
- }
-
- lambdas[closest] = m_endpointList[closest].nextLambda(index[closest], source[closest], delta[closest]);
- closest = lambdas[0] < lambdas[1] ? (lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2);
- }
-
- m_proxies.clear();
-
- return client_object;
-}
-
-
diff --git a/extern/solid/src/broad/BP_Scene.h b/extern/solid/src/broad/BP_Scene.h
deleted file mode 100644
index ef55374c43b..00000000000
--- a/extern/solid/src/broad/BP_Scene.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_SCENE_H
-#define BP_SCENE_H
-
-#include <SOLID_broad.h>
-
-#include "BP_EndpointList.h"
-#include "BP_ProxyList.h"
-
-class BP_Proxy;
-
-class BP_Scene {
-public:
- BP_Scene(void *client_data,
- BP_Callback beginOverlap,
- BP_Callback endOverlap)
- : m_client_data(client_data),
- m_beginOverlap(beginOverlap),
- m_endOverlap(endOverlap),
- m_proxies(20)
- {}
-
- ~BP_Scene() {}
-
- BP_Proxy *createProxy(void *object,
- const DT_Vector3 min,
- const DT_Vector3 max);
-
- void destroyProxy(BP_Proxy *proxy);
-
- void *rayCast(BP_RayCastCallback objectRayCast,
- void *client_data,
- const DT_Vector3 source,
- const DT_Vector3 target,
- DT_Scalar& lambda) const;
-
- void callBeginOverlap(void *object1, void *object2)
- {
- (*m_beginOverlap)(m_client_data, object1, object2);
- }
-
- void callEndOverlap(void *object1, void *object2)
- {
- (*m_endOverlap)(m_client_data, object1, object2);
- }
-
- BP_EndpointList& getList(int i) { return m_endpointList[i]; }
-
-private:
- void *m_client_data;
- BP_Callback m_beginOverlap;
- BP_Callback m_endOverlap;
- BP_EndpointList m_endpointList[3];
- mutable BP_ProxyList m_proxies;
-};
-
-#endif
diff --git a/extern/solid/src/broad/Makefile b/extern/solid/src/broad/Makefile
deleted file mode 100644
index ce10e5f0bcf..00000000000
--- a/extern/solid/src/broad/Makefile
+++ /dev/null
@@ -1,41 +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 = solid_broad
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk
-
-
diff --git a/extern/solid/src/complex/DT_BBoxTree.cpp b/extern/solid/src/complex/DT_BBoxTree.cpp
deleted file mode 100644
index 4f10f61f2e2..00000000000
--- a/extern/solid/src/complex/DT_BBoxTree.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_BBoxTree.h"
-
-inline DT_CBox getBBox(int first, int last, const DT_CBox *boxes, const DT_Index *indices)
-{
- assert(last - first >= 1);
-
- DT_CBox bbox = boxes[indices[first]];
- int i;
- for (i = first; i < last; ++i)
- {
- bbox = bbox.hull(boxes[indices[i]]);
- }
-
- return bbox;
-}
-
-DT_BBoxNode::DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox)
-{
- assert(last - first >= 2);
-
- int axis = bbox.longestAxis();
- MT_Scalar abscissa = bbox.getCenter()[axis];
- int i = first, mid = last;
- while (i < mid)
- {
- if (boxes[indices[i]].getCenter()[axis] < abscissa)
- {
- ++i;
- }
- else
- {
- --mid;
- std::swap(indices[i], indices[mid]);
- }
- }
-
- if (mid == first || mid == last)
- {
- mid = (first + last) / 2;
- }
-
- m_lbox = getBBox(first, mid, boxes, indices);
- m_rbox = getBBox(mid, last, boxes, indices);
- m_flags = 0x0;
-
- if (mid - first == 1)
- {
- m_flags |= LLEAF;
- m_lchild = indices[first];
- }
- else
- {
- m_lchild = node++;
- new(&free_nodes[m_lchild]) DT_BBoxNode(first, mid, node, free_nodes, boxes, indices, m_lbox);
- }
-
- if (last - mid == 1)
- {
- m_flags |= RLEAF;
- m_rchild = indices[mid];
- }
- else
- {
- m_rchild = node++;
- new(&free_nodes[m_rchild]) DT_BBoxNode(mid, last, node, free_nodes, boxes, indices, m_rbox);
- }
-}
diff --git a/extern/solid/src/complex/DT_BBoxTree.h b/extern/solid/src/complex/DT_BBoxTree.h
deleted file mode 100644
index 3d9da6e34ba..00000000000
--- a/extern/solid/src/complex/DT_BBoxTree.h
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_BBOXTREE_H
-#define DT_BBOXTREE_H
-
-#include <new>
-#include <algorithm>
-
-#include "DT_Convex.h"
-#include "DT_CBox.h"
-
-
-class DT_BBoxTree {
-public:
- enum NodeType { INTERNAL = 0, LEAF = 1 };
-
- DT_BBoxTree() {}
- DT_BBoxTree(const DT_CBox& cbox, DT_Index index, NodeType type)
- : m_cbox(cbox),
- m_index(index),
- m_type(type)
- {}
-
- DT_CBox m_cbox;
- DT_Index m_index;
- NodeType m_type;
-};
-
-
-
-class DT_BBoxNode {
-public:
- DT_BBoxNode() {}
- DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox);
-
- void makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const;
- void makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const;
-
- DT_CBox hull() const { return m_lbox.hull(m_rbox); }
-
- enum FlagType { LLEAF = 0x80, RLEAF = 0x40 };
-
- DT_CBox m_lbox;
- DT_CBox m_rbox;
- DT_Index m_lchild;
- DT_Index m_rchild;
- unsigned char m_flags;
-};
-
-inline void DT_BBoxNode::makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const
-{
- new (&ltree) DT_BBoxTree(m_lbox, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
- new (&rtree) DT_BBoxTree(m_rbox, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-
-}
-
-inline void DT_BBoxNode::makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const
-{
- new (&ltree) DT_BBoxTree(m_lbox + added, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
- new (&rtree) DT_BBoxTree(m_rbox + added, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-}
-
-
-template <typename Shape>
-class DT_RootData {
-public:
- DT_RootData(const DT_BBoxNode *nodes,
- const Shape *leaves)
- : m_nodes(nodes),
- m_leaves(leaves)
- {}
-
- const DT_BBoxNode *m_nodes;
- const Shape *m_leaves;
-};
-
-template <typename Shape1, typename Shape2>
-class DT_ObjectData : public DT_RootData<Shape1> {
-public:
- DT_ObjectData(const DT_BBoxNode *nodes,
- const Shape1 *leaves,
- const MT_Transform& xform,
- Shape2 plus)
- : DT_RootData<Shape1>(nodes, leaves),
- m_xform(xform),
- m_inv_xform(xform.inverse()),
- m_plus(plus),
- m_added(computeCBox(plus, m_inv_xform))
- {}
-
- const MT_Transform& m_xform;
- MT_Transform m_inv_xform;
- Shape2 m_plus;
- DT_CBox m_added;
-};
-
-template <typename Shape1, typename Shape2>
-class DT_Pack {
-public:
- DT_Pack(const DT_ObjectData<Shape1, Shape2>& a, const DT_Convex& b)
- : m_a(a),
- m_b(b),
- m_b_cbox(b.bbox(m_a.m_inv_xform))
- {}
-
- DT_ObjectData<Shape1, Shape2> m_a;
- const DT_Convex& m_b;
- DT_CBox m_b_cbox;
-};
-
-template <typename Shape1, typename Shape2>
-class DT_HybridPack : public DT_Pack<Shape1, Shape2> {
-public:
- DT_HybridPack(const DT_ObjectData<Shape1, Shape2>& a, const DT_Convex& b, MT_Scalar margin)
- : DT_Pack<Shape1, Shape2>(a, b),
- m_margin(margin)
- {
- this->m_b_cbox += computeCBox(margin, this->m_a.m_inv_xform);
- }
-
- MT_Scalar m_margin;
-};
-
-template <typename Shape1, typename Shape2>
-class DT_DuoPack {
-public:
- DT_DuoPack(const DT_ObjectData<Shape1, Shape2>& a, const DT_ObjectData<Shape1, Shape2>& b)
- : m_a(a),
- m_b(b)
- {
- m_b2a = a.m_inv_xform * b.m_xform;
- m_a2b = b.m_inv_xform * a.m_xform;
- m_abs_b2a = m_b2a.getBasis().absolute();
- m_abs_a2b = m_a2b.getBasis().absolute();
- }
-
- DT_ObjectData<Shape1, Shape2> m_a, m_b;
- MT_Transform m_b2a, m_a2b;
- MT_Matrix3x3 m_abs_b2a, m_abs_a2b;
-};
-
-
-template <typename Shape>
-inline void refit(DT_BBoxNode& node, const DT_RootData<Shape>& rd)
-{
- node.m_lbox = (node.m_flags & DT_BBoxNode::LLEAF) ?
- computeCBox(rd.m_leaves[node.m_lchild]) :
- rd.m_nodes[node.m_lchild].hull();
- node.m_rbox = (node.m_flags & DT_BBoxNode::RLEAF) ?
- computeCBox(rd.m_leaves[node.m_rchild]) :
- rd.m_nodes[node.m_rchild].hull();
-}
-
-
-template <typename Shape>
-bool ray_cast(const DT_BBoxTree& a, const DT_RootData<Shape>& rd,
- const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& lambda, MT_Vector3& normal)
-{
- if (!a.m_cbox.overlapsLineSegment(source, source.lerp(target, lambda)))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF)
- {
- return ray_cast(rd, a.m_index, source, target, lambda, normal);
- }
- else
- {
- DT_BBoxTree ltree, rtree;
- rd.m_nodes[a.m_index].makeChildren(ltree, rtree);
-
- bool lresult = ray_cast(ltree, rd, source, target, lambda, normal);
- bool rresult = ray_cast(rtree, rd, source, target, lambda, normal);
- return lresult || rresult;
- }
-}
-
-
-#ifdef STATISTICS
-int num_box_tests = 0;
-#endif
-
-template <typename Shape1, typename Shape2>
-inline bool intersect(const DT_CBox& a, const DT_CBox& b, const DT_DuoPack<Shape1, Shape2>& pack)
-{
-#ifdef STATISTICS
- ++num_box_tests;
-#endif
-
-
- MT_Vector3 abs_pos_b2a = (pack.m_b2a(b.getCenter()) - a.getCenter()).absolute();
- MT_Vector3 abs_pos_a2b = (pack.m_a2b(a.getCenter()) - b.getCenter()).absolute();
- return (a.getExtent()[0] + pack.m_abs_b2a[0].dot(b.getExtent()) >= abs_pos_b2a[0]) &&
- (a.getExtent()[1] + pack.m_abs_b2a[1].dot(b.getExtent()) >= abs_pos_b2a[1]) &&
- (a.getExtent()[2] + pack.m_abs_b2a[2].dot(b.getExtent()) >= abs_pos_b2a[2]) &&
- (b.getExtent()[0] + pack.m_abs_a2b[0].dot(a.getExtent()) >= abs_pos_a2b[0]) &&
- (b.getExtent()[1] + pack.m_abs_a2b[1].dot(a.getExtent()) >= abs_pos_a2b[1]) &&
- (b.getExtent()[2] + pack.m_abs_a2b[2].dot(a.getExtent()) >= abs_pos_a2b[2]);
-}
-
-
-
-
-template <typename Shape1, typename Shape2>
-bool intersect(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack, MT_Vector3& v)
-{
- if (!a.m_cbox.overlaps(pack.m_b_cbox))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF)
- {
- return intersect(pack, a.m_index, v);
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- return intersect(a_ltree, pack, v) || intersect(a_rtree, pack, v);
- }
-}
-
-template <typename Shape1, typename Shape2>
-bool intersect(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack, MT_Vector3& v)
-{
- if (!intersect(a.m_cbox, b.m_cbox, pack))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF)
- {
- return intersect(pack, a.m_index, b.m_index, v);
- }
- else if (a.m_type == DT_BBoxTree::LEAF ||
- (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size()))
- {
- DT_BBoxTree b_ltree, b_rtree;
- pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
-
- return intersect(a, b_ltree, pack, v) || intersect(a, b_rtree, pack, v);
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- return intersect(a_ltree, b, pack, v) || intersect(a_rtree, b, pack, v);
- }
-}
-
-template <typename Shape1, typename Shape2>
-bool common_point(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- if (!a.m_cbox.overlaps(pack.m_b_cbox))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF)
- {
- return common_point(pack, a.m_index, v, pa, pb);
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- return common_point(a_ltree, pack, v, pa, pb) ||
- common_point(a_rtree, pack, v, pa ,pb);
- }
-}
-
-template <typename Shape1, typename Shape2>
-bool common_point(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- if (!intersect(a.m_cbox, b.m_cbox, pack))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF)
- {
- return common_point(pack, a.m_index, b.m_index, v, pa, pb);
- }
- else if (a.m_type == DT_BBoxTree::LEAF ||
- (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size()))
- {
- DT_BBoxTree b_ltree, b_rtree;
- pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
- return common_point(a, b_ltree, pack, v, pa, pb) ||
- common_point(a, b_rtree, pack, v, pa, pb);
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- return common_point(a_ltree, b, pack, v, pa, pb) ||
- common_point(a_rtree, b, pack, v, pa ,pb);
- }
-}
-
-
-template <typename Shape1, typename Shape2>
-bool penetration_depth(const DT_BBoxTree& a, const DT_HybridPack<Shape1, Shape2>& pack,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len)
-{
- if (!a.m_cbox.overlaps(pack.m_b_cbox))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF)
- {
- if (penetration_depth(pack, a.m_index, v, pa, pb))
- {
- max_pen_len = pa.distance2(pb);
- return true;
- }
- else
- {
- return false;
- }
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- if (penetration_depth(a_ltree, pack, v, pa, pb, max_pen_len))
- {
- MT_Vector3 rv;
- MT_Point3 rpa, rpb;
- MT_Scalar rmax_pen_len;
- if (penetration_depth(a_rtree, pack, rv, rpa, rpb, rmax_pen_len) &&
- (max_pen_len < rmax_pen_len))
- {
- max_pen_len = rmax_pen_len;
- v = rv;
- pa = rpa;
- pb = rpb;
- }
- return true;
- }
- else
- {
- return penetration_depth(a_rtree, pack, v, pa, pb, max_pen_len);
- }
- }
-}
-
-template <typename Shape1, typename Shape2>
-bool penetration_depth(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len)
-{
- if (!intersect(a.m_cbox, b.m_cbox, pack))
- {
- return false;
- }
-
- if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF)
- {
- if (penetration_depth(pack, a.m_index, b.m_index, v, pa, pb))
- {
- max_pen_len = pa.distance2(pb);
- return true;
- }
- else
- {
- return false;
- }
- }
- else if (a.m_type == DT_BBoxTree::LEAF ||
- (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size()))
- {
- DT_BBoxTree b_ltree, b_rtree;
- pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
- if (penetration_depth(a, b_ltree, pack, v, pa, pb, max_pen_len))
- {
- MT_Point3 rpa, rpb;
- MT_Scalar rmax_pen_len;
- if (penetration_depth(a, b_rtree, pack, v, rpa, rpb, rmax_pen_len) &&
- (max_pen_len < rmax_pen_len))
- {
- max_pen_len = rmax_pen_len;
- pa = rpa;
- pb = rpb;
- }
- return true;
- }
- else
- {
- return penetration_depth(a, b_rtree, pack, v, pa, pb, max_pen_len);
- }
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- if (penetration_depth(a_ltree, b, pack, v, pa, pb, max_pen_len))
- {
- MT_Point3 rpa, rpb;
- MT_Scalar rmax_pen_len;
- if (penetration_depth(a_rtree, b, pack, v, rpa, rpb, rmax_pen_len) &&
- (max_pen_len < rmax_pen_len))
- {
- max_pen_len = rmax_pen_len;
- pa = rpa;
- pb = rpb;
- }
- return true;
- }
- else
- {
- return penetration_depth(a_rtree, b, pack, v, pa, pb, max_pen_len);
- }
- }
-}
-
-
-// Returns a lower bound for the distance for quick rejection in closest_points
-inline MT_Scalar distance2(const DT_CBox& a, const MT_Transform& a2w,
- const DT_CBox& b, const MT_Transform& b2w)
-{
- MT_Vector3 v = b2w(b.getCenter()) - a2w(a.getCenter());
- MT_Scalar dist2 = v.length2();
- if (dist2 > MT_Scalar(0.0))
- {
- MT_Vector3 w = b2w(b.support(-v * b2w.getBasis())) - a2w(a.support(v * a2w.getBasis()));
- MT_Scalar delta = v.dot(w);
- return delta > MT_Scalar(0.0) ? delta * delta / dist2 : MT_Scalar(0.0);
- }
- return MT_Scalar(0.0);
-}
-
-
-template <typename Shape1, typename Shape2>
-MT_Scalar closest_points(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack,
- MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb)
-{
- if (a.m_type == DT_BBoxTree::LEAF)
- {
- return closest_points(pack, a.m_index, max_dist2, pa, pb);
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform);
- MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform);
- if (ldist2 < rdist2)
- {
- MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, pack, max_dist2, pa, pb) : MT_INFINITY;
- GEN_set_min(max_dist2, dist2);
- return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a_rtree, pack, max_dist2, pa, pb)) : dist2;
- }
- else
- {
- MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, pack, max_dist2, pa, pb) : MT_INFINITY;
- GEN_set_min(max_dist2, dist2);
- return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, pack, max_dist2, pa, pb)) : dist2;
- }
- }
-}
-
-
-template <typename Shape1, typename Shape2>
-MT_Scalar closest_points(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack,
- MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb)
-{
- if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF)
- {
- return closest_points(pack, a.m_index, b.m_index, max_dist2, pa, pb);
- }
- else if (a.m_type == DT_BBoxTree::LEAF ||
- (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size()))
- {
- DT_BBoxTree b_ltree, b_rtree;
- pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
- MT_Scalar ldist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_ltree.m_cbox, pack.m_b.m_xform);
- MT_Scalar rdist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_rtree.m_cbox, pack.m_b.m_xform);
- if (ldist2 < rdist2)
- {
- MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a, b_ltree, pack, max_dist2, pa, pb): MT_INFINITY;;
- GEN_set_min(max_dist2, dist2);
- return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_rtree, pack, max_dist2, pa, pb)) : dist2;
- }
- else
- {
- MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a, b_rtree, pack, max_dist2, pa, pb) : MT_INFINITY;;
- GEN_set_min(max_dist2, dist2);
- return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_ltree, pack, max_dist2, pa, pb)) : dist2;
- }
- }
- else
- {
- DT_BBoxTree a_ltree, a_rtree;
- pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
- MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform);
- MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform);
- if (ldist2 < rdist2)
- {
- MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, b, pack, max_dist2, pa, pb) : MT_INFINITY;;
- GEN_set_min(max_dist2, dist2);
- return rdist2 < max_dist2 ? GEN_min(dist2,closest_points(a_rtree, b, pack, max_dist2, pa, pb)) : dist2;
- }
- else
- {
- MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, b, pack, max_dist2, pa, pb) : MT_INFINITY;
- GEN_set_min(max_dist2, dist2);
- return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, b, pack, max_dist2, pa, pb)) : dist2;
- }
- }
-}
-
-#endif
-
diff --git a/extern/solid/src/complex/DT_CBox.h b/extern/solid/src/complex/DT_CBox.h
deleted file mode 100644
index 7fc7c5df4db..00000000000
--- a/extern/solid/src/complex/DT_CBox.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CBOX_H
-#define DT_CBOX_H
-
-#include "MT_BBox.h"
-
-struct DT_CBox {
- DT_CBox() {}
- DT_CBox(const MT_Point3& center, const MT_Vector3& extent)
- : m_center(center),
- m_extent(extent)
- {}
-
- explicit DT_CBox(const MT_BBox& bbox) { set(bbox); }
-
- const MT_Point3& getCenter() const { return m_center; }
- const MT_Vector3& getExtent() const { return m_extent; }
-
- void set(const MT_BBox& bbox)
- {
- m_center = bbox.getCenter();
- m_extent = bbox.getExtent();
- }
-
- MT_BBox get() const
- {
- return MT_BBox(m_center - m_extent, m_center + m_extent);
- }
-
- MT_Scalar size() const
- {
- return GEN_max(GEN_max(m_extent[0], m_extent[1]), m_extent[2]);
- }
-
-
- DT_CBox& operator+=(const DT_CBox& box)
- {
- m_center += box.getCenter();
- m_extent += box.getExtent();
- return *this;
- }
-
- int longestAxis() const { return m_extent.closestAxis(); }
-
- DT_CBox hull(const DT_CBox& b) const
- {
- return DT_CBox(this->get().hull(b.get()));
- }
-
- bool overlaps(const DT_CBox& b) const
- {
- return MT_abs(m_center[0] - b.m_center[0]) <= m_extent[0] + b.m_extent[0] &&
- MT_abs(m_center[1] - b.m_center[1]) <= m_extent[1] + b.m_extent[1] &&
- MT_abs(m_center[2] - b.m_center[2]) <= m_extent[2] + b.m_extent[2];
- }
-
- bool overlapsLineSegment(const MT_Point3& p, const MT_Point3& q) const
- {
- MT_Vector3 r = q - p;
- MT_Vector3 r_abs = r.absolute();
-
- if (!overlaps(DT_CBox(p + r * MT_Scalar(0.5), r_abs * MT_Scalar(0.5))))
- {
- return false;
- }
-
- MT_Vector3 s = p - m_center;
-
- if (MT_abs(r[2] * s[1] - r[1] * s[2]) > r_abs[2] * m_extent[1] + r_abs[1] * m_extent[2])
- {
- return false;
- }
-
- if (MT_abs(r[0] * s[2] - r[2] * s[0]) > r_abs[0] * m_extent[2] + r_abs[2] * m_extent[0])
- {
- return false;
- }
-
- if (MT_abs(r[1] * s[0] - r[0] * s[1]) > r_abs[1] * m_extent[0] + r_abs[0] * m_extent[1])
- {
- return false;
- }
-
- return true;
- }
-
- MT_Point3 support(const MT_Vector3& v) const
- {
- return m_center + MT_Vector3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0],
- v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1],
- v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]);
-
- }
-
-private:
- MT_Point3 m_center;
- MT_Vector3 m_extent;
-};
-
-inline DT_CBox operator+(const DT_CBox& b1, const DT_CBox& b2)
-{
- return DT_CBox(b1.getCenter() + b2.getCenter(),
- b1.getExtent() + b2.getExtent());
-}
-
-inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2)
-{
- return DT_CBox(b1.getCenter() - b2.getCenter(),
- b1.getExtent() + b2.getExtent());
-}
-
-#endif
diff --git a/extern/solid/src/complex/DT_Complex.cpp b/extern/solid/src/complex/DT_Complex.cpp
deleted file mode 100644
index 023383a8427..00000000000
--- a/extern/solid/src/complex/DT_Complex.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include <new>
-#include <fstream>
-
-#include "DT_Complex.h"
-#include "DT_Minkowski.h"
-#include "DT_Sphere.h"
-#include "DT_Transform.h"
-
-DT_Complex::DT_Complex(const DT_VertexBase *base)
- : m_base(base),
- m_count(0),
- m_leaves(0),
- m_nodes(0)
-{
- assert(base);
- base->addComplex(this);
-}
-
-
-DT_Complex::~DT_Complex()
-{
- DT_Index i;
- for (i = 0; i != m_count; ++i)
- {
- delete m_leaves[i];
- }
- delete [] m_leaves;
- delete [] m_nodes;
-
- m_base->removeComplex(this);
- if (m_base->isOwner())
- {
- delete m_base;
- }
-}
-
-void DT_Complex::finish(DT_Count n, const DT_Convex *p[])
-{
- m_count = n;
-
-
- assert(n >= 1);
-
- m_leaves = new const DT_Convex *[n];
- assert(m_leaves);
-
- DT_CBox *boxes = new DT_CBox[n];
- DT_Index *indices = new DT_Index[n];
- assert(boxes);
-
- DT_Index i;
- for (i = 0; i != n; ++i)
- {
- m_leaves[i] = p[i];
- boxes[i].set(p[i]->bbox());
- indices[i] = i;
- }
-
- m_cbox = boxes[0];
- for (i = 1; i != n; ++i)
- {
- m_cbox = m_cbox.hull(boxes[i]);
- }
-
- if (n == 1)
- {
- m_nodes = 0;
- m_type = DT_BBoxTree::LEAF;
- }
- else
- {
- m_nodes = new DT_BBoxNode[n - 1];
- assert(m_nodes);
-
- int num_nodes = 0;
- new(&m_nodes[num_nodes++]) DT_BBoxNode(0, n, num_nodes, m_nodes, boxes, indices, m_cbox);
-
- assert(num_nodes == n - 1);
-
- m_type = DT_BBoxTree::INTERNAL;
- }
-
- delete [] boxes;
-}
-
-
-MT_BBox DT_Complex::bbox(const MT_Transform& t, MT_Scalar margin) const
-{
- MT_Matrix3x3 abs_b = t.getBasis().absolute();
- MT_Point3 center = t(m_cbox.getCenter());
- MT_Vector3 extent(margin + abs_b[0].dot(m_cbox.getExtent()),
- margin + abs_b[1].dot(m_cbox.getExtent()),
- margin + abs_b[2].dot(m_cbox.getExtent()));
-
- return MT_BBox(center - extent, center + extent);
-}
-
-inline DT_CBox computeCBox(const DT_Convex *p)
-{
- return DT_CBox(p->bbox());
-}
-
-inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform)
-{
- const MT_Matrix3x3& basis = xform.getBasis();
- return DT_CBox(MT_Point3(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)),
- MT_Vector3(basis[0].length() * margin,
- basis[1].length() * margin,
- basis[2].length() * margin));
-}
-
-void DT_Complex::refit()
-{
- DT_RootData<const DT_Convex *> rd(m_nodes, m_leaves);
- DT_Index i = m_count - 1;
- while (i--)
- {
- ::refit(m_nodes[i], rd);
- }
- m_cbox = m_type == DT_BBoxTree::LEAF ? computeCBox(m_leaves[0]) : m_nodes[0].hull();
-}
-
-inline bool ray_cast(const DT_RootData<const DT_Convex *>& rd, DT_Index index, const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& lambda, MT_Vector3& normal)
-{
- return rd.m_leaves[index]->ray_cast(source, target, lambda, normal);
-}
-
-bool DT_Complex::ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& lambda, MT_Vector3& normal) const
-{
- DT_RootData<const DT_Convex *> rd(m_nodes, m_leaves);
-
- return ::ray_cast(DT_BBoxTree(m_cbox, 0, m_type), rd, source, target, lambda, normal);
-}
-
-inline bool intersect(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- return ::intersect((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- pack.m_b, v);
-}
-
-bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Vector3& v)
-{
- DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
- return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v);
-}
-
-inline bool intersect(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
- MT_Scalar b_margin = pack.m_b.m_plus;
- return ::intersect((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) :
- static_cast<const DT_Convex&>(tb)),
- v);
-}
-
-bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, MT_Vector3& v)
-{
- DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin),
- DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin));
-
-
- return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
- DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v);
-}
-
-inline bool common_point(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- return ::common_point((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- pack.m_b, v, pa, pb);
-}
-
-bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
- return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pb, pa);
-}
-
-inline bool common_point(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
- MT_Scalar b_margin = pack.m_b.m_plus;
- return ::common_point((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) :
- static_cast<const DT_Convex&>(tb)),
- v, pa, pb);
-}
-
-bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin),
- DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin));
-
- return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
- DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v, pa, pb);
-}
-
-inline bool penetration_depth(const DT_HybridPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, pack.m_b, pack.m_margin, v, pa, pb);
-}
-
-bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_HybridPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b, b_margin);
-
- MT_Scalar max_pen_len = MT_Scalar(0.0);
- return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pa, pb, max_pen_len);
-}
-
-inline bool penetration_depth(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
- return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, tb, pack.m_a.m_plus, v, pa, pb);
-}
-
-bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin),
- DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin));
-
- MT_Scalar max_pen_len = MT_Scalar(0.0);
- return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
- DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v, pa, pb, max_pen_len);
-}
-
-
-
-inline MT_Scalar closest_points(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- return ::closest_points((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- pack.m_b, max_dist2, pa, pb);
-}
-
-MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
- return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, MT_INFINITY, pa, pb);
-}
-
-inline MT_Scalar closest_points(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb)
-{
- DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
- MT_Scalar a_margin = pack.m_a.m_plus;
- DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
- MT_Scalar b_margin = pack.m_b.m_plus;
- return ::closest_points((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(ta)),
- (b_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) :
- static_cast<const DT_Convex&>(tb)), max_dist2, pa, pb);
-}
-
-MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3& pa, MT_Point3& pb)
-{
- DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin),
- DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin));
-
- return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
- DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, MT_INFINITY, pa, pb);
-}
-
-
diff --git a/extern/solid/src/complex/DT_Complex.h b/extern/solid/src/complex/DT_Complex.h
deleted file mode 100644
index ae08a05d4c9..00000000000
--- a/extern/solid/src/complex/DT_Complex.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_COMPLEX_H
-#define DT_COMPLEX_H
-
-#include <algorithm>
-
-#include "MT_Transform.h"
-#include "DT_VertexBase.h"
-
-#include "DT_Shape.h"
-#include "DT_CBox.h"
-#include "DT_BBoxTree.h"
-
-class DT_Convex;
-
-class DT_Complex : public DT_Shape {
-public:
- DT_Complex(const DT_VertexBase *base);
- virtual ~DT_Complex();
-
- void finish(DT_Count n, const DT_Convex *p[]);
-
- virtual DT_ShapeType getType() const { return COMPLEX; }
-
- virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const;
-
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& lambda, MT_Vector3& normal) const;
-
- void refit();
-
-
- friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Vector3& v);
-
- friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v);
-
- friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
- friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
- friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
- friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
- friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Convex& b, MT_Point3& pa, MT_Point3& pb);
-
- friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3& pa, MT_Point3& pb);
-
- const DT_VertexBase *m_base;
- DT_Count m_count;
- const DT_Convex **m_leaves;
- DT_BBoxNode *m_nodes;
- DT_CBox m_cbox;
- DT_BBoxTree::NodeType m_type;
-};
-
-#endif
-
-
-
diff --git a/extern/solid/src/complex/Makefile b/extern/solid/src/complex/Makefile
deleted file mode 100644
index e8df4df51a3..00000000000
--- a/extern/solid/src/complex/Makefile
+++ /dev/null
@@ -1,42 +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 = solid_complex
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -I../convex
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk
-
-
diff --git a/extern/solid/src/convex/DT_Accuracy.cpp b/extern/solid/src/convex/DT_Accuracy.cpp
deleted file mode 100644
index 113275b0dbd..00000000000
--- a/extern/solid/src/convex/DT_Accuracy.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Accuracy.h"
-
-static const MT_Scalar rel_error = MT_Scalar(1.0e-3);
-
-MT_Scalar DT_Accuracy::rel_error2 = rel_error * rel_error;
-MT_Scalar DT_Accuracy::depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error;
-MT_Scalar DT_Accuracy::tol_error = MT_EPSILON;
diff --git a/extern/solid/src/convex/DT_Accuracy.h b/extern/solid/src/convex/DT_Accuracy.h
deleted file mode 100644
index 9759a6fd4c5..00000000000
--- a/extern/solid/src/convex/DT_Accuracy.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ACCURACY_H
-#define DT_ACCURACY_H
-
-#include "MT_Scalar.h"
-
-class DT_Accuracy {
-public:
- static MT_Scalar rel_error2; // squared relative error in the computed distance
- static MT_Scalar depth_tolerance; // terminate EPA if upper_bound <= depth_tolerance * dist2
- static MT_Scalar tol_error; // error tolerance if the distance is almost zero
-
- static void setAccuracy(MT_Scalar rel_error)
- {
- rel_error2 = rel_error * rel_error;
- depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error;
- }
-
- static void setTolerance(MT_Scalar epsilon)
- {
- tol_error = epsilon;
- }
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Array.h b/extern/solid/src/convex/DT_Array.h
deleted file mode 100644
index 1694f884e53..00000000000
--- a/extern/solid/src/convex/DT_Array.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ARRAY_H
-#define DT_ARRAY_H
-
-#if defined (__sgi)
-#include <assert.h>
-#else
-#include <cassert>
-#endif
-
-template <typename Data, typename Size = size_t>
-class DT_Array {
-public:
- DT_Array()
- : m_count(0),
- m_data(0)
- {}
-
- explicit DT_Array(Size count)
- : m_count(count),
- m_data(new Data[count])
- {
- assert(m_data);
- }
-
- DT_Array(Size count, const Data *data)
- : m_count(count),
- m_data(new Data[count])
- {
- assert(m_data);
- std::copy(&data[0], &data[count], m_data);
- }
-
- ~DT_Array()
- {
- delete [] m_data;
- }
-
- const Data& operator[](int i) const { return m_data[i]; }
- Data& operator[](int i) { return m_data[i]; }
-
- Size size() const { return m_count; }
-
-private:
- DT_Array(const DT_Array&);
- DT_Array& operator=(const DT_Array&);
-
- Size m_count;
- Data *m_data;
-};
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_Box.cpp b/extern/solid/src/convex/DT_Box.cpp
deleted file mode 100644
index 0b46f566fe8..00000000000
--- a/extern/solid/src/convex/DT_Box.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Box.h"
-
-MT_Scalar DT_Box::supportH(const MT_Vector3& v) const
-{
- return v.absolute().dot(m_extent);
-}
-
-MT_Point3 DT_Box::support(const MT_Vector3& v) const
-{
- return MT_Point3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0],
- v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1],
- v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]);
-
-}
-
-
-bool DT_Box::ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const
-{
- T_Outcode source_bits = outcode(source);
- T_Outcode target_bits = outcode(target);
-
- if ((source_bits & target_bits) == 0x0)
- // None of the side planes separate the ray from the box.
- {
- MT_Scalar lambda_enter = MT_Scalar(0.0);
- MT_Scalar lambda_exit = param;
- MT_Vector3 r = target - source;
- T_Outcode normal_bit = 0x0; // Indicates the axis that is returned as normal.
- T_Outcode bit = 0x01;
- int i;
- for (i = 0; i != 3; ++i)
- {
- if (source_bits & bit)
- // Point of intersection is entering
- {
- MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i];
- if (lambda_enter < lambda)
- {
- lambda_enter = lambda;
- normal_bit = bit;
- }
- }
- else if (target_bits & bit)
- // Point of intersection is exiting
- {
- MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i];
- GEN_set_min(lambda_exit, lambda);
- }
- bit <<=1;
- if (source_bits & bit)
- // Point of intersection is entering
- {
- MT_Scalar lambda = (-source[i] + m_extent[i]) / r[i];
- if (lambda_enter < lambda)
- {
- lambda_enter = lambda;
- normal_bit = bit;
- }
- }
- else if (target_bits & bit)
- // Point of intersection is exiting
- {
- MT_Scalar lambda = (-source[i] + m_extent[i]) / r[i];
- GEN_set_min(lambda_exit, lambda);
- }
- bit <<=1;
- }
- if (lambda_enter <= lambda_exit)
- // The ray intersects the box
- {
- param = lambda_enter;
- normal.setValue(normal_bit == 0x01 ? -MT_Scalar(1.0) :
- normal_bit == 0x02 ? MT_Scalar(1.0) :
- MT_Scalar(0.0),
- normal_bit == 0x04 ? -MT_Scalar(1.0) :
- normal_bit == 0x08 ? MT_Scalar(1.0) :
- MT_Scalar(0.0),
- normal_bit == 0x10 ? -MT_Scalar(1.0) :
- normal_bit == 0x20 ? MT_Scalar(1.0) :
- MT_Scalar(0.0));
- return true;
- }
- }
-
- return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Box.h b/extern/solid/src/convex/DT_Box.h
deleted file mode 100644
index ace9634b5e3..00000000000
--- a/extern/solid/src/convex/DT_Box.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_BOX_H
-#define DT_BOX_H
-
-#include "DT_Convex.h"
-
-class DT_Box : public DT_Convex {
-public:
- DT_Box(MT_Scalar x, MT_Scalar y, MT_Scalar z) :
- m_extent(x, y, z)
- {}
-
- DT_Box(const MT_Vector3& e) :
- m_extent(e)
- {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const;
-
- const MT_Vector3& getExtent() const { return m_extent; }
-
-protected:
- typedef unsigned int T_Outcode;
-
- T_Outcode outcode(const MT_Point3& p) const
- {
- return (p[0] < -m_extent[0] ? 0x01 : 0x0) |
- (p[0] > m_extent[0] ? 0x02 : 0x0) |
- (p[1] < -m_extent[1] ? 0x04 : 0x0) |
- (p[1] > m_extent[1] ? 0x08 : 0x0) |
- (p[2] < -m_extent[2] ? 0x10 : 0x0) |
- (p[2] > m_extent[2] ? 0x20 : 0x0);
- }
-
- MT_Vector3 m_extent;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Cone.cpp b/extern/solid/src/convex/DT_Cone.cpp
deleted file mode 100644
index 1dd6a7ddbbe..00000000000
--- a/extern/solid/src/convex/DT_Cone.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Cone.h"
-
-MT_Point3 DT_Cone::support(const MT_Vector3& v) const
-{
- MT_Scalar v_len = v.length();
-
- if (v[1] > v_len * sinAngle)
- {
- return MT_Point3(MT_Scalar(0.0), halfHeight, MT_Scalar(0.0));
- }
- else
- {
- MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]);
- if (s != MT_Scalar(0.0))
- {
- MT_Scalar d = bottomRadius / s;
- return MT_Point3(v[0] * d, -halfHeight, v[2] * d);
- }
- else
- {
- return MT_Point3(bottomRadius, -halfHeight, MT_Scalar(0.0));
- }
- }
-}
-
diff --git a/extern/solid/src/convex/DT_Cone.h b/extern/solid/src/convex/DT_Cone.h
deleted file mode 100644
index 85e416877dd..00000000000
--- a/extern/solid/src/convex/DT_Cone.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CONE_H
-#define DT_CONE_H
-
-#include "DT_Convex.h"
-
-class DT_Cone : public DT_Convex {
-public:
- DT_Cone(MT_Scalar r, MT_Scalar h) :
- bottomRadius(r),
- halfHeight(h * MT_Scalar(0.5)),
- sinAngle(r / MT_sqrt(r * r + h * h))
- {}
-
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
-protected:
- MT_Scalar bottomRadius;
- MT_Scalar halfHeight;
- MT_Scalar sinAngle;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Convex.cpp b/extern/solid/src/convex/DT_Convex.cpp
deleted file mode 100644
index 3be47f6ed02..00000000000
--- a/extern/solid/src/convex/DT_Convex.cpp
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Convex.h"
-#include "GEN_MinMax.h"
-
-//#define DEBUG
-#define SAFE_EXIT
-
-#include "DT_GJK.h"
-#include "DT_PenDepth.h"
-
-#include <algorithm>
-#include <new>
-
-#include "MT_BBox.h"
-#include "DT_Sphere.h"
-#include "DT_Minkowski.h"
-
-#include "DT_Accuracy.h"
-
-#ifdef STATISTICS
-int num_iterations = 0;
-int num_irregularities = 0;
-#endif
-
-MT_BBox DT_Convex::bbox() const
-{
- MT_Point3 min(-supportH(MT_Vector3(-1.0f, 0.0f, 0.0f)),
- -supportH(MT_Vector3(0.0f, -1.0f, 0.0f)),
- -supportH(MT_Vector3(0.0f, 0.0f, -1.0f)));
- MT_Point3 max( supportH(MT_Vector3(1.0f, 0.0f, 0.0f)),
- supportH(MT_Vector3(0.0f, 1.0f, 0.0f)),
- supportH(MT_Vector3(0.0f, 0.0f, 1.0f)));
-
-
- return MT_BBox(min, max);
-}
-
-MT_BBox DT_Convex::bbox(const MT_Matrix3x3& basis) const
-{
- MT_Point3 min(-supportH(-basis[0]),
- -supportH(-basis[1]),
- -supportH(-basis[2]));
- MT_Point3 max( supportH( basis[0]),
- supportH( basis[1]),
- supportH( basis[2]));
- return MT_BBox(min, max);
-}
-
-MT_BBox DT_Convex::bbox(const MT_Transform& t, MT_Scalar margin) const
-{
- MT_Point3 min(t.getOrigin()[0] - supportH(-t.getBasis()[0]) - margin,
- t.getOrigin()[1] - supportH(-t.getBasis()[1]) - margin,
- t.getOrigin()[2] - supportH(-t.getBasis()[2]) - margin);
- MT_Point3 max(t.getOrigin()[0] + supportH( t.getBasis()[0]) + margin,
- t.getOrigin()[1] + supportH( t.getBasis()[1]) + margin,
- t.getOrigin()[2] + supportH( t.getBasis()[2]) + margin);
- return MT_BBox(min, max);
-}
-
-bool DT_Convex::ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const
-{
- // Still working on this one...
- return false;
-}
-
-bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v)
-{
- DT_GJK gjk;
-
-#ifdef STATISTICS
- num_iterations = 0;
-#endif
- MT_Scalar dist2 = MT_INFINITY;
-
- do
- {
- MT_Point3 p = a.support(-v);
- MT_Point3 q = b.support(v);
- MT_Vector3 w = p - q;
-
- if (v.dot(w) > MT_Scalar(0.0))
- {
- return false;
- }
-
- gjk.addVertex(w);
-
-#ifdef STATISTICS
- ++num_iterations;
-#endif
- if (!gjk.closest(v))
- {
-#ifdef STATISTICS
- ++num_irregularities;
-#endif
- return false;
- }
-
-#ifdef SAFE_EXIT
- MT_Scalar prev_dist2 = dist2;
-#endif
-
- dist2 = v.length2();
-
-#ifdef SAFE_EXIT
- if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2)
- {
- return false;
- }
-#endif
- }
- while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex());
-
- v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- return true;
-}
-
-
-
-
-bool common_point(const DT_Convex& a, const DT_Convex& b,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_GJK gjk;
-
-#ifdef STATISTICS
- num_iterations = 0;
-#endif
-
- MT_Scalar dist2 = MT_INFINITY;
-
- do
- {
- MT_Point3 p = a.support(-v);
- MT_Point3 q = b.support(v);
- MT_Vector3 w = p - q;
-
- if (v.dot(w) > MT_Scalar(0.0))
- {
- return false;
- }
-
- gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
- ++num_iterations;
-#endif
- if (!gjk.closest(v))
- {
-#ifdef STATISTICS
- ++num_irregularities;
-#endif
- return false;
- }
-
-#ifdef SAFE_EXIT
- MT_Scalar prev_dist2 = dist2;
-#endif
-
- dist2 = v.length2();
-
-#ifdef SAFE_EXIT
- if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2)
- {
- return false;
- }
-#endif
- }
- while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex());
-
- gjk.compute_points(pa, pb);
-
- v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- return true;
-}
-
-
-
-
-
-
-
-bool penetration_depth(const DT_Convex& a, const DT_Convex& b,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- DT_GJK gjk;
-
-#ifdef STATISTICS
- num_iterations = 0;
-#endif
-
- MT_Scalar dist2 = MT_INFINITY;
-
- do
- {
- MT_Point3 p = a.support(-v);
- MT_Point3 q = b.support(v);
- MT_Vector3 w = p - q;
-
- if (v.dot(w) > MT_Scalar(0.0))
- {
- return false;
- }
-
- gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
- ++num_iterations;
-#endif
- if (!gjk.closest(v))
- {
-#ifdef STATISTICS
- ++num_irregularities;
-#endif
- return false;
- }
-
-#ifdef SAFE_EXIT
- MT_Scalar prev_dist2 = dist2;
-#endif
-
- dist2 = v.length2();
-
-#ifdef SAFE_EXIT
- if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2)
- {
- return false;
- }
-#endif
- }
- while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex());
-
-
- return penDepth(gjk, a, b, v, pa, pb);
-
-}
-
-bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin,
- const DT_Convex& b, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
- MT_Scalar margin = a_margin + b_margin;
- if (margin > MT_Scalar(0.0))
- {
- MT_Scalar margin2 = margin * margin;
-
- DT_GJK gjk;
-
-#ifdef STATISTICS
- num_iterations = 0;
-#endif
- MT_Scalar dist2 = MT_INFINITY;
-
- do
- {
- MT_Point3 p = a.support(-v);
- MT_Point3 q = b.support(v);
-
- MT_Vector3 w = p - q;
-
- MT_Scalar delta = v.dot(w);
-
- if (delta > MT_Scalar(0.0) && delta * delta > dist2 * margin2)
- {
- return false;
- }
-
- if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2)
- {
- gjk.compute_points(pa, pb);
- MT_Scalar s = MT_sqrt(dist2);
- assert(s > MT_Scalar(0.0));
- pa -= v * (a_margin / s);
- pb += v * (b_margin / s);
- return true;
- }
-
- gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
- ++num_iterations;
-#endif
- if (!gjk.closest(v))
- {
-#ifdef STATISTICS
- ++num_irregularities;
-#endif
- gjk.compute_points(pa, pb);
- MT_Scalar s = MT_sqrt(dist2);
- assert(s > MT_Scalar(0.0));
- pa -= v * (a_margin / s);
- pb += v * (b_margin / s);
- return true;
- }
-
-#ifdef SAFE_EXIT
- MT_Scalar prev_dist2 = dist2;
-#endif
-
- dist2 = v.length2();
-
-#ifdef SAFE_EXIT
- if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2)
- {
- gjk.backup_closest(v);
- dist2 = v.length2();
- gjk.compute_points(pa, pb);
- MT_Scalar s = MT_sqrt(dist2);
- assert(s > MT_Scalar(0.0));
- pa -= v * (a_margin / s);
- pb += v * (b_margin / s);
- return true;
- }
-#endif
- }
- while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex());
-
- }
- // Second GJK phase. compute points on the boundary of the offset object
-
- return penetration_depth((a_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(a, DT_Sphere(a_margin))) :
- static_cast<const DT_Convex&>(a)),
- (b_margin > MT_Scalar(0.0) ?
- static_cast<const DT_Convex&>(DT_Minkowski(b, DT_Sphere(b_margin))) :
- static_cast<const DT_Convex&>(b)), v, pa, pb);
-}
-
-
-MT_Scalar closest_points(const DT_Convex& a, const DT_Convex& b, MT_Scalar max_dist2,
- MT_Point3& pa, MT_Point3& pb)
-{
- MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- DT_GJK gjk;
-
-#ifdef STATISTICS
- num_iterations = 0;
-#endif
-
- MT_Scalar dist2 = MT_INFINITY;
-
- do
- {
- MT_Point3 p = a.support(-v);
- MT_Point3 q = b.support(v);
- MT_Vector3 w = p - q;
-
- MT_Scalar delta = v.dot(w);
- if (delta > MT_Scalar(0.0) && delta * delta > dist2 * max_dist2)
- {
- return MT_INFINITY;
- }
-
- if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2)
- {
- break;
- }
-
- gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
- ++num_iterations;
- if (num_iterations > 1000)
- {
- std::cout << "v: " << v << " w: " << w << std::endl;
- }
-#endif
- if (!gjk.closest(v))
- {
-#ifdef STATISTICS
- ++num_irregularities;
-#endif
- break;
- }
-
-#ifdef SAFE_EXIT
- MT_Scalar prev_dist2 = dist2;
-#endif
-
- dist2 = v.length2();
-
-#ifdef SAFE_EXIT
- if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2)
- {
- gjk.backup_closest(v);
- dist2 = v.length2();
- break;
- }
-#endif
- }
- while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex());
-
- assert(!gjk.emptySimplex());
-
- if (dist2 <= max_dist2)
- {
- gjk.compute_points(pa, pb);
- }
-
- return dist2;
-}
diff --git a/extern/solid/src/convex/DT_Convex.h b/extern/solid/src/convex/DT_Convex.h
deleted file mode 100644
index dd620ac8b98..00000000000
--- a/extern/solid/src/convex/DT_Convex.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CONVEX_H
-#define DT_CONVEX_H
-
-#include "DT_Shape.h"
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-
-#include "MT_Matrix3x3.h"
-#include "MT_Transform.h"
-
-class DT_Convex : public DT_Shape {
-public:
- virtual ~DT_Convex() {}
- virtual DT_ShapeType getType() const { return CONVEX; }
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const { return v.dot(support(v)); }
- virtual MT_Point3 support(const MT_Vector3& v) const = 0;
- virtual MT_BBox bbox() const;
- virtual MT_BBox bbox(const MT_Matrix3x3& basis) const;
- virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin = MT_Scalar(0.0)) const;
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const;
-
-protected:
- DT_Convex() {}
-};
-
-
-bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v);
-
-bool common_point(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-MT_Scalar closest_points(const DT_Convex&, const DT_Convex&, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb);
-
-bool penetration_depth(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin,
- const DT_Convex& b, MT_Scalar b_margin,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-#endif
diff --git a/extern/solid/src/convex/DT_Cylinder.cpp b/extern/solid/src/convex/DT_Cylinder.cpp
deleted file mode 100644
index cff5ebcefb1..00000000000
--- a/extern/solid/src/convex/DT_Cylinder.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Cylinder.h"
-
-MT_Point3 DT_Cylinder::support(const MT_Vector3& v) const
-{
- MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]);
- if (s != MT_Scalar(0.0))
- {
- MT_Scalar d = radius / s;
- return MT_Point3(v[0] * d, v[1] < 0.0 ? -halfHeight : halfHeight, v[2] * d);
- }
- else
- {
- return MT_Point3(radius, v[1] < 0.0 ? -halfHeight : halfHeight, MT_Scalar(0.0));
- }
-}
-
diff --git a/extern/solid/src/convex/DT_Cylinder.h b/extern/solid/src/convex/DT_Cylinder.h
deleted file mode 100644
index 2a0c07fd579..00000000000
--- a/extern/solid/src/convex/DT_Cylinder.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CYLINDER_H
-#define DT_CYLINDER_H
-
-#include "DT_Convex.h"
-
-class DT_Cylinder : public DT_Convex {
-public:
- DT_Cylinder(MT_Scalar r, MT_Scalar h) :
- radius(r),
- halfHeight(h * MT_Scalar(0.5)) {}
-
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
-protected:
- MT_Scalar radius;
- MT_Scalar halfHeight;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Facet.cpp b/extern/solid/src/convex/DT_Facet.cpp
deleted file mode 100644
index 87ae5c3e0be..00000000000
--- a/extern/solid/src/convex/DT_Facet.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Facet.h"
-
-bool DT_Facet::link(int edge0, DT_Facet *facet, int edge1)
-{
- m_adjFacets[edge0] = facet;
- m_adjEdges[edge0] = edge1;
- facet->m_adjFacets[edge1] = this;
- facet->m_adjEdges[edge1] = edge0;
-
- bool b = m_indices[edge0] == facet->m_indices[incMod3(edge1)] &&
- m_indices[incMod3(edge0)] == facet->m_indices[edge1];
- return b;
-}
-
-bool DT_Facet::computeClosest(const MT_Vector3 *verts)
-{
- const MT_Vector3& p0 = verts[m_indices[0]];
-
- MT_Vector3 v1 = verts[m_indices[1]] - p0;
- MT_Vector3 v2 = verts[m_indices[2]] - p0;
- MT_Scalar v1dv1 = v1.length2();
- MT_Scalar v1dv2 = v1.dot(v2);
- MT_Scalar v2dv2 = v2.length2();
- MT_Scalar p0dv1 = p0.dot(v1);
- MT_Scalar p0dv2 = p0.dot(v2);
-
- m_det = v1dv1 * v2dv2 - v1dv2 * v1dv2; // non-negative
- m_lambda1 = p0dv2 * v1dv2 - p0dv1 * v2dv2;
- m_lambda2 = p0dv1 * v1dv2 - p0dv2 * v1dv1;
-
- if (m_det > MT_Scalar(0.0)) {
- m_closest = p0 + (m_lambda1 * v1 + m_lambda2 * v2) / m_det;
- m_dist2 = m_closest.length2();
- return true;
- }
-
- return false;
-}
-
-void DT_Facet::silhouette(int index, const MT_Vector3& w,
- DT_EdgeBuffer& edgeBuffer)
-{
- if (!m_obsolete) {
- if (m_closest.dot(w) < m_dist2) {
- edgeBuffer.push_back(DT_Edge(this, index));
- }
- else {
- m_obsolete = true; // Facet is visible
- int next = incMod3(index);
- m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer);
- next = incMod3(next);
- m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer);
- }
- }
-}
-
-
diff --git a/extern/solid/src/convex/DT_Facet.h b/extern/solid/src/convex/DT_Facet.h
deleted file mode 100644
index 873706346b8..00000000000
--- a/extern/solid/src/convex/DT_Facet.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_FACET_H
-#define DT_FACET_H
-
-#include <string.h>
-#include <vector>
-
-#include <MT_Vector3.h>
-#include <MT_Point3.h>
-
-class DT_Facet;
-
-
-class DT_Edge {
-public:
- DT_Edge() {}
- DT_Edge(DT_Facet *facet, int index) :
- m_facet(facet),
- m_index(index) {}
-
- DT_Facet *getFacet() const { return m_facet; }
- int getIndex() const { return m_index; }
-
- int getSource() const;
- int getTarget() const;
-
-private:
- DT_Facet *m_facet;
- int m_index;
-};
-
-typedef std::vector<DT_Edge> DT_EdgeBuffer;
-
-
-class DT_Facet {
-public:
- DT_Facet() {}
- DT_Facet(int i0, int i1, int i2)
- : m_obsolete(false)
- {
- m_indices[0] = i0;
- m_indices[1] = i1;
- m_indices[2] = i2;
- }
-
- int operator[](int i) const { return m_indices[i]; }
-
- bool link(int edge0, DT_Facet *facet, int edge1);
-
-
- bool isObsolete() const { return m_obsolete; }
-
-
- bool computeClosest(const MT_Vector3 *verts);
-
- const MT_Vector3& getClosest() const { return m_closest; }
-
- bool isClosestInternal() const
- {
- return m_lambda1 >= MT_Scalar(0.0) &&
- m_lambda2 >= MT_Scalar(0.0) &&
- m_lambda1 + m_lambda2 <= m_det;
- }
-
- MT_Scalar getDist2() const { return m_dist2; }
-
- MT_Point3 getClosestPoint(const MT_Point3 *points) const
- {
- const MT_Point3& p0 = points[m_indices[0]];
-
- return p0 + (m_lambda1 * (points[m_indices[1]] - p0) +
- m_lambda2 * (points[m_indices[2]] - p0)) / m_det;
- }
-
- void silhouette(const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer)
- {
- edgeBuffer.clear();
- m_obsolete = true;
- m_adjFacets[0]->silhouette(m_adjEdges[0], w, edgeBuffer);
- m_adjFacets[1]->silhouette(m_adjEdges[1], w, edgeBuffer);
- m_adjFacets[2]->silhouette(m_adjEdges[2], w, edgeBuffer);
- }
-
-private:
- void silhouette(int index, const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer);
-
- int m_indices[3];
- bool m_obsolete;
- DT_Facet *m_adjFacets[3];
- int m_adjEdges[3];
-
- MT_Scalar m_det;
- MT_Scalar m_lambda1;
- MT_Scalar m_lambda2;
- MT_Vector3 m_closest;
- MT_Scalar m_dist2;
-};
-
-
-inline int incMod3(int i) { return ++i % 3; }
-
-inline int DT_Edge::getSource() const
-{
- return (*m_facet)[m_index];
-}
-
-inline int DT_Edge::getTarget() const
-{
- return (*m_facet)[incMod3(m_index)];
-}
-
-#endif
diff --git a/extern/solid/src/convex/DT_GJK.h b/extern/solid/src/convex/DT_GJK.h
deleted file mode 100644
index d8f44acf85e..00000000000
--- a/extern/solid/src/convex/DT_GJK.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_GJK_H
-#define DT_GJK_H
-
-//#define USE_BACKUP_PROCEDURE
-#define JOHNSON_ROBUST
-#define FAST_CLOSEST
-
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-#include "GEN_MinMax.h"
-#include "DT_Accuracy.h"
-
-
-class DT_GJK {
-private:
- typedef unsigned int T_Bits;
- inline static bool subseteq(T_Bits a, T_Bits b) { return (a & b) == a; }
- inline static bool contains(T_Bits a, T_Bits b) { return (a & b) != 0x0; }
-
-public:
- DT_GJK() :
- m_bits(0x0),
- m_all_bits(0x0)
- {}
-
- bool emptySimplex() const { return m_bits == 0x0; }
- bool fullSimplex() const { return m_bits == 0xf; }
-
- void reset()
- {
- m_bits = 0x0;
- m_all_bits = 0x0;
- }
-
- bool inSimplex(const MT_Vector3& w)
- {
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(m_all_bits, bit) && w == m_y[i])
- {
- return true;
- }
- }
- return false;
- }
-
- void addVertex(const MT_Vector3& w)
- {
- assert(!fullSimplex());
- m_last = 0;
- m_last_bit = 0x1;
- while (contains(m_bits, m_last_bit))
- {
- ++m_last;
- m_last_bit <<= 1;
- }
- m_y[m_last] = w;
- m_ylen2[m_last] = w.length2();
- m_all_bits = m_bits | m_last_bit;
-
- update_cache();
- compute_det();
- }
-
- void addVertex(const MT_Vector3& w, const MT_Point3& p, const MT_Point3& q)
- {
- addVertex(w);
- m_p[m_last] = p;
- m_q[m_last] = q;
- }
-
- int getSimplex(MT_Point3 *pBuf, MT_Point3 *qBuf, MT_Vector3 *yBuf) const
- {
- int num_verts = 0;
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(m_bits, bit))
- {
- pBuf[num_verts] = m_p[i];
- qBuf[num_verts] = m_q[i];
- yBuf[num_verts] = m_y[i];
-
-#ifdef DEBUG
- std::cout << "Point " << i << " = " << m_y[i] << std::endl;
-#endif
-
- ++num_verts;
- }
- }
- return num_verts;
- }
-
- void compute_points(MT_Point3& p1, MT_Point3& p2)
- {
- MT_Scalar sum = MT_Scalar(0.0);
- p1.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
- p2.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(m_bits, bit))
- {
- sum += m_det[m_bits][i];
- p1 += m_p[i] * m_det[m_bits][i];
- p2 += m_q[i] * m_det[m_bits][i];
- }
- }
-
- assert(sum > MT_Scalar(0.0));
- MT_Scalar s = MT_Scalar(1.0) / sum;
- p1 *= s;
- p2 *= s;
- }
-
- bool closest(MT_Vector3& v)
- {
-#ifdef FAST_CLOSEST
- T_Bits s;
- for (s = m_bits; s != 0x0; --s)
- {
- if (subseteq(s, m_bits) && valid(s | m_last_bit))
- {
- m_bits = s | m_last_bit;
- compute_vector(m_bits, v);
- return true;
- }
- }
- if (valid(m_last_bit))
- {
- m_bits = m_last_bit;
- m_maxlen2 = m_ylen2[m_last];
- v = m_y[m_last];
- return true;
- }
-#else
- T_Bits s;
- for (s = m_all_bits; s != 0x0; --s)
- {
- if (subseteq(s, m_all_bits) && valid(s))
- {
- m_bits = s;
- compute_vector(m_bits, v);
- return true;
- }
- }
-#endif
-
- // Original GJK calls the backup procedure at this point.
-#ifdef USE_BACKUP_PROCEDURE
- backup_closest(MT_Vector3& v);
-#endif
- return false;
- }
-
- void backup_closest(MT_Vector3& v)
- {
- MT_Scalar min_dist2 = MT_INFINITY;
-
- T_Bits s;
- for (s = m_all_bits; s != 0x0; --s)
- {
- if (subseteq(s, m_all_bits) && proper(s))
- {
- MT_Vector3 u;
- compute_vector(s, u);
- MT_Scalar dist2 = u.length2();
- if (dist2 < min_dist2)
- {
- min_dist2 = dist2;
- m_bits = s;
- v = u;
- }
- }
- }
- }
-
- MT_Scalar maxVertex() { return m_maxlen2; }
-
-
-private:
- void update_cache();
- void compute_det();
-
- bool valid(T_Bits s)
- {
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(m_all_bits, bit))
- {
- if (contains(s, bit))
- {
- if (m_det[s][i] <= MT_Scalar(0.0))
- {
- return false;
- }
- }
- else if (m_det[s | bit][i] > MT_Scalar(0.0))
- {
- return false;
- }
- }
- }
- return true;
- }
-
- bool proper(T_Bits s)
- {
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(s, bit) && m_det[s][i] <= MT_Scalar(0.0))
- {
- return false;
- }
- }
- return true;
- }
-
- void compute_vector(T_Bits s, MT_Vector3& v)
- {
- m_maxlen2 = MT_Scalar(0.0);
- MT_Scalar sum = MT_Scalar(0.0);
- v .setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(s, bit))
- {
- sum += m_det[s][i];
- GEN_set_max(m_maxlen2, m_ylen2[i]);
- v += m_y[i] * m_det[s][i];
- }
- }
-
- assert(sum > MT_Scalar(0.0));
-
- v /= sum;
- }
-
-private:
- MT_Scalar m_det[16][4]; // cached sub-determinants
- MT_Vector3 m_edge[4][4];
-
-#ifdef JOHNSON_ROBUST
- MT_Scalar m_norm[4][4];
-#endif
-
- MT_Point3 m_p[4]; // support points of object A in local coordinates
- MT_Point3 m_q[4]; // support points of object B in local coordinates
- MT_Vector3 m_y[4]; // support points of A - B in world coordinates
- MT_Scalar m_ylen2[4]; // Squared lengths support points y
-
- MT_Scalar m_maxlen2; // Maximum squared length to a vertex of the current
- // simplex
- T_Bits m_bits; // identifies current simplex
- T_Bits m_last; // identifies last found support point
- T_Bits m_last_bit; // m_last_bit == 0x1 << last
- T_Bits m_all_bits; // m_all_bits == m_bits | m_last_bit
-};
-
-
-
-
-inline void DT_GJK::update_cache()
-{
- int i;
- T_Bits bit;
- for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
- {
- if (contains(m_bits, bit))
- {
- m_edge[i][m_last] = m_y[i] - m_y[m_last];
- m_edge[m_last][i] = -m_edge[i][m_last];
-
-#ifdef JOHNSON_ROBUST
- m_norm[i][m_last] = m_norm[m_last][i] = m_edge[i][m_last].length2();
-#endif
-
- }
- }
-}
-
-#ifdef JOHNSON_ROBUST
-
-inline void DT_GJK::compute_det()
-{
- m_det[m_last_bit][m_last] = 1;
-
- int i;
- T_Bits si;
- for (i = 0, si = 0x1; i < 4; ++i, si <<= 1)
- {
- if (contains(m_bits, si))
- {
- T_Bits s2 = si | m_last_bit;
- m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]);
- m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]);
-
- int j;
- T_Bits sj;
- for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1)
- {
- if (contains(m_bits, sj))
- {
- int k;
- T_Bits s3 = sj | s2;
-
- k = m_norm[i][j] < m_norm[m_last][j] ? i : m_last;
- m_det[s3][j] = m_det[s2][i] * m_edge[k][j].dot(m_y[i]) +
- m_det[s2][m_last] * m_edge[k][j].dot(m_y[m_last]);
- k = m_norm[j][i] < m_norm[m_last][i] ? j : m_last;
- m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[k][i].dot(m_y[j]) +
- m_det[sj|m_last_bit][m_last] * m_edge[k][i].dot(m_y[m_last]);
- k = m_norm[i][m_last] < m_norm[j][m_last] ? i : j;
- m_det[s3][m_last] = m_det[sj|si][j] * m_edge[k][m_last].dot(m_y[j]) +
- m_det[sj|si][i] * m_edge[k][m_last].dot(m_y[i]);
- }
- }
- }
- }
-
- if (m_all_bits == 0xf)
- {
- int k;
-
- k = m_norm[1][0] < m_norm[2][0] ? (m_norm[1][0] < m_norm[3][0] ? 1 : 3) : (m_norm[2][0] < m_norm[3][0] ? 2 : 3);
-
- m_det[0xf][0] = m_det[0xe][1] * m_edge[k][0].dot(m_y[1]) +
- m_det[0xe][2] * m_edge[k][0].dot(m_y[2]) +
- m_det[0xe][3] * m_edge[k][0].dot(m_y[3]);
-
- k = m_norm[0][1] < m_norm[2][1] ? (m_norm[0][1] < m_norm[3][1] ? 0 : 3) : (m_norm[2][1] < m_norm[3][1] ? 2 : 3);
-
- m_det[0xf][1] = m_det[0xd][0] * m_edge[k][1].dot(m_y[0]) +
- m_det[0xd][2] * m_edge[k][1].dot(m_y[2]) +
- m_det[0xd][3] * m_edge[k][1].dot(m_y[3]);
-
- k = m_norm[0][2] < m_norm[1][2] ? (m_norm[0][2] < m_norm[3][2] ? 0 : 3) : (m_norm[1][2] < m_norm[3][2] ? 1 : 3);
-
- m_det[0xf][2] = m_det[0xb][0] * m_edge[k][2].dot(m_y[0]) +
- m_det[0xb][1] * m_edge[k][2].dot(m_y[1]) +
- m_det[0xb][3] * m_edge[k][2].dot(m_y[3]);
-
- k = m_norm[0][3] < m_norm[1][3] ? (m_norm[0][3] < m_norm[2][3] ? 0 : 2) : (m_norm[1][3] < m_norm[2][3] ? 1 : 2);
-
- m_det[0xf][3] = m_det[0x7][0] * m_edge[k][3].dot(m_y[0]) +
- m_det[0x7][1] * m_edge[k][3].dot(m_y[1]) +
- m_det[0x7][2] * m_edge[k][3].dot(m_y[2]);
- }
-}
-
-#else
-
-inline void DT_GJK::compute_det()
-{
- m_det[m_last_bit][m_last] = 1;
-
- int i;
- T_Bits si;
- for (i = 0, si = 0x1; i < 4; ++i, si <<= 1)
- {
- if (contains(m_bits, si))
- {
- T_Bits s2 = si | m_last_bit;
- m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]);
- m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]);
-
- int j;
- T_Bits sj;
- for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1)
- {
- if (contains(m_bits, sj))
- {
- T_Bits s3 = sj | s2;
- m_det[s3][j] = m_det[s2][i] * m_edge[i][j].dot(m_y[i]) +
- m_det[s2][m_last] * m_edge[i][j].dot(m_y[m_last]);
- m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[j][i].dot(m_y[j]) +
- m_det[sj|m_last_bit][m_last] * m_edge[j][i].dot(m_y[m_last]);
- m_det[s3][m_last] = m_det[sj|si][j] * m_edge[j][m_last].dot(m_y[j]) +
- m_det[sj|si][i] * m_edge[j][m_last].dot(m_y[i]);
- }
- }
- }
- }
-
- if (m_all_bits == 0xf)
- {
- m_det[0xf][0] = m_det[0xe][1] * m_edge[1][0].dot(m_y[1]) +
- m_det[0xe][2] * m_edge[1][0].dot(m_y[2]) +
- m_det[0xe][3] * m_edge[1][0].dot(m_y[3]);
- m_det[0xf][1] = m_det[0xd][0] * m_edge[0][1].dot(m_y[0]) +
- m_det[0xd][2] * m_edge[0][1].dot(m_y[2]) +
- m_det[0xd][3] * m_edge[0][1].dot(m_y[3]);
- m_det[0xf][2] = m_det[0xb][0] * m_edge[0][2].dot(m_y[0]) +
- m_det[0xb][1] * m_edge[0][2].dot(m_y[1]) +
- m_det[0xb][3] * m_edge[0][2].dot(m_y[3]);
- m_det[0xf][3] = m_det[0x7][0] * m_edge[0][3].dot(m_y[0]) +
- m_det[0x7][1] * m_edge[0][3].dot(m_y[1]) +
- m_det[0x7][2] * m_edge[0][3].dot(m_y[2]);
- }
-}
-
-#endif
-
-#endif
diff --git a/extern/solid/src/convex/DT_Hull.h b/extern/solid/src/convex/DT_Hull.h
deleted file mode 100644
index a5bf56ae59d..00000000000
--- a/extern/solid/src/convex/DT_Hull.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_HULL_H
-#define DT_HULL_H
-
-#include "DT_Convex.h"
-
-class DT_Hull : public DT_Convex {
-public:
- DT_Hull(const DT_Convex& lchild, const DT_Convex& rchild) :
- m_lchild(lchild),
- m_rchild(rchild)
- {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const
- {
- return GEN_max(m_lchild.supportH(v), m_rchild.supportH(v));
- }
-
- virtual MT_Point3 support(const MT_Vector3& v) const
- {
- MT_Point3 lpnt = m_lchild.support(v);
- MT_Point3 rpnt = m_rchild.support(v);
- return v.dot(lpnt) > v.dot(rpnt) ? lpnt : rpnt;
- }
-
-private:
- const DT_Convex& m_lchild;
- const DT_Convex& m_rchild;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_IndexArray.h b/extern/solid/src/convex/DT_IndexArray.h
deleted file mode 100644
index 95551fa8483..00000000000
--- a/extern/solid/src/convex/DT_IndexArray.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_INDEXARRAY_H
-#define DT_INDEXARRAY_H
-
-#include "SOLID_types.h"
-#include "DT_Array.h"
-
-typedef DT_Array<DT_Index, DT_Count> DT_IndexArray;
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_LineSegment.cpp b/extern/solid/src/convex/DT_LineSegment.cpp
deleted file mode 100644
index 6c7ccf6b9b7..00000000000
--- a/extern/solid/src/convex/DT_LineSegment.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_LineSegment.h"
-
-MT_Scalar DT_LineSegment::supportH(const MT_Vector3& v) const
-{
- return GEN_max(v.dot(m_source), v.dot(m_target));
-}
-
-MT_Point3 DT_LineSegment::support(const MT_Vector3& v) const
-{
- return v.dot(m_source) > v.dot(m_target) ? m_source : m_target;
-}
-
-
diff --git a/extern/solid/src/convex/DT_LineSegment.h b/extern/solid/src/convex/DT_LineSegment.h
deleted file mode 100644
index 979ff8a18a9..00000000000
--- a/extern/solid/src/convex/DT_LineSegment.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_LINESEGMENT_H
-#define DT_LINESEGMENT_H
-
-#include "DT_Convex.h"
-
-class DT_LineSegment : public DT_Convex {
-public:
- DT_LineSegment(const MT_Point3& source, const MT_Point3& target) :
- m_source(source),
- m_target(target) {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
- const MT_Point3& getSource() const { return m_source; }
- const MT_Point3& getTarget() const { return m_target; }
-
-private:
- MT_Point3 m_source;
- MT_Point3 m_target;
-};
-
-#endif
-
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Minkowski.h b/extern/solid/src/convex/DT_Minkowski.h
deleted file mode 100644
index e90fed6a8e0..00000000000
--- a/extern/solid/src/convex/DT_Minkowski.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_MINKOWSKI_H
-#define DT_MINKOWSKI_H
-
-#include "DT_Convex.h"
-
-class DT_Minkowski : public DT_Convex {
-public:
- DT_Minkowski(const DT_Convex& lchild, const DT_Convex& rchild)
- : m_lchild(lchild),
- m_rchild(rchild)
- {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const
- {
- return m_lchild.supportH(v) + m_rchild.supportH(v);
- }
-
- virtual MT_Point3 support(const MT_Vector3& v) const
- {
- return m_lchild.support(v) + (MT_Vector3)m_rchild.support(v);
- }
-
-private:
- const DT_Convex& m_lchild;
- const DT_Convex& m_rchild;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_PenDepth.cpp b/extern/solid/src/convex/DT_PenDepth.cpp
deleted file mode 100644
index e1c5c9a3949..00000000000
--- a/extern/solid/src/convex/DT_PenDepth.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_PenDepth.h"
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-#include "MT_Quaternion.h"
-#include "DT_Convex.h"
-#include "DT_GJK.h"
-#include "DT_Facet.h"
-
-//#define DEBUG
-
-const int MaxSupportPoints = 1000;
-const int MaxFacets = 2000;
-
-static MT_Point3 pBuf[MaxSupportPoints];
-static MT_Point3 qBuf[MaxSupportPoints];
-static MT_Vector3 yBuf[MaxSupportPoints];
-
-static DT_Facet facetBuf[MaxFacets];
-static int freeFacet = 0;
-static DT_Facet *facetHeap[MaxFacets];
-static int num_facets;
-
-class DT_FacetComp {
-public:
-
- bool operator()(const DT_Facet *face1, const DT_Facet *face2)
- {
- return face1->getDist2() > face2->getDist2();
- }
-
-} facetComp;
-
-inline DT_Facet *addFacet(int i0, int i1, int i2,
- MT_Scalar lower2, MT_Scalar upper2)
-{
- assert(i0 != i1 && i0 != i2 && i1 != i2);
- if (freeFacet < MaxFacets)
- {
- DT_Facet *facet = new(&facetBuf[freeFacet++]) DT_Facet(i0, i1, i2);
-#ifdef DEBUG
- std::cout << "Facet " << i0 << ' ' << i1 << ' ' << i2;
-#endif
- if (facet->computeClosest(yBuf))
- {
- if (facet->isClosestInternal() &&
- lower2 <= facet->getDist2() && facet->getDist2() <= upper2)
- {
- facetHeap[num_facets++] = facet;
- std::push_heap(&facetHeap[0], &facetHeap[num_facets], facetComp);
-#ifdef DEBUG
- std::cout << " accepted" << std::endl;
-#endif
- }
- else
- {
-#ifdef DEBUG
- std::cout << " rejected, ";
- if (!facet->isClosestInternal())
- {
- std::cout << "closest point not internal";
- }
- else if (lower2 > facet->getDist2())
- {
- std::cout << "facet is closer than orignal facet";
- }
- else
- {
- std::cout << "facet is further than upper bound";
- }
- std::cout << std::endl;
-#endif
- }
-
- return facet;
- }
- }
-
- return 0;
-}
-
-inline bool originInTetrahedron(const MT_Vector3& p1, const MT_Vector3& p2,
- const MT_Vector3& p3, const MT_Vector3& p4)
-{
- MT_Vector3 normal1 = (p2 - p1).cross(p3 - p1);
- MT_Vector3 normal2 = (p3 - p2).cross(p4 - p2);
- MT_Vector3 normal3 = (p4 - p3).cross(p1 - p3);
- MT_Vector3 normal4 = (p1 - p4).cross(p2 - p4);
-
- return
- normal1.dot(p1) > MT_Scalar(0.0) != normal1.dot(p4) > MT_Scalar(0.0) &&
- normal2.dot(p2) > MT_Scalar(0.0) != normal2.dot(p1) > MT_Scalar(0.0) &&
- normal3.dot(p3) > MT_Scalar(0.0) != normal3.dot(p2) > MT_Scalar(0.0) &&
- normal4.dot(p4) > MT_Scalar(0.0) != normal4.dot(p3) > MT_Scalar(0.0);
-}
-
-
-bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
-
- int num_verts = gjk.getSimplex(pBuf, qBuf, yBuf);
-
- switch (num_verts)
- {
- case 1:
- // Touching contact. Yes, we have a collision,
- // but no penetration.
- return false;
- case 2:
- {
- // We have a line segment inside the Minkowski sum containing the
- // origin. Blow it up by adding three additional support points.
-
- MT_Vector3 dir = (yBuf[1] - yBuf[0]).normalized();
- int axis = dir.furthestAxis();
-
- static MT_Scalar sin_60 = MT_sqrt(MT_Scalar(3.0)) * MT_Scalar(0.5);
-
- MT_Quaternion rot(dir[0] * sin_60, dir[1] * sin_60, dir[2] * sin_60, MT_Scalar(0.5));
- MT_Matrix3x3 rot_mat(rot);
-
- MT_Vector3 aux1 = dir.cross(MT_Vector3(axis == 0, axis == 1, axis == 2));
- MT_Vector3 aux2 = rot_mat * aux1;
- MT_Vector3 aux3 = rot_mat * aux2;
-
- pBuf[2] = a.support(aux1);
- qBuf[2] = b.support(-aux1);
- yBuf[2] = pBuf[2] - qBuf[2];
-
- pBuf[3] = a.support(aux2);
- qBuf[3] = b.support(-aux2);
- yBuf[3] = pBuf[3] - qBuf[3];
-
- pBuf[4] = a.support(aux3);
- qBuf[4] = b.support(-aux3);
- yBuf[4] = pBuf[4] - qBuf[4];
-
- if (originInTetrahedron(yBuf[0], yBuf[2], yBuf[3], yBuf[4]))
- {
- pBuf[1] = pBuf[4];
- qBuf[1] = qBuf[4];
- yBuf[1] = yBuf[4];
- }
- else if (originInTetrahedron(yBuf[1], yBuf[2], yBuf[3], yBuf[4]))
- {
- pBuf[0] = pBuf[4];
- qBuf[0] = qBuf[4];
- yBuf[0] = yBuf[4];
- }
- else
- {
- // Origin not in initial polytope
- return false;
- }
-
- num_verts = 4;
-
- break;
- }
- case 3:
- {
- // We have a triangle inside the Minkowski sum containing
- // the origin. First blow it up.
-
- MT_Vector3 v1 = yBuf[1] - yBuf[0];
- MT_Vector3 v2 = yBuf[2] - yBuf[0];
- MT_Vector3 vv = v1.cross(v2);
-
- pBuf[3] = a.support(vv);
- qBuf[3] = b.support(-vv);
- yBuf[3] = pBuf[3] - qBuf[3];
- pBuf[4] = a.support(-vv);
- qBuf[4] = b.support(vv);
- yBuf[4] = pBuf[4] - qBuf[4];
-
-
- if (originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[4]))
- {
- pBuf[3] = pBuf[4];
- qBuf[3] = qBuf[4];
- yBuf[3] = yBuf[4];
- }
- else if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3]))
- {
- // Origin not in initial polytope
- return false;
- }
-
- num_verts = 4;
-
- break;
- }
- }
-
- // We have a tetrahedron inside the Minkowski sum containing
- // the origin (if GJK did it's job right ;-)
-
-
- if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3]))
- {
- // assert(false);
- return false;
- }
-
- num_facets = 0;
- freeFacet = 0;
-
- DT_Facet *f0 = addFacet(0, 1, 2, MT_Scalar(0.0), MT_INFINITY);
- DT_Facet *f1 = addFacet(0, 3, 1, MT_Scalar(0.0), MT_INFINITY);
- DT_Facet *f2 = addFacet(0, 2, 3, MT_Scalar(0.0), MT_INFINITY);
- DT_Facet *f3 = addFacet(1, 3, 2, MT_Scalar(0.0), MT_INFINITY);
-
- if (!f0 || f0->getDist2() == MT_Scalar(0.0) ||
- !f1 || f1->getDist2() == MT_Scalar(0.0) ||
- !f2 || f2->getDist2() == MT_Scalar(0.0) ||
- !f3 || f3->getDist2() == MT_Scalar(0.0))
- {
- return false;
- }
-
- f0->link(0, f1, 2);
- f0->link(1, f3, 2);
- f0->link(2, f2, 0);
- f1->link(0, f2, 2);
- f1->link(1, f3, 0);
- f2->link(1, f3, 1);
-
- if (num_facets == 0)
- {
- return false;
- }
-
- // at least one facet on the heap.
-
- DT_EdgeBuffer edgeBuffer(20);
-
- DT_Facet *facet = 0;
-
- MT_Scalar upper_bound2 = MT_INFINITY;
-
- do {
- facet = facetHeap[0];
- std::pop_heap(&facetHeap[0], &facetHeap[num_facets], facetComp);
- --num_facets;
-
- if (!facet->isObsolete())
- {
- assert(facet->getDist2() > MT_Scalar(0.0));
-
- if (num_verts == MaxSupportPoints)
- {
-#ifdef DEBUG
- std::cout << "Ouch, no convergence!!!" << std::endl;
-#endif
- assert(false);
- break;
- }
-
- pBuf[num_verts] = a.support(facet->getClosest());
- qBuf[num_verts] = b.support(-facet->getClosest());
- yBuf[num_verts] = pBuf[num_verts] - qBuf[num_verts];
-
- int index = num_verts++;
- MT_Scalar far_dist2 = yBuf[index].dot(facet->getClosest());
-
- // Make sure the support mapping is OK.
- assert(far_dist2 > MT_Scalar(0.0));
-
- GEN_set_min(upper_bound2, far_dist2 * far_dist2 / facet->getDist2());
-
- if (upper_bound2 <= DT_Accuracy::depth_tolerance * facet->getDist2()
-#define CHECK_NEW_SUPPORT
-#ifdef CHECK_NEW_SUPPORT
- || yBuf[index] == yBuf[(*facet)[0]]
- || yBuf[index] == yBuf[(*facet)[1]]
- || yBuf[index] == yBuf[(*facet)[2]]
-#endif
- )
- {
- break;
- }
-
- // Compute the silhouette cast by the new vertex
- // Note that the new vertex is on the positive side
- // of the current facet, so the current facet is will
- // not be in the convex hull. Start local search
- // from this facet.
-
- facet->silhouette(yBuf[index], edgeBuffer);
-
- if (edgeBuffer.empty())
- {
- return false;
- }
-
- DT_EdgeBuffer::const_iterator it = edgeBuffer.begin();
- DT_Facet *firstFacet =
- addFacet((*it).getTarget(), (*it).getSource(),
- index, facet->getDist2(), upper_bound2);
-
- if (!firstFacet)
- {
- break;
- }
-
- firstFacet->link(0, (*it).getFacet(), (*it).getIndex());
- DT_Facet *lastFacet = firstFacet;
-
- ++it;
- for (; it != edgeBuffer.end(); ++it)
- {
- DT_Facet *newFacet =
- addFacet((*it).getTarget(), (*it).getSource(),
- index, facet->getDist2(), upper_bound2);
-
- if (!newFacet)
- {
- break;
- }
-
- if (!newFacet->link(0, (*it).getFacet(), (*it).getIndex()))
- {
- break;
- }
-
- if (!newFacet->link(2, lastFacet, 1))
- {
- break;
- }
-
- lastFacet = newFacet;
- }
- if (it != edgeBuffer.end())
- {
- break;
- }
-
- firstFacet->link(2, lastFacet, 1);
- }
- }
- while (num_facets > 0 && facetHeap[0]->getDist2() <= upper_bound2);
-
-#ifdef DEBUG
- std::cout << "#facets left = " << num_facets << std::endl;
-#endif
-
- v = facet->getClosest();
- pa = facet->getClosestPoint(pBuf);
- pb = facet->getClosestPoint(qBuf);
- return true;
-}
-
diff --git a/extern/solid/src/convex/DT_PenDepth.h b/extern/solid/src/convex/DT_PenDepth.h
deleted file mode 100644
index 97b3c6c0e0e..00000000000
--- a/extern/solid/src/convex/DT_PenDepth.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_PENDEPTH_H
-#define DT_PENDEPTH_H
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-
-class DT_GJK;
-class DT_Convex;
-
-bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b,
- MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-#endif
diff --git a/extern/solid/src/convex/DT_Point.cpp b/extern/solid/src/convex/DT_Point.cpp
deleted file mode 100644
index 770fe7775b7..00000000000
--- a/extern/solid/src/convex/DT_Point.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Point.h"
-
-MT_Scalar DT_Point::supportH(const MT_Vector3& v) const
-{
- return v.dot(m_point);
-}
-
-MT_Point3 DT_Point::support(const MT_Vector3& v) const
-{
- return m_point;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Point.h b/extern/solid/src/convex/DT_Point.h
deleted file mode 100644
index b35d158ee53..00000000000
--- a/extern/solid/src/convex/DT_Point.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POINT_H
-#define DT_POINT_H
-
-#include "DT_Convex.h"
-
-class DT_Point : public DT_Convex {
-public:
- DT_Point(const MT_Point3& point) : m_point(point) {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
-private:
- MT_Point3 m_point;
-};
-
-#endif
-
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Polyhedron.cpp b/extern/solid/src/convex/DT_Polyhedron.cpp
deleted file mode 100644
index f48ac6e4b6d..00000000000
--- a/extern/solid/src/convex/DT_Polyhedron.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Polyhedron.h"
-
-#ifdef QHULL
-
-extern "C" {
-#include <qhull/qhull_a.h>
-}
-
-#include <vector>
-#include <new>
-
-typedef std::vector<MT_Point3> T_VertexBuf;
-typedef std::vector<DT_Index> T_IndexBuf;
-typedef std::vector<T_IndexBuf> T_MultiIndexBuf;
-
-static char options[] = "qhull Qts i Tv";
-
-#define DK_HIERARCHY
-
-T_IndexBuf *adjacency_graph(DT_Count count, const MT_Point3 *verts, const char *flags)
-{
- int curlong, totlong, exitcode;
-
- facetT *facet;
- vertexT *vertex;
- vertexT **vertexp;
-
- std::vector<MT::Tuple3<coordT> > array;
- T_IndexBuf index;
- DT_Index i;
- for (i = 0; i != count; ++i)
- {
- if (flags == 0 || flags[i])
- {
- array.push_back(MT::Tuple3<coordT>(verts[i]));
- index.push_back(i);
- }
- }
-
- qh_init_A(stdin, stdout, stderr, 0, NULL);
- if ((exitcode = setjmp(qh errexit)))
- {
- exit(exitcode);
- }
- qh_initflags(options);
- qh_init_B(array[0], array.size(), 3, False);
- qh_qhull();
- qh_check_output();
-
- T_IndexBuf *indexBuf = new T_IndexBuf[count];
- FORALLfacets
- {
- setT *vertices = qh_facet3vertex(facet);
-
- T_IndexBuf facetIndices;
-
- FOREACHvertex_(vertices)
- {
- facetIndices.push_back(index[qh_pointid(vertex->point)]);
- }
- int i, j;
- for (i = 0, j = facetIndices.size()-1; i < (int)facetIndices.size(); j = i++)
- {
- indexBuf[facetIndices[j]].push_back(facetIndices[i]);
- }
- }
-
-
- qh NOerrexit = True;
- qh_freeqhull(!qh_ALL);
- qh_memfreeshort(&curlong, &totlong);
-
- return indexBuf;
-}
-
-T_IndexBuf *simplex_adjacency_graph(DT_Count count, const char *flags)
-{
- T_IndexBuf *indexBuf = new T_IndexBuf[count];
-
- DT_Index index[4];
-
- DT_Index k = 0;
- DT_Index i;
- for (i = 0; i != count; ++i)
- {
- if (flags == 0 || flags[i])
- {
- index[k++] = i;
- }
- }
-
- assert(k <= 4);
-
- for (i = 0; i != k; ++i)
- {
- DT_Index j;
- for (j = 0; j != k; ++j)
- {
- if (i != j)
- {
- indexBuf[index[i]].push_back(index[j]);
- }
- }
- }
-
- return indexBuf;
-}
-
-#ifdef DK_HIERARCHY
-
-void prune(DT_Count count, T_MultiIndexBuf *cobound)
-{
- DT_Index i;
- for (i = 0; i != count; ++i)
- {
- assert(cobound[i].size());
-
- DT_Index j;
- for (j = 0; j != cobound[i].size() - 1; ++j)
- {
- T_IndexBuf::iterator it = cobound[i][j].begin();
- while (it != cobound[i][j].end())
- {
- T_IndexBuf::iterator jt =
- std::find(cobound[i][j+1].begin(), cobound[i][j+1].end(), *it);
-
- if (jt != cobound[i][j+1].end())
- {
- std::swap(*it, cobound[i][j].back());
- cobound[i][j].pop_back();
- }
- else
- {
- ++it;
- }
- }
- }
- }
-}
-
-#endif
-
-DT_Polyhedron::DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices)
-{
- assert(count);
-
- std::vector<MT_Point3> vertexBuf;
- DT_Index i;
- for (i = 0; i != count; ++i)
- {
- vertexBuf.push_back((*base)[indices[i]]);
- }
-
- T_IndexBuf *indexBuf = count > 4 ? adjacency_graph(count, &vertexBuf[0], 0) : simplex_adjacency_graph(count, 0);
-
- std::vector<MT_Point3> pointBuf;
-
- for (i = 0; i != count; ++i)
- {
- if (!indexBuf[i].empty())
- {
- pointBuf.push_back(vertexBuf[i]);
- }
- }
-
- delete [] indexBuf;
-
- m_count = pointBuf.size();
- m_verts = new MT_Point3[m_count];
- std::copy(pointBuf.begin(), pointBuf.end(), &m_verts[0]);
-
- T_MultiIndexBuf *cobound = new T_MultiIndexBuf[m_count];
- char *flags = new char[m_count];
- std::fill(&flags[0], &flags[m_count], 1);
-
- DT_Count num_layers = 0;
- DT_Count layer_count = m_count;
- while (layer_count > 4)
- {
- T_IndexBuf *indexBuf = adjacency_graph(m_count, m_verts, flags);
-
- DT_Index i;
- for (i = 0; i != m_count; ++i)
- {
- if (flags[i])
- {
- assert(!indexBuf[i].empty());
- cobound[i].push_back(indexBuf[i]);
- }
- }
-
- ++num_layers;
-
- delete [] indexBuf;
-
- std::fill(&flags[0], &flags[m_count], 0);
-
- for (i = 0; i != m_count; ++i)
- {
- if (cobound[i].size() == num_layers)
- {
- T_IndexBuf& curr_cobound = cobound[i].back();
- if (!flags[i] && curr_cobound.size() <= 8)
- {
- DT_Index j;
- for (j = 0; j != curr_cobound.size(); ++j)
- {
- flags[curr_cobound[j]] = 1;
- }
- }
- }
- }
-
- layer_count = 0;
-
- for (i = 0; i != m_count; ++i)
- {
- if (flags[i])
- {
- ++layer_count;
- }
- }
- }
-
- indexBuf = simplex_adjacency_graph(m_count, flags);
-
- for (i = 0; i != m_count; ++i)
- {
- if (flags[i])
- {
- assert(!indexBuf[i].empty());
- cobound[i].push_back(indexBuf[i]);
- }
- }
-
- ++num_layers;
-
- delete [] indexBuf;
- delete [] flags;
-
-
-
-#ifdef DK_HIERARCHY
- prune(m_count, cobound);
-#endif
-
- m_cobound = new T_MultiIndexArray[m_count];
-
- for (i = 0; i != m_count; ++i)
- {
- new (&m_cobound[i]) T_MultiIndexArray(cobound[i].size());
-
- DT_Index j;
- for (j = 0; j != cobound[i].size(); ++j)
- {
- new (&m_cobound[i][j]) DT_IndexArray(cobound[i][j].size(), &cobound[i][j][0]);
- }
- }
-
- delete [] cobound;
-
- m_start_vertex = 0;
- while (m_cobound[m_start_vertex].size() != num_layers)
- {
- ++m_start_vertex;
- assert(m_start_vertex < m_count);
- }
-
- m_curr_vertex = m_start_vertex;
-}
-
-
-DT_Polyhedron::~DT_Polyhedron()
-{
- delete [] m_verts;
- delete [] m_cobound;
-}
-
-#ifdef DK_HIERARCHY
-
-MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const
-{
- m_curr_vertex = m_start_vertex;
- MT_Scalar d = (*this)[m_curr_vertex].dot(v);
- MT_Scalar h = d;
- int curr_layer;
- for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer)
- {
- const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1];
- DT_Index i;
- for (i = 0; i != curr_cobound.size(); ++i)
- {
- d = (*this)[curr_cobound[i]].dot(v);
- if (d > h)
- {
- m_curr_vertex = curr_cobound[i];
- h = d;
- }
- }
- }
-
- return h;
-}
-
-MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const
-{
- m_curr_vertex = m_start_vertex;
- MT_Scalar d = (*this)[m_curr_vertex].dot(v);
- MT_Scalar h = d;
- int curr_layer;
- for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer)
- {
- const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1];
- DT_Index i;
- for (i = 0; i != curr_cobound.size(); ++i)
- {
- d = (*this)[curr_cobound[i]].dot(v);
- if (d > h)
- {
- m_curr_vertex = curr_cobound[i];
- h = d;
- }
- }
- }
-
- return (*this)[m_curr_vertex];
-}
-
-#else
-
-MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const
-{
- int last_vertex = -1;
- MT_Scalar d = (*this)[m_curr_vertex].dot(v);
- MT_Scalar h = d;
-
- for (;;)
- {
- DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0];
- int i = 0, n = curr_cobound.size();
- while (i != n &&
- (curr_cobound[i] == last_vertex ||
- (d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON))
- {
- ++i;
- }
-
- if (i == n)
- {
- break;
- }
-
- last_vertex = m_curr_vertex;
- m_curr_vertex = curr_cobound[i];
- h = d;
- }
- return h;
-}
-
-MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const
-{
- int last_vertex = -1;
- MT_Scalar d = (*this)[m_curr_vertex].dot(v);
- MT_Scalar h = d;
-
- for (;;)
- {
- DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0];
- int i = 0, n = curr_cobound.size();
- while (i != n &&
- (curr_cobound[i] == last_vertex ||
- (d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON))
- {
- ++i;
- }
-
- if (i == n)
- {
- break;
- }
-
- last_vertex = m_curr_vertex;
- m_curr_vertex = curr_cobound[i];
- h = d;
- }
- return (*this)[m_curr_vertex];
-}
-
-#endif
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_Polyhedron.h b/extern/solid/src/convex/DT_Polyhedron.h
deleted file mode 100644
index 58c991bd152..00000000000
--- a/extern/solid/src/convex/DT_Polyhedron.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POLYHEDRON_H
-#define DT_POLYHEDRON_H
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-# if HAVE_QHULL_QHULL_A_H
-# define QHULL
-# endif
-#endif
-
-
-#ifdef QHULL
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Polyhedron : public DT_Convex {
- typedef DT_Array<DT_IndexArray> T_MultiIndexArray;
-public:
- DT_Polyhedron()
- : m_verts(0),
- m_cobound(0)
- {}
-
- DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices);
-
- virtual ~DT_Polyhedron();
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
- const MT_Point3& operator[](int i) const { return m_verts[i]; }
- DT_Count numVerts() const { return m_count; }
-
-private:
- DT_Count m_count;
- MT_Point3 *m_verts;
- T_MultiIndexArray *m_cobound;
- DT_Index m_start_vertex;
- mutable DT_Index m_curr_vertex;
-};
-
-#else
-
-#include "DT_Polytope.h"
-
-typedef DT_Polytope DT_Polyhedron;
-
-#endif
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_Polytope.cpp b/extern/solid/src/convex/DT_Polytope.cpp
deleted file mode 100644
index e757c3bfdb4..00000000000
--- a/extern/solid/src/convex/DT_Polytope.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Polytope.h"
-
-MT_BBox DT_Polytope::bbox() const
-{
- MT_BBox bbox = (*this)[0];
- DT_Index i;
- for (i = 1; i < numVerts(); ++i)
- {
- bbox = bbox.hull((*this)[i]);
- }
- return bbox;
-}
-
-MT_Scalar DT_Polytope::supportH(const MT_Vector3& v) const
-{
- int c = 0;
- MT_Scalar h = (*this)[0].dot(v), d;
- DT_Index i;
- for (i = 1; i < numVerts(); ++i)
- {
- if ((d = (*this)[i].dot(v)) > h)
- {
- c = i;
- h = d;
- }
- }
- return h;
-}
-
-MT_Point3 DT_Polytope::support(const MT_Vector3& v) const
-{
- int c = 0;
- MT_Scalar h = (*this)[0].dot(v), d;
- DT_Index i;
- for (i = 1; i < numVerts(); ++i)
- {
- if ((d = (*this)[i].dot(v)) > h)
- {
- c = i;
- h = d;
- }
- }
- return (*this)[c];
-}
-
-
diff --git a/extern/solid/src/convex/DT_Polytope.h b/extern/solid/src/convex/DT_Polytope.h
deleted file mode 100644
index c715598defe..00000000000
--- a/extern/solid/src/convex/DT_Polytope.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POLYTOPE_H
-#define DT_POLYTOPE_H
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Polytope : public DT_Convex {
-public:
- DT_Polytope() {}
- DT_Polytope(const DT_VertexBase *base, DT_Count count, const DT_Index *indices)
- : m_base(base),
- m_index(count, indices)
- {}
-
- virtual MT_BBox bbox() const;
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
- MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; }
- DT_Count numVerts() const { return m_index.size(); }
-
-protected:
- const DT_VertexBase *m_base;
- DT_IndexArray m_index;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Shape.h b/extern/solid/src/convex/DT_Shape.h
deleted file mode 100644
index d48942fe515..00000000000
--- a/extern/solid/src/convex/DT_Shape.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SHAPE_H
-#define DT_SHAPE_H
-
-#include <algorithm>
-
-#include "MT_BBox.h"
-
-#include "MT_Transform.h"
-
-class DT_Object;
-
-enum DT_ShapeType {
- COMPLEX,
- CONVEX
-};
-
-class DT_Shape {
-public:
- virtual ~DT_Shape() {}
- virtual DT_ShapeType getType() const = 0;
- virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const = 0;
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const = 0;
-
-protected:
- DT_Shape() {}
-};
-
-typedef bool (*Intersect)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3&);
-
-typedef bool (*Common_point)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3&, MT_Point3&, MT_Point3&);
-
-typedef bool (*Penetration_depth)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Vector3&, MT_Point3&, MT_Point3&);
-
-typedef MT_Scalar (*Closest_points)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
- const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
- MT_Point3&, MT_Point3&);
-
-#endif
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Sphere.cpp b/extern/solid/src/convex/DT_Sphere.cpp
deleted file mode 100644
index 3f2443dcf53..00000000000
--- a/extern/solid/src/convex/DT_Sphere.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Sphere.h"
-#include "GEN_MinMax.h"
-
-MT_Scalar DT_Sphere::supportH(const MT_Vector3& v) const
-{
- return m_radius * v.length();
-}
-
-MT_Point3 DT_Sphere::support(const MT_Vector3& v) const
-{
- MT_Scalar s = v.length();
-
- if (s > MT_Scalar(0.0))
- {
- s = m_radius / s;
- return MT_Point3(v[0] * s, v[1] * s, v[2] * s);
- }
- else
- {
- return MT_Point3(m_radius, MT_Scalar(0.0), MT_Scalar(0.0));
- }
-}
-
-bool DT_Sphere::ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const
-{
- MT_Vector3 r = target - source;
- MT_Scalar delta = -source.dot(r);
- MT_Scalar r_length2 = r.length2();
- MT_Scalar sigma = delta * delta - r_length2 * (source.length2() - m_radius * m_radius);
-
- if (sigma >= MT_Scalar(0.0))
- // The line trough source and target intersects the sphere.
- {
- MT_Scalar sqrt_sigma = MT_sqrt(sigma);
- // We need only the sign of lambda2, so the division by the positive
- // r_length2 can be left out.
- MT_Scalar lambda2 = (delta + sqrt_sigma) /* / r_length2 */ ;
- if (lambda2 >= MT_Scalar(0.0))
- // The ray points at the sphere
- {
- MT_Scalar lambda1 = (delta - sqrt_sigma) / r_length2;
- if (lambda1 <= param)
- // The ray hits the sphere, since
- // [lambda1, lambda2] overlaps [0, param].
- {
- if (lambda1 > MT_Scalar(0.0))
- {
- param = lambda1;
- normal = (source + r * lambda1) / m_radius;
- // NB: division by m_radius to normalize the normal.
- }
- else
- {
- param = MT_Scalar(0.0);
- normal.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
- }
-
- return true;
- }
- }
- }
-
- return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Sphere.h b/extern/solid/src/convex/DT_Sphere.h
deleted file mode 100644
index 92386a66f3a..00000000000
--- a/extern/solid/src/convex/DT_Sphere.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SPHERE_H
-#define DT_SPHERE_H
-
-#include "DT_Convex.h"
-
-class DT_Sphere : public DT_Convex {
-public:
- DT_Sphere(MT_Scalar radius) : m_radius(radius) {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
-
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const;
-
-protected:
- MT_Scalar m_radius;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Transform.h b/extern/solid/src/convex/DT_Transform.h
deleted file mode 100644
index a976d48d22b..00000000000
--- a/extern/solid/src/convex/DT_Transform.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_TRANSFORM_H
-#define DT_TRANSFORM_H
-
-#include "DT_Convex.h"
-
-class DT_Transform : public DT_Convex {
-public:
- DT_Transform(const MT_Transform& xform, const DT_Convex& child) :
- m_xform(xform),
- m_child(child)
- {}
-
- virtual MT_Scalar supportH(const MT_Vector3& v) const
- {
- return m_child.supportH(v * m_xform.getBasis()) +
- v.dot(m_xform.getOrigin());
- }
-
- virtual MT_Point3 support(const MT_Vector3& v) const
- {
- return m_xform(m_child.support(v * m_xform.getBasis()));
- }
-
-private:
- const MT_Transform& m_xform;
- const DT_Convex& m_child;
-};
-
-
-#endif
diff --git a/extern/solid/src/convex/DT_Triangle.cpp b/extern/solid/src/convex/DT_Triangle.cpp
deleted file mode 100644
index 1917910b39d..00000000000
--- a/extern/solid/src/convex/DT_Triangle.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-//#define BACKFACE_CULLING
-
-#include "DT_Triangle.h"
-
-MT_BBox DT_Triangle::bbox() const
-{
- return MT_BBox((*this)[0]).hull((*this)[1]).hull((*this)[2]);
-}
-
-MT_Scalar DT_Triangle::supportH(const MT_Vector3& v) const
-{
- return GEN_max(GEN_max(v.dot((*this)[0]), v.dot((*this)[1])), v.dot((*this)[2]));
-}
-
-MT_Point3 DT_Triangle::support(const MT_Vector3& v) const
-{
- MT_Vector3 dots(v.dot((*this)[0]), v.dot((*this)[1]), v.dot((*this)[2]));
-
- return (*this)[dots.maxAxis()];
-}
-
-bool DT_Triangle::ray_cast(const MT_Point3& source, const MT_Point3& target,
- MT_Scalar& param, MT_Vector3& normal) const
-{
- MT_Vector3 d1 = (*this)[1] - (*this)[0];
- MT_Vector3 d2 = (*this)[2] - (*this)[0];
- MT_Vector3 n = d1.cross(d2);
- MT_Vector3 r = target - source;
- MT_Scalar delta = -r.dot(n);
-
- MT_Scalar rounding_error = GEN_max(GEN_max(MT_abs(n[0]), MT_abs(n[1])), MT_abs(n[2])) * MT_EPSILON;
-
-#ifdef BACKFACE_CULLING
- if (delta > rounding_error)
-#else
- if (MT_abs(delta) > rounding_error)
-#endif
- // The ray is not parallel to the triangle's plane.
- // (Coplanar rays are ignored.)
- {
- MT_Vector3 b = source - (*this)[0];
- MT_Scalar lambda = b.dot(n) / delta;
-
- if (MT_Scalar(0.0) <= lambda && lambda <= param)
- // The ray intersects the triangle's plane.
- {
- MT_Vector3 u = b.cross(r);
- MT_Scalar mu1 = d2.dot(u) / delta;
-
- if (MT_Scalar(0.0) <= mu1 && mu1 <= MT_Scalar(1.0))
- {
- MT_Scalar mu2 = -d1.dot(u) / delta;
-
- if (MT_Scalar(0.0) <= mu2 && mu1 + mu2 <= MT_Scalar(1.0))
- // The ray intersects the triangle.
- {
- param = lambda;
- // Return a normal that points at the source.
-#ifdef BACKFACE_CULLING
- normal = n;
-#else
- normal = delta > MT_Scalar(0.0) ? n : -n;
-#endif
- return true;
- }
- }
- }
- }
-
- return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Triangle.h b/extern/solid/src/convex/DT_Triangle.h
deleted file mode 100644
index 4192b5629ac..00000000000
--- a/extern/solid/src/convex/DT_Triangle.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_TRIANGLE_H
-#define DT_TRIANGLE_H
-
-#include "SOLID_types.h"
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Triangle : public DT_Convex {
-public:
- DT_Triangle(const DT_VertexBase *base, DT_Index i0, DT_Index i1, DT_Index i2) :
- m_base(base)
- {
- m_index[0] = i0;
- m_index[1] = i1;
- m_index[2] = i2;
- }
-
- DT_Triangle(const DT_VertexBase *base, const DT_Index *index) :
- m_base(base)
- {
- m_index[0] = index[0];
- m_index[1] = index[1];
- m_index[2] = index[2];
- }
-
- virtual MT_BBox bbox() const;
- virtual MT_Scalar supportH(const MT_Vector3& v) const;
- virtual MT_Point3 support(const MT_Vector3& v) const;
- virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const;
-
- MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; }
-
-private:
- const DT_VertexBase *m_base;
- DT_Index m_index[3];
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_VertexBase.h b/extern/solid/src/convex/DT_VertexBase.h
deleted file mode 100644
index 37646fdd935..00000000000
--- a/extern/solid/src/convex/DT_VertexBase.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- *
- * Copyright (C) 2001-2003 Dtecta. All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either
- * the QPL or the GPL requires an additional license from Dtecta.
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_VERTEXBASE_H
-#define DT_VERTEXBASE_H
-
-#include "MT_Point3.h"
-
-#include <vector>
-
-class DT_Complex;
-
-typedef std::vector<DT_Complex *>DT_ComplexList;
-
-class DT_VertexBase {
-public:
- explicit DT_VertexBase(const void *base = 0, DT_Size stride = 0, bool owner = false) :
- m_base((char *)base),
- m_stride(stride ? stride : 3 * sizeof(DT_Scalar)),
- m_owner(owner)
- {}
-
- ~DT_VertexBase()
- {
- if (m_owner)
- {
- delete [] m_base;
- }
- }
-
- MT_Point3 operator[](DT_Index i) const
- {
- return MT_Point3(reinterpret_cast<DT_Scalar *>(m_base + i * m_stride));
- }
-
- void setPointer(const void *base, bool owner = false)
- {
- m_base = (char *)base;
- m_owner = owner;
- }
-
- const void *getPointer() const { return m_base; }
- bool isOwner() const { return m_owner; }
-
- void addComplex(DT_Complex *complex) const { m_complexList.push_back(complex); }
- void removeComplex(DT_Complex *complex) const
- {
- DT_ComplexList::iterator it = std::find(m_complexList.begin(), m_complexList.end(), complex);
- if (it != m_complexList.end())
- {
- m_complexList.erase(it);
- }
- }
-
- const DT_ComplexList& getComplexList() const { return m_complexList; }
-
-private:
- char *m_base;
- DT_Size m_stride;
- bool m_owner;
- mutable DT_ComplexList m_complexList;
-};
-
-#endif
diff --git a/extern/solid/src/convex/Makefile b/extern/solid/src/convex/Makefile
deleted file mode 100644
index 75fa578a292..00000000000
--- a/extern/solid/src/convex/Makefile
+++ /dev/null
@@ -1,41 +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 = solid_convex
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk
-
-
diff --git a/intern/bsp/test/Makefile b/intern/bsp/test/Makefile
index eebf7470a0f..91e4497b267 100644
--- a/intern/bsp/test/Makefile
+++ b/intern/bsp/test/Makefile
@@ -47,7 +47,7 @@ SLIBS += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
SLIBS += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
SLIBS += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
-ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd"))
+ifeq ($(OS),$(findstring $(OS), "darwin linux freebsd openbsd"))
LLIBS = -L/usr/X11R6/lib -lglut -pthread -lXi -lXmu
endif
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index c3158214830..c0b7077fb53 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -367,6 +367,17 @@ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
GHOST_TInt32 x,
GHOST_TInt32 y);
+/**
+ * Grabs the cursor for a modal operation, to keep receiving
+ * events when the mouse is outside the window. X11 only, others
+ * do this automatically.
+ * @param windowhandle The handle to the window
+ * @param grab The new grab state of the cursor.
+ * @return Indication of success.
+ */
+extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
+ int grab);
+
/***************************************************************************************
** Access to mouse button and keyboard states.
***************************************************************************************/
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 0861d8b8946..d91995e35ec 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -252,6 +252,14 @@ public:
* @return Indication of success.
*/
virtual GHOST_TSuccess setCursorVisibility(bool visible) = 0;
+
+ /**
+ * Grabs the cursor for a modal operation.
+ * @param grab The new grab state of the cursor.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setCursorGrab(bool grab) { return GHOST_kSuccess; };
+
};
#endif // _GHOST_IWINDOW_H_
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 401dba8d240..5c23b6c42a3 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -354,6 +354,14 @@ GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
}
+GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
+ int grab)
+{
+ GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+
+ return window->setCursorGrab(grab?true:false);
+}
+
GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
GHOST_TModifierKeyMask mask,
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index a975322e9ce..fcf78d9ad20 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -550,11 +550,26 @@ GHOST_SystemX11::processEvent(XEvent *xe)
// We're not interested in the following things.(yet...)
case NoExpose :
case GraphicsExpose :
+ break;
case EnterNotify:
case LeaveNotify:
+ {
// XCrossingEvents pointer leave enter window.
+ // also do cursor move here, MotionNotify only
+ // happens when motion starts & ends inside window
+ XCrossingEvent &xce = xe->xcrossing;
+
+ g_event = new
+ GHOST_EventCursor(
+ getMilliSeconds(),
+ GHOST_kEventCursorMove,
+ window,
+ xce.x_root,
+ xce.y_root
+ );
break;
+ }
case MapNotify:
/*
* From ICCCM:
diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp
index a35680d1586..dee890830a1 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -50,6 +50,7 @@ GHOST_Window::GHOST_Window(
:
m_drawingContextType(type),
m_cursorVisible(true),
+ m_cursorGrabbed(true),
m_cursorShape(GHOST_kStandardCursorDefault),
m_stereoVisual(stereoVisual)
{
@@ -93,6 +94,20 @@ GHOST_TSuccess GHOST_Window::setCursorVisibility(bool visible)
}
}
+GHOST_TSuccess GHOST_Window::setCursorGrab(bool grab)
+{
+ if(m_cursorGrabbed == grab)
+ return GHOST_kSuccess;
+
+ if (setWindowCursorGrab(grab)) {
+ m_cursorGrabbed = grab;
+ return GHOST_kSuccess;
+ }
+ else {
+ return GHOST_kFailure;
+ }
+}
+
GHOST_TSuccess GHOST_Window::setCursorShape(GHOST_TStandardCursor cursorShape)
{
if (setWindowCursorShape(cursorShape)) {
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 06318613b14..88178bae5b3 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -167,6 +167,13 @@ public:
virtual GHOST_TSuccess setCursorVisibility(bool visible);
/**
+ * Sets the cursor grab.
+ * @param grab The new grab state of the cursor.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setCursorGrab(bool grab);
+
+ /**
* Returns the type of drawing context used in this window.
* @return The current type of drawing context.
*/
@@ -218,6 +225,12 @@ protected:
* native window system calls.
*/
virtual GHOST_TSuccess setWindowCursorVisibility(bool visible) = 0;
+
+ /**
+ * Sets the cursor grab on the window using
+ * native window system calls.
+ */
+ virtual GHOST_TSuccess setWindowCursorGrab(bool grab) { return GHOST_kSuccess; };
/**
* Sets the cursor shape on the window using
@@ -242,6 +255,9 @@ protected:
/** The current visibility of the cursor */
bool m_cursorVisible;
+
+ /** The current grabbed state of the cursor */
+ bool m_cursorGrabbed;
/** The current shape of the cursor */
GHOST_TStandardCursor m_cursorShape;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 2cc30aaa5bc..1525b4eb16d 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -1271,6 +1271,21 @@ setWindowCursorVisibility(
GHOST_TSuccess
GHOST_WindowX11::
+setWindowCursorGrab(
+ bool grab
+){
+ if(grab)
+ XGrabPointer(m_display, m_window, True, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
+ else
+ XUngrabPointer(m_display, CurrentTime);
+
+ XFlush(m_display);
+
+ return GHOST_kSuccess;
+}
+
+ GHOST_TSuccess
+GHOST_WindowX11::
setWindowCursorShape(
GHOST_TStandardCursor shape
){
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index 1392e2c19a6..6f8940bdcbb 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -250,6 +250,15 @@ protected:
);
/**
+ * Sets the cursor grab on the window using
+ * native window system calls.
+ */
+ GHOST_TSuccess
+ setWindowCursorGrab(
+ bool grab
+ );
+
+ /**
* Sets the cursor shape on the window using
* native window system calls.
*/
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index c5cecd17b2f..b7f10ff92e1 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -38,8 +38,7 @@
#include <stdarg.h>
/* mmap exception */
-#if defined(AMIGA) || defined(__BeOS)
-#elif defined(WIN32)
+#if defined(WIN32)
#include <sys/types.h>
#include "mmap_win.h"
#else
@@ -262,9 +261,6 @@ void *MEM_callocN(unsigned int len, const char *str)
/* note; mmap returns zero'd memory */
void *MEM_mapallocN(unsigned int len, const char *str)
{
-#if defined(AMIGA) || defined(__BeOS)
- return MEM_callocN(len, str);
-#else
MemHead *memh;
mem_lock_thread();
@@ -299,7 +295,6 @@ void *MEM_mapallocN(unsigned int len, const char *str)
print_error("Mapalloc returns nill, fallback to regular malloc: len=%d in %s, total %u\n",len, str, mmap_in_use);
return MEM_callocN(len, str);
}
-#endif
}
/* Memory statistics print */
@@ -583,10 +578,6 @@ static void rem_memblock(MemHead *memh)
totblock--;
mem_in_use -= memh->len;
-#if defined(AMIGA) || defined(__BeOS)
- free(memh);
-#else
-
if(memh->mmap) {
mmap_in_use -= memh->len;
if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
@@ -597,7 +588,6 @@ static void rem_memblock(MemHead *memh)
memset(memh+1, 255, memh->len);
free(memh);
}
-#endif
}
static void MemorY_ErroR(const char *block, const char *error)
diff --git a/intern/iksolver/test/Makefile b/intern/iksolver/test/Makefile
index 4ab317f9e9f..ed867ba2a73 100644
--- a/intern/iksolver/test/Makefile
+++ b/intern/iksolver/test/Makefile
@@ -46,7 +46,7 @@ LIBS += $(OCGDIR)/intern/$(LIBNAME)/$(DEBUG_DIR)libiksolver.a
SLIBS += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
-ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd"))
+ifeq ($(OS),$(findstring $(OS), "darwin linux freebsd openbsd"))
LLIBS = -L/usr/X11R6/lib -lglut -pthread
endif
diff --git a/intern/moto/include/MT_Matrix3x3.h b/intern/moto/include/MT_Matrix3x3.h
index 899a2731588..c6d299d19fd 100644
--- a/intern/moto/include/MT_Matrix3x3.h
+++ b/intern/moto/include/MT_Matrix3x3.h
@@ -98,6 +98,18 @@ public:
m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
}
+ void setValue3x3(const float *m) {
+ m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++;
+ m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++;
+ m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
+ }
+
+ void setValue3x3(const double *m) {
+ m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++;
+ m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++;
+ m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
+ }
+
void setValue(MT_Scalar xx, MT_Scalar xy, MT_Scalar xz,
MT_Scalar yx, MT_Scalar yy, MT_Scalar yz,
MT_Scalar zx, MT_Scalar zy, MT_Scalar zz) {
@@ -194,6 +206,18 @@ public:
*m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2]; *m = 0.0;
}
+ void getValue3x3(float *m) const {
+ *m++ = (float) m_el[0][0]; *m++ = (float) m_el[1][0]; *m++ = (float) m_el[2][0];
+ *m++ = (float) m_el[0][1]; *m++ = (float) m_el[1][1]; *m++ = (float) m_el[2][1];
+ *m++ = (float) m_el[0][2]; *m++ = (float) m_el[1][2]; *m++ = (float) m_el[2][2];
+ }
+
+ void getValue3x3(double *m) const {
+ *m++ = m_el[0][0]; *m++ = m_el[1][0]; *m++ = m_el[2][0];
+ *m++ = m_el[0][1]; *m++ = m_el[1][1]; *m++ = m_el[2][1];
+ *m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2];
+ }
+
MT_Quaternion getRotation() const;
MT_Matrix3x3& operator*=(const MT_Matrix3x3& m);
diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp
index dcc52e2a3e7..646b1a853dc 100644
--- a/intern/string/intern/STR_String.cpp
+++ b/intern/string/intern/STR_String.cpp
@@ -559,7 +559,8 @@ STR_String& STR_String::TrimLeft()
{
int skip;
assertd(pData != NULL);
- for (skip=0; isSpace(pData[skip]); skip++, Len--);
+ for (skip=0; isSpace(pData[skip]); skip++, Len--)
+ {};
memmove(pData, pData+skip, Len+1);
return *this;
}
@@ -598,7 +599,8 @@ STR_String& STR_String::TrimLeft(char *set)
{
int skip;
assertd(pData != NULL);
- for (skip=0; Len && strchr(set, pData[skip]); skip++, Len--);
+ for (skip=0; Len && strchr(set, pData[skip]); skip++, Len--)
+ {};
memmove(pData, pData+skip, Len+1);
return *this;
}
diff --git a/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
index e66693cc86f..f6a740ee5b0 100644
--- a/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
+++ b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -120,7 +120,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true"
RuntimeLibrary="0"
@@ -197,7 +197,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -274,7 +274,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true"
RuntimeLibrary="0"
@@ -367,6 +367,42 @@
>
</File>
</Filter>
+ <Filter
+ Name="generic"
+ >
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\BGL.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\bpy_internal_import.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\euler.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\Geometry.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\Mathutils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\matrix.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\quat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\python\generic\vector.c"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="Header Files"
diff --git a/projectfiles_vc9/blender/blender.sln b/projectfiles_vc9/blender/blender.sln
index 970a8bd736e..1396564d578 100644
--- a/projectfiles_vc9/blender/blender.sln
+++ b/projectfiles_vc9/blender/blender.sln
@@ -3,13 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 10.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj", "{F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}"
ProjectSection(ProjectDependencies) = postProject
{E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}
+ {6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B}
{A90C4918-4B21-4277-93BD-AF65F30951D9} = {A90C4918-4B21-4277-93BD-AF65F30951D9}
{FB88301F-F725-401B-ACD7-D2ABBF333B71} = {FB88301F-F725-401B-ACD7-D2ABBF333B71}
{98330220-47A6-42E0-9DE4-AD0FF5D204D6} = {98330220-47A6-42E0-9DE4-AD0FF5D204D6}
{BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}
{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}
- {9625642D-6F20-4FB6-A089-BE7441B223E3} = {9625642D-6F20-4FB6-A089-BE7441B223E3}
{884D8731-654C-4C7F-9A75-8F37A305BE1E} = {884D8731-654C-4C7F-9A75-8F37A305BE1E}
+ {E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018}
{7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}
{FAF46346-65CC-4DB2-85C4-B99826F79D0C} = {FAF46346-65CC-4DB2-85C4-B99826F79D0C}
{51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E}
@@ -18,18 +19,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
{EADC3C5A-6C51-4F03-8038-1553E7D7F740} = {EADC3C5A-6C51-4F03-8038-1553E7D7F740}
{B093415D-C0F6-4E76-8F5A-6BC1917BCE9E} = {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}
{DB6BE55D-B6D9-494D-856A-8764FF7BA91D} = {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B} = {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}
+ {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} = {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}
{09222F5E-1625-4FF3-A89A-384D16875EE5} = {09222F5E-1625-4FF3-A89A-384D16875EE5}
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD} = {D696C86B-0B53-4471-A50D-5B983A6FA4AD}
{138DD16C-CC78-4F6C-A898-C8DA68D89067} = {138DD16C-CC78-4F6C-A898-C8DA68D89067}
{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}
{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}
{76D90B92-ECC7-409C-9F98-A8814B90F3C0} = {76D90B92-ECC7-409C-9F98-A8814B90F3C0}
{9C71A793-C177-4CAB-8EC5-923D500B39F8} = {9C71A793-C177-4CAB-8EC5-923D500B39F8}
+ {F90BD995-FFA4-4B18-81E8-FA4322C939E8} = {F90BD995-FFA4-4B18-81E8-FA4322C939E8}
{BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} = {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}
+ {8154A59A-CAED-403D-AB94-BC4E7C032666} = {8154A59A-CAED-403D-AB94-BC4E7C032666}
{3648FB9A-C36F-43AB-AED0-1F1361E67FC7} = {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}
{542A9FA1-B7FF-441C-AE15-054DB31D3488} = {542A9FA1-B7FF-441C-AE15-054DB31D3488}
{E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} = {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}
@@ -39,19 +42,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
{E90C7BC2-CF30-4A60-A8F2-0050D592E358} = {E90C7BC2-CF30-4A60-A8F2-0050D592E358}
{8B8D4FC3-3234-4E54-8376-5AB83D00D164} = {8B8D4FC3-3234-4E54-8376-5AB83D00D164}
{4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}
- {0112CAD5-3584-412A-A2E5-1315A00437B4} = {0112CAD5-3584-412A-A2E5-1315A00437B4}
{EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9} = {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49} = {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}
{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} = {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}
{E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538}
{32CC75E2-EE85-45E6-8E3D-513F58464F43} = {32CC75E2-EE85-45E6-8E3D-513F58464F43}
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359} = {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}
{9A307EE5-CD77-47BC-BD87-62508C7E19D8} = {9A307EE5-CD77-47BC-BD87-62508C7E19D8}
{AB590CED-F71F-4A17-A89B-18583ECD633D} = {AB590CED-F71F-4A17-A89B-18583ECD633D}
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373} = {B83C6BED-11EC-46C8-AFFA-121EEDE94373}
{1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}
{B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598}
- {524264F4-DF21-4B79-847F-E7CA643ECD0B} = {524264F4-DF21-4B79-847F-E7CA643ECD0B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BKE_blenkernel", "blenkernel\BKE_blenkernel.vcproj", "{CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}"
@@ -79,8 +78,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BPY_python", "BPY_python\BP
{CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BRA_radiosity", "radiosity\BRA_radiosity.vcproj", "{2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BRE_render", "render\BRE_render.vcproj", "{106AE171-0083-41D6-A949-20DB0E8DC251}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNA_makesdna", "makesdna\DNA_makesdna.vcproj", "{E013786A-9575-4F34-81B2-33290357EE87}"
@@ -95,7 +92,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GP_axctl", "..\gameengine\g
{E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}
{6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B}
{BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}
- {9625642D-6F20-4FB6-A089-BE7441B223E3} = {9625642D-6F20-4FB6-A089-BE7441B223E3}
{E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018}
{51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E}
{31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718}
@@ -130,8 +126,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenderplayer", "..\gameeng
{98330220-47A6-42E0-9DE4-AD0FF5D204D6} = {98330220-47A6-42E0-9DE4-AD0FF5D204D6}
{BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}
{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}
- {9625642D-6F20-4FB6-A089-BE7441B223E3} = {9625642D-6F20-4FB6-A089-BE7441B223E3}
+ {D1A9312F-4557-4982-A0F4-4D08508235F4} = {D1A9312F-4557-4982-A0F4-4D08508235F4}
{E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018}
+ {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}
{FAF46346-65CC-4DB2-85C4-B99826F79D0C} = {FAF46346-65CC-4DB2-85C4-B99826F79D0C}
{51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E}
{FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400}
@@ -141,7 +138,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenderplayer", "..\gameeng
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E} = {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}
{09222F5E-1625-4FF3-A89A-384D16875EE5} = {09222F5E-1625-4FF3-A89A-384D16875EE5}
{E013786A-9575-4F34-81B2-33290357EE87} = {E013786A-9575-4F34-81B2-33290357EE87}
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD} = {D696C86B-0B53-4471-A50D-5B983A6FA4AD}
{138DD16C-CC78-4F6C-A898-C8DA68D89067} = {138DD16C-CC78-4F6C-A898-C8DA68D89067}
{415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292}
{670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139}
@@ -152,6 +148,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenderplayer", "..\gameeng
{9C71A793-C177-4CAB-8EC5-923D500B39F8} = {9C71A793-C177-4CAB-8EC5-923D500B39F8}
{F90BD995-FFA4-4B18-81E8-FA4322C939E8} = {F90BD995-FFA4-4B18-81E8-FA4322C939E8}
{BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} = {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}
+ {8154A59A-CAED-403D-AB94-BC4E7C032666} = {8154A59A-CAED-403D-AB94-BC4E7C032666}
{3648FB9A-C36F-43AB-AED0-1F1361E67FC7} = {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}
{542A9FA1-B7FF-441C-AE15-054DB31D3488} = {542A9FA1-B7FF-441C-AE15-054DB31D3488}
{D8ABD6A5-1B36-4D62-934E-B5C6801130B0} = {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}
@@ -162,16 +159,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenderplayer", "..\gameeng
{E90C7BC2-CF30-4A60-A8F2-0050D592E358} = {E90C7BC2-CF30-4A60-A8F2-0050D592E358}
{8B8D4FC3-3234-4E54-8376-5AB83D00D164} = {8B8D4FC3-3234-4E54-8376-5AB83D00D164}
{4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}
- {0112CAD5-3584-412A-A2E5-1315A00437B4} = {0112CAD5-3584-412A-A2E5-1315A00437B4}
{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} = {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}
{E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538}
{32CC75E2-EE85-45E6-8E3D-513F58464F43} = {32CC75E2-EE85-45E6-8E3D-513F58464F43}
{9A307EE5-CD77-47BC-BD87-62508C7E19D8} = {9A307EE5-CD77-47BC-BD87-62508C7E19D8}
{AB590CED-F71F-4A17-A89B-18583ECD633D} = {AB590CED-F71F-4A17-A89B-18583ECD633D}
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373} = {B83C6BED-11EC-46C8-AFFA-121EEDE94373}
{1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}
{B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598}
- {524264F4-DF21-4B79-847F-E7CA643ECD0B} = {524264F4-DF21-4B79-847F-E7CA643ECD0B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KX_blenderhook", "..\gameengine\blenderhook\KX_blenderhook.vcproj", "{8154A59A-CAED-403D-AB94-BC4E7C032666}"
@@ -206,8 +200,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenpluginapi", "blenplugin
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_messaging", "..\kernel\gen_messaging\gen_messaging.vcproj", "{727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Sumo", "..\gameengine\physics\PHY_Physics\PHY_Sumo\PHY_Sumo.vcproj", "{9625642D-6F20-4FB6-A089-BE7441B223E3}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Bullet", "..\gameengine\physics\PHY_Physics\PHY_Bullet\PHY_Bullet.vcproj", "{E90C7BC2-CF30-4A60-A8F2-0050D592E358}"
ProjectSection(ProjectDependencies) = postProject
{FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400}
@@ -219,31 +211,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_gpu", "gpu\BL_gpu.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TEX_Video", "..\gameengine\videotexture\TEX_Video.vcproj", "{670EC17A-0548-4BBF-A27B-636C7C188139}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_broad", "..\..\extern\solid\make\msvc_9_0\broad\broad.vcproj", "{0112CAD5-3584-412A-A2E5-1315A00437B4}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_complex", "..\..\extern\solid\make\msvc_9_0\complex\complex.vcproj", "{B83C6BED-11EC-46C8-AFFA-121EEDE94373}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_convex", "..\..\extern\solid\make\msvc_9_0\convex\convex.vcproj", "{524264F4-DF21-4B79-847F-E7CA643ECD0B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_solid", "..\..\extern\solid\make\msvc_9_0\solid.vcproj", "{D696C86B-0B53-4471-A50D-5B983A6FA4AD}"
- ProjectSection(ProjectDependencies) = postProject
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B} = {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}
- {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}
- {0112CAD5-3584-412A-A2E5-1315A00437B4} = {0112CAD5-3584-412A-A2E5-1315A00437B4}
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373} = {B83C6BED-11EC-46C8-AFFA-121EEDE94373}
- {524264F4-DF21-4B79-847F-E7CA643ECD0B} = {524264F4-DF21-4B79-847F-E7CA643ECD0B}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_bullet2", "..\..\extern\bullet2\make\msvc_9_0\Bullet.vcproj", "{FFD3C64A-30E2-4BC7-BC8F-51818C320400}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_glew", "..\..\extern\glew\make\msvc_9_0\glew.vcproj", "{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_qhull", "..\..\extern\qhull\make\msvc_9_0\qhull.vcproj", "{6461F05D-4698-47AB-A8E8-1CA2ACC9948B}"
-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
{FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400}
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD} = {D696C86B-0B53-4471-A50D-5B983A6FA4AD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_boolop", "..\..\intern\boolop\make\msvc_9_0\boolop.vcproj", "{EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}"
@@ -347,7 +321,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ED_editors", "editors\ED_ed
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RNA_makesrna", "makesrna\RNA_makesrna.vcproj", "{8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}"
ProjectSection(ProjectDependencies) = postProject
- {FB88301F-F725-401B-ACD7-D2ABBF333B71} = {FB88301F-F725-401B-ACD7-D2ABBF333B71}
{7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}
EndProjectSection
EndProject
@@ -507,20 +480,6 @@ Global
{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Release|Win32.Build.0 = BlenderPlayer Release|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Debug|Win32.ActiveCfg = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Debug|Win32.Build.0 = Blender Debug|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Release|Win32.ActiveCfg = Blender Release|Win32
- {2AE0D2D9-6A7A-44DE-9EFF-99C9E3257B49}.Release|Win32.Build.0 = Blender Release|Win32
{106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32
{106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32
{106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32
@@ -612,7 +571,9 @@ Global
{8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Release|Win32.Build.0 = Blender Release|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
{8154A59A-CAED-403D-AB94-BC4E7C032666}.Debug|Win32.ActiveCfg = Blender Debug|Win32
@@ -624,7 +585,9 @@ Global
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Release|Win32.Build.0 = Blender Release|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
@@ -638,7 +601,9 @@ Global
{E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Release|Win32.Build.0 = Blender Release|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
@@ -652,7 +617,9 @@ Global
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Release|Win32.Build.0 = Blender Release|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
@@ -666,7 +633,9 @@ Global
{6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Release|Win32.Build.0 = Blender Release|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
@@ -680,7 +649,9 @@ Global
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
+ {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Release|Win32.Build.0 = Blender Release|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
@@ -845,22 +816,6 @@ Global
{727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
{727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Release|Win32.Build.0 = BlenderPlayer Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
- {9625642D-6F20-4FB6-A089-BE7441B223E3}.Release|Win32.Build.0 = BlenderPlayer Release|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
@@ -869,8 +824,8 @@ Global
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
+ {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
+ {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32
{E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
@@ -925,70 +880,6 @@ Global
{670EC17A-0548-4BBF-A27B-636C7C188139}.Debug|Win32.Build.0 = Debug|Win32
{670EC17A-0548-4BBF-A27B-636C7C188139}.Release|Win32.ActiveCfg = Release|Win32
{670EC17A-0548-4BBF-A27B-636C7C188139}.Release|Win32.Build.0 = Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {0112CAD5-3584-412A-A2E5-1315A00437B4}.Release|Win32.Build.0 = 3D Plugin Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Release|Win32.Build.0 = 3D Plugin Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Release|Win32.Build.0 = 3D Plugin Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Release|Win32.Build.0 = 3D Plugin Release|Win32
{FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
{FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
{FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
@@ -1021,22 +912,6 @@ Global
{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Debug|Win32.Build.0 = Blender Debug|Win32
{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release|Win32.ActiveCfg = Blender Release|Win32
{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release|Win32.Build.0 = Blender Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Release|Win32.Build.0 = 3D Plugin Release|Win32
{9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
{9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
{9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
@@ -1351,8 +1226,8 @@ Global
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32
- {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32
+ {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32
+ {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Debug|Win32.ActiveCfg = Blender Debug|Win32
diff --git a/projectfiles_vc9/blender/blender.vcproj b/projectfiles_vc9/blender/blender.vcproj
index befaf4e975b..08132fc5627 100644
--- a/projectfiles_vc9/blender/blender.vcproj
+++ b/projectfiles_vc9/blender/blender.vcproj
@@ -73,12 +73,12 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python25.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"
+ AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python26.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\lib25_vs2008;..\..\..\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"
+ 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\lib26_vs2008;..\..\..\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"
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\lib25_vs2008\python25.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;"
+ 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\lib26_vs2008\python26.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="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python25_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"
+ AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python26_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\lib25_vs2008;..\..\..\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"
+ 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\lib26_vs2008;..\..\..\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"
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\lib25_vs2008\python25_d.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;"
+ 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\lib26_vs2008\python26_d.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>
@@ -209,39 +209,6 @@
</References>
<Files>
<Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\source\creator\buildinfo.c"
- >
- </File>
- <File
- RelativePath="..\..\source\creator\creator.c"
- >
- </File>
- <File
- RelativePath="..\..\source\icons\winblender.rc"
- >
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
@@ -253,6 +220,39 @@
RelativePath="..\..\source\icons\winblenderfile.ico"
>
</File>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\source\creator\buildinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\source\creator\creator.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\source\icons\winblender.rc"
+ >
+ <FileConfiguration
+ Name="Blender Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Blender Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
</Filter>
<Filter
Name="Header Files"
diff --git a/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj b/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
index 4474eb8da1f..0402710d0d0 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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
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\python2.5;..\..\..\..\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;..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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;..\..\..\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"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -614,6 +614,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\blenkernel\intern\fmodifier.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\blenkernel\intern\font.c"
>
</File>
@@ -1110,6 +1114,14 @@
RelativePath="..\..\..\source\blender\blenkernel\depsgraph_private.h"
>
</File>
+ <File
+ RelativePath="..\..\..\source\blender\blenkernel\Makefile"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\blenkernel\nla_private.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
index e31436b9280..6b5359509ab 100644
--- a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
+++ b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
@@ -652,7 +652,7 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenlib\intern\BLI_fileops.h"
+ RelativePath="..\..\..\source\blender\blenlib\BLI_fileops.h"
>
</File>
<File
diff --git a/projectfiles_vc9/blender/editors/ED_editors.vcproj b/projectfiles_vc9/blender/editors/ED_editors.vcproj
index 7d8d70e43b5..80fe2361443 100644
--- a/projectfiles_vc9/blender/editors/ED_editors.vcproj
+++ b/projectfiles_vc9/blender/editors/ED_editors.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_FREETYPE2;WITH_INTERNATIONAL;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -118,8 +118,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu"
- PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER;WITH_QUICKTIME;INTERNATIONAL;WITH_BF_INTERNATIONAL;WITH_FREETYPE2;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu"
+ PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_BF_INTERNATIONAL;WITH_FREETYPE2;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
DefaultCharIsUnsigned="true"
@@ -182,14 +182,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\include\BIF_retopo.h"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\include\BIF_transform.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\include\ED_anim_api.h"
>
</File>
@@ -262,10 +254,22 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\include\ED_physics.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\include\ED_pointcache.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\include\ED_previewrender.h"
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\include\ED_retopo.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\include\ED_screen.h"
>
</File>
@@ -310,6 +314,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\include\UI_icons.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\include\UI_interface.h"
>
</File>
@@ -419,10 +427,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\interface\keyval.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\interface\resources.c"
>
</File>
@@ -604,6 +608,46 @@
</File>
</Filter>
<Filter
+ Name="space_graph"
+ >
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_buttons.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_draw.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_edit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_header.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_intern.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_ops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_select.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\graph_utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_graph\space_graph.c"
+ >
+ </File>
+ </Filter>
+ <Filter
Name="space_image"
>
<File
@@ -691,6 +735,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\space_buttons\buttons_ops.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\space_buttons\space_buttons.c"
>
</File>
@@ -703,15 +751,15 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_file\file_header.c"
+ RelativePath="..\..\..\source\blender\editors\space_file\file_intern.h"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_file\file_intern.h"
+ RelativePath="..\..\..\source\blender\editors\space_file\file_ops.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_file\file_ops.c"
+ RelativePath="..\..\..\source\blender\editors\space_file\file_panels.c"
>
</File>
<File
@@ -747,11 +795,11 @@
Name="space_info"
>
<File
- RelativePath="..\..\..\source\blender\editors\space_info\info_header.c"
+ RelativePath="..\..\..\source\blender\editors\space_info\info_intern.h"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_info\info_intern.h"
+ RelativePath="..\..\..\source\blender\editors\space_info\info_ops.c"
>
</File>
<File
@@ -795,6 +843,22 @@
Name="space_nla"
>
<File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_buttons.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_channels.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_draw.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_edit.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\space_nla\nla_header.c"
>
</File>
@@ -803,6 +867,14 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_ops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\space_nla\nla_select.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\space_nla\space_nla.c"
>
</File>
@@ -839,15 +911,15 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_draw.c"
+ RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_buttons.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_edit.c"
+ RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_draw.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_header.c"
+ RelativePath="..\..\..\source\blender\editors\space_sequencer\sequencer_edit.c"
>
</File>
<File
@@ -955,6 +1027,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\animation\fmodifier_ui.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\animation\keyframes_draw.c"
>
</File>
@@ -1010,6 +1086,10 @@
RelativePath="..\..\..\source\blender\editors\object\object_ops.c"
>
</File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\object\object_vgroup.c"
+ >
+ </File>
</Filter>
<Filter
Name="transform"
@@ -1083,10 +1163,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\mesh\editdeform.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\mesh\editface.c"
>
</File>
@@ -1119,6 +1195,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\mesh\mesh_layers.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\mesh\mesh_ops.c"
>
</File>
@@ -1315,6 +1395,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\physics\ed_pointcache.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\physics\editparticle.c"
>
</File>
@@ -1324,38 +1408,26 @@
</File>
</Filter>
<Filter
- Name="space_graph"
+ Name="space_logic"
>
<File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_buttons.c"
+ RelativePath="..\..\..\source\blender\editors\space_logic\logic_buttons.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_draw.c"
+ RelativePath="..\..\..\source\blender\editors\space_logic\logic_header.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_edit.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_header.c"
+ RelativePath="..\..\..\source\blender\editors\space_logic\logic_intern.h"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_intern.h"
+ RelativePath="..\..\..\source\blender\editors\space_logic\logic_window.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_ops.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\space_graph\graph_select.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\space_graph\space_graph.c"
+ RelativePath="..\..\..\source\blender\editors\space_logic\space_logic.c"
>
</File>
</Filter>
diff --git a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
index 0f3d2b01030..9e4c50e9e3f 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
@@ -27,6 +27,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="DEL ..\..\..\source\blender\makesrna\intern\*_gen.c"
/>
<Tool
Name="VCCustomBuildTool"
@@ -121,6 +122,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="DEL ..\..\..\source\blender\makesrna\intern\*_gen.c"
/>
<Tool
Name="VCCustomBuildTool"
@@ -138,7 +140,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\editors\include;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\windowmanager"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
@@ -199,7 +201,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Building RNA"
- CommandLine="CD ..\..\..\source\blender\makesrna\intern&#x0D;&#x0A;RNA_makesrna.exe rna.c&#x0D;&#x0A;"
+ CommandLine="CD ..\..\..\source\blender\makesrna\intern\&#x0D;&#x0A;RNA_makesrna.exe .\&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -214,6 +216,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="DEL ..\..\..\source\blender\makesrna\intern\*_gen.c"
/>
<Tool
Name="VCCustomBuildTool"
@@ -307,6 +310,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="del ..\..\..\source\blender\makesrna\intern\rna_*_gen.c"
/>
<Tool
Name="VCCustomBuildTool"
@@ -388,7 +392,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Building RNA"
- CommandLine="CD ..\..\..\source\blender\makesrna\intern&#x0D;&#x0A;RNA_makesrna.exe rna.c&#x0D;&#x0A;"
+ CommandLine="CD ..\..\..\source\blender\makesrna\intern\&#x0D;&#x0A;RNA_makesrna.exe .\&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -403,6 +407,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="DEL ..\..\..\source\blender\makesrna\intern\*_gen.c"
/>
<Tool
Name="VCCustomBuildTool"
@@ -484,7 +489,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Building RNA"
- CommandLine="CD ..\..\..\source\blender\makesrna\intern&#x0D;&#x0A;RNA_makesrna.exe rna.c&#x0D;&#x0A;"
+ CommandLine="CD ..\..\..\source\blender\makesrna\intern\&#x0D;&#x0A;RNA_makesrna.exe .\&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -499,6 +504,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
@@ -577,7 +583,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Building RNA"
- CommandLine="CD ..\..\..\source\blender\makesrna\intern&#x0D;&#x0A;RNA_makesrna.exe rna.c&#x0D;&#x0A;"
+ CommandLine="CD ..\..\..\source\blender\makesrna\intern\&#x0D;&#x0A;RNA_makesrna.exe .\&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@@ -589,10 +595,6 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
- RelativePath="..\..\..\source\blender\editors\interface\interface_api.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\makesrna.c"
>
</File>
@@ -685,6 +687,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_main_api.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_material.c"
>
</File>
@@ -693,6 +699,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_mesh_api.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_meta.c"
>
</File>
@@ -701,6 +711,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_nla.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_nodetree.c"
>
</File>
@@ -709,6 +723,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_object_api.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_object_force.c"
>
</File>
@@ -729,10 +747,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_radio.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_rna.c"
>
</File>
@@ -781,6 +795,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_ui_api.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_userdef.c"
>
</File>
@@ -797,6 +815,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_wm_api.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_world.c"
>
</File>
diff --git a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
index 65aa5e6f3f4..f6eb7b282e0 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -114,7 +114,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
RuntimeLibrary="0"
@@ -167,207 +167,207 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_action_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_access.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_actuator_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_action_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_animation_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_actuator_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_armature_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_animation_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_brush_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_armature_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_camera_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_brush_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_cloth_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_camera_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_color_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_cloth_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_constraint_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_color_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_context_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_constraint_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_controller_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_context_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_curve_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_controller_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_fcurve_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_curve_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_fluidsim_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_fcurve_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_group_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_fluidsim_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_ID_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_group_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_image_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_ID_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_key_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_image_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_lamp_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_key_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_lattice_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_lamp_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_main_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_lattice_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_material_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_main_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_mesh_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_material_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_meta_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_mesh_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_modifier_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_meta_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_nodetree_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_modifier_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_object_force_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_nla_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_object_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_nodetree_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_packedfile_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_object_force_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_particle_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_object_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_pose_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_packedfile_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_property_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_particle_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_radio_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_pose_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_rna_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_property_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_scene_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_rna_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_screen_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_scene_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_scriptlink_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_screen_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_sensor_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_scriptlink_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_sequence_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_sensor_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_sound_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_sequence_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_space_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_sound_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_text_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_space_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_texture_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_text_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_timeline_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_texture_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_ui_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_timeline_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_userdef_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_ui_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_vfont_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_userdef_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_vpaint_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_vfont_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_wm_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_vpaint_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna.crna_world_gen.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_wm_gen.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_access.c"
+ RelativePath="..\..\..\source\blender\makesrna\intern\rna_world_gen.c"
>
</File>
</Filter>
diff --git a/projectfiles_vc9/blender/nodes/nodes.vcproj b/projectfiles_vc9/blender/nodes/nodes.vcproj
index cbe1954c14e..f7dc938d8f2 100644
--- a/projectfiles_vc9/blender/nodes/nodes.vcproj
+++ b/projectfiles_vc9/blender/nodes/nodes.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -112,7 +112,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
@@ -182,7 +182,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -252,7 +252,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\zlib\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;..\..\..\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\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\extern\glew\include;..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_OPENEXR"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
@@ -609,6 +609,10 @@
Name="TEX_nodes"
>
<File
+ RelativePath="..\..\..\source\blender\nodes\intern\TEX_nodes\TEX_at.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\nodes\intern\TEX_nodes\TEX_bricks.c"
>
</File>
diff --git a/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj b/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj
index 8e027fd1854..2a14458399c 100644
--- a/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj
+++ b/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenfont"
PreprocessorDefinitions="WIN32;_LIB;_DEBUG;WITH_GLEXT;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -119,7 +119,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\ketsji;..\..\..\source\gameengine\network;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Physics\Sumo;..\..\..\source\gameengine\Physics\common;..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenfont"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID;WITH_GLEXT;WITH_FFMPEG"
StringPooling="true"
BasicRuntimeChecks="0"
diff --git a/projectfiles_vc9/gameengine/converter/KX_converter.vcproj b/projectfiles_vc9/gameengine/converter/KX_converter.vcproj
index a085a7eac2a..7202be552f4 100644
--- a/projectfiles_vc9/gameengine/converter/KX_converter.vcproj
+++ b/projectfiles_vc9/gameengine/converter/KX_converter.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
StringPooling="true"
RuntimeLibrary="0"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
StringPooling="true"
RuntimeLibrary="2"
@@ -344,7 +344,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -419,7 +419,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj b/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj
index a8b94c3f4a0..2e8351cd58f 100644
--- a/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj
+++ b/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="WIN32,_LIB,EXP_PYTHON_EMBEDDING,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="2"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="0"
@@ -343,7 +343,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -418,7 +418,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\SceneGraph;..\..\..\source\blender\blenloader"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj b/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj
index e4d41824fb1..90706035649 100644
--- a/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj
+++ b/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="0"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="2"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32,_LIB,EXP_PYTHON_EMBEDDING,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -343,7 +343,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -418,7 +418,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\Rasterizer;..\..\..\source\blender\makesdna;..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,EXP_PYTHON_EMBEDDING"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj b/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj
index 6f189714a42..de5ddadf4b6 100644
--- a/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj
+++ b/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj
@@ -53,7 +53,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\include;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\GamePlayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\include;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\GamePlayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include"
PreprocessorDefinitions="_DEBUG, _MT, _DLL,WIN32"
IgnoreStandardIncludePath="false"
BasicRuntimeChecks="3"
@@ -162,7 +162,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\include;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\GamePlayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\include;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\GamePlayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="2"
diff --git a/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj b/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj
index 69845ef8069..fdf144a449a 100644
--- a/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj
+++ b/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -191,7 +191,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -265,7 +265,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\..\lib\windows\zlib\include;..\..\..\..\..\lib\windows\png\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\Converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\GamePlayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\soundsystem\snd_dummy;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\Physics\Sumo;..\..\..\..\source\gameengine\Physics\common;..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj b/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj
index 5cd8a9c469b..886be9b42a3 100644
--- a/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj
+++ b/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj
@@ -44,7 +44,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\blender\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\readblenfile;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Physics;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\Physics\Ode;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\gameplayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\blender\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\readblenfile;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Physics;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\Physics\Ode;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\gameplayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="WIN32,_CONSOLE,dSINGLE, _DEBUG;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -72,7 +72,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386&#x0D;&#x0A;"
- AdditionalDependencies="odelib.lib fmodvc.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib qtmlClient.lib SDL.lib freetype2ST.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib Half_d.lib Iex_d.lib IlmImf_d.lib IlmThread_d.lib Imath_d.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib"
+ AdditionalDependencies="ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib qtmlClient.lib SDL.lib freetype2ST.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib Half_d.lib Iex_d.lib IlmImf_d.lib IlmThread_d.lib Imath_d.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib"
ShowProgress="0"
OutputFile="..\..\..\..\bin\debug\blenderplayer.exe"
LinkIncremental="2"
@@ -137,7 +137,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\blender\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\readblenfile;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Physics;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\Physics\Ode;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\gameplayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\openal\include;..\..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\blender\include;..\..\..\..\source\blender\imbuf;..\..\..\..\source\blender\blenlib;..\..\..\..\source\blender\blenkernel;..\..\..\..\source\blender\makesdna;..\..\..\..\source\blender\blenloader;..\..\..\..\source\blender\readblenfile;..\..\..\..\source\blender\render\extern\include;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\kernel\gen_messaging;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Physics;..\..\..\..\source\gameengine\network;..\..\..\..\source\gameengine\rasterizer;..\..\..\..\source\gameengine\converter;..\..\..\..\source\gameengine\gamelogic;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\scenegraph;..\..\..\..\source\gameengine\Physics\Ode;..\..\..\..\source\gameengine\soundsystem;..\..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\..\source\gameengine\gameplayer\common;..\..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\source\gameengine\network\loopbacknetwork;..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\..\source\gameengine\gameplayer\common\windows;..\..\..\..\source\sumo\include;..\..\..\..\source\sumo\fuzzics\include;..\..\..\..\source\blender\gpu;..\..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -234,10 +234,6 @@
>
</File>
<File
- RelativePath="..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c"
- >
- </File>
- <File
RelativePath="..\..\..\..\source\icons\winplayer.rc"
>
<FileConfiguration
diff --git a/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj b/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj
index fb812c02f44..d57e8d7f6a7 100644
--- a/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj
+++ b/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID"
StringPooling="true"
RuntimeLibrary="2"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="JANCODEPANCO;WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID;WITH_GLEXT"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -269,7 +269,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID;WITH_GLEXT"
StringPooling="true"
RuntimeLibrary="0"
@@ -345,7 +345,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="JANCODEPANCO;WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID;WITH_GLEXT"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -421,7 +421,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID;WITH_GLEXT"
StringPooling="true"
RuntimeLibrary="0"
@@ -550,10 +550,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\gameengine\Ketsji\KX_OdePhysicsController.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\source\gameengine\Ketsji\KX_PhysicsObjectWrapper.cpp"
>
</File>
@@ -602,10 +598,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\gameengine\Ketsji\KX_SumoPhysicsController.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\source\gameengine\Ketsji\KX_TimeCategoryLogger.cpp"
>
</File>
diff --git a/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj b/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj
index fc197d0d1f4..c6edae137b7 100644
--- a/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj
+++ b/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="0"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -343,7 +343,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -418,7 +418,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
+ AdditionalIncludeDirectories="..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\source\kernel\gen_system;..\..\..\..\source\gameengine\ketsji;..\..\..\..\source\gameengine\Network;..\..\..\..\source\gameengine\expressions;..\..\..\..\source\gameengine\GameLogic;..\..\..\..\source\gameengine\Scenegraph"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
index 9f16283e1cd..a954b011994 100644
--- a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
+++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -110,7 +110,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
@@ -176,7 +176,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
@@ -243,7 +243,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -312,7 +312,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
@@ -380,7 +380,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
+ AdditionalIncludeDirectories="..\..\..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\..\..\build\msvc_9\intern\SoundSystem\include;..\..\..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\..\source\gameengine\Physics\common;..\..\..\..\..\source\gameengine\Physics\Bullet;..\..\..\..\..\source\gameengine\Rasterizer;..\..\..\..\..\source\gameengine\Ketsji;..\..\..\..\..\source\gameengine\Expressions;..\..\..\..\..\source\gameengine\GameLogic;..\..\..\..\..\source\gameengine\SceneGraph;..\..\..\..\..\source\kernel\gen_system;..\..\..\..\..\source\blender\makesdna;..\..\..\..\..\source\blender\blenkernel;..\..\..\..\..\source\blender\blenlib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
diff --git a/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj b/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj
index dde8714507a..52293b49519 100644
--- a/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj
+++ b/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"
StringPooling="true"
RuntimeLibrary="0"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -343,7 +343,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_GLEXT"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -418,7 +418,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender\makesdna"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\SceneGraph;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\source\blender\makesdna"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_GLEXT"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj b/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
index 16ef3a4cc52..14a62f6a31e 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\python2.5;..\..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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\python2.5;..\..\..\..\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"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\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/projectfiles_vc9/kernel/system/SYS_system.vcproj b/projectfiles_vc9/kernel/system/SYS_system.vcproj
index a666f1f0737..c667a6050e8 100644
--- a/projectfiles_vc9/kernel/system/SYS_system.vcproj
+++ b/projectfiles_vc9/kernel/system/SYS_system.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons
index 467e79f024a..963c76fcfa9 100644
--- a/release/datafiles/blenderbuttons
+++ b/release/datafiles/blenderbuttons
Binary files differ
diff --git a/release/io/export_ply.py b/release/io/export_ply.py
new file mode 100644
index 00000000000..ed983c2b169
--- /dev/null
+++ b/release/io/export_ply.py
@@ -0,0 +1,286 @@
+import bpy
+
+__author__ = "Bruce Merry"
+__version__ = "0.93"
+__bpydoc__ = """\
+This script exports Stanford PLY files from Blender. It supports normals,
+colours, and texture coordinates per face or per vertex.
+Only one mesh can be exported at a time.
+"""
+
+# Copyright (C) 2004, 2005: Bruce Merry, bmerry@cs.uct.ac.za
+#
+# 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.
+# Vector rounding se we can use as keys
+#
+# Updated on Aug 11, 2008 by Campbell Barton
+# - added 'comment' prefix to comments - Needed to comply with the PLY spec.
+#
+# Updated on Jan 1, 2007 by Gabe Ghearing
+# - fixed normals so they are correctly smooth/flat
+# - fixed crash when the model doesn't have uv coords or vertex colors
+# - fixed crash when the model has vertex colors but doesn't have uv coords
+# - changed float32 to float and uint8 to uchar for compatibility
+# Errata/Notes as of Jan 1, 2007
+# - script exports texture coords if they exist even if TexFace isn't selected (not a big deal to me)
+# - ST(R) should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either)
+#
+# Updated on Jan 3, 2007 by Gabe Ghearing
+# - fixed "sticky" vertex UV exporting
+# - added pupmenu to enable/disable exporting normals, uv coords, and colors
+# Errata/Notes as of Jan 3, 2007
+# - ST(R) coords should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either)
+# - edges should be exported since PLY files support them
+# - code is getting spaghettish, it should be refactored...
+#
+
+
+def rvec3d(v): return round(v[0], 6), round(v[1], 6), round(v[2], 6)
+def rvec2d(v): return round(v[0], 6), round(v[1], 6)
+
+def write(filename, scene, ob, \
+ EXPORT_APPLY_MODIFIERS= True,\
+ EXPORT_NORMALS= True,\
+ EXPORT_UV= True,\
+ EXPORT_COLORS= True\
+ ):
+
+ if not filename.lower().endswith('.ply'):
+ filename += '.ply'
+
+ if not ob:
+ raise Exception("Error, Select 1 active object")
+ return
+
+ file = open(filename, 'wb')
+
+
+ #EXPORT_EDGES = Draw.Create(0)
+ """
+ is_editmode = Blender.Window.EditMode()
+ if is_editmode:
+ Blender.Window.EditMode(0, '', 0)
+
+ Window.WaitCursor(1)
+ """
+
+ #mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) # XXX
+ if EXPORT_APPLY_MODIFIERS:
+ mesh = ob.create_render_mesh(scene)
+ else:
+ mesh = ob.data
+
+ if not mesh:
+ raise ("Error, could not get mesh data from active object")
+ return
+
+ # mesh.transform(ob.matrixWorld) # XXX
+
+ faceUV = len(mesh.uv_layers) > 0
+ vertexUV = len(mesh.sticky) > 0
+ vertexColors = len(mesh.vcol_layers) > 0
+
+ if (not faceUV) and (not vertexUV): EXPORT_UV = False
+ if not vertexColors: EXPORT_COLORS = False
+
+ if not EXPORT_UV: faceUV = vertexUV = False
+ if not EXPORT_COLORS: vertexColors = False
+
+ if faceUV:
+ active_uv_layer = None
+ for lay in mesh.uv_layers:
+ if lay.active:
+ active_uv_layer= lay.data
+ break
+ if not active_uv_layer:
+ EXPORT_UV = False
+ faceUV = None
+
+ if vertexColors:
+ active_col_layer = None
+ for lay in mesh.vcol_layers:
+ if lay.active:
+ active_col_layer= lay.data
+ if not active_col_layer:
+ EXPORT_COLORS = False
+ vertexColors = None
+
+ # incase
+ color = uvcoord = uvcoord_key = normal = normal_key = None
+
+ mesh_verts = mesh.verts # save a lookup
+ ply_verts = [] # list of dictionaries
+ # vdict = {} # (index, normal, uv) -> new index
+ vdict = [{} for i in xrange(len(mesh_verts))]
+ ply_faces = [[] for f in xrange(len(mesh.faces))]
+ vert_count = 0
+ for i, f in enumerate(mesh.faces):
+
+
+ smooth = f.smooth
+ # XXX need face normals
+ """
+ if not smooth:
+ normal = tuple(f.no)
+ normal_key = rvec3d(normal)
+ """
+ if faceUV:
+ uv = active_uv_layer[i]
+ uv = uv.uv1, uv.uv2, uv.uv3, uv.uv4 # XXX - crufty :/
+ if vertexColors:
+ col = active_col_layer[i]
+ col = col.color1, col.color2, col.color3, col.color4
+
+ 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):
+ v = mesh_verts[vidx]
+ """
+ if smooth:
+ normal= tuple(v.no)
+ normal_key = rvec3d(normal)
+ """
+ normal_key = None # XXX
+
+ if faceUV:
+ uvcoord= uv[j][0], 1.0-uv[j][1]
+ uvcoord_key = rvec2d(uvcoord)
+ elif vertexUV:
+ uvcoord= v.uvco[0], 1.0-v.uvco[1]
+ uvcoord_key = rvec2d(uvcoord)
+
+ if vertexColors:
+ color= col[j]
+ color= int(color[0]*255.0), int(color[1]*255.0), int(color[2]*255.0)
+
+
+ key = normal_key, uvcoord_key, color
+
+ vdict_local = vdict[vidx]
+ pf_vidx = vdict_local.get(key) # Will be None initially
+
+ if pf_vidx == None: # same as vdict_local.has_key(key)
+ pf_vidx = vdict_local[key] = vert_count;
+ ply_verts.append((vidx, normal, uvcoord, color))
+ vert_count += 1
+
+ pf.append(pf_vidx)
+
+ file.write('ply\n')
+ file.write('format ascii 1.0\n')
+ version = "2.5" # Blender.Get('version')
+ file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (version, bpy.data.filename.split('/')[-1].split('\\')[-1] ))
+
+ file.write('element vertex %d\n' % len(ply_verts))
+
+ file.write('property float x\n')
+ file.write('property float y\n')
+ file.write('property float z\n')
+
+ # XXX
+ """
+ if EXPORT_NORMALS:
+ file.write('property float nx\n')
+ file.write('property float ny\n')
+ file.write('property float nz\n')
+ """
+ if EXPORT_UV:
+ file.write('property float s\n')
+ file.write('property float t\n')
+ if EXPORT_COLORS:
+ file.write('property uchar red\n')
+ file.write('property uchar green\n')
+ file.write('property uchar blue\n')
+
+ file.write('element face %d\n' % len(mesh.faces))
+ file.write('property list uchar uint vertex_indices\n')
+ file.write('end_header\n')
+
+ for i, v in enumerate(ply_verts):
+ file.write('%.6f %.6f %.6f ' % tuple(mesh_verts[v[0]].co)) # co
+ """
+ if EXPORT_NORMALS:
+ file.write('%.6f %.6f %.6f ' % v[1]) # no
+ """
+ if EXPORT_UV: file.write('%.6f %.6f ' % v[2]) # uv
+ if EXPORT_COLORS: file.write('%u %u %u' % v[3]) # col
+ file.write('\n')
+
+ for pf in ply_faces:
+ if len(pf)==3: file.write('3 %d %d %d\n' % tuple(pf))
+ else: file.write('4 %d %d %d %d\n' % tuple(pf))
+
+ file.close()
+ print("writing", filename, "done")
+
+ if EXPORT_APPLY_MODIFIERS:
+ bpy.data.remove_mesh(mesh)
+
+ # XXX
+ """
+ if is_editmode:
+ Blender.Window.EditMode(1, '', 0)
+ """
+
+class EXPORT_OT_ply(bpy.types.Operator):
+ '''
+ Operator documentatuon text, will be used for the operator tooltip and python docs.
+ '''
+ __label__ = "Export PLY"
+
+ # List of operator properties, the attributes will be assigned
+ # to the class instance from the operator settings before calling.
+
+ __props__ = [
+ bpy.props.StringProperty(attr="filename", name="File Name", description="File name used for exporting the PLY file", maxlen= 1024, default= ""),
+ bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True),
+ bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True),
+ bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True),
+ bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
+ ]
+
+ def poll(self, context):
+ print("Poll")
+ return context.active_object != None
+
+ def execute(self, context):
+ # print("Selected: " + context.active_object.name)
+
+ if not self.filename:
+ raise Exception("filename not set")
+
+ write(self.filename, context.scene, context.active_object,\
+ EXPORT_APPLY_MODIFIERS = self.use_modifiers,
+ EXPORT_NORMALS = self.use_normals,
+ EXPORT_UV = self.use_uvs,
+ EXPORT_COLORS = self.use_colors,
+ )
+
+ return ('FINISHED',)
+
+ def invoke(self, context, event):
+ wm = context.manager
+ wm.add_fileselect(self.__operator__)
+ return ('RUNNING_MODAL',)
+
+
+bpy.ops.add(EXPORT_OT_ply)
+
+if __name__ == "__main__":
+ bpy.ops.EXPORT_OT_ply(filename="/tmp/test.ply")
+
+
diff --git a/release/scripts/bpymodules/dxfLibrary.py b/release/scripts/bpymodules/dxfLibrary.py
index 67528f778e0..ccd8ef9b625 100644
--- a/release/scripts/bpymodules/dxfLibrary.py
+++ b/release/scripts/bpymodules/dxfLibrary.py
@@ -1,6 +1,6 @@
#dxfLibrary.py : provides functions for generating DXF files
# --------------------------------------------------------------------------
-__version__ = "v1.32 - 2009.06.06"
+__version__ = "v1.33 - 2009.06.16"
__author__ = "Stani Michiels(Stani), Remigiusz Fiedler(migius)"
__license__ = "GPL"
__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf"
@@ -20,8 +20,14 @@ IDEAs:
TODO:
- add support for DXFr14 (needs extended file header)
- add support for SPLINEs (possible first in DXFr14 version)
+- add user preset for floating point precision (3-16?)
History
+v1.33 - 2009.06.16 by migius
+ - modif _point(): converts all coords to floats
+ - modif LineType class: implement elements
+ - added VPORT class, incl. defaults
+ - fix Insert class
v1.32 - 2009.06.06 by migius
- modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0
- modif Text class: alignment parameter reactivated
@@ -88,7 +94,7 @@ _HEADER_POINTS=['insbase','extmin','extmax']
def _point(x,index=0):
"""Convert tuple to a dxf point"""
#print 'deb: _point=', x #-------------
- return '\n'.join([' %s\n%s'%((i+1)*10+index,x[i]) for i in range(len(x))])
+ return '\n'.join([' %s\n%s'%((i+1)*10+index,float(x[i])) for i in range(len(x))])
def _points(plist):
"""Convert a list of tuples to dxf points"""
@@ -137,8 +143,8 @@ class _Entity(_Call):
if parent.layer!=None: result+=' 8\n%s\n'%parent.layer
if parent.color!=None: result+=' 62\n%s\n'%parent.color
if parent.lineType!=None: result+=' 6\n%s\n'%parent.lineType
- #TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight
- #TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible
+ # TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight
+ # TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible
if parent.lineTypeScale!=None: result+=' 48\n%s\n'%parent.lineTypeScale
if parent.elevation!=None: result+=' 38\n%s\n'%parent.elevation
if parent.thickness!=None: result+=' 39\n%s\n'%parent.thickness
@@ -287,7 +293,7 @@ class Insert(_Entity):
self.rotation=rotation
def __str__(self):
- result=' 0\nINSERT\n 2\n%s\n%s\n%s\n'%\
+ result=' 0\nINSERT\n 2\n%s\n%s%s\n'%\
(self.name,self._common(),_point(self.point))
if self.xscale!=None:result+=' 41\n%s\n'%self.xscale
if self.yscale!=None:result+=' 42\n%s\n'%self.yscale
@@ -383,7 +389,7 @@ class Point(_Entity):
def __init__(self,points=None,**common):
_Entity.__init__(self,**common)
self.points=points
- def __str__(self): #TODO:
+ def __str__(self): # TODO:
return ' 0\nPOINT\n%s%s\n' %(self._common(),
_points(self.points)
)
@@ -515,7 +521,7 @@ class Block(_Collection):
self.name=name
self.flag=0
self.base=base
- def __str__(self): #TODO:
+ def __str__(self): # TODO:
e=''.join([str(x)for x in self.entities])
return ' 0\nBLOCK\n 8\n%s\n 2\n%s\n 70\n%s\n%s\n 3\n%s\n%s 0\nENDBLK\n'%\
(self.layer,self.name.upper(),self.flag,_point(self.base),self.name.upper(),e)
@@ -535,15 +541,22 @@ class Layer(_Call):
#-----------------------------------------------
class LineType(_Call):
"""Custom linetype"""
- def __init__(self,name='continuous',description='Solid line',elements=[],flag=64):
- # TODO: Implement lineType elements
+ def __init__(self,name='CONTINUOUS',description='Solid line',elements=[0.0],flag=0):
self.name=name
self.description=description
self.elements=copy.copy(elements)
self.flag=flag
def __str__(self):
- return ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n 73\n%s\n 40\n0.0\n'%\
- (self.name.upper(),self.flag,self.description,len(self.elements))
+ result = ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n'%\
+ (self.name.upper(),self.flag,self.description)
+ if self.elements:
+ elements = ' 73\n%s\n' %(len(self.elements)-1)
+ elements += ' 40\n%s\n' %(self.elements[0])
+ for e in self.elements[1:]:
+ elements += ' 49\n%s\n' %e
+ result += elements
+ return result
+
#-----------------------------------------------
class Style(_Call):
@@ -566,27 +579,137 @@ class Style(_Call):
self.font.upper(),self.bigFont.upper())
#-----------------------------------------------
+class VPort(_Call):
+ def __init__(self,name,flag=0,
+ leftBottom=(0.0,0.0),
+ rightTop=(1.0,1.0),
+ center=(0.5,0.5),
+ snap_base=(0.0,0.0),
+ snap_spacing=(0.1,0.1),
+ grid_spacing=(0.1,0.1),
+ direction=(0.0,0.0,1.0),
+ target=(0.0,0.0,0.0),
+ height=1.0,
+ ratio=1.0,
+ lens=50,
+ frontClipping=0,
+ backClipping=0,
+ snap_rotation=0,
+ twist=0,
+ mode=0,
+ circle_zoom=100,
+ fast_zoom=1,
+ ucsicon=1,
+ snap_on=0,
+ grid_on=0,
+ snap_style=0,
+ snap_isopair=0
+ ):
+ self.name=name
+ self.flag=flag
+ self.leftBottom=leftBottom
+ self.rightTop=rightTop
+ self.center=center
+ self.snap_base=snap_base
+ self.snap_spacing=snap_spacing
+ self.grid_spacing=grid_spacing
+ self.direction=direction
+ self.target=target
+ self.height=float(height)
+ self.ratio=float(ratio)
+ self.lens=float(lens)
+ self.frontClipping=float(frontClipping)
+ self.backClipping=float(backClipping)
+ self.snap_rotation=float(snap_rotation)
+ self.twist=float(twist)
+ self.mode=mode
+ self.circle_zoom=circle_zoom
+ self.fast_zoom=fast_zoom
+ self.ucsicon=ucsicon
+ self.snap_on=snap_on
+ self.grid_on=grid_on
+ self.snap_style=snap_style
+ self.snap_isopair=snap_isopair
+ def __str__(self):
+ output = [' 0', 'VPORT',
+ ' 2', self.name,
+ ' 70', self.flag,
+ _point(self.leftBottom),
+ _point(self.rightTop,1),
+ _point(self.center,2), # View center point (in DCS)
+ _point(self.snap_base,3),
+ _point(self.snap_spacing,4),
+ _point(self.grid_spacing,5),
+ _point(self.direction,6), #view direction from target (in WCS)
+ _point(self.target,7),
+ ' 40', self.height,
+ ' 41', self.ratio,
+ ' 42', self.lens,
+ ' 43', self.frontClipping,
+ ' 44', self.backClipping,
+ ' 50', self.snap_rotation,
+ ' 51', self.twist,
+ ' 71', self.mode,
+ ' 72', self.circle_zoom,
+ ' 73', self.fast_zoom,
+ ' 74', self.ucsicon,
+ ' 75', self.snap_on,
+ ' 76', self.grid_on,
+ ' 77', self.snap_style,
+ ' 78', self.snap_isopair
+ ]
+
+ output_str = ''
+ for s in output:
+ output_str += '%s\n' %s
+ return output_str
+
+
+
+#-----------------------------------------------
class View(_Call):
- def __init__(self,name,flag=0,width=1,height=1,center=(0.5,0.5),
- direction=(0,0,1),target=(0,0,0),lens=50,
- frontClipping=0,backClipping=0,twist=0,mode=0):
+ def __init__(self,name,flag=0,
+ width=1,
+ height=1,
+ center=(0.5,0.5),
+ direction=(0,0,1),
+ target=(0,0,0),
+ lens=50,
+ frontClipping=0,
+ backClipping=0,
+ twist=0,mode=0
+ ):
self.name=name
self.flag=flag
- self.width=width
- self.height=height
+ self.width=float(width)
+ self.height=float(height)
self.center=center
self.direction=direction
self.target=target
- self.lens=lens
- self.frontClipping=frontClipping
- self.backClipping=backClipping
- self.twist=twist
+ self.lens=float(lens)
+ self.frontClipping=float(frontClipping)
+ self.backClipping=float(backClipping)
+ self.twist=float(twist)
self.mode=mode
def __str__(self):
- return ' 0\nVIEW\n 2\n%s\n 70\n%s\n 40\n%s\n%s\n 41\n%s\n%s\n%s\n 42\n%s\n 43\n%s\n 44\n%s\n 50\n%s\n 71\n%s\n'%\
- (self.name,self.flag,self.height,_point(self.center),self.width,
- _point(self.direction,1),_point(self.target,2),self.lens,
- self.frontClipping,self.backClipping,self.twist,self.mode)
+ output = [' 0', 'VIEW',
+ ' 2', self.name,
+ ' 70', self.flag,
+ ' 40', self.height,
+ _point(self.center),
+ ' 41', self.width,
+ _point(self.direction,1),
+ _point(self.target,2),
+ ' 42', self.lens,
+ ' 43', self.frontClipping,
+ ' 44', self.backClipping,
+ ' 50', self.twist,
+ ' 71', self.mode
+ ]
+ output_str = ''
+ for s in output:
+ output_str += '%s\n' %s
+ return output_str
#-----------------------------------------------
def ViewByWindow(name,leftBottom=(0,0),rightTop=(1,1),**options):
@@ -601,7 +724,7 @@ class Drawing(_Collection):
"""Dxf drawing. Use append or any other list methods to add objects."""
def __init__(self,insbase=(0.0,0.0,0.0),extmin=(0.0,0.0,0.0),extmax=(0.0,0.0,0.0),
layers=[Layer()],linetypes=[LineType()],styles=[Style()],blocks=[],
- views=[],entities=None,fileName='test.dxf'):
+ views=[],vports=[],entities=None,fileName='test.dxf'):
# TODO: replace list with None,arial
if not entities:
entities=[]
@@ -613,6 +736,7 @@ class Drawing(_Collection):
self.linetypes=copy.copy(linetypes)
self.styles=copy.copy(styles)
self.views=copy.copy(views)
+ self.vports=copy.copy(vports)
self.blocks=copy.copy(blocks)
self.fileName=fileName
#private
@@ -656,7 +780,8 @@ class Drawing(_Collection):
header=[self.acadver]+[self._point(attr,getattr(self,attr))+'\n' for attr in _HEADER_POINTS]
header=self._section('header',header)
- tables=[self._table('ltype',[str(x) for x in self.linetypes]),
+ tables=[self._table('vport',[str(x) for x in self.vports]),
+ self._table('ltype',[str(x) for x in self.linetypes]),
self._table('layer',[str(x) for x in self.layers]),
self._table('style',[str(x) for x in self.styles]),
self._table('view',[str(x) for x in self.views]),
@@ -740,17 +865,16 @@ def test():
d.append(Line(points=[(0,0,0),(1,1,1)]))
d.append(Mtext('Click on Ads\nmultiple lines with mtext',point=(1,1,1),color=5,rotation=90))
d.append(Text('Please donate!',point=(3,0,1)))
- d.append(Rectangle(point=(2,2,2),width=4,height=3,color=6,solid=Solid(color=2)))
+ #d.append(Rectangle(point=(2,2,2),width=4,height=3,color=6,solid=Solid(color=2)))
d.append(Solid(points=[(4,4,0),(5,4,0),(7,8,0),(9,9,0)],color=3))
- d.append(PolyLine(points=[(1,1,1),(2,1,1),(2,2,1),(1,2,1)],closed=1,color=1))
+ #d.append(PolyLine(points=[(1,1,1),(2,1,1),(2,2,1),(1,2,1)],flag=1,color=1))
#d.saveas('c:\\test.dxf')
d.saveas('test.dxf')
-
#-----------------------------------------------------
if __name__=='__main__':
if not copy:
Draw.PupMenu('Error%t|This script requires a full python install')
- else: main()
+ else: test()
\ No newline at end of file
diff --git a/release/scripts/export_obj.py b/release/scripts/export_obj.py
index 0edc70a874b..739b02bcbb3 100644
--- a/release/scripts/export_obj.py
+++ b/release/scripts/export_obj.py
@@ -181,12 +181,89 @@ def copy_images(dest_dir):
copyCount+=1
print '\tCopied %d images' % copyCount
+
+def test_nurbs_compat(ob):
+ if ob.type != 'Curve':
+ return False
+
+ for nu in ob.data:
+ if (not nu.knotsV) and nu.type != 1: # not a surface and not bezier
+ return True
+
+ return False
+
+def write_nurb(file, ob, ob_mat):
+ tot_verts = 0
+ cu = ob.data
+
+ # use negative indices
+ Vector = Blender.Mathutils.Vector
+ for nu in cu:
+
+ if nu.type==0: DEG_ORDER_U = 1
+ else: DEG_ORDER_U = nu.orderU-1 # Tested to be correct
+
+ if nu.type==1:
+ print "\tWarning, bezier curve:", ob.name, "only poly and nurbs curves supported"
+ continue
+
+ if nu.knotsV:
+ print "\tWarning, surface:", ob.name, "only poly and nurbs curves supported"
+ continue
+
+ if len(nu) <= DEG_ORDER_U:
+ print "\tWarning, orderU is lower then vert count, skipping:", ob.name
+ continue
+
+ pt_num = 0
+ do_closed = (nu.flagU & 1)
+ do_endpoints = (do_closed==0) and (nu.flagU & 2)
+
+ for pt in nu:
+ pt = Vector(pt[0], pt[1], pt[2]) * ob_mat
+ file.write('v %.6f %.6f %.6f\n' % (pt[0], pt[1], pt[2]))
+ pt_num += 1
+ tot_verts += pt_num
+
+ file.write('g %s\n' % (fixName(ob.name))) # fixName(ob.getData(1)) could use the data name too
+ file.write('cstype bspline\n') # not ideal, hard coded
+ file.write('deg %d\n' % DEG_ORDER_U) # not used for curves but most files have it still
+
+ curve_ls = [-(i+1) for i in xrange(pt_num)]
+
+ # 'curv' keyword
+ if do_closed:
+ if DEG_ORDER_U == 1:
+ pt_num += 1
+ curve_ls.append(-1)
+ else:
+ pt_num += DEG_ORDER_U
+ curve_ls = curve_ls + curve_ls[0:DEG_ORDER_U]
+
+ file.write('curv 0.0 1.0 %s\n' % (' '.join( [str(i) for i in curve_ls] ))) # Blender has no U and V values for the curve
+
+ # 'parm' keyword
+ tot_parm = (DEG_ORDER_U + 1) + pt_num
+ tot_parm_div = float(tot_parm-1)
+ parm_ls = [(i/tot_parm_div) for i in xrange(tot_parm)]
+
+ if do_endpoints: # end points, force param
+ for i in xrange(DEG_ORDER_U+1):
+ parm_ls[i] = 0.0
+ parm_ls[-(1+i)] = 1.0
+
+ file.write('parm u %s\n' % ' '.join( [str(i) for i in parm_ls] ))
+
+ file.write('end\n')
+
+ return tot_verts
+
def write(filename, objects,\
EXPORT_TRI=False, EXPORT_EDGES=False, EXPORT_NORMALS=False, EXPORT_NORMALS_HQ=False,\
EXPORT_UV=True, EXPORT_MTL=True, EXPORT_COPY_IMAGES=False,\
EXPORT_APPLY_MODIFIERS=True, EXPORT_ROTX90=True, EXPORT_BLEN_OBS=True,\
EXPORT_GROUP_BY_OB=False, EXPORT_GROUP_BY_MAT=False, EXPORT_KEEP_VERT_ORDER=False,\
-EXPORT_POLYGROUPS=False):
+EXPORT_POLYGROUPS=False, EXPORT_CURVE_AS_NURBS=True):
'''
Basic write function. The context and options must be alredy set
This can be accessed externaly
@@ -266,6 +343,17 @@ EXPORT_POLYGROUPS=False):
# Get all meshes
for ob_main in objects:
for ob, ob_mat in BPyObject.getDerivedObjects(ob_main):
+
+ # Nurbs curve support
+ if EXPORT_CURVE_AS_NURBS and test_nurbs_compat(ob):
+ if EXPORT_ROTX90:
+ ob_mat = ob_mat * mat_xrot90
+
+ totverts += write_nurb(file, ob, ob_mat)
+
+ continue
+ # end nurbs
+
# Will work for non meshes now! :)
# getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=True, scn=None)
me= BPyMesh.getMeshFromObject(ob, containerMesh, EXPORT_APPLY_MODIFIERS, EXPORT_POLYGROUPS, scn)
@@ -585,7 +673,7 @@ def write_ui(filename):
EXPORT_MTL, EXPORT_SEL_ONLY, EXPORT_ALL_SCENES,\
EXPORT_ANIMATION, EXPORT_COPY_IMAGES, EXPORT_BLEN_OBS,\
EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, EXPORT_KEEP_VERT_ORDER,\
- EXPORT_POLYGROUPS
+ EXPORT_POLYGROUPS, EXPORT_CURVE_AS_NURBS
EXPORT_APPLY_MODIFIERS = Draw.Create(0)
EXPORT_ROTX90 = Draw.Create(1)
@@ -604,6 +692,7 @@ def write_ui(filename):
EXPORT_GROUP_BY_MAT = Draw.Create(0)
EXPORT_KEEP_VERT_ORDER = Draw.Create(1)
EXPORT_POLYGROUPS = Draw.Create(0)
+ EXPORT_CURVE_AS_NURBS = Draw.Create(1)
# Old UI
@@ -693,7 +782,7 @@ def write_ui(filename):
EXPORT_MTL, EXPORT_SEL_ONLY, EXPORT_ALL_SCENES,\
EXPORT_ANIMATION, EXPORT_COPY_IMAGES, EXPORT_BLEN_OBS,\
EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, EXPORT_KEEP_VERT_ORDER,\
- EXPORT_POLYGROUPS
+ EXPORT_POLYGROUPS, EXPORT_CURVE_AS_NURBS
Draw.Label('Context...', ui_x+9, ui_y+239, 220, 20)
Draw.BeginAlign()
@@ -726,6 +815,8 @@ def write_ui(filename):
Draw.EndAlign()
EXPORT_POLYGROUPS = Draw.Toggle('Polygroups', EVENT_REDRAW, ui_x+9, ui_y+95, 120, 20, EXPORT_POLYGROUPS.val, 'Export vertex groups as OBJ groups (one group per face approximation).')
+ EXPORT_CURVE_AS_NURBS = Draw.Toggle('Nurbs', EVENT_NONE, ui_x+139, ui_y+95, 100, 20, EXPORT_CURVE_AS_NURBS.val, 'Export 3D nurbs curves and polylines as OBJ curves, (bezier not supported).')
+
Draw.Label('Blender Objects as OBJ:', ui_x+9, ui_y+59, 220, 20)
Draw.BeginAlign()
@@ -779,6 +870,7 @@ def write_ui(filename):
EXPORT_GROUP_BY_MAT = EXPORT_GROUP_BY_MAT.val
EXPORT_KEEP_VERT_ORDER = EXPORT_KEEP_VERT_ORDER.val
EXPORT_POLYGROUPS = EXPORT_POLYGROUPS.val
+ EXPORT_CURVE_AS_NURBS = EXPORT_CURVE_AS_NURBS.val
base_name, ext = splitExt(filename)
@@ -828,7 +920,7 @@ def write_ui(filename):
EXPORT_COPY_IMAGES, EXPORT_APPLY_MODIFIERS,\
EXPORT_ROTX90, EXPORT_BLEN_OBS,\
EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, EXPORT_KEEP_VERT_ORDER,\
- EXPORT_POLYGROUPS)
+ EXPORT_POLYGROUPS, EXPORT_CURVE_AS_NURBS)
Blender.Set('curframe', orig_frame)
diff --git a/release/scripts/flt_properties.py b/release/scripts/flt_properties.py
index 4c841e9c0c0..b9d93b5f52d 100644
--- a/release/scripts/flt_properties.py
+++ b/release/scripts/flt_properties.py
@@ -1,4 +1,3 @@
-#!BPY
# flt_properties.py. For setting default OpenFLight ID property types
# Copyright (C) 2007 Blender Foundation
#
diff --git a/release/scripts/import_obj.py b/release/scripts/import_obj.py
index 31501173fda..d88f06a2a47 100644
--- a/release/scripts/import_obj.py
+++ b/release/scripts/import_obj.py
@@ -2,7 +2,7 @@
"""
Name: 'Wavefront (.obj)...'
-Blender: 248
+Blender: 249
Group: 'Import'
Tooltip: 'Load a Wavefront OBJ File, Shift: batch import all dir.'
"""
@@ -40,7 +40,7 @@ Note, This loads mesh objects and materials only, nurbs and curves are not suppo
# ***** END GPL LICENCE BLOCK *****
# --------------------------------------------------------------------------
-from Blender import *
+from Blender import Mesh, Draw, Window, Texture, Material, sys
import bpy
import BPyMesh
import BPyImage
@@ -166,12 +166,13 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
del temp_mtl
#Create new materials
- for name in unique_materials.iterkeys():
- unique_materials[name]= bpy.data.materials.new(name)
-
- unique_material_images[name]= None, False # assign None to all material images to start with, add to later.
+ for name in unique_materials: # .keys()
+ if name != None:
+ unique_materials[name]= bpy.data.materials.new(name)
+ unique_material_images[name]= None, False # assign None to all material images to start with, add to later.
unique_materials[None]= None
+ unique_material_images[None]= None, False
for libname in material_libs:
mtlpath= DIR + libname
@@ -536,6 +537,98 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
me.addVertGroup(group_name)
me.assignVertsToGroup(group_name, group_indicies,1.00, Mesh.AssignModes.REPLACE)
+
+def create_nurbs(scn, context_nurbs, vert_loc, new_objects):
+ '''
+ Add nurbs object to blender, only support one type at the moment
+ '''
+ deg = context_nurbs.get('deg', (3,))
+ curv_range = context_nurbs.get('curv_range', None)
+ curv_idx = context_nurbs.get('curv_idx', [])
+ parm_u = context_nurbs.get('parm_u', [])
+ parm_v = context_nurbs.get('parm_v', [])
+ name = context_nurbs.get('name', 'ObjNurb')
+ cstype = context_nurbs.get('cstype', None)
+
+ if cstype == None:
+ print '\tWarning, cstype not found'
+ return
+ if cstype != 'bspline':
+ print '\tWarning, cstype is not supported (only bspline)'
+ return
+ if not curv_idx:
+ print '\tWarning, curv argument empty or not set'
+ return
+ if len(deg) > 1 or parm_v:
+ print '\tWarning, surfaces not supported'
+ return
+
+ cu = bpy.data.curves.new(name, 'Curve')
+ cu.flag |= 1 # 3D curve
+
+ nu = None
+ for pt in curv_idx:
+
+ pt = vert_loc[pt]
+ pt = (pt[0], pt[1], pt[2], 1.0)
+
+ if nu == None:
+ nu = cu.appendNurb(pt)
+ else:
+ nu.append(pt)
+
+ nu.orderU = deg[0]+1
+
+ # get for endpoint flag from the weighting
+ if curv_range and len(parm_u) > deg[0]+1:
+ do_endpoints = True
+ for i in xrange(deg[0]+1):
+
+ if abs(parm_u[i]-curv_range[0]) > 0.0001:
+ do_endpoints = False
+ break
+
+ if abs(parm_u[-(i+1)]-curv_range[1]) > 0.0001:
+ do_endpoints = False
+ break
+
+ else:
+ do_endpoints = False
+
+ if do_endpoints:
+ nu.flagU |= 2
+
+
+ # close
+ '''
+ do_closed = False
+ if len(parm_u) > deg[0]+1:
+ for i in xrange(deg[0]+1):
+ #print curv_idx[i], curv_idx[-(i+1)]
+
+ if curv_idx[i]==curv_idx[-(i+1)]:
+ do_closed = True
+ break
+
+ if do_closed:
+ nu.flagU |= 1
+ '''
+
+ ob = scn.objects.new(cu)
+ new_objects.append(ob)
+
+
+def strip_slash(line_split):
+ if line_split[-1][-1]== '\\':
+ if len(line_split[-1])==1:
+ line_split.pop() # remove the \ item
+ else:
+ line_split[-1]= line_split[-1][:-1] # remove the \ from the end last number
+ return True
+ return False
+
+
+
def get_float_func(filepath):
'''
find the float function for this obj file
@@ -561,6 +654,7 @@ def load_obj(filepath,
SPLIT_OBJECTS= True,
SPLIT_GROUPS= True,
SPLIT_MATERIALS= True,
+ ROTATE_X90= True,
IMAGE_SEARCH=True,
POLYGROUPS=False):
'''
@@ -590,6 +684,11 @@ def load_obj(filepath,
context_smooth_group= None
context_object= None
context_vgroup = None
+
+ # Nurbs
+ context_nurbs = {}
+ nurbs = []
+ context_parm = '' # used by nurbs too but could be used elsewhere
has_ngons= False
# has_smoothgroups= False - is explicit with len(unique_smooth_groups) being > 0
@@ -604,7 +703,7 @@ def load_obj(filepath,
# it means they are multiline-
# since we use xreadline we cant skip to the next line
# so we need to know weather
- multi_line_face= False
+ context_multi_line= ''
print '\tparsing obj file "%s"...' % filepath,
time_sub= sys.time()
@@ -627,12 +726,11 @@ def load_obj(filepath,
# Handel faces lines (as faces) and the second+ lines of fa multiline face here
# use 'f' not 'f ' because some objs (very rare have 'fo ' for faces)
- elif line.startswith('f') or (line.startswith('l ') and CREATE_EDGES) or multi_line_face:
+ elif line.startswith('f') or context_multi_line == 'f':
- if multi_line_face:
+ if context_multi_line:
# use face_vert_loc_indicies and face_vert_tex_indicies previously defined and used the obj_face
line_split= line.split()
- multi_line_face= False
else:
line_split= line[2:].split()
@@ -648,14 +746,10 @@ def load_obj(filepath,
context_object\
))
- if line_split[-1][-1]== '\\':
- multi_line_face= True
- if len(line_split[-1])==1:
- line_split.pop() # remove the \ item
- else:
- line_split[-1]= line_split[-1][:-1] # remove the \ from the end last number
-
- isline= line.startswith('l')
+ if strip_slash(line_split):
+ context_multi_line = 'f'
+ else:
+ context_multi_line = ''
for v in line_split:
obj_vert= v.split('/')
@@ -672,24 +766,60 @@ def load_obj(filepath,
face_vert_loc_indicies.append(vert_loc_index)
- if not isline:
- if len(obj_vert)>1 and obj_vert[1]:
- # formatting for faces with normals and textures us
- # loc_index/tex_index/nor_index
-
- vert_tex_index= int(obj_vert[1])-1
- # Make relative negative vert indicies absolute
- if vert_tex_index < 0:
- vert_tex_index= len(verts_tex) + vert_tex_index + 1
-
- face_vert_tex_indicies.append(vert_tex_index)
- else:
- # dummy
- face_vert_tex_indicies.append(0)
+ if len(obj_vert)>1 and obj_vert[1]:
+ # formatting for faces with normals and textures us
+ # loc_index/tex_index/nor_index
+
+ vert_tex_index= int(obj_vert[1])-1
+ # Make relative negative vert indicies absolute
+ if vert_tex_index < 0:
+ vert_tex_index= len(verts_tex) + vert_tex_index + 1
+
+ face_vert_tex_indicies.append(vert_tex_index)
+ else:
+ # dummy
+ face_vert_tex_indicies.append(0)
if len(face_vert_loc_indicies) > 4:
has_ngons= True
+
+ elif CREATE_EDGES and (line.startswith('l ') or context_multi_line == 'l'):
+ # very similar to the face load function above with some parts removed
+ if context_multi_line:
+ # use face_vert_loc_indicies and face_vert_tex_indicies previously defined and used the obj_face
+ line_split= line.split()
+
+ else:
+ line_split= line[2:].split()
+ face_vert_loc_indicies= []
+ face_vert_tex_indicies= []
+
+ # Instance a face
+ faces.append((\
+ face_vert_loc_indicies,\
+ face_vert_tex_indicies,\
+ context_material,\
+ context_smooth_group,\
+ context_object\
+ ))
+
+ if strip_slash(line_split):
+ context_multi_line = 'l'
+ else:
+ context_multi_line = ''
+
+ isline= line.startswith('l')
+
+ for v in line_split:
+ vert_loc_index= int(v)-1
+
+ # Make relative negative vert indicies absolute
+ if vert_loc_index < 0:
+ vert_loc_index= len(verts_loc) + vert_loc_index + 1
+
+ face_vert_loc_indicies.append(vert_loc_index)
+
elif line.startswith('s'):
if CREATE_SMOOTH_GROUPS:
context_smooth_group= line_value(line.split())
@@ -720,6 +850,63 @@ def load_obj(filepath,
unique_materials[context_material]= None
elif line.startswith('mtllib'): # usemap or usemat
material_libs.extend( line.split()[1:] ) # can have multiple mtllib filenames per line
+
+
+ # Nurbs support
+ elif line.startswith('cstype '):
+ context_nurbs['cstype']= line_value(line.split()) # 'rat bspline' / 'bspline'
+ elif line.startswith('curv ') or context_multi_line == 'curv':
+ line_split= line.split()
+
+ curv_idx = context_nurbs['curv_idx'] = context_nurbs.get('curv_idx', []) # incase were multiline
+
+ if not context_multi_line:
+ context_nurbs['curv_range'] = float_func(line_split[1]), float_func(line_split[2])
+ line_split[0:3] = [] # remove first 3 items
+
+ if strip_slash(line_split):
+ context_multi_line = 'curv'
+ else:
+ context_multi_line = ''
+
+
+ for i in line_split:
+ vert_loc_index = int(i)-1
+
+ if vert_loc_index < 0:
+ vert_loc_index= len(verts_loc) + vert_loc_index + 1
+
+ curv_idx.append(vert_loc_index)
+
+ elif line.startswith('parm') or context_multi_line == 'parm':
+ line_split= line.split()
+
+ if context_multi_line:
+ context_multi_line = ''
+ else:
+ context_parm = line_split[1]
+ line_split[0:2] = [] # remove first 2
+
+ if strip_slash(line_split):
+ context_multi_line = 'parm'
+ else:
+ context_multi_line = ''
+
+ if context_parm.lower() == 'u':
+ context_nurbs.setdefault('parm_u', []).extend( [float_func(f) for f in line_split] )
+ elif context_parm.lower() == 'v': # surfaces not suported yet
+ context_nurbs.setdefault('parm_v', []).extend( [float_func(f) for f in line_split] )
+ # else: # may want to support other parm's ?
+
+ elif line.startswith('deg '):
+ context_nurbs['deg']= [int(i) for i in line.split()[1:]]
+ elif line.startswith('end'):
+ # Add the nurbs curve
+ if context_object:
+ context_nurbs['name'] = context_object
+ nurbs.append(context_nurbs)
+ context_nurbs = {}
+ context_parm = ''
''' # How to use usemap? depricated?
elif line.startswith('usema'): # usemap or usemat
@@ -739,6 +926,8 @@ def load_obj(filepath,
print '%.4f sec' % (time_new-time_sub)
time_sub= time_new
+ if not ROTATE_X90:
+ verts_loc[:] = [(v[0], v[2], -v[1]) for v in verts_loc]
# deselect all
scn = bpy.data.scenes.active
@@ -754,6 +943,11 @@ def load_obj(filepath,
# Create meshes from the data, warning 'vertex_groups' wont support splitting
create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc_split, verts_tex, faces_split, unique_materials_split, unique_material_images, unique_smooth_groups, vertex_groups, dataname)
+ # nurbs support
+ for context_nurbs in nurbs:
+ create_nurbs(scn, context_nurbs, verts_loc, new_objects)
+
+
axis_min= [ 1000000000]*3
axis_max= [-1000000000]*3
@@ -775,6 +969,11 @@ def load_obj(filepath,
for ob in new_objects:
ob.setSize(scale, scale, scale)
+ # Better rotate the vert locations
+ #if not ROTATE_X90:
+ # for ob in new_objects:
+ # ob.RotX = -1.570796326794896558
+
time_new= sys.time()
print '%.4f sec' % (time_new-time_sub)
@@ -788,7 +987,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
if BPyMessages.Error_NoFile(filepath):
return
- global CREATE_SMOOTH_GROUPS, CREATE_FGONS, CREATE_EDGES, SPLIT_OBJECTS, SPLIT_GROUPS, SPLIT_MATERIALS, CLAMP_SIZE, IMAGE_SEARCH, POLYGROUPS, KEEP_VERT_ORDER
+ global CREATE_SMOOTH_GROUPS, CREATE_FGONS, CREATE_EDGES, SPLIT_OBJECTS, SPLIT_GROUPS, SPLIT_MATERIALS, CLAMP_SIZE, IMAGE_SEARCH, POLYGROUPS, KEEP_VERT_ORDER, ROTATE_X90
CREATE_SMOOTH_GROUPS= Draw.Create(0)
CREATE_FGONS= Draw.Create(1)
@@ -800,6 +999,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
IMAGE_SEARCH= Draw.Create(1)
POLYGROUPS= Draw.Create(0)
KEEP_VERT_ORDER= Draw.Create(1)
+ ROTATE_X90= Draw.Create(1)
# Get USER Options
@@ -886,7 +1086,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
ui_x -= 165
ui_y -= 90
- global CREATE_SMOOTH_GROUPS, CREATE_FGONS, CREATE_EDGES, SPLIT_OBJECTS, SPLIT_GROUPS, SPLIT_MATERIALS, CLAMP_SIZE, IMAGE_SEARCH, POLYGROUPS, KEEP_VERT_ORDER
+ global CREATE_SMOOTH_GROUPS, CREATE_FGONS, CREATE_EDGES, SPLIT_OBJECTS, SPLIT_GROUPS, SPLIT_MATERIALS, CLAMP_SIZE, IMAGE_SEARCH, POLYGROUPS, KEEP_VERT_ORDER, ROTATE_X90
Draw.Label('Import...', ui_x+9, ui_y+159, 220, 21)
Draw.BeginAlign()
@@ -897,13 +1097,15 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
Draw.Label('Separate objects by OBJ...', ui_x+9, ui_y+110, 220, 20)
Draw.BeginAlign()
- SPLIT_OBJECTS = Draw.Toggle('Object', EVENT_REDRAW, ui_x+9, ui_y+89, 70, 21, SPLIT_OBJECTS.val, 'Import OBJ Objects into Blender Objects', do_split)
- SPLIT_GROUPS = Draw.Toggle('Group', EVENT_REDRAW, ui_x+79, ui_y+89, 70, 21, SPLIT_GROUPS.val, 'Import OBJ Groups into Blender Objects', do_split)
- SPLIT_MATERIALS = Draw.Toggle('Material', EVENT_REDRAW, ui_x+149, ui_y+89, 70, 21, SPLIT_MATERIALS.val, 'Import each material into a seperate mesh (Avoids > 16 per mesh error)', do_split)
+ SPLIT_OBJECTS = Draw.Toggle('Object', EVENT_REDRAW, ui_x+9, ui_y+89, 55, 21, SPLIT_OBJECTS.val, 'Import OBJ Objects into Blender Objects', do_split)
+ SPLIT_GROUPS = Draw.Toggle('Group', EVENT_REDRAW, ui_x+64, ui_y+89, 55, 21, SPLIT_GROUPS.val, 'Import OBJ Groups into Blender Objects', do_split)
+ SPLIT_MATERIALS = Draw.Toggle('Material', EVENT_REDRAW, ui_x+119, ui_y+89, 60, 21, SPLIT_MATERIALS.val, 'Import each material into a seperate mesh (Avoids > 16 per mesh error)', do_split)
Draw.EndAlign()
# Only used for user feedback
- KEEP_VERT_ORDER = Draw.Toggle('Keep Vert Order', EVENT_REDRAW, ui_x+229, ui_y+89, 110, 21, KEEP_VERT_ORDER.val, 'Keep vert and face order, disables split options, enable for morph targets', do_vertorder)
+ KEEP_VERT_ORDER = Draw.Toggle('Keep Vert Order', EVENT_REDRAW, ui_x+184, ui_y+89, 113, 21, KEEP_VERT_ORDER.val, 'Keep vert and face order, disables split options, enable for morph targets', do_vertorder)
+
+ ROTATE_X90 = Draw.Toggle('-X90', EVENT_REDRAW, ui_x+302, ui_y+89, 38, 21, ROTATE_X90.val, 'Rotate X 90.')
Draw.Label('Options...', ui_x+9, ui_y+60, 211, 20)
CLAMP_SIZE = Draw.Number('Clamp Scale: ', EVENT_NONE, ui_x+9, ui_y+39, 130, 21, CLAMP_SIZE.val, 0.0, 1000.0, 'Clamp the size to this maximum (Zero to Disable)')
@@ -958,6 +1160,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
SPLIT_OBJECTS.val,\
SPLIT_GROUPS.val,\
SPLIT_MATERIALS.val,\
+ ROTATE_X90.val,\
IMAGE_SEARCH.val,\
POLYGROUPS.val
)
@@ -971,6 +1174,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
SPLIT_OBJECTS.val,\
SPLIT_GROUPS.val,\
SPLIT_MATERIALS.val,\
+ ROTATE_X90.val,\
IMAGE_SEARCH.val,\
POLYGROUPS.val
)
@@ -989,34 +1193,28 @@ if __name__=='__main__' and not DEBUG:
else:
Window.FileSelector(load_obj_ui, 'Import a Wavefront OBJ', '*.obj')
-
+ # For testing compatibility
'''
-# For testing compatibility
else:
# DEBUG ONLY
TIME= sys.time()
+ DIR = '/fe/obj'
import os
print 'Searching for files'
- os.system('find /fe/obj -iname "*.obj" > /tmp/temp3ds_list')
-
- print '...Done'
- file= open('/tmp/temp3ds_list', 'rU')
- lines= file.readlines()
- file.close()
-
- def between(v,a,b):
- if v <= max(a,b) and v >= min(a,b):
- return True
- return False
-
- for i, _obj in enumerate(lines):
- if between(i, 0,20):
- _obj= _obj[:-1]
- print 'Importing', _obj, '\nNUMBER', i, 'of', len(lines)
- _obj_file= _obj.split('/')[-1].split('\\')[-1]
- newScn= bpy.data.scenes.new(_obj_file)
+ def fileList(path):
+ for dirpath, dirnames, filenames in os.walk(path):
+ for filename in filenames:
+ yield os.path.join(dirpath, filename)
+
+ files = [f for f in fileList(DIR) if f.lower().endswith('.obj')]
+ files.sort()
+
+ for i, obj_file in enumerate(files):
+ if 0 < i < 20:
+ print 'Importing', obj_file, '\nNUMBER', i, 'of', len(files)
+ newScn= bpy.data.scenes.new(os.path.basename(obj_file))
newScn.makeCurrent()
- load_obj(_obj, False)
+ load_obj(obj_file, False, IMAGE_SEARCH=0)
print 'TOTAL TIME: %.6f' % (sys.time() - TIME)
'''
diff --git a/release/scripts/ply_export.py b/release/scripts/ply_export.py
deleted file mode 100644
index 46d08050302..00000000000
--- a/release/scripts/ply_export.py
+++ /dev/null
@@ -1,228 +0,0 @@
-#!BPY
-
-"""
-Name: 'Stanford PLY (*.ply)...'
-Blender: 241
-Group: 'Export'
-Tooltip: 'Export active object to Stanford PLY format'
-"""
-
-import bpy
-import Blender
-from Blender import Mesh, Scene, Window, sys, Image, Draw
-import BPyMesh
-
-__author__ = "Bruce Merry"
-__version__ = "0.93"
-__bpydoc__ = """\
-This script exports Stanford PLY files from Blender. It supports normals,
-colours, and texture coordinates per face or per vertex.
-Only one mesh can be exported at a time.
-"""
-
-# Copyright (C) 2004, 2005: Bruce Merry, bmerry@cs.uct.ac.za
-#
-# 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.
-# Vector rounding se we can use as keys
-#
-# Updated on Aug 11, 2008 by Campbell Barton
-# - added 'comment' prefix to comments - Needed to comply with the PLY spec.
-#
-# Updated on Jan 1, 2007 by Gabe Ghearing
-# - fixed normals so they are correctly smooth/flat
-# - fixed crash when the model doesn't have uv coords or vertex colors
-# - fixed crash when the model has vertex colors but doesn't have uv coords
-# - changed float32 to float and uint8 to uchar for compatibility
-# Errata/Notes as of Jan 1, 2007
-# - script exports texture coords if they exist even if TexFace isn't selected (not a big deal to me)
-# - ST(R) should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either)
-#
-# Updated on Jan 3, 2007 by Gabe Ghearing
-# - fixed "sticky" vertex UV exporting
-# - added pupmenu to enable/disable exporting normals, uv coords, and colors
-# Errata/Notes as of Jan 3, 2007
-# - ST(R) coords should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either)
-# - edges should be exported since PLY files support them
-# - code is getting spaghettish, it should be refactored...
-#
-
-
-def rvec3d(v): return round(v[0], 6), round(v[1], 6), round(v[2], 6)
-def rvec2d(v): return round(v[0], 6), round(v[1], 6)
-
-def file_callback(filename):
-
- if not filename.lower().endswith('.ply'):
- filename += '.ply'
-
- scn= bpy.data.scenes.active
- ob= scn.objects.active
- if not ob:
- Blender.Draw.PupMenu('Error%t|Select 1 active object')
- return
-
- file = open(filename, 'wb')
-
- EXPORT_APPLY_MODIFIERS = Draw.Create(1)
- EXPORT_NORMALS = Draw.Create(1)
- EXPORT_UV = Draw.Create(1)
- EXPORT_COLORS = Draw.Create(1)
- #EXPORT_EDGES = Draw.Create(0)
-
- pup_block = [\
- ('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data.'),\
- ('Normals', EXPORT_NORMALS, 'Export vertex normal data.'),\
- ('UVs', EXPORT_UV, 'Export texface UV coords.'),\
- ('Colors', EXPORT_COLORS, 'Export vertex Colors.'),\
- #('Edges', EXPORT_EDGES, 'Edges not connected to faces.'),\
- ]
-
- if not Draw.PupBlock('Export...', pup_block):
- return
-
- is_editmode = Blender.Window.EditMode()
- if is_editmode:
- Blender.Window.EditMode(0, '', 0)
-
- Window.WaitCursor(1)
-
- EXPORT_APPLY_MODIFIERS = EXPORT_APPLY_MODIFIERS.val
- EXPORT_NORMALS = EXPORT_NORMALS.val
- EXPORT_UV = EXPORT_UV.val
- EXPORT_COLORS = EXPORT_COLORS.val
- #EXPORT_EDGES = EXPORT_EDGES.val
-
- mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn)
-
- if not mesh:
- Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object')
- return
-
- mesh.transform(ob.matrixWorld)
-
- faceUV = mesh.faceUV
- vertexUV = mesh.vertexUV
- vertexColors = mesh.vertexColors
-
- if (not faceUV) and (not vertexUV): EXPORT_UV = False
- if not vertexColors: EXPORT_COLORS = False
-
- if not EXPORT_UV: faceUV = vertexUV = False
- if not EXPORT_COLORS: vertexColors = False
-
- # incase
- color = uvcoord = uvcoord_key = normal = normal_key = None
-
- verts = [] # list of dictionaries
- # vdict = {} # (index, normal, uv) -> new index
- vdict = [{} for i in xrange(len(mesh.verts))]
- vert_count = 0
- for i, f in enumerate(mesh.faces):
- smooth = f.smooth
- if not smooth:
- normal = tuple(f.no)
- normal_key = rvec3d(normal)
-
- if faceUV: uv = f.uv
- if vertexColors: col = f.col
- for j, v in enumerate(f):
- if smooth:
- normal= tuple(v.no)
- normal_key = rvec3d(normal)
-
- if faceUV:
- uvcoord= uv[j][0], 1.0-uv[j][1]
- uvcoord_key = rvec2d(uvcoord)
- elif vertexUV:
- uvcoord= v.uvco[0], 1.0-v.uvco[1]
- uvcoord_key = rvec2d(uvcoord)
-
- if vertexColors: color= col[j].r, col[j].g, col[j].b
-
-
- key = normal_key, uvcoord_key, color
-
- vdict_local = vdict[v.index]
-
- if (not vdict_local) or (not vdict_local.has_key(key)):
- vdict_local[key] = vert_count;
- verts.append( (tuple(v.co), normal, uvcoord, color) )
- vert_count += 1
-
-
- file.write('ply\n')
- file.write('format ascii 1.0\n')
- file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (Blender.Get('version'), Blender.Get('filename').split('/')[-1].split('\\')[-1] ))
-
- file.write('element vertex %d\n' % len(verts))
-
- file.write('property float x\n')
- file.write('property float y\n')
- file.write('property float z\n')
- if EXPORT_NORMALS:
- file.write('property float nx\n')
- file.write('property float ny\n')
- file.write('property float nz\n')
-
- if EXPORT_UV:
- file.write('property float s\n')
- file.write('property float t\n')
- if EXPORT_COLORS:
- file.write('property uchar red\n')
- file.write('property uchar green\n')
- file.write('property uchar blue\n')
-
- file.write('element face %d\n' % len(mesh.faces))
- file.write('property list uchar uint vertex_indices\n')
- file.write('end_header\n')
-
- for i, v in enumerate(verts):
- file.write('%.6f %.6f %.6f ' % v[0]) # co
- if EXPORT_NORMALS:
- file.write('%.6f %.6f %.6f ' % v[1]) # no
-
- if EXPORT_UV:
- file.write('%.6f %.6f ' % v[2]) # uv
- if EXPORT_COLORS:
- file.write('%u %u %u' % v[3]) # col
- file.write('\n')
-
- for (i, f) in enumerate(mesh.faces):
- file.write('%d ' % len(f))
- smooth = f.smooth
- if not smooth: no = rvec3d(f.no)
-
- if faceUV: uv = f.uv
- if vertexColors: col = f.col
- for j, v in enumerate(f):
- if f.smooth: normal= rvec3d(v.no)
- else: normal= no
- if faceUV: uvcoord= rvec2d((uv[j][0], 1.0-uv[j][1]))
- elif vertexUV: uvcoord= rvec2d((v.uvco[0], 1.0-v.uvco[1]))
- if vertexColors: color= col[j].r, col[j].g, col[j].b
-
- file.write('%d ' % vdict[v.index][normal, uvcoord, color])
-
- file.write('\n')
- file.close()
-
- if is_editmode:
- Blender.Window.EditMode(1, '', 0)
-
-def main():
- Blender.Window.FileSelector(file_callback, 'PLY Export', Blender.sys.makename(ext='.ply'))
-
-if __name__=='__main__':
- main()
diff --git a/release/scripts/textplugin_convert_ge.py b/release/scripts/textplugin_convert_ge.py
index f3b44cdb14b..21e065bcfd7 100644
--- a/release/scripts/textplugin_convert_ge.py
+++ b/release/scripts/textplugin_convert_ge.py
@@ -718,7 +718,7 @@ def convert248to249(lines, log = True, logErrors = True, fileName = None):
try:
# Convert!
func(lines, row, match.start(1), match.end(1), closure)
- except ConversionError as e:
+ except ConversionError, e:
# Insert a comment saying the conversion failed.
print "ERROR: %sline %d, %s: %s\n" % (
fileIdStr, row + 1, attrName, e)
diff --git a/release/scripts/wizard_bolt_factory.py b/release/scripts/wizard_bolt_factory.py
index 6a280eccc58..2d653b211d5 100644
--- a/release/scripts/wizard_bolt_factory.py
+++ b/release/scripts/wizard_bolt_factory.py
@@ -8,7 +8,7 @@ Tooltip: 'Create models of various types of screw fasteners.'
"""
__author__ = " Aaron Keith (Spudmn) "
-__version__ = "2.00 2009/05/22"
+__version__ = "2.02 2009/06/10"
__url__ = ["Author's site,http://sourceforge.net/projects/boltfactory/", "Blender,http://wiki.blender.org/index.php/Extensions:Py/Scripts/Manual/Misc/Bolt_Factory"]
__bpydoc__ = """\
Bolt_Factory.py
@@ -22,6 +22,13 @@ with default settings.
History:
+ V2.02 10/06/09 by Aaron Keith
+
+ -Added changes made by the Blender team.
+
+ V2.01 26/05/09 by Aaron Keith
+
+ - Fixed normal's on Lock Nut
V2.00 22/05/09 by Aaron Keith
@@ -2005,7 +2012,7 @@ def add_Nylon_Head(OUTSIDE_RADIUS,Z_LOCATION = 0):
sVerts,sFaces = SpinDup(verts,faces,360,DIV,'z')
sVerts.extend(verts) #add the start verts to the Spin verts to complete the loop
- faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV))
+ faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV,1))
return Move_Verts_Up_Z(sVerts,0),faces,Lowest_Z_Vert
@@ -2059,7 +2066,7 @@ def add_Nylon_Part(OUTSIDE_RADIUS,Z_LOCATION = 0):
sVerts,sFaces = SpinDup(verts,faces,360,DIV,'z')
sVerts.extend(verts) #add the start verts to the Spin verts to complete the loop
- faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV))
+ faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV,1))
return sVerts,faces,0 - Lowest_Z_Vert
@@ -2594,8 +2601,8 @@ def Create_Tab(X1,Y1,X2,Y2,Title,Buttons): # X1,Y1 = Top Left X2,Y2 = Bottom Rig
def Dispaly_Title_Bar(Y_POS,CONTROL_HEIGHT):
CONTROL_WIDTH = 250
- Create_Tab(3,Y_POS,CONTROL_WIDTH,Y_POS -CONTROL_HEIGHT,"Bolt Factory V2.00",Model_Type)
-
+ Create_Tab(3,Y_POS,CONTROL_WIDTH,Y_POS -CONTROL_HEIGHT,"Bolt Factory V2.02",Model_Type)
+
def Dispaly_Preset_Tab(Y_POS,CONTROL_HEIGHT):
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
index fd317baf861..adca70e90dd 100644
--- a/release/ui/buttons_data_armature.py
+++ b/release/ui/buttons_data_armature.py
@@ -9,27 +9,39 @@ class DataButtonsPanel(bpy.types.Panel):
def poll(self, context):
return (context.armature != None)
-class DATA_PT_skeleton(DataButtonsPanel):
- __idname__ = "DATA_PT_skeleton"
- __label__ = "Skeleton"
-
+class DATA_PT_context_arm(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_arm"
+ __no_header__ = True
+
def draw(self, context):
+ layout = self.layout
+
ob = context.object
arm = context.armature
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif arm:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
+class DATA_PT_skeleton(DataButtonsPanel):
+ __idname__ = "DATA_PT_skeleton"
+ __label__ = "Skeleton"
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ arm = context.armature
+ space = context.space_data
+
+
if arm:
- layout.itemS()
layout.itemR(arm, "rest_position")
split = layout.split()
@@ -45,17 +57,17 @@ class DATA_PT_skeleton(DataButtonsPanel):
sub = split.column()
sub.itemL(text="Layers:")
- sub.itemL(text="LAYERS")
- #sub.itemR(arm, "layer")
- #sub.itemR(arm, "layer_protection")
+ sub.template_layers(arm, "layer")
+ sub.itemL(text="Protected Layers:")
+ sub.template_layers(arm, "layer_protection")
class DATA_PT_display(DataButtonsPanel):
__idname__ = "DATA_PT_display"
__label__ = "Display"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
@@ -74,8 +86,8 @@ class DATA_PT_paths(DataButtonsPanel):
__label__ = "Paths"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
@@ -102,8 +114,8 @@ class DATA_PT_ghost(DataButtonsPanel):
__label__ = "Ghost"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
@@ -120,6 +132,7 @@ class DATA_PT_ghost(DataButtonsPanel):
sub = split.column()
sub.itemR(arm, "ghost_only_selected", text="Selected Only")
+bpy.types.register(DATA_PT_context_arm)
bpy.types.register(DATA_PT_skeleton)
bpy.types.register(DATA_PT_display)
bpy.types.register(DATA_PT_paths)
diff --git a/release/ui/buttons_data_bone.py b/release/ui/buttons_data_bone.py
index 75c201f015e..98c7f2f8e54 100644
--- a/release/ui/buttons_data_bone.py
+++ b/release/ui/buttons_data_bone.py
@@ -7,40 +7,83 @@ class BoneButtonsPanel(bpy.types.Panel):
__context__ = "bone"
def poll(self, context):
- return (context.bone != None)
+ return (context.bone or context.edit_bone)
+
+class BONE_PT_context_bone(BoneButtonsPanel):
+ __idname__ = "BONE_PT_context_bone"
+ __no_header__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ bone = context.bone
+ if not bone:
+ bone = context.edit_bone
+
+ split = layout.split(percentage=0.06)
+ split.itemL(text="", icon="ICON_BONE_DATA")
+ split.itemR(bone, "name", text="")
class BONE_PT_bone(BoneButtonsPanel):
__idname__ = "BONE_PT_bone"
__label__ = "Bone"
+
def draw(self, context):
- bone = context.bone
layout = self.layout
+ bone = context.bone
+ if not bone:
+ bone = context.edit_bone
split = layout.split()
sub = split.column()
- sub.itemR(bone, "name")
sub.itemR(bone, "parent")
sub.itemR(bone, "connected")
- sub.itemR(bone, "deform")
+
+ sub.itemL(text="Layers:")
+ sub.template_layers(bone, "layer")
+
+ sub = split.column()
sub.itemL(text="Inherit:")
- sub.itemR(bone, "hinge")
- sub.itemR(bone, "inherit_scale")
+ sub.itemR(bone, "hinge", text="Rotation")
+ sub.itemR(bone, "inherit_scale", text="Scale")
+
+ sub.itemL(text="Display:")
+ sub.itemR(bone, "draw_wire", text="Wireframe")
+ sub.itemR(bone, "hidden", text="Hide")
+
+
+
+class BONE_PT_deform(BoneButtonsPanel):
+ __idname__ = "BONE_PT_deform"
+ __label__ = "Deform"
+ def draw_header(self, context):
+ layout = self.layout
+ bone = context.bone
+ if not bone:
+ bone = context.edit_bone
+
+ layout.itemR(bone, "deform", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ bone = context.bone
+ if not bone:
+ bone = context.edit_bone
+
+ layout.active = bone.deform
+
+ split = layout.split()
+
+ sub = split.column()
sub.itemL(text="Envelope:")
sub.itemR(bone, "envelope_distance", text="Distance")
sub.itemR(bone, "envelope_weight", text="Weight")
sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
-
sub = split.column()
- #sub.itemR(bone, "layer")
- sub.itemL(text="Display:")
- sub.itemR(bone, "draw_wire", text="Wireframe")
- sub.itemR(bone, "editmode_hidden", text="Hide (EditMode)")
- sub.itemR(bone, "pose_channel_hidden", text="Hide (PoseMode)")
-
+
sub.itemL(text="Curved Bones:")
sub.itemR(bone, "bbone_segments", text="Segments")
sub.itemR(bone, "bbone_in", text="Ease In")
@@ -48,5 +91,7 @@ class BONE_PT_bone(BoneButtonsPanel):
sub.itemR(bone, "cyclic_offset")
-bpy.types.register(BONE_PT_bone)
+bpy.types.register(BONE_PT_context_bone)
+bpy.types.register(BONE_PT_bone)
+bpy.types.register(BONE_PT_deform)
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
index 362e4f96aa2..7ca70029e49 100644
--- a/release/ui/buttons_data_camera.py
+++ b/release/ui/buttons_data_camera.py
@@ -9,60 +9,76 @@ class DataButtonsPanel(bpy.types.Panel):
def poll(self, context):
return (context.camera != None)
-class DATA_PT_camera(DataButtonsPanel):
- __idname__ = "DATA_PT_camera"
- __label__ = "Lens"
-
+class DATA_PT_context_camera(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_camera"
+ __no_header__ = True
+
def draw(self, context):
+ layout = self.layout
+
ob = context.object
cam = context.camera
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
- elif arm:
- split.template_ID(context, space, "pin_id")
+ elif cam:
+ split.template_ID(space, "pin_id")
split.itemS()
- if cam:
- layout.itemS()
- layout.itemR(cam, "type", expand=True)
+class DATA_PT_camera(DataButtonsPanel):
+ __idname__ = "DATA_PT_camera"
+ __label__ = "Lens"
+
+ def draw(self, context):
+ layout = self.layout
+
+ cam = context.camera
+
+ layout.itemR(cam, "type", expand=True)
- row = layout.row(align=True)
- if cam.type == 'PERSP':
- row.itemR(cam, "lens_unit", text="")
- if cam.lens_unit == 'MILLIMETERS':
- row.itemR(cam, "lens", text="Angle")
- elif cam.lens_unit == 'DEGREES':
- row.itemR(cam, "angle")
+ row = layout.row(align=True)
+ if cam.type == 'PERSP':
+ row.itemR(cam, "lens_unit", text="")
+ if cam.lens_unit == 'MILLIMETERS':
+ row.itemR(cam, "lens", text="Angle")
+ elif cam.lens_unit == 'DEGREES':
+ row.itemR(cam, "angle")
- elif cam.type == 'ORTHO':
- row.itemR(cam, "ortho_scale")
+ elif cam.type == 'ORTHO':
+ row.itemR(cam, "ortho_scale")
+
+ split = layout.split()
+ split.itemR(cam, "panorama");
+ split.itemL()
- split = layout.split()
+ split = layout.split()
- sub = split.column(align=True)
- sub.itemL(text="Shift:")
- sub.itemR(cam, "shift_x", text="X")
- sub.itemR(cam, "shift_y", text="Y")
+ sub = split.column(align=True)
+ sub.itemL(text="Shift:")
+ sub.itemR(cam, "shift_x", text="X")
+ sub.itemR(cam, "shift_y", text="Y")
- sub = split.column(align=True)
- sub.itemL(text="Clipping:")
- sub.itemR(cam, "clip_start", text="Start")
- sub.itemR(cam, "clip_end", text="End")
+ sub = split.column(align=True)
+ sub.itemL(text="Clipping:")
+ sub.itemR(cam, "clip_start", text="Start")
+ sub.itemR(cam, "clip_end", text="End")
- row = layout.row()
- row.itemR(cam, "dof_object")
- row.itemR(cam, "dof_distance")
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Depth of Field:")
+ col.itemR(cam, "dof_object", text="")
+ col = split.column()
+ col.itemL()
+ col.itemR(cam, "dof_distance", text="Distance")
class DATA_PT_camera_display(DataButtonsPanel):
__idname__ = "DATA_PT_camera_display"
__label__ = "Display"
-
+
def draw(self, context):
cam = context.camera
layout = self.layout
@@ -82,5 +98,7 @@ class DATA_PT_camera_display(DataButtonsPanel):
colsub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
col.itemR(cam, "draw_size", text="Size")
+bpy.types.register(DATA_PT_context_camera)
bpy.types.register(DATA_PT_camera)
bpy.types.register(DATA_PT_camera_display)
+
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py
index b8b7d6a324f..04c4cd6d01e 100644
--- a/release/ui/buttons_data_curve.py
+++ b/release/ui/buttons_data_curve.py
@@ -7,30 +7,41 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'CURVE' and context.curve)
-
-class DATA_PT_shape_curve(DataButtonsPanel):
- __idname__ = "DATA_PT_shape_curve"
- __label__ = "Shape"
+ return (context.object and context.object.type == 'CURVE' and context.curve)
+class DATA_PT_context_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_curve"
+ __no_header__ = True
+
def draw(self, context):
+ layout = self.layout
+
ob = context.object
curve = context.curve
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif curve:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
+
+class DATA_PT_shape_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_shape_curve"
+ __label__ = "Shape"
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ curve = context.curve
+ space = context.space_data
+
if curve:
- layout.itemS()
layout.itemR(curve, "curve_2d")
split = layout.split()
@@ -43,7 +54,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
colsub.itemR(curve, "back")
col.itemL(text="Textures:")
- col.itemR(curve, "uv_orco")
+# col.itemR(curve, "uv_orco")
col.itemR(curve, "auto_texspace")
sub = split.column()
@@ -53,18 +64,18 @@ class DATA_PT_shape_curve(DataButtonsPanel):
sub.itemR(curve, "render_resolution_u", text="Render U")
sub.itemR(curve, "render_resolution_v", text="Render V")
- sub.itemL(text="Display:")
- sub.itemL(text="HANDLES")
- sub.itemL(text="NORMALS")
- sub.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(DataButtonsPanel):
- __idname__ = "DATA_PT_geometry"
- __label__ = "Geometry"
+class DATA_PT_geometry_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_geometry_curve"
+ __label__ = "Geometry "
def draw(self, context):
- curve = context.curve
layout = self.layout
+ curve = context.curve
split = layout.split()
@@ -72,22 +83,22 @@ class DATA_PT_geometry(DataButtonsPanel):
sub.itemL(text="Modification:")
sub.itemR(curve, "width")
sub.itemR(curve, "extrude")
- sub.itemR(curve, "taper_object")
+ 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")
+ sub.itemR(curve, "bevel_object", icon="ICON_OUTLINER_OB_CURVE")
class DATA_PT_pathanim(DataButtonsPanel):
__idname__ = "DATA_PT_pathanim"
__label__ = "Path Animation"
def draw_header(self, context):
+ layout = self.layout
curve = context.curve
- layout = self.layout
layout.itemR(curve, "path", text="")
def draw(self, context):
@@ -110,8 +121,8 @@ class DATA_PT_current_curve(DataButtonsPanel):
__label__ = "Current Curve"
def draw(self, context):
- currentcurve = context.curve.curves[0] # XXX
layout = self.layout
+ currentcurve = context.curve.curves[0] # XXX
split = layout.split()
@@ -138,7 +149,9 @@ class DATA_PT_current_curve(DataButtonsPanel):
sub.itemR(currentcurve, "radius_interpolation", text="Tilt")
sub.itemR(currentcurve, "smooth")
+bpy.types.register(DATA_PT_context_curve)
bpy.types.register(DATA_PT_shape_curve)
-bpy.types.register(DATA_PT_geometry)
+bpy.types.register(DATA_PT_geometry_curve)
bpy.types.register(DATA_PT_pathanim)
bpy.types.register(DATA_PT_current_curve)
+
diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py
index 7f994c94a07..f97dedcf6cf 100644
--- a/release/ui/buttons_data_empty.py
+++ b/release/ui/buttons_data_empty.py
@@ -7,16 +7,15 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'EMPTY')
+ return (context.object and context.object.type == 'EMPTY')
class DATA_PT_empty(DataButtonsPanel):
__idname__ = "DATA_PT_empty"
__label__ = "Empty"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "empty_draw_type")
layout.itemR(ob, "empty_draw_size")
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
index f626eb45ed6..cf0ede8ec3b 100644
--- a/release/ui/buttons_data_lamp.py
+++ b/release/ui/buttons_data_lamp.py
@@ -19,28 +19,36 @@ class DATA_PT_preview(DataButtonsPanel):
lamp = context.lamp
layout.template_preview(lamp)
-class DATA_PT_lamp(DataButtonsPanel):
- __idname__ = "DATA_PT_lamp"
- __label__ = "Lamp"
-
+class DATA_PT_context_lamp(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_lamp"
+ __no_header__ = True
+
def draw(self, context):
+ layout = self.layout
+
ob = context.object
lamp = context.lamp
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif lamp:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
- layout.itemS()
+class DATA_PT_lamp(DataButtonsPanel):
+ __idname__ = "DATA_PT_lamp"
+ __label__ = "Lamp"
+
+ def draw(self, context):
+ layout = self.layout
+
+ lamp = context.lamp
- layout.itemR(lamp, "type", expand=True)
+ layout.itemR(lamp, "type")
split = layout.split()
@@ -82,8 +90,8 @@ class DATA_PT_sunsky(DataButtonsPanel):
return (lamp and lamp.type == 'SUN')
def draw(self, context):
- lamp = context.lamp.sky
layout = self.layout
+ lamp = context.lamp.sky
row = layout.row()
row.itemR(lamp, "sky")
@@ -96,7 +104,6 @@ class DATA_PT_sunsky(DataButtonsPanel):
split = layout.split()
col = split.column()
-
sub = col.column()
sub.active = lamp.sky
sub.itemR(lamp, "sky_blend_type", text="Blend Type")
@@ -125,8 +132,8 @@ class DATA_PT_shadow(DataButtonsPanel):
return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.itemR(lamp, "shadow_method", expand=True)
@@ -204,8 +211,8 @@ class DATA_PT_spot(DataButtonsPanel):
return (lamp and lamp.type == 'SPOT')
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
split = layout.split()
@@ -236,14 +243,16 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
return False
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.template_curve_mapping(lamp.falloff_curve)
+bpy.types.register(DATA_PT_context_lamp)
bpy.types.register(DATA_PT_preview)
bpy.types.register(DATA_PT_lamp)
bpy.types.register(DATA_PT_shadow)
bpy.types.register(DATA_PT_sunsky)
bpy.types.register(DATA_PT_spot)
-bpy.types.register(DATA_PT_falloff_curve) \ No newline at end of file
+bpy.types.register(DATA_PT_falloff_curve)
+
diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py
index 8f83cbb45f9..dfb429af29d 100644
--- a/release/ui/buttons_data_lattice.py
+++ b/release/ui/buttons_data_lattice.py
@@ -9,42 +9,52 @@ class DataButtonsPanel(bpy.types.Panel):
def poll(self, context):
return (context.lattice != None)
-class DATA_PT_lattice(DataButtonsPanel):
- __idname__ = "DATA_PT_lattice"
- __label__ = "Lattice"
-
+class DATA_PT_context_lattice(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_lattice"
+ __no_header__ = True
+
def draw(self, context):
+ layout = self.layout
+
ob = context.object
lat = context.lattice
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif lat:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
- if lat:
- layout.itemS()
- row = layout.row()
- row.itemR(lat, "points_u")
- row.itemR(lat, "interpolation_type_u", expand=True)
+class DATA_PT_lattice(DataButtonsPanel):
+ __idname__ = "DATA_PT_lattice"
+ __label__ = "Lattice"
+
+ def draw(self, context):
+ layout = self.layout
+
+ lat = context.lattice
+
+ row = layout.row()
+ row.itemR(lat, "points_u")
+ row.itemR(lat, "interpolation_type_u", expand=True)
- row = layout.row()
- row.itemR(lat, "points_v")
- row.itemR(lat, "interpolation_type_v", expand=True)
+ row = layout.row()
+ row.itemR(lat, "points_v")
+ row.itemR(lat, "interpolation_type_v", expand=True)
- row = layout.row()
- row.itemR(lat, "points_w")
- row.itemR(lat, "interpolation_type_w", expand=True)
+ row = layout.row()
+ row.itemR(lat, "points_w")
+ row.itemR(lat, "interpolation_type_w", expand=True)
- row = layout.row()
- row.itemR(lat, "outside")
- row.itemR(lat, "shape_keys")
+ row = layout.row()
+ row.itemO("LATTICE_OT_make_regular")
+ row.itemR(lat, "outside")
+bpy.types.register(DATA_PT_context_lattice)
bpy.types.register(DATA_PT_lattice)
+
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py
index 6e9a30cefbc..85ce15ef970 100644
--- a/release/ui/buttons_data_mesh.py
+++ b/release/ui/buttons_data_mesh.py
@@ -7,28 +7,212 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- ob = context.active_object
- return (ob and ob.type == 'MESH')
+ return (context.mesh != None)
-class DATA_PT_surface(DataButtonsPanel):
- __idname__ = "DATA_PT_surface"
- __label__ = "Mesh"
+class DATA_PT_context_mesh(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_mesh"
+ __no_header__ = True
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ mesh = context.mesh
+ space = context.space_data
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(ob, "data")
+ split.itemS()
+ elif mesh:
+ split.template_ID(space, "pin_id")
+ split.itemS()
- def draw(self, context):
- mesh = context.active_object.data
- layout = self.layout
+class DATA_PT_mesh(DataButtonsPanel):
+ __idname__ = "DATA_PT_mesh"
+ __label__ = "Mesh"
- split = layout.split()
+ def draw(self, context):
+ layout = self.layout
- col = split.column()
- col.itemR(mesh, "autosmooth")
- colsub = col.column()
- colsub.active = mesh.autosmooth
- colsub.itemR(mesh, "autosmooth_angle", text="Angle")
- sub = split.column()
- sub.itemR(mesh, "vertex_normal_flip")
- sub.itemR(mesh, "double_sided")
+ mesh = context.mesh
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(mesh, "autosmooth")
+ colsub = col.column()
+ colsub.active = mesh.autosmooth
+ colsub.itemR(mesh, "autosmooth_angle", text="Angle")
+ sub = split.column()
+ sub.itemR(mesh, "vertex_normal_flip")
+ sub.itemR(mesh, "double_sided")
- layout.itemR(mesh, "texco_mesh")
-
-bpy.types.register(DATA_PT_surface) \ No newline at end of file
+ layout.itemS()
+ layout.itemR(mesh, "texco_mesh")
+
+class DATA_PT_materials(DataButtonsPanel):
+ __idname__ = "DATA_PT_materials"
+ __label__ = "Materials"
+
+ def poll(self, context):
+ return (context.object and context.object.type in ('MESH', 'CURVE', 'FONT', 'SURFACE'))
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ row = layout.row()
+
+ row.template_list(ob, "materials", ob, "active_material_index")
+
+ col = row.column(align=True)
+ col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+
+ if context.edit_object:
+ row = layout.row(align=True)
+
+ row.itemO("OBJECT_OT_material_slot_assign", text="Assign")
+ row.itemO("OBJECT_OT_material_slot_select", text="Select")
+ row.itemO("OBJECT_OT_material_slot_deselect", text="Deselect")
+
+ """
+ layout.itemS()
+
+ box= layout.box()
+
+ row = box.row()
+ row.template_list(ob, "materials", ob, "active_material_index", compact=True)
+
+ subrow = row.row(align=True)
+ subrow.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
+ subrow.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+ """
+
+class DATA_PT_vertex_groups(DataButtonsPanel):
+ __idname__ = "DATA_PT_vertex_groups"
+ __label__ = "Vertex Groups"
+
+ def poll(self, context):
+ return (context.object and context.object.type in ('MESH', 'LATTICE'))
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ row = layout.row()
+
+ row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index")
+
+ col = row.column(align=True)
+ col.itemO("OBJECT_OT_vertex_group_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("OBJECT_OT_vertex_group_remove", icon="ICON_ZOOMOUT", text="")
+
+ col.itemO("OBJECT_OT_vertex_group_copy", icon="ICON_BLANK1", text="")
+ if ob.data.users > 1:
+ col.itemO("OBJECT_OT_vertex_group_copy_to_linked", icon="ICON_BLANK1", text="")
+
+ if context.edit_object:
+ row = layout.row(align=True)
+
+ row.itemO("OBJECT_OT_vertex_group_assign", text="Assign")
+ row.itemO("OBJECT_OT_vertex_group_remove_from", text="Remove")
+ row.itemO("OBJECT_OT_vertex_group_select", text="Select")
+ row.itemO("OBJECT_OT_vertex_group_deselect", text="Deselect")
+
+ layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight")
+
+class DATA_PT_shape_keys(DataButtonsPanel):
+ __idname__ = "DATA_PT_shape_keys"
+ __label__ = "Shape Keys"
+
+ def poll(self, context):
+ return (context.object and context.object.type in ('MESH', 'LATTICE'))
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+ key = ob.data.shape_keys
+ kb = ob.active_shape_key
+
+ row = layout.row()
+ row.template_list(key, "keys", ob, "active_shape_key_index")
+
+ col = row.column()
+
+ subcol = col.column(align=True)
+ subcol.itemO("OBJECT_OT_shape_key_add", icon="ICON_ZOOMIN", text="")
+ subcol.itemO("OBJECT_OT_shape_key_remove", icon="ICON_ZOOMOUT", text="")
+
+ if kb:
+ col.itemS()
+
+ subcol = col.column(align=True)
+ subcol.itemR(ob, "shape_key_lock", icon="ICON_PINNED", text="")
+ subcol.itemR(kb, "mute", icon="ICON_MUTE_IPO_ON", text="")
+
+ if key.relative:
+ row = layout.row()
+ row.itemR(key, "relative")
+ row.itemL()
+
+ if ob.active_shape_key_index != 0:
+ if not ob.shape_key_lock:
+ row = layout.row(align=True)
+ row.itemR(kb, "value", text="")
+ row.itemR(kb, "slider_min", text="Min")
+ row.itemR(kb, "slider_max", text="Max")
+
+ row = layout.row()
+ row.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")
+ row.item_pointerR(kb, "relative_key", key, "keys", text="")
+ else:
+ row = layout.row()
+ row.itemR(key, "relative")
+ row.itemR(key, "slurph")
+
+ if context.edit_object:
+ layout.enabled = False
+
+class DATA_PT_uv_texture(DataButtonsPanel):
+ __idname__ = "DATA_PT_uv_texture"
+ __label__ = "UV Texture"
+
+ def draw(self, context):
+ layout = self.layout
+ me = context.mesh
+
+ row = layout.row()
+
+ row.template_list(me, "uv_textures", me, "active_uv_texture_index")
+
+ col = row.column(align=True)
+ col.itemO("MESH_OT_uv_texture_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("MESH_OT_uv_texture_remove", icon="ICON_ZOOMOUT", text="")
+
+class DATA_PT_vertex_colors(DataButtonsPanel):
+ __idname__ = "DATA_PT_vertex_colors"
+ __label__ = "Vertex Colors"
+
+ def draw(self, context):
+ layout = self.layout
+ me = context.mesh
+
+ row = layout.row()
+
+ row.template_list(me, "vertex_colors", me, "active_vertex_color_index")
+
+ col = row.column(align=True)
+ col.itemO("MESH_OT_vertex_color_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("MESH_OT_vertex_color_remove", icon="ICON_ZOOMOUT", text="")
+
+bpy.types.register(DATA_PT_context_mesh)
+bpy.types.register(DATA_PT_mesh)
+bpy.types.register(DATA_PT_materials)
+bpy.types.register(DATA_PT_vertex_groups)
+bpy.types.register(DATA_PT_shape_keys)
+bpy.types.register(DATA_PT_uv_texture)
+bpy.types.register(DATA_PT_vertex_colors)
+
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
index 0f5d446f889..10f3efa1ed4 100644
--- a/release/ui/buttons_data_modifier.py
+++ b/release/ui/buttons_data_modifier.py
@@ -5,11 +5,7 @@ class DataButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "modifier"
-
- def poll(self, context):
- ob = context.object
- return (ob and ob.type in ('MESH', 'CURVE', 'SURFACE', 'TEXT', 'LATTICE'))
-
+
class DATA_PT_modifiers(DataButtonsPanel):
__idname__ = "DATA_PT_modifiers"
__label__ = "Modifiers"
@@ -27,68 +23,70 @@ class DATA_PT_modifiers(DataButtonsPanel):
if box:
if md.type == 'ARMATURE':
- self.armature(box, md)
- if md.type == 'ARRAY':
- self.array(box, md)
- if md.type == 'BEVEL':
- self.bevel(box, md)
- if md.type == 'BOOLEAN':
- self.boolean(box, md)
- if md.type == 'BUILD':
- self.build(box, md)
- if md.type == 'CAST':
- self.cast(box, md)
- if md.type == 'CLOTH':
- self.cloth(box, md)
- if md.type == 'COLLISION':
- self.collision(box, md)
- if md.type == 'CURVE':
- self.curve(box, md)
- if md.type == 'DECIMATE':
- self.decimate(box, md)
- if md.type == 'DISPLACE':
- self.displace(box, md)
- if md.type == 'EDGE_SPLIT':
- self.edgesplit(box, md)
- if md.type == 'EXPLODE':
- self.explode(box, md)
- if md.type == 'FLUID_SIMULATION':
- self.fluid(box, md)
- if md.type == 'HOOK':
- self.hook(box, md)
- if md.type == 'LATTICE':
- self.lattice(box, md)
- if md.type == 'MASK':
- self.mask(box, md)
- if md.type == 'MESH_DEFORM':
- self.mesh_deform(box, md)
- if md.type == 'MIRROR':
- self.mirror(box, md)
- if md.type == 'MULTIRES':
- self.multires(box, md)
- if md.type == 'PARTICLE_INSTANCE':
- self.particleinstance(box, md)
- if md.type == 'PARTICLE_SYSTEM':
- self.particlesystem(box, md)
- if md.type == 'SHRINKWRAP':
- self.shrinkwrap(box, md)
- if md.type == 'SIMPLE_DEFORM':
- self.simpledeform(box, md)
- if md.type == 'SMOOTH':
- self.smooth(box, md)
- if md.type == 'SOFTBODY':
- self.softbody(box, md)
- if md.type == 'SUBSURF':
- self.subsurf(box, md)
- if md.type == 'UV_PROJECT':
- self.uvproject(box, md)
- if md.type == 'WAVE':
- self.wave(box, md)
+ self.armature(box, ob, md)
+ elif md.type == 'ARRAY':
+ self.array(box, ob, md)
+ elif md.type == 'BEVEL':
+ self.bevel(box, ob, md)
+ elif md.type == 'BOOLEAN':
+ self.boolean(box, ob, md)
+ elif md.type == 'BUILD':
+ self.build(box, ob, md)
+ elif md.type == 'CAST':
+ self.cast(box, ob, md)
+ elif md.type == 'CLOTH':
+ self.cloth(box, ob, md)
+ elif md.type == 'COLLISION':
+ self.collision(box, ob, md)
+ elif md.type == 'CURVE':
+ self.curve(box, ob, md)
+ elif md.type == 'DECIMATE':
+ self.decimate(box, ob, md)
+ elif md.type == 'DISPLACE':
+ self.displace(box, ob, md)
+ elif md.type == 'EDGE_SPLIT':
+ self.edgesplit(box, ob, md)
+ elif md.type == 'EXPLODE':
+ self.explode(box, ob, md)
+ elif md.type == 'FLUID_SIMULATION':
+ self.fluid(box, ob, md)
+ elif md.type == 'HOOK':
+ self.hook(box, ob, md)
+ elif md.type == 'LATTICE':
+ self.lattice(box, ob, md)
+ elif md.type == 'MASK':
+ self.mask(box, ob, md)
+ elif md.type == 'MESH_DEFORM':
+ self.mesh_deform(box, ob, md)
+ elif md.type == 'MIRROR':
+ self.mirror(box, ob, md)
+ elif md.type == 'MULTIRES':
+ self.multires(box, ob, md)
+ elif md.type == 'PARTICLE_INSTANCE':
+ self.particleinstance(box, ob, md)
+ elif md.type == 'PARTICLE_SYSTEM':
+ self.particlesystem(box, ob, md)
+ elif md.type == 'SHRINKWRAP':
+ self.shrinkwrap(box, ob, md)
+ elif md.type == 'SIMPLE_DEFORM':
+ self.simpledeform(box, ob, md)
+ elif md.type == 'SMOOTH':
+ self.smooth(box, ob, md)
+ elif md.type == 'SOFTBODY':
+ self.softbody(box, ob, md)
+ elif md.type == 'SUBSURF':
+ self.subsurf(box, ob, md)
+ elif md.type == 'SURFACE':
+ self.surface(box, ob, md)
+ elif md.type == 'UV_PROJECT':
+ self.uvproject(box, ob, md)
+ elif md.type == 'WAVE':
+ self.wave(box, ob, md)
- def armature(self, layout, md):
+ def armature(self, layout, ob, md):
layout.itemR(md, "object")
row = layout.row()
- row.itemR(md, "vertex_group")
+ row.item_pointerR(md, "vertex_group", ob, "vertex_groups")
row.itemR(md, "invert")
flow = layout.column_flow()
flow.itemR(md, "use_vertex_groups", text="Vertex Groups")
@@ -96,13 +94,13 @@ class DATA_PT_modifiers(DataButtonsPanel):
flow.itemR(md, "quaternion")
flow.itemR(md, "multi_modifier")
- def array(self, layout, md):
+ def array(self, layout, ob, md):
layout.itemR(md, "fit_type")
if md.fit_type == 'FIXED_COUNT':
layout.itemR(md, "count")
- if md.fit_type == 'FIT_LENGTH':
+ elif md.fit_type == 'FIT_LENGTH':
layout.itemR(md, "length")
- if md.fit_type == 'FIT_CURVE':
+ elif md.fit_type == 'FIT_CURVE':
layout.itemR(md, "curve")
layout.itemS()
@@ -145,7 +143,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.itemR(md, "start_cap")
col.itemR(md, "end_cap")
- def bevel(self, layout, md):
+ def bevel(self, layout, ob, md):
row = layout.row()
row.itemR(md, "width")
row.itemR(md, "only_vertices")
@@ -156,15 +154,15 @@ class DATA_PT_modifiers(DataButtonsPanel):
if md.limit_method == 'ANGLE':
row = layout.row()
row.itemR(md, "angle")
- if md.limit_method == 'WEIGHT':
+ elif md.limit_method == 'WEIGHT':
row = layout.row()
row.itemR(md, "edge_weight_method", expand=True)
- def boolean(self, layout, md):
+ def boolean(self, layout, ob, md):
layout.itemR(md, "operation")
layout.itemR(md, "object")
- def build(self, layout, md):
+ def build(self, layout, ob, md):
split = layout.split()
col = split.column()
@@ -179,7 +177,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
- def cast(self, layout, md):
+ def cast(self, layout, ob, md):
layout.itemR(md, "cast_type")
col = layout.column_flow()
col.itemR(md, "x")
@@ -188,36 +186,37 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.itemR(md, "factor")
col.itemR(md, "radius")
col.itemR(md, "size")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
#Missing: "OB" and "From Radius"
- def cloth(self, layout, md):
+ def cloth(self, layout, ob, md):
layout.itemL(text="See Cloth panel.")
- def collision(self, layout, md):
+ def collision(self, layout, ob, md):
layout.itemL(text="See Collision panel.")
- def curve(self, layout, md):
+ def curve(self, layout, ob, md):
layout.itemR(md, "object")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "deform_axis")
- def decimate(self, layout, md):
+ def decimate(self, layout, ob, md):
layout.itemR(md, "ratio")
layout.itemR(md, "face_count")
- def displace(self, layout, md):
- layout.itemR(md, "vertex_group")
+ def displace(self, layout, ob, md):
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "texture")
layout.itemR(md, "midlevel")
layout.itemR(md, "strength")
+ layout.itemR(md, "direction")
layout.itemR(md, "texture_coordinates")
if md.texture_coordinates == 'OBJECT':
layout.itemR(md, "texture_coordinate_object", text="Object")
- if md.texture_coordinates == 'UV':
- layout.itemR(md, "uv_layer")
+ elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
- def edgesplit(self, layout, md):
+ def edgesplit(self, layout, ob, md):
split = layout.split()
col = split.column()
@@ -228,8 +227,8 @@ class DATA_PT_modifiers(DataButtonsPanel):
col = split.column()
col.itemR(md, "use_sharp", text="Sharp Edges")
- def explode(self, layout, md):
- layout.itemR(md, "vertex_group")
+ def explode(self, layout, ob, md):
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "protect")
layout.itemR(md, "split_edges")
layout.itemR(md, "unborn")
@@ -237,31 +236,31 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemR(md, "dead")
# Missing: "Refresh" and "Clear Vertex Group" ?
- def fluid(self, layout, md):
- layout.itemL(text="See Fluidsim panel.")
+ def fluid(self, layout, ob, md):
+ layout.itemL(text="See Fluid panel.")
- def hook(self, layout, md):
+ def hook(self, layout, ob, md):
layout.itemR(md, "falloff")
layout.itemR(md, "force", slider=True)
layout.itemR(md, "object")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
# Missing: "Reset" and "Recenter"
- def lattice(self, layout, md):
+ def lattice(self, layout, ob, md):
layout.itemR(md, "object")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- def mask(self, layout, md):
+ def mask(self, layout, ob, md):
layout.itemR(md, "mode")
if md.mode == 'ARMATURE':
layout.itemR(md, "armature")
- if md.mode == 'VERTEX_GROUP':
- layout.itemR(md, "vertex_group")
+ elif md.mode == 'VERTEX_GROUP':
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "inverse")
- def mesh_deform(self, layout, md):
+ def mesh_deform(self, layout, ob, md):
layout.itemR(md, "object")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "invert")
layout.itemS()
@@ -270,7 +269,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
row.itemR(md, "precision")
row.itemR(md, "dynamic")
- def mirror(self, layout, md):
+ def mirror(self, layout, ob, md):
layout.itemR(md, "merge_limit")
split = layout.split()
@@ -288,29 +287,40 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemR(md, "mirror_object")
- def multires(self, layout, md):
+ def multires(self, layout, ob, md):
layout.itemR(md, "subdivision_type")
layout.itemO("OBJECT_OT_multires_subdivide", text="Subdivide")
layout.itemR(md, "level")
- def particleinstance(self, layout, md):
+ def particleinstance(self, layout, ob, md):
layout.itemR(md, "object")
layout.itemR(md, "particle_system_number")
col = layout.column_flow()
col.itemR(md, "normal")
col.itemR(md, "children")
+ col.itemR(md, "size")
col.itemR(md, "path")
+ if md.path:
+ col.itemR(md, "keep_shape")
col.itemR(md, "unborn")
col.itemR(md, "alive")
col.itemR(md, "dead")
+ col.itemL(md, "")
+ if md.path:
+ col.itemR(md, "axis", text="")
- def particlesystem(self, layout, md):
+ if md.path:
+ row = layout.row()
+ row.itemR(md, "position", slider=True)
+ row.itemR(md, "random_position", text = "Random", slider=True)
+
+ def particlesystem(self, layout, ob, md):
layout.itemL(text="See Particle panel.")
- def shrinkwrap(self, layout, md):
+ def shrinkwrap(self, layout, ob, md):
layout.itemR(md, "target")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "offset")
layout.itemR(md, "subsurf_levels")
layout.itemR(md, "mode")
@@ -328,13 +338,13 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.itemR(md, "positive")
col.itemR(md, "cull_front_faces")
col.itemR(md, "cull_back_faces")
- if md.mode == 'NEAREST_SURFACEPOINT':
+ elif md.mode == 'NEAREST_SURFACEPOINT':
layout.itemR(md, "keep_above_surface")
# To-Do: Validate if structs
- def simpledeform(self, layout, md):
+ def simpledeform(self, layout, ob, md):
layout.itemR(md, "mode")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "origin")
layout.itemR(md, "relative")
layout.itemR(md, "factor")
@@ -343,7 +353,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemR(md, "lock_x_axis")
layout.itemR(md, "lock_y_axis")
- def smooth(self, layout, md):
+ def smooth(self, layout, ob, md):
split = layout.split()
sub = split.column()
sub.itemR(md, "x")
@@ -353,29 +363,33 @@ class DATA_PT_modifiers(DataButtonsPanel):
sub.itemR(md, "factor")
sub.itemR(md, "repeat")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- def softbody(self, layout, md):
- layout.itemL(text="See Softbody panel.")
+ def softbody(self, layout, ob, md):
+ layout.itemL(text="See Soft Body panel.")
- def subsurf(self, layout, md):
+ def subsurf(self, layout, ob, md):
layout.itemR(md, "subdivision_type")
col = layout.column_flow()
col.itemR(md, "levels", text="Preview")
col.itemR(md, "render_levels", text="Render")
col.itemR(md, "optimal_draw", text="Optimal Display")
col.itemR(md, "subsurf_uv")
+
+ def surface(self, layout, ob, md):
+ layout.itemL(text="See Fields panel.")
- def uvproject(self, layout, md):
- layout.itemR(md, "uv_layer")
- layout.itemR(md, "projectors")
- layout.itemR(md, "image")
- layout.itemR(md, "horizontal_aspect_ratio")
- layout.itemR(md, "vertical_aspect_ratio")
- layout.itemR(md, "override_image")
- #"Projectors" don't work.
-
- def wave(self, layout, md):
+ def uvproject(self, layout, ob, md):
+ if ob.type == 'MESH':
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
+ layout.itemR(md, "projectors")
+ layout.itemR(md, "image")
+ layout.itemR(md, "horizontal_aspect_ratio")
+ layout.itemR(md, "vertical_aspect_ratio")
+ layout.itemR(md, "override_image")
+ #"Projectors" don't work.
+
+ def wave(self, layout, ob, md):
split = layout.split()
sub = split.column()
@@ -401,12 +415,12 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.itemR(md, "start_position_y")
layout.itemR(md, "start_position_object")
- layout.itemR(md, "vertex_group")
+ layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "texture")
layout.itemR(md, "texture_coordinates")
- if md.texture_coordinates == 'MAP_UV':
- layout.itemR(md, "uv_layer")
- if md.texture_coordinates == 'OBJECT':
+ if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
+ elif md.texture_coordinates == 'OBJECT':
layout.itemR(md, "texture_coordinates_object")
col = layout.column_flow()
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py
index 20503d8d2fd..81d54af0ef7 100644
--- a/release/ui/buttons_data_text.py
+++ b/release/ui/buttons_data_text.py
@@ -7,30 +7,40 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'TEXT')
-
-class DATA_PT_shape_text(DataButtonsPanel):
- __idname__ = "DATA_PT_shape_text"
- __label__ = "Shape"
+ return (context.object and context.object.type == 'TEXT' and context.curve)
+
+class DATA_PT_context_text(DataButtonsPanel):
+ __idname__ = "DATA_PT_context_text"
+ __no_header__ = True
def draw(self, context):
+ layout = self.layout
+
ob = context.object
curve = context.curve
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif curve:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
+class DATA_PT_shape_text(DataButtonsPanel):
+ __idname__ = "DATA_PT_shape_text"
+ __label__ = "Shape Text"
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ curve = context.curve
+ space = context.space_data
+
if curve:
- layout.itemS()
layout.itemR(curve, "curve_2d")
split = layout.split()
@@ -53,14 +63,36 @@ class DATA_PT_shape_text(DataButtonsPanel):
sub.itemL(text="Display:")
sub.itemR(curve, "fast")
-
+
+class DATA_PT_geometry_text(DataButtonsPanel):
+ __idname__ = "DATA_PT_geometry_text"
+ __label__ = "Geometry"
+
+ def draw(self, context):
+ layout = self.layout
+ curve = context.curve
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Modification:")
+ sub.itemR(curve, "width")
+ sub.itemR(curve, "extrude")
+ sub.itemR(curve, "taper_object")
+
+ 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")
+
class DATA_PT_font(DataButtonsPanel):
__idname__ = "DATA_PT_font"
__label__ = "Font"
def draw(self, context):
- text = context.curve
layout = self.layout
+ text = context.curve
layout.row()
layout.itemR(text, "font")
@@ -90,8 +122,8 @@ class DATA_PT_paragraph(DataButtonsPanel):
__label__ = "Paragraph"
def draw(self, context):
- text = context.curve
layout = self.layout
+ text = context.curve
layout.itemL(text="Align:")
layout.itemR(text, "spacemode", expand=True)
@@ -108,17 +140,22 @@ class DATA_PT_paragraph(DataButtonsPanel):
sub.itemL(text="Offset:")
sub.itemR(text, "x_offset", text="X")
sub.itemR(text, "y_offset", text="Y")
- sub.itemR(text, "wrap")
-
+ #sub.itemR(text, "wrap")
+
+"""
class DATA_PT_textboxes(DataButtonsPanel):
__idname__ = "DATA_PT_textboxes"
__label__ = "Text Boxes"
def draw(self, context):
- text = context.curve
layout = self.layout
+ 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)
+
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
index b9816e36dd7..c9df957ee02 100644
--- a/release/ui/buttons_material.py
+++ b/release/ui/buttons_material.py
@@ -1,4 +1,4 @@
-
+
import bpy
class MaterialButtonsPanel(bpy.types.Panel):
@@ -13,114 +13,313 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_preview"
__label__ = "Preview"
- def poll(self, context):
- return (context.material or context.object)
-
def draw(self, context):
layout = self.layout
-
mat = context.material
+
layout.template_preview(mat)
-
-class MATERIAL_PT_material(MaterialButtonsPanel):
- __idname__= "MATERIAL_PT_material"
- __label__ = "Material"
+
+class MATERIAL_PT_context_material(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_context_material"
+ __no_header__ = True
def poll(self, context):
- return (context.material or context.object)
+ return (context.object)
def draw(self, context):
layout = self.layout
+
mat = context.material
ob = context.object
slot = context.material_slot
space = context.space_data
+ if ob:
+ row = layout.row()
+
+ row.template_list(ob, "materials", ob, "active_material_index")
+
+ col = row.column(align=True)
+ col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+
split = layout.split(percentage=0.65)
if ob and slot:
- split.template_ID(context, slot, "material", new="MATERIAL_OT_new")
- split.itemR(ob, "active_material_index", text="Active")
+ split.template_ID(slot, "material", new="MATERIAL_OT_new")
+ row = split.row()
+ row.itemR(slot, "link", expand=True)
elif mat:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
+
+class MATERIAL_PT_material(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_material"
+ __label__ = "Material"
- if mat:
- layout.itemS()
+ def draw(self, context):
+ layout = self.layout
- layout.itemR(mat, "type", expand=True)
+ mat = context.material
+ ob = context.object
+ slot = context.material_slot
+ space = context.space_data
- row = layout.row()
- row.column().itemR(mat, "diffuse_color")
- row.column().itemR(mat, "specular_color")
- row.column().itemR(mat, "mirror_color")
+ if mat:
+ layout.itemR(mat, "type", expand=True)
layout.itemR(mat, "alpha", slider=True)
+
+ row = layout.row()
+ row.active = mat.type in ('SURFACE', 'VOLUME')
+ row.itemR(mat, "shadeless")
+ row.itemR(mat, "wireframe")
+ rowsub = row.row()
+ rowsub.active = mat.shadeless== False
+ rowsub.itemR(mat, "tangent_shading")
+class MATERIAL_PT_strand(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_strand"
+ __label__ = "Strand"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ tan = context.material.strand
+ mat = context.material
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Size:")
+ sub.itemR(tan, "start_size", text="Root")
+ sub.itemR(tan, "end_size", text="Tip")
+ sub.itemR(tan, "min_size", text="Minimum")
+ sub.itemR(tan, "blender_units")
+ colsub = sub.column()
+ colsub.active = mat.shadeless== False
+ colsub.itemR(tan, "tangent_shading")
+
+ sub = split.column()
+ sub.itemR(tan, "shape")
+ sub.itemR(tan, "width_fade")
+ sub.itemR(tan, "uv_layer")
+ colsub = sub.column()
+ colsub.active = mat.shadeless== False
+ colsub.itemR(tan, "surface_diffuse")
+ colsubsub = colsub.column()
+ colsubsub.active = tan.surface_diffuse
+ colsubsub.itemR(tan, "blend_distance", text="Distance")
+
+class MATERIAL_PT_options(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_options"
+ __label__ = "Options"
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "traceable")
+ sub.itemR(mat, "full_oversampling")
+ sub.itemR(mat, "sky")
+ sub.itemR(mat, "exclude_mist")
+ sub.itemR(mat, "face_texture")
+ colsub = sub.column()
+ colsub.active = mat.face_texture
+ colsub.itemR(mat, "face_texture_alpha")
+ sub.itemR(mat, "invert_z")
+ sub.itemR(mat, "light_group")
+ sub.itemR(mat, "light_group_exclusive")
+
+ sub = split.column()
+ sub.itemL(text="Shadows:")
+ sub.itemR(mat, "shadows", text="Recieve")
+ sub.itemR(mat, "transparent_shadows", text="Recieve Transparent")
+ sub.itemR(mat, "only_shadow", text="Shadows Only")
+ sub.itemR(mat, "cast_shadows_only", text="Cast Only")
+ sub.itemR(mat, "shadow_casting_alpha", text="Casting Alpha", slider=True)
+
+ sub.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
+ colsub = sub.column()
+ colsub.active = not mat.ray_shadow_bias
+ colsub.itemR(mat, "shadow_ray_bias", text="Ray Shadow Bias")
+ sub.itemR(mat, "cast_buffer_shadows")
+ sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
+
+class MATERIAL_PT_diffuse(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_diffuse"
+ __label__ = "Diffuse"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type != "HALO")
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "diffuse_color", text="")
+ sub.itemR(mat, "object_color")
+ colsub = sub.column()
+ colsub.active = mat.shadeless== False
+ colsub.itemR(mat, "ambient", slider=True)
+ colsub.itemR(mat, "emit")
+ sub.itemR(mat, "translucency", slider=True)
+
+ sub = split.column()
+ sub.active = mat.shadeless== False
+ sub.itemR(mat, "diffuse_reflection", text="Intensity", slider=True)
+ sub.itemR(mat, "vertex_color_light")
+ sub.itemR(mat, "vertex_color_paint")
+ sub.itemR(mat, "cubic")
+
+ row = layout.row()
+ row.active = mat.shadeless== False
+ row.itemR(mat, "diffuse_shader", text="Shader")
+
+ split = layout.split()
+ split.active = mat.shadeless== False
+ sub = split.column()
+ if mat.diffuse_shader == 'OREN_NAYAR':
+ sub.itemR(mat, "roughness")
+ if mat.diffuse_shader == 'MINNAERT':
+ sub.itemR(mat, "darkness")
+ if mat.diffuse_shader == 'TOON':
+ sub.itemR(mat, "diffuse_toon_size", text="Size")
+ sub = split.column()
+ sub.itemR(mat, "diffuse_toon_smooth", text="Smooth")
+ if mat.diffuse_shader == 'FRESNEL':
+ sub.itemR(mat, "diffuse_fresnel", text="Fresnel")
+ sub = split.column()
+ sub.itemR(mat, "diffuse_fresnel_factor", text="Factor")
+
+ layout.itemR(mat, "diffuse_ramp", text="Ramp")
+
+class MATERIAL_PT_specular(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_specular"
+ __label__ = "Specular"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type != "HALO")
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ layout.active = mat.shadeless== False
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "specular_color", text="")
+ sub = split.column()
+ sub.itemR(mat, "specular_reflection", text="Intensity", slider=True)
+
+ layout.itemR(mat, "spec_shader", text="Shader")
+
+ split = layout.split()
+
+ sub = split.column()
+ if mat.spec_shader in ('COOKTORR', 'PHONG'):
+ sub.itemR(mat, "specular_hardness", text="Hardness")
+ if mat.spec_shader == 'BLINN':
+ sub.itemR(mat, "specular_hardness", text="Hardness")
+ sub = split.column()
+ sub.itemR(mat, "specular_ior", text="IOR")
+ if mat.spec_shader == 'WARDISO':
+ sub.itemR(mat, "specular_slope", text="Slope")
+ sub = split.column()
+ sub.itemR(mat, "specular_hardness", text="Hardness")
+ if mat.spec_shader == 'TOON':
+ sub.itemR(mat, "specular_toon_size", text="Size")
+ sub = split.column()
+ sub.itemR(mat, "specular_toon_smooth", text="Smooth")
+
+ layout.itemR(mat, "specular_ramp", text="Ramp")
+
class MATERIAL_PT_sss(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_sss"
__label__ = "Subsurface Scattering"
-
+ __default_closed__ = True
+
def poll(self, context):
mat = context.material
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
sss = context.material.subsurface_scattering
- layout = self.layout
layout.itemR(sss, "enabled", text="")
def draw(self, context):
layout = self.layout
sss = context.material.subsurface_scattering
+ mat = context.material
layout.active = sss.enabled
- flow = layout.column_flow()
- flow.itemR(sss, "error_tolerance")
- flow.itemR(sss, "ior")
- flow.itemR(sss, "scale")
-
- row = layout.row()
- row.column().itemR(sss, "color")
- row.column().itemR(sss, "radius")
+ split = layout.split()
+ split.active = mat.shadeless== False
- flow = layout.column_flow()
- flow.itemR(sss, "color_factor", slider=True)
- flow.itemR(sss, "texture_factor", slider=True)
- flow.itemR(sss, "front")
- flow.itemR(sss, "back")
+ sub = split.column()
+ sub.itemR(sss, "color", text="")
+ sub.itemL(text="Blend:")
+ sub.itemR(sss, "color_factor", slider=True)
+ sub.itemR(sss, "texture_factor", slider=True)
+ sub.itemL(text="Scattering Weight:")
+ sub.itemR(sss, "front")
+ sub.itemR(sss, "back")
+ sub = split.column()
+ sub.itemR(sss, "ior")
+ sub.itemR(sss, "scale")
+ sub.itemR(sss, "radius", text="RGB Radius")
+ sub.itemR(sss, "error_tolerance")
+
class MATERIAL_PT_raymir(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_raymir"
__label__ = "Ray Mirror"
+ __default_closed__ = True
def poll(self, context):
mat = context.material
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
raym = context.material.raytrace_mirror
- layout = self.layout
layout.itemR(raym, "enabled", text="")
def draw(self, context):
layout = self.layout
raym = context.material.raytrace_mirror
- layout.active = raym.enabled
+ mat = context.material
+
+ layout.active = raym.enabled
+
split = layout.split()
sub = split.column()
- sub.itemR(raym, "reflect", text="RayMir", slider=True)
+ sub.itemR(raym, "reflect", text="Reflectivity", slider=True)
+ sub.itemR(mat, "mirror_color", text="")
sub.itemR(raym, "fresnel")
sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
sub = split.column()
sub.itemR(raym, "gloss", slider=True)
- sub.itemR(raym, "gloss_threshold", slider=True)
- sub.itemR(raym, "gloss_samples")
- sub.itemR(raym, "gloss_anisotropic", slider=True)
+ colsub = sub.column()
+ colsub.active = raym.gloss < 1
+ colsub.itemR(raym, "gloss_threshold", slider=True, text="Threshold")
+ colsub.itemR(raym, "gloss_samples", text="Samples")
+ colsub.itemR(raym, "gloss_anisotropic", slider=True, text="Anisotropic")
row = layout.row()
row.itemR(raym, "distance", text="Max Dist")
@@ -131,23 +330,27 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel):
class MATERIAL_PT_raytransp(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_raytransp"
__label__= "Ray Transparency"
-
+ __default_closed__ = True
+
def poll(self, context):
mat = context.material
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
rayt = context.material.raytrace_transparency
- layout = self.layout
layout.itemR(rayt, "enabled", text="")
def draw(self, context):
layout = self.layout
rayt = context.material.raytrace_transparency
+ mat = context.material
+
layout.active = rayt.enabled
split = layout.split()
+ split.active = mat.shadeless== False
sub = split.column()
sub.itemR(rayt, "ior")
@@ -156,14 +359,17 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel):
sub = split.column()
sub.itemR(rayt, "gloss", slider=True)
- sub.itemR(rayt, "gloss_threshold", slider=True)
- sub.itemR(rayt, "gloss_samples")
+ colsub = sub.column()
+ colsub.active = rayt.gloss < 1
+ colsub.itemR(rayt, "gloss_threshold", slider=True, text="Threshold")
+ colsub.itemR(rayt, "gloss_samples", text="Samples")
flow = layout.column_flow()
+ flow.active = mat.shadeless== False
flow.itemR(rayt, "filter", slider=True)
flow.itemR(rayt, "limit")
flow.itemR(rayt, "falloff")
- flow.itemR(rayt, "specular_opacity", slider=True)
+ flow.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
flow.itemR(rayt, "depth")
class MATERIAL_PT_halo(MaterialButtonsPanel):
@@ -176,13 +382,14 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
def draw(self, context):
layout = self.layout
+
mat = context.material
halo = mat.halo
split = layout.split()
- col = split.column(align=True)
- col.itemL(text="General Settings:")
+ col = split.column()
+ col.itemR(mat, "diffuse_color", text="")
col.itemR(halo, "size")
col.itemR(halo, "hardness")
col.itemR(halo, "add", slider=True)
@@ -195,15 +402,17 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
col.itemR(halo, "soft")
col = split.column()
- col = col.column(align=True)
+ col = col.column()
col.itemR(halo, "ring")
colsub = col.column()
colsub.active = halo.ring
colsub.itemR(halo, "rings")
+ colsub.itemR(mat, "mirror_color", text="")
col.itemR(halo, "lines")
colsub = col.column()
colsub.active = halo.lines
colsub.itemR(halo, "line_number", text="Lines")
+ colsub.itemR(mat, "specular_color", text="")
col.itemR(halo, "star")
colsub = col.column()
colsub.active = halo.star
@@ -217,10 +426,15 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
colsub.itemR(halo, "flare_seed", text="Seed")
colsub.itemR(halo, "flares_sub", text="Sub")
+
+bpy.types.register(MATERIAL_PT_context_material)
bpy.types.register(MATERIAL_PT_preview)
bpy.types.register(MATERIAL_PT_material)
+bpy.types.register(MATERIAL_PT_diffuse)
+bpy.types.register(MATERIAL_PT_specular)
bpy.types.register(MATERIAL_PT_raymir)
bpy.types.register(MATERIAL_PT_raytransp)
bpy.types.register(MATERIAL_PT_sss)
bpy.types.register(MATERIAL_PT_halo)
-
+bpy.types.register(MATERIAL_PT_strand)
+bpy.types.register(MATERIAL_PT_options)
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
index a4ac6dfff86..12aed082381 100644
--- a/release/ui/buttons_object_constraint.py
+++ b/release/ui/buttons_object_constraint.py
@@ -4,7 +4,7 @@ import bpy
class ConstraintButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
- __context__ = "object"
+ __context__ = "constraint"
def draw_constraint(self, con):
layout = self.layout
@@ -15,8 +15,8 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.child_of(box, con)
elif con.type == "TRACK_TO":
self.track_to(box, con)
- #elif con.type == "IK":
- # self.ik(box, con)
+ elif con.type == "IK":
+ self.ik(box, con)
elif con.type == "FOLLOW_PATH":
self.follow_path(box, con)
elif con.type == "LIMIT_ROTATION":
@@ -43,8 +43,8 @@ class ConstraintButtonsPanel(bpy.types.Panel):
self.stretch_to(box, con)
elif con.type == "FLOOR":
self.floor(box, con)
- #elif con.type == "RIGID_BODY_JOINT"
- # self.rigid_body(box, con)
+ elif con.type == "RIGID_BODY_JOINT":
+ self.rigid_body(box, con)
elif con.type == "CLAMP_TO":
self.clamp_to(box, con)
elif con.type == "TRANSFORM":
@@ -67,7 +67,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
row.itemR(con, "target_space", text="")
if target and owner:
- row.itemL(icon=8) # XXX
+ row.itemL(icon="ICON_ARROW_LEFTRIGHT")
if owner:
row.itemR(con, "owner_space", text="")
@@ -77,13 +77,14 @@ class ConstraintButtonsPanel(bpy.types.Panel):
if con.target and subtargets:
if con.target.type == "ARMATURE":
- layout.itemR(con, "subtarget", text="Bone") # XXX autocomplete
+ layout.item_pointerR(con, "subtarget", con.target.data, "bones", text="Bone")
- row = layout.row()
- row.itemL(text="Head/Tail:")
- row.itemR(con, "head_tail", text="")
+ if con.type == 'COPY_LOCATION':
+ row = layout.row()
+ row.itemL(text="Head/Tail:")
+ row.itemR(con, "head_tail", text="")
elif con.target.type in ("MESH", "LATTICE"):
- layout.itemR(con, "subtarget", text="Vertex Group") # XXX autocomplete
+ layout.item_pointerR(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
def child_of(self, layout, con):
self.target_template(layout, con)
@@ -108,10 +109,9 @@ class ConstraintButtonsPanel(bpy.types.Panel):
sub.itemR(con, "sizey", text="Y")
sub.itemR(con, "sizez", text="Z")
- # Missing
row = layout.row()
- row.itemL(text="SET OFFSET")
- row.itemL(text="CLEAR OFFSET")
+ row.itemO("CONSTRAINT_OT_childof_set_inverse")
+ row.itemO("CONSTRAINT_OT_childof_clear_inverse")
def track_to(self, layout, con):
self.target_template(layout, con)
@@ -121,18 +121,36 @@ class ConstraintButtonsPanel(bpy.types.Panel):
row.itemR(con, "track", expand=True)
row = layout.row()
+ #row.itemR(con, "up", text="Up", expand=True) # XXX: up and expand don't play nice together
row.itemR(con, "up", text="Up")
row.itemR(con, "target_z")
self.space_template(layout, con)
- #def ik(self, layout, con):
-
+ def ik(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pole_target")
+ layout.itemR(con, "pole_subtarget")
+
+ col = layout.column_flow()
+ col.itemR(con, "iterations")
+ col.itemR(con, "pole_angle")
+ col.itemR(con, "weight")
+ col.itemR(con, "orient_weight")
+ col.itemR(con, "chain_length")
+
+ col = layout.column_flow()
+ col.itemR(con, "tail")
+ col.itemR(con, "rotation")
+ col.itemR(con, "targetless")
+ col.itemR(con, "stretch")
+
def follow_path(self, layout, con):
self.target_template(layout, con)
row = layout.row()
- row.itemR(con, "curve_follow", toggle=True)
+ row.itemR(con, "curve_follow")
row.itemR(con, "offset")
row = layout.row()
@@ -394,7 +412,29 @@ class ConstraintButtonsPanel(bpy.types.Panel):
row.itemL(text="Min/Max:")
row.itemR(con, "floor_location", expand=True)
- #def rigid_body(self, layout, con):
+ def rigid_body(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pivot_type")
+ layout.itemR(con, "child")
+
+ row = layout.row()
+ row.itemR(con, "disable_linked_collision", text="No Collision")
+ row.itemR(con, "draw_pivot")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "pivot_x")
+ col.itemR(con, "pivot_y")
+ col.itemR(con, "pivot_z")
+
+ col = split.column()
+ col.itemR(con, "axis_x")
+ col.itemR(con, "axis_y")
+ col.itemR(con, "axis_z")
+
+ #Missing: Limit arrays (not wrapped in RNA yet)
def clamp_to(self, layout, con):
self.target_template(layout, con)
@@ -470,14 +510,13 @@ class ConstraintButtonsPanel(bpy.types.Panel):
class OBJECT_PT_constraints(ConstraintButtonsPanel):
__idname__ = "OBJECT_PT_constraints"
__label__ = "Constraints"
- __context__ = "object"
+ __context__ = "constraint"
def poll(self, context):
- ob = context.active_object
- return (ob != None)
+ return (context.object != None)
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
row = layout.row()
@@ -489,24 +528,24 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
class BONE_PT_constraints(ConstraintButtonsPanel):
__idname__ = "BONE_PT_constraints"
- __label__ = "Constraints"
+ __label__ = "Bone Constraints"
__context__ = "bone"
def poll(self, context):
- ob = context.active_object
- return (ob and ob.type == "ARMATURE")
+ ob = context.object
+ return (ob and ob.type == "ARMATURE" and context.bone)
def draw(self, context):
- ob = context.active_object
- pchan = ob.pose.pose_channels[0]
+ ob = context.object
+ pchan = ob.pose.pose_channels[context.bone.name]
layout = self.layout
- #row = layout.row()
- #row.item_menu_enumO("BONE_OT_constraint_add", "type")
- #row.itemL();
+ row = layout.row()
+ row.item_menu_enumO("OBJECT_OT_constraint_add", "type")
+ row.itemL();
for con in pchan.constraints:
self.draw_constraint(con)
bpy.types.register(OBJECT_PT_constraints)
-bpy.types.register(BONE_PT_constraints) \ No newline at end of file
+bpy.types.register(BONE_PT_constraints)
diff --git a/release/ui/buttons_objects.py b/release/ui/buttons_objects.py
index 6d75146fe5f..59e19d05959 100644
--- a/release/ui/buttons_objects.py
+++ b/release/ui/buttons_objects.py
@@ -6,16 +6,25 @@ class ObjectButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "object"
- def poll(self, context):
- return (context.object != None)
+class OBJECT_PT_context_object(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_context_object"
+ __no_header__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ split = layout.split(percentage=0.06)
+ split.itemL(text="", icon="ICON_OBJECT_DATA")
+ split.itemR(ob, "name", text="")
class OBJECT_PT_transform(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_transform"
__label__ = "Transform"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.column().itemR(ob, "location")
@@ -27,8 +36,8 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
__label__ = "Groups"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "pass_index")
@@ -38,7 +47,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
# layout.itemO("OBJECT_OT_add_group");
for group in bpy.data.groups:
- if ob in group.objects:
+ if ob.name in group.objects:
col = layout.column(align=True)
row = col.box().row()
@@ -54,8 +63,8 @@ class OBJECT_PT_display(ObjectButtonsPanel):
__label__ = "Display"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "max_draw_type", text="Type")
@@ -74,8 +83,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
__label__ = "Duplication"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "dupli_type", expand=True)
@@ -108,8 +117,8 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
__label__ = "Animation"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
split = layout.split()
@@ -127,9 +136,9 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
sub.itemR(ob, "up_axis", text="Up Axis")
sub.itemR(ob, "track_rotation", text="Rotation")
+bpy.types.register(OBJECT_PT_context_object)
bpy.types.register(OBJECT_PT_transform)
bpy.types.register(OBJECT_PT_groups)
bpy.types.register(OBJECT_PT_display)
bpy.types.register(OBJECT_PT_duplication)
bpy.types.register(OBJECT_PT_animation)
-
diff --git a/release/ui/buttons_particle.py b/release/ui/buttons_particle.py
index 52e20b03538..2d269967e4b 100644
--- a/release/ui/buttons_particle.py
+++ b/release/ui/buttons_particle.py
@@ -1,26 +1,673 @@
import bpy
+def particle_panel_enabled(psys):
+ return psys.point_cache.baked==False and psys.editable==False
+
+def particle_panel_poll(context):
+ psys = context.particle_system
+ if psys==None: return False
+ if psys.settings==None: return False
+ return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
+
class ParticleButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "particle"
def poll(self, context):
- ob = context.active_object
- return (ob and ob.active_particle_system)
+ return particle_panel_poll(context)
class PARTICLE_PT_particles(ParticleButtonsPanel):
__idname__= "PARTICLE_PT_particles"
- __label__ = "Particles"
+ __no_header__ = True
+
+ def poll(self, context):
+ return (context.particle_system or context.object)
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+ psys = context.particle_system
+
+ if ob:
+ row = layout.row()
+
+ row.template_list(ob, "particle_systems", ob, "active_particle_system_index")
+ col = row.column(align=True)
+ col.itemO("OBJECT_OT_particle_system_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("OBJECT_OT_particle_system_remove", icon="ICON_ZOOMOUT", text="")
+
+ if psys:
+ split = layout.split(percentage=0.65)
+
+ split.template_ID(psys, "settings", new="PARTICLE_OT_new")
+
+ #row = layout.row()
+ #row.itemL(text="Viewport")
+ #row.itemL(text="Render")
+
+ part = psys.settings
+
+ if part:
+ ptype = psys.settings.type
+ if ptype not in ('EMITTER', 'REACTOR', 'HAIR'):
+ layout.itemL(text="No settings for fluid particles")
+ return
+
+ split = layout.split(percentage=0.65)
+
+ split.enabled = particle_panel_enabled(psys)
+ split.itemR(part, "type")
+ split.itemR(psys, "seed")
+
+ split = layout.split(percentage=0.65)
+ if part.type=='HAIR':
+ if psys.editable==True:
+ split.itemO("PARTICLE_OT_editable_set", text="Free Edit")
+ else:
+ split.itemO("PARTICLE_OT_editable_set", text="Make Editable")
+ row = split.row()
+ row.enabled = particle_panel_enabled(psys)
+ row.itemR(part, "hair_step")
+ elif part.type=='REACTOR':
+ split.enabled = particle_panel_enabled(psys)
+ split.itemR(psys, "reactor_target_object")
+ split.itemR(psys, "reactor_target_particle_system", text="Particle System")
+
+class PARTICLE_PT_emission(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_emission"
+ __label__ = "Emission"
+
def draw(self, context):
layout = self.layout
- psys = context.active_object.active_particle_system
+ psys = context.particle_system
part = psys.settings
+
+ layout.enabled = particle_panel_enabled(psys)
+
+ row = layout.row()
+ row.itemR(part, "amount")
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(part, "start")
+ col.itemR(part, "end")
- layout.itemR(part, "amount")
+ col = split.column(align=True)
+ col.itemR(part, "lifetime")
+ col.itemR(part, "random_lifetime", slider=True)
+
+ layout.row().itemL(text="Emit From:")
+
+ row = layout.row()
+ row.itemR(part, "emit_from", expand=True)
+ row = layout.row()
+ row.itemR(part, "trand")
+ if part.distribution!='GRID':
+ row.itemR(part, "even_distribution")
+
+ if part.emit_from=='FACE' or part.emit_from=='VOLUME':
+ row = layout.row()
+ row.itemR(part, "distribution", expand=True)
+
+ row = layout.row()
-bpy.types.register(PARTICLE_PT_particles)
+ if part.distribution=='JIT':
+ row.itemR(part, "userjit", text="Particles/Face")
+ row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
+ elif part.distribution=='GRID':
+ row.itemR(part, "grid_resolution")
+
+class PARTICLE_PT_cache(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_cache"
+ __label__ = "Cache"
+ __default_closed__ = True
+
+ def poll(self, context):
+ psys = context.particle_system
+ if psys==None: return False
+ if psys.settings==None: return False
+ phystype = psys.settings.physics_type
+ if phystype == 'NO' or phystype == 'KEYED':
+ return False
+ return psys.settings.type in ('EMITTER', 'REACTOR')
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+ cache = psys.point_cache
+
+ row = layout.row()
+ row.itemR(cache, "name")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("PTCACHE_OT_free_bake_particle_system", text="Free Bake")
+ else:
+ row.item_booleanO("PTCACHE_OT_cache_particle_system", "bake", True, text="Bake")
+
+ subrow = row.row()
+ subrow.enabled = (cache.frames_skipped or cache.outdated) and particle_panel_enabled(psys)
+ subrow.itemO("PTCACHE_OT_cache_particle_system", text="Calculate to Current Frame")
+
+ row = layout.row()
+ row.enabled = particle_panel_enabled(psys)
+ row.itemO("PTCACHE_OT_bake_from_particles_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.item_booleanO("PTCACHE_OT_bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
+ layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+
+ # for particles these are figured out automatically
+ #row.itemR(cache, "start_frame")
+ #row.itemR(cache, "end_frame")
+
+class PARTICLE_PT_initial(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_initial"
+ __label__ = "Velocity"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.enabled = particle_panel_enabled(psys)
+
+ layout.row().itemL(text="Direction:")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "normal_factor")
+ if part.emit_from=='PARTICLE':
+ sub.itemR(part, "particle_factor")
+ else:
+ sub.itemR(part, "object_factor", slider=True)
+ sub.itemR(part, "random_factor")
+ sub.itemR(part, "tangent_factor")
+ sub.itemR(part, "tangent_phase", slider=True)
+
+ sub = split.column()
+ sub.itemL(text="TODO:")
+ sub.itemL(text="Object aligned")
+ sub.itemL(text="direction: X, Y, Z")
+
+ if part.type=='REACTOR':
+ sub.itemR(part, "reactor_factor")
+ sub.itemR(part, "reaction_shape", slider=True)
+ else:
+ sub.itemL(text="")
+
+ layout.row().itemL(text="Rotation:")
+ split = layout.split()
+
+ sub = split.column()
+
+ sub.itemR(part, "rotation_mode", text="Axis")
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "rotation_dynamic")
+ sub.itemR(part, "random_rotation_factor", slider=True)
+ sub = split.column()
+ sub.itemR(part, "phase_factor", slider=True)
+ sub.itemR(part, "random_phase_factor", text="Random", slider=True)
+
+ layout.row().itemL(text="Angular velocity:")
+ layout.row().itemR(part, "angular_velocity_mode", expand=True)
+ split = layout.split()
+
+ sub = split.column()
+
+ sub.itemR(part, "angular_velocity_factor", text="")
+
+class PARTICLE_PT_physics(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_physics"
+ __label__ = "Physics"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.enabled = layout.enabled = particle_panel_enabled(psys)
+
+ row = layout.row()
+ row.itemR(part, "physics_type", expand=True)
+ if part.physics_type != 'NO':
+ layout.itemR(part, "effector_group")
+
+ row = layout.row()
+ col = row.column(align=True)
+ col.itemR(part, "particle_size")
+ col.itemR(part, "random_size", slider=True)
+ col = row.column(align=True)
+ col.itemR(part, "mass")
+ col.itemR(part, "sizemass", text="Multiply mass with size")
+
+ split = layout.split()
+
+ sub = split.column()
+
+ if part.physics_type == 'NEWTON':
+
+ sub.itemL(text="Forces:")
+ sub.itemR(part, "brownian_factor")
+ sub.itemR(part, "drag_factor", slider=True)
+ sub.itemR(part, "damp_factor", slider=True)
+ sub.itemR(part, "integrator")
+ sub = split.column()
+ sub.itemR(part, "acceleration")
+
+ elif part.physics_type == 'KEYED':
+ row = layout.row()
+ col = row.column()
+ col.active = not psys.keyed_timing
+ col.itemR(part, "keyed_loops", text="Loops")
+ row.itemR(psys, "keyed_timing", text="Use Timing")
+
+ layout.itemL(text="Keys:")
+ row = layout.row()
+
+ row.template_list(psys, "keyed_targets", psys, "active_keyed_target_index")
+
+ col = row.column()
+ subrow = col.row()
+ subcol = subrow.column(align=True)
+ subcol.itemO("PARTICLE_OT_new_keyed_target", icon="ICON_ZOOMIN", text="")
+ subcol.itemO("PARTICLE_OT_remove_keyed_target", icon="ICON_ZOOMOUT", text="")
+ subrow = col.row()
+ subcol = subrow.column(align=True)
+ subcol.itemO("PARTICLE_OT_keyed_target_move_up", icon="VICON_MOVE_UP", text="")
+ subcol.itemO("PARTICLE_OT_keyed_target_move_down", icon="VICON_MOVE_DOWN", text="")
+
+ key = psys.active_keyed_target
+ if key:
+ row = layout.row()
+ col = row.column()
+ #doesn't work yet
+ #col.red_alert = key.valid
+ col.itemR(key, "object", text="")
+ col.itemR(key, "system", text="System")
+ col = row.column();
+ col.active = psys.keyed_timing
+ col.itemR(key, "time")
+ col.itemR(key, "duration")
+
+ if part.physics_type=='NEWTON' or part.physics_type=='BOIDS':
+
+ sub.itemR(part, "size_deflect")
+ sub.itemR(part, "die_on_collision")
+ sub.itemR(part, "sticky")
+class PARTICLE_PT_render(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_render"
+ __label__ = "Render"
+
+ def poll(self, context):
+ psys = context.particle_system
+ if psys==None: return False
+ if psys.settings==None: return False
+ return True;
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ row = layout.row()
+ row.itemR(part, "material")
+ row.itemR(psys, "parent");
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "emitter");
+ sub.itemR(part, "parent");
+ sub = split.column()
+ sub.itemR(part, "unborn");
+ sub.itemR(part, "died");
+
+ row = layout.row()
+ row.itemR(part, "ren_as", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+
+ if part.ren_as == 'LINE':
+ sub.itemR(part, "line_length_tail")
+ sub.itemR(part, "line_length_head")
+ sub = split.column()
+ sub.itemR(part, "velocity_length")
+ elif part.ren_as == 'PATH':
+
+ if (part.type!='HAIR' and part.physics_type!='KEYED' and psys.point_cache.baked==False):
+ box = layout.box()
+ box.itemL(text="Baked or keyed particles needed for correct rendering.")
+ return
+
+ sub.itemR(part, "render_strand")
+ colsub = sub.column()
+ colsub.active = part.render_strand == False
+ colsub.itemR(part, "render_adaptive")
+ colsub = sub.column()
+ colsub.active = part.render_adaptive or part.render_strand == True
+ colsub.itemR(part, "adaptive_angle")
+ colsub = sub.column()
+ colsub.active = part.render_adaptive == True and part.render_strand == False
+ colsub.itemR(part, "adaptive_pix")
+ sub.itemR(part, "hair_bspline")
+ sub.itemR(part, "render_step", text="Steps")
+ sub = split.column()
+
+ sub.itemL(text="Timing:")
+ sub.itemR(part, "abs_path_time")
+ sub.itemR(part, "path_start", text="Start", slider= not part.abs_path_time)
+ sub.itemR(part, "path_end", text="End", slider= not part.abs_path_time)
+ sub.itemR(part, "random_length", text="Random", slider=True)
+
+ row = layout.row()
+ col = row.column()
+
+ if part.type=='HAIR' and part.render_strand==True and part.child_type=='FACES':
+ layout.itemR(part, "enable_simplify")
+ if part.enable_simplify==True:
+ row = layout.row()
+ row.itemR(part, "simplify_refsize")
+ row.itemR(part, "simplify_rate")
+ row.itemR(part, "simplify_transition")
+ row = layout.row()
+ row.itemR(part, "viewport")
+ subrow = row.row()
+ subrow.active = part.viewport==True
+ subrow.itemR(part, "simplify_viewport")
+
+
+ elif part.ren_as == 'OBJECT':
+ sub.itemR(part, "dupli_object")
+ elif part.ren_as == 'GROUP':
+ sub.itemR(part, "dupli_group")
+ split = layout.split()
+ sub = split.column()
+ sub.itemR(part, "whole_group")
+ sub = split.column()
+ colsub = sub.column()
+ colsub.active = part.whole_group == False
+ colsub.itemR(part, "rand_group")
+
+ elif part.ren_as == 'BILLBOARD':
+ sub.itemL(text="Align:")
+
+ row = layout.row()
+ row.itemR(part, "billboard_align", expand=True)
+ row.itemR(part, "billboard_lock", text="Lock")
+ row = layout.row()
+ row.itemR(part, "billboard_object")
+
+ row = layout.row()
+ col = row.column(align=True)
+ col.itemL(text="Tilt:")
+ col.itemR(part, "billboard_tilt", text="Angle", slider=True)
+ col.itemR(part, "billboard_random_tilt", slider=True)
+ col = row.column()
+ col.itemR(part, "billboard_offset")
+
+ row = layout.row()
+ row.itemR(psys, "billboard_normal_uv")
+ row = layout.row()
+ row.itemR(psys, "billboard_time_index_uv")
+
+ row = layout.row()
+ row.itemL(text="Split uv's:")
+ row.itemR(part, "billboard_uv_split", text="Number of splits")
+ row = layout.row()
+ row.itemR(psys, "billboard_split_uv")
+ row = layout.row()
+ row.itemL(text="Animate:")
+ row.itemR(part, "billboard_animation", expand=True)
+ row.itemL(text="Offset:")
+ row.itemR(part, "billboard_split_offset", expand=True)
+ if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as=='BILLBOARD':
+ row = layout.row()
+ col = row.column()
+ col.itemR(part, "trail_count")
+ if part.trail_count > 1:
+ col.itemR(part, "abs_path_time", text="Length in frames")
+ col = row.column()
+ col.itemR(part, "path_end", text="Length", slider=not part.abs_path_time)
+ col.itemR(part, "random_length", text="Random", slider=True)
+ else:
+ col = row.column()
+ col.itemL(text="")
+
+class PARTICLE_PT_draw(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_draw"
+ __label__ = "Display"
+ __default_closed__ = True
+
+ def poll(self, context):
+ psys = context.particle_system
+ if psys==None: return False
+ if psys.settings==None: return False
+ return True;
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ row = layout.row()
+ row.itemR(part, "draw_as", expand=True)
+
+ if part.draw_as=='NONE' or (part.ren_as=='NONE' and part.draw_as=='RENDER'):
+ return
+
+ path = (part.ren_as=='PATH' and part.draw_as=='RENDER') or part.draw_as=='PATH'
+
+ if path and part.type!='HAIR' and part.physics_type!='KEYED' and psys.point_cache.baked==False:
+ box = layout.box()
+ box.itemL(text="Baked or keyed particles needed for correct drawing.")
+ return
+
+ row = layout.row()
+ row.itemR(part, "display", slider=True)
+ if part.draw_as!='RENDER' or part.ren_as=='HALO':
+ row.itemR(part, "draw_size")
+ else:
+ row.itemL(text="")
+
+ row = layout.row()
+ col = row.column()
+ col.itemR(part, "show_size")
+ col.itemR(part, "velocity")
+ col.itemR(part, "num")
+ if part.physics_type == 'BOIDS':
+ col.itemR(part, "draw_health")
+
+ col = row.column()
+ col.itemR(part, "material_color", text="Use material color")
+
+ if (path):
+ box = col.box()
+ box.itemR(part, "draw_step")
+ else:
+ subcol = col.column()
+ subcol.active = part.material_color==False
+ #subcol.itemL(text="color")
+ #subcol.itemL(text="Override material color")
+
+class PARTICLE_PT_children(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_children"
+ __label__ = "Children"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.row().itemR(part, "child_type", expand=True)
+
+ if part.child_type=='NONE':
+ return
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "child_nbr", text="Display")
+ col.itemR(part, "rendered_child_nbr", text="Render")
+
+ col = row.column(align=True)
+
+ if part.child_type=='FACES':
+ col.itemR(part, "virtual_parents", slider=True)
+ else:
+ col.itemR(part, "child_radius", text="Radius")
+ col.itemR(part, "child_roundness", text="Roundness", slider=True)
+
+ col = row.column(align=True)
+ col.itemR(part, "child_size", text="Size")
+ col.itemR(part, "child_random_size", text="Random")
+
+ layout.row().itemL(text="Effects:")
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "clump_factor", slider=True)
+ col.itemR(part, "clumppow", slider=True)
+
+ col = row.column(align=True)
+ col.itemR(part, "rough_endpoint")
+ col.itemR(part, "rough_end_shape")
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "rough1")
+ col.itemR(part, "rough1_size")
+
+ col = row.column(align=True)
+ col.itemR(part, "rough2")
+ col.itemR(part, "rough2_size")
+ col.itemR(part, "rough2_thres", slider=True)
+
+ row = layout.row()
+ col = row.column(align=True)
+ col.itemR(part, "child_length", slider=True)
+ col.itemR(part, "child_length_thres", slider=True)
+
+ col = row.column(align=True)
+ col.itemL(text="Space reserved for")
+ col.itemL(text="hair parting controls")
+
+ layout.row().itemL(text="Kink:")
+ layout.row().itemR(part, "kink", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "kink_amplitude")
+ sub.itemR(part, "kink_frequency")
+ sub = split.column()
+ sub.itemR(part, "kink_shape", slider=True)
+
+class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_vertexgroups"
+ __label__ = "Vertexgroups"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.itemL(text="Nothing here yet.")
+
+ #row = layout.row()
+ #row.itemL(text="Vertex Group")
+ #row.itemL(text="Negate")
+
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_density")
+ #row.itemR(psys, "vertex_group_density_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_velocity")
+ #row.itemR(psys, "vertex_group_velocity_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_length")
+ #row.itemR(psys, "vertex_group_length_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_clump")
+ #row.itemR(psys, "vertex_group_clump_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_kink")
+ #row.itemR(psys, "vertex_group_kink_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness1")
+ #row.itemR(psys, "vertex_group_roughness1_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness2")
+ #row.itemR(psys, "vertex_group_roughness2_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness_end")
+ #row.itemR(psys, "vertex_group_roughness_end_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_size")
+ #row.itemR(psys, "vertex_group_size_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_tangent")
+ #row.itemR(psys, "vertex_group_tangent_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_rotation")
+ #row.itemR(psys, "vertex_group_rotation_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_field")
+ #row.itemR(psys, "vertex_group_field_negate", text="")
+
+bpy.types.register(PARTICLE_PT_particles)
+bpy.types.register(PARTICLE_PT_cache)
+bpy.types.register(PARTICLE_PT_emission)
+bpy.types.register(PARTICLE_PT_initial)
+bpy.types.register(PARTICLE_PT_physics)
+bpy.types.register(PARTICLE_PT_render)
+bpy.types.register(PARTICLE_PT_draw)
+bpy.types.register(PARTICLE_PT_children)
+bpy.types.register(PARTICLE_PT_vertexgroups)
diff --git a/release/ui/buttons_physic_cloth.py b/release/ui/buttons_physic_cloth.py
index 6dab2bcf57c..277a6dfe760 100644
--- a/release/ui/buttons_physic_cloth.py
+++ b/release/ui/buttons_physic_cloth.py
@@ -6,115 +6,186 @@ class PhysicButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "physics"
- def cloth_modifier(self, context):
- ob = context.active_object
- for md in ob.modifiers:
- if md.type == 'CLOTH':
- return md
-
- return None
-
def poll(self, context):
- md = self.cloth_modifier(context)
- return (md != None)
+ ob = context.object
+ return (ob and ob.type == 'MESH')
-class Physic_PT_cloth(PhysicButtonsPanel):
- __idname__ = "Physic_PT_cloth"
+class PHYSICS_PT_cloth(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_cloth"
__label__ = "Cloth"
def draw(self, context):
layout = self.layout
- md = self.cloth_modifier(context)
- cloth = md.settings
-
+ md = context.cloth
+ ob = context.object
+
split = layout.split()
+ split.operator_context = "EXEC_DEFAULT"
+
+ if md:
+ # remove modifier + settings
+ split.set_context_pointer("modifier", md)
+ split.itemO("OBJECT_OT_modifier_remove", text="Remove")
+
+ row = split.row(align=True)
+ row.itemR(md, "render", text="")
+ row.itemR(md, "realtime", text="")
+ else:
+ # add modifier
+ split.item_enumO("OBJECT_OT_modifier_add", "type", "CLOTH", text="Add")
+ split.itemL()
+
+ if md:
+ cloth = md.settings
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(cloth, "quality", slider=True)
+ col.itemR(cloth, "gravity")
+
+ col.itemR(cloth, "pin_cloth", text="Pin")
+ col = col.column(align=True)
+ col.active = cloth.pin_cloth
+ col.itemR(cloth, "pin_stiffness", text="Stiffness")
+ col.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column(align=True)
+ col.itemL(text="Presets...")
+ col.itemL(text="")
+ col.itemR(cloth, "mass")
+ col.itemR(cloth, "structural_stiffness", text="Structural")
+ col.itemR(cloth, "bending_stiffness", text="Bending")
+ col.itemL(text="Damping")
+ col.itemR(cloth, "spring_damping", text="Spring")
+ col.itemR(cloth, "air_damping", text="Air")
+
+ # Disabled for now
+ """
+ if cloth.mass_vertex_group:
+ layout.itemL(text="Goal:")
+
+ col = layout.column_flow()
+ col.itemR(cloth, "goal_default", text="Default")
+ col.itemR(cloth, "goal_spring", text="Stiffness")
+ col.itemR(cloth, "goal_friction", text="Friction")
+ """
+
+class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
+ __idname__= "PHYSICS_PT_cloth_cache"
+ __label__ = "Cloth Cache"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.cloth != None)
+
+ def draw(self, context):
+ layout = self.layout
+
+ cache = context.cloth.point_cache
- col = split.column()
- col.itemR(cloth, "quality", slider=True)
- col.itemR(cloth, "gravity")
- col.itemR(cloth, "mass")
- col.itemR(cloth, "mass_vertex_group", text="Vertex Group")
-
- col = split.column()
- col.itemL(text="Stiffness:")
- col.itemR(cloth, "structural_stiffness", text="Structural")
- col.itemR(cloth, "bending_stiffness", text="Bending")
- col.itemL(text="Damping:")
- col.itemR(cloth, "spring_damping", text="Spring")
- col.itemR(cloth, "air_damping", text="Air")
-
- # Disabled for now
- """
- if cloth.mass_vertex_group:
- layout.itemL(text="Goal:")
-
- col = layout.column_flow()
- col.itemR(cloth, "goal_default", text="Default")
- col.itemR(cloth, "goal_spring", text="Stiffness")
- col.itemR(cloth, "goal_friction", text="Friction")
- """
+ 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_OT_free_bake_cloth", text="Free Bake")
+ else:
+ row.item_booleanO("PTCACHE_OT_cache_cloth", "bake", True, text="Bake")
+
+ subrow = row.row()
+ subrow.enabled = cache.frames_skipped or cache.outdated
+ subrow.itemO("PTCACHE_OT_cache_cloth", text="Calculate to Current Frame")
+
+ row = layout.row()
+ #row.enabled = particle_panel_enabled(psys)
+ row.itemO("PTCACHE_OT_bake_from_cloth_cache", text="Current Cache to Bake")
+ row.itemR(cache, "step");
-class Physic_PT_cloth_collision(PhysicButtonsPanel):
- __idname__ = "Physic_PT_clothcollision"
+ 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_OT_bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
+ layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+
+class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_clothcollision"
__label__ = "Cloth Collision"
+
+ def poll(self, context):
+ return (context.cloth != None)
def draw_header(self, context):
layout = self.layout
- md = self.cloth_modifier(context)
- cloth = md.collision_settings
+ cloth = context.cloth.collision_settings
layout.itemR(cloth, "enable_collision", text="")
def draw(self, context):
layout = self.layout
+ cloth = context.cloth.collision_settings
+ split = layout.split()
- md = self.cloth_modifier(context)
- cloth = md.collision_settings
- layout.active = cloth.enable_collision
+ layout.active = cloth.enable_collision
- col = layout.column_flow()
- col.itemR(cloth, "collision_quality", slider=True)
+ col = split.column(align=True)
+ col.itemR(cloth, "collision_quality", slider=True, text="Quality")
+ col.itemR(cloth, "min_distance", text="Distance")
col.itemR(cloth, "friction")
- col.itemR(cloth, "min_distance", text="MinDistance")
-
- layout.itemR(cloth, "enable_self_collision", text="Self Collision")
-
- col = layout.column_flow()
+ col = split.column(align="True")
+ col.itemR(cloth, "enable_self_collision", text="Self Collision")
+ col = col.column(align=True)
col.active = cloth.enable_self_collision
- col.itemR(cloth, "self_collision_quality", slider=True)
- col.itemR(cloth, "self_min_distance", text="MinDistance")
+ col.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
+ col.itemR(cloth, "self_min_distance", text="Distance")
-class Physic_PT_cloth_stiffness(PhysicButtonsPanel):
- __idname__ = "Physic_PT_stiffness"
+class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_stiffness"
__label__ = "Cloth Stiffness Scaling"
+
+ def poll(self, context):
+ return (context.cloth != None)
def draw_header(self, context):
layout = self.layout
- md = self.cloth_modifier(context)
- cloth = md.settings
+ cloth = context.cloth.settings
layout.itemR(cloth, "stiffness_scaling", text="")
def draw(self, context):
layout = self.layout
+ ob = context.object
+ cloth = context.cloth.settings
- md = self.cloth_modifier(context)
- cloth = md.settings
layout.active = cloth.stiffness_scaling
split = layout.split()
- sub = split.column()
+ sub = split.column(align=True)
sub.itemL(text="Structural Stiffness:")
- sub.column().itemR(cloth, "structural_stiffness_vertex_group", text="VGroup")
sub.itemR(cloth, "structural_stiffness_max", text="Max")
+ sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
- sub = split.column()
+ sub = split.column(align=True)
sub.itemL(text="Bending Stiffness:")
- sub.column().itemR(cloth, "bending_vertex_group", text="VGroup")
sub.itemR(cloth, "bending_stiffness_max", text="Max")
+ sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
-bpy.types.register(Physic_PT_cloth)
-bpy.types.register(Physic_PT_cloth_collision)
-bpy.types.register(Physic_PT_cloth_stiffness) \ No newline at end of file
+bpy.types.register(PHYSICS_PT_cloth)
+bpy.types.register(PHYSICS_PT_cloth_cache)
+bpy.types.register(PHYSICS_PT_cloth_collision)
+bpy.types.register(PHYSICS_PT_cloth_stiffness)
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index e275b888156..00af3a325c4 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -6,175 +6,338 @@ class RenderButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "scene"
-class RENDER_PT_shading(RenderButtonsPanel):
- __label__ = "Shading"
+class RENDER_PT_render(RenderButtonsPanel):
+ __label__ = "Render"
def draw(self, context):
- scene = context.scene
layout = self.layout
+ rd = context.scene.render_data
+ row = layout.row()
+ row.itemO("SCREEN_OT_render", text="Image", icon='ICON_IMAGE_COL')
+ row.item_booleanO("SCREEN_OT_render", "anim", True, text="Animation", icon='ICON_SEQUENCE')
+
+ layout.itemR(rd, "display_mode", text="Display")
+
+class RENDER_PT_layers(RenderButtonsPanel):
+ __label__ = "Layers"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ scene = context.scene
rd = scene.render_data
+
+ split = layout.split()
+ split.itemL(text="Scene:")
+ split.column().itemR(scene, "visible_layers", text="")
+
+ row = layout.row()
+ row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
+
+ col = row.column(align=True)
+ col.itemO("SCENE_OT_render_layer_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("SCENE_OT_render_layer_remove", icon="ICON_ZOOMOUT", text="")
+
+ rl = rd.layers[rd.active_layer_index]
+
+ split = layout.split()
+ split.itemL(text="Layers:")
+ split.column().itemR(rl, "visible_layers", text="")
+
+ layout.itemR(rl, "light_override", text="Light")
+ layout.itemR(rl, "material_override", text="Material")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(rl, "zmask")
+ row = col.row()
+ row.itemR(rl, "zmask_negate", text="Negate")
+ row.active = rl.zmask
+ col.itemR(rl, "all_z")
+
+ col = split.column()
+ col.itemR(rl, "solid")
+ col.itemR(rl, "halo")
+ col.itemR(rl, "ztransp")
+
+ col = split.column()
+ col.itemR(rl, "sky")
+ col.itemR(rl, "edge")
+ col.itemR(rl, "strand")
+
+ if rl.zmask:
+ split = layout.split()
+ split.itemL(text="Zmask Layers:")
+ split.column().itemR(rl, "zmask_layers", text="")
+
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Passes:")
+ col.itemR(rl, "pass_combined")
+ col.itemR(rl, "pass_z")
+ col.itemR(rl, "pass_vector")
+ col.itemR(rl, "pass_normal")
+ col.itemR(rl, "pass_uv")
+ col.itemR(rl, "pass_mist")
+ col.itemR(rl, "pass_object_index")
+
+ col = split.column()
+ col.itemL()
+ col.itemR(rl, "pass_color")
+ col.itemR(rl, "pass_diffuse")
+ row = col.row()
+ row.itemR(rl, "pass_specular")
+ row.itemR(rl, "pass_specular_exclude", text="", icon="ICON_DOT")
+ row = col.row()
+ row.itemR(rl, "pass_shadow")
+ row.itemR(rl, "pass_shadow_exclude", text="", icon="ICON_DOT")
+ row = col.row()
+ row.itemR(rl, "pass_ao")
+ row.itemR(rl, "pass_ao_exclude", text="", icon="ICON_DOT")
+ row = col.row()
+ row.itemR(rl, "pass_reflection")
+ row.itemR(rl, "pass_reflection_exclude", text="", icon="ICON_DOT")
+ row = col.row()
+ row.itemR(rl, "pass_refraction")
+ row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_DOT")
+
+class RENDER_PT_shading(RenderButtonsPanel):
+ __label__ = "Shading"
+
+ def draw(self, context):
+ layout = self.layout
+ rd = context.scene.render_data
split = layout.split()
- sub = split.column()
- sub.itemR(rd, "render_shadows", text="Shadows")
- sub.itemR(rd, "render_sss", text="Subsurface Scattering")
- sub.itemR(rd, "render_envmaps", text="Environment Map")
- # sub.itemR(rd, "render_radiosity", text="Radio")
+ col = split.column()
+ col.itemR(rd, "render_shadows", text="Shadows")
+ col.itemR(rd, "render_sss", text="Subsurface Scattering")
+ col.itemR(rd, "render_envmaps", text="Environment Map")
col = split.column()
col.itemR(rd, "render_raytracing", text="Ray Tracing")
- colsub = col.column()
- colsub.active = rd.render_raytracing
- colsub.itemR(rd, "octree_resolution", text="Octree")
- col.itemR(rd, "dither_intensity", text="Dither", slider=True)
-
-class RENDER_PT_output(RenderButtonsPanel):
- __label__ = "Output"
+ row = col.row()
+ row.active = rd.render_raytracing
+ row.itemR(rd, "octree_resolution", text="Octree")
+ col.itemR(rd, "alpha_mode", text="Alpha")
+
+class RENDER_PT_performance(RenderButtonsPanel):
+ __label__ = "Performance"
+ __default_closed__ = True
def draw(self, context):
- scene = context.scene
layout = self.layout
+ rd = context.scene.render_data
- rd = scene.render_data
-
- layout.itemR(rd, "output_path")
-
split = layout.split()
- col = split.column()
- col.itemR(rd, "file_extensions")
- col.itemR(rd, "fields", text="Fields")
+ col = split.column(align=True)
+ col.itemL(text="Threads:")
+ col.row().itemR(rd, "threads_mode", expand=True)
colsub = col.column()
- colsub.active = rd.fields
- colsub.itemR(rd, "fields_still", text="Still")
- colsub.row().itemR(rd, "field_order", expand=True)
-
+ colsub.enabled = rd.threads_mode == 'THREADS_FIXED'
+ colsub.itemR(rd, "threads")
+
col = split.column()
- col.itemR(rd, "color_mode")
- col.itemR(rd, "alpha_mode")
- col.itemL(text="Distributed Rendering:")
- col.itemR(rd, "placeholders")
- col.itemR(rd, "no_overwrite")
+ sub = col.column(align=True)
+ sub.itemL(text="Tiles:")
+ sub.itemR(rd, "parts_x", text="X")
+ sub.itemR(rd, "parts_y", text="Y")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Memory:")
+ row = col.row()
+ row.itemR(rd, "save_buffers")
+ row.enabled = not rd.full_sample
+
+ col = split.column()
+ col.itemL()
+ col.itemR(rd, "free_image_textures")
+ col.active = rd.use_compositing
+
+class RENDER_PT_post_processing(RenderButtonsPanel):
+ __label__ = "Post Processing"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ rd = context.scene.render_data
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(rd, "use_compositing")
+ col.itemR(rd, "use_sequencer")
+
+ col = split.column()
+ row = col.row()
+ row.itemR(rd, "fields", text="Fields")
+ rowsub = row.row()
+ rowsub.active = rd.fields
+ rowsub.itemR(rd, "fields_still", text="Still")
+ rowsub = col.row()
+ rowsub.active = rd.fields
+ rowsub.itemR(rd, "field_order", expand=True)
+
+ split = layout.split()
+ split.itemL()
+ split.itemR(rd, "dither_intensity", text="Dither", slider=True)
- layout.itemR(rd, "file_format", text="Format")
+class RENDER_PT_output(RenderButtonsPanel):
+ __label__ = "Output"
+
+ def draw(self, context):
+ layout = self.layout
+ rd = context.scene.render_data
+ layout.itemR(rd, "output_path", text="")
+
split = layout.split()
-
col = split.column()
-
- if rd.file_format in ("AVIJPEG", "JPEG"):
- col.itemR(rd, "quality", slider=True)
+ col.itemR(rd, "placeholders")
+ col.itemR(rd, "no_overwrite")
+
+ col = split.column()
+ col.itemR(rd, "file_format", text="")
+ col.itemR(rd, "file_extensions")
+
+ if rd.file_format in ('AVIJPEG', 'JPEG'):
+ split = layout.split()
+ split.itemR(rd, "color_mode", text="Color")
+ split.itemR(rd, "quality", slider=True)
- elif rd.file_format in ("OPENEXR"):
+ elif rd.file_format == 'OPENEXR':
+ split = layout.split()
+ col = split.column()
+ col.itemR(rd, "color_mode", text="Color")
col.itemR(rd, "exr_codec")
+
+ subsplit = split.split()
+ col = subsplit.column()
col.itemR(rd, "exr_half")
- col = split.column()
col.itemR(rd, "exr_zbuf")
+ col = subsplit.column()
col.itemR(rd, "exr_preview")
- elif rd.file_format in ("JPEG2000"):
- row = layout.row()
- row.itemR(rd, "jpeg_preset")
+ elif rd.file_format == 'JPEG2000':
split = layout.split()
col = split.column()
+ col.itemR(rd, "color_mode", text="Color")
col.itemL(text="Depth:")
col.row().itemR(rd, "jpeg_depth", expand=True)
+
col = split.column()
+ col.itemR(rd, "jpeg_preset", text="")
col.itemR(rd, "jpeg_ycc")
col.itemR(rd, "exr_preview")
- elif rd.file_format in ("CINEON", "DPX"):
+ elif rd.file_format in ('CINEON', 'DPX'):
+ split = layout.split()
+ col = split.column()
+ col.itemR(rd, "color_mode", text="Color")
col.itemR(rd, "cineon_log", text="Convert to Log")
- colsub = col.column()
- colsub.active = rd.cineon_log
- colsub.itemR(rd, "cineon_black", text="Black")
- colsub.itemR(rd, "cineon_white", text="White")
- colsub.itemR(rd, "cineon_gamma", text="Gamma")
-
- elif rd.file_format in ("TIFF"):
- col.itemR(rd, "tiff_bit")
-class RENDER_PT_antialiasing(RenderButtonsPanel):
- __label__ = "Anti-Aliasing"
+ col = split.column(align=True)
+ col.active = rd.cineon_log
+ col.itemR(rd, "cineon_black", text="Black")
+ col.itemR(rd, "cineon_white", text="White")
+ col.itemR(rd, "cineon_gamma", text="Gamma")
+
+ elif rd.file_format == 'TIFF':
+ split = layout.split()
+ split.itemR(rd, "color_mode", text="Color")
+ split.itemR(rd, "tiff_bit")
+
+ else:
+ split = layout.split()
+ split.itemR(rd, "color_mode", text="Color")
+ split.itemL()
- def draw_header(self, context):
+class RENDER_PT_encoding(RenderButtonsPanel):
+ __label__ = "Encoding"
+ __default_closed__ = True
+
+ def poll(self, context):
rd = context.scene.render_data
-
- layout = self.layout
- layout.itemR(rd, "antialiasing", text="")
+ return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
def draw(self, context):
- scene = context.scene
- rd = scene.render_data
-
layout = self.layout
- layout.active = rd.antialiasing
+ rd = context.scene.render_data
+
+ split = layout.split()
+ split.itemR(rd, "ffmpeg_format")
+ if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
+ split.itemR(rd, "ffmpeg_codec")
+ else:
+ split.itemL()
split = layout.split()
+
+ col = split.column()
+ col.itemR(rd, "ffmpeg_video_bitrate")
+ col.itemL(text="Rate:")
+ col.itemR(rd, "ffmpeg_minrate", text="Minimum")
+ col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
+ col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
- sub = split.column()
- sub.itemL(text="Samples:")
- sub.row().itemR(rd, "antialiasing_samples", expand=True)
- sub.itemR(rd, "pixel_filter")
+ col = split.column()
+ col.itemR(rd, "ffmpeg_gopsize")
+ col.itemR(rd, "ffmpeg_autosplit")
+ col.itemL(text="Mux:")
+ col.itemR(rd, "ffmpeg_muxrate", text="Rate")
+ col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
+
+ row = layout.row()
+ row.itemL(text="Audio:")
+ row = layout.row()
+ row.itemR(rd, "ffmpeg_audio_codec")
+
+ split = layout.split()
col = split.column()
- col.itemR(rd, "filter_size", text="Size", slider=True)
- col.itemR(rd, "save_buffers")
- colsub = col.column()
- colsub.active = rd.save_buffers
- colsub.itemR(rd, "full_sample")
+ col.itemR(rd, "ffmpeg_audio_bitrate")
+ col = split.column()
+ col.itemR(rd, "ffmpeg_multiplex_audio")
-class RENDER_PT_render(RenderButtonsPanel):
- __label__ = "Render"
+class RENDER_PT_antialiasing(RenderButtonsPanel):
+ __label__ = "Anti-Aliasing"
- def draw(self, context):
- scene = context.scene
+ def draw_header(self, context):
layout = self.layout
+ rd = context.scene.render_data
- rd = scene.render_data
+ layout.itemR(rd, "antialiasing", text="")
- row = layout.row()
- row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
- row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon=111)
-
- row = layout.row()
- row.itemR(rd, "do_composite")
- row.itemR(rd, "do_sequence")
- rowsub = layout.row()
- rowsub.active = rd.do_composite
- rowsub.itemR(rd, "free_image_textures")
+ def draw(self, context):
+ layout = self.layout
+ rd = context.scene.render_data
+
+ layout.active = rd.antialiasing
split = layout.split()
- col = split.column(align=True)
- col.itemL(text="Threads:")
- col.row().itemR(rd, "threads_mode", expand=True)
- colsub = col.column()
- colsub.active = rd.threads_mode == 'THREADS_FIXED'
- colsub.itemR(rd, "threads")
-
- sub = split.column(align=True)
- sub.itemL(text="Tiles:")
- sub.itemR(rd, "parts_x", text="X")
- sub.itemR(rd, "parts_y", text="Y")
-
- split = layout.split()
- sub = split.column()
- sub = split.column()
- sub.itemR(rd, "panorama")
-
- # row.itemR(rd, "backbuf")
-
+ col = split.column()
+ col.row().itemR(rd, "antialiasing_samples", expand=True)
+ col.itemR(rd, "full_sample")
+
+ col = split.column()
+ col.itemR(rd, "pixel_filter", text="Filter")
+ col.itemR(rd, "filter_size", text="Size", slider=True)
+
class RENDER_PT_dimensions(RenderButtonsPanel):
__label__ = "Dimensions"
def draw(self, context):
- scene = context.scene
layout = self.layout
-
+
+ scene = context.scene
rd = scene.render_data
split = layout.split()
@@ -189,13 +352,13 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
sub.itemL(text="Aspect Ratio:")
sub.itemR(rd, "pixel_aspect_x", text="X")
sub.itemR(rd, "pixel_aspect_y", text="Y")
-
- col = col.column(align=False)
- col.itemR(rd, "border", text="Border")
- colsub = col.column()
- colsub.active = rd.border
- colsub.itemR(rd, "crop_to_border")
+ row = col.row()
+ row.itemR(rd, "border", text="Border")
+ rowsub = row.row()
+ rowsub.active = rd.border
+ rowsub.itemR(rd, "crop_to_border", text="Crop")
+
col = split.column(align=True)
col.itemL(text="Frame Range:")
col.itemR(scene, "start_frame", text="Start")
@@ -208,19 +371,19 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
class RENDER_PT_stamp(RenderButtonsPanel):
__label__ = "Stamp"
+ __default_closed__ = True
def draw_header(self, context):
rd = context.scene.render_data
layout = self.layout
- layout.itemR(rd, "stamp", text="")
+ layout.itemR(rd, "render_stamp", text="")
def draw(self, context):
- scene = context.scene
- rd = scene.render_data
-
layout = self.layout
- layout.active = rd.stamp
+ rd = context.scene.render_data
+
+ layout.active = rd.render_stamp
split = layout.split()
@@ -228,26 +391,32 @@ class RENDER_PT_stamp(RenderButtonsPanel):
col.itemR(rd, "stamp_time", text="Time")
col.itemR(rd, "stamp_date", text="Date")
col.itemR(rd, "stamp_frame", text="Frame")
- col.itemR(rd, "stamp_camera", text="Scene")
- col.itemR(rd, "stamp_marker", text="Marker")
+ col.itemR(rd, "stamp_scene", text="Scene")
+ col.itemR(rd, "stamp_camera", text="Camera")
col.itemR(rd, "stamp_filename", text="Filename")
+ col.itemR(rd, "stamp_marker", text="Marker")
col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
- col.itemR(rd, "stamp_note", text="Note")
- colsub = col.column()
- colsub.active = rd.stamp_note
- colsub.itemR(rd, "stamp_note_text", text="")
-
+
sub = split.column()
- sub.itemR(rd, "render_stamp")
- colsub = sub.column()
- colsub.active = rd.render_stamp
- colsub.itemR(rd, "stamp_foreground")
- colsub.itemR(rd, "stamp_background")
- colsub.itemR(rd, "stamp_font_size", text="Font Size")
+ sub.active = rd.render_stamp
+ sub.itemR(rd, "stamp_foreground", slider=True)
+ sub.itemR(rd, "stamp_background", slider=True)
+ sub.itemR(rd, "stamp_font_size", text="Font Size")
+
+ row = layout.split(percentage=0.2)
+ row.itemR(rd, "stamp_note", text="Note")
+ rowsub = row.row()
+ rowsub.active = rd.stamp_note
+ rowsub.itemR(rd, "stamp_note_text", text="")
bpy.types.register(RENDER_PT_render)
bpy.types.register(RENDER_PT_dimensions)
bpy.types.register(RENDER_PT_antialiasing)
+bpy.types.register(RENDER_PT_layers)
bpy.types.register(RENDER_PT_shading)
+bpy.types.register(RENDER_PT_post_processing)
+bpy.types.register(RENDER_PT_performance)
bpy.types.register(RENDER_PT_output)
-bpy.types.register(RENDER_PT_stamp) \ No newline at end of file
+bpy.types.register(RENDER_PT_encoding)
+bpy.types.register(RENDER_PT_stamp)
+
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py
index ccdbda5d54d..05c28073b8d 100644
--- a/release/ui/buttons_texture.py
+++ b/release/ui/buttons_texture.py
@@ -7,40 +7,209 @@ class TextureButtonsPanel(bpy.types.Panel):
__context__ = "texture"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture != None)
- except:return False
-
+ return (context.texture != None and context.texture.type != 'NONE')
+
class TEXTURE_PT_preview(TextureButtonsPanel):
__idname__= "TEXTURE_PT_preview"
__label__ = "Preview"
def draw(self, context):
layout = self.layout
-
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
+
layout.template_preview(tex)
-class TEXTURE_PT_texture(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_texture"
- __label__ = "Texture"
+class TEXTURE_PT_context_texture(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_context_texture"
+ __no_header__ = True
+
+ def poll(self, context):
+ return (context.material or context.world or context.lamp)
+
+ def draw(self, context):
+ layout = self.layout
+
+ tex = context.texture
+ ma = context.material
+ la = context.lamp
+ wo = context.world
+ space = context.space_data
+ slot = context.texture_slot
+
+ if ma or la or wo:
+ row = layout.row()
+ if ma:
+ row.template_list(ma, "textures", ma, "active_texture_index")
+ elif la:
+ row.template_list(la, "textures", la, "active_texture_index")
+ elif wo:
+ row.template_list(wo, "textures", wo, "active_texture_index")
+ """if ma or la or wo:
+ col = row.column(align=True)
+ col.itemO("TEXTURE_OT_new", icon="ICON_ZOOMIN", text="")
+ #col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+ """
+
+ split = layout.split(percentage=0.65)
+
+ if ma or la or wo:
+ if slot:
+ split.template_ID(slot, "texture", new="TEXTURE_OT_new")
+ else:
+ split.itemS()
+
+ elif tex:
+ split.template_ID(space, "pin_id")
+ split.itemS()
+
+ layout.itemS()
+
+ if tex:
+ split = layout.split(percentage=0.2)
+
+ col = split.column()
+ col.itemL(text="Type:")
+ col = split.column()
+ col.itemR(tex, "type", text="")
+
+class TEXTURE_PT_mapping(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_mapping"
+ __label__ = "Mapping"
+
+ def poll(self, context):
+ return (context.texture_slot and context.texture and context.texture.type != 'NONE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture_slot
+ textype = context.texture
+
+ split = layout.split(percentage=0.3)
+ col = split.column()
+ col.itemL(text="Coordinates:")
+ col = split.column()
+ col.itemR(tex, "texture_coordinates", text="")
+
+ if tex.texture_coordinates == 'UV':
+ row = layout.row()
+ row.itemR(tex, "uv_layer")
+ elif tex.texture_coordinates == 'OBJECT':
+ row = layout.row()
+ row.itemR(tex, "object")
+
+ if textype.type in ('IMAGE', 'ENVIRONMENT_MAP'):
+ split = layout.split(percentage=0.3)
+ col = split.column()
+ col.itemL(text="Projection:")
+ col = split.column()
+ col.itemR(tex, "mapping", text="")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(tex, "from_dupli")
+
+ col = split.column()
+ row = col.row()
+ row.itemR(tex, "x_mapping", text="")
+ row.itemR(tex, "y_mapping", text="")
+ row.itemR(tex, "z_mapping", text="")
+
+ row = layout.row()
+ row.column().itemR(tex, "offset")
+ row.column().itemR(tex, "size")
+
+class TEXTURE_PT_influence(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_influence"
+ __label__ = "Influence"
+
+ def poll(self, context):
+ return (context.texture_slot and context.texture and context.texture.type != 'NONE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
- layout.itemR(tex, "type")
+ textype = context.texture
+ tex = context.texture_slot
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(tex, "map_color", text="Diffuse Color")
+ colsub = col.column()
+ colsub.active = tex.map_color
+ colsub.itemR(tex, "color_factor", text="Opacity", slider=True)
+ colsub.itemR(tex, "blend_type")
+ col.itemR(tex, "rgb_to_intensity")
+ colsub = col.column()
+ colsub.active = tex.rgb_to_intensity
+ colsub.itemR(tex, "color")
+
+ col.itemR(tex, "map_colorspec")
+ col.itemR(tex, "map_normal")
+ colsub = col.column()
+ colsub.active = tex.map_normal
+ colsub.itemR(tex, "normal_factor", text="Amount", slider=True)
+ col.itemR(tex, "normal_map_space")
+ col.itemR(tex, "map_warp")
+ colsub = col.column()
+ colsub.active = tex.map_warp
+ colsub.itemR(tex, "warp_factor", text="Amount", slider=True)
+ col.itemR(tex, "map_displacement")
+ colsub = col.column()
+ colsub.active = tex.map_displacement
+ colsub.itemR(tex, "displacement_factor", text="Amount", slider=True)
+ col = split.column()
+ col.itemR(tex, "map_mirror")
+ col.itemR(tex, "map_reflection")
+ col.itemR(tex, "map_specularity")
+ col.itemR(tex, "map_ambient")
+ col.itemR(tex, "map_hardness")
+ col.itemR(tex, "map_raymir")
+ col.itemR(tex, "map_alpha")
+ col.itemR(tex, "map_emit")
+ col.itemR(tex, "map_translucency")
+
+ colsub = col.column()
+ colsub.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
+ colsub.itemR(tex, "default_value", text="Amount", slider=True)
+
+ row = layout.row()
+ row.itemR(tex, "stencil")
+ row.itemR(tex, "negate", text="Negative")
+
+class TEXTURE_PT_colors(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_colors"
+ __label__ = "Colors"
+ __default_closed__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ if tex.color_ramp:
+ layout.template_color_ramp(tex.color_ramp, expand=True)
+ else:
+ split = layout.split()
+ col = split.column()
+ col.itemR(tex, "rgb_factor", text="Multiply RGB")
+
+ col = split.column()
+ col.itemL(text="Adjust:")
+ col.itemR(tex, "brightness")
+ col.itemR(tex, "contrast")
class TEXTURE_PT_clouds(TextureButtonsPanel):
__idname__= "TEXTURE_PT_clouds"
__label__ = "Clouds"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'CLOUDS')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'CLOUDS')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "stype", expand=True)
layout.itemL(text="Noise:")
@@ -57,20 +226,24 @@ class TEXTURE_PT_wood(TextureButtonsPanel):
__label__ = "Wood"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'WOOD')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'WOOD')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
- layout.itemR(tex, "stype", expand=True)
layout.itemR(tex, "noisebasis2", expand=True)
- layout.itemL(text="Noise:")
- layout.itemR(tex, "noise_type", text="Type", expand=True)
- layout.itemR(tex, "noise_basis", text="Basis")
+ layout.itemR(tex, "stype", expand=True)
+
+ col = layout.column()
+ col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+ col.itemL(text="Noise:")
+ col.row().itemR(tex, "noise_type", text="Type", expand=True)
+ col.itemR(tex, "noise_basis", text="Basis")
col = layout.column_flow()
+ col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
col.itemR(tex, "noise_size", text="Size")
col.itemR(tex, "turbulence")
col.itemR(tex, "nabla")
@@ -80,12 +253,12 @@ class TEXTURE_PT_marble(TextureButtonsPanel):
__label__ = "Marble"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'MARBLE')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'MARBLE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "stype", expand=True)
layout.itemR(tex, "noisebasis2", expand=True)
@@ -104,12 +277,12 @@ class TEXTURE_PT_magic(TextureButtonsPanel):
__label__ = "Magic"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'MAGIC')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'MAGIC')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
row = layout.row()
row.itemR(tex, "noise_depth", text="Depth")
@@ -120,12 +293,12 @@ class TEXTURE_PT_blend(TextureButtonsPanel):
__label__ = "Blend"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'BLEND')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'BLEND')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "progression")
layout.itemR(tex, "flip_axis")
@@ -135,12 +308,12 @@ class TEXTURE_PT_stucci(TextureButtonsPanel):
__label__ = "Stucci"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'STUCCI')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'STUCCI')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "stype", expand=True)
layout.itemL(text="Noise:")
@@ -156,12 +329,12 @@ class TEXTURE_PT_image(TextureButtonsPanel):
__label__ = "Image/Movie"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'IMAGE')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'IMAGE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
split = layout.split()
@@ -178,17 +351,17 @@ class TEXTURE_PT_image(TextureButtonsPanel):
sub.itemR(tex, "calculate_alpha")
sub.itemR(tex, "invert_alpha")
-class TEXTURE_PT_mapping(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_mapping"
- __label__ = "Mapping"
+class TEXTURE_PT_crop(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_crop"
+ __label__ = "Crop"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'IMAGE')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'IMAGE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
split = layout.split()
@@ -226,12 +399,12 @@ class TEXTURE_PT_plugin(TextureButtonsPanel):
__label__ = "Plugin"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'PLUGIN')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'PLUGIN')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemL(text="Nothing yet")
@@ -240,12 +413,12 @@ class TEXTURE_PT_envmap(TextureButtonsPanel):
__label__ = "Environment Map"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'ENVIRONMENT_MAP')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'ENVIRONMENT_MAP')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemL(text="Nothing yet")
@@ -254,12 +427,12 @@ class TEXTURE_PT_musgrave(TextureButtonsPanel):
__label__ = "Musgrave"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'MUSGRAVE')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'MUSGRAVE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "musgrave_type")
@@ -289,13 +462,12 @@ class TEXTURE_PT_voronoi(TextureButtonsPanel):
__label__ = "Voronoi"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'VORONOI')
- except:return False
-
+ tex = context.texture
+ return (tex and tex.type == 'VORONOI')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "distance_metric")
layout.itemR(tex, "coloring")
@@ -321,12 +493,12 @@ class TEXTURE_PT_distortednoise(TextureButtonsPanel):
__label__ = "Distorted Noise"
def poll(self, context):
- try: return (context.active_object.active_material.active_texture.texture.type == 'DISTORTED_NOISE')
- except:return False
+ tex = context.texture
+ return (tex and tex.type == 'DISTORTED_NOISE')
def draw(self, context):
layout = self.layout
- tex = context.active_object.active_material.active_texture.texture
+ tex = context.texture
layout.itemR(tex, "noise_distortion")
layout.itemR(tex, "noise_basis", text="Basis")
@@ -334,14 +506,14 @@ class TEXTURE_PT_distortednoise(TextureButtonsPanel):
split = layout.split()
sub = split.column()
- sub.itemR(tex, "distortion_amount", text="Amount")
+ sub.itemR(tex, "distortion_amount", text="Distortion")
sub.itemR(tex, "noise_size", text="Size")
sub = split.column()
sub.itemR(tex, "nabla")
+bpy.types.register(TEXTURE_PT_context_texture)
bpy.types.register(TEXTURE_PT_preview)
-bpy.types.register(TEXTURE_PT_texture)
bpy.types.register(TEXTURE_PT_clouds)
bpy.types.register(TEXTURE_PT_wood)
bpy.types.register(TEXTURE_PT_marble)
@@ -349,10 +521,13 @@ bpy.types.register(TEXTURE_PT_magic)
bpy.types.register(TEXTURE_PT_blend)
bpy.types.register(TEXTURE_PT_stucci)
bpy.types.register(TEXTURE_PT_image)
-bpy.types.register(TEXTURE_PT_mapping)
+bpy.types.register(TEXTURE_PT_crop)
bpy.types.register(TEXTURE_PT_plugin)
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_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 8298c0c9b13..e8b2656dea1 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -12,39 +12,42 @@ class WorldButtonsPanel(bpy.types.Panel):
class WORLD_PT_preview(WorldButtonsPanel):
__label__ = "Preview"
- def poll(self, context):
- return (context.scene or context.world)
-
def draw(self, context):
layout = self.layout
-
world = context.world
+
layout.template_preview(world)
-class WORLD_PT_world(WorldButtonsPanel):
- __label__ = "World"
+class WORLD_PT_context_world(WorldButtonsPanel):
+ __no_header__ = True
def poll(self, context):
- return (context.scene or context.world)
+ return (context.scene != None)
def draw(self, context):
+ layout = self.layout
+
scene = context.scene
world = context.world
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
if scene:
- split.template_ID(context, scene, "world", new="WORLD_OT_new")
+ split.template_ID(scene, "world", new="WORLD_OT_new")
elif world:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
+
+class WORLD_PT_world(WorldButtonsPanel):
+ __label__ = "World"
+
+ def draw(self, context):
+ layout = self.layout
- split.itemS()
+ world = context.world
if world:
- layout.itemS()
-
+
row = layout.row()
row.itemR(world, "blend_sky")
row.itemR(world, "paper_sky")
@@ -61,8 +64,8 @@ class WORLD_PT_color_correction(WorldButtonsPanel):
__label__ = "Color Correction"
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
row = layout.row()
row.itemR(world, "exposure")
@@ -72,14 +75,15 @@ class WORLD_PT_mist(WorldButtonsPanel):
__label__ = "Mist"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.mist, "enabled", text="")
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
+
layout.active = world.mist.enabled
flow = layout.column_flow()
@@ -95,14 +99,15 @@ class WORLD_PT_stars(WorldButtonsPanel):
__label__ = "Stars"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.stars, "enabled", text="")
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
+
layout.active = world.stars.enabled
flow = layout.column_flow()
@@ -115,24 +120,26 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
__label__ = "Ambient Occlusion"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.ambient_occlusion, "enabled", text="")
def draw(self, context):
- world = context.world
- ao = world.ambient_occlusion
layout = self.layout
+ ao = context.world.ambient_occlusion
+
layout.active = ao.enabled
layout.itemR(ao, "gather_method", expand=True)
if ao.gather_method == 'RAYTRACE':
split = layout.split()
+
col = split.column()
col.itemR(ao, "samples")
col.itemR(ao, "distance")
+
col = split.column()
col.itemR(ao, "falloff")
colsub = col.column()
@@ -151,10 +158,12 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
if ao.gather_method == 'APPROXIMATE':
split = layout.split()
+
col = split.column()
col.itemR(ao, "passes")
col.itemR(ao, "error_tolerance", text="Error")
col.itemR(ao, "correction")
+
col = split.column()
col.itemR(ao, "falloff")
colsub = col.column()
@@ -166,7 +175,8 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
col.row().itemR(ao, "blend_mode", expand=True)
col.row().itemR(ao, "color", expand=True)
col.itemR(ao, "energy")
-
+
+bpy.types.register(WORLD_PT_context_world)
bpy.types.register(WORLD_PT_preview)
bpy.types.register(WORLD_PT_world)
bpy.types.register(WORLD_PT_ambient_occlusion)
diff --git a/release/ui/space_outliner.py b/release/ui/space_outliner.py
index f039eb3f7c3..5a6ee5ea2aa 100644
--- a/release/ui/space_outliner.py
+++ b/release/ui/space_outliner.py
@@ -10,11 +10,11 @@ class OUTLINER_HT_header(bpy.types.Header):
sce = context.scene
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
row = layout.row(align=True)
- row.itemM(context, "OUTLINER_MT_view")
+ row.itemM("OUTLINER_MT_view")
row = layout.row()
row.itemR(so, "display_mode", text="")
diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py
index c4521bfc140..702c2ff20f2 100644
--- a/release/ui/space_sequencer.py
+++ b/release/ui/space_sequencer.py
@@ -15,21 +15,21 @@ class SEQUENCER_HT_header(bpy.types.Header):
st = context.space_data
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
- row = layout.row(align=True)
- row.itemM(context, "SEQUENCER_MT_view")
+ row = layout.row()
+ row.itemM("SEQUENCER_MT_view")
row.itemR(st, "display_mode")
layout.itemS()
if st.display_mode == 'SEQUENCER':
- row.itemM(context, "SEQUENCER_MT_select")
- row.itemM(context, "SEQUENCER_MT_marker")
- row.itemM(context, "SEQUENCER_MT_add")
- row.itemM(context, "SEQUENCER_MT_strip")
+ row.itemM("SEQUENCER_MT_select")
+ row.itemM("SEQUENCER_MT_marker")
+ row.itemM("SEQUENCER_MT_add")
+ row.itemM("SEQUENCER_MT_strip")
layout.itemS()
row.itemO("SEQUENCER_OT_reload")
else:
@@ -90,6 +90,10 @@ class SEQUENCER_MT_view(bpy.types.Menu):
"""
layout.itemR(st, "draw_frames")
+ if st.display_mode == 'IMAGE':
+ layout.itemR(st, "draw_safe_margin")
+ if st.display_mode == 'WAVEFORM':
+ layout.itemR(st, "seperate_color_preview")
"""
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,0, "");
@@ -115,7 +119,7 @@ class SEQUENCER_MT_select(bpy.types.Menu):
layout.itemS()
layout.itemO("SEQUENCER_OT_select_linked")
layout.itemO("SEQUENCER_OT_select_all_toggle")
- layout.itemO("SEQUENCER_OT_select_invert")
+ layout.itemO("SEQUENCER_OT_select_inverse")
class SEQUENCER_MT_marker(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
@@ -144,13 +148,14 @@ class SEQUENCER_MT_add(bpy.types.Menu):
st = context.space_data
layout.column()
+ layout.itemO("SEQUENCER_OT_scene_strip_add", text="Scene")
layout.itemO("SEQUENCER_OT_movie_strip_add", text="Movie")
layout.item_booleanO("SEQUENCER_OT_movie_strip_add", "sound", True, text="Movie & Sound") # FFMPEG ONLY
layout.itemO("SEQUENCER_OT_image_strip_add", text="Image")
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Sound (Ram)")
layout.item_booleanO("SEQUENCER_OT_sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
- layout.itemM(context, "SEQUENCER_MT_add_effect")
+ layout.itemM("SEQUENCER_MT_add_effect")
class SEQUENCER_MT_add_effect(bpy.types.Menu):
@@ -197,7 +202,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
layout.itemO("SEQUENCER_OT_images_separate")
layout.itemS()
- layout.itemO("SEQUENCER_OT_duplicate_add")
+ layout.itemO("SEQUENCER_OT_duplicate")
layout.itemO("SEQUENCER_OT_delete")
strip = act_strip(context)
@@ -237,7 +242,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
layout.itemO("SEQUENCER_OT_mute")
layout.itemO("SEQUENCER_OT_unmute")
- layout.item_enumO("SEQUENCER_OT_mute", property="type", value='UNSELECTED', text="Mute Deselected Strips")
+ layout.item_booleanO("SEQUENCER_OT_mute", "unselected", 1, text="Mute Deselected Strips")
layout.itemO("SEQUENCER_OT_snap")
@@ -285,6 +290,15 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
col.itemR(strip, "start_frame")
col.itemR(strip, "length")
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(strip, "start_offset")
+ col.itemR(strip, "start_still")
+
+ col = split.column()
+ col.itemR(strip, "end_offset")
+ col.itemR(strip, "end_still")
class SEQUENCER_PT_effect(SequencerButtonsPanel):
__label__ = "Effect Strip"
@@ -414,16 +428,26 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
if elem:
sub.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
- """
+ layout.itemR(strip, "use_translation")
+ if strip.transform:
+ flow = layout.column_flow()
+ flow.active = strip.use_translation
+ flow.itemR(strip.transform, "offset_x")
+ flow.itemR(strip.transform, "offset_y")
+
+
layout.itemR(strip, "use_crop")
+ if strip.crop:
+ flow = layout.column_flow()
+ flow.active = strip.use_crop
+ flow.itemR(strip.crop, "top")
+ flow.itemR(strip.crop, "left")
+ flow.itemR(strip.crop, "bottom")
+ flow.itemR(strip.crop, "right")
+
+ layout.itemR(strip, "animation_start_offset")
+ layout.itemR(strip, "animation_end_offset")
- flow = layout.column_flow()
- flow.active = strip.use_crop
- flow.itemR(strip, "top")
- flow.itemR(strip, "left")
- flow.itemR(strip, "bottom")
- flow.itemR(strip, "right")
- """
class SEQUENCER_PT_filter(SequencerButtonsPanel):
__label__ = "Filter"
@@ -460,6 +484,19 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
col.itemR(strip, "reverse_frames", text="Backwards")
layout.itemR(strip, "use_color_balance")
+ if strip.color_balance: # TODO - need to add this somehow
+ row = layout.row()
+ row.active = strip.use_color_balance
+ col = row.column()
+ col.itemR(strip.color_balance, "lift")
+ col.itemR(strip.color_balance, "inverse_lift")
+ col = row.column()
+ col.itemR(strip.color_balance, "gamma")
+ col.itemR(strip.color_balance, "inverse_gamma")
+ col = row.column()
+ col.itemR(strip.color_balance, "gain")
+ col.itemR(strip.color_balance, "inverse_gain")
+
class SEQUENCER_PT_proxy(SequencerButtonsPanel):
__label__ = "Proxy"
@@ -487,11 +524,11 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel):
layout = self.layout
- row = layout.row()
- row.itemR(strip, "proxy_custom_directory")
+ flow = layout.column_flow()
+ flow.itemR(strip, "proxy_custom_directory")
if strip.proxy: # TODO - need to add this somehow
- row.itemR(strip.proxy, "dir")
- row.itemR(strip.proxy, "file")
+ flow.itemR(strip.proxy, "directory")
+ flow.itemR(strip.proxy, "file")
class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
diff --git a/release/ui/space_text.py b/release/ui/space_text.py
index 5c6c5c0d21b..c6ce1cb71d6 100644
--- a/release/ui/space_text.py
+++ b/release/ui/space_text.py
@@ -1,14 +1,6 @@
import bpy
-# temporary
-ICON_LINENUMBERS_OFF = 588
-ICON_WORDWRAP_OFF = 584
-ICON_SYNTAX_OFF = 586
-ICON_TEXT = 120
-ICON_HELP = 1
-ICON_SCRIPTPLUGINS = 1
-
class TEXT_HT_header(bpy.types.Header):
__space_type__ = "TEXT_EDITOR"
__idname__ = "TEXT_HT_header"
@@ -18,27 +10,26 @@ class TEXT_HT_header(bpy.types.Header):
text = st.text
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
- row = layout.row(align=True)
- row.itemM(context, "TEXT_MT_text")
+ row = layout.row()
+ row.itemM("TEXT_MT_text")
if text:
- row.itemM(context, "TEXT_MT_edit")
- row.itemM(context, "TEXT_MT_format")
+ row.itemM("TEXT_MT_edit")
+ row.itemM("TEXT_MT_format")
if text and text.modified:
row = layout.row()
# row.color(redalert)
- row.itemO("TEXT_OT_resolve_conflict", text="", icon=ICON_HELP)
+ row.itemO("TEXT_OT_resolve_conflict", text="", icon='ICON_HELP')
row = layout.row(align=True)
- row.itemR(st, "line_numbers", text="", icon=ICON_LINENUMBERS_OFF)
- row.itemR(st, "word_wrap", text="", icon=ICON_WORDWRAP_OFF)
- row.itemR(st, "syntax_highlight", text="", icon=ICON_SYNTAX_OFF)
- # row.itemR(st, "do_python_plugins", text="", icon=ICON_SCRIPTPLUGINS)
+ row.itemR(st, "line_numbers", text="")
+ row.itemR(st, "word_wrap", text="")
+ row.itemR(st, "syntax_highlight", text="")
- layout.template_ID(context, st, "text", new="TEXT_OT_new", open="TEXT_OT_open", unlink="TEXT_OT_unlink")
+ layout.template_ID(st, "text", new="TEXT_OT_new", unlink="TEXT_OT_unlink")
if text:
row = layout.row()
@@ -63,9 +54,10 @@ class TEXT_PT_properties(bpy.types.Panel):
layout = self.layout
flow = layout.column_flow()
- flow.itemR(st, "line_numbers", icon=ICON_LINENUMBERS_OFF)
- flow.itemR(st, "word_wrap", icon=ICON_WORDWRAP_OFF)
- flow.itemR(st, "syntax_highlight", icon=ICON_SYNTAX_OFF)
+ flow.itemR(st, "line_numbers")
+ flow.itemR(st, "word_wrap")
+ flow.itemR(st, "syntax_highlight")
+ flow.itemR(st, "live_edit")
flow = layout.column_flow()
flow.itemR(st, "font_size")
@@ -84,14 +76,14 @@ class TEXT_PT_find(bpy.types.Panel):
col = layout.column(align=True)
row = col.row()
row.itemR(st, "find_text", text="")
- row.itemO("TEXT_OT_find_set_selected", text="", icon=ICON_TEXT)
+ row.itemO("TEXT_OT_find_set_selected", text="", icon='ICON_TEXT')
col.itemO("TEXT_OT_find")
# replace
col = layout.column(align=True)
row = col.row()
row.itemR(st, "replace_text", text="")
- row.itemO("TEXT_OT_replace_set_selected", text="", icon=ICON_TEXT)
+ row.itemO("TEXT_OT_replace_set_selected", text="", icon='ICON_TEXT')
col.itemO("TEXT_OT_replace")
# mark
@@ -139,8 +131,482 @@ class TEXT_MT_text(bpy.types.Menu):
# XXX uiDefIconTextBlockBut(block, text_plugin_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Text Plugins", 0, yco-=20, 120, 19, "");
#endif
+class TEXT_MT_edit_view(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "View"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.item_enumO("TEXT_OT_move", "type", "FILE_TOP", text="Top of File")
+ layout.item_enumO("TEXT_OT_move", "type", "FILE_BOTTOM", text="Bottom of File")
+
+class TEXT_MT_edit_select(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Select"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("TEXT_OT_select_all")
+ layout.itemO("TEXT_OT_select_line")
+
+class TEXT_MT_edit_markers(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Markers"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("TEXT_OT_markers_clear")
+ layout.itemO("TEXT_OT_next_marker")
+ layout.itemO("TEXT_OT_previous_marker")
+
+class TEXT_MT_format(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Format"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("TEXT_OT_indent")
+ layout.itemO("TEXT_OT_unindent")
+
+ layout.itemS()
+
+ layout.itemO("TEXT_OT_comment")
+ layout.itemO("TEXT_OT_uncomment")
+
+ layout.itemS()
+
+ layout.item_menu_enumO("TEXT_OT_convert_whitespace", "type")
+
+class TEXT_MT_edit_to3d(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Text To 3D Object"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.item_booleanO("TEXT_OT_to_3d_object", "split_lines", False, text="One Object");
+ layout.item_booleanO("TEXT_OT_to_3d_object", "split_lines", True, text="One Object Per Line");
+
+class TEXT_MT_edit(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Edit"
+
+ def poll(self, context):
+ st = context.space_data
+ return st.text != None
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("ED_OT_undo")
+ layout.itemO("ED_OT_redo")
+
+ layout.itemS()
+
+ layout.itemO("TEXT_OT_cut")
+ layout.itemO("TEXT_OT_copy")
+ layout.itemO("TEXT_OT_paste")
+
+ layout.itemS()
+
+ layout.itemM("TEXT_MT_edit_view")
+ layout.itemM("TEXT_MT_edit_select")
+ layout.itemM("TEXT_MT_edit_markers")
+
+ layout.itemS()
+
+ layout.itemO("TEXT_OT_jump")
+ layout.itemO("TEXT_OT_properties")
+
+ layout.itemS()
+
+ layout.itemM("TEXT_MT_edit_to3d")
+
+
+def get_console(text):
+ '''
+ helper function for console operators
+ currently each text datablock gets its own console - code.InteractiveConsole()
+ ...which is stored in this function.
+ '''
+ import sys, code, io
+
+ try: consoles = get_console.consoles
+ except:consoles = get_console.consoles = {}
+
+ # clear all dead consoles, use text names as IDs
+ for id in list(consoles.keys()):
+ if id not in bpy.data.texts:
+ del consoles[id]
+
+ if not text:
+ return None, None, None
+
+ id = text.name
+
+ try:
+ namespace, console, stdout = consoles[id]
+ except:
+ namespace = locals()
+ namespace['bpy'] = bpy
+
+ console = code.InteractiveConsole(namespace)
+
+ if sys.version.startswith('2'): stdout = io.BytesIO() # Py2x support
+ else: stdout = io.StringIO()
+
+ consoles[id]= namespace, console, stdout
+
+ return namespace, console, stdout
+
+class TEXT_OT_console_exec(bpy.types.Operator):
+ '''
+ Operator documentatuon text, will be used for the operator tooltip and python docs.
+ '''
+ __label__ = "Console Execute"
+
+ # Each text block gets its own console info.
+ console = {}
+
+ # Both prompts must be the same length
+ PROMPT = '>>> '
+ PROMPT_MULTI = '... '
+
+ def execute(self, context):
+ import sys
+
+ st = context.space_data
+ text = st.text
+
+ if not text:
+ return ('CANCELLED',)
+
+ namespace, console, stdout = get_console(text)
+
+ line = text.current_line.line
+
+ # redirect output
+ sys.stdout = stdout
+ sys.stderr = stdout
+
+ # run the console
+ if not line.strip():
+ line = '\n' # executes a multiline statement
+
+ if line.startswith(self.PROMPT_MULTI) or line.startswith(self.PROMPT):
+ line = line[len(self.PROMPT):]
+ was_prefix = True
+ else:
+ was_prefix = False
+
+
+ is_multiline = console.push(line)
+
+ stdout.seek(0)
+ output = stdout.read()
+
+ # cleanup
+ sys.stdout = sys.__stdout__
+ sys.stderr = sys.__stderr__
+ sys.last_traceback = None
+
+ # So we can reuse, clear all data
+ stdout.truncate(0)
+
+ if is_multiline:
+ prefix = self.PROMPT_MULTI
+ else:
+ prefix = self.PROMPT
+
+ # Kindof odd, add the prefix if we didnt have one. makes it easier to re-read.
+ if not was_prefix:
+ bpy.ops.TEXT_OT_move(type='LINE_BEGIN')
+ bpy.ops.TEXT_OT_insert(text = prefix)
+
+ bpy.ops.TEXT_OT_move(type='LINE_END')
+
+ # Insert the output into the editor
+ bpy.ops.TEXT_OT_insert(text= '\n' + output + prefix)
+
+ return ('FINISHED',)
+
+
+def autocomp(bcon):
+ '''
+ This function has been taken from a BGE console autocomp I wrote a while ago
+ the dictionaty bcon is not needed but it means I can copy and paste from the old func
+ which works ok for now.
+
+ could be moved into its own module.
+ '''
+
+
+ def is_delimiter(ch):
+ '''
+ For skipping words
+ '''
+ if ch == '_':
+ return False
+ if ch.isalnum():
+ return False
+
+ return True
+
+ def is_delimiter_autocomp(ch):
+ '''
+ When autocompleteing will earch back and
+ '''
+ if ch in '._[] "\'':
+ return False
+ if ch.isalnum():
+ return False
+
+ return True
+
+
+ def do_autocomp(autocomp_prefix, autocomp_members):
+ '''
+ return text to insert and a list of options
+ '''
+ autocomp_members = [v for v in autocomp_members if v.startswith(autocomp_prefix)]
+
+ print("AUTO: '%s'" % autocomp_prefix)
+ print("MEMBERS: '%s'" % str(autocomp_members))
+
+ if not autocomp_prefix:
+ return '', autocomp_members
+ elif len(autocomp_members) > 1:
+ # find a common string between all members after the prefix
+ # 'ge' [getA, getB, getC] --> 'get'
+
+ # get the shortest member
+ min_len = min([len(v) for v in autocomp_members])
+
+ autocomp_prefix_ret = ''
+
+ for i in range(len(autocomp_prefix), min_len):
+ char_soup = set()
+ for v in autocomp_members:
+ char_soup.add(v[i])
+
+ if len(char_soup) > 1:
+ break
+ else:
+ autocomp_prefix_ret += char_soup.pop()
+
+ print(autocomp_prefix_ret)
+ return autocomp_prefix_ret, autocomp_members
+ elif len(autocomp_members) == 1:
+ return autocomp_members[0][len(autocomp_prefix):], []
+ else:
+ return '', []
+
+
+ def BCon_PrevChar(bcon):
+ cursor = bcon['cursor']-1
+ if cursor<0:
+ return None
+
+ try:
+ return bcon['edit_text'][cursor]
+ except:
+ return None
+
+
+ def BCon_NextChar(bcon):
+ try:
+ return bcon['edit_text'][bcon['cursor']]
+ except:
+ return None
+
+ def BCon_cursorLeft(bcon):
+ bcon['cursor'] -= 1
+ if bcon['cursor'] < 0:
+ bcon['cursor'] = 0
+
+ def BCon_cursorRight(bcon):
+ bcon['cursor'] += 1
+ if bcon['cursor'] > len(bcon['edit_text']):
+ bcon['cursor'] = len(bcon['edit_text'])
+
+ def BCon_AddScrollback(bcon, text):
+
+ bcon['scrollback'] = bcon['scrollback'] + text
+
+
+ def BCon_cursorInsertChar(bcon, ch):
+ if bcon['cursor']==0:
+ bcon['edit_text'] = ch + bcon['edit_text']
+ elif bcon['cursor']==len(bcon['edit_text']):
+ bcon['edit_text'] = bcon['edit_text'] + ch
+ else:
+ bcon['edit_text'] = bcon['edit_text'][:bcon['cursor']] + ch + bcon['edit_text'][bcon['cursor']:]
+
+ bcon['cursor']
+ if bcon['cursor'] > len(bcon['edit_text']):
+ bcon['cursor'] = len(bcon['edit_text'])
+ BCon_cursorRight(bcon)
+
+
+ TEMP_NAME = '___tempname___'
+
+ cursor_orig = bcon['cursor']
+
+ ch = BCon_PrevChar(bcon)
+ while ch != None and (not is_delimiter(ch)):
+ ch = BCon_PrevChar(bcon)
+ BCon_cursorLeft(bcon)
+
+ if ch != None:
+ BCon_cursorRight(bcon)
+
+ #print (cursor_orig, bcon['cursor'])
+
+ cursor_base = bcon['cursor']
+
+ autocomp_prefix = bcon['edit_text'][cursor_base:cursor_orig]
+
+ print("PREFIX:'%s'" % autocomp_prefix)
+
+ # Get the previous word
+ if BCon_PrevChar(bcon)=='.':
+ BCon_cursorLeft(bcon)
+ ch = BCon_PrevChar(bcon)
+ while ch != None and is_delimiter_autocomp(ch)==False:
+ ch = BCon_PrevChar(bcon)
+ BCon_cursorLeft(bcon)
+
+ cursor_new = bcon['cursor']
+
+ if ch != None:
+ cursor_new+=1
+
+ pytxt = bcon['edit_text'][cursor_new:cursor_base-1].strip()
+ print("AUTOCOMP EVAL: '%s'" % pytxt)
+ #try:
+ if pytxt:
+ bcon['console'].runsource(TEMP_NAME + '=' + pytxt, '<input>', 'single')
+ # print val
+ else: ##except:
+ val = None
+
+ try:
+ val = bcon['namespace'][TEMP_NAME]
+ del bcon['namespace'][TEMP_NAME]
+ except:
+ val = None
+
+ if val:
+ autocomp_members = dir(val)
+
+ autocomp_prefix_ret, autocomp_members = do_autocomp(autocomp_prefix, autocomp_members)
+
+ bcon['cursor'] = cursor_orig
+ for v in autocomp_prefix_ret:
+ BCon_cursorInsertChar(bcon, v)
+ cursor_orig = bcon['cursor']
+
+ if autocomp_members:
+ BCon_AddScrollback(bcon, ', '.join(autocomp_members))
+
+ del val
+
+ else:
+ # Autocomp global namespace
+ autocomp_members = bcon['namespace'].keys()
+
+ if autocomp_prefix:
+ autocomp_members = [v for v in autocomp_members if v.startswith(autocomp_prefix)]
+
+ autocomp_prefix_ret, autocomp_members = do_autocomp(autocomp_prefix, autocomp_members)
+
+ bcon['cursor'] = cursor_orig
+ for v in autocomp_prefix_ret:
+ BCon_cursorInsertChar(bcon, v)
+ cursor_orig = bcon['cursor']
+
+ if autocomp_members:
+ BCon_AddScrollback(bcon, ', '.join(autocomp_members))
+
+ bcon['cursor'] = cursor_orig
+
+
+class TEXT_OT_console_autocomplete(bpy.types.Operator):
+ '''
+ Operator documentatuon text, will be used for the operator tooltip and python docs.
+ '''
+ __label__ = "Console Autocomplete"
+
+ def execute(self, context):
+
+ st = context.space_data
+ text = st.text
+
+ namespace, console, stdout = get_console(text)
+
+ line = text.current_line.line
+
+ if not console:
+ return ('CANCELLED',)
+
+
+ # fake cursor, use for autocomp func.
+ bcon = {}
+ bcon['cursor'] = text.current_character
+ bcon['console'] = console
+ bcon['edit_text'] = line
+ bcon['namespace'] = namespace
+ bcon['scrollback'] = '' # nor from the BGE console
+
+
+ # This function isnt aware of the text editor or being an operator
+ # just does the autocomp then copy its results back
+ autocomp(bcon)
+
+ # Now we need to copy back the line from blender back into the text editor.
+ # This will change when we dont use the text editor anymore
+
+ # clear the line
+ bpy.ops.TEXT_OT_move(type='LINE_END')
+ bpy.ops.TEXT_OT_move_select(type = 'LINE_BEGIN')
+ bpy.ops.TEXT_OT_delete(type = 'PREVIOUS_CHARACTER')
+
+ if bcon['scrollback']:
+ bpy.ops.TEXT_OT_move_select(type = 'LINE_BEGIN')
+ bpy.ops.TEXT_OT_insert(text = bcon['scrollback'].strip() + '\n')
+ bpy.ops.TEXT_OT_move_select(type='LINE_BEGIN')
+
+ bpy.ops.TEXT_OT_insert(text = bcon['edit_text'])
+
+ # Read only
+ if 0:
+ text.current_character = bcon['cursor']
+ else:
+ bpy.ops.TEXT_OT_move(type = 'LINE_BEGIN')
+
+ for i in range(bcon['cursor']):
+ bpy.ops.TEXT_OT_move(type='NEXT_CHARACTER')
+
+
+ return ('FINISHED',)
+
+
+
bpy.types.register(TEXT_HT_header)
bpy.types.register(TEXT_PT_properties)
bpy.types.register(TEXT_PT_find)
bpy.types.register(TEXT_MT_text)
+bpy.types.register(TEXT_MT_format)
+bpy.types.register(TEXT_MT_edit)
+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)
+
+bpy.ops.add(TEXT_OT_console_exec)
+bpy.ops.add(TEXT_OT_console_autocomplete)
diff --git a/source/Makefile b/source/Makefile
index 535a86e9139..de0b144ed71 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -83,7 +83,6 @@ GRPLIB += $(NAN_SOUNDSYSTEM)/lib/$(DEBUG_DIR)libSoundSystem.a
GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
-GRPLIB += $(OCGDIR)/blender/radiosity/$(DEBUG_DIR)libradiosity.a
# nlin: the reason that some libraries appear more than once below is
# to handle circular dependencies in linking among libraries... some
@@ -115,25 +114,16 @@ ifneq ($(NAN_NO_KETSJI),true)
COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
- COMLIB += $(NAN_SOLID)/lib/libsolid.a
- COMLIB += $(NAN_SOLID)/lib/libsolid_broad.a
- COMLIB += $(NAN_SOLID)/lib/libsolid_complex.a
- COMLIB += $(NAN_SOLID)/lib/libsolid_convex.a
- COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
COMLIB += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a
COMLIB += $(NAN_QHULL)/lib/libqhull.a
COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
-# COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
-# COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
-# COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
-# COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
@@ -143,8 +133,6 @@ ifneq ($(NAN_NO_KETSJI),true)
COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
-# COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
-# COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
COMLIB += $(NAN_MOTO)/lib/libmoto.a
COMLIB += $(NAN_SND_LIBS)
COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
@@ -162,6 +150,7 @@ COMLIB += $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a
COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
COMLIB += $(NAN_PNG)/lib/libpng.a
+COMLIB += $(OCGDIR)/blender/gen_python/$(DEBUG_DIR)libgen_python.a
ifeq ($(WITH_QUICKTIME), true)
COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
@@ -226,12 +215,13 @@ PULIB += $(OCGDIR)/blender/ed_action/$(DEBUG_DIR)libed_action.a
PULIB += $(OCGDIR)/blender/ed_nla/$(DEBUG_DIR)libed_nla.a
PULIB += $(OCGDIR)/blender/ed_script/$(DEBUG_DIR)libed_script.a
PULIB += $(OCGDIR)/blender/ed_text/$(DEBUG_DIR)libed_text.a
+PULIB += $(OCGDIR)/blender/ed_logic/$(DEBUG_DIR)libed_logic.a
PULIB += $(OCGDIR)/blender/ed_sequencer/$(DEBUG_DIR)libed_sequencer.a
PULIB += $(OCGDIR)/blender/ed_file/$(DEBUG_DIR)libed_file.a
PULIB += $(OCGDIR)/blender/ed_info/$(DEBUG_DIR)libed_info.a
PULIB += $(OCGDIR)/blender/ed_buttons/$(DEBUG_DIR)libed_buttons.a
-PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
+PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
PULIB += $(OCGDIR)/blender/ed_preview/$(DEBUG_DIR)libed_preview.a
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index a53b15673e2..a9e3d50211f 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -37,7 +37,6 @@ ADD_SUBDIRECTORY(imbuf/intern/cineon)
ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna)
-ADD_SUBDIRECTORY(radiosity)
ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont)
diff --git a/source/blender/Makefile b/source/blender/Makefile
index 64eb1a2614b..31636f838c3 100644
--- a/source/blender/Makefile
+++ b/source/blender/Makefile
@@ -31,7 +31,7 @@
include nan_definitions.mk
DIRS = windowmanager editors blenloader readblenfile
-DIRS += avi imbuf render radiosity blenlib blenkernel blenpluginapi
+DIRS += avi imbuf render blenlib blenkernel blenpluginapi
DIRS += makesdna makesrna
DIRS += python nodes gpu
DIRS += blenfont
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 856d6284f44..cce0354643b 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -14,7 +14,6 @@ SConscript(['avi/SConscript',
'imbuf/intern/cineon/SConscript',
'makesdna/SConscript',
'makesrna/SConscript',
- 'radiosity/SConscript',
'readblenfile/SConscript',
'render/SConscript',
'nodes/SConscript',
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index b5a61f2727f..b77f4a8fcd1 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -70,6 +70,13 @@ void BLF_boundbox(char *str, struct rctf *box);
float BLF_width(char *str);
float BLF_height(char *str);
+
+/*
+ * For fixed width fonts only, returns the width of a
+ * character.
+ */
+float BLF_fixed_width(void);
+
/*
* and this two function return the width and height
* of the string, using the default font and both value
@@ -79,6 +86,11 @@ float BLF_width_default(char *str);
float BLF_height_default(char *str);
/*
+ * set rotation for default font
+ */
+void BLF_default_rotation(float angle);
+
+/*
* By default, rotation and clipping are disable and
* have to be enable/disable using BLF_enable/disable.
*/
@@ -86,11 +98,25 @@ void BLF_rotation(float angle);
void BLF_clipping(float xmin, float ymin, float xmax, float ymax);
void BLF_blur(int size);
-
void BLF_enable(int option);
void BLF_disable(int option);
/*
+ * Shadow options, level is the blur level, can be 3, 5 or 0 and
+ * the other argument are the rgba color.
+ * Take care that shadow need to be enable using BLF_enable!!.
+ */
+void BLF_shadow(int level, float r, float g, float b, float a);
+
+/*
+ * Set the offset for shadow text, this is the current cursor
+ * position plus this offset, don't need call BLF_position before
+ * this function, the current position is calculate only on
+ * BLF_draw, so it's safe call this whenever you like.
+ */
+void BLF_shadow_offset(int x, int y);
+
+/*
* Search the path directory to the locale files, this try all
* the case for Linux, Win and Mac.
*/
@@ -117,6 +143,8 @@ void BLF_dir_free(char **dirs, int count);
/* font->flags. */
#define BLF_ROTATION (1<<0)
#define BLF_CLIPPING (1<<1)
+#define BLF_SHADOW (1<<2)
+#define BLF_KERNING_DEFAULT (1<<3)
/* font->mode. */
#define BLF_MODE_TEXTURE 0
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 14bc6a33b72..cd7f969d5e5 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -321,6 +321,19 @@ void BLF_draw_default(float x, float y, float z, char *str)
}
}
+void BLF_default_rotation(float angle)
+{
+
+ if (global_font_default>=0) {
+ global_font[global_font_default]->angle= angle;
+ if(angle)
+ global_font[global_font_default]->flags |= BLF_ROTATION;
+ else
+ global_font[global_font_default]->flags &= ~BLF_ROTATION;
+ }
+}
+
+
void BLF_draw(char *str)
{
FontBLF *font;
@@ -385,6 +398,16 @@ float BLF_width(char *str)
return(0.0f);
}
+float BLF_fixed_width(void)
+{
+ FontBLF *font;
+
+ font= global_font[global_font_cur];
+ if (font)
+ return(blf_font_fixed_width(font));
+ return(0.0f);
+}
+
float BLF_width_default(char *str)
{
FontBLF *font;
@@ -491,3 +514,28 @@ void BLF_mode(int mode)
if (font)
font->mode= mode;
}
+
+void BLF_shadow(int level, float r, float g, float b, float a)
+{
+ FontBLF *font;
+
+ font= global_font[global_font_cur];
+ if (font) {
+ font->shadow= level;
+ font->shadow_col[0]= r;
+ font->shadow_col[1]= g;
+ font->shadow_col[2]= b;
+ font->shadow_col[3]= a;
+ }
+}
+
+void BLF_shadow_offset(int x, int y)
+{
+ FontBLF *font;
+
+ font= global_font[global_font_cur];
+ if (font) {
+ font->shadow_x= x;
+ font->shadow_y= y;
+ }
+}
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 1a96dbc13bc..6fc35a96e1e 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <math.h>
#include <ft2build.h>
@@ -101,7 +102,7 @@ void blf_font_draw(FontBLF *font, char *str)
FT_Vector delta;
FT_UInt glyph_index, g_prev_index;
int pen_x, pen_y;
- int i, has_kerning;
+ int i, has_kerning, st;
if (!font->glyph_cache)
return;
@@ -142,8 +143,13 @@ void blf_font_draw(FontBLF *font, char *str)
delta.x= 0;
delta.y= 0;
- FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta);
- pen_x += delta.x >> 6;
+ if (font->flags & BLF_KERNING_DEFAULT)
+ st= FT_Get_Kerning(font->face, g_prev_index, glyph_index, ft_kerning_default, &delta);
+ else
+ st= FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta);
+
+ if (st == 0)
+ pen_x += delta.x >> 6;
}
/* do not return this loop if clipped, we want every character tested */
@@ -163,7 +169,7 @@ void blf_font_boundbox(FontBLF *font, char *str, rctf *box)
FT_UInt glyph_index, g_prev_index;
rctf gbox;
int pen_x, pen_y;
- int i, has_kerning;
+ int i, has_kerning, st;
if (!font->glyph_cache)
return;
@@ -209,8 +215,13 @@ void blf_font_boundbox(FontBLF *font, char *str, rctf *box)
delta.x= 0;
delta.y= 0;
- FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta);
- pen_x += delta.x >> 6;
+ if (font->flags & BLF_KERNING_DEFAULT)
+ st= FT_Get_Kerning(font->face, g_prev_index, glyph_index, ft_kerning_default, &delta);
+ else
+ st= FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta);
+
+ if (st == 0)
+ pen_x += delta.x >> 6;
}
gbox.xmin= g->box.xmin + pen_x;
@@ -263,6 +274,27 @@ float blf_font_height(FontBLF *font, char *str)
return((box.ymax - box.ymin) * font->aspect);
}
+float blf_font_fixed_width(FontBLF *font)
+{
+ GlyphBLF *g;
+ FT_UInt glyph_index;
+ unsigned int c = ' ';
+
+ if (!font->glyph_cache)
+ return 0.0f;
+
+ glyph_index= FT_Get_Char_Index(font->face, c);
+ g= blf_glyph_search(font->glyph_cache, c);
+ if (!g)
+ g= blf_glyph_add(font, glyph_index, c);
+
+ /* if we don't find the glyph. */
+ if (!g)
+ return 0.0f;
+
+ return g->advance;
+}
+
void blf_font_free(FontBLF *font)
{
GlyphCacheBLF *gc;
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 142d2145ab2..d2767d6ffb1 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -488,8 +488,20 @@ int blf_glyph_texture_render(FontBLF *font, GlyphBLF *g, float x, float y)
GLint cur_tex;
float dx, dx1;
float y1, y2;
+ float xo, yo;
+ float color[4];
gt= g->tex_data;
+ xo= 0.0f;
+ yo= 0.0f;
+
+ if (font->flags & BLF_SHADOW) {
+ xo= x;
+ yo= y;
+ x += font->shadow_x;
+ y += font->shadow_y;
+ }
+
dx= floor(x + gt->pos_x);
dx1= dx + gt->width;
y1= y + gt->pos_y;
@@ -510,6 +522,27 @@ int blf_glyph_texture_render(FontBLF *font, GlyphBLF *g, float x, float y)
if (cur_tex != gt->tex)
glBindTexture(GL_TEXTURE_2D, gt->tex);
+ if (font->flags & BLF_SHADOW) {
+ glGetFloatv(GL_CURRENT_COLOR, color);
+ glColor4fv(font->shadow_col);
+
+ if (font->shadow == 3)
+ blf_texture3_draw(gt->uv, dx, y1, dx1, y2);
+ else if (font->shadow == 5)
+ blf_texture5_draw(gt->uv, dx, y1, dx1, y2);
+ else
+ blf_texture_draw(gt->uv, dx, y1, dx1, y2);
+
+ glColor4fv(color);
+ x= xo;
+ y= yo;
+
+ dx= floor(x + gt->pos_x);
+ dx1= dx + gt->width;
+ y1= y + gt->pos_y;
+ y2= y + gt->pos_y - gt->height;
+ }
+
if (font->blur==3)
blf_texture3_draw(gt->uv, dx, y1, dx1, y2);
else if (font->blur==5)
diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h
index c9bdc428ebb..30d5c8ede65 100644
--- a/source/blender/blenfont/intern/blf_internal.h
+++ b/source/blender/blenfont/intern/blf_internal.h
@@ -48,6 +48,7 @@ void blf_font_draw(FontBLF *font, char *str);
void blf_font_boundbox(FontBLF *font, char *str, rctf *box);
float blf_font_width(FontBLF *font, char *str);
float blf_font_height(FontBLF *font, char *str);
+float blf_font_fixed_width(FontBLF *font);
void blf_font_free(FontBLF *font);
GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi);
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index 1c55499b568..64d95986867 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -154,6 +154,16 @@ typedef struct FontBLF {
/* blur: 3 or 5 large kernel */
int blur;
+
+ /* shadow level. */
+ int shadow;
+
+ /* and shadow offset. */
+ int shadow_x;
+ int shadow_y;
+
+ /* shadow color. */
+ float shadow_col[4];
/* this is the matrix that we load before rotate/scale/translate. */
float mat[4][4];
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 67eb2ed58bf..0c9bba5e413 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -68,6 +68,9 @@ 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, int incl_hidden);
+/* Does action have any motion data at all? */
+short action_has_motion(const struct bAction *act);
+
/* Action Groups API ----------------- */
/* Make the given Action Group the active one */
@@ -137,7 +140,7 @@ void framechange_poses_clear_unkeyed(void);
void what_does_obaction(struct Scene *scene, struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
/* exported for game engine */
-void blend_poses(struct bPose *dst, struct bPose *src, float srcweight, short mode);
+void game_blend_poses(struct bPose *dst, struct bPose *src, float srcweight/*, short mode*/); /* was blend_poses */
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
/* for proxy */
@@ -145,12 +148,6 @@ void copy_pose_result(struct bPose *to, struct bPose *from);
/* clear all transforms */
void rest_pose(struct bPose *pose);
-/* map global time (frame nr) to strip converted time, doesn't clip */
-float get_action_frame(struct Object *ob, float cframe);
-/* map strip time to global time (frame nr) */
-float get_action_frame_inv(struct Object *ob, float cframe);
-
-
/* functions used by the game engine */
void game_copy_pose(struct bPose **dst, struct bPose *src);
void game_free_pose(struct bPose *pose);
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index e09be838f06..4270c677338 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -46,6 +46,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
#include "BKE_collision.h"
@@ -245,8 +246,8 @@ void bvhtree_update_from_cloth ( ClothModifierData *clmd, int moving );
void bvhselftree_update_from_cloth ( ClothModifierData *clmd, int moving );
// needed for editmesh.c
-void cloth_write_cache ( Object *ob, ClothModifierData *clmd, float framenr );
-int cloth_read_cache ( Object *ob, ClothModifierData *clmd, float framenr );
+void cloth_write_cache( Object *ob, ClothModifierData *clmd, int framenr );
+int cloth_read_cache( Scene *scene, Object *ob, ClothModifierData *clmd, float framenr, int *old_framenr );
// needed for button_object.c
void cloth_clear_cache ( Object *ob, ClothModifierData *clmd, float framenr );
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index 6a43f4ca25c..92c79ff757f 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -126,12 +126,15 @@ void CTX_wm_menu_set(bContext *C, struct ARegion *menu);
/* Data Context
- - note: listbases consist of LinkData items and must be
- freed with BLI_freelistN! */
+ - listbases consist of CollectionPointerLink items and must be
+ freed with BLI_freelistN!
+ - the dir listbase consits of LinkData items */
-PointerRNA CTX_data_pointer_get(bContext *C, const char *member);
-ListBase CTX_data_collection_get(bContext *C, const char *member);
-void CTX_data_get(bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb);
+PointerRNA CTX_data_pointer_get(const bContext *C, const char *member);
+PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type);
+ListBase CTX_data_collection_get(const bContext *C, const char *member);
+ListBase CTX_data_dir_get(const bContext *C);
+void CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb);
void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id);
void CTX_data_pointer_set(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
@@ -139,7 +142,10 @@ void CTX_data_pointer_set(bContextDataResult *result, struct ID *id, StructRNA *
void CTX_data_id_list_add(bContextDataResult *result, struct ID *id);
void CTX_data_list_add(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
+void CTX_data_dir_set(bContextDataResult *result, const char **member);
+
int CTX_data_equals(const char *member, const char *str);
+int CTX_data_dir(const char *member);
/*void CTX_data_pointer_set(bContextDataResult *result, void *data);
void CTX_data_list_add(bContextDataResult *result, void *data);*/
@@ -180,6 +186,9 @@ int CTX_data_selected_bases(const bContext *C, ListBase *list);
int CTX_data_visible_objects(const bContext *C, ListBase *list);
int CTX_data_visible_bases(const bContext *C, ListBase *list);
+int CTX_data_selectable_objects(const bContext *C, ListBase *list);
+int CTX_data_selectable_bases(const bContext *C, ListBase *list);
+
struct Object *CTX_data_active_object(const bContext *C);
struct Base *CTX_data_active_base(const bContext *C);
struct Object *CTX_data_edit_object(const bContext *C);
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index b86a58780dc..70b6c1d13f4 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -36,6 +36,7 @@ struct Scene;
struct DagNodeQueue;
struct DagForest;
struct DagNode;
+struct GHash;
/* **** DAG relation types *** */
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index c3555c9dd8a..da625b946ce 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -87,7 +87,7 @@ extern void count_displist(struct ListBase *lb, int *totvert, int *totface);
extern void freedisplist(struct ListBase *lb);
extern int displist_has_faces(struct ListBase *lb);
-extern void makeDispListSurf(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, int forRender);
+extern void makeDispListSurf(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, int forRender, int forOrco);
extern void makeDispListCurveTypes(struct Scene *scene, struct Object *ob, int forOrco);
extern void makeDispListMBall(struct Scene *scene, struct Object *ob);
extern void shadeDispList(struct Scene *scene, struct Base *base);
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index fd065978800..e21e83bf5cf 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -41,6 +41,8 @@ struct Particle;
struct Group;
struct RNG;
+struct PartDeflect *object_add_collision_fields(void);
+
typedef struct pEffectorCache {
struct pEffectorCache *next, *prev;
Object *ob;
diff --git a/source/blender/blenkernel/BKE_exotic.h b/source/blender/blenkernel/BKE_exotic.h
index 11dc1f41109..5c47eeabfe8 100644
--- a/source/blender/blenkernel/BKE_exotic.h
+++ b/source/blender/blenkernel/BKE_exotic.h
@@ -47,7 +47,6 @@ int BKE_read_exotic(struct Scene *scene, char *name);
void write_dxf(struct Scene *scene, char *str);
void write_vrml(struct Scene *scene, char *str);
-void write_videoscape(struct Scene *scene, char *str);
void write_stl(struct Scene *scene, char *str);
#endif
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index 9b8a2990fe5..cda64c6b241 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -1,12 +1,33 @@
-/* Testing code for new animation system in 2.5
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#ifndef BKE_FCURVE_H
#define BKE_FCURVE_H
-//struct ListBase;
-
struct FCurve;
struct FModifier;
struct ChannelDriver;
@@ -54,8 +75,8 @@ typedef struct FModifierTypeInfo {
short size; /* size in bytes of the struct */
short acttype; /* eFMI_Action_Types */
short requires; /* eFMI_Requirement_Flags */
- char name[32]; /* name of modifier in interface */
- char structName[32]; /* name of struct for SDNA */
+ char name[64]; /* name of modifier in interface */
+ char structName[64]; /* name of struct for SDNA */
/* data management function pointers - special handling */
/* free any data that is allocated separately (optional) */
@@ -104,14 +125,20 @@ FModifierTypeInfo *get_fmodifier_typeinfo(int type);
/* ---------------------- */
-struct FModifier *fcurve_add_modifier(struct FCurve *fcu, int type);
-void fcurve_copy_modifiers(ListBase *dst, ListBase *src);
-void fcurve_remove_modifier(struct FCurve *fcu, struct FModifier *fcm);
-void fcurve_free_modifiers(struct FCurve *fcu);
-void fcurve_bake_modifiers(struct FCurve *fcu, int start, int end);
+struct FModifier *add_fmodifier(ListBase *modifiers, int type);
+void copy_fmodifiers(ListBase *dst, ListBase *src);
+void remove_fmodifier(ListBase *modifiers, struct FModifier *fcm);
+void free_fmodifiers(ListBase *modifiers);
+
+struct FModifier *find_active_fmodifier(ListBase *modifiers);
+void set_active_fmodifier(ListBase *modifiers, struct FModifier *fcm);
+
+short list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype);
-struct FModifier *fcurve_find_active_modifier(struct FCurve *fcu);
-void fcurve_set_active_modifier(struct FCurve *fcu, struct FModifier *fcm);
+float evaluate_time_fmodifiers(ListBase *modifiers, struct FCurve *fcu, float cvalue, float evaltime);
+void evaluate_value_fmodifiers(ListBase *modifiers, struct FCurve *fcu, float *cvalue, float evaltime);
+
+void fcurve_bake_modifiers(struct FCurve *fcu, int start, int end);
/* ************** F-Curves API ******************** */
@@ -126,9 +153,6 @@ void copy_fcurves(ListBase *dst, ListBase *src);
/* find matching F-Curve in the given list of F-Curves */
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
-/* test if there is a keyframe at cfra */
-short on_keyframe_fcurve(struct FCurve *fcu, float cfra);
-
/* get the time extents for F-Curve */
void calc_fcurve_range(struct FCurve *fcu, float *min, float *max);
diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h
index 93358fcf7e8..145ae48e732 100644
--- a/source/blender/blenkernel/BKE_fluidsim.h
+++ b/source/blender/blenkernel/BKE_fluidsim.h
@@ -1,6 +1,5 @@
/**
- * BKE_fluidsim.h
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -28,29 +27,40 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#include "DNA_modifier_types.h"
-#include "DNA_object_fluidsim.h" // N_T
-#include "DNA_object_types.h"
+#ifndef BKE_FLUIDSIM_H
+#define BKE_FLUIDSIM_H
-#include "BKE_DerivedMesh.h"
+struct Object;
+struct Scene;
+struct FluidsimModifierData;
+struct DerivedMesh;
+struct MVert;
/* old interface */
-FluidsimSettings *fluidsimSettingsNew(Object *srcob);
-
-void initElbeemMesh(Scene *scene, Object *ob, int *numVertices, float **vertices, int *numTriangles, int **triangles, int useGlobalCoords, int modifierIndex);
+struct FluidsimSettings *fluidsimSettingsNew(struct Object *srcob);
+void initElbeemMesh(struct Scene *scene, struct Object *ob,
+ int *numVertices, float **vertices,
+ int *numTriangles, int **triangles,
+ int useGlobalCoords, int modifierIndex);
/* new fluid-modifier interface */
-void fluidsim_init(FluidsimModifierData *fluidmd);
-void fluidsim_free(FluidsimModifierData *fluidmd);
+void fluidsim_init(struct FluidsimModifierData *fluidmd);
+void fluidsim_free(struct FluidsimModifierData *fluidmd);
-DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams);
-void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh *dm, char *filename);
-DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc);
+struct DerivedMesh *fluidsim_read_cache(struct Object *ob, struct DerivedMesh *orgdm,
+ struct FluidsimModifierData *fluidmd, int framenr, int useRenderParams);
+void fluidsim_read_vel_cache(struct FluidsimModifierData *fluidmd, struct DerivedMesh *dm,
+ char *filename);
+struct DerivedMesh *fluidsimModifier_do(struct FluidsimModifierData *fluidmd,
+ struct Scene *scene, struct Object *ob, struct DerivedMesh *dm,
+ int useRenderParams, int isFinalCalc);
-// get bounding box of mesh
-void fluid_get_bb(MVert *mvert, int totvert, float obmat[][4],
- /*RET*/ float start[3], /*RET*/ float size[3] );
+/* bounding box & memory estimate */
+void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
+ float start[3], float size[3]);
+void fluid_estimate_memory(struct Object *ob, struct FluidsimSettings *fss, char *value);
+#endif
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 581285be21c..1892c8e71a4 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -1,5 +1,5 @@
/**
- * $Id: BDR_gpencil.h 19541 2009-04-05 06:54:47Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 38a1d9b13b7..382754ee2b2 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -39,6 +39,8 @@ struct Material;
struct ID;
struct Object;
+/* materials */
+
void init_def_material(void);
void free_material(struct Material *sc);
void test_object_materials(struct ID *id);
@@ -47,15 +49,22 @@ struct Material *add_material(char *name);
struct Material *copy_material(struct Material *ma);
void make_local_material(struct Material *ma);
+void automatname(struct Material *);
+
+/* material slots */
+
struct Material ***give_matarar(struct Object *ob);
short *give_totcolp(struct Object *ob);
struct Material *give_current_material(struct Object *ob, int act);
struct ID *material_from(struct Object *ob, int act);
void assign_material(struct Object *ob, struct Material *ma, int act);
-void new_material_to_objectdata(struct Object *ob);
int find_material_index(struct Object *ob, struct Material *ma);
+void object_add_material_slot(struct Object *ob);
+void object_remove_material_slot(struct Object *ob);
+
+/* rendering */
void init_render_material(struct Material *, int, float *);
void init_render_materials(int, float *);
@@ -64,12 +73,8 @@ void end_render_materials(void);
int material_in_material(struct Material *parmat, struct Material *mat);
-void automatname(struct Material *);
-void delete_material_index(struct Object *ob);
-
void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col);
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 54832376b87..b4efb742b27 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -63,7 +63,7 @@ typedef enum {
* used for particles modifier that doesn't actually modify the object
* unless it's a mesh and can be exploded -> curve can also emit particles
*/
- eModifierTypeType_DeformOrConstruct
+ eModifierTypeType_DeformOrConstruct,
} ModifierTypeType;
typedef enum {
@@ -88,6 +88,9 @@ typedef enum {
/* For modifiers that support pointcache, so we can check to see if it has files we need to deal with
*/
eModifierTypeFlag_UsesPointCache = (1<<6),
+
+ /* For physics modifiers, max one per type */
+ eModifierTypeFlag_Single = (1<<7)
} ModifierTypeFlag;
typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin);
@@ -205,7 +208,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
- CustomDataMask (*requiredDataMask)(struct ModifierData *md);
+ CustomDataMask (*requiredDataMask)(struct Object *ob, struct ModifierData *md);
/* Free internal modifier data variables, this function should
* not free the md variable itself.
@@ -273,6 +276,7 @@ int modifier_dependsOnTime(struct ModifierData *md);
int modifier_supportsMapping(struct ModifierData *md);
int modifier_couldBeCage(struct ModifierData *md);
int modifier_isDeformer(struct ModifierData *md);
+int modifier_isEnabled(struct ModifierData *md, int required_mode);
void modifier_setError(struct ModifierData *md, char *format, ...);
void modifiers_foreachObjectLink(struct Object *ob,
@@ -303,8 +307,10 @@ int modifiers_indexInObject(struct Object *ob, struct ModifierData *md
* evaluation, assuming the data indicated by dataMask is required at the
* end of the stack.
*/
-struct LinkNode *modifiers_calcDataMasks(struct ModifierData *md,
- CustomDataMask dataMask);
+struct LinkNode *modifiers_calcDataMasks(struct Object *ob,
+ struct ModifierData *md,
+ CustomDataMask dataMask,
+ int required_mode);
struct ModifierData *modifiers_getVirtualModifierList(struct Object *ob);
#endif
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 230096d7ea7..bb5a2782663 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -17,12 +17,12 @@
* 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.
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
* All rights reserved.
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Joshua Leung (full recode)
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -30,15 +30,90 @@
#ifndef BKE_NLA_H
#define BKE_NLA_H
-struct bActionStrip;
-struct ListBase;
-struct Object;
+struct AnimData;
+struct NlaStrip;
+struct NlaTrack;
+struct bAction;
+
+/* ----------------------------- */
+/* Data Management */
+
+void free_nlastrip(ListBase *strips, struct NlaStrip *strip);
+void free_nlatrack(ListBase *tracks, struct NlaTrack *nlt);
+void free_nladata(ListBase *tracks);
+
+struct NlaStrip *copy_nlastrip(struct NlaStrip *strip);
+struct NlaTrack *copy_nlatrack(struct NlaTrack *nlt);
+void copy_nladata(ListBase *dst, ListBase *src);
+
+struct NlaTrack *add_nlatrack(struct AnimData *adt, struct NlaTrack *prev);
+struct NlaStrip *add_nlastrip(struct bAction *act);
+struct NlaStrip *add_nlastrip_to_stack(struct AnimData *adt, struct bAction *act);
+
+/* ----------------------------- */
+/* API */
+
+short BKE_nlastrips_has_space(ListBase *strips, float start, float end);
+void BKE_nlastrips_sort_strips(ListBase *strips);
+
+short BKE_nlastrips_add_strip(ListBase *strips, struct NlaStrip *strip);
+
+
+void BKE_nlastrips_make_metas(ListBase *strips, short temp);
+void BKE_nlastrips_clear_metas(ListBase *strips, short onlySel, short onlyTemp);
+void BKE_nlastrips_clear_metastrip(ListBase *strips, struct NlaStrip *strip);
+short BKE_nlameta_add_strip(struct NlaStrip *mstrip, struct NlaStrip *strip);
+void BKE_nlameta_flush_transforms(struct NlaStrip *mstrip);
+
+/* ............ */
+
+struct NlaTrack *BKE_nlatrack_find_active(ListBase *tracks);
+void BKE_nlatrack_set_active(ListBase *tracks, struct NlaTrack *nlt);
+
+void BKE_nlatrack_solo_toggle(struct AnimData *adt, struct NlaTrack *nlt);
+
+short BKE_nlatrack_has_space(struct NlaTrack *nlt, float start, float end);
+void BKE_nlatrack_sort_strips(struct NlaTrack *nlt);
+
+short BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip);
+
+/* ............ */
+
+struct NlaStrip *BKE_nlastrip_find_active(struct NlaTrack *nlt);
+
+short BKE_nlastrip_within_bounds(struct NlaStrip *strip, float min, float max);
+
+void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip);
+
+/* ............ */
+
+short BKE_nlatrack_has_animated_strips(struct NlaTrack *nlt);
+short BKE_nlatracks_have_animated_strips(ListBase *tracks);
+void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip);
+
+/* ............ */
+
+void BKE_nla_action_pushdown(struct AnimData *adt);
+
+short BKE_nla_tweakmode_enter(struct AnimData *adt);
+void BKE_nla_tweakmode_exit(struct AnimData *adt);
+
+/* ----------------------------- */
+/* Time Mapping */
+
+/* time mapping conversion modes */
+enum {
+ /* convert from global time to strip time - for evaluation */
+ NLATIME_CONVERT_EVAL = 0,
+ /* convert from global time to strip time - for editing corrections */
+ // XXX old 0 invert
+ NLATIME_CONVERT_UNMAP,
+ /* convert from strip time to global time */
+ // xxx old 1 invert
+ NLATIME_CONVERT_MAP,
+} eNlaTime_ConvertModes;
+
+float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode);
-void free_actionstrip (struct bActionStrip* strip);
-void free_nlastrips (struct ListBase *nlalist);
-void copy_nlastrips (struct ListBase *dst, struct ListBase *src);
-void copy_actionstrip (struct bActionStrip **dst, struct bActionStrip **src);
-void find_stridechannel(struct Object *ob, struct bActionStrip *strip);
-struct bActionStrip *convert_action_to_strip (struct Object *ob);
#endif
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 09237e74d1d..87ee8f9cab3 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -410,8 +410,9 @@ struct TexResult;
#define TEX_NODE_DECOMPOSE 420
#define TEX_NODE_VALTONOR 421
#define TEX_NODE_SCALE 422
+#define TEX_NODE_AT 423
-/* 201-299 reserved. Use like this: TEX_NODE_PROC + TEX_CLOUDS, etc */
+/* 501-599 reserved. Use like this: TEX_NODE_PROC + TEX_CLOUDS, etc */
#define TEX_NODE_PROC 500
#define TEX_NODE_PROC_MAX 600
diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h
index 2d5acc51b7b..efd930d375a 100644
--- a/source/blender/blenkernel/BKE_packedFile.h
+++ b/source/blender/blenkernel/BKE_packedFile.h
@@ -31,31 +31,43 @@
#ifndef BKE_PACKEDFILE_H
#define BKE_PACKEDFILE_H
-#define RET_OK 0
-#define RET_ERROR 1
+#define RET_OK 0
+#define RET_ERROR 1
-struct PackedFile;
-struct VFont;
struct bSample;
struct bSound;
struct Image;
+struct Main;
+struct PackedFile;
+struct ReportList;
+struct VFont;
+
+/* pack */
+struct PackedFile *newPackedFile(struct ReportList *reports, char *filename);
+struct PackedFile *newPackedFileMemory(void *mem, int memlen);
+
+void packAll(struct Main *bmain, struct ReportList *reports);
+
+/* unpack */
+char *unpackFile(struct ReportList *reports, char *abs_name, char *local_name, struct PackedFile *pf, int how);
+int unpackVFont(struct ReportList *reports, struct VFont *vfont, int how);
+int unpackSample(struct ReportList *reports, struct bSample *sample, int how);
+int unpackImage(struct ReportList *reports, struct Image *ima, int how);
+void unpackAll(struct Main *bmain, struct ReportList *reports, int how);
+
+int writePackedFile(struct ReportList *reports, char *filename, struct PackedFile *pf, int guimode);
+
+/* free */
+void freePackedFile(struct PackedFile *pf);
+
+/* info */
+int countPackedFiles(struct Main *bmain);
+int checkPackedFile(char *filename, struct PackedFile *pf);
+
+/* read */
+int seekPackedFile(struct PackedFile *pf, int offset, int whence);
+void rewindPackedFile(struct PackedFile *pf);
+int readPackedFile(struct PackedFile *pf, void *data, int size);
-struct PackedFile * newPackedFile(char * filename);
-struct PackedFile * newPackedFileMemory(void *mem, int memlen);
-
-int seekPackedFile(struct PackedFile * pf, int offset, int whence);
-void rewindPackedFile(struct PackedFile * pf);
-int readPackedFile(struct PackedFile * pf, void * data, int size);
-int countPackedFiles(void);
-void freePackedFile(struct PackedFile * pf);
-void packAll(void);
-int writePackedFile(char * filename, struct PackedFile *pf, int guimode);
-int checkPackedFile(char * filename, struct PackedFile * pf);
-char * unpackFile(char * abs_name, char * local_name, struct PackedFile * pf, int how);
-int unpackVFont(struct VFont * vfont, int how);
-int unpackSample(struct bSample *sample, int how);
-int unpackImage(struct Image * ima, int how);
-void unpackAll(int how);
-
#endif
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 4efd9a7f8ba..bb0b905b8e3 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -91,7 +91,8 @@ typedef struct ParticleTexture{
float ivel; /* used in reset */
float time, life, exist, size; /* used in init */
float pvel[3]; /* used in physics */
- float length, clump, kink, rough; /* used in path caching */
+ float length, clump, kink, effector;/* used in path caching */
+ float rough1, rough2, roughe; /* used in path caching */
} ParticleTexture;
typedef struct BoidVecFunc{
@@ -217,6 +218,8 @@ char *psys_menu_string(struct Object *ob, int for_sb);
struct ParticleSystem *psys_get_current(struct Object *ob);
short psys_get_current_num(struct Object *ob);
+void psys_set_current_num(Object *ob, int index);
+struct Object *psys_find_object(struct Scene *scene, struct ParticleSystem *psys);
//struct ParticleSystem *psys_get(struct Object *ob, int index);
struct ParticleData *psys_get_selected_particle(struct ParticleSystem *psys, int *index);
struct ParticleKey *psys_get_selected_key(struct ParticleSystem *psys, int pa_index, int *key_index);
@@ -249,13 +252,14 @@ void copy_particle_key(struct ParticleKey *to, struct ParticleKey *from, int tim
void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd, int distr, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor);
struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct ParticleSystem *psys);
+void object_add_particle_system(struct Scene *scene, struct Object *ob);
+void object_remove_particle_system(struct Scene *scene, struct Object *ob);
struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
void psys_flush_particle_settings(struct Scene *scene, struct ParticleSettings *part, int recalc);
void make_local_particlesettings(struct ParticleSettings *part);
struct LinkNode *psys_using_settings(struct Scene *scene, struct ParticleSettings *part, int flush_update);
-void psys_changed_type(struct ParticleSystem *psys);
void psys_reset(struct ParticleSystem *psys, int mode);
void psys_find_parents(struct Object *ob, struct ParticleSystemModifierData *psmd, struct ParticleSystem *psys);
@@ -266,7 +270,7 @@ 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);
-float psys_get_child_time(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra);
+float psys_get_child_time(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *birthtime, float *dietime);
float psys_get_child_size(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *pa_time);
void psys_get_particle_on_path(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, int pa_num, struct ParticleKey *state, int vel);
int psys_get_particle_state(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, int p, struct ParticleKey *state, int always);
@@ -284,16 +288,21 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
/* particle_system.c */
-int psys_count_keyed_targets(struct Object *ob, struct ParticleSystem *psys);
+void psys_count_keyed_targets(struct Object *ob, struct ParticleSystem *psys);
void psys_get_reactor_target(struct Object *ob, struct ParticleSystem *psys, struct Object **target_ob, struct ParticleSystem **target_psys);
void psys_init_effectors(struct Scene *scene, struct Object *obsrc, struct Group *group, struct ParticleSystem *psys);
void psys_end_effectors(struct ParticleSystem *psys);
+void psys_make_temp_pointcache(struct Object *ob, struct ParticleSystem *psys);
+void psys_end_temp_pointcache(struct ParticleSystem *psys);
+void psys_get_pointcache_start_end(struct Scene *scene, struct ParticleSystem *psys, int *sfra, int *efra);
+
void particle_system_update(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
/* ----------- functions needed only inside particlesystem ------------ */
/* particle.c */
+void psys_interpolate_particle(short type, struct ParticleKey keys[4], float dt, struct ParticleKey *result, int velocity);
void psys_key_to_object(struct Object *ob, struct ParticleKey *key, float imat[][4]);
//void psys_key_to_geometry(struct DerivedMesh *dm, struct ParticleData *pa, struct ParticleKey *key);
//void psys_key_from_geometry(struct DerivedMesh *dm, struct ParticleData *pa, struct ParticleKey *key);
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 8ef3ff4d4b7..c5d423c13ba 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -31,6 +31,8 @@
#include "DNA_ID.h"
+#include "MEM_guardedalloc.h"
+
/* Point cache clearing option, for BKE_ptcache_id_clear, before
* and after are non inclusive (they wont remove the cfra) */
#define PTCACHE_CLEAR_ALL 0
@@ -42,6 +44,7 @@
#define PTCACHE_RESET_DEPSGRAPH 0
#define PTCACHE_RESET_BAKED 1
#define PTCACHE_RESET_OUTDATED 2
+#define PTCACHE_RESET_FREE 3
/* Add the blendfile name after blendcache_ */
#define PTCACHE_EXT ".bphys"
@@ -56,6 +59,11 @@
#define PTCACHE_TYPE_PARTICLES 1
#define PTCACHE_TYPE_CLOTH 2
+/* PTCache read return code */
+#define PTCACHE_READ_EXACT 1
+#define PTCACHE_READ_INTERPOLATED 2
+#define PTCACHE_READ_OLD 3
+
/* Structs */
struct Object;
struct Scene;
@@ -80,6 +88,41 @@ typedef struct PTCacheID {
struct PointCache *cache;
} PTCacheID;
+typedef struct PTCacheWriter {
+ struct PTCacheID *pid;
+ int cfra;
+ int totelem;
+
+ void (*set_elem)(int index, void *calldata, float *data);
+ void *calldata;
+} PTCacheWriter;
+
+typedef struct PTCacheReader {
+ struct Scene *scene;
+ struct PTCacheID *pid;
+ float cfra;
+ int totelem;
+
+ void (*set_elem)(int elem_index, void *calldata, float *data);
+ void (*interpolate_elem)(int index, void *calldata, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2);
+ void *calldata;
+
+ int *old_frame;
+} PTCacheReader;
+
+typedef struct PTCacheBaker {
+ struct Scene *scene;
+ int bake;
+ int render;
+ int anim_init;
+ int quick_step;
+ struct PTCacheID *pid;
+ int (*break_test)(void *data);
+ void *break_data;
+ void (*progressbar)(void *data, int num);
+ void *progresscontext;
+} PTCacheBaker;
+
/* Creating ID's */
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);
@@ -93,9 +136,9 @@ void BKE_ptcache_remove(void);
/* ID specific functions */
void BKE_ptcache_id_clear(PTCacheID *id, int mode, int cfra);
int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
-int BKE_ptcache_id_reset(PTCacheID *id, int mode);
+int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
-int BKE_ptcache_object_reset(struct Object *ob, int mode);
+int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode);
/* File reading/writing */
PTCacheFile *BKE_ptcache_file_open(PTCacheID *id, int mode, int cfra);
@@ -103,6 +146,12 @@ void BKE_ptcache_file_close(PTCacheFile *pf);
int BKE_ptcache_file_read_floats(PTCacheFile *pf, float *f, int tot);
int BKE_ptcache_file_write_floats(PTCacheFile *pf, float *f, int tot);
+void BKE_ptcache_update_info(PTCacheID *pid);
+
+/* General cache reading/writing */
+int BKE_ptcache_read_cache(PTCacheReader *reader);
+int BKE_ptcache_write_cache(PTCacheWriter *writer);
+
/* Continue physics */
void BKE_ptcache_set_continue_physics(struct Scene *scene, int enable);
int BKE_ptcache_get_continue_physics(void);
@@ -112,4 +161,9 @@ struct PointCache *BKE_ptcache_add(void);
void BKE_ptcache_free(struct PointCache *cache);
struct PointCache *BKE_ptcache_copy(struct PointCache *cache);
+/* Baking */
+void BKE_ptcache_quick_cache_all(struct Scene *scene);
+void BKE_ptcache_make_cache(struct PTCacheBaker* baker);
+void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid);
+
#endif
diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h
index 21221026b8b..1bb7152fbf3 100644
--- a/source/blender/blenkernel/BKE_report.h
+++ b/source/blender/blenkernel/BKE_report.h
@@ -34,7 +34,10 @@ extern "C" {
#include "DNA_listBase.h"
-/* Reporting Information and Errors */
+/* Reporting Information and Errors
+ *
+ * These functions also accept NULL in case no error reporting
+ * is needed. */
typedef enum ReportType {
RPT_DEBUG = 0,
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 9b5d99f6ae6..be625fb856a 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -91,6 +91,9 @@ typedef struct SpaceType {
/* region type definitions */
ListBase regiontypes;
+ /* tool shelf definitions */
+ ListBase toolshelf;
+
/* read and write... */
/* default keymaps to add */
@@ -139,7 +142,7 @@ typedef struct ARegionType {
/* menu type definitions */
ListBase menutypes;
-
+
/* hardcoded constraints, smaller than these values region is not visible */
int minsizex, minsizey;
/* default keymaps to add */
@@ -157,6 +160,8 @@ typedef struct PanelType {
int space_type;
int region_type;
+ int flag;
+
/* verify if the panel should draw or not */
int (*poll)(const struct bContext *, struct PanelType *);
/* draw header (optional) */
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index a36926465d7..3c01f86dc02 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -130,9 +130,10 @@
#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0)))
#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0))
+#define IN_RANGE_INCL(a, b, c) ((b < c)? ((b<=a && a<=c)? 1:0) : ((c<=a && a<=b)? 1:0))
/* this weirdo pops up in two places ... */
-#if !defined(WIN32) && !defined(__BeOS)
+#if !defined(WIN32)
#ifndef O_BINARY
#define O_BINARY 0
#endif
@@ -150,12 +151,6 @@
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
#define FORM MAKE_ID('F','O','R','M')
-#define DDG1 MAKE_ID('3','D','G','1')
-#define DDG2 MAKE_ID('3','D','G','2')
-#define DDG3 MAKE_ID('3','D','G','3')
-#define DDG4 MAKE_ID('3','D','G','4')
-
-#define GOUR MAKE_ID('G','O','U','R')
#define BLEN MAKE_ID('B','L','E','N')
#define DER_ MAKE_ID('D','E','R','_')
diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
index dba3944a58d..be136bd9d6d 100644
--- a/source/blender/blenkernel/BKE_writeffmpeg.h
+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
@@ -46,19 +46,29 @@ extern "C" {
#define FFMPEG_MKV 9
#define FFMPEG_OGG 10
-#define FFMPEG_PRESET_NONE 0
-#define FFMPEG_PRESET_DVD 1
-#define FFMPEG_PRESET_SVCD 2
-#define FFMPEG_PRESET_VCD 3
-#define FFMPEG_PRESET_DV 4
-#define FFMPEG_PRESET_H264 5
+#define FFMPEG_PRESET_NONE 0
+#define FFMPEG_PRESET_DVD 1
+#define FFMPEG_PRESET_SVCD 2
+#define FFMPEG_PRESET_VCD 3
+#define FFMPEG_PRESET_DV 4
+#define FFMPEG_PRESET_H264 5
+#define FFMPEG_PRESET_THEORA 6
+#define FFMPEG_PRESET_XVID 7
+struct IDProperty;
struct RenderData;
extern void start_ffmpeg(struct RenderData *rd, int rectx, int recty);
extern void end_ffmpeg(void);
extern void append_ffmpeg(struct RenderData *rd, int frame, int *pixels, int rectx, int recty);
+extern void ffmpeg_set_preset(struct RenderData *rd, int preset);
+extern void ffmpeg_verify_image_type(struct RenderData *rd);
+
+extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, char *type, int opt_index, int parent_index);
+extern int ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
+extern void ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h
index 78717393baf..47e33c0e81e 100644
--- a/source/blender/blenkernel/depsgraph_private.h
+++ b/source/blender/blenkernel/depsgraph_private.h
@@ -65,6 +65,7 @@ typedef struct DagNode
void * first_ancestor;
int ancestor_count;
int lay; // accumulated layers of its relations + itself
+ int scelay; // layers due to being in scene
int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing
int BFS_dist; // BFS distance
int DFS_dist; // DFS distance
@@ -93,6 +94,7 @@ typedef struct DagNodeQueue
typedef struct DagForest
{
ListBase DagNode;
+ struct GHash *nodeHash;
int numNodes;
int is_acyclic;
int time; // for flushing/tagging, compare with node->lasttime
diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c
index a41307de183..32065ea5151 100644
--- a/source/blender/blenkernel/intern/BME_tools.c
+++ b/source/blender/blenkernel/intern/BME_tools.c
@@ -191,7 +191,7 @@ static BME_Poly *BME_split_face(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Ver
nf = BME_SFME(bm,f,v1,v2,nl);
nf->flag = f->flag;
/* if the edge was selected, select this face, too */
- if (example->flag & SELECT) f->flag |= ME_FACE_SEL;
+ if (example && (example->flag & SELECT)) f->flag |= ME_FACE_SEL;
nf->h = f->h;
nf->mat_nr = f->mat_nr;
if (nl && example) {
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 7bd47d4a4c0..a1068080927 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1770,18 +1770,18 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
modifiers_clearErrors(ob);
+ if(useRenderParams) required_mode = eModifierMode_Render;
+ else required_mode = eModifierMode_Realtime;
+
/* we always want to keep original indices */
dataMask |= CD_MASK_ORIGINDEX;
- datamasks = modifiers_calcDataMasks(md, dataMask);
+ datamasks = modifiers_calcDataMasks(ob, md, dataMask, required_mode);
curr = datamasks;
if(deform_r) *deform_r = NULL;
*final_r = NULL;
- if(useRenderParams) required_mode = eModifierMode_Render;
- else required_mode = eModifierMode_Realtime;
-
if(useDeform) {
if(useDeform > 0 && do_ob_key(scene, ob)) /* shape key makes deform verts */
deformedVerts = mesh_getVertexCos(me, &numVerts);
@@ -1794,8 +1794,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
md->scene= scene;
- if((md->mode & required_mode) != required_mode) continue;
- if(mti->isDisabled && mti->isDisabled(md)) continue;
+ if(!modifier_isEnabled(md, required_mode)) continue;
if(useDeform < 0 && mti->dependsOnTime && mti->dependsOnTime(md)) continue;
if(mti->type == eModifierTypeType_OnlyDeform) {
@@ -1844,19 +1843,18 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
md->scene= scene;
- if((md->mode & required_mode) != required_mode) continue;
+ if(!modifier_isEnabled(md, required_mode)) continue;
if(mti->type == eModifierTypeType_OnlyDeform && !useDeform) continue;
if((mti->flags & eModifierTypeFlag_RequiresOriginalData) && dm) {
modifier_setError(md, "Modifier requires original data, bad stack position.");
continue;
}
- if(mti->isDisabled && mti->isDisabled(md)) continue;
if(needMapping && !modifier_supportsMapping(md)) continue;
if(useDeform < 0 && mti->dependsOnTime && mti->dependsOnTime(md)) continue;
/* add an orco layer if needed by this modifier */
if(dm && mti->requiredDataMask) {
- mask = mti->requiredDataMask(md);
+ mask = mti->requiredDataMask(ob, md);
if(mask & CD_MASK_ORCO)
add_orco_dm(ob, NULL, dm, orcodm);
}
@@ -2029,14 +2027,11 @@ static int editbmesh_modifier_is_enabled(ModifierData *md, DerivedMesh *dm)
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
int required_mode = eModifierMode_Realtime | eModifierMode_Editmode;
- if((md->mode & required_mode) != required_mode) return 0;
+ if(!modifier_isEnabled(md, required_mode)) return 0;
if((mti->flags & eModifierTypeFlag_RequiresOriginalData) && dm) {
modifier_setError(md, "Modifier requires original data, bad stack position.");
return 0;
}
- if(mti->isDisabled && mti->isDisabled(md)) return 0;
- if(!(mti->flags & eModifierTypeFlag_SupportsEditmode)) return 0;
- if(md->mode & eModifierMode_DisableTemporary) return 0;
return 1;
}
@@ -2051,6 +2046,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
DerivedMesh *dm, *orcodm = NULL;
int i, numVerts = 0, cageIndex = modifiers_getCageIndex(ob, NULL);
LinkNode *datamasks, *curr;
+ int required_mode = eModifierMode_Realtime | eModifierMode_Editmode;
modifiers_clearErrors(ob);
@@ -2064,7 +2060,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
/* we always want to keep original indices */
dataMask |= CD_MASK_ORIGINDEX;
- datamasks = modifiers_calcDataMasks(md, dataMask);
+ datamasks = modifiers_calcDataMasks(ob, md, dataMask, required_mode);
curr = datamasks;
for(i = 0; md; i++, md = md->next, curr = curr->next) {
@@ -2077,7 +2073,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
/* add an orco layer if needed by this modifier */
if(dm && mti->requiredDataMask) {
- mask = mti->requiredDataMask(md);
+ mask = mti->requiredDataMask(ob, md);
if(mask & CD_MASK_ORCO)
add_orco_dm(ob, em, dm, orcodm);
}
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index d54bc749b71..96896509f60 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -581,6 +581,77 @@ void game_copy_pose(bPose **dst, bPose *src)
*dst=out;
}
+
+/* Only allowed for Poses with identical channels */
+void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/)
+{
+ short mode= ACTSTRIPMODE_BLEND;
+
+ bPoseChannel *dchan;
+ const bPoseChannel *schan;
+ bConstraint *dcon, *scon;
+ float dstweight;
+ int i;
+
+ switch (mode){
+ case ACTSTRIPMODE_BLEND:
+ dstweight = 1.0F - srcweight;
+ break;
+ case ACTSTRIPMODE_ADD:
+ dstweight = 1.0F;
+ break;
+ default :
+ dstweight = 1.0F;
+ }
+
+ schan= src->chanbase.first;
+ for (dchan = dst->chanbase.first; dchan; dchan=dchan->next, schan= schan->next){
+ if (schan->flag & (POSE_ROT|POSE_LOC|POSE_SIZE)) {
+ /* replaced quat->matrix->quat conversion with decent quaternion interpol (ton) */
+
+ /* Do the transformation blend */
+ if (schan->flag & POSE_ROT) {
+ /* quat interpolation done separate */
+ if (schan->rotmode == PCHAN_ROT_QUAT) {
+ float dquat[4], squat[4];
+
+ QUATCOPY(dquat, dchan->quat);
+ QUATCOPY(squat, schan->quat);
+ if (mode==ACTSTRIPMODE_BLEND)
+ QuatInterpol(dchan->quat, dquat, squat, srcweight);
+ else {
+ QuatMulFac(squat, srcweight);
+ QuatMul(dchan->quat, dquat, squat);
+ }
+
+ NormalQuat(dchan->quat);
+ }
+ }
+
+ for (i=0; i<3; i++) {
+ /* blending for loc and scale are pretty self-explanatory... */
+ if (schan->flag & POSE_LOC)
+ dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight);
+ if (schan->flag & POSE_SIZE)
+ dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight);
+
+ /* euler-rotation interpolation done here instead... */
+ // FIXME: are these results decent?
+ if ((schan->flag & POSE_ROT) && (schan->rotmode))
+ dchan->eul[i] = (dchan->eul[i]*dstweight) + (schan->eul[i]*srcweight);
+ }
+ dchan->flag |= schan->flag;
+ }
+ for(dcon= dchan->constraints.first, scon= schan->constraints.first; dcon && scon; dcon= dcon->next, scon= scon->next) {
+ /* no 'add' option for constraint blending */
+ dcon->enforce= dcon->enforce*(1.0f-srcweight) + scon->enforce*srcweight;
+ }
+ }
+
+ /* this pose is now in src time */
+ dst->ctime= src->ctime;
+}
+
void game_free_pose(bPose *pose)
{
if (pose) {
@@ -698,70 +769,23 @@ void framechange_poses_clear_unkeyed(void)
/* ************** time ****************** */
-static bActionStrip *get_active_strip(Object *ob)
-{
-#if 0 // XXX old animation system
- bActionStrip *strip;
-
- if(ob->action==NULL)
- return NULL;
-
- for (strip=ob->nlastrips.first; strip; strip=strip->next)
- if(strip->flag & ACTSTRIP_ACTIVE)
- break;
-
- if(strip && strip->act==ob->action)
- return strip;
-#endif // XXX old animation system
-
- return NULL;
-}
-
-/* non clipped mapping of strip */
-static float get_actionstrip_frame(bActionStrip *strip, float cframe, int invert)
-{
- float length, actlength, repeat, scale;
-
- if (strip->repeat == 0.0f) strip->repeat = 1.0f;
- repeat = (strip->flag & ACTSTRIP_USESTRIDE) ? (1.0f) : (strip->repeat);
-
- if (strip->scale == 0.0f) strip->scale= 1.0f;
- scale = (float)fabs(strip->scale); /* scale must be positive (for now) */
-
- actlength = strip->actend-strip->actstart;
- if (actlength == 0.0f) actlength = 1.0f;
- length = repeat * scale * actlength;
-
- /* invert = convert action-strip time to global time */
- if (invert)
- return length*(cframe - strip->actstart)/(repeat*actlength) + strip->start;
- else
- return repeat*actlength*(cframe - strip->start)/length + strip->actstart;
-}
-
-/* if the conditions match, it converts current time to strip time */
-float get_action_frame(Object *ob, float cframe)
+/* Check if the given action has any keyframes */
+short action_has_motion(const bAction *act)
{
- bActionStrip *strip= get_active_strip(ob);
+ FCurve *fcu;
- if(strip)
- return get_actionstrip_frame(strip, cframe, 0);
- return cframe;
-}
-
-/* inverted, strip time to current time */
-float get_action_frame_inv(Object *ob, float cframe)
-{
- bActionStrip *strip= get_active_strip(ob);
+ /* return on the first F-Curve that has some keyframes/samples defined */
+ if (act) {
+ for (fcu= act->curves.first; fcu; fcu= fcu->next) {
+ if (fcu->totvert)
+ return 1;
+ }
+ }
- if(strip)
- return get_actionstrip_frame(strip, cframe, 1);
- return cframe;
+ /* nothing found */
+ return 0;
}
-
-
-
/* Calculate the extents of given action */
void calc_action_range(const bAction *act, float *start, float *end, int incl_hidden)
{
@@ -800,6 +824,7 @@ void calc_action_range(const bAction *act, float *start, float *end, int incl_hi
/* Copy the data from the action-pose (src) into the pose */
/* both args are assumed to be valid */
/* exported to game engine */
+/* Note! this assumes both poses are aligned, this isnt always true when dealing with user poses */
void extract_pose_from_pose(bPose *pose, const bPose *src)
{
const bPoseChannel *schan;
@@ -810,7 +835,7 @@ void extract_pose_from_pose(bPose *pose, const bPose *src)
return;
}
- for (schan=src->chanbase.first; schan; schan=schan->next, pchan= pchan->next) {
+ for (schan=src->chanbase.first; (schan && pchan); schan=schan->next, pchan= pchan->next) {
copy_pose_channel_data(pchan, schan);
}
}
@@ -1038,75 +1063,6 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
VecAddf(dst->cyclic_offset, dst->cyclic_offset, src->cyclic_offset);
}
-
-/* Only allowed for Poses with identical channels */
-void blend_poses(bPose *dst, bPose *src, float srcweight, short mode)
-{
- bPoseChannel *dchan;
- const bPoseChannel *schan;
- bConstraint *dcon, *scon;
- float dstweight;
- int i;
-
- switch (mode){
- case ACTSTRIPMODE_BLEND:
- dstweight = 1.0F - srcweight;
- break;
- case ACTSTRIPMODE_ADD:
- dstweight = 1.0F;
- break;
- default :
- dstweight = 1.0F;
- }
-
- schan= src->chanbase.first;
- for (dchan = dst->chanbase.first; dchan; dchan=dchan->next, schan= schan->next){
- if (schan->flag & (POSE_ROT|POSE_LOC|POSE_SIZE)) {
- /* replaced quat->matrix->quat conversion with decent quaternion interpol (ton) */
-
- /* Do the transformation blend */
- if (schan->flag & POSE_ROT) {
- /* quat interpolation done separate */
- if (schan->rotmode == PCHAN_ROT_QUAT) {
- float dquat[4], squat[4];
-
- QUATCOPY(dquat, dchan->quat);
- QUATCOPY(squat, schan->quat);
- if (mode==ACTSTRIPMODE_BLEND)
- QuatInterpol(dchan->quat, dquat, squat, srcweight);
- else {
- QuatMulFac(squat, srcweight);
- QuatMul(dchan->quat, dquat, squat);
- }
-
- NormalQuat(dchan->quat);
- }
- }
-
- for (i=0; i<3; i++) {
- /* blending for loc and scale are pretty self-explanatory... */
- if (schan->flag & POSE_LOC)
- dchan->loc[i] = (dchan->loc[i]*dstweight) + (schan->loc[i]*srcweight);
- if (schan->flag & POSE_SIZE)
- dchan->size[i] = 1.0f + ((dchan->size[i]-1.0f)*dstweight) + ((schan->size[i]-1.0f)*srcweight);
-
- /* euler-rotation interpolation done here instead... */
- // FIXME: are these results decent?
- if ((schan->flag & POSE_ROT) && (schan->rotmode))
- dchan->eul[i] = (dchan->eul[i]*dstweight) + (schan->eul[i]*srcweight);
- }
- dchan->flag |= schan->flag;
- }
- for(dcon= dchan->constraints.first, scon= schan->constraints.first; dcon && scon; dcon= dcon->next, scon= scon->next) {
- /* no 'add' option for constraint blending */
- dcon->enforce= dcon->enforce*(1.0f-srcweight) + scon->enforce*srcweight;
- }
- }
-
- /* this pose is now in src time */
- dst->ctime= src->ctime;
-}
-
typedef struct NlaIpoChannel {
struct NlaIpoChannel *next, *prev;
float val;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 7451e40cac7..7d9d261f306 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -783,8 +783,9 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
BLI_srandom(31415926 + psys->seed);
lay= scene->lay;
- if((part->draw_as == PART_DRAW_OB && part->dup_ob) ||
- (part->draw_as == PART_DRAW_GR && part->dup_group && part->dup_group->gobject.first)) {
+ if((psys->renderdata || part->draw_as==PART_DRAW_REND) &&
+ ((part->ren_as == PART_DRAW_OB && part->dup_ob) ||
+ (part->ren_as == PART_DRAW_GR && part->dup_group && part->dup_group->gobject.first))) {
/* if we have a hair particle system, use the path cache */
if(part->type == PART_HAIR) {
@@ -801,7 +802,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
psys->lattice = psys_get_lattice(scene, par, psys);
/* gather list of objects or single object */
- if(part->draw_as==PART_DRAW_GR) {
+ if(part->ren_as==PART_DRAW_GR) {
group_handle_recalc_and_update(scene, par, part->dup_group);
for(go=part->dup_group->gobject.first; go; go=go->next)
@@ -847,7 +848,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
size = psys_get_child_size(psys, cpa, ctime, 0);
}
- if(part->draw_as==PART_DRAW_GR) {
+ if(part->ren_as==PART_DRAW_GR) {
/* for groups, pick the object based on settings */
if(part->draw&PART_DRAW_RAND_GR)
b= BLI_rand() % totgroup;
@@ -891,7 +892,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
pamat[3][3]= 1.0f;
}
- if(part->draw_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
+ if(part->ren_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
for(go= part->dup_group->gobject.first, b=0; go; go= go->next, b++) {
Mat4MulMat4(tmat, oblist[b]->obmat, pamat);
Mat4MulFloat3((float *)tmat, size*scale);
@@ -927,7 +928,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
}
/* restore objects since they were changed in where_is_object_time */
- if(part->draw_as==PART_DRAW_GR) {
+ if(part->ren_as==PART_DRAW_GR) {
for(a=0; a<totgroup; a++)
*(oblist[a])= obcopylist[a];
}
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 30dcb383ef6..e4882d8f555 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1,10 +1,37 @@
-/* Testing code for new animation system in 2.5
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#include <stdio.h>
#include <string.h>
#include <stddef.h>
+#include <float.h>
+#include <math.h>
#include "MEM_guardedalloc.h"
@@ -12,9 +39,12 @@
#include "BLI_arithb.h"
#include "BLI_dynstr.h"
+#include "DNA_anim_types.h"
+
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_fcurve.h"
+#include "BKE_nla.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_utildefines.h"
@@ -22,7 +52,7 @@
#include "RNA_access.h"
#include "RNA_types.h"
-#include "DNA_anim_types.h"
+#include "nla_private.h"
/* ***************************************** */
/* AnimData API */
@@ -43,6 +73,7 @@ static short id_has_animdata (ID *id)
case ID_OB:
case ID_CU:
case ID_KE:
+ case ID_PA:
case ID_MA: case ID_TE: case ID_NT:
case ID_LA: case ID_CA: case ID_WO:
case ID_SCE:
@@ -115,7 +146,13 @@ void BKE_free_animdata (ID *id)
/* unlink action (don't free, as it's in its own list) */
if (adt->action)
adt->action->id.us--;
+ /* same goes for the temporarily displaced action */
+ if (adt->tmpact)
+ adt->tmpact->id.us--;
+ /* free nla data */
+ free_nladata(&adt->nla_tracks);
+
/* free drivers - stored as a list of F-Curves */
free_fcurves(&adt->drivers);
@@ -145,9 +182,10 @@ AnimData *BKE_copy_animdata (AnimData *adt)
// XXX review this... it might not be optimal behaviour yet...
//id_us_plus((ID *)dadt->action);
dadt->action= copy_action(adt->action);
+ dadt->tmpact= copy_action(adt->tmpact);
/* duplicate NLA data */
- // XXX todo...
+ copy_nladata(&dadt->nla_tracks, &adt->nla_tracks);
/* duplicate drivers (F-Curves) */
copy_fcurves(&dadt->drivers, &adt->drivers);
@@ -354,10 +392,10 @@ void BKE_keyingsets_free (ListBase *list)
short animsys_remap_path (AnimMapper *remap, char *path, char **dst)
{
/* is there a valid remapping table to use? */
- if (remap) {
+ //if (remap) {
/* find a matching entry... to use to remap */
// ...TODO...
- }
+ //}
/* nothing suitable found, so just set dst to look at path (i.e. no alloc/free needed) */
*dst= path;
@@ -454,11 +492,14 @@ static void animsys_evaluate_fcurves (PointerRNA *ptr, ListBase *list, AnimMappe
/* calculate then execute each curve */
for (fcu= list->first; fcu; fcu= fcu->next)
{
- /* check if this curve should be skipped */
- if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0)
- {
- calculate_fcurve(fcu, ctime);
- animsys_execute_fcurve(ptr, remap, fcu);
+ /* check if this F-Curve doesn't belong to a muted group */
+ if ((fcu->grp == NULL) || (fcu->grp->flag & AGRP_MUTED)==0) {
+ /* check if this curve should be skipped */
+ if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0)
+ {
+ calculate_fcurve(fcu, ctime);
+ animsys_execute_fcurve(ptr, remap, fcu);
+ }
}
}
}
@@ -480,7 +521,6 @@ static void animsys_evaluate_drivers (PointerRNA *ptr, AnimData *adt, float ctim
short ok= 0;
/* check if this driver's curve should be skipped */
- // FIXME: maybe we shouldn't check for muted, though that would make things more confusing, as there's already too many ways to disable?
if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0)
{
/* check if driver itself is tagged for recalculation */
@@ -513,6 +553,10 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
if ELEM(NULL, act, agrp) return;
if ((remap) && (remap->target != act)) remap= NULL;
+ /* if group is muted, don't evaluated any of the F-Curve */
+ if (agrp->flag & AGRP_MUTED)
+ return;
+
/* calculate then execute each curve */
for (fcu= agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu= fcu->next)
{
@@ -539,152 +583,603 @@ void animsys_evaluate_action (PointerRNA *ptr, bAction *act, AnimMapper *remap,
/* ***************************************** */
/* NLA System - Evaluation */
-/* used for list of strips to accumulate at current time */
-typedef struct NlaEvalStrip {
- struct NlaEvalStrip *next, *prev;
-
- NlaTrack *track; /* track that this strip belongs to */
- NlaStrip *strip; /* strip that's being used */
- NlaStrip *sblend; /* strip that's being blended towards (if applicable) */
-
- short track_index; /* the index of the track within the list */
- short strip_mode; /* which end of the strip are we looking at */
-} NlaEvalStrip;
-
-/* bNlaEvalStrip->strip_mode */
-enum {
- NES_TIME_BEFORE = -1,
- NES_TIME_WITHIN,
- NES_TIME_AFTER,
- NES_TIME_AFTER_BLEND
-} eNlaEvalStrip_StripMode;
+/* calculate influence of strip based for given frame based on blendin/out values */
+static float nlastrip_get_influence (NlaStrip *strip, float cframe)
+{
+ /* sanity checks - normalise the blendin/out values? */
+ strip->blendin= (float)fabs(strip->blendin);
+ strip->blendout= (float)fabs(strip->blendout);
+
+ /* result depends on where frame is in respect to blendin/out values */
+ if (IS_EQ(strip->blendin, 0)==0 && (cframe <= (strip->start + strip->blendin))) {
+ /* there is some blend-in */
+ return (float)fabs(cframe - strip->start) / (strip->blendin);
+ }
+ else if (IS_EQ(strip->blendout, 0)==0 && (cframe >= (strip->end - strip->blendout))) {
+ /* there is some blend-out */
+ return (float)fabs(strip->end - cframe) / (strip->blendout);
+ }
+ else {
+ /* in the middle of the strip, we should be full strength */
+ return 1.0f;
+ }
+}
+/* evaluate the evaluation time and influence for the strip, storing the results in the strip */
+static void nlastrip_evaluate_controls (NlaStrip *strip, float ctime)
+{
+ /* firstly, analytically generate values for influence and time (if applicable) */
+ if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0)
+ strip->strip_time= nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL);
+ if ((strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) == 0)
+ strip->influence= nlastrip_get_influence(strip, ctime);
+
+ /* now strip's evaluate F-Curves for these settings (if applicable) */
+ if (strip->fcurves.first) {
+ PointerRNA strip_ptr;
+
+ /* create RNA-pointer needed to set values */
+ RNA_pointer_create(NULL, &RNA_NlaStrip, strip, &strip_ptr);
+
+ /* execute these settings as per normal */
+ animsys_evaluate_fcurves(&strip_ptr, &strip->fcurves, NULL, ctime);
+ }
+}
-/* temp channel for accumulating data from NLA (avoids needing to clear all values first) */
-// TODO: maybe this will be used as the 'cache' stuff needed for editable values too?
-typedef struct NlaEvalChannel {
- struct NlaEvalChannel *next, *prev;
+/* gets the strip active at the current time for a list of strips for evaluation purposes */
+NlaEvalStrip *nlastrips_ctime_get_strip (ListBase *list, ListBase *strips, short index, float ctime)
+{
+ NlaStrip *strip, *estrip=NULL;
+ NlaEvalStrip *nes;
+ short side= 0;
- char *path; /* ready-to-use path (i.e. remapped already) */
- int array_index; /* if applicable... */
+ /* loop over strips, checking if they fall within the range */
+ for (strip= strips->first; strip; strip= strip->next) {
+ /* check if current time occurs within this strip */
+ if (IN_RANGE_INCL(ctime, strip->start, strip->end)) {
+ /* this strip is active, so try to use it */
+ estrip= strip;
+ side= NES_TIME_WITHIN;
+ break;
+ }
+
+ /* if time occurred before current strip... */
+ if (ctime < strip->start) {
+ if (strip == strips->first) {
+ /* before first strip - only try to use it if it extends backwards in time too */
+ if (strip->extendmode == NLASTRIP_EXTEND_HOLD)
+ estrip= strip;
+
+ /* side is 'before' regardless of whether there's a useful strip */
+ side= NES_TIME_BEFORE;
+ }
+ else {
+ /* before next strip - previous strip has ended, but next hasn't begun,
+ * so blending mode depends on whether strip is being held or not...
+ * - only occurs when no transition strip added, otherwise the transition would have
+ * been picked up above...
+ */
+ strip= strip->prev;
+
+ if (strip->extendmode != NLASTRIP_EXTEND_NOTHING)
+ estrip= strip;
+ side= NES_TIME_AFTER;
+ }
+ break;
+ }
+
+ /* if time occurred after current strip... */
+ if (ctime > strip->end) {
+ /* only if this is the last strip should we do anything, and only if that is being held */
+ if (strip == strips->last) {
+ if (strip->extendmode != NLASTRIP_EXTEND_NOTHING)
+ estrip= strip;
+
+ side= NES_TIME_AFTER;
+ break;
+ }
+
+ /* otherwise, skip... as the 'before' case will catch it more elegantly! */
+ }
+ }
- float value; /* value of this channel */
-} NlaEvalChannel;
-
+ /* check if a valid strip was found
+ * - must not be muted (i.e. will have contribution
+ */
+ if ((estrip == NULL) || (estrip->flag & NLASTRIP_FLAG_MUTED))
+ return NULL;
+
+ /* if ctime was not within the boundaries of the strip, clamp! */
+ switch (side) {
+ case NES_TIME_BEFORE: /* extend first frame only */
+ ctime= estrip->start;
+ break;
+ case NES_TIME_AFTER: /* extend last frame only */
+ ctime= estrip->end;
+ break;
+ }
+
+ /* evaluate strip's evaluation controls
+ * - skip if no influence (i.e. same effect as muting the strip)
+ * - negative influence is not supported yet... how would that be defined?
+ */
+ // TODO: this sounds a bit hacky having a few isolated F-Curves stuck on some data it operates on...
+ nlastrip_evaluate_controls(estrip, ctime);
+ if (estrip->influence <= 0.0f)
+ return NULL;
+
+ /* check if strip has valid data to evaluate,
+ * and/or perform any additional type-specific actions
+ */
+ switch (estrip->type) {
+ case NLASTRIP_TYPE_CLIP:
+ /* clip must have some action to evaluate */
+ if (estrip->act == NULL)
+ return NULL;
+ break;
+ case NLASTRIP_TYPE_TRANSITION:
+ /* there must be strips to transition from and to (i.e. prev and next required) */
+ if (ELEM(NULL, estrip->prev, estrip->next))
+ return NULL;
+
+ /* evaluate controls for the relevant extents of the bordering strips... */
+ nlastrip_evaluate_controls(estrip->prev, estrip->start);
+ nlastrip_evaluate_controls(estrip->next, estrip->end);
+ break;
+ }
+
+ /* add to list of strips we need to evaluate */
+ nes= MEM_callocN(sizeof(NlaEvalStrip), "NlaEvalStrip");
+
+ nes->strip= estrip;
+ nes->strip_mode= side;
+ nes->track_index= index;
+ nes->strip_time= estrip->strip_time;
+
+ if (list)
+ BLI_addtail(list, nes);
+
+ return nes;
+}
/* ---------------------- */
-/* evaluate the F-Curves controlling settings for the NLA-strips (currently, not relinkable) */
-static void nlastrip_evaluate_fcurves (NlaStrip *strip, float ctime)
+/* find an NlaEvalChannel that matches the given criteria
+ * - ptr and prop are the RNA data to find a match for
+ */
+static NlaEvalChannel *nlaevalchan_find_match (ListBase *channels, PointerRNA *ptr, PropertyRNA *prop, int array_index)
{
- //PointerRNA actstrip_ptr;
- //FCurve *fcu;
+ NlaEvalChannel *nec;
- /* create RNA-pointer needed to set values */
- //RNA_pointer_create(NULL, &RNA_NlaStrip, strip, &actstrip_ptr);
+ /* sanity check */
+ if (channels == NULL)
+ return NULL;
+
+ /* loop through existing channels, checking for a channel which affects the same property */
+ for (nec= channels->first; nec; nec= nec->next) {
+ /* - comparing the PointerRNA's is done by comparing the pointers
+ * to the actual struct the property resides in, since that all the
+ * other data stored in PointerRNA cannot allow us to definitively
+ * identify the data
+ */
+ if ((nec->ptr.data == ptr->data) && (nec->prop == prop) && (nec->index == array_index))
+ return nec;
+ }
- /* execute these settings as per normal */
- //animsys_evaluate_fcurves(&actstrip_ptr, &strip->fcurves, NULL, ctime);
+ /* not found */
+ return NULL;
}
+/* verify that an appropriate NlaEvalChannel for this F-Curve exists */
+static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels, NlaEvalStrip *nes, FCurve *fcu, short *newChan)
+{
+ NlaEvalChannel *nec;
+ NlaStrip *strip= nes->strip;
+ PropertyRNA *prop;
+ PointerRNA new_ptr;
+ char *path = NULL;
+ short free_path=0;
+
+ /* sanity checks */
+ if (channels == NULL)
+ return NULL;
+
+ /* get RNA pointer+property info from F-Curve for more convenient handling */
+ /* get path, remapped as appropriate to work in its new environment */
+ free_path= animsys_remap_path(strip->remap, fcu->rna_path, &path);
+
+ /* a valid property must be available, and it must be animateable */
+ if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) {
+ if (G.f & G_DEBUG) printf("NLA Strip Eval: Cannot resolve path \n");
+ return NULL;
+ }
+ /* only ok if animateable */
+ else if (RNA_property_animateable(&new_ptr, prop) == 0) {
+ if (G.f & G_DEBUG) printf("NLA Strip Eval: Property not animateable \n");
+ return NULL;
+ }
+
+ /* try to find a match */
+ nec= nlaevalchan_find_match(channels, &new_ptr, prop, fcu->array_index);
+
+ /* allocate a new struct for this if none found */
+ if (nec == NULL) {
+ nec= MEM_callocN(sizeof(NlaEvalChannel), "NlaEvalChannel");
+ *newChan= 1;
+ BLI_addtail(channels, nec);
+
+ nec->ptr= new_ptr;
+ nec->prop= prop;
+ nec->index= fcu->array_index;
+ }
+ else
+ *newChan= 0;
+
+ /* we can now return */
+ return nec;
+}
-/* gets the strip active at the current time for a track */
-static void nlatrack_ctime_get_strip (ListBase *list, NlaTrack *nlt, short index, float ctime)
+/* accumulate (i.e. blend) the given value on to the channel it affects */
+static void nlaevalchan_accumulate (NlaEvalChannel *nec, NlaEvalStrip *nes, short newChan, float value)
{
- NlaStrip *strip, *astrip=NULL, *bstrip=NULL;
- NlaEvalStrip *nes;
- short side= 0;
+ NlaStrip *strip= nes->strip;
+ short blendmode= strip->blendmode;
+ float inf= strip->influence;
+
+ /* if channel is new, just store value regardless of blending factors, etc. */
+ if (newChan) {
+ nec->value= value;
+ return;
+ }
+
+ /* if this is being performed as part of transition evaluation, incorporate
+ * an additional weighting factor for the influence
+ */
+ if (nes->strip_mode == NES_TIME_TRANSITION_END)
+ inf *= nes->strip_time;
+
+ /* premultiply the value by the weighting factor */
+ if (IS_EQ(inf, 0)) return;
+ value *= inf;
+
+ /* perform blending */
+ switch (blendmode) {
+ case NLASTRIP_MODE_ADD:
+ /* simply add the scaled value on to the stack */
+ nec->value += value;
+ break;
+
+ case NLASTRIP_MODE_SUBTRACT:
+ /* simply subtract the scaled value from the stack */
+ nec->value -= value;
+ break;
+
+ case NLASTRIP_MODE_MULTIPLY:
+ /* multiply the scaled value with the stack */
+ nec->value *= value;
+ break;
+
+ case NLASTRIP_MODE_REPLACE:
+ default: // TODO: do we really want to blend by default? it seems more uses might prefer add...
+ /* do linear interpolation
+ * - the influence of the accumulated data (elsewhere, that is called dstweight)
+ * is 1 - influence, since the strip's influence is srcweight
+ */
+ nec->value= nec->value * (1.0f - inf) + value;
+ break;
+ }
+}
+
+/* accumulate the results of a temporary buffer with the results of the full-buffer */
+static void nlaevalchan_buffers_accumulate (ListBase *channels, ListBase *tmp_buffer, NlaEvalStrip *nes)
+{
+ NlaEvalChannel *nec, *necn, *necd;
- /* skip if track is muted */
- if (nlt->flag & NLATRACK_MUTED)
+ /* optimise - abort if no channels */
+ if (tmp_buffer->first == NULL)
return;
- /* loop over strips, checking if they fall within the range */
- for (strip= nlt->strips.first; strip; strip= strip->next) {
- /* only consider if:
- * - current time occurs within strip's extents
- * - current time occurs before strip (if it is the first)
- * - current time occurs after strip (if hold is on)
- * - current time occurs between strips (1st of those isn't holding) - blend!
+ /* accumulate results in tmp_channels buffer to the accumulation buffer */
+ for (nec= tmp_buffer->first; nec; nec= necn) {
+ /* get pointer to next channel in case we remove the current channel from the temp-buffer */
+ necn= nec->next;
+
+ /* try to find an existing matching channel for this setting in the accumulation buffer */
+ necd= nlaevalchan_find_match(channels, &nec->ptr, nec->prop, nec->index);
+
+ /* if there was a matching channel already in the buffer, accumulate to it,
+ * otherwise, add the current channel to the buffer for efficiency
*/
- if (IN_RANGE(ctime, strip->start, strip->end)) {
- astrip= strip;
- side= NES_TIME_WITHIN;
- break;
+ if (necd)
+ nlaevalchan_accumulate(necd, nes, 0, nec->value);
+ else {
+ BLI_remlink(tmp_buffer, nec);
+ BLI_addtail(channels, nec);
}
- else if (ctime < strip->start) {
- if (strip == nlt->strips.first) {
- astrip= strip;
- side= NES_TIME_BEFORE;
- break;
- }
- else {
- astrip= strip->prev;
-
- if (astrip->flag & NLASTRIP_HOLDLASTFRAME) {
- side= NES_TIME_AFTER;
- break;
- }
- else {
- bstrip= strip;
- side= NES_TIME_AFTER_BLEND;
- break;
- }
- }
+ }
+
+ /* free temp-channels that haven't been assimilated into the buffer */
+ BLI_freelistN(tmp_buffer);
+}
+
+/* ---------------------- */
+/* F-Modifier stack joining/separation utilities - should we generalise these for BLI_listbase.h interface? */
+
+/* Temporarily join two lists of modifiers together, storing the result in a third list */
+static void nlaeval_fmodifiers_join_stacks (ListBase *result, ListBase *list1, ListBase *list2)
+{
+ FModifier *fcm1, *fcm2;
+
+ /* if list1 is invalid... */
+ if ELEM(NULL, list1, list1->first) {
+ if (list2 && list2->first) {
+ result->first= list2->first;
+ result->last= list2->last;
}
}
+ /* if list 2 is invalid... */
+ else if ELEM(NULL, list2, list2->first) {
+ result->first= list1->first;
+ result->last= list1->last;
+ }
+ else {
+ /* list1 should be added first, and list2 second, with the endpoints of these being the endpoints for result
+ * - the original lists must be left unchanged though, as we need that fact for restoring
+ */
+ result->first= list1->first;
+ result->last= list2->last;
+
+ fcm1= list1->last;
+ fcm2= list2->first;
+
+ fcm1->next= fcm2;
+ fcm2->prev= fcm1;
+ }
+}
+
+/* Split two temporary lists of modifiers */
+static void nlaeval_fmodifiers_split_stacks (ListBase *list1, ListBase *list2)
+{
+ FModifier *fcm1, *fcm2;
- /* check if strip has been found (and whether it has data worth considering) */
- if (ELEM(NULL, astrip, astrip->act))
+ /* if list1/2 is invalid... just skip */
+ if ELEM(NULL, list1, list2)
return;
- if (astrip->flag & NLASTRIP_MUTE)
+ if ELEM(NULL, list1->first, list2->first)
return;
+
+ /* get endpoints */
+ fcm1= list1->last;
+ fcm2= list2->first;
- /* check if blending between strips */
- if (side == NES_TIME_AFTER_BLEND) {
- /* blending between strips... so calculate influence+act_time of both */
- nlastrip_evaluate_fcurves(astrip, ctime);
- nlastrip_evaluate_fcurves(bstrip, ctime);
+ /* clear their links */
+ fcm1->next= NULL;
+ fcm2->prev= NULL;
+}
+
+/* ---------------------- */
+
+/* evaluate action-clip strip */
+static void nlastrip_evaluate_actionclip (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
+{
+ ListBase tmp_modifiers = {NULL, NULL};
+ NlaStrip *strip= nes->strip;
+ FCurve *fcu;
+ float evaltime;
+
+ /* join this strip's modifiers to the parent's modifiers (own modifiers first) */
+ nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &strip->modifiers, modifiers);
+
+ /* evaluate strip's modifiers which modify time to evaluate the base curves at */
+ evaltime= evaluate_time_fmodifiers(&tmp_modifiers, NULL, 0.0f, strip->strip_time);
+
+ /* evaluate all the F-Curves in the action, saving the relevant pointers to data that will need to be used */
+ for (fcu= strip->act->curves.first; fcu; fcu= fcu->next) {
+ NlaEvalChannel *nec;
+ float value = 0.0f;
+ short newChan = -1;
- if ((astrip->influence <= 0.0f) && (bstrip->influence <= 0.0f))
- return;
+ /* check if this curve should be skipped */
+ if (fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED))
+ continue;
+ if ((fcu->grp) && (fcu->grp->flag & AGRP_MUTED))
+ continue;
+
+ /* evaluate the F-Curve's value for the time given in the strip
+ * NOTE: we use the modified time here, since strip's F-Curve Modifiers are applied on top of this
+ */
+ value= evaluate_fcurve(fcu, evaltime);
+
+ /* apply strip's F-Curve Modifiers on this value
+ * NOTE: we apply the strip's original evaluation time not the modified one (as per standard F-Curve eval)
+ */
+ evaluate_value_fmodifiers(&tmp_modifiers, fcu, &value, strip->strip_time);
+
+
+ /* get an NLA evaluation channel to work with, and accumulate the evaluated value with the value(s)
+ * stored in this channel if it has been used already
+ */
+ nec= nlaevalchan_verify(ptr, channels, nes, fcu, &newChan);
+ if (nec)
+ nlaevalchan_accumulate(nec, nes, newChan, value);
+ }
+
+ /* unlink this strip's modifiers from the parent's modifiers again */
+ nlaeval_fmodifiers_split_stacks(&strip->modifiers, modifiers);
+}
+
+/* evaluate transition strip */
+static void nlastrip_evaluate_transition (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
+{
+ ListBase tmp_channels = {NULL, NULL};
+ ListBase tmp_modifiers = {NULL, NULL};
+ NlaEvalStrip tmp_nes;
+ NlaStrip *s1, *s2;
+
+ /* join this strip's modifiers to the parent's modifiers (own modifiers first) */
+ nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &nes->strip->modifiers, modifiers);
+
+ /* get the two strips to operate on
+ * - we use the endpoints of the strips directly flanking our strip
+ * using these as the endpoints of the transition (destination and source)
+ * - these should have already been determined to be valid...
+ * - if this strip is being played in reverse, we need to swap these endpoints
+ * otherwise they will be interpolated wrong
+ */
+ if (nes->strip->flag & NLASTRIP_FLAG_REVERSE) {
+ s1= nes->strip->next;
+ s2= nes->strip->prev;
}
else {
- /* calculate/set the influence+act_time of this strip - don't consider if 0 influence */
- nlastrip_evaluate_fcurves(astrip, ctime);
-
- if (astrip->influence <= 0.0f)
- return;
+ s1= nes->strip->prev;
+ s2= nes->strip->next;
}
+ /* prepare template for 'evaluation strip'
+ * - based on the transition strip's evaluation strip data
+ * - strip_mode is NES_TIME_TRANSITION_* based on which endpoint
+ * - strip_time is the 'normalised' (i.e. in-strip) time for evaluation,
+ * which doubles up as an additional weighting factor for the strip influences
+ * which allows us to appear to be 'interpolating' between the two extremes
+ */
+ tmp_nes= *nes;
- /* allocate new eval-strip for this strip + add to stack */
- nes= MEM_callocN(sizeof(NlaEvalStrip), "NlaEvalStrip");
+ /* evaluate these strips into a temp-buffer (tmp_channels) */
+ // FIXME: modifier evalation here needs some work...
+ /* first strip */
+ tmp_nes.strip_mode= NES_TIME_TRANSITION_START;
+ tmp_nes.strip= s1;
+ nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes);
- nes->track= nlt;
- nes->strip= astrip;
- nes->sblend= bstrip;
- nes->track_index= index;
- nes->strip_mode= side;
+ /* second strip */
+ tmp_nes.strip_mode= NES_TIME_TRANSITION_END;
+ tmp_nes.strip= s2;
+ nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes);
+
+
+ /* assumulate temp-buffer and full-buffer, using the 'real' strip */
+ nlaevalchan_buffers_accumulate(channels, &tmp_channels, nes);
- BLI_addtail(list, nes);
+ /* unlink this strip's modifiers from the parent's modifiers again */
+ nlaeval_fmodifiers_split_stacks(&nes->strip->modifiers, modifiers);
}
-/* ---------------------- */
+/* evaluate meta-strip */
+static void nlastrip_evaluate_meta (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
+{
+ ListBase tmp_channels = {NULL, NULL};
+ ListBase tmp_modifiers = {NULL, NULL};
+ NlaStrip *strip= nes->strip;
+ NlaEvalStrip *tmp_nes;
+ float evaltime;
+
+ /* meta-strip was calculated normally to have some time to be evaluated at
+ * and here we 'look inside' the meta strip, treating it as a decorated window to
+ * it's child strips, which get evaluated as if they were some tracks on a strip
+ * (but with some extra modifiers to apply).
+ *
+ * NOTE: keep this in sync with animsys_evaluate_nla()
+ */
+
+ /* join this strip's modifiers to the parent's modifiers (own modifiers first) */
+ nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &strip->modifiers, modifiers);
+
+ /* find the child-strip to evaluate */
+ evaltime= (nes->strip_time * (strip->end - strip->start)) + strip->start;
+ tmp_nes= nlastrips_ctime_get_strip(NULL, &strip->strips, -1, evaltime);
+ if (tmp_nes == NULL)
+ return;
+
+ /* evaluate child-strip into tmp_channels buffer before accumulating
+ * in the accumulation buffer
+ */
+ nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, tmp_nes);
+
+ /* assumulate temp-buffer and full-buffer, using the 'real' strip */
+ nlaevalchan_buffers_accumulate(channels, &tmp_channels, nes);
+
+ /* free temp eval-strip */
+ MEM_freeN(tmp_nes);
+
+ /* unlink this strip's modifiers from the parent's modifiers again */
+ nlaeval_fmodifiers_split_stacks(&strip->modifiers, modifiers);
+}
/* evaluates the given evaluation strip */
-// FIXME: will we need the evaluation cache table set up to blend stuff in?
-// TODO: only evaluate here, but flush in one go using the accumulated channels at end...
-static void nlastrip_ctime_evaluate (ListBase *channels, NlaEvalStrip *nes, float ctime)
+void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
{
- // 1. (in old code) was to extract 'IPO-channels' from actions
- // 2. blend between the 'accumulated' data, and the new data
+ NlaStrip *strip= nes->strip;
+
+ /* to prevent potential infinite recursion problems (i.e. transition strip, beside meta strip containing a transition
+ * several levels deep inside it), we tag the current strip as being evaluated, and clear this when we leave
+ */
+ // TODO: be careful with this flag, since some edit tools may be running and have set this while animplayback was running
+ if (strip->flag & NLASTRIP_FLAG_EDIT_TOUCHED)
+ return;
+ strip->flag |= NLASTRIP_FLAG_EDIT_TOUCHED;
+
+ /* actions to take depend on the type of strip */
+ switch (strip->type) {
+ case NLASTRIP_TYPE_CLIP: /* action-clip */
+ nlastrip_evaluate_actionclip(ptr, channels, modifiers, nes);
+ break;
+ case NLASTRIP_TYPE_TRANSITION: /* transition */
+ nlastrip_evaluate_transition(ptr, channels, modifiers, nes);
+ break;
+ case NLASTRIP_TYPE_META: /* meta */
+ nlastrip_evaluate_meta(ptr, channels, modifiers, nes);
+ break;
+ }
+
+ /* clear temp recursion safe-check */
+ strip->flag &= ~NLASTRIP_FLAG_EDIT_TOUCHED;
}
/* write the accumulated settings to */
-static void nladata_flush_channels (PointerRNA *ptr, ListBase *channels)
+void nladata_flush_channels (ListBase *channels)
{
+ NlaEvalChannel *nec;
+
+ /* sanity checks */
+ if (channels == NULL)
+ return;
+ /* for each channel with accumulated values, write its value on the property it affects */
+ for (nec= channels->first; nec; nec= nec->next) {
+ PointerRNA *ptr= &nec->ptr;
+ PropertyRNA *prop= nec->prop;
+ int array_index= nec->index;
+ float value= nec->value;
+
+ /* write values - see animsys_write_rna_setting() to sync the code */
+ switch (RNA_property_type(prop))
+ {
+ case PROP_BOOLEAN:
+ 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(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(prop))
+ RNA_property_float_set_index(ptr, prop, array_index, value);
+ else
+ RNA_property_float_set(ptr, prop, value);
+ break;
+ case PROP_ENUM:
+ RNA_property_enum_set(ptr, prop, (int)value);
+ break;
+ default:
+ // can't do anything with other types of property....
+ break;
+ }
+ }
}
/* ---------------------- */
@@ -702,9 +1197,26 @@ static void animsys_evaluate_nla (PointerRNA *ptr, AnimData *adt, float ctime)
ListBase echannels= {NULL, NULL};
NlaEvalStrip *nes;
+ // TODO: need to zero out all channels used, otherwise we have problems with threadsafety
+ // and also when the user jumps between different times instead of moving sequentially...
+
/* 1. get the stack of strips to evaluate at current time (influence calculated here) */
- for (nlt=adt->nla_tracks.first; nlt; nlt=nlt->next, track_index++)
- nlatrack_ctime_get_strip(&estrips, nlt, track_index, ctime);
+ for (nlt=adt->nla_tracks.first; nlt; nlt=nlt->next, track_index++) {
+ /* if tweaking is on and this strip is the tweaking track, stop on this one */
+ if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED))
+ break;
+
+ /* skip if we're only considering a track tagged 'solo' */
+ if ((adt->flag & ADT_NLA_SOLO_TRACK) && (nlt->flag & NLATRACK_SOLO)==0)
+ continue;
+ /* skip if track is muted */
+ if (nlt->flag & NLATRACK_MUTED)
+ continue;
+
+ /* otherwise, get strip to evaluate for this channel */
+ nes= nlastrips_ctime_get_strip(&estrips, &nlt->strips, track_index, ctime);
+ if (nes) nes->track= nlt;
+ }
/* only continue if there are strips to evaluate */
if (estrips.first == NULL)
@@ -713,10 +1225,10 @@ static void animsys_evaluate_nla (PointerRNA *ptr, AnimData *adt, float ctime)
/* 2. for each strip, evaluate then accumulate on top of existing channels, but don't set values yet */
for (nes= estrips.first; nes; nes= nes->next)
- nlastrip_ctime_evaluate(&echannels, nes, ctime);
+ nlastrip_evaluate(ptr, &echannels, NULL, nes);
/* 3. flush effects of accumulating channels in NLA to the actual data they affect */
- nladata_flush_channels(ptr, &echannels);
+ nladata_flush_channels(&echannels);
/* 4. free temporary evaluation data */
BLI_freelistN(&estrips);
@@ -798,17 +1310,23 @@ void BKE_animsys_evaluate_animdata (ID *id, AnimData *adt, float ctime, short re
* - NLA before Active Action, as Active Action behaves as 'tweaking track'
* that overrides 'rough' work in NLA
*/
+ // TODO: need to double check that this all works correctly
if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM))
{
/* evaluate NLA data */
if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF))
{
+ /* evaluate NLA-stack */
animsys_evaluate_nla(&id_ptr, adt, ctime);
+
+ /* evaluate 'active' Action (may be tweaking track) on top of results of NLA-evaluation
+ * - only do this if we're not exclusively evaluating the 'solo' NLA-track
+ */
+ if ((adt->action) && !(adt->flag & ADT_NLA_SOLO_TRACK))
+ animsys_evaluate_action(&id_ptr, adt->action, adt->remap, ctime);
}
-
- /* evaluate Action data */
- // FIXME: what if the solo track was not tweaking one, then nla-solo should be checked too?
- if (adt->action)
+ /* evaluate Active Action only */
+ else if (adt->action)
animsys_evaluate_action(&id_ptr, adt->action, adt->remap, ctime);
/* reset tag */
@@ -875,14 +1393,29 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
EVAL_ANIM_IDS(main->camera.first, ADT_RECALC_ANIM);
/* shapekeys */
+ // TODO: we probably need the same hack as for curves (ctime-hack)
EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
/* curves */
- // TODO...
+ /* we need to perform a special hack here to ensure that the ctime
+ * value of the curve gets set in case there's no animation for that
+ * - it needs to be set before animation is evaluated just so that
+ * animation can successfully override...
+ */
+ for (id= main->curve.first; id; id= id->next) {
+ AnimData *adt= BKE_animdata_from_id(id);
+ Curve *cu= (Curve *)id;
+
+ cu->ctime= ctime;
+ BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM);
+ }
/* meshes */
// TODO...
+ /* particles */
+ EVAL_ANIM_IDS(main->particle.first, ADT_RECALC_ANIM);
+
/* objects */
/* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets
* this tagged by Depsgraph on framechange
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 5fc7d18689d..d3d21018c1c 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -221,7 +221,6 @@ static void clear_global(void)
{
// extern short winqueue_break; /* screen.c */
-// XXX freeAllRad();
fastshade_free_render(); /* lamps hang otherwise */
free_main(G.main); /* free all lib data */
diff --git a/source/blender/blenkernel/intern/booleanops.c b/source/blender/blenkernel/intern/booleanops.c
index ef3a99f5fd8..b6d1f7612b0 100644
--- a/source/blender/blenkernel/intern/booleanops.c
+++ b/source/blender/blenkernel/intern/booleanops.c
@@ -161,6 +161,7 @@ typedef struct {
DerivedMesh *dm;
int pos;
int offset;
+ int flip;
} FaceIt;
static void FaceIt_Destruct(CSG_FaceIteratorDescriptor * iterator)
@@ -187,9 +188,15 @@ static void FaceIt_Fill(CSG_IteratorPtr it, CSG_IFace *face)
MFace *mfaces = face_it->dm->getTessFaceArray(face_it->dm);
MFace *mface = &mfaces[face_it->pos];
- face->vertex_index[0] = mface->v1;
+ /* reverse face vertices if necessary */
face->vertex_index[1] = mface->v2;
+ if( face_it->flip == 0 ) {
+ face->vertex_index[0] = mface->v1;
face->vertex_index[2] = mface->v3;
+ } else {
+ face->vertex_index[2] = mface->v1;
+ face->vertex_index[0] = mface->v3;
+ }
if (mface->v4) {
face->vertex_index[3] = mface->v4;
face->vertex_number = 4;
@@ -213,7 +220,7 @@ static void FaceIt_Reset(CSG_IteratorPtr it)
}
static void FaceIt_Construct(
- CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset)
+ CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset, Object *ob)
{
FaceIt *it;
if (output == 0) return;
@@ -228,6 +235,25 @@ static void FaceIt_Construct(
it->offset = offset;
it->pos = 0;
+ /* determine if we will need to reverse order of face vertices */
+ if (ob->size[0] < 0.0f) {
+ if (ob->size[1] < 0.0f && ob->size[2] < 0.0f) {
+ it->flip = 1;
+ } else if (ob->size[1] >= 0.0f && ob->size[2] >= 0.0f) {
+ it->flip = 1;
+ } else {
+ it->flip = 0;
+ }
+ } else {
+ if (ob->size[1] < 0.0f && ob->size[2] < 0.0f) {
+ it->flip = 0;
+ } else if (ob->size[1] >= 0.0f && ob->size[2] >= 0.0f) {
+ it->flip = 0;
+ } else {
+ it->flip = 1;
+ }
+ }
+
// assign iterator function pointers.
output->Step = FaceIt_Step;
output->Fill = FaceIt_Fill;
@@ -427,7 +453,7 @@ static void BuildMeshDescriptors(
struct CSG_VertexIteratorDescriptor * vertex_it)
{
VertexIt_Construct(vertex_it,dm, ob);
- FaceIt_Construct(face_it,dm,face_offset);
+ FaceIt_Construct(face_it,dm,face_offset,ob);
}
static void FreeMeshDescriptors(
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 1e12fcb2378..120e1360d48 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1590,7 +1590,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
BLI_edgehashIterator_free(ehi);
/* free old CustomData and assign new one */
- CustomData_free(&dm->edgeData, dm->numVertData);
+ CustomData_free(&dm->edgeData, dm->numEdgeData);
dm->edgeData = edgeData;
dm->numEdgeData = numEdges;
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index d0509c35ee0..b16a046cd58 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -33,6 +33,7 @@
#include "DNA_mesh_types.h"
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
+#include "DNA_particle_types.h"
#include "BKE_deform.h"
#include "BKE_DerivedMesh.h"
@@ -42,6 +43,7 @@
#include "BKE_object.h"
#include "BKE_modifier.h"
#include "BKE_utildefines.h"
+#include "BKE_particle.h"
#include "BKE_pointcache.h"
@@ -339,78 +341,102 @@ void bvhselftree_update_from_cloth(ClothModifierData *clmd, int moving)
}
int modifiers_indexInObject(Object *ob, ModifierData *md_seek);
+static void cloth_write_state(int index, void *cloth_v, float *data)
+{
+ Cloth *cloth= cloth_v;
+ ClothVertex *vert = cloth->verts + index;
-int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr)
+ memcpy(data, vert->x, 3 * sizeof(float));
+ memcpy(data + 3, vert->xconst, 3 * sizeof(float));
+ memcpy(data + 6, vert->v, 3 * sizeof(float));
+}
+static void cloth_read_state(int index, void *cloth_v, float *data)
{
- PTCacheID pid;
- PTCacheFile *pf;
- Cloth *cloth = clmd->clothObject;
- unsigned int a, ret = 1;
+ Cloth *cloth= cloth_v;
+ ClothVertex *vert = cloth->verts + index;
- if(!cloth)
- return 0;
-
- BKE_ptcache_id_from_cloth(&pid, ob, clmd);
- pf = BKE_ptcache_file_open(&pid, PTCACHE_FILE_READ, framenr);
- if(pf) {
- for(a = 0; a < cloth->numverts; a++) {
- if(!BKE_ptcache_file_read_floats(pf, cloth->verts[a].x, 3)) {
- ret = 0;
- break;
- }
- if(!BKE_ptcache_file_read_floats(pf, cloth->verts[a].xconst, 3)) {
- ret = 0;
- break;
- }
- if(!BKE_ptcache_file_read_floats(pf, cloth->verts[a].v, 3)) {
- ret = 0;
- break;
- }
- }
-
- BKE_ptcache_file_close(pf);
- }
- else
- ret = 0;
-
- return ret;
+ memcpy(vert->x, data, 3 * sizeof(float));
+ memcpy(vert->xconst, data + 3, 3 * sizeof(float));
+ memcpy(vert->v, data + 6, 3 * sizeof(float));
}
+static void cloth_cache_interpolate(int index, void *cloth_v, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2)
+{
+ Cloth *cloth= cloth_v;
+ ClothVertex *vert = cloth->verts + index;
+ ParticleKey keys[4];
+ float dfra;
-void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
+ if(cfra1 == cfra2) {
+ cloth_read_state(index, cloth, data1);
+ return;
+ }
+
+ memcpy(keys[1].co, data1, 3 * sizeof(float));
+ memcpy(keys[1].vel, data1 + 6, 3 * sizeof(float));
+
+ memcpy(keys[2].co, data2, 3 * sizeof(float));
+ memcpy(keys[2].vel, data2 + 6, 3 * sizeof(float));
+
+ dfra = cfra2 - cfra1;
+
+ VecMulf(keys[1].vel, dfra);
+ VecMulf(keys[2].vel, dfra);
+
+ psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, keys, 1);
+
+ VecMulf(keys->vel, 1.0f / dfra);
+
+ memcpy(vert->x, keys->co, 3 * sizeof(float));
+ memcpy(vert->v, keys->vel, 3 * sizeof(float));
+
+ /* not sure what to do with this - jahka */
+ memcpy(vert->xconst, data1 + 3, 3 * sizeof(float));
+}
+void cloth_write_cache(Object *ob, ClothModifierData *clmd, int cfra)
{
+ PTCacheWriter writer;
PTCacheID pid;
-
+
BKE_ptcache_id_from_cloth(&pid, ob, clmd);
- // don't do anything as long as we're in editmode!
- if(pid.cache->flag & PTCACHE_BAKE_EDIT_ACTIVE)
- return;
-
- BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_AFTER, framenr);
+ writer.calldata = clmd->clothObject;
+ writer.cfra = cfra;
+ writer.set_elem = cloth_write_state;
+ writer.pid = &pid;
+ writer.totelem = clmd->clothObject->numverts;
+
+ BKE_ptcache_write_cache(&writer);
}
-void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr)
+int cloth_read_cache(Scene *scene, Object *ob, ClothModifierData *clmd, float cfra, int *old_framenr)
{
- Cloth *cloth = clmd->clothObject;
+ PTCacheReader reader;
PTCacheID pid;
- PTCacheFile *pf;
- unsigned int a;
- if(!cloth)
- return;
+ BKE_ptcache_id_from_cloth(&pid, ob, clmd);
+
+ reader.calldata = clmd->clothObject;
+ reader.cfra = cfra;
+ reader.interpolate_elem = cloth_cache_interpolate;
+ reader.old_frame = old_framenr;
+ reader.pid = &pid;
+ reader.scene = scene;
+ reader.set_elem = cloth_read_state;
+ reader.totelem = clmd->clothObject->numverts;
+
+ return BKE_ptcache_read_cache(&reader);
+}
+void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
+{
+ PTCacheID pid;
BKE_ptcache_id_from_cloth(&pid, ob, clmd);
- pf = BKE_ptcache_file_open(&pid, PTCACHE_FILE_WRITE, framenr);
- if(!pf)
+
+ // don't do anything as long as we're in editmode!
+ if(pid.cache->flag & PTCACHE_BAKE_EDIT_ACTIVE)
return;
- for(a = 0; a < cloth->numverts; a++) {
- BKE_ptcache_file_write_floats(pf, cloth->verts[a].x, 3);
- BKE_ptcache_file_write_floats(pf, cloth->verts[a].xconst, 3);
- BKE_ptcache_file_write_floats(pf, cloth->verts[a].v, 3);
- }
-
- BKE_ptcache_file_close(pf);
+ BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_AFTER, framenr);
}
static int do_init_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *result, int framenr)
@@ -486,6 +512,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
PTCacheID pid;
float timescale;
int framedelta, framenr, startframe, endframe;
+ int cache_result, old_framenr;
clmd->scene= scene; /* nice to pass on later :) */
framenr= (int)scene->r.cfra;
@@ -499,6 +526,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(!result) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
return dm;
}
@@ -510,6 +538,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(result->getNumVerts(result) != clmd->clothObject->numverts) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
return result;
}
}
@@ -521,6 +550,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(BKE_ptcache_get_continue_physics()) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
/* do simulation */
if(!do_init_cloth(ob, clmd, result, framenr))
@@ -536,6 +566,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(framenr < startframe) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
return result;
}
else if(framenr > endframe) {
@@ -552,7 +583,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
return result;
/* try to read from cache */
- if(cloth_read_cache(ob, clmd, framenr)) {
+ cache_result = cloth_read_cache(scene, ob, clmd, framenr, &old_framenr);
+
+ if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
cache->flag |= PTCACHE_SIMULATION_VALID;
cache->simframe= framenr;
@@ -561,25 +594,40 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
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;
+ cache->simframe= old_framenr;
+ }
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;
return result;
}
if(framenr == startframe) {
+ 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 */
}
- else if(framedelta == 1) {
+ else {
/* if on second frame, write cache for first frame */
- if(framenr == startframe+1)
+ if(cache->simframe == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0))
cloth_write_cache(ob, clmd, startframe);
+ clmd->sim_parms->timescale *= framenr - cache->simframe;
+
/* do simulation */
cache->flag |= PTCACHE_SIMULATION_VALID;
cache->simframe= framenr;
@@ -587,16 +635,13 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(!do_step_cloth(ob, clmd, result, framenr)) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
}
else
cloth_write_cache(ob, clmd, framenr);
cloth_to_object (ob, clmd, result);
}
- else {
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- }
return result;
}
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 059687030cb..f1420db706f 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3029,7 +3029,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
if (VALID_CONS_TARGET(ct)) {
float loc[3], eul[3], size[3];
float dvec[3], sval[3];
- short i;
+ int i;
/* obtain target effect */
switch (data->from) {
@@ -3076,7 +3076,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
switch (data->to) {
case 2: /* scaling */
for (i=0; i<3; i++)
- size[i]= data->to_min[i] + (sval[data->map[i]] * (data->to_max[i] - data->to_min[i]));
+ size[i]= data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i]));
break;
case 1: /* rotation */
for (i=0; i<3; i++) {
@@ -3086,7 +3086,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
tmax= data->to_max[i];
/* all values here should be in degrees */
- eul[i]= tmin + (sval[data->map[i]] * (tmax - tmin));
+ eul[i]= tmin + (sval[(int)data->map[i]] * (tmax - tmin));
/* now convert final value back to radians */
eul[i] = (float)(eul[i] / 180 * M_PI);
@@ -3095,7 +3095,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
default: /* location */
/* get new location */
for (i=0; i<3; i++)
- loc[i]= (data->to_min[i] + (sval[data->map[i]] * (data->to_max[i] - data->to_min[i])));
+ loc[i]= (data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i])));
/* add original location back on (so that it can still be moved) */
VecAddf(loc, cob->matrix[3], loc);
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index ae541365b1e..1b499384886 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -280,6 +280,7 @@ void CTX_wm_menu_set(bContext *C, ARegion *menu)
struct bContextDataResult {
PointerRNA ptr;
ListBase list;
+ const char **dir;
};
static int ctx_data_get(bContext *C, const char *member, bContextDataResult *result)
@@ -357,25 +358,33 @@ static int ctx_data_collection_get(const bContext *C, const char *member, ListBa
return 1;
}
+ list->first= NULL;
+ list->last= NULL;
+
return 0;
}
-PointerRNA CTX_data_pointer_get(bContext *C, const char *member)
+PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
{
bContextDataResult result;
- if(ctx_data_get((bContext*)C, member, &result)) {
+ if(ctx_data_get((bContext*)C, member, &result))
return result.ptr;
- }
- else {
- PointerRNA ptr;
- memset(&ptr, 0, sizeof(ptr));
- return ptr;
- }
+ else
+ return PointerRNA_NULL;
+}
+PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
+{
+ PointerRNA ptr = CTX_data_pointer_get(C, member);
+
+ if(ptr.data && RNA_struct_is_a(ptr.type, type))
+ return ptr;
+
+ return PointerRNA_NULL;
}
-ListBase CTX_data_collection_get(bContext *C, const char *member)
+ListBase CTX_data_collection_get(const bContext *C, const char *member)
{
bContextDataResult result;
@@ -389,7 +398,7 @@ ListBase CTX_data_collection_get(bContext *C, const char *member)
}
}
-void CTX_data_get(bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb)
+void CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb)
{
bContextDataResult result;
@@ -403,11 +412,75 @@ void CTX_data_get(bContext *C, const char *member, PointerRNA *r_ptr, ListBase *
}
}
+static void data_dir_add(ListBase *lb, const char *member)
+{
+ LinkData *link;
+
+ if(strcmp(member, "scene") == 0) /* exception */
+ return;
+
+ for(link=lb->first; link; link=link->next)
+ if(strcmp(link->data, member) == 0)
+ return;
+
+ link= MEM_callocN(sizeof(LinkData), "LinkData");
+ link->data= (void*)member;
+ BLI_addtail(lb, link);
+}
+
+ListBase CTX_data_dir_get(const bContext *C)
+{
+ bContextDataResult result;
+ ListBase lb;
+ int a;
+
+ memset(&lb, 0, sizeof(lb));
+
+ if(C->wm.store) {
+ bContextStoreEntry *entry;
+
+ for(entry=C->wm.store->entries.first; entry; entry=entry->next)
+ data_dir_add(&lb, entry->name);
+ }
+ if(C->wm.region && C->wm.region->type && C->wm.region->type->context) {
+ memset(&result, 0, sizeof(result));
+ C->wm.region->type->context(C, "", &result);
+
+ if(result.dir)
+ for(a=0; result.dir[a]; a++)
+ data_dir_add(&lb, result.dir[a]);
+ }
+ if(C->wm.area && C->wm.area->type && C->wm.area->type->context) {
+ memset(&result, 0, sizeof(result));
+ C->wm.area->type->context(C, "", &result);
+
+ if(result.dir)
+ for(a=0; result.dir[a]; a++)
+ data_dir_add(&lb, result.dir[a]);
+ }
+ if(C->wm.screen && C->wm.screen->context) {
+ bContextDataCallback cb= C->wm.screen->context;
+ memset(&result, 0, sizeof(result));
+ cb(C, "", &result);
+
+ if(result.dir)
+ for(a=0; result.dir[a]; a++)
+ data_dir_add(&lb, result.dir[a]);
+ }
+
+ return lb;
+}
+
int CTX_data_equals(const char *member, const char *str)
{
return (strcmp(member, str) == 0);
}
+int CTX_data_dir(const char *member)
+{
+ return (strcmp(member, "") == 0);
+}
+
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
{
RNA_id_pointer_create(id, &result->ptr);
@@ -451,6 +524,11 @@ int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase
return 0;
}
+void CTX_data_dir_set(bContextDataResult *result, const char **dir)
+{
+ result->dir= dir;
+}
+
/* data context */
Main *CTX_data_main(const bContext *C)
@@ -528,6 +606,16 @@ int CTX_data_visible_bases(const bContext *C, ListBase *list)
return ctx_data_collection_get(C, "visible_bases", list);
}
+int CTX_data_selectable_objects(const bContext *C, ListBase *list)
+{
+ return ctx_data_collection_get(C, "selectable_objects", list);
+}
+
+int CTX_data_selectable_bases(const bContext *C, ListBase *list)
+{
+ return ctx_data_collection_get(C, "selectable_bases", list);
+}
+
struct Object *CTX_data_active_object(const bContext *C)
{
return ctx_data_pointer_get(C, "active_object");
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index fab9669d55f..7dd868278f4 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -155,7 +155,7 @@ Curve *add_curve(char *name, int type)
cu->str= MEM_mallocN(12, "str");
strcpy(cu->str, "Text");
cu->pos= 4;
- cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo");
+ cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo new");
cu->totbox= cu->actbox= 1;
cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox");
cu->tb[0].w = cu->tb[0].h = 0.0;
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index dfe3b7ea279..f52eec34cc7 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -61,6 +61,8 @@
#include "DNA_view2d_types.h"
#include "DNA_view3d_types.h"
+#include "BLI_ghash.h"
+
#include "BKE_action.h"
#include "BKE_effect.h"
#include "BKE_global.h"
@@ -557,23 +559,30 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation");
- if(psys->flag & PSYS_DISABLED || psys->flag & PSYS_DELETE)
+ if(!psys_check_enabled(ob, psys))
continue;
- if(part->phystype==PART_PHYS_KEYED && psys->keyed_ob &&
- BLI_findlink(&psys->keyed_ob->particlesystem,psys->keyed_psys-1)) {
- node2 = dag_get_node(dag, psys->keyed_ob);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA, "Particle Keyed Physics");
+ if(part->phystype==PART_PHYS_KEYED) {
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->ob && BLI_findlink(&kpt->ob->particlesystem, kpt->psys-1)) {
+ node2 = dag_get_node(dag, kpt->ob);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Keyed Physics");
+ }
+ else
+ break;
+ }
}
- if(part->draw_as == PART_DRAW_OB && part->dup_ob) {
+ if(part->ren_as == PART_DRAW_OB && part->dup_ob) {
node2 = dag_get_node(dag, part->dup_ob);
dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Object Visualisation");
if(part->dup_ob->type == OB_MBALL)
dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Object Visualisation");
}
- if(part->draw_as == PART_DRAW_GR && part->dup_group) {
+ if(part->ren_as == PART_DRAW_GR && part->dup_group) {
for(go=part->dup_group->gobject.first; go; go=go->next) {
node2 = dag_get_node(dag, go->ob);
dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Group Visualisation");
@@ -754,6 +763,9 @@ void free_forest(DagForest *Dag)
itN = itN->next;
MEM_freeN(tempN);
}
+
+ BLI_ghash_free(Dag->nodeHash, NULL, NULL);
+ Dag->nodeHash= NULL;
Dag->DagNode.first = NULL;
Dag->DagNode.last = NULL;
Dag->numNodes = 0;
@@ -762,13 +774,9 @@ void free_forest(DagForest *Dag)
DagNode * dag_find_node (DagForest *forest,void * fob)
{
- DagNode *node = forest->DagNode.first;
-
- while (node) {
- if (node->ob == fob)
- return node;
- node = node->next;
- }
+ if(forest->nodeHash)
+ return BLI_ghash_lookup(forest->nodeHash, fob);
+
return NULL;
}
@@ -794,7 +802,12 @@ DagNode * dag_add_node (DagForest *forest, void * fob)
forest->DagNode.first = node;
forest->numNodes = 1;
}
+
+ if(!forest->nodeHash)
+ forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+ BLI_ghash_insert(forest->nodeHash, fob, node);
}
+
return node;
}
@@ -1805,17 +1818,10 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
/* node was checked to have lasttime != curtime , and is of type ID_OB */
static unsigned int flush_layer_node(Scene *sce, DagNode *node, int curtime)
{
- Base *base;
DagAdjList *itA;
node->lasttime= curtime;
- node->lay= 0;
- for(base= sce->base.first; base; base= base->next) {
- if(node->ob == base->object) {
- node->lay= ((Object *)node->ob)->lay;
- break;
- }
- }
+ node->lay= node->scelay;
for(itA = node->child; itA; itA= itA->next) {
if(itA->node->type==ID_OB) {
@@ -1832,7 +1838,7 @@ static unsigned int flush_layer_node(Scene *sce, DagNode *node, int curtime)
}
/* node was checked to have lasttime != curtime , and is of type ID_OB */
-static void flush_pointcache_reset(DagNode *node, int curtime, int reset)
+static void flush_pointcache_reset(Scene *scene, DagNode *node, int curtime, int reset)
{
DagAdjList *itA;
Object *ob;
@@ -1845,13 +1851,13 @@ static void flush_pointcache_reset(DagNode *node, int curtime, int reset)
ob= (Object*)(node->ob);
if(reset || (ob->recalc & OB_RECALC)) {
- if(BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH))
+ if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH))
ob->recalc |= OB_RECALC_DATA;
- flush_pointcache_reset(itA->node, curtime, 1);
+ flush_pointcache_reset(scene, itA->node, curtime, 1);
}
else
- flush_pointcache_reset(itA->node, curtime, 0);
+ flush_pointcache_reset(scene, itA->node, curtime, 0);
}
}
}
@@ -1860,9 +1866,10 @@ static void flush_pointcache_reset(DagNode *node, int curtime, int reset)
/* flushes all recalc flags in objects down the dependency tree */
void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
{
- DagNode *firstnode;
+ DagNode *firstnode, *node;
DagAdjList *itA;
Object *ob;
+ Base *base;
int lasttime;
if(sce->theDag==NULL) {
@@ -1879,6 +1886,15 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
sce->theDag->time++; // so we know which nodes were accessed
lasttime= sce->theDag->time;
+
+ for(base= sce->base.first; base; base= base->next) {
+ node= dag_get_node(sce->theDag, base->object);
+ if(node)
+ node->scelay= base->object->lay;
+ else
+ node->scelay= 0;
+ }
+
for(itA = firstnode->child; itA; itA= itA->next)
if(itA->node->lasttime!=lasttime && itA->node->type==ID_OB)
flush_layer_node(sce, itA->node, lasttime);
@@ -1899,13 +1915,13 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
ob= (Object*)(itA->node->ob);
if(ob->recalc & OB_RECALC) {
- if(BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH))
+ if(BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH))
ob->recalc |= OB_RECALC_DATA;
- flush_pointcache_reset(itA->node, lasttime, 1);
+ flush_pointcache_reset(sce, itA->node, lasttime, 1);
}
else
- flush_pointcache_reset(itA->node, lasttime, 0);
+ flush_pointcache_reset(sce, itA->node, lasttime, 0);
}
}
}
@@ -2123,7 +2139,7 @@ void DAG_object_flush_update(Scene *sce, Object *ob, short flag)
if(ob==NULL || sce->theDag==NULL) return;
ob->recalc |= flag;
- BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH);
+ 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 */
@@ -2138,7 +2154,7 @@ void DAG_object_flush_update(Scene *sce, Object *ob, short flag)
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(obt, PTCACHE_RESET_DEPSGRAPH);
+ BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
}
}
}
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index b6525cd936f..3136630ce93 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -315,13 +315,19 @@ static void init_fastshade_shadeinput(Render *re)
static Render *fastshade_get_render(Scene *scene)
{
- Render *re= RE_GetRender("_Shade View_");
- if(re==NULL) {
- re= RE_NewRender("_Shade View_");
-
- RE_Database_Baking(re, scene, 0, 0); /* 0= no faces */
+ /* XXX ugly global still, but we can't do preview while rendering */
+ if(G.rendering==0) {
+
+ Render *re= RE_GetRender("_Shade View_");
+ if(re==NULL) {
+ re= RE_NewRender("_Shade View_");
+
+ RE_Database_Baking(re, scene, 0, 0); /* 0= no faces */
+ }
+ return re;
}
- return re;
+
+ return NULL;
}
/* called on file reading */
@@ -611,18 +617,20 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
void shadeMeshMCol(Scene *scene, Object *ob, Mesh *me)
{
+ Render *re= fastshade_get_render(scene);
int a;
char *cp;
unsigned int *mcol= (unsigned int*)me->mcol;
- Render *re= fastshade_get_render(scene);
- mesh_create_shadedColors(re, ob, 1, &mcol, NULL);
- me->mcol= (MCol*)mcol;
+ if(re) {
+ mesh_create_shadedColors(re, ob, 1, &mcol, NULL);
+ me->mcol= (MCol*)mcol;
- /* swap bytes */
- for(cp= (char *)me->mcol, a= 4*me->totface; a>0; a--, cp+=4) {
- SWAP(char, cp[0], cp[3]);
- SWAP(char, cp[1], cp[2]);
+ /* swap bytes */
+ for(cp= (char *)me->mcol, a= 4*me->totface; a>0; a--, cp+=4) {
+ SWAP(char, cp[0], cp[3]);
+ SWAP(char, cp[1], cp[2]);
+ }
}
}
@@ -641,6 +649,8 @@ void shadeDispList(Scene *scene, Base *base)
int a, need_orco;
re= fastshade_get_render(scene);
+ if(re==NULL)
+ return;
dl = find_displist(&ob->disp, DL_VERTCOL);
if (dl) {
@@ -1371,7 +1381,7 @@ static void displist_surf_indices(DispList *dl)
}
-void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, int forRender)
+void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, int forRender, int forOrco)
{
ListBase *nubase;
Nurb *nu;
@@ -1388,7 +1398,8 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, int forRende
else
nubase= &cu->nurb;
- curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
+ if(!forOrco)
+ curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
for (nu=nubase->first; nu; nu=nu->next) {
if(forRender || nu->hide==0) {
@@ -1442,7 +1453,8 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, int forRende
tex_space_curve(cu);
}
- curve_calc_modifiers_post(scene, ob, dispbase, forRender, originalVerts, deformedVerts);
+ if(!forOrco)
+ curve_calc_modifiers_post(scene, ob, dispbase, forRender, originalVerts, deformedVerts);
}
void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco)
@@ -1458,7 +1470,7 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco)
freedisplist(dispbase);
if(ob->type==OB_SURF) {
- makeDispListSurf(scene, ob, dispbase, 0);
+ makeDispListSurf(scene, ob, dispbase, 0, forOrco);
}
else if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
ListBase dlbev;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 9858025af5a..553fdfe530e 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include <math.h>
#include <stdlib.h>
@@ -54,6 +56,8 @@
#include "BLI_jitter.h"
#include "BLI_rand.h"
+#include "PIL_time.h"
+
#include "BKE_action.h"
#include "BKE_anim.h" /* needed for where_on_path */
#include "BKE_armature.h"
@@ -91,6 +95,20 @@
//XXX #include "BIF_screen.h"
+PartDeflect *object_add_collision_fields(void)
+{
+ PartDeflect *pd;
+
+ pd= MEM_callocN(sizeof(PartDeflect), "PartDeflect");
+
+ pd->pdef_sbdamp = 0.1f;
+ pd->pdef_sbift = 0.2f;
+ pd->pdef_sboft = 0.02f;
+ pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
+
+ return pd;
+}
+
/* temporal struct, used for reading return of mesh_get_mapped_verts_nors() */
typedef struct VeNoCo {
diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c
index 0afbbead2c6..5566851db43 100644
--- a/source/blender/blenkernel/intern/exotic.c
+++ b/source/blender/blenkernel/intern/exotic.c
@@ -27,48 +27,9 @@
*
* - Blender Foundation
*
- * ***** END GPL LICENSE BLOCK *****
- *
- * eigen videoscape formaat:
- *
- *
- * lamp:
- * 3DG2
- aantal_lampen
-
- type
- spsi spbl
- r, g, b, energy
- locx, locy, locz
- vecx, vecy, vecz
-
-
- curve / nurbs:
- 3DG3
- 5 of 11 (curve of surf)
- aantal_nurbs
- extr1 extr2
-
- mat[0][0] mat[0][1] mat[0][2] mat[0][3]
- mat[1][0] mat[1][1] mat[1][2] mat[1][3]
- ...
-
- type
- pntsu, pntsv
- resolu, resolv
- orderu, orderv
- flagu, flagv
-
- (als type==nurb) x y z w
- x y z w
- ...
- (als type==bez) xyz xyz xyz h1 h2 h3
- xyz xyz xyz h1 h2 h3
- ...
- *
- *
- */
+ * ***** END GPL LICENSE BLOCK *****/
+#include "BLI_storage.h"
#include <ctype.h> /* isdigit, isspace */
#include <math.h>
@@ -482,385 +443,6 @@ static void read_stl_mesh_ascii(Scene *scene, char *str)
#undef STLREADLINE
#undef STLREADVERT
-static void read_videoscape_mesh(Scene *scene, char *str)
-{
- Object *ob;
- Mesh *me;
- MVert *mvert;
- MFace *mface;
- Material *ma;
- FILE *fp;
- float *vertdata, *vd, min[3], max[3], cent[3], ftemp;
- unsigned int color[32], col;
- int totcol, a, b, verts, tottria=0, totquad=0, totedge=0, poly, nr0, nr, first;
- int end;
- char s[50];
-
- fp= fopen(str, "rb");
- if(fp==NULL) {
- //XXX error("Can't read file");
- return;
- }
-
- fscanf(fp, "%40s", s);
-
- fscanf(fp, "%d\n", &verts);
- if(verts<=0) {
- fclose(fp);
- //XXX error("Read error");
- return;
- }
-
- if(verts>MESH_MAX_VERTS) {
- //XXX error("too many vertices");
- fclose(fp);
- return;
- }
-
- INIT_MINMAX(min, max);
- vd= vertdata= MEM_mallocN(sizeof(float)*3*verts, "videoscapelezer");
-
- for(a=0; a<verts; a++) {
- fscanf(fp, "%f %f %f", vd, vd+1, vd+2);
- DO_MINMAX(vd, min, max);
- vd+=3;
- }
-
- /* count faces and colors */
- for(a=0; a<32; a++) color[a]= 0;
- totcol= 0;
- end= 1;
- while(end>0) {
- end= fscanf(fp,"%d", &poly);
- if(end<=0) break;
-
- if(poly==3) tottria++;
- else if(poly==4) totquad++;
- else totedge+= poly;
-
- for(a=0;a<poly;a++) {
- end= fscanf(fp,"%d", &nr);
- if(end<=0) break;
- }
- if(end<=0) break;
-
- end= fscanf(fp,"%i\n", &col);
- col &= 0xF0F0F0;
- for(a=0; a<totcol; a++) {
- if(color[a]==col) break;
- }
- if(a>=totcol && totcol<32) {
- color[totcol]= col;
- totcol++;
- }
- }
-
- /* new object */
- ob= add_object(scene, OB_MESH);
- me= ob->data;
- me->totvert= verts;
- me->totface= totedge+tottria+totquad;
-
- me->mvert= CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC,
- NULL, me->totvert);
- me->mface= CustomData_add_layer(&me->fdata, CD_MFACE, CD_CALLOC,
- NULL, me->totface);
-
- /* colors */
- if(totcol) {
- ob->mat= MEM_callocN(sizeof(void *)*totcol, "ob->mat");
- me->mat= MEM_callocN(sizeof(void *)*totcol, "me->mat");
- me->totcol= totcol;
- ob->totcol= (unsigned char) me->totcol;
- ob->actcol= 1;
- }
-
- /* materials */
- for(a=0; a<totcol; a++) {
- ma= G.main->mat.first;
- while(ma) {
- if(ma->mtex[0]==0) {
- col= rgb_to_cpack(ma->r, ma->g, ma->b);
- if(color[a]==col) {
- me->mat[a]= ma;
- ma->id.us++;
- break;
- }
- }
- ma= ma->id.next;
- }
- if(ma==0) {
- ma= add_material("ext");
- me->mat[a]= ma;
- cpack_to_rgb(color[a], cent, cent+1, cent+2);
- ma->r= cent[0];
- ma->g= cent[1];
- ma->b= cent[2];
- automatname(ma);
- }
- }
-
- /* verts */
-
- cent[0]= (min[0]+max[0])/2.0f;
- cent[1]= (min[1]+max[1])/2.0f;
- cent[2]= (min[2]+max[2])/2.0f;
- VECCOPY(ob->loc, cent);
-
- a= me->totvert;
- vd= vertdata;
- mvert= me->mvert;
- while(a--) {
- VecSubf(mvert->co, vd, cent);
- mvert++;
- vd+= 3;
- }
-
- /* faces */
- if(me->totface) {
- rewind(fp);
-
- fscanf(fp, "%40s", s);
- fscanf(fp, "%d\n", &verts);
- /* fake read */
- for(a=0;a<verts;a++) {
- fscanf(fp, "%f %f %f", &ftemp, &ftemp, &ftemp);
- }
-
- a= me->totface;
- mface= me->mface;
- while(a--) {
- end= fscanf(fp,"%d", &poly);
- if(end<=0) break;
-
- if(poly==3 || poly==4) {
- fscanf(fp,"%d", &nr);
- mface->v1= MIN2(nr, me->totvert-1);
- fscanf(fp,"%d", &nr);
- mface->v2= MIN2(nr, me->totvert-1);
- fscanf(fp,"%d", &nr);
- mface->v3= MIN2(nr, me->totvert-1);
- if(poly==4) {
- if( fscanf(fp,"%d", &nr) <=0 ) break;
- mface->v4= MIN2(nr, me->totvert-1);
- }
-
- test_index_face(mface, NULL, 0, poly);
-
- mface++;
- }
- else {
- if( fscanf(fp,"%d", &nr0) <=0) break;
- first= nr0;
- for(b=1; b<poly; b++) {
- end= fscanf(fp,"%d", &nr);
- if(end<=0) break;
- nr= MIN2(nr, me->totvert-1);
- mface->v1= nr;
- mface->v2= nr0;
- nr0= nr;
- mface++;
- a--;
- }
- mface->v1= first;
- mface->v2= nr;
- mface++;
- if(end<=0) break;
- }
- end= fscanf(fp,"%i", &col);
- col &= 0xF0F0F0;
- if(end<=0) break;
-
- for(b=0; b<totcol; b++) {
- if(color[b]==col) {
- (mface-1)->mat_nr= b;
- break;
- }
- }
- }
- }
-
- fclose(fp);
- MEM_freeN(vertdata);
-
- mesh_add_normals_flags(me);
- make_edges(me, 0);
-
- //XXX waitcursor(1);
-}
-
-static void read_videoscape_lamp(Scene *scene, char *str)
-{
- Object *ob;
- Lamp *la;
- FILE *fp;
- float vec[3], q1[4];
- int tot, val;
- char s[50];
-
- fp= fopen(str, "rb");
- if(fp==NULL) {
- //XXX error("Can't read file");
- return;
- }
-
- fscanf(fp, "%40s", s);
- fscanf(fp, "%d\n", &tot);
-
- while(tot--) {
- ob= add_object(scene, OB_LAMP);
- la= ob->data;
-
- fscanf(fp, "%d\n", &val);
- la->type= val;
- if(la->type==1) la->type= LA_SPOT;
- else if(la->type==2) la->type= LA_SUN;
-
- fscanf(fp, "%f %f\n", &la->spotsize, &la->spotblend);
-
- fscanf(fp, "%f %f %f %f\n", &la->r, &la->g, &la->b, &la->energy);
-
- fscanf(fp, "%f %f %f\n", ob->loc, ob->loc+1, ob->loc+2);
- val= fscanf(fp, "%f %f %f\n", vec, vec+1, vec+2);
- vectoquat(vec, 5, 2, q1);
- QuatToEul(q1, ob->rot);
-
- if(val<=0) break;
-
- }
- fclose(fp);
-}
-
-static void read_videoscape_nurbs(Scene *scene, char *str)
-{
- Object *ob;
- Curve *cu;
- Nurb *nu;
- BezTriple *bezt;
- BPoint *bp;
- FILE *fp;
- float tmat[4][4], omat[3][3], imat[3][3], mat[3][3];
- int a, tot, type, val;
- char s[50];
-
- fp= fopen(str, "rb");
- if(fp==NULL) {
- //XXX error("Can't read file");
- return;
- }
-
- fscanf(fp, "%40s", s);
- fscanf(fp, "%d\n", &type);
-
- if(type==5) ob= add_object(scene, OB_SURF);
- else ob= add_object(scene, OB_CURVE);
- cu= ob->data;
-
- fscanf(fp, "%d\n", &tot);
- fscanf(fp, "%d %d\n", &type, &val);
-
- cu->ext1= 0.002f*type;
- cu->ext2= 0.002f*val;
-
- for(a=0; a<4; a++) fscanf(fp, "%e %e %e %e\n", tmat[a], tmat[a]+1, tmat[a]+2, tmat[a]+3);
-
- VECCOPY(ob->loc, tmat[3]);
-
- Mat3CpyMat4(omat, tmat);
- Mat3ToEul(omat, ob->rot);
- EulToMat3(ob->rot, mat);
- Mat3Inv(imat, mat);
- Mat3MulMat3((float ( * )[3])tmat, imat, omat);
-
- while(tot--) {
- nu= (Nurb*)MEM_callocN(sizeof(Nurb),"nu from exotic");
- BLI_addtail(&cu->nurb, nu);
-
- fscanf(fp, "%d\n", &type);
- nu->type= type;
-
- fscanf(fp, "%d %d\n", &type, &val);
- nu->pntsu= type; nu->pntsv= val;
- fscanf(fp, "%d %d\n", &type, &val);
- nu->resolu= type; nu->resolv= val;
- fscanf(fp, "%d %d\n", &type, &val);
- nu->orderu= type; nu->orderv= val;
- fscanf(fp, "%d %d\n", &type, &val);
- nu->flagu= type; nu->flagv= val;
-
- if( (nu->type & 7)==CU_BEZIER) {
- a= nu->pntsu;
- nu->bezt= bezt= MEM_callocN(a*sizeof(BezTriple), "bezt from exotic");
- while(a--) {
- fscanf(fp, "%f %f %f ", bezt->vec[0], bezt->vec[0]+1, bezt->vec[0]+2);
- Mat4MulVecfl(tmat, bezt->vec[0]);
- fscanf(fp, "%f %f %f ", bezt->vec[1], bezt->vec[1]+1, bezt->vec[1]+2);
- Mat4MulVecfl(tmat, bezt->vec[1]);
- fscanf(fp, "%f %f %f ", bezt->vec[2], bezt->vec[2]+1, bezt->vec[2]+2);
- Mat4MulVecfl(tmat, bezt->vec[2]);
- fscanf(fp, "%d %d\n", &type, &val);
- bezt->h1= type;
- bezt->h2= val;
- bezt++;
- }
- }
- else {
- a= nu->pntsu*nu->pntsv;
- if(a) {
- nu->bp= bp= MEM_callocN(a*sizeof(BPoint), "bp from exotic");
- while(a--) {
- fscanf(fp, "%f %f %f %f\n", bp->vec, bp->vec+1, bp->vec+2, bp->vec+3);
- Mat4MulVecfl(tmat, bp->vec);
- bp++;
- }
-
- val= KNOTSU(nu);
- nu->knotsu= MEM_mallocN(sizeof(float)*val, "knots");
- for(a=0; a<val; a++) fscanf(fp, "%f\n", nu->knotsu+a);
-
- if(nu->pntsv>1) {
- val= KNOTSV(nu);
- nu->knotsv= MEM_mallocN(sizeof(float)*val, "knots");
- for(a=0; a<val; a++) fscanf(fp, "%f\n", nu->knotsv+a);
- }
- }
- else {
- BLI_remlink(&cu->nurb, nu);
- MEM_freeN(nu);
- }
- }
- }
- fclose(fp);
-}
-
-static void read_videoscape(Scene *scene, char *str)
-{
- int file, type;
- unsigned int val;
- unsigned short numlen;
- char name[FILE_MAXDIR+FILE_MAXFILE], head[FILE_MAXDIR+FILE_MAXFILE], tail[FILE_MAXFILE];
-
- strcpy(name, str);
-
- while( TRUE ) {
- file= open(name, O_BINARY|O_RDONLY);
- if(file<=0) break;
- else {
- read(file, &type, 4);
- close(file);
-
- if(type==DDG1) read_videoscape_mesh(scene, name);
- else if(type==DDG2) read_videoscape_lamp(scene, name);
- else if(type==DDG3) read_videoscape_nurbs(scene, name);
- }
-
- val = BLI_stringdec(name, head, tail, &numlen);
- BLI_stringenc(name, head, tail, numlen, val + 1);
-
- }
-}
-
-
/* ***************** INVENTOR ******************* */
@@ -1833,11 +1415,6 @@ static void displist_to_mesh(Scene *scene, DispList *dlfirst)
return;
}
- if(totcol>16) {
- //XXX error("Found more than 16 different colors");
- totcol= 16;
- }
-
vec[0]= (min[0]+max[0])/2;
vec[1]= (min[1]+max[1])/2;
vec[2]= (min[2]+max[2])/2;
@@ -1851,6 +1428,7 @@ static void displist_to_mesh(Scene *scene, DispList *dlfirst)
/* colors */
if(totcol) {
ob->mat= MEM_callocN(sizeof(void *)*totcol, "ob->mat");
+ ob->matbits= MEM_callocN(sizeof(char)*totcol, "ob->matbits");
me->mat= MEM_callocN(sizeof(void *)*totcol, "me->mat");
me->totcol= totcol;
ob->totcol= (unsigned char) me->totcol;
@@ -1900,7 +1478,7 @@ static void displist_to_mesh(Scene *scene, DispList *dlfirst)
dl= dlfirst;
while(dl) {
- colnr= (dl->col>15 ? 15: dl->col);
+ colnr= dl->col;
if(colnr) colnr--;
if(dl->type==DL_SURF) {
@@ -2204,16 +1782,7 @@ int BKE_read_exotic(Scene *scene, char *name)
if ((*s0 != FORM) && (strncmp(str, "BLEN", 4) != 0) && !BLI_testextensie(name,".blend.gz")) {
//XXX waitcursor(1);
-
- if(ELEM4(*s0, DDG1, DDG2, DDG3, DDG4)) {
- if(0) { // XXX obedit) {
- //XXX error("Unable to perform function in EditMode");
- } else {
- read_videoscape(scene, name);
- retval = 1;
- }
- }
- else if(strncmp(str, "#Inventor V1.0", 14)==0) {
+ if(strncmp(str, "#Inventor V1.0", 14)==0) {
if( strncmp(str+15, "ascii", 5)==0) {
read_inventor(scene, name, &lbase);
displist_to_objects(scene, &lbase);
@@ -2385,167 +1954,6 @@ void write_stl(Scene *scene, char *str)
//XXX waitcursor(0);
}
-static void write_videoscape_mesh(Scene *scene, Object *ob, char *str)
-{
- Mesh *me= ob->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
- Material *ma;
- MFace *mface;
- FILE *fp;
- EditVert *eve;
- EditFace *evl;
- unsigned int kleur[32];
- float co[3];
- int a;
- intptr_t tot;
- char *cp;
-
- if(ob && ob->type==OB_MESH);
- else {
- return;
- }
-
- kleur[0]= 0x00C0C0C0;
-
- cp= (char *)kleur;
- for(a=0; a<ob->totcol; a++, cp+=4) {
-
- ma= give_current_material(ob, a+1);
- if(ma) {
- cp[0]= (unsigned char) (255.0*ma->emit);
- cp[1]= (unsigned char) (255.0*ma->b);
- cp[2]= (unsigned char) (255.0*ma->g);
- cp[3]= (unsigned char) (255.0*ma->r);
- if(ENDIAN_ORDER==L_ENDIAN) SWITCH_INT(kleur[a]);
- }
- else kleur[a]= 0x00C0C0C0;
-
- if(a>30) break;
- }
-
- fp= fopen(str, "wb");
- if(fp==NULL) return;
-
- fprintf(fp,"3DG1\n");
-
- if(em) {
-
- fprintf(fp, "%d\n", em->totvert);
-
- tot= 0;
- eve= em->verts.first;
- while(eve) {
- VECCOPY(co, eve->co);
- Mat4MulVecfl(ob->obmat, co);
- fprintf(fp, "%f %f %f\n", co[0], co[1], co[2] );
- eve->tmp.l = tot;
- tot++;
- eve= eve->next;
- }
- evl= em->faces.first;
- while(evl) {
-
- if(evl->v4==0) {
- fprintf(fp, "3 %ld %ld %ld 0x%x\n",
- (intptr_t) evl->v1->tmp.l,
- (intptr_t) evl->v2->tmp.l,
- (intptr_t) evl->v3->tmp.l,
- kleur[evl->mat_nr]);
- }
- else {
- fprintf(fp, "4 %ld %ld %ld %ld 0x%x\n",
- (intptr_t) evl->v1->tmp.l,
- (intptr_t) evl->v2->tmp.l,
- (intptr_t) evl->v3->tmp.l,
- (intptr_t) evl->v4->tmp.l,
- kleur[evl->mat_nr]);
- }
- evl= evl->next;
- }
- }
- else {
- DerivedMesh *dm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
-
- me= ob->data;
-
- fprintf(fp, "%d\n", me->totvert);
-
- mface= me->mface;
- for(a=0; a<me->totvert; a++) {
- dm->getVertCo(dm, a, co);
- Mat4MulVecfl(ob->obmat, co);
- fprintf(fp, "%f %f %f\n", co[0], co[1], co[2] );
- }
- for(a=0; a<me->totface; a++, mface++) {
- if(mface->v4==0) {
- fprintf(fp, "3 %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, kleur[(int)mface->mat_nr]);
- }
- else {
- fprintf(fp, "4 %d %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, mface->v4, kleur[(int)mface->mat_nr]);
- }
- }
-
- dm->release(dm);
- }
-
- fclose(fp);
-
- if (em) BKE_mesh_end_editmesh(me, em);
-
-}
-
-
-void write_videoscape(Scene *scene, char *str)
-{
- Base *base;
- int file, val, lampdone=0;
- unsigned short numlen;
- char head[FILE_MAXFILE], tail[FILE_MAXFILE];
-
- if(BLI_testextensie(str,".trace")) str[ strlen(str)-6]= 0;
- if(BLI_testextensie(str,".blend")) str[ strlen(str)-6]= 0;
- if(BLI_testextensie(str,".ble")) str[ strlen(str)-4]= 0;
- if(BLI_testextensie(str,".obj")==0) strcat(str, ".obj");
-
- file= open(str,O_BINARY|O_RDONLY);
- close(file);
- //XXX saveover()
- // if(file>-1) if(!during_script() && saveover(str)==0) return;
-
- strcpy(temp_dir, str);
-
- base= scene->base.first;
- while(base) {
- if((base->flag & SELECT) && (base->lay & scene->lay)) {
- if(base->object->type==OB_MESH) {
- write_videoscape_mesh(scene, base->object, str);
- val = BLI_stringdec(str, head, tail, &numlen);
- BLI_stringenc(str, head, tail, numlen, val + 1);
- }
- else if(base->object->type==OB_CURVE || base->object->type==OB_SURF) {
- /* write_videoscape_nurbs(base->object, str); */
- /* val = stringdec(str, head, tail, &numlen); */
- /* stringenc(str, head, tail, numlen, val + 1); */
- }
- else if(lampdone==0 && base->object->type==OB_LAMP) {
- /* lampdone= 1; */
- /* write_videoscape_lamps(str); */
- /* val = stringdec(str, head, tail, &numlen); */
- /* stringenc(str, head, tail, numlen, val + 1); */
- }
- }
- base= base->next;
- }
-
-
- /* remove when higher numbers exist */
- while(remove(str)==0) {
-
- val = BLI_stringdec(str, head, tail, &numlen);
- BLI_stringenc(str, head, tail, numlen, val + 1);
- }
-}
-
/* ******************************* WRITE VRML ***************************** */
static void replace_chars(char *str1, char *str2)
@@ -3392,8 +2800,11 @@ static void dxf_add_mat (Object *ob, Mesh *me, float color[3], char *layer)
if (!me) return;
- if(ob) ob->mat= MEM_callocN(sizeof(void *)*1, "ob->mat");
- if(ob) ob->actcol= 1;
+ if(ob) {
+ ob->mat= MEM_callocN(sizeof(void *)*1, "ob->mat");
+ ob->matbits= MEM_callocN(sizeof(char)*1, "ob->matbits");
+ ob->actcol= 1;
+ }
me->totcol= 1;
me->mat= MEM_callocN(sizeof(void *)*1, "me->mat");
@@ -4641,7 +4052,6 @@ static void dxf_read(Scene *scene, char *filename)
ob->type= OB_MESH;
ob->dt= OB_SHADED;
- if(U.flag & USER_MAT_ON_OB) ob->colbits= -1;
ob->trackflag= OB_POSY;
ob->upflag= OB_POSZ;
@@ -4660,9 +4070,10 @@ static void dxf_read(Scene *scene, char *filename)
VECCOPY(ob->rot, obrot);
ob->mat= MEM_callocN(sizeof(void *)*1, "ob->mat");
+ ob->matbits= MEM_callocN(sizeof(char)*1, "ob->matbits");
ob->totcol= (unsigned char) ((Mesh*)ob->data)->totcol;
ob->actcol= 1;
-
+
/* note: materials are either linked to mesh or object, if both then
you have to increase user counts. below line is not needed.
I leave it commented out here as warning (ton) */
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index ad8115ba9aa..ebd94b94f8c 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1,5 +1,30 @@
-/* Testing code for new animation system in 2.5
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
@@ -31,7 +56,7 @@
#include "RNA_types.h"
#ifndef DISABLE_PYTHON
-#include "BPY_extern.h" /* for BPY_pydriver_eval() */
+#include "BPY_extern.h"
#endif
#define SMALL -1.0e-10
@@ -59,7 +84,7 @@ void free_fcurve (FCurve *fcu)
/* free extra data - i.e. modifiers, and driver */
fcurve_free_driver(fcu);
- fcurve_free_modifiers(fcu);
+ free_fmodifiers(&fcu->modifiers);
/* free f-curve itself */
MEM_freeN(fcu);
@@ -115,7 +140,7 @@ FCurve *copy_fcurve (FCurve *fcu)
fcu_d->driver= fcurve_copy_driver(fcu_d->driver);
/* copy modifiers */
- fcurve_copy_modifiers(&fcu_d->modifiers, &fcu->modifiers);
+ copy_fmodifiers(&fcu_d->modifiers, &fcu->modifiers);
/* return new data */
return fcu_d;
@@ -175,20 +200,6 @@ FCurve *list_find_fcurve (ListBase *list, const char rna_path[], const int array
return NULL;
}
-short on_keyframe_fcurve(FCurve *fcu, float cfra)
-{
- BezTriple *bezt;
- unsigned i;
-
- bezt= fcu->bezt;
- for (i=0; i<fcu->totvert; i++, bezt++) {
- if (IS_EQ(bezt->vec[1][0], cfra))
- return 1;
- }
-
- return 0;
-}
-
/* Calculate the extents of F-Curve's data */
void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax)
{
@@ -1245,1016 +1256,6 @@ static float fcurve_eval_samples (FCurve *fcu, FPoint *fpts, float evaltime)
return cvalue;
}
-/* ******************************** F-Curve Modifiers ********************************* */
-
-/* Template --------------------------- */
-
-/* Each modifier defines a set of functions, which will be called at the appropriate
- * times. In addition to this, each modifier should have a type-info struct, where
- * its functions are attached for use.
- */
-
-/* Template for type-info data:
- * - make a copy of this when creating new modifiers, and just change the functions
- * pointed to as necessary
- * - although the naming of functions doesn't matter, it would help for code
- * readability, to follow the same naming convention as is presented here
- * - any functions that a constraint doesn't need to define, don't define
- * for such cases, just use NULL
- * - these should be defined after all the functions have been defined, so that
- * forward-definitions/prototypes don't need to be used!
- * - keep this copy #if-def'd so that future constraints can get based off this
- */
-#if 0
-static FModifierTypeInfo FMI_MODNAME = {
- FMODIFIER_TYPE_MODNAME, /* type */
- sizeof(FMod_ModName), /* size */
- FMI_TYPE_SOME_ACTION, /* action type */
- FMI_REQUIRES_SOME_REQUIREMENT, /* requirements */
- "Modifier Name", /* name */
- "FMod_ModName", /* struct name */
- fcm_modname_free, /* free data */
- fcm_modname_relink, /* relink data */
- fcm_modname_copy, /* copy data */
- fcm_modname_new_data, /* new data */
- fcm_modname_verify, /* verify */
- fcm_modname_time, /* evaluate time */
- fcm_modname_evaluate /* evaluate */
-};
-#endif
-
-/* Generator F-Curve Modifier --------------------------- */
-
-/* Generators available:
- * 1) simple polynomial generator:
- * - Exanded form - (y = C[0]*(x^(n)) + C[1]*(x^(n-1)) + ... + C[n])
- * - Factorised form - (y = (C[0][0]*x + C[0][1]) * (C[1][0]*x + C[1][1]) * ... * (C[n][0]*x + C[n][1]))
- * 2) simple builin 'functions':
- * of the form (y = C[0] * fn( C[1]*x + C[2] ) + C[3])
- * where fn() can be any one of:
- * sin, cos, tan, ln, sqrt
- * 3) expression...
- */
-
-static void fcm_generator_free (FModifier *fcm)
-{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
-
- /* free polynomial coefficients array */
- if (data->coefficients)
- MEM_freeN(data->coefficients);
-}
-
-static void fcm_generator_copy (FModifier *fcm, FModifier *src)
-{
- FMod_Generator *gen= (FMod_Generator *)fcm->data;
- FMod_Generator *ogen= (FMod_Generator *)src->data;
-
- /* copy coefficients array? */
- if (ogen->coefficients)
- gen->coefficients= MEM_dupallocN(ogen->coefficients);
-}
-
-static void fcm_generator_new_data (void *mdata)
-{
- FMod_Generator *data= (FMod_Generator *)mdata;
- float *cp;
-
- /* set default generator to be linear 0-1 (gradient = 1, y-offset = 0) */
- data->poly_order= 1;
- data->arraysize= 2;
- cp= data->coefficients= MEM_callocN(sizeof(float)*2, "FMod_Generator_Coefs");
- cp[0] = 0; // y-offset
- cp[1] = 1; // gradient
-}
-
-static void fcm_generator_verify (FModifier *fcm)
-{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
-
- /* requirements depend on mode */
- switch (data->mode) {
- case FCM_GENERATOR_POLYNOMIAL: /* expanded polynomial expression */
- {
- /* arraysize needs to be order+1, so resize if not */
- if (data->arraysize != (data->poly_order+1)) {
- float *nc;
-
- /* make new coefficients array, and copy over as much data as can fit */
- nc= MEM_callocN(sizeof(float)*(data->poly_order+1), "FMod_Generator_Coefs");
-
- if (data->coefficients) {
- if (data->arraysize > (data->poly_order+1))
- memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order+1));
- else
- memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
-
- /* free the old data */
- MEM_freeN(data->coefficients);
- }
-
- /* set the new data */
- data->coefficients= nc;
- data->arraysize= data->poly_order+1;
- }
- }
- break;
-
- case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* expanded polynomial expression */
- {
- /* arraysize needs to be 2*order, so resize if not */
- if (data->arraysize != (data->poly_order * 2)) {
- float *nc;
-
- /* make new coefficients array, and copy over as much data as can fit */
- nc= MEM_callocN(sizeof(float)*(data->poly_order*2), "FMod_Generator_Coefs");
-
- if (data->coefficients) {
- if (data->arraysize > (data->poly_order * 2))
- memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order * 2));
- else
- memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
-
- /* free the old data */
- MEM_freeN(data->coefficients);
- }
-
- /* set the new data */
- data->coefficients= nc;
- data->arraysize= data->poly_order * 2;
- }
- }
- break;
-
- case FCM_GENERATOR_FUNCTION: /* builtin function */
- {
- /* arraysize needs to be 4*/
- if (data->arraysize != 4) {
- float *nc;
-
- /* free the old data */
- if (data->coefficients)
- MEM_freeN(data->coefficients);
-
- /* make new coefficients array, and init using default values */
- nc= data->coefficients= MEM_callocN(sizeof(float)*4, "FMod_Generator_Coefs");
- data->arraysize= 4;
-
- nc[0]= 1.0f;
- nc[1]= 1.0f;
- nc[2]= 0.0f;
- nc[3]= 0.0f;
- }
- }
- break;
- }
-}
-
-static void fcm_generator_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
-
- /* behaviour depends on mode
- * NOTE: the data in its default state is fine too
- */
- switch (data->mode) {
- case FCM_GENERATOR_POLYNOMIAL: /* expanded polynomial expression */
- {
- /* we overwrite cvalue with the sum of the polynomial */
- float *powers = MEM_callocN(sizeof(float)*data->arraysize, "Poly Powers");
- float value= 0.0f;
- unsigned int i;
-
- /* for each x^n, precalculate value based on previous one first... this should be
- * faster that calling pow() for each entry
- */
- for (i=0; i < data->arraysize; i++) {
- /* first entry is x^0 = 1, otherwise, calculate based on previous */
- if (i)
- powers[i]= powers[i-1] * evaltime;
- else
- powers[0]= 1;
- }
-
- /* for each coefficient, add to value, which we'll write to *cvalue in one go */
- for (i=0; i < data->arraysize; i++)
- value += data->coefficients[i] * powers[i];
-
- /* only if something changed, write *cvalue in one go */
- if (data->poly_order) {
- if (data->flag & FCM_GENERATOR_ADDITIVE)
- *cvalue += value;
- else
- *cvalue= value;
- }
-
- /* cleanup */
- if (powers)
- MEM_freeN(powers);
- }
- break;
-
- case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* factorised polynomial */
- {
- float value= 1.0f, *cp=NULL;
- unsigned int i;
-
- /* for each coefficient pair, solve for that bracket before accumulating in value by multiplying */
- for (cp=data->coefficients, i=0; (cp) && (i < data->poly_order); cp+=2, i++)
- value *= (cp[0]*evaltime + cp[1]);
-
- /* only if something changed, write *cvalue in one go */
- if (data->poly_order) {
- if (data->flag & FCM_GENERATOR_ADDITIVE)
- *cvalue += value;
- else
- *cvalue= value;
- }
- }
- break;
-
- case FCM_GENERATOR_FUNCTION: /* builtin function */
- {
- double arg= data->coefficients[1]*evaltime + data->coefficients[2];
- double (*fn)(double v) = NULL;
-
- /* get function pointer to the func to use:
- * WARNING: must perform special argument validation hereto guard against crashes
- */
- switch (data->func_type)
- {
- /* simple ones */
- case FCM_GENERATOR_FN_SIN: /* sine wave */
- fn= sin;
- break;
- case FCM_GENERATOR_FN_COS: /* cosine wave */
- fn= cos;
- break;
-
- /* validation required */
- case FCM_GENERATOR_FN_TAN: /* tangent wave */
- {
- /* check that argument is not on one of the discontinuities (i.e. 90deg, 270 deg, etc) */
- if IS_EQ(fmod((arg - M_PI_2), M_PI), 0.0) {
- if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
- }
- else
- fn= tan;
- }
- break;
- case FCM_GENERATOR_FN_LN: /* natural log */
- {
- /* check that value is greater than 1? */
- if (arg > 1.0f) {
- fn= log;
- }
- else {
- if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
- }
- }
- break;
- case FCM_GENERATOR_FN_SQRT: /* square root */
- {
- /* no negative numbers */
- if (arg > 0.0f) {
- fn= sqrt;
- }
- else {
- if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0)
- *cvalue = 0.0f; /* no value possible here */
- }
- }
- break;
-
- default:
- printf("Invalid Function-Generator for F-Modifier - %d \n", data->func_type);
- }
-
- /* execute function callback to set value if appropriate */
- if (fn) {
- float value= (float)(data->coefficients[0]*fn(arg) + data->coefficients[3]);
-
- if (data->flag & FCM_GENERATOR_ADDITIVE)
- *cvalue += value;
- else
- *cvalue= value;
- }
- }
- break;
-
-#ifndef DISABLE_PYTHON
- case FCM_GENERATOR_EXPRESSION: /* py-expression */
- // TODO...
- break;
-#endif /* DISABLE_PYTHON */
- }
-}
-
-static FModifierTypeInfo FMI_GENERATOR = {
- FMODIFIER_TYPE_GENERATOR, /* type */
- sizeof(FMod_Generator), /* size */
- FMI_TYPE_GENERATE_CURVE, /* action type */
- FMI_REQUIRES_NOTHING, /* requirements */
- "Generator", /* name */
- "FMod_Generator", /* struct name */
- fcm_generator_free, /* free data */
- fcm_generator_copy, /* copy data */
- fcm_generator_new_data, /* new data */
- fcm_generator_verify, /* verify */
- NULL, /* evaluate time */
- fcm_generator_evaluate /* evaluate */
-};
-
-/* Envelope F-Curve Modifier --------------------------- */
-
-static void fcm_envelope_free (FModifier *fcm)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
-
- /* free envelope data array */
- if (env->data)
- MEM_freeN(env->data);
-}
-
-static void fcm_envelope_copy (FModifier *fcm, FModifier *src)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
- FMod_Envelope *oenv= (FMod_Envelope *)src->data;
-
- /* copy envelope data array */
- if (oenv->data)
- env->data= MEM_dupallocN(oenv->data);
-}
-
-static void fcm_envelope_new_data (void *mdata)
-{
- FMod_Envelope *env= (FMod_Envelope *)mdata;
-
- /* set default min/max ranges */
- env->min= -1.0f;
- env->max= 1.0f;
-}
-
-static void fcm_envelope_verify (FModifier *fcm)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
-
- /* if the are points, perform bubble-sort on them, as user may have changed the order */
- if (env->data) {
- // XXX todo...
- }
-}
-
-static void fcm_envelope_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
- FCM_EnvelopeData *fed, *prevfed, *lastfed;
- float min=0.0f, max=0.0f, fac=0.0f;
- int a;
-
- /* get pointers */
- if (env->data == NULL) return;
- prevfed= env->data;
- fed= prevfed + 1;
- lastfed= prevfed + (env->totvert-1);
-
- /* get min/max values for envelope at evaluation time (relative to mid-value) */
- if (prevfed->time >= evaltime) {
- /* before or on first sample, so just extend value */
- min= prevfed->min;
- max= prevfed->max;
- }
- else if (lastfed->time <= evaltime) {
- /* after or on last sample, so just extend value */
- min= lastfed->min;
- max= lastfed->max;
- }
- else {
- /* evaltime occurs somewhere between segments */
- // TODO: implement binary search for this to make it faster?
- for (a=0; prevfed && fed && (a < env->totvert-1); a++, prevfed=fed, fed++) {
- /* evaltime occurs within the interval defined by these two envelope points */
- if ((prevfed->time <= evaltime) && (fed->time >= evaltime)) {
- float afac, bfac, diff;
-
- diff= fed->time - prevfed->time;
- afac= (evaltime - prevfed->time) / diff;
- bfac= (fed->time - evaltime) / diff;
-
- min= bfac*prevfed->min + afac*fed->min;
- max= bfac*prevfed->max + afac*fed->max;
-
- break;
- }
- }
- }
-
- /* adjust *cvalue
- * - fac is the ratio of how the current y-value corresponds to the reference range
- * - thus, the new value is found by mapping the old range to the new!
- */
- fac= (*cvalue - (env->midval + env->min)) / (env->max - env->min);
- *cvalue= min + fac*(max - min);
-}
-
-static FModifierTypeInfo FMI_ENVELOPE = {
- FMODIFIER_TYPE_ENVELOPE, /* type */
- sizeof(FMod_Envelope), /* size */
- FMI_TYPE_REPLACE_VALUES, /* action type */
- 0, /* requirements */
- "Envelope", /* name */
- "FMod_Envelope", /* struct name */
- fcm_envelope_free, /* free data */
- fcm_envelope_copy, /* copy data */
- fcm_envelope_new_data, /* new data */
- fcm_envelope_verify, /* verify */
- NULL, /* evaluate time */
- fcm_envelope_evaluate /* evaluate */
-};
-
-/* Cycles F-Curve Modifier --------------------------- */
-
-/* This modifier changes evaltime to something that exists within the curve's frame-range,
- * then re-evaluates modifier stack up to this point using the new time. This re-entrant behaviour
- * is very likely to be more time-consuming than the original approach... (which was tighly integrated into
- * the calculation code...).
- *
- * NOTE: this needs to be at the start of the stack to be of use, as it needs to know the extents of the keyframes/sample-data
- * Possible TODO - store length of cycle information that can be initialised from the extents of the keyframes/sample-data, and adjusted
- * as appropriate
- */
-
-/* temp data used during evaluation */
-typedef struct tFCMED_Cycles {
- float cycyofs; /* y-offset to apply */
-} tFCMED_Cycles;
-
-static void fcm_cycles_new_data (void *mdata)
-{
- FMod_Cycles *data= (FMod_Cycles *)mdata;
-
- /* turn on cycles by default */
- data->before_mode= data->after_mode= FCM_EXTRAPOLATE_CYCLIC;
-}
-
-static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float cvalue, float evaltime)
-{
- FMod_Cycles *data= (FMod_Cycles *)fcm->data;
- float prevkey[2], lastkey[2], cycyofs=0.0f;
- short side=0, mode=0;
- int cycles=0;
-
- /* check if modifier is first in stack, otherwise disable ourself... */
- // FIXME...
- if (fcm->prev) {
- fcm->flag |= FMODIFIER_FLAG_DISABLED;
- return evaltime;
- }
-
- /* calculate new evaltime due to cyclic interpolation */
- if (fcu && fcu->bezt) {
- BezTriple *prevbezt= fcu->bezt;
- BezTriple *lastbezt= prevbezt + fcu->totvert-1;
-
- prevkey[0]= prevbezt->vec[1][0];
- prevkey[1]= prevbezt->vec[1][1];
-
- lastkey[0]= lastbezt->vec[1][0];
- lastkey[1]= lastbezt->vec[1][1];
- }
- else if (fcu && fcu->fpt) {
- FPoint *prevfpt= fcu->fpt;
- FPoint *lastfpt= prevfpt + fcu->totvert-1;
-
- prevkey[0]= prevfpt->vec[0];
- prevkey[1]= prevfpt->vec[1];
-
- lastkey[0]= lastfpt->vec[0];
- lastkey[1]= lastfpt->vec[1];
- }
- else
- return evaltime;
-
- /* check if modifier will do anything
- * 1) if in data range, definitely don't do anything
- * 2) if before first frame or after last frame, make sure some cycling is in use
- */
- if (evaltime < prevkey[0]) {
- if (data->before_mode) {
- side= -1;
- mode= data->before_mode;
- cycles= data->before_cycles;
- }
- }
- else if (evaltime > lastkey[0]) {
- if (data->after_mode) {
- side= 1;
- mode= data->after_mode;
- cycles= data->after_cycles;
- }
- }
- if ELEM(0, side, mode)
- return evaltime;
-
- /* find relative place within a cycle */
- {
- float cycdx=0, cycdy=0, ofs=0;
- float cycle= 0;
-
- /* ofs is start frame of cycle */
- ofs= prevkey[0];
-
- /* calculate period and amplitude (total height) of a cycle */
- cycdx= lastkey[0] - prevkey[0];
- cycdy= lastkey[1] - prevkey[1];
-
- /* check if cycle is infinitely small, to be point of being impossible to use */
- if (cycdx == 0)
- return evaltime;
-
- /* calculate the 'number' of the cycle */
- cycle= ((float)side * (evaltime - ofs) / cycdx);
-
- /* check that cyclic is still enabled for the specified time */
- if (cycles == 0) {
- /* catch this case so that we don't exit when we have cycles=0
- * as this indicates infinite cycles...
- */
- }
- else if (cycle > (cycles+1)) {
- /* we are too far away from range to evaluate
- * TODO: but we should still hold last value...
- */
- return evaltime;
- }
-
- /* check if 'cyclic extrapolation', and thus calculate y-offset for this cycle */
- if (mode == FCM_EXTRAPOLATE_CYCLIC_OFFSET) {
- cycyofs = (float)floor((evaltime - ofs) / cycdx);
- cycyofs *= cycdy;
- }
-
- /* calculate where in the cycle we are (overwrite evaltime to reflect this) */
- if ((mode == FCM_EXTRAPOLATE_MIRROR) && ((int)(cycle) % 2)) {
- /* when 'mirror' option is used and cycle number is odd, this cycle is played in reverse
- * - for 'before' extrapolation, we need to flip in a different way, otherwise values past
- * then end of the curve get referenced (result of fmod will be negative, and with different phase)
- */
- if (side < 0)
- evaltime= (float)(prevkey[0] - fmod(evaltime-ofs, cycdx));
- else
- evaltime= (float)(lastkey[0] - fmod(evaltime-ofs, cycdx));
- }
- else {
- /* the cycle is played normally... */
- evaltime= (float)(fmod(evaltime-ofs, cycdx) + ofs);
- }
- if (evaltime < ofs) evaltime += cycdx;
- }
-
- /* store temp data if needed */
- if (mode == FCM_EXTRAPOLATE_CYCLIC_OFFSET) {
- tFCMED_Cycles *edata;
-
- /* for now, this is just a float, but we could get more stuff... */
- fcm->edata= edata= MEM_callocN(sizeof(tFCMED_Cycles), "tFCMED_Cycles");
- edata->cycyofs= cycyofs;
- }
-
- /* return the new frame to evaluate */
- return evaltime;
-}
-
-static void fcm_cycles_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
- tFCMED_Cycles *edata= (tFCMED_Cycles *)fcm->edata;
-
- /* use temp data */
- if (edata) {
- /* add cyclic offset - no need to check for now, otherwise the data wouldn't exist! */
- *cvalue += edata->cycyofs;
-
- /* free temp data */
- MEM_freeN(edata);
- fcm->edata= NULL;
- }
-}
-
-static FModifierTypeInfo FMI_CYCLES = {
- FMODIFIER_TYPE_CYCLES, /* type */
- sizeof(FMod_Cycles), /* size */
- FMI_TYPE_EXTRAPOLATION, /* action type */
- FMI_REQUIRES_ORIGINAL_DATA, /* requirements */
- "Cycles", /* name */
- "FMod_Cycles", /* struct name */
- NULL, /* free data */
- NULL, /* copy data */
- fcm_cycles_new_data, /* new data */
- NULL /*fcm_cycles_verify*/, /* verify */
- fcm_cycles_time, /* evaluate time */
- fcm_cycles_evaluate /* evaluate */
-};
-
-/* Noise F-Curve Modifier --------------------------- */
-
-static void fcm_noise_new_data (void *mdata)
-{
- FMod_Noise *data= (FMod_Noise *)mdata;
-
- /* defaults */
- data->size= 1.0f;
- data->strength= 1.0f;
- data->phase= 1.0f;
- data->depth = 0;
- data->modification = FCM_NOISE_MODIF_REPLACE;
-}
-
-static void fcm_noise_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
- FMod_Noise *data= (FMod_Noise *)fcm->data;
- float noise;
-
- noise = BLI_turbulence(data->size, evaltime, data->phase, 0.f, data->depth);
-
- switch (data->modification) {
- case FCM_NOISE_MODIF_ADD:
- *cvalue= *cvalue + noise * data->strength;
- break;
- case FCM_NOISE_MODIF_SUBTRACT:
- *cvalue= *cvalue - noise * data->strength;
- break;
- case FCM_NOISE_MODIF_MULTIPLY:
- *cvalue= *cvalue * noise * data->strength;
- break;
- case FCM_NOISE_MODIF_REPLACE:
- default:
- *cvalue= *cvalue + (noise - 0.5f) * data->strength;
- break;
- }
-}
-
-static FModifierTypeInfo FMI_NOISE = {
- FMODIFIER_TYPE_NOISE, /* type */
- sizeof(FMod_Noise), /* size */
- FMI_TYPE_REPLACE_VALUES, /* action type */
- 0, /* requirements */
- "Noise", /* name */
- "FMod_Noise", /* struct name */
- NULL, /* free data */
- NULL, /* copy data */
- fcm_noise_new_data, /* new data */
- NULL /*fcm_noise_verify*/, /* verify */
- NULL, /* evaluate time */
- fcm_noise_evaluate /* evaluate */
-};
-
-/* Filter F-Curve Modifier --------------------------- */
-
-#if 0 // XXX not yet implemented
-static FModifierTypeInfo FMI_FILTER = {
- FMODIFIER_TYPE_FILTER, /* type */
- sizeof(FMod_Filter), /* size */
- FMI_TYPE_REPLACE_VALUES, /* action type */
- 0, /* requirements */
- "Filter", /* name */
- "FMod_Filter", /* struct name */
- NULL, /* free data */
- NULL, /* copy data */
- NULL, /* new data */
- NULL /*fcm_filter_verify*/, /* verify */
- NULL, /* evlauate time */
- fcm_filter_evaluate /* evaluate */
-};
-#endif // XXX not yet implemented
-
-
-/* Python F-Curve Modifier --------------------------- */
-
-static void fcm_python_free (FModifier *fcm)
-{
- FMod_Python *data= (FMod_Python *)fcm->data;
-
- /* id-properties */
- IDP_FreeProperty(data->prop);
- MEM_freeN(data->prop);
-}
-
-static void fcm_python_new_data (void *mdata)
-{
- FMod_Python *data= (FMod_Python *)mdata;
-
- /* everything should be set correctly by calloc, except for the prop->type constant.*/
- data->prop = MEM_callocN(sizeof(IDProperty), "PyFModifierProps");
- data->prop->type = IDP_GROUP;
-}
-
-static void fcm_python_copy (FModifier *fcm, FModifier *src)
-{
- FMod_Python *pymod = (FMod_Python *)fcm->data;
- FMod_Python *opymod = (FMod_Python *)src->data;
-
- pymod->prop = IDP_CopyProperty(opymod->prop);
-}
-
-static void fcm_python_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
-#ifndef DISABLE_PYTHON
- //FMod_Python *data= (FMod_Python *)fcm->data;
-
- /* FIXME... need to implement this modifier...
- * It will need it execute a script using the custom properties
- */
-#endif /* DISABLE_PYTHON */
-}
-
-static FModifierTypeInfo FMI_PYTHON = {
- FMODIFIER_TYPE_PYTHON, /* type */
- sizeof(FMod_Python), /* size */
- FMI_TYPE_GENERATE_CURVE, /* action type */
- FMI_REQUIRES_RUNTIME_CHECK, /* requirements */
- "Python", /* name */
- "FMod_Python", /* struct name */
- fcm_python_free, /* free data */
- fcm_python_copy, /* copy data */
- fcm_python_new_data, /* new data */
- NULL /*fcm_python_verify*/, /* verify */
- NULL /*fcm_python_time*/, /* evaluate time */
- fcm_python_evaluate /* evaluate */
-};
-
-
-/* Limits F-Curve Modifier --------------------------- */
-
-static float fcm_limits_time (FCurve *fcu, FModifier *fcm, float cvalue, float evaltime)
-{
- FMod_Limits *data= (FMod_Limits *)fcm->data;
-
- /* check for the time limits */
- if ((data->flag & FCM_LIMIT_XMIN) && (evaltime < data->rect.xmin))
- return data->rect.xmin;
- if ((data->flag & FCM_LIMIT_XMAX) && (evaltime > data->rect.xmax))
- return data->rect.xmax;
-
- /* modifier doesn't change time */
- return evaltime;
-}
-
-static void fcm_limits_evaluate (FCurve *fcu, FModifier *fcm, float *cvalue, float evaltime)
-{
- FMod_Limits *data= (FMod_Limits *)fcm->data;
-
- /* value limits now */
- if ((data->flag & FCM_LIMIT_YMIN) && (*cvalue < data->rect.ymin))
- *cvalue= data->rect.ymin;
- if ((data->flag & FCM_LIMIT_YMAX) && (*cvalue > data->rect.ymax))
- *cvalue= data->rect.ymax;
-}
-
-static FModifierTypeInfo FMI_LIMITS = {
- FMODIFIER_TYPE_LIMITS, /* type */
- sizeof(FMod_Limits), /* size */
- FMI_TYPE_GENERATE_CURVE, /* action type */ /* XXX... err... */
- FMI_REQUIRES_RUNTIME_CHECK, /* requirements */
- "Limits", /* name */
- "FMod_Limits", /* struct name */
- NULL, /* free data */
- NULL, /* copy data */
- NULL, /* new data */
- NULL, /* verify */
- fcm_limits_time, /* evaluate time */
- fcm_limits_evaluate /* evaluate */
-};
-
-/* F-Curve Modifier API --------------------------- */
-/* All of the F-Curve Modifier api functions use FModifierTypeInfo structs to carry out
- * and operations that involve F-Curve modifier specific code.
- */
-
-/* These globals only ever get directly accessed in this file */
-static FModifierTypeInfo *fmodifiersTypeInfo[FMODIFIER_NUM_TYPES];
-static short FMI_INIT= 1; /* when non-zero, the list needs to be updated */
-
-/* This function only gets called when FMI_INIT is non-zero */
-static void fmods_init_typeinfo ()
-{
- fmodifiersTypeInfo[0]= NULL; /* 'Null' F-Curve Modifier */
- fmodifiersTypeInfo[1]= &FMI_GENERATOR; /* Generator F-Curve Modifier */
- fmodifiersTypeInfo[2]= &FMI_ENVELOPE; /* Envelope F-Curve Modifier */
- fmodifiersTypeInfo[3]= &FMI_CYCLES; /* Cycles F-Curve Modifier */
- fmodifiersTypeInfo[4]= &FMI_NOISE; /* Apply-Noise F-Curve Modifier */
- fmodifiersTypeInfo[5]= NULL/*&FMI_FILTER*/; /* Filter F-Curve Modifier */ // XXX unimplemented
- fmodifiersTypeInfo[6]= &FMI_PYTHON; /* Custom Python F-Curve Modifier */
- fmodifiersTypeInfo[7]= &FMI_LIMITS; /* Limits F-Curve Modifier */
-}
-
-/* This function should be used for getting the appropriate type-info when only
- * a F-Curve modifier type is known
- */
-FModifierTypeInfo *get_fmodifier_typeinfo (int type)
-{
- /* initialise the type-info list? */
- if (FMI_INIT) {
- fmods_init_typeinfo();
- FMI_INIT = 0;
- }
-
- /* only return for valid types */
- if ( (type >= FMODIFIER_TYPE_NULL) &&
- (type <= FMODIFIER_NUM_TYPES ) )
- {
- /* there shouldn't be any segfaults here... */
- return fmodifiersTypeInfo[type];
- }
- else {
- printf("No valid F-Curve Modifier type-info data available. Type = %i \n", type);
- }
-
- return NULL;
-}
-
-/* This function should always be used to get the appropriate type-info, as it
- * has checks which prevent segfaults in some weird cases.
- */
-FModifierTypeInfo *fmodifier_get_typeinfo (FModifier *fcm)
-{
- /* only return typeinfo for valid modifiers */
- if (fcm)
- return get_fmodifier_typeinfo(fcm->type);
- else
- return NULL;
-}
-
-/* API --------------------------- */
-
-/* Add a new F-Curve Modifier to the given F-Curve of a certain type */
-FModifier *fcurve_add_modifier (FCurve *fcu, int type)
-{
- FModifierTypeInfo *fmi= get_fmodifier_typeinfo(type);
- FModifier *fcm;
-
- /* sanity checks */
- if ELEM(NULL, fcu, fmi)
- return NULL;
-
- /* special checks for whether modifier can be added */
- if ((fcu->modifiers.first) && (type == FMODIFIER_TYPE_CYCLES)) {
- /* cycles modifier must be first in stack, so for now, don't add if it can't be */
- // TODO: perhaps there is some better way, but for now,
- printf("Error: Cannot add 'Cycles' modifier to F-Curve, as 'Cycles' modifier can only be first in stack. \n");
- return NULL;
- }
-
- /* add modifier itself */
- fcm= MEM_callocN(sizeof(FModifier), "F-Curve Modifier");
- fcm->type = type;
- fcm->flag = FMODIFIER_FLAG_EXPANDED;
- BLI_addtail(&fcu->modifiers, fcm);
-
- /* add modifier's data */
- fcm->data= MEM_callocN(fmi->size, fmi->structName);
-
- /* init custom settings if necessary */
- if (fmi->new_data)
- fmi->new_data(fcm->data);
-
- /* return modifier for further editing */
- return fcm;
-}
-
-/* Duplicate all of the F-Curve Modifiers in the Modifier stacks */
-void fcurve_copy_modifiers (ListBase *dst, ListBase *src)
-{
- FModifier *fcm, *srcfcm;
-
- if ELEM(NULL, dst, src)
- return;
-
- dst->first= dst->last= NULL;
- BLI_duplicatelist(dst, src);
-
- for (fcm=dst->first, srcfcm=src->first; fcm && srcfcm; srcfcm=srcfcm->next, fcm=fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* make a new copy of the F-Modifier's data */
- fcm->data = MEM_dupallocN(fcm->data);
-
- /* only do specific constraints if required */
- if (fmi && fmi->copy_data)
- fmi->copy_data(fcm, srcfcm);
- }
-}
-
-/* Remove and free the given F-Curve Modifier from the given F-Curve's stack */
-void fcurve_remove_modifier (FCurve *fcu, FModifier *fcm)
-{
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* sanity check */
- if (fcm == NULL)
- return;
-
- /* free modifier's special data (stored inside fcm->data) */
- if (fcm->data) {
- if (fmi && fmi->free_data)
- fmi->free_data(fcm);
-
- /* free modifier's data (fcm->data) */
- MEM_freeN(fcm->data);
- }
-
- /* remove modifier from stack */
- if (fcu)
- BLI_freelinkN(&fcu->modifiers, fcm);
- else {
- // XXX this case can probably be removed some day, as it shouldn't happen...
- printf("fcurve_remove_modifier() - no fcurve \n");
- MEM_freeN(fcm);
- }
-}
-
-/* Remove all of a given F-Curve's modifiers */
-void fcurve_free_modifiers (FCurve *fcu)
-{
- FModifier *fcm, *fmn;
-
- /* sanity check */
- if (fcu == NULL)
- return;
-
- /* free each modifier in order - modifier is unlinked from list and freed */
- for (fcm= fcu->modifiers.first; fcm; fcm= fmn) {
- fmn= fcm->next;
- fcurve_remove_modifier(fcu, fcm);
- }
-}
-
-/* Bake modifiers for given F-Curve to curve sample data, in the frame range defined
- * by start and end (inclusive).
- */
-void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
-{
- ChannelDriver *driver;
-
- /* sanity checks */
- // TODO: make these tests report errors using reports not printf's
- if ELEM(NULL, fcu, fcu->modifiers.first) {
- printf("Error: No F-Curve with F-Curve Modifiers to Bake\n");
- return;
- }
-
- /* temporarily, disable driver while we sample, so that they don't influence the outcome */
- driver= fcu->driver;
- fcu->driver= NULL;
-
- /* bake the modifiers, by sampling the curve at each frame */
- fcurve_store_samples(fcu, NULL, start, end, fcurve_samplingcb_evalcurve);
-
- /* free the modifiers now */
- fcurve_free_modifiers(fcu);
-
- /* restore driver */
- fcu->driver= driver;
-}
-
-/* Find the active F-Curve Modifier */
-FModifier *fcurve_find_active_modifier (FCurve *fcu)
-{
- FModifier *fcm;
-
- /* sanity checks */
- if ELEM(NULL, fcu, fcu->modifiers.first)
- return NULL;
-
- /* loop over modifiers until 'active' one is found */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- if (fcm->flag & FMODIFIER_FLAG_ACTIVE)
- return fcm;
- }
-
- /* no modifier is active */
- return NULL;
-}
-
-/* Set the active F-Curve Modifier */
-void fcurve_set_active_modifier (FCurve *fcu, FModifier *fcm)
-{
- FModifier *fm;
-
- /* sanity checks */
- if ELEM(NULL, fcu, fcu->modifiers.first)
- return;
-
- /* deactivate all, and set current one active */
- for (fm= fcu->modifiers.first; fm; fm= fm->next)
- fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
-
- /* make given modifier active */
- if (fcm)
- fcm->flag |= FMODIFIER_FLAG_ACTIVE;
-}
-
/* ***************************** F-Curve - Evaluation ********************************* */
/* Evaluate and return the value of the given F-Curve at the specified frame ("evaltime")
@@ -2262,7 +1263,6 @@ void fcurve_set_active_modifier (FCurve *fcu, FModifier *fcm)
*/
float evaluate_fcurve (FCurve *fcu, float evaltime)
{
- FModifier *fcm;
float cvalue= 0.0f;
float devaltime;
@@ -2275,28 +1275,8 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
evaltime= cvalue= evaluate_driver(fcu->driver, evaltime);
}
- /* evaluate time modifications imposed by some F-Curve Modifiers
- * - this step acts as an optimisation to prevent the F-Curve stack being evaluated
- * several times by modifiers requesting the time be modified, as the final result
- * would have required using the modified time
- * - modifiers only ever recieve the unmodified time, as subsequent modifiers should be
- * working on the 'global' result of the modified curve, not some localised segment,
- * so nevaltime gets set to whatever the last time-modifying modifier likes...
- * - we start from the end of the stack, as only the last one matters for now
- */
- devaltime= evaltime;
-
- for (fcm= fcu->modifiers.last; fcm; fcm= fcm->prev) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* only evaluate if there's a callback for this */
- // TODO: implement the 'influence' control feature...
- if (fmi && fmi->evaluate_modifier_time) {
- if ((fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) == 0)
- devaltime= fmi->evaluate_modifier_time(fcu, fcm, cvalue, evaltime);
- break;
- }
- }
+ /* evaluate modifiers which modify time to evaluate the base curve at */
+ devaltime= evaluate_time_fmodifiers(&fcu->modifiers, fcu, cvalue, evaltime);
/* evaluate curve-data
* - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying
@@ -2308,16 +1288,7 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
cvalue= fcurve_eval_samples(fcu, fcu->fpt, devaltime);
/* evaluate modifiers */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* only evaluate if there's a callback for this */
- // TODO: implement the 'influence' control feature...
- if (fmi && fmi->evaluate_modifier) {
- if ((fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) == 0)
- fmi->evaluate_modifier(fcu, fcm, &cvalue, evaltime);
- }
- }
+ evaluate_value_fmodifiers(&fcu->modifiers, fcu, &cvalue, evaltime);
/* if curve can only have integral values, perform truncation (i.e. drop the decimal part)
* here so that the curve can be sampled correctly
@@ -2330,10 +1301,16 @@ float evaluate_fcurve (FCurve *fcu, float evaltime)
}
/* Calculate the value of the given F-Curve at the given frame, and set its curval */
-// TODO: will this be necessary?
void calculate_fcurve (FCurve *fcu, float ctime)
{
- /* calculate and set curval (evaluates driver too) */
- fcu->curval= evaluate_fcurve(fcu, ctime);
+ /* only calculate + set curval (overriding the existing value) if curve has
+ * any data which warrants this...
+ */
+ if ( (fcu->totvert) || (fcu->driver && !(fcu->driver->flag & DRIVER_FLAG_INVALID)) ||
+ list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) )
+ {
+ /* calculate and set curval (evaluates driver too if necessary) */
+ fcu->curval= evaluate_fcurve(fcu, ctime);
+ }
}
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 14bff9b5d57..6c684994e30 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -28,11 +28,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h" // for pointcache
+#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h" // N_T
@@ -76,7 +80,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
if(!fss)
return;
- fss->type = OB_FSBND_NOSLIP;
+ fss->type = OB_FLUIDSIM_ENABLE;
fss->show_advancedoptions = 0;
fss->resolutionxyz = 50;
@@ -110,7 +114,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
// no bounding box needed
// todo - reuse default init from elbeem!
- fss->typeFlags = 0;
+ fss->typeFlags = OB_FSBND_NOSLIP;
fss->domainNovecgen = 0;
fss->volumeInitType = 1; // volume
fss->partSlipValue = 0.0;
@@ -656,5 +660,20 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
dm->release(dm);
}
+void fluid_estimate_memory(Object *ob, FluidsimSettings *fss, char *value)
+{
+ Mesh *mesh;
+
+ value[0]= '\0';
+
+ if(ob->type == OB_MESH) {
+ /* use mesh bounding box and object scaling */
+ mesh= ob->data;
+
+ fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize);
+ elbeemEstimateMemreq(fss->resolutionxyz, fss->bbSize[0],fss->bbSize[1],fss->bbSize[2], fss->maxRefine, value);
+ }
+}
+
#endif // DISABLE_ELBEEM
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index c3cf6e06c09..70901778585 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -333,11 +333,11 @@ static VFontData *vfont_get_data(VFont *vfont)
BLI_addtail(&ttfdata, tmpfnt);
}
} else {
- pf= newPackedFile(vfont->name);
+ pf= newPackedFile(NULL, vfont->name);
if(!tmpfnt)
{
- tpf= newPackedFile(vfont->name);
+ tpf= newPackedFile(NULL, vfont->name);
// Add temporary packed file to globals
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
@@ -385,8 +385,8 @@ VFont *load_vfont(char *name)
strcpy(dir, name);
BLI_splitdirstring(dir, filename);
- pf= newPackedFile(name);
- tpf= newPackedFile(name);
+ pf= newPackedFile(NULL, name);
+ tpf= newPackedFile(NULL, name);
is_builtin= 0;
}
@@ -682,7 +682,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
cu->ulheight = 0.05;
if (cu->strinfo==NULL) /* old file */
- cu->strinfo = MEM_callocN((slen+1) * sizeof(CharInfo), "strinfo compat");
+ cu->strinfo = MEM_callocN((slen+4) * sizeof(CharInfo), "strinfo compat");
custrinfo= cu->strinfo;
if (cu->editfont)
@@ -1145,7 +1145,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if (cu->sepchar==0) {
for (i= 0; i<slen; i++) {
cha = (uintptr_t) mem[i];
- info = &(cu->strinfo[i]);
+ info = &(custrinfo[i]);
if (info->mat_nr > (ob->totcol)) {
/* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
info->mat_nr = 0;
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 6086aa58d40..dd8f44c71d5 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1,5 +1,5 @@
/**
- * $Id: gpencil.c 19758 2009-04-16 13:10:08Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 3be47778674..54366aadd92 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -230,16 +230,16 @@ void IDP_ResizeArray(IDProperty *prop, int newlen)
*/
newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
- newarr = MEM_callocN(idp_size_table[prop->subtype]*newsize, "idproperty array resized");
+ newarr = MEM_callocN(idp_size_table[(int)prop->subtype]*newsize, "idproperty array resized");
if (newlen >= prop->len) {
/* newlen is bigger*/
- memcpy(newarr, prop->data.pointer, prop->len*idp_size_table[prop->subtype]);
+ memcpy(newarr, prop->data.pointer, prop->len*idp_size_table[(int)prop->subtype]);
idp_resize_group_array(prop, newlen, newarr);
}
else {
/* newlen is smaller*/
idp_resize_group_array(prop, newlen, newarr);
- memcpy(newarr, prop->data.pointer, newlen*prop->len*idp_size_table[prop->subtype]);
+ memcpy(newarr, prop->data.pointer, newlen*prop->len*idp_size_table[(int)prop->subtype]);
}
MEM_freeN(prop->data.pointer);
@@ -546,7 +546,7 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
return BSTR_EQ(IDP_String(prop1), IDP_String(prop2));
else if(prop1->type == IDP_ARRAY) {
if(prop1->len == prop2->len && prop1->subtype == prop2->subtype)
- return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[prop1->subtype]*prop1->len);
+ return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype]*prop1->len);
else
return 0;
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 8eef9984c92..93924d1ea0d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -253,6 +253,10 @@ void free_image(Image *ima)
if (ima->preview) {
BKE_previewimg_free(&ima->preview);
}
+ if (ima->render_text) {
+ MEM_freeN(ima->render_text);
+ ima->render_text= NULL;
+ }
}
/* only image block itself */
@@ -856,6 +860,9 @@ int BKE_imtype_is_movie(int imtype)
case R_AVICODEC:
case R_QUICKTIME:
case R_FFMPEG:
+ case R_H264:
+ case R_THEORA:
+ case R_XVID:
case R_FRAMESERVER:
return 1;
}
@@ -866,7 +873,7 @@ void BKE_add_image_extension(Scene *scene, char *string, int imtype)
{
char *extension="";
- if(scene->r.imtype== R_IRIS) {
+ if(imtype== R_IRIS) {
if(!BLI_testextensie(string, ".rgb"))
extension= ".rgb";
}
@@ -878,7 +885,7 @@ void BKE_add_image_extension(Scene *scene, char *string, int imtype)
if(!BLI_testextensie(string, ".hdr"))
extension= ".hdr";
}
- else if(imtype==R_PNG || imtype==R_FFMPEG) {
+ else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) {
if(!BLI_testextensie(string, ".png"))
extension= ".png";
}
@@ -1226,7 +1233,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
else if ((imtype==R_RADHDR)) {
ibuf->ftype= RADHDR;
}
- else if (imtype==R_PNG || imtype==R_FFMPEG) {
+ else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) {
ibuf->ftype= PNG;
}
#ifdef WITH_DDS
@@ -1301,7 +1308,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
BLI_make_existing_file(name);
- if(scene->r.scemode & R_STAMP_INFO)
+ if(scene->r.stamp & R_STAMP_ALL)
BKE_stamp_info(scene, ibuf);
ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat);
@@ -1431,7 +1438,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
/* try to repack file */
if(ima->packedfile) {
PackedFile *pf;
- pf = newPackedFile(ima->name);
+ pf = newPackedFile(NULL, ima->name);
if (pf) {
freePackedFile(ima->packedfile);
ima->packedfile = pf;
@@ -1750,7 +1757,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* make packed file for autopack */
if ((ima->packedfile == NULL) && (G.fileflags & G_AUTOPACK))
- ima->packedfile = newPackedFile(str);
+ ima->packedfile = newPackedFile(NULL, str);
}
if(ima->flag & IMA_DO_PREMUL)
@@ -1812,7 +1819,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
Render *re= NULL;
RenderResult *rr= NULL;
- if(iuser->scene) {
+ if(iuser && iuser->scene) {
re= RE_GetRender(iuser->scene->id.name);
rr= RE_GetResult(re);
}
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 40c98c1d9cc..fc5213d5532 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1600,6 +1600,10 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
if(clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED)
{
+ float temp = clmd->sim_parms->stepsPerFrame;
+ /* not too nice hack, but collisions need this correction -jahka */
+ clmd->sim_parms->stepsPerFrame /= clmd->sim_parms->timescale;
+
// collisions
// itstart();
@@ -1614,7 +1618,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
// call collision function
// TODO: check if "step" or "step+dt" is correct - dg
- result = cloth_bvh_objcollision(ob, clmd, step, dt);
+ result = cloth_bvh_objcollision(ob, clmd, step/clmd->sim_parms->timescale, dt/clmd->sim_parms->timescale);
// correct velocity again, just to be sure we had to change it due to adaptive collisions
for(i = 0; i < numverts; i++)
@@ -1637,6 +1641,9 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
}
}
+ /* restore original stepsPerFrame */
+ clmd->sim_parms->stepsPerFrame = temp;
+
// X = Xnew;
cp_lfvector(id->X, id->Xnew, numverts);
@@ -1654,7 +1661,6 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase
simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv, id->M, id->bigI);
}
-
}
else
{
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 8cbf25eaeed..cf7e486613b 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -58,6 +58,7 @@
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
+#include "DNA_nla_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_particle_types.h"
@@ -85,6 +86,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
@@ -235,17 +237,15 @@ static char *ob_adrcodes_to_paths (int adrcode, int *array_index)
*array_index= 1; return "delta_scale";
case OB_DSIZE_Z:
*array_index= 2; return "delta_scale";
-
-#if 0
- case OB_COL_R:
- poin= &(ob->col[0]); break;
+ case OB_COL_R:
+ *array_index= 0; return "color";
case OB_COL_G:
- poin= &(ob->col[1]); break;
+ *array_index= 1; return "color";
case OB_COL_B:
- poin= &(ob->col[2]); break;
+ *array_index= 2; return "color";
case OB_COL_A:
- poin= &(ob->col[3]); break;
-
+ *array_index= 3; return "color";
+#if 0
case OB_PD_FSTR:
if (ob->pd) poin= &(ob->pd->f_strength);
break;
@@ -545,7 +545,7 @@ static char *material_adrcodes_to_paths (int adrcode, int *array_index)
return "ambient";
case MA_SPEC:
- return "specularity";
+ return "specular_reflection";
case MA_HARD:
return "specular_hardness";
@@ -827,6 +827,10 @@ char *get_rna_access (int blocktype, int adrcode, char actname[], char constname
char buf[512];
int dummy_index= 0;
+ /* hack: if constname is set, we can only be dealing with an Constraint curve */
+ if (constname)
+ blocktype= ID_CO;
+
/* get property name based on blocktype */
switch (blocktype) {
case ID_OB: /* object */
@@ -842,7 +846,7 @@ char *get_rna_access (int blocktype, int adrcode, char actname[], char constname
break;
case ID_CO: /* constraint */
- propname= constraint_adrcodes_to_paths(adrcode, &dummy_index);
+ propname= constraint_adrcodes_to_paths(adrcode, &dummy_index);
break;
case ID_TE: /* texture */
@@ -872,7 +876,10 @@ char *get_rna_access (int blocktype, int adrcode, char actname[], char constname
/* XXX problematic blocktypes */
case ID_CU: /* curve */
- propname= "speed"; // XXX this was a 'dummy curve' that didn't really correspond to any real var...
+ /* this used to be a 'dummy' curve which got evaluated on the fly...
+ * now we've got real var for this!
+ */
+ propname= "eval_time";
break;
case ID_SEQ: /* sequencer strip */
@@ -1146,7 +1153,7 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
/* Add a new FModifier (Cyclic) instead of setting extend value
* as that's the new equivilant of that option.
*/
- FModifier *fcm= fcurve_add_modifier(fcu, FMODIFIER_TYPE_CYCLES);
+ FModifier *fcm= add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES);
FMod_Cycles *data= (FMod_Cycles *)fcm->data;
/* if 'offset' one is in use, set appropriate settings */
@@ -1465,6 +1472,87 @@ static void action_to_animdata (ID *id, bAction *act)
action_to_animato(act, &adt->action->groups, &adt->action->curves, &adt->drivers);
}
+/* ------------------------- */
+
+// TODO:
+// - NLA group duplicators info
+// - NLA curve/stride modifiers...
+
+/* Convert NLA-Strip to new system */
+static void nlastrips_to_animdata (ID *id, ListBase *strips)
+{
+ AnimData *adt= BKE_animdata_from_id(id);
+ NlaTrack *nlt = NULL;
+ NlaStrip *strip;
+ bActionStrip *as, *asn;
+
+ /* for each one of the original strips, convert to a new strip and free the old... */
+ for (as= strips->first; as; as= asn) {
+ asn= as->next;
+
+ /* this old strip is only worth something if it had an action... */
+ if (as->act) {
+ /* convert Action data (if not yet converted), storing the results in the same Action */
+ action_to_animato(as->act, &as->act->groups, &as->act->curves, &adt->drivers);
+
+ /* create a new-style NLA-strip which references this Action, then copy over relevant settings */
+ {
+ /* init a new strip, and assign the action to it
+ * - no need to muck around with the user-counts, since this is just
+ * passing over the ref to the new owner, not creating an additional ref
+ */
+ strip= MEM_callocN(sizeof(NlaStrip), "NlaStrip");
+ strip->act= as->act;
+
+ /* endpoints */
+ strip->start= as->start;
+ strip->end= as->end;
+ strip->actstart= as->actstart;
+ strip->actend= as->actend;
+
+ /* action reuse */
+ strip->repeat= as->repeat;
+ strip->scale= as->scale;
+ if (as->flag & ACTSTRIP_LOCK_ACTION) strip->flag |= NLASTRIP_FLAG_SYNC_LENGTH;
+
+ /* blending */
+ strip->blendin= as->blendin;
+ strip->blendout= as->blendout;
+ strip->blendmode= (as->mode==ACTSTRIPMODE_ADD) ? NLASTRIP_MODE_ADD : NLASTRIP_MODE_REPLACE;
+ if (as->flag & ACTSTRIP_AUTO_BLENDS) strip->flag |= NLASTRIP_FLAG_AUTO_BLENDS;
+
+ /* assorted setting flags */
+ if (as->flag & ACTSTRIP_SELECT) strip->flag |= NLASTRIP_FLAG_SELECT;
+ if (as->flag & ACTSTRIP_ACTIVE) strip->flag |= NLASTRIP_FLAG_ACTIVE;
+
+ if (as->flag & ACTSTRIP_MUTE) strip->flag |= NLASTRIP_FLAG_MUTED;
+ if (as->flag & ACTSTRIP_REVERSE) strip->flag |= NLASTRIP_FLAG_REVERSE;
+
+ /* by default, we now always extrapolate, while in the past this was optional */
+ if ((as->flag & ACTSTRIP_HOLDLASTFRAME)==0)
+ strip->extendmode= NLASTRIP_EXTEND_NOTHING;
+ }
+
+ /* try to add this strip to the current NLA-Track (i.e. the 'last' one on the stack atm) */
+ if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
+ /* trying to add to the current failed (no space),
+ * so add a new track to the stack, and add to that...
+ */
+ nlt= add_nlatrack(adt, NULL);
+ BKE_nlatrack_add_strip(nlt, strip);
+ }
+ }
+
+ /* modifiers */
+ // FIXME: for now, we just free them...
+ if (as->modifiers.first)
+ BLI_freelistN(&as->modifiers);
+
+ /* free the old strip */
+ BLI_freelinkN(strips, as);
+ }
+}
+
/* *************************************************** */
/* External API - Only Called from do_versions() */
@@ -1511,18 +1599,34 @@ void do_versions_ipos_to_animato(Main *main)
if (G.f & G_DEBUG) printf("\tconverting ob %s \n", id->name+2);
/* check if object has any animation data */
- if ((ob->ipo) || (ob->action) || (ob->nlastrips.first)) {
+ if (ob->nlastrips.first) {
/* Add AnimData block */
adt= BKE_id_add_animdata(id);
- /* IPO first */
+ /* IPO first to take into any non-NLA'd Object Animation */
if (ob->ipo) {
ipo_to_animdata(id, ob->ipo, NULL, NULL);
+
ob->ipo->id.us--;
ob->ipo= NULL;
}
- /* now Action */
+ /* Action is skipped since it'll be used by some strip in the NLA anyway,
+ * causing errors with evaluation in the new evaluation pipeline
+ */
+ if (ob->action) {
+ ob->action->id.us--;
+ ob->action= NULL;
+ }
+
+ /* finally NLA */
+ nlastrips_to_animdata(id, &ob->nlastrips);
+ }
+ else if ((ob->ipo) || (ob->action)) {
+ /* Add AnimData block */
+ adt= BKE_id_add_animdata(id);
+
+ /* Action first - so that Action name get conserved */
if (ob->action) {
action_to_animdata(id, ob->action);
@@ -1533,8 +1637,12 @@ void do_versions_ipos_to_animato(Main *main)
}
}
- /* finally NLA */
- // XXX todo... for now, new NLA code not hooked up yet, so keep old stuff (but not for too long!)
+ /* IPO second... */
+ if (ob->ipo) {
+ ipo_to_animdata(id, ob->ipo, NULL, NULL);
+ ob->ipo->id.us--;
+ ob->ipo= NULL;
+ }
}
/* check PoseChannels for constraints with local data */
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 5cf52d09314..67d63d527cb 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -232,8 +232,8 @@ void free_lattice(Lattice *lt)
if(lt->def) MEM_freeN(lt->def);
if(lt->dvert) free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
if(lt->editlatt) {
- if(lt->def) MEM_freeN(lt->def);
- if(lt->dvert) free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
+ if(lt->editlatt->def) MEM_freeN(lt->editlatt->def);
+ if(lt->editlatt->dvert) free_dverts(lt->editlatt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
MEM_freeN(lt->editlatt);
}
}
@@ -817,59 +817,68 @@ void outside_lattice(Lattice *lt)
int u, v, w;
float fac1, du=0.0, dv=0.0, dw=0.0;
- bp= lt->def;
+ if(lt->flag & LT_OUTSIDE) {
+ bp= lt->def;
- if(lt->pntsu>1) du= 1.0f/((float)lt->pntsu-1);
- if(lt->pntsv>1) dv= 1.0f/((float)lt->pntsv-1);
- if(lt->pntsw>1) dw= 1.0f/((float)lt->pntsw-1);
-
- for(w=0; w<lt->pntsw; w++) {
-
- for(v=0; v<lt->pntsv; v++) {
-
- for(u=0; u<lt->pntsu; u++, bp++) {
- if(u==0 || v==0 || w==0 || u==lt->pntsu-1 || v==lt->pntsv-1 || w==lt->pntsw-1);
- else {
-
- bp->hide= 1;
- bp->f1 &= ~SELECT;
-
- /* u extrema */
- bp1= latt_bp(lt, 0, v, w);
- bp2= latt_bp(lt, lt->pntsu-1, v, w);
-
- fac1= du*u;
- bp->vec[0]= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
-
- /* v extrema */
- bp1= latt_bp(lt, u, 0, w);
- bp2= latt_bp(lt, u, lt->pntsv-1, w);
-
- fac1= dv*v;
- bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
-
- /* w extrema */
- bp1= latt_bp(lt, u, v, 0);
- bp2= latt_bp(lt, u, v, lt->pntsw-1);
-
- fac1= dw*w;
- bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
- bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
- bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
-
- VecMulf(bp->vec, 0.3333333f);
+ if(lt->pntsu>1) du= 1.0f/((float)lt->pntsu-1);
+ if(lt->pntsv>1) dv= 1.0f/((float)lt->pntsv-1);
+ if(lt->pntsw>1) dw= 1.0f/((float)lt->pntsw-1);
+
+ for(w=0; w<lt->pntsw; w++) {
+
+ for(v=0; v<lt->pntsv; v++) {
+
+ for(u=0; u<lt->pntsu; u++, bp++) {
+ if(u==0 || v==0 || w==0 || u==lt->pntsu-1 || v==lt->pntsv-1 || w==lt->pntsw-1);
+ else {
+ bp->hide= 1;
+ bp->f1 &= ~SELECT;
+
+ /* u extrema */
+ bp1= latt_bp(lt, 0, v, w);
+ bp2= latt_bp(lt, lt->pntsu-1, v, w);
+
+ fac1= du*u;
+ bp->vec[0]= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
+ bp->vec[1]= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
+ bp->vec[2]= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+
+ /* v extrema */
+ bp1= latt_bp(lt, u, 0, w);
+ bp2= latt_bp(lt, u, lt->pntsv-1, w);
+
+ fac1= dv*v;
+ bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
+ bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
+ bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+
+ /* w extrema */
+ bp1= latt_bp(lt, u, v, 0);
+ bp2= latt_bp(lt, u, v, lt->pntsw-1);
+
+ fac1= dw*w;
+ bp->vec[0]+= (1.0f-fac1)*bp1->vec[0] + fac1*bp2->vec[0];
+ bp->vec[1]+= (1.0f-fac1)*bp1->vec[1] + fac1*bp2->vec[1];
+ bp->vec[2]+= (1.0f-fac1)*bp1->vec[2] + fac1*bp2->vec[2];
+
+ VecMulf(bp->vec, 0.3333333f);
+
+ }
}
+
}
}
-
}
-
+ else {
+ bp= lt->def;
+
+ for(w=0; w<lt->pntsw; w++)
+ for(v=0; v<lt->pntsv; v++)
+ for(u=0; u<lt->pntsu; u++, bp++)
+ bp->hide= 0;
+ }
}
float (*lattice_getVertexCos(struct Object *ob, int *numVerts_r))[3]
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index b410c521dea..d1fdac65dbb 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -43,6 +43,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
+#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
@@ -445,7 +446,7 @@ Material *give_current_material(Object *ob, int act)
if(act>ob->totcol) act= ob->totcol;
else if(act<=0) act= 1;
- if( BTST(ob->colbits, act-1) ) { /* in object */
+ if(ob->matbits[act-1]) { /* in object */
ma= ob->mat[act-1];
}
else { /* in data */
@@ -473,7 +474,7 @@ ID *material_from(Object *ob, int act)
if(ob->totcol==0) return ob->data;
if(act==0) act= 1;
- if( BTST(ob->colbits, act-1) ) return (ID *)ob;
+ if(ob->matbits[act-1]) return (ID *)ob;
else return ob->data;
}
@@ -498,6 +499,7 @@ void test_object_materials(ID *id)
Curve *cu;
MetaBall *mb;
Material **newmatar;
+ char *newmatbits;
int totcol=0;
if(id==0) return;
@@ -524,16 +526,22 @@ void test_object_materials(ID *id)
if(totcol==0) {
if(ob->totcol) {
MEM_freeN(ob->mat);
- ob->mat= 0;
+ MEM_freeN(ob->matbits);
+ ob->mat= NULL;
+ ob->matbits= NULL;
}
}
else if(ob->totcol<totcol) {
newmatar= MEM_callocN(sizeof(void *)*totcol, "newmatar");
+ newmatbits= MEM_callocN(sizeof(char)*totcol, "newmatbits");
if(ob->totcol) {
memcpy(newmatar, ob->mat, sizeof(void *)*ob->totcol);
+ memcpy(newmatbits, ob->matbits, sizeof(char)*ob->totcol);
MEM_freeN(ob->mat);
+ MEM_freeN(ob->matbits);
}
ob->mat= newmatar;
+ ob->matbits= newmatbits;
}
ob->totcol= totcol;
if(ob->totcol && ob->actcol==0) ob->actcol= 1;
@@ -547,6 +555,7 @@ void test_object_materials(ID *id)
void assign_material(Object *ob, Material *ma, int act)
{
Material *mao, **matar, ***matarar;
+ char *matbits;
short *totcolp;
if(act>MAXMAT) return;
@@ -559,29 +568,41 @@ void assign_material(Object *ob, Material *ma, int act)
if(totcolp==0 || matarar==0) return;
- if( act > *totcolp) {
+ if(act > *totcolp) {
matar= MEM_callocN(sizeof(void *)*act, "matarray1");
- if( *totcolp) {
- memcpy(matar, *matarar, sizeof(void *)*( *totcolp ));
+
+ if(*totcolp) {
+ memcpy(matar, *matarar, sizeof(void *)*(*totcolp));
MEM_freeN(*matarar);
}
+
*matarar= matar;
*totcolp= act;
}
if(act > ob->totcol) {
matar= MEM_callocN(sizeof(void *)*act, "matarray2");
+ matbits= MEM_callocN(sizeof(char)*act, "matbits1");
if( ob->totcol) {
memcpy(matar, ob->mat, sizeof(void *)*( ob->totcol ));
+ memcpy(matbits, ob->matbits, sizeof(char)*(*totcolp));
MEM_freeN(ob->mat);
+ MEM_freeN(ob->matbits);
}
ob->mat= matar;
+ ob->matbits= matbits;
ob->totcol= act;
+
+ /* copy object/mesh linking, or assign based on userpref */
+ if(ob->actcol)
+ ob->matbits[act-1]= ob->matbits[ob->actcol-1];
+ else
+ ob->matbits[act-1]= (U.flag & USER_MAT_ON_OB)? 1: 0;
}
/* do it */
- if( BTST(ob->colbits, act-1) ) { /* in object */
+ if(ob->matbits[act-1]) { /* in object */
mao= ob->mat[act-1];
if(mao) mao->id.us--;
ob->mat[act-1]= ma;
@@ -591,6 +612,7 @@ void assign_material(Object *ob, Material *ma, int act)
if(mao) mao->id.us--;
(*matarar)[act-1]= ma;
}
+
id_us_plus((ID *)ma);
test_object_materials(ob->data);
}
@@ -615,7 +637,7 @@ int find_material_index(Object *ob, Material *ma)
return 0;
}
-void new_material_to_objectdata(Object *ob)
+void object_add_material_slot(Object *ob)
{
Material *ma;
@@ -630,12 +652,6 @@ void new_material_to_objectdata(Object *ob)
ma->id.us= 0; /* eeh... */
- if(ob->actcol) {
- if( BTST(ob->colbits, ob->actcol-1) ) {
- ob->colbits= BSET(ob->colbits, ob->totcol);
- }
- }
-
assign_material(ob, ma, ob->totcol+1);
ob->actcol= ob->totcol;
}
@@ -854,7 +870,7 @@ void automatname(Material *ma)
}
-void delete_material_index(Object *ob)
+void object_remove_material_slot(Object *ob)
{
Material *mao, ***matarar;
Object *obt;
@@ -880,9 +896,8 @@ void delete_material_index(Object *ob)
if(mao) mao->id.us--;
}
- for(a=ob->actcol; a<ob->totcol; a++) {
+ for(a=ob->actcol; a<ob->totcol; a++)
(*matarar)[a-1]= (*matarar)[a];
- }
(*totcolp)--;
if(*totcolp==0) {
@@ -900,13 +915,18 @@ void delete_material_index(Object *ob)
mao= obt->mat[actcol-1];
if(mao) mao->id.us--;
- for(a=actcol; a<obt->totcol; a++) obt->mat[a-1]= obt->mat[a];
+ for(a=actcol; a<obt->totcol; a++) {
+ obt->mat[a-1]= obt->mat[a];
+ obt->matbits[a-1]= obt->matbits[a];
+ }
obt->totcol--;
if(obt->actcol > obt->totcol) obt->actcol= obt->totcol;
if(obt->totcol==0) {
MEM_freeN(obt->mat);
+ MEM_freeN(obt->matbits);
obt->mat= 0;
+ obt->matbits= NULL;
}
}
obt= obt->id.next;
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 0af3196de92..8f67fdc74d2 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -81,6 +81,7 @@ EditMesh *BKE_mesh_get_editmesh(Mesh *me)
void BKE_mesh_end_editmesh(Mesh *me, EditMesh *em)
{
+ BM_Free_Mesh(me->edit_btmesh->bm);
me->edit_btmesh->bm = editmesh_to_bmesh(em);
BMEdit_RecalcTesselation(me->edit_btmesh);
}
@@ -97,12 +98,11 @@ void mesh_update_customdata_pointers(Mesh *me)
me->mface = CustomData_get_layer(&me->fdata, CD_MFACE);
me->mcol = CustomData_get_layer(&me->fdata, CD_MCOL);
me->mtface = CustomData_get_layer(&me->fdata, CD_MTFACE);
-
+
me->mpoly = CustomData_get_layer(&me->pdata, CD_MPOLY);
me->mloop = CustomData_get_layer(&me->ldata, CD_MLOOP);
me->mtpoly = CustomData_get_layer(&me->pdata, CD_MTEXPOLY);
-
me->mloopcol = CustomData_get_layer(&me->ldata, CD_MLOOPCOL);
me->mloopuv = CustomData_get_layer(&me->ldata, CD_MLOOPUV);
}
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 4e1f6d8265a..fc4788d9ff3 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -64,6 +64,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
@@ -119,6 +120,72 @@ static struct DerivedMesh *NewBooleanDerivedMesh() {return NULL;}
//XXX #include "BIF_meshlaplacian.h"
+/* Utility */
+
+static int is_last_displist(Object *ob)
+{
+ Curve *cu = ob->data;
+ static int curvecount=0, totcurve=0;
+
+ if(curvecount == 0){
+ DispList *dl;
+
+ totcurve = 0;
+ for(dl=cu->disp.first; dl; dl=dl->next)
+ totcurve++;
+ }
+
+ curvecount++;
+
+ if(curvecount == totcurve){
+ curvecount = 0;
+ return 1;
+ }
+
+ return 0;
+}
+
+static DerivedMesh *get_original_dm(Scene *scene, Object *ob, float (*vertexCos)[3], int orco)
+{
+ DerivedMesh *dm= NULL;
+
+ if(ob->type==OB_MESH) {
+ dm = CDDM_from_mesh((Mesh*)(ob->data), ob);
+
+ if(vertexCos) {
+ CDDM_apply_vert_coords(dm, vertexCos);
+ //CDDM_calc_normals(dm);
+ }
+
+ if(orco)
+ DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
+ }
+ else if(ELEM3(ob->type,OB_FONT,OB_CURVE,OB_SURF)) {
+ Object *tmpobj;
+ Curve *tmpcu;
+
+ if(is_last_displist(ob)) {
+ /* copies object and modifiers (but not the data) */
+ tmpobj= copy_object(ob);
+ tmpcu = (Curve *)tmpobj->data;
+ tmpcu->id.us--;
+
+ /* copies the data */
+ tmpobj->data = copy_curve((Curve *) ob->data);
+
+ makeDispListCurveTypes(scene, tmpobj, 1);
+ nurbs_to_mesh(tmpobj);
+
+ dm = CDDM_from_mesh((Mesh*)(tmpobj->data), tmpobj);
+ //CDDM_calc_normals(dm);
+
+ free_libblock_us(&G.main->object, tmpobj);
+ }
+ }
+
+ return dm;
+}
+
/***/
static int noneModifier_isDisabled(ModifierData *md)
@@ -145,7 +212,7 @@ static void curveModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(tcmd->name, cmd->name, 32);
}
-CustomDataMask curveModifier_requiredDataMask(ModifierData *md)
+CustomDataMask curveModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CurveModifierData *cmd = (CurveModifierData *)md;
CustomDataMask dataMask = 0;
@@ -221,7 +288,7 @@ static void latticeModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(tlmd->name, lmd->name, 32);
}
-CustomDataMask latticeModifier_requiredDataMask(ModifierData *md)
+CustomDataMask latticeModifier_requiredDataMask(Object *ob, ModifierData *md)
{
LatticeModifierData *lmd = (LatticeModifierData *)md;
CustomDataMask dataMask = 0;
@@ -605,7 +672,7 @@ static void maskModifier_copyData(ModifierData *md, ModifierData *target)
strcpy(tmmd->vgroup, mmd->vgroup);
}
-static CustomDataMask maskModifier_requiredDataMask(ModifierData *md)
+static CustomDataMask maskModifier_requiredDataMask(Object *ob, ModifierData *md)
{
return (1 << CD_MDEFORMVERT);
}
@@ -3353,7 +3420,7 @@ static void bevelModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(tbmd->defgrp_name, bmd->defgrp_name, 32);
}
-CustomDataMask bevelModifier_requiredDataMask(ModifierData *md)
+CustomDataMask bevelModifier_requiredDataMask(Object *ob, ModifierData *md)
{
BevelModifierData *bmd = (BevelModifierData *)md;
CustomDataMask dataMask = 0;
@@ -3433,7 +3500,7 @@ static void displaceModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(tdmd->uvlayer_name, dmd->uvlayer_name, 32);
}
-CustomDataMask displaceModifier_requiredDataMask(ModifierData *md)
+CustomDataMask displaceModifier_requiredDataMask(Object *ob, ModifierData *md)
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
CustomDataMask dataMask = 0;
@@ -3500,7 +3567,7 @@ static void displaceModifier_updateDepgraph(
}
}
-static void validate_layer_name(const CustomData *data, int type, char *name)
+static void validate_layer_name(const CustomData *data, int type, char *name, char *outname)
{
int index = -1;
@@ -3513,8 +3580,10 @@ static void validate_layer_name(const CustomData *data, int type, char *name)
* deleted, so assign the active layer to name
*/
index = CustomData_get_active_layer_index(data, CD_MTFACE);
- strcpy(name, data->layers[index].name);
+ strcpy(outname, data->layers[index].name);
}
+ else
+ strcpy(outname, name);
}
static void get_texture_coords(DisplaceModifierData *dmd, Object *ob,
@@ -3540,12 +3609,11 @@ static void get_texture_coords(DisplaceModifierData *dmd, Object *ob,
char *done = MEM_callocN(sizeof(*done) * numVerts,
"get_texture_coords done");
int numFaces = dm->getNumTessFaces(dm);
+ char uvname[32];
MTFace *tf;
- validate_layer_name(&dm->faceData, CD_MTFACE, dmd->uvlayer_name);
-
- tf = CustomData_get_layer_named(&dm->faceData, CD_MTFACE,
- dmd->uvlayer_name);
+ validate_layer_name(&dm->faceData, CD_MTFACE, dmd->uvlayer_name, uvname);
+ tf = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, uvname);
/* verts are given the UV from the first face that uses them */
for(i = 0, mf = mface; i < numFaces; ++i, ++mf, ++tf) {
@@ -3776,7 +3844,7 @@ static void uvprojectModifier_copyData(ModifierData *md, ModifierData *target)
tumd->aspecty = umd->aspecty;
}
-CustomDataMask uvprojectModifier_requiredDataMask(ModifierData *md)
+CustomDataMask uvprojectModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CustomDataMask dataMask = 0;
@@ -3841,6 +3909,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
Projector projectors[MOD_UVPROJECT_MAXPROJECTORS];
int num_projectors = 0;
float aspect;
+ char uvname[32];
if(umd->aspecty != 0) aspect = umd->aspectx / umd->aspecty;
else aspect = 1.0f;
@@ -3855,12 +3924,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
if(!dm->getTessFaceDataArray(dm, CD_MTFACE)) return dm;
/* make sure we're using an existing layer */
- validate_layer_name(&dm->faceData, CD_MTFACE, umd->uvlayer_name);
+ validate_layer_name(&dm->faceData, CD_MTFACE, umd->uvlayer_name, uvname);
/* make sure we are not modifying the original UV layer */
tface = CustomData_duplicate_referenced_layer_named(&dm->faceData,
- CD_MTFACE,
- umd->uvlayer_name);
+ CD_MTFACE, uvname);
numVerts = dm->getNumVerts(dm);
@@ -4242,7 +4310,7 @@ int smoothModifier_isDisabled(ModifierData *md)
return 0;
}
-CustomDataMask smoothModifier_requiredDataMask(ModifierData *md)
+CustomDataMask smoothModifier_requiredDataMask(Object *ob, ModifierData *md)
{
SmoothModifierData *smd = (SmoothModifierData *)md;
CustomDataMask dataMask = 0;
@@ -4471,7 +4539,7 @@ int castModifier_isDisabled(ModifierData *md)
return 0;
}
-CustomDataMask castModifier_requiredDataMask(ModifierData *md)
+CustomDataMask castModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CastModifierData *cmd = (CastModifierData *)md;
CustomDataMask dataMask = 0;
@@ -5102,7 +5170,7 @@ static void waveModifier_updateDepgraph(
}
}
-CustomDataMask waveModifier_requiredDataMask(ModifierData *md)
+CustomDataMask waveModifier_requiredDataMask(Object *ob, ModifierData *md)
{
WaveModifierData *wmd = (WaveModifierData *)md;
CustomDataMask dataMask = 0;
@@ -5142,12 +5210,11 @@ static void wavemod_get_texture_coords(WaveModifierData *wmd, Object *ob,
char *done = MEM_callocN(sizeof(*done) * numVerts,
"get_texture_coords done");
int numFaces = dm->getNumTessFaces(dm);
+ char uvname[32];
MTFace *tf;
- validate_layer_name(&dm->faceData, CD_MTFACE, wmd->uvlayer_name);
-
- tf = CustomData_get_layer_named(&dm->faceData, CD_MTFACE,
- wmd->uvlayer_name);
+ validate_layer_name(&dm->faceData, CD_MTFACE, wmd->uvlayer_name, uvname);
+ tf = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, uvname);
/* verts are given the UV from the first face that uses them */
for(i = 0, mf = mface; i < numFaces; ++i, ++mf, ++tf) {
@@ -5439,7 +5506,7 @@ static void armatureModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(tamd->defgrp_name, amd->defgrp_name, 32);
}
-CustomDataMask armatureModifier_requiredDataMask(ModifierData *md)
+CustomDataMask armatureModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CustomDataMask dataMask = 0;
@@ -5553,7 +5620,7 @@ static void hookModifier_copyData(ModifierData *md, ModifierData *target)
strncpy(thmd->name, hmd->name, 32);
}
-CustomDataMask hookModifier_requiredDataMask(ModifierData *md)
+CustomDataMask hookModifier_requiredDataMask(Object *ob, ModifierData *md)
{
HookModifierData *hmd = (HookModifierData *)md;
CustomDataMask dataMask = 0;
@@ -5812,7 +5879,7 @@ static void clothModifier_updateDepgraph(
}
}
-CustomDataMask clothModifier_requiredDataMask(ModifierData *md)
+CustomDataMask clothModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CustomDataMask dataMask = 0;
@@ -6069,7 +6136,8 @@ static void surfaceModifier_freeData(ModifierData *md)
MEM_freeN(surmd->bvhtree);
}
- surmd->dm->release(surmd->dm);
+ if(surmd->dm)
+ surmd->dm->release(surmd->dm);
surmd->bvhtree = NULL;
surmd->dm = NULL;
@@ -6093,7 +6161,7 @@ static void surfaceModifier_deformVerts(
/* if possible use/create DerivedMesh */
if(derivedData) surmd->dm = CDDM_copy(derivedData);
- else if(ob->type==OB_MESH) surmd->dm = CDDM_from_mesh(ob->data, ob);
+ else surmd->dm = get_original_dm(md->scene, ob, NULL, 0);
if(!ob->pd)
{
@@ -6195,7 +6263,7 @@ static DerivedMesh *booleanModifier_applyModifier(
return derivedData;
}
-CustomDataMask booleanModifier_requiredDataMask(ModifierData *md)
+CustomDataMask booleanModifier_requiredDataMask(Object *ob, ModifierData *md)
{
CustomDataMask dataMask = (1 << CD_MTFACE) + (1 << CD_MEDGE);
@@ -6243,12 +6311,30 @@ static void particleSystemModifier_copyData(ModifierData *md, ModifierData *targ
tpsmd->psys = psmd->psys;
}
-CustomDataMask particleSystemModifier_requiredDataMask(ModifierData *md)
+CustomDataMask particleSystemModifier_requiredDataMask(Object *ob, ModifierData *md)
{
ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
- CustomDataMask dataMask = (1 << CD_MTFACE) + (1 << CD_MEDGE);
+ CustomDataMask dataMask = 0;
+ Material *ma;
+ MTex *mtex;
int i;
+ if(!psmd->psys->part)
+ return 0;
+
+ ma= give_current_material(ob, psmd->psys->part->omat);
+ if(ma) {
+ for(i=0; i<MAX_MTEX; i++) {
+ mtex=ma->mtex[i];
+ if(mtex && (ma->septex & (1<<i))==0)
+ if(mtex->pmapto && (mtex->texco & TEXCO_UV))
+ dataMask |= (1 << CD_MTFACE);
+ }
+ }
+
+ if(psmd->psys->part->tanfac!=0.0)
+ dataMask |= (1 << CD_MTFACE);
+
/* ask for vertexgroups if we need them */
for(i=0; i<PSYS_TOT_VG; i++){
if(psmd->psys->vgroup[i]){
@@ -6265,70 +6351,6 @@ CustomDataMask particleSystemModifier_requiredDataMask(ModifierData *md)
return dataMask;
}
-static int is_last_displist(Object *ob)
-{
- Curve *cu = ob->data;
- static int curvecount=0, totcurve=0;
-
- if(curvecount==0){
- DispList *dl;
-
- totcurve=0;
- for(dl=cu->disp.first; dl; dl=dl->next){
- totcurve++;
- }
- }
-
- curvecount++;
-
- if(curvecount==totcurve){
- curvecount=0;
- return 1;
- }
-
- return 0;
-}
-
-static DerivedMesh *get_original_dm(Scene *scene, Object *ob, float (*vertexCos)[3], int orco)
-{
- DerivedMesh *dm= NULL;
-
- if(ob->type==OB_MESH) {
- dm = CDDM_from_mesh((Mesh*)(ob->data), ob);
-
- if(vertexCos) {
- CDDM_apply_vert_coords(dm, vertexCos);
- //CDDM_calc_normals(dm);
- }
-
- if(orco)
- DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
- }
- else if(ELEM3(ob->type,OB_FONT,OB_CURVE,OB_SURF)) {
- Object *tmpobj;
- Curve *tmpcu;
-
- if(is_last_displist(ob)) {
- /* copies object and modifiers (but not the data) */
- tmpobj= copy_object(ob);
- tmpcu = (Curve *)tmpobj->data;
- tmpcu->id.us--;
-
- /* copies the data */
- tmpobj->data = copy_curve((Curve *) ob->data);
-
- makeDispListCurveTypes(scene, tmpobj, 1);
- nurbs_to_mesh(tmpobj);
-
- dm = CDDM_from_mesh((Mesh*)(tmpobj->data), tmpobj);
- //CDDM_calc_normals(dm);
-
- free_libblock_us(&G.main->object, tmpobj);
- }
- }
-
- return dm;
-}
/* saves the current emitter state for a particle system and calculates particles */
static void particleSystemModifier_deformVerts(
@@ -6391,6 +6413,7 @@ static void particleSystemModifier_deformVerts(
}
if(psys){
+ psmd->flag &= ~eParticleSystemFlag_psys_updated;
particle_system_update(md->scene, ob, psys);
psmd->flag |= eParticleSystemFlag_psys_updated;
psmd->flag &= ~eParticleSystemFlag_DM_changed;
@@ -6422,6 +6445,8 @@ static void particleInstanceModifier_initData(ModifierData *md)
pimd->flag = eParticleInstanceFlag_Parents|eParticleInstanceFlag_Unborn|
eParticleInstanceFlag_Alive|eParticleInstanceFlag_Dead;
pimd->psys = 1;
+ pimd->position = 1.0f;
+ pimd->axis = 2;
}
static void particleInstanceModifier_copyData(ModifierData *md, ModifierData *target)
@@ -6432,6 +6457,8 @@ static void particleInstanceModifier_copyData(ModifierData *md, ModifierData *ta
tpimd->ob = pimd->ob;
tpimd->psys = pimd->psys;
tpimd->flag = pimd->flag;
+ tpimd->position = pimd->position;
+ tpimd->random_position = pimd->random_position;
}
static int particleInstanceModifier_dependsOnTime(ModifierData *md)
@@ -6471,8 +6498,9 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
MFace *mface, *orig_mface;
MVert *mvert, *orig_mvert;
int i,totvert, totpart=0, totface, maxvert, maxface, first_particle=0;
- short track=ob->trackflag%3, trackneg;
+ short track=ob->trackflag%3, trackneg, axis = pimd->axis;
float max_co=0.0, min_co=0.0, temp_co[3], cross[3];
+ float *size=NULL;
trackneg=((ob->trackflag>2)?1:0);
@@ -6499,6 +6527,25 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
if(totpart==0)
return derivedData;
+ if(pimd->flag & eParticleInstanceFlag_UseSize) {
+ int p;
+ float *si;
+ si = size = MEM_callocN(totpart * sizeof(float), "particle size array");
+
+ if(pimd->flag & eParticleInstanceFlag_Parents) {
+ for(p=0, pa= psys->particles; p<psys->totpart; p++, pa++, si++)
+ *si = pa->size;
+ }
+
+ if(pimd->flag & eParticleInstanceFlag_Children) {
+ ChildParticle *cpa = psys->child;
+
+ for(p=0; p<psys->totchild; p++, cpa++, si++) {
+ *si = psys_get_child_size(psys, cpa, 0.0f, NULL);
+ }
+ }
+ }
+
pars=psys->particles;
totvert=dm->getNumVerts(dm);
@@ -6509,7 +6556,7 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
psys->lattice=psys_get_lattice(md->scene, ob, psys);
- if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED)){
+ if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED){
float min_r[3], max_r[3];
INIT_MINMAX(min_r, max_r);
@@ -6534,40 +6581,59 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
/*change orientation based on object trackflag*/
VECCOPY(temp_co,mv->co);
- mv->co[0]=temp_co[track];
- mv->co[1]=temp_co[(track+1)%3];
- mv->co[2]=temp_co[(track+2)%3];
-
- if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) && pimd->flag & eParticleInstanceFlag_Path){
- state.time=(mv->co[0]-min_co)/(max_co-min_co);
- if(trackneg)
- state.time=1.0f-state.time;
- psys_get_particle_on_path(md->scene, pimd->ob, psys,first_particle + i/totvert, &state,1);
+ mv->co[axis]=temp_co[track];
+ mv->co[(axis+1)%3]=temp_co[(track+1)%3];
+ mv->co[(axis+2)%3]=temp_co[(track+2)%3];
+
+ if((psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) && pimd->flag & eParticleInstanceFlag_Path){
+ float ran = 0.0f;
+ if(pimd->random_position != 0.0f) {
+ /* 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]);
+ }
- mv->co[0] = 0.0;
+ if(pimd->flag & eParticleInstanceFlag_KeepShape) {
+ state.time = pimd->position * (1.0f - ran);
+ }
+ else {
+ state.time=(mv->co[axis]-min_co)/(max_co-min_co) * pimd->position * (1.0f - ran);
+
+ if(trackneg)
+ state.time=1.0f-state.time;
+
+ mv->co[axis] = 0.0;
+ }
+
+ psys_get_particle_on_path(md->scene, pimd->ob, psys,first_particle + i/totvert, &state,1);
Normalize(state.vel);
- if(state.vel[0] < -0.9999 || state.vel[0] > 0.9999) {
- state.rot[0] = 1.0;
+ /* TODO: incremental rotations somehow */
+ if(state.vel[axis] < -0.9999 || state.vel[axis] > 0.9999) {
+ state.rot[0] = 1;
state.rot[1] = state.rot[2] = state.rot[3] = 0.0f;
}
else {
- /* a cross product of state.vel and a unit vector in x-direction */
- cross[0] = 0.0f;
- cross[1] = -state.vel[2];
- cross[2] = state.vel[1];
+ float temp[3] = {0.0f,0.0f,0.0f};
+ temp[axis] = 1.0f;
- /* state.vel[0] is the only component surviving from a dot product with a vector in x-direction*/
- VecRotToQuat(cross,saacos(state.vel[0]),state.rot);
+ Crossf(cross, temp, state.vel);
+
+ /* state.vel[axis] is the only component surviving from a dot product with the axis */
+ VecRotToQuat(cross,saacos(state.vel[axis]),state.rot);
}
+
}
else{
state.time=-1.0;
- psys_get_particle_state(md->scene, pimd->ob, psys, i/totvert, &state,1);
+ psys_get_particle_state(md->scene, pimd->ob, psys, first_particle + i/totvert, &state,1);
}
QuatMulVecf(state.rot,mv->co);
+ if(pimd->flag & eParticleInstanceFlag_UseSize)
+ VecMulf(mv->co, size[i/totvert]);
VECADD(mv->co,mv->co,state.co);
}
@@ -6621,6 +6687,9 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
}
CDDM_tessfaces_to_faces(result);
+ if(size)
+ MEM_freeN(size);
+
return result;
}
static DerivedMesh *particleInstanceModifier_applyModifierEM(
@@ -6658,7 +6727,7 @@ static int explodeModifier_dependsOnTime(ModifierData *md)
{
return 1;
}
-CustomDataMask explodeModifier_requiredDataMask(ModifierData *md)
+CustomDataMask explodeModifier_requiredDataMask(Object *ob, ModifierData *md)
{
ExplodeModifierData *emd= (ExplodeModifierData*) md;
CustomDataMask dataMask = 0;
@@ -7260,10 +7329,10 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
timestep= psys_get_timestep(part);
- if(part->flag & PART_GLOB_TIME)
+ //if(part->flag & PART_GLOB_TIME)
cfra=bsystem_time(scene, 0,(float)scene->r.cfra,0.0);
- else
- cfra=bsystem_time(scene, ob,(float)scene->r.cfra,0.0);
+ //else
+ // cfra=bsystem_time(scene, ob,(float)scene->r.cfra,0.0);
/* hash table for vertice <-> particle relations */
vertpahash= BLI_edgehash_new();
@@ -7574,7 +7643,7 @@ static void meshdeformModifier_copyData(ModifierData *md, ModifierData *target)
tmmd->object = mmd->object;
}
-CustomDataMask meshdeformModifier_requiredDataMask(ModifierData *md)
+CustomDataMask meshdeformModifier_requiredDataMask(Object *ob, ModifierData *md)
{
MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
CustomDataMask dataMask = 0;
@@ -7837,10 +7906,12 @@ static void meshdeformModifier_deformVerts(
{
DerivedMesh *dm;
- if(!derivedData && ob->type==OB_MESH)
- dm= CDDM_from_mesh(ob->data, ob);
- else
- dm= derivedData;
+ if (!derivedData) {
+ dm= get_original_dm(md->scene, ob, NULL, 0);
+ if (dm == NULL) return;
+ }
+ else dm= derivedData;
+
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
@@ -7952,7 +8023,7 @@ static void shrinkwrapModifier_copyData(ModifierData *md, ModifierData *target)
tsmd->subsurfLevels = smd->subsurfLevels;
}
-CustomDataMask shrinkwrapModifier_requiredDataMask(ModifierData *md)
+CustomDataMask shrinkwrapModifier_requiredDataMask(Object *ob, ModifierData *md)
{
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md;
CustomDataMask dataMask = 0;
@@ -7986,7 +8057,7 @@ static void shrinkwrapModifier_foreachObjectLink(ModifierData *md, Object *ob, O
static void shrinkwrapModifier_deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
{
DerivedMesh *dm = NULL;
- CustomDataMask dataMask = shrinkwrapModifier_requiredDataMask(md);
+ CustomDataMask dataMask = shrinkwrapModifier_requiredDataMask(ob, md);
/* We implement requiredDataMask but thats not really usefull since mesh_calc_modifiers pass a NULL derivedData or without the modified vertexs applied */
if(dataMask)
@@ -8012,7 +8083,7 @@ static void shrinkwrapModifier_deformVerts(ModifierData *md, Object *ob, Derived
static void shrinkwrapModifier_deformVertsEM(ModifierData *md, Object *ob, BMEditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = NULL;
- CustomDataMask dataMask = shrinkwrapModifier_requiredDataMask(md);
+ CustomDataMask dataMask = shrinkwrapModifier_requiredDataMask(ob, md);
if(dataMask)
{
@@ -8071,7 +8142,7 @@ static void simpledeformModifier_copyData(ModifierData *md, ModifierData *target
memcpy(tsmd->limit, smd->limit, sizeof(tsmd->limit));
}
-static CustomDataMask simpledeformModifier_requiredDataMask(ModifierData *md)
+static CustomDataMask simpledeformModifier_requiredDataMask(Object *ob, ModifierData *md)
{
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
CustomDataMask dataMask = 0;
@@ -8100,7 +8171,7 @@ static void simpledeformModifier_updateDepgraph(ModifierData *md, DagForest *for
static void simpledeformModifier_deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
{
DerivedMesh *dm = NULL;
- CustomDataMask dataMask = simpledeformModifier_requiredDataMask(md);
+ CustomDataMask dataMask = simpledeformModifier_requiredDataMask(ob, md);
/* We implement requiredDataMask but thats not really usefull since mesh_calc_modifiers pass a NULL derivedData or without the modified vertexs applied */
if(dataMask)
@@ -8127,7 +8198,7 @@ static void simpledeformModifier_deformVerts(ModifierData *md, Object *ob, Deriv
static void simpledeformModifier_deformVertsEM(ModifierData *md, Object *ob, BMEditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
DerivedMesh *dm = NULL;
- CustomDataMask dataMask = simpledeformModifier_requiredDataMask(md);
+ CustomDataMask dataMask = simpledeformModifier_requiredDataMask(ob, md);
/* We implement requiredDataMask but thats not really usefull since mesh_calc_modifiers pass a NULL derivedData or without the modified vertexs applied */
if(dataMask)
@@ -8389,7 +8460,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti = INIT_TYPE(Softbody);
mti->type = eModifierTypeType_OnlyDeform;
mti->flags = eModifierTypeFlag_AcceptsCVs
- | eModifierTypeFlag_RequiresOriginalData;
+ | eModifierTypeFlag_RequiresOriginalData
+ | eModifierTypeFlag_Single;
mti->deformVerts = softbodyModifier_deformVerts;
mti->dependsOnTime = softbodyModifier_dependsOnTime;
@@ -8397,7 +8469,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->type = eModifierTypeType_Nonconstructive;
mti->initData = clothModifier_initData;
mti->flags = eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_UsesPointCache;
+ | eModifierTypeFlag_UsesPointCache
+ | eModifierTypeFlag_Single;
mti->dependsOnTime = clothModifier_dependsOnTime;
mti->freeData = clothModifier_freeData;
mti->requiredDataMask = clothModifier_requiredDataMask;
@@ -8408,7 +8481,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti = INIT_TYPE(Collision);
mti->type = eModifierTypeType_OnlyDeform;
mti->initData = collisionModifier_initData;
- mti->flags = eModifierTypeFlag_AcceptsMesh;
+ mti->flags = eModifierTypeFlag_AcceptsMesh
+ | eModifierTypeFlag_Single;
mti->dependsOnTime = collisionModifier_dependsOnTime;
mti->freeData = collisionModifier_freeData;
mti->deformVerts = collisionModifier_deformVerts;
@@ -8491,7 +8565,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti = INIT_TYPE(Fluidsim);
mti->type = eModifierTypeType_Nonconstructive
- | eModifierTypeFlag_RequiresOriginalData;
+ | eModifierTypeFlag_RequiresOriginalData
+ | eModifierTypeFlag_Single;
mti->flags = eModifierTypeFlag_AcceptsMesh;
mti->initData = fluidsimModifier_initData;
mti->freeData = fluidsimModifier_freeData;
@@ -8739,7 +8814,20 @@ int modifiers_isParticleEnabled(Object *ob)
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
-LinkNode *modifiers_calcDataMasks(ModifierData *md, CustomDataMask dataMask)
+int modifier_isEnabled(ModifierData *md, int required_mode)
+{
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+ if((md->mode & required_mode) != required_mode) return 0;
+ if(mti->isDisabled && mti->isDisabled(md)) return 0;
+ if(md->mode & eModifierMode_DisableTemporary) return 0;
+ if(required_mode & eModifierMode_Editmode)
+ if(!(mti->flags & eModifierTypeFlag_SupportsEditmode)) return 0;
+
+ return 1;
+}
+
+LinkNode *modifiers_calcDataMasks(Object *ob, ModifierData *md, CustomDataMask dataMask, int required_mode)
{
LinkNode *dataMasks = NULL;
LinkNode *curr, *prev;
@@ -8749,7 +8837,9 @@ LinkNode *modifiers_calcDataMasks(ModifierData *md, CustomDataMask dataMask)
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
CustomDataMask mask = 0;
- if(mti->requiredDataMask) mask = mti->requiredDataMask(md);
+ if(modifier_isEnabled(md, required_mode))
+ if(mti->requiredDataMask)
+ mask = mti->requiredDataMask(ob, md);
BLI_linklist_prepend(&dataMasks, SET_INT_IN_POINTER(mask));
}
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 2a2b7e53722..03838e3c258 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -1270,8 +1270,10 @@ void multires_free(Multires *mr)
if(lvl) {
CustomData_free(&mr->vdata, lvl->totvert);
CustomData_free(&mr->fdata, lvl->totface);
- MEM_freeN(mr->edge_flags);
- MEM_freeN(mr->edge_creases);
+ if(mr->edge_flags)
+ MEM_freeN(mr->edge_flags);
+ if(mr->edge_creases)
+ MEM_freeN(mr->edge_creases);
}
while(lvl) {
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index dc2bf26759f..457df9be7a9 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -17,171 +17,1433 @@
* 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.
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
* All rights reserved.
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Joshua Leung (full recode)
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <stdlib.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_ghash.h"
-#include "DNA_space_types.h"
-#include "DNA_nla_types.h"
+#include "DNA_anim_types.h"
#include "DNA_action_types.h"
-#include "DNA_ID.h"
-#include "DNA_ipo_types.h"
-#include "DNA_object_types.h"
-#include "BKE_nla.h"
+#include "BKE_animsys.h"
#include "BKE_action.h"
+#include "BKE_fcurve.h"
+#include "BKE_nla.h"
#include "BKE_blender.h"
#include "BKE_library.h"
-#include "BKE_object.h" /* for convert_action_to_strip(ob) */
+#include "BKE_object.h"
+#include "BKE_utildefines.h"
+
+#include "RNA_access.h"
+#include "nla_private.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-/* NOTE: in group.c the strips get copied for group-nla override, this assumes
- that strips are one single block, without additional data to be copied */
-void copy_actionstrip (bActionStrip **dst, bActionStrip **src){
- bActionStrip *dstrip;
- bActionStrip *sstrip = *src;
+/* *************************************************** */
+/* Data Management */
+
+/* Freeing ------------------------------------------- */
+
+/* Remove the given NLA strip from the NLA track it occupies, free the strip's data,
+ * and the strip itself.
+ */
+void free_nlastrip (ListBase *strips, NlaStrip *strip)
+{
+ NlaStrip *cs, *csn;
+
+ /* sanity checks */
+ if (strip == NULL)
+ return;
+
+ /* free child-strips */
+ for (cs= strip->strips.first; cs; cs= csn) {
+ csn= cs->next;
+ free_nlastrip(&strip->strips, cs);
+ }
+
+ /* remove reference to action */
+ if (strip->act)
+ strip->act->id.us--;
+
+ /* free remapping info */
+ //if (strip->remap)
+ // BKE_animremap_free();
+
+ /* free own F-Curves */
+ free_fcurves(&strip->fcurves);
+
+ /* free own F-Modifiers */
+ free_fmodifiers(&strip->modifiers);
+
+ /* free the strip itself */
+ if (strips)
+ BLI_freelinkN(strips, strip);
+ else
+ MEM_freeN(strip);
+}
- if (!*src){
- *dst=NULL;
+/* Remove the given NLA track from the set of NLA tracks, free the track's data,
+ * and the track itself.
+ */
+void free_nlatrack (ListBase *tracks, NlaTrack *nlt)
+{
+ NlaStrip *strip, *stripn;
+
+ /* sanity checks */
+ if (nlt == NULL)
return;
+
+ /* free strips */
+ for (strip= nlt->strips.first; strip; strip= stripn) {
+ stripn= strip->next;
+ free_nlastrip(&nlt->strips, strip);
}
+
+ /* free NLA track itself now */
+ if (tracks)
+ BLI_freelinkN(tracks, nlt);
+ else
+ MEM_freeN(nlt);
+}
- *dst = MEM_dupallocN(sstrip);
+/* Free the elements of type NLA Tracks provided in the given list, but do not free
+ * the list itself since that is not free-standing
+ */
+void free_nladata (ListBase *tracks)
+{
+ NlaTrack *nlt, *nltn;
+
+ /* sanity checks */
+ if ELEM(NULL, tracks, tracks->first)
+ return;
+
+ /* free tracks one by one */
+ for (nlt= tracks->first; nlt; nlt= nltn) {
+ nltn= nlt->next;
+ free_nlatrack(tracks, nlt);
+ }
+
+ /* clear the list's pointers to be safe */
+ tracks->first= tracks->last= NULL;
+}
- dstrip = *dst;
- if (dstrip->act)
- dstrip->act->id.us++;
+/* Copying ------------------------------------------- */
- if (dstrip->ipo)
- dstrip->ipo->id.us++;
+/* Copy NLA strip */
+NlaStrip *copy_nlastrip (NlaStrip *strip)
+{
+ NlaStrip *strip_d;
+ NlaStrip *cs, *cs_d;
- if (dstrip->modifiers.first) {
- BLI_duplicatelist (&dstrip->modifiers, &sstrip->modifiers);
+ /* sanity check */
+ if (strip == NULL)
+ return NULL;
+
+ /* make a copy */
+ strip_d= MEM_dupallocN(strip);
+ strip_d->next= strip_d->prev= NULL;
+
+ /* increase user-count of action */
+ if (strip_d->act)
+ strip_d->act->id.us++;
+
+ /* copy F-Curves and modifiers */
+ copy_fcurves(&strip_d->fcurves, &strip->fcurves);
+ copy_fmodifiers(&strip_d->modifiers, &strip->modifiers);
+
+ /* make a copy of all the child-strips, one at a time */
+ strip_d->strips.first= strip_d->strips.last= NULL;
+
+ for (cs= strip->strips.first; cs; cs= cs->next) {
+ cs_d= copy_nlastrip(cs);
+ BLI_addtail(&strip_d->strips, cs_d);
}
+ /* return the strip */
+ return strip_d;
}
-void copy_nlastrips (ListBase *dst, ListBase *src)
+/* Copy NLA Track */
+NlaTrack *copy_nlatrack (NlaTrack *nlt)
{
- bActionStrip *strip;
+ NlaStrip *strip, *strip_d;
+ NlaTrack *nlt_d;
+
+ /* sanity check */
+ if (nlt == NULL)
+ return NULL;
+
+ /* make a copy */
+ nlt_d= MEM_dupallocN(nlt);
+ nlt_d->next= nlt_d->prev= NULL;
+
+ /* make a copy of all the strips, one at a time */
+ nlt_d->strips.first= nlt_d->strips.last= NULL;
+
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ strip_d= copy_nlastrip(strip);
+ BLI_addtail(&nlt_d->strips, strip_d);
+ }
+
+ /* return the copy */
+ return nlt_d;
+}
- dst->first=dst->last=NULL;
+/* Copy all NLA data */
+void copy_nladata (ListBase *dst, ListBase *src)
+{
+ NlaTrack *nlt, *nlt_d;
+
+ /* sanity checks */
+ if ELEM(NULL, dst, src)
+ return;
+
+ /* copy each NLA-track, one at a time */
+ for (nlt= src->first; nlt; nlt= nlt->next) {
+ /* make a copy, and add the copy to the destination list */
+ nlt_d= copy_nlatrack(nlt);
+ BLI_addtail(dst, nlt_d);
+ }
+}
- BLI_duplicatelist (dst, src);
+/* Adding ------------------------------------------- */
- /* Update specific data */
- if (!dst->first)
- return;
+/* Add a NLA Track to the given AnimData
+ * - prev: NLA-Track to add the new one after
+ */
+NlaTrack *add_nlatrack (AnimData *adt, NlaTrack *prev)
+{
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if (adt == NULL)
+ return NULL;
+
+ /* allocate new track */
+ nlt= MEM_callocN(sizeof(NlaTrack), "NlaTrack");
+
+ /* set settings requiring the track to not be part of the stack yet */
+ nlt->flag = NLATRACK_SELECTED;
+ nlt->index= BLI_countlist(&adt->nla_tracks);
+
+ /* add track to stack, and make it the active one */
+ if (prev)
+ BLI_insertlinkafter(&adt->nla_tracks, prev, nlt);
+ else
+ BLI_addtail(&adt->nla_tracks, nlt);
+ BKE_nlatrack_set_active(&adt->nla_tracks, nlt);
+
+ /* must have unique name, but we need to seed this */
+ sprintf(nlt->name, "NlaTrack");
+ BLI_uniquename(&adt->nla_tracks, nlt, "NlaTrack", '.', offsetof(NlaTrack, name), 64);
+
+ /* return the new track */
+ return nlt;
+}
+
+/* Add a NLA Strip referencing the given Action */
+NlaStrip *add_nlastrip (bAction *act)
+{
+ NlaStrip *strip;
+
+ /* sanity checks */
+ if (act == NULL)
+ return NULL;
+
+ /* allocate new strip */
+ strip= MEM_callocN(sizeof(NlaStrip), "NlaStrip");
+
+ /* generic settings
+ * - selected flag to highlight this to the user
+ * - auto-blends to ensure that blend in/out values are automatically
+ * determined by overlaps of strips
+ * - (XXX) synchronisation of strip-length in accordance with changes to action-length
+ * is not done though, since this should only really happens in editmode for strips now
+ * though this decision is still subject to further review...
+ */
+ strip->flag = NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_AUTO_BLENDS;
+
+ /* assign the action reference */
+ strip->act= act;
+ id_us_plus(&act->id);
+
+ /* determine initial range
+ * - strip length cannot be 0... ever...
+ */
+ 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);
+
+ /* strip should be referenced as-is */
+ strip->scale= 1.0f;
+ strip->repeat = 1.0f;
+
+ /* return the new strip */
+ return strip;
+}
- for (strip = dst->first; strip; strip=strip->next){
- if (strip->act)
- strip->act->id.us++;
- if (strip->ipo)
- strip->ipo->id.us++;
- if (strip->modifiers.first) {
- ListBase listb;
- BLI_duplicatelist (&listb, &strip->modifiers);
- strip->modifiers= listb;
+/* Add new NLA-strip to the top of the NLA stack - i.e. into the last track if space, or a new one otherwise */
+NlaStrip *add_nlastrip_to_stack (AnimData *adt, bAction *act)
+{
+ NlaStrip *strip;
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if ELEM(NULL, adt, act)
+ return NULL;
+
+ /* create a new NLA strip */
+ strip= add_nlastrip(act);
+ if (strip == NULL)
+ return NULL;
+
+ /* firstly try adding strip to last track, but if that fails, add to a new track */
+ if (BKE_nlatrack_add_strip(adt->nla_tracks.last, strip) == 0) {
+ /* trying to add to the last track failed (no track or no space),
+ * so add a new track to the stack, and add to that...
+ */
+ nlt= add_nlatrack(adt, NULL);
+ BKE_nlatrack_add_strip(nlt, strip);
+ }
+
+ /* automatically name it too */
+ BKE_nlastrip_validate_name(adt, strip);
+
+ /* returns the strip added */
+ return strip;
+}
+
+/* *************************************************** */
+/* NLA Evaluation <-> Editing Stuff */
+
+/* Strip Mapping ------------------------------------- */
+
+/* non clipped mapping for strip-time <-> global time (for Action-Clips)
+ * invert = convert action-strip time to global time
+ */
+static float nlastrip_get_frame_actionclip (NlaStrip *strip, float cframe, short mode)
+{
+ float actlength, repeat, scale;
+
+ /* get number of repeats */
+ if (IS_EQ(strip->repeat, 0.0f)) strip->repeat = 1.0f;
+ repeat = strip->repeat;
+
+ /* scaling */
+ if (IS_EQ(strip->scale, 0.0f)) strip->scale= 1.0f;
+ scale = (float)fabs(strip->scale); /* scale must be positive - we've got a special flag for reversing */
+
+ /* length of referenced action */
+ actlength = strip->actend - strip->actstart;
+ if (IS_EQ(actlength, 0.0f)) actlength = 1.0f;
+
+ /* reversed = play strip backwards */
+ if (strip->flag & NLASTRIP_FLAG_REVERSE) {
+ // FIXME: this won't work right with Graph Editor?
+ if (mode == NLATIME_CONVERT_MAP) {
+ return strip->end - scale*(cframe - strip->actstart);
+ }
+ else if (mode == NLATIME_CONVERT_UNMAP) {
+ int repeatsNum = (int)((cframe - strip->start) / (actlength * scale));
+
+ /* this method doesn't clip the values to lie within the action range only
+ * - the '(repeatsNum * actlength * scale)' compensates for the fmod(...)
+ * - the fmod(...) works in the same way as for eval
+ */
+ return strip->actend - (repeatsNum * actlength * scale)
+ - (fmod(cframe - strip->start, actlength*scale) / scale);
+ }
+ else {
+ if (IS_EQ(cframe, strip->end) && IS_EQ(strip->repeat, ((int)strip->repeat))) {
+ /* this case prevents the motion snapping back to the first frame at the end of the strip
+ * by catching the case where repeats is a whole number, which means that the end of the strip
+ * could also be interpreted as the end of the start of a repeat
+ */
+ return strip->actstart;
+ }
+ else {
+ /* - the 'fmod(..., actlength*scale)' is needed to get the repeats working
+ * - the '/ scale' is needed to ensure that scaling influences the timing within the repeat
+ */
+ return strip->actend - fmod(cframe - strip->start, actlength*scale) / scale;
+ }
+ }
+ }
+ else {
+ if (mode == NLATIME_CONVERT_MAP) {
+ return strip->start + scale*(cframe - strip->actstart);
+ }
+ else if (mode == NLATIME_CONVERT_UNMAP) {
+ int repeatsNum = (int)((cframe - strip->start) / (actlength * scale));
+
+ /* this method doesn't clip the values to lie within the action range only
+ * - the '(repeatsNum * actlength * scale)' compensates for the fmod(...)
+ * - the fmod(...) works in the same way as for eval
+ */
+ return strip->actstart + (repeatsNum * actlength * scale)
+ + (fmod(cframe - strip->start, actlength*scale) / scale);
+ }
+ else /* if (mode == NLATIME_CONVERT_EVAL) */{
+ if (IS_EQ(cframe, strip->end) && IS_EQ(strip->repeat, ((int)strip->repeat))) {
+ /* this case prevents the motion snapping back to the first frame at the end of the strip
+ * by catching the case where repeats is a whole number, which means that the end of the strip
+ * could also be interpreted as the end of the start of a repeat
+ */
+ return strip->actend;
+ }
+ else {
+ /* - the 'fmod(..., actlength*scale)' is needed to get the repeats working
+ * - the '/ scale' is needed to ensure that scaling influences the timing within the repeat
+ */
+ return strip->actstart + fmod(cframe - strip->start, actlength*scale) / scale;
+ }
}
}
}
-/* from editnla, for convert_action_to_strip -- no UI code so should be ok here.. */
-void find_stridechannel(Object *ob, bActionStrip *strip)
+/* non clipped mapping for strip-time <-> global time (for Transitions)
+ * invert = convert action-strip time to global time
+ */
+static float nlastrip_get_frame_transition (NlaStrip *strip, float cframe, short mode)
{
- if(ob && ob->pose) {
- bPoseChannel *pchan;
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
- if(pchan->flag & POSE_STRIDE)
- break;
- if(pchan)
- BLI_strncpy(strip->stridechannel, pchan->name, 32);
+ float length;
+
+ /* length of strip */
+ length= strip->end - strip->start;
+
+ /* reversed = play strip backwards */
+ if (strip->flag & NLASTRIP_FLAG_REVERSE) {
+ if (mode == NLATIME_CONVERT_MAP)
+ return strip->end - (length * cframe);
else
- strip->stridechannel[0]= 0;
+ return (strip->end - cframe) / length;
+ }
+ else {
+ if (mode == NLATIME_CONVERT_MAP)
+ return (length * cframe) + strip->start;
+ else
+ return (cframe - strip->start) / length;
}
}
-//called by convert_nla / bpy api with an object with the action to be converted to a new strip
-bActionStrip *convert_action_to_strip (Object *ob)
+/* non clipped mapping for strip-time <-> global time
+ * mode = eNlaTime_ConvertModes[] -> NLATIME_CONVERT_*
+ *
+ * only secure for 'internal' (i.e. within AnimSys evaluation) operations,
+ * but should not be directly relied on for stuff which interacts with editors
+ */
+float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
{
- bActionStrip *nstrip;
+ switch (strip->type) {
+ case NLASTRIP_TYPE_META: /* meta - for now, does the same as transition (is really just an empty container) */
+ case NLASTRIP_TYPE_TRANSITION: /* transition */
+ return nlastrip_get_frame_transition(strip, cframe, mode);
+
+ case NLASTRIP_TYPE_CLIP: /* action-clip (default) */
+ default:
+ return nlastrip_get_frame_actionclip(strip, cframe, mode);
+ }
+}
- /* Make new actionstrip */
- nstrip = MEM_callocN(sizeof(bActionStrip), "bActionStrip");
-
- /* Link the action to the nstrip */
- nstrip->act = ob->action;
- id_us_plus(&nstrip->act->id);
- calc_action_range(nstrip->act, &nstrip->actstart, &nstrip->actend, 1);
- nstrip->start = nstrip->actstart;
- nstrip->end = nstrip->actend;
- nstrip->flag = ACTSTRIP_SELECT|ACTSTRIP_LOCK_ACTION;
+
+/* Non clipped mapping for strip-time <-> global time
+ * mode = eNlaTime_ConvertModesp[] -> NLATIME_CONVERT_*
+ *
+ * Public API method - perform this mapping using the given AnimData block
+ * and perform any necessary sanity checks on the value
+ */
+float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
+{
+ NlaStrip *strip;
+
+ /* sanity checks
+ * - obviously we've got to have some starting data
+ * - when not in tweakmode, the active Action does not have any scaling applied :)
+ * - when in tweakmode, if the no-mapping flag is set, do not map
+ */
+ if ((adt == NULL) || (adt->flag & ADT_NLA_EDIT_ON)==0 || (adt->flag & ADT_NLA_EDIT_NOMAP))
+ return cframe;
+
+ /* if the active-strip info has been stored already, access this, otherwise look this up
+ * and store for (very probable) future usage
+ */
+ if (adt->actstrip == NULL) {
+ NlaTrack *nlt= BKE_nlatrack_find_active(&adt->nla_tracks);
+ adt->actstrip= BKE_nlastrip_find_active(nlt);
+ }
+ strip= adt->actstrip;
+
+ /* sanity checks
+ * - in rare cases, we may not be able to find this strip for some reason (internal error)
+ * - for now, if the user has defined a curve to control the time, this correction cannot be performed
+ * reliably...
+ */
+ if ((strip == NULL) || (strip->flag & NLASTRIP_FLAG_USR_TIME))
+ return cframe;
+
+ /* perform the correction now... */
+ return nlastrip_get_frame(strip, cframe, mode);
+}
+
+/* *************************************************** */
+/* NLA API */
+
+/* List of Strips ------------------------------------ */
+/* (these functions are used for NLA-Tracks and also for nested/meta-strips) */
+
+/* Check if there is any space in the given list to add the given strip */
+short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
+{
+ NlaStrip *strip;
+
+ /* sanity checks */
+ if ((strips == NULL) || IS_EQ(start, end))
+ return 0;
+ if (start > end) {
+ puts("BKE_nlastrips_has_space() error... start and end arguments swapped");
+ SWAP(float, start, end);
+ }
+
+ /* loop over NLA strips checking for any overlaps with this area... */
+ for (strip= strips->first; strip; strip= strip->next) {
+ /* if start frame of strip is past the target end-frame, that means that
+ * we've gone past the window we need to check for, so things are fine
+ */
+ if (strip->start > end)
+ return 1;
+
+ /* if the end of the strip is greater than either of the boundaries, the range
+ * must fall within the extents of the strip
+ */
+ if ((strip->end > start) || (strip->end > end))
+ return 0;
+ }
+
+ /* if we are still here, we haven't encountered any overlapping strips */
+ return 1;
+}
+
+/* Rearrange the strips in the track so that they are always in order
+ * (usually only needed after a strip has been moved)
+ */
+void BKE_nlastrips_sort_strips (ListBase *strips)
+{
+ ListBase tmp = {NULL, NULL};
+ NlaStrip *strip, *sstrip, *stripn;
+
+ /* sanity checks */
+ if ELEM(NULL, strips, strips->first)
+ return;
+
+ /* we simply perform insertion sort on this list, since it is assumed that per track,
+ * there are only likely to be at most 5-10 strips
+ */
+ for (strip= strips->first; strip; strip= stripn) {
+ short not_added = 1;
+
+ stripn= strip->next;
+
+ /* remove this strip from the list, and add it to the new list, searching from the end of
+ * the list, assuming that the lists are in order
+ */
+ BLI_remlink(strips, strip);
+
+ for (sstrip= tmp.last; sstrip; sstrip= sstrip->prev) {
+ /* check if add after */
+ if (sstrip->end <= strip->start) {
+ BLI_insertlinkafter(&tmp, sstrip, strip);
+ not_added= 0;
+ break;
+ }
+ }
+
+ /* add before first? */
+ if (not_added)
+ BLI_addhead(&tmp, strip);
+ }
+
+ /* reassign the start and end points of the strips */
+ strips->first= tmp.first;
+ strips->last= tmp.last;
+}
+
+/* Add the given NLA-Strip to the given list of strips, assuming that it
+ * isn't currently a member of another list
+ */
+short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
+{
+ NlaStrip *ns;
+ short not_added = 1;
+
+ /* sanity checks */
+ if ELEM(NULL, strips, strip)
+ return 0;
+
+ /* check if any space to add */
+ if (BKE_nlastrips_has_space(strips, strip->start, strip->end)==0)
+ return 0;
+
+ /* find the right place to add the strip to the nominated track */
+ for (ns= strips->first; ns; ns= ns->next) {
+ /* if current strip occurs after the new strip, add it before */
+ if (ns->start > strip->end) {
+ BLI_insertlinkbefore(strips, ns, strip);
+ not_added= 0;
+ break;
+ }
+ }
+ if (not_added) {
+ /* just add to the end of the list of the strips then... */
+ BLI_addtail(strips, strip);
+ }
+
+ /* added... */
+ return 1;
+}
+
+
+/* Meta-Strips ------------------------------------ */
+
+/* Convert 'islands' (i.e. continuous string of) selected strips to be
+ * contained within 'Meta-Strips' which act as strips which contain strips.
+ * temp: are the meta-strips to be created 'temporary' ones used for transforms?
+ */
+void BKE_nlastrips_make_metas (ListBase *strips, short temp)
+{
+ NlaStrip *mstrip = NULL;
+ NlaStrip *strip, *stripn;
+
+ /* sanity checks */
+ if ELEM(NULL, strips, strips->first)
+ return;
+
+ /* group all continuous chains of selected strips into meta-strips */
+ for (strip= strips->first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* if there is an existing meta-strip, add this strip to it, otherwise, create a new one */
+ if (mstrip == NULL) {
+ /* add a new meta-strip, and add it before the current strip that it will replace... */
+ mstrip= MEM_callocN(sizeof(NlaStrip), "Meta-NlaStrip");
+ mstrip->type = NLASTRIP_TYPE_META;
+ BLI_insertlinkbefore(strips, strip, mstrip);
+
+ /* set flags */
+ mstrip->flag = NLASTRIP_FLAG_SELECT;
+
+ /* set temp flag if appropriate (i.e. for transform-type editing) */
+ if (temp)
+ mstrip->flag |= NLASTRIP_FLAG_TEMP_META;
+
+ /* set default repeat/scale values to prevent warnings */
+ mstrip->repeat= mstrip->scale= 1.0f;
+
+ /* make its start frame be set to the start frame of the current strip */
+ mstrip->start= strip->start;
+ }
- find_stridechannel(ob, nstrip);
- //set_active_strip(ob, nstrip); /* is in editnla as does UI calls */
+ /* remove the selected strips from the track, and add to the meta */
+ BLI_remlink(strips, strip);
+ BLI_addtail(&mstrip->strips, strip);
- nstrip->repeat = 1.0;
+ /* expand the meta's dimensions to include the newly added strip- i.e. its last frame */
+ mstrip->end= strip->end;
+ }
+ else {
+ /* current strip wasn't selected, so the end of 'island' of selected strips has been reached,
+ * so stop adding strips to the current meta
+ */
+ mstrip= NULL;
+ }
+ }
+}
- if(ob->nlastrips.first == NULL)
- ob->nlaflag |= OB_NLA_OVERRIDE;
+/* Split a meta-strip into a set of normal strips */
+void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
+{
+ NlaStrip *cs, *csn;
- BLI_addtail(&ob->nlastrips, nstrip);
- return nstrip; /* is created, malloced etc. here so is safe to just return the pointer?
- this is needed for setting this active in UI, and probably useful for API too */
+ /* sanity check */
+ if ELEM(NULL, strips, strip)
+ return;
+ /* move each one of the meta-strip's children before the meta-strip
+ * in the list of strips after unlinking them from the meta-strip
+ */
+ for (cs= strip->strips.first; cs; cs= csn) {
+ csn= cs->next;
+ BLI_remlink(&strip->strips, cs);
+ BLI_insertlinkbefore(strips, strip, cs);
+ }
+
+ /* free the meta-strip now */
+ BLI_freelinkN(strips, strip);
}
+/* Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips
+ * sel: only consider selected meta-strips, otherwise all meta-strips are removed
+ * onlyTemp: only remove the 'temporary' meta-strips used for transforms
+ */
+void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
+{
+ NlaStrip *strip, *stripn;
+
+ /* sanity checks */
+ if ELEM(NULL, strips, strips->first)
+ return;
+
+ /* remove meta-strips fitting the criteria of the arguments */
+ for (strip= strips->first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ /* check if strip is a meta-strip */
+ if (strip->type == NLASTRIP_TYPE_META) {
+ /* if check if selection and 'temporary-only' considerations are met */
+ if ((onlySel==0) || (strip->flag & NLASTRIP_FLAG_SELECT)) {
+ if ((!onlyTemp) || (strip->flag & NLASTRIP_FLAG_TEMP_META)) {
+ BKE_nlastrips_clear_metastrip(strips, strip);
+ }
+ }
+ }
+ }
+}
-/* not strip itself! */
-void free_actionstrip(bActionStrip* strip)
+/* Add the given NLA-Strip to the given Meta-Strip, assuming that the
+ * strip isn't attached to anyy list of strips
+ */
+short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
{
- if (!strip)
+ /* sanity checks */
+ if ELEM(NULL, mstrip, strip)
+ return 0;
+
+ /* firstly, check if the meta-strip has space for this */
+ if (BKE_nlastrips_has_space(&mstrip->strips, strip->start, strip->end) == 0)
+ return 0;
+
+ /* check if this would need to be added to the ends of the meta,
+ * and subsequently, if the neighbouring strips allow us enough room
+ */
+ if (strip->start < mstrip->start) {
+ /* check if strip to the left (if it exists) ends before the
+ * start of the strip we're trying to add
+ */
+ if ((mstrip->prev == NULL) || (mstrip->prev->end <= strip->start)) {
+ /* add strip to start of meta's list, and expand dimensions */
+ BLI_addhead(&mstrip->strips, strip);
+ mstrip->start= strip->start;
+
+ return 1;
+ }
+ else /* failed... no room before */
+ return 0;
+ }
+ else if (strip->end > mstrip->end) {
+ /* check if strip to the right (if it exists) starts before the
+ * end of the strip we're trying to add
+ */
+ if ((mstrip->next == NULL) || (mstrip->next->start >= strip->end)) {
+ /* add strip to end of meta's list, and expand dimensions */
+ BLI_addtail(&mstrip->strips, strip);
+ mstrip->end= strip->end;
+
+ return 1;
+ }
+ else /* failed... no room after */
+ return 0;
+ }
+ else {
+ /* just try to add to the meta-strip (no dimension changes needed) */
+ return BKE_nlastrips_add_strip(&mstrip->strips, strip);
+ }
+}
+
+/* Adjust the settings of NLA-Strips contained within a Meta-Strip (recursively),
+ * until the Meta-Strips children all fit within the Meta-Strip's new dimensions
+ */
+void BKE_nlameta_flush_transforms (NlaStrip *mstrip)
+{
+ NlaStrip *strip;
+ float oStart, oEnd, offset;
+ float oLen, nLen;
+ short scaleChanged= 0;
+
+ /* sanity checks
+ * - strip must exist
+ * - strip must be a meta-strip with some contents
+ */
+ if ELEM(NULL, mstrip, mstrip->strips.first)
+ return;
+ if (mstrip->type != NLASTRIP_TYPE_META)
return;
+
+ /* get the original start/end points, and calculate the start-frame offset
+ * - these are simply the start/end frames of the child strips,
+ * since we assume they weren't transformed yet
+ */
+ oStart= ((NlaStrip *)mstrip->strips.first)->start;
+ oEnd= ((NlaStrip *)mstrip->strips.last)->end;
+ offset= mstrip->start - oStart;
+
+ /* optimisation:
+ * don't flush if nothing changed yet
+ * TODO: maybe we need a flag to say always flush?
+ */
+ if (IS_EQ(oStart, mstrip->start) && IS_EQ(oEnd, mstrip->end))
+ return;
+
+ /* check if scale changed */
+ oLen = oEnd - oStart;
+ nLen = mstrip->end - mstrip->start;
+ if (IS_EQ(nLen, oLen) == 0)
+ scaleChanged= 1;
+
+ /* for each child-strip, calculate new start/end points based on this new info */
+ for (strip= mstrip->strips.first; strip; strip= strip->next) {
+ if (scaleChanged) {
+ PointerRNA ptr;
+ float p1, p2, nStart, nEnd;
+
+ /* compute positions of endpoints relative to old extents of strip */
+ p1= (strip->start - oStart) / oLen;
+ p2= (strip->end - oStart) / oLen;
+
+ /* compute the new strip endpoints using the proportions */
+ nStart= (p1 * nLen) + mstrip->start;
+ nEnd= (p2 * nLen) + mstrip->start;
+
+ /* firstly, apply the new positions manually, then apply using RNA
+ * - first time is to make sure no truncation errors from one endpoint not being
+ * set yet occur
+ * - second time is to make sure scale is computed properly...
+ */
+ strip->start= nStart;
+ strip->end= nEnd;
+
+ RNA_pointer_create(NULL, &RNA_NlaStrip, strip, &ptr);
+ RNA_float_set(&ptr, "start_frame", nStart);
+ RNA_float_set(&ptr, "end_frame", nEnd);
+ }
+ else {
+ /* just apply the changes in offset to both ends of the strip */
+ strip->start += offset;
+ strip->end += offset;
+ }
+
+ /* finally, make sure the strip's children (if it is a meta-itself), get updated */
+ BKE_nlameta_flush_transforms(strip);
+ }
+}
- if (strip->act){
- strip->act->id.us--;
- strip->act = NULL;
+/* NLA-Tracks ---------------------------------------- */
+
+/* Find the active NLA-track for the given stack */
+NlaTrack *BKE_nlatrack_find_active (ListBase *tracks)
+{
+ NlaTrack *nlt;
+
+ /* sanity check */
+ if ELEM(NULL, tracks, tracks->first)
+ return NULL;
+
+ /* try to find the first active track */
+ for (nlt= tracks->first; nlt; nlt= nlt->next) {
+ if (nlt->flag & NLATRACK_ACTIVE)
+ return nlt;
}
- if (strip->ipo){
- strip->ipo->id.us--;
- strip->ipo = NULL;
+
+ /* none found */
+ return NULL;
+}
+
+/* Toggle the 'solo' setting for the given NLA-track, making sure that it is the only one
+ * that has this status in its AnimData block.
+ */
+void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
+{
+ NlaTrack *nt;
+
+ /* sanity check */
+ if ELEM(NULL, adt, adt->nla_tracks.first)
+ return;
+
+ /* firstly, make sure 'solo' flag for all tracks is disabled */
+ for (nt= adt->nla_tracks.first; nt; nt= nt->next) {
+ if (nt != nlt)
+ nt->flag &= ~NLATRACK_SOLO;
}
- if (strip->modifiers.first) {
- BLI_freelistN(&strip->modifiers);
+
+ /* now, enable 'solo' for the given track if appropriate */
+ if (nlt) {
+ /* toggle solo status */
+ nlt->flag ^= NLATRACK_SOLO;
+
+ /* set or clear solo-status on AnimData */
+ if (nlt->flag & NLATRACK_SOLO)
+ adt->flag |= ADT_NLA_SOLO_TRACK;
+ else
+ adt->flag &= ~ADT_NLA_SOLO_TRACK;
}
+ else
+ adt->flag &= ~ADT_NLA_SOLO_TRACK;
+}
+
+/* Make the given NLA-track the active one for the given stack. If no track is provided,
+ * this function can be used to simply deactivate all the NLA tracks in the given stack too.
+ */
+void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
+{
+ NlaTrack *nlt;
+ /* sanity check */
+ if ELEM(NULL, tracks, tracks->first)
+ return;
+
+ /* deactive all the rest */
+ for (nlt= tracks->first; nlt; nlt= nlt->next)
+ nlt->flag &= ~NLATRACK_ACTIVE;
+
+ /* set the given one as the active one */
+ if (nlt_a)
+ nlt_a->flag |= NLATRACK_ACTIVE;
}
-void free_nlastrips (ListBase *nlalist)
+/* Check if there is any space in the given track to add a strip of the given length */
+short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
{
- bActionStrip *strip;
+ /* sanity checks */
+ if ((nlt == NULL) || IS_EQ(start, end))
+ return 0;
+ if (start > end) {
+ puts("BKE_nlatrack_has_space() error... start and end arguments swapped");
+ SWAP(float, start, end);
+ }
+
+ /* check if there's any space left in the track for a strip of the given length */
+ return BKE_nlastrips_has_space(&nlt->strips, start, end);
+}
- if (!nlalist->first)
+/* Rearrange the strips in the track so that they are always in order
+ * (usually only needed after a strip has been moved)
+ */
+void BKE_nlatrack_sort_strips (NlaTrack *nlt)
+{
+ /* sanity checks */
+ if ELEM(NULL, nlt, nlt->strips.first)
return;
+
+ /* sort the strips with a more generic function */
+ BKE_nlastrips_sort_strips(&nlt->strips);
+}
- /* Do any specific freeing */
- for (strip=nlalist->first; strip; strip=strip->next)
+/* Add the given NLA-Strip to the given NLA-Track, assuming that it
+ * isn't currently attached to another one
+ */
+short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
+{
+ /* sanity checks */
+ if ELEM(NULL, nlt, strip)
+ return 0;
+
+ /* try to add the strip to the track using a more generic function */
+ return BKE_nlastrips_add_strip(&nlt->strips, strip);
+}
+
+/* NLA Strips -------------------------------------- */
+
+/* Find the active NLA-strip within the given track */
+NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt)
+{
+ NlaStrip *strip;
+
+ /* sanity check */
+ if ELEM(NULL, nlt, nlt->strips.first)
+ return NULL;
+
+ /* try to find the first active strip */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (strip->flag & NLASTRIP_FLAG_ACTIVE)
+ return strip;
+ }
+
+ /* none found */
+ return NULL;
+}
+
+/* Does the given NLA-strip fall within the given bounds (times)? */
+short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
+{
+ const float stripLen= (strip) ? strip->end - strip->start : 0.0f;
+ const float boundsLen= (float)fabs(max - min);
+
+ /* sanity checks */
+ if ((strip == NULL) || IS_EQ(stripLen, 0.0f) || IS_EQ(boundsLen, 0.0f))
+ return 0;
+
+ /* only ok if at least part of the strip is within the bounding window
+ * - first 2 cases cover when the strip length is less than the bounding area
+ * - second 2 cases cover when the strip length is greater than the bounding area
+ */
+ if ( (stripLen < boundsLen) &&
+ !(IN_RANGE(strip->start, min, max) ||
+ IN_RANGE(strip->end, min, max)) )
+ {
+ return 0;
+ }
+ if ( (stripLen > boundsLen) &&
+ !(IN_RANGE(min, strip->start, strip->end) ||
+ IN_RANGE(max, strip->start, strip->end)) )
{
- free_actionstrip (strip);
- };
+ return 0;
+ }
+
+ /* should be ok! */
+ return 1;
+}
- /* Free the whole list */
- BLI_freelistN(nlalist);
+/* Is the given NLA-strip the first one to occur for the given AnimData block */
+// TODO: make this an api method if necesary, but need to add prefix first
+short nlastrip_is_first (AnimData *adt, NlaStrip *strip)
+{
+ NlaTrack *nlt;
+ NlaStrip *ns;
+
+ /* sanity checks */
+ if ELEM(NULL, adt, strip)
+ return 0;
+
+ /* check if strip has any strips before it */
+ if (strip->prev)
+ return 0;
+
+ /* check other tracks to see if they have a strip that's earlier */
+ // TODO: or should we check that the strip's track is also the first?
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ /* only check the first strip, assuming that they're all in order */
+ ns= nlt->strips.first;
+ if (ns) {
+ if (ns->start < strip->start)
+ return 0;
+ }
+ }
+
+ /* should be first now */
+ return 1;
}
+
+/* Animated Strips ------------------------------------------- */
+
+/* Check if the given NLA-Track has any strips with own F-Curves */
+short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
+{
+ NlaStrip *strip;
+
+ /* sanity checks */
+ if ELEM(NULL, nlt, nlt->strips.first)
+ return 0;
+
+ /* check each strip for F-Curves only (don't care about whether the flags are set) */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (strip->fcurves.first)
+ return 1;
+ }
+
+ /* none found */
+ return 0;
+}
+
+/* Check if given NLA-Tracks have any strips with own F-Curves */
+short BKE_nlatracks_have_animated_strips (ListBase *tracks)
+{
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if ELEM(NULL, tracks, tracks->first)
+ return 0;
+
+ /* check each track, stopping on the first hit */
+ for (nlt= tracks->first; nlt; nlt= nlt->next) {
+ if (BKE_nlatrack_has_animated_strips(nlt))
+ return 1;
+ }
+
+ /* none found */
+ return 0;
+}
+
+/* Validate the NLA-Strips 'control' F-Curves based on the flags set*/
+void BKE_nlastrip_validate_fcurves (NlaStrip *strip)
+{
+ FCurve *fcu;
+
+ /* sanity checks */
+ if (strip == NULL)
+ return;
+
+ /* if controlling influence... */
+ if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
+ /* try to get F-Curve */
+ fcu= list_find_fcurve(&strip->fcurves, "influence", 0);
+
+ /* add one if not found */
+ if (fcu == NULL) {
+ /* make new F-Curve */
+ fcu= MEM_callocN(sizeof(FCurve), "NlaStrip FCurve");
+ BLI_addtail(&strip->fcurves, fcu);
+
+ /* set default flags */
+ fcu->flag = (FCURVE_VISIBLE|FCURVE_AUTO_HANDLES|FCURVE_SELECTED);
+
+ /* store path - make copy, and store that */
+ fcu->rna_path= BLI_strdupn("influence", 9);
+
+ // TODO: insert a few keyframes to ensure default behaviour?
+ }
+ }
+
+ /* if controlling time... */
+ if (strip->flag & NLASTRIP_FLAG_USR_TIME) {
+ /* try to get F-Curve */
+ fcu= list_find_fcurve(&strip->fcurves, "strip_time", 0);
+
+ /* add one if not found */
+ if (fcu == NULL) {
+ /* make new F-Curve */
+ fcu= MEM_callocN(sizeof(FCurve), "NlaStrip FCurve");
+ BLI_addtail(&strip->fcurves, fcu);
+
+ /* set default flags */
+ fcu->flag = (FCURVE_VISIBLE|FCURVE_AUTO_HANDLES|FCURVE_SELECTED);
+
+ /* store path - make copy, and store that */
+ fcu->rna_path= BLI_strdupn("strip_time", 10);
+
+ // TODO: insert a few keyframes to ensure default behaviour?
+ }
+ }
+}
+
+/* Sanity Validation ------------------------------------ */
+
+/* Find (and set) a unique name for a strip from the whole AnimData block
+ * Uses a similar method to the BLI method, but is implemented differently
+ * as we need to ensure that the name is unique over several lists of tracks,
+ * not just a single track.
+ */
+void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
+{
+ GHash *gh;
+ NlaStrip *tstrip;
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if ELEM(NULL, adt, strip)
+ return;
+
+ /* give strip a default name if none already */
+ if (strip->name[0]==0) {
+ switch (strip->type) {
+ case NLASTRIP_TYPE_CLIP: /* act-clip */
+ sprintf(strip->name, "Act: %s", (strip->act)?(strip->act->id.name+2):("<None>"));
+ break;
+ case NLASTRIP_TYPE_TRANSITION: /* transition */
+ sprintf(strip->name, "Transition");
+ break;
+ case NLASTRIP_TYPE_META: /* meta */
+ sprintf(strip->name, "Meta");
+ break;
+ default:
+ sprintf(strip->name, "NLA Strip");
+ break;
+ }
+ }
+
+ /* build a hash-table of all the strips in the tracks
+ * - this is easier than iterating over all the tracks+strips hierarchy everytime
+ * (and probably faster)
+ */
+ gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (tstrip= nlt->strips.first; tstrip; tstrip= tstrip->next) {
+ /* don't add the strip of interest */
+ if (tstrip == strip)
+ continue;
+
+ /* use the name of the strip as the key, and the strip as the value, since we're mostly interested in the keys */
+ BLI_ghash_insert(gh, tstrip->name, tstrip);
+ }
+ }
+
+ /* if the hash-table has a match for this name, try other names...
+ * - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :)
+ */
+ if (BLI_ghash_haskey(gh, strip->name)) {
+ char tempname[128];
+ int number = 1;
+ char *dot;
+
+ /* Strip off the suffix */
+ dot = strchr(strip->name, '.');
+ if (dot) *dot=0;
+
+ /* Try different possibilities */
+ for (number = 1; number <= 999; number++) {
+ /* assemble alternative name */
+ BLI_snprintf(tempname, 128, "%s%c%03d", strip->name, ".", number);
+
+ /* if hash doesn't have this, set it */
+ if (BLI_ghash_haskey(gh, tempname) == 0) {
+ BLI_strncpy(strip->name, tempname, sizeof(strip->name));
+ break;
+ }
+ }
+ }
+
+ /* free the hash... */
+ BLI_ghash_free(gh, NULL, NULL);
+}
+
+/* ---- */
+
+/* Determine auto-blending for the given strip */
+void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
+{
+ NlaTrack *track;
+ NlaStrip *strip;
+ //float *ps=NULL, *pe=NULL;
+ //float *ns=NULL, *ne=NULL;
+
+ /* sanity checks */
+ if ELEM(NULL, nls, nlt)
+ return;
+ if ((nlt->prev == NULL) && (nlt->next == NULL))
+ return;
+ if ((nls->flag & NLASTRIP_FLAG_AUTO_BLENDS)==0)
+ return;
+
+ /* get test ranges */
+ if (nlt->prev) {
+ /* find strips that overlap over the start/end of the given strip,
+ * but which don't cover the entire length
+ */
+ track= nlt->prev;
+ for (strip= track->strips.first; strip; strip= strip->next) {
+
+ }
+ }
+ if (nlt->next) {
+ /* find strips that overlap over the start/end of the given strip,
+ * but which don't cover the entire length
+ */
+ track= nlt->next;
+ for (strip= track->strips.first; strip; strip= strip->next) {
+
+ }
+ }
+}
+
+/* Ensure that auto-blending and other settings are set correctly */
+void BKE_nla_validate_state (AnimData *adt)
+{
+ NlaStrip *strip;
+ NlaTrack *nlt;
+
+ /* sanity checks */
+ if ELEM(NULL, adt, adt->nla_tracks.first)
+ return;
+
+ /* adjust blending values for auto-blending */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ BKE_nlastrip_validate_autoblends(nlt, strip);
+ }
+ }
+}
+
+/* Core Tools ------------------------------------------- */
+
+/* For the given AnimData block, add the active action to the NLA
+ * stack (i.e. 'push-down' action). The UI should only allow this
+ * for normal editing only (i.e. not in editmode for some strip's action),
+ * so no checks for this are performed.
+ */
+// TODO: maybe we should have checks for this too...
+void BKE_nla_action_pushdown (AnimData *adt)
+{
+ NlaStrip *strip;
+
+ /* sanity checks */
+ // TODO: need to report the error for this
+ if ELEM(NULL, adt, adt->action)
+ return;
+
+ /* if the action is empty, we also shouldn't try to add to stack,
+ * as that will cause us grief down the track
+ */
+ // TODO: what about modifiers?
+ if (action_has_motion(adt->action) == 0) {
+ printf("BKE_nla_action_pushdown(): action has no data \n");
+ return;
+ }
+
+ /* add a new NLA strip to the track, which references the active action */
+ strip= add_nlastrip_to_stack(adt, adt->action);
+
+ /* do other necessary work on strip */
+ if (strip) {
+ /* clear reference to action now that we've pushed it onto the stack */
+ adt->action->id.us--;
+ adt->action= NULL;
+
+ /* if the strip is the first one in the track it lives in, check if there
+ * are strips in any other tracks that may be before this, and set the extend
+ * mode accordingly
+ */
+ if (nlastrip_is_first(adt, strip) == 0) {
+ /* not first, so extend mode can only be NLASTRIP_EXTEND_HOLD_FORWARD not NLASTRIP_EXTEND_HOLD,
+ * so that it doesn't override strips in previous tracks
+ */
+ // FIXME: this needs to be more automated, since user can rearrange strips
+ strip->extendmode= NLASTRIP_EXTEND_HOLD_FORWARD;
+ }
+ }
+}
+
+
+/* Find the active strip + track combo, and set them up as the tweaking track,
+ * and return if successful or not.
+ */
+short BKE_nla_tweakmode_enter (AnimData *adt)
+{
+ NlaTrack *nlt, *activeTrack=NULL;
+ NlaStrip *strip, *activeStrip=NULL;
+
+ /* verify that data is valid */
+ if ELEM(NULL, adt, adt->nla_tracks.first)
+ return 0;
+
+ /* if block is already in tweakmode, just leave, but we should report
+ * that this block is in tweakmode (as our returncode)
+ */
+ if (adt->flag & ADT_NLA_EDIT_ON)
+ return 1;
+
+ /* go over the tracks, finding the active one, and its active strip
+ * - if we cannot find both, then there's nothing to do
+ */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ /* check if active */
+ if (nlt->flag & NLATRACK_ACTIVE) {
+ /* store reference to this active track */
+ activeTrack= nlt;
+
+ /* now try to find active strip */
+ activeStrip= BKE_nlastrip_find_active(nlt);
+ break;
+ }
+ }
+ if ELEM3(NULL, activeTrack, activeStrip, activeStrip->act) {
+ printf("NLA tweakmode enter - neither active requirement found \n");
+ return 0;
+ }
+
+ /* go over all the tracks up to the active one, tagging each strip that uses the same
+ * action as the active strip, but leaving everything else alone
+ */
+ for (nlt= activeTrack->prev; nlt; nlt= nlt->prev) {
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (strip->act == activeStrip->act)
+ strip->flag |= NLASTRIP_FLAG_TWEAKUSER;
+ else
+ strip->flag &= ~NLASTRIP_FLAG_TWEAKUSER;
+ }
+ }
+
+
+ /* go over all the tracks after AND INCLUDING the active one, tagging them as being disabled
+ * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on
+ */
+ for (nlt= activeTrack; nlt; nlt= nlt->next)
+ nlt->flag |= NLATRACK_DISABLED;
+
+ /* handle AnimData level changes:
+ * - 'real' active action to temp storage (no need to change user-counts)
+ * - action of active strip set to be the 'active action', and have its usercount incremented
+ * - editing-flag for this AnimData block should also get turned on (for more efficient restoring)
+ * - take note of the active strip for mapping-correction of keyframes in the action being edited
+ */
+ adt->tmpact= adt->action;
+ adt->action= activeStrip->act;
+ adt->actstrip= activeStrip;
+ id_us_plus(&activeStrip->act->id);
+ adt->flag |= ADT_NLA_EDIT_ON;
+
+ /* done! */
+ return 1;
+}
+
+/* Exit tweakmode for this AnimData block */
+void BKE_nla_tweakmode_exit (AnimData *adt)
+{
+ NlaStrip *strip;
+ NlaTrack *nlt;
+
+ /* verify that data is valid */
+ if ELEM(NULL, adt, adt->nla_tracks.first)
+ return;
+
+ /* hopefully the flag is correct - skip if not on */
+ if ((adt->flag & ADT_NLA_EDIT_ON) == 0)
+ return;
+
+ // TODO: need to sync the user-strip with the new state of the action!
+
+ /* for all Tracks, clear the 'disabled' flag
+ * for all Strips, clear the 'tweak-user' flag
+ */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ nlt->flag &= ~NLATRACK_DISABLED;
+
+ for (strip= nlt->strips.first; strip; strip= strip->next)
+ strip->flag &= ~NLASTRIP_FLAG_TWEAKUSER;
+ }
+
+ /* handle AnimData level changes:
+ * - 'temporary' active action needs its usercount decreased, since we're removing this reference
+ * - 'real' active action is restored from storage
+ * - storage pointer gets cleared (to avoid having bad notes hanging around)
+ * - editing-flag for this AnimData block should also get turned off
+ * - clear pointer to active strip
+ */
+ if (adt->action) adt->action->id.us--;
+ adt->action= adt->tmpact;
+ adt->tmpact= NULL;
+ adt->actstrip= NULL;
+ adt->flag &= ~ADT_NLA_EDIT_ON;
+}
+
+/* *************************************************** */
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index a83b8817580..0f42ba0d2e2 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -3050,6 +3050,7 @@ static void registerTextureNodes(ListBase *ntypelist)
nodeRegisterType(ntypelist, &tex_node_rotate);
nodeRegisterType(ntypelist, &tex_node_translate);
nodeRegisterType(ntypelist, &tex_node_scale);
+ nodeRegisterType(ntypelist, &tex_node_at);
nodeRegisterType(ntypelist, &tex_node_proc_voronoi);
nodeRegisterType(ntypelist, &tex_node_proc_blend);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c45a1593b8a..82eca760a60 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -244,7 +244,9 @@ void free_object(Object *ob)
if(ob->mat[a]) ob->mat[a]->id.us--;
}
if(ob->mat) MEM_freeN(ob->mat);
+ if(ob->matbits) MEM_freeN(ob->matbits);
ob->mat= 0;
+ ob->matbits= 0;
if(ob->bb) MEM_freeN(ob->bb);
ob->bb= 0;
if(ob->path) free_path(ob->path);
@@ -428,17 +430,14 @@ void unlink_object(Scene *scene, Object *ob)
if(obt->particlesystem.first) {
ParticleSystem *tpsys= obt->particlesystem.first;
for(; tpsys; tpsys=tpsys->next) {
- if(tpsys->keyed_ob==ob) {
- ParticleSystem *psys= BLI_findlink(&ob->particlesystem,tpsys->keyed_psys-1);
-
- if(psys && psys->keyed_ob) {
- tpsys->keyed_ob= psys->keyed_ob;
- tpsys->keyed_psys= psys->keyed_psys;
+ KeyedParticleTarget *kpt = tpsys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->ob==ob) {
+ BLI_remlink(&tpsys->keyed_targets, kpt);
+ MEM_freeN(kpt);
+ obt->recalc |= OB_RECALC_DATA;
+ break;
}
- else
- tpsys->keyed_ob= NULL;
-
- obt->recalc |= OB_RECALC_DATA;
}
if(tpsys->target_ob==ob) {
@@ -946,7 +945,6 @@ Object *add_only_object(int type, char *name)
Mat4One(ob->parentinv);
Mat4One(ob->obmat);
ob->dt= OB_SHADED;
- if(U.flag & USER_MAT_ON_OB) ob->colbits= -1;
ob->empty_drawtype= OB_ARROWS;
ob->empty_drawsize= 1.0;
@@ -1051,18 +1049,23 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
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);
for(a=0, pa=psysn->particles; a<psysn->totpart; a++, pa++) {
if(pa->hair)
pa->hair= MEM_dupallocN(pa->hair);
- if(pa->keys)
- pa->keys= MEM_dupallocN(pa->keys);
+ if(a)
+ pa->keys= (pa-1)->keys + (pa-1)->totkey;
}
if(psys->soft) {
psysn->soft= copy_softbody(psys->soft);
psysn->soft->particles = psysn;
}
+
+ if(psys->keyed_targets.first)
+ BLI_duplicatelist(&psysn->keyed_targets, &psys->keyed_targets);
psysn->pathcache= NULL;
psysn->childcache= NULL;
@@ -1169,6 +1172,7 @@ Object *copy_object(Object *ob)
if(ob->totcol) {
obn->mat= MEM_dupallocN(ob->mat);
+ obn->matbits= MEM_dupallocN(ob->matbits);
}
if(ob->bb) obn->bb= MEM_dupallocN(ob->bb);
@@ -1199,18 +1203,12 @@ Object *copy_object(Object *ob)
armature_rebuild_pose(obn, obn->data);
}
copy_defgroups(&obn->defbase, &ob->defbase);
-#if 0 // XXX old animation system
- copy_nlastrips(&obn->nlastrips, &ob->nlastrips);
-#endif // XXX old animation system
copy_constraints(&obn->constraints, &ob->constraints);
/* increase user numbers */
id_us_plus((ID *)obn->data);
-#if 0 // XXX old animation system
- id_us_plus((ID *)obn->ipo);
- id_us_plus((ID *)obn->action);
-#endif // XXX old animation system
id_us_plus((ID *)obn->dup_group);
+ // FIXME: add this for animdata too...
for(a=0; a<obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
@@ -1402,7 +1400,9 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
/* copy material and index information */
ob->actcol= ob->totcol= 0;
if(ob->mat) MEM_freeN(ob->mat);
+ if(ob->matbits) MEM_freeN(ob->matbits);
ob->mat = NULL;
+ ob->matbits= NULL;
if ((target->totcol) && (target->mat) && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) { //XXX OB_SUPPORT_MATERIAL
int i;
ob->colbits = target->colbits;
@@ -1411,6 +1411,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
ob->totcol= target->totcol;
ob->mat = MEM_dupallocN(target->mat);
+ ob->matbits = MEM_dupallocN(target->matbits);
for(i=0; i<target->totcol; i++) {
/* dont need to run test_object_materials since we know this object is new and not used elsewhere */
id_us_plus((ID *)ob->mat[i]);
@@ -1576,14 +1577,14 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
}
/* catch exceptions: curve paths used as a duplicator */
else if(enable_cu_speed) {
- ctime= bsystem_time(scene, ob, (float)scene->r.cfra, 0.0);
-
-#if 0 // XXX old animation system
- if(calc_ipo_spec(cu->ipo, CU_SPEED, &ctime)==0) {
- ctime /= cu->pathlen;
- CLAMP(ctime, 0.0, 1.0);
- }
-#endif // XXX old animation system
+ /* 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
+ */
+ ctime= fmod(cu->ctime, cu->pathlen) / cu->pathlen;
+ CLAMP(ctime, 0.0, 1.0);
}
else {
ctime= scene->r.cfra - give_timeoffset(ob);
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 22e4e8a8309..02b0f6a45a0 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -61,8 +61,9 @@
#include "BKE_image.h"
#include "BKE_font.h"
#include "BKE_packedFile.h"
+#include "BKE_report.h"
-int seekPackedFile(PackedFile * pf, int offset, int whence)
+int seekPackedFile(PackedFile *pf, int offset, int whence)
{
int oldseek = -1, seek = 0;
@@ -92,12 +93,12 @@ int seekPackedFile(PackedFile * pf, int offset, int whence)
return(oldseek);
}
-void rewindPackedFile(PackedFile * pf)
+void rewindPackedFile(PackedFile *pf)
{
seekPackedFile(pf, 0, SEEK_SET);
}
-int readPackedFile(PackedFile * pf, void * data, int size)
+int readPackedFile(PackedFile *pf, void *data, int size)
{
if ((pf != NULL) && (size >= 0) && (data != NULL)) {
if (size + pf->seek > pf->size) {
@@ -118,66 +119,55 @@ int readPackedFile(PackedFile * pf, void * data, int size)
return(size);
}
-int countPackedFiles()
+int countPackedFiles(Main *bmain)
{
- int count = 0;
Image *ima;
VFont *vf;
bSample *sample;
+ int count = 0;
// let's check if there are packed files...
- ima = G.main->image.first;
- while (ima) {
- if (ima->packedfile) {
+ for(ima=bmain->image.first; ima; ima=ima->id.next)
+ if(ima->packedfile)
count++;
- }
- ima= ima->id.next;
- }
- vf = G.main->vfont.first;
- while (vf) {
- if (vf->packedfile) {
+ for(vf=bmain->vfont.first; vf; vf=vf->id.next)
+ if(vf->packedfile)
count++;
- }
- vf = vf->id.next;
- }
- sample = samples->first;
- while (sample) {
- if (sample->packedfile) {
- count++;
- }
- sample = sample->id.next;
- }
+ if(samples)
+ for(sample=samples->first; sample; sample=sample->id.next)
+ if(sample->packedfile)
+ count++;
- return(count);
+ return count;
}
-void freePackedFile(PackedFile * pf)
+void freePackedFile(PackedFile *pf)
{
- if (pf) {
+ if(pf) {
MEM_freeN(pf->data);
MEM_freeN(pf);
- } else {
- printf("freePackedFile: Trying to free a NULL pointer\n");
}
+ else
+ printf("freePackedFile: Trying to free a NULL pointer\n");
}
-PackedFile * newPackedFileMemory(void *mem, int memlen)
+PackedFile *newPackedFileMemory(void *mem, int memlen)
{
- PackedFile * pf = MEM_callocN(sizeof(*pf), "PackedFile");
+ PackedFile *pf = MEM_callocN(sizeof(*pf), "PackedFile");
pf->data = mem;
pf->size = memlen;
return pf;
}
-PackedFile * newPackedFile(char * filename)
+PackedFile *newPackedFile(ReportList *reports, char *filename)
{
- PackedFile * pf = NULL;
+ PackedFile *pf = NULL;
int file, filelen;
char name[FILE_MAXDIR+FILE_MAXFILE];
- void * data;
+ void *data;
//XXX waitcursor(1);
@@ -191,7 +181,7 @@ PackedFile * newPackedFile(char * filename)
file= open(name, O_BINARY|O_RDONLY);
if (file <= 0) {
- // error("Can't open file: %s", name);
+ BKE_reportf(reports, RPT_ERROR, "Can't open file: %s", name);
} else {
filelen = BLI_filesize(file);
@@ -214,36 +204,24 @@ PackedFile * newPackedFile(char * filename)
return (pf);
}
-void packAll()
+void packAll(Main *bmain, ReportList *reports)
{
Image *ima;
VFont *vf;
bSample *sample;
- ima = G.main->image.first;
- while (ima) {
- if (ima->packedfile == NULL) {
- ima->packedfile = newPackedFile(ima->name);
- }
- ima= ima->id.next;
- }
-
- vf = G.main->vfont.first;
- while (vf) {
- if (vf->packedfile == NULL) {
- vf->packedfile = newPackedFile(vf->name);
- }
- vf = vf->id.next;
- }
+ for(ima=bmain->image.first; ima; ima=ima->id.next)
+ if(ima->packedfile == NULL)
+ ima->packedfile = newPackedFile(reports, ima->name);
+ for(vf=bmain->vfont.first; vf; vf=vf->id.next)
+ if(vf->packedfile == NULL)
+ vf->packedfile = newPackedFile(reports, vf->name);
- sample = samples->first;
- while (sample) {
- if (sample->packedfile == NULL) {
- sound_set_packedfile(sample, newPackedFile(sample->name));
- }
- sample = sample->id.next;
- }
+ if(samples)
+ for(sample=samples->first; sample; sample=sample->id.next)
+ if(sample->packedfile == NULL)
+ sound_set_packedfile(sample, newPackedFile(reports, sample->name));
}
@@ -252,10 +230,10 @@ void packAll()
// attempt to create a function that generates an unique filename
// this will work when all funtions in fileops.c understand relative filenames...
-char * find_new_name(char * name)
+char *find_new_name(char *name)
{
char tempname[FILE_MAXDIR + FILE_MAXFILE];
- char * newname;
+ char *newname;
if (fop_exists(name)) {
for (number = 1; number <= 999; number++) {
@@ -274,13 +252,13 @@ char * find_new_name(char * name)
*/
-int writePackedFile(char * filename, PackedFile *pf, int guimode)
+int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int guimode)
{
int file, number, remove_tmp = FALSE;
int ret_value = RET_OK;
char name[FILE_MAXDIR + FILE_MAXFILE];
char tempname[FILE_MAXDIR + FILE_MAXFILE];
-/* void * data; */
+/* void *data; */
if (guimode); //XXX waitcursor(1);
@@ -305,23 +283,23 @@ int writePackedFile(char * filename, PackedFile *pf, int guimode)
file = open(name, O_BINARY + O_WRONLY + O_CREAT + O_TRUNC, 0666);
if (file >= 0) {
if (write(file, pf->data, pf->size) != pf->size) {
- if(guimode) ; //XXX error("Error writing file: %s", name);
+ BKE_reportf(reports, RPT_ERROR, "Error writing file: %s", name);
ret_value = RET_ERROR;
}
close(file);
} else {
- if(guimode); //XXX error("Error creating file: %s", name);
+ BKE_reportf(reports, RPT_ERROR, "Error creating file: %s", name);
ret_value = RET_ERROR;
}
if (remove_tmp) {
if (ret_value == RET_ERROR) {
if (BLI_rename(tempname, name) != 0) {
- if(guimode); //XXX error("Error restoring tempfile. Check files: '%s' '%s'", tempname, name);
+ BKE_reportf(reports, RPT_ERROR, "Error restoring tempfile. Check files: '%s' '%s'", tempname, name);
}
} else {
if (BLI_delete(tempname, 0, 0) != 0) {
- if(guimode); //XXX error("Error deleting '%s' (ignored)");
+ BKE_reportf(reports, RPT_ERROR, "Error deleting '%s' (ignored)", tempname);
}
}
}
@@ -342,7 +320,7 @@ PF_NOFILE - the original file doens't exist
*/
-int checkPackedFile(char * filename, PackedFile * pf)
+int checkPackedFile(char *filename, PackedFile *pf)
{
struct stat st;
int ret_val, i, len, file;
@@ -390,68 +368,21 @@ int checkPackedFile(char * filename, PackedFile * pf)
/*
-unpackFile() looks at the existing files (abs_name, local_name) and a packed file.
-If how == PF_ASK it offers the user a couple of options what to do with the packed file.
+ unpackFile() looks at the existing files (abs_name, local_name) and a packed file.
-It returns a char * to the existing file name / new file name or NULL when
+It returns a char *to the existing file name / new file name or NULL when
there was an error or when the user desides to cancel the operation.
*/
-char *unpackFile(char * abs_name, char * local_name, PackedFile * pf, int how)
+char *unpackFile(ReportList *reports, char *abs_name, char *local_name, PackedFile *pf, int how)
{
- char menu[6 * (FILE_MAXDIR + FILE_MAXFILE + 100)];
- char line[FILE_MAXDIR + FILE_MAXFILE + 100];
- char * newname = NULL, * temp = NULL;
+ char *newname = NULL, *temp = NULL;
// char newabs[FILE_MAXDIR + FILE_MAXFILE];
// char newlocal[FILE_MAXDIR + FILE_MAXFILE];
if (pf != NULL) {
- if (how == PF_ASK) {
- sprintf(menu, "UnPack file%%t|Remove Pack %%x%d", PF_REMOVE);
-
- if (strcmp(abs_name, local_name)) {
- switch (checkPackedFile(local_name, pf)) {
- case PF_NOFILE:
- sprintf(line, "|Create %s%%x%d", local_name, PF_WRITE_LOCAL);
- strcat(menu, line);
- break;
- case PF_EQUAL:
- sprintf(line, "|Use %s (identical)%%x%d", local_name, PF_USE_LOCAL);
- strcat(menu, line);
- break;
- case PF_DIFFERS:
- sprintf(line, "|Use %s (differs)%%x%d", local_name, PF_USE_LOCAL);
- strcat(menu, line);
- sprintf(line, "|Overwrite %s%%x%d", local_name, PF_WRITE_LOCAL);
- strcat(menu, line);
- break;
- }
- // sprintf(line, "|%%x%d", PF_INVALID);
- // strcat(menu, line);
- }
-
- switch (checkPackedFile(abs_name, pf)) {
- case PF_NOFILE:
- sprintf(line, "|Create %s%%x%d", abs_name, PF_WRITE_ORIGINAL);
- strcat(menu, line);
- break;
- case PF_EQUAL:
- sprintf(line, "|Use %s (identical)%%x%d", abs_name, PF_USE_ORIGINAL);
- strcat(menu, line);
- break;
- case PF_DIFFERS:
- sprintf(line, "|Use %s (differs)%%x%d", abs_name, PF_USE_ORIGINAL);
- strcat(menu, line);
- sprintf(line, "|Overwrite %s%%x%d", abs_name, PF_WRITE_ORIGINAL);
- strcat(menu, line);
- break;
- }
-
- //XXX how = pupmenu(menu);
- }
-
switch (how) {
case -1:
case PF_KEEP:
@@ -467,7 +398,7 @@ char *unpackFile(char * abs_name, char * local_name, PackedFile * pf, int how)
}
// else fall through and create it
case PF_WRITE_LOCAL:
- if (writePackedFile(local_name, pf, 1) == RET_OK) {
+ if (writePackedFile(reports, local_name, pf, 1) == RET_OK) {
temp = local_name;
}
break;
@@ -479,7 +410,7 @@ char *unpackFile(char * abs_name, char * local_name, PackedFile * pf, int how)
}
// else fall through and create it
case PF_WRITE_ORIGINAL:
- if (writePackedFile(abs_name, pf, 1) == RET_OK) {
+ if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) {
temp = abs_name;
}
break;
@@ -498,10 +429,10 @@ char *unpackFile(char * abs_name, char * local_name, PackedFile * pf, int how)
}
-int unpackVFont(VFont * vfont, int how)
+int unpackVFont(ReportList *reports, VFont *vfont, int how)
{
char localname[FILE_MAXDIR + FILE_MAXFILE], fi[FILE_MAXFILE];
- char * newname;
+ char *newname;
int ret_value = RET_ERROR;
if (vfont != NULL) {
@@ -510,7 +441,7 @@ int unpackVFont(VFont * vfont, int how)
sprintf(localname, "//fonts/%s", fi);
- newname = unpackFile(vfont->name, localname, vfont->packedfile, how);
+ newname = unpackFile(reports, vfont->name, localname, vfont->packedfile, how);
if (newname != NULL) {
ret_value = RET_OK;
freePackedFile(vfont->packedfile);
@@ -523,10 +454,10 @@ int unpackVFont(VFont * vfont, int how)
return (ret_value);
}
-int unpackSample(bSample *sample, int how)
+int unpackSample(ReportList *reports, bSample *sample, int how)
{
char localname[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
- char * newname;
+ char *newname;
int ret_value = RET_ERROR;
PackedFile *pf;
@@ -535,7 +466,7 @@ int unpackSample(bSample *sample, int how)
BLI_splitdirstring(localname, fi);
sprintf(localname, "//samples/%s", fi);
- newname = unpackFile(sample->name, localname, sample->packedfile, how);
+ newname = unpackFile(reports, sample->name, localname, sample->packedfile, how);
if (newname != NULL) {
strcpy(sample->name, newname);
MEM_freeN(newname);
@@ -553,10 +484,10 @@ int unpackSample(bSample *sample, int how)
return(ret_value);
}
-int unpackImage(Image * ima, int how)
+int unpackImage(ReportList *reports, Image *ima, int how)
{
char localname[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
- char * newname;
+ char *newname;
int ret_value = RET_ERROR;
if (ima != NULL) {
@@ -564,7 +495,7 @@ int unpackImage(Image * ima, int how)
BLI_splitdirstring(localname, fi);
sprintf(localname, "//textures/%s", fi);
- newname = unpackFile(ima->name, localname, ima->packedfile, how);
+ newname = unpackFile(reports, ima->name, localname, ima->packedfile, how);
if (newname != NULL) {
ret_value = RET_OK;
freePackedFile(ima->packedfile);
@@ -578,33 +509,23 @@ int unpackImage(Image * ima, int how)
return(ret_value);
}
-void unpackAll(int how)
+void unpackAll(Main *bmain, ReportList *reports, int how)
{
Image *ima;
VFont *vf;
bSample *sample;
-
- ima = G.main->image.first;
- while (ima) {
- if (ima->packedfile) {
- unpackImage(ima, how);
- }
- ima= ima->id.next;
- }
-
- vf = G.main->vfont.first;
- while (vf) {
- if (vf->packedfile) {
- unpackVFont(vf, how);
- }
- vf = vf->id.next;
- }
- sample = samples->first;
- while (sample) {
- if (sample->packedfile) {
- unpackSample(sample, how);
- }
- sample = sample->id.next;
- }
+ for(ima=bmain->image.first; ima; ima=ima->id.next)
+ if(ima->packedfile)
+ unpackImage(reports, ima, how);
+
+ for(vf=bmain->vfont.first; vf; vf=vf->id.next)
+ if(vf->packedfile)
+ unpackVFont(reports, vf, how);
+
+ if(samples)
+ for(sample=samples->first; sample; sample=sample->id.next)
+ if(sample->packedfile)
+ unpackSample(reports, sample, how);
}
+
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index ab7f68dedd0..8e0e948f0a4 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -81,6 +81,11 @@
static void key_from_object(Object *ob, ParticleKey *key);
static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index,
float *fuv, float *orco, ParticleTexture *ptex, int event);
+static void get_child_modifier_parameters(ParticleSettings *part, ParticleThreadContext *ctx,
+ ChildParticle *cpa, short cpa_from, int cpa_num, float *cpa_fuv, float *orco, ParticleTexture *ptex);
+static void do_child_modifiers(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSettings *part,
+ ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa,
+ float *orco, float mat[4][4], ParticleKey *state, float t);
/* few helpers for countall etc. */
int count_particles(ParticleSystem *psys){
@@ -222,6 +227,34 @@ short psys_get_current_num(Object *ob)
return i;
}
+void psys_set_current_num(Object *ob, int index)
+{
+ ParticleSystem *psys;
+ short i;
+
+ if(ob==0) return;
+
+ for(psys=ob->particlesystem.first, i=0; psys; psys=psys->next, i++) {
+ if(i == index)
+ psys->flag |= PSYS_CURRENT;
+ else
+ psys->flag &= ~PSYS_CURRENT;
+ }
+}
+Object *psys_find_object(Scene *scene, ParticleSystem *psys)
+{
+ Base *base = scene->base.first;
+ ParticleSystem *tpsys;
+
+ for(base = scene->base.first; base; base = base->next) {
+ for(tpsys = base->object->particlesystem.first; psys; psys=psys->next) {
+ if(tpsys == psys)
+ return base->object;
+ }
+ }
+
+ return NULL;
+}
/* change object's active particle system */
void psys_change_act(void *ob_v, void *act_v)
{
@@ -293,7 +326,7 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys)
ParticleSystemModifierData *psmd;
Mesh *me;
- if(psys->flag & PSYS_DISABLED || psys->flag & PSYS_DELETE)
+ if(psys->flag & PSYS_DISABLED || psys->flag & PSYS_DELETE || !psys->part)
return 0;
if(ob->type == OB_MESH) {
@@ -424,7 +457,7 @@ void psys_free(Object *ob, ParticleSystem * psys)
for(tpsys=ob->particlesystem.first; tpsys; tpsys=tpsys->next){
if(tpsys->part)
{
- if(ELEM(tpsys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
+ if(ELEM(tpsys->part->ren_as,PART_DRAW_OB,PART_DRAW_GR))
{
nr++;
break;
@@ -446,10 +479,16 @@ void psys_free(Object *ob, ParticleSystem * psys)
if(psys->pointcache)
BKE_ptcache_free(psys->pointcache);
+ if(psys->keyed_targets.first)
+ BLI_freelistN(&psys->keyed_targets);
+
MEM_freeN(psys);
}
}
+/************************************************/
+/* Rendering */
+/************************************************/
/* these functions move away particle data and bring it back after
* rendering, to make different render settings possible without
* removing the previous data. this should be solved properly once */
@@ -463,6 +502,7 @@ typedef struct ParticleRenderData {
ChildParticle *child;
ParticleCacheKey **pathcache;
ParticleCacheKey **childcache;
+ ListBase pathcachebufs, childcachebufs;
int totchild, totcached, totchildcache;
DerivedMesh *dm;
int totdmvert, totdmedge, totdmface;
@@ -549,8 +589,12 @@ void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[][4], float
data->child= psys->child;
data->totchild= psys->totchild;
data->pathcache= psys->pathcache;
+ data->pathcachebufs.first = psys->pathcachebufs.first;
+ data->pathcachebufs.last = psys->pathcachebufs.last;
data->totcached= psys->totcached;
data->childcache= psys->childcache;
+ data->childcachebufs.first = psys->childcachebufs.first;
+ data->childcachebufs.last = psys->childcachebufs.last;
data->totchildcache= psys->totchildcache;
if(psmd->dm)
@@ -563,6 +607,8 @@ void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[][4], float
psys->pathcache= NULL;
psys->childcache= NULL;
psys->totchild= psys->totcached= psys->totchildcache= 0;
+ psys->pathcachebufs.first = psys->pathcachebufs.last = NULL;
+ psys->childcachebufs.first = psys->childcachebufs.last = NULL;
Mat4CpyMat4(data->winmat, winmat);
Mat4MulMat4(data->viewmat, ob->obmat, viewmat);
@@ -603,8 +649,12 @@ void psys_render_restore(Object *ob, ParticleSystem *psys)
psys->child= data->child;
psys->totchild= data->totchild;
psys->pathcache= data->pathcache;
+ psys->pathcachebufs.first = data->pathcachebufs.first;
+ psys->pathcachebufs.last = data->pathcachebufs.last;
psys->totcached= data->totcached;
psys->childcache= data->childcache;
+ psys->childcachebufs.first = data->childcachebufs.first;
+ psys->childcachebufs.last = data->childcachebufs.last;
psys->totchildcache= data->totchildcache;
psmd->dm= data->dm;
@@ -635,7 +685,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
int *origindex, *facetotvert;
int a, b, totorigface, totface, newtot, skipped;
- if(part->draw_as!=PART_DRAW_PATH || !(part->draw & PART_DRAW_REN_STRAND))
+ if(part->ren_as!=PART_DRAW_PATH || !(part->draw & PART_DRAW_REN_STRAND))
return tot;
if(!ctx->psys->renderdata)
return tot;
@@ -846,7 +896,7 @@ int psys_render_simplify_params(ParticleSystem *psys, ChildParticle *cpa, float
}
/************************************************/
-/* Interpolated Particles */
+/* Interpolation */
/************************************************/
static float interpolate_particle_value(float v1, float v2, float v3, float v4, float *w, int four)
{
@@ -864,7 +914,7 @@ static void weighted_particle_vector(float *v1, float *v2, float *v3, float *v4,
vec[1]= weights[0]*v1[1] + weights[1]*v2[1] + weights[2]*v3[1] + weights[3]*v4[1];
vec[2]= weights[0]*v1[2] + weights[1]*v2[2] + weights[2]*v3[2] + weights[3]*v4[2];
}
-static void interpolate_particle(short type, ParticleKey keys[4], float dt, ParticleKey *result, int velocity)
+void psys_interpolate_particle(short type, ParticleKey keys[4], float dt, ParticleKey *result, int velocity)
{
float t[4];
@@ -895,6 +945,214 @@ static void interpolate_particle(short type, ParticleKey keys[4], float dt, Part
+typedef struct ParticleInterpolationData {
+ ParticleKey *kkey[2];
+ HairKey *hkey[2];
+ BodyPoint *bp[2];
+ SoftBody *soft;
+ int keyed, cached;
+ float birthtime, dietime;
+} 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, 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 */
+ pm = cache->mem_cache.first;
+
+ if(pm)
+ pm = pm->next;
+ }
+ else {
+ if(pm) {
+ while(pm && pm->next && (float)pm->frame < t)
+ pm = pm->next;
+
+ copy_particle_key(key2, ((ParticleKey *)pm->data) + index, 1);
+ copy_particle_key(key1, ((ParticleKey *)(pm->prev)->data) + index, 1);
+ }
+ else if(cache->mem_cache.first) {
+ PTCacheMem *pm2 = cache->mem_cache.first;
+ copy_particle_key(key2, ((ParticleKey *)pm2->data) + index, 1);
+ copy_particle_key(key1, ((ParticleKey *)pm2->data) + index, 1);
+ }
+ }
+}
+static void init_particle_interpolation(Object *ob, ParticleSystem *psys, ParticleData *pa, ParticleInterpolationData *pind)
+{
+
+ if(pind->keyed) {
+ pind->kkey[0] = pa->keys;
+
+ if(pa->totkey > 1)
+ pind->kkey[1] = pa->keys + 1;
+ else
+ pind->kkey[1] = NULL;
+
+ pind->birthtime = pa->keys->time;
+ pind->dietime = (pa->keys + pa->totkey - 1)->time;
+ }
+ else if(pind->cached) {
+ get_pointcache_keys_for_time(ob, psys, -1, 0.0f, NULL, NULL);
+
+ pind->birthtime = pa->time;
+ pind->dietime = pa->dietime;
+ }
+ else {
+ pind->hkey[0] = pa->hair;
+ pind->hkey[1] = pa->hair + 1;
+
+ 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 hair_to_particle(ParticleKey *key, HairKey *hkey)
+{
+ VECCOPY(key->co, hkey->co);
+ key->time = hkey->time;
+}
+static void bp_to_particle(ParticleKey *key, BodyPoint *bp, HairKey *hkey)
+{
+ VECCOPY(key->co, bp->pos);
+ key->time = hkey->time;
+}
+
+static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData *pa, float t, float frs_sec, ParticleInterpolationData *pind, ParticleKey *result)
+{
+ ParticleKey keys[4];
+ float real_t, dfra, keytime;
+
+ /* interpret timing and find keys */
+ 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);
+ return;
+ }
+
+ if(result->time < 0.0f)
+ real_t = -result->time;
+ else
+ real_t = pind->kkey[0]->time + t * (pind->kkey[0][pa->totkey-1].time - pind->kkey[0]->time);
+
+ if(psys->part->phystype==PART_PHYS_KEYED && psys->flag & PSYS_KEYED_TIMING) {
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+
+ kpt=kpt->next;
+
+ while(kpt && pa->time + kpt->time < real_t)
+ kpt= kpt->next;
+
+ if(kpt) {
+ kpt=kpt->prev;
+
+ if(pa->time + kpt->time + kpt->duration > real_t)
+ real_t = pa->time + kpt->time;
+ }
+ else
+ real_t = pa->time + ((KeyedParticleTarget*)psys->keyed_targets.last)->time;
+ }
+
+ CLAMP(real_t, pa->time, pa->dietime);
+
+ while(pind->kkey[1]->time < real_t)
+ pind->kkey[1]++;
+
+ pind->kkey[0] = pind->kkey[1] - 1;
+ }
+ else if(pind->cached) {
+ if(result->time < 0.0f) /* flag for time in frames */
+ real_t = -result->time;
+ else
+ real_t = pa->time + t * (pa->dietime - pa->time);
+ }
+ else {
+ if(result->time < 0.0f)
+ real_t = -result->time;
+ else
+ real_t = pind->hkey[0]->time + t * (pind->hkey[0][pa->totkey-1].time - pind->hkey[0]->time);
+
+ while(pind->hkey[1]->time < real_t) {
+ pind->hkey[1]++;
+ pind->bp[1]++;
+ }
+
+ pind->hkey[0] = pind->hkey[1] - 1;
+ }
+
+ /* set actual interpolation keys */
+ 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]);
+ }
+ else if(pind->keyed) {
+ memcpy(keys + 1, pind->kkey[0], sizeof(ParticleKey));
+ memcpy(keys + 2, pind->kkey[1], sizeof(ParticleKey));
+ }
+ 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]);
+ hair_to_particle(keys + 2, pind->hkey[1]);
+ }
+
+ /* set secondary interpolation keys for hair */
+ 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
+ bp_to_particle(keys, pind->bp[0], pind->hkey[0]);
+ }
+ else {
+ if(pind->hkey[0] != pa->hair)
+ hair_to_particle(keys, pind->hkey[0] - 1);
+ else
+ hair_to_particle(keys, pind->hkey[0]);
+ }
+
+ 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
+ bp_to_particle(keys + 3, pind->bp[1], pind->hkey[1]);
+ }
+ else {
+ if(pind->hkey[1] != pa->hair + pa->totkey - 1)
+ hair_to_particle(keys + 3, pind->hkey[1] + 1);
+ else
+ hair_to_particle(keys + 3, pind->hkey[1]);
+ }
+ }
+
+ dfra = keys[2].time - keys[1].time;
+ keytime = (real_t - keys[1].time) / dfra;
+
+ /* convert velocity to timestep size */
+ 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->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->cached)
+ VecMulf(result->vel, frs_sec / dfra);
+}
/************************************************/
/* Particles on a dm */
/************************************************/
@@ -1395,16 +1653,6 @@ void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int in
/************************************************/
/* Path Cache */
/************************************************/
-static void hair_to_particle(ParticleKey *key, HairKey *hkey)
-{
- VECCOPY(key->co, hkey->co);
- key->time = hkey->time;
-}
-static void bp_to_particle(ParticleKey *key, BodyPoint *bp, HairKey *hkey)
-{
- VECCOPY(key->co, bp->pos);
- key->time = hkey->time;
-}
static float vert_weight(MDeformVert *dvert, int group)
{
MDeformWeight *dw;
@@ -1691,7 +1939,7 @@ int do_guide(Scene *scene, ParticleKey *state, int pa_num, float time, ListBase
}
return 0;
}
-static void do_rough(float *loc, float t, float fac, float size, float thres, ParticleKey *state)
+static void do_rough(float *loc, float mat[4][4], float t, float fac, float size, float thres, ParticleKey *state)
{
float rough[3];
float rco[3];
@@ -1704,32 +1952,24 @@ static void do_rough(float *loc, float t, float fac, float size, float thres, Pa
rough[0]=-1.0f+2.0f*BLI_gTurbulence(size, rco[0], rco[1], rco[2], 2,0,2);
rough[1]=-1.0f+2.0f*BLI_gTurbulence(size, rco[1], rco[2], rco[0], 2,0,2);
rough[2]=-1.0f+2.0f*BLI_gTurbulence(size, rco[2], rco[0], rco[1], 2,0,2);
- VECADDFAC(state->co,state->co,rough,fac);
+
+ VECADDFAC(state->co,state->co,mat[0],fac*rough[0]);
+ VECADDFAC(state->co,state->co,mat[1],fac*rough[1]);
+ VECADDFAC(state->co,state->co,mat[2],fac*rough[2]);
}
-static void do_rough_end(float *loc, float t, float fac, float shape, ParticleKey *state, ParticleKey *par)
+static void do_rough_end(float *loc, float mat[4][4], float t, float fac, float shape, ParticleKey *state)
{
- float rough[3], rnor[3];
+ float rough[2];
float roughfac;
roughfac=fac*(float)pow((double)t,shape);
VECCOPY(rough,loc);
rough[0]=-1.0f+2.0f*rough[0];
rough[1]=-1.0f+2.0f*rough[1];
- rough[2]=-1.0f+2.0f*rough[2];
VecMulf(rough,roughfac);
-
- if(par){
- VECCOPY(rnor,par->vel);
- }
- else{
- VECCOPY(rnor,state->vel);
- }
- Normalize(rnor);
- Projf(rnor,rough,rnor);
- VECSUB(rough,rough,rnor);
-
- VECADD(state->co,state->co,rough);
+ VECADDFAC(state->co,state->co,mat[0],rough[0]);
+ VECADDFAC(state->co,state->co,mat[1],rough[1]);
}
static void do_path_effectors(Scene *scene, Object *ob, ParticleSystem *psys, int i, ParticleCacheKey *ca, int k, int steps, float *rootco, float effector, float dfra, float cfra, float *length, float *vec)
{
@@ -1964,13 +2204,11 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
ParticleData *pa=NULL;
ParticleTexture ptex;
float *cpa_fuv=0, *par_rot=0;
- float co[3], orco[3], ornor[3], t, rough_t, cpa_1st[3], dvec[3];
- float branch_begin, branch_end, branch_prob, branchfac, rough_rand;
- float pa_rough1, pa_rough2, pa_roughe;
- float length, pa_length, pa_clump, pa_kink, pa_effector;
- float max_length = 1.0f, cur_length = 0.0f;
+ float co[3], orco[3], ornor[3], hairmat[4][4], t, cpa_1st[3], dvec[3];
+ float branch_begin, branch_end, branch_prob, rough_rand;
+ float length, max_length = 1.0f, cur_length = 0.0f;
float eff_length, eff_vec[3];
- int k, cpa_num, guided = 0;
+ int k, cpa_num;
short cpa_from;
if(part->flag & PART_BRANCHING) {
@@ -2024,16 +2262,20 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
cpa_num = cpa->num;
foffset= cpa->foffset;
- if(part->childtype == PART_CHILD_FACES)
- foffset = -(2.0f + part->childspread);
cpa_fuv = cpa->fuv;
cpa_from = PART_FROM_FACE;
psys_particle_on_emitter(ctx->psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,ornor,0,0,orco,0);
- /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */
- VECCOPY(cpa_1st,co);
- Mat4MulVecfl(ob->obmat,cpa_1st);
+ if(part->path_start==0.0f) {
+ /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */
+ VECCOPY(cpa_1st,co);
+ Mat4MulVecfl(ob->obmat,cpa_1st);
+ }
+
+ pa = psys->particles + cpa->parent;
+
+ psys_mat_hair_to_global(ob, ctx->psmd->dm, psys->part->from, pa, hairmat);
pa=0;
}
@@ -2056,6 +2298,8 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
cpa_fuv=pa->fuv;
psys_particle_on_emitter(ctx->psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,ornor,0,0,orco,0);
+
+ psys_mat_hair_to_global(ob, ctx->psmd->dm, psys->part->from, pa, hairmat);
}
keys->steps = ctx->steps;
@@ -2070,43 +2314,13 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
#endif // XXX old animation system
/* get different child parameters from textures & vgroups */
- ptex.length=part->length*(1.0f - part->randlength*cpa->rand[0]);
- ptex.clump=1.0;
- ptex.kink=1.0;
- ptex.rough= 1.0;
- ptex.exist= 1.0;
-
- get_cpa_texture(ctx->dm,ctx->ma,cpa_num,cpa_fuv,orco,&ptex,
- MAP_PA_DENS|MAP_PA_LENGTH|MAP_PA_CLUMP|MAP_PA_KINK|MAP_PA_ROUGH);
-
- pa_length=ptex.length;
- pa_clump=ptex.clump;
- pa_kink=ptex.kink;
- pa_rough1=ptex.rough;
- pa_rough2=ptex.rough;
- pa_roughe=ptex.rough;
- pa_effector= 1.0f;
+ get_child_modifier_parameters(part, ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
if(ptex.exist < cpa->rand[1]) {
keys->steps = -1;
return;
}
- if(ctx->vg_length)
- pa_length*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_length);
- if(ctx->vg_clump)
- pa_clump*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_clump);
- if(ctx->vg_kink)
- pa_kink*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_kink);
- if(ctx->vg_rough1)
- pa_rough1*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough1);
- if(ctx->vg_rough2)
- pa_rough2*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough2);
- if(ctx->vg_roughe)
- pa_roughe*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_roughe);
- if(ctx->vg_effector)
- pa_effector*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_effector);
-
/* create the child path */
for(k=0,state=keys; k<=ctx->steps; k++,state++){
if(ctx->between){
@@ -2130,12 +2344,14 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
key[w]++;
w++;
}
- if(k==0){
- /* calculate the offset between actual child root position and first position interpolated from parents */
- VECSUB(cpa_1st,cpa_1st,state->co);
+ if(part->path_start==0.0f) {
+ if(k==0){
+ /* calculate the offset between actual child root position and first position interpolated from parents */
+ VECSUB(cpa_1st,cpa_1st,state->co);
+ }
+ /* apply offset for correct positioning */
+ VECADD(state->co,state->co,cpa_1st);
}
- /* apply offset for correct positioning */
- VECADD(state->co,state->co,cpa_1st);
}
else{
/* offset the child from the parent position */
@@ -2149,7 +2365,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
if(part->flag & PART_CHILD_EFFECT) {
for(k=0,state=keys; k<=ctx->steps; k++,state++) {
if(k) {
- do_path_effectors(ctx->scene, ob, psys, cpa->pa[0], state, k, ctx->steps, keys->co, pa_effector, 0.0f, ctx->cfra, &eff_length, eff_vec);
+ do_path_effectors(ctx->scene, ob, psys, cpa->pa[0], state, k, ctx->steps, keys->co, ptex.effector, 0.0f, ctx->cfra, &eff_length, eff_vec);
}
else {
VecSubf(eff_vec,(state+1)->co,state->co);
@@ -2175,67 +2391,50 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
}
/* apply different deformations to the child path */
- if(part->flag & PART_CHILD_EFFECT)
- /* state is safe to cast, since only co and vel are used */
- guided = do_guide(ctx->scene, (ParticleKey*)state, cpa->parent, t, &(psys->effectors));
-
- if(guided==0){
- if(part->kink)
- do_prekink((ParticleKey*)state, (ParticleKey*)par, par_rot, t,
- part->kink_freq * pa_kink, part->kink_shape, part->kink_amp, part->kink, part->kink_axis, ob->obmat);
-
- do_clump((ParticleKey*)state, (ParticleKey*)par, t, part->clumpfac, part->clumppow, pa_clump);
- }
-
- if(part->flag & PART_BRANCHING && ctx->between == 0 && part->flag & PART_ANIM_BRANCHING)
- rough_t = t * rough_rand;
- else
- rough_t = t;
-
- if(part->rough1 != 0.0 && pa_rough1 != 0.0)
- do_rough(orco, rough_t, pa_rough1*part->rough1, part->rough1_size, 0.0, (ParticleKey*)state);
+ do_child_modifiers(ctx->scene, ob, psys, part, &ptex, (ParticleKey *)par, par_rot, cpa, orco, hairmat, (ParticleKey *)state, t);
- if(part->rough2 != 0.0 && pa_rough2 != 0.0)
- do_rough(cpa->rand, rough_t, pa_rough2*part->rough2, part->rough2_size, part->rough2_thres, (ParticleKey*)state);
-
- if(part->rough_end != 0.0 && pa_roughe != 0.0)
- do_rough_end(cpa->rand, rough_t, pa_roughe*part->rough_end, part->rough_end_shape, (ParticleKey*)state, (ParticleKey*)par);
-
- if(part->flag & PART_BRANCHING && ctx->between==0){
- if(branch_prob > part->branch_thres){
- branchfac=0.0f;
- }
- else{
- if(part->flag & PART_SYMM_BRANCHING){
- if(t < branch_begin || t > branch_end)
- branchfac=0.0f;
- else{
- if((t-branch_begin)/(branch_end-branch_begin)<0.5)
- branchfac=2.0f*(t-branch_begin)/(branch_end-branch_begin);
- else
- branchfac=2.0f*(branch_end-t)/(branch_end-branch_begin);
+ /* TODO: better branching */
+ //if(part->flag & PART_BRANCHING && ctx->between == 0 && part->flag & PART_ANIM_BRANCHING)
+ // rough_t = t * rough_rand;
+ //else
+ // rough_t = t;
- CLAMP(branchfac,0.0f,1.0f);
- }
- }
- else{
- if(t < branch_begin){
- branchfac=0.0f;
- }
- else{
- branchfac=(t-branch_begin)/((1.0f-branch_begin)*0.5f);
- CLAMP(branchfac,0.0f,1.0f);
- }
- }
- }
+ /* TODO: better branching */
+ //if(part->flag & PART_BRANCHING && ctx->between==0){
+ // if(branch_prob > part->branch_thres){
+ // branchfac=0.0f;
+ // }
+ // else{
+ // if(part->flag & PART_SYMM_BRANCHING){
+ // if(t < branch_begin || t > branch_end)
+ // branchfac=0.0f;
+ // else{
+ // if((t-branch_begin)/(branch_end-branch_begin)<0.5)
+ // branchfac=2.0f*(t-branch_begin)/(branch_end-branch_begin);
+ // else
+ // branchfac=2.0f*(branch_end-t)/(branch_end-branch_begin);
+
+ // CLAMP(branchfac,0.0f,1.0f);
+ // }
+ // }
+ // else{
+ // if(t < branch_begin){
+ // branchfac=0.0f;
+ // }
+ // else{
+ // branchfac=(t-branch_begin)/((1.0f-branch_begin)*0.5f);
+ // CLAMP(branchfac,0.0f,1.0f);
+ // }
+ // }
+ // }
- if(i<psys->totpart)
- VecLerpf(state->co, (pcache[i] + k)->co, state->co, branchfac);
- else
- /* this is not threadsafe, but should only happen for
- * branching particles particles, which are not threaded */
- VecLerpf(state->co, (cache[i - psys->totpart] + k)->co, state->co, branchfac);
- }
+ // if(i<psys->totpart)
+ // VecLerpf(state->co, (pcache[i] + k)->co, state->co, branchfac);
+ // else
+ // /* this is not threadsafe, but should only happen for
+ // * branching particles particles, which are not threaded */
+ // VecLerpf(state->co, (cache[i - psys->totpart] + k)->co, state->co, branchfac);
+ //}
/* we have to correct velocity because of kink & clump */
if(k>1){
@@ -2249,20 +2448,12 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
/* check if path needs to be cut before actual end of data points */
if(k){
VECSUB(dvec,state->co,(state-1)->co);
- if(part->flag&PART_ABS_LENGTH)
- length=VecLength(dvec);
- else
- length=1.0f/(float)ctx->steps;
-
+ length=1.0f/(float)ctx->steps;
k=check_path_length(k,keys,state,max_length,&cur_length,length,dvec);
}
else{
/* initialize length calculation */
- if(part->flag&PART_ABS_LENGTH)
- max_length= part->abslength*pa_length;
- else
- max_length= pa_length;
-
+ max_length= ptex.length;
cur_length= 0.0f;
}
@@ -2355,7 +2546,6 @@ void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, floa
psys_threads_free(pthreads);
}
-
/* Calculates paths ready for drawing/rendering. */
/* -Usefull for making use of opengl vertex arrays for super fast strand drawing. */
/* -Makes child strands possible and creates them too into the cache. */
@@ -2368,7 +2558,7 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
ParticleSettings *part = psys->part;
ParticleData *pa;
- ParticleKey keys[4], result, *kkey[2] = {NULL, NULL};
+ ParticleKey result, *kkey[2] = {NULL, NULL};
HairKey *hkey[2] = {NULL, NULL};
ParticleEdit *edit = 0;
@@ -2378,11 +2568,14 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
BodyPoint *bp[2] = {NULL, NULL};
Material *ma;
+
+ ParticleInterpolationData pind;
float birthtime = 0.0, dietime = 0.0;
float t, time = 0.0, keytime = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
- float col[3] = {0.5f, 0.5f, 0.5f};
+ 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->part->draw_step);
int totpart = psys->totpart;
@@ -2390,13 +2583,18 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
float nosel_col[3];
float length, vec[3];
float *vg_effector= NULL, effector=0.0f;
- float *vg_length= NULL, pa_length=1.0f, max_length=1.0f, cur_length=0.0f;
- float len, dvec[3];
+ 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)==0 && (psys->flag & PSYS_KEYED)==0)
+ if((psys->flag & PSYS_HAIR_DONE)==0 && (psys->flag & PSYS_KEYED)==0 && (psys->pointcache->flag & PTCACHE_BAKED)==0)
return;
+ BLI_srandom(psys->seed);
+
+ keyed = psys->flag & PSYS_KEYED;
+ baked = psys->pointcache->flag & PTCACHE_BAKED;
+
if(psys->renderdata) {
steps = (int)pow(2.0, (double)psys->part->ren_step);
}
@@ -2460,7 +2658,7 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
else memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
if(!edit && !psys->totchild) {
- pa_length = part->length * (1.0f - part->randlength*pa->r_ave[0]);
+ 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);
}
@@ -2471,26 +2669,35 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
ekey = edit->keys[i];
/*--get the first data points--*/
- if(psys->flag & PSYS_KEYED) {
- kkey[0] = pa->keys;
- kkey[1] = kkey[0] + 1;
-
- birthtime = kkey[0]->time;
- dietime = kkey[0][pa->totkey-1].time;
- }
- else {
- hkey[0] = pa->hair;
- hkey[1] = hkey[0] + 1;
-
- birthtime = hkey[0]->time;
- dietime = hkey[0][pa->totkey-1].time;
+ 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(!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);
+ }
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- }
+ if(birthtime >= dietime) {
+ cache[i]->steps = -1;
+ continue;
+ }
- if(soft){
- bp[0] = soft->bpoint + pa->bpi;
- bp[1] = bp[0] + 1;
+ dietime = birthtime + pa_length * (dietime - birthtime);
}
/*--interpolate actual path from data points--*/
@@ -2499,85 +2706,12 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
t = birthtime + time * (dietime - birthtime);
- if(psys->flag & PSYS_KEYED) {
- while(kkey[1]->time < t) {
- kkey[1]++;
- }
-
- kkey[0] = kkey[1] - 1;
- }
- else {
- while(hkey[1]->time < t) {
- hkey[1]++;
- bp[1]++;
- }
-
- hkey[0] = hkey[1] - 1;
- }
-
- if(soft) {
- bp[0] = bp[1] - 1;
- bp_to_particle(keys + 1, bp[0], hkey[0]);
- bp_to_particle(keys + 2, bp[1], hkey[1]);
- }
- else if(psys->flag & PSYS_KEYED) {
- memcpy(keys + 1, kkey[0], sizeof(ParticleKey));
- memcpy(keys + 2, kkey[1], sizeof(ParticleKey));
- }
- else {
- hair_to_particle(keys + 1, hkey[0]);
- hair_to_particle(keys + 2, hkey[1]);
- }
-
-
- if((psys->flag & PSYS_KEYED)==0) {
- if(soft) {
- if(hkey[0] != pa->hair)
- bp_to_particle(keys, bp[0] - 1, hkey[0] - 1);
- else
- bp_to_particle(keys, bp[0], hkey[0]);
- }
- else {
- if(hkey[0] != pa->hair)
- hair_to_particle(keys, hkey[0] - 1);
- else
- hair_to_particle(keys, hkey[0]);
- }
-
- if(soft) {
- if(hkey[1] != pa->hair + pa->totkey - 1)
- bp_to_particle(keys + 3, bp[1] + 1, hkey[1] + 1);
- else
- bp_to_particle(keys + 3, bp[1], hkey[1]);
- }
- else {
- if(hkey[1] != pa->hair + pa->totkey - 1)
- hair_to_particle(keys + 3, hkey[1] + 1);
- else
- hair_to_particle(keys + 3, hkey[1]);
- }
- }
-
- dfra = keys[2].time - keys[1].time;
-
- keytime = (t - keys[1].time) / dfra;
-
- /* convert velocity to timestep size */
- if(psys->flag & PSYS_KEYED){
- VecMulf(keys[1].vel, dfra / frs_sec);
- VecMulf(keys[2].vel, dfra / frs_sec);
- }
+ result.time = -t;
- /* 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)*/
- interpolate_particle((psys->flag & PSYS_KEYED) ? -1 /* signal for cubic interpolation */
- : ((psys->part->flag & PART_HAIR_BSPLINE) ? KEY_BSPLINE : KEY_CARDINAL)
- ,keys, keytime, &result, 0);
+ do_particle_interpolation(psys, i, pa, t, frs_sec, &pind, &result);
- /* the velocity needs to be converted back from cubic interpolation */
- if(psys->flag & PSYS_KEYED){
- VecMulf(result.vel, frs_sec / dfra);
- }
- else if(soft==NULL) { /* softbody and keyed are allready in global space */
+ /* keyed, baked and softbody are allready in global space */
+ if(!keyed && !baked && !soft) {
Mat4MulVecfl(hairmat, result.co);
}
@@ -2615,8 +2749,9 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
VECCOPY(ca->col, col);
}
}
+
- /*--modify paths--*/
+ /*--modify paths and calculate rotation & velocity--*/
VecSubf(vec,(cache[i]+1)->co,cache[i]->co);
length = VecLength(vec);
@@ -2645,12 +2780,18 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
float cosangle, angle, tangent[3], normal[3], q[4];
if(k == 1) {
+ /* calculate initial tangent for incremental rotations */
VECSUB(tangent, ca->co, (ca - 1)->co);
-
- vectoquat(tangent, OB_POSX, OB_POSZ, (ca-1)->rot);
-
VECCOPY(prev_tangent, tangent);
Normalize(prev_tangent);
+
+ /* First rotation is based on emitting face orientation. */
+ /* This is way better than having flipping rotations resulting */
+ /* from using a global axis as a rotation pole (vec_to_quat()). */
+ /* It's not an ideal solution though since it disregards the */
+ /* initial tangent, but taking that in to account will allow */
+ /* the possibility of flipping again. -jahka */
+ Mat3ToQuat_is_ok(rotmat, (ca-1)->rot);
}
else {
VECSUB(tangent, ca->co, (ca - 1)->co);
@@ -2689,28 +2830,6 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
}
}
-
- if(!edit && !psys->totchild) {
- /* check if path needs to be cut before actual end of data points */
- if(k){
- VECSUB(dvec,ca->co,(ca-1)->co);
- if(part->flag&PART_ABS_LENGTH)
- len=VecLength(dvec);
- else
- len=1.0f/(float)steps;
-
- k=check_path_length(k,cache[i],ca,max_length,&cur_length,len,dvec);
- }
- else{
- /* initialize length calculation */
- if(part->flag&PART_ABS_LENGTH)
- max_length= part->abslength*pa_length;
- else
- max_length= pa_length;
-
- cur_length= 0.0f;
- }
- }
}
}
@@ -2739,15 +2858,6 @@ void copy_particle_key(ParticleKey *to, ParticleKey *from, int time){
memcpy(to,from,sizeof(ParticleKey));
to->time=to_time;
}
- /*
- VECCOPY(to->co,from->co);
- VECCOPY(to->vel,from->vel);
- QUATCOPY(to->rot,from->rot);
- if(time)
- to->time=from->time;
- to->flag=from->flag;
- to->sbw=from->sbw;
- */
}
void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time){
if(loc) VECCOPY(loc,key->co);
@@ -2901,13 +3011,69 @@ void psys_mat_hair_to_global(Object *ob, DerivedMesh *dm, short from, ParticleDa
/************************************************/
/* ParticleSettings handling */
/************************************************/
+void object_add_particle_system(Scene *scene, Object *ob)
+{
+ ParticleSystem *psys;
+ ModifierData *md;
+ ParticleSystemModifierData *psmd;
+
+ if(!ob || ob->type != OB_MESH)
+ return;
+
+ psys = ob->particlesystem.first;
+ for(; psys; psys=psys->next)
+ psys->flag &= ~PSYS_CURRENT;
+
+ psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
+ psys->pointcache = BKE_ptcache_add();
+ BLI_addtail(&ob->particlesystem, psys);
+
+ psys->part = psys_new_settings("PSys", NULL);
+
+ md= modifier_new(eModifierType_ParticleSystem);
+ sprintf(md->name, "ParticleSystem %i", BLI_countlist(&ob->particlesystem));
+ psmd= (ParticleSystemModifierData*) md;
+ psmd->psys=psys;
+ BLI_addtail(&ob->modifiers, md);
+
+ psys->totpart=0;
+ psys->flag = PSYS_ENABLED|PSYS_CURRENT;
+ psys->cfra=bsystem_time(scene,ob,scene->r.cfra+1,0.0);
+
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+}
+void object_remove_particle_system(Scene *scene, Object *ob)
+{
+ ParticleSystem *psys = psys_get_current(ob);
+ ParticleSystemModifierData *psmd;
+
+ if(!psys)
+ return;
+
+ /* clear modifier */
+ psmd= psys_get_modifier(ob, psys);
+ BLI_remlink(&ob->modifiers, psmd);
+ modifier_free((ModifierData *)psmd);
+
+ /* clear particle system */
+ BLI_remlink(&ob->particlesystem, psys);
+ psys_free(ob,psys);
+
+ if(ob->particlesystem.first)
+ ((ParticleSystem *) ob->particlesystem.first)->flag |= PSYS_CURRENT;
+
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+}
static void default_particle_settings(ParticleSettings *part)
{
int i;
part->type= PART_EMITTER;
part->distr= PART_DISTR_JIT;
- part->draw_as=PART_DRAW_DOT;
+ part->draw_as = PART_DRAW_REND;
+ part->ren_as = PART_DRAW_HALO;
part->bb_uv_split=1;
part->bb_align=PART_BB_VIEW;
part->bb_split_offset=PART_BB_OFF_LINEAR;
@@ -2920,8 +3086,6 @@ static void default_particle_settings(ParticleSettings *part)
part->totpart= 1000;
part->grid_res= 10;
part->timetweak= 1.0;
- part->keyed_time= 0.5;
- //part->userjit;
part->integrator= PART_INT_MIDPOINT;
part->phystype= PART_PHYS_NEWTON;
@@ -2935,7 +3099,6 @@ static void default_particle_settings(ParticleSettings *part)
part->reactevent= PART_EVENT_DEATH;
part->disp=100;
part->from= PART_FROM_FACE;
- part->length= 1.0;
part->nbetween= 4;
part->boidneighbours= 5;
@@ -2962,7 +3125,14 @@ static void default_particle_settings(ParticleSettings *part)
part->rough2_size=1.0;
part->rough_end_shape=1.0;
+ part->clength=1.0f;
+ part->clength_thres=0.0f;
+
part->draw_line[0]=0.5;
+ part->path_start = 0.0f;
+ part->path_end = 1.0f;
+
+ part->keyed_loops = 1;
part->banking=1.0;
part->max_bank=1.0;
@@ -2987,6 +3157,9 @@ ParticleSettings *psys_new_settings(char *name, Main *main)
{
ParticleSettings *part;
+ if(main==NULL)
+ main = G.main;
+
part= alloc_libblock(&main->particle, ID_PA, name);
default_particle_settings(part);
@@ -3062,7 +3235,6 @@ void make_local_particlesettings(ParticleSettings *part)
}
}
}
-
void psys_flush_particle_settings(Scene *scene, ParticleSettings *part, int recalc)
{
Base *base = scene->base.first;
@@ -3169,7 +3341,7 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
if(ma) for(m=0; m<MAX_MTEX; m++){
mtex=ma->mtex[m];
- if(mtex && (ma->septex & (1<<m))==0){
+ if(mtex && (ma->septex & (1<<m))==0 && mtex->pmapto){
float def=mtex->def_var;
float var=mtex->varfac;
short blend=mtex->blendtype;
@@ -3197,7 +3369,7 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
if((event & mtex->pmapto) & MAP_PA_KINK)
ptex->kink= texture_value_blend(def,ptex->kink,value,var,blend,neg & MAP_PA_KINK);
if((event & mtex->pmapto) & MAP_PA_ROUGH)
- ptex->rough= texture_value_blend(def,ptex->rough,value,var,blend,neg & MAP_PA_ROUGH);
+ ptex->rough1= ptex->rough2= ptex->roughe= texture_value_blend(def,ptex->rough1,value,var,blend,neg & MAP_PA_ROUGH);
if((event & mtex->pmapto) & MAP_PA_DENS)
ptex->exist= texture_value_blend(def,ptex->exist,value,var,blend,neg & MAP_PA_DENS);
}
@@ -3206,7 +3378,11 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float
if(event & MAP_PA_LENGTH) { CLAMP(ptex->length,0.0,1.0); }
if(event & MAP_PA_CLUMP) { CLAMP(ptex->clump,0.0,1.0); }
if(event & MAP_PA_KINK) { CLAMP(ptex->kink,0.0,1.0); }
- if(event & MAP_PA_ROUGH) { CLAMP(ptex->rough,0.0,1.0); }
+ if(event & MAP_PA_ROUGH) {
+ CLAMP(ptex->rough1,0.0,1.0);
+ CLAMP(ptex->rough2,0.0,1.0);
+ CLAMP(ptex->roughe,0.0,1.0);
+ }
if(event & MAP_PA_DENS) { CLAMP(ptex->exist,0.0,1.0); }
}
void psys_get_texture(Object *ob, Material *ma, ParticleSystemModifierData *psmd, ParticleSystem *psys, ParticleData *pa, ParticleTexture *ptex, int event)
@@ -3218,7 +3394,7 @@ void psys_get_texture(Object *ob, Material *ma, ParticleSystemModifierData *psmd
if(ma) for(m=0; m<MAX_MTEX; m++){
mtex=ma->mtex[m];
- if(mtex && (ma->septex & (1<<m))==0){
+ if(mtex && (ma->septex & (1<<m))==0 && mtex->pmapto){
float var=mtex->varfac;
float def=mtex->def_var;
short blend=mtex->blendtype;
@@ -3307,12 +3483,12 @@ float psys_get_size(Object *ob, Material *ma, ParticleSystemModifierData *psmd,
return size*part->size;
}
-float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra)
+float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra, float *birthtime, float *dietime)
{
ParticleSettings *part = psys->part;
+ float time, life;
if(part->childtype==PART_CHILD_FACES){
- float time;
int w=0;
time=0.0;
while(w<4 && cpa->pa[w]>=0){
@@ -3320,12 +3496,21 @@ float psys_get_child_time(ParticleSystem *psys, ChildParticle *cpa, float cfra)
w++;
}
- return (cfra-time)/(part->lifetime*(1.0f-part->randlife*cpa->rand[1]));
+ life = part->lifetime*(1.0f-part->randlife*cpa->rand[1]);
}
else{
ParticleData *pa = psys->particles + cpa->parent;
- return (cfra-pa->time)/pa->lifetime;
+
+ time = pa->time;
+ life = pa->lifetime;
}
+
+ if(birthtime)
+ *birthtime = time;
+ if(dietime)
+ *dietime = time+life;
+
+ return (cfra-time)/life;
}
float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float cfra, float *pa_time)
{
@@ -3342,7 +3527,7 @@ float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float cfra,
if(pa_time)
time=*pa_time;
else
- time=psys_get_child_time(psys,cpa,cfra);
+ time=psys_get_child_time(psys,cpa,cfra,NULL,NULL);
/* correction for lifetime */
calc_ipo(part->ipo, 100*time);
@@ -3364,6 +3549,66 @@ float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float cfra,
return size;
}
+static void get_child_modifier_parameters(ParticleSettings *part, ParticleThreadContext *ctx, ChildParticle *cpa, short cpa_from, int cpa_num, float *cpa_fuv, float *orco, ParticleTexture *ptex)
+{
+ ptex->length= 1.0f - part->randlength*cpa->rand[0];
+ ptex->clump=1.0;
+ ptex->kink=1.0;
+ ptex->rough1= 1.0;
+ ptex->rough2= 1.0;
+ ptex->roughe= 1.0;
+ ptex->exist= 1.0;
+ ptex->effector= 1.0;
+
+ ptex->length*= part->clength_thres < cpa->rand[1] ? part->clength : 1.0f;
+
+ get_cpa_texture(ctx->dm,ctx->ma,cpa_num,cpa_fuv,orco,ptex,
+ MAP_PA_DENS|MAP_PA_LENGTH|MAP_PA_CLUMP|MAP_PA_KINK|MAP_PA_ROUGH);
+
+
+ if(ptex->exist < cpa->rand[1])
+ return;
+
+ if(ctx->vg_length)
+ ptex->length*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_length);
+ if(ctx->vg_clump)
+ ptex->clump*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_clump);
+ if(ctx->vg_kink)
+ ptex->kink*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_kink);
+ if(ctx->vg_rough1)
+ ptex->rough1*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough1);
+ if(ctx->vg_rough2)
+ ptex->rough2*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_rough2);
+ if(ctx->vg_roughe)
+ ptex->roughe*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_roughe);
+ if(ctx->vg_effector)
+ ptex->effector*=psys_interpolate_value_from_verts(ctx->dm,cpa_from,cpa_num,cpa_fuv,ctx->vg_effector);
+}
+static void do_child_modifiers(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSettings *part, ParticleTexture *ptex, ParticleKey *par, float *par_rot, ChildParticle *cpa, float *orco, float mat[4][4], ParticleKey *state, float t)
+{
+ int guided = 0;
+
+ if(part->flag & PART_CHILD_EFFECT)
+ /* state is safe to cast, since only co and vel are used */
+ guided = do_guide(scene, (ParticleKey*)state, cpa->parent, t, &(psys->effectors));
+
+ if(guided==0){
+ if(part->kink)
+ do_prekink(state, par, par_rot, t, part->kink_freq * ptex->kink, part->kink_shape,
+ part->kink_amp, part->kink, part->kink_axis, ob->obmat);
+
+ do_clump(state, par, t, part->clumpfac, part->clumppow, ptex->clump);
+ }
+
+ if(part->rough1 != 0.0 && ptex->rough1 != 0.0)
+ do_rough(orco, mat, t, ptex->rough1*part->rough1, part->rough1_size, 0.0, state);
+
+ if(part->rough2 != 0.0 && ptex->rough2 != 0.0)
+ do_rough(cpa->rand, mat, t, ptex->rough2*part->rough2, part->rough2_size, part->rough2_thres, state);
+
+ if(part->rough_end != 0.0 && ptex->roughe != 0.0)
+ do_rough_end(cpa->rand, mat, t, ptex->roughe*part->rough_end, part->rough_end_shape, state);
+}
/* get's hair (or keyed) particles state at the "path time" specified in state->time */
void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, int p, ParticleKey *state, int vel)
{
@@ -3375,17 +3620,21 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
ParticleTexture ptex;
ParticleKey *kkey[2] = {NULL, NULL};
HairKey *hkey[2] = {NULL, NULL};
- ParticleKey *par=0, keys[4];
+ ParticleKey *par=0, keys[4], tstate;
+ ParticleThreadContext ctx; /* fake thread context for child modifiers */
+ ParticleInterpolationData pind;
- float t, real_t, dfra, keytime, frs_sec = scene->r.frs_sec;
+ float t, frs_sec = scene->r.frs_sec;
float co[3], orco[3];
float hairmat[4][4];
- float pa_clump = 0.0, pa_kink = 0.0;
int totparent = 0;
int totpart = psys->totpart;
int totchild = psys->totchild;
short between = 0, edit = 0;
+ int keyed = part->phystype & PART_PHYS_KEYED && psys->flag & PSYS_KEYED;
+ int cached = !keyed && part->type != PART_HAIR;
+
float *cpa_fuv; int cpa_num; short cpa_from;
//if(psys_in_edit_mode(scene, psys)){
@@ -3394,12 +3643,6 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
// edit=1;
//}
- /* user want's cubic interpolation but only without sb it possible */
- //if(interpolation==PART_INTER_CUBIC && baked && psys->softflag==OB_SB_ENABLE)
- // interpolation=PART_INTER_BSPLINE;
- //else if(baked==0) /* it doesn't make sense to use other types for keyed */
- // interpolation=PART_INTER_CUBIC;
-
t=state->time;
CLAMP(t, 0.0, 1.0);
@@ -3411,99 +3654,14 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
key_from_object(pa->stick_ob,state);
return;
}
-
- if(psys->flag & PSYS_KEYED) {
- kkey[0] = pa->keys;
- kkey[1] = kkey[0] + 1;
-
- real_t = kkey[0]->time + t * (kkey[0][pa->totkey-1].time - kkey[0]->time);
- }
- else {
- hkey[0] = pa->hair;
- hkey[1] = pa->hair + 1;
-
- real_t = hkey[0]->time + (hkey[0][pa->totkey-1].time - hkey[0]->time) * t;
- }
-
- if(psys->flag & PSYS_KEYED) {
- while(kkey[1]->time < real_t) {
- kkey[1]++;
- }
- kkey[0] = kkey[1] - 1;
-
- memcpy(keys + 1, kkey[0], sizeof(ParticleKey));
- memcpy(keys + 2, kkey[1], sizeof(ParticleKey));
- }
- else {
- while(hkey[1]->time < real_t)
- hkey[1]++;
-
- hkey[0] = hkey[1] - 1;
-
- hair_to_particle(keys + 1, hkey[0]);
- hair_to_particle(keys + 2, hkey[1]);
- }
-
- if((psys->flag & PSYS_KEYED)==0) {
- //if(soft){
- // if(key[0] != sbel.keys)
- // DB_copy_key(&k1,key[0]-1);
- // else
- // DB_copy_key(&k1,&k2);
- //}
- //else{
- if(hkey[0] != pa->hair)
- hair_to_particle(keys, hkey[0] - 1);
- else
- hair_to_particle(keys, hkey[0]);
- //}
-
- //if(soft){
- // if(key[1] != sbel.keys + sbel.totkey-1)
- // DB_copy_key(&k4,key[1]+1);
- // else
- // DB_copy_key(&k4,&k3);
- //}
- //else {
- if(hkey[1] != pa->hair + pa->totkey - 1)
- hair_to_particle(keys + 3, hkey[1] + 1);
- else
- hair_to_particle(keys + 3, hkey[1]);
- }
- //}
- //psys_get_particle_on_path(scene, bsys,p,t,bkey,ckey[0]);
+ pind.keyed = keyed;
+ pind.cached = cached;
+ pind.soft = NULL;
+ init_particle_interpolation(ob, psys, pa, &pind);
+ do_particle_interpolation(psys, p, pa, t, frs_sec, &pind, state);
- //if(part->rotfrom==PART_ROT_KEYS)
- // QuatInterpol(state->rot,k2.rot,k3.rot,keytime);
- //else{
- // /* TODO: different rotations */
- // float nvel[3];
- // VECCOPY(nvel,state->vel);
- // VecMulf(nvel,-1.0f);
- // vectoquat(nvel, OB_POSX, OB_POSZ, state->rot);
- //}
-
- dfra = keys[2].time - keys[1].time;
-
- keytime = (real_t - keys[1].time) / dfra;
-
- /* convert velocity to timestep size */
- if(psys->flag & PSYS_KEYED){
- VecMulf(keys[1].vel, dfra / frs_sec);
- VecMulf(keys[2].vel, dfra / frs_sec);
- QuatInterpol(state->rot,keys[1].rot,keys[2].rot,keytime);
- }
-
- interpolate_particle((psys->flag & PSYS_KEYED) ? -1 /* signal for cubic interpolation */
- : ((psys->part->flag & PART_HAIR_BSPLINE) ? KEY_BSPLINE : KEY_CARDINAL)
- ,keys, keytime, state, 1);
-
- /* the velocity needs to be converted back from cubic interpolation */
- if(psys->flag & PSYS_KEYED){
- VecMulf(state->vel, frs_sec / dfra);
- }
- else {
+ if(!keyed && !cached) {
if((pa->flag & PARS_REKEY)==0) {
psys_mat_hair_to_global(ob, psmd->dm, part->from, pa, hairmat);
Mat4MulVecfl(hairmat, state->co);
@@ -3521,8 +3679,11 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
}
else if(totchild){
//Mat4Invert(imat,ob->obmat);
-
+
cpa=psys->child+p-totpart;
+
+ if(state->time < 0.0f)
+ t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL);
if(totchild && part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES){
totparent=(int)(totchild*part->parents*0.3);
@@ -3539,7 +3700,7 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
/* get parent states */
while(w<4 && cpa->pa[w]>=0){
- keys[w].time = t;
+ keys[w].time = state->time;
psys_get_particle_on_path(scene, ob, psys, cpa->pa[w], keys+w, 1);
w++;
}
@@ -3548,8 +3709,6 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
cpa_num=cpa->num;
foffset= cpa->foffset;
- if(part->childtype == PART_CHILD_FACES)
- foffset = -(2.0f + part->childspread);
cpa_fuv = cpa->fuv;
cpa_from = PART_FROM_FACE;
@@ -3560,12 +3719,15 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
//Mat4MulVecfl(ob->obmat,cpa_1st);
+ pa = psys->particles + cpa->parent;
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+
pa=0;
}
else{
/* get the parent state */
-
- keys->time = t;
+ keys->time = state->time;
psys_get_particle_on_path(scene, ob, psys, cpa->parent, keys,1);
/* get the original coordinates (orco) for texture usage */
@@ -3576,6 +3738,8 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
cpa_fuv=pa->fuv;
psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,0,0,0,orco,0);
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
}
/* correct child ipo timing */
@@ -3587,15 +3751,11 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
#endif // XXX old animation system
/* get different child parameters from textures & vgroups */
- ptex.clump=1.0;
- ptex.kink=1.0;
-
- get_cpa_texture(psmd->dm,ma,cpa_num,cpa_fuv,orco,&ptex,MAP_PA_CLUMP|MAP_PA_KINK);
-
- pa_clump=ptex.clump;
- pa_kink=ptex.kink;
-
- /* TODO: vertex groups */
+ memset(&ctx, 0, sizeof(ParticleThreadContext));
+ ctx.dm = psmd->dm;
+ ctx.ma = ma;
+ /* TODO: assign vertex groups */
+ get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
if(between){
int w=0;
@@ -3623,46 +3783,33 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
}
par = keys;
- //if(totparent){
- // if(p-totpart>=totparent){
- // key.time=t;
- // psys_get_particle_on_path(ob,psys,totpart+cpa->parent,&key,1);
- // bti->convert_dynamic_key(bsys,&key,par,cpar);
- // }
- // else
- // par=0;
- //}
- //else
- // DB_get_key_on_path(bsys,cpa->parent,t,par,cpar);
- /* apply different deformations to the child path */
- if(part->kink)
- do_prekink(state, par, par->rot, t, part->kink_freq * pa_kink, part->kink_shape,
- part->kink_amp, part->kink, part->kink_axis, ob->obmat);
-
- do_clump(state, par, t, part->clumpfac, part->clumppow, 1.0f);
-
- if(part->rough1 != 0.0)
- do_rough(orco, t, part->rough1, part->rough1_size, 0.0, state);
-
- if(part->rough2 != 0.0)
- do_rough(cpa->rand, t, part->rough2, part->rough2_size, part->rough2_thres, state);
+ if(vel)
+ copy_particle_key(&tstate, state, 1);
- if(part->rough_end != 0.0)
- do_rough_end(cpa->rand, t, part->rough_end, part->rough_end_shape, state, par);
+ /* apply different deformations to the child path */
+ do_child_modifiers(scene, ob, psys, part, &ptex, par, par->rot, cpa, orco, hairmat, state, t);
+
+ /* try to estimate correct velocity */
+ if(vel){
+ ParticleKey tstate;
+ float length = VecLength(state->vel);
+
+ if(t>=0.001f){
+ tstate.time=t-0.001f;
+ psys_get_particle_on_path(scene,ob,psys,p,&tstate,0);
+ VECSUB(state->vel,state->co,tstate.co);
+ Normalize(state->vel);
+ }
+ else{
+ tstate.time=t+0.001f;
+ psys_get_particle_on_path(scene, ob,psys,p,&tstate,0);
+ VECSUB(state->vel,tstate.co,state->co);
+ Normalize(state->vel);
+ }
- //if(vel){
- // if(t>=0.001f){
- // tstate.time=t-0.001f;
- // psys_get_particle_on_path(scene,ob,psys,p,&tstate,0);
- // VECSUB(state->vel,state->co,tstate.co);
- // }
- // else{
- // tstate.time=t+0.001f;
- // psys_get_particle_on_path(scene, ob,psys,p,&tstate,0);
- // VECSUB(state->vel,tstate.co,state->co);
- // }
- //}
+ VecMulf(state->vel, length);
+ }
}
}
/* gets particle's state at a time, returns 1 if particle exists and can be seen and 0 if not */
@@ -3689,7 +3836,7 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
pa=psys->particles+p;
if(between){
- state->time = psys_get_child_time(psys,&psys->child[p-totpart],cfra);
+ state->time = psys_get_child_time(psys,&psys->child[p-totpart],cfra,NULL,NULL);
if(always==0)
if((state->time<0.0 && (part->flag & PART_UNBORN)==0)
@@ -3702,6 +3849,8 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
if((pa->alive==PARS_UNBORN && (part->flag & PART_UNBORN)==0)
|| (pa->alive==PARS_DEAD && (part->flag & PART_DIED)==0))
return 0;
+
+ state->time = MIN2(state->time, pa->dietime);
}
if(psys->flag & PSYS_KEYED){
@@ -3710,7 +3859,7 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
state->time= (cfra-(part->sta+(part->end-part->sta)*cpa->rand[0]))/(part->lifetime*cpa->rand[1]);
}
else
- state->time= (cfra-pa->time)/(pa->dietime-pa->time);
+ state->time= -cfra;
psys_get_particle_on_path(scene, ob, psys, p, state,1);
return 1;
@@ -3747,57 +3896,55 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
calc_latt_deform(psys->lattice, state->co,1.0f);
}
else{
- if (pa) { /* TODO PARTICLE - should this ever be NULL? - Campbell */
- if(pa->state.time==state->time || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED))
- copy_particle_key(state, &pa->state, 1);
- else if(pa->prev_state.time==state->time)
- copy_particle_key(state, &pa->prev_state, 1);
- else {
- /* let's interpolate to try to be as accurate as possible */
- if(pa->state.time + 1.0f > state->time && pa->prev_state.time - 1.0f < state->time) {
- ParticleKey keys[4];
- float dfra, keytime, frs_sec = scene->r.frs_sec;
+ if(pa->state.time==state->time || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED))
+ copy_particle_key(state, &pa->state, 1);
+ else if(pa->prev_state.time==state->time)
+ copy_particle_key(state, &pa->prev_state, 1);
+ else {
+ /* let's interpolate to try to be as accurate as possible */
+ if(pa->state.time + 1.0f > state->time && pa->prev_state.time - 1.0f < state->time) {
+ ParticleKey keys[4];
+ float dfra, keytime, frs_sec = scene->r.frs_sec;
- if(pa->prev_state.time >= pa->state.time) {
- /* prev_state is wrong so let's not use it, this can happen at frame 1 or particle birth */
- copy_particle_key(state, &pa->state, 1);
+ if(pa->prev_state.time >= pa->state.time) {
+ /* prev_state is wrong so let's not use it, this can happen at frame 1 or particle birth */
+ copy_particle_key(state, &pa->state, 1);
- VECADDFAC(state->co, state->co, state->vel, (state->time-pa->state.time)/frs_sec);
- }
- else {
- copy_particle_key(keys+1, &pa->prev_state, 1);
- copy_particle_key(keys+2, &pa->state, 1);
+ VECADDFAC(state->co, state->co, state->vel, (state->time-pa->state.time)/frs_sec);
+ }
+ else {
+ copy_particle_key(keys+1, &pa->prev_state, 1);
+ copy_particle_key(keys+2, &pa->state, 1);
- dfra = keys[2].time - keys[1].time;
+ dfra = keys[2].time - keys[1].time;
- keytime = (state->time - keys[1].time) / dfra;
+ keytime = (state->time - keys[1].time) / dfra;
- /* convert velocity to timestep size */
- VecMulf(keys[1].vel, dfra / frs_sec);
- VecMulf(keys[2].vel, dfra / frs_sec);
-
- interpolate_particle(-1, keys, keytime, state, 1);
-
- /* convert back to real velocity */
- VecMulf(state->vel, frs_sec / dfra);
+ /* convert velocity to timestep size */
+ VecMulf(keys[1].vel, dfra / frs_sec);
+ VecMulf(keys[2].vel, dfra / frs_sec);
+
+ psys_interpolate_particle(-1, keys, keytime, state, 1);
+
+ /* convert back to real velocity */
+ VecMulf(state->vel, frs_sec / dfra);
- VecLerpf(state->ave, keys[1].ave, keys[2].ave, keytime);
- QuatInterpol(state->rot, keys[1].rot, keys[2].rot, keytime);
- }
- }
- else {
- /* extrapolating over big ranges is not accurate so let's just give something close to reasonable back */
- copy_particle_key(state, &pa->state, 0);
+ VecLerpf(state->ave, keys[1].ave, keys[2].ave, keytime);
+ QuatInterpol(state->rot, keys[1].rot, keys[2].rot, keytime);
}
}
-
- if(pa->alive==PARS_DEAD && part->flag&PART_STICKY && pa->flag&PARS_STICKY && pa->stick_ob){
- key_from_object(pa->stick_ob,state);
+ else {
+ /* extrapolating over big ranges is not accurate so let's just give something close to reasonable back */
+ copy_particle_key(state, &pa->state, 0);
}
+ }
- if(psys->lattice)
- calc_latt_deform(psys->lattice, state->co,1.0f);
+ 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);
}
return 1;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index c365f449801..9004f4b9973 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include <stdlib.h>
#include <math.h>
#include <string.h>
@@ -104,14 +106,12 @@ static int get_current_display_percentage(ParticleSystem *psys)
{
ParticleSettings *part=psys->part;
- if(psys->renderdata || (part->child_nbr && part->childtype))
+ if(psys->renderdata || (part->child_nbr && part->childtype)
+ || (psys->pointcache->flag & PTCACHE_BAKING))
return 100;
if(part->phystype==PART_PHYS_KEYED){
- if(psys->flag & PSYS_FIRST_KEYED)
- return psys->part->disp;
- else
- return 100;
+ return psys->part->disp;
}
else
return psys->part->disp;
@@ -196,7 +196,7 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
if(psys->particles->keys)
MEM_freeN(psys->particles->keys);
- for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++)
+ for(i=0, pa=newpars; i<totsaved; i++, pa++)
if(pa->keys) {
pa->keys= NULL;
pa->totkey= 0;
@@ -277,7 +277,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
origindex= DM_get_vert_data_layer(dm, CD_ORIGINDEX);
}
else { /* FROM_FACE/FROM_VOLUME */
- totdmelem= dm->getNumTessFaces(dm);
+ totdmelem= dm->getNumFaces(dm);
totelem= me->totface;
origindex= DM_get_face_data_layer(dm, CD_ORIGINDEX);
}
@@ -409,7 +409,7 @@ static void distribute_particles_in_grid(DerivedMesh *dm, ParticleSystem *psys)
int a, a1, a2, a0mul, a1mul, a2mul, totface;
int amax= from==PART_FROM_FACE ? 3 : 1;
- totface=dm->getNumTessFaces(dm);
+ totface=dm->getNumFaces(dm);
mface=dm->getTessFaceDataArray(dm,CD_MFACE);
for(a=0; a<amax; a++){
@@ -660,7 +660,7 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
if(from==PART_FROM_VOLUME){
MVert *mvert=dm->getVertDataArray(dm,CD_MVERT);
- tot=dm->getNumTessFaces(dm);
+ tot=dm->getNumFaces(dm);
psys_interpolate_face(mvert,mface,0,0,pa->fuv,co1,nor,0,0,0,0);
@@ -1105,7 +1105,7 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
break;
case PART_FROM_VOLUME:
case PART_FROM_FACE:
- tot = dm->getNumTessFaces(dm);
+ tot = dm->getNumFaces(dm);
break;
case PART_FROM_PARTICLE:
if(psys->target_ob)
@@ -1300,9 +1300,23 @@ int psys_threads_init_distribution(ParticleThread *threads, Scene *scene, Derive
/* for hair, sort by origindex, allows optimizations in rendering */
/* however with virtual parents the children need to be in random order */
if(part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents!=0.0)) {
- COMPARE_ORIG_INDEX= dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
- if(COMPARE_ORIG_INDEX)
- qsort(index, totpart, sizeof(int), compare_orig_index);
+ if(from != PART_FROM_PARTICLE) {
+ COMPARE_ORIG_INDEX = NULL;
+
+ if(from == PART_FROM_VERT) {
+ if(dm->numVertData)
+ COMPARE_ORIG_INDEX= dm->getVertDataArray(dm, CD_ORIGINDEX);
+ }
+ else {
+ if(dm->numFaceData)
+ COMPARE_ORIG_INDEX= dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
+ }
+
+ if(COMPARE_ORIG_INDEX) {
+ qsort(index, totpart, sizeof(int), compare_orig_index);
+ COMPARE_ORIG_INDEX = NULL;
+ }
+ }
}
/* weights are no longer used except for FROM_PARTICLE, which needs them zeroed for indexing */
@@ -1747,7 +1761,10 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
where_is_object_time(scene, ob,pa->time);
/* get birth location from object */
- psys_particle_on_emitter(psmd,part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,utan,vtan,0,0);
+ if(part->tanfac!=0.0)
+ psys_particle_on_emitter(psmd,part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,utan,vtan,0,0);
+ else
+ psys_particle_on_emitter(psmd,part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,0,0,0,0);
/* save local coordinates for later */
VECCOPY(tloc,loc);
@@ -1956,64 +1973,59 @@ static void reset_all_particles(Scene *scene, Object *ob, ParticleSystem *psys,
/************************************************/
/* Keyed particles */
/************************************************/
-/* a bit of an unintuitive function :) counts objects in a keyed chain and returns 1 if some of them were selected (used in drawing) */
-int psys_count_keyed_targets(Object *ob, ParticleSystem *psys)
+/* Counts valid keyed targets */
+void psys_count_keyed_targets(Object *ob, ParticleSystem *psys)
{
- ParticleSystem *kpsys=psys,*tpsys;
- ParticleSettings *tpart;
- Object *kob=ob,*tob;
- int select=ob->flag&SELECT;
- short totkeyed=0;
- Base *base;
-
- ListBase lb;
- lb.first=lb.last=0;
-
- tob=psys->keyed_ob;
- while(tob){
- if((tpsys=BLI_findlink(&tob->particlesystem,kpsys->keyed_psys-1))){
- tpart=tpsys->part;
-
- if(tpart->phystype==PART_PHYS_KEYED){
- if(lb.first){
- for(base=lb.first;base;base=base->next){
- if(tob==base->object){
- fprintf(stderr,"Error: loop in keyed chain!\n");
- BLI_freelistN(&lb);
- return select;
- }
- }
- }
- base=MEM_callocN(sizeof(Base), "keyed base");
- base->object=tob;
- BLI_addtail(&lb,base);
-
- if(tob->flag&SELECT)
- select++;
- kob=tob;
- kpsys=tpsys;
- tob=tpsys->keyed_ob;
- totkeyed++;
+ ParticleSystem *kpsys;
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+ int psys_num = BLI_findindex(&ob->particlesystem, psys);
+ int keys_valid = 1;
+ psys->totkeyed = 0;
+
+ for(; kpt; kpt=kpt->next) {
+ kpsys = NULL;
+ if(kpt->ob==ob || kpt->ob==NULL) {
+ if(kpt->psys >= psys_num)
+ kpsys = BLI_findlink(&ob->particlesystem, kpt->psys-1);
+
+ if(kpsys && kpsys->totpart) {
+ kpt->flag |= KEYED_TARGET_VALID;
+ psys->totkeyed += keys_valid;
+ if(psys->flag & PSYS_KEYED_TIMING && kpt->duration != 0.0f)
+ psys->totkeyed += 1;
}
- else{
- tob=0;
- totkeyed++;
+ else {
+ kpt->flag &= ~KEYED_TARGET_VALID;
+ keys_valid = 0;
+ }
+ }
+ else {
+ if(kpt->ob)
+ kpsys = BLI_findlink(&kpt->ob->particlesystem, kpt->psys-1);
+
+ if(kpsys && kpsys->totpart) {
+ kpt->flag |= KEYED_TARGET_VALID;
+ psys->totkeyed += keys_valid;
+ if(psys->flag & PSYS_KEYED_TIMING && kpt->duration != 0.0f)
+ psys->totkeyed += 1;
+ }
+ else {
+ kpt->flag &= ~KEYED_TARGET_VALID;
+ keys_valid = 0;
}
}
- else
- tob=0;
}
- psys->totkeyed=totkeyed;
- BLI_freelistN(&lb);
- return select;
+
+ psys->totkeyed *= psys->flag & PSYS_KEYED_TIMING ? 1 : psys->part->keyed_loops;
}
static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
{
Object *kob = ob;
ParticleSystem *kpsys = psys;
+ KeyedParticleTarget *kpt;
ParticleData *pa;
- int totpart = psys->totpart, i, k, totkeys = psys->totkeyed + 1;
+ int totpart = psys->totpart, i, k, totkeys = psys->totkeyed;
float prevtime, nexttime, keyedtime;
/* no proper targets so let's clear and bail out */
@@ -2026,7 +2038,7 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
if(totpart && psys->particles->totkey != totkeys) {
free_keyed_keys(psys);
- psys->particles->keys = MEM_callocN(psys->totpart*totkeys*sizeof(ParticleKey), "Keyed keys");
+ psys->particles->keys = MEM_callocN(totpart*totkeys*sizeof(ParticleKey), "Keyed keys");
psys->particles->totkey = totkeys;
for(i=1, pa=psys->particles+1; i<totpart; i++,pa++){
@@ -2037,32 +2049,36 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
psys->flag &= ~PSYS_KEYED;
+
+ kpt = psys->keyed_targets.first;
for(k=0; k<totkeys; k++) {
+ if(kpt->ob)
+ kpsys = BLI_findlink(&kpt->ob->particlesystem, kpt->psys - 1);
+ else
+ kpsys = BLI_findlink(&ob->particlesystem, kpt->psys - 1);
+
for(i=0,pa=psys->particles; i<totpart; i++, pa++) {
(pa->keys + k)->time = -1.0; /* use current time */
- if(kpsys->totpart > 0)
- psys_get_particle_state(scene, kob, kpsys, i%kpsys->totpart, pa->keys + k, 1);
+ psys_get_particle_state(scene, kpt->ob, kpsys, i%kpsys->totpart, pa->keys + k, 1);
- if(k==0)
- pa->keys->time = pa->time;
- else if(k==totkeys-1)
- (pa->keys + k)->time = pa->time + pa->lifetime;
- else{
- if(psys->flag & PSYS_KEYED_TIME){
- prevtime = (pa->keys + k - 1)->time;
- nexttime = pa->time + pa->lifetime;
- keyedtime = kpsys->part->keyed_time;
- (pa->keys + k)->time = (1.0f - keyedtime) * prevtime + keyedtime * nexttime;
+ if(psys->flag & PSYS_KEYED_TIMING){
+ (pa->keys+k)->time = pa->time + kpt->time;
+ if(kpt->duration != 0.0f && k+1 < totkeys) {
+ copy_particle_key(pa->keys+k+1, pa->keys+k, 1);
+ (pa->keys+k+1)->time = pa->time + kpt->time + kpt->duration;
}
- else
- (pa->keys+k)->time = pa->time + (float)k / (float)(totkeys - 1) * pa->lifetime;
}
+ else if(totkeys > 1)
+ (pa->keys+k)->time = pa->time + (float)k / (float)(totkeys - 1) * pa->lifetime;
+ else
+ pa->keys->time = pa->time;
}
- if(kpsys->keyed_ob){
- kob = kpsys->keyed_ob;
- kpsys = BLI_findlink(&kob->particlesystem, kpsys->keyed_psys - 1);
- }
+
+ if(psys->flag & PSYS_KEYED_TIMING && kpt->duration!=0.0f)
+ k++;
+
+ kpt = (kpt->next && kpt->next->flag & KEYED_TARGET_VALID) ? kpt = kpt->next : psys->keyed_targets.first;
}
psys->flag |= PSYS_KEYED;
@@ -2178,57 +2194,147 @@ void psys_get_reactor_target(Object *ob, ParticleSystem *psys, Object **target_o
/************************************************/
/* Point Cache */
/************************************************/
-
-static void write_particles_to_cache(Object *ob, ParticleSystem *psys, int cfra)
+void psys_make_temp_pointcache(Object *ob, ParticleSystem *psys)
{
+ PointCache *cache = psys->pointcache;
+ PTCacheFile *pf = NULL;
+ PTCacheMem *pm = NULL;
PTCacheID pid;
- PTCacheFile *pf;
- ParticleData *pa;
- int i, totpart= psys->totpart;
+ int cfra, sfra = cache->startframe, efra = cache->endframe;
+ int totelem = psys->totpart;
+ int float_count = sizeof(ParticleKey) / sizeof(float);
+ int tot = totelem * float_count;
- if(totpart == 0)
+ if((cache->flag & PTCACHE_DISK_CACHE)==0 || cache->mem_cache.first)
return;
BKE_ptcache_id_from_particles(&pid, ob, psys);
- pf= BKE_ptcache_file_open(&pid, PTCACHE_FILE_WRITE, cfra);
- if(!pf)
+
+ for(cfra=sfra; cfra <= efra; cfra++) {
+ pf = BKE_ptcache_file_open(&pid, PTCACHE_FILE_READ, cfra);
+
+ if(pf) {
+ pm = MEM_callocN(sizeof(PTCacheMem), "Pointcache temp mem");
+ pm->data = MEM_callocN(sizeof(float)*tot, "Pointcache temp mem data");
+
+ if(fread(pm->data, sizeof(float), tot, pf->fp)!= tot) {
+ printf("Error reading from disk cache\n");
+
+ MEM_freeN(pm->data);
+ MEM_freeN(pm);
+ BKE_ptcache_file_close(pf);
+ return;
+ }
+
+ pm->frame = cfra;
+ pm->totpoint = totelem;
+
+ BLI_addtail(&cache->mem_cache, pm);
+
+ BKE_ptcache_file_close(pf);
+ }
+ }
+}
+void psys_clear_temp_pointcache(ParticleSystem *psys)
+{
+ PTCacheMem *pm = psys->pointcache->mem_cache.first;
+
+ if((psys->pointcache->flag & PTCACHE_DISK_CACHE)==0)
return;
- /* assuming struct consists of tightly packed floats */
- for(i=0, pa=psys->particles; i<totpart; i++, pa++)
- BKE_ptcache_file_write_floats(pf, (float*)&pa->state, sizeof(ParticleKey)/sizeof(float));
+ for(; pm; pm=pm->next) {
+ MEM_freeN(pm->data);
+ }
+
+ BLI_freelistN(&psys->pointcache->mem_cache);
+}
+void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra, int *efra)
+{
+ ParticleSettings *part = psys->part;
+
+ *sfra = MAX2(1, (int)part->sta);
+ *efra = MIN2((int)(part->end + part->lifetime + 1.0), scene->r.efra);
+}
+static void particle_write_state(int index, void *psys_ptr, float *data)
+{
+ ParticleSystem *psys= psys_ptr;
- BKE_ptcache_file_close(pf);
+ memcpy(data, (float *)(&(psys->particles+index)->state), sizeof(ParticleKey));
}
+static void particle_read_state(int index, void *psys_ptr, float *data)
+{
+ ParticleSystem *psys= psys_ptr;
+ ParticleData *pa = psys->particles + index;
+ ParticleKey *key = (ParticleKey *)data;
+
+ if(key->time > pa->state.time)
+ copy_particle_key(&pa->prev_state, &pa->state, 1);
-static int get_particles_from_cache(Object *ob, ParticleSystem *psys, int cfra)
+ copy_particle_key(&pa->state, key, 1);
+}
+static void particle_cache_interpolate(int index, void *psys_ptr, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2)
{
- PTCacheID pid;
- PTCacheFile *pf;
- ParticleData *pa;
- int i, totpart= psys->totpart;
+ ParticleSystem *psys= psys_ptr;
+ ParticleData *pa = psys->particles + index;
+ ParticleKey keys[4];
+ float dfra;
- if(totpart == 0)
- return 0;
+ cfra = MIN2(cfra, pa->dietime);
+ cfra1 = MIN2(cfra1, pa->dietime);
+ cfra2 = MIN2(cfra2, pa->dietime);
- BKE_ptcache_id_from_particles(&pid, ob, psys);
- pf= BKE_ptcache_file_open(&pid, PTCACHE_FILE_READ, cfra);
- if(!pf)
- return 0;
+ keys[1] = *((ParticleKey*)data1);
+ keys[2] = *((ParticleKey*)data2);
- /* assuming struct consists of tightly packed floats */
- for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
- if(cfra!=pa->state.time)
- copy_particle_key(&pa->prev_state,&pa->state,1);
- if(!BKE_ptcache_file_read_floats(pf, (float*)&pa->state, sizeof(ParticleKey)/sizeof(float))) {
- BKE_ptcache_file_close(pf);
- return 0;
- }
+ if(cfra1 == cfra2) {
+ copy_particle_key(&pa->state, &keys[1], 1);
+ return;
}
- BKE_ptcache_file_close(pf);
+ dfra = cfra2 - cfra1;
- return 1;
+ VecMulf(keys[1].vel, dfra / frs_sec);
+ VecMulf(keys[2].vel, dfra / frs_sec);
+
+ psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, &pa->state, 1);
+
+ VecMulf(pa->state.vel, frs_sec / dfra);
+
+ pa->state.time = cfra;
+}
+static void write_particles_to_cache(Object *ob, ParticleSystem *psys, int cfra)
+{
+ PTCacheWriter writer;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+
+ writer.calldata = psys;
+ writer.cfra = cfra;
+ writer.set_elem = particle_write_state;
+ writer.pid = &pid;
+ writer.totelem = psys->totpart;
+
+ BKE_ptcache_write_cache(&writer);
+}
+
+static int get_particles_from_cache(Scene *scene, Object *ob, ParticleSystem *psys, float cfra, int *old_frame)
+{
+ PTCacheReader reader;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+
+ reader.calldata = psys;
+ reader.cfra = cfra;
+ reader.interpolate_elem = particle_cache_interpolate;
+ reader.old_frame = old_frame;
+ reader.pid = &pid;
+ reader.scene = scene;
+ reader.set_elem = particle_read_state;
+ reader.totelem = psys->totpart;
+
+ return BKE_ptcache_read_cache(&reader);
}
/************************************************/
@@ -2355,6 +2461,8 @@ static void add_to_effectors(ListBase *lb, Scene *scene, Object *ob, Object *obs
Object *tob;
for(i=0; epsys; epsys=epsys->next,i++){
+ if(!psys_check_enabled(ob, epsys))
+ continue;
type=0;
if(epsys!=psys || (psys->part->flag & PART_SELF_EFFECT)){
epart=epsys->part;
@@ -2922,7 +3030,7 @@ int psys_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm, float *vert_cos
VECCOPY(p_max,pa_minmax+3);
}
- totface=dm->getNumTessFaces(dm);
+ totface=dm->getNumFaces(dm);
mface=dm->getTessFaceDataArray(dm,CD_MFACE);
mvert=dm->getVertDataArray(dm,CD_MVERT);
@@ -3854,61 +3962,6 @@ static void boid_body(Scene *scene, BoidVecFunc *bvf, ParticleData *pa, Particle
if(part->flag & PART_BOIDS_2D){
pa->state.vel[2]=0.0;
pa->state.co[2]=part->groundz;
-
- if(psys->keyed_ob && (psys->keyed_ob->type == OB_MESH)){
- Object *zob=psys->keyed_ob;
- int min_face;
- float co1[3],co2[3],min_d=2.0,min_w[4],imat[4][4];
- VECCOPY(co1,pa->state.co);
- VECCOPY(co2,pa->state.co);
-
- co1[2]=1000.0f;
- co2[2]=-1000.0f;
-
- Mat4Invert(imat,zob->obmat);
- Mat4MulVecfl(imat,co1);
- Mat4MulVecfl(imat,co2);
-
- if(psys_intersect_dm(scene,zob,0,0,co1,co2,&min_d,&min_face,min_w,0,0,0,0)){
- DerivedMesh *dm;
- MFace *mface;
- MVert *mvert;
- float loc[3],nor[3],q1[4];
-
- psys_disable_all(zob);
- dm=mesh_get_derived_final(scene, zob, 0);
- psys_enable_all(zob);
-
- mface=dm->getTessFaceDataArray(dm,CD_MFACE);
- mface+=min_face;
- mvert=dm->getVertDataArray(dm,CD_MVERT);
-
- /* get deflection point & normal */
- psys_interpolate_face(mvert,mface,0,0,min_w,loc,nor,0,0,0,0);
-
- Mat4MulVecfl(zob->obmat,loc);
- Mat4Mul3Vecfl(zob->obmat,nor);
-
- Normalize(nor);
-
- VECCOPY(pa->state.co,loc);
-
- zvec[2]=1.0;
-
- Crossf(loc,zvec,nor);
-
- bank=VecLength(loc);
- if(bank>0.0){
- bank=saasin(bank);
-
- VecRotToQuat(loc,bank,q);
-
- QUATCOPY(q1,pa->state.rot);
-
- QuatMul(pa->state.rot,q,q1);
- }
- }
- }
}
length=bvf->Length(pa->state.vel);
@@ -4068,7 +4121,7 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
/* main loop: calculate physics for all particles */
for(p=0, pa=psys->particles; p<totpart; p++,pa++){
- if(pa->flag & PARS_UNEXIST) continue;
+ if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
copy_particle_key(&pa->prev_state,&pa->state,1);
@@ -4093,25 +4146,26 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
if(pa->alive==PARS_UNBORN
|| pa->alive==PARS_KILLED
|| ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED)
- || birthtime >= cfra){
+ || birthtime >= psys->cfra){
reset_particle(scene, pa,psys,psmd,ob,dtime,cfra,vg_vel,vg_tan,vg_rot);
}
pa_dfra = dfra;
pa_dtime = dtime;
- if(birthtime <= cfra && birthtime >= psys->cfra){
+
+ if(dietime <= cfra && psys->cfra < dietime){
+ /* particle dies some time between this and last step */
+ pa_dfra = dietime - ((birthtime > psys->cfra) ? birthtime : psys->cfra);
+ pa_dtime = pa_dfra * timestep;
+ pa->alive = PARS_DYING;
+ }
+ else if(birthtime <= cfra && birthtime >= psys->cfra){
/* particle is born some time between this and last step*/
pa->alive = PARS_ALIVE;
pa_dfra = cfra - birthtime;
pa_dtime = pa_dfra*timestep;
}
- else if(dietime <= cfra && psys->cfra < dietime){
- /* particle dies some time between this and last step */
- pa_dfra = dietime - psys->cfra;
- pa_dtime = pa_dfra * timestep;
- pa->alive = PARS_DYING;
- }
else if(dietime < cfra){
/* nothing to be done when particle is dead */
}
@@ -4179,7 +4233,7 @@ static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModif
if((psys->part->childtype && psys->totchild != get_psys_tot_child(scene, psys)) || psys->recalc&PSYS_RECALC_RESET)
alloc=1;
- if(alloc || psys->recalc&PSYS_RECALC_RESET || (psys->vgroup[PSYS_VG_DENSITY] && (G.f & G_WEIGHTPAINT)))
+ if(alloc || psys->recalc&PSYS_RECALC_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (G.f & G_WEIGHTPAINT)))
distr=1;
if(distr){
@@ -4197,7 +4251,7 @@ static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModif
}
}
- if((part->type==PART_HAIR || psys->flag&PSYS_KEYED) && ( psys_in_edit_mode(scene, psys) || (part->type==PART_HAIR
+ 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, 0);
@@ -4314,11 +4368,13 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
dietime = birthtime + (1 + pa->loop) * (pa->dietime - pa->time);
/* update alive status and push events */
- if(pa->time > cfra)
+ if(pa->time > cfra) {
pa->alive = PARS_UNBORN;
+ reset_particle(scene, pa, psys, psmd, ob, 0.0f, cfra, NULL, NULL, NULL);
+ }
else if(dietime <= cfra){
if(dietime > psys->cfra){
- state.time = pa->dietime;
+ state.time = dietime;
psys_get_particle_state(scene, ob,psys,p,&state,1);
push_reaction(ob,psys,p,PART_EVENT_DEATH,&state);
}
@@ -4349,16 +4405,21 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
distribute_particles(scene, ob, psys, PART_FROM_CHILD);
}
+ psys_update_path_cache(scene, ob,psmd,psys,cfra);
+
if(vg_size)
MEM_freeN(vg_size);
}
-void psys_changed_type(ParticleSystem *psys)
+static void psys_changed_type(Object *ob, ParticleSystem *psys)
{
ParticleSettings *part;
+ PTCacheID pid;
part= psys->part;
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+
/* system type has changed so set sensible defaults and clear non applicable flags */
if(part->from == PART_FROM_PARTICLE) {
if(part->type != PART_REACTOR)
@@ -4367,7 +4428,7 @@ void psys_changed_type(ParticleSystem *psys)
part->distr = PART_DISTR_JIT;
}
- if(psys->part->phystype != PART_PHYS_KEYED)
+ if(part->phystype != PART_PHYS_KEYED)
psys->flag &= ~PSYS_KEYED;
if(part->type == PART_HAIR) {
@@ -4376,15 +4437,35 @@ void psys_changed_type(ParticleSystem *psys)
if(ELEM3(part->draw_as, PART_DRAW_NOT, PART_DRAW_REND, PART_DRAW_PATH)==0)
part->draw_as = PART_DRAW_REND;
+
+ CLAMP(part->path_start, 0.0f, 100.0f);
+ CLAMP(part->path_end, 0.0f, 100.0f);
+
+ BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
}
- else
+ else {
free_hair(psys, 1);
+ CLAMP(part->path_start, part->sta, part->end + part->lifetime);
+ CLAMP(part->path_end, part->sta, part->end + part->lifetime);
+ }
+
psys->softflag= 0;
psys_reset(psys, PSYS_RESET_ALL);
}
-
+void psys_changed_physics(Object *ob, ParticleSystem *psys)
+{
+ if(ELEM(psys->part->phystype, PART_PHYS_NO, PART_PHYS_KEYED)) {
+ PTCacheID pid;
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+ BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
+ }
+ else {
+ free_keyed_keys(psys);
+ psys->flag &= ~PSYS_KEYED;
+ }
+}
static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys, int cfra)
{
if(psys->particles){
@@ -4503,7 +4584,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
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;
+ int framenr, framedelta, startframe, endframe, old_framenr;
part= psys->part;
cache= psys->pointcache;
@@ -4511,9 +4592,15 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
framenr= (int)scene->r.cfra;
framedelta= framenr - cache->simframe;
+ /* set suitable cache range automatically */
+ if((cache->flag & (PTCACHE_BAKING|PTCACHE_BAKED))==0)
+ psys_get_pointcache_start_end(scene, psys, &cache->startframe, &cache->endframe);
+
BKE_ptcache_id_from_particles(&pid, ob, psys);
BKE_ptcache_id_time(&pid, scene, 0.0f, &startframe, &endframe, NULL);
+ psys_clear_temp_pointcache(psys);
+
/* update ipo's */
#if 0 // XXX old animation system
if((part->flag & PART_ABS_TIME) && part->ipo) {
@@ -4568,9 +4655,8 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
totpart = psys->part->totpart;
totchild = get_psys_tot_child(scene, psys);
- if(oldtotpart != totpart || (psys->part->childtype && oldtotchild != totchild)) {
+ if(oldtotpart != totpart || oldtotchild != totchild) {
only_children_changed = (oldtotpart == totpart);
- realloc_particles(ob, psys, totpart);
alloc = 1;
distr= 1;
init= 1;
@@ -4583,10 +4669,15 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
if(init) {
if(distr) {
- if(alloc)
+ if(alloc) {
realloc_particles(ob, psys, totpart);
- distribute_particles(scene, ob, psys, part->from);
+ if(usecache && !only_children_changed)
+ BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, 0);
+ }
+
+ if(!only_children_changed)
+ distribute_particles(scene, ob, psys, part->from);
if((psys->part->type == PART_HAIR) && !(psys->flag & PSYS_HAIR_DONE))
/* don't generate children while growing hair - waste of time */
@@ -4595,13 +4686,15 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
distribute_particles(scene, ob, psys, PART_FROM_CHILD);
}
- if(only_children_changed==0) {
+ if(!only_children_changed) {
free_keyed_keys(psys);
initialize_all_particles(ob, psys, psmd);
+
- if(alloc)
+ if(alloc) {
reset_all_particles(scene, ob, psys, psmd, 0.0, cfra, oldtotpart);
+ }
}
/* flag for possible explode modifiers after this system */
@@ -4610,49 +4703,53 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
/* try to read from the cache */
if(usecache) {
- if(get_particles_from_cache(ob, psys, framenr)) {
- if(part->phystype==PART_PHYS_KEYED && psys->flag&PSYS_FIRST_KEYED) {
- psys_count_keyed_targets(ob,psys);
- set_keyed_keys(scene, ob, psys);
- }
+ int result = get_particles_from_cache(scene, ob, psys, (float)framenr, &old_framenr);
+ if(result == PTCACHE_READ_EXACT || result == PTCACHE_READ_INTERPOLATED) {
cached_step(scene, ob, psmd, psys, cfra);
psys->cfra=cfra;
psys->recalc = 0;
- if(part->phystype==PART_PHYS_KEYED && psys->flag&PSYS_FIRST_KEYED) {
- psys_update_path_cache(scene, ob, psmd, psys, framenr);
- }
-
cache->simframe= framenr;
cache->flag |= PTCACHE_SIMULATION_VALID;
+ if(result == PTCACHE_READ_INTERPOLATED && cache->flag & PTCACHE_REDO_NEEDED)
+ write_particles_to_cache(ob, psys, cfra);
+
return;
}
+ else if(result==PTCACHE_READ_OLD) {
+ /* set old cfra */
+ psys->cfra = (float)old_framenr;
+
+ for(p=0, pa=psys->particles; p<totpart; p++, pa++) {
+ /* update alive status */
+ if(pa->time > psys->cfra)
+ pa->alive = PARS_UNBORN;
+ else if(pa->dietime <= psys->cfra)
+ pa->alive = PARS_DEAD;
+ else
+ pa->alive = PARS_ALIVE;
+ }
+ }
else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {
psys_reset(psys, PSYS_RESET_CACHE_MISS);
psys->cfra=cfra;
psys->recalc = 0;
return;
}
-
- if(framenr != startframe && framedelta != 1) {
- psys_reset(psys, PSYS_RESET_CACHE_MISS);
- psys->cfra = cfra;
- psys->recalc = 0;
- return;
- }
}
else {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
}
/* if on second frame, write cache for first frame */
- if(usecache && framenr == startframe+1)
+ if(usecache && psys->cfra == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0))
write_particles_to_cache(ob, psys, startframe);
- if(part->phystype==PART_PHYS_KEYED && psys->flag&PSYS_FIRST_KEYED)
+ if(part->phystype==PART_PHYS_KEYED)
psys_count_keyed_targets(ob,psys);
/* initialize vertex groups */
@@ -4699,7 +4796,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
write_particles_to_cache(ob, psys, framenr);
/* for keyed particles the path is allways known so it can be drawn */
- if(part->phystype==PART_PHYS_KEYED && psys->flag&PSYS_FIRST_KEYED){
+ if(part->phystype==PART_PHYS_KEYED) {
set_keyed_keys(scene, ob, psys);
psys_update_path_cache(scene, ob, psmd, psys,(int)cfra);
}
@@ -4751,8 +4848,7 @@ static void psys_to_softbody(Scene *scene, Object *ob, ParticleSystem *psys)
static int hair_needs_recalc(ParticleSystem *psys)
{
if((psys->flag & PSYS_EDITED)==0 &&
- ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_REDO)) {
- psys->recalc &= ~PSYS_RECALC_REDO;
+ ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET)) {
return 1;
}
@@ -4783,7 +4879,9 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
return;
if(psys->recalc & PSYS_RECALC_TYPE)
- psys_changed_type(psys);
+ psys_changed_type(ob, psys);
+ else if(psys->recalc & PSYS_RECALC_PHYS)
+ psys_changed_physics(ob, psys);
/* (re-)create hair */
if(psys->part->type==PART_HAIR && hair_needs_recalc(psys)) {
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index b00755f7135..6107510fa47 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -51,9 +51,11 @@
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
+#include "BKE_scene.h"
#include "BKE_softbody.h"
#include "BKE_utildefines.h"
+#include "BLI_blenlib.h"
/* needed for directory lookup */
#ifndef WIN32
@@ -213,21 +215,29 @@ static int BKE_ptcache_id_filename(PTCacheID *pid, char *filename, int cfra, sho
filename[0] = '\0';
newname = filename;
- /*if (!G.relbase_valid) return 0; *//* save blend file before using pointcache */
+ if (!G.relbase_valid) return 0; /* save blend file before using disk pointcache */
/* start with temp dir */
if (do_path) {
len = ptcache_path(pid, filename);
newname += len;
}
- idname = (pid->ob->id.name+2);
- /* convert chars to hex so they are always a valid filename */
- while('\0' != *idname) {
- snprintf(newname, MAX_PTCACHE_FILE, "%02X", (char)(*idname++));
- newname+=2;
- len += 2;
+ if(strcmp(pid->cache->name, "")==0) {
+ idname = (pid->ob->id.name+2);
+ /* convert chars to hex so they are always a valid filename */
+ while('\0' != *idname) {
+ snprintf(newname, MAX_PTCACHE_FILE, "%02X", (char)(*idname++));
+ newname+=2;
+ len += 2;
+ }
}
-
+ else {
+ int temp = strlen(pid->cache->name);
+ strcpy(newname, pid->cache->name);
+ newname+=temp;
+ len += temp;
+ }
+
if (do_ext) {
snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02d"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
len += 16;
@@ -247,7 +257,7 @@ PTCacheFile *BKE_ptcache_file_open(PTCacheID *pid, int mode, int cfra)
if(pid->ob->id.lib && mode == PTCACHE_FILE_WRITE)
return NULL;
- /*if (!G.relbase_valid) return NULL; *//* save blend file before using pointcache */
+ if (!G.relbase_valid) return NULL; /* save blend file before using disk pointcache */
BKE_ptcache_id_filename(pid, filename, cfra, 1, 1);
@@ -286,6 +296,437 @@ int BKE_ptcache_file_write_floats(PTCacheFile *pf, float *f, int tot)
return (fwrite(f, sizeof(float), tot, pf->fp) == tot);
}
+static int ptcache_pid_elemsize(PTCacheID *pid)
+{
+ if(pid->type==PTCACHE_TYPE_SOFTBODY)
+ return 0; // TODO
+ else if(pid->type==PTCACHE_TYPE_PARTICLES)
+ return sizeof(ParticleKey);
+ else if(pid->type==PTCACHE_TYPE_CLOTH)
+ return 9 * sizeof(float);
+
+ return 0;
+}
+static int ptcache_pid_totelem(PTCacheID *pid)
+{
+ if(pid->type==PTCACHE_TYPE_SOFTBODY)
+ return 0; // TODO
+ else if(pid->type==PTCACHE_TYPE_PARTICLES) {
+ ParticleSystem *psys = pid->data;
+ return psys->totpart;
+ }
+ else if(pid->type==PTCACHE_TYPE_CLOTH) {
+ ClothModifierData *clmd = pid->data;
+ return clmd->clothObject->numverts;
+ }
+
+ return 0;
+}
+
+void BKE_ptcache_update_info(PTCacheID *pid)
+{
+ PointCache *cache = pid->cache;
+ int totframes = 0;
+ char mem_info[64];
+
+ if(cache->flag & PTCACHE_DISK_CACHE) {
+ int cfra = cache->startframe;
+
+ for(; cfra<=cache->endframe; cfra++) {
+ if(BKE_ptcache_id_exist(pid, cfra))
+ totframes++;
+ }
+
+ sprintf(mem_info, "%i frames on disk", totframes);
+ }
+ else {
+ PTCacheMem *pm = cache->mem_cache.first;
+ float framesize = 0.0f, bytes = 0.0f;
+ int mb;
+
+ if(pm)
+ framesize = (float)ptcache_pid_elemsize(pid) * (float)pm->totpoint;
+
+ for(; pm; pm=pm->next)
+ totframes++;
+
+ bytes = totframes * framesize;
+
+ mb = (bytes > 1024.0f * 1024.0f);
+
+ sprintf(mem_info, "%i frames in memory (%.1f %s)",
+ totframes,
+ bytes / (mb ? 1024.0f * 1024.0f : 1024.0f),
+ mb ? "Mb" : "kb");
+ }
+
+ if(cache->flag & PTCACHE_OUTDATED) {
+ sprintf(cache->info, "%s, cache is outdated!", mem_info);
+ }
+ else if(cache->flag & PTCACHE_FRAMES_SKIPPED) {
+ sprintf(cache->info, "%s, not exact since frame %i.", mem_info, cache->last_exact);
+ }
+ else
+ sprintf(cache->info, "%s.", mem_info);
+}
+/* reads cache from disk or memory */
+/* possible to get old or interpolated result */
+int BKE_ptcache_read_cache(PTCacheReader *reader)
+{
+ PTCacheID *pid = reader->pid;
+ PTCacheFile *pf=NULL, *pf2=NULL;
+ PTCacheMem *pm=NULL, *pm2=NULL;
+ int totelem = reader->totelem;
+ float cfra = reader->cfra;
+ int cfrai = (int)cfra;
+ int elemsize = ptcache_pid_elemsize(pid);
+ int i, incr = elemsize / sizeof(float);
+ float frs_sec = reader->scene->r.frs_sec;
+ int cfra1=0, cfra2;
+ int ret = 0;
+
+ if(totelem == 0)
+ return 0;
+
+
+ /* first check if we have the actual frame cached */
+ if(cfra == (float)cfrai) {
+ if(pid->cache->flag & PTCACHE_DISK_CACHE) {
+ pf= BKE_ptcache_file_open(pid, PTCACHE_FILE_READ, cfrai);
+ }
+ else {
+ pm = pid->cache->mem_cache.first;
+
+ for(; pm; pm=pm->next) {
+ if(pm->frame == cfrai)
+ break;
+ }
+ }
+ }
+
+ /* if found, use exact frame */
+ if(pf || pm) {
+ float *data;
+
+ if(pm)
+ data = pm->data;
+ else
+ data = MEM_callocN(elemsize, "pointcache read data");
+
+ for(i=0; i<totelem; i++) {
+ if(pf) {
+ if(!BKE_ptcache_file_read_floats(pf, data, incr)) {
+ BKE_ptcache_file_close(pf);
+ MEM_freeN(data);
+ return 0;
+ }
+
+ reader->set_elem(i, reader->calldata, data);
+ }
+ else {
+ reader->set_elem(i, reader->calldata, data);
+ data += incr;
+ }
+ }
+
+ if(pf) {
+ BKE_ptcache_file_close(pf);
+ pf = NULL;
+ MEM_freeN(data);
+ }
+
+ ret = PTCACHE_READ_EXACT;
+ }
+
+ if(ret)
+ ;
+ /* no exact cache frame found so try to find cached frames around cfra */
+ else if(pid->cache->flag & PTCACHE_DISK_CACHE) {
+ pf=NULL;
+ while(cfrai > pid->cache->startframe && !pf) {
+ cfrai--;
+ pf= BKE_ptcache_file_open(pid, PTCACHE_FILE_READ, cfrai);
+ cfra1 = cfrai;
+ }
+
+ if(reader->old_frame)
+ *(reader->old_frame) = cfrai;
+
+ cfrai = (int)cfra;
+ while(cfrai < pid->cache->endframe && !pf2) {
+ cfrai++;
+ pf2= BKE_ptcache_file_open(pid, PTCACHE_FILE_READ, cfrai);
+ cfra2 = cfrai;
+ }
+ }
+ else if(pid->cache->mem_cache.first){
+ pm = pid->cache->mem_cache.first;
+
+ while(pm->next && pm->next->frame < cfra)
+ pm= pm->next;
+
+ if(pm) {
+ if(reader->old_frame)
+ *(reader->old_frame) = pm->frame;
+ cfra1 = pm->frame;
+ }
+
+ pm2 = pid->cache->mem_cache.last;
+
+ if(pm2 && pm2->frame < cfra)
+ pm2 = NULL;
+ else {
+ while(pm2->prev && pm2->prev->frame > cfra)
+ pm2= pm2->prev;
+
+ if(pm2)
+ cfra2 = pm2->frame;
+ }
+ }
+
+ if(ret)
+ ;
+ else if((pf && pf2) || (pm && pm2)) {
+ /* interpolate from nearest frames if cache isn't outdated */
+ float *data1, *data2;
+
+ if(pm) {
+ data1 = pm->data;
+ data2 = pm2->data;
+ }
+ else {
+ data1 = MEM_callocN(elemsize, "pointcache read data1");
+ data2 = MEM_callocN(elemsize, "pointcache read data2");
+ }
+
+ for(i=0; i<totelem; i++) {
+ if(pf && pf2) {
+ if(!BKE_ptcache_file_read_floats(pf, data1, incr)) {
+ BKE_ptcache_file_close(pf);
+ BKE_ptcache_file_close(pf2);
+ MEM_freeN(data1);
+ MEM_freeN(data2);
+ return 0;
+ }
+ if(!BKE_ptcache_file_read_floats(pf2, data2, incr)) {
+ BKE_ptcache_file_close(pf);
+ BKE_ptcache_file_close(pf2);
+ MEM_freeN(data1);
+ MEM_freeN(data2);
+ return 0;
+ }
+ reader->interpolate_elem(i, reader->calldata, frs_sec, cfra, (float)cfra1, (float)cfra2, data1, data2);
+ }
+ else {
+ reader->interpolate_elem(i, reader->calldata, frs_sec, cfra, (float)cfra1, (float)cfra2, data1, data2);
+ data1 += incr;
+ data2 += incr;
+ }
+ }
+
+ if(pf) {
+ BKE_ptcache_file_close(pf);
+ pf = NULL;
+ BKE_ptcache_file_close(pf2);
+ pf2 = NULL;
+ MEM_freeN(data1);
+ MEM_freeN(data2);
+ }
+
+ ret = PTCACHE_READ_INTERPOLATED;
+ }
+ else if(pf || pm) {
+ /* use last valid cache frame */
+ float *data;
+
+ /* don't read cache if allready simulated past cached frame */
+ if(cfra1 && cfra1 <= pid->cache->simframe) {
+ if(pf)
+ BKE_ptcache_file_close(pf);
+ if(pf2)
+ BKE_ptcache_file_close(pf2);
+
+ return 0;
+ }
+
+ if(pm)
+ data = pm->data;
+ else
+ data = MEM_callocN(elemsize, "pointcache read data");
+
+ for(i=0; i<totelem; i++) {
+ if(pf) {
+ if(!BKE_ptcache_file_read_floats(pf, data, incr)) {
+ BKE_ptcache_file_close(pf);
+ if(pf2)
+ BKE_ptcache_file_close(pf2);
+ return 0;
+ }
+ reader->set_elem(i, reader->calldata, data);
+ }
+ else {
+ reader->set_elem(i, reader->calldata, data);
+ data += incr;
+ }
+ }
+
+ if(pf) {
+ BKE_ptcache_file_close(pf);
+ pf = NULL;
+ MEM_freeN(data);
+ }
+ if(pf2) {
+ BKE_ptcache_file_close(pf2);
+ pf = NULL;
+ }
+
+ ret = PTCACHE_READ_OLD;
+ }
+
+ if(pf)
+ BKE_ptcache_file_close(pf);
+ if(pf2)
+ BKE_ptcache_file_close(pf2);
+
+ if((pid->cache->flag & PTCACHE_QUICK_CACHE)==0) {
+ /* clear invalid cache frames so that better stuff can be simulated */
+ if(pid->cache->flag & PTCACHE_OUTDATED) {
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_AFTER, cfra);
+ }
+ else if(pid->cache->flag & PTCACHE_FRAMES_SKIPPED) {
+ if(cfra <= pid->cache->last_exact)
+ pid->cache->flag &= ~PTCACHE_FRAMES_SKIPPED;
+
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_AFTER, MAX2(cfra,pid->cache->last_exact));
+ }
+ }
+
+ return ret;
+}
+/* writes cache to disk or memory */
+int BKE_ptcache_write_cache(PTCacheWriter *writer)
+{
+ PointCache *cache = writer->pid->cache;
+ PTCacheFile *pf= NULL;
+ int elemsize = ptcache_pid_elemsize(writer->pid);
+ int i, incr = elemsize / sizeof(float);
+ int add = 0, overwrite = 0;
+ float temp[14];
+
+ if(writer->totelem == 0 || writer->cfra <= 0)
+ return 0;
+
+ if(cache->flag & PTCACHE_DISK_CACHE) {
+ int cfra = cache->endframe;
+
+ /* allways start from scratch on the first frame */
+ if(writer->cfra == cache->startframe) {
+ BKE_ptcache_id_clear(writer->pid, PTCACHE_CLEAR_ALL, writer->cfra);
+ cache->flag &= ~PTCACHE_REDO_NEEDED;
+ add = 1;
+ }
+ else {
+ int ocfra;
+ /* find last cached frame */
+ while(cfra > cache->startframe && !BKE_ptcache_id_exist(writer->pid, cfra))
+ cfra--;
+
+ /* find second last cached frame */
+ ocfra = cfra-1;
+ while(ocfra > cache->startframe && !BKE_ptcache_id_exist(writer->pid, ocfra))
+ ocfra--;
+
+ if(cfra >= cache->startframe && writer->cfra > cfra) {
+ if(ocfra >= cache->startframe && cfra - ocfra < cache->step)
+ overwrite = 1;
+ else
+ add = 1;
+ }
+ }
+
+ if(add || overwrite) {
+ if(overwrite)
+ BKE_ptcache_id_clear(writer->pid, PTCACHE_CLEAR_FRAME, cfra);
+
+ pf = BKE_ptcache_file_open(writer->pid, PTCACHE_FILE_WRITE, writer->cfra);
+ if(!pf)
+ return 0;
+
+ for(i=0; i<writer->totelem; i++) {
+ writer->set_elem(i, writer->calldata, temp);
+ BKE_ptcache_file_write_floats(pf, temp, incr);
+ }
+ }
+ }
+ else {
+ PTCacheMem *pm;
+ PTCacheMem *pm2;
+ float *pmdata;
+
+ pm2 = cache->mem_cache.first;
+
+ /* allways start from scratch on the first frame */
+ if(writer->cfra == cache->startframe) {
+ BKE_ptcache_id_clear(writer->pid, PTCACHE_CLEAR_ALL, writer->cfra);
+ cache->flag &= ~PTCACHE_REDO_NEEDED;
+ add = 1;
+ }
+ else {
+ pm2 = cache->mem_cache.last;
+
+ if(pm2 && writer->cfra > pm2->frame) {
+ if(pm2->prev && pm2->frame - pm2->prev->frame < cache->step)
+ overwrite = 1;
+ else
+ add = 1;
+ }
+ }
+
+ if(overwrite) {
+ pm = cache->mem_cache.last;
+ pmdata = pm->data;
+
+ for(i=0; i<writer->totelem; i++, pmdata+=incr) {
+ writer->set_elem(i, writer->calldata, temp);
+ memcpy(pmdata, temp, elemsize);
+ }
+
+ pm->frame = writer->cfra;
+ }
+ else if(add) {
+ pm = MEM_callocN(sizeof(PTCacheMem), "Pointcache mem");
+ pm->data = MEM_callocN(elemsize * writer->totelem, "Pointcache mem data");
+ pmdata = pm->data;
+
+ for(i=0; i<writer->totelem; i++, pmdata+=incr) {
+ writer->set_elem(i, writer->calldata, temp);
+ memcpy(pmdata, temp, elemsize);
+ }
+
+ pm->frame = writer->cfra;
+ pm->totpoint = writer->totelem;
+
+ BLI_addtail(&cache->mem_cache, pm);
+ }
+ }
+
+ if(add || overwrite) {
+ if(writer->cfra - cache->last_exact == 1
+ || writer->cfra == cache->startframe) {
+ cache->last_exact = writer->cfra;
+ cache->flag &= ~PTCACHE_FRAMES_SKIPPED;
+ }
+ else
+ cache->flag |= PTCACHE_FRAMES_SKIPPED;
+ }
+
+ if(pf)
+ BKE_ptcache_file_close(pf);
+
+ BKE_ptcache_update_info(writer->pid);
+
+ return 1;
+}
/* youll need to close yourself after!
* mode - PTCACHE_CLEAR_ALL,
@@ -317,62 +758,116 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra)
case PTCACHE_CLEAR_ALL:
case PTCACHE_CLEAR_BEFORE:
case PTCACHE_CLEAR_AFTER:
- ptcache_path(pid, path);
-
- len = BKE_ptcache_id_filename(pid, filename, cfra, 0, 0); /* no path */
-
- dir = opendir(path);
- if (dir==NULL)
- return;
-
- snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, pid->stack_index);
-
- while ((de = readdir(dir)) != NULL) {
- if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
- if (strncmp(filename, de->d_name, len ) == 0) { /* do we have the right prefix */
- if (mode == PTCACHE_CLEAR_ALL) {
- BLI_join_dirfile(path_full, path, de->d_name);
- BLI_delete(path_full, 0, 0);
- } else {
- /* read the number of the file */
- int frame, len2 = strlen(de->d_name);
- char num[7];
-
- if (len2 > 15) { /* could crash if trying to copy a string out of this range*/
- BLI_strncpy(num, de->d_name + (strlen(de->d_name) - 15), sizeof(num));
- frame = atoi(num);
-
- if((mode==PTCACHE_CLEAR_BEFORE && frame < cfra) ||
- (mode==PTCACHE_CLEAR_AFTER && frame > cfra) ) {
+ if(pid->cache->flag & PTCACHE_DISK_CACHE) {
+ ptcache_path(pid, path);
+
+ len = BKE_ptcache_id_filename(pid, filename, cfra, 0, 0); /* no path */
+
+ dir = opendir(path);
+ if (dir==NULL)
+ return;
+
+ snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, pid->stack_index);
+
+ while ((de = readdir(dir)) != NULL) {
+ if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
+ if (strncmp(filename, de->d_name, len ) == 0) { /* do we have the right prefix */
+ if (mode == PTCACHE_CLEAR_ALL) {
+ pid->cache->last_exact = 0;
+ BLI_join_dirfile(path_full, path, de->d_name);
+ BLI_delete(path_full, 0, 0);
+ } else {
+ /* read the number of the file */
+ int frame, len2 = strlen(de->d_name);
+ char num[7];
+
+ if (len2 > 15) { /* could crash if trying to copy a string out of this range*/
+ BLI_strncpy(num, de->d_name + (strlen(de->d_name) - 15), sizeof(num));
+ frame = atoi(num);
- BLI_join_dirfile(path_full, path, de->d_name);
- BLI_delete(path_full, 0, 0);
+ if((mode==PTCACHE_CLEAR_BEFORE && frame < cfra) ||
+ (mode==PTCACHE_CLEAR_AFTER && frame > cfra) ) {
+
+ BLI_join_dirfile(path_full, path, de->d_name);
+ BLI_delete(path_full, 0, 0);
+ }
}
}
}
}
}
+ closedir(dir);
+ }
+ else {
+ PTCacheMem *pm= pid->cache->mem_cache.first;
+ PTCacheMem *link= NULL;
+
+ if(mode == PTCACHE_CLEAR_ALL) {
+ pid->cache->last_exact = 0;
+ for(; pm; pm=pm->next)
+ MEM_freeN(pm->data);
+ BLI_freelistN(&pid->cache->mem_cache);
+ } else {
+ while(pm) {
+ if((mode==PTCACHE_CLEAR_BEFORE && pm->frame < cfra) ||
+ (mode==PTCACHE_CLEAR_AFTER && pm->frame > cfra) ) {
+ link = pm;
+ pm = pm->next;
+ MEM_freeN(link->data);
+ BLI_freelinkN(&pid->cache->mem_cache, link);
+ }
+ else
+ pm = pm->next;
+ }
+ }
}
- closedir(dir);
break;
case PTCACHE_CLEAR_FRAME:
- len = BKE_ptcache_id_filename(pid, filename, cfra, 1, 1); /* no path */
- BLI_delete(filename, 0, 0);
+ if(pid->cache->flag & PTCACHE_DISK_CACHE) {
+ if(BKE_ptcache_id_exist(pid, cfra)) {
+ BKE_ptcache_id_filename(pid, filename, cfra, 1, 1); /* no path */
+ BLI_delete(filename, 0, 0);
+ }
+ }
+ else {
+ PTCacheMem *pm = pid->cache->mem_cache.first;
+
+ for(; pm; pm=pm->next) {
+ if(pm->frame == cfra) {
+ MEM_freeN(pm->data);
+ BLI_freelinkN(&pid->cache->mem_cache, pm);
+ break;
+ }
+ }
+ }
break;
}
+
+ BKE_ptcache_update_info(pid);
}
int BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
{
- char filename[MAX_PTCACHE_FILE];
-
if(!pid->cache)
return 0;
- BKE_ptcache_id_filename(pid, filename, cfra, 1, 1);
+ if(pid->cache->flag & PTCACHE_DISK_CACHE) {
+ char filename[MAX_PTCACHE_FILE];
+
+ BKE_ptcache_id_filename(pid, filename, cfra, 1, 1);
- return BLI_exists(filename);
+ return BLI_exists(filename);
+ }
+ else {
+ PTCacheMem *pm = pid->cache->mem_cache.first;
+
+ for(; pm; pm=pm->next) {
+ if(pm->frame==cfra)
+ return 1;
+ }
+ return 0;
+ }
}
void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
@@ -381,6 +876,9 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
PointCache *cache;
float offset, time, nexttime;
+ /* TODO: this has to be sorter out once bsystem_time gets redone, */
+ /* now caches can handle interpolating etc. too - jahka */
+
/* time handling for point cache:
* - simulation time is scaled by result of bsystem_time
* - for offsetting time only time offset is taken into account, since
@@ -414,10 +912,10 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
}
}
-int BKE_ptcache_id_reset(PTCacheID *pid, int mode)
+int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode)
{
PointCache *cache;
- int reset, clear;
+ int reset, clear, after;
if(!pid->cache)
return 0;
@@ -425,14 +923,17 @@ int BKE_ptcache_id_reset(PTCacheID *pid, int mode)
cache= pid->cache;
reset= 0;
clear= 0;
+ after= 0;
if(mode == PTCACHE_RESET_DEPSGRAPH) {
if(!(cache->flag & PTCACHE_BAKED) && !BKE_ptcache_get_continue_physics()) {
- reset= 1;
- clear= 1;
+ if(cache->flag & PTCACHE_QUICK_CACHE)
+ clear= 1;
+
+ after= 1;
}
- else
- cache->flag |= PTCACHE_OUTDATED;
+
+ cache->flag |= PTCACHE_OUTDATED;
}
else if(mode == PTCACHE_RESET_BAKED) {
if(!BKE_ptcache_get_continue_physics()) {
@@ -451,8 +952,9 @@ int BKE_ptcache_id_reset(PTCacheID *pid, int mode)
}
if(reset) {
- cache->flag &= ~(PTCACHE_OUTDATED|PTCACHE_SIMULATION_VALID);
+ cache->flag &= ~(PTCACHE_REDO_NEEDED|PTCACHE_SIMULATION_VALID);
cache->simframe= 0;
+ cache->last_exact= 0;
if(pid->type == PTCACHE_TYPE_CLOTH)
cloth_free_modifier(pid->ob, pid->data);
@@ -463,11 +965,13 @@ int BKE_ptcache_id_reset(PTCacheID *pid, int mode)
}
if(clear)
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+ else if(after)
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_AFTER, CFRA);
- return (reset || clear);
+ return (reset || clear || after);
}
-int BKE_ptcache_object_reset(Object *ob, int mode)
+int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
{
PTCacheID pid;
ParticleSystem *psys;
@@ -479,7 +983,7 @@ int BKE_ptcache_object_reset(Object *ob, int mode)
if(ob->soft) {
BKE_ptcache_id_from_softbody(&pid, ob, ob->soft);
- reset |= BKE_ptcache_id_reset(&pid, mode);
+ reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
for(psys=ob->particlesystem.first; psys; psys=psys->next) {
@@ -488,23 +992,23 @@ int BKE_ptcache_object_reset(Object *ob, int mode)
if(psys->soft) {
BKE_ptcache_id_from_softbody(&pid, ob, psys->soft);
if(mode == PSYS_RESET_ALL || !(psys->part->type == PART_HAIR && (pid.cache->flag & PTCACHE_BAKED)))
- reset |= BKE_ptcache_id_reset(&pid, mode);
+ reset |= BKE_ptcache_id_reset(scene, &pid, mode);
else
skip = 1;
}
- else if((psys->recalc & PSYS_RECALC_RESET)==0)
+ else if(psys->recalc & PSYS_RECALC_REDO || psys->recalc & PSYS_RECALC_CHILD)
skip = 1;
if(skip == 0) {
BKE_ptcache_id_from_particles(&pid, ob, psys);
- reset |= BKE_ptcache_id_reset(&pid, mode);
+ reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
}
for(md=ob->modifiers.first; md; md=md->next) {
if(md->type == eModifierType_Cloth) {
BKE_ptcache_id_from_cloth(&pid, ob, (ClothModifierData*)md);
- reset |= BKE_ptcache_id_reset(&pid, mode);
+ reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
}
@@ -564,7 +1068,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(ob, PTCACHE_RESET_OUTDATED))
+ if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED))
DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
@@ -584,12 +1088,21 @@ PointCache *BKE_ptcache_add()
cache= MEM_callocN(sizeof(PointCache), "PointCache");
cache->startframe= 1;
cache->endframe= 250;
+ cache->step= 10;
return cache;
}
void BKE_ptcache_free(PointCache *cache)
{
+ PTCacheMem *pm = cache->mem_cache.first;
+ if(pm) {
+ for(; pm; pm=pm->next)
+ MEM_freeN(pm->data);
+
+ BLI_freelistN(&cache->mem_cache);
+ }
+
MEM_freeN(cache);
}
@@ -599,9 +1112,300 @@ PointCache *BKE_ptcache_copy(PointCache *cache)
ncache= MEM_dupallocN(cache);
+ /* hmm, should these be copied over instead? */
+ ncache->mem_cache.first = NULL;
+ ncache->mem_cache.last = NULL;
+
ncache->flag= 0;
ncache->simframe= 0;
return ncache;
}
+
+
+/* Baking */
+static int count_quick_cache(Scene *scene, int *quick_step)
+{
+ Base *base = scene->base.first;
+ PTCacheID *pid;
+ ListBase pidlist;
+ int autocache_count= 0;
+
+ for(base = scene->base.first; base; base = base->next) {
+ if(base->object) {
+ BKE_ptcache_ids_from_object(&pidlist, base->object);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if((pid->cache->flag & PTCACHE_BAKED)
+ || (pid->cache->flag & PTCACHE_QUICK_CACHE)==0)
+ continue;
+
+ if(pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID)==0) {
+ if(!autocache_count)
+ *quick_step = pid->cache->step;
+ else
+ *quick_step = MIN2(*quick_step, pid->cache->step);
+
+ autocache_count++;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
+ }
+ }
+
+ return autocache_count;
+}
+void BKE_ptcache_quick_cache_all(Scene *scene)
+{
+ PTCacheBaker baker;
+
+ baker.bake=0;
+ baker.break_data=NULL;
+ baker.break_test=NULL;
+ baker.pid=NULL;
+ baker.progressbar=NULL;
+ baker.progresscontext=NULL;
+ baker.render=0;
+ baker.anim_init = 0;
+ baker.scene=scene;
+
+ if(count_quick_cache(scene, &baker.quick_step))
+ BKE_ptcache_make_cache(&baker);
+}
+
+/* if bake is not given run simulations to current frame */
+void BKE_ptcache_make_cache(PTCacheBaker* baker)
+{
+ Scene *scene = baker->scene;
+ Base *base;
+ ListBase pidlist;
+ PTCacheID *pid = baker->pid;
+ PointCache *cache;
+ float frameleno = scene->r.framelen;
+ int cfrao = CFRA;
+ int startframe = MAXFRAME;
+ int endframe = baker->anim_init ? scene->r.sfra : CFRA;
+ int bake = baker->bake;
+ int render = baker->render;
+ int step = baker->quick_step;
+
+ G.afbreek = 0;
+
+ /* set caches to baking mode and figure out start frame */
+ if(pid) {
+ /* cache/bake a single object */
+ cache = pid->cache;
+ if((cache->flag & PTCACHE_BAKED)==0) {
+ if(pid->type==PTCACHE_TYPE_PARTICLES)
+ psys_get_pointcache_start_end(scene, pid->data, &cache->startframe, &cache->endframe);
+
+ if(bake || cache->flag & PTCACHE_REDO_NEEDED)
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+
+ startframe = MAX2(cache->last_exact, cache->startframe);
+
+ if(bake) {
+ endframe = cache->endframe;
+ cache->flag |= PTCACHE_BAKING;
+ }
+ else {
+ endframe = MIN2(endframe, cache->endframe);
+ }
+
+ cache->flag &= ~PTCACHE_BAKED;
+ }
+ }
+ else for(base=scene->base.first; base; base= base->next) {
+ /* cache/bake everything in the scene */
+ BKE_ptcache_ids_from_object(&pidlist, base->object);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ cache = pid->cache;
+ if((cache->flag & PTCACHE_BAKED)==0) {
+ if(pid->type==PTCACHE_TYPE_PARTICLES) {
+ ParticleSystem *psys = (ParticleSystem*)pid->data;
+ /* skip hair & keyed particles */
+ if(psys->part->type == PART_HAIR || psys->part->phystype == PART_PHYS_KEYED)
+ continue;
+
+ psys_get_pointcache_start_end(scene, pid->data, &cache->startframe, &cache->endframe);
+ }
+
+ if((cache->flag & PTCACHE_REDO_NEEDED || (cache->flag & PTCACHE_SIMULATION_VALID)==0)
+ && ((cache->flag & PTCACHE_QUICK_CACHE)==0 || render || bake))
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+
+ startframe = MIN2(startframe, cache->startframe);
+
+ if(bake || render) {
+ cache->flag |= PTCACHE_BAKING;
+
+ if(bake)
+ endframe = MAX2(endframe, cache->endframe);
+ }
+
+ cache->flag &= ~PTCACHE_BAKED;
+
+ }
+ }
+ BLI_freelistN(&pidlist);
+ }
+
+ CFRA= startframe;
+ scene->r.framelen = 1.0;
+
+ for(; CFRA <= endframe; CFRA+=step) {
+ float prog;
+
+ if(bake)
+ prog = (int)(100.0 * (float)(CFRA - startframe)/(float)(endframe-startframe));
+ else
+ prog = CFRA;
+
+ /* NOTE: baking should not redraw whole ui as this slows things down */
+ if(baker->progressbar)
+ baker->progressbar(baker->progresscontext, prog);
+
+ scene_update_for_newframe(scene, scene->lay);
+
+ /* NOTE: breaking baking should leave calculated frames in cache, not clear it */
+ if(baker->break_test && baker->break_test(baker->break_data))
+ break;
+ }
+
+ /* clear baking flag */
+ if(pid) {
+ cache->flag &= ~(PTCACHE_BAKING|PTCACHE_REDO_NEEDED);
+ cache->flag |= PTCACHE_SIMULATION_VALID;
+ if(bake)
+ cache->flag |= PTCACHE_BAKED;
+ }
+ else for(base=scene->base.first; base; base= base->next) {
+ BKE_ptcache_ids_from_object(&pidlist, base->object);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ /* skip hair particles */
+ if(pid->type==PTCACHE_TYPE_PARTICLES && ((ParticleSystem*)pid->data)->part->type == PART_HAIR)
+ continue;
+
+ cache = pid->cache;
+
+ if(step > 1)
+ cache->flag &= ~(PTCACHE_BAKING|PTCACHE_OUTDATED);
+ else
+ cache->flag &= ~(PTCACHE_BAKING|PTCACHE_REDO_NEEDED);
+
+ cache->flag |= PTCACHE_SIMULATION_VALID;
+
+ if(bake)
+ cache->flag |= PTCACHE_BAKED;
+ }
+ BLI_freelistN(&pidlist);
+ }
+
+ scene->r.framelen = frameleno;
+ CFRA = cfrao;
+
+ if(bake) /* already on cfra unless baking */
+ scene_update_for_newframe(scene, scene->lay);
+
+ /* TODO: call redraw all windows somehow */
+}
+
+void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) {
+ PointCache *cache = pid->cache;
+ PTCacheFile *pf;
+ PTCacheMem *pm;
+ int totelem=0;
+ int float_count=0;
+ int tot;
+ int last_exact = cache->last_exact;
+
+ if (!G.relbase_valid){
+ cache->flag &= ~PTCACHE_DISK_CACHE;
+ printf("File must be saved before using disk cache!\n");
+ return;
+ }
+
+ totelem = ptcache_pid_totelem(pid);
+ float_count = ptcache_pid_elemsize(pid) / sizeof(float);
+
+ if(totelem==0 || float_count==0)
+ return;
+
+ tot = totelem*float_count;
+
+ /* MEM -> DISK */
+ if(cache->flag & PTCACHE_DISK_CACHE) {
+ pm = cache->mem_cache.first;
+
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+
+ for(; pm; pm=pm->next) {
+ pf = BKE_ptcache_file_open(pid, PTCACHE_FILE_WRITE, pm->frame);
+
+ if(pf) {
+ if(fwrite(pm->data, sizeof(float), tot, pf->fp) != tot) {
+ printf("Error writing to disk cache\n");
+
+ cache->flag &= ~PTCACHE_DISK_CACHE;
+
+ BKE_ptcache_file_close(pf);
+ return;
+ }
+ BKE_ptcache_file_close(pf);
+ }
+ else
+ printf("Error creating disk cache file\n");
+ }
+
+ cache->flag &= ~PTCACHE_DISK_CACHE;
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+ cache->flag |= PTCACHE_DISK_CACHE;
+ }
+ /* DISK -> MEM */
+ else {
+ int cfra;
+ int sfra = cache->startframe;
+ int efra = cache->endframe;
+
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+
+ for(cfra=sfra; cfra <= efra; cfra++) {
+ pf = BKE_ptcache_file_open(pid, PTCACHE_FILE_READ, cfra);
+
+ if(pf) {
+ pm = MEM_callocN(sizeof(PTCacheMem), "Pointcache mem");
+ pm->data = MEM_callocN(sizeof(float)*tot, "Pointcache mem data");
+
+ if(fread(pm->data, sizeof(float), tot, pf->fp)!= tot) {
+ printf("Error reading from disk cache\n");
+
+ cache->flag |= PTCACHE_DISK_CACHE;
+
+ MEM_freeN(pm->data);
+ MEM_freeN(pm);
+ BKE_ptcache_file_close(pf);
+ return;
+ }
+
+ pm->frame = cfra;
+ pm->totpoint = totelem;
+
+ BLI_addtail(&pid->cache->mem_cache, pm);
+
+ BKE_ptcache_file_close(pf);
+ }
+ }
+
+ cache->flag |= PTCACHE_DISK_CACHE;
+ BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
+ cache->flag &= ~PTCACHE_DISK_CACHE;
+ }
+
+ cache->last_exact = last_exact;
+
+ BKE_ptcache_update_info(pid);
+}
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index 116fd069948..8de8cf8d0f4 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -65,8 +65,8 @@ void BKE_reports_init(ReportList *reports, int flag)
memset(reports, 0, sizeof(ReportList));
- reports->storelevel= RPT_WARNING;
- reports->printlevel= RPT_WARNING;
+ reports->storelevel= RPT_INFO;
+ reports->printlevel= RPT_INFO;
reports->flag= flag;
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 156bdae9b00..598336886c2 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -142,8 +142,6 @@ void free_scene(Scene *sce)
BLI_freelistN(&sce->base);
seq_free_editing(sce->ed);
- if(sce->radio) MEM_freeN(sce->radio);
- sce->radio= 0;
#ifndef DISABLE_PYTHON
BPY_free_scriptlink(&sce->scriptlink);
@@ -205,21 +203,18 @@ Scene *add_scene(char *name)
sce= alloc_libblock(&G.main->scene, ID_SCE, name);
sce->lay= 1;
- sce->selectmode= SCE_SELECT_VERTEX;
- sce->editbutsize= 0.1;
- sce->autokey_mode= U.autokey_mode;
- sce->r.mode= R_GAMMA;
+ sce->r.mode= R_GAMMA|R_OSA|R_SHADOW|R_SSS|R_ENVMAP|R_RAYTRACE;
sce->r.cfra= 1;
sce->r.sfra= 1;
sce->r.efra= 250;
- sce->r.xsch= 320;
- sce->r.ysch= 256;
+ sce->r.xsch= 1920;
+ sce->r.ysch= 1080;
sce->r.xasp= 1;
sce->r.yasp= 1;
- sce->r.xparts= 4;
- sce->r.yparts= 4;
- sce->r.size= 100;
+ sce->r.xparts= 8;
+ sce->r.yparts= 8;
+ sce->r.size= 25;
sce->r.planes= 24;
sce->r.quality= 90;
sce->r.framapto= 100;
@@ -230,7 +225,7 @@ Scene *add_scene(char *name)
sce->r.ocres = 128;
sce->r.bake_mode= 1; /* prevent to include render stuff here */
- sce->r.bake_filter= 2;
+ sce->r.bake_filter= 8;
sce->r.bake_osa= 5;
sce->r.bake_flag= R_BAKE_CLEAR;
sce->r.bake_normal_space= R_BAKE_SPACE_TANGENT;
@@ -239,6 +234,9 @@ Scene *add_scene(char *name)
sce->r.yplay= 480;
sce->r.freqplay= 60;
sce->r.depth= 32;
+
+ sce->r.scemode= R_DOCOMP|R_DOSEQ|R_EXTENSION;
+ sce->r.stamp= R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_SCENE|R_STAMP_CAMERA;
sce->r.threads= 1;
@@ -277,6 +275,10 @@ Scene *add_scene(char *name)
sce->toolsettings->select_thresh= 0.01f;
sce->toolsettings->jointrilimit = 0.8f;
+ sce->toolsettings->selectmode= SCE_SELECT_VERTEX;
+ sce->toolsettings->normalsize= 0.1;
+ sce->toolsettings->autokey_mode= U.autokey_mode;
+
sce->toolsettings->skgen_resolution = 100;
sce->toolsettings->skgen_threshold_internal = 0.01f;
sce->toolsettings->skgen_threshold_external = 0.01f;
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index e25e4be90c8..4b6eddf60d0 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -78,6 +78,8 @@ static void spacetype_free(SpaceType *st)
}
BLI_freelistN(&st->regiontypes);
+ BLI_freelistN(&st->toolshelf);
+
}
void BKE_spacetypes_free(void)
diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c
index 3365af36f8c..3eeecd94a85 100644
--- a/source/blender/blenkernel/intern/sequence.c
+++ b/source/blender/blenkernel/intern/sequence.c
@@ -1,5 +1,5 @@
/**
-* $Id: sequence.c 17508 2008-11-20 00:34:24Z campbellbarton $
+* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -184,11 +184,11 @@ void seq_free_sequence(Editing *ed, Sequence *seq)
if(seq->anim) IMB_free_anim(seq->anim);
//XXX if(seq->hdaudio) sound_close_hdaudio(seq->hdaudio);
- /* XXX if (seq->type & SEQ_EFFECT) {
+ if (seq->type & SEQ_EFFECT) {
struct SeqEffectHandle sh = get_sequence_effect(seq);
sh.free(seq);
- }*/
+ }
if (ed->act_seq==seq)
ed->act_seq= NULL;
@@ -1288,7 +1288,7 @@ static void seq_proxy_build_frame(Scene *scene, Sequence * seq, int cfra, int re
depth = 32 is intentionally left in, otherwise ALPHA channels
won't work... */
- quality = 90;
+ quality = seq->strip->proxy->quality;
ibuf->ftype= JPG | quality;
BLI_make_existing_file(name);
@@ -1305,6 +1305,7 @@ static void seq_proxy_build_frame(Scene *scene, Sequence * seq, int cfra, int re
void seq_proxy_rebuild(Scene *scene, Sequence * seq)
{
int cfra;
+ float rsize = seq->strip->proxy->size;
waitcursor(1);
@@ -1322,6 +1323,8 @@ void seq_proxy_rebuild(Scene *scene, Sequence * seq)
tse->flag &= ~STRIPELEM_PREVIEW_DONE;
}
+
+
/* a _lot_ faster for movie files, if we read frames in
sequential order */
if (seq->flag & SEQ_REVERSE_FRAMES) {
@@ -1330,7 +1333,8 @@ void seq_proxy_rebuild(Scene *scene, Sequence * seq)
TStripElem * tse = give_tstripelem(seq, cfra);
if (!(tse->flag & STRIPELEM_PREVIEW_DONE)) {
- seq_proxy_build_frame(scene, seq, cfra, scene->r.size);
+//XXX set_timecursor(cfra);
+ seq_proxy_build_frame(scene, seq, cfra, rsize);
tse->flag |= STRIPELEM_PREVIEW_DONE;
}
if (blender_test_break()) {
@@ -1343,7 +1347,8 @@ void seq_proxy_rebuild(Scene *scene, Sequence * seq)
TStripElem * tse = give_tstripelem(seq, cfra);
if (!(tse->flag & STRIPELEM_PREVIEW_DONE)) {
- seq_proxy_build_frame(scene, seq, cfra, scene->r.size);
+//XXX set_timecursor(cfra);
+ seq_proxy_build_frame(scene, seq, cfra, rsize);
tse->flag |= STRIPELEM_PREVIEW_DONE;
}
if (blender_test_break()) {
@@ -1552,7 +1557,8 @@ static int input_have_to_preprocess(Scene *scene, Sequence * seq, TStripElem* se
mul = seq->mul;
- if(seq->blend_mode == SEQ_BLEND_REPLACE) {
+ if(seq->blend_mode == SEQ_BLEND_REPLACE &&
+ !(seq->type & SEQ_EFFECT)) {
#if 0 // XXX old animation system
if (seq->ipo && seq->ipo->curve.first) {
do_seq_ipo(scene, seq, cfra);
@@ -1897,10 +1903,14 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
input_preprocess(scene, seq, se, cfra);
}
} else if(seq->type & SEQ_EFFECT) {
+ int use_preprocess = FALSE;
/* should the effect be recalculated? */
if (!build_proxy_run && se->ibuf == 0) {
se->ibuf = seq_proxy_fetch(scene, seq, cfra, render_size);
+ if (se->ibuf) {
+ use_preprocess = TRUE;
+ }
}
if(se->ibuf == 0) {
@@ -1913,6 +1923,22 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);
do_effect(scene, cfra, seq, se);
+ if (input_have_to_preprocess(scene, seq, se, cfra) &&
+ !build_proxy_run) {
+ if ((se->se1 && (se->ibuf == se->se1->ibuf)) ||
+ (se->se2 && (se->ibuf == se->se2->ibuf))) {
+ struct ImBuf * i
+ = IMB_dupImBuf(se->ibuf);
+
+ IMB_freeImBuf(se->ibuf);
+
+ se->ibuf = i;
+ }
+ use_preprocess = TRUE;
+ }
+ }
+ if (use_preprocess) {
+ input_preprocess(scene, seq, se, cfra);
}
} else if(seq->type == SEQ_IMAGE) {
if(se->ok == STRIPELEM_OK && se->ibuf == 0) {
@@ -1991,7 +2017,8 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
RenderResult rres;
int doseq, rendering= G.rendering;
char scenename[64];
- int sce_valid =sce&& (sce->camera || sce->r.scemode & R_DOSEQ);
+ int have_seq= (sce->r.scemode & R_DOSEQ) && sce->ed && sce->ed->seqbase.first;
+ int sce_valid =sce && (sce->camera || have_seq);
if (se->ibuf == NULL && sce_valid && !build_proxy_run) {
se->ibuf = seq_proxy_fetch(scene, seq, cfra, render_size);
@@ -2012,7 +2039,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
} else if (se->ibuf==NULL && sce_valid) {
/* no need to display a waitcursor on sequencer
scene strips */
- if (!(sce->r.scemode & R_DOSEQ))
+ if (!have_seq)
waitcursor(1);
/* Hack! This function can be called from do_render_seq(), in that case
@@ -2067,8 +2094,8 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
// XXX
#if 0
if((G.f & G_PLAYANIM)==0 /* bad, is set on do_render_seq */
- && !(sce->r.scemode & R_DOSEQ))
- waitcursor(0);
+ && !have_seq
+ && !build_proxy_run)
#endif
CFRA = oldcfra;
@@ -3116,6 +3143,17 @@ void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_ch
update_changed_seq_recurs(scene, seq, changed_seq, len_change, ibuf_change);
}
+#if 0 // XXX from 2.4x, needs updating
+void free_imbuf_seq()
+{
+ Scene * sce = G.main->scene.first;
+ while(sce) {
+ free_imbuf_seq_editing(sce->ed);
+ sce= sce->id.next;
+ }
+}
+#endif
+
void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo)
{
/* force update of all sequences with this ipo, on ipo changes */
@@ -3140,9 +3178,14 @@ void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo)
/* bad levell call... */
void do_render_seq(RenderResult *rr, int cfra)
{
+ static int recurs_depth = 0
ImBuf *ibuf;
- ibuf= give_ibuf_seq(scene, rr->rectx, rr->recty, cfra, 0, scene->r.size);
+ recurs_depth++;
+
+ ibuf= give_ibuf_seq(rr->rectx, rr->recty, cfra, 0, 100.0);
+
+ recurs_depth--;
if(ibuf) {
if(ibuf->rect_float) {
@@ -3179,7 +3222,7 @@ void do_render_seq(RenderResult *rr, int cfra)
on freeing _all_ buffers every time on long timelines...)
(schlaile)
*/
- {
+ if (recurs_depth == 0) { /* with nested scenes, only free on toplevel... */
uintptr_t mem_in_use;
uintptr_t mmap_in_use;
uintptr_t max;
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 59f97ba13df..61f10239148 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -60,6 +60,7 @@
#include "BLI_edgehash.h"
#include "BIF_gl.h"
+#include "BIF_glutil.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 66f7fe8a44b..bcdea06936f 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -784,7 +784,7 @@ Tex *give_current_texture(Object *ob, int act)
if(act>ob->totcol) act= ob->totcol;
else if(act==0) act= 1;
- if( BTST(ob->colbits, act-1) ) { /* in object */
+ if(ob->matbits[act-1]) { /* in object */
ma= ob->mat[act-1];
}
else { /* in data */
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index f84bd690347..cfbe3f629d6 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -40,6 +40,7 @@
#include "BLI_blenlib.h"
#include "BKE_global.h"
+#include "BKE_utildefines.h"
#include "BKE_writeavi.h"
#include "AVI_avi.h"
@@ -87,7 +88,7 @@ bMovieHandle *BKE_get_movie_handle(int imtype)
}
#endif
#ifdef WITH_FFMPEG
- if (imtype == R_FFMPEG) {
+ if (ELEM4(imtype, R_FFMPEG, R_H264, R_XVID, R_THEORA)) {
mh.start_movie = start_ffmpeg;
mh.append_movie = append_ffmpeg;
mh.end_movie = end_ffmpeg;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 25dc6fa2fd7..5e3c8024524 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -937,5 +937,322 @@ void end_ffmpeg(void)
img_convert_ctx = 0;
}
}
+
+/* properties */
+
+void ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
+{
+ struct IDProperty *prop = (struct IDProperty *) prop_;
+ IDProperty * group;
+
+ if (!rd->ffcodecdata.properties) {
+ return;
+ }
+
+ group = IDP_GetPropertyFromGroup(
+ rd->ffcodecdata.properties, (char*) type);
+ if (group && prop) {
+ IDP_RemFromGroup(group, prop);
+ IDP_FreeProperty(prop);
+ MEM_freeN(prop);
+ }
+}
+
+IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int parent_index)
+{
+ AVCodecContext c;
+ const AVOption * o;
+ const AVOption * parent;
+ IDProperty * group;
+ IDProperty * prop;
+ IDPropertyTemplate val;
+ int idp_type;
+ char name[256];
+
+ avcodec_get_context_defaults(&c);
+
+ o = c.av_class->option + opt_index;
+ parent = c.av_class->option + parent_index;
+
+ if (!rd->ffcodecdata.properties) {
+ IDPropertyTemplate val;
+
+ rd->ffcodecdata.properties
+ = IDP_New(IDP_GROUP, val, "ffmpeg");
+ }
+
+ group = IDP_GetPropertyFromGroup(
+ rd->ffcodecdata.properties, (char*) type);
+
+ if (!group) {
+ IDPropertyTemplate val;
+
+ group = IDP_New(IDP_GROUP, val, (char*) type);
+ IDP_AddToGroup(rd->ffcodecdata.properties, group);
+ }
+
+ if (parent_index) {
+ sprintf(name, "%s:%s", parent->name, o->name);
+ } else {
+ strcpy(name, o->name);
+ }
+
+ fprintf(stderr, "ffmpeg_property_add: %s %d %d %s\n",
+ type, parent_index, opt_index, name);
+
+ prop = IDP_GetPropertyFromGroup(group, name);
+ if (prop) {
+ return prop;
+ }
+
+ switch (o->type) {
+ case FF_OPT_TYPE_INT:
+ case FF_OPT_TYPE_INT64:
+ val.i = o->default_val;
+ idp_type = IDP_INT;
+ break;
+ case FF_OPT_TYPE_DOUBLE:
+ case FF_OPT_TYPE_FLOAT:
+ val.f = o->default_val;
+ idp_type = IDP_FLOAT;
+ break;
+ case FF_OPT_TYPE_STRING:
+ val.str = " ";
+ idp_type = IDP_STRING;
+ break;
+ case FF_OPT_TYPE_CONST:
+ val.i = 1;
+ idp_type = IDP_INT;
+ break;
+ default:
+ return NULL;
+ }
+ prop = IDP_New(idp_type, val, name);
+ IDP_AddToGroup(group, prop);
+ return prop;
+}
+
+/* not all versions of ffmpeg include that, so here we go ... */
+
+static const AVOption *my_av_find_opt(void *v, const char *name,
+ const char *unit, int mask, int flags){
+ AVClass *c= *(AVClass**)v;
+ const AVOption *o= c->option;
+
+ for(;o && o->name; o++){
+ if(!strcmp(o->name, name) &&
+ (!unit || (o->unit && !strcmp(o->unit, unit))) &&
+ (o->flags & mask) == flags )
+ return o;
+ }
+ return NULL;
+}
+
+int ffmpeg_property_add_string(RenderData *rd, const char * type, const char * str)
+{
+ AVCodecContext c;
+ const AVOption * o = 0;
+ const AVOption * p = 0;
+ char name_[128];
+ char * name;
+ char * param;
+ IDProperty * prop;
+
+ avcodec_get_context_defaults(&c);
+
+ strncpy(name_, str, 128);
+
+ name = name_;
+ while (*name == ' ') name++;
+
+ param = strchr(name, ':');
+
+ if (!param) {
+ param = strchr(name, ' ');
+ }
+ if (param) {
+ *param++ = 0;
+ while (*param == ' ') param++;
+ }
+
+ o = my_av_find_opt(&c, name, NULL, 0, 0);
+ if (!o) {
+ return 0;
+ }
+ if (param && o->type == FF_OPT_TYPE_CONST) {
+ return 0;
+ }
+ if (param && o->type != FF_OPT_TYPE_CONST && o->unit) {
+ p = my_av_find_opt(&c, param, o->unit, 0, 0);
+ prop = ffmpeg_property_add(rd,
+ (char*) type, p - c.av_class->option,
+ o - c.av_class->option);
+ } else {
+ prop = ffmpeg_property_add(rd,
+ (char*) type, o - c.av_class->option, 0);
+ }
+
+
+ if (!prop) {
+ return 0;
+ }
+
+ if (param && !p) {
+ switch (prop->type) {
+ case IDP_INT:
+ IDP_Int(prop) = atoi(param);
+ break;
+ case IDP_FLOAT:
+ IDP_Float(prop) = atof(param);
+ break;
+ case IDP_STRING:
+ strncpy(IDP_String(prop), param, prop->len);
+ break;
+ }
+ }
+ return 1;
+}
+
+void ffmpeg_set_preset(RenderData *rd, int preset)
+{
+ int isntsc = (rd->frs_sec != 25);
+
+ switch (preset) {
+ case FFMPEG_PRESET_VCD:
+ rd->ffcodecdata.type = FFMPEG_MPEG1;
+ rd->ffcodecdata.video_bitrate = 1150;
+ rd->xsch = 352;
+ rd->ysch = isntsc ? 240 : 288;
+ rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
+ rd->ffcodecdata.rc_max_rate = 1150;
+ rd->ffcodecdata.rc_min_rate = 1150;
+ rd->ffcodecdata.rc_buffer_size = 40*8;
+ rd->ffcodecdata.mux_packet_size = 2324;
+ rd->ffcodecdata.mux_rate = 2352 * 75 * 8;
+ break;
+
+ case FFMPEG_PRESET_SVCD:
+ rd->ffcodecdata.type = FFMPEG_MPEG2;
+ rd->ffcodecdata.video_bitrate = 2040;
+ rd->xsch = 480;
+ rd->ysch = isntsc ? 480 : 576;
+ rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
+ rd->ffcodecdata.rc_max_rate = 2516;
+ rd->ffcodecdata.rc_min_rate = 0;
+ rd->ffcodecdata.rc_buffer_size = 224*8;
+ rd->ffcodecdata.mux_packet_size = 2324;
+ rd->ffcodecdata.mux_rate = 0;
+ break;
+
+ case FFMPEG_PRESET_DVD:
+ rd->ffcodecdata.type = FFMPEG_MPEG2;
+ rd->ffcodecdata.video_bitrate = 6000;
+ rd->xsch = 720;
+ rd->ysch = isntsc ? 480 : 576;
+ rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
+ rd->ffcodecdata.rc_max_rate = 9000;
+ rd->ffcodecdata.rc_min_rate = 0;
+ rd->ffcodecdata.rc_buffer_size = 224*8;
+ rd->ffcodecdata.mux_packet_size = 2048;
+ rd->ffcodecdata.mux_rate = 10080000;
+ break;
+
+ case FFMPEG_PRESET_DV:
+ rd->ffcodecdata.type = FFMPEG_DV;
+ rd->xsch = 720;
+ rd->ysch = isntsc ? 480 : 576;
+ break;
+
+ case FFMPEG_PRESET_H264:
+ rd->ffcodecdata.type = FFMPEG_AVI;
+ rd->ffcodecdata.codec = CODEC_ID_H264;
+ rd->ffcodecdata.video_bitrate = 6000;
+ rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
+ rd->ffcodecdata.rc_max_rate = 9000;
+ rd->ffcodecdata.rc_min_rate = 0;
+ rd->ffcodecdata.rc_buffer_size = 224*8;
+ rd->ffcodecdata.mux_packet_size = 2048;
+ rd->ffcodecdata.mux_rate = 10080000;
+
+ ffmpeg_property_add_string(rd, "video", "coder:vlc");
+ ffmpeg_property_add_string(rd, "video", "flags:loop");
+ ffmpeg_property_add_string(rd, "video", "cmp:chroma");
+ ffmpeg_property_add_string(rd, "video", "partitions:parti4x4");
+ ffmpeg_property_add_string(rd, "video", "partitions:partp8x8");
+ ffmpeg_property_add_string(rd, "video", "partitions:partb8x8");
+ ffmpeg_property_add_string(rd, "video", "me:hex");
+ ffmpeg_property_add_string(rd, "video", "subq:5");
+ ffmpeg_property_add_string(rd, "video", "me_range:16");
+ ffmpeg_property_add_string(rd, "video", "keyint_min:25");
+ ffmpeg_property_add_string(rd, "video", "sc_threshold:40");
+ ffmpeg_property_add_string(rd, "video", "i_qfactor:0.71");
+ ffmpeg_property_add_string(rd, "video", "b_strategy:1");
+
+ break;
+
+ case FFMPEG_PRESET_THEORA:
+ case FFMPEG_PRESET_XVID:
+ if(preset == FFMPEG_PRESET_XVID) {
+ rd->ffcodecdata.type = FFMPEG_AVI;
+ rd->ffcodecdata.codec = CODEC_ID_XVID;
+ }
+ else if(preset == FFMPEG_PRESET_THEORA) {
+ rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken
+ rd->ffcodecdata.codec = CODEC_ID_THEORA;
+ }
+
+ rd->ffcodecdata.video_bitrate = 6000;
+ rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
+ rd->ffcodecdata.rc_max_rate = 9000;
+ rd->ffcodecdata.rc_min_rate = 0;
+ rd->ffcodecdata.rc_buffer_size = 224*8;
+ rd->ffcodecdata.mux_packet_size = 2048;
+ rd->ffcodecdata.mux_rate = 10080000;
+ break;
+
+ }
+}
+
+void ffmpeg_verify_image_type(RenderData *rd)
+{
+ int audio= 0;
+
+ if(rd->imtype == R_FFMPEG) {
+ if(rd->ffcodecdata.type <= 0 ||
+ rd->ffcodecdata.codec <= 0 ||
+ rd->ffcodecdata.audio_codec <= 0 ||
+ rd->ffcodecdata.video_bitrate <= 1) {
+
+ rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO;
+ ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD);
+ }
+
+ audio= 1;
+ }
+ else if(rd->imtype == R_H264) {
+ if(rd->ffcodecdata.codec != CODEC_ID_H264) {
+ ffmpeg_set_preset(rd, FFMPEG_PRESET_H264);
+ audio= 1;
+ }
+ }
+ else if(rd->imtype == R_XVID) {
+ if(rd->ffcodecdata.codec != CODEC_ID_XVID) {
+ ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID);
+ audio= 1;
+ }
+ }
+ else if(rd->imtype == R_THEORA) {
+ if(rd->ffcodecdata.codec != CODEC_ID_THEORA) {
+ ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA);
+ audio= 1;
+ }
+ }
+
+ if(audio && rd->ffcodecdata.audio_codec <= 0) {
+ rd->ffcodecdata.audio_codec = CODEC_ID_MP2;
+ rd->ffcodecdata.audio_bitrate = 128;
+ }
+}
+
#endif
diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h
index d207ea0d0ef..60b7f74954d 100644
--- a/source/blender/blenlib/BLI_editVert.h
+++ b/source/blender/blenlib/BLI_editVert.h
@@ -126,10 +126,11 @@ typedef struct EditFace
float fp;
} tmp;
float n[3], cent[3];
- unsigned char mat_nr, flag;
+ unsigned char flag;
unsigned char f, f1, h;
unsigned char fast; /* only 0 or 1, for editmesh_fastmalloc */
unsigned char fgonf; /* flag for fgon options */
+ short mat_nr;
void *data; /* custom face data */
} EditFace;
diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h
index f4fccfcbb2c..1dd439468f7 100644
--- a/source/blender/blenlib/BLI_graph.h
+++ b/source/blender/blenlib/BLI_graph.h
@@ -88,6 +88,7 @@ typedef struct BArcIterator {
StoppedFct stopped;
float *p, *no;
+ float size;
int length;
int index;
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index d2fb62141de..d0b106b59c3 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -1,5 +1,5 @@
/*
- * $Id: BLI_blenlib.h 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,7 +26,7 @@
*
* ***** END GPL LICENSE BLOCK *****
*
- * $Id: $
+ * $Id$
*/
#ifndef BLI_LISTBASE_H
diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h
index 9f72c5e7b54..0886eb3a8a5 100644
--- a/source/blender/blenlib/BLI_noise.h
+++ b/source/blender/blenlib/BLI_noise.h
@@ -1,5 +1,5 @@
/*
- * $Id: BLI_blenlib.h 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index c7026b21494..c36a41af84b 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -1,5 +1,5 @@
/*
- * $Id: BLI_blenlib.h 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/BLI_storage.h b/source/blender/blenlib/BLI_storage.h
index d7bf3bd13f8..fa44bb36e15 100644
--- a/source/blender/blenlib/BLI_storage.h
+++ b/source/blender/blenlib/BLI_storage.h
@@ -25,15 +25,20 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
#ifndef BLI_STORAGE_H
#define BLI_STORAGE_H
+/* NOTE: these have to be defined before including unistd.h! */
#ifndef __APPLE__
#ifndef WIN32
-#define _LARGEFILE_SOURCE 1
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
#endif
#endif
+#endif
struct direntry;
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 4e5bf650196..bf93dc19cc5 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -1,5 +1,5 @@
/*
- * $Id: BLI_blenlib.h 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,7 +26,7 @@
*
* ***** END GPL LICENSE BLOCK *****
*
- * $Id: $
+ * $Id$
*/
#ifndef BLI_STRING_H
diff --git a/source/blender/blenlib/BLI_util.h b/source/blender/blenlib/BLI_util.h
index 30c9fc353b3..d323f701ba5 100644
--- a/source/blender/blenlib/BLI_util.h
+++ b/source/blender/blenlib/BLI_util.h
@@ -50,6 +50,7 @@ void BLI_make_existing_file(char *name);
void BLI_split_dirfile(char *string, char *dir, char *file);
void BLI_split_dirfile_basic(const char *string, char *dir, char *file);
void BLI_join_dirfile(char *string, const char *dir, const char *file);
+void BLI_getlastdir(const char* dir, char *last, int maxlen);
int BLI_testextensie(const char *str, const char *ext);
void BLI_uniquename(struct ListBase *list, void *vlink, char defname[], char delim, short name_offs, short len);
void BLI_newname(char * name, int add);
@@ -71,6 +72,9 @@ void BLI_cleanup_dir(const char *relabase, char *dir); /* same as above but adds
/* go back one directory */
int BLI_parent_dir(char *path);
+/* return whether directory is root and thus has no parent dir */
+int BLI_has_parent(char *path);
+
/**
* Blender's path code replacement function.
* Bases @a path strings leading with "//" by the
diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c
index 04388ea946f..dd10d898a7f 100644
--- a/source/blender/blenlib/intern/BLI_dynstr.c
+++ b/source/blender/blenlib/intern/BLI_dynstr.c
@@ -92,7 +92,7 @@ void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args)
if(len == sizeof(fixedmessage))
message= fixedmessage;
else
- message= MEM_callocN(sizeof(char)*len+1, "BLI_dynstr_appendf");
+ message= MEM_callocN(sizeof(char)*(len+1), "BLI_dynstr_appendf");
retval= vsnprintf(message, len, format, args);
@@ -132,10 +132,54 @@ void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args)
void BLI_dynstr_appendf(DynStr *ds, const char *format, ...)
{
va_list args;
+ char *message, fixedmessage[256];
+ int len= 256, maxlen= 65536, retval;
+
+ /* note that it's tempting to just call BLI_dynstr_vappendf here
+ * and avoid code duplication, that crashes on some system because
+ * va_start/va_end have to be called for each vsnprintf call */
- va_start(args, format);
- BLI_dynstr_vappendf(ds, format, args);
- va_end(args);
+ while(1) {
+ if(len == sizeof(fixedmessage))
+ message= fixedmessage;
+ else
+ message= MEM_callocN(sizeof(char)*(len+1), "BLI_dynstr_appendf");
+
+ va_start(args, format);
+ retval= vsnprintf(message, len, format, args);
+ va_end(args);
+
+ if(retval == -1) {
+ /* -1 means not enough space, but on windows it may also mean
+ * there is a formatting error, so we impose a maximum length */
+ if(message != fixedmessage)
+ MEM_freeN(message);
+ message= NULL;
+
+ len *= 2;
+ if(len > maxlen) {
+ fprintf(stderr, "BLI_dynstr_append text too long or format error.\n");
+ break;
+ }
+ }
+ else if(retval > len) {
+ /* in C99 the actual length required is returned */
+ if(message != fixedmessage)
+ MEM_freeN(message);
+ message= NULL;
+
+ len= retval;
+ }
+ else
+ break;
+ }
+
+ if(message) {
+ BLI_dynstr_append(ds, message);
+
+ if(message != fixedmessage)
+ MEM_freeN(message);
+ }
}
int BLI_dynstr_get_len(DynStr *ds) {
diff --git a/source/blender/blenlib/intern/dynamiclist.c b/source/blender/blenlib/intern/dynamiclist.c
index fbb87124bba..4fe654cffb6 100644
--- a/source/blender/blenlib/intern/dynamiclist.c
+++ b/source/blender/blenlib/intern/dynamiclist.c
@@ -3,7 +3,7 @@
* various string, file, list operations.
*
*
- * $Id: util.c 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/intern/dynamiclist.h b/source/blender/blenlib/intern/dynamiclist.h
index aba3eda0696..e8c93fbcf23 100644
--- a/source/blender/blenlib/intern/dynamiclist.h
+++ b/source/blender/blenlib/intern/dynamiclist.h
@@ -1,5 +1,5 @@
/**
- * $Id: BLI_dynamiclist.h 13161 2008-01-07 19:13:47Z hos $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index ffebd05f2f6..917537bf03d 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -153,10 +153,24 @@ int BLI_is_writable(char *filename)
{
int file;
+ /* first try to open without creating */
file = open(filename, O_BINARY | O_RDWR, 0666);
- if (file < 0)
- return 0;
+ if (file < 0) {
+ /* now try to open and create. a test without actually
+ * creating a file would be nice, but how? */
+ file = open(filename, O_BINARY | O_RDWR | O_CREAT, 0666);
+
+ if(file < 0) {
+ return 0;
+ }
+ else {
+ /* success, delete the file we create */
+ close(file);
+ BLI_delete(filename, 0, 0);
+ return 1;
+ }
+ }
else {
close(file);
return 1;
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index 0f2a6179964..bde4b561f26 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -294,9 +294,12 @@ int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode)
tf->pf->size,
0,
&face);
+ if (err) return FALSE;
+ }
+ else {
+ err = TRUE;
+ return FALSE;
}
- else
- err= TRUE;
// Read the char
freetypechar_to_vchar(face, charcode, vfont->data);
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index e0fd5c37494..1064c8ac1bf 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -3,7 +3,7 @@
* various string, file, list operations.
*
*
- * $Id: util.c 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c
index 39d38e4cf3a..269e674a62f 100644
--- a/source/blender/blenlib/intern/psfont.c
+++ b/source/blender/blenlib/intern/psfont.c
@@ -837,7 +837,7 @@ static int decodetype1(PackedFile * pf, char *outname)
while(newfgets(oneline, LINELEN, pf)) {
hptr = (char *)oneline;
while(*hptr) {
- if(hextab[*hptr] != NOTHEX)
+ if(hextab[(int)*hptr] != NOTHEX)
hexdat[hexbytes++] = *hptr;
hptr++;
}
@@ -853,7 +853,7 @@ static int decodetype1(PackedFile * pf, char *outname)
bptr = bindat;
c = datbytes;
while(c--) {
- *bptr++ = (hextab[hptr[0]]<<4)+hextab[hptr[1]];
+ *bptr++ = (hextab[(int)hptr[0]]<<4)+hextab[(int)hptr[1]];
hptr += 2;
}
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 688a4ab901b..7af383e2356 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -62,13 +62,6 @@
#include <sys/vfs.h>
#endif
-#ifdef __BeOS
-struct statfs {
- int f_bsize;
- int f_bfree;
-};
-#endif
-
#ifdef __APPLE__
/* For statfs */
#include <sys/param.h>
@@ -77,7 +70,7 @@ struct statfs {
#include <fcntl.h>
-#if !defined(__BeOS) && !defined(WIN32)
+#if !defined(WIN32)
#include <sys/mtio.h> /* tape comando's */
#endif
#include <string.h> /* strcpy etc.. */
@@ -201,9 +194,6 @@ double BLI_diskfree(char *dir)
#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__)
if (statfs(name, &disk)) return(-1);
#endif
-#ifdef __BeOS
- return -1;
-#endif
#if defined (__sun__) || defined (__sun) || defined (__sgi)
if (statvfs(name, &disk)) return(-1);
@@ -228,7 +218,7 @@ void BLI_builddir(char *dirname, char *relname)
{
struct dirent *fname;
struct dirlink *dlink;
- int rellen, newnum = 0, seen_ = 0, seen__ = 0;
+ int rellen, newnum = 0;
char buf[256];
DIR *dir;
@@ -248,21 +238,17 @@ void BLI_builddir(char *dirname, char *relname)
if ( (dir = (DIR *)opendir(".")) ){
while ((fname = (struct dirent*) readdir(dir)) != NULL) {
- if(hide_dot && fname->d_name[0]=='.' && fname->d_name[1]!='.' && fname->d_name[1]!=0);
+ if(hide_dot && fname->d_name[0]=='.' && fname->d_name[1]!='.' && fname->d_name[1]!=0) {
+ }
+ else if ( ( (fname->d_name[0] == '.') && (fname->d_name[1] == 0) ) ||
+ ( (fname->d_name[0] == '.') && (fname->d_name[1] == '.') && (fname->d_name[2] == 0)) ) {
+ /* ignore '.' and '..' */
+ }
else {
-
dlink = (struct dirlink *)malloc(sizeof(struct dirlink));
if (dlink){
strcpy(buf+rellen,fname->d_name);
-
dlink->name = BLI_strdup(buf);
-
- if (dlink->name[0] == '.') {
- if (dlink->name[1] == 0) seen_ = 1;
- else if (dlink->name[1] == '.') {
- if (dlink->name[2] == 0) seen__ = 1;
- }
- }
BLI_addhead(dirbase,dlink);
newnum++;
}
@@ -270,30 +256,6 @@ void BLI_builddir(char *dirname, char *relname)
}
if (newnum){
-#ifndef WIN32
- if (seen_ == 0) { /* Cachefs PATCH */
- dlink = (struct dirlink *)malloc(sizeof(struct dirlink));
- strcpy(buf+rellen,"./.");
- dlink->name = BLI_strdup(buf);
- BLI_addhead(dirbase,dlink);
- newnum++;
- }
- if (seen__ == 0) { /* MAC PATCH */
- dlink = (struct dirlink *)malloc(sizeof(struct dirlink));
- strcpy(buf+rellen,"./..");
- dlink->name = BLI_strdup(buf);
- BLI_addhead(dirbase,dlink);
- newnum++;
- }
-#else // WIN32
- if (seen_ == 0) { /* should only happen for root paths like "C:\" */
- dlink = (struct dirlink *)malloc(sizeof(struct dirlink));
- strcpy(buf+rellen,".");
- dlink->name = BLI_strdup(buf);
- BLI_addhead(dirbase,dlink);
- newnum++;
- }
-#endif
if (files) files=(struct direntry *)realloc(files,(totnum+newnum) * sizeof(struct direntry));
else files=(struct direntry *)malloc(newnum * sizeof(struct direntry));
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index fa4bcbc26bc..4cd04aa232c 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -3,7 +3,7 @@
* various string, file, list operations.
*
*
- * $Id: util.c 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index df4ad4e7c75..78a4599b3b3 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -494,6 +494,22 @@ void BLI_makestringcode(const char *relfile, char *file)
}
}
+int BLI_has_parent(char *path)
+{
+ int len;
+ int slashes = 0;
+ BLI_clean(path);
+ BLI_add_slash(path);
+
+ len = strlen(path)-1;
+ while (len>=0) {
+ if ((path[len] == '\\') || (path[len] == '/'))
+ slashes++;
+ len--;
+ }
+ return slashes > 1;
+}
+
int BLI_parent_dir(char *path)
{
#ifdef WIN32
@@ -736,11 +752,27 @@ void BLI_splitdirstring(char *di, char *fi)
}
}
-char *BLI_gethome(void) {
- #ifdef __BeOS
- return "/boot/home/"; /* BeOS 4.5: doubleclick at icon doesnt give home env */
+void BLI_getlastdir(const char* dir, char *last, int maxlen)
+{
+ const char *s = dir;
+ const char *lslash = NULL;
+ const char *prevslash = NULL;
+ while (*s) {
+ if ((*s == '\\') || (*s == '/')) {
+ prevslash = lslash;
+ lslash = s;
+ }
+ s++;
+ }
+ if (prevslash) {
+ BLI_strncpy(last, prevslash+1, maxlen);
+ } else {
+ BLI_strncpy(last, dir, maxlen);
+ }
+}
- #elif !defined(WIN32)
+char *BLI_gethome(void) {
+ #if !defined(WIN32)
return getenv("HOME");
#else /* Windows */
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 0c8b8a6b31d..1f276913ea8 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -32,6 +32,8 @@
#include <config.h>
#endif
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9e4f3ceb335..5cc9698f79a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1667,10 +1667,26 @@ static void lib_link_constraint_channels(FileData *fd, ID *id, ListBase *chanbas
/* Data Linking ----------------------------- */
+static void lib_link_fmodifiers(FileData *fd, ID *id, ListBase *list)
+{
+ FModifier *fcm;
+
+ for (fcm= list->first; fcm; fcm= fcm->next) {
+ /* data for specific modifiers */
+ switch (fcm->type) {
+ case FMODIFIER_TYPE_PYTHON:
+ {
+ FMod_Python *data= (FMod_Python *)fcm->data;
+ data->script = newlibadr(fd, id->lib, data->script);
+ }
+ break;
+ }
+ }
+}
+
static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
{
FCurve *fcu;
- FModifier *fcm;
/* relink ID-block references... */
for (fcu= list->first; fcu; fcu= fcu->next) {
@@ -1684,16 +1700,45 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
}
/* modifiers */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- /* data for specific modifiers */
- switch (fcm->type) {
- case FMODIFIER_TYPE_PYTHON:
- {
- FMod_Python *data= (FMod_Python *)fcm->data;
- data->script = newlibadr(fd, id->lib, data->script);
- }
- break;
+ lib_link_fmodifiers(fd, id, &fcu->modifiers);
+ }
+}
+
+
+/* NOTE: this assumes that link_list has already been called on the list */
+static void direct_link_fmodifiers(FileData *fd, ListBase *list)
+{
+ FModifier *fcm;
+
+ for (fcm= list->first; fcm; fcm= fcm->next) {
+ /* relink general data */
+ fcm->data = newdataadr(fd, fcm->data);
+ fcm->edata= NULL;
+
+ /* do relinking of data for specific types */
+ switch (fcm->type) {
+ case FMODIFIER_TYPE_GENERATOR:
+ {
+ FMod_Generator *data= (FMod_Generator *)fcm->data;
+
+ data->coefficients= newdataadr(fd, data->coefficients);
+ }
+ break;
+ case FMODIFIER_TYPE_ENVELOPE:
+ {
+ FMod_Envelope *data= (FMod_Envelope *)fcm->data;
+
+ data->data= newdataadr(fd, data->data);
+ }
+ break;
+ case FMODIFIER_TYPE_PYTHON:
+ {
+ FMod_Python *data= (FMod_Python *)fcm->data;
+
+ data->prop = newdataadr(fd, data->prop);
+ IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
+ break;
}
}
}
@@ -1702,7 +1747,6 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
static void direct_link_fcurves(FileData *fd, ListBase *list)
{
FCurve *fcu;
- FModifier *fcm;
/* link F-Curve data to F-Curve again (non ID-libs) */
for (fcu= list->first; fcu; fcu= fcu->next) {
@@ -1730,37 +1774,7 @@ static void direct_link_fcurves(FileData *fd, ListBase *list)
/* modifiers */
link_list(fd, &fcu->modifiers);
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- /* relink general data */
- fcm->data = newdataadr(fd, fcm->data);
- fcm->edata= NULL;
-
- /* do relinking of data for specific types */
- switch (fcm->type) {
- case FMODIFIER_TYPE_GENERATOR:
- {
- FMod_Generator *data= (FMod_Generator *)fcm->data;
-
- data->coefficients= newdataadr(fd, data->coefficients);
- }
- break;
- case FMODIFIER_TYPE_ENVELOPE:
- {
- FMod_Envelope *data= (FMod_Envelope *)fcm->data;
-
- data->data= newdataadr(fd, data->data);
- }
- break;
- case FMODIFIER_TYPE_PYTHON:
- {
- FMod_Python *data= (FMod_Python *)fcm->data;
-
- data->prop = newdataadr(fd, data->prop);
- IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
- }
- break;
- }
- }
+ direct_link_fmodifiers(fd, &fcu->modifiers);
}
}
@@ -1812,6 +1826,65 @@ static void direct_link_action(FileData *fd, bAction *act)
}
}
+static void lib_link_nladata_strips(FileData *fd, ID *id, ListBase *list)
+{
+ NlaStrip *strip;
+
+ for (strip= list->first; strip; strip= strip->next) {
+ /* check strip's children */
+ lib_link_nladata_strips(fd, id, &strip->strips);
+
+ /* reassign the counted-reference to action */
+ strip->act = newlibadr_us(fd, id->lib, strip->act);
+ }
+}
+
+static void lib_link_nladata(FileData *fd, ID *id, ListBase *list)
+{
+ NlaTrack *nlt;
+
+ /* we only care about the NLA strips inside the tracks */
+ for (nlt= list->first; nlt; nlt= nlt->next) {
+ lib_link_nladata_strips(fd, id, &nlt->strips);
+ }
+}
+
+/* This handles Animato NLA-Strips linking
+ * NOTE: this assumes that link_list has already been called on the list
+ */
+static void direct_link_nladata_strips(FileData *fd, ListBase *list)
+{
+ NlaStrip *strip;
+
+ for (strip= list->first; strip; strip= strip->next) {
+ /* strip's child strips */
+ link_list(fd, &strip->strips);
+ direct_link_nladata_strips(fd, &strip->strips);
+
+ /* strip's F-Curves */
+ link_list(fd, &strip->fcurves);
+ direct_link_fcurves(fd, &strip->fcurves);
+
+ /* strip's F-Modifiers */
+ link_list(fd, &strip->modifiers);
+ direct_link_fcurves(fd, &strip->modifiers);
+ }
+}
+
+/* NOTE: this assumes that link_list has already been called on the list */
+static void direct_link_nladata(FileData *fd, ListBase *list)
+{
+ NlaTrack *nlt;
+
+ for (nlt= list->first; nlt; nlt= nlt->next) {
+ /* relink list of strips */
+ link_list(fd, &nlt->strips);
+
+ /* relink strip data */
+ direct_link_nladata_strips(fd, &nlt->strips);
+ }
+}
+
/* ------- */
static void lib_link_keyingsets(FileData *fd, ID *id, ListBase *list)
@@ -1854,6 +1927,7 @@ static void lib_link_animdata(FileData *fd, ID *id, AnimData *adt)
/* link action data */
adt->action= newlibadr_us(fd, id->lib, adt->action);
+ adt->tmpact= newlibadr_us(fd, id->lib, adt->tmpact);
/* link drivers */
lib_link_fcurves(fd, id, &adt->drivers);
@@ -1861,7 +1935,7 @@ static void lib_link_animdata(FileData *fd, ID *id, AnimData *adt)
/* overrides don't have lib-link for now, so no need to do anything */
/* link NLA-data */
- // TODO...
+ lib_link_nladata(fd, id, &adt->nla_tracks);
}
static void direct_link_animdata(FileData *fd, AnimData *adt)
@@ -1878,7 +1952,12 @@ static void direct_link_animdata(FileData *fd, AnimData *adt)
// TODO...
/* link NLA-data */
- // TODO...
+ link_list(fd, &adt->nla_tracks);
+ direct_link_nladata(fd, &adt->nla_tracks);
+
+ /* clear temp pointers that may have been set... */
+ // TODO: it's probably only a small cost to reload this anyway...
+ adt->actstrip= NULL;
}
/* ************ READ NODE TREE *************** */
@@ -2641,6 +2720,7 @@ static void direct_link_image(FileData *fd, Image *ima)
ima->anim= NULL;
ima->rr= NULL;
ima->repbind= NULL;
+ ima->render_text= newdataadr(fd, ima->render_text);
ima->packedfile = direct_link_packedfile(fd, ima->packedfile);
ima->preview = direct_link_preview_image(fd, ima->preview);
@@ -2878,6 +2958,19 @@ static void direct_link_material(FileData *fd, Material *ma)
static void direct_link_pointcache(FileData *fd, PointCache *cache)
{
+ if((cache->flag & PTCACHE_DISK_CACHE)==0) {
+ PTCacheMem *pm;
+
+ link_list(fd, &cache->mem_cache);
+
+ pm = cache->mem_cache.first;
+
+ for(; pm; pm=pm->next)
+ pm->data = newdataadr(fd, pm->data);
+ }
+ else
+ cache->mem_cache.first = cache->mem_cache.last = NULL;
+
cache->flag &= ~(PTCACHE_SIMULATION_VALID|PTCACHE_BAKE_EDIT_ACTIVE);
cache->simframe= 0;
}
@@ -2889,7 +2982,9 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
part= main->particle.first;
while(part) {
if(part->id.flag & LIB_NEEDLINK) {
+ if (part->adt) lib_link_animdata(fd, &part->id, part->adt);
part->ipo= newlibadr_us(fd, part->id.lib, part->ipo); // XXX depreceated - old animation system
+
part->dup_ob = newlibadr(fd, part->id.lib, part->dup_ob);
part->dup_group = newlibadr(fd, part->id.lib, part->dup_group);
part->eff_group = newlibadr(fd, part->id.lib, part->eff_group);
@@ -2902,6 +2997,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
{
+ part->adt= newdataadr(fd, part->adt);
part->pd= newdataadr(fd, part->pd);
part->pd2= newdataadr(fd, part->pd2);
}
@@ -2918,12 +3014,18 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase
psys->part = newlibadr_us(fd, id->lib, psys->part);
if(psys->part) {
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+
+ for(; kpt; kpt=kpt->next)
+ kpt->ob=newlibadr(fd, id->lib, kpt->ob);
+
psys->target_ob = newlibadr(fd, id->lib, psys->target_ob);
- psys->keyed_ob = newlibadr(fd, id->lib, psys->keyed_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 */
@@ -2973,6 +3075,8 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
direct_link_pointcache(fd, sb->pointcache);
}
+ link_list(fd, &psys->keyed_targets);
+
psys->edit = 0;
psys->free_edit = NULL;
psys->pathcache = 0;
@@ -3288,10 +3392,8 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
direct_link_dverts(fd, lvl->totvert, CustomData_get(&mesh->mr->vdata, 0, CD_MDEFORMVERT));
direct_link_customdata(fd, &mesh->mr->fdata, lvl->totface);
- if(!mesh->mr->edge_flags)
- mesh->mr->edge_flags= MEM_callocN(sizeof(short)*lvl->totedge, "Multires Edge Flags");
- if(!mesh->mr->edge_creases)
- mesh->mr->edge_creases= MEM_callocN(sizeof(char)*lvl->totedge, "Multires Edge Creases");
+ mesh->mr->edge_flags= newdataadr(fd, mesh->mr->edge_flags);
+ mesh->mr->edge_creases= newdataadr(fd, mesh->mr->edge_creases);
mesh->mr->verts = newdataadr(fd, mesh->mr->verts);
@@ -3781,6 +3883,7 @@ static void direct_link_object(FileData *fd, Object *ob)
ob->mat= newdataadr(fd, ob->mat);
test_pointer_array(fd, (void **)&ob->mat);
+ ob->matbits= newdataadr(fd, ob->matbits);
/* do it here, below old data gets converted */
direct_link_modifiers(fd, &ob->modifiers);
@@ -3978,12 +4081,19 @@ 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->toolsettings->imapaint.brush=
newlibadr_us(fd, sce->id.lib, sce->toolsettings->imapaint.brush);
if(sce->toolsettings->sculpt)
sce->toolsettings->sculpt->brush=
newlibadr_us(fd, sce->id.lib, sce->toolsettings->sculpt->brush);
-
+ if(sce->toolsettings->vpaint)
+ sce->toolsettings->vpaint->brush=
+ newlibadr_us(fd, sce->id.lib, sce->toolsettings->vpaint->brush);
+ if(sce->toolsettings->wpaint)
+ sce->toolsettings->wpaint->brush=
+ newlibadr_us(fd, sce->id.lib, sce->toolsettings->wpaint->brush);
+
sce->toolsettings->skgen_template = newlibadr(fd, sce->id.lib, sce->toolsettings->skgen_template);
for(base= sce->base.first; base; base= next) {
@@ -4077,8 +4187,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
direct_link_keyingsets(fd, &sce->keyingsets);
sce->basact= newdataadr(fd, sce->basact);
-
- sce->radio= newdataadr(fd, sce->radio);
sce->toolsettings= newdataadr(fd, sce->toolsettings);
if(sce->toolsettings) {
@@ -4265,6 +4373,7 @@ static void direct_link_windowmanager(FileData *fd, wmWindowManager *wm)
wm->paintcursors.first= wm->paintcursors.last= NULL;
wm->queue.first= wm->queue.last= NULL;
wm->reports.first= wm->reports.last= NULL;
+ wm->jobs.first= wm->jobs.last= NULL;
wm->windrawable= NULL;
wm->initialized= 0;
@@ -4607,13 +4716,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
SpaceFile *sfile= (SpaceFile *)sl;
sfile->files= NULL;
+ sfile->folders_prev= NULL;
+ sfile->folders_next= NULL;
sfile->params= NULL;
sfile->op= NULL;
- /* XXX needs checking - best solve in filesel itself
- if(sfile->libfiledata)
- BLO_blendhandle_close(sfile->libfiledata);
- sfile->libfiledata= 0;
- */
}
else if(sl->spacetype==SPACE_IMASEL) {
SpaceImaSel *simasel= (SpaceImaSel *)sl;
@@ -4845,6 +4951,11 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
sipo->ads= newdataadr(fd, sipo->ads);
sipo->ghostCurves.first= sipo->ghostCurves.last= NULL;
}
+ else if (sl->spacetype==SPACE_NLA) {
+ SpaceNla *snla= (SpaceNla*)sl;
+
+ snla->ads= newdataadr(fd, snla->ads);
+ }
else if (sl->spacetype==SPACE_OUTLINER) {
SpaceOops *soops= (SpaceOops*) sl;
@@ -4877,6 +4988,14 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
}
snode->nodetree= snode->edittree= NULL;
}
+ else if(sl->spacetype==SPACE_LOGIC) {
+ SpaceLogic *slogic= (SpaceLogic *)sl;
+
+ if(slogic->gpd) {
+ slogic->gpd= newdataadr(fd, slogic->gpd);
+ direct_link_gpencil(fd, slogic->gpd);
+ }
+ }
else if(sl->spacetype==SPACE_SEQ) {
SpaceSeq *sseq= (SpaceSeq *)sl;
if(sseq->gpd) {
@@ -5722,21 +5841,17 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
/* temporarily hide it */
ar->flag = RGN_FLAG_HIDDEN;
break;
-
case SPACE_FILE:
- /* channel (bookmarks/directories) region */
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ ar= MEM_callocN(sizeof(ARegion), "nodetree area for node");
BLI_addtail(lb, ar);
ar->regiontype= RGN_TYPE_CHANNELS;
ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll= V2D_SCROLL_RIGHT;
- /* button UI region */
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+
+ ar= MEM_callocN(sizeof(ARegion), "ui area for file");
BLI_addtail(lb, ar);
ar->regiontype= RGN_TYPE_UI;
ar->alignment= RGN_ALIGN_TOP;
break;
-
#if 0
case SPACE_BUTS:
/* context UI region */
@@ -7232,22 +7347,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(main->versionfile <= 234) {
- Scene *sce;
World *wo;
bScreen *sc;
- int set_zbuf_sel=0;
// force sumo engine to be active
for (wo = main->world.first; wo; wo= wo->id.next) {
if(wo->physicsEngine==0) wo->physicsEngine = 2;
}
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if(sce->selectmode==0) {
- sce->selectmode= SCE_SELECT_VERTEX;
- set_zbuf_sel= 1;
- }
- }
for (sc= main->screen.first; sc; sc= sc->id.next) {
ScrArea *sa;
for (sa= sc->areabase.first; sa; sa= sa->next) {
@@ -7255,7 +7362,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (sl= sa->spacedata.first; sl; sl= sl->next) {
if(sl->spacetype==SPACE_VIEW3D) {
View3D *v3d= (View3D *)sl;
- if(set_zbuf_sel) v3d->flag |= V3D_ZBUF_SELECT;
+ v3d->flag |= V3D_ZBUF_SELECT;
}
else if(sl->spacetype==SPACE_TEXT) {
SpaceText *st= (SpaceText *)sl;
@@ -7290,16 +7397,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
if(main->versionfile <= 236) {
Object *ob;
- Scene *sce= main->scene.first;
Camera *cam= main->camera.first;
Material *ma;
bScreen *sc;
- while(sce) {
- if(sce->editbutsize==0.0) sce->editbutsize= 0.1f;
-
- sce= sce->id.next;
- }
while(cam) {
if(cam->ortho_scale==0.0) {
cam->ortho_scale= 256.0f/cam->lens;
@@ -8925,15 +9026,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
- /* autokey mode settings now used from scene, but need to be initialised off userprefs */
- if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 8)) {
- Scene *sce;
-
- for (sce= main->scene.first; sce; sce= sce->id.next) {
- if (sce->autokey_mode == 0)
- sce->autokey_mode= U.autokey_mode;
- }
- }
if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 9)) {
Lamp *la= main->lamp.first;
@@ -9126,14 +9218,47 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
+ if (main->versionfile < 249 && main->subversionfile < 2) {
+ Scene *sce= main->scene.first;
+ Sequence *seq;
+ Editing *ed;
+
+ while(sce) {
+ ed= sce->ed;
+ if(ed) {
+ SEQP_BEGIN(ed, seq) {
+ if (seq->strip && seq->strip->proxy){
+ if (sce->r.size != 100.0) {
+ seq->strip->proxy->size
+ = sce->r.size;
+ } else {
+ seq->strip->proxy->size
+ = 25.0;
+ }
+ seq->strip->proxy->quality =90;
+ }
+ }
+ SEQ_END
+ }
+
+ sce= sce->id.next;
+ }
+
+ }
+
if (main->versionfile < 250) {
bScreen *screen;
Scene *scene;
+ Base *base;
Material *ma;
+ Camera *cam;
Mesh *me;
Scene *sce;
Tex *tx;
ParticleSettings *part;
+ Object *ob;
+ PTCacheID *pid;
+ ListBase pidlist;
for(screen= main->screen.first; screen; screen= screen->id.next) {
do_versions_windowmanager_2_50(screen);
@@ -9145,13 +9270,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
*/
//do_versions_ipos_to_animato(main);
- /* struct audio data moved to renderdata */
- for(scene= main->scene.first; scene; scene= scene->id.next) {
+ /* toolsettings */
+ for(scene= main->scene.first; scene; scene= scene->id.next)
scene->r.audio = scene->audio;
-
- if(!scene->toolsettings->uv_selectmode)
- scene->toolsettings->uv_selectmode= UV_SELECT_VERTEX;
- }
/* shader, composit and texture node trees have id.name empty, put something in
* to have them show in RNA viewer and accessible otherwise.
@@ -9164,6 +9285,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for(sce= main->scene.first; sce; sce= sce->id.next) {
if(sce->nodetree && strlen(sce->nodetree->id.name)==0)
strcpy(sce->nodetree->id.name, "NTComposit Nodetree");
+
+ /* move to cameras */
+ if(sce->r.scemode & R_PANORAMA) {
+ for(base=scene->base.first; base; base=base->next) {
+ ob= newlibadr(fd, lib, base->object);
+
+ if(ob->type == OB_CAMERA && !ob->id.lib) {
+ cam= newlibadr(fd, lib, ob->data);
+ cam->flag |= CAM_PANORAMA;
+ }
+ }
+
+ sce->r.scemode &= ~R_PANORAMA;
+ }
}
/* and texture trees */
for(tx= main->tex.first; tx; tx= tx->id.next) {
@@ -9176,7 +9311,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
}
- /* particle settings conversion */
+ /* particle draw and render types */
for(part= main->particle.first; part; part= part->id.next) {
if(part->draw_as) {
if(part->draw_as == PART_DRAW_DOT) {
@@ -9191,6 +9326,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
part->draw_as = PART_DRAW_REND;
}
}
+ part->path_end = 1.0f;
+ }
+ /* set old pointcaches to have disk cache flag */
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next)
+ pid->cache->flag |= PTCACHE_DISK_CACHE;
+
+ BLI_freelistN(&pidlist);
}
}
@@ -9199,6 +9345,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
{
Object *ob;
Material *ma;
+ Scene *sce;
+ ToolSettings *ts;
int i;
for(ob = main->object.first; ob; ob = ob->id.next) {
@@ -9208,7 +9356,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
void *olddata = ob->data;
ob->data = me;
- if(me && me->mr) {
+ if(me && me->id.lib==NULL && me->mr) { /* XXX - library meshes crash on loading most yoFrankie levels, the multires pointer gets invalid - Campbell */
MultiresLevel *lvl;
ModifierData *md;
MultiresModifierData *mmd;
@@ -9263,6 +9411,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ob->data = olddata;
}
+
+ if(ob->totcol && ob->matbits == NULL) {
+ int a;
+
+ ob->matbits= MEM_callocN(sizeof(char)*ob->totcol, "ob->matbits");
+ for(a=0; a<ob->totcol; a++)
+ ob->matbits[a]= ob->colbits & (1<<a);
+ }
}
for(ma = main->mat.first; ma; ma = ma->id.next) {
@@ -9271,8 +9427,25 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ma->mode &= ~MA_HALO;
}
}
+
+ for(sce = main->scene.first; sce; sce = sce->id.next) {
+ ts= sce->toolsettings;
+ if(ts->normalsize == 0.0 || !ts->uv_selectmode || ts->vgroup_weight == 0.0) {
+ ts->normalsize= 0.1f;
+ ts->selectmode= SCE_SELECT_VERTEX;
+
+ /* autokeying - setting should be taken from the user-prefs
+ * but the userprefs version may not have correct flags set
+ * (i.e. will result in blank box when enabled)
+ */
+ ts->autokey_mode= U.autokey_mode;
+ if (ts->autokey_mode == 0)
+ ts->autokey_mode= 2; /* 'add/replace' but not on */
+ ts->uv_selectmode= UV_SELECT_VERTEX;
+ ts->vgroup_weight= 1.0f;
+ }
+ }
}
-
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
@@ -9602,12 +9775,27 @@ static void expand_keyingsets(FileData *fd, Main *mainvar, ListBase *list)
}
}
+static void expand_animdata_nlastrips(FileData *fd, Main *mainvar, ListBase *list)
+{
+ NlaStrip *strip;
+
+ for (strip= list->first; strip; strip= strip->next) {
+ /* check child strips */
+ expand_animdata_nlastrips(fd, mainvar, &strip->strips);
+
+ /* relink referenced action */
+ expand_doit(fd, mainvar, strip->act);
+ }
+}
+
static void expand_animdata(FileData *fd, Main *mainvar, AnimData *adt)
{
FCurve *fcd;
+ NlaTrack *nlt;
/* own action */
expand_doit(fd, mainvar, adt->action);
+ expand_doit(fd, mainvar, adt->tmpact);
/* drivers - assume that these F-Curves have driver data to be in this list... */
for (fcd= adt->drivers.first; fcd; fcd= fcd->next) {
@@ -9617,6 +9805,10 @@ static void expand_animdata(FileData *fd, Main *mainvar, AnimData *adt)
for (dtar= driver->targets.first; dtar; dtar= dtar->next)
expand_doit(fd, mainvar, dtar->id);
}
+
+ /* nla-data - referenced actions */
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next)
+ expand_animdata_nlastrips(fd, mainvar, &nlt->strips);
}
static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSettings *part)
@@ -9625,6 +9817,8 @@ static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSetting
expand_doit(fd, mainvar, part->dup_group);
expand_doit(fd, mainvar, part->eff_group);
expand_doit(fd, mainvar, part->bb_ob);
+
+ expand_animdata(fd, mainvar, part->adt);
}
static void expand_group(FileData *fd, Main *mainvar, Group *group)
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ef7fb0bdd9d..c7cc1aacb18 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -382,6 +382,7 @@ static void writedata(WriteData *wd, int filecode, int len, void *adr) /* do not
/*These functions are used by blender's .blend system for file saving/loading.*/
void IDP_WriteProperty_OnlyData(IDProperty *prop, void *wd);
void IDP_WriteProperty(IDProperty *prop, void *wd);
+static void write_animdata(WriteData *wd, AnimData *adt); // XXX code needs reshuffling, but not before NLA SoC is merged back into 2.5
static void IDP_WriteArray(IDProperty *prop, void *wd)
{
@@ -549,6 +550,25 @@ static void write_userdef(WriteData *wd)
}
}
+/* TODO: replace *cache with *cachelist once it's coded */
+#define PTCACHE_WRITE_PSYS 0
+#define PTCACHE_WRITE_CLOTH 1
+static void write_pointcaches(WriteData *wd, PointCache *cache, int type)
+{
+ writestruct(wd, DATA, "PointCache", 1, cache);
+
+ if((cache->flag & PTCACHE_DISK_CACHE)==0) {
+ PTCacheMem *pm = cache->mem_cache.first;
+
+ for(; pm; pm=pm->next) {
+ writestruct(wd, DATA, "PTCacheMem", 1, pm);
+ if(type==PTCACHE_WRITE_PSYS)
+ writestruct(wd, DATA, "ParticleKey", pm->totpoint, pm->data);
+ else if(type==PTCACHE_WRITE_CLOTH)
+ writedata(wd, DATA, 9 * sizeof(float) * pm->totpoint, pm->data);
+ }
+ }
+}
static void write_particlesettings(WriteData *wd, ListBase *idbase)
{
ParticleSettings *part;
@@ -559,6 +579,7 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
/* write LibData */
writestruct(wd, ID_PA, "ParticleSettings", 1, part);
if (part->id.properties) IDP_WriteProperty(part->id.properties, wd);
+ if (part->adt) write_animdata(wd, part->adt);
writestruct(wd, DATA, "PartDeflect", 1, part->pd);
writestruct(wd, DATA, "PartDeflect", 1, part->pd2);
}
@@ -568,6 +589,7 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
static void write_particlesystems(WriteData *wd, ListBase *particles)
{
ParticleSystem *psys= particles->first;
+ KeyedParticleTarget *kpt;
int a;
for(; psys; psys=psys->next) {
@@ -583,10 +605,14 @@ static void write_particlesystems(WriteData *wd, ListBase *particles)
writestruct(wd, DATA, "HairKey", pa->totkey, pa->hair);
}
}
+ kpt = psys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next)
+ writestruct(wd, DATA, "KeyedParticleTarget", 1, kpt);
+
if(psys->child) writestruct(wd, DATA, "ChildParticle", psys->totchild ,psys->child);
writestruct(wd, DATA, "SoftBody", 1, psys->soft);
- if(psys->soft) writestruct(wd, DATA, "PointCache", 1, psys->soft->pointcache);
- writestruct(wd, DATA, "PointCache", 1, psys->pointcache);
+ if(psys->soft) write_pointcaches(wd, psys->soft->pointcache, PTCACHE_WRITE_PSYS);
+ write_pointcaches(wd, psys->pointcache, PTCACHE_WRITE_PSYS);
}
}
@@ -760,10 +786,59 @@ static void write_actuators(WriteData *wd, ListBase *lb)
}
}
+static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
+{
+ FModifier *fcm;
+
+ /* Modifiers */
+ for (fcm= fmodifiers->first; fcm; fcm= fcm->next) {
+ FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
+
+ /* Write the specific data */
+ if (fmi && fcm->data) {
+ /* firstly, just write the plain fmi->data struct */
+ writestruct(wd, DATA, fmi->structName, 1, fcm->data);
+
+ /* do any modifier specific stuff */
+ switch (fcm->type) {
+ case FMODIFIER_TYPE_GENERATOR:
+ {
+ FMod_Generator *data= (FMod_Generator *)fcm->data;
+
+ /* write coefficients array */
+ if (data->coefficients)
+ writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients);
+ }
+ break;
+ case FMODIFIER_TYPE_ENVELOPE:
+ {
+ FMod_Envelope *data= (FMod_Envelope *)fcm->data;
+
+ /* write envelope data */
+ if (data->data)
+ writedata(wd, DATA, sizeof(FCM_EnvelopeData)*(data->totvert), data->data);
+ }
+ break;
+ case FMODIFIER_TYPE_PYTHON:
+ {
+ FMod_Python *data = (FMod_Python *)fcm->data;
+
+ /* Write ID Properties -- and copy this comment EXACTLY for easy finding
+ of library blocks that implement this.*/
+ IDP_WriteProperty(data->prop, wd);
+ }
+ break;
+ }
+ }
+
+ /* Write the modifier */
+ writestruct(wd, DATA, "FModifier", 1, fcm);
+ }
+}
+
static void write_fcurves(WriteData *wd, ListBase *fcurves)
{
FCurve *fcu;
- FModifier *fcm;
for (fcu=fcurves->first; fcu; fcu=fcu->next) {
/* F-Curve */
@@ -794,50 +869,8 @@ static void write_fcurves(WriteData *wd, ListBase *fcurves)
}
}
- /* Modifiers */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* Write the specific data */
- if (fmi && fcm->data) {
- /* firstly, just write the plain fmi->data struct */
- writestruct(wd, DATA, fmi->structName, 1, fcm->data);
-
- /* do any modifier specific stuff */
- switch (fcm->type) {
- case FMODIFIER_TYPE_GENERATOR:
- {
- FMod_Generator *data= (FMod_Generator *)fcm->data;
-
- /* write coefficients array */
- if (data->coefficients)
- writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients);
- }
- break;
- case FMODIFIER_TYPE_ENVELOPE:
- {
- FMod_Envelope *data= (FMod_Envelope *)fcm->data;
-
- /* write envelope data */
- if (data->data)
- writedata(wd, DATA, sizeof(FCM_EnvelopeData)*(data->totvert), data->data);
- }
- break;
- case FMODIFIER_TYPE_PYTHON:
- {
- FMod_Python *data = (FMod_Python *)fcm->data;
-
- /* Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
- IDP_WriteProperty(data->prop, wd);
- }
- break;
- }
- }
-
- /* Write the modifier */
- writestruct(wd, DATA, "FModifier", 1, fcm);
- }
+ /* write F-Modifiers */
+ write_fmodifiers(wd, &fcu->modifiers);
}
}
@@ -888,6 +921,37 @@ static void write_keyingsets(WriteData *wd, ListBase *list)
}
}
+static void write_nlastrips(WriteData *wd, ListBase *strips)
+{
+ NlaStrip *strip;
+
+ for (strip= strips->first; strip; strip= strip->next) {
+ /* write the strip first */
+ writestruct(wd, DATA, "NlaStrip", 1, strip);
+
+ /* write the strip's F-Curves and modifiers */
+ write_fcurves(wd, &strip->fcurves);
+ write_fmodifiers(wd, &strip->modifiers);
+
+ /* write the strip's children */
+ write_nlastrips(wd, &strip->strips);
+ }
+}
+
+static void write_nladata(WriteData *wd, ListBase *nlabase)
+{
+ NlaTrack *nlt;
+
+ /* write all the tracks */
+ for (nlt= nlabase->first; nlt; nlt= nlt->next) {
+ /* write the track first */
+ writestruct(wd, DATA, "NlaTrack", 1, nlt);
+
+ /* write the track's strips */
+ write_nlastrips(wd, &nlt->strips);
+ }
+}
+
static void write_animdata(WriteData *wd, AnimData *adt)
{
AnimOverride *aor;
@@ -899,14 +963,17 @@ static void write_animdata(WriteData *wd, AnimData *adt)
write_fcurves(wd, &adt->drivers);
/* write overrides */
+ // FIXME: are these needed?
for (aor= adt->overrides.first; aor; aor= aor->next) {
/* overrides consist of base data + rna_path */
writestruct(wd, DATA, "AnimOverride", 1, aor);
writedata(wd, DATA, strlen(aor->rna_path)+1, aor->rna_path);
}
+ // TODO write the remaps (if they are needed)
+
/* write NLA data */
- // XXX todo...
+ write_nladata(wd, &adt->nla_tracks);
}
static void write_constraints(WriteData *wd, ListBase *conlist)
@@ -1007,7 +1074,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase, int write_undo)
writestruct(wd, DATA, "ClothSimSettings", 1, clmd->sim_parms);
writestruct(wd, DATA, "ClothCollSettings", 1, clmd->coll_parms);
- writestruct(wd, DATA, "PointCache", 1, clmd->point_cache);
+ write_pointcaches(wd, clmd->point_cache, PTCACHE_WRITE_CLOTH);
}
else if(md->type==eModifierType_Fluidsim) {
FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
@@ -1064,6 +1131,7 @@ static void write_objects(WriteData *wd, ListBase *idbase, int write_undo)
/* direct data */
writedata(wd, DATA, sizeof(void *)*ob->totcol, ob->mat);
+ writedata(wd, DATA, sizeof(char)*ob->totcol, ob->matbits);
/* write_effects(wd, &ob->effect); */ /* not used anymore */
write_properties(wd, &ob->prop);
write_sensors(wd, &ob->sensors);
@@ -1420,7 +1488,10 @@ static void write_images(WriteData *wd, ListBase *idbase)
write_previews(wd, ima->preview);
- }
+ /* exception: render text only saved in undo files (wd->current) */
+ if (ima->render_text && wd->current)
+ writedata(wd, DATA, IMA_RW_MAXTEXT, ima->render_text);
+ }
ima= ima->id.next;
}
/* flush helps the compression for undo-save */
@@ -1586,7 +1657,6 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
base= base->next;
}
- writestruct(wd, DATA, "Radio", 1, sce->radio);
writestruct(wd, DATA, "ToolSettings", 1, sce->toolsettings);
if(sce->toolsettings->vpaint)
writestruct(wd, DATA, "VPaint", 1, sce->toolsettings->vpaint);
@@ -1878,7 +1948,10 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
writestruct(wd, DATA, "SpaceSound", 1, sl);
}
else if(sl->spacetype==SPACE_NLA){
- writestruct(wd, DATA, "SpaceNla", 1, sl);
+ SpaceNla *snla= (SpaceNla *)sl;
+
+ writestruct(wd, DATA, "SpaceNla", 1, snla);
+ if(snla->ads) writestruct(wd, DATA, "bDopeSheet", 1, snla->ads);
}
else if(sl->spacetype==SPACE_TIME){
writestruct(wd, DATA, "SpaceTime", 1, sl);
@@ -1886,6 +1959,9 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
else if(sl->spacetype==SPACE_NODE){
writestruct(wd, DATA, "SpaceNode", 1, sl);
}
+ else if(sl->spacetype==SPACE_LOGIC){
+ writestruct(wd, DATA, "SpaceLogic", 1, sl);
+ }
sl= sl->next;
}
}
diff --git a/source/blender/blenpluginapi/intern/Makefile b/source/blender/blenpluginapi/intern/Makefile
index 51905cad8ec..20a61e9a25c 100644
--- a/source/blender/blenpluginapi/intern/Makefile
+++ b/source/blender/blenpluginapi/intern/Makefile
@@ -33,10 +33,6 @@ DIR = $(OCGDIR)/blender/$(LIBNAME)
include nan_compile.mk
-ifeq ($(OS),$(findstring $(OS), "beos darwin freebsd linux openbsd solaris"))
- CFLAGS += -shared
-endif
-
CFLAGS += $(LEVEL_1_C_WARNINGS)
# path to our own external headerfiles. On win2k this needs to be
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index 06665d4b8ba..443e04c8711 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -306,6 +306,9 @@ int BM_Dissolve_Vert(BMesh *bm, BMVert *v);
void BM_Data_Interp_From_Verts(struct BMesh *bm, struct BMVert *v1, struct BMVert *v2, struct BMVert *v, float fac);
void BM_Data_Facevert_Edgeinterp(struct BMesh *bm, struct BMVert *v1, struct BMVert *v2, struct BMVert *v, struct BMEdge *e1, float fac);
//void bmesh_data_interp_from_face(struct BMesh *bm, struct BMFace *source, struct BMFace *target);
+void BM_add_data_layer(BMesh *em, CustomData *data, int type);
+void BM_free_data_layer(BMesh *em, CustomData *data, int type);
+
/*computes the centroid of a face, using the center of the bounding box*/
int BM_Compute_Face_Center(BMesh *bm, BMFace *f, float center[3]);
diff --git a/source/blender/bmesh/bmesh_operators.h b/source/blender/bmesh/bmesh_operators.h
index e7d801b9beb..3ef229f00c6 100644
--- a/source/blender/bmesh/bmesh_operators.h
+++ b/source/blender/bmesh/bmesh_operators.h
@@ -27,11 +27,8 @@ struct Object;
struct EditMesh;
void BMOP_DupeFromFlag(struct BMesh *bm, int etypeflag, int flag);
-void BM_esubdivideflag(struct Object *obedit, struct BMesh *bm, int selflag, float rad,
- int flag, int numcuts, int seltype);
-void BM_esubdivideflag_conv(struct Object *obedit, struct EditMesh *em,
- int selflag, float rad, int flag, int numcuts,
- int seltype);
+void BM_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float smooth,
+ float fractal, int beauty, int numcuts, int seltype);
void BM_extrudefaceflag(BMesh *bm, int flag);
/*this next one return 1 if they did anything, or zero otherwise.
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 6dc116dc7cd..ae0904a75df 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -164,3 +164,83 @@ void BM_loops_to_corners(BMesh *bm, Mesh *me, int findex,
//
//}
/*insert BM_data_interp_from_face here for mean value coordinates...*/
+
+
+static void update_data_blocks(BMesh *bm, CustomData *olddata, CustomData *data)
+{
+ BMIter iter;
+ void *block;
+
+ if (data == &bm->vdata) {
+ BMVert *eve;
+
+ BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+ block = NULL;
+ CustomData_bmesh_set_default(data, &block);
+ CustomData_bmesh_copy_data(olddata, data, eve->head.data, &block);
+ CustomData_bmesh_free_block(olddata, &eve->head.data);
+ eve->head.data= block;
+ }
+ }
+ else if (data == &bm->edata) {
+ BMEdge *eed;
+
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+ block = NULL;
+ CustomData_bmesh_set_default(data, &block);
+ CustomData_bmesh_copy_data(olddata, data, eed->head.data, &block);
+ CustomData_bmesh_free_block(olddata, &eed->head.data);
+ eed->head.data= block;
+ }
+ }
+ else if (data == &bm->pdata || data == &bm->ldata) {
+ BMIter liter;
+ BMFace *efa;
+ BMLoop *l;
+
+ BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
+ if (data == &bm->pdata) {
+ block = NULL;
+ CustomData_bmesh_set_default(data, &block);
+ CustomData_bmesh_copy_data(olddata, data, efa->head.data, &block);
+ CustomData_bmesh_free_block(olddata, &efa->head.data);
+ efa->head.data= block;
+ }
+
+ if (data == &bm->ldata) {
+ BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, efa) {
+ block = NULL;
+ CustomData_bmesh_set_default(data, &block);
+ CustomData_bmesh_copy_data(olddata, data, l->head.data, &block);
+ CustomData_bmesh_free_block(olddata, &l->head.data);
+ l->head.data= block;
+ }
+ }
+ }
+ }
+}
+
+
+void BM_add_data_layer(BMesh *bm, CustomData *data, int type)
+{
+ CustomData olddata;
+
+ olddata= *data;
+ olddata.layers= (olddata.layers)? MEM_dupallocN(olddata.layers): NULL;
+ CustomData_add_layer(data, type, CD_CALLOC, NULL, 0);
+
+ update_data_blocks(bm, &olddata, data);
+ if (olddata.layers) MEM_freeN(olddata.layers);
+}
+
+void BM_free_data_layer(BMesh *bm, CustomData *data, int type)
+{
+ CustomData olddata;
+
+ olddata= *data;
+ olddata.layers= (olddata.layers)? MEM_dupallocN(olddata.layers): NULL;
+ CustomData_free_layer_active(data, type, 0);
+
+ update_data_blocks(bm, &olddata, data);
+ if (olddata.layers) MEM_freeN(olddata.layers);
+} \ No newline at end of file
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 8c89697f5f2..07f1144b37e 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -226,8 +226,9 @@ BMOpDefine def_subdop = {
"esubd",
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"},
{BMOP_OPSLOT_INT, "numcuts"},
- {BMOP_OPSLOT_INT, "flag"},
- {BMOP_OPSLOT_FLT, "radius"},
+ {BMOP_OPSLOT_FLT, "smooth"},
+ {BMOP_OPSLOT_FLT, "fractal"},
+ {BMOP_OPSLOT_INT, "beauty"},
{BMOP_OPSLOT_MAPPING, "custompatterns"},
{BMOP_OPSLOT_MAPPING, "edgepercents"},
diff --git a/source/blender/bmesh/operators/subdivideop.c b/source/blender/bmesh/operators/subdivideop.c
index 549146af1b7..8482fecb7bb 100644
--- a/source/blender/bmesh/operators/subdivideop.c
+++ b/source/blender/bmesh/operators/subdivideop.c
@@ -86,54 +86,55 @@ static void alter_co(float *co, BMEdge *edge, subdparams *params, float perc,
BMVert *vsta, BMVert *vend)
{
float vec1[3], fac;
-
- if(params->flag & B_SMOOTH) {
+
+ if(params->beauty & B_SMOOTH) {
/* we calculate an offset vector vec1[], to be added to *co */
- float len, fac, nor[3], nor1[3], nor2[3];
-
+ float len, fac, nor[3], nor1[3], nor2[3], smooth=params->smooth;
+
VecSubf(nor, vsta->co, vend->co);
len= 0.5f*Normalize(nor);
-
+
VECCOPY(nor1, vsta->no);
VECCOPY(nor2, vend->no);
-
+
/* cosine angle */
fac= nor[0]*nor1[0] + nor[1]*nor1[1] + nor[2]*nor1[2] ;
-
+
vec1[0]= fac*nor1[0];
vec1[1]= fac*nor1[1];
vec1[2]= fac*nor1[2];
-
+
/* cosine angle */
fac= -nor[0]*nor2[0] - nor[1]*nor2[1] - nor[2]*nor2[2] ;
-
+
vec1[0]+= fac*nor2[0];
vec1[1]+= fac*nor2[1];
vec1[2]+= fac*nor2[2];
-
- vec1[0]*= params->rad*len;
- vec1[1]*= params->rad*len;
- vec1[2]*= params->rad*len;
-
+
+ /* falloff for multi subdivide */
+ smooth *= sqrt(fabs(1.0f - 2.0f*fabs(perc)));
+
+ vec1[0]*= smooth*len;
+ vec1[1]*= smooth*len;
+ vec1[2]*= smooth*len;
+
co[0] += vec1[0];
co[1] += vec1[1];
co[2] += vec1[2];
}
- else {
- if(params->rad > 0.0) { /* subdivide sphere */
- Normalize(co);
- co[0]*= params->rad;
- co[1]*= params->rad;
- co[2]*= params->rad;
- }
- else if(params->rad< 0.0) { /* fractal subdivide */
- fac= params->rad* VecLenf(vsta->co, vend->co);
- vec1[0]= fac*(float)(0.5-BLI_drand());
- vec1[1]= fac*(float)(0.5-BLI_drand());
- vec1[2]= fac*(float)(0.5-BLI_drand());
- VecAddf(co, co, vec1);
- }
+ else if(params->beauty & B_SPHERE) { /* subdivide sphere */
+ Normalize(co);
+ co[0]*= params->smooth;
+ co[1]*= params->smooth;
+ co[2]*= params->smooth;
+ }
+ if(params->beauty & B_FRACTAL) {
+ fac= params->fractal*VecLenf(vsta->co, vend->co);
+ vec1[0]= fac*(float)(0.5-BLI_drand());
+ vec1[1]= fac*(float)(0.5-BLI_drand());
+ vec1[2]= fac*(float)(0.5-BLI_drand());
+ VecAddf(co, co, vec1);
}
}
@@ -622,14 +623,16 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
subdparams params;
subd_facedata *facedata = NULL;
V_DECLARE(facedata);
- float rad;
- int i, j, matched, a, b, numcuts, flag;
+ float smooth, fractal;
+ int beauty;
+ int i, j, matched, a, b, numcuts;
BMO_Flag_Buffer(bmesh, op, "edges", SUBD_SPLIT);
numcuts = BMO_GetSlot(op, "numcuts")->data.i;
- flag = BMO_GetSlot(op, "flag")->data.i;
- rad = BMO_GetSlot(op, "radius")->data.f;
+ smooth = BMO_GetSlot(op, "smooth")->data.f;
+ fractal = BMO_GetSlot(op, "fractal")->data.f;
+ beauty = BMO_GetSlot(op, "beauty")->data.i;
einput = BMO_GetSlot(op, "edges");
@@ -637,10 +640,11 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
BMO_Flag_To_Slot(bmesh, op, "edges",
SUBD_SPLIT, BM_EDGE);
- params.flag = flag;
params.numcuts = numcuts;
params.op = op;
- params.rad = rad;
+ params.smooth = smooth;
+ params.fractal = fractal;
+ params.beauty = beauty;
BMO_Mapping_To_Flag(bmesh, op, "custompatterns",
FACE_CUSTOMFILL);
@@ -781,15 +785,16 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
}
/*editmesh-emulating function*/
-void BM_esubdivideflag(Object *obedit, BMesh *bm, int selflag, float rad,
- int flag, int numcuts, int seltype) {
+void BM_esubdivideflag(Object *obedit, BMesh *bm, int flag, float smooth,
+ float fractal, int beauty, int numcuts, int seltype) {
BMOperator op;
- BMO_InitOpf(bm, &op, "esubd edges=%he flag=%d radius=%f numcuts=%d",
- selflag, flag, rad, numcuts);
-
+ BMO_InitOpf(bm, &op, "esubd edges=%he smooth=%f fractal=%f "
+ "beauty=%d numcuts=%d", flag, smooth, fractal,
+ beauty, numcuts);
+
BMO_Exec_Op(bm, &op);
-
+
if (seltype == SUBDIV_SELECT_INNER) {
BMOIter iter;
BMHeader *ele;
@@ -803,6 +808,7 @@ void BM_esubdivideflag(Object *obedit, BMesh *bm, int selflag, float rad,
BMO_Finish_Op(bm, &op);
}
+#if 0
void BM_esubdivideflag_conv(Object *obedit,EditMesh *em,int selflag, float rad,
int flag, int numcuts, int seltype) {
BMesh *bm = editmesh_to_bmesh(em);
@@ -815,4 +821,5 @@ void BM_esubdivideflag_conv(Object *obedit,EditMesh *em,int selflag, float rad,
*em = *em2;
MEM_freeN(em2);
BM_Free_Mesh(bm);
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/source/blender/bmesh/operators/subdivideop.h b/source/blender/bmesh/operators/subdivideop.h
index 7404f189e45..7bb471117d8 100644
--- a/source/blender/bmesh/operators/subdivideop.h
+++ b/source/blender/bmesh/operators/subdivideop.h
@@ -3,8 +3,9 @@
typedef struct subdparams {
int numcuts;
- int flag;
- float rad;
+ float smooth;
+ float fractal;
+ int beauty;
BMOperator *op;
} subdparams;
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index 914fdaa4bc6..b7a868ad537 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -64,6 +64,10 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
+IF(NOT WITH_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ENDIF(NOT WITH_ELBEEM)
+
IF(WITH_PYTHON)
SET(INC ${INC} ${PYTHON_INC})
ELSE(WITH_PYTHON)
diff --git a/source/blender/editors/Makefile b/source/blender/editors/Makefile
index 8a819195fbd..62bf612b09d 100644
--- a/source/blender/editors/Makefile
+++ b/source/blender/editors/Makefile
@@ -29,6 +29,6 @@
# Bounces make to subdirectories.
SOURCEDIR = source/blender/editors
-DIRS = armature mesh animation object sculpt_paint datafiles transform screen curve gpencil physics preview uvedit space_outliner space_time space_view3d interface util space_api space_graph space_image space_node space_buttons space_info space_file space_sound space_action space_nla space_script space_text space_sequencer
+DIRS = armature mesh animation object sculpt_paint datafiles transform screen curve gpencil physics preview uvedit space_outliner space_time space_view3d interface util space_api space_graph space_image space_node space_buttons space_info space_file space_sound space_action space_nla space_script space_text space_sequencer space_logic
include nan_subdirs.mk
diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript
index a99d21b19a4..9baaf7ae7a5 100644
--- a/source/blender/editors/SConscript
+++ b/source/blender/editors/SConscript
@@ -29,6 +29,7 @@ SConscript(['datafiles/SConscript',
'space_script/SConscript',
'space_text/SConscript',
'space_sequencer/SConscript',
+ 'space_logic/SConscript',
'transform/SConscript',
'screen/SConscript',
'sculpt_paint/SConscript',
diff --git a/source/blender/editors/animation/Makefile b/source/blender/editors/animation/Makefile
index 19b62891b63..a7f36aa58ac 100644
--- a/source/blender/editors/animation/Makefile
+++ b/source/blender/editors/animation/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/animation/anim_channels.c b/source/blender/editors/animation/anim_channels.c
index 9e0e50a8de5..6cb00f9285b 100644
--- a/source/blender/editors/animation/anim_channels.c
+++ b/source/blender/editors/animation/anim_channels.c
@@ -1,5 +1,5 @@
/**
- * $Id: editaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -63,9 +63,10 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_depsgraph.h"
-#include "BKE_ipo.h"
+#include "BKE_fcurve.h"
#include "BKE_key.h"
#include "BKE_material.h"
#include "BKE_object.h"
@@ -87,43 +88,16 @@
/* ************************************************************************** */
/* CHANNELS API */
-/* -------------------------- Internal Macros ------------------------------- */
-
-/* set/clear/toggle macro
- * - channel - channel with a 'flag' member that we're setting
- * - smode - 0=clear, 1=set, 2=toggle
- * - sflag - bitflag to set
- */
-#define ACHANNEL_SET_FLAG(channel, smode, sflag) \
- { \
- if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^= (sflag); \
- else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \
- else (channel)->flag &= ~(sflag); \
- }
-
-/* set/clear/toggle macro, where the flag is negative
- * - channel - channel with a 'flag' member that we're setting
- * - smode - 0=clear, 1=set, 2=toggle
- * - sflag - bitflag to set
- */
-#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
- { \
- if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^= (sflag); \
- else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \
- else (channel)->flag |= (sflag); \
- }
-
/* -------------------------- Exposed API ----------------------------------- */
/* Set the given animation-channel as the active one for the active context */
-void ANIM_set_active_channel (void *data, short datatype, int filter, void *channel_data, short channel_type)
+void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
/* try to build list of filtered items */
- // XXX we don't need/supply animcontext for now, since in this case, there's nothing really essential there that isn't already covered
- ANIM_animdata_filter(NULL, &anim_data, filter, data, datatype);
+ ANIM_animdata_filter(ac, &anim_data, filter, data, datatype);
if (anim_data.first == NULL)
return;
@@ -149,11 +123,18 @@ void ANIM_set_active_channel (void *data, short datatype, int filter, void *chan
ACHANNEL_SET_FLAG(fcu, ACHANNEL_SETFLAG_CLEAR, FCURVE_ACTIVE);
}
break;
+ case ANIMTYPE_NLATRACK:
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE);
+ }
+ break;
}
}
/* set active flag */
- if (channel_data) {
+ if (channel_data != NULL) {
switch (channel_type) {
case ANIMTYPE_GROUP:
{
@@ -167,6 +148,12 @@ void ANIM_set_active_channel (void *data, short datatype, int filter, void *chan
fcu->flag |= FCURVE_ACTIVE;
}
break;
+ case ANIMTYPE_NLATRACK:
+ {
+ NlaTrack *nlt= (NlaTrack *)channel_data;
+ nlt->flag |= NLATRACK_ACTIVE;
+ }
+ break;
}
}
@@ -217,6 +204,10 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
if (ale->flag & FCURVE_SELECTED)
sel= ACHANNEL_SETFLAG_CLEAR;
break;
+ case ANIMTYPE_NLATRACK:
+ if (ale->flag & NLATRACK_SELECTED)
+ sel= ACHANNEL_SETFLAG_CLEAR;
+ break;
}
}
}
@@ -263,6 +254,14 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
fcu->flag &= ~FCURVE_ACTIVE;
}
break;
+ case ANIMTYPE_NLATRACK:
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ ACHANNEL_SET_FLAG(nlt, sel, NLATRACK_SELECTED);
+ nlt->flag &= ~NLATRACK_ACTIVE;
+ }
+ break;
}
}
@@ -273,6 +272,47 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
/* ************************************************************************** */
/* OPERATORS */
+/* ****************** Operator Utilities ********************************** */
+
+/* poll callback for being in an Animation Editor channels list region */
+int animedit_poll_channels_active (bContext *C)
+{
+ ScrArea *sa= CTX_wm_area(C);
+
+ /* channels region test */
+ // TODO: could enhance with actually testing if channels region?
+ if (ELEM(NULL, sa, CTX_wm_region(C)))
+ return 0;
+ /* animation editor test */
+ if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
+ return 0;
+
+ return 1;
+}
+
+/* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */
+int animedit_poll_channels_nla_tweakmode_off (bContext *C)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+
+ /* channels region test */
+ // TODO: could enhance with actually testing if channels region?
+ if (ELEM(NULL, sa, CTX_wm_region(C)))
+ return 0;
+ /* animation editor test */
+ if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
+ return 0;
+
+ /* NLA TweakMode test */
+ if (sa->spacetype == SPACE_NLA) {
+ if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON))
+ return 0;
+ }
+
+ return 1;
+}
+
/* ****************** Rearrange Channels Operator ******************* */
/* This operator only works for Action Editor mode for now, as having it elsewhere makes things difficult */
@@ -575,8 +615,8 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
mode= RNA_enum_get(op->ptr, "direction");
rearrange_action_channels(&ac, mode);
- /* set notifier tha things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -652,6 +692,122 @@ void ANIM_OT_channels_move_bottom (wmOperatorType *ot)
#endif // XXX old animation system - needs to be updated for new system...
+/* ******************** Delete Channel Operator *********************** */
+
+static int animchannels_delete_exec(bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* cannot delete in shapekey */
+ if (ac.datatype == ANIMCONT_SHAPEKEY)
+ return OPERATOR_CANCELLED;
+
+
+ /* do groups only first (unless in Drivers mode, where there are none) */
+ if (ac.datatype != ANIMCONT_DRIVERS) {
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CHANNELS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* delete selected groups and their associated channels */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* only groups - don't check other types yet, since they may no-longer exist */
+ if (ale->type == ANIMTYPE_GROUP) {
+ bActionGroup *agrp= (bActionGroup *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ FCurve *fcu, *fcn;
+
+ /* skip this group if no AnimData available, as we can't safely remove the F-Curves */
+ if (adt == NULL)
+ continue;
+
+ /* delete all of the Group's F-Curves, but no others */
+ for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcn) {
+ fcn= fcu->next;
+
+ /* remove from group and action, then free */
+ action_groups_remove_channel(adt->action, fcu);
+ free_fcurve(fcu);
+ }
+
+ /* free the group itself */
+ if (adt->action)
+ BLI_freelinkN(&adt->action->groups, agrp);
+ else
+ MEM_freeN(agrp);
+ }
+ }
+
+ /* cleanup */
+ BLI_freelistN(&anim_data);
+ }
+
+ /* now do F-Curves */
+ if (ac.datatype != ANIMCONT_GPENCIL) {
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* delete selected F-Curves */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* only F-Curves, and only if we can identify its parent */
+ if (ale->type == ANIMTYPE_FCURVE) {
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ FCurve *fcu= (FCurve *)ale->data;
+
+ /* if no AnimData, we've got nowhere to remove the F-Curve from */
+ if (adt == NULL)
+ continue;
+
+ /* remove from whatever list it came from
+ * - Action Group
+ * - Action
+ * - Drivers
+ * - TODO... some others?
+ */
+ if (fcu->grp)
+ action_groups_remove_channel(adt->action, fcu);
+ else if (adt->action)
+ BLI_remlink(&adt->action->curves, fcu);
+ else if (ac.datatype == ANIMCONT_DRIVERS)
+ BLI_remlink(&adt->drivers, fcu);
+
+ /* free the F-Curve itself */
+ free_fcurve(fcu);
+ }
+ }
+
+ /* cleanup */
+ BLI_freelistN(&anim_data);
+ }
+
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void ANIM_OT_channels_delete (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Delete Channels";
+ ot->idname= "ANIM_OT_channels_delete";
+ ot->description= "Delete all selected animation channels.";
+
+ /* api callbacks */
+ ot->exec= animchannels_delete_exec;
+ ot->poll= animedit_poll_channels_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
/* ******************** Toggle Channel Visibility Operator *********************** */
@@ -668,7 +824,7 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* See if we should be making showing all selected or hiding */
@@ -676,21 +832,35 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *op)
if (vis == ACHANNEL_SETFLAG_CLEAR)
break;
- if (ale->flag & FCURVE_VISIBLE)
+ if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_VISIBLE))
+ vis= ACHANNEL_SETFLAG_CLEAR;
+ else if ((ale->type == ANIMTYPE_GROUP) && !(ale->flag & AGRP_NOTVISIBLE))
vis= ACHANNEL_SETFLAG_CLEAR;
}
/* Now set the flags */
for (ale= anim_data.first; ale; ale= ale->next) {
- FCurve *fcu= (FCurve *)ale->data;
- ACHANNEL_SET_FLAG(fcu, vis, FCURVE_VISIBLE);
+ switch (ale->type) {
+ case ANIMTYPE_FCURVE: /* F-Curve */
+ {
+ FCurve *fcu= (FCurve *)ale->data;
+ ACHANNEL_SET_FLAG(fcu, vis, FCURVE_VISIBLE);
+ }
+ break;
+ case ANIMTYPE_GROUP: /* Group */
+ {
+ bActionGroup *agrp= (bActionGroup *)ale->data;
+ ACHANNEL_SET_FLAG_NEG(agrp, vis, AGRP_NOTVISIBLE);
+ }
+ break;
+ }
}
/* cleanup */
BLI_freelistN(&anim_data);
- /* set notifier tha things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -700,6 +870,7 @@ void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
/* identifiers */
ot->name= "Toggle Visibility";
ot->idname= "ANIM_OT_channels_visibility_toggle";
+ ot->description= "Toggle visibility in Graph Editor of all selected animation channels.";
/* api callbacks */
ot->exec= animchannels_visibility_toggle_exec;
@@ -721,17 +892,17 @@ enum {
/* defines for setting animation-channel flags */
EnumPropertyItem prop_animchannel_setflag_types[] = {
- {ACHANNEL_SETFLAG_CLEAR, "DISABLE", "Disable", ""},
- {ACHANNEL_SETFLAG_ADD, "ENABLE", "Enable", ""},
- {ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", "Toggle", ""},
- {0, NULL, NULL, NULL}
+ {ACHANNEL_SETFLAG_CLEAR, "DISABLE", 0, "Disable", ""},
+ {ACHANNEL_SETFLAG_ADD, "ENABLE", 0, "Enable", ""},
+ {ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", 0, "Toggle", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* defines for set animation-channel settings */
EnumPropertyItem prop_animchannel_settings_types[] = {
- {ACHANNEL_SETTING_PROTECT, "PROTECT", "Protect", ""},
- {ACHANNEL_SETTING_MUTE, "MUTE", "Mute", ""},
- {0, NULL, NULL, NULL}
+ {ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""},
+ {ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""},
+ {0, NULL, 0, NULL, NULL}
};
@@ -889,6 +1060,12 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
case ACHANNEL_SETTING_EXPAND:
ACHANNEL_SET_FLAG(agrp, mode, AGRP_EXPANDED);
break;
+ case ACHANNEL_SETTING_MUTE:
+ ACHANNEL_SET_FLAG(agrp, mode, AGRP_MUTED);
+ break;
+ case ACHANNEL_SETTING_VISIBLE:
+ ACHANNEL_SET_FLAG_NEG(agrp, mode, AGRP_NOTVISIBLE);
+ break;
}
}
break;
@@ -947,8 +1124,8 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
/* modify setting */
setflag_anim_channels(&ac, setting, mode, 1);
- /* set notifier tha things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -959,11 +1136,12 @@ void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
/* identifiers */
ot->name= "Enable Channel Setting";
ot->idname= "ANIM_OT_channels_setting_enable";
+ ot->description= "Enable specified setting on all selected animation channels.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= animchannels_setflag_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -980,11 +1158,12 @@ void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
/* identifiers */
ot->name= "Disable Channel Setting";
ot->idname= "ANIM_OT_channels_setting_disable";
+ ot->description= "Disable specified setting on all selected animation channels.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= animchannels_setflag_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1001,11 +1180,12 @@ void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
/* identifiers */
ot->name= "Toggle Channel Setting";
ot->idname= "ANIM_OT_channels_setting_toggle";
+ ot->description= "Toggle specified setting on all selected animation channels.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= animchannels_setflag_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1023,10 +1203,11 @@ void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
/* identifiers */
ot->name= "Toggle Channel Editability";
ot->idname= "ANIM_OT_channels_editable_toggle";
+ ot->description= "Toggle editability of selected channels.";
/* api callbacks */
ot->exec= animchannels_setflag_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1056,8 +1237,8 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op)
/* modify setting */
setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_ADD, onlysel);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1067,10 +1248,11 @@ void ANIM_OT_channels_expand (wmOperatorType *ot)
/* identifiers */
ot->name= "Expand Channels";
ot->idname= "ANIM_OT_channels_expand";
+ ot->description= "Expand (i.e. open) all selected expandable animation channels.";
/* api callbacks */
ot->exec= animchannels_expand_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1097,8 +1279,8 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op)
/* modify setting */
setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_CLEAR, onlysel);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1108,10 +1290,11 @@ void ANIM_OT_channels_collapse (wmOperatorType *ot)
/* identifiers */
ot->name= "Collapse Channels";
ot->idname= "ANIM_OT_channels_collapse";
+ ot->description= "Collapse (i.e. close) all selected expandable animation channels.";
/* api callbacks */
ot->exec= animchannels_collapse_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1136,8 +1319,8 @@ static int animchannels_deselectall_exec(bContext *C, wmOperator *op)
else
ANIM_deselect_anim_channels(ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_ADD);
- /* set notifier tha things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_SELECT, NULL);
return OPERATOR_FINISHED;
}
@@ -1147,10 +1330,11 @@ void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
/* identifiers */
ot->name= "Select All";
ot->idname= "ANIM_OT_channels_select_all_toggle";
+ ot->description= "Toggle selection of all animation channels.";
/* api callbacks */
ot->exec= animchannels_deselectall_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_nla_tweakmode_off;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1218,6 +1402,14 @@ static void borderselect_anim_channels (bAnimContext *ac, rcti *rect, short sele
ACHANNEL_SET_FLAG(gpl, selectmode, GP_LAYER_SELECT);
}
break;
+
+ case ANIMTYPE_NLATRACK: /* nla-track */
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ ACHANNEL_SET_FLAG(nlt, selectmode, NLATRACK_SELECTED);
+ }
+ break;
}
}
@@ -1257,6 +1449,9 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
/* apply borderselect animation channels */
borderselect_anim_channels(&ac, &rect, selectmode);
+ /* send notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_SELECT, NULL);
+
return OPERATOR_FINISHED;
}
@@ -1265,13 +1460,14 @@ void ANIM_OT_channels_select_border(wmOperatorType *ot)
/* identifiers */
ot->name= "Border Select";
ot->idname= "ANIM_OT_channels_select_border";
+ ot->description= "Select all animation channels within the specified region.";
/* api callbacks */
ot->invoke= WM_border_select_invoke;
ot->exec= animchannels_borderselect_exec;
ot->modal= WM_border_select_modal;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_nla_tweakmode_off;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1291,11 +1487,12 @@ void ANIM_OT_channels_select_border(wmOperatorType *ot)
* NOTE: eventually, this should probably be phased out when many of these things are replaced with buttons
*/
-static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, short selectmode)
+static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
+ int notifierFlags = 0;
/* get the channel that was clicked on */
/* filter channels */
@@ -1309,7 +1506,7 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index);
BLI_freelistN(&anim_data);
- return;
+ return 0;
}
/* selectmode -1 is a special case for ActionGroups only, which selects all of the channels underneath it only... */
@@ -1317,7 +1514,7 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
if ((selectmode == -1) && (ale->type != ANIMTYPE_GROUP)) {
/* normal channels should not behave normally in this case */
BLI_freelistN(&anim_data);
- return;
+ return 0;
}
/* action to take depends on what channel we've got */
@@ -1329,6 +1526,8 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
if (x < 16) {
/* toggle expand */
sce->flag ^= SCE_DS_COLLAPSED;
+
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else {
/* set selection status */
@@ -1339,6 +1538,8 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
else {
sce->flag |= SCE_DS_SELECTED;
}
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
}
}
break;
@@ -1352,6 +1553,8 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
if (x < 16) {
/* toggle expand */
ob->nlaflag ^= OB_ADS_COLLAPSED; // XXX
+
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else {
/* set selection status */
@@ -1376,6 +1579,8 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* xxx should be ED_base_object_activate(), but we need context pointer for that... */
//set_active_base(base);
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
}
}
break;
@@ -1383,18 +1588,21 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
{
bAction *act= (bAction *)ale->data;
act->flag ^= ACT_COLLAPSED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_FILLDRIVERS:
{
AnimData *adt= (AnimData* )ale->data;
adt->flag ^= ADT_DRIVERS_COLLAPSED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_FILLMATD:
{
Object *ob= (Object *)ale->data;
ob->nlaflag ^= OB_ADS_SHOWMATS; // XXX
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
@@ -1402,36 +1610,42 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
{
Material *ma= (Material *)ale->data;
ma->flag ^= MA_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_DSLAM:
{
Lamp *la= (Lamp *)ale->data;
la->flag ^= LA_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_DSCAM:
{
Camera *ca= (Camera *)ale->data;
ca->flag ^= CAM_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_DSCUR:
{
Curve *cu= (Curve *)ale->data;
cu->flag ^= CU_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_DSSKEY:
{
Key *key= (Key *)ale->data;
key->flag ^= KEYBLOCK_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_DSWOR:
{
World *wo= (World *)ale->data;
wo->flag ^= WO_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
@@ -1443,10 +1657,22 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
if ((x < (offset+17)) && (agrp->channels.first)) {
/* toggle expand */
agrp->flag ^= AGRP_EXPANDED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else if ((x < (offset+32)) && (ac->spacetype==SPACE_IPO)) {
+ /* toggle visibility (of grouped F-Curves in Graph editor) */
+ agrp->flag ^= AGRP_NOTVISIBLE;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
/* toggle protection/locking */
agrp->flag ^= AGRP_PROTECTED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else if (x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) {
+ /* toggle mute */
+ agrp->flag ^= AGRP_MUTED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else {
/* select/deselect group */
@@ -1474,7 +1700,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* if group is selected now, make group the 'active' one in the visible list */
if (agrp->flag & AGRP_SELECTED)
- ANIM_set_active_channel(ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
}
}
break;
@@ -1495,16 +1723,20 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
/* toggle protection (only if there's a toggle there) */
- if (fcu->bezt)
+ if (fcu->bezt) {
fcu->flag ^= FCURVE_PROTECTED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
}
else if (x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) {
/* toggle mute */
fcu->flag ^= FCURVE_MUTED;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else if ((x < (offset+17)) && (ac->spacetype==SPACE_IPO)) {
/* toggle visibility */
fcu->flag ^= FCURVE_VISIBLE;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
else {
/* select/deselect */
@@ -1520,7 +1752,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* if F-Curve is selected now, make F-Curve the 'active' one in the visible list */
if (fcu->flag & FCURVE_SELECTED)
- ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
}
}
break;
@@ -1530,6 +1764,8 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* toggle expand */
gpd->flag ^= GP_DATA_EXPAND;
+
+ notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
case ANIMTYPE_GPLAYER:
@@ -1568,6 +1804,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* free channels */
BLI_freelistN(&anim_data);
+
+ /* return notifier flags */
+ return notifierFlags;
}
/* ------------------- */
@@ -1580,6 +1819,7 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
ARegion *ar;
View2D *v2d;
int mval[2], channel_index;
+ int notifierFlags = 0;
short selectmode;
float x, y;
@@ -1614,10 +1854,10 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
/* handle mouse-click in the relevant channel then */
- mouse_anim_channels(&ac, x, channel_index, selectmode);
+ notifierFlags= mouse_anim_channels(&ac, x, channel_index, selectmode);
- /* set notifier tha things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_CHANNELS);
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|notifierFlags, NULL);
return OPERATOR_FINISHED;
}
@@ -1627,10 +1867,11 @@ void ANIM_OT_channels_click (wmOperatorType *ot)
/* identifiers */
ot->name= "Mouse Click on Channels";
ot->idname= "ANIM_OT_channels_click";
+ ot->description= "Handle mouse-clicks over animation channels.";
/* api callbacks */
ot->invoke= animchannels_mouseclick_invoke;
- ot->poll= ED_operator_areaactive;
+ ot->poll= animedit_poll_channels_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1653,6 +1894,8 @@ void ED_operatortypes_animchannels(void)
WM_operatortype_append(ANIM_OT_channels_setting_disable);
WM_operatortype_append(ANIM_OT_channels_setting_toggle);
+ WM_operatortype_append(ANIM_OT_channels_delete);
+
// XXX does this need to be a separate operator?
WM_operatortype_append(ANIM_OT_channels_editable_toggle);
@@ -1686,6 +1929,10 @@ void ED_keymap_animchannels(wmWindowManager *wm)
/* borderselect */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
+ /* delete */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", DELKEY, KM_PRESS, 0, 0);
+
/* settings */
WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 1ff2169bf61..13667159fe0 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -77,72 +77,6 @@ void ED_anim_object_flush_update(const bContext *C, Object *ob)
}
-/* **************************** animation tool notifiers ******************************** */
-
-/* Send notifiers on behalf of animation editing tools, based on various context info
- * - data_changed: eAnimData_Changed
- */
-void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_changed)
-{
- /* types of notifiers to send, depends on the editor context */
- switch (ac->datatype) {
- case ANIMCONT_DOPESHEET: /* dopesheet */
- case ANIMCONT_FCURVES: /* fcurve editor */
- case ANIMCONT_DRIVERS: /* drivers editor */ // XXX probably this will need separate handling, since these are part of dependency system
- {
- /* what action was taken */
- switch (data_changed) {
- case ANIM_CHANGED_KEYFRAMES_VALUES:
- /* keyframe values changed, so transform may have changed */
- // XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, NULL);
- break;
- case ANIM_CHANGED_KEYFRAMES_SELECT:
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL);
- break;
- case ANIM_CHANGED_CHANNELS:
- // XXX err... check available datatypes in dopesheet first?
- // FIXME: this currently doesn't work (to update own view)
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE|ND_OB_SELECT, ac->scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE|ND_BONE_SELECT, NULL);
- break;
- }
-
- // XXX for now, at least update own editor!
- ED_area_tag_redraw(CTX_wm_area(C));
- }
- break;
-
- case ANIMCONT_ACTION: /* action editor */
- {
- Object *obact= CTX_data_active_object(C);
-
- switch (data_changed) {
- case ANIM_CHANGED_KEYFRAMES_VALUES:
- /* keyframe values changed, so transform may have changed */
- // XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, obact);
- break;
- case ANIM_CHANGED_KEYFRAMES_SELECT:
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obact);
- break;
- case ANIM_CHANGED_CHANNELS:
- // XXX err... check available datatypes in dopesheet first?
- // FIXME: this currently doesn't work (to update own view)
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE|ND_BONE_SELECT, obact);
- break;
- }
-
- // XXX for now, at least update own editor!
- ED_area_tag_redraw(CTX_wm_area(C));
- }
- break;
-
- default: /* some other data... just update area for now */
- ED_area_tag_redraw(CTX_wm_area(C));
- }
-}
-
/* **************************** pose <-> action syncing ******************************** */
/* Summary of what needs to be synced between poses and actions:
* 1) Flags
@@ -152,6 +86,10 @@ void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_cha
* 3) Grouping (only for pose to action for now)
*/
+/* XXX OBSOLETE CODE WARNING:
+ * With the Animato system, the code below is somewhat obsolete now...
+ */
+
/* Notifier from Action/Dopesheet (this may be extended to include other things such as Python...)
* Channels in action changed, so update pose channels/groups to reflect changes.
*
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index c176f20c26b..6c39e670f5c 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -43,10 +43,12 @@
#include "BLI_blenlib.h"
+#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_fcurve.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
@@ -165,7 +167,7 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
glLineWidth(2.0);
glBegin(GL_LINE_STRIP);
- vec[1]= v2d->cur.ymin;
+ vec[1]= v2d->cur.ymin-500.0f; /* XXX arbitrary... want it go to bottom */
glVertex2fv(vec);
vec[1]= v2d->cur.ymax;
@@ -232,37 +234,16 @@ void ANIM_draw_previewrange (const bContext *C, View2D *v2d)
/* *************************************************** */
/* NLA-MAPPING UTILITIES (required for drawing and also editing keyframes) */
-/* Obtain the Object providing NLA-scaling for the given channel (if applicable) */
-Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
+/* Obtain the AnimData block providing NLA-mapping for the given channel (if applicable) */
+AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
{
/* sanity checks */
if (ac == NULL)
return NULL;
/* handling depends on the type of animation-context we've got */
- if (ac->datatype == ANIMCONT_ACTION) {
- /* Action Editor (action mode) or Graph Editor (ipo mode):
- * Only use if editor is not pinned, and active object has action
- */
- if (ac->obact && ac->obact->action) {
- SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
-
- if (saction->pin == 0)
- return ac->obact;
- }
- }
- else if ((ac->datatype == ANIMCONT_DOPESHEET) && (ale)) {
- /* Dopesheet:
- * Only if channel is available, and is owned by an Object with an Action
- */
- if ((ale->id) && (GS(ale->id->name) == ID_OB)) {
- Object *ob= (Object *)ale->id;
-
- if (ob->action)
- return ob;
- }
- }
- // XXX todo: add F-Curves mode (Graph Editor) ...
+ if (ale && ale->id)
+ return BKE_animdata_from_id(ale->id);
/* no appropriate object found */
return NULL;
@@ -273,7 +254,8 @@ Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
* (where this is called) is single-threaded anyway
*/
// XXX was called: map_active_strip()
-void ANIM_nla_mapping_draw(gla2DDrawInfo *di, Object *ob, short restore)
+// TODO: should this be depreceated?
+void ANIM_nla_mapping_draw(gla2DDrawInfo *di, AnimData *adt, short restore)
{
static rctf stored;
@@ -288,8 +270,8 @@ void ANIM_nla_mapping_draw(gla2DDrawInfo *di, Object *ob, short restore)
gla2DGetMap(di, &stored);
map= stored;
- map.xmin= get_action_frame(ob, map.xmin);
- map.xmax= get_action_frame(ob, map.xmax);
+ map.xmin= BKE_nla_tweakedit_remap(adt, map.xmin, NLATIME_CONVERT_MAP);
+ map.xmax= BKE_nla_tweakedit_remap(adt, map.xmax, NLATIME_CONVERT_MAP);
if (map.xmin == map.xmax) map.xmax += 1.0f;
gla2DSetMap(di, &map);
@@ -298,36 +280,38 @@ void ANIM_nla_mapping_draw(gla2DDrawInfo *di, Object *ob, short restore)
/* ------------------- */
-/* helper function for ANIM_nla_mapping_apply_ipocurve() -> "restore", i.e. mapping points back to IPO-time */
+/* helper function for ANIM_nla_mapping_apply_fcurve() -> "restore", i.e. mapping points back to action-time */
static short bezt_nlamapping_restore(BeztEditData *bed, BezTriple *bezt)
{
- /* object providing scaling is stored in 'data', only_keys option is stored in i1 */
- Object *ob= (Object *)bed->data;
+ /* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */
+ AnimData *adt= (AnimData *)bed->data;
short only_keys= (short)bed->i1;
/* adjust BezTriple handles only if allowed to */
if (only_keys == 0) {
- bezt->vec[0][0]= get_action_frame(ob, bezt->vec[0][0]);
- bezt->vec[2][0]= get_action_frame(ob, bezt->vec[2][0]);
- }
- bezt->vec[1][0]= get_action_frame(ob, bezt->vec[1][0]);
+ bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_UNMAP);
+ bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_UNMAP);
+ }
+
+ bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_UNMAP);
return 0;
}
-/* helper function for ANIM_nla_mapping_apply_ipocurve() -> "apply", i.e. mapping points to NLA-mapped global time */
+/* helper function for ANIM_nla_mapping_apply_fcurve() -> "apply", i.e. mapping points to NLA-mapped global time */
static short bezt_nlamapping_apply(BeztEditData *bed, BezTriple *bezt)
{
- /* object providing scaling is stored in 'data', only_keys option is stored in i1 */
- Object *ob= (Object *)bed->data;
+ /* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */
+ AnimData *adt= (AnimData *)bed->data;
short only_keys= (short)bed->i1;
/* adjust BezTriple handles only if allowed to */
if (only_keys == 0) {
- bezt->vec[0][0]= get_action_frame_inv(ob, bezt->vec[0][0]);
- bezt->vec[2][0]= get_action_frame_inv(ob, bezt->vec[2][0]);
+ bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_MAP);
+ bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_MAP);
}
- bezt->vec[1][0]= get_action_frame_inv(ob, bezt->vec[1][0]);
+
+ bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_MAP);
return 0;
}
@@ -338,17 +322,17 @@ static short bezt_nlamapping_apply(BeztEditData *bed, BezTriple *bezt)
* - restore = whether to map points back to non-mapped time
* - only_keys = whether to only adjust the location of the center point of beztriples
*/
-void ANIM_nla_mapping_apply_fcurve(Object *ob, FCurve *fcu, short restore, short only_keys)
+void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, short only_keys)
{
BeztEditData bed;
BeztEditFunc map_cb;
/* init edit data
- * - ob is stored in 'data'
+ * - AnimData is stored in 'data'
* - only_keys is stored in 'i1'
*/
memset(&bed, 0, sizeof(BeztEditData));
- bed.data= (void *)ob;
+ bed.data= (void *)adt;
bed.i1= (int)only_keys;
/* get editing callback */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index afad396607b..42943475a57 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -195,7 +195,7 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
}
}
-/* ----------- Private Stuff - IPO Editor ------------- */
+/* ----------- Private Stuff - Graph Editor ------------- */
/* Get data being edited in Graph Editor (depending on current 'mode') */
static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
@@ -237,6 +237,26 @@ static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
}
}
+/* ----------- Private Stuff - NLA Editor ------------- */
+
+/* Get data being edited in Graph Editor (depending on current 'mode') */
+static short nlaedit_get_context (bAnimContext *ac, SpaceNla *snla)
+{
+ /* init dopesheet data if non-existant (i.e. for old files) */
+ if (snla->ads == NULL)
+ snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+
+ /* sync settings with current view status, then return appropriate data */
+ /* update scene-pointer (no need to check for pinning yet, as not implemented) */
+ snla->ads->source= (ID *)ac->scene;
+ snla->ads->filterflag |= ADS_FILTER_ONLYNLA;
+
+ ac->datatype= ANIMCONT_NLA;
+ ac->data= snla->ads;
+
+ return 1;
+}
+
/* ----------- Public API --------------- */
/* Obtain current anim-data context, given that context info from Blender context has already been set
@@ -264,6 +284,13 @@ short ANIM_animdata_context_getdata (bAnimContext *ac)
ok= graphedit_get_context(ac, sipo);
}
break;
+
+ case SPACE_NLA:
+ {
+ SpaceNla *snla= (SpaceNla *)sa->spacedata.first;
+ ok= nlaedit_get_context(ac, snla);
+ }
+ break;
}
}
@@ -313,6 +340,68 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
/* quick macro to test if AnimData is usable for drivers */
#define ANIMDATA_HAS_DRIVERS(id) ((id)->adt && (id)->adt->drivers.first)
+/* quick macro to test if AnimData is usable for NLA */
+#define ANIMDATA_HAS_NLA(id) ((id)->adt && (id)->adt->nla_tracks.first)
+
+
+/* Quick macro to test for all three avove usability tests, performing the appropriate provided
+ * action for each when the AnimData context is appropriate.
+ *
+ * Priority order for this goes (most important, to least): AnimData blocks, NLA, Drivers, Keyframes.
+ *
+ * For this to work correctly, a standard set of data needs to be available within the scope that this
+ * gets called in:
+ * - ListBase anim_data;
+ * - bDopeSheet *ads;
+ * - bAnimListElem *ale;
+ * - int items;
+ *
+ * - id: ID block which should have an AnimData pointer following it immediately, to use
+ * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA)
+ * - nlaOk: line or block of code to execute for NLA case
+ * - driversOk: line or block of code to execute for Drivers case
+ * - keysOk: line or block of code for Keyframes case
+ */
+#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, keysOk) \
+ {\
+ if (filter_mode & ANIMFILTER_ANIMDATA) {\
+ if ((id)->adt) {\
+ adtOk\
+ }\
+ }\
+ else if (ads->filterflag & ADS_FILTER_ONLYNLA) {\
+ if (ANIMDATA_HAS_NLA(id)) {\
+ nlaOk\
+ }\
+ else if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) && ANIMDATA_HAS_KEYS(id)) {\
+ nlaOk\
+ }\
+ }\
+ else if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {\
+ if (ANIMDATA_HAS_DRIVERS(id)) {\
+ driversOk\
+ }\
+ }\
+ else {\
+ if (ANIMDATA_HAS_KEYS(id)) {\
+ keysOk\
+ }\
+ }\
+ }
+
+
+/* quick macro to add a pointer to an AnimData block as a channel */
+#define ANIMDATA_ADD_ANIMDATA(id) \
+ {\
+ ale= make_new_animlistelem((id)->adt, ANIMTYPE_ANIMDATA, NULL, ANIMTYPE_NONE, (ID *)id);\
+ if (ale) {\
+ BLI_addtail(anim_data, ale);\
+ items++;\
+ }\
+ }
+
+
+
/* quick macro to test if a anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */
#define ANIMCHANNEL_SELOK(test_func) \
( !(filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) || \
@@ -494,6 +583,25 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
ale->datatype= ALE_GPFRAME;
}
break;
+
+ case ANIMTYPE_NLATRACK:
+ {
+ NlaTrack *nlt= (NlaTrack *)data;
+
+ ale->flag= nlt->flag;
+
+ // XXX or should this be done some other way?
+ ale->key_data= &nlt->strips;
+ ale->datatype= ALE_NLASTRIP;
+ }
+ break;
+ case ANIMTYPE_NLAACTION:
+ {
+ /* nothing to include for now... nothing editable from NLA-perspective here */
+ ale->key_data= NULL;
+ ale->datatype= ALE_NONE;
+ }
+ break;
}
}
@@ -522,7 +630,6 @@ static int animdata_filter_fcurves (ListBase *anim_data, FCurve *first, bActionG
if ( ANIMCHANNEL_SELOK(SEL_FCU(fcu)) ) {
/* only include if this curve is active */
if (!(filter_mode & ANIMFILTER_ACTIVE) || (fcu->flag & FCURVE_ACTIVE)) {
- /* owner/ownertype will be either object or action-channel, depending if it was dopesheet or part of an action */
ale= make_new_animlistelem(fcu, ANIMTYPE_FCURVE, owner, ownertype, owner_id);
if (ale) {
@@ -575,25 +682,30 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter
* cases when we should include F-Curves inside group:
* - we don't care about visibility
* - group is expanded
- * - we're interested in keyframes, but not if they appear in selected channels
+ * - we just need the F-Curves present
*/
- // XXX what was the selection check here for again?
- if ( (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_AGRP(agrp)) ||
- ( /*ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) &&*/ (filter_mode & ANIMFILTER_CURVESONLY) ) )
+ if ( (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_AGRP(agrp)) || (filter_mode & ANIMFILTER_CURVESONLY) )
{
- if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) {
- // XXX the 'owner' info here needs review...
- items += animdata_filter_fcurves(anim_data, agrp->channels.first, agrp, owner, ownertype, filter_mode, owner_id);
-
- /* remove group from filtered list if last element is group
- * (i.e. only if group had channels, which were all hidden)
- */
- // XXX this is really hacky... it should be fixed in a much more elegant way!
- if ( (ale) && (anim_data->last == ale) &&
- (ale->data == agrp) && (agrp->channels.first) )
- {
- BLI_freelinkN(anim_data, ale);
- items--;
+ /* for the Graph Editor, curves may be set to not be visible in the view to lessen clutter,
+ * but to do this, we need to check that the group doesn't have it's not-visible flag set preventing
+ * all its sub-curves to be shown
+ */
+ if ( !(filter_mode & ANIMFILTER_CURVEVISIBLE) || !(agrp->flag & AGRP_NOTVISIBLE) )
+ {
+ if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) {
+ // XXX the 'owner' info here needs review...
+ items += animdata_filter_fcurves(anim_data, agrp->channels.first, agrp, owner, ownertype, filter_mode, owner_id);
+
+ /* remove group from filtered list if last element is group
+ * (i.e. only if group had channels, which were all hidden)
+ */
+ // XXX this is really hacky... it should be fixed in a much more elegant way!
+ if ( (ale) && (anim_data->last == ale) &&
+ (ale->data == agrp) && (agrp->channels.first) )
+ {
+ BLI_freelinkN(anim_data, ale);
+ items--;
+ }
}
}
}
@@ -610,6 +722,83 @@ static int animdata_filter_action (ListBase *anim_data, bAction *act, int filter
return items;
}
+/* Include NLA-Data for NLA-Editor:
+ * - when ANIMFILTER_CHANNELS is used, that means we should be filtering the list for display
+ * Although the evaluation order is from the first track to the last and then apply the Action on top,
+ * we present this in the UI as the Active Action followed by the last track to the first so that we
+ * get the evaluation order presented as per a stack.
+ * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
+ * order, i.e. first to last. Otherwise, some tools may get screwed up.
+ */
+static int animdata_filter_nla (ListBase *anim_data, AnimData *adt, int filter_mode, void *owner, short ownertype, ID *owner_id)
+{
+ bAnimListElem *ale;
+ NlaTrack *nlt;
+ NlaTrack *first=NULL, *next=NULL;
+ int items = 0;
+
+ /* if showing channels, include active action */
+ if (filter_mode & ANIMFILTER_CHANNELS) {
+ /* there isn't really anything editable here, so skip if need editable */
+ // TODO: currently, selection isn't checked since it doesn't matter
+ if ((filter_mode & ANIMFILTER_FOREDIT) == 0) {
+ /* just add the action track now (this MUST appear for drawing)
+ * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
+ * overwrite this with the real value - REVIEW THIS...
+ */
+ ale= make_new_animlistelem((void *)(&adt->action), ANIMTYPE_NLAACTION, owner, ownertype, owner_id);
+ ale->data= (adt->action) ? adt->action : NULL;
+
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+
+ /* first track to include will be the last one if we're filtering by channels */
+ first= adt->nla_tracks.last;
+ }
+ else {
+ /* first track to include will the the first one (as per normal) */
+ first= adt->nla_tracks.first;
+ }
+
+ /* loop over NLA Tracks - assume that the caller of this has already checked that these should be included */
+ for (nlt= first; nlt; nlt= next) {
+ /* 'next' NLA-Track to use depends on whether we're filtering for drawing or not */
+ if (filter_mode & ANIMFILTER_CHANNELS)
+ next= nlt->prev;
+ else
+ next= nlt->next;
+
+ /* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now
+ * - active track should still get shown though (even though it has disabled flag set)
+ */
+ // FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel
+ if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && !(nlt->flag & NLATRACK_ACTIVE))
+ continue;
+
+ /* only work with this channel and its subchannels if it is editable */
+ if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_NLT(nlt)) {
+ /* only include this track if selected in a way consistent with the filtering requirements */
+ if ( ANIMCHANNEL_SELOK(SEL_NLT(nlt)) ) {
+ /* only include if this track is active */
+ if (!(filter_mode & ANIMFILTER_ACTIVE) || (nlt->flag & NLATRACK_ACTIVE)) {
+ ale= make_new_animlistelem(nlt, ANIMTYPE_NLATRACK, owner, ownertype, owner_id);
+
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+ }
+ }
+ }
+
+ /* return the number of items added to the list */
+ return items;
+}
+
static int animdata_filter_shapekey (ListBase *anim_data, Key *key, int filter_mode, void *owner, short ownertype, ID *owner_id)
{
bAnimListElem *ale;
@@ -752,19 +941,19 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
/* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
for (a=0; a < ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
+ short ok = 0;
/* for now, if no material returned, skip (this shouldn't confuse the user I hope) */
if (ELEM(NULL, ma, ma->adt))
continue;
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
- if (ANIMDATA_HAS_KEYS(ma) == 0)
- continue;
- }
- else {
- if (ANIMDATA_HAS_DRIVERS(ma) == 0)
- continue;
- }
+ /* check if ok */
+ ANIMDATA_FILTER_CASES(ma,
+ { /* AnimData blocks - do nothing... */ },
+ ok=1;,
+ ok=1;,
+ ok=1;)
+ if (ok == 0) continue;
/* make a temp list elem for this */
ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache");
@@ -801,16 +990,13 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
}
}
- /* add material's F-Curve or Driver channels? */
+ /* add material's animation data */
if (FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
- // XXX the 'owner' info here is still subject to improvement
- items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);
- }
- else {
- // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
- items += animdata_filter_fcurves(anim_data, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma);
- }
+ ANIMDATA_FILTER_CASES(ma,
+ { /* AnimData blocks - do nothing... */ },
+ items += animdata_filter_nla(anim_data, ma->adt, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);,
+ items += animdata_filter_fcurves(anim_data, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma);,
+ items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma);)
}
}
}
@@ -871,15 +1057,12 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
/* add object-data animation channels? */
if ((expanded) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- /* Action or Drivers? */
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
- // XXX the 'owner' info here is still subject to improvement
- items += animdata_filter_action(anim_data, iat->adt->action, filter_mode, iat, type, (ID *)iat);
- }
- else {
- // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, iat, type, filter_mode, (ID *)iat);
- }
+ /* filtering for channels - nla, drivers, keyframes */
+ ANIMDATA_FILTER_CASES(iat,
+ { /* AnimData blocks - do nothing... */ },
+ items+= animdata_filter_nla(anim_data, iat->adt, filter_mode, iat, type, (ID *)iat);,
+ items+= animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, iat, type, filter_mode, (ID *)iat);,
+ items += animdata_filter_action(anim_data, iat->adt->action, filter_mode, iat, type, (ID *)iat);)
}
/* return the number of items added to the list */
@@ -889,12 +1072,14 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
{
bAnimListElem *ale=NULL;
+ AnimData *adt = NULL;
Object *ob= base->object;
Key *key= ob_get_key(ob);
+ short obdata_ok = 0;
int items = 0;
/* add this object as a channel first */
- if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
+ if ((filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) == 0) {
/* check if filtering by selection */
if ANIMCHANNEL_SELOK((base->flag & SELECT)) {
ale= make_new_animlistelem(base, ANIMTYPE_OBJECT, NULL, ANIMTYPE_NONE, NULL);
@@ -906,76 +1091,79 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
}
/* if collapsed, don't go any further (unless adding keyframes only) */
- if ( (EXPANDED_OBJC(ob) == 0) && !(filter_mode & ANIMFILTER_CURVESONLY) )
+ if ( (EXPANDED_OBJC(ob) == 0) && !(filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) )
return items;
- /* Action or Drivers */
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
- /* Action? */
- if (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/) {
- AnimData *adt= ob->adt;
-
- /* include action-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, base, ANIMTYPE_OBJECT, (ID *)ob);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ /* Action, Drivers, or NLA */
+ if (ob->adt) {
+ adt= ob->adt;
+ ANIMDATA_FILTER_CASES(ob,
+ { /* AnimData blocks - do nothing... */ },
+ { /* nla */
+ /* add NLA tracks */
+ items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+ },
+ { /* drivers */
+ /* include drivers-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, base, ANIMTYPE_OBJECT, (ID *)ob);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
- }
-
- /* add F-Curve channels? */
- if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
- // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
- items += animdata_filter_action(anim_data, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
- }
- }
- }
- else {
- /* Drivers */
- if (ANIMDATA_HAS_DRIVERS(ob)) {
- AnimData *adt= ob->adt;
-
- /* include drivers-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, base, ANIMTYPE_OBJECT, (ID *)ob);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+
+ /* add F-Curve channels (drivers are F-Curves) */
+ if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
+ // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
+ items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)ob);
+ }
+ },
+ { /* action (keyframes) */
+ /* include action-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, base, ANIMTYPE_OBJECT, (ID *)ob);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+
+ /* add F-Curve channels? */
+ if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
+ // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
+ items += animdata_filter_action(anim_data, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
}
-
- /* add F-Curve channels (drivers are F-Curves) */
- if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
- // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)ob);
- }
- }
+ );
}
+
/* ShapeKeys? */
if ((key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS)) {
- /* Animation or Drivers */
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
- /* include shapekey-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ adt= key->adt;
+ ANIMDATA_FILTER_CASES(key,
+ { /* AnimData blocks - do nothing... */ },
+ { /* nla */
+ /* add NLA tracks */
+ items += animdata_filter_nla(anim_data, adt, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+ },
+ { /* drivers */
+ /* include shapekey-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
- }
-
- /* add channels */
- if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- items += animdata_filter_shapekey(anim_data, key, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
- }
- }
- else {
- /* Drivers */
- if (ANIMDATA_HAS_DRIVERS(key)) {
- AnimData *adt= key->adt;
+ /* add channels */
+ if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+ items += animdata_filter_shapekey(anim_data, key, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
+ }
+ },
+ { /* action (keyframes) */
/* include shapekey-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
@@ -985,15 +1173,13 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
}
}
- /* add F-Curve channels (drivers are F-Curves) */
- if (FILTER_SKE_OBJD(key)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) {
- // XXX owner info is messed up now...
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)key);
+ /* add channels */
+ if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+ items += animdata_filter_shapekey(anim_data, key, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
}
- }
+ );
}
-
/* Materials? */
if ((ob->totcol) && !(ads->filterflag & ADS_FILTER_NOMAT))
@@ -1006,14 +1192,11 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
Camera *ca= (Camera *)ob->data;
if ((ads->filterflag & ADS_FILTER_NOCAM) == 0) {
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
- if (ANIMDATA_HAS_KEYS(ca))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
- else {
- if (ANIMDATA_HAS_DRIVERS(ca))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
+ ANIMDATA_FILTER_CASES(ca,
+ { /* AnimData blocks - do nothing... */ },
+ obdata_ok= 1;,
+ obdata_ok= 1;,
+ obdata_ok= 1;)
}
}
break;
@@ -1022,14 +1205,11 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
Lamp *la= (Lamp *)ob->data;
if ((ads->filterflag & ADS_FILTER_NOLAM) == 0) {
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
- if (ANIMDATA_HAS_KEYS(la))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
- else {
- if (ANIMDATA_HAS_DRIVERS(la))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
+ ANIMDATA_FILTER_CASES(la,
+ { /* AnimData blocks - do nothing... */ },
+ obdata_ok= 1;,
+ obdata_ok= 1;,
+ obdata_ok= 1;)
}
}
break;
@@ -1038,18 +1218,17 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
Curve *cu= (Curve *)ob->data;
if ((ads->filterflag & ADS_FILTER_NOCUR) == 0) {
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
- if (ANIMDATA_HAS_KEYS(cu))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
- else {
- if (ANIMDATA_HAS_DRIVERS(cu))
- items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
- }
+ ANIMDATA_FILTER_CASES(cu,
+ { /* AnimData blocks - do nothing... */ },
+ obdata_ok= 1;,
+ obdata_ok= 1;,
+ obdata_ok= 1;)
}
}
break;
}
+ if (obdata_ok)
+ items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
/* return the number of items added to the list */
return items;
@@ -1058,11 +1237,12 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
{
World *wo= sce->world;
+ AnimData *adt= NULL;
bAnimListElem *ale;
int items = 0;
/* add scene as a channel first (even if we aren't showing scenes we still need to show the scene's sub-data */
- if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
+ if ((filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) == 0) {
/* check if filtering by selection */
if (ANIMCHANNEL_SELOK( (sce->flag & SCE_DS_SELECTED) )) {
ale= make_new_animlistelem(sce, ANIMTYPE_SCENE, NULL, ANIMTYPE_NONE, NULL);
@@ -1074,77 +1254,63 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
}
/* if collapsed, don't go any further (unless adding keyframes only) */
- if ( (EXPANDED_SCEC(sce) == 0) && !(filter_mode & ANIMFILTER_CURVESONLY) )
+ if ( (EXPANDED_SCEC(sce) == 0) && !(filter_mode & (ANIMFILTER_CURVESONLY|ANIMFILTER_NLATRACKS)) )
return items;
- /* Action or Drivers */
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
- /* Action? */
- if (ANIMDATA_HAS_KEYS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)) {
- AnimData *adt= sce->adt;
-
- /* include action-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, sce, ANIMTYPE_SCENE, (ID *)sce);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+ /* Action, Drivers, or NLA for Scene */
+ if ((ads->filterflag & ADS_FILTER_NOSCE) == 0) {
+ adt= sce->adt;
+ ANIMDATA_FILTER_CASES(sce,
+ { /* AnimData blocks - do nothing... */ },
+ { /* nla */
+ /* add NLA tracks */
+ items += animdata_filter_nla(anim_data, adt, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
+ },
+ { /* drivers */
+ /* include drivers-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, sce, ANIMTYPE_SCENE, (ID *)sce);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
}
- }
-
- /* add F-Curve channels? */
- if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
- items += animdata_filter_action(anim_data, adt->action, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
- }
- }
- }
- else {
- /* Drivers */
- if (ANIMDATA_HAS_DRIVERS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)) {
- AnimData *adt= sce->adt;
-
- /* include drivers-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, sce, ANIMTYPE_SCENE, (ID *)sce);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
+
+ /* add F-Curve channels (drivers are F-Curves) */
+ if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
+ items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, sce, ANIMTYPE_SCENE, filter_mode, (ID *)sce);
+ }
+ },
+ { /* action */
+ /* include action-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, sce, ANIMTYPE_SCENE, (ID *)sce);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+
+ /* add F-Curve channels? */
+ if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
+ items += animdata_filter_action(anim_data, adt->action, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce);
}
}
-
- /* add F-Curve channels (drivers are F-Curves) */
- if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
- items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, sce, ANIMTYPE_SCENE, filter_mode, (ID *)sce);
- }
- }
+ )
}
-
+
/* world */
if ((wo && wo->adt) && !(ads->filterflag & ADS_FILTER_NOWOR)) {
- /* Animation or Drivers */
- if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
- AnimData *adt= wo->adt;
-
- /* include world-expand widget? */
- if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
- ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)sce);
- if (ale) {
- BLI_addtail(anim_data, ale);
- items++;
- }
- }
-
- /* add channels */
- if (FILTER_WOR_SCED(wo) || (filter_mode & ANIMFILTER_CURVESONLY)) {
- items += animdata_filter_action(anim_data, adt->action, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
- }
- }
- else {
- /* Drivers */
- if (ANIMDATA_HAS_DRIVERS(wo)) {
- AnimData *adt= wo->adt;
-
- /* include shapekey-expand widget? */
+ /* Action, Drivers, or NLA for World */
+ adt= wo->adt;
+ ANIMDATA_FILTER_CASES(wo,
+ { /* AnimData blocks - do nothing... */ },
+ { /* nla */
+ /* add NLA tracks */
+ items += animdata_filter_nla(anim_data, adt, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
+ },
+ { /* drivers */
+ /* include world-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)wo);
if (ale) {
@@ -1158,8 +1324,23 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
// XXX owner info is messed up now...
items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, wo, ANIMTYPE_DSWOR, filter_mode, (ID *)wo);
}
+ },
+ { /* action */
+ /* include world-expand widget? */
+ if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
+ ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)sce);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+ }
+
+ /* add channels */
+ if (FILTER_WOR_SCED(wo) || (filter_mode & ANIMFILTER_CURVESONLY)) {
+ items += animdata_filter_action(anim_data, adt->action, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo);
+ }
}
- }
+ )
}
/* return the number of items added to the list */
@@ -1171,6 +1352,7 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
{
Scene *sce= (Scene *)ads->source;
Base *base;
+ bAnimListElem *ale;
int items = 0;
/* check that we do indeed have a scene */
@@ -1182,22 +1364,32 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
/* scene-linked animation */
// TODO: sequencer, composite nodes - are we to include those here too?
{
- short sceOk, worOk;
+ short sceOk= 0, worOk= 0;
/* check filtering-flags if ok */
- if (ads->filterflag) {
- if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {
- sceOk= (ANIMDATA_HAS_DRIVERS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE));
- worOk= ((sce->world) && ANIMDATA_HAS_DRIVERS(sce->world) && !(ads->filterflag & ADS_FILTER_NOWOR));
- }
- else {
- sceOk= (ANIMDATA_HAS_KEYS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE));
- worOk= ((sce->world) && ANIMDATA_HAS_KEYS(sce->world) && !(ads->filterflag & ADS_FILTER_NOWOR));
- }
- }
- else {
- sceOk= (ANIMDATA_HAS_KEYS(sce));
- worOk= ((sce->world) && ANIMDATA_HAS_KEYS(sce->world));
+ ANIMDATA_FILTER_CASES(sce,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(sce);
+ sceOk=0;
+ },
+ sceOk= !(ads->filterflag & ADS_FILTER_NOSCE);,
+ sceOk= !(ads->filterflag & ADS_FILTER_NOSCE);,
+ sceOk= !(ads->filterflag & ADS_FILTER_NOSCE);)
+ if (sce->world) {
+ ANIMDATA_FILTER_CASES(sce->world,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(sce->world);
+ worOk=0;
+ },
+ worOk= !(ads->filterflag & ADS_FILTER_NOWOR);,
+ worOk= !(ads->filterflag & ADS_FILTER_NOWOR);,
+ worOk= !(ads->filterflag & ADS_FILTER_NOWOR);)
}
/* check if not all bad (i.e. so there is something to show) */
@@ -1239,13 +1431,33 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
}
/* check filters for datatypes */
- if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {
- actOk= (ANIMDATA_HAS_DRIVERS(ob));
- keyOk= ((key) && ANIMDATA_HAS_DRIVERS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS));
- }
- else {
- actOk= ANIMDATA_HAS_KEYS(ob);
- keyOk= ((key) && ANIMDATA_HAS_KEYS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS));
+ /* object */
+ actOk= 0;
+ keyOk= 0;
+ ANIMDATA_FILTER_CASES(ob,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(ob);
+ actOk=0;
+ },
+ actOk= 1;,
+ actOk= 1;,
+ actOk= 1;)
+ if (key) {
+ /* shapekeys */
+ ANIMDATA_FILTER_CASES(key,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(key);
+ keyOk=0;
+ },
+ keyOk= 1;,
+ keyOk= 1;,
+ keyOk= 1;)
}
/* materials - only for geometric types */
@@ -1260,18 +1472,20 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
Material *ma= give_current_material(ob, a);
/* if material has relevant animation data, break */
- if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {
- if (ANIMDATA_HAS_DRIVERS(ma)) {
- matOk= 1;
- break;
- }
- }
- else {
- if (ANIMDATA_HAS_KEYS(ma)) {
- matOk= 1;
- break;
- }
- }
+ ANIMDATA_FILTER_CASES(ma,
+ {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(ma);
+ matOk=0;
+ },
+ matOk= 1;,
+ matOk= 1;,
+ matOk= 1;)
+
+ if (matOk)
+ break;
}
}
@@ -1280,19 +1494,52 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
case OB_CAMERA: /* ------- Camera ------------ */
{
Camera *ca= (Camera *)ob->data;
- if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
- dataOk= (ANIMDATA_HAS_DRIVERS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM));
- else
- dataOk= (ANIMDATA_HAS_KEYS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM));
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(ca,
+ if ((ads->filterflag & ADS_FILTER_NOCAM)==0) {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(ca);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCAM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCAM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCAM);)
}
break;
case OB_LAMP: /* ---------- Lamp ----------- */
{
Lamp *la= (Lamp *)ob->data;
- if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
- dataOk= (ANIMDATA_HAS_DRIVERS(la) && !(ads->filterflag & ADS_FILTER_NOLAM));
- else
- dataOk= (ANIMDATA_HAS_KEYS(la) && !(ads->filterflag & ADS_FILTER_NOLAM));
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(la,
+ if ((ads->filterflag & ADS_FILTER_NOLAM)==0) {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(la);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAM);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAM);)
+ }
+ break;
+ case OB_CURVE: /* ------- Curve ---------- */
+ {
+ Curve *cu= (Curve *)ob->data;
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(cu,
+ if ((ads->filterflag & ADS_FILTER_NOCUR)==0) {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(cu);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCUR);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCUR);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOCUR);)
}
break;
default: /* --- other --- */
@@ -1400,6 +1647,7 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
case ANIMCONT_DOPESHEET:
case ANIMCONT_FCURVES:
case ANIMCONT_DRIVERS:
+ case ANIMCONT_NLA:
items= animdata_filter_dopesheet(anim_data, data, filter_mode);
break;
}
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 2abec6b831c..7de3acdacef 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -620,7 +620,7 @@ static void MARKER_OT_move(wmOperatorType *ot)
ot->poll= ED_operator_areaactive;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* rna storage */
RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
@@ -976,7 +976,7 @@ static void MARKER_OT_delete(wmOperatorType *ot)
/* ************************** registration **********************************/
/* called in screen_ops.c:ED_operatortypes_screen() */
-void ED_marker_operatortypes(void)
+void ED_operatortypes_marker(void)
{
WM_operatortype_append(MARKER_OT_add);
WM_operatortype_append(MARKER_OT_move);
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index e899cc1d520..73a1c934d97 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -83,10 +83,12 @@ static void change_frame_apply(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
int cfra;
- /* get frame, and clamp to MINFRAME */
+ /* get frame, and clamp to MINAFRAME
+ * - not MINFRAME, since it's useful to be able to key a few-frames back
+ */
cfra= RNA_int_get(op->ptr, "frame");
- if (cfra < MINFRAME) cfra= MINFRAME;
+ if (cfra < MINAFRAME) cfra= MINAFRAME;
CFRA= cfra;
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
@@ -207,9 +209,12 @@ void ANIM_OT_change_frame(wmOperatorType *ot)
ot->invoke= change_frame_invoke;
ot->cancel= change_frame_cancel;
ot->modal= change_frame_modal;
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
/* rna */
- RNA_def_int(ot->srna, "frame", 0, 1, MAXFRAME, "Frame", "", 1, MAXFRAME);
+ RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
}
/* ****************** set preview range operator ****************************/
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 9c401289011..849e2d2eede 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -1,5 +1,30 @@
-/* Testing code for 2.5 animation system
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#include <stdio.h>
@@ -94,7 +119,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
fcu->driver= MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
/* add simple generator modifier for driver so that there is some visible representation */
- fcurve_add_modifier(fcu, FMODIFIER_TYPE_GENERATOR);
+ add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
/* just add F-Curve to end of driver list */
BLI_addtail(&adt->drivers, fcu);
@@ -110,7 +135,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block
*/
-short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short flag)
+short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short flag, int type)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -125,6 +150,39 @@ 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) {
+ fcu->driver->type= type;
+
+ /* fill in current value for python */
+ if(type == DRIVER_TYPE_PYTHON) {
+ PropertyType proptype= RNA_property_type(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(!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 val= RNA_property_int_get_index(&ptr, prop, array_index);
+
+ BLI_snprintf(expression, maxlen, "%d", val);
+ }
+ else if(proptype == PROP_FLOAT) {
+ if(!array) fval= RNA_property_float_get(&ptr, prop);
+ else fval= RNA_property_float_get_index(&ptr, prop, array_index);
+
+ BLI_snprintf(expression, maxlen, "%.3f", fval);
+ }
+
+ }
+ }
/* done */
return (fcu != NULL);
@@ -192,7 +250,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
length= 1;
for (a=0; a<length; a++)
- success+= ANIM_add_driver(ptr.id.data, path, index+a, 0);
+ success+= ANIM_add_driver(ptr.id.data, path, index+a, 0, DRIVER_TYPE_PYTHON);
MEM_freeN(path);
}
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index cfbd6d2bced..1db78beb2cb 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -1,5 +1,5 @@
/**
- * $Id: drawaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -51,7 +51,6 @@
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
#include "DNA_curve_types.h"
-#include "DNA_ipo_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
@@ -64,6 +63,7 @@
#include "DNA_gpencil_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_world_types.h"
+#include "DNA_view2d_types.h"
#include "BKE_action.h"
#include "BKE_depsgraph.h"
@@ -234,45 +234,87 @@ static ActKeyColumn *cfra_find_actkeycolumn (ListBase *keys, float cframe)
return NULL;
}
-#if 0 // disabled, as some intel cards have problems with this
-/* Draw a simple diamond shape with a filled in center (in screen space) */
-static void draw_key_but(int x, int y, short w, short h, int sel)
+/* coordinates for diamond shape */
+static const float _unit_diamond_shape[4][2] = {
+ {0.0f, 1.0f}, /* top vert */
+ {1.0f, 0.0f}, /* mid-right */
+ {0.0f, -1.0f}, /* bottom vert */
+ {-1.0f, 0.0f} /* mid-left */
+};
+
+/* draw a simple diamond shape with OpenGL */
+void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short mode)
{
- int xmin= x, ymin= y;
- int xmax= x+w-1, ymax= y+h-1;
- int xc= (xmin+xmax)/2, yc= (ymin+ymax)/2;
-
- /* interior - hardcoded colors (for selected and unselected only) */
- if (sel) glColor3ub(0xF1, 0xCA, 0x13);
- else glColor3ub(0xE9, 0xE9, 0xE9);
-
- glBegin(GL_QUADS);
- glVertex2i(xc, ymin);
- glVertex2i(xmax, yc);
- glVertex2i(xc, ymax);
- glVertex2i(xmin, yc);
- glEnd();
-
-
- /* outline */
- glColor3ub(0, 0, 0);
-
- glBegin(GL_LINE_LOOP);
- glVertex2i(xc, ymin);
- glVertex2i(xmax, yc);
- glVertex2i(xc, ymax);
- glVertex2i(xmin, yc);
- glEnd();
+ static GLuint displist1=0;
+ static GLuint displist2=0;
+
+ /* initialise 2 display lists for diamond shape - one empty, one filled */
+ if (displist1 == 0) {
+ displist1= glGenLists(1);
+ glNewList(displist1, GL_COMPILE);
+
+ glBegin(GL_LINE_LOOP);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+ glEndList();
+ }
+ if (displist2 == 0) {
+ displist2= glGenLists(1);
+ glNewList(displist2, GL_COMPILE);
+
+ glBegin(GL_QUADS);
+ glVertex2fv(_unit_diamond_shape[0]);
+ glVertex2fv(_unit_diamond_shape[1]);
+ glVertex2fv(_unit_diamond_shape[2]);
+ glVertex2fv(_unit_diamond_shape[3]);
+ glEnd();
+ glEndList();
+ }
+
+ /* adjust view transform before starting */
+ glTranslatef(x, y, 0.0f);
+ glScalef(1.0f/xscale*hsize, hsize, 1.0f);
+
+ /* anti-aliased lines for more consistent appearance */
+ glEnable(GL_LINE_SMOOTH);
+
+ /* draw! */
+ if ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH) {
+ /* interior - hardcoded colors (for selected and unselected only) */
+ if (sel) UI_ThemeColorShade(TH_STRIP_SELECT, 50);
+ else glColor3ub(0xE9, 0xE9, 0xE9);
+
+ glCallList(displist2);
+ }
+
+ if ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH) {
+ /* exterior - black frame */
+ glColor3ub(0, 0, 0);
+
+ glCallList(displist1);
+ }
+
+ glDisable(GL_LINE_SMOOTH);
+
+ /* restore view transform */
+ glScalef(xscale/hsize, 1.0f/hsize, 1.0);
+ glTranslatef(-x, -y, 0.0f);
}
-#endif
-static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, float ypos)
+static void draw_keylist(View2D *v2d, ListBase *keys, ListBase *blocks, float ypos)
{
ActKeyColumn *ak;
ActKeyBlock *ab;
+ float xscale;
glEnable(GL_BLEND);
+ /* get View2D scaling factor */
+ UI_view2d_getscale(v2d, &xscale, NULL);
+
/* draw keyblocks */
if (blocks) {
for (ab= blocks->first; ab; ab= ab->next) {
@@ -292,18 +334,13 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
totCurves = (startCurves>endCurves)? endCurves: startCurves;
if (ab->totcurve >= totCurves) {
- int sc_xa, sc_xb, sc_ya, sc_yb;
-
- /* get co-ordinates of block */
- gla2DDrawTranslatePt(di, ab->start, ypos, &sc_xa, &sc_ya);
- gla2DDrawTranslatePt(di, ab->end, ypos, &sc_xb, &sc_yb);
-
/* draw block */
if (ab->sel)
UI_ThemeColor4(TH_STRIP_SELECT);
else
UI_ThemeColor4(TH_STRIP);
- glRectf((float)sc_xa, (float)sc_ya-3, (float)sc_xb, (float)sc_yb+5);
+
+ glRectf(ab->start, ypos-5, ab->end, ypos+5);
}
}
}
@@ -311,18 +348,28 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
/* draw keys */
if (keys) {
for (ak= keys->first; ak; ak= ak->next) {
- int sc_x, sc_y;
+ /* draw using OpenGL - uglier but faster */
+ // NOTE: a previous version of this didn't work nice for some intel cards
+ draw_keyframe_shape(ak->cfra, ypos, xscale, 5.0f, (ak->sel & SELECT), KEYFRAME_SHAPE_BOTH);
+
+#if 0 // OLD CODE
+ //int sc_x, sc_y;
/* get co-ordinate to draw at */
- gla2DDrawTranslatePt(di, ak->cfra, ypos, &sc_x, &sc_y);
+ //gla2DDrawTranslatePt(di, ak->cfra, ypos, &sc_x, &sc_y);
/* draw using icons - old way which is slower but more proven */
- if (ak->sel & SELECT) UI_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE2, 1.0f);
- else UI_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE3, 1.0f);
+ //if (ak->sel & SELECT) UI_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE2, 1.0f);
+ //else UI_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE3, 1.0f);
+#endif // OLD CODE
+#if 0 // NEW NON-WORKING CODE
+ /* draw icon */
+ // FIXME: this draws slightly wrong, as we need to apply some offset for icon, but that depends on scaling
+ // so for now disabled
+ //int icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3;
+ //UI_icon_draw_aspect(ak->cfra, ypos-6, icon, 1.0f);
+#endif // NEW NON-WORKING CODE
- /* draw using OpenGL - slightly uglier but faster */
- // NOTE: disabled for now, as some intel cards seem to have problems with this
- //draw_key_but(sc_x-5, sc_y-4, 11, 11, (ak->sel & SELECT));
}
}
@@ -331,89 +378,86 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
/* *************************** Channel Drawing Funcs *************************** */
-void draw_scene_channel(gla2DDrawInfo *di, ActKeysInc *aki, Scene *sce, float ypos)
+void draw_scene_channel(View2D *v2d, bDopeSheet *ads, Scene *sce, float ypos)
{
ListBase keys = {0, 0};
ListBase blocks = {0, 0};
- scene_to_keylist(sce, &keys, &blocks, aki);
- draw_keylist(di, &keys, &blocks, ypos);
+ scene_to_keylist(ads, sce, &keys, &blocks);
+ draw_keylist(v2d, &keys, &blocks, ypos);
BLI_freelistN(&keys);
BLI_freelistN(&blocks);
}
-void draw_object_channel(gla2DDrawInfo *di, ActKeysInc *aki, Object *ob, float ypos)
+void draw_object_channel(View2D *v2d, bDopeSheet *ads, Object *ob, float ypos)
{
ListBase keys = {0, 0};
ListBase blocks = {0, 0};
- ob_to_keylist(ob, &keys, &blocks, aki);
- draw_keylist(di, &keys, &blocks, ypos);
+ ob_to_keylist(ads, ob, &keys, &blocks);
+ draw_keylist(v2d, &keys, &blocks, ypos);
BLI_freelistN(&keys);
BLI_freelistN(&blocks);
}
-void draw_fcurve_channel(gla2DDrawInfo *di, ActKeysInc *aki, FCurve *fcu, float ypos)
+void draw_fcurve_channel(View2D *v2d, AnimData *adt, FCurve *fcu, float ypos)
{
ListBase keys = {0, 0};
ListBase blocks = {0, 0};
- fcurve_to_keylist(fcu, &keys, &blocks, aki);
- draw_keylist(di, &keys, &blocks, ypos);
+ fcurve_to_keylist(adt, fcu, &keys, &blocks);
+ draw_keylist(v2d, &keys, &blocks, ypos);
BLI_freelistN(&keys);
BLI_freelistN(&blocks);
}
-void draw_agroup_channel(gla2DDrawInfo *di, ActKeysInc *aki, bActionGroup *agrp, float ypos)
+void draw_agroup_channel(View2D *v2d, AnimData *adt, bActionGroup *agrp, float ypos)
{
ListBase keys = {0, 0};
ListBase blocks = {0, 0};
- agroup_to_keylist(agrp, &keys, &blocks, aki);
- draw_keylist(di, &keys, &blocks, ypos);
+ agroup_to_keylist(adt, agrp, &keys, &blocks);
+ draw_keylist(v2d, &keys, &blocks, ypos);
BLI_freelistN(&keys);
BLI_freelistN(&blocks);
}
-void draw_action_channel(gla2DDrawInfo *di, ActKeysInc *aki, bAction *act, float ypos)
+void draw_action_channel(View2D *v2d, AnimData *adt, bAction *act, float ypos)
{
ListBase keys = {0, 0};
ListBase blocks = {0, 0};
- action_to_keylist(act, &keys, &blocks, aki);
- draw_keylist(di, &keys, &blocks, ypos);
+ action_to_keylist(adt, act, &keys, &blocks);
+ draw_keylist(v2d, &keys, &blocks, ypos);
BLI_freelistN(&keys);
BLI_freelistN(&blocks);
}
-void draw_gpl_channel(gla2DDrawInfo *di, ActKeysInc *aki, bGPDlayer *gpl, float ypos)
+void draw_gpl_channel(View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos)
{
ListBase keys = {0, 0};
- gpl_to_keylist(gpl, &keys, NULL, aki);
- draw_keylist(di, &keys, NULL, ypos);
+ gpl_to_keylist(ads, gpl, &keys, NULL);
+ draw_keylist(v2d, &keys, NULL, ypos);
BLI_freelistN(&keys);
}
/* *************************** Keyframe List Conversions *************************** */
-void scene_to_keylist(Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void scene_to_keylist(bDopeSheet *ads, Scene *sce, ListBase *keys, ListBase *blocks)
{
if (sce) {
- bDopeSheet *ads= (aki)? (aki->ads) : NULL;
AnimData *adt;
int filterflag;
/* get filterflag */
if (ads)
filterflag= ads->filterflag;
- else if ((aki) && (aki->actmode == -1)) /* only set like this by NLA */
- filterflag= ADS_FILTER_NLADUMMY;
else
filterflag= 0;
@@ -423,7 +467,7 @@ void scene_to_keylist(Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *
// TODO: when we adapt NLA system, this needs to be the NLA-scaled version
if (adt->action)
- action_to_keylist(adt->action, keys, blocks, aki);
+ action_to_keylist(adt, adt->action, keys, blocks);
}
/* world animdata */
@@ -432,17 +476,16 @@ void scene_to_keylist(Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *
// TODO: when we adapt NLA system, this needs to be the NLA-scaled version
if (adt->action)
- action_to_keylist(adt->action, keys, blocks, aki);
+ action_to_keylist(adt, adt->action, keys, blocks);
}
}
}
-void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void ob_to_keylist(bDopeSheet *ads, Object *ob, ListBase *keys, ListBase *blocks)
{
Key *key= ob_get_key(ob);
if (ob) {
- bDopeSheet *ads= (aki)? (aki->ads) : NULL;
int filterflag;
/* get filterflag */
@@ -453,79 +496,18 @@ void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki
/* Add action keyframes */
if (ob->adt && ob->adt->action)
- action_nlascaled_to_keylist(ob, ob->adt->action, keys, blocks, aki);
+ action_to_keylist(ob->adt, ob->adt->action, keys, blocks);
/* Add shapekey keyframes (only if dopesheet allows, if it is available) */
- // TODO: when we adapt NLA system, this needs to be the NLA-scaled version
if ((key && key->adt && key->adt->action) && !(filterflag & ADS_FILTER_NOSHAPEKEYS))
- action_to_keylist(key->adt->action, keys, blocks, aki);
-
-#if 0 // XXX old animation system
- /* Add material keyframes (only if dopesheet allows, if it is available) */
- if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
- short a;
-
- for (a=0; a<ob->totcol; a++) {
- Material *ma= give_current_material(ob, a);
-
- if (ELEM(NULL, ma, ma->ipo) == 0)
- ipo_to_keylist(ma->ipo, keys, blocks, aki);
- }
- }
+ action_to_keylist(key->adt, key->adt->action, keys, blocks);
- /* Add object data keyframes */
- switch (ob->type) {
- case OB_CAMERA: /* ------- Camera ------------ */
- {
- Camera *ca= (Camera *)ob->data;
- if ((ca->ipo) && !(filterflag & ADS_FILTER_NOCAM))
- ipo_to_keylist(ca->ipo, keys, blocks, aki);
- }
- break;
- case OB_LAMP: /* ---------- Lamp ----------- */
- {
- Lamp *la= (Lamp *)ob->data;
- if ((la->ipo) && !(filterflag & ADS_FILTER_NOLAM))
- ipo_to_keylist(la->ipo, keys, blocks, aki);
- }
- break;
- case OB_CURVE: /* ------- Curve ---------- */
- {
- Curve *cu= (Curve *)ob->data;
- if ((cu->ipo) && !(filterflag & ADS_FILTER_NOCUR))
- ipo_to_keylist(cu->ipo, keys, blocks, aki);
- }
- break;
- }
-#endif // XXX old animation system
+ // TODO: restore materials, and object data, etc.
}
}
-static short bezt_in_aki_range (ActKeysInc *aki, BezTriple *bezt)
-{
- /* when aki == NULL, we don't care about range */
- if (aki == NULL)
- return 1;
-
- /* if start and end are both 0, then don't care about range */
- if (IS_EQ(aki->start, 0) && IS_EQ(aki->end, 0))
- return 1;
-
- /* if nla-scaling is in effect, apply appropriate scaling adjustments */
-#if 0 // XXX this was from some buggy code... do not port for now
- if (aki->ob) {
- float frame= get_action_frame_inv(aki->ob, bezt->vec[1][0]);
- return IN_RANGE(frame, aki->start, aki->end);
- }
- else {
- /* check if in range */
- return IN_RANGE(bezt->vec[1][0], aki->start, aki->end);
- }
-#endif // XXX this was from some buggy code... do not port for now
- return 1;
-}
-void fcurve_to_keylist(FCurve *fcu, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void fcurve_to_keylist(AnimData *adt, FCurve *fcu, ListBase *keys, ListBase *blocks)
{
BezTriple *bezt;
ActKeyColumn *ak, *ak2;
@@ -533,15 +515,17 @@ void fcurve_to_keylist(FCurve *fcu, ListBase *keys, ListBase *blocks, ActKeysInc
int v;
if (fcu && fcu->totvert && fcu->bezt) {
+ /* apply NLA-mapping (if applicable) */
+ if (adt)
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
+
/* loop through beztriples, making ActKeys and ActKeyBlocks */
bezt= fcu->bezt;
for (v=0; v < fcu->totvert; v++, bezt++) {
/* only if keyframe is in range (optimisation) */
- if (bezt_in_aki_range(aki, bezt)) {
- add_bezt_to_keycolumnslist(keys, bezt);
- if (blocks) add_bezt_to_keyblockslist(blocks, fcu, v);
- }
+ add_bezt_to_keycolumnslist(keys, bezt);
+ if (blocks) add_bezt_to_keyblockslist(blocks, fcu, v);
}
/* update the number of curves that elements have appeared in */
@@ -577,65 +561,38 @@ void fcurve_to_keylist(FCurve *fcu, ListBase *keys, ListBase *blocks, ActKeysInc
}
}
}
+
+ /* unapply NLA-mapping if applicable */
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
}
}
-void agroup_to_keylist(bActionGroup *agrp, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void agroup_to_keylist(AnimData *adt, bActionGroup *agrp, ListBase *keys, ListBase *blocks)
{
FCurve *fcu;
if (agrp) {
/* loop through F-Curves */
for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) {
- fcurve_to_keylist(fcu, keys, blocks, aki);
+ fcurve_to_keylist(adt, fcu, keys, blocks);
}
}
}
-void action_to_keylist(bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void action_to_keylist(AnimData *adt, bAction *act, ListBase *keys, ListBase *blocks)
{
FCurve *fcu;
if (act) {
/* loop through F-Curves */
for (fcu= act->curves.first; fcu; fcu= fcu->next) {
- fcurve_to_keylist(fcu, keys, blocks, aki);
+ fcurve_to_keylist(adt, fcu, keys, blocks);
}
}
}
-void action_nlascaled_to_keylist(Object *ob, bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
-{
- FCurve *fcu;
- Object *oldob= NULL;
-
- /* although apply and clearing NLA-scaling pre-post creating keylist does impact on performance,
- * the effects should be fairly minimal, as we're already going through the keyframes multiple times
- * already for blocks too...
- */
- if (act) {
- /* if 'aki' is provided, store it's current ob to restore later as it might not be the same */
- if (aki) {
- oldob= aki->ob;
- aki->ob= ob;
- }
-
- /* loop through F-Curves
- * - scaling correction only does times for center-points, so should be faster
- */
- for (fcu= act->curves.first; fcu; fcu= fcu->next) {
- ANIM_nla_mapping_apply_fcurve(ob, fcu, 0, 1);
- fcurve_to_keylist(fcu, keys, blocks, aki);
- ANIM_nla_mapping_apply_fcurve(ob, fcu, 1, 1);
- }
-
- /* if 'aki' is provided, restore ob */
- if (aki)
- aki->ob= oldob;
- }
-}
-void gpl_to_keylist(bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc *aki)
+void gpl_to_keylist(bDopeSheet *ads, bGPDlayer *gpl, ListBase *keys, ListBase *blocks)
{
bGPDframe *gpf;
ActKeyColumn *ak;
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 8243629b4a6..77826eca87a 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -128,6 +128,10 @@ static short agrp_keys_bezier_loop(BeztEditData *bed, bActionGroup *agrp, BeztEd
{
FCurve *fcu;
+ /* sanity check */
+ if (agrp == NULL)
+ return 0;
+
/* only iterate over the F-Curves that are in this group */
for (fcu= agrp->channels.first; fcu && fcu->grp==agrp; fcu= fcu->next) {
if (ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb))
@@ -142,6 +146,10 @@ static short act_keys_bezier_loop(BeztEditData *bed, bAction *act, BeztEditFunc
{
FCurve *fcu;
+ /* sanity check */
+ if (act == NULL)
+ return 0;
+
/* just loop through all F-Curves */
for (fcu= act->curves.first; fcu; fcu= fcu->next) {
if (ANIM_fcurve_keys_bezier_loop(bed, fcu, bezt_ok, bezt_cb, fcu_cb))
@@ -154,6 +162,10 @@ static short act_keys_bezier_loop(BeztEditData *bed, bAction *act, BeztEditFunc
/* This function is used to loop over the keyframe data of an AnimData block */
static short adt_keys_bezier_loop(BeztEditData *bed, AnimData *adt, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag)
{
+ /* sanity check */
+ if (adt == NULL)
+ return 0;
+
/* drivers or actions? */
if (filterflag & ADS_FILTER_ONLYDRIVERS) {
FCurve *fcu;
@@ -178,6 +190,10 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez
{
Key *key= ob_get_key(ob);
+ /* sanity check */
+ if (ob == NULL)
+ return 0;
+
/* firstly, Object's own AnimData */
if (ob->adt)
adt_keys_bezier_loop(bed, ob->adt, bezt_ok, bezt_cb, fcu_cb, filterflag);
@@ -194,7 +210,11 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez
/* This function is used to loop over the keyframe data in a Scene */
static short scene_keys_bezier_loop(BeztEditData *bed, Scene *sce, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag)
{
- World *wo= sce->world;
+ World *wo= (sce) ? sce->world : NULL;
+
+ /* sanity check */
+ if (sce == NULL)
+ return 0;
/* Scene's own animation */
if (sce->adt)
@@ -231,7 +251,7 @@ short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, B
return act_keys_bezier_loop(bed, (bAction *)ale->data, bezt_ok, bezt_cb, fcu_cb);
case ALE_OB: /* object */
- return ob_keys_bezier_loop(bed, (Object *)ale->data, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ return ob_keys_bezier_loop(bed, (Object *)ale->key_data, bezt_ok, bezt_cb, fcu_cb, filterflag);
case ALE_SCE: /* scene */
return scene_keys_bezier_loop(bed, (Scene *)ale->data, bezt_ok, bezt_cb, fcu_cb, filterflag);
}
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 48ca06fb73d..6e62b163ca9 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -52,6 +52,8 @@
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
+#include "RNA_access.h"
+
/* This file contains code for various keyframe-editing tools which are 'destructive'
* (i.e. they will modify the order of the keyframes, and change the size of the array).
* While some of these tools may eventually be moved out into blenkernel, for now, it is
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 90804052370..251c59c47c9 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1,5 +1,30 @@
-/* Testing code for 2.5 animation system
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#include <stdio.h>
@@ -29,6 +54,7 @@
#include "BKE_action.h"
#include "BKE_constraint.h"
#include "BKE_fcurve.h"
+#include "BKE_nla.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BKE_context.h"
@@ -697,9 +723,119 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
/* ------------------------- Insert Key API ------------------------- */
+/* Secondary Keyframing API call:
+ * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary
+ * data being keyframed, and a pointer to the F-Curve to use have both been provided.
+ *
+ * The flag argument is used for special settings that alter the behaviour of
+ * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
+ * and extra keyframe filtering.
+ */
+short insert_keyframe_direct (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, short flag)
+{
+ float curval= 0.0f;
+
+ /* no F-Curve to add keyframe to? */
+ if (fcu == NULL) {
+ printf("ERROR: no F-Curve to add keyframes to \n");
+ return 0;
+ }
+
+ /* if no property given yet, try to validate from F-Curve info */
+ if ((ptr.id.data == NULL) && (ptr.data==NULL)) {
+ printf("ERROR: no RNA-pointer available to retrieve values for keyframing from\n");
+ return 0;
+ }
+ if (prop == NULL) {
+ PointerRNA tmp_ptr;
+
+ /* try to get property we should be affecting */
+ if ((RNA_path_resolve(&ptr, fcu->rna_path, &tmp_ptr, &prop) == 0) || (prop == NULL)) {
+ /* property not found... */
+ char *idname= (ptr.id.data) ? ((ID *)ptr.id.data)->name : "<No ID-Pointer>";
+
+ printf("Insert Key: Could not insert keyframe, as RNA Path is invalid for the given ID (ID = %s, Path = %s)\n", idname, fcu->rna_path);
+ return 0;
+ }
+ else {
+ /* property found, so overwrite 'ptr' to make later code easier */
+ ptr= tmp_ptr;
+ }
+ }
+
+ /* set additional flags for the F-Curve (i.e. only integer values) */
+ fcu->flag &= ~(FCURVE_INT_VALUES|FCURVE_DISCRETE_VALUES);
+ switch (RNA_property_type(prop)) {
+ case PROP_FLOAT:
+ /* do nothing */
+ break;
+ case PROP_INT:
+ /* do integer (only 'whole' numbers) interpolation between all points */
+ fcu->flag |= FCURVE_INT_VALUES;
+ break;
+ default:
+ /* do 'discrete' (i.e. enum, boolean values which cannot take any intermediate
+ * values at all) interpolation between all points
+ * - however, we must also ensure that evaluated values are only integers still
+ */
+ fcu->flag |= (FCURVE_DISCRETE_VALUES|FCURVE_INT_VALUES);
+ break;
+ }
+
+ /* obtain value to give keyframe */
+ if ( (flag & INSERTKEY_MATRIX) &&
+ (visualkey_can_use(&ptr, prop)) )
+ {
+ /* visual-keying is only available for object and pchan datablocks, as
+ * it works by keyframing using a value extracted from the final matrix
+ * instead of using the kt system to extract a value.
+ */
+ curval= visualkey_get_value(&ptr, prop, fcu->array_index);
+ }
+ else {
+ /* read value from system */
+ curval= setting_get_rna_value(&ptr, prop, fcu->array_index);
+ }
+
+ /* only insert keyframes where they are needed */
+ if (flag & INSERTKEY_NEEDED) {
+ short insert_mode;
+
+ /* check whether this curve really needs a new keyframe */
+ insert_mode= new_key_needed(fcu, cfra, curval);
+
+ /* insert new keyframe at current frame */
+ if (insert_mode)
+ insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
+
+ /* delete keyframe immediately before/after newly added */
+ switch (insert_mode) {
+ case KEYNEEDED_DELPREV:
+ delete_fcurve_key(fcu, fcu->totvert-2, 1);
+ break;
+ case KEYNEEDED_DELNEXT:
+ delete_fcurve_key(fcu, 1, 1);
+ break;
+ }
+
+ /* only return success if keyframe added */
+ if (insert_mode)
+ return 1;
+ }
+ else {
+ /* just insert keyframe */
+ insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
+
+ /* return success */
+ return 1;
+ }
+
+ /* failed */
+ return 0;
+}
+
/* 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.
+ * Use this when validation of necessary animation data is necessary, since it may not exist yet.
*
* The flag argument is used for special settings that alter the behaviour of
* the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
@@ -719,102 +855,31 @@ short insert_keyframe (ID *id, bAction *act, const char group[], const char rna_
}
/* get F-Curve - if no action is provided, keyframe to the default one attached to this ID-block */
- if (act == NULL)
+ if (act == NULL) {
+ AnimData *adt= BKE_animdata_from_id(id);
+
+ /* get action to add F-Curve+keyframe to */
act= verify_adt_action(id, 1);
+
+ /* apply NLA-mapping to frame to use (if applicable) */
+ cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
+ }
fcu= verify_fcurve(act, group, rna_path, array_index, 1);
- /* only continue if we have an F-Curve to add keyframe to */
- if (fcu) {
- float curval= 0.0f;
-
- /* set additional flags for the F-Curve (i.e. only integer values) */
- fcu->flag &= ~(FCURVE_INT_VALUES|FCURVE_DISCRETE_VALUES);
- switch (RNA_property_type(prop)) {
- case PROP_FLOAT:
- /* do nothing */
- break;
- case PROP_INT:
- /* do integer (only 'whole' numbers) interpolation between all points */
- fcu->flag |= FCURVE_INT_VALUES;
- break;
- default:
- /* do 'discrete' (i.e. enum, boolean values which cannot take any intermediate
- * values at all) interpolation between all points
- * - however, we must also ensure that evaluated values are only integers still
- */
- fcu->flag |= (FCURVE_DISCRETE_VALUES|FCURVE_INT_VALUES);
- break;
- }
-
- /* apply special time tweaking */
- // XXX check on this stuff...
- if (GS(id->name) == ID_OB) {
- //Object *ob= (Object *)id;
-
- /* apply NLA-scaling (if applicable) */
- //cfra= get_action_frame(ob, cfra);
-
- /* ancient time-offset cruft */
- //if ( (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)) ) {
- // /* actually frametofloat calc again! */
- // cfra-= give_timeoffset(ob)*scene->r.framelen;
- //}
- }
-
- /* obtain value to give keyframe */
- if ( (flag & INSERTKEY_MATRIX) &&
- (visualkey_can_use(&ptr, prop)) )
- {
- /* visual-keying is only available for object and pchan datablocks, as
- * it works by keyframing using a value extracted from the final matrix
- * instead of using the kt system to extract a value.
- */
- curval= visualkey_get_value(&ptr, prop, array_index);
- }
- else {
- /* read value from system */
- curval= setting_get_rna_value(&ptr, prop, array_index);
- }
+ /* apply special time tweaking */
+ // XXX check on this stuff...
+ if (GS(id->name) == ID_OB) {
+ //Object *ob= (Object *)id;
- /* only insert keyframes where they are needed */
- if (flag & INSERTKEY_NEEDED) {
- short insert_mode;
-
- /* check whether this curve really needs a new keyframe */
- insert_mode= new_key_needed(fcu, cfra, curval);
-
- /* insert new keyframe at current frame */
- if (insert_mode)
- insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
-
- /* delete keyframe immediately before/after newly added */
- switch (insert_mode) {
- case KEYNEEDED_DELPREV:
- delete_fcurve_key(fcu, fcu->totvert-2, 1);
- break;
- case KEYNEEDED_DELNEXT:
- delete_fcurve_key(fcu, 1, 1);
- break;
- }
-
- /* only return success if keyframe added */
- if (insert_mode)
- return 1;
- }
- else {
- /* just insert keyframe */
- insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
-
- /* return success */
- return 1;
- }
+ /* ancient time-offset cruft */
+ //if ( (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)) ) {
+ // /* actually frametofloat calc again! */
+ // cfra-= give_timeoffset(ob)*scene->r.framelen;
+ //}
}
- /* no F-Curve to add keyframes to */
- printf("ERROR: no F-Curve to add keyframes to \n");
-
- /* return failure */
- return 0;
+ /* insert keyframe */
+ return insert_keyframe_direct(ptr, prop, fcu, cfra, flag);
}
/* ************************************************** */
@@ -839,6 +904,9 @@ short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_
/* if no action is provided, use the default one attached to this ID-block */
AnimData *adt= BKE_animdata_from_id(id);
act= adt->action;
+
+ /* apply NLA-mapping to frame to use (if applicable) */
+ cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}
/* 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);
@@ -852,9 +920,6 @@ short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_
if (GS(id->name) == ID_OB) {
//Object *ob= (Object *)id;
- /* apply NLA-scaling (if applicable) */
- // cfra= get_action_frame(ob, cfra);
-
/* ancient time-offset cruft */
//if ( (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)) ) {
// /* actually frametofloat calc again! */
@@ -1241,6 +1306,13 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
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), 0);
+
+ success+= insert_keyframe_direct(ptr, prop, fcu, cfra, 0);
+ }
else {
if (G.f & G_DEBUG)
printf("Button Insert-Key: no path to property \n");
@@ -1354,10 +1426,51 @@ void ANIM_OT_delete_keyframe_button (wmOperatorType *ot)
}
/* ******************************************* */
+/* AUTO KEYFRAME */
+
+int autokeyframe_cfra_can_key(Scene *scene, ID *id)
+{
+ float cfra= (float)CFRA; // XXX for now, this will do
+
+ /* only filter if auto-key mode requires this */
+ if (IS_AUTOKEY_ON(scene) == 0)
+ return 0;
+ else if (IS_AUTOKEY_MODE(scene, NORMAL))
+ return 1;
+ else
+ return id_frame_has_keyframe(id, cfra, ANIMFILTER_KEYS_LOCAL);
+}
+
+/* ******************************************* */
/* KEYFRAME DETECTION */
/* --------------- API/Per-Datablock Handling ------------------- */
+/* Checks if some F-Curve has a keyframe for a given frame */
+short fcurve_frame_has_keyframe (FCurve *fcu, float frame, short filter)
+{
+ /* quick sanity check */
+ if (fcu == NULL)
+ return 0;
+
+ /* we either include all regardless of muting, or only non-muted */
+ if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED)==0) {
+ short replace = -1;
+ int i = binarysearch_bezt_index(fcu->bezt, frame, fcu->totvert, &replace);
+
+ /* binarysearch_bezt_index will set replace to be 0 or 1
+ * - obviously, 1 represents a match
+ */
+ if (replace) {
+ /* sanity check: 'i' may in rare cases exceed arraylen */
+ if ((i >= 0) && (i < fcu->totvert))
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/* Checks whether an Action has a keyframe for a given frame
* Since we're only concerned whether a keyframe exists, we can simply loop until a match is found...
*/
@@ -1379,20 +1492,8 @@ short action_frame_has_keyframe (bAction *act, float frame, short filter)
for (fcu= act->curves.first; fcu; fcu= fcu->next) {
/* only check if there are keyframes (currently only of type BezTriple) */
if (fcu->bezt && fcu->totvert) {
- /* we either include all regardless of muting, or only non-muted */
- if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED)==0) {
- short replace = -1;
- int i = binarysearch_bezt_index(fcu->bezt, frame, fcu->totvert, &replace);
-
- /* binarysearch_bezt_index will set replace to be 0 or 1
- * - obviously, 1 represents a match
- */
- if (replace) {
- /* sanity check: 'i' may in rare cases exceed arraylen */
- if ((i >= 0) && (i < fcu->totvert))
- return 1;
- }
- }
+ if (fcurve_frame_has_keyframe(fcu, frame, filter))
+ return 1;
}
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 0f5cef51bdb..0f8de7f607d 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -1,5 +1,30 @@
-/* Testing code for 2.5 animation system
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#include <stdio.h>
@@ -106,10 +131,10 @@ 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", "Named Group", ""},
- {KSP_GROUP_NONE, "NONE", "None", ""},
- {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""},
- {0, NULL, NULL, NULL}};
+ {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 Keying Set Destination";
@@ -1060,6 +1085,9 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
case ID_MA: /* Material Keyframes */
WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, ksp->id);
break;
+ default: /* Any keyframes */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+ break;
}
}
}
@@ -1166,6 +1194,9 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
case ID_MA: /* Material Keyframes */
WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, cks->id);
break;
+ default: /* Any keyframes */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+ break;
}
}
}
diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h
index c39f410424a..d950f073cf0 100644
--- a/source/blender/editors/armature/BIF_retarget.h
+++ b/source/blender/editors/armature/BIF_retarget.h
@@ -152,7 +152,7 @@ typedef struct RigControl {
} RigControl;
void BIF_retargetArc(struct bContext *C, ReebArc *earc, RigGraph *template_rigg);
-RigGraph *RIG_graphFromArmature(struct bContext *C, struct Object *ob, struct bArmature *arm);
+RigGraph *RIG_graphFromArmature(const struct bContext *C, struct Object *ob, struct bArmature *arm);
int RIG_nbJoints(RigGraph *rg);
char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index);
void RIG_freeRigGraph(BGraph *rg);
diff --git a/source/blender/editors/armature/Makefile b/source/blender/editors/armature/Makefile
index 6c7ce81a8a1..0291bcb1830 100644
--- a/source/blender/editors/armature/Makefile
+++ b/source/blender/editors/armature/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 646c75f50bf..d5ad63ca21b 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -42,7 +42,7 @@ void ARMATURE_OT_subdivide_multi(struct wmOperatorType *ot);
void ARMATURE_OT_parent_set(struct wmOperatorType *ot);
void ARMATURE_OT_parent_clear(struct wmOperatorType *ot);
void ARMATURE_OT_select_all_toggle(struct wmOperatorType *ot);
-void ARMATURE_OT_select_invert(struct wmOperatorType *ot);
+void ARMATURE_OT_select_inverse(struct wmOperatorType *ot);
void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot);
void ARMATURE_OT_select_linked(struct wmOperatorType *ot);
void ARMATURE_OT_delete(struct wmOperatorType *ot);
@@ -56,10 +56,11 @@ void POSE_OT_rot_clear(struct wmOperatorType *ot);
void POSE_OT_loc_clear(struct wmOperatorType *ot);
void POSE_OT_scale_clear(struct wmOperatorType *ot);
void POSE_OT_select_all_toggle(struct wmOperatorType *ot);
-void POSE_OT_select_invert(struct wmOperatorType *ot);
+void POSE_OT_select_inverse(struct wmOperatorType *ot);
void POSE_OT_select_parent(struct wmOperatorType *ot);
void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
void POSE_OT_select_linked(struct wmOperatorType *ot);
+void POSE_OT_select_constraint_target(struct wmOperatorType *ot);
void SKETCH_OT_gesture(struct wmOperatorType *ot);
void SKETCH_OT_delete(struct wmOperatorType *ot);
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 5c31883834c..df32f452a38 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -121,7 +121,7 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(ARMATURE_OT_parent_clear);
WM_operatortype_append(ARMATURE_OT_select_all_toggle);
- WM_operatortype_append(ARMATURE_OT_select_invert);
+ WM_operatortype_append(ARMATURE_OT_select_inverse);
WM_operatortype_append(ARMATURE_OT_select_hierarchy);
WM_operatortype_append(ARMATURE_OT_select_linked);
@@ -148,11 +148,12 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(POSE_OT_scale_clear);
WM_operatortype_append(POSE_OT_select_all_toggle);
- WM_operatortype_append(POSE_OT_select_invert);
+ WM_operatortype_append(POSE_OT_select_inverse);
WM_operatortype_append(POSE_OT_select_parent);
WM_operatortype_append(POSE_OT_select_hierarchy);
WM_operatortype_append(POSE_OT_select_linked);
+ WM_operatortype_append(POSE_OT_select_constraint_target);
/* POSELIB */
WM_operatortype_append(POSELIB_OT_browse_interactive);
@@ -188,20 +189,18 @@ void ED_keymap_armature(wmWindowManager *wm)
WM_keymap_add_item(keymap, "ARMATURE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ARMATURE_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ARMATURE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_test", TKEY, KM_PRESS, 0, 0); // XXX temp test for context iterators... to be removed
kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", 0);
kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
RNA_boolean_set(kmi->ptr, "extend", 1);
kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", 0);
kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
RNA_boolean_set(kmi->ptr, "extend", 1);
@@ -234,20 +233,18 @@ void ED_keymap_armature(wmWindowManager *wm)
WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "POSE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "POSE_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "POSE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", 0);
kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
RNA_boolean_set(kmi->ptr, "extend", 1);
kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", 0);
kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
RNA_boolean_set(kmi->ptr, "extend", 1);
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 9c9be51f010..d00f4c770d1 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -72,7 +72,6 @@
#include "PIL_time.h"
#include "BIF_gl.h"
-#include "BIF_transform.h"
#include "BIF_generate.h"
#include "RNA_access.h"
@@ -85,6 +84,7 @@
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_util.h"
#include "ED_view3d.h"
@@ -110,7 +110,7 @@ static void adduplicate() {}
/* **************** tools on Editmode Armature **************** */
/* Sync selection to parent for connected children */
-static void armature_sync_selection(ListBase *edbo)
+void ED_armature_sync_selection(ListBase *edbo)
{
EditBone *ebo;
@@ -669,24 +669,21 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann
}
}
-int join_armature(Scene *scene, View3D *v3d)
+int join_armature_exec(bContext *C, wmOperator *op)
{
- Object *ob= scene->basact->object; // XXX context
- bArmature *arm= ob->data;
- Base *base, *nextbase;
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ bArmature *arm= (ob)? ob->data: NULL;
bPose *pose, *opose;
bPoseChannel *pchan, *pchann;
EditBone *curbone;
float mat[4][4], oimat[4][4];
/* Ensure we're not in editmode and that the active object is an armature*/
- if (ob->type!=OB_ARMATURE) return 0;
- if (arm->edbo) return 0;
-
- if (object_data_is_libdata(ob)) {
- error_libdata();
- return 0;
- }
+ if (!ob || ob->type!=OB_ARMATURE)
+ return OPERATOR_CANCELLED;
+ if (!arm || arm->edbo)
+ return OPERATOR_CANCELLED;
/* Get editbones of active armature to add editbones to */
ED_armature_to_edit(ob);
@@ -694,89 +691,89 @@ int join_armature(Scene *scene, View3D *v3d)
/* get pose of active object and move it out of posemode */
pose= ob->pose;
ob->flag &= ~OB_POSEMODE;
-
- for (base=FIRSTBASE; base; base=nextbase) {
- nextbase = base->next;
- if (TESTBASE(v3d, base)){
- if ((base->object->type==OB_ARMATURE) && (base->object!=ob)) {
- bArmature *curarm= base->object->data;
-
- /* Make a list of editbones in current armature */
- ED_armature_to_edit(base->object);
-
- /* Get Pose of current armature */
- opose= base->object->pose;
- base->object->flag &= ~OB_POSEMODE;
- BASACT->flag &= ~OB_POSEMODE;
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if ((base->object->type==OB_ARMATURE) && (base->object!=ob)) {
+ bArmature *curarm= base->object->data;
+
+ /* Make a list of editbones in current armature */
+ ED_armature_to_edit(base->object);
+
+ /* Get Pose of current armature */
+ opose= base->object->pose;
+ base->object->flag &= ~OB_POSEMODE;
+ BASACT->flag &= ~OB_POSEMODE;
+
+ /* Find the difference matrix */
+ Mat4Invert(oimat, ob->obmat);
+ Mat4MulMat4(mat, base->object->obmat, oimat);
+
+ /* Copy bones and posechannels from the object to the edit armature */
+ for (pchan=opose->chanbase.first; pchan; pchan=pchann) {
+ pchann= pchan->next;
+ curbone= editbone_name_exists(curarm->edbo, pchan->name);
- /* Find the difference matrix */
- Mat4Invert(oimat, ob->obmat);
- Mat4MulMat4(mat, base->object->obmat, oimat);
+ /* Get new name */
+ unique_editbone_name(arm->edbo, curbone->name, NULL);
- /* Copy bones and posechannels from the object to the edit armature */
- for (pchan=opose->chanbase.first; pchan; pchan=pchann) {
- pchann= pchan->next;
- curbone= editbone_name_exists(curarm->edbo, pchan->name);
+ /* Transform the bone */
+ {
+ float premat[4][4];
+ float postmat[4][4];
+ float difmat[4][4];
+ float imat[4][4];
+ float temp[3][3];
+ float delta[3];
- /* Get new name */
- unique_editbone_name(arm->edbo, curbone->name, NULL);
+ /* Get the premat */
+ VecSubf(delta, curbone->tail, curbone->head);
+ vec_roll_to_mat3(delta, curbone->roll, temp);
- /* Transform the bone */
- {
- float premat[4][4];
- float postmat[4][4];
- float difmat[4][4];
- float imat[4][4];
- float temp[3][3];
- float delta[3];
-
- /* Get the premat */
- VecSubf(delta, curbone->tail, curbone->head);
- vec_roll_to_mat3(delta, curbone->roll, temp);
-
- Mat4One(premat); /* Mat4MulMat34 only sets 3x3 part */
- Mat4MulMat34(premat, temp, mat);
-
- Mat4MulVecfl(mat, curbone->head);
- Mat4MulVecfl(mat, curbone->tail);
-
- /* Get the postmat */
- VecSubf(delta, curbone->tail, curbone->head);
- vec_roll_to_mat3(delta, curbone->roll, temp);
- Mat4CpyMat3(postmat, temp);
-
- /* Find the roll */
- Mat4Invert(imat, premat);
- Mat4MulMat4(difmat, postmat, imat);
-
- curbone->roll -= (float)atan2(difmat[2][0], difmat[2][2]);
- }
+ Mat4One(premat); /* Mat4MulMat34 only sets 3x3 part */
+ Mat4MulMat34(premat, temp, mat);
- /* Fix Constraints and Other Links to this Bone and Armature */
- joined_armature_fix_links(ob, base->object, pchan, curbone);
+ Mat4MulVecfl(mat, curbone->head);
+ Mat4MulVecfl(mat, curbone->tail);
- /* Rename pchan */
- BLI_strncpy(pchan->name, curbone->name, sizeof(pchan->name));
+ /* Get the postmat */
+ VecSubf(delta, curbone->tail, curbone->head);
+ vec_roll_to_mat3(delta, curbone->roll, temp);
+ Mat4CpyMat3(postmat, temp);
- /* Jump Ship! */
- BLI_remlink(curarm->edbo, curbone);
- BLI_addtail(arm->edbo, curbone);
+ /* Find the roll */
+ Mat4Invert(imat, premat);
+ Mat4MulMat4(difmat, postmat, imat);
- BLI_remlink(&opose->chanbase, pchan);
- BLI_addtail(&pose->chanbase, pchan);
+ curbone->roll -= (float)atan2(difmat[2][0], difmat[2][2]);
}
- ED_base_object_free_and_unlink(scene, base);
+ /* Fix Constraints and Other Links to this Bone and Armature */
+ joined_armature_fix_links(ob, base->object, pchan, curbone);
+
+ /* Rename pchan */
+ BLI_strncpy(pchan->name, curbone->name, sizeof(pchan->name));
+
+ /* Jump Ship! */
+ BLI_remlink(curarm->edbo, curbone);
+ BLI_addtail(arm->edbo, curbone);
+
+ BLI_remlink(&opose->chanbase, pchan);
+ BLI_addtail(&pose->chanbase, pchan);
}
+
+ ED_base_object_free_and_unlink(scene, base);
}
}
+ CTX_DATA_END;
DAG_scene_sort(scene); // because we removed object(s)
ED_armature_from_edit(scene, ob);
ED_armature_edit_free(ob);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
- return 1;
+ return OPERATOR_FINISHED;
}
/* Helper function for armature separating - link fixing */
@@ -1435,7 +1432,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
/* BIF_undo_push("Select connected"); */
@@ -1668,7 +1665,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op)
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT, obedit);
@@ -1742,7 +1739,7 @@ void deselectall_armature(Object *obedit, int toggle, int doundo)
}
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
if (doundo) {
if (sel==1) BIF_undo_push("Select All");
else BIF_undo_push("Deselect All");
@@ -1814,7 +1811,7 @@ void mouse_armature(bContext *C, short mval[2], int extend)
nearBone->flag |= selmask;
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
if(nearBone) {
/* then now check for active status */
@@ -1957,9 +1954,9 @@ void auto_align_ebone_tocursor(Scene *scene, View3D *v3d, EditBone *ebone)
static EnumPropertyItem prop_calc_roll_types[] = {
- {0, "GLOBALUP", "Z-Axis Up", ""},
- {1, "CURSOR", "Z-Axis to Cursor", ""},
- {0, NULL, NULL, NULL}
+ {0, "GLOBALUP", 0, "Z-Axis Up", ""},
+ {1, "CURSOR", 0, "Z-Axis to Cursor", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int armature_calc_roll_exec(bContext *C, wmOperator *op)
@@ -2246,7 +2243,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *op)
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
@@ -2508,7 +2505,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
if (CTX_DATA_COUNT(C, selected_bones) == 0)
return OPERATOR_CANCELLED;
- armature_sync_selection(arm->edbo); // XXX why is this needed?
+ ED_armature_sync_selection(arm->edbo); // XXX why is this needed?
preEditBoneDuplicate(arm->edbo);
@@ -3058,7 +3055,7 @@ void merge_armature(Scene *scene)
}
/* undo + updates */
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
BIF_undo_push("Merge Bones");
}
@@ -3080,7 +3077,7 @@ void hide_selected_armature_bones(Scene *scene)
}
}
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
BIF_undo_push("Hide Bones");
}
@@ -3100,7 +3097,7 @@ void hide_unselected_armature_bones(Scene *scene)
}
}
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
BIF_undo_push("Hide Unselected Bones");
}
@@ -3118,7 +3115,7 @@ void show_all_armature_bones(Scene *scene)
}
}
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
BIF_undo_push("Reveal Bones");
}
@@ -3251,7 +3248,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
if (totbone==0) return OPERATOR_CANCELLED;
/* Transform the endpoints */
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
return OPERATOR_FINISHED;
}
@@ -3489,9 +3486,9 @@ static int armature_subdivs_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_subdivs(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
- {0, "SIMPLE", "Simple", ""},
- {1, "MULTI", "Multi", ""},
- {0, NULL, NULL}};
+ {0, "SIMPLE", 0, "Simple", ""},
+ {1, "MULTI", 0, "Multi", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "subdivs";
@@ -3669,9 +3666,9 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
}
static EnumPropertyItem prop_editarm_make_parent_types[] = {
- {ARM_PAR_CONNECT, "CONNECTED", "Connected", ""},
- {ARM_PAR_OFFSET, "OFFSET", "Keep Offset", ""},
- {0, NULL, NULL, NULL}
+ {ARM_PAR_CONNECT, "CONNECTED", 0, "Connected", ""},
+ {ARM_PAR_OFFSET, "OFFSET", 0, "Keep Offset", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int armature_parent_set_exec(bContext *C, wmOperator *op)
@@ -3785,9 +3782,9 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
}
static EnumPropertyItem prop_editarm_clear_parent_types[] = {
- {1, "CLEAR", "Clear Parent", ""},
- {2, "DISCONNECT", "Disconnect Bone", ""},
- {0, NULL, NULL, NULL}
+ {1, "CLEAR", 0, "Clear Parent", ""},
+ {2, "DISCONNECT", 0, "Disconnect Bone", ""},
+ {0, NULL, 0, NULL, NULL}
};
static void editbone_clear_parent(EditBone *ebone, int mode)
@@ -3812,7 +3809,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT, ob);
@@ -3839,7 +3836,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
/* **************** Selections ******************/
-static int armature_select_invert_exec(bContext *C, wmOperator *op)
+static int armature_select_inverse_exec(bContext *C, wmOperator *op)
{
/* Set the flags */
CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
@@ -3854,15 +3851,15 @@ static int armature_select_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ARMATURE_OT_select_invert(wmOperatorType *ot)
+void ARMATURE_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Invert Selection";
- ot->idname= "ARMATURE_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "ARMATURE_OT_select_inverse";
/* api callbacks */
- ot->exec= armature_select_invert_exec;
+ ot->exec= armature_select_inverse_exec;
ot->poll= ED_operator_editarmature;
/* flags */
@@ -3963,7 +3960,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
}
}
- armature_sync_selection(arm->edbo);
+ ED_armature_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
@@ -3973,9 +3970,9 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
{
static EnumPropertyItem direction_items[]= {
- {BONE_SELECT_PARENT, "PARENT", "Select Parent", ""},
- {BONE_SELECT_CHILD, "CHILD", "Select Child", ""},
- {0, NULL, NULL, NULL}
+ {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
+ {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* identifiers */
@@ -4823,7 +4820,7 @@ void POSE_OT_rot_clear(wmOperatorType *ot)
/* ***************** selections ********************** */
-static int pose_select_invert_exec(bContext *C, wmOperator *op)
+static int pose_select_inverse_exec(bContext *C, wmOperator *op)
{
/* Set the flags */
@@ -4838,15 +4835,15 @@ static int pose_select_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void POSE_OT_select_invert(wmOperatorType *ot)
+void POSE_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Invert Selection";
- ot->idname= "POSE_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "POSE_OT_select_inverse";
/* api callbacks */
- ot->exec= pose_select_invert_exec;
+ ot->exec= pose_select_inverse_exec;
ot->poll= ED_operator_posemode;
/* flags */
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 6d271375c64..6c0eab16af0 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -285,6 +285,8 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
EditBone *lastBone = NULL;
EditBone *child = NULL;
EditBone *parent = NULL;
+ float *normal = NULL;
+ float size_buffer = 1.2;
int bone_start = 0;
int end = iter->length;
int index;
@@ -294,6 +296,13 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
parent = addEditBone(arm, "Bone");
VECCOPY(parent->head, iter->p);
+ if (iter->size > 0)
+ {
+ parent->rad_head = iter->size * size_buffer;
+ }
+
+ normal = iter->no;
+
index = next_subdividion(toolsettings, iter, bone_start, end, parent->head, parent->tail);
while (index != -1)
{
@@ -304,21 +313,33 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
child->parent = parent;
child->flag |= BONE_CONNECTED;
+ if (iter->size > 0)
+ {
+ child->rad_head = iter->size * size_buffer;
+ parent->rad_tail = iter->size * size_buffer;
+ }
+
/* going to next bone, fix parent */
Mat4MulVecfl(invmat, parent->tail);
Mat4MulVecfl(invmat, parent->head);
- setBoneRollFromNormal(parent, iter->no, invmat, tmat);
+ setBoneRollFromNormal(parent, normal, invmat, tmat);
parent = child; // new child is next parent
bone_start = index; // start next bone from current index
+ normal = iter->no; /* use normal at head, not tail */
+
index = next_subdividion(toolsettings, iter, bone_start, end, parent->head, parent->tail);
}
iter->tail(iter);
VECCOPY(parent->tail, iter->p);
-
+ if (iter->size > 0)
+ {
+ parent->rad_tail = iter->size * size_buffer;
+ }
+
/* fix last bone */
Mat4MulVecfl(invmat, parent->tail);
Mat4MulVecfl(invmat, parent->head);
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 68e8b45e7d2..6f5692dbf4c 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -1538,7 +1538,7 @@ void RIG_printGraph(RigGraph *rg)
/*******************************************************************************************************/
-RigGraph *RIG_graphFromArmature(bContext *C, Object *ob, bArmature *arm)
+RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
{
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index f010abdb7e7..af1ed3e2746 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -65,7 +65,7 @@
#include "BIF_generate.h"
//#include "BIF_interface.h"
-#include "BIF_transform.h"
+#include "ED_transform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -90,6 +90,7 @@ typedef struct SK_Point
{
float p[3];
float no[3];
+ float size;
SK_PType type;
SK_PMode mode;
} SK_Point;
@@ -136,6 +137,7 @@ typedef struct SK_Intersection
typedef struct SK_Sketch
{
ListBase strokes;
+ ListBase depth_peels;
SK_Stroke *active_stroke;
SK_Stroke *gesture;
SK_Point next_point;
@@ -150,9 +152,10 @@ typedef struct SK_StrokeIterator {
NextNFct nextN;
PreviousFct previous;
StoppedFct stopped;
-
+
float *p, *no;
-
+ float size;
+
int length;
int index;
/*********************************/
@@ -239,10 +242,11 @@ int TEMPLATES_CURRENT = 0;
GHash *TEMPLATES_HASH = NULL;
RigGraph *TEMPLATE_RIGG = NULL;
-void BIF_makeListTemplates(bContext *C)
+void BIF_makeListTemplates(const bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
Base *base;
int index = 0;
@@ -250,20 +254,20 @@ void BIF_makeListTemplates(bContext *C)
{
BLI_ghash_free(TEMPLATES_HASH, NULL, NULL);
}
-
+
TEMPLATES_HASH = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
TEMPLATES_CURRENT = 0;
for ( base = FIRSTBASE; base; base = base->next )
{
Object *ob = base->object;
-
+
if (ob != obedit && ob->type == OB_ARMATURE)
{
index++;
BLI_ghash_insert(TEMPLATES_HASH, SET_INT_IN_POINTER(index), ob);
-
- if (ob == scene->toolsettings->skgen_template)
+
+ if (ob == ts->skgen_template)
{
TEMPLATES_CURRENT = index;
}
@@ -271,72 +275,73 @@ void BIF_makeListTemplates(bContext *C)
}
}
-char *BIF_listTemplates(bContext *C)
+char *BIF_listTemplates(const bContext *C)
{
GHashIterator ghi;
char menu_header[] = "Template%t|None%x0|";
char *p;
-
+
if (TEMPLATES_MENU != NULL)
{
MEM_freeN(TEMPLATES_MENU);
}
-
+
TEMPLATES_MENU = MEM_callocN(sizeof(char) * (BLI_ghash_size(TEMPLATES_HASH) * 32 + 30), "skeleton template menu");
-
+
p = TEMPLATES_MENU;
-
+
p += sprintf(TEMPLATES_MENU, "%s", menu_header);
-
+
BLI_ghashIterator_init(&ghi, TEMPLATES_HASH);
-
+
while (!BLI_ghashIterator_isDone(&ghi))
{
Object *ob = BLI_ghashIterator_getValue(&ghi);
int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
-
+
p += sprintf(p, "|%s%%x%i", ob->id.name+2, key);
-
+
BLI_ghashIterator_step(&ghi);
}
-
+
return TEMPLATES_MENU;
}
-int BIF_currentTemplate(bContext *C)
+int BIF_currentTemplate(const bContext *C)
{
- Scene *scene = CTX_data_scene(C);
- if (TEMPLATES_CURRENT == 0 && scene->toolsettings->skgen_template != NULL)
+ ToolSettings *ts = CTX_data_tool_settings(C);
+
+ if (TEMPLATES_CURRENT == 0 && ts->skgen_template != NULL)
{
GHashIterator ghi;
BLI_ghashIterator_init(&ghi, TEMPLATES_HASH);
-
+
while (!BLI_ghashIterator_isDone(&ghi))
{
Object *ob = BLI_ghashIterator_getValue(&ghi);
int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
-
- if (ob == scene->toolsettings->skgen_template)
+
+ if (ob == ts->skgen_template)
{
TEMPLATES_CURRENT = key;
break;
}
-
+
BLI_ghashIterator_step(&ghi);
}
}
-
+
return TEMPLATES_CURRENT;
}
-RigGraph* sk_makeTemplateGraph(bContext *C, Object *ob)
+RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob)
{
Object *obedit = CTX_data_edit_object(C);
if (ob == obedit)
{
return NULL;
}
-
+
if (ob != NULL)
{
if (TEMPLATE_RIGG && TEMPLATE_RIGG->ob != ob)
@@ -344,38 +349,38 @@ RigGraph* sk_makeTemplateGraph(bContext *C, Object *ob)
RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
TEMPLATE_RIGG = NULL;
}
-
+
if (TEMPLATE_RIGG == NULL)
{
bArmature *arm;
arm = ob->data;
-
+
TEMPLATE_RIGG = RIG_graphFromArmature(C, ob, arm);
}
}
-
+
return TEMPLATE_RIGG;
}
-int BIF_nbJointsTemplate(bContext *C)
+int BIF_nbJointsTemplate(const bContext *C)
{
- Scene *scene = CTX_data_scene(C);
- RigGraph *rg = sk_makeTemplateGraph(C, scene->toolsettings->skgen_template);
-
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ RigGraph *rg = sk_makeTemplateGraph(C, ts->skgen_template);
+
if (rg)
{
return RIG_nbJoints(rg);
}
else
{
- return -1;
+ return -1;
}
}
-char * BIF_nameBoneTemplate(bContext *C)
+char * BIF_nameBoneTemplate(const bContext *C)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *stk = GLOBAL_sketch;
RigGraph *rg;
int index = 0;
@@ -384,9 +389,9 @@ char * BIF_nameBoneTemplate(bContext *C)
{
index = stk->active_stroke->nb_points;
}
-
- rg = sk_makeTemplateGraph(C, scene->toolsettings->skgen_template);
-
+
+ rg = sk_makeTemplateGraph(C, ts->skgen_template);
+
if (rg == NULL)
{
return "";
@@ -402,13 +407,13 @@ void BIF_freeTemplates(bContext *C)
MEM_freeN(TEMPLATES_MENU);
TEMPLATES_MENU = NULL;
}
-
+
if (TEMPLATES_HASH != NULL)
{
BLI_ghash_free(TEMPLATES_HASH, NULL, NULL);
TEMPLATES_HASH = NULL;
}
-
+
if (TEMPLATE_RIGG != NULL)
{
RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
@@ -418,43 +423,43 @@ void BIF_freeTemplates(bContext *C)
void BIF_setTemplate(bContext *C, int index)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
if (index > 0)
{
- scene->toolsettings->skgen_template = BLI_ghash_lookup(TEMPLATES_HASH, SET_INT_IN_POINTER(index));
+ ts->skgen_template = BLI_ghash_lookup(TEMPLATES_HASH, SET_INT_IN_POINTER(index));
}
else
{
- scene->toolsettings->skgen_template = NULL;
-
+ ts->skgen_template = NULL;
+
if (TEMPLATE_RIGG != NULL)
{
RIG_freeRigGraph((BGraph*)TEMPLATE_RIGG);
}
TEMPLATE_RIGG = NULL;
}
-}
+}
/*********************** CONVERSION ***************************/
void sk_autoname(bContext *C, ReebArc *arc)
{
- Scene *scene = CTX_data_scene(C);
- if (scene->toolsettings->skgen_retarget_options & SK_RETARGET_AUTONAME)
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ if (ts->skgen_retarget_options & SK_RETARGET_AUTONAME)
{
if (arc == NULL)
{
- char *num = scene->toolsettings->skgen_num_string;
+ char *num = ts->skgen_num_string;
int i = atoi(num);
i++;
BLI_snprintf(num, 8, "%i", i);
}
else
{
- char *side = scene->toolsettings->skgen_side_string;
+ char *side = ts->skgen_side_string;
int valid = 0;
int caps = 0;
-
+
if (BLI_streq(side, ""))
{
valid = 1;
@@ -469,7 +474,7 @@ void sk_autoname(bContext *C, ReebArc *arc)
valid = 1;
caps = 0;
}
-
+
if (valid)
{
if (arc->head->p[0] < 0)
@@ -488,14 +493,14 @@ void sk_autoname(bContext *C, ReebArc *arc)
ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3])
{
ReebNode *node;
-
+
node = MEM_callocN(sizeof(ReebNode), "reeb node");
VECCOPY(node->p, pt->p);
Mat4MulVecfl(imat, node->p);
-
+
VECCOPY(node->no, pt->no);
Mat3MulVecfl(tmat, node->no);
-
+
return node;
}
@@ -503,14 +508,14 @@ ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
{
ReebArc *arc;
int i;
-
+
arc = MEM_callocN(sizeof(ReebArc), "reeb arc");
arc->head = sk_pointToNode(stk->points, imat, tmat);
arc->tail = sk_pointToNode(sk_lastStrokePoint(stk), imat, tmat);
-
+
arc->bcount = stk->nb_points - 2; /* first and last are nodes, don't count */
arc->buckets = MEM_callocN(sizeof(EmbedBucket) * arc->bcount, "Buckets");
-
+
for (i = 0; i < arc->bcount; i++)
{
VECCOPY(arc->buckets[i].p, stk->points[i + 1].p);
@@ -519,34 +524,34 @@ ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
VECCOPY(arc->buckets[i].no, stk->points[i + 1].no);
Mat3MulVecfl(tmat, arc->buckets[i].no);
}
-
+
return arc;
}
void sk_retargetStroke(bContext *C, SK_Stroke *stk)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
float imat[4][4];
float tmat[3][3];
ReebArc *arc;
RigGraph *rg;
-
+
Mat4Invert(imat, obedit->obmat);
-
+
Mat3CpyMat4(tmat, obedit->obmat);
Mat3Transp(tmat);
arc = sk_strokeToArc(stk, imat, tmat);
-
+
sk_autoname(C, arc);
-
- rg = sk_makeTemplateGraph(C, scene->toolsettings->skgen_template);
+
+ rg = sk_makeTemplateGraph(C, ts->skgen_template);
BIF_retargetArc(C, arc, rg);
-
+
sk_autoname(C, NULL);
-
+
MEM_freeN(arc->head);
MEM_freeN(arc->tail);
REEB_freeArc((BArc*)arc);
@@ -557,29 +562,31 @@ void sk_retargetStroke(bContext *C, SK_Stroke *stk)
void sk_freeSketch(SK_Sketch *sketch)
{
SK_Stroke *stk, *next;
-
+
for (stk = sketch->strokes.first; stk; stk = next)
{
next = stk->next;
-
+
sk_freeStroke(stk);
}
-
+
+ BLI_freelistN(&sketch->depth_peels);
+
MEM_freeN(sketch);
}
SK_Sketch* sk_createSketch()
{
SK_Sketch *sketch;
-
+
sketch = MEM_callocN(sizeof(SK_Sketch), "SK_Sketch");
-
+
sketch->active_stroke = NULL;
sketch->gesture = NULL;
sketch->strokes.first = NULL;
sketch->strokes.last = NULL;
-
+
return sketch;
}
@@ -612,15 +619,15 @@ void sk_freeStroke(SK_Stroke *stk)
SK_Stroke* sk_createStroke()
{
SK_Stroke *stk;
-
+
stk = MEM_callocN(sizeof(SK_Stroke), "SK_Stroke");
-
+
stk->selected = 0;
stk->nb_points = 0;
stk->buf_size = SK_Stroke_BUFFER_INIT_SIZE;
-
+
sk_allocStrokeBuffer(stk);
-
+
return stk;
}
@@ -629,13 +636,13 @@ void sk_shrinkStrokeBuffer(SK_Stroke *stk)
if (stk->nb_points < stk->buf_size)
{
SK_Point *old_points = stk->points;
-
+
stk->buf_size = stk->nb_points;
- sk_allocStrokeBuffer(stk);
-
+ sk_allocStrokeBuffer(stk);
+
memcpy(stk->points, old_points, sizeof(SK_Point) * stk->nb_points);
-
+
MEM_freeN(old_points);
}
}
@@ -645,13 +652,13 @@ void sk_growStrokeBuffer(SK_Stroke *stk)
if (stk->nb_points == stk->buf_size)
{
SK_Point *old_points = stk->points;
-
+
stk->buf_size *= 2;
-
+
sk_allocStrokeBuffer(stk);
-
+
memcpy(stk->points, old_points, sizeof(SK_Point) * stk->nb_points);
-
+
MEM_freeN(old_points);
}
}
@@ -661,16 +668,16 @@ void sk_growStrokeBufferN(SK_Stroke *stk, int n)
if (stk->nb_points + n > stk->buf_size)
{
SK_Point *old_points = stk->points;
-
+
while (stk->nb_points + n > stk->buf_size)
{
stk->buf_size *= 2;
}
-
+
sk_allocStrokeBuffer(stk);
-
+
memcpy(stk->points, old_points, sizeof(SK_Point) * stk->nb_points);
-
+
MEM_freeN(old_points);
}
}
@@ -684,52 +691,52 @@ void sk_replaceStrokePoint(SK_Stroke *stk, SK_Point *pt, int n)
void sk_insertStrokePoint(SK_Stroke *stk, SK_Point *pt, int n)
{
int size = stk->nb_points - n;
-
+
sk_growStrokeBuffer(stk);
-
+
memmove(stk->points + n + 1, stk->points + n, size * sizeof(SK_Point));
-
+
memcpy(stk->points + n, pt, sizeof(SK_Point));
-
+
stk->nb_points++;
}
void sk_appendStrokePoint(SK_Stroke *stk, SK_Point *pt)
{
sk_growStrokeBuffer(stk);
-
+
memcpy(stk->points + stk->nb_points, pt, sizeof(SK_Point));
-
+
stk->nb_points++;
}
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end)
{
int size = end - start + 1;
-
+
sk_growStrokeBufferN(stk, len - size);
-
+
if (len != size)
{
int tail_size = stk->nb_points - end + 1;
-
+
memmove(stk->points + start + len, stk->points + end + 1, tail_size * sizeof(SK_Point));
}
-
+
memcpy(stk->points + start, pts, len * sizeof(SK_Point));
-
+
stk->nb_points += len - size;
}
void sk_trimStroke(SK_Stroke *stk, int start, int end)
{
int size = end - start + 1;
-
+
if (start > 0)
{
memmove(stk->points, stk->points + start, size * sizeof(SK_Point));
}
-
+
stk->nb_points = size;
}
@@ -739,27 +746,27 @@ void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], f
SK_Point *prev, *next;
float delta_p[3];
int i, total;
-
+
total = end - start;
VecSubf(delta_p, p_end, p_start);
-
+
prev = stk->points + start;
next = stk->points + end;
-
+
VECCOPY(pt1.p, p_start);
VECCOPY(pt1.no, prev->no);
pt1.mode = prev->mode;
pt1.type = prev->type;
-
+
VECCOPY(pt2.p, p_end);
VECCOPY(pt2.no, next->no);
pt2.mode = next->mode;
pt2.type = next->type;
-
+
sk_insertStrokePoint(stk, &pt1, start + 1); /* insert after start */
sk_insertStrokePoint(stk, &pt2, end + 1); /* insert before end (since end was pushed back already) */
-
+
for (i = 1; i < total; i++)
{
float delta = (float)i / (float)total;
@@ -768,14 +775,14 @@ void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], f
VECCOPY(p, delta_p);
VecMulf(p, delta);
VecAddf(p, p, p_start);
- }
+ }
}
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
{
int offset;
int i;
-
+
/* find first exact points outside of range */
for (;start > 0; start--)
{
@@ -784,7 +791,7 @@ void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
break;
}
}
-
+
for (;end < stk->nb_points - 1; end++)
{
if (stk->points[end].type == PT_EXACT)
@@ -792,9 +799,9 @@ void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
break;
}
}
-
+
offset = start + 1;
-
+
for (i = start + 1; i < end; i++)
{
if (stk->points[i].type == PT_EXACT)
@@ -807,7 +814,7 @@ void sk_polygonizeStroke(SK_Stroke *stk, int start, int end)
offset++;
}
}
-
+
/* some points were removes, move end of array */
if (offset < end)
{
@@ -822,15 +829,15 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
float normal[3], distance[3];
float limit;
int i, total;
-
+
total = end - start + 1;
-
+
VECCOPY(normal, stk->points[start].no);
-
+
VecSubf(distance, stk->points[end].p, stk->points[start].p);
Projf(normal, distance, normal);
limit = Normalize(normal);
-
+
for (i = 1; i < total - 1; i++)
{
float d = limit * i / total;
@@ -839,13 +846,13 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
VecSubf(distance, p, stk->points[start].p);
Projf(distance, distance, normal);
-
+
VECCOPY(offset, normal);
VecMulf(offset, d);
-
+
VecSubf(p, p, distance);
VecAddf(p, p, offset);
- }
+ }
}
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk)
@@ -854,7 +861,7 @@ void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk)
{
sketch->active_stroke = NULL;
}
-
+
BLI_remlink(&sketch->strokes, stk);
sk_freeStroke(stk);
}
@@ -863,14 +870,14 @@ void sk_reverseStroke(SK_Stroke *stk)
{
SK_Point *old_points = stk->points;
int i = 0;
-
+
sk_allocStrokeBuffer(stk);
-
+
for (i = 0; i < stk->nb_points; i++)
{
sk_copyPoint(stk->points + i, old_points + stk->nb_points - 1 - i);
}
-
+
MEM_freeN(old_points);
}
@@ -891,9 +898,9 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
SK_Point *old_points = stk->points;
int nb_points = stk->nb_points;
int i, j;
-
+
return;
-
+
if (start == -1)
{
start = 0;
@@ -902,30 +909,30 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
sk_allocStrokeBuffer(stk);
stk->nb_points = 0;
-
+
/* adding points before range */
for (i = 0; i < start; i++)
{
sk_appendStrokePoint(stk, old_points + i);
}
-
+
for (i = start, j = start; i <= end; i++)
{
if (i - j == 3)
{
SK_Point pt;
float vec[3];
-
+
sk_copyPoint(&pt, &old_points[j+1]);
pt.p[0] = 0;
pt.p[1] = 0;
pt.p[2] = 0;
-
+
VECCOPY(vec, old_points[j].p);
VecMulf(vec, -0.25);
VecAddf(pt.p, pt.p, vec);
-
+
VECCOPY(vec, old_points[j+1].p);
VecMulf(vec, 0.75);
VecAddf(pt.p, pt.p, vec);
@@ -937,20 +944,22 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
VECCOPY(vec, old_points[j+3].p);
VecMulf(vec, -0.25);
VecAddf(pt.p, pt.p, vec);
-
+
+ pt.size = -0.25 * old_points[j].size + 0.75 * old_points[j+1].size + 0.75 * old_points[j+2].size - 0.25 * old_points[j+3].size;
+
sk_appendStrokePoint(stk, &pt);
j += 2;
}
-
+
/* this might be uneeded when filtering last continuous stroke */
if (old_points[i].type == PT_EXACT)
{
sk_appendStrokePoint(stk, old_points + i);
j = i;
}
- }
-
+ }
+
/* adding points after range */
for (i = end + 1; i < nb_points; i++)
{
@@ -965,14 +974,14 @@ void sk_filterStroke(SK_Stroke *stk, int start, int end)
void sk_filterLastContinuousStroke(SK_Stroke *stk)
{
int start, end;
-
+
end = stk->nb_points -1;
-
+
for (start = end - 1; start > 0 && stk->points[start].type == PT_CONTINUOUS; start--)
{
/* nothing to do here*/
}
-
+
if (end - start > 1)
{
sk_filterStroke(stk, start, end);
@@ -982,46 +991,118 @@ void sk_filterLastContinuousStroke(SK_Stroke *stk)
SK_Point *sk_lastStrokePoint(SK_Stroke *stk)
{
SK_Point *pt = NULL;
-
+
if (stk->nb_points > 0)
{
pt = stk->points + (stk->nb_points - 1);
}
-
+
return pt;
}
+float sk_clampPointSize(SK_Point *pt, float size)
+{
+ return MAX2(size * pt->size, size / 2);
+}
+
+void sk_drawPoint(GLUquadric *quad, SK_Point *pt, float size)
+{
+ glTranslatef(pt->p[0], pt->p[1], pt->p[2]);
+ gluSphere(quad, sk_clampPointSize(pt, size), 8, 8);
+}
+
+void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size)
+{
+ float vec1[3], vec2[3] = {0, 0, 1}, axis[3];
+ float angle, length;
+
+ VecSubf(vec1, pt1->p, pt0->p);
+ length = Normalize(vec1);
+ Crossf(axis, vec2, vec1);
+
+ if (VecIsNull(axis))
+ {
+ axis[1] = 1;
+ }
+
+ angle = NormalizedVecAngle2(vec2, vec1);
+
+ glRotatef(angle * 180 / M_PI + 180, axis[0], axis[1], axis[2]);
+
+ gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
+}
+
+void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height)
+{
+ float vec2[3] = {0, 0, 1}, axis[3];
+ float angle;
+
+ glPushMatrix();
+
+ Crossf(axis, vec2, pt->no);
+
+ if (VecIsNull(axis))
+ {
+ axis[1] = 1;
+ }
+
+ angle = NormalizedVecAngle2(vec2, pt->no);
+
+ glRotatef(angle * 180 / M_PI, axis[0], axis[1], axis[2]);
+
+ glColor3f(0, 1, 1);
+ gluCylinder(quad, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height), 10, 2);
+
+ glPopMatrix();
+}
+
void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
{
float rgb[3];
int i;
-
+ GLUquadric *quad = gluNewQuadric();
+ gluQuadricNormals(quad, GLU_SMOOTH);
+
if (id != -1)
{
glLoadName(id);
-
- glBegin(GL_LINE_STRIP);
-
+
for (i = 0; i < stk->nb_points; i++)
{
- glVertex3fv(stk->points[i].p);
+ glPushMatrix();
+
+ sk_drawPoint(quad, stk->points + i, 0.1);
+
+ if (i > 0)
+ {
+ sk_drawEdge(quad, stk->points + i - 1, stk->points + i, 0.1);
+ }
+
+ glPopMatrix();
}
-
- glEnd();
-
+
}
else
{
float d_rgb[3] = {1, 1, 1};
-
+
VECCOPY(rgb, color);
VecSubf(d_rgb, d_rgb, rgb);
VecMulf(d_rgb, 1.0f / (float)stk->nb_points);
-
- glBegin(GL_LINE_STRIP);
for (i = 0; i < stk->nb_points; i++)
{
+ SK_Point *pt = stk->points + i;
+
+ glPushMatrix();
+
+ if (pt->type == PT_EXACT)
+ {
+ glColor3f(0, 0, 0);
+ sk_drawPoint(quad, pt, 0.15);
+ sk_drawNormal(quad, pt, 0.05, 0.9);
+ }
+
if (i >= start && i <= end)
{
glColor3f(0.3, 0.3, 0.3);
@@ -1030,99 +1111,78 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
{
glColor3fv(rgb);
}
- glVertex3fv(stk->points[i].p);
- VecAddf(rgb, rgb, d_rgb);
- }
-
- glEnd();
-#if 0
- glColor3f(0, 0, 1);
- glBegin(GL_LINES);
+ if (pt->type != PT_EXACT)
+ {
- for (i = 0; i < stk->nb_points; i++)
- {
- float *p = stk->points[i].p;
- float *no = stk->points[i].no;
- glVertex3fv(p);
- glVertex3f(p[0] + no[0], p[1] + no[1], p[2] + no[2]);
- }
-
- glEnd();
-#endif
+ sk_drawPoint(quad, pt, 0.1);
+ }
- glColor3f(0, 0, 0);
- glBegin(GL_POINTS);
-
- for (i = 0; i < stk->nb_points; i++)
- {
- if (stk->points[i].type == PT_EXACT)
+ if (i > 0)
{
- glVertex3fv(stk->points[i].p);
+ sk_drawEdge(quad, pt - 1, pt, 0.1);
}
+
+ glPopMatrix();
+
+ VecAddf(rgb, rgb, d_rgb);
}
-
- glEnd();
}
-// glColor3f(1, 1, 1);
-// glBegin(GL_POINTS);
-//
-// for (i = 0; i < stk->nb_points; i++)
-// {
-// if (stk->points[i].type == PT_CONTINUOUS)
-// {
-// glVertex3fv(stk->points[i].p);
-// }
-// }
-//
-// glEnd();
+ gluDeleteQuadric(quad);
}
void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion)
{
+ SK_Stroke *stk = ((SK_StrokeIterator*)iter)->stroke;
float head[3], tail[3];
int bone_start = 0;
int end = iter->length;
int index;
+ GLUquadric *quad = gluNewQuadric();
+ gluQuadricNormals(quad, GLU_SMOOTH);
iter->head(iter);
VECCOPY(head, iter->p);
-
- glColor3f(0, 1, 0);
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) * 2);
- glBegin(GL_POINTS);
-
+
index = next_subdividion(toolsettings, iter, bone_start, end, head, tail);
while (index != -1)
{
- glVertex3fv(tail);
-
+ SK_Point *pt = stk->points + index;
+
+ glPushMatrix();
+
+ glColor3f(0, 1, 0);
+ sk_drawPoint(quad, pt, 0.15);
+
+ sk_drawNormal(quad, pt, 0.05, 0.9);
+
+ glPopMatrix();
+
VECCOPY(head, tail);
bone_start = index; // start next bone from current index
index = next_subdividion(toolsettings, iter, bone_start, end, head, tail);
}
-
- glEnd();
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
+
+ gluDeleteQuadric(quad);
}
void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
{
int head_index = -1;
int i;
-
+
if (toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET)
{
return;
}
-
+
for (i = 0; i < stk->nb_points; i++)
{
SK_Point *pt = stk->points + i;
-
+
if (pt->type == PT_EXACT || i == stk->nb_points - 1) /* stop on exact or on last point */
{
if (head_index == -1)
@@ -1135,7 +1195,7 @@ void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
{
SK_StrokeIterator sk_iter;
BArcIterator *iter = (BArcIterator*)&sk_iter;
-
+
initStrokeIterator(iter, stk, head_index, i);
if (toolsettings->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE)
@@ -1150,13 +1210,13 @@ void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
{
drawSubdividedStrokeBy(toolsettings, iter, nextFixedSubdivision);
}
-
+
}
head_index = i;
}
}
- }
+ }
}
SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *dist, int *index, int all_pts)
@@ -1164,23 +1224,23 @@ SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *di
ARegion *ar = CTX_wm_region(C);
SK_Point *pt = NULL;
int i;
-
+
for (i = 0; i < stk->nb_points; i++)
{
if (all_pts || stk->points[i].type == PT_EXACT)
{
short pval[2];
int pdist;
-
+
project_short_noclip(ar, stk->points[i].p, pval);
-
+
pdist = ABS(pval[0] - mval[0]) + ABS(pval[1] - mval[1]);
-
+
if (pdist < *dist)
{
*dist = pdist;
pt = stk->points + i;
-
+
if (index != NULL)
{
*index = i;
@@ -1188,7 +1248,7 @@ SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *di
}
}
}
-
+
return pt;
}
@@ -1197,21 +1257,21 @@ SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short
ARegion *ar = CTX_wm_region(C);
SK_Point *pt = NULL;
EditBone *bone;
-
+
for (bone = ebones->first; bone; bone = bone->next)
{
float vec[3];
short pval[2];
int pdist;
-
+
if ((bone->flag & BONE_CONNECTED) == 0)
{
VECCOPY(vec, bone->head);
Mat4MulVecfl(ob->obmat, vec);
project_short_noclip(ar, vec, pval);
-
+
pdist = ABS(pval[0] - mval[0]) + ABS(pval[1] - mval[1]);
-
+
if (pdist < *dist)
{
*dist = pdist;
@@ -1220,14 +1280,14 @@ SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short
pt->type = PT_EXACT;
}
}
-
-
+
+
VECCOPY(vec, bone->tail);
Mat4MulVecfl(ob->obmat, vec);
project_short_noclip(ar, vec, pval);
-
+
pdist = ABS(pval[0] - mval[0]) + ABS(pval[1] - mval[1]);
-
+
if (pdist < *dist)
{
*dist = pdist;
@@ -1236,7 +1296,7 @@ SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short
pt->type = PT_EXACT;
}
}
-
+
return pt;
}
@@ -1263,21 +1323,21 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
SK_Stroke *target;
int closest_index = -1;
int dist = SNAP_MIN_DISTANCE * 2;
-
+
// /* If snapping, don't start overdraw */ Can't do that, snap is embed too now
// if (sk_lastStrokePoint(stk)->mode == PT_SNAP)
// {
// return;
// }
-
+
for (target = sketch->strokes.first; target; target = target->next)
{
if (target != stk)
{
int index;
-
+
SK_Point *spt = sk_snapPointStroke(C, target, dd->mval, &dist, &index, 1);
-
+
if (spt != NULL)
{
sketch->over.target = target;
@@ -1285,7 +1345,7 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
}
}
}
-
+
if (sketch->over.target != NULL)
{
if (closest_index > -1)
@@ -1317,7 +1377,7 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
int index;
closest_pt = sk_snapPointStroke(C, sketch->over.target, dd->mval, &dist, &index, 1);
-
+
if (closest_pt != NULL)
{
if (sk_lastStrokePoint(stk)->type == PT_EXACT)
@@ -1328,7 +1388,7 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
{
sketch->over.count++;
}
-
+
sketch->over.end = index;
}
else
@@ -1345,17 +1405,17 @@ int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
*start = sketch->over.start;
*end = sketch->over.end;
-
+
if (*start == -1)
{
*start = 0;
}
-
+
if (*end == -1)
{
*end = sketch->over.target->nb_points - 1;
}
-
+
if (*end < *start)
{
int tmp = *start;
@@ -1363,34 +1423,34 @@ int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
*end = tmp;
retval = 1;
}
-
+
return retval;
}
void sk_endOverdraw(SK_Sketch *sketch)
{
SK_Stroke *stk = sketch->active_stroke;
-
+
if (sk_hasOverdraw(sketch, NULL))
{
int start;
int end;
-
+
if (sk_adjustIndexes(sketch, &start, &end))
{
sk_reverseStroke(stk);
}
-
+
if (stk->nb_points > 1)
{
stk->points->type = sketch->over.target->points[start].type;
sk_lastStrokePoint(stk)->type = sketch->over.target->points[end].type;
}
-
+
sk_insertStrokePoints(sketch->over.target, stk->points, stk->nb_points, start, end);
-
+
sk_removeStroke(sketch, stk);
-
+
sk_resetOverdraw(sketch);
}
}
@@ -1399,19 +1459,19 @@ void sk_endOverdraw(SK_Sketch *sketch)
void sk_startStroke(SK_Sketch *sketch)
{
SK_Stroke *stk = sk_createStroke();
-
+
BLI_addtail(&sketch->strokes, stk);
sketch->active_stroke = stk;
- sk_resetOverdraw(sketch);
+ sk_resetOverdraw(sketch);
}
void sk_endStroke(bContext *C, SK_Sketch *sketch)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
sk_shrinkStrokeBuffer(sketch->active_stroke);
- if (scene->toolsettings->bone_sketching & BONE_SKETCHING_ADJUST)
+ if (ts->bone_sketching & BONE_SKETCHING_ADJUST)
{
sk_endOverdraw(sketch);
}
@@ -1422,7 +1482,7 @@ void sk_endStroke(bContext *C, SK_Sketch *sketch)
void sk_updateDrawData(SK_DrawData *dd)
{
dd->type = PT_CONTINUOUS;
-
+
dd->previous_mval[0] = dd->mval[0];
dd->previous_mval[1] = dd->mval[1];
}
@@ -1433,19 +1493,19 @@ float sk_distanceDepth(bContext *C, float p1[3], float p2[3])
RegionView3D *rv3d = ar->regiondata;
float vec[3];
float distance;
-
+
VecSubf(vec, p1, p2);
-
+
Projf(vec, vec, rv3d->viewinv[2]);
-
+
distance = VecLength(vec);
-
+
if (Inpf(rv3d->viewinv[2], vec) > 0)
{
distance *= -1;
}
-
- return distance;
+
+ return distance;
}
void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float length, float distance)
@@ -1456,18 +1516,18 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float
float progress = 0;
int i;
-
+
progress = VecLenf(stk->points[start].p, stk->points[start - 1].p);
-
+
for (i = start; i <= end; i++)
{
float ray_start[3], ray_normal[3];
float delta = VecLenf(stk->points[i].p, stk->points[i + 1].p);
short pval[2];
-
+
project_short_noclip(ar, stk->points[i].p, pval);
viewray(ar, v3d, pval, ray_start, ray_normal);
-
+
VecMulf(ray_normal, distance * progress / length);
VecAddf(stk->points[i].p, stk->points[i].p, ray_normal);
@@ -1478,19 +1538,19 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float
void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData *dd)
{
ARegion *ar = CTX_wm_region(C);
- /* copied from grease pencil, need fixing */
+ /* copied from grease pencil, need fixing */
SK_Point *last = sk_lastStrokePoint(stk);
short cval[2];
float fp[3] = {0, 0, 0};
float dvec[3];
-
+
if (last != NULL)
{
VECCOPY(fp, last->p);
}
-
+
initgrabz(ar->regiondata, fp[0], fp[1], fp[2]);
-
+
/* method taken from editview.c - mouse_cursor() */
project_short_noclip(ar, fp, cval);
window_to_3d_delta(ar, dvec, cval[0] - dd->mval[0], cval[1] - dd->mval[1]);
@@ -1502,40 +1562,40 @@ int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
pt->type = dd->type;
pt->mode = PT_PROJECT;
sk_projectDrawPoint(C, pt->p, stk, dd);
-
+
return 1;
}
int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
SK_Point pt;
-
+
sk_initPoint(C, &pt);
-
+
sk_getStrokeDrawPoint(C, &pt, sketch, stk, dd);
sk_appendStrokePoint(stk, &pt);
-
+
return 1;
}
int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
- if (scene->snap_mode == SCE_SNAP_MODE_VOLUME)
+ if (ts->snap_mode == SCE_SNAP_MODE_VOLUME)
{
- ListBase depth_peels;
DepthPeel *p1, *p2;
float *last_p = NULL;
float dist = FLT_MAX;
float p[3];
-
- depth_peels.first = depth_peels.last = NULL;
-
- peelObjectsContext(C, &depth_peels, dd->mval);
-
+ float size = 0;
+
+ sketch->depth_peels.first = sketch->depth_peels.last = NULL;
+
+ peelObjectsContext(C, &sketch->depth_peels, dd->mval);
+
if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS)
{
last_p = stk->points[stk->nb_points - 1].p;
@@ -1544,20 +1604,21 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
{
last_p = LAST_SNAP_POINT;
}
-
-
- for (p1 = depth_peels.first; p1; p1 = p1->next)
+
+
+ for (p1 = sketch->depth_peels.first; p1; p1 = p1->next)
{
if (p1->flag == 0)
{
float vec[3];
float new_dist;
-
+ float new_size = 0;
+
p2 = NULL;
p1->flag = 1;
-
- /* if peeling objects, take the first and last from each object */
- if (scene->snap_flag & SCE_SNAP_PEEL_OBJECT)
+
+ /* if peeling objects, take the first and last from each object */
+ if (ts->snap_flag & SCE_SNAP_PEEL_OBJECT)
{
DepthPeel *peel;
for (peel = p1->next; peel; peel = peel->next)
@@ -1577,46 +1638,50 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
/* nothing to do here */
}
}
-
+
if (p2)
{
p2->flag = 1;
-
+
VecAddf(vec, p1->p, p2->p);
VecMulf(vec, 0.5f);
+ new_size = VecLenf(p1->p, p2->p);
}
else
{
VECCOPY(vec, p1->p);
}
-
+
if (last_p == NULL)
{
VECCOPY(p, vec);
+ size = new_size;
dist = 0;
break;
}
-
+
new_dist = VecLenf(last_p, vec);
-
+
if (new_dist < dist)
{
VECCOPY(p, vec);
dist = new_dist;
+ size = new_size;
}
}
}
-
+
if (dist != FLT_MAX)
{
pt->type = dd->type;
pt->mode = PT_SNAP;
+ pt->size = size / 2;
VECCOPY(pt->p, p);
-
+
point_added = 1;
}
-
- BLI_freelistN(&depth_peels);
+
+ //BLI_freelistN(&depth_peels);
}
else
{
@@ -1627,7 +1692,7 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
int dist = SNAP_MIN_DISTANCE; // Use a user defined value here
/* snap to strokes */
- // if (scene->snap_mode == SCE_SNAP_MODE_VERTEX) /* snap all the time to strokes */
+ // if (ts->snap_mode == SCE_SNAP_MODE_VERTEX) /* snap all the time to strokes */
for (snap_stk = sketch->strokes.first; snap_stk; snap_stk = snap_stk->next)
{
SK_Point *spt = NULL;
@@ -1639,7 +1704,7 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
{
spt = sk_snapPointStroke(C, snap_stk, dd->mval, &dist, NULL, 1);
}
-
+
if (spt != NULL)
{
VECCOPY(pt->p, spt->p);
@@ -1654,11 +1719,11 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
pt->type = dd->type;
pt->mode = PT_SNAP;
VECCOPY(pt->p, vec);
-
+
point_added = 1;
}
}
-
+
return point_added;
}
@@ -1666,23 +1731,23 @@ int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra
{
int point_added;
SK_Point pt;
-
+
sk_initPoint(C, &pt);
point_added = sk_getStrokeSnapPoint(C, &pt, sketch, stk, dd);
-
+
if (point_added)
{
float final_p[3];
float length, distance;
int total;
int i;
-
+
VECCOPY(final_p, pt.p);
-
+
sk_projectDrawPoint(C, pt.p, stk, dd);
sk_appendStrokePoint(stk, &pt);
-
+
/* update all previous point to give smooth Z progresion */
total = 0;
length = 0;
@@ -1695,38 +1760,38 @@ int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra
break;
}
}
-
+
if (total > 1)
{
distance = sk_distanceDepth(C, final_p, stk->points[i].p);
-
+
sk_interpolateDepth(C, stk, i + 1, stk->nb_points - 2, length, distance);
}
-
+
VECCOPY(stk->points[stk->nb_points - 1].p, final_p);
-
+
point_added = 1;
}
-
+
return point_added;
}
void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
-
+
if (snap)
{
point_added = sk_addStrokeSnapPoint(C, sketch, stk, dd);
}
-
+
if (point_added == 0)
{
point_added = sk_addStrokeDrawPoint(C, sketch, stk, dd);
}
-
- if (stk == sketch->active_stroke && scene->toolsettings->bone_sketching & BONE_SKETCHING_ADJUST)
+
+ if (stk == sketch->active_stroke && ts->bone_sketching & BONE_SKETCHING_ADJUST)
{
sk_updateOverdraw(C, sketch, stk, dd);
}
@@ -1735,7 +1800,7 @@ void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
int point_added = 0;
-
+
if (snap)
{
point_added = sk_getStrokeSnapPoint(C, pt, sketch, stk, dd);
@@ -1746,11 +1811,11 @@ void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *
{
LAST_SNAP_POINT_VALID = 0;
}
-
+
if (point_added == 0)
{
point_added = sk_getStrokeDrawPoint(C, pt, sketch, stk, dd);
- }
+ }
}
void sk_endContinuousStroke(SK_Stroke *stk)
@@ -1773,7 +1838,7 @@ int sk_stroke_filtermval(SK_DrawData *dd)
{
retval = 1;
}
-
+
return retval;
}
@@ -1803,25 +1868,27 @@ static void initIteratorFct(SK_StrokeIterator *iter)
iter->next = nextPoint;
iter->nextN = nextNPoint;
iter->previous = previousPoint;
- iter->stopped = iteratorStopped;
+ iter->stopped = iteratorStopped;
}
static SK_Point* setIteratorValues(SK_StrokeIterator *iter, int index)
{
SK_Point *pt = NULL;
-
+
if (index >= 0 && index < iter->length)
{
pt = &(iter->stroke->points[iter->start + (iter->stride * index)]);
iter->p = pt->p;
iter->no = pt->no;
+ iter->size = pt->size;
}
else
{
iter->p = NULL;
iter->no = NULL;
+ iter->size = 0;
}
-
+
return pt;
}
@@ -1831,7 +1898,7 @@ void initStrokeIterator(BArcIterator *arg, SK_Stroke *stk, int start, int end)
initIteratorFct(iter);
iter->stroke = stk;
-
+
if (start < end)
{
iter->start = start + 1;
@@ -1844,9 +1911,9 @@ void initStrokeIterator(BArcIterator *arg, SK_Stroke *stk, int start, int end)
iter->end = end + 1;
iter->stride = -1;
}
-
+
iter->length = iter->stride * (iter->end - iter->start + 1);
-
+
iter->index = -1;
}
@@ -1855,11 +1922,12 @@ static void* headPoint(void *arg)
{
SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
SK_Point *result = NULL;
-
+
result = &(iter->stroke->points[iter->start - iter->stride]);
iter->p = result->p;
iter->no = result->no;
-
+ iter->size = result->size;
+
return result;
}
@@ -1867,11 +1935,12 @@ static void* tailPoint(void *arg)
{
SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
SK_Point *result = NULL;
-
+
result = &(iter->stroke->points[iter->end + iter->stride]);
iter->p = result->p;
iter->no = result->no;
-
+ iter->size = result->size;
+
return result;
}
@@ -1879,7 +1948,7 @@ static void* nextPoint(void *arg)
{
SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
SK_Point *result = NULL;
-
+
iter->index++;
if (iter->index < iter->length)
{
@@ -1893,7 +1962,7 @@ static void* nextNPoint(void *arg, int n)
{
SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
SK_Point *result = NULL;
-
+
iter->index += n;
/* check if passed end */
@@ -1924,7 +1993,7 @@ static void* previousPoint(void *arg)
{
SK_StrokeIterator *iter = (SK_StrokeIterator*)arg;
SK_Point *result = NULL;
-
+
if (iter->index > 0)
{
iter->index--;
@@ -1951,7 +2020,7 @@ static int iteratorStopped(void *arg)
void sk_convertStroke(bContext *C, SK_Stroke *stk)
{
Object *obedit = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
bArmature *arm = obedit->data;
SK_Point *head;
EditBone *parent = NULL;
@@ -1959,18 +2028,18 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
float tmat[3][3];
int head_index = 0;
int i;
-
+
head = NULL;
-
+
Mat4Invert(invmat, obedit->obmat);
-
+
Mat3CpyMat4(tmat, obedit->obmat);
Mat3Transp(tmat);
-
+
for (i = 0; i < stk->nb_points; i++)
{
SK_Point *pt = stk->points + i;
-
+
if (pt->type == PT_EXACT)
{
if (head == NULL)
@@ -1982,32 +2051,32 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
{
EditBone *bone = NULL;
EditBone *new_parent;
-
+
if (i - head_index > 1)
{
SK_StrokeIterator sk_iter;
BArcIterator *iter = (BArcIterator*)&sk_iter;
initStrokeIterator(iter, stk, head_index, i);
-
- if (scene->toolsettings->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE)
+
+ if (ts->bone_sketching_convert == SK_CONVERT_CUT_ADAPTATIVE)
{
- bone = subdivideArcBy(scene->toolsettings, arm, arm->edbo, iter, invmat, tmat, nextAdaptativeSubdivision);
+ bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextAdaptativeSubdivision);
}
- else if (scene->toolsettings->bone_sketching_convert == SK_CONVERT_CUT_LENGTH)
+ else if (ts->bone_sketching_convert == SK_CONVERT_CUT_LENGTH)
{
- bone = subdivideArcBy(scene->toolsettings, arm, arm->edbo, iter, invmat, tmat, nextLengthSubdivision);
+ bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextLengthSubdivision);
}
- else if (scene->toolsettings->bone_sketching_convert == SK_CONVERT_CUT_FIXED)
+ else if (ts->bone_sketching_convert == SK_CONVERT_CUT_FIXED)
{
- bone = subdivideArcBy(scene->toolsettings, arm, arm->edbo, iter, invmat, tmat, nextFixedSubdivision);
+ bone = subdivideArcBy(ts, arm, arm->edbo, iter, invmat, tmat, nextFixedSubdivision);
}
}
-
+
if (bone == NULL)
{
bone = addEditBone(arm, "Bone");
-
+
VECCOPY(bone->head, head->p);
VECCOPY(bone->tail, pt->p);
@@ -2015,10 +2084,10 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
Mat4MulVecfl(invmat, bone->tail);
setBoneRollFromNormal(bone, head->no, invmat, tmat);
}
-
+
new_parent = bone;
bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
-
+
/* move to end of chain */
while (bone->parent != NULL)
{
@@ -2029,9 +2098,9 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
if (parent != NULL)
{
bone->parent = parent;
- bone->flag |= BONE_CONNECTED;
+ bone->flag |= BONE_CONNECTED;
}
-
+
parent = new_parent;
head_index = i;
head = pt;
@@ -2042,14 +2111,14 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
void sk_convert(bContext *C, SK_Sketch *sketch)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
SK_Stroke *stk;
-
+
for (stk = sketch->strokes.first; stk; stk = stk->next)
{
if (stk->selected == 1)
{
- if (scene->toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET)
+ if (ts->bone_sketching_convert == SK_CONVERT_RETARGET)
{
sk_retargetStroke(C, stk);
}
@@ -2077,7 +2146,7 @@ int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
float s_p1[3] = {0, 0, 0};
float s_p2[3] = {0, 0, 0};
int g_i;
-
+
project_float(ar, gesture->points[s_i].p, s_p1);
project_float(ar, gesture->points[s_i + 1].p, s_p2);
@@ -2088,37 +2157,37 @@ int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
float g_p2[3] = {0, 0, 0};
float vi[3];
float lambda;
-
+
project_float(ar, gesture->points[g_i].p, g_p1);
project_float(ar, gesture->points[g_i + 1].p, g_p2);
-
+
if (LineIntersectLineStrict(s_p1, s_p2, g_p1, g_p2, vi, &lambda))
{
SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection");
-
+
isect->gesture_index = g_i;
isect->before = s_i;
isect->after = s_i + 1;
isect->stroke = gesture;
-
+
VecSubf(isect->p, gesture->points[s_i + 1].p, gesture->points[s_i].p);
VecMulf(isect->p, lambda);
VecAddf(isect->p, isect->p, gesture->points[s_i].p);
-
+
BLI_addtail(list, isect);
added++;
}
}
}
-
+
return added;
}
int cmpIntersections(void *i1, void *i2)
{
SK_Intersection *isect1 = i1, *isect2 = i2;
-
+
if (isect1->stroke == isect2->stroke)
{
if (isect1->before < isect2->before)
@@ -2141,7 +2210,7 @@ int cmpIntersections(void *i1, void *i2)
}
}
}
-
+
return 0;
}
@@ -2159,13 +2228,13 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok
{
int s_added = 0;
int s_i;
-
+
for (s_i = 0; s_i < stk->nb_points - 1; s_i++)
{
float s_p1[3] = {0, 0, 0};
float s_p2[3] = {0, 0, 0};
int g_i;
-
+
project_float(ar, stk->points[s_i].p, s_p1);
project_float(ar, stk->points[s_i + 1].p, s_p2);
@@ -2175,45 +2244,45 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok
float g_p2[3] = {0, 0, 0};
float vi[3];
float lambda;
-
+
project_float(ar, gesture->points[g_i].p, g_p1);
project_float(ar, gesture->points[g_i + 1].p, g_p2);
-
+
if (LineIntersectLineStrict(s_p1, s_p2, g_p1, g_p2, vi, &lambda))
{
SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection");
float ray_start[3], ray_end[3];
short mval[2];
-
+
isect->gesture_index = g_i;
isect->before = s_i;
isect->after = s_i + 1;
isect->stroke = stk;
isect->lambda = lambda;
-
+
mval[0] = (short)(vi[0]);
mval[1] = (short)(vi[1]);
viewline(ar, v3d, mval, ray_start, ray_end);
-
+
LineIntersectLine( stk->points[s_i].p,
stk->points[s_i + 1].p,
ray_start,
ray_end,
isect->p,
vi);
-
+
BLI_addtail(list, isect);
s_added++;
}
}
}
-
+
added = MAX2(s_added, added);
}
-
+
BLI_sortlist(list, cmpIntersections);
-
+
return added;
}
@@ -2221,23 +2290,23 @@ int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
{
SK_StrokeIterator sk_iter;
BArcIterator *iter = (BArcIterator*)&sk_iter;
-
+
float CORRELATION_THRESHOLD = 0.99f;
float *vec;
int i, j;
-
+
sk_appendStrokePoint(segments, &gesture->points[0]);
vec = segments->points[segments->nb_points - 1].p;
initStrokeIterator(iter, gesture, 0, gesture->nb_points - 1);
for (i = 1, j = 0; i < gesture->nb_points; i++)
- {
+ {
float n[3];
-
+
/* Calculate normal */
VecSubf(n, gesture->points[i].p, vec);
-
+
if (calcArcCorrelation(iter, j, i, vec, n) < CORRELATION_THRESHOLD)
{
j = i - 1;
@@ -2248,7 +2317,7 @@ int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
}
sk_appendStrokePoint(segments, &gesture->points[gesture->nb_points - 1]);
-
+
return segments->nb_points - 1;
}
@@ -2265,16 +2334,16 @@ int sk_detectCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
void sk_applyCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
-
+
for (isect = gest->intersections.first; isect; isect = isect->next)
{
SK_Point pt;
-
+
pt.type = PT_EXACT;
pt.mode = PT_PROJECT; /* take mode from neighbouring points */
VECCOPY(pt.p, isect->p);
VECCOPY(pt.no, isect->stroke->points[isect->before].no);
-
+
sk_insertStrokePoint(isect->stroke, &pt, isect->after);
}
}
@@ -2285,12 +2354,12 @@ int sk_detectTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
float s1[3], s2[3];
float angle;
-
+
VecSubf(s1, gest->segments->points[1].p, gest->segments->points[0].p);
VecSubf(s2, gest->segments->points[2].p, gest->segments->points[1].p);
-
+
angle = VecAngle2(s1, s2);
-
+
if (angle > 60 && angle < 120)
{
return 1;
@@ -2304,21 +2373,21 @@ void sk_applyTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
float trim_dir[3];
-
+
VecSubf(trim_dir, gest->segments->points[2].p, gest->segments->points[1].p);
-
+
for (isect = gest->intersections.first; isect; isect = isect->next)
{
SK_Point pt;
float stroke_dir[3];
-
+
pt.type = PT_EXACT;
pt.mode = PT_PROJECT; /* take mode from neighbouring points */
VECCOPY(pt.p, isect->p);
VECCOPY(pt.no, isect->stroke->points[isect->before].no);
-
+
VecSubf(stroke_dir, isect->stroke->points[isect->after].p, isect->stroke->points[isect->before].p);
-
+
/* same direction, trim end */
if (Inpf(stroke_dir, trim_dir) > 0)
{
@@ -2331,7 +2400,7 @@ void sk_applyTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
sk_replaceStrokePoint(isect->stroke, &pt, isect->before);
sk_trimStroke(isect->stroke, isect->before, isect->stroke->nb_points - 1);
}
-
+
}
}
@@ -2340,7 +2409,7 @@ int sk_detectCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 1)
{
SK_Intersection *isect, *self_isect;
-
+
/* get the the last intersection of the first pair */
for( isect = gest->intersections.first; isect; isect = isect->next )
{
@@ -2350,15 +2419,15 @@ int sk_detectCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
break;
}
}
-
+
self_isect = gest->self_intersections.first;
-
+
if (isect && isect->gesture_index < self_isect->gesture_index)
{
return 1;
}
}
-
+
return 0;
}
@@ -2366,7 +2435,7 @@ void sk_applyCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
int command = 1;
-
+
// XXX
// command = pupmenu("Action %t|Flatten %x1|Straighten %x2|Polygonize %x3");
if(command < 1) return;
@@ -2374,9 +2443,9 @@ void sk_applyCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
for (isect = gest->intersections.first; isect; isect = isect->next)
{
SK_Intersection *i2;
-
+
i2 = isect->next;
-
+
if (i2 && i2->stroke == isect->stroke)
{
switch (command)
@@ -2403,32 +2472,32 @@ int sk_detectDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
float s1[3], s2[3];
float angle;
-
+
VecSubf(s1, gest->segments->points[1].p, gest->segments->points[0].p);
VecSubf(s2, gest->segments->points[2].p, gest->segments->points[1].p);
-
+
angle = VecAngle2(s1, s2);
-
+
if (angle > 120)
{
return 1;
}
}
-
+
return 0;
}
void sk_applyDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
-
+
for (isect = gest->intersections.first; isect; isect = isect->next)
{
/* only delete strokes that are crossed twice */
if (isect->next && isect->next->stroke == isect->stroke)
{
isect = isect->next;
-
+
sk_removeStroke(sketch, isect->stroke);
}
}
@@ -2441,17 +2510,17 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
short start_val[2], end_val[2];
short dist;
-
+
project_short_noclip(ar, gest->stk->points[0].p, start_val);
project_short_noclip(ar, sk_lastStrokePoint(gest->stk)->p, end_val);
-
+
dist = MAX2(ABS(start_val[0] - end_val[0]), ABS(start_val[1] - end_val[1]));
-
+
/* if gesture is a circle */
if ( dist <= 20 )
{
SK_Intersection *isect;
-
+
/* check if it circled around an exact point */
for (isect = gest->intersections.first; isect; isect = isect->next)
{
@@ -2460,10 +2529,10 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
int start_index, end_index;
int i;
-
+
start_index = MIN2(isect->after, isect->next->after);
end_index = MAX2(isect->before, isect->next->before);
-
+
for (i = start_index; i <= end_index; i++)
{
if (isect->stroke->points[i].type == PT_EXACT)
@@ -2471,21 +2540,21 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
return 1; /* at least one exact point found, stop detect here */
}
}
-
- /* skip next */
+
+ /* skip next */
isect = isect->next;
}
}
}
}
-
+
return 0;
}
void sk_applyMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
-
+
/* check if it circled around an exact point */
for (isect = gest->intersections.first; isect; isect = isect->next)
{
@@ -2494,7 +2563,7 @@ void sk_applyMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
int start_index, end_index;
int i;
-
+
start_index = MIN2(isect->after, isect->next->after);
end_index = MAX2(isect->before, isect->next->before);
@@ -2507,7 +2576,7 @@ void sk_applyMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
}
}
- /* skip next */
+ /* skip next */
isect = isect->next;
}
}
@@ -2518,7 +2587,7 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 0)
{
SK_Intersection *isect;
-
+
/* check if it circled around an exact point */
for (isect = gest->intersections.first; isect; isect = isect->next)
{
@@ -2527,7 +2596,7 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
float start_v[3], end_v[3];
float angle;
-
+
if (isect->gesture_index < isect->next->gesture_index)
{
VecSubf(start_v, isect->p, gest->stk->points[0].p);
@@ -2538,27 +2607,27 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
VecSubf(start_v, isect->next->p, gest->stk->points[0].p);
VecSubf(end_v, sk_lastStrokePoint(gest->stk)->p, isect->p);
}
-
+
angle = VecAngle2(start_v, end_v);
-
+
if (angle > 120)
{
return 1;
}
-
- /* skip next */
+
+ /* skip next */
isect = isect->next;
}
}
}
-
+
return 0;
}
void sk_applyReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
SK_Intersection *isect;
-
+
for (isect = gest->intersections.first; isect; isect = isect->next)
{
/* only reverse strokes that are crossed twice */
@@ -2566,7 +2635,7 @@ void sk_applyReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
sk_reverseStroke(isect->stroke);
- /* skip next */
+ /* skip next */
isect = isect->next;
}
}
@@ -2590,7 +2659,7 @@ static void sk_initGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
gest->intersections.first = gest->intersections.last = NULL;
gest->self_intersections.first = gest->self_intersections.last = NULL;
-
+
gest->segments = sk_createStroke();
gest->stk = sketch->gesture;
@@ -2610,9 +2679,9 @@ void sk_applyGesture(bContext *C, SK_Sketch *sketch)
{
SK_Gesture gest;
SK_GestureAction *act;
-
+
sk_initGesture(C, &gest, sketch);
-
+
/* detect and apply */
for (act = GESTURE_ACTIONS; act->apply != NULL; act++)
{
@@ -2622,7 +2691,7 @@ void sk_applyGesture(bContext *C, SK_Sketch *sketch)
break;
}
}
-
+
sk_freeGesture(&gest);
}
@@ -2631,11 +2700,11 @@ void sk_applyGesture(bContext *C, SK_Sketch *sketch)
void sk_deleteSelectedStrokes(SK_Sketch *sketch)
{
SK_Stroke *stk, *next;
-
+
for (stk = sketch->strokes.first; stk; stk = next)
{
next = stk->next;
-
+
if (stk->selected == 1)
{
sk_removeStroke(sketch, stk);
@@ -2646,7 +2715,7 @@ void sk_deleteSelectedStrokes(SK_Sketch *sketch)
void sk_selectAllSketch(SK_Sketch *sketch, int mode)
{
SK_Stroke *stk = NULL;
-
+
if (mode == -1)
{
for (stk = sketch->strokes.first; stk; stk = stk->next)
@@ -2664,12 +2733,12 @@ void sk_selectAllSketch(SK_Sketch *sketch, int mode)
else if (mode == 1)
{
int selected = 1;
-
+
for (stk = sketch->strokes.first; stk; stk = stk->next)
{
selected &= stk->selected;
}
-
+
selected ^= 1;
for (stk = sketch->strokes.first; stk; stk = stk->next)
@@ -2685,20 +2754,20 @@ void sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend)
rcti rect;
unsigned int buffer[MAXPICKBUF];
short hits;
-
+
view3d_set_viewcontext(C, &vc);
-
+
rect.xmin= mval[0]-5;
rect.xmax= mval[0]+5;
rect.ymin= mval[1]-5;
rect.ymax= mval[1]+5;
-
- hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
+
+ hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
if (hits>0)
{
int besthitresult = -1;
-
+
if(hits == 1) {
besthitresult = buffer[3];
}
@@ -2706,23 +2775,23 @@ void sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend)
besthitresult = buffer[3];
/* loop and get best hit */
}
-
+
if (besthitresult > 0)
{
SK_Stroke *selected_stk = BLI_findlink(&sketch->strokes, besthitresult - 1);
-
+
if (extend == 0)
{
sk_selectAllSketch(sketch, -1);
-
+
selected_stk->selected = 1;
}
else
{
selected_stk->selected ^= 1;
}
-
-
+
+
}
}
}
@@ -2732,7 +2801,7 @@ void sk_queueRedrawSketch(SK_Sketch *sketch)
if (sketch->active_stroke != NULL)
{
SK_Point *last = sk_lastStrokePoint(sketch->active_stroke);
-
+
if (last != NULL)
{
// XXX
@@ -2741,15 +2810,14 @@ void sk_queueRedrawSketch(SK_Sketch *sketch)
}
}
-void sk_drawSketch(Scene *scene, SK_Sketch *sketch, int with_names)
+void sk_drawSketch(Scene *scene, View3D *v3d, SK_Sketch *sketch, int with_names)
{
+ ToolSettings *ts= scene->toolsettings;
SK_Stroke *stk;
-
- glDisable(GL_DEPTH_TEST);
- glLineWidth(UI_GetThemeValuef(TH_VERTEX_SIZE));
- glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
-
+ glClear(GL_DEPTH_BUFFER_BIT);
+ glEnable(GL_DEPTH_TEST);
+
if (with_names)
{
int id;
@@ -2757,61 +2825,51 @@ void sk_drawSketch(Scene *scene, SK_Sketch *sketch, int with_names)
{
sk_drawStroke(stk, id, NULL, -1, -1);
}
-
+
glLoadName(-1);
}
else
{
float selected_rgb[3] = {1, 0, 0};
float unselected_rgb[3] = {1, 0.5, 0};
-
+
for (stk = sketch->strokes.first; stk; stk = stk->next)
{
int start = -1;
int end = -1;
-
+
if (sk_hasOverdraw(sketch, stk))
{
sk_adjustIndexes(sketch, &start, &end);
}
-
+
sk_drawStroke(stk, -1, (stk->selected==1?selected_rgb:unselected_rgb), start, end);
-
+
if (stk->selected == 1)
{
- sk_drawStrokeSubdivision(scene->toolsettings, stk);
+ sk_drawStrokeSubdivision(ts, stk);
}
}
-
- /* only draw gesture in active area */
- if (sketch->gesture != NULL /*&& area_is_active_area(G.vd->area)*/)
- {
- float gesture_rgb[3] = {0, 0.5, 1};
- sk_drawStroke(sketch->gesture, -1, gesture_rgb, -1, -1);
- }
-
+
if (sketch->active_stroke != NULL)
{
SK_Point *last = sk_lastStrokePoint(sketch->active_stroke);
-
- if (scene->toolsettings->bone_sketching & BONE_SKETCHING_QUICK)
+
+ if (ts->bone_sketching & BONE_SKETCHING_QUICK)
{
- sk_drawStrokeSubdivision(scene->toolsettings, sketch->active_stroke);
+ sk_drawStrokeSubdivision(ts, sketch->active_stroke);
}
-
+
if (last != NULL)
{
- glEnable(GL_LINE_STIPPLE);
- glColor3fv(selected_rgb);
- glBegin(GL_LINE_STRIP);
-
- glVertex3fv(last->p);
- glVertex3fv(sketch->next_point.p);
-
- glEnd();
-
- glDisable(GL_LINE_STIPPLE);
-
+ GLUquadric *quad = gluNewQuadric();
+ gluQuadricNormals(quad, GLU_SMOOTH);
+
+ glPushMatrix();
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
switch (sketch->next_point.mode)
{
case PT_SNAP:
@@ -2821,35 +2879,78 @@ void sk_drawSketch(Scene *scene, SK_Sketch *sketch, int with_names)
glColor3f(0, 0, 0);
break;
}
-
- glBegin(GL_POINTS);
-
- glVertex3fv(sketch->next_point.p);
-
- glEnd();
+
+ sk_drawPoint(quad, &sketch->next_point, 0.1);
+
+ glColor4f(selected_rgb[0], selected_rgb[1], selected_rgb[2], 0.3);
+
+ sk_drawEdge(quad, last, &sketch->next_point, 0.1);
+
+ glDisable(GL_BLEND);
+
+ glPopMatrix();
+
+ gluDeleteQuadric(quad);
}
}
}
-
- glLineWidth(1.0);
- glPointSize(1.0);
- glEnable(GL_DEPTH_TEST);
+#if 0
+ if (sketch->depth_peels.first != NULL)
+ {
+ float colors[8][3] = {
+ {1, 0, 0},
+ {0, 1, 0},
+ {0, 0, 1},
+ {1, 1, 0},
+ {1, 0, 1},
+ {0, 1, 1},
+ {1, 1, 1},
+ {0, 0, 0}
+ };
+ DepthPeel *p;
+ GLUquadric *quad = gluNewQuadric();
+ gluQuadricNormals(quad, GLU_SMOOTH);
+
+ for (p = sketch->depth_peels.first; p; p = p->next)
+ {
+ int index = (int)(p->ob);
+ index = (index >> 5) & 7;
+
+ glColor3fv(colors[index]);
+ glPushMatrix();
+ glTranslatef(p->p[0], p->p[1], p->p[2]);
+ gluSphere(quad, 0.02, 8, 8);
+ glPopMatrix();
+ }
+
+ gluDeleteQuadric(quad);
+ }
+#endif
+
+ glDisable(GL_DEPTH_TEST);
+
+ /* only draw gesture in active area */
+ if (sketch->gesture != NULL /*&& area_is_active_area(G.vd->area)*/)
+ {
+ float gesture_rgb[3] = {0, 0.5, 1};
+ sk_drawStroke(sketch->gesture, -1, gesture_rgb, -1, -1);
+ }
}
int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
if (sketch->active_stroke != NULL)
{
SK_Stroke *stk = sketch->active_stroke;
-
+
sk_endStroke(C, sketch);
-
- if (scene->toolsettings->bone_sketching & BONE_SKETCHING_QUICK)
+
+ if (ts->bone_sketching & BONE_SKETCHING_QUICK)
{
- if (scene->toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET)
+ if (ts->bone_sketching_convert == SK_CONVERT_RETARGET)
{
sk_retargetStroke(C, stk);
}
@@ -2864,11 +2965,11 @@ int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
// allqueue(REDRAWBUTSEDIT, 0);
}
-// XXX
+// XXX
// allqueue(REDRAWVIEW3D, 0);
return 1;
}
-
+
return 0;
}
@@ -2878,7 +2979,7 @@ void sk_start_draw_stroke(SK_Sketch *sketch)
{
sk_startStroke(sketch);
sk_selectAllSketch(sketch, -1);
-
+
sketch->active_stroke->selected = 1;
}
}
@@ -2897,7 +2998,7 @@ int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *
sk_updateNextPoint(sketch, stk);
return 1;
}
-
+
return 0;
}
@@ -2905,9 +3006,9 @@ static int ValidSketchViewContext(ViewContext *vc)
{
Object *obedit = vc->obedit;
Scene *scene= vc->scene;
-
- if (obedit &&
- obedit->type == OB_ARMATURE &&
+
+ if (obedit &&
+ obedit->type == OB_ARMATURE &&
scene->toolsettings->bone_sketching & BONE_SKETCHING)
{
return 1;
@@ -2924,21 +3025,21 @@ int BDR_drawSketchNames(ViewContext *vc)
{
if (GLOBAL_sketch != NULL)
{
- sk_drawSketch(vc->scene, GLOBAL_sketch, 1);
+ sk_drawSketch(vc->scene, vc->v3d, GLOBAL_sketch, 1);
return 1;
}
}
-
+
return 0;
}
-void BDR_drawSketch(bContext *C)
+void BDR_drawSketch(const bContext *C)
{
if (ED_operator_sketch_mode(C))
{
if (GLOBAL_sketch != NULL)
{
- sk_drawSketch(CTX_data_scene(C), GLOBAL_sketch, 0);
+ sk_drawSketch(CTX_data_scene(C), CTX_wm_view3d(C), GLOBAL_sketch, 0);
}
}
}
@@ -3042,14 +3143,14 @@ static int sketch_select(bContext *C, wmOperator *op, wmEvent *event)
sk_selectStroke(C, GLOBAL_sketch, event->mval, extend);
ED_area_tag_redraw(CTX_wm_area(C));
}
-
+
return OPERATOR_FINISHED;
}
static int sketch_draw_stroke_cancel(bContext *C, wmOperator *op)
{
sk_cancelStroke(GLOBAL_sketch);
- MEM_freeN(op->customdata);
+ MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
@@ -3057,19 +3158,19 @@ static int sketch_draw_stroke(bContext *C, wmOperator *op, wmEvent *event)
{
short snap = RNA_boolean_get(op->ptr, "snap");
SK_DrawData *dd;
-
+
if (GLOBAL_sketch == NULL)
{
GLOBAL_sketch = sk_createSketch();
}
-
+
op->customdata = dd = MEM_callocN(sizeof("SK_DrawData"), "SketchDrawData");
sk_initDrawData(dd, event->mval);
-
+
sk_start_draw_stroke(GLOBAL_sketch);
-
+
sk_draw_stroke(C, GLOBAL_sketch, GLOBAL_sketch->active_stroke, dd, snap);
-
+
WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
return OPERATOR_RUNNING_MODAL;
@@ -3078,7 +3179,7 @@ static int sketch_draw_stroke(bContext *C, wmOperator *op, wmEvent *event)
static int sketch_draw_gesture_cancel(bContext *C, wmOperator *op)
{
sk_cancelStroke(GLOBAL_sketch);
- MEM_freeN(op->customdata);
+ MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
@@ -3086,18 +3187,18 @@ static int sketch_draw_gesture(bContext *C, wmOperator *op, wmEvent *event)
{
short snap = RNA_boolean_get(op->ptr, "snap");
SK_DrawData *dd;
-
+
if (GLOBAL_sketch == NULL)
{
GLOBAL_sketch = sk_createSketch();
}
-
+
op->customdata = dd = MEM_callocN(sizeof("SK_DrawData"), "SketchDrawData");
sk_initDrawData(dd, event->mval);
-
+
sk_start_draw_gesture(GLOBAL_sketch);
sk_draw_stroke(C, GLOBAL_sketch, GLOBAL_sketch->gesture, dd, snap);
-
+
WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
return OPERATOR_RUNNING_MODAL;
@@ -3108,7 +3209,7 @@ static int sketch_draw_modal(bContext *C, wmOperator *op, wmEvent *event, short
short snap = RNA_boolean_get(op->ptr, "snap");
SK_DrawData *dd = op->customdata;
int retval = OPERATOR_RUNNING_MODAL;
-
+
switch (event->type)
{
case LEFTCTRLKEY:
@@ -3136,31 +3237,31 @@ static int sketch_draw_modal(bContext *C, wmOperator *op, wmEvent *event, short
sk_filterLastContinuousStroke(stk);
sk_updateNextPoint(GLOBAL_sketch, stk);
ED_area_tag_redraw(CTX_wm_area(C));
- MEM_freeN(op->customdata);
+ MEM_freeN(op->customdata);
retval = OPERATOR_FINISHED;
}
else
{
sk_endContinuousStroke(stk);
sk_filterLastContinuousStroke(stk);
-
- if (stk->nb_points > 1)
+
+ if (stk->nb_points > 1)
{
/* apply gesture here */
sk_applyGesture(C, GLOBAL_sketch);
}
-
+
sk_freeStroke(stk);
GLOBAL_sketch->gesture = NULL;
-
+
ED_area_tag_redraw(CTX_wm_area(C));
- MEM_freeN(op->customdata);
+ MEM_freeN(op->customdata);
retval = OPERATOR_FINISHED;
}
}
break;
}
-
+
return retval;
}
@@ -3177,17 +3278,17 @@ static int sketch_draw_gesture_modal(bContext *C, wmOperator *op, wmEvent *event
static int sketch_draw_preview(bContext *C, wmOperator *op, wmEvent *event)
{
short snap = RNA_boolean_get(op->ptr, "snap");
-
+
if (GLOBAL_sketch != NULL)
{
SK_Sketch *sketch = GLOBAL_sketch;
SK_DrawData dd;
-
+
sk_initDrawData(&dd, event->mval);
sk_getStrokePoint(C, &sketch->next_point, sketch, sketch->active_stroke, &dd, snap);
ED_area_tag_redraw(CTX_wm_area(C));
}
-
+
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
}
@@ -3196,11 +3297,11 @@ static int sketch_draw_preview(bContext *C, wmOperator *op, wmEvent *event)
int ED_operator_sketch_mode_active_stroke(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
-
- if (obedit &&
- obedit->type == OB_ARMATURE &&
- scene->toolsettings->bone_sketching & BONE_SKETCHING &&
+ ToolSettings *ts = CTX_data_tool_settings(C);
+
+ if (obedit &&
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING &&
GLOBAL_sketch != NULL &&
GLOBAL_sketch->active_stroke != NULL)
{
@@ -3215,12 +3316,12 @@ int ED_operator_sketch_mode_active_stroke(bContext *C)
int ED_operator_sketch_mode_gesture(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
-
- if (obedit &&
- obedit->type == OB_ARMATURE &&
- scene->toolsettings->bone_sketching & BONE_SKETCHING &&
- (scene->toolsettings->bone_sketching & BONE_SKETCHING_QUICK) == 0 &&
+ ToolSettings *ts = CTX_data_tool_settings(C);
+
+ if (obedit &&
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING &&
+ (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0 &&
GLOBAL_sketch != NULL &&
GLOBAL_sketch->active_stroke == NULL)
{
@@ -3235,12 +3336,12 @@ int ED_operator_sketch_mode_gesture(bContext *C)
int ED_operator_sketch_full_mode(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
-
- if (obedit &&
- obedit->type == OB_ARMATURE &&
- scene->toolsettings->bone_sketching & BONE_SKETCHING &&
- (scene->toolsettings->bone_sketching & BONE_SKETCHING_QUICK) == 0)
+ ToolSettings *ts = CTX_data_tool_settings(C);
+
+ if (obedit &&
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING &&
+ (ts->bone_sketching & BONE_SKETCHING_QUICK) == 0)
{
return 1;
}
@@ -3250,14 +3351,14 @@ int ED_operator_sketch_full_mode(bContext *C)
}
}
-int ED_operator_sketch_mode(bContext *C)
+int ED_operator_sketch_mode(const bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
-
- if (obedit &&
- obedit->type == OB_ARMATURE &&
- scene->toolsettings->bone_sketching & BONE_SKETCHING)
+ ToolSettings *ts = CTX_data_tool_settings(C);
+
+ if (obedit &&
+ obedit->type == OB_ARMATURE &&
+ ts->bone_sketching & BONE_SKETCHING)
{
return 1;
}
@@ -3274,12 +3375,12 @@ void SKETCH_OT_delete(wmOperatorType *ot)
/* identifiers */
ot->name= "delete";
ot->idname= "SKETCH_OT_delete";
-
+
/* api callbacks */
ot->invoke= sketch_delete;
-
+
ot->poll= ED_operator_sketch_full_mode;
-
+
/* flags */
// ot->flag= OPTYPE_UNDO;
}
@@ -3289,12 +3390,12 @@ void SKETCH_OT_select(wmOperatorType *ot)
/* identifiers */
ot->name= "select";
ot->idname= "SKETCH_OT_select";
-
+
/* api callbacks */
ot->invoke= sketch_select;
-
+
ot->poll= ED_operator_sketch_full_mode;
-
+
/* flags */
// ot->flag= OPTYPE_UNDO;
}
@@ -3304,12 +3405,12 @@ void SKETCH_OT_cancel_stroke(wmOperatorType *ot)
/* identifiers */
ot->name= "cancel stroke";
ot->idname= "SKETCH_OT_cancel_stroke";
-
+
/* api callbacks */
ot->invoke= sketch_cancel;
-
+
ot->poll= ED_operator_sketch_mode_active_stroke;
-
+
/* flags */
// ot->flag= OPTYPE_UNDO;
}
@@ -3319,12 +3420,12 @@ void SKETCH_OT_finish_stroke(wmOperatorType *ot)
/* identifiers */
ot->name= "end stroke";
ot->idname= "SKETCH_OT_finish_stroke";
-
+
/* api callbacks */
ot->invoke= sketch_finish;
-
+
ot->poll= ED_operator_sketch_mode_active_stroke;
-
+
/* flags */
// ot->flag= OPTYPE_UNDO;
}
@@ -3334,12 +3435,12 @@ void SKETCH_OT_draw_preview(wmOperatorType *ot)
/* identifiers */
ot->name= "draw preview";
ot->idname= "SKETCH_OT_draw_preview";
-
+
/* api callbacks */
ot->invoke= sketch_draw_preview;
-
+
ot->poll= ED_operator_sketch_mode_active_stroke;
-
+
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
/* flags */
@@ -3351,18 +3452,18 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot)
/* identifiers */
ot->name= "draw stroke";
ot->idname= "SKETCH_OT_draw_stroke";
-
+
/* api callbacks */
ot->invoke = sketch_draw_stroke;
ot->modal = sketch_draw_stroke_modal;
ot->cancel = sketch_draw_stroke_cancel;
-
- ot->poll= ED_operator_sketch_mode;
-
+
+ ot->poll= (int (*)(bContext *))ED_operator_sketch_mode;
+
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
-
+
/* flags */
-// ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO
}
void SKETCH_OT_gesture(wmOperatorType *ot)
@@ -3370,16 +3471,17 @@ void SKETCH_OT_gesture(wmOperatorType *ot)
/* identifiers */
ot->name= "gesture";
ot->idname= "SKETCH_OT_gesture";
-
+
/* api callbacks */
ot->invoke = sketch_draw_gesture;
ot->modal = sketch_draw_gesture_modal;
ot->cancel = sketch_draw_gesture_cancel;
-
+
ot->poll= ED_operator_sketch_mode_gesture;
-
+
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
-
+
/* flags */
-// ot->flag= OPTYPE_UNDO;
+ ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO
}
+
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 8cbfebebff6..93611a30bd8 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -227,7 +227,7 @@ void poselib_validate_act (bAction *act)
}
/* determine which frames have keys */
- action_to_keylist(act, &keys, NULL, NULL);
+ action_to_keylist(NULL, act, &keys, NULL);
/* for each key, make sure there is a correspnding pose */
for (ak= keys.first; ak; ak= ak->next) {
@@ -1489,7 +1489,7 @@ void POSELIB_OT_browse_interactive (wmOperatorType *ot)
ot->poll= ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 0d7bb3c63cc..2913d1d13d9 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -64,7 +64,6 @@
#include "BKE_object.h"
#include "BKE_utildefines.h"
-#include "BIF_transform.h" /* for autokey TFM_TRANSLATION, etc */
#include "BIF_gl.h"
#include "RNA_access.h"
@@ -79,6 +78,7 @@
#include "ED_object.h"
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_transform.h" /* for autokey TFM_TRANSLATION, etc */
#include "ED_view3d.h"
#include "armature_intern.h"
@@ -443,6 +443,65 @@ void pose_select_constraint_target(Scene *scene)
}
+static int pose_select_constraint_target_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+ bArmature *arm= ob->data;
+ bPoseChannel *pchan;
+ bConstraint *con;
+ int found= 0;
+
+ for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if (arm->layer & pchan->bone->layer) {
+ if (pchan->bone->flag & (BONE_ACTIVE|BONE_SELECTED)) {
+ for (con= pchan->constraints.first; con; con= con->next) {
+ bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ ListBase targets = {NULL, NULL};
+ bConstraintTarget *ct;
+
+ if (cti && cti->get_constraint_targets) {
+ cti->get_constraint_targets(con, &targets);
+
+ for (ct= targets.first; ct; ct= ct->next) {
+ if ((ct->tar == ob) && (ct->subtarget[0])) {
+ bPoseChannel *pchanc= get_pose_channel(ob->pose, ct->subtarget);
+ if(pchanc) {
+ pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
+ found= 1;
+ }
+ }
+ }
+
+ if (cti->flush_constraint_targets)
+ cti->flush_constraint_targets(con, &targets, 1);
+ }
+ }
+ }
+ }
+ }
+
+ if(!found)
+ return OPERATOR_CANCELLED;
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void POSE_OT_select_constraint_target(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select Constraint Target";
+ ot->idname= "POSE_OT_select_constraint_target";
+
+ /* api callbacks */
+ ot->exec= pose_select_constraint_target_exec;
+ ot->poll= ED_operator_posemode;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/* ******************* select hierarchy operator ************* */
static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
@@ -453,6 +512,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
Bone *curbone, *pabone, *chbone;
int direction = RNA_enum_get(op->ptr, "direction");
int add_to_sel = RNA_boolean_get(op->ptr, "extend");
+ int found= 0;
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
curbone= pchan->bone;
@@ -469,8 +529,8 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
curbone->flag &= ~BONE_ACTIVE;
pabone->flag |= (BONE_ACTIVE|BONE_SELECTED);
-
- // XXX notifiers need to be sent to other editors to update
+
+ found= 1;
break;
}
} else { // BONE_SELECT_CHILD
@@ -483,8 +543,8 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
curbone->flag &= ~BONE_ACTIVE;
chbone->flag |= (BONE_ACTIVE|BONE_SELECTED);
-
- // XXX notifiers need to be sent to other editors to update
+
+ found= 1;
break;
}
}
@@ -492,6 +552,9 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
}
}
+ if(!found)
+ return OPERATOR_CANCELLED;
+
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
return OPERATOR_FINISHED;
@@ -500,9 +563,9 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
void POSE_OT_select_hierarchy(wmOperatorType *ot)
{
static EnumPropertyItem direction_items[]= {
- {BONE_SELECT_PARENT, "PARENT", "Select Parent", ""},
- {BONE_SELECT_CHILD, "CHILD", "Select Child", ""},
- {0, NULL, NULL, NULL}
+ {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
+ {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* identifiers */
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index a25d0675cb0..2a012437b42 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -64,6 +64,7 @@
#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BKE_customdata.h"
+#include "BKE_mesh.h"
//#include "blendef.h"
@@ -3179,6 +3180,7 @@ static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket)
iter->p = NULL;
iter->no = NULL;
}
+ iter->size = 0;
}
void initArcIterator(BArcIterator *arg, ReebArc *arc, ReebNode *head)
@@ -3276,6 +3278,7 @@ static void* headNode(void *arg)
iter->p = node->p;
iter->no = node->no;
+ iter->size = 0;
return node;
}
@@ -3296,6 +3299,7 @@ static void* tailNode(void *arg)
iter->p = node->p;
iter->no = node->no;
+ iter->size = 0;
return node;
}
@@ -3382,10 +3386,9 @@ static int iteratorStopped(void *arg)
ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
{
-#if 0 /*BMESH_TODO*/
Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
- EditMesh *em =( (Mesh*)obedit->data)->edit_mesh;
+ EditMesh *em =BKE_mesh_get_editmesh(((Mesh*)obedit->data));
EdgeIndex indexed_edges;
VertexData *data;
ReebGraph *rg = NULL;
@@ -3481,8 +3484,13 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C)
MEM_freeN(data);
+ /*no need to load the editmesh back into the object, just
+ free it (avoids ngon conversion issues too going back the
+ other way)*/
+ free_editMesh(em);
+ MEM_freeN(em);
+
return rg;
-#endif
}
#if 0
diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h
index 3bdd55509ad..6a3a261cb10 100644
--- a/source/blender/editors/armature/reeb.h
+++ b/source/blender/editors/armature/reeb.h
@@ -126,6 +126,7 @@ typedef struct ReebArcIterator {
StoppedFct stopped;
float *p, *no;
+ float size;
int length;
int index;
diff --git a/source/blender/editors/curve/Makefile b/source/blender/editors/curve/Makefile
index 6b1f628f231..6449700e50b 100644
--- a/source/blender/editors/curve/Makefile
+++ b/source/blender/editors/curve/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index a73a54323ee..34e81b60a16 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -49,7 +49,6 @@ void FONT_OT_case_toggle(struct wmOperatorType *ot);
void FONT_OT_case_set(struct wmOperatorType *ot);
void FONT_OT_style_toggle(struct wmOperatorType *ot);
void FONT_OT_style_set(struct wmOperatorType *ot);
-void FONT_OT_material_set(struct wmOperatorType *ot);
void FONT_OT_text_copy(struct wmOperatorType *ot);
void FONT_OT_text_cut(struct wmOperatorType *ot);
@@ -85,7 +84,7 @@ void CURVE_OT_smooth_radius(struct wmOperatorType *ot);
void CURVE_OT_de_select_first(struct wmOperatorType *ot);
void CURVE_OT_de_select_last(struct wmOperatorType *ot);
void CURVE_OT_select_all_toggle(struct wmOperatorType *ot);
-void CURVE_OT_select_invert(struct wmOperatorType *ot);
+void CURVE_OT_select_inverse(struct wmOperatorType *ot);
void CURVE_OT_select_linked(struct wmOperatorType *ot);
void CURVE_OT_select_row(struct wmOperatorType *ot);
void CURVE_OT_select_next(struct wmOperatorType *ot);
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 5292d86d3c9..45dc76d5488 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -53,10 +53,9 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_screen.h"
#include "ED_object.h"
-
-#include "BIF_transform.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
#include "UI_interface.h"
@@ -106,7 +105,6 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(FONT_OT_case_set);
WM_operatortype_append(FONT_OT_style_toggle);
WM_operatortype_append(FONT_OT_style_set);
- WM_operatortype_append(FONT_OT_material_set);
WM_operatortype_append(FONT_OT_text_copy);
WM_operatortype_append(FONT_OT_text_cut);
@@ -141,7 +139,7 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(CURVE_OT_de_select_first);
WM_operatortype_append(CURVE_OT_de_select_last);
WM_operatortype_append(CURVE_OT_select_all_toggle);
- WM_operatortype_append(CURVE_OT_select_invert);
+ WM_operatortype_append(CURVE_OT_select_inverse);
WM_operatortype_append(CURVE_OT_select_linked);
WM_operatortype_append(CURVE_OT_select_row);
WM_operatortype_append(CURVE_OT_select_next);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 45b9a589bd5..51a9cf5c75a 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -73,14 +73,13 @@
#include "ED_keyframes_edit.h"
#include "ED_object.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
#include "ED_view3d.h"
#include "UI_interface.h"
-#include "BIF_transform.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
@@ -189,7 +188,7 @@ static short swap_selection_bpoint(BPoint *bp)
return select_bpoint(bp, SELECT, 1, VISIBLE);
}
-short isNurbsel(Nurb *nu)
+int isNurbsel(Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
@@ -1067,7 +1066,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
/* api callbacks */
ot->exec= set_weight_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_editsurfcurve;
/* flags */
@@ -1118,7 +1117,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot)
/* api callbacks */
ot->exec= set_radius_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_editsurfcurve;
/* flags */
@@ -1737,7 +1736,7 @@ void CURVE_OT_reveal(wmOperatorType *ot)
/********************** select invert operator *********************/
-static int select_invert_exec(bContext *C, wmOperator *op)
+static int select_inverse_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
@@ -1776,14 +1775,14 @@ static int select_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void CURVE_OT_select_invert(wmOperatorType *ot)
+void CURVE_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Invert";
- ot->idname= "CURVE_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "CURVE_OT_select_inverse";
/* api callbacks */
- ot->exec= select_invert_exec;
+ ot->exec= select_inverse_exec;
ot->poll= ED_operator_editsurfcurve;
/* flags */
@@ -2475,12 +2474,12 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
- {CU_POLY, "POLY", "Poly", ""},
- {CU_BEZIER, "BEZIER", "Bezier", ""},
- {CU_CARDINAL, "CARDINAL", "Cardinal", ""},
- {CU_BSPLINE, "B_SPLINE", "B-Spline", ""},
- {CU_NURBS, "NURBS", "NURBS", ""},
- {0, NULL, NULL, NULL}};
+ {CU_POLY, "POLY", 0, "Poly", ""},
+ {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
+ {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
+ {CU_BSPLINE, "B_SPLINE", 0, "B-Spline", ""},
+ {CU_NURBS, "NURBS", 0, "NURBS", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Set Spline Type";
@@ -2516,12 +2515,12 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
- {1, "AUTOMATIC", "Automatic", ""},
- {2, "VECTOR", "Vector", ""},
- {3, "TOGGLE_FREE_ALIGN", "Toggle Free/Align", ""},
- {5, "ALIGN", "Align", ""},
- {6, "FREE_ALIGN", "Free Align", ""},
- {0, NULL, NULL, NULL}};
+ {1, "AUTOMATIC", 0, "Automatic", ""},
+ {2, "VECTOR", 0, "Vector", ""},
+ {3, "TOGGLE_FREE_ALIGN", 0, "Toggle Free/Align", ""},
+ {5, "ALIGN", 0, "Align", ""},
+ {6, "FREE_ALIGN", 0, "Free Align", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Set Handle Type";
@@ -3582,9 +3581,9 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
{
static EnumPropertyItem direction_items[]= {
- {0, "CYCLIC_U", "Cyclic U", ""},
- {1, "CYCLIC_V", "Cyclic V", ""},
- {0, NULL, NULL, NULL}};
+ {0, "CYCLIC_U", 0, "Cyclic U", ""},
+ {1, "CYCLIC_V", 0, "Cyclic V", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Toggle Cyclic";
@@ -4145,7 +4144,7 @@ void CURVE_OT_select_random(wmOperatorType *ot)
/* api callbacks */
ot->exec= select_random_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_editsurfcurve;
/* flags */
@@ -4179,7 +4178,7 @@ void CURVE_OT_select_every_nth(wmOperatorType *ot)
/* api callbacks */
ot->exec= select_every_nth_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_editsurfcurve;
/* flags */
@@ -4530,10 +4529,10 @@ static int delete_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CURVE_OT_delete(wmOperatorType *ot)
{
static EnumPropertyItem type_items[] = {
- {0, "SELECTED", "Selected", ""},
- {1, "SEGMENT", "Segment", ""},
- {2, "ALL", "All", ""},
- {0, NULL, NULL, NULL}};
+ {0, "SELECTED", 0, "Selected", ""},
+ {1, "SEGMENT", 0, "Segment", ""},
+ {2, "ALL", 0, "All", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Delete";
@@ -4595,12 +4594,10 @@ void CURVE_OT_smooth_set(wmOperatorType *ot)
/************** join operator, to be used externally? ****************/
-int join_curve(bContext *C, wmOperator *op, int type)
+int join_curve_exec(bContext *C, wmOperator *op)
{
- View3D *v3d= CTX_wm_view3d(C);
Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_edit_object(C);
- Base *base, *nextb;
+ Object *ob= CTX_data_active_object(C);
Curve *cu;
Nurb *nu, *newnu;
BezTriple *bezt;
@@ -4609,64 +4606,51 @@ int join_curve(bContext *C, wmOperator *op, int type)
float imat[4][4], cmat[4][4];
int a;
- // XXX not integrated yet, to be called by object/ module? */
-
- if(object_data_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
- return OPERATOR_CANCELLED;
- }
-
- if(ob->type!=type)
- return 0;
-
tempbase.first= tempbase.last= 0;
/* trasnform all selected curves inverse in obact */
Mat4Invert(imat, ob->obmat);
- for(base= FIRSTBASE; base; base=nextb) {
- nextb= base->next;
-
- if(TESTBASE(v3d, base)) {
- if(base->object->type==type) {
- if(base->object != ob) {
-
- cu= base->object->data;
-
- if(cu->nurb.first) {
- /* watch it: switch order here really goes wrong */
- Mat4MulMat4(cmat, base->object->obmat, imat);
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base->object->type==ob->type) {
+ if(base->object != ob) {
+
+ cu= base->object->data;
+
+ if(cu->nurb.first) {
+ /* watch it: switch order here really goes wrong */
+ Mat4MulMat4(cmat, base->object->obmat, imat);
+
+ nu= cu->nurb.first;
+ while(nu) {
+ newnu= duplicateNurb(nu);
+ BLI_addtail(&tempbase, newnu);
- nu= cu->nurb.first;
- while(nu) {
- newnu= duplicateNurb(nu);
- BLI_addtail(&tempbase, newnu);
-
- if( (bezt= newnu->bezt) ) {
- a= newnu->pntsu;
- while(a--) {
- Mat4MulVecfl(cmat, bezt->vec[0]);
- Mat4MulVecfl(cmat, bezt->vec[1]);
- Mat4MulVecfl(cmat, bezt->vec[2]);
- bezt++;
- }
+ if( (bezt= newnu->bezt) ) {
+ a= newnu->pntsu;
+ while(a--) {
+ Mat4MulVecfl(cmat, bezt->vec[0]);
+ Mat4MulVecfl(cmat, bezt->vec[1]);
+ Mat4MulVecfl(cmat, bezt->vec[2]);
+ bezt++;
}
- if( (bp= newnu->bp) ) {
- a= newnu->pntsu*nu->pntsv;
- while(a--) {
- Mat4MulVecfl(cmat, bp->vec);
- bp++;
- }
+ }
+ if( (bp= newnu->bp) ) {
+ a= newnu->pntsu*nu->pntsv;
+ while(a--) {
+ Mat4MulVecfl(cmat, bp->vec);
+ bp++;
}
- nu= nu->next;
}
+ nu= nu->next;
}
-
- ED_base_object_free_and_unlink(scene, base);
}
+
+ ED_base_object_free_and_unlink(scene, base);
}
}
}
+ CTX_DATA_END;
cu= ob->data;
addlisttolist(&cu->nurb, &tempbase);
@@ -4675,8 +4659,8 @@ int join_curve(bContext *C, wmOperator *op, int type)
ED_object_enter_editmode(C, EM_WAITCURSOR);
ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR);
-
- // BIF_undo_push("Join");
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 1b2c8ea6b11..9f2bd6f26f9 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -607,10 +607,10 @@ static int kill_selection(Object *obedit, int ins) /* 1 == new character */
/******************* set style operator ********************/
static EnumPropertyItem style_items[]= {
- {CU_BOLD, "BOLD", "Bold", ""},
- {CU_ITALIC, "ITALIC", "Italic", ""},
- {CU_UNDERLINE, "UNDERLINE", "Underline", ""},
- {0, NULL, NULL, NULL}};
+ {CU_BOLD, "BOLD", 0, "Bold", ""},
+ {CU_ITALIC, "ITALIC", 0, "Italic", ""},
+ {CU_UNDERLINE, "UNDERLINE", 0, "Underline", ""},
+ {0, NULL, 0, NULL, NULL}};
static int set_style(bContext *C, int style, int clear)
{
@@ -700,50 +700,6 @@ void FONT_OT_style_toggle(wmOperatorType *ot)
RNA_def_enum(ot->srna, "style", style_items, CU_BOLD, "Style", "Style to set selection to.");
}
-/******************* set material operator ********************/
-
-static int set_material_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
- EditFont *ef= cu->editfont;
- int i, mat_nr, selstart, selend;
-
- if(!BKE_font_getselection(obedit, &selstart, &selend))
- return OPERATOR_CANCELLED;
-
- if(RNA_property_is_set(op->ptr, "index"))
- mat_nr= RNA_int_get(op->ptr, "index");
- else
- mat_nr= obedit->actcol;
-
- for(i=selstart; i<=selend; i++)
- ef->textbufinfo[i].mat_nr = mat_nr;
-
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-void FONT_OT_material_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Set Material";
- ot->idname= "FONT_OT_material_set";
-
- /* api callbacks */
- ot->exec= set_material_exec;
- ot->poll= ED_operator_editfont;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Material Index", "Material slot index.", 0, INT_MAX);
-}
-
/******************* copy text operator ********************/
static void copy_selection(Object *obedit)
@@ -873,17 +829,17 @@ void FONT_OT_text_paste(wmOperatorType *ot)
/************************ move operator ************************/
static EnumPropertyItem move_type_items[]= {
- {LINE_BEGIN, "LINE_BEGIN", "Line Begin", ""},
- {LINE_END, "LINE_END", "Line End", ""},
- {PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
- {NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
- {PREV_WORD, "PREVIOUS_WORD", "Previous Word", ""},
- {NEXT_WORD, "NEXT_WORD", "Next Word", ""},
- {PREV_LINE, "PREVIOUS_LINE", "Previous Line", ""},
- {NEXT_LINE, "NEXT_LINE", "Next Line", ""},
- {PREV_PAGE, "PREVIOUS_PAGE", "Previous Page", ""},
- {NEXT_PAGE, "NEXT_PAGE", "Next Page", ""},
- {0, NULL, NULL, NULL}};
+ {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
+ {LINE_END, "LINE_END", 0, "Line End", ""},
+ {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+ {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+ {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
+ {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
+ {PREV_LINE, "PREVIOUS_LINE", 0, "Previous Line", ""},
+ {NEXT_LINE, "NEXT_LINE", 0, "Next Line", ""},
+ {PREV_PAGE, "PREVIOUS_PAGE", 0, "Previous Page", ""},
+ {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""},
+ {0, NULL, 0, NULL, NULL}};
static int move_cursor(bContext *C, int type, int select)
{
@@ -1164,13 +1120,13 @@ void FONT_OT_line_break(wmOperatorType *ot)
/******************* delete operator **********************/
static EnumPropertyItem delete_type_items[]= {
- {DEL_ALL, "ALL", "All", ""},
- {DEL_NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
- {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
- {DEL_SELECTION, "SELECTION", "Selection", ""},
- {DEL_NEXT_SEL, "NEXT_OR_SELECTION", "Next or Selection", ""},
- {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", "Previous or Selection", ""},
- {0, NULL, NULL, NULL}};
+ {DEL_ALL, "ALL", 0, "All", ""},
+ {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+ {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+ {DEL_SELECTION, "SELECTION", 0, "Selection", ""},
+ {DEL_NEXT_SEL, "NEXT_OR_SELECTION", 0, "Next or Selection", ""},
+ {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", 0, "Previous or Selection", ""},
+ {0, NULL, 0, NULL, NULL}};
static int delete_exec(bContext *C, wmOperator *op)
{
@@ -1407,7 +1363,7 @@ void make_editText(Object *obedit)
ef->copybuf= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "texteditcopybuf");
ef->copybufinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "texteditcopybufinfo");
ef->oldstr= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "oldstrbuf");
- ef->oldstrinfo= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "oldstrbuf");
+ ef->oldstrinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "oldstrbuf");
}
// Convert the original text to wchar_t
@@ -1465,9 +1421,9 @@ void free_editText(Object *obedit)
/********************** set case operator *********************/
static EnumPropertyItem case_items[]= {
- {CASE_LOWER, "LOWER", "Lower", ""},
- {CASE_UPPER, "UPPER", "Upper", ""},
- {0, NULL, NULL, NULL}};
+ {CASE_LOWER, "LOWER", 0, "Lower", ""},
+ {CASE_UPPER, "UPPER", 0, "Upper", ""},
+ {0, NULL, 0, NULL, NULL}};
static int set_case(bContext *C, int ccase)
{
diff --git a/source/blender/editors/datafiles/B.blend.c b/source/blender/editors/datafiles/B.blend.c
index fcdf83e98de..03d1d00cccf 100644
--- a/source/blender/editors/datafiles/B.blend.c
+++ b/source/blender/editors/datafiles/B.blend.c
@@ -1,631 +1,922 @@
/* DataToC output of file <B_blend> */
-int datatoc_B_blend_size= 93184;
+int datatoc_B_blend_size= 106004;
char datatoc_B_blend[]= {
-
- 66, 76, 69, 78, 68, 69, 82, 95, 86, 50, 53, 48, 82, 69, 78, 68, 0, 0, 0, 32,191,255,240,240, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 0, 0, 1, 0, 0, 0,250, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 71, 76, 79, 66, 0, 0, 0, 32,191,255,240,232, 0, 0, 0,181, 0, 0, 0, 1, 32, 32, 32, 48, 0, 0, 0, 0, 0,250, 0, 0,
- 0, 1, 1, 0, 0,232,214, 96, 1, 7,176, 32, 0, 0, 16, 0, 0, 4, 32,128, 0, 0, 87, 77, 0, 0, 0,124, 0,232,212,240,
- 0, 0, 1, 68, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,213,160,
- 0,232,213,160, 0,232,213,160, 0,232,213,160, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238,152, 96,
- 5,210, 11, 64, 68, 65, 84, 65, 0, 0, 0,144, 0,232,213,160, 0, 0, 1, 69, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,237,219, 32, 0, 0, 0, 1, 0, 0, 0, 0, 0,232,214, 96,115, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 14, 7,108, 4,108, 0, 0, 0, 0, 0, 1, 3,238,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,238,151,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,227,142,160,
- 0, 0, 0, 0, 0, 0, 0, 0, 6,147, 67,240, 6,160,144,208, 0,238,152,224, 0,238,153,208, 5,209,239,128, 5,210, 15,128,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 0,136, 0,232,214, 96, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,215, 16, 0,232,218, 80, 0,232,218,144, 0,232,222,208,
- 0,232,223, 16, 0,233, 19,208, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,176, 32, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 8,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,215, 16, 0, 0, 0,174, 0, 0, 0, 1, 0,232,215, 80, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,215, 80, 0, 0, 0,174, 0, 0, 0, 1,
- 0,232,215,144, 0,232,215, 16, 0, 0, 0, 0, 0, 0, 4,108, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,215,144,
- 0, 0, 0,174, 0, 0, 0, 1, 0,232,215,208, 0,232,215, 80, 0, 0, 0, 0, 7,108, 4,108, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0, 20, 0,232,215,208, 0, 0, 0,174, 0, 0, 0, 1, 0,232,216, 16, 0,232,215,144, 0, 0, 0, 0, 7,108, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,216, 16, 0, 0, 0,174, 0, 0, 0, 1, 0,232,216, 80, 0,232,215,208,
- 0, 0, 0, 0, 0, 0, 4, 81, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,216, 80, 0, 0, 0,174, 0, 0, 0, 1,
- 0,232,216,144, 0,232,216, 16, 0, 0, 0, 0, 7,108, 4, 81, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,216,144,
- 0, 0, 0,174, 0, 0, 0, 1, 0,232,216,208, 0,232,216, 80, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0, 20, 0,232,216,208, 0, 0, 0,174, 0, 0, 0, 1, 0,232,217, 16, 0,232,216,144, 0, 0, 0, 0, 7,108, 0, 64,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,217, 16, 0, 0, 0,174, 0, 0, 0, 1, 0,232,217, 80, 0,232,216,208,
- 0, 0, 0, 0, 5,224, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,217, 80, 0, 0, 0,174, 0, 0, 0, 1,
- 0,232,217,144, 0,232,217, 16, 0, 0, 0, 0, 5,224, 4, 81, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,217,144,
- 0, 0, 0,174, 0, 0, 0, 1, 0,232,217,208, 0,232,217, 80, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 1, 68, 65, 84, 65,
- 0, 0, 0, 20, 0,232,217,208, 0, 0, 0,174, 0, 0, 0, 1, 0,232,218, 16, 0,232,217,144, 0, 0, 0, 0, 5,224, 0, 76,
- 0, 0, 0, 1, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,218, 16, 0, 0, 0,174, 0, 0, 0, 1, 0,232,218, 80, 0,232,217,208,
- 0, 0, 0, 0, 5,224, 3, 76, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 20, 0,232,218, 80, 0, 0, 0,174, 0, 0, 0, 1,
- 0, 0, 0, 0, 0,232,218, 16, 0, 0, 0, 0, 7,108, 3, 76, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,218,144,
- 0, 0, 0,175, 0, 0, 0, 1, 0,232,218,208, 0, 0, 0, 0, 0,232,215, 80, 0,232,215,144, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0, 24, 0,232,218,208, 0, 0, 0,175, 0, 0, 0, 1, 0,232,219, 16, 0,232,218,144, 0,232,215, 80,
- 0,232,216, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,219, 16, 0, 0, 0,175, 0, 0, 0, 1,
- 0,232,219, 80, 0,232,218,208, 0,232,215,144, 0,232,216, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24,
- 0,232,219, 80, 0, 0, 0,175, 0, 0, 0, 1, 0,232,219,144, 0,232,219, 16, 0,232,216, 16, 0,232,216, 80, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,219,144, 0, 0, 0,175, 0, 0, 0, 1, 0,232,219,208, 0,232,219, 80,
- 0,232,215, 16, 0,232,217, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,219,208, 0, 0, 0,175,
- 0, 0, 0, 1, 0,232,220, 16, 0,232,219,144, 0,232,215,208, 0,232,217, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0, 24, 0,232,220, 16, 0, 0, 0,175, 0, 0, 0, 1, 0,232,220, 80, 0,232,219,208, 0,232,216, 16, 0,232,217, 80,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,220, 80, 0, 0, 0,175, 0, 0, 0, 1, 0,232,220,144,
- 0,232,220, 16, 0,232,216, 80, 0,232,217, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,220,144,
- 0, 0, 0,175, 0, 0, 0, 1, 0,232,220,208, 0,232,220, 80, 0,232,215, 16, 0,232,217,144, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0, 24, 0,232,220,208, 0, 0, 0,175, 0, 0, 0, 1, 0,232,221, 16, 0,232,220,144, 0,232,216, 16,
- 0,232,217,144, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,221, 16, 0, 0, 0,175, 0, 0, 0, 1,
- 0,232,221, 80, 0,232,220,208, 0,232,217, 80, 0,232,217,208, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24,
- 0,232,221, 80, 0, 0, 0,175, 0, 0, 0, 1, 0,232,221,144, 0,232,221, 16, 0,232,217, 16, 0,232,217,208, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,221,144, 0, 0, 0,175, 0, 0, 0, 1, 0,232,221,208, 0,232,221, 80,
- 0,232,217,144, 0,232,217,208, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,221,208, 0, 0, 0,175,
- 0, 0, 0, 1, 0,232,222, 16, 0,232,221,144, 0,232,217, 16, 0,232,218, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0, 24, 0,232,222, 16, 0, 0, 0,175, 0, 0, 0, 1, 0,232,222, 80, 0,232,221,208, 0,232,217, 80, 0,232,218, 16,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,222, 80, 0, 0, 0,175, 0, 0, 0, 1, 0,232,222,144,
- 0,232,222, 16, 0,232,216, 80, 0,232,218, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,232,222,144,
- 0, 0, 0,175, 0, 0, 0, 1, 0,232,222,208, 0,232,222, 80, 0,232,215,208, 0,232,218, 80, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0, 24, 0,232,222,208, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0,232,222,144, 0,232,218, 16,
- 0,232,218, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,112, 0,232,223, 16, 0, 0, 0,179, 0, 0, 0, 1,
- 0,232,225,240, 0, 0, 0, 0, 0,232,216, 16, 0,232,215, 80, 0,232,215,144, 0,232,216, 80, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 7,108, 0, 0, 4, 82, 0, 0, 4,108, 7, 7, 7,109, 0, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 69,160, 0,233, 31,144, 0,233, 31,144, 0,232,223,176, 0,232,224,208,
- 0, 0, 0, 0, 0, 0, 0, 0, 5,216,137, 0, 5,209,241, 64, 68, 65, 84, 65, 0, 0, 0,236, 0,232,223,176, 0, 0, 0,180,
- 0, 0, 0, 1, 0,232,224,208, 0, 0, 0, 0, 0, 0, 0, 0, 68, 68,192, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0,
- 68,237,160, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,108, 0, 0, 0, 0, 0, 0, 0, 25, 68,237,128, 0,
- 65,200, 0, 0, 68,237,128, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12,
- 0, 10, 7,109, 0, 26, 7,109, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,108, 0, 0, 4, 82,
- 0, 0, 4,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,109, 0, 26, 0, 2, 0, 1, 0, 2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 70,192, 6,144,192,176, 6,144,192,176, 0, 0, 0, 0, 0, 0, 0, 0,
- 5,209,243, 64, 5,209,243,176, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,232,224,208, 0, 0, 0,180,
- 0, 0, 0, 1, 0, 0, 0, 0, 0,232,223,176, 0, 0, 0, 0, 68,158, 64, 0, 0, 0, 0, 0, 65, 16, 0, 0, 0, 0, 0, 0,
- 69, 21,180, 43, 63,184, 81,222, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,108, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 35,215, 10, 68,122, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 4, 0,
- 0, 10, 7,109, 0, 6, 7,109, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,108,
- 0, 0, 4,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,229, 70, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,112, 0,232,225,240, 0, 0, 0,179,
- 0, 0, 0, 1, 0,233, 2, 0, 0,232,223, 16, 0,232,217, 16, 0,232,218, 16, 0,232,218, 80, 0,232,215,208, 0, 0, 0, 0,
- 0, 0, 5,225, 0, 0, 7,108, 0, 0, 0, 0, 0, 0, 3, 75, 4, 4, 1,140, 3, 76, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 67, 96, 0,232,253,144, 0,233, 0,224, 0,232,226,144,
- 0,232,227,176, 0, 0, 0, 0, 0, 0, 0, 0, 5,209,244, 32, 5,209,244,224, 68, 65, 84, 65, 0, 0, 0,236, 0,232,226,144,
- 0, 0, 0,180, 0, 0, 0, 1, 0,232,227,176, 0, 0, 0, 0, 0, 0, 0, 0, 67,240, 0, 0, 0, 0, 0, 0, 65,208, 0, 0,
- 0, 0, 0, 0, 67,198, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,139, 0, 0, 0, 0, 0, 0, 0, 25,
- 67,137,128, 0, 65,200, 0, 0, 67,137,128, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3,
- 0, 4, 4, 12, 0, 10, 1,140, 0, 26, 1,140, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,225, 0, 0, 7,108,
- 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,140, 0, 26, 0, 3, 0, 1,
- 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 68,128, 6,157, 67,144, 6,157, 67,144, 0, 0, 0, 0,
- 0, 0, 0, 0, 5,209,246,144, 5,209,247,112, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,232,227,176,
- 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0,232,226,144, 0, 0, 0, 0, 67,163,128, 0,196,133,192, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 67,163,134,146,196, 41,151, 74,192, 50,112,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,139, 0, 0, 0, 0, 0, 0, 3, 49,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3,
- 0, 2, 4, 0, 0, 6, 1,140, 3, 50, 1,140, 3, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,225, 0, 0, 7,108,
- 0, 0, 0, 26, 0, 0, 3, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,140, 3, 50, 0, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 67,240, 6,160,103, 16, 6,160,111,112, 0,232,228,208,
- 0,232,252,112, 5,209,249, 48, 5,209,251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,228,208,
- 0, 0, 0,176, 0, 0, 0, 1, 0,232,229,240, 0, 0, 0, 0, 5,213,216,128, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0,
+ 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 48, 82, 69, 78, 68, 32, 0, 0, 0,
+128, 13,156,230,255,127, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66, 40, 0, 0, 0,112, 13,156,230,255,127, 0, 0,
+184, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 48, 0, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1, 48, 3,160, 2, 0, 0, 0, 0,
+ 32,116,160, 2, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0, 87, 77, 0, 0,208, 0, 0, 0, 0, 1,160, 2, 0, 0, 0, 0,
+ 72, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 2,160, 2, 0, 0, 0, 0, 16, 2,160, 2, 0, 0, 0, 0,
+ 16, 2,160, 2, 0, 0, 0, 0, 16, 2,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 64,203,233, 2, 0, 0, 0, 0,
+224,220,232, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80,142,166, 2, 0, 0, 0, 0,224, 48,170, 2, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,
+ 16, 2,160, 2, 0, 0, 0, 0, 73, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+240,218,132, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 3,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+115, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 0, 30, 0,118, 7, 97, 4, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 1, 0, 0, 0, 0, 0,192,141,166, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,246,196, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,206,238, 2, 0, 0, 0, 0, 16,206,238, 2, 0, 0, 0, 0,
+ 0,143,166, 2, 0, 0, 0, 0,112,144,166, 2, 0, 0, 0, 0,160,239,169, 2, 0, 0, 0, 0,192, 54,170, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0,208, 0, 0, 0, 48, 3,160, 2, 0, 0, 0, 0,
+176, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99,114,101,101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 4,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0,
+128, 9,160, 2, 0, 0, 0, 0,240, 16,160, 2, 0, 0, 0, 0, 96, 17,160, 2, 0, 0, 0, 0,160, 97,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,116,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+236,101,152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+ 64, 4,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0,
+177, 0, 0, 0, 1, 0, 0, 0, 0, 5,160, 2, 0, 0, 0, 0, 64, 4,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 97, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 0, 5,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,
+ 96, 5,160, 2, 0, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 97, 4, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0, 96, 5,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0,
+ 0, 5,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+192, 5,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0, 96, 5,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0,
+177, 0, 0, 0, 1, 0, 0, 0,128, 6,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+118, 7, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,128, 6,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,
+224, 6,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0,224, 6,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0,
+128, 6,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 64, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+ 64, 7,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,224, 6,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,232, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,
+177, 0, 0, 0, 1, 0, 0, 0, 0, 8,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+232, 5, 70, 4, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 0, 8,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,
+ 96, 8,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0,
+ 0, 8,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 5, 80, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,
+192, 8,160, 2, 0, 0, 0, 0,177, 0, 0, 0, 1, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,232, 5, 72, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0,
+177, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+118, 7, 72, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,128, 9,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+240, 9,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0, 0, 5,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,240, 9,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 96, 10,160, 2, 0, 0, 0, 0,128, 9,160, 2, 0, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 96, 10,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+208, 10,160, 2, 0, 0, 0, 0,240, 9,160, 2, 0, 0, 0, 0, 0, 5,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,208, 10,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 64, 11,160, 2, 0, 0, 0, 0, 96, 10,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 64, 11,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+176, 11,160, 2, 0, 0, 0, 0,208, 10,160, 2, 0, 0, 0, 0, 64, 4,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,176, 11,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 32, 12,160, 2, 0, 0, 0, 0, 64, 11,160, 2, 0, 0, 0, 0, 96, 5,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 32, 12,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+144, 12,160, 2, 0, 0, 0, 0,176, 11,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,144, 12,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 0, 13,160, 2, 0, 0, 0, 0, 32, 12,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 0, 13,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+112, 13,160, 2, 0, 0, 0, 0,144, 12,160, 2, 0, 0, 0, 0, 64, 4,160, 2, 0, 0, 0, 0, 0, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,112, 13,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+224, 13,160, 2, 0, 0, 0, 0, 0, 13,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0, 0, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,224, 13,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 80, 14,160, 2, 0, 0, 0, 0,112, 13,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 80, 14,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+192, 14,160, 2, 0, 0, 0, 0,224, 13,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,192, 14,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 48, 15,160, 2, 0, 0, 0, 0, 80, 14,160, 2, 0, 0, 0, 0, 0, 8,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 48, 15,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+160, 15,160, 2, 0, 0, 0, 0,192, 14,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,160, 15,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 16, 16,160, 2, 0, 0, 0, 0, 48, 15,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 16, 16,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+128, 16,160, 2, 0, 0, 0, 0,160, 15,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,128, 16,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+240, 16,160, 2, 0, 0, 0, 0, 16, 16,160, 2, 0, 0, 0, 0, 96, 5,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,240, 16,160, 2, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,128, 16,160, 2, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,184, 0, 0, 0, 96, 17,160, 2, 0, 0, 0, 0,182, 0, 0, 0, 1, 0, 0, 0,
+ 32, 21,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0,160, 4,160, 2, 0, 0, 0, 0,
+ 0, 5,160, 2, 0, 0, 0, 0, 32, 6,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0,
+ 71, 4, 0, 0, 97, 4, 0, 0, 7, 7,119, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,189,147, 2, 0, 0, 0, 0,144,115,160, 2, 0, 0, 0, 0,
+144,115,160, 2, 0, 0, 0, 0, 96, 18,160, 2, 0, 0, 0, 0,192, 19,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,208,170,170, 2, 0, 0, 0, 0, 96, 66,189, 2, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+ 96, 18,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,192, 19,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64,103, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,238, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,119, 7, 26, 0,119, 7, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 7, 0, 0, 71, 4, 0, 0, 96, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,119, 7, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16,191,147, 2, 0, 0, 0, 0,208, 35,170, 2, 0, 0, 0, 0,208, 35,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,224,173,188, 2, 0, 0, 0, 0,128, 11,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,192, 19,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96, 18,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,158, 68, 0, 0, 0, 0, 0, 0, 16, 65,
+ 0, 0, 0, 0, 12,235,226, 69,222, 81,184, 63, 0, 0, 16, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0,
+ 0, 0, 0, 4, 10, 0,129, 7, 2, 0,129, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 97, 4, 0, 0, 97, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32,190,147, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176, 13,170, 2, 0, 0, 0, 0,
+ 32, 15,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,184, 0, 0, 0,
+ 32, 21,160, 2, 0, 0, 0, 0,182, 0, 0, 0, 1, 0, 0, 0,240, 67,160, 2, 0, 0, 0, 0, 96, 17,160, 2, 0, 0, 0, 0,
+ 64, 7,160, 2, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0, 96, 5,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0, 0, 0, 0, 0, 71, 3, 0, 0, 4, 4,142, 1, 72, 3, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,185,147, 2, 0, 0, 0, 0, 64, 59,160, 2, 0, 0, 0, 0,144, 66,160, 2, 0, 0, 0, 0, 32, 22,160, 2, 0, 0, 0, 0,
+128, 23,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 71,189, 2, 0, 0, 0, 0,
+128, 82,189, 2, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 32, 22,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+128, 23,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0,128,137, 67, 0, 0,200, 65, 0,128,137, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 4, 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 4, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,188,147, 2, 0, 0, 0, 0,128,218,232, 2, 0, 0, 0, 0,
+128,218,232, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,189,195, 2, 0, 0, 0, 0,
+ 80, 20,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+128, 23,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 22,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,128,163, 67, 0, 0,111,196, 0, 0, 0, 0, 0, 0, 0, 0,146,134,163, 67, 54, 57, 39,196, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 45, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 4, 6, 0,142, 1, 46, 3,142, 1, 46, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0, 26, 0, 0, 0, 71, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 46, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80,186,147, 2, 0, 0, 0, 0, 48,200,238, 2, 0, 0, 0, 0, 32,157,232, 2, 0, 0, 0, 0,224, 24,160, 2, 0, 0, 0, 0,
+ 48,248,232, 2, 0, 0, 0, 0,112,129,194, 2, 0, 0, 0, 0,112, 25,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,224, 24,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+112, 26,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 56,255, 71, 1,176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,112, 26,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0, 0, 28,160, 2, 0, 0, 0, 0,224, 24,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,254, 71, 1,200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+ 0, 28,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,144, 29,160, 2, 0, 0, 0, 0,112, 26,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,253, 71, 1, 80, 0, 20, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 56, 1, 71, 0,176,
- 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240,
- 0,232,229,240, 0, 0, 0,176, 0, 0, 0, 1, 0,232,231, 16, 0,232,228,208, 5,213,218, 16, 0, 0, 0, 0, 68,105,109,101,
-110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,
-110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0,144, 29,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 32, 31,160, 2, 0, 0, 0, 0,
+ 0, 28,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 88,
- 1, 71, 0,200, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,240, 0,232,231, 16, 0, 0, 0,176, 0, 0, 0, 1, 0,232,232, 48, 0,232,229,240, 5,213,219,160, 0, 0, 0, 0,
- 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,253, 71, 1, 80, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,253,240, 1, 71, 0, 80, 0, 20, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,240, 0,232,232, 48, 0, 0, 0,176, 0, 0, 0, 1, 0,232,233, 80, 0,232,231, 16, 5,213,222,176,
- 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 32, 31,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+176, 32,160, 2, 0, 0, 0, 0,144, 29,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,253,136, 1, 71, 0, 80, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,233, 80, 0, 0, 0,176, 0, 0, 0, 1, 0,232,234,112, 0,232,232, 48,
- 5,213,224, 64, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,194,252, 71, 1,174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,176, 32,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0, 64, 34,160, 2, 0, 0, 0, 0, 32, 31,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,194, 1, 71, 0,174, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 20,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,234,112, 0, 0, 0,176, 0, 0, 0, 1, 0,232,235,144,
- 0,232,233, 80, 5,213,225,208, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,251, 71, 1,212, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251,214, 1, 71, 0,212, 0, 20, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0,
- 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,235,144, 0, 0, 0,176, 0, 0, 0, 1,
- 0,232,236,176, 0,232,234,112, 0, 0, 0, 0, 0, 0, 0, 0, 76,101,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+ 64, 34,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,208, 35,160, 2, 0, 0, 0, 0,176, 32,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,101,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,101,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,255, 74, 1,151, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0,208, 35,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 96, 37,160, 2, 0, 0, 0, 0,
+ 64, 34,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,115,112,108, 97,121, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,115,112,108, 97,121, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141,254, 74, 1,107, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 81, 1, 74, 0,151, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,236,176, 0, 0, 0,176,
- 0, 0, 0, 1, 0,232,237,208, 0,232,235,144, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,115,112,108, 97,121, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 96, 37,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+240, 38,160, 2, 0, 0, 0, 0,208, 35,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80,114,101,118,105,101,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,115,112,108, 97,121, 0, 0, 0, 0, 0,
+ 80,114,101,118,105,101,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,141, 1, 74, 0,107, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,237,208,
- 0, 0, 0,176, 0, 0, 0, 1, 0,232,238,240, 0,232,236,176, 0, 0, 0, 0, 0, 0, 0, 0, 80,114,101,118,105,101,119, 0,
+ 0, 0, 96,255, 74, 1,136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,114,101,118,105,101,119, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,240, 38,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,128, 40,160, 2, 0, 0, 0, 0, 96, 37,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 96, 1, 74, 0,136,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240,
- 0,232,238,240, 0, 0, 0,176, 0, 0, 0, 1, 0,232,240, 16, 0,232,237,208, 0, 0, 0, 0, 0, 0, 0, 0, 87,111,114,108,
-100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,111,114,108,
-100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,247,
- 1, 74, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,240, 0,232,240, 16, 0, 0, 0,176, 0, 0, 0, 1, 0,232,241, 48, 0,232,238,240, 0, 0, 0, 0, 0, 0, 0, 0,
- 65,109, 98,105,101,110,116, 32, 79, 99, 99,108,117,115,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247,254, 74, 1, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65,109, 98,105,101,110,116, 32, 79, 99, 99,108,117,115,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+128, 40,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 16, 42,160, 2, 0, 0, 0, 0,240, 38,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,109, 98,105,101,110,116, 32, 79, 99, 99,108,117,115,105,111,
+110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,109, 98,105,101,110,116, 32, 79, 99, 99,108,117,115,105,111,
+110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,254, 43, 1, 74, 0,180, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,240, 0,232,241, 48, 0, 0, 0,176, 0, 0, 0, 1, 0,232,242, 80, 0,232,240, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 77,105,115,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,254, 74, 1,180, 0, 20, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 77,105,115,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0, 16, 42,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,160, 43,160, 2, 0, 0, 0, 0,
+128, 40,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,105,115,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,105,115,116, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,253,168, 1, 74, 0,107, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,242, 80, 0, 0, 0,176, 0, 0, 0, 1, 0,232,243,112, 0,232,241, 48,
- 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,253, 74, 1,107, 0,
+ 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253, 84, 1, 74, 0, 60, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,243,112, 0, 0, 0,176, 0, 0, 0, 1, 0,232,244,144,
- 0,232,242, 80, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 32, 67,111,114,114,101, 99,116,105,111,110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,160, 43,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+ 48, 45,160, 2, 0, 0, 0, 0, 16, 42,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83,116, 97,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 32, 67,111,114,114,101, 99,116,105,111,110, 0, 0, 0, 0,
+ 83,116, 97,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253, 24, 1, 74, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,244,144, 0, 0, 0,176, 0, 0, 0, 1,
- 0,232,245,176, 0,232,243,112, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 84,253, 74, 1, 60, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 48, 45,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,192, 46,160, 2, 0, 0, 0, 0,160, 43,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 32, 67,111,114,114,101, 99,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108,111,114, 32, 67,111,114,114,101, 99,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,253, 74, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+192, 46,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 80, 48,160, 2, 0, 0, 0, 0, 48, 45,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,255, 74, 1,149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0, 80, 48,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,224, 49,160, 2, 0, 0, 0, 0,
+192, 46,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,111,119, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,111,119, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,254, 74, 1,179, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,224, 49,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+112, 51,160, 2, 0, 0, 0, 0, 80, 48,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83,117,114,102, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83,117,114,102, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 83, 1, 74, 0,149, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,245,176, 0, 0, 0,176,
- 0, 0, 0, 1, 0,232,246,208, 0,232,244,144, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,111,119, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,111,119, 0, 0, 0, 0, 0, 0,
+ 0, 0,149,255, 74, 1, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,112, 51,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0, 0, 53,160, 2, 0, 0, 0, 0,224, 49,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,136, 1, 74, 0,179, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,246,208,
- 0, 0, 0,176, 0, 0, 0, 1, 0,232,247,240, 0,232,245,176, 0, 0, 0, 0, 0, 0, 0, 0, 83,117,114,102, 97, 99,101, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,117,114,102, 97, 99,101, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,255, 74, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,149, 1, 74, 0, 83,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240,
- 0,232,247,240, 0, 0, 0,176, 0, 0, 0, 1, 0,232,249, 16, 0,232,246,208, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,115,
-116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,115,
-116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+ 0, 53,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,144, 54,160, 2, 0, 0, 0, 0,112, 51,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,196,
- 1, 74, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,240, 0,232,249, 16, 0, 0, 0,176, 0, 0, 0, 1, 0,232,250, 48, 0,232,247,240, 0, 0, 0, 0, 0, 0, 0, 0,
- 84,114, 97,110,115,102,111,114,109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 84,114, 97,110,115,102,111,114,109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,255, 74, 1, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,255, 76, 1, 74, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,240, 0,232,250, 48, 0, 0, 0,176, 0, 0, 0, 1, 0,232,251, 80, 0,232,249, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 71,114,111,117,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 71,114,111,117,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0,144, 54,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 32, 56,160, 2, 0, 0, 0, 0,
+ 0, 53,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,114,111,117,112,115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,114,111,117,112,115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,255, 16, 1, 74, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,251, 80, 0, 0, 0,176, 0, 0, 0, 1, 0,232,252,112, 0,232,250, 48,
- 0, 0, 0, 0, 0, 0, 0, 0, 68,117,112,108,105, 99, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68,117,112,108,105, 99, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,255, 74, 1, 36, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 32, 56,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+176, 57,160, 2, 0, 0, 0, 0,144, 54,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68,117,112,108,105, 99, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 81, 1, 74, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,232,252,112, 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0, 0,
- 0,232,251, 80, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,105,109, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68,117,112,108,105, 99, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,105,109, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 81,254, 74, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,167, 1, 74, 0,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,224, 0,232,253,144, 0, 0, 0,151, 0, 0, 0, 1,
- 0,233, 0,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,176, 57,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,176, 77,231, 2, 0, 0, 0, 0, 32, 56,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65,110,105,109, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65,110,105,109, 97,116,105,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,236, 0,232,254,160, 0, 0, 0,180, 0, 0, 0, 1, 0,232,255,192, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 69, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 67,138, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 19, 0, 0, 0, 0, 0, 0, 0, 25, 68,237,128, 0, 65,200, 0, 0, 68,237,128, 0, 65,200, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12, 0, 10, 1, 20, 0, 26, 1, 20, 0, 26, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 6, 89, 0, 0, 7,108, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 20, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,167,253, 74, 1,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,236, 0,232,255,192, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0,232,254,160, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+176, 77,231, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,208, 74,231, 2, 0, 0, 0, 0,176, 57,160, 2, 0, 0, 0, 0,
+ 64,187,147, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,
+120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,
+120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 71, 1, 36, 0, 0, 0, 0, 0, 0, 0, 38, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 6, 89, 0, 0, 7,108, 0, 0, 0, 26, 0, 0, 4, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 20, 4, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,160, 32,
- 68, 65, 84, 65, 0, 0, 2,152, 1, 7,160, 32, 0, 0, 0,145, 0, 0, 0, 1, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,
-191,128, 0, 0,128, 0, 0, 0,128, 0, 0, 0,188,163,215,226,128, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 63,128, 0, 0, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,
-191,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184, 65, 32, 0, 0, 62,111,122,237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,106, 14,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,249,252,209,
-194, 71,253,115, 0, 0, 0, 0, 0, 0, 0, 0, 67,249,127, 98, 66, 71,255,129, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0, 63,128, 0, 0, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,
-191,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184, 65, 32, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,222, 32,100, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0,208, 74,231, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,176,232,233, 2, 0, 0, 0, 0,
+176, 77,231, 2, 0, 0, 0, 0,144,244,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 71, 1, 61, 0,
+ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,176,232,233, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+ 32,112,232, 2, 0, 0, 0, 0,208, 74,231, 2, 0, 0, 0, 0,144,246,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,189,254, 71, 1,178, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 32,112,232, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,144,155,232, 2, 0, 0, 0, 0,176,232,233, 2, 0, 0, 0, 0,144,248,210, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,254, 71, 1, 58, 0, 24, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+144,155,232, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 32,159,232, 2, 0, 0, 0, 0, 32,112,232, 2, 0, 0, 0, 0,
+160,253,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,254, 71, 1, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0,
+ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0, 32,159,232, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,192,195,232, 2, 0, 0, 0, 0,
+144,155,232, 2, 0, 0, 0, 0,176, 2,211, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,235,253, 71, 1, 80, 0,
+ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,192,195,232, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+ 80,199,232, 2, 0, 0, 0, 0, 32,159,232, 2, 0, 0, 0, 0,176, 4,211, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128,253, 71, 1, 83, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 80,199,232, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,224,202,232, 2, 0, 0, 0, 0,192,195,232, 2, 0, 0, 0, 0,192, 9,211, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,253, 71, 1,123, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+224,202,232, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 48,248,232, 2, 0, 0, 0, 0, 80,199,232, 2, 0, 0, 0, 0,
+208, 14,211, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,253, 71, 1,108, 0, 0, 0, 0, 0, 0, 0, 6, 0,
+ 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0, 48,248,232, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+224,202,232, 2, 0, 0, 0, 0,208, 18,211, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80,
+ 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,252, 71, 1,215, 0,
+ 24, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 1, 0, 0, 64, 59,160, 2, 0, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0,
+144, 66,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 0,224, 0, 0, 0,146, 0, 0, 0, 1,
- 0, 0, 0, 0, 0,232,253,144, 0,232,254,160, 0,232,255,192, 0, 0, 0, 1, 63, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 1, 0, 7, 1, 7,188, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
- 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 66, 12, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 60, 35,215, 10, 67,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,112, 0,233, 2, 0, 0, 0, 0,179,
- 0, 0, 0, 1, 0,233, 9, 16, 0,232,225,240, 0,232,215, 16, 0,232,217,144, 0,232,217,208, 0,232,217, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 0, 0, 0, 0, 75, 15, 15, 5,224, 0, 76, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 42,208, 0,233, 4,224, 0,233, 7,240, 0,233, 2,160,
- 0,233, 3,192, 0, 0, 0, 0, 0, 0, 0, 0, 5,209,251,112, 5,209,252, 48, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 2,160,
- 0, 0, 0,180, 0, 0, 0, 1, 0,233, 3,192, 0, 0, 0, 0, 0, 0, 0, 0, 68,112,128, 0, 0, 0, 0, 0, 65,208, 0, 0,
- 0, 0, 0, 0, 68,188, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 0, 0, 0, 0, 25,
- 68,202,224, 0, 65,200, 0, 0, 68,202,224, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3,
- 0, 4, 4, 12, 0, 10, 5,224, 0, 26, 5,224, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223,
- 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,224, 0, 26, 0, 5, 0, 1,
- 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 43,240, 5,219, 95,160, 5,219, 95,160, 0, 0, 0, 0,
- 0, 0, 0, 0, 5,209,253,224, 5,209,254, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 3,192,
- 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 2,160,192, 64, 0, 0, 67,126, 0, 0, 0, 0, 0, 0, 66, 72, 0, 0,
-192, 17,189,112, 67,125, 70,246, 0, 0, 0, 0, 66, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 17, 0, 0, 0, 49,
- 63,128, 0, 0, 66, 72, 0, 0, 72,146,124, 0, 66, 72, 0, 0, 61,204,204,205, 65, 32, 0, 0, 0, 72, 0, 0, 0, 0, 2, 0,
- 0, 4, 4, 0, 0, 8, 5,224, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223,
- 0, 0, 0, 26, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,224, 0, 50, 0, 6, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 43, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5,210, 0, 16, 5,210, 1,208, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,168, 0,233, 4,224,
- 0, 0, 0,160, 0, 0, 0, 1, 0,233, 7,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,150, 1, 0, 0, 0, 0, 0, 0,208, 63,214, 2, 0, 0, 0, 0,255, 20, 0, 0,160, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,144, 60,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+240, 61,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,138, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 4, 10, 0, 20, 1, 26, 0, 20, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, 0, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+240, 61,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144, 60,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 5,176, 0, 0, 0,180,
- 0, 0, 0, 1, 0,233, 6,208, 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0,
- 68,203, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 87, 0, 0, 0, 0, 0, 0, 0, 25, 68,237,128, 0,
- 65,200, 0, 0, 68,237,128, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12,
- 0, 10, 6, 88, 0, 26, 6, 88, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 87, 0, 0, 0, 0,
- 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 88, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 6,208, 0, 0, 0,180,
- 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 5,176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 26, 0, 0, 0, 80, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 87, 0, 0, 0, 26,
- 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 88, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,164, 32, 68, 65, 84, 65, 0, 0, 2,152, 1, 7,164, 32, 0, 0, 0,145,
- 0, 0, 0, 1, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,108,213, 87, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0,128, 0, 0, 0,128, 0, 0, 0,188,163,215,226,
-128, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0,
- 63,128, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,108,213, 87, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184,
- 65, 32, 0, 0, 63,106, 14,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,138, 91,224, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,249,252,209,194, 71,253,115, 0, 0, 0, 0, 0, 0, 0, 0, 67,249,127, 98,
- 66, 71,255,129, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0,
- 63,128, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,108,213, 87, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184,
- 65, 32, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 58,147,149, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,240, 0,233, 7,240, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 4,224, 0,233, 5,176, 0,233, 6,208,
- 0, 0, 0, 1, 63, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 7, 1, 7,188, 32, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
- 66, 12, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 60, 35,215, 10, 67,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,112, 0,233, 9, 16, 0, 0, 0,179, 0, 0, 0, 1, 0,233, 19,208, 0,233, 2, 0, 0,232,217,144,
- 0,232,216, 16, 0,232,217, 80, 0,232,217,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 77, 0, 0, 4, 80,
- 1, 1, 5,224, 4, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,229, 44,128, 0,233, 18,176, 0,233, 18,176, 0,233, 9,176, 0,233, 17,144, 0, 0, 0, 0, 0, 0, 0, 0, 6,157,103,176,
- 6,160,128,208, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 9,176, 0, 0, 0,180, 0, 0, 0, 1, 0,233, 10,208, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 84, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 68,188, 0, 0, 0, 0, 0, 0, 65,208, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 0, 0, 0, 0, 25, 68,237,128, 0, 65,200, 0, 0, 68,237,128, 0, 65,200, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12, 0, 10, 5,224, 0, 26, 5,224, 0, 26, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 0, 77, 0, 0, 0,102, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5,224, 0, 26, 0, 7, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,229, 52,192, 5,221, 1, 32, 5,221, 1, 32, 0, 0, 0, 0, 0, 0, 0, 0, 5,210, 5, 16, 5,210, 6, 96, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 10,208, 0, 0, 0,180, 0, 0, 0, 1, 0,233, 17,144, 0,233, 9,176,
- 0, 0, 0, 0, 67, 92, 0, 0,196, 55, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 92, 0, 0,196, 41, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 0, 0, 0, 2,163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 0, 6, 0,220, 2,164, 0,220, 2,164, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,223, 0, 0, 5,223, 0, 0, 0,103, 0, 0, 4, 80, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 0,229, 45,160, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 11,240, 0,233, 16,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 11,240, 0, 0, 0,176, 0, 0, 0, 1, 0,233, 13, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 26, 0,220, 0,206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 13, 16, 0, 0, 0,176, 0, 0, 0, 1, 0,233, 14, 48,
- 0,233, 11,240, 0, 0, 0, 0, 0, 0, 0, 0, 86,105,101,119, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,105,101,119, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,229, 0,220, 1, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 14, 48, 0, 0, 0,176, 0, 0, 0, 1,
- 0,233, 15, 80, 0,233, 13, 16, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97, 99,107,103,114,111,117,110,100, 32, 73,109, 97,103,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80, 63,160, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0, 80, 63,160, 2, 0, 0, 0, 0,145, 0, 0, 0, 1, 0, 0, 0,
+103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128,226,215,163,188, 0, 0, 0,128,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0,128, 63,
+103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,
+237,122,111, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0, 98,127,249, 67,129,255, 71, 66,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63,
+103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+100, 32,222, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 1, 0, 0,
+144, 66,160, 2, 0, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 59,160, 2, 0, 0, 0, 0,
+144, 60,160, 2, 0, 0, 0, 0,240, 61,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 7, 0, 96,138,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
+ 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,184, 0, 0, 0,240, 67,160, 2, 0, 0, 0, 0,
+182, 0, 0, 0, 1, 0, 0, 0, 16, 80,160, 2, 0, 0, 0, 0, 32, 21,160, 2, 0, 0, 0, 0, 64, 4,160, 2, 0, 0, 0, 0,
+ 0, 8,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0, 64, 7,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,231, 5, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 15, 15,232, 5, 80, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,123,147, 2, 0, 0, 0, 0,
+176, 71,160, 2, 0, 0, 0, 0,176, 78,160, 2, 0, 0, 0, 0,240, 68,160, 2, 0, 0, 0, 0, 80, 70,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 87,189, 2, 0, 0, 0, 0,208, 98,189, 2, 0, 0, 0, 0,
+ 68, 65, 84, 65, 24, 1, 0, 0,240, 68,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 80, 70,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,118, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,189, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,202, 68, 0, 0,200, 65,
+ 0,224,202, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,232, 5,
+ 26, 0,232, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 5, 26, 0, 6, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,240,124,147, 2, 0, 0, 0, 0,208, 55,234, 2, 0, 0, 0, 0,208, 55,234, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,173,210, 2, 0, 0, 0, 0,224, 29,170, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 80, 70,160, 2, 0, 0, 0, 0,
+183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 68,160, 2, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67,
+ 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0,
+ 18, 0, 0, 0, 53, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65,
+ 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0,232, 5, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,231, 5, 0, 0, 26, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+232, 5, 54, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,147, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 32,170, 2, 0, 0, 0, 0, 16, 35,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,184, 0, 0, 0,176, 71,160, 2, 0, 0, 0, 0,161, 0, 0, 0, 1, 0, 0, 0,176, 78,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,176, 72,160, 2, 0, 0, 0, 0,
+183, 0, 0, 0, 1, 0, 0, 0, 16, 74,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 68,
+ 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,203, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0,
+ 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 88, 6, 26, 0, 88, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 87, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 88, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 24, 1, 0, 0, 16, 74,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+176, 72,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 6, 0, 0, 26, 0, 0, 0, 55, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 6, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,112, 75,160, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0,112, 75,160, 2, 0, 0, 0, 0,
+145, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0,128, 0, 0, 0,128,
+226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32, 65, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,
+184,175, 31, 65, 0, 0, 32, 65,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 91,138, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194, 0, 0, 0, 0, 0, 0, 0, 0,
+ 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32,193, 0, 0,128, 63, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,213,108, 66,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,
+184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52,149,147, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 32, 1, 0, 0,176, 78,160, 2, 0, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+176, 71,160, 2, 0, 0, 0, 0,176, 72,160, 2, 0, 0, 0, 0, 16, 74,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 96,138,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,
+159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,184, 0, 0, 0,
+ 16, 80,160, 2, 0, 0, 0, 0,182, 0, 0, 0, 1, 0, 0, 0,160, 97,160, 2, 0, 0, 0, 0,240, 67,160, 2, 0, 0, 0, 0,
+ 0, 8,160, 2, 0, 0, 0, 0,192, 5,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0, 96, 8,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0, 81, 0, 0, 0, 69, 4, 0, 0, 1, 1,232, 5,245, 3, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+224,125,147, 2, 0, 0, 0, 0, 64, 96,160, 2, 0, 0, 0, 0, 64, 96,160, 2, 0, 0, 0, 0, 16, 81,160, 2, 0, 0, 0, 0,
+160, 91,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,104,189, 2, 0, 0, 0, 0,
+224,111,189, 2, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 16, 81,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+112, 82,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0,189, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
+ 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3,
+ 4, 0, 12, 4, 10, 0,232, 5, 26, 0,232, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0,
+ 81, 0, 0, 0,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 5, 26, 0, 8, 0, 1, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,165,147, 2, 0, 0, 0, 0,240, 61,239, 2, 0, 0, 0, 0,
+240, 61,239, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,212, 2, 0, 0, 0, 0,
+128, 41,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+112, 82,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,160, 91,160, 2, 0, 0, 0, 0, 16, 81,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 92, 67, 0, 64, 55,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0, 41,196, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,219, 0, 0, 0, 0, 0, 0, 0,163, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 3, 0, 2, 0, 0, 0, 6, 0,220, 0,164, 2,220, 0,164, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,231, 5, 0, 0,231, 5, 0, 0,107, 0, 0, 0, 69, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+192,127,147, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 83,160, 2, 0, 0, 0, 0,
+ 16, 90,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,208, 83,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+ 96, 85,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 84,114, 97,110,115,102,111,114,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 84,114, 97,110,115,102,111,114,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 26,255,220, 0,206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 96, 85,160, 2, 0, 0, 0, 0,
+179, 0, 0, 0, 1, 0, 0, 0,240, 86,160, 2, 0, 0, 0, 0,208, 83,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86,105,101,119, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86,105,101,119, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,253,220, 0, 29, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0,
+240, 86,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,128, 88,160, 2, 0, 0, 0, 0, 96, 85,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97, 99,107,103,114,111,117,110,100, 32, 73,109, 97,103,101,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97, 99,107,103,114,111,117,110,100, 32, 73,109, 97,103,101,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,169,253,220, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 80, 1, 0, 0,128, 88,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 16, 90,160, 2, 0, 0, 0, 0,
+240, 86,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,
+109, 32, 79,114,105,101,110,116, 97,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,
+109, 32, 79,114,105,101,110,116, 97,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,253,220, 0, 66, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 1, 0, 0, 16, 90,160, 2, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,128, 88,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76, 97,115,116, 32, 79,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76, 97,115,116, 32, 79,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 39,253,220, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,160, 91,160, 2, 0, 0, 0, 0,
+183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112, 82,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,231, 5, 0, 0,107, 0, 0, 0, 69, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+232, 5,219, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208,126,147, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+176, 43,170, 2, 0, 0, 0, 0,144, 49,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,160, 2, 0, 0, 0, 0,
+ 68, 65, 84, 65,248, 2, 0, 0, 0, 93,160, 2, 0, 0, 0, 0,145, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,212,119,214, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,225,215,163,188, 0, 0, 0, 0,238, 4, 53, 63,186,103, 59,190,
+247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62,244,217, 46,191, 0, 0, 0, 0,228, 3, 52, 50,248, 70,119, 63,
+217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 60,138,193, 0, 0,128, 63,236, 4, 53, 63,244, 4, 53, 63,
+ 0, 0, 24, 53, 0, 0, 0, 0,137,103, 59,190,118,103, 59, 62,227, 70,119, 63, 0, 0, 0, 0,238,217, 46, 63,221,217, 46,191,
+213,131,132, 62, 0, 0, 0, 0,186,213, 60, 65,168,213, 60,193,221, 28,143, 64, 0, 0,128, 63,100,253, 69, 63,110, 0,157,190,
+194,219, 46,191,247,217, 46,191,119,253, 69, 63, 60, 0,157, 62,191,219, 46, 63,244,217, 46, 63, 65,228, 68, 50, 18, 41,207, 63,
+ 53,133,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 13, 21,138, 65,152, 60,138, 65, 20,129, 37, 63,162,128, 37, 63,
+ 0, 0,252, 53, 0, 0,160, 52,183,177,223,189,161,177,223, 61,201,148, 19, 63, 0, 0, 96, 51, 0,133, 19,196,242,132, 19, 68,
+ 28,154, 95,195, 81,253, 71,194,205, 90, 19, 68,191, 90, 19,196, 37, 90, 95, 67, 95,255, 71, 66,238, 4, 53, 63,186,103, 59,190,
+247,217, 46, 63, 0, 0, 0, 0,255, 4, 53, 63,126,103, 59, 62,244,217, 46,191, 0, 0, 0, 0,228, 3, 52, 50,248, 70,119, 63,
+217,131,132, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 60,138,193, 0, 0,128, 63,100,253, 69, 63,110, 0,157,190,
+194,219, 46,191,247,217, 46,191,119,253, 69, 63, 60, 0,157, 62,191,219, 46, 63,244,217, 46, 63, 65,228, 68, 50, 18, 41,207, 63,
+ 53,133,132,190,217,131,132,190, 0, 0, 0, 0, 0, 0, 0, 0, 13, 21,138, 65,152, 60,138, 65,148,157,200, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148,157,200, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+148,157,200, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,122,163, 59, 63,235,250, 15,191,
+221,141,110,190,230,113,155,190,152, 60,138, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,131,158, 58, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 1, 0, 0, 64, 96,160, 2, 0, 0, 0, 0,
+146, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,
+ 96,138,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 3, 0,255,255, 25, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,184, 0, 0, 0,160, 97,160, 2, 0, 0, 0, 0,182, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 16, 80,160, 2, 0, 0, 0, 0,192, 8,160, 2, 0, 0, 0, 0,160, 7,160, 2, 0, 0, 0, 0,
+ 32, 6,160, 2, 0, 0, 0, 0, 32, 9,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0,
+ 73, 3, 0, 0, 69, 4, 0, 0, 3, 3,142, 1,253, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,120,147, 2, 0, 0, 0, 0, 96,101,160, 2, 0, 0, 0, 0,
+ 48,114,160, 2, 0, 0, 0, 0,160, 98,160, 2, 0, 0, 0, 0, 0,100,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,114,189, 2, 0, 0, 0, 0,176, 5,194, 2, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+160, 98,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0,100,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,190, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 66, 67, 0, 0,200, 65, 0, 0, 66, 67, 0, 0,200, 65,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0, 73, 3, 0, 0, 98, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 10, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 32,122,147, 2, 0, 0, 0, 0,176, 3,235, 2, 0, 0, 0, 0,176, 3,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,182,212, 2, 0, 0, 0, 0, 0, 54,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 0,100,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,160, 98,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,131, 67, 0, 0,194,194, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,128,190, 67, 0, 0, 81,195, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 18, 0, 0, 0,226, 0, 0, 0,
+ 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 18, 0, 0, 0,226, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3,
+ 0, 0, 0, 4, 6, 0,142, 1,227, 0,125, 1,209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 5, 0, 0,118, 7, 0, 0,
+ 99, 3, 0, 0, 69, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,227, 0, 11, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,121,147, 2, 0, 0, 0, 0,112, 31,236, 2, 0, 0, 0, 0,
+112, 31,236, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,169,212, 2, 0, 0, 0, 0,
+176, 57,170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+ 96,101,160, 2, 0, 0, 0, 0,155, 0, 0, 0, 1, 0, 0, 0,224,106,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,236, 2, 0, 0, 0, 0, 0, 4,236, 2, 0, 0, 0, 0,
+192,102,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,192,102,160, 2, 0, 0, 0, 0,206, 0, 0, 0, 1, 0, 0, 0,
+ 13, 0, 0, 0, 13, 0, 0, 0, 16,103,160, 2, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 16,103,160, 2, 0, 0, 0, 0,
+205, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 32,116,160, 2, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,
+ 32,116,160, 2, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 32,116,160, 2, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 1, 0,
+ 32,116,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 64,130,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+224,142,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,144,158,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+128,152,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,157,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 0,148,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 32,126,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 96,138,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 48,125,160, 2, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+ 32,104,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,128,105,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,240, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 55, 0, 0, 67, 67, 0, 0, 0, 0, 0, 0,208, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,137, 67, 0, 0,200, 65, 0,128,137, 67, 0, 0,200, 65,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0,195, 0, 26, 0,195, 0, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 53, 4, 0, 0,247, 4, 0, 0, 69, 2, 0, 0, 94, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,195, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,128,105,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 32,104,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,150, 67, 0,192,116,196, 0, 0, 0, 0,
+ 0, 0, 0, 0,205, 85,150, 67,223,204, 35,196, 26, 85,207,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0,155, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 3, 0,
+ 2, 0, 0, 4, 6, 0,195, 0,156, 0,195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 4, 0, 0,247, 4, 0, 0,
+ 95, 2, 0, 0,250, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 0,156, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 1, 0, 0,
+224,106,160, 2, 0, 0, 0, 0,151, 0, 0, 0, 1, 0, 0, 0, 48,114,160, 2, 0, 0, 0, 0, 96,101,160, 2, 0, 0, 0, 0,
+ 32,104,160, 2, 0, 0, 0, 0,128,105,160, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,150, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,
+ 48,108,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,144,109,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 69, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,138, 67, 0, 0, 0, 0, 0, 0,208, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,169, 0,220, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 15, 80, 0, 0, 0,176,
- 0, 0, 0, 1, 0,233, 16,112, 0,233, 14, 48, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 32, 79,114,
-105,101,110,116, 97,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,114, 97,110,115,102,111,114,109, 32, 79,114,
-105,101,110,116, 97,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253, 79, 0,220, 0, 66, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 16,112,
- 0, 0, 0,176, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 15, 80, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,115,116, 32, 79,112,101,
-114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,115,116, 32, 79,112,101,
-114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253, 39, 0,220, 0, 16,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236,
- 0,233, 17,144, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 10,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 5,223, 0, 0, 0,103, 0, 0, 4, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,224, 3,234,
- 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 45, 16, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5,210, 8, 32, 5,210, 11,192, 0, 0, 0, 0, 1, 7,168, 32, 68, 65, 84, 65, 0, 0, 2,152,
- 1, 7,168, 32, 0, 0, 0,145, 0, 0, 0, 1, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,210, 35,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0,128, 0, 0, 0,
-128, 0, 0, 0,188,163,215,226,128, 0, 0, 0, 63, 53, 4,238,190, 59,103,186, 63, 46,217,247, 0, 0, 0, 0, 63, 53, 4,255,
- 62, 59,103,126,191, 46,217,244, 0, 0, 0, 0, 50, 52, 3,228, 63,119, 70,248, 62,132,131,217, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,193,138, 60,152, 63,128, 0, 0, 63, 53, 4,236, 63, 53, 4,244, 53, 24, 0, 0, 0, 0, 0, 0,190, 59,103,137,
- 62, 59,103,118, 63,119, 70,227, 0, 0, 0, 0, 63, 46,217,238,191, 46,217,221, 62,132,131,213, 0, 0, 0, 0, 65, 60,213,186,
-193, 60,213,168, 64,143, 28,221, 63,128, 0, 0, 63, 69,253,100,190,153,213, 71,191, 46,219,194,191, 46,217,247, 63, 69,253,119,
- 62,153,213, 21, 63, 46,219,191, 63, 46,217,244, 50, 68,228, 65, 63,202,250,197,190,132,133, 53,190,132,131,217, 0, 0, 0, 0,
- 0, 0, 0, 0, 65,138, 21, 13, 65,138, 60,152, 63, 37,129, 20, 63, 37,128,162, 53,252, 0, 0, 52,160, 0, 0,189,228, 76,142,
- 61,228, 76,119, 63, 22,159, 2, 52, 49, 0, 0,196, 19,133, 0, 68, 19,132,242,195, 95,154, 27,194, 71,253, 81, 68, 19, 90,205,
-196, 19, 90,191, 67, 95, 90, 36, 66, 71,255, 95, 63, 53, 4,238,190, 59,103,186, 63, 46,217,247, 0, 0, 0, 0, 63, 53, 4,255,
- 62, 59,103,126,191, 46,217,244, 0, 0, 0, 0, 50, 52, 3,228, 63,119, 70,248, 62,132,131,217, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,193,138, 60,152, 63,128, 0, 0, 63, 69,253,100,190,153,213, 71,191, 46,219,194,191, 46,217,247, 63, 69,253,119,
- 62,153,213, 21, 63, 46,219,191, 63, 46,217,244, 50, 68,228, 65, 63,202,250,197,190,132,133, 53,190,132,131,217, 0, 0, 0, 0,
- 0, 0, 0, 0, 65,138, 21, 13, 65,138, 60,152, 63, 59,163,122,191, 15,250,235,190,110,141,221,190,155,113,230, 65,138, 60,152,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,159, 91,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 18,176, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 63, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 7,
- 1, 7,188, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 0, 0,
- 0, 0, 8, 8, 0, 0, 0, 0, 66, 12, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 60, 35,215, 10, 67,250, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 7, 0, 10,
- 0,159, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,112, 0,233, 19,208, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0,
- 0,233, 9, 16, 0,232,218, 16, 0,232,217, 80, 0,232,216, 80, 0,232,218, 80, 0, 0, 0, 0, 0, 0, 5,225, 0, 0, 7,108,
- 0, 0, 3, 77, 0, 0, 4, 80, 3, 3, 1,140, 1, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 41, 32, 0,233, 22,176, 0,233, 30,112, 0,233, 20,112, 0,233, 21,144, 0, 0, 0, 0,
- 0, 0, 0, 0, 5,210, 12, 48, 6,160,116, 96, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 20,112, 0, 0, 0,180, 0, 0, 0, 1,
- 0,233, 21,144, 0, 0, 0, 0, 0, 0, 0, 0, 67,216, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 67,198, 0, 0,
- 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,139, 0, 0, 0, 0, 0, 0, 0, 25, 67, 66, 0, 0, 65,200, 0, 0,
- 67, 66, 0, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12, 0, 10, 1,140,
- 0, 26, 1,140, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,225, 0, 0, 7,108, 0, 0, 3, 77, 0, 0, 3,102,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,140, 0, 26, 0, 9, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 42, 64, 5,216,145, 16, 5,216,145, 16, 0, 0, 0, 0, 0, 0, 0, 0, 5,210, 14,160,
- 5,210, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 21,144, 0, 0, 0,180, 0, 0, 0, 1,
- 0, 0, 0, 0, 0,233, 20,112, 0, 0, 0, 0, 67,132, 0, 0,194,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,190, 0, 0,
-195, 89, 0, 0, 0, 0, 0, 0, 0, 0, 1,124, 0, 0, 1,140, 0, 0, 0, 17, 0, 0, 0,233, 0, 0, 0, 0, 0, 0, 1,123,
- 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 1,123, 0, 0, 0, 17, 0, 0, 0,233, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 18, 0, 0, 0, 2, 3, 3, 0, 0, 4, 0, 0, 6, 1,140,
- 0,234, 1,124, 0,217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,225, 0, 0, 7,108, 0, 0, 3,103, 0, 0, 4, 80,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,140, 0,234, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,229, 41,176, 6,161, 8,240, 6,161, 8,240, 0, 0, 0, 0, 0, 0, 0, 0, 5,210, 16,208,
- 5,210, 17,176, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,248, 0,233, 22,176, 0, 0, 0,154, 0, 0, 0, 1,
- 0,233, 27, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,160,117, 80, 6,160,117, 80, 0,233, 23,208, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 68, 65, 84, 65, 0, 0, 0, 12,
- 0,233, 23,208, 0, 0, 0,203, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 13, 0,233, 24, 16, 68, 65, 84, 65, 0, 0, 0,156,
- 0,233, 24, 16, 0, 0, 0,202, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7,176, 32, 0, 19, 0, 0, 0, 1, 0, 1,
- 1, 7,176, 32, 0, 20, 0, 0, 0, 1, 0, 1, 1, 7,176, 32, 0, 21, 0, 1, 0, 1, 0, 1, 1, 7,176, 32, 0, 0, 0, 0,
- 0, 1, 0, 1, 0,233, 38, 96, 0, 0, 0, 0, 0, 1, 0, 1, 1, 7,192, 32, 0, 0, 0, 0, 0, 1, 0, 1, 0,233, 43,112,
- 0, 0, 0, 0, 0, 1, 0, 1, 1, 7,200, 32, 0, 0, 0, 0, 0, 1, 0, 1, 0,233, 42, 48, 0, 0, 0, 0, 0, 1, 0, 1,
- 1, 7,196, 32, 0, 0, 0, 0, 0, 1, 0, 1, 0,233, 35, 64, 0, 0, 0, 0, 0, 1, 0, 1, 1, 7,188, 32, 0, 0, 0, 0,
- 0, 1, 0, 1, 0,233, 34,144, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 24,224, 0, 0, 0,180, 0, 0, 0, 1, 0,233, 26, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 67,240, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 55, 0, 0, 0, 67, 67, 0, 0, 0, 0, 0, 0,
- 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 25, 67,137,128, 0, 65,200, 0, 0, 67,137,128, 0,
- 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12, 0, 10, 0,195, 0, 26, 0,195,
- 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 53, 0, 0, 4,247, 0, 0, 2, 69, 0, 0, 2, 94, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,236, 0,233, 26, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0,
- 0,233, 24,224, 0, 0, 0, 0, 67,150, 0, 0,196,116,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,150, 85,205,196, 35,204,223,
-195,207, 85, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0,155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 2, 4, 0, 0, 6, 0,195, 0,156, 0,195,
- 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 53, 0, 0, 4,247, 0, 0, 2, 95, 0, 0, 2,250, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 0,156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,224, 0,233, 27, 32, 0, 0, 0,151, 0, 0, 0, 1, 0,233, 30,112,
- 0,233, 22,176, 0,233, 24,224, 0,233, 26, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,236, 0,233, 28, 48, 0, 0, 0,180, 0, 0, 0, 1, 0,233, 29, 80, 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, 0, 0,
- 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 67,138, 0, 0, 0, 0, 0, 0, 65,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19,
- 0, 0, 0, 0, 0, 0, 0, 25, 68,237,128, 0, 65,200, 0, 0, 68,237,128, 0, 65,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 2, 3, 3, 0, 4, 4, 12, 0, 10, 1, 20, 0, 26, 1, 20, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 89, 0, 0, 7,108, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 20, 0, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,
- 0, 0, 0,236, 0,233, 29, 80, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 28, 48, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 89, 0, 0, 7,108, 0, 0, 0, 26, 0, 0, 4, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 20, 4, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,172, 32, 68, 65, 84, 65,
- 0, 0, 2,152, 1, 7,172, 32, 0, 0, 0,145, 0, 0, 0, 1, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0,
-128, 0, 0, 0,128, 0, 0, 0,188,163,215,226,128, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 63,128, 0, 0, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184, 65, 32, 0, 0, 62,111,122,237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,106, 14,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,249,252,209,194, 71,253,115,
- 0, 0, 0, 0, 0, 0, 0, 0, 67,249,127, 98, 66, 71,255,129, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,193, 32, 0, 0, 63,128, 0, 0, 64,136,212,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,128, 1, 80,191,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 65, 31,175,184, 65, 32, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,222, 32,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,240, 0,233, 30,112, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0, 0,
- 0,233, 27, 32, 0,233, 28, 48, 0,233, 29, 80, 0, 0, 0, 1, 63, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 1, 0, 7, 1, 7,188, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0,
- 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 66, 12, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 60, 35,215, 10,
- 67,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
- 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 0, 0, 4,248, 1, 7,176, 32, 0, 0, 0,143, 0, 0, 0, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,116, 97,103,101, 0, 97,105,110,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,188, 32, 0,233, 38, 96,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,232,212,160, 0,233, 32, 64, 0,232,212,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 61,204,204,205, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 32,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 32,224,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,172, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, 1, 0, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,128, 1,224, 0, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 25,
- 0,141, 7,128, 4, 56, 0, 4, 0, 4, 0, 0, 0, 24, 0, 17, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
- 0, 33, 0, 23, 0, 0, 0,128, 0, 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
+ 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,237, 68, 0, 0,200, 65, 0,128,237, 68, 0, 0,200, 65,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 4, 10, 0, 20, 1, 26, 0, 20, 1, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,233, 34, 32, 0,233, 34, 32, 0, 0, 0, 0, 66,200, 0, 0, 66,200, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,144,109,160, 2, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48,108,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 6, 0, 0,108, 7, 0, 0,
+ 26, 0, 0, 0, 80, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 1, 55, 4, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,110,160, 2, 0, 0, 0, 0, 68, 65, 84, 65,248, 2, 0, 0,
+240,110,160, 2, 0, 0, 0, 0,145, 0, 0, 0, 1, 0, 0, 0,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191,
+ 0, 0, 0,128, 0, 0, 0,128,226,215,163,188, 0, 0, 0,128, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191,
+ 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65,237,122,111, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,161, 14,106, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209,252,249,195,115,253, 71,194,
+ 0, 0, 0, 0, 0, 0, 0, 0, 98,127,249, 67,129,255, 71, 66, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,128, 63,103,212,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191,
+ 0, 0, 0, 0, 0, 0, 0, 0,184,175, 31, 65, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 32,222, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 1, 0, 0, 48,114,160, 2, 0, 0, 0, 0,146, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,224,106,160, 2, 0, 0, 0, 0, 48,108,160, 2, 0, 0, 0, 0,144,109,160, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, 96,138,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
+ 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 12, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 0, 0, 0, 7, 0, 10, 0,159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83, 67, 0, 0, 96, 5, 0, 0, 32,116,160, 2, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,
+116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,138,160, 2, 0, 0, 0, 0, 64,130,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,192,121,160, 2, 0, 0, 0, 0,160,122,160, 2, 0, 0, 0, 0,192,121,160, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16,123,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,
+100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 25, 0,141, 0,128, 7, 56, 4, 8, 0,
+ 8, 0, 0, 0, 24, 0, 17, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 23, 0, 33, 0, 0, 0,128, 0,
+ 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,124,160, 2, 0, 0, 0, 0,
+144,124,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, 0, 0,200, 66, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -639,645 +930,726 @@ char datatoc_B_blend[]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 6, 0, 0, 0, 16, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 76,204,205, 63, 76,204,205, 63, 76,204,205, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,128, 0, 0, 0, 0, 0, 6, 0, 0, 0, 16, 63,128, 0, 0, 63,128, 0, 0,
- 2,173, 0, 95, 63,217,153,154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0,172, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0,232,101,128,
- 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 28,
- 0,232,212,160, 0, 0, 0,125, 0, 0, 0, 1, 0,233, 31,240, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
- 2,240, 1,245, 1, 7,192, 32, 68, 65, 84, 65, 0, 0, 0, 28, 0,233, 31,240, 0, 0, 0,125, 0, 0, 0, 1, 0,233, 32, 64,
- 0,232,212,160, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 3,200, 3, 42, 1, 7,196, 32, 68, 65, 84, 65, 0, 0, 0, 28,
- 0,233, 32, 64, 0, 0, 0,125, 0, 0, 0, 1, 0, 0, 0, 0, 0,233, 31,240, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 4, 0,
- 3, 73, 3, 70, 1, 7,188, 32, 68, 65, 84, 65, 0, 0, 0, 40, 0,233, 32,144, 0, 0, 0,124, 0, 0, 0, 1, 1, 44, 0, 0,
- 0, 1, 0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 1,244, 0,200, 0,100, 0, 20, 0, 0, 39, 16, 61,204,204,205, 65,240, 0, 0,
- 64, 0, 0, 0, 68, 65, 84, 65, 0, 0, 1, 12, 0,233, 32,224, 0, 0, 0,141, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 1, 63, 76,204,205, 66,180, 0, 0, 0, 9, 0, 1, 63,128, 0, 0, 58,131, 18,111, 0, 32, 0, 32,
- 0, 32, 0, 1, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5,255,255, 0, 50, 0, 50,
- 0, 10, 0, 0, 0, 50, 0,100, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50,
- 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 0, 0, 0, 62,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 60, 35,215, 10, 61,204,204,205, 0, 0, 0, 0, 0, 0, 0,250, 61,204,204,205, 61,204,204,205, 63,166,102,102,
- 63,192, 0, 0, 65,240, 0, 0, 63,122,225, 72, 61,204,204,205, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 2, 67, 0, 3,
- 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 72, 0,233, 34, 32, 0, 0, 0,130, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 49, 32, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,255,255, 0, 0, 0, 0, 0, 0,127,255, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
- 0, 0, 67, 65, 0, 0, 0,136, 0,233, 34,144, 0, 0, 0, 30, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 67, 65, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 63, 0, 0, 0, 66, 68,137,145, 61,204,204,205, 66,200, 0, 0,
- 66, 12, 0, 0, 64,234, 14,161, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65,
- 0, 0, 1,132, 0,233, 35, 64, 0, 0, 0, 40, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 65, 83,112,111,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 65,239,255,247, 66,150, 0, 0,
- 62, 25,153,154, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0,233, 36,240, 0, 1, 0, 0, 63,128, 26, 46, 65,240, 4, 25,
- 66, 52, 0, 0, 63,128, 0, 0, 64, 64, 0, 0, 11, 64, 0, 3, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 58,131, 18,111, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 63,128, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 64, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 1, 8, 0,233, 36,240,
- 0, 0, 1, 50, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 2, 0, 1, 67,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
-191, 53, 4,243, 63, 53, 4,242,191, 53, 4,242, 63, 53, 4,243, 0,233, 38, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,233, 38, 32, 0, 0, 1, 48,
- 0, 0, 0, 2, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79,
- 0, 0, 1,104, 0,233, 38, 96, 0, 0, 0,123, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,128, 0, 0, 62,128, 0, 0, 62,128, 0, 0, 0, 0, 0, 0,
- 61,204,204,205, 61,204,204,205, 61,204,204,205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 28,204,205, 0, 0, 0, 0,
- 0, 0, 0, 32, 0,128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 65,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 65, 32, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 61, 76,204,205, 0, 0, 0, 5, 0, 0, 0, 0, 59,163,215, 10, 0, 0, 0, 0,
- 62,128, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 0, 0, 0,120,
- 0,233, 39,240, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 84,101,
-120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0,233, 40,144, 0,233, 40,144, 0,233, 40,144, 0,233, 40,144, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7,182, 32,255,255,255,255, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 24, 0,233, 40,144, 0, 0, 0, 26, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,233, 40,208, 0, 0, 0, 0, 0, 0, 0, 0, 70, 82, 69, 69, 68, 65, 84, 65, 0, 0, 0, 4, 0,233, 40,208, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 79, 66, 0, 0, 3, 80, 1, 7,188, 32, 0, 0, 0,115, 0, 0, 0, 1, 1, 7,192, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0,
- 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 34,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 64,239,101,110,192,208, 62,150, 64,170,255, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,141,254, 42,
- 60, 49, 57,192, 63, 80,159, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 47,149,222, 63, 58, 70, 53,188, 49, 56,222,
- 0, 0, 0, 0,190,162,126, 86, 62,159,251,227, 63,101, 53, 55, 0, 0, 0, 0, 63, 39,165, 7,191, 28, 84,149, 62,227,247, 51,
- 0, 0, 0, 0, 64,239,101,110,192,208, 62,150, 64,170,255, 78, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 1, 51,128, 0, 1,179, 0, 0, 1,
- 0, 0, 0, 0, 51, 0, 0, 0, 63,128, 0, 0, 51,128, 0, 1, 0, 0, 0, 0,179, 0, 0, 2,167, 0, 0, 2, 63,128, 0, 1,
- 0, 0, 0, 0, 53, 0, 0, 1, 41, 0, 0, 1,168,128, 0, 1, 63,128, 0, 0, 63,128, 0, 0, 49,215,190,157, 52, 4,170,167,
-128, 0, 0, 0,178,157,116,129, 63,128, 0, 1, 51, 15, 69, 33,128, 0, 0, 0, 51, 67,254, 73, 49,106, 97,243, 63,128, 0, 0,
-128, 0, 0, 0, 52, 64, 0, 3, 39,157,164,183, 53,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0,
- 0, 5, 0, 1, 0, 0, 0, 0, 79, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100,
- 0, 0, 0, 0,201,150,180, 56, 63,128, 0, 0, 63, 16,225,187, 63,128, 0, 0, 62,204,204,205, 63, 32, 54,237, 0, 0, 0, 0,
- 61,117,194,143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0, 3, 80, 1, 7,192, 32, 0, 0, 0,115, 0, 0, 0, 1,
- 1, 7,196, 32, 1, 7,188, 32, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6,144,198, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 43,112, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,233, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63, 47,149,222, 63, 58, 70, 52,
-188, 49, 56,179,128, 0, 0, 0,190,162,126, 86, 62,159,251,227, 63,101, 53, 56,128, 0, 0, 0, 63, 39,165, 7,191, 28, 84,149,
- 62,227,247, 50,128, 0, 0, 0, 64,239,101,110,192,208, 62,151, 64,170,255, 77, 63,128, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 79, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 0, 0,100, 0, 0, 0, 0,201,150,180, 56, 63,128, 0, 0, 60,208, 19,169, 63,128, 0, 0, 62,204,204,205, 62, 34,208,229,
- 0, 0, 0, 0, 61,117,194,143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 1, 1, 0, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,144,198,192, 6,144,204,128, 0, 0, 0, 25, 0, 0, 0, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 4, 0,233, 41, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0, 3, 80, 1, 7,196, 32, 0, 0, 0,115, 0, 0, 0, 1, 0, 0, 0, 0,
- 1, 7,192, 32, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 35, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 64,130,112,154, 63,128,178,183, 64,188,236,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 38,123,229,
- 61, 98, 43, 87, 63,238,229,229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,190,148,236, 54, 63,116,134, 25,189, 98, 13,236,
- 0, 0, 0, 0,191, 69,102,221,190, 76,174, 57, 63, 26,194, 34, 0, 0, 0, 0, 63, 16,255, 37, 62, 95,161,241, 63, 75,111,164,
- 0, 0, 0, 0, 64,130,112,154, 63,128,178,183, 64,188,236,112, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 50,128, 0, 1,179, 0, 0, 0,
- 0, 0, 0, 0, 50,128, 0, 1, 63,128, 0, 1, 51, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 39, 0, 0, 1, 52, 0, 0, 1, 39,128, 0, 1, 63,128, 0, 0,190,148,236, 53,191, 69,102,222, 63, 16,255, 37,
-128, 0, 0, 0, 63,116,134, 24,190, 76,174, 57, 62, 95,161,240,128, 0, 0, 0,189, 98, 13,235, 63, 26,194, 34, 63, 75,111,166,
-128, 0, 0, 0, 63, 13, 19,208,190,102, 65,234,192,231, 10, 10, 63,128, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0,
- 0, 5, 0, 1, 0, 0, 0, 68, 79, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100,
- 0, 0, 0, 0,201,150,180, 56, 63,128, 0, 0, 60,208, 19,169, 63,128, 0, 0, 62,204,204,205, 62, 34,208,229, 0, 0, 0, 0,
- 61,117,194,143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,219,142, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+192,121,160, 2, 0, 0, 0, 0,125, 0, 0, 0, 1, 0, 0, 0, 48,122,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,244, 2,237, 1,224,142,160, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+ 48,122,160, 2, 0, 0, 0, 0,125, 0, 0, 0, 1, 0, 0, 0,160,122,160, 2, 0, 0, 0, 0,192,121,160, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,205, 3, 35, 3, 0,148,160, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+160,122,160, 2, 0, 0, 0, 0,125, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,122,160, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 77, 3, 63, 3, 96,138,160, 2, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0,
+ 16,123,160, 2, 0, 0, 0, 0,141, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63, 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63,
+111, 18,131, 58,205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0,100, 0, 10, 0, 0, 0,
+ 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0, 50, 0, 50, 0, 10, 0, 0, 0,
+ 50, 0, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10,215, 35, 60,205,204,204, 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61,
+102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 0, 0, 0,144,124,160, 2, 0, 0, 0, 0,
+130, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 32, 82,101,110,100,101,114,
+ 76, 97,121,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0,255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
+ 67, 65, 0, 0,176, 0, 0, 0, 48,125,160, 2, 0, 0, 0, 0, 30, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97,109,101,114, 97,
+ 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 63,145,137, 68, 66,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66,
+161, 14,234, 64, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0,248, 1, 0, 0, 32,126,160, 2, 0, 0, 0, 0, 40, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 0, 0, 2,112, 1, 7,200, 32, 0, 0, 0, 42, 0, 0, 0, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97,116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 63, 76,204,205,
- 63, 76,204,205, 63, 76,204,205, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 63, 76,204,205, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,160, 0, 0,
- 0, 0, 0, 0, 63,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 2, 0, 2, 0, 50, 0, 6, 63,128, 0, 0,
- 63,128, 0, 0, 0, 18, 0, 18, 59,163,215, 10, 59,163,215, 10, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 3,
- 3, 1, 0, 3, 0, 1, 0, 4, 0, 12, 0, 4, 63, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64,128, 0, 0, 63, 0, 0, 0,
- 61,204,204,205, 63, 0, 0, 0, 61,204,204,205, 61,204,204,205, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0,233, 41, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76, 65, 83,112,111,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+247,255,239, 65, 0, 0,150, 66,154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 96,128,160, 2, 0, 0, 0, 0,
+ 1, 0, 0, 0, 46, 26,128, 63, 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, 0, 0, 64, 64, 64, 11, 3, 0, 1, 0, 0, 0,
+ 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111, 18,131, 58, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,233, 41,224, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63, 76,204,205, 63, 76,204,205, 63, 76,204,205, 61, 76,204,205, 61,204,204,205,
- 63,166,102,102, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,136, 0,233, 41, 48, 0, 0, 0, 33,
- 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 42, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0,
- 63,128, 0, 0, 62, 76,204,205, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 32, 0,233, 41,224, 0, 0, 0, 19, 0, 0, 0, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 84, 69, 0, 0, 1, 24, 0,233, 42, 48, 0, 0, 0, 38, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,128, 0, 0, 64,160, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 32, 0, 0, 0, 0, 0, 0,
- 0, 2, 0, 0, 0, 0, 0, 0, 0, 5, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 60,204,204,205,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 0, 0, 1, 24, 0,233, 43,112, 0, 0, 0, 52, 0, 0, 0, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 44,176, 0,233, 51, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 46, 96, 0,233, 48,208,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 44,224, 0, 0, 0, 1,
- 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 47, 80, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 12,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 49,144, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 51,128, 0, 0,180, 0, 0, 0,
- 0, 0, 0, 0, 63,128, 0, 4, 63,128, 0, 4, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 67, 0, 30, 0, 4, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0, 4,
- 0,233, 44,176, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7,200, 32, 68, 65, 84, 65, 0, 0, 1, 84, 0,233, 44,224, 0, 0, 1, 53,
- 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,233, 46, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,
+ 96,128,160, 2, 0, 0, 0, 0, 53, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 1, 0, 0, 0,128, 67,
+ 0, 0, 0, 0, 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63,224,129,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,192,
- 0,233, 46, 96, 0, 0, 0, 58, 0, 0, 0, 8, 63,128, 0, 0, 63,127,255,255,191,128, 0, 0, 73,230, 73,230,182, 26, 3,255,
- 0, 0, 0, 0, 63,128, 0, 0,191,128, 0, 0,191,128, 0, 0, 73,230,182, 26,182, 26, 3,255, 0, 0, 0, 0,191,128, 0, 1,
-191,127,255,253,191,128, 0, 0,182, 26,182, 26,182, 26, 3,255, 0, 0, 0, 0,191,127,255,250, 63,128, 0, 3,191,128, 0, 0,
-182, 26, 73,230,182, 26, 3,255, 0, 0, 0, 0, 63,128, 0, 4, 63,127,255,247, 63,128, 0, 0, 73,230, 73,230, 73,230, 3,255,
- 0, 0, 0, 0, 63,127,255,245,191,128, 0, 5, 63,128, 0, 0, 73,230,182, 26, 73,230, 3,255, 0, 0, 0, 0,191,128, 0, 3,
-191,127,255,250, 63,128, 0, 0,182, 26,182, 26, 73,230, 3,255, 0, 0, 0, 0,191,127,255,255, 63,128, 0, 0, 63,128, 0, 0,
-182, 26, 73,230, 73,230, 3,255, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 1, 84, 0,233, 47, 80, 0, 0, 1, 53, 0, 0, 0, 5,
- 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0,224,129,160, 2, 0, 0, 0, 0, 51, 1, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 0, 0,232, 1, 0, 0,
+ 64,130,160, 2, 0, 0, 0, 0,124, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 0, 0, 0, 0,205,204,204, 61,205,204,204, 61,
+205,204,204, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,128, 0, 5, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,233, 48,208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61, 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, 0, 0, 0, 0,
+ 0, 0,128, 62, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 0, 0,176, 0, 0, 0,
+112,132,160, 2, 0, 0, 0, 0, 28, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 88, 84,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 7, 0, 0, 0, 1, 0, 0, 0, 96,133,160, 2, 0, 0, 0, 0, 96,133,160, 2, 0, 0, 0, 0, 96,133,160, 2, 0, 0, 0, 0,
+ 96,133,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 32,134,160, 2, 0, 0, 0, 0,255,255,255,255, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65, 40, 0, 0, 0, 96,133,160, 2, 0, 0, 0, 0, 26, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,208,133,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 69, 82, 70,
+ 68, 65, 84, 65, 4, 0, 0, 0,208,133,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 79, 66, 0, 0,
+ 64, 4, 0, 0, 96,138,160, 2, 0, 0, 0, 0,115, 0, 0, 0, 1, 0, 0, 0,224,142,160, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97,109,101,114, 97, 0, 97,109,101,
+114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 0,144, 0,233, 48,208,
- 0, 0, 0, 55, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 35,
- 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 35, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 35, 0, 0, 0, 1, 0, 0, 0, 5,
- 0, 0, 0, 35, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 35, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 35, 0, 0, 0, 3,
- 0, 0, 0, 7, 0, 0, 0, 35, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 35, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 35,
- 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 35, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 35, 68, 65, 84, 65, 0, 0, 1, 84,
- 0,233, 49,144, 0, 0, 1, 53, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233, 51, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,125,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64,
+150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,254,141, 63,192, 57, 49, 60,
+ 34,159, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0,
+ 86,126,162,190,227,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,
+110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63, 1, 0,128, 51, 1, 0, 0,179, 0, 0, 0, 0,
+ 0, 0, 0, 51, 0, 0,128, 63, 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179, 2, 0, 0,167, 1, 0,128, 63, 0, 0, 0, 0,
+ 1, 0, 0, 53, 1, 0, 0, 41, 1, 0,128,168, 0, 0,128, 63, 0, 0,128, 63,157,190,215, 49,167,170, 4, 52, 0, 0, 0,128,
+129,116,157,178, 1, 0,128, 63, 33, 69, 15, 51, 0, 0, 0,128, 73,254, 67, 51,243, 97,106, 49, 0, 0,128, 63, 0, 0, 0,128,
+ 3, 0, 64, 52,183,164,157, 39, 0, 0,128, 53, 0, 0,128, 63, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0,
+ 0, 0, 0, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0,
+ 56,180,150,201, 0, 0,128, 63,187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 65, 84, 65, 0, 0, 0,120, 0,233, 51, 16, 0, 0, 0, 54, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2,
- 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 6, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0,
- 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 2,
- 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0,
- 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 2, 85, 83, 69, 82, 0, 0, 11, 40, 0,169, 26,192, 0, 0, 0,172, 0, 0, 0, 1,
- 0, 1,152, 33, 0, 0, 2, 63, 0, 0, 0, 5, 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0, 64, 4, 0, 0,224,142,160, 2,
+ 0, 0, 0, 0,115, 0, 0, 0, 1, 0, 0, 0, 0,148,160, 2, 0, 0, 0, 0, 96,138,160, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 48,179,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,144,158,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, 47,116,111,110, 47, 68,101,115,107,116,111,112,
- 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100,101,114, 46, 97,112,112, 47, 67,111,110,116,101,
-110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,176,147,160, 2,
+ 0, 0, 0, 0, 96,147,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63,222,149, 47, 63, 52, 70, 58, 63,179, 56, 49,188, 0, 0, 0,128, 86,126,162,190,227,251,159, 62,
+ 56, 53,101, 63, 0, 0, 0,128, 7,165, 39, 63,149, 84, 28,191, 50,247,227, 62, 0, 0, 0,128,110,101,239, 64,151, 62,208,192,
+ 77,255,170, 64, 0, 0,128, 63, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 79, 66, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,
+169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,201,234, 2,
+ 0, 0, 0, 0,128,171,235, 2, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,176,147,160, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0, 96,147,160, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0, 64, 4, 0, 0, 0,148,160, 2, 0, 0, 0, 0,115, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,224,142,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,126,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,229,123, 38, 63, 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190,
+ 25,134,116, 63,236, 13, 98,189, 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,
+241,161, 95, 62,164,111, 75, 63, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,
+ 1, 0,128, 50, 0, 0, 0,179, 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63, 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52, 1, 0,128, 39, 0, 0,128, 63, 53,236,148,190,
+222,102, 69,191, 37,255, 16, 63, 0, 0, 0,128, 24,134,116, 63, 57,174, 76,190,240,161, 95, 62, 0, 0, 0,128,235, 13, 98,189,
+ 34,194, 26, 63,166,111, 75, 63, 0, 0, 0,128,208, 19, 13, 63,234, 65,102,190, 10, 10,231,192, 0, 0,128, 63, 1, 0, 0, 0,
+ 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0, 79, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,
+229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 77, 65, 0, 0,248, 2, 0, 0,128,152,160, 2, 0, 0, 0, 0, 42, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97,116,101,114,105,
+ 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 3, 3, 0, 1, 3, 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61, 0, 0, 0, 63,205,204,204, 61,205,204,204, 61,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63,192,155,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,156,160, 2, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 63,
+205,204, 76, 63,205,204, 76, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0,192,155,160, 2, 0, 0, 0, 0,
+ 33, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,157,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,
+144,156,160, 2, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0, 80, 1, 0, 0,
+ 0,157,160, 2, 0, 0, 0, 0, 38, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 5, 0, 8, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 77, 69, 0, 0,144, 1, 0, 0,144,158,160, 2, 0, 0, 0, 0, 52, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,
+104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,168,160, 2, 0, 0, 0, 0, 64,167,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 16,162,160, 2, 0, 0, 0, 0,192,164,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,160,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 16,163,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,144,165,160, 2, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 30, 0, 4, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0, 0,168,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+128,152,160, 2, 0, 0, 0, 0, 68, 65, 84, 65,104, 1, 0, 0, 96,160,160, 2, 0, 0, 0, 0, 56, 1, 0, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16,162,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 52, 48, 0, 0, 0, 0,
- 0, 0, 0, 2, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 64, 0, 5, 0, 2, 1, 7,216, 32, 1, 7,236, 32,
- 5,210, 18, 32, 5,210, 18, 32, 5,210, 24, 64, 5,210, 24, 64, 0, 32, 0, 0, 0, 1, 0, 2, 0, 25, 0, 0, 0, 20, 0, 20,
- 0, 0, 0, 1, 0, 0, 0, 0, 63, 76,204,205, 63, 76,204,205, 63, 76,204,205, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0,191,100, 90, 30, 62,153,153,154, 63,102,102,102, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 62,254,250, 31, 63, 0, 0, 9, 63, 25,153,156, 0, 0, 0, 0, 62, 76,204,205, 62, 76,204,205, 62, 76,204,205, 63,128, 0, 0,
- 63, 22,135, 44, 62,235,133, 32, 62,125,243,184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 76, 73,195, 63, 86,135, 42,
- 63,128, 0, 0, 0, 0, 0, 0, 61,135, 43, 1, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 62, 93, 47, 16,190,200,180, 58,
-190, 93, 47, 24, 0, 0, 0, 0, 0, 14, 0, 0, 0, 25, 0, 15, 0,120, 0, 60, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0,
- 31,144, 0, 15, 0, 6, 0, 15, 0, 8, 0, 10, 0,250, 0, 0, 0,100, 0,100, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,192, 0, 0, 0, 16,162,160, 2, 0, 0, 0, 0, 58, 0, 0, 0, 8, 0, 0, 0,
+ 0, 0,128, 63,255,255,127, 63, 0, 0,128,191,230, 73,230, 73, 26,182,255, 0, 3, 0, 0, 0, 0, 0,128, 63, 0, 0,128,191,
+ 0, 0,128,191,230, 73, 26,182, 26,182,255, 0, 3, 0, 0, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182,
+ 26,182,255, 0, 3, 0, 0, 0,250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182,255, 0, 3, 0, 0, 0,
+ 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,230, 73,230, 73,230, 73,255, 0, 3, 0, 0, 0,245,255,127, 63, 5, 0,128,191,
+ 0, 0,128, 63,230, 73, 26,182,230, 73,255, 0, 3, 0, 0, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182,
+230, 73,255, 0, 3, 0, 0, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73,255, 0, 3, 0, 0, 0,
+ 68, 65, 84, 65,104, 1, 0, 0, 16,163,160, 2, 0, 0, 0, 0, 56, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,164,160, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,128, 0, 0, 63,128, 0, 0,
- 63,128, 0, 0, 63,128, 0, 0, 63,128, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0,
- 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63,128, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 19, 8, 1, 7,216, 32, 0, 0, 0,170, 0, 0, 0, 1, 1, 7,236, 32,
- 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 25,
-255,231, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 1, 0, 15,
-255,241, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 0,
- 0, 25, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 15,
-255,241, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 0, 1,255,236,
- 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 0, 1,255,236,
- 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 0, 1, 0, 15,
-255,241, 0, 0, 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 25,
-255,236, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 46,124,217,204,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0, 25,
-255,236, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0, 38,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
- 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90,255, 0, 0, 0, 0,250,250,250,255,
- 15, 15, 15,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,180,180,180,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-130,130,130,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250,250,250,255,250,250,250,255,250,250,250,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255,
- 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0,
- 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0,
- 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,172,172,172,255, 84, 44, 31,100, 17, 27, 60,100,
- 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80,228,156,198,255,255,255,170,255, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,
-169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,
- 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,255,255,255, 10,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,110,110,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,132,132,132,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255, 94, 94, 94,255,172,172,172,255, 17, 27, 60,100, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-195,195,195,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255,
- 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0,
- 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255,
- 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,
-255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,
-255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,
-255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,
-255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,255,255,255,
-219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255,
- 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,
-129,131,144,255,127,127,127,255,142,138,145,255,120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255,
- 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255,
- 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255,
- 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255,
- 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255,
- 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255,
- 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255,
- 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 68, 65, 84, 65, 0, 0, 19, 8, 1, 7,236, 32, 0, 0, 0,170, 0, 0, 0, 1, 0, 0, 0, 0, 1, 7,216, 32,
- 82,111,117,110,100,101,100, 0, 0,101,119, 32, 85,115,101,114, 32, 84,104,101,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 25,255,231, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 1, 0, 15,255,241, 0, 0,
- 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 0, 0, 25, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 0, 1, 0, 15,255,241, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 0, 1,255,236, 0, 0, 0, 0,
- 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 0, 1,255,236, 0, 0, 0, 0,
- 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 0, 1, 0, 15,255,241, 0, 0,
- 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 25,255,236, 0, 0,
- 0, 0, 0,255, 25, 25, 25,230, 46,124,217,204,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0, 25,255,236, 0, 0,
- 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0, 38, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,175,175,175, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 65, 84, 65,144, 0, 0, 0,192,164,160, 2, 0, 0, 0, 0, 55, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0,
+ 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 35, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 6, 0, 0, 0,
+ 7, 0, 0, 0, 0, 0, 35, 0, 68, 65, 84, 65,104, 1, 0, 0,144,165,160, 2, 0, 0, 0, 0, 56, 1, 0, 0, 5, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 64,167,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0, 64,167,160, 2, 0, 0, 0, 0, 54, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 7, 0, 0, 0, 6, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0,
+ 5, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 2, 85, 83, 69, 82, 64, 11, 0, 0,
+ 96,184, 48, 2, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 33,152, 1, 0, 63, 2, 0, 0, 5, 0, 0, 0, 47,116,109,112,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,
+115,101,114,115, 47,116,111,110, 47, 68,101,115,107,116,111,112, 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,
+108,101,110,100,101,114, 46, 97,112,112, 47, 67,111,110,116,101,110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0, 0, 0, 48, 52, 6, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 8, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0,
+ 0, 0, 64, 0, 5, 0, 2, 0,208,179,160, 2, 0, 0, 0, 0,176,200,160, 2, 0, 0, 0, 0,112, 58,170, 2, 0, 0, 0, 0,
+112, 58,170, 2, 0, 0, 0, 0, 0,168,170, 2, 0, 0, 0, 0, 0,168,170, 2, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0,
+ 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, 9, 0, 0, 63,156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,
+205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, 32,133,235, 62,184,243,125, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,
+ 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, 0, 0, 0, 0, 14, 0, 0, 0, 25, 0, 15, 0,120, 0, 60, 0, 0, 0, 0, 0,
+128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, 6, 0, 15, 0, 8, 0, 10, 0,250, 0, 0, 0,100, 0,100, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0,
+ 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,
+ 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63,
+ 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 20, 0, 0,208,179,160, 2, 0, 0, 0, 0,
+173, 0, 0, 0, 1, 0, 0, 0,176,200,160, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,
+100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,
+100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 25, 0,231,255, 0, 0, 25, 25, 25,255,153,153,153,255,
+153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255,
+ 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 70, 70, 70,255,
+ 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 25, 25, 25,255,153,153,153,255,
+100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,
+153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,
+153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255,
+ 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 63, 63, 63,255,
+ 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230,
+ 45, 45, 45,230,100,100,100,255,255,255,255,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0,
+ 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 0, 0, 38, 0, 0, 0, 0, 0, 25, 25, 25,255,128,128,128,255,
+100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50,180, 80, 80, 80,180,
+100,100,100,180,180,180,180,255, 0, 0, 0,255,255,255,255,255, 1, 0, 10, 0,236,255, 0, 0,115,190, 76,255, 90,166, 51,255,
+240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+ 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90,255, 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,180,180,180,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,130,130,130,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,250,250,250,255,250,250,250,255,250,250,250,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255,
+ 3, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+ 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100,
+ 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255,
+ 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255,
+ 3, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+ 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255,126,126, 80,255,162, 95,111,255,
+109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,255,255,255, 10,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,110,110,110,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,132,132,132,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 94, 94, 94,255,172,172,172,255,
+ 17, 27, 60,100, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,195,195,195,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,
+100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+ 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,
+ 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,
+255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255,
+ 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255,127,127,127,255,142,138,145,255,
+120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255,
+ 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255,
+ 0, 0, 0, 40,255,140, 25,255, 16, 64, 16,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,
+255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 34,221,221,255,
+200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,
+250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255,
+ 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,
+135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,
+155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,
+255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,
+187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,
+189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 20, 0, 0,176,200,160, 2, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,208,179,160, 2, 0, 0, 0, 0, 82,111,117,110,100,101,100, 0, 0,101,119, 32, 85,115,101,114,
+ 32, 84,104,101,109,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255,
+ 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255,
+ 0, 0, 0,255,255,255,255,255, 1, 0, 25, 0,231,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255,
+ 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,
+255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,
+ 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255,
+ 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255,
+ 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,
+255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255,
+ 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 46,124,217,204,255,255,255,255,
+255,255,255,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,255,255,255,255,
+255,255,255,255, 0, 0, 0,255, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
- 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255,
- 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255,
-255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,
-255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128,
+175,175,175, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255,
+ 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
+255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100,255,130, 0,255, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255,
+ 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,
+255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-107,107,107,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,100,143,143,143,100, 96,192, 64,255, 94, 94, 94,255,
- 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 79,101, 73,255,135,177,125,255,255,255,255,255,255,255,255,255,
-255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255,
-124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100,255,130, 0,255, 88, 88, 88,255,
+ 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
+255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-255,255,255,255,255,130, 0,255, 2, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
+165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+107,107,107,100,143,143,143,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+ 79,101, 73,255,135,177,125,255,255,255,255,255,255,255,255,255,255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,130, 0,255, 2, 0, 0, 0, 0, 0, 0, 0,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255,
+165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255,
0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
- 79,101, 73,255,135,177,125,255,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,143,143,143,255,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-228,156,198,204,255,255,170,204, 96,192, 64,255, 82, 96,110,255,124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,143,143,143,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255,
- 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
-255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,156,198,255,255,255,170,255, 96,192, 64,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 79,101, 73,255,135,177,125,255,255,255,255,255,255,112,255,255,
+255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143,143,143,255,200,100,200, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,156,198,204,255,255,170,204, 96,192, 64,255, 82, 96,110,255,
+124,137,150,255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+143,143,143,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255,
-126,126, 80,255,162, 95,111,255,109,145,131,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+107,107,107,255,178,178,178,100,255,130, 0,100, 94, 94, 94,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+228,156,198,255,255,255,170,255, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255,
0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
-255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
-255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+255,130, 0,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,
+109, 88,129,255, 78,152, 62,255, 46,143,143,255,169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-143,143,143,255,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 80,200,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,153,153,153,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,195,195,195,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, 88, 88, 88,255,
+165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255,
0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 0, 0, 0,100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
-107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+153,153,153,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+143,143,143,255,198,119,119,255,255, 0, 0,255, 88, 88, 88,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,100, 0, 0,255, 0, 0,200,255,
+128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
-165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255,
+165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 88, 88, 88,255,
0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,
255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,158,158,158,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
+158,158,158,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+140,140,140,255,127,112,112,100, 0, 0, 0, 0,112,112, 96,255, 0, 0, 0,255,255,136,255,255, 0, 0, 0, 0,255,187,255,255,
+ 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,112,255,255,255,255,112,255, 0, 0, 0,255,144,144, 48,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,150, 30,200,100,200, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
+ 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255,
+ 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0,255,130, 0,255, 0, 0, 0,255,
+255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,
+255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255,127,127,127,255,142,138,145,255,120,145,120,255, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,
107,107,107,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,245, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 51, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,
160,160,160,100,127,112,112,100, 0, 0, 0, 0,143,143,143,255, 0, 0, 0,255,217,217,217,255, 0, 0, 0, 40,255,255,255,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,
- 0, 0, 0, 0, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0,150,150,150,255,129,131,144,255,
-127,127,127,255,142,138,145,255,120,145,120,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 64, 16,255,102,255,102,255,255,130, 0,255, 0, 0, 0,255,255,130, 0,255, 0, 0, 0,255,255,255,255,255,230,150, 50,255,
+255, 32, 32,255, 0, 0, 0, 0,255,255,255, 10,255,130, 0, 60,255,138, 48,255, 34,221,221,255,200,200,200,255, 80,200,255, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0,
30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,
169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0,
@@ -1288,589 +1660,602 @@ char datatoc_B_blend[]= {
8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 78, 65, 49, 0, 0,203, 56, 6, 62, 16, 32, 0, 0, 0, 0, 0, 0, 0, 1, 83, 68, 78, 65, 78, 65, 77, 69, 0, 0, 10, 5,
- 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,115,116, 0,120,
- 0,121, 0,122, 0,119, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,112,111,105,110,
-116,101,114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,121,112,101, 0,
-102,108, 97,103, 0,110, 97,109,101, 91, 51, 50, 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110, 0,116,111,116,
- 97,108,108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, 91, 50, 52, 93, 0,117,115, 0,105, 99,
-111,110, 95,105,100, 0, 42,112,114,111,112,101,114,116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,107, 0, 42,102,
-105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91, 50, 52, 48, 93, 0,102,105,108,101,110, 97,109,101, 91, 50, 52, 48, 93, 0,
-116,111,116, 0,112, 97,100, 0, 42,112, 97,114,101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104, 97,110,103,101,
-100, 91, 50, 93, 0,112, 97,100, 48, 0,112, 97,100, 49, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,
-107,116,121,112,101, 0, 97,100,114, 99,111,100,101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,
-116, 0,109, 97,120,114, 99,116, 0,116,111,116,114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,
-105,112,111, 0,101,120,116,114, 97,112, 0,114,116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,
-115,108,105,100,101, 95,109, 97,120, 0, 99,117,114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,
-117,114, 0,115,104,111,119,107,101,121, 0,109,117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,
-116,111,116,101,108,101,109, 0,112, 97,100, 50, 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 51, 50, 93,
- 0,115,108,105,100,101,114,109,105,110, 0,115,108,105,100,101,114,109, 97,120, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,
-121, 0,101,108,101,109,115,116,114, 91, 51, 50, 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,
-111, 0, 42,102,114,111,109, 0,116,111,116,107,101,121, 0,115,108,117,114,112,104, 0, 42, 42,115, 99,114,105,112,116,115, 0,
- 42,102,108, 97,103, 0, 97, 99,116,115, 99,114,105,112,116, 0,116,111,116,115, 99,114,105,112,116, 0, 42,108,105,110,101, 0,
- 42,102,111,114,109, 97,116, 0, 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100, 0,102,108,
- 97,103,115, 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,105,110,101,115,
- 0,108,105,110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,115,101,108, 99, 0,109, 97,114,
-107,101,114,115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,117,110,100,111, 95,108,101,110,
- 0, 42, 99,111,109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,101,107, 0,112, 97,115,115,101,
-112, 97,114,116, 97,108,112,104, 97, 0, 97,110,103,108,101, 0, 99,108,105,112,115,116, 97, 0, 99,108,105,112,101,110,100, 0,
-108,101,110,115, 0,111,114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,115,104,105,102,116,120,
- 0,115,104,105,102,116,121, 0, 89, 70, 95,100,111,102,100,105,115,116, 0, 89, 70, 95, 97,112,101,114,116,117,114,101, 0, 89,
- 70, 95, 98,107,104,116,121,112,101, 0, 89, 70, 95, 98,107,104, 98,105, 97,115, 0, 89, 70, 95, 98,107,104,114,111,116, 0,115,
- 99,114,105,112,116,108,105,110,107, 0, 42,100,111,102, 95,111, 98, 0,102,114, 97,109,101,110,114, 0,102,114, 97,109,101,115,
- 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,
-116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, 0,109,101,110,117,110,114, 0, 42,115, 99,101,110,
-101, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, 42, 97,110,105,109, 0, 42,114,114, 0,115,111,
-117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103,101,102,108, 97,103, 0,116,111,116, 98,105,110,100,
- 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119,101,110,100, 0, 98,105,110,100, 99,111,100,101, 0,
- 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108,101, 0, 42,112,114,101,118,105,101,119, 0,108, 97,
-115,116,117,112,100, 97,116,101, 0,108, 97,115,116,117,115,101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,
-120, 0,103,101,110, 95,121, 0,103,101,110, 95,116,121,112,101, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111,
- 0,109, 97,112,116,111, 0,109, 97,112,116,111,110,101,103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,
-116, 0, 42,116,101,120, 0,117,118,110, 97,109,101, 91, 51, 50, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,
-111,106,122, 0,109, 97,112,112,105,110,103, 0,111,102,115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,116,101,120,102,108,
- 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,
-111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0,112, 97,100, 91, 50, 93, 0,114,
- 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, 97, 99, 0,110,111,114,102, 97, 99, 0,118, 97,114,
-102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0,110, 97,109,101, 91, 49, 54, 48, 93, 0, 42,104,
- 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109,101,115, 0,115,116,121,112,101,115, 0,118, 97,114,
-115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93,
- 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42,
- 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,
-109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93,
- 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119,115, 99, 97,108,101, 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,
-101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115,116,115,105,122,101, 0,110,111,105,115,101,115,105,
-122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,114, 97,115,116, 0,114,102, 97, 99, 0,103,
-102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,
-110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103,
- 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119,
- 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,
-105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,
-116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,
-108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,
-114,111,112,121,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0,101,120,116,101,110,100, 0, 99,
-104,101, 99,107,101,114,100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101,
- 0, 42,112,108,117,103,105,110, 0, 42, 99,111, 98, 97, 0, 42,101,110,118, 0,117,115,101, 95,110,111,100,101,115, 0,112, 97,
-100, 91, 55, 93, 0,108,111, 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110,
- 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101, 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,
-103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,
-115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42,
- 99,117,114,102, 97,108,108,111,102,102, 0,102, 97,108,108,111,102,102, 95,116,121,112,101, 0,115,104, 97,100,115,112,111,116,
-115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117,102,102,
-101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, 0,114,
- 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97,121, 95,
-115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, 0, 97,
-114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114,101,115,
-104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, 97,108,
-111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100,116,121,
-112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115,117,110,
- 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116,101,114,
-101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, 98,105,
-100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97,116,109,
- 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99,101, 95,
-102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114,101, 0,
-115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,112, 97,100, 52, 0, 89, 70, 95,110,117,109,112,104,111,116,111,110,
-115, 0, 89, 70, 95,110,117,109,115,101, 97,114, 99,104, 0, 89, 70, 95,112,104,100,101,112,116,104, 0, 89, 70, 95,117,115,101,
-113,109, 99, 0, 89, 70, 95, 98,117,102,115,105,122,101, 0, 89, 70, 95,112, 97,100, 0, 89, 70, 95, 99, 97,117,115,116,105, 99,
- 98,108,117,114, 0, 89, 70, 95,108,116,114, 97,100,105,117,115, 0, 89, 70, 95,103,108,111,119,105,110,116, 0, 89, 70, 95,103,
-108,111,119,111,102,115, 0, 89, 70, 95,103,108,111,119,116,121,112,101, 0, 89, 70, 95,112, 97,100, 50, 0, 42,109,116,101,120,
- 91, 49, 56, 93, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,
-112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109,
- 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,
-111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,
-115,108,117, 99,101,110, 99,121, 0,102,114,101,115,110,101,108, 95,109,105,114, 0,102,114,101,115,110,101,108, 95,109,105,114,
- 95,105, 0,102,114,101,115,110,101,108, 95,116,114, 97, 0,102,114,101,115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,
-116,101,114, 0,116,120, 95,108,105,109,105,116, 0,116,120, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,
-104, 0,114, 97,121, 95,100,101,112,116,104, 95,116,114, 97, 0,104, 97,114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,
-103,108,111,115,115, 95,109,105,114, 0,103,108,111,115,115, 95,116,114, 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,
-105,114, 0,115, 97,109,112, 95,103,108,111,115,115, 95,116,114, 97, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,
-105,114, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,116,114, 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,
-109,105,114, 0,100,105,115,116, 95,109,105,114, 0,102, 97,100,101,116,111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108,
- 97,103, 0,109,111,100,101, 95,108, 0,102,108, 97,114,101, 99, 0,115,116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,
-103, 99, 0,104, 97,115,105,122,101, 0,102,108, 97,114,101,115,105,122,101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,
-101, 98,111,111,115,116, 0,115,116,114, 97,110,100, 95,115,116, 97, 0,115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114,
- 97,110,100, 95,101, 97,115,101, 0,115,116,114, 97,110,100, 95,115,117,114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,
-105,110, 0,115,116,114, 97,110,100, 95,119,105,100,116,104,102, 97,100,101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,
-101, 91, 51, 50, 93, 0,115, 98,105, 97,115, 0,108, 98,105, 97,115, 0,115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,
-116,101,120, 0,114,103, 98,115,101,108, 0,112,114, 95,116,121,112,101, 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,
-109,112, 0,109,108, 95,102,108, 97,103, 0,100,105,102,102, 95,115,104, 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,
-101,114, 0,114,111,117,103,104,110,101,115,115, 0,114,101,102,114, 97, 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115,
- 0,100, 97,114,107,110,101,115,115, 0, 42,114, 97,109,112, 95, 99,111,108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114,
- 97,109,112,105,110, 95, 99,111,108, 0,114, 97,109,112,105,110, 95,115,112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95,
- 99,111,108, 0,114, 97,109,112, 98,108,101,110,100, 95,115,112,101, 99, 0,114, 97,109,112, 95,115,104,111,119, 0,112, 97,100,
- 51, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, 0,114, 97,109,112,102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,
-112, 0,102,114,105, 99,116,105,111,110, 0,102,104, 0,114,101,102,108,101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,
-114,105, 99,116, 0,100,121,110, 97,109,111,100,101, 0,115,115,115, 95,114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95,
- 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,114,111,114, 0,115,115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,
-111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, 0,115,115,115, 95,116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,
-110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,115,115, 95,102,108, 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0,
- 89, 70, 95, 97,114, 0, 89, 70, 95, 97,103, 0, 89, 70, 95, 97, 98, 0, 89, 70, 95,100,115, 99, 97,108,101, 0, 89, 70, 95,100,
-112,119,114, 0, 89, 70, 95,100,115,109,112, 0, 89, 70, 95,112,114,101,115,101,116, 0, 89, 70, 95,100,106,105,116, 0,103,112,
-117,109, 97,116,101,114,105, 97,108, 0,110, 97,109,101, 91, 50, 53, 54, 93, 0, 42, 98, 98, 0,105, 49, 0,106, 49, 0,107, 49,
- 0,105, 50, 0,106, 50, 0,107, 50, 0,115,101,108, 99,111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52,
- 93, 0,101,120,112,120, 0,101,120,112,121, 0,101,120,112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116,
- 0, 42,105,109, 97,116, 0,101,108,101,109,115, 0,100,105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109,
- 97,116, 0,116,111,116, 99,111,108, 0,119,105,114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,
-114,101,115,104, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,114, 97,100,105,117,
-115, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116,
- 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,
-100,101,114,117, 0,111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0,
- 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,
-112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,104, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0,
- 42, 98,101,118,111, 98,106, 0, 42,116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,
-112, 97,116,104, 0, 42,107,101,121, 0, 98,101,118, 0,112, 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,
-105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118,
- 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,116,115,101,108, 98,112, 0,115,112, 97, 99,101,109,111,100,101, 0,
-115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,
-100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,
-110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116,
- 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,
-116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,104, 97,114, 0,116,111,116, 98,111,120, 0, 97, 99,116, 98,111,
-120, 0, 42,116, 98, 0,115,101,108,115,116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105,110,102,111, 0, 99,
-117,114,105,110,102,111, 0,101,102,102,101, 99,116, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, 0, 42,116,102,
- 97, 99,101, 0, 42,109,118,101,114,116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99,111,108, 0, 42,
-109,115,116,105, 99,107,121, 0, 42,116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, 0, 42,101,100,105,
-116, 95,109,101,115,104, 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,116,111,116,101,100,103,101,
- 0,116,111,116,102, 97, 99,101, 0,116,111,116,115,101,108,101, 99,116, 0, 97, 99,116, 95,102, 97, 99,101, 0, 99,117, 98,101,
-109, 97,112,115,105,122,101, 0,100,114, 97,119,102,108, 97,103, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,100,
-105,118, 0,115,117, 98,100,105,118,114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0, 42,109,114, 0, 42,112,118, 0, 42,
-116,112, 97,103,101, 0,117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, 0,116,105,108,
-101, 0,117,110,119,114, 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, 99,114,101, 97,
-115,101, 0, 98,119,101,105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105,103,104,116, 0,
- 99,111, 91, 51, 93, 0,110,111, 91, 51, 93, 0,112, 97,100, 91, 51, 93, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,105,
-110,100,101,120, 0,102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0, 40, 42,100,105,115,112,115, 41,
- 40, 41, 0,118, 91, 52, 93, 0,109,105,100, 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,
-115, 0, 42,101,100,103,101,115, 0, 42,118,101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,
-110,116, 0, 99,117,114,114,101,110,116, 0,110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108,
- 0,114,101,110,100,101,114,108,118,108, 0,117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,
-101,100,103,101, 95, 99,114,101, 97,115,101,115, 0, 42,118,101,114,116, 95,109, 97,112, 0, 42,101,100,103,101, 95,109, 97,112,
- 0, 42,111,108,100, 95,102, 97, 99,101,115, 0, 42,111,108,100, 95,101,100,103,101,115, 0, 42,101,114,114,111,114, 0,109,111,
-100,105,102,105,101,114, 0,115,117, 98,100,105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,
-101,109, 67, 97, 99,104,101, 0, 42,109, 67, 97, 99,104,101, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108,
-101,110,103,116,104, 0,114, 97,110,100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116,
- 97,114,116, 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115,
-101,116, 95,111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100,
-105,115,116, 0,102,105,116, 95,116,121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97,
-120,105,115, 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97,
-110,103,108,101, 0,118, 97,108,117,101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97,
-103,115, 0,101, 95,102,108, 97,103,115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97,
-109,101, 91, 51, 50, 93, 0, 42,116,101,120,116,117,114,101, 0,115,116,114,101,110,103,116,104, 0,100,105,114,101, 99,116,105,
-111,110, 0,109,105,100,108,101,118,101,108, 0,116,101,120,109, 97,112,112,105,110,103, 0, 42,109, 97,112, 95,111, 98,106,101,
- 99,116, 0,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 51, 50, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0,
- 42,112,114,111,106,101, 99,116,111,114,115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101,
- 99,116,111,114,115, 0, 97,115,112,101, 99,116,120, 0, 97,115,112,101, 99,116,121, 0,112,101,114, 99,101,110,116, 0,102, 97,
- 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98,106,101, 99,116, 99,101,110,116,101,114,
- 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0,110, 97,114,114,111,119, 0,115,112,101,
-101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105,109,101,111,102,102,115, 0,108,105,102,101,116,105,109,
-101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114,101,118, 67,111,115, 0,112, 97,114,101,
-110,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,
-105,110,100,101,120, 0,102,111,114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,
-114,109,115, 0, 42, 99,111,108,108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0, 42,120, 0,
- 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,
-110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115,
- 0,110,117,109,102, 97, 99,101,115, 0, 97, 98,115,111,114,112,116,105,111,110, 0,116,105,109,101, 0, 42, 98,118,104,116,114,
-101,101, 0, 42,100,109, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,
-101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0,110,101,101,100, 98,105,110,100, 0, 42, 98,105,110,100,119,101,105,103,
-104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0,116,111,116, 99, 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,
-100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115, 0, 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50,
- 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110, 99,101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,
-108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,112,115,121,115, 0,116,111,116,100,
-109,118,101,114,116, 0,116,111,116,100,109,101,100,103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112,115,121,115, 0,114,
-116, 91, 50, 93, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0, 42,117,110,100,
-111, 95,118,101,114,116,115, 0,117,110,100,111, 95,118,101,114,116,115, 95,116,111,116, 0,117,110,100,111, 95,115,105,103,110,
- 97,108, 0,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116, 97,114,103,101,
-116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 51, 50, 93, 0,107,101,101,
-112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0,112,114,111,106,
- 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102, 97, 99,116,111,
-114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,112,110,116,115,119, 0,111,112,110,116,
-115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, 0,116,121,112,101,118, 0,116,121,112,
-101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,116,116,105,
- 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116, 0,118,101,
- 99, 91, 56, 93, 91, 51, 93, 0,112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112,
- 97,114,115,117, 98,115,116,114, 91, 51, 50, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,114,111,120,
-121, 95,103,114,111,117,112, 0, 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,112,111,115,
-101,108,105, 98, 0, 42,112,111,115,101, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115, 0,100,101,
-102, 98, 97,115,101, 0,109,111,100,105,102,105,101,114,115, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,
-100,115,105,122,101, 91, 51, 93, 0,100,114,111,116, 91, 51, 93, 0,111, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 99,111,110,
-115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0,108, 97,121, 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,
-103, 0,112,114,111,116,101, 99,116,102,108, 97,103, 0,116,114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,
-108, 97,102,108, 97,103, 0,105,112,111,102,108, 97,103, 0,105,112,111,119,105,110, 0,115, 99, 97,102,108, 97,103, 0,115, 99,
- 97,118,105,115,102,108, 97,103, 0, 98,111,117,110,100,116,121,112,101, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,
-100,117,112,115,116, 97, 0,100,117,112,101,110,100, 0,115,102, 0, 99,116,105,109,101, 0,109, 97,115,115, 0,100, 97,109,112,
-105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,116,111,114, 0,114,100, 97,109,112,105,110,103, 0,
-115,105,122,101,102, 97, 99, 0,109, 97,114,103,105,110, 0,109, 97,120, 95,118,101,108, 0,109,105,110, 95,118,101,108, 0,100,
-116, 0,100,116,120, 0, 97, 99,116, 99,111,108, 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,112, 97,100, 49,
- 91, 51, 93, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, 97, 0,112,114,
-111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97,116,111,114,115,
- 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, 97,109,101,102,
-108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114,111,112,105, 99,
- 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115,116,114,105,112,
-115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,112,100, 0, 42,115,111,102,116,
- 0, 42,100,117,112, 95,103,114,111,117,112, 0,102,108,117,105,100,115,105,109, 70,108, 97,103, 0,114,101,115,116,114,105, 99,
-116,102,108, 97,103, 0,115,104, 97,112,101,110,114, 0,115,104, 97,112,101,102,108, 97,103, 0,114,101, 99, 97,108, 99,111, 0,
- 98,111,100,121, 95,116,121,112,101, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114,
-105,118,101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116,
- 97, 77, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,112, 0, 99,
-117,114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105,101,108,
-100, 0,112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,101,114,109,
- 0,112,100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,102, 95,115,116,114,101,110,103,
-116,104, 0,102, 95,112,111,119,101,114, 0,102, 95,100,105,115,116, 0,102, 95,100, 97,109,112, 0,109, 97,120,100,105,115,116,
- 0,109,105,110,100,105,115,116, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,102, 95,112,111,119,101,114, 95,114,
- 0,112,100,101,102, 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,
-102,116, 0, 99,108,117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113,
- 0,107,105,110,107, 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,
-120, 95,110, 97, 98,108, 97, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105,115, 0,
-114,116, 50, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116,102,
-114, 97,109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108,105,110, 83,116,105,102,102,
- 0, 97,110,103, 83,116,105,102,102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,
-101,114, 97,116,105,111,110,115, 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115,
- 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95,
- 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,
-107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84,
- 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108,
- 97,103,115, 0,110,117,109, 99,108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0, 42,112, 97,114,116,105, 99,
-108,101,115, 0,116,111,116,112,111,105,110,116, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42,
- 98,115,112,114,105,110,103, 0,110,111,100,101,109, 97,115,115, 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116,
- 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,
-103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,
-111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103,
- 0,105,110,102,114,105, 99,116, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,
-118,101,114,102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,
-110,100,115,112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,
-105,102,102, 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109,
- 97,120,108,111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,
-115,112,114,105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,
-102, 0,105,110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,
-101,100,111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,
-101,115,120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,
-110,100,101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,
-105,115, 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,
-114, 97,118,120, 0,103,114, 97,118,121, 0,103,114, 97,118,122, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,
-110,100, 0,103,115,116, 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,
-108,121, 0,105,110,105, 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 83,117,114,102, 97, 99,101,
- 0, 42,109,101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 50, 52, 48, 93, 0, 98, 98, 83,116, 97,
-114,116, 91, 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110,
- 78,111,118,101, 99,103,101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112,
- 86, 97,108,117,101, 0,103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,
-114,116,105, 99,108,101,115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101,
- 83,117, 98,100,105,118,115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101,
- 73,110,102, 65,108,112,104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,104, 83,117,114,102, 78,
-111,114,109, 97,108,115, 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,
-112,115, 81,117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,
-116,116,114, 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,
-116,114,101,110,103,116,104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,
-103,111,111,100,102,114, 97,109,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98,
- 0,104,111,114,107, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,122,101,110,107, 0, 97,109, 98,107, 0,102,
- 97,115,116, 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99,
- 0,108,111,103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,
-115, 0,115,107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,
-103,105,110,101, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116,100,105,115,116, 0,109,105,115,116,104,
-105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, 97,114,107, 0,115,116, 97,114,115,105,
-122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115,116, 0,115,116, 97,114, 99,111,108,110,
-111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102,109,105,110, 0,100,111,102,109, 97,120,
- 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110,101,114,103,121, 0, 97,111, 98,105, 97,
-115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, 97,111, 99,111,108,111,114, 0, 97,111,
- 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, 95,115,112,101,101,100, 95,102, 97, 99,
- 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112,112,114,111,120, 95, 99,111,114,114,101,
- 99,116,105,111,110, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97,111, 95,103, 97,116,104,101,114, 95,109,
-101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, 0, 42, 97,111,115,112,104,101,114,101,
- 0, 42, 97,111,116, 97, 98,108,101,115, 0,104,101,109,105,114,101,115, 0,109, 97,120,105,116,101,114, 0,100,114, 97,119,116,
-121,112,101, 0,115,117, 98,115,104,111,111,116,112, 0,115,117, 98,115,104,111,111,116,101, 0,110,111,100,101,108,105,109, 0,
-109, 97,120,115,117, 98,108, 97,109,112, 0,112, 97,109, 97, 0,112, 97,109,105, 0,101,108,109, 97, 0,101,108,109,105, 0,109,
- 97,120,110,111,100,101, 0, 99,111,110,118,101,114,103,101,110, 99,101, 0,114, 97,100,102, 97, 99, 0,103, 97,109,109, 97, 0,
-115,101,108, 99,111,108, 0,115,120, 0,115,121, 0, 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0,
- 99, 98, 70,111,114,109, 97,116, 0, 99, 98, 80, 97,114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,
-108,101,114, 0,100,119, 75,101,121, 70,114, 97,109,101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119,
- 66,121,116,101,115, 80,101,114, 83,101, 99,111,110,100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101,
- 97,118,101, 69,118,101,114,121, 0, 97,118,105, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,
-114,109,115, 0, 42,112, 97,100, 0, 99,100, 83,105,122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93,
- 0, 99,111,100,101, 99, 0, 97,117,100,105,111, 95, 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101,
- 0, 97,117,100,105,111, 95, 98,105,116,114, 97,116,101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114,
- 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,
-117,120, 95,112, 97, 99,107,101,116, 95,115,105,122,101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,
-109, 97,105,110, 0, 42,109, 97,116, 95,111,118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,
-100,101, 0,108, 97,121, 95,122,109, 97,115,107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,
-115,115, 95,120,111,114, 0, 42, 97,118,105, 99,111,100,101, 99,100, 97,116, 97, 0, 42,113,116, 99,111,100,101, 99,100, 97,116,
- 97, 0,102,102, 99,111,100,101, 99,100, 97,116, 97, 0, 97,117,100,105,111, 0, 99,102,114, 97, 0,112,115,102,114, 97, 0,112,
-101,102,114, 97, 0,105,109, 97,103,101,115, 0,102,114, 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,
-109,101,108,101,110, 0, 98,108,117,114,102, 97, 99, 0,101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,
-102,117,108,108,115, 99,114,101,101,110, 0,120,112,108, 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0,
- 97,116,116,114,105, 98, 0,114,116, 49, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,115,
-112,114,101,115,101,116, 0,109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,116,
-115, 0,121,112, 97,114,116,115, 0,119,105,110,112,111,115, 0,112,108, 97,110,101,115, 0,105,109,116,121,112,101, 0,115,117,
- 98,105,109,116,121,112,101, 0,113,117, 97,108,105,116,121, 0,114,112, 97,100, 0,114,112, 97,100, 49, 0,114,112, 97,100, 50,
- 0,115, 99,101,109,111,100,101, 0,114,101,110,100,101,114,101,114, 0,111, 99,114,101,115, 0, 97,108,112,104, 97,109,111,100,
-101, 0,111,115, 97, 0,102,114,115, 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,
-100,101,114, 0,100,105,115,112,114,101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,120, 97,115,112, 0,
-121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115,101, 0,103, 97,117,115,115, 0,112,111,115,116,109,117,108, 0,
-112,111,115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114,
- 95,105,110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0,
- 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,
-115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,
-115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0, 71, 73,113,117, 97,108,
-105,116,121, 0, 71, 73, 99, 97, 99,104,101, 0, 71, 73,109,101,116,104,111,100, 0, 71, 73,112,104,111,116,111,110,115, 0, 71,
- 73,100,105,114,101, 99,116, 0, 89, 70, 95, 65, 65, 0, 89, 70,101,120,112,111,114,116,120,109,108, 0, 89, 70, 95,110,111, 98,
-117,109,112, 0, 89, 70, 95, 99,108, 97,109,112,114,103, 98, 0,121,102,112, 97,100, 49, 0, 71, 73,100,101,112,116,104, 0, 71,
- 73, 99, 97,117,115,100,101,112,116,104, 0, 71, 73,112,105,120,101,108,115,112,101,114,115, 97,109,112,108,101, 0, 71, 73,112,
-104,111,116,111,110, 99,111,117,110,116, 0, 71, 73,109,105,120,112,104,111,116,111,110,115, 0, 71, 73,112,104,111,116,111,110,
-114, 97,100,105,117,115, 0, 89, 70, 95,114, 97,121,100,101,112,116,104, 0, 89, 70, 95, 65, 65,112, 97,115,115,101,115, 0, 89,
- 70, 95, 65, 65,115, 97,109,112,108,101,115, 0,121,102,112, 97,100, 50, 0, 71, 73,115,104, 97,100,111,119,113,117, 97,108,105,
-116,121, 0, 71, 73,114,101,102,105,110,101,109,101,110,116, 0, 71, 73,112,111,119,101,114, 0, 71, 73,105,110,100,105,114,112,
-111,119,101,114, 0, 89, 70, 95,103, 97,109,109, 97, 0, 89, 70, 95,101,120,112,111,115,117,114,101, 0, 89, 70, 95,114, 97,121,
- 98,105, 97,115, 0, 89, 70, 95, 65, 65,112,105,120,101,108,115,105,122,101, 0, 89, 70, 95, 65, 65,116,104,114,101,115,104,111,
-108,100, 0, 98, 97, 99,107, 98,117,102, 91, 49, 54, 48, 93, 0,112,105, 99, 91, 49, 54, 48, 93, 0,115,116, 97,109,112, 0,115,
-116, 97,109,112, 95,102,111,110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 49, 54, 48, 93, 0,102,103,
- 95,115,116, 97,109,112, 91, 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,105,109,112,108,105,102,121, 95,115,
-117, 98,115,117,114,102, 0,115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,
-109,112,108,105,102,121, 95,112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0,
- 99,105,110,101,111,110,119,104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,
-109,109, 97, 0,106,112, 50, 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,
-111,109,101,114,101,115, 0,100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,112, 97,100, 57, 0,100,
-111,109,101,115,105,122,101, 0,100,111,109,101,114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,112, 97,114,
-116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, 97,
-109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0, 99,111,108, 91, 51, 93, 0,102,114, 97,109,101, 0,110,
- 97,109,101, 91, 54, 52, 93, 0, 42, 98,114,117,115,104, 0,116,111,111,108, 0,115,101, 97,109, 95, 98,108,101,101,100, 0,110,
-111,114,109, 97,108, 95, 97,110,103,108,101, 0, 42,112, 97,105,110,116, 99,117,114,115,111,114, 0,115,116,101,112, 0,105,110,
-118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116,111,116, 97,100,100,107,101,121, 0, 98,114,117,115,104,116,121,112,
-101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115,116, 0,100,114, 97,119, 95,116,105,109,101,
-100, 0,110, 97,109,101, 91, 51, 54, 93, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0, 42,115,101,115,115,105,111,110, 0,112,105,
-118,111,116, 91, 51, 93, 0,116,101,120,115,101,112, 0,116, 97, 98,108,101,116, 95,115,105,122,101, 0,116, 97, 98,108,101,116,
- 95,115,116,114,101,110,103,116,104, 0,112, 97,100, 91, 53, 93, 0,109,117,108, 0, 42,118,112, 97,105,110,116, 95,112,114,101,
-118, 0, 42,119,112, 97,105,110,116, 95,112,114,101,118, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0, 42,
-115, 99,117,108,112,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105,116, 98,117,116,102,108, 97,103, 0,106,111,
-105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114, 95,111,102,102,115, 0,100,
-111,117, 98,108,105,109,105,116, 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115,
- 0,117,110,119,114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95,
- 99,117, 98,101,115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,
-112,100,105,114, 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103,
- 0,117,118, 95,102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,112, 97,100, 91, 50, 93,
- 0, 97,117,116,111,105,107, 95, 99,104, 97,105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,
-108,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,
-115,104, 0, 99,108,101, 97,110, 95,116,104,114,101,115,104, 0,114,101,116,111,112,111, 95,109,111,100,101, 0,114,101,116,111,
-112,111, 95,112, 97,105,110,116, 95,116,111,111,108, 0,108,105,110,101, 95,100,105,118, 0,101,108,108,105,112,115,101, 95,100,
-105,118, 0,114,101,116,111,112,111, 95,104,111,116,115,112,111,116, 0,109,117,108,116,105,114,101,115, 95,115,117, 98,100,105,
-118, 95,116,121,112,101, 0,115,107,103,101,110, 95,114,101,115,111,108,117,116,105,111,110, 0,115,107,103,101,110, 95,116,104,
-114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100,
- 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103,
-101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105,
-116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,116,105,111,110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,
-115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110,
-103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,108,101,110,103,116,104,
- 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95,
-119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,112,111,115,116,112,
-114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 95,112, 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117,
- 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,107,103,101,110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0,
-115,107,103,101,110, 95,112, 97,100, 0, 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101, 0, 98,111,110,101, 95,115,
-107,101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,111,110,118,101,114,116, 0,
-115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,115,107,103,101,110, 95,114,
-101,116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,114,
-111,108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,115,107,103,101,110, 95,110,
-117,109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,112, 97,100, 51, 91, 50, 93, 0,116,
-111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111,116,111, 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101,
- 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97,116,117,114,101, 0, 42, 99, 97,109,101,114, 97, 0, 42,119,111,
-114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, 42,111, 98,101,100,105,116, 0, 99,117,
-114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105,110, 91, 51, 93, 0,116,119,109, 97,120,
- 91, 51, 93, 0,101,100,105,116, 98,117,116,115,105,122,101, 0,115,101,108,101, 99,116,109,111,100,101, 0,112,114,111,112,111,
-114,116,105,111,110, 97,108, 0,112,114,111,112, 95,109,111,100,101, 0, 97,117,116,111,109,101,114,103,101, 0,112, 97,100, 53,
- 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 42,101,100, 0, 42,114, 97,100,105,111, 0,102,114, 97,109,105,110,103,
- 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0,116,114, 97,110,115,102,111,114,109, 95,
-115,112, 97, 99,101,115, 0,106,117,109,112,102,114, 97,109,101, 0,115,110, 97,112, 95,109,111,100,101, 0,115,110, 97,112, 95,
-102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0, 42,116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,
-108,105,100, 0,100, 97,103,102,108, 97,103,115, 0,102,114, 97,109,101, 95,115,116,101,112, 0, 97, 99,116,105,118,101, 95,107,
-101,121,105,110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0,122,111,111,109, 0, 98,108,101,110,100, 0,120,
-105,109, 0,121,105,109, 0,119,105,110,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52,
- 93, 0,118,105,101,119,105,110,118, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,
-114,115,105,110,118, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,
-109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,
-100,120, 0, 99, 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,118,105,101,119, 98,117,116,
- 0,108, 97,115,116,109,111,100,101, 0,114,102,108, 97,103, 0,118,105,101,119,108,111, 99,107, 0,112,101,114,115,112, 0,118,
-105,101,119, 0, 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 42, 99,108,105,112, 98, 98, 0, 42,103,112,100, 0, 42,108,111, 99,
- 97,108,118,100, 0, 42,114,105, 0, 42,114,101,116,111,112,111, 95,118,105,101,119, 95,100, 97,116, 97, 0, 42,100,101,112,116,
-104,115, 0, 42,115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,108,118,105,101,119,113,117, 97,116, 91,
- 52, 93, 0,108,112,101,114,115,112, 0,108,118,105,101,119, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,
-116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97,108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0,
-108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,114,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,
-110,116,114,101, 95, 98,111,110,101, 91, 51, 50, 93, 0,108, 97,121, 97, 99,116, 0,108,111, 99, 97,108,118,105,101,119, 0,115,
- 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,102,108, 97,103, 50, 0,112,105,118,111,116, 95,108, 97,115,116,
- 0,103,114,105,100, 0,103,114,105,100,118,105,101,119, 0,112, 97,100,102, 0,110,101, 97,114, 0,102, 97,114, 0,103,114,105,
-100,108,105,110,101,115, 0,103,114,105,100,102,108, 97,103, 0,103,114,105,100,115,117, 98,100,105,118, 0,109,111,100,101,115,
-101,108,101, 99,116, 0,107,101,121,102,108, 97,103,115, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119,102,
-108, 97,103, 0,116,119,100,114, 97,119,102,108, 97,103, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0, 97,
-102,116,101,114,100,114, 97,119, 0,122, 98,117,102, 0,120,114, 97,121, 0,110,100,111,102,109,111,100,101, 0,110,100,111,102,
-102,105,108,116,101,114, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,118,101,114,116, 0,
-104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,111,111,109, 0,109,
- 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,112,116,111,116, 0,
-107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120, 0,119,105,110,121,
- 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 42,115, 99,114,101,
-101,110, 0,118, 50,100, 0, 42, 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112,
- 0,112,105,110, 0,108,111, 99,107, 0, 99,117,114,115,101,110,115, 0, 99,117,114, 97, 99,116, 0,116, 97, 98,111, 0,109, 97,
-105,110, 98, 0,109, 97,105,110, 98,111, 0, 42,108,111, 99,107,112,111,105,110, 0,116,101,120,110,114, 0,116,101,120,102,114,
-111,109, 0,115,104,111,119,103,114,111,117,112, 0,109,111,100,101,108,116,121,112,101, 0,115, 99,114,105,112,116, 98,108,111,
- 99,107, 0,114,101, 95, 97,108,105,103,110, 0,111,108,100,107,101,121,112,114,101,115,115, 0,116, 97, 98, 91, 56, 93, 0, 99,
-104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115, 0, 42,111,
-112, 0, 42,108,111, 97,100,105,109, 97,103,101, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116, 0,116,114,101,101, 0,
- 42,116,114,101,101,115,116,111,114,101, 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,
-114, 99,104, 95,116,115,101, 0,115,101, 97,114, 99,104, 95,102,108, 97,103,115, 0,100,111, 95, 0,111,117,116,108,105,110,101,
-118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0, 42, 99,117,109, 97,112, 0,105,109, 97,110,114, 0, 99,117,114,116,105,
-108,101, 0,105,109,116,121,112,101,110,114, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0,100,116, 95,117,118,115,116,
-114,101,116, 99,104, 0, 99,101,110,116,120, 0, 99,101,110,116,121, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,
-108,105,110,101,115, 0,108,104,101,105,103,104,116, 0,108,101,102,116, 0,115,104,111,119,108,105,110,101,110,114,115, 0,116,
- 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,110,116, 97,120, 0,111,118,101,114,119,114,105,116,101, 0,112,105,
-120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0,116,120,116, 98, 97,114, 0,119,111,114,100,
-119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116,114, 91, 50, 53, 54, 93, 0,114,101,112,108,
- 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101,110,116, 0, 42,
-112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99,107, 0, 42,112,
-121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112,116,110, 97,109,
-101, 91, 50, 53, 54, 93, 0,115, 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105,112,116, 0, 42, 98,
-117,116, 95,114,101,102,115, 0,114,101,100,114, 97,119,115, 0, 42,105,100, 0, 97,115,112,101, 99,116, 0, 42, 99,117,114,102,
-111,110,116, 0,109,120, 0,109,121, 0, 42,101,100,105,116,116,114,101,101, 0,116,114,101,101,116,121,112,101, 0,116,105,116,
-108,101, 91, 50, 52, 93, 0,100,105,114, 91, 50, 52, 48, 93, 0,102,105,108,101, 91, 56, 48, 93, 0,109,101,110,117, 0,115,111,
-114,116, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,110,117,109,116,105,108,101,115,120, 0,110,117,109,116,105,108,101,
-115,121, 0,115,101,108,115,116, 97,116,101, 0,118,105,101,119,114,101, 99,116, 0, 98,111,111,107,109, 97,114,107,114,101, 99,
-116, 0,115, 99,114,111,108,108,112,111,115, 0,115, 99,114,111,108,108,104,101,105,103,104,116, 0,115, 99,114,111,108,108, 97,
-114,101, 97, 0,114,101,116,118, 97,108, 0, 97, 99,116,105,118,101, 95, 98,111,111,107,109, 97,114,107, 0,112,114,118, 95,119,
- 0,112,114,118, 95,104, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 41, 40, 41, 0, 40, 42,114,101,116,117,114,110,102,
-117,110, 99, 95,101,118,101,110,116, 41, 40, 41, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 95, 97,114,103,115, 41, 40,
- 41, 0, 42, 97,114,103, 49, 0, 42, 97,114,103, 50, 0, 42,109,101,110,117,112, 0, 42,112,117,112,109,101,110,117, 0, 42,105,
-109,103, 0,102,105,108,101,110, 97,109,101, 91, 50, 53, 54, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,111,110,116, 95,105,
-100, 0,114, 95,116,111, 95,108, 0,112,111,105,110,116,115, 0,105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115,104, 97,100,
-111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,111,119, 97,108,112,104, 97, 0,115,104, 97,100,111,
-119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,114,111,117,112,108, 97, 98,101,108, 0,119,105,100,
-103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,109,105,110,108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,
-110,119,105,100,103,101,116, 99,104, 97,114,115, 0, 99,111,108,117,109,110,115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,
-101,115,112, 97, 99,101, 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116,116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,
-116,111,110,115,112, 97, 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99,101, 0,112, 97,110,101,108,111,117,116,101,114, 0,
-111,117,116,108,105,110,101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93,
- 0,105,116,101,109, 91, 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,
-100,101,100, 0,115,104, 97,100,101,116,111,112, 0,115,104, 97,100,101,100,111,119,110, 0,119, 99,111,108, 95,114,101,103,117,
-108, 97,114, 0,119, 99,111,108, 95,116,111,111,108, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, 99,111,108, 95,116,101,
-120,116, 0,119, 99,111,108, 95,111,112,116,105,111,110, 0,119, 99,111,108, 95,110,117,109, 0,119, 99,111,108, 95,110,117,109,
-115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117,108,108,100,111,119,110, 0,119,
- 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95,105,116,101,109, 0,105, 99,111,
-110,102,105,108,101, 91, 56, 48, 93, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93, 0,116,101,120,116, 95,
-104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, 93, 0,
-104,101, 97,100,101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, 52, 93,
- 0, 98,117,116,116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,116,111,
-110, 95,116,101,120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,115,116,
- 91, 52, 93, 0,108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, 0,108,
-105,115,116, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,116,105,
-116,108,101, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 95,
-104,105, 91, 52, 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,116,101,
- 91, 52, 93, 0,103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,108, 97,
-109,112, 91, 52, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112, 95, 97,
- 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52, 93, 0,
-118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,115,101,
-108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,112, 91,
- 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,
-115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,111,116, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0,
- 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114,105,112,
- 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,100,115,
- 95, 99,104, 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0,118,101,114,
-116,101,120, 95,115,105,122,101, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, 0, 98,112, 97,100, 91, 50, 93, 0,115,121,
-110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116, 97,120, 98, 91, 52, 93, 0,115,
-121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,105,101, 91, 52, 93, 0,105,109,
- 97,103,101, 91, 52, 93, 0,115, 99,101,110,101, 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91,
- 52, 93, 0,112,108,117,103,105,110, 91, 52, 93, 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91,
- 52, 93, 0,101,100,105,116,109,101,115,104, 95, 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,
-116,101,120, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104,
- 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,105,122,101, 0,104,112, 97,100, 91, 51, 93, 0,115,111,108,105,100, 91,
- 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, 0,116,102,105,108,101, 0,116,105,112,111, 0,116,105,110,
-102,111, 0,116,115,110,100, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, 0,116,105,109, 97, 0,116,105,109, 97,
-115,101,108, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116, 97,114,109, 91,
- 50, 48, 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,
-112,100,105,114, 91, 49, 54, 48, 93, 0,102,111,110,116,100,105,114, 91, 49, 54, 48, 93, 0,114,101,110,100,101,114,100,105,114,
- 91, 49, 54, 48, 93, 0,116,101,120,116,117,100,105,114, 91, 49, 54, 48, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 49,
- 54, 48, 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 49, 54, 48, 93, 0,112,121,116,104,111,110,100,105,114, 91, 49, 54,
- 48, 93, 0,115,111,117,110,100,100,105,114, 91, 49, 54, 48, 93, 0,121,102,101,120,112,111,114,116,100,105,114, 91, 49, 54, 48,
- 93, 0,118,101,114,115,105,111,110,115, 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,
-114,111,108,108, 0,117,105,102,108, 97,103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,
-101,119,122,111,111,109, 0,109,105,120, 98,117,102,115,105,122,101, 0,100,112,105, 0,101,110, 99,111,100,105,110,103, 0,116,
-114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101,110,117,116,104,114,101,
-115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116,121,108,101,115, 0,117,
-110,100,111,115,116,101,112,115, 0,117,110,100,111,109,101,109,111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,
-100,105,115,116, 0,103,112, 95,101,117, 99,108,105,100,101, 97,110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,
-103,112, 95,115,101,116,116,105,110,103,115, 0,116, 98, 95,108,101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,
-116,109,111,117,115,101, 0,108,105,103,104,116, 91, 51, 93, 0,116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108,
- 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,105,122,101, 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,
-111,117,116, 0,116,101,120, 99,111,108,108,101, 99,116,114, 97,116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,
-119,109,112, 97,100, 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,
-101,115, 0,102,114, 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101,
- 0,111, 98, 99,101,110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,
-114,101, 99,101,110,116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,
-108,105,109,105,116, 0,110,100,111,102, 95,112, 97,110, 0,110,100,111,102, 95,114,111,116, 97,116,101, 0, 99,117,114,115,115,
-105,122,101, 0,105,112,111, 95,110,101,119, 0,118,101,114,115,101,109, 97,115,116,101,114, 91, 49, 54, 48, 93, 0,118,101,114,
-115,101,117,115,101,114, 91, 49, 54, 48, 93, 0,103,108, 97,108,112,104, 97, 99,108,105,112, 0, 97,117,116,111,107,101,121, 95,
-102,108, 97,103, 0, 99,111, 98, 97, 95,119,101,105,103,104,116, 0,118,101,114,116, 98, 97,115,101, 0,101,100,103,101, 98, 97,
-115,101, 0, 97,114,101, 97, 98, 97,115,101, 0,102,117,108,108, 0,119,105,110,105,100, 0,100,111, 95,100,114, 97,119, 0,100,
-111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117,114,101, 0,100,111, 95,100,114, 97,
-119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,115,119, 97,112, 0,109, 97,105,110,119,105,110, 0,115,117, 98,119,105,
-110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0, 42, 99,111,110,116,101,120,116, 0,104, 97,110,100,
-108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118, 49, 0, 42,118, 50, 0, 42,116,121,112,101, 0,112,
- 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,101, 91, 54, 52, 93, 0,100,114, 97,119,110, 97,109,
-101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122,101,120, 0,115,105,122,101,121, 0,108, 97, 98,101,
-108,111,102,115, 0,114,117,110,116,105,109,101, 95,102,108, 97,103, 0, 99,111,110,116,114,111,108, 0,115,110, 97,112, 0,115,
-111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,116,105,118,101,100, 97,116, 97, 0, 42,
-118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115,112, 97, 99,101,116,121,112,101, 0,104,101, 97,100,101,114,
-116,121,112,101, 0, 99,117,114,115,111,114, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110,100,108,101,114,115, 0, 97,
- 99,116,105,111,110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, 0,115,119,105,110,105,100,
- 0,114,101,103,105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,117,105, 98,108,111, 99,107,115, 0,112,
- 97,110,101,108,115, 0, 42,104,101, 97,100,101,114,115,116,114, 0, 42,114,101,103,105,111,110,100, 97,116, 97, 0,115,117, 98,
-118,115,116,114, 91, 52, 93, 0,115,117, 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0,109,105,110,118,101,114,115,105,
-111,110, 0,109,105,110,115,117, 98,118,101,114,115,105,111,110, 0,100,105,115,112,108, 97,121,109,111,100,101, 0, 42, 99,117,
-114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,105,108,101,102,108, 97,103,115, 0,103,108,111, 98,
- 97,108,102, 0,110, 97,109,101, 91, 56, 48, 93, 0, 42,105, 98,117,102, 0, 42,105, 98,117,102, 95, 99,111,109,112, 0, 42,115,
-101, 49, 0, 42,115,101, 50, 0, 42,115,101, 51, 0,110,114, 0, 98,111,116,116,111,109, 0,114,105,103,104,116, 0,120,111,102,
-115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,
-115, 97,116,117,114, 97,116,105,111,110, 0,100,105,114, 91, 49, 54, 48, 93, 0,100,111,110,101, 0,115,116, 97,114,116,115,116,
-105,108,108, 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0,111,114,120, 0,111,114,121, 0,
- 42, 99,114,111,112, 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0,
- 42,116,115,116,114,105,112,100, 97,116, 97, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 95,115,116, 97,114,116,115,116,105,
-108,108, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 95,101,110,100,115,116,105,108,108, 0, 42,105, 98,117,102, 95,115,116,
- 97,114,116,115,116,105,108,108, 0, 42,105, 98,117,102, 95,101,110,100,115,116,105,108,108, 0, 42,105,110,115,116, 97,110, 99,
-101, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,112,114,105,118, 97,116,101,
- 95,100, 97,116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,
-110,101, 0,115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,104, 97,110,100,115,105,122,101, 0, 97,110,
-105,109, 95,112,114,101,115,101,101,107, 0, 42,115,116,114,105,112, 0,102, 97, 99,102, 48, 0,102, 97, 99,102, 49, 0, 42,115,
-101,113, 49, 0, 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,
-104,100, 97,117,100,105,111, 0,108,101,118,101,108, 0,112, 97,110, 0, 99,117,114,112,111,115, 0,115,116,114,111, 98,101, 0,
- 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, 97,114,116,111,102,115, 0, 97,110,105,109, 95,101,
-110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,101,110,100, 95,111,112, 97, 99,105,116,121, 0,115,
- 99,101,110,101,110,114, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,101,113, 98, 97,115,
-101,112, 0,109,101,116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,109, 97,103,101,100,
-105,114, 91, 50, 53, 54, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 50, 53, 54, 93, 0,101,100,103,101, 87,105,
-100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101,116,121,112,101, 0,102, 77,105,110,105, 0,102, 67,108, 97,109,
-112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78,111, 67,111,109,112, 0,
- 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121, 73,110,105, 0, 83, 99, 97,108,101,120, 70,105,110, 0, 83, 99,
- 97,108,101,121, 70,105,110, 0,120, 73,110,105, 0,120, 70,105,110, 0,121, 73,110,105, 0,121, 70,105,110, 0,114,111,116, 73,
-110,105, 0,114,111,116, 70,105,110, 0,105,110,116,101,114,112,111,108, 97,116,105,111,110, 0, 42,102,114, 97,109,101, 77, 97,
-112, 0,103,108,111, 98, 97,108, 83,112,101,101,100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,
-116,121,112,101, 0,117,115,101,114,106,105,116, 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99,
- 0,111, 98,102, 97, 99, 0,114, 97,110,100,102, 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,
-111,114, 99,101, 91, 51, 93, 0,118,101, 99,116,115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51,
- 93, 0,109,117,108,116, 91, 52, 93, 0,108,105,102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52,
- 93, 0,116,101,120,109, 97,112, 0, 99,117,114,109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116,
- 0,116,105,109,101,116,101,120, 0,115,112,101,101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,
-114,111,117,112, 95,118, 0,118,103,114,111,117,112,110, 97,109,101, 91, 51, 50, 93, 0,118,103,114,111,117,112,110, 97,109,101,
- 95,118, 91, 51, 50, 93, 0, 42,107,101,121,115, 0,109,105,110,102, 97, 99, 0,117,115,101,100, 0,117,115,101,100,101,108,101,
-109, 0,111,116,121,112,101, 0,111,108,100, 0, 42,112,111,105,110, 0, 42,111,108,100,112,111,105,110, 0,114,101,115,101,116,
-100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, 0,113,117, 97,108, 50, 0,
-116, 97,114,103,101,116, 78, 97,109,101, 91, 51, 50, 93, 0,116,111,103,103,108,101, 78, 97,109,101, 91, 51, 50, 93, 0,118, 97,
-108,117,101, 91, 51, 50, 93, 0,109, 97,120,118, 97,108,117,101, 91, 51, 50, 93, 0,100,101,108, 97,121, 0,100,117,114, 97,116,
-105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 51, 50, 93, 0,100, 97,109,112,116,105,109,101,114, 0,112,
-114,111,112,110, 97,109,101, 91, 51, 50, 93, 0,109, 97,116,110, 97,109,101, 91, 51, 50, 93, 0, 97,120,105,115,102,108, 97,103,
- 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 51, 50, 93, 0, 98,111,100,121, 91, 51, 50,
- 93, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,115, 0, 42, 42,108,105,110,107,115, 0,106,111,
-121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,
-104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0, 42,109,121,110,
-101,119, 0,105,110,112,117,116,115, 0,116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,
-111, 0,115,116, 97,116,101, 95,109, 97,115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 51, 50, 93, 0,
- 98,108,101,110,100,105,110, 0,112,114,105,111,114,105,116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,
-101, 97,120,105,115, 0,115,116,114,105,100,101,108,101,110,103,116,104, 0,115,110,100,110,114, 0,112, 97,100, 49, 91, 50, 93,
- 0,109, 97,107,101, 99,111,112,121, 0, 99,111,112,121,109, 97,100,101, 0,112, 97,100, 50, 91, 49, 93, 0,116,114, 97, 99,107,
- 0, 42,109,101, 0,108,105,110, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91,
- 51, 93, 0,108,111, 99, 97,108,102,108, 97,103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,
-108,111, 99, 91, 51, 93, 0,102,111,114, 99,101,114,111,116, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,105,116,
-121, 91, 51, 93, 0, 97,110,103,117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 98,117,116,115,116, 97, 0, 98,
+ 68, 78, 65, 49,176,206, 0, 0, 48,121,237, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69,
+ 49, 10, 0, 0, 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,
+115,116, 0,120, 0,121, 0,122, 0,119, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,
+112,111,105,110,116,101,114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,
+121,112,101, 0,102,108, 97,103, 0,110, 97,109,101, 91, 51, 50, 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110,
+ 0,116,111,116, 97,108,108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, 91, 50, 52, 93, 0,117,
+115, 0,105, 99,111,110, 95,105,100, 0, 42,112,114,111,112,101,114,116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,
+107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91, 50, 52, 48, 93, 0,102,105,108,101,110, 97,109,101, 91, 50,
+ 52, 48, 93, 0,116,111,116, 0,112, 97,100, 0, 42,112, 97,114,101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104,
+ 97,110,103,101,100, 91, 50, 93, 0,112, 97,100, 48, 0,112, 97,100, 49, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0,
+ 98,108,111, 99,107,116,121,112,101, 0, 97,100,114, 99,111,100,101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0,
+ 42, 98,101,122,116, 0,109, 97,120,114, 99,116, 0,116,111,116,114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,
+101,114,116, 0,105,112,111, 0,101,120,116,114, 97,112, 0,114,116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,
+109,105,110, 0,115,108,105,100,101, 95,109, 97,120, 0, 99,117,114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,
+118,101, 0, 99,117,114, 0,115,104,111,119,107,101,121, 0,109,117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,
+105,118,101, 0,116,111,116,101,108,101,109, 0,112, 97,100, 50, 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112,
+ 91, 51, 50, 93, 0,115,108,105,100,101,114,109,105,110, 0,115,108,105,100,101,114,109, 97,120, 0, 42, 97,100,116, 0, 42,114,
+101,102,107,101,121, 0,101,108,101,109,115,116,114, 91, 51, 50, 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107,
+ 0, 42,105,112,111, 0, 42,102,114,111,109, 0,116,111,116,107,101,121, 0,115,108,117,114,112,104, 0, 42, 42,115, 99,114,105,
+112,116,115, 0, 42,102,108, 97,103, 0, 97, 99,116,115, 99,114,105,112,116, 0,116,111,116,115, 99,114,105,112,116, 0, 42,108,
+105,110,101, 0, 42,102,111,114,109, 97,116, 0, 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,
+100, 0,102,108, 97,103,115, 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,
+105,110,101,115, 0,108,105,110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,115,101,108, 99,
+ 0,109, 97,114,107,101,114,115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,117,110,100,111,
+ 95,108,101,110, 0, 42, 99,111,109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,101,107, 0,112,
+ 97,115,115,101,112, 97,114,116, 97,108,112,104, 97, 0, 97,110,103,108,101, 0, 99,108,105,112,115,116, 97, 0, 99,108,105,112,
+101,110,100, 0,108,101,110,115, 0,111,114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,115,104,
+105,102,116,120, 0,115,104,105,102,116,121, 0, 89, 70, 95,100,111,102,100,105,115,116, 0, 89, 70, 95, 97,112,101,114,116,117,
+114,101, 0, 89, 70, 95, 98,107,104,116,121,112,101, 0, 89, 70, 95, 98,107,104, 98,105, 97,115, 0, 89, 70, 95, 98,107,104,114,
+111,116, 0,115, 99,114,105,112,116,108,105,110,107, 0, 42,100,111,102, 95,111, 98, 0,102,114, 97,109,101,110,114, 0,102,114,
+ 97,109,101,115, 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, 97, 0, 99,121, 99,108, 0,111,107,
+ 0,109,117,108,116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, 0,109,101,110,117,110,114, 0, 42,
+115, 99,101,110,101, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, 42, 97,110,105,109, 0, 42,114,
+114, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103,101,102,108, 97,103, 0,116,111,116,
+ 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119,101,110,100, 0, 98,105,110,100, 99,
+111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108,101, 0, 42,112,114,101,118,105,101,
+119, 0, 42,114,101,110,100,101,114, 95,116,101,120,116, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97,115,116,117,115,
+101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110, 95,116,121,112,
+101, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, 97,112,116,111, 0,109, 97,112,116,111,110,101,103,
+ 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, 42,116,101,120, 0,117,118,110, 97,109,101, 91, 51,
+ 50, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,122, 0,109, 97,112,112,105,110,103, 0,111,102,115,
+ 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,116,101,120,102,108, 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0,112,
+109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,
+104, 95,111,117,116,112,117,116, 0,112, 97,100, 91, 50, 93, 0,114, 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0,
+ 99,111,108,102, 97, 99, 0,110,111,114,102, 97, 99, 0,118, 97,114,102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,
+112,102, 97, 99, 0,110, 97,109,101, 91, 49, 54, 48, 93, 0, 42,104, 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42,115,
+116,110, 97,109,101,115, 0,115,116,121,112,101,115, 0,118, 97,114,115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115,117,
+108,116, 0, 42, 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105,110,
+115,116, 97,110, 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101,114,
+115,105,111,110, 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, 97,
+116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119,115,
+ 99, 97,108,101, 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, 99,
+ 0,108, 97,115,116,115,105,122,101, 0,110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,
+116, 0, 99,111,110,116,114, 97,115,116, 0,114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114,
+115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118,
+101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116,
+ 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,
+110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101,
+ 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115,
+ 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114,
+111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,120,114,101,112,101, 97,116,
+ 0,121,114,101,112,101, 97,116, 0,101,120,116,101,110,100, 0, 99,104,101, 99,107,101,114,100,105,115,116, 0,110, 97, 98,108,
+ 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101, 0, 42,112,108,117,103,105,110, 0, 42, 99,111, 98, 97, 0,
+ 42,101,110,118, 0,117,115,101, 95,110,111,100,101,115, 0,112, 97,100, 91, 55, 93, 0,108,111, 99, 91, 51, 93, 0,114,111,116,
+ 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0,109,111,100,101,
+ 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100,
+ 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,
+104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,102, 97,108,108,
+111,102,102, 95,116,121,112,101, 0,115,104, 97,100,115,112,111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0,
+ 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117,102,102,101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0,
+ 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, 0,114, 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,
+112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97,121, 95,115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,
+115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, 0, 97,114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,
+115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,
+111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, 97,108,111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,
+116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100,116,121,112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,
+104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115,117,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110,
+ 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116,101,114,101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,
+116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, 98,105,100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,
+116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,
+116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99,101, 95,102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,
+102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114,101, 0,115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,
+112, 97,100, 52, 0, 89, 70, 95,110,117,109,112,104,111,116,111,110,115, 0, 89, 70, 95,110,117,109,115,101, 97,114, 99,104, 0,
+ 89, 70, 95,112,104,100,101,112,116,104, 0, 89, 70, 95,117,115,101,113,109, 99, 0, 89, 70, 95, 98,117,102,115,105,122,101, 0,
+ 89, 70, 95,112, 97,100, 0, 89, 70, 95, 99, 97,117,115,116,105, 99, 98,108,117,114, 0, 89, 70, 95,108,116,114, 97,100,105,117,
+115, 0, 89, 70, 95,103,108,111,119,105,110,116, 0, 89, 70, 95,103,108,111,119,111,102,115, 0, 89, 70, 95,103,108,111,119,116,
+121,112,101, 0, 89, 70, 95,112, 97,100, 50, 0, 42,109,116,101,120, 91, 49, 56, 93, 0,109, 97,116,101,114,105, 97,108, 95,116,
+121,112,101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,
+109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103,
+ 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,
+101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,102,114,101,115,110,101,
+108, 95,109,105,114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,101,108, 95,116,114, 97, 0,
+102,114,101,115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,105,109,105,116, 0,116,120,
+ 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,112,116,104, 95,116,114, 97,
+ 0,104, 97,114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,114, 0,103,108,111,115,115,
+ 95,116,114, 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,103,108,111,115,115, 95,116,
+114, 97, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104,
+ 95,116,114, 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, 95,109,105,114, 0,102, 97,
+100,101,116,111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,108, 0,102,108, 97,114,101,
+ 99, 0,115,116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,101, 0,102,108, 97,114,101,
+115,105,122,101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,116,114, 97,110,100, 95,115,
+116, 97, 0,115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, 0,115,116,114, 97,110,100,
+ 95,115,117,114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,100, 95,119,105,100,116,104,
+102, 97,100,101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 51, 50, 93, 0,115, 98,105, 97,115, 0,108, 98,105,
+ 97,115, 0,115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,101,108, 0,112,114, 95,116,
+121,112,101, 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, 97,103, 0,100,105,102,102,
+ 95,115,104, 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,110,101,115,115, 0,114,101,
+102,114, 97, 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,115, 0, 42,114, 97,109,112,
+ 95, 99,111,108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,108, 0,114, 97,109,112,105,
+110, 95,115,112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, 98,108,101,110,100, 95,115,
+112,101, 99, 0,114, 97,109,112, 95,115,104,111,119, 0,112, 97,100, 51, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, 0,114,
+ 97,109,112,102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104, 0,114,
+101,102,108,101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101, 0,115,
+115,115, 95,114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,114,111,
+114, 0,115,115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, 0,115,
+115,115, 95,116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,115,115,
+ 95,102,108, 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0, 89, 70, 95, 97,114, 0, 89, 70, 95, 97,103, 0, 89, 70, 95,
+ 97, 98, 0, 89, 70, 95,100,115, 99, 97,108,101, 0, 89, 70, 95,100,112,119,114, 0, 89, 70, 95,100,115,109,112, 0, 89, 70, 95,
+112,114,101,115,101,116, 0, 89, 70, 95,100,106,105,116, 0,103,112,117,109, 97,116,101,114,105, 97,108, 0,110, 97,109,101, 91,
+ 50, 53, 54, 93, 0, 42, 98, 98, 0,105, 49, 0,106, 49, 0,107, 49, 0,105, 50, 0,106, 50, 0,107, 50, 0,115,101,108, 99,111,
+108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,101,120,112,120, 0,101,120,112,121, 0,101,120,112,
+122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,105,109, 97,116, 0,101,108,101,109,115, 0,100,105,
+115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, 0,116,111,116, 99,111,108, 0,119,105,114,101,115,
+105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,115,104, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0,
+ 97,108,102, 97, 0,119,101,105,103,104,116, 0,114, 97,100,105,117,115, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102,
+ 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,118,
+ 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101,114,118, 0,102,108, 97,
+103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,110,
+116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,
+104, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0, 42, 98,101,118,111, 98,106, 0, 42,116, 97,112,101,114,111,
+ 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,112, 97,116,104, 0, 42,107,101,121, 0, 98,101,118, 0,112,
+ 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,
+114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118, 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,
+116,115,101,108, 98,112, 0,115,112, 97, 99,101,109,111,100,101, 0,115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,
+116, 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,
+104,101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,
+101,108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116, 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,
+111,110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112,
+ 99,104, 97,114, 0, 99,116,105,109,101, 0,116,111,116, 98,111,120, 0, 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,
+115,116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105,110,102,111, 0, 99,117,114,105,110,102,111, 0,101,102,
+102,101, 99,116, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,114,
+116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0, 42,
+116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, 0, 42,101,100,105,116, 95,109,101,115,104, 0,118,100,
+ 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,116,111,116,101,100,103,101, 0,116,111,116,102, 97, 99,101, 0,
+116,111,116,115,101,108,101, 99,116, 0, 97, 99,116, 95,102, 97, 99,101, 0, 99,117, 98,101,109, 97,112,115,105,122,101, 0,100,
+114, 97,119,102,108, 97,103, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,100,105,118, 0,115,117, 98,100,105,118,
+114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0, 42,109,114, 0, 42,112,118, 0, 42,116,112, 97,103,101, 0,117,118, 91,
+ 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, 0,116,105,108,101, 0,117,110,119,114, 97,112, 0,
+118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, 99,114,101, 97,115,101, 0, 98,119,101,105,103,104,
+116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105,103,104,116, 0, 99,111, 91, 51, 93, 0,110,111, 91,
+ 51, 93, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,105,110,100,101,120, 0,102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,
+116,111,116,100,105,115,112, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0,118, 91, 52, 93, 0,109,105,100, 0,118, 91, 50, 93,
+ 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42,101,100,103,101,115, 0, 42,118,101,114,116,115, 0,
+108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, 99,117,114,114,101,110,116, 0,110,101,119,108,118,
+108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101,110,100,101,114,108,118,108, 0,117,115,101, 95, 99,
+111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103,101, 95, 99,114,101, 97,115,101,115, 0, 42,118,101,
+114,116, 95,109, 97,112, 0, 42,101,100,103,101, 95,109, 97,112, 0, 42,111,108,100, 95,102, 97, 99,101,115, 0, 42,111,108,100,
+ 95,101,100,103,101,115, 0, 42,101,114,114,111,114, 0,109,111,100,105,102,105,101,114, 0,115,117, 98,100,105,118, 84,121,112,
+101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, 97, 99,104,101, 0, 42,109, 67, 97, 99,104,101, 0,
+100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108,101,110,103,116,104, 0,114, 97,110,100,111,109,105,122,101, 0,
+115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116, 97,114,116, 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112,
+ 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115,101,116, 95,111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,
+115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100,105,115,116, 0,102,105,116, 95,116,121,112,101, 0,111,102,102,
+115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97,120,105,115, 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,
+105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97,110,103,108,101, 0,118, 97,108,117,101, 0,114,101,115, 0,118,
+ 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97,103,115, 0,101, 95,102,108, 97,103,115, 0, 98,101,118,101,108,
+ 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97,109,101, 91, 51, 50, 93, 0, 42,116,101,120,116,117,114,101, 0,
+115,116,114,101,110,103,116,104, 0,100,105,114,101, 99,116,105,111,110, 0,109,105,100,108,101,118,101,108, 0,116,101,120,109,
+ 97,112,112,105,110,103, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91,
+ 51, 50, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0, 42,112,114,111,106,101, 99,116,111,114,115, 91, 49, 48, 93, 0,
+ 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114,115, 0, 97,115,112,101, 99,116,120, 0, 97,115,
+112,101, 99,116,121, 0,112,101,114, 99,101,110,116, 0,102, 97, 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101,
+ 97,116, 0, 42,111, 98,106,101, 99,116, 99,101,110,116,101,114, 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,
+101,105,103,104,116, 0,110, 97,114,114,111,119, 0,115,112,101,101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,
+116,105,109,101,111,102,102,115, 0,108,105,102,101,116,105,109,101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,
+116,105, 0, 42,112,114,101,118, 67,111,115, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, 99,101,110,116,
+ 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111,114, 99,101, 0, 42, 99,108,111,
+116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108,108, 95,112, 97,114,109,115, 0,
+ 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0, 42,120, 0, 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,
+114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0,
+ 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115, 0,110,117,109,102, 97, 99,101,115, 0, 97, 98,115,111,114,112,
+116,105,111,110, 0,116,105,109,101, 0, 42, 98,118,104,116,114,101,101, 0, 42,100,109, 0,111,112,101,114, 97,116,105,111,110,
+ 0,118,101,114,116,101,120, 0,116,111,116,105,110,102,108,117,101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0,110,101,
+101,100, 98,105,110,100, 0, 42, 98,105,110,100,119,101,105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0,116,111,116,
+ 99, 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115,
+ 0, 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110,
+ 99,101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91,
+ 52, 93, 91, 52, 93, 0, 42,112,115,121,115, 0,116,111,116,100,109,118,101,114,116, 0,116,111,116,100,109,101,100,103,101, 0,
+116,111,116,100,109,102, 97, 99,101, 0,112,115,121,115, 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100,111,109, 95,112,
+111,115,105,116,105,111,110, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0, 42,
+117,110,100,111, 95,118,101,114,116,115, 0,117,110,100,111, 95,118,101,114,116,115, 95,116,111,116, 0,117,110,100,111, 95,115,
+105,103,110, 97,108, 0,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116, 97,
+114,103,101,116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 51, 50, 93, 0,
+107,101,101,112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0,112,
+114,111,106, 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102, 97,
+ 99,116,111,114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,112,110,116,115,119, 0,111,
+112,110,116,115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, 0,116,121,112,101,118, 0,
+116,121,112,101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,
+116,116,105, 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116,
+ 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0,112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114,
+ 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 51, 50, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,
+114,111,120,121, 95,103,114,111,117,112, 0, 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,
+112,111,115,101,108,105, 98, 0, 42,112,111,115,101, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115,
+ 0,100,101,102, 98, 97,115,101, 0,109,111,100,105,102,105,101,114,115, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,
+111,108, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,114,111,116,
+ 91, 51, 93, 0,111, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0,108,
+ 97,121, 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,103, 0,112,114,111,116,101, 99,116,102,108, 97,103,
+ 0,116,114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,108, 97,102,108, 97,103, 0,105,112,111,102,108, 97,
+103, 0,105,112,111,119,105,110, 0,115, 99, 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0, 98,111,117,110,
+100,116,121,112,101, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110,100,
+ 0,115,102, 0,109, 97,115,115, 0,100, 97,109,112,105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,
+116,111,114, 0,114,100, 97,109,112,105,110,103, 0,115,105,122,101,102, 97, 99, 0,109, 97,114,103,105,110, 0,109, 97,120, 95,
+118,101,108, 0,109,105,110, 95,118,101,108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, 84,
+104,114,101,115,104,111,108,100, 0,100,116, 0,100,116,120, 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,112,
+ 97,100, 49, 91, 53, 93, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, 97,
+ 0,112,114,111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97,116,
+111,114,115, 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, 97,
+109,101,102,108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114,111,
+112,105, 99, 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115,116,
+114,105,112,115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,112,100, 0, 42,115,
+111,102,116, 0, 42,100,117,112, 95,103,114,111,117,112, 0,102,108,117,105,100,115,105,109, 70,108, 97,103, 0,114,101,115,116,
+114,105, 99,116,102,108, 97,103, 0,115,104, 97,112,101,110,114, 0,115,104, 97,112,101,102,108, 97,103, 0,114,101, 99, 97,108,
+ 99,111, 0, 98,111,100,121, 95,116,121,112,101, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,
+100,101,114,105,118,101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116,
+ 68, 97,116, 97, 77, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,
+112, 0, 99,117,114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,
+105,101,108,100, 0,112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,
+101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,102, 95,115,116,114,
+101,110,103,116,104, 0,102, 95,112,111,119,101,114, 0,102, 95,100,105,115,116, 0,102, 95,100, 97,109,112, 0,109, 97,120,100,
+105,115,116, 0,109,105,110,100,105,115,116, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,102, 95,112,111,119,101,
+114, 95,114, 0,112,100,101,102, 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,
+115, 98,111,102,116, 0, 99,108,117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,
+114,101,113, 0,107,105,110,107, 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100,
+ 0,116,101,120, 95,110, 97, 98,108, 97, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,
+105,115, 0,114,116, 50, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,102,114, 97,109,101, 0,116,111,116,112,111,105,
+110,116, 0, 42,120,100, 97,116, 97, 0,115,116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116,102,114, 97,
+109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, 95,101,120, 97, 99,116,
+ 0,120,100, 97,116, 97, 95,116,121,112,101, 0,110, 97,109,101, 91, 54, 52, 93, 0,112,114,101,118, 95,110, 97,109,101, 91, 54,
+ 52, 93, 0,105,110,102,111, 91, 54, 52, 93, 0,109,101,109, 95, 99, 97, 99,104,101, 0,108,105,110, 83,116,105,102,102, 0, 97,
+110,103, 83,116,105,102,102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114,
+ 97,116,105,111,110,115, 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107,
+ 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80,
+ 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86,
+ 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107,
+ 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,
+115, 0,110,117,109, 99,108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0, 42,
+112, 97,114,116,105, 99,108,101,115, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,
+114,105,110,103, 0,110,111,100,101,109, 97,115,115, 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,
+108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,
+111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108,
+ 0,118,101,114,116,103,114,111,117,112, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103, 0,105,110,
+102,114,105, 99,116, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,
+102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,
+112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102,
+ 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,
+111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,
+105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,
+110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101,100,111,
+112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101,115,120,
+121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110,100,101,
+114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105,115, 99,
+111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, 97,118,
+120, 0,103,114, 97,118,121, 0,103,114, 97,118,122, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110,100, 0,
+103,115,116, 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108,121, 0,
+105,110,105, 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 83,117,114,102, 97, 99,101, 0, 42,109,
+101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 50, 52, 48, 93, 0, 98, 98, 83,116, 97,114,116, 91,
+ 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110, 78,111,118,
+101, 99,103,101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112, 86, 97,108,
+117,101, 0,103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,114,116,105,
+ 99,108,101,115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101, 83,117, 98,
+100,105,118,115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101, 73,110,102,
+ 65,108,112,104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115,104, 83,117,114,102, 78,111,114,109,
+ 97,108,115, 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,112,115, 81,
+117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,116,116,114,
+ 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,116,114,101,
+110,103,116,104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,103,111,111,
+100,102,114, 97,109,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0,104,111,
+114,107, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,122,101,110,107, 0, 97,109, 98,107, 0,102, 97,115,116,
+ 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0,108,111,
+103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115, 0,115,
+107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103,105,110,
+101, 0,116,105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115,116,101,
+112, 0,109, 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116,100,105,
+115,116, 0,109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, 97,114,
+107, 0,115,116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115,116, 0,
+115,116, 97,114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102,109,105,
+110, 0,100,111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110,101,114,
+103,121, 0, 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, 97,111,
+ 99,111,108,111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, 95,115,
+112,101,101,100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112,112,114,
+111,120, 95, 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97,111, 95,
+103, 97,116,104,101,114, 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, 0, 42,
+ 97,111,115,112,104,101,114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0,115,120, 0,115,121, 0,
+ 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97,116, 0, 99, 98, 80, 97,
+114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75,101,121, 70,114, 97,109,
+101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101,114, 83,101, 99,111,110,
+100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114,121, 0, 97,118,105, 99,
+111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97,100, 0, 99,100, 83,105,
+122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 0, 97,117,100,105,111, 95,
+ 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, 97,116,
+101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97,
+116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115,105,122,
+101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110, 0,112, 97,100, 91, 51, 93, 0, 42,
+109, 97,116, 95,111,118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121,
+ 95,122,109, 97,115,107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114,
+ 0, 42, 97,118,105, 99,111,100,101, 99,100, 97,116, 97, 0, 42,113,116, 99,111,100,101, 99,100, 97,116, 97, 0,102,102, 99,111,
+100,101, 99,100, 97,116, 97, 0, 97,117,100,105,111, 0, 99,102,114, 97, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,
+109, 97,103,101,115, 0,102,114, 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0,
+ 98,108,117,114,102, 97, 99, 0,101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,
+114,101,101,110, 0,120,112,108, 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98,
+ 0,114,116, 49, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,115,112,114,101,115,101,116,
+ 0,109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,116,115, 0,121,112, 97,114,
+116,115, 0,119,105,110,112,111,115, 0,112,108, 97,110,101,115, 0,105,109,116,121,112,101, 0,115,117, 98,105,109,116,121,112,
+101, 0,113,117, 97,108,105,116,121, 0,100,105,115,112,108, 97,121,109,111,100,101, 0,114,112, 97,100, 49, 0,114,112, 97,100,
+ 50, 0,115, 99,101,109,111,100,101, 0,114,101,110,100,101,114,101,114, 0,111, 99,114,101,115, 0, 97,108,112,104, 97,109,111,
+100,101, 0,111,115, 97, 0,102,114,115, 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,
+114,100,101,114, 0,100,105,115,112,114,101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,120, 97,115,112,
+ 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115,101, 0,103, 97,117,115,115, 0,112,111,115,116,109,117,108,
+ 0,112,111,115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,
+114, 95,105,110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114,
+ 0, 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108,
+ 95,115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,
+105,115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0, 71, 73,113,117, 97,
+108,105,116,121, 0, 71, 73, 99, 97, 99,104,101, 0, 71, 73,109,101,116,104,111,100, 0, 71, 73,112,104,111,116,111,110,115, 0,
+ 71, 73,100,105,114,101, 99,116, 0, 89, 70, 95, 65, 65, 0, 89, 70,101,120,112,111,114,116,120,109,108, 0, 89, 70, 95,110,111,
+ 98,117,109,112, 0, 89, 70, 95, 99,108, 97,109,112,114,103, 98, 0,121,102,112, 97,100, 49, 0, 71, 73,100,101,112,116,104, 0,
+ 71, 73, 99, 97,117,115,100,101,112,116,104, 0, 71, 73,112,105,120,101,108,115,112,101,114,115, 97,109,112,108,101, 0, 71, 73,
+112,104,111,116,111,110, 99,111,117,110,116, 0, 71, 73,109,105,120,112,104,111,116,111,110,115, 0, 71, 73,112,104,111,116,111,
+110,114, 97,100,105,117,115, 0, 89, 70, 95,114, 97,121,100,101,112,116,104, 0, 89, 70, 95, 65, 65,112, 97,115,115,101,115, 0,
+ 89, 70, 95, 65, 65,115, 97,109,112,108,101,115, 0,121,102,112, 97,100, 50, 0, 71, 73,115,104, 97,100,111,119,113,117, 97,108,
+105,116,121, 0, 71, 73,114,101,102,105,110,101,109,101,110,116, 0, 71, 73,112,111,119,101,114, 0, 71, 73,105,110,100,105,114,
+112,111,119,101,114, 0, 89, 70, 95,103, 97,109,109, 97, 0, 89, 70, 95,101,120,112,111,115,117,114,101, 0, 89, 70, 95,114, 97,
+121, 98,105, 97,115, 0, 89, 70, 95, 65, 65,112,105,120,101,108,115,105,122,101, 0, 89, 70, 95, 65, 65,116,104,114,101,115,104,
+111,108,100, 0, 98, 97, 99,107, 98,117,102, 91, 49, 54, 48, 93, 0,112,105, 99, 91, 49, 54, 48, 93, 0,115,116, 97,109,112, 0,
+115,116, 97,109,112, 95,102,111,110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 49, 54, 48, 93, 0,102,
+103, 95,115,116, 97,109,112, 91, 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,105,109,112,108,105,102,121, 95,
+115,117, 98,115,117,114,102, 0,115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,
+105,109,112,108,105,102,121, 95,112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115,
+ 0, 99,105,110,101,111,110,119,104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103,
+ 97,109,109, 97, 0,106,112, 50, 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,
+100,111,109,101,114,101,115, 0,100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,
+105,108,116, 0,100,111,109,101,114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,112, 97,114,116,105, 99,108,
+101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, 97,109,112,108,101,
+ 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0, 99,111,108, 91, 51, 93, 0, 42, 98,114,117,115,104, 0,116,111,111,108,
+ 0,115,101, 97,109, 95, 98,108,101,101,100, 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0, 42,112, 97,105,110,116, 99,
+117,114,115,111,114, 0,105,110,118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116,111,116, 97,100,100,107,101,121, 0,
+ 98,114,117,115,104,116,121,112,101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115,116, 0,100,
+114, 97,119, 95,116,105,109,101,100, 0,115,101,108,101, 99,116,109,111,100,101, 0,110, 97,109,101, 91, 51, 54, 93, 0,109, 97,
+116, 91, 51, 93, 91, 51, 93, 0, 42,115,101,115,115,105,111,110, 0,112,105,118,111,116, 91, 51, 93, 0,116,101,120,115,101,112,
+ 0,116, 97, 98,108,101,116, 95,115,105,122,101, 0,116, 97, 98,108,101,116, 95,115,116,114,101,110,103,116,104, 0,112, 97,100,
+ 91, 53, 93, 0,103, 97,109,109, 97, 0,109,117,108, 0, 42,118,112, 97,105,110,116, 95,112,114,101,118, 0, 42,119,112, 97,105,
+110,116, 95,112,114,101,118, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0, 42,115, 99,117,108,112,116, 0,
+118,103,114,111,117,112, 95,119,101,105,103,104,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105,116, 98,117,116,
+102,108, 97,103, 0,106,111,105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114,
+ 95,111,102,102,115, 0,100,111,117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97,117,116,111,109,
+101,114,103,101, 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115, 0,117,110,119,
+114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95, 99,117, 98,101,
+115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97,112,100,105,114,
+ 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103, 0,117,118, 95,
+102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,112, 97,100, 91, 50, 93, 0, 97,117,116,
+111,105,107, 95, 99,104, 97,105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,
+114,111,112,111,114,116,105,111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,
+108,101, 97,110, 95,116,104,114,101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0,114,101,116,111,112,111, 95,
+109,111,100,101, 0,114,101,116,111,112,111, 95,112, 97,105,110,116, 95,116,111,111,108, 0,108,105,110,101, 95,100,105,118, 0,
+101,108,108,105,112,115,101, 95,100,105,118, 0,114,101,116,111,112,111, 95,104,111,116,115,112,111,116, 0,109,117,108,116,105,
+114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,115,107,103,101,110, 95,114,101,115,111,108,117,116,105,111,110,
+ 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,
+116,104,114,101,115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,
+114, 97,116,105,111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 97,
+110,103,108,101, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,116,105,111,110, 95,108,105,109,
+105,116, 0,115,107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,114,101,
+116, 97,114,103,101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,
+101,116, 95,108,101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,
+100,105,115,116, 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,116,105,111,110,115, 0,115,107,
+103,101,110, 95,112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 95,112, 97,115,115,101,115,
+ 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,107,103,101,110, 95,109,117,108,
+116,105, 95,108,101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101, 0, 98,111,110,101, 95,115,107,
+101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,111,110,118,101,114,116, 0,115,
+107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,115,107,103,101,110, 95,114,101,
+116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,114,111,
+108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,115,107,103,101,110, 95,110,117,
+109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,115,110, 97,112, 95,109,111,100,101, 0,
+115,110, 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111,114,116,105,111,110,
+ 97,108, 0,112,114,111,112, 95,109,111,100,101, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111,116,111,
+ 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97,116,117,
+114,101, 0, 42, 99, 97,109,101,114, 97, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115,
+ 97, 99,116, 0, 42,111, 98,101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,
+116,119,109,105,110, 91, 51, 93, 0,116,119,109, 97,120, 91, 51, 93, 0, 42,101,100, 0,102,114, 97,109,105,110,103, 0, 42,116,
+111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0,116,114, 97,110,115,102,111,114,109, 95,115,112, 97,
+ 99,101,115, 0, 42,116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0,
+106,117,109,112,102,114, 97,109,101, 0,102,114, 97,109,101, 95,115,116,101,112, 0, 97, 99,116,105,118,101, 95,107,101,121,105,
+110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0, 98,108,101,110,100, 0,119,105,110,109, 97,116, 91, 52, 93,
+ 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, 91, 52, 93, 91, 52, 93, 0,
+112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,
+109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,116,119,109, 97,
+116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0, 99,
+ 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,118,105,101,119, 98,117,116, 0,108, 97,115,
+116,109,111,100,101, 0,114,102,108, 97,103, 0,118,105,101,119,108,111, 99,107, 0,112,101,114,115,112, 0,118,105,101,119, 0,
+ 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 42, 99,108,105,112, 98, 98, 0, 42,103,112,100, 0, 42,108,111, 99, 97,108,118,100,
+ 0, 42,114,105, 0, 42,114,101,116,111,112,111, 95,118,105,101,119, 95,100, 97,116, 97, 0, 42,100,101,112,116,104,115, 0, 42,
+115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,108,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,108,
+112,101,114,115,112, 0,108,118,105,101,119, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121,112,101,
+ 0, 98,108,111, 99,107,115, 99, 97,108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0,108, 97,121, 95,
+117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,114,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101,
+ 95, 98,111,110,101, 91, 51, 50, 93, 0,108, 97,121, 97, 99,116, 0,100,114, 97,119,116,121,112,101, 0,108,111, 99, 97,108,118,
+105,101,119, 0,115, 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,102,108, 97,103, 50, 0,112,105,118,111,116,
+ 95,108, 97,115,116, 0,103,114,105,100, 0,103,114,105,100,118,105,101,119, 0,112, 97,100,102, 0,110,101, 97,114, 0,102, 97,
+114, 0,103,114,105,100,108,105,110,101,115, 0,103,114,105,100,102,108, 97,103, 0,103,114,105,100,115,117, 98,100,105,118, 0,
+109,111,100,101,115,101,108,101, 99,116, 0,107,101,121,102,108, 97,103,115, 0,116,119,116,121,112,101, 0,116,119,109,111,100,
+101, 0,116,119,102,108, 97,103, 0,116,119,100,114, 97,119,102,108, 97,103, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109,
+ 97,115,107, 0, 97,102,116,101,114,100,114, 97,119, 0,122, 98,117,102, 0,120,114, 97,121, 0,110,100,111,102,109,111,100,101,
+ 0,110,100,111,102,102,105,108,116,101,114, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,
+118,101,114,116, 0,104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,
+111,111,109, 0,109, 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,
+112,116,111,116, 0,107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120,
+ 0,119,105,110,121, 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 99,117,114,115,111,114, 91, 50, 93, 0,
+ 42,115, 99,114,101,101,110, 0,118, 50,100, 0, 42, 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,
+111,115,110, 97,112, 0,112,105,110, 0,108,111, 99,107, 0, 99,117,114,115,101,110,115, 0, 99,117,114, 97, 99,116, 0,112,114,
+101,118,105,101,119, 0,109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0, 42,108,111, 99,107,112,111,105,110, 0,116,101,120,
+110,114, 0,116,101,120,102,114,111,109, 0,115,104,111,119,103,114,111,117,112, 0,109,111,100,101,108,116,121,112,101, 0,115,
+ 99,114,105,112,116, 98,108,111, 99,107, 0,114,101, 95, 97,108,105,103,110, 0,111,108,100,107,101,121,112,114,101,115,115, 0,
+112, 97,116,104,102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, 0, 42,112,105,110,105,100, 0,114,101,110,100,101,114, 95,
+115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122,111,111,109, 0,116,105,116,108,101, 91,
+ 50, 52, 93, 0,100,105,114, 91, 50, 52, 48, 93, 0,102,105,108,101, 91, 56, 48, 93, 0,115,111,114,116, 0,100,105,115,112,108,
+ 97,121, 0, 97, 99,116,105,118,101, 95, 98,111,111,107,109, 97,114,107, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,
+101,108,115,116, 97,116,101, 0,102, 95,102,112, 0,109,101,110,117, 0,102,112, 95,115,116,114, 91, 56, 93, 0, 42,112,117,112,
+109,101,110,117, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115, 0, 42,102,111,108,100,101,114,115, 95,112,114,101,
+118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116, 0, 42,111,112, 0, 42,108,111, 97,100,105,109, 97,103,101, 95,116,
+105,109,101,114, 0, 42,108, 97,121,111,117,116, 0,116,114,101,101, 0, 42,116,114,101,101,115,116,111,114,101, 0,115,101, 97,
+114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,114, 99,104, 95,116,115,101, 0,115,101, 97,114, 99,104,
+ 95,102,108, 97,103,115, 0,100,111, 95, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0,
+ 42, 99,117,109, 97,112, 0,105,109, 97,110,114, 0, 99,117,114,116,105,108,101, 0,105,109,116,121,112,101,110,114, 0,100,116,
+ 95,117,118, 0,115,116,105, 99,107,121, 0,100,116, 95,117,118,115,116,114,101,116, 99,104, 0, 99,101,110,116,120, 0, 99,101,
+110,116,121, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, 0,108,104,101,105,103,104,116, 0,
+ 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116,111,116, 0,108,101,102,116, 0,115,104,111,119,108,105,110,101,
+110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,110,116, 97,120, 0,111,118,101,114,119,114,105,
+116,101, 0,108,105,118,101, 95,101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,
+111,108,108, 0,116,120,116, 98, 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,
+110,100,115,116,114, 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0, 42,112,121, 95,100,
+114, 97,119, 0, 42,112,121, 95,101,118,101,110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,
+119,115,101,114, 99, 97,108,108, 98, 97, 99,107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,
+115,112, 97, 99,101, 0,115, 99,114,105,112,116,110, 97,109,101, 91, 50, 53, 54, 93, 0,115, 99,114,105,112,116, 97,114,103, 91,
+ 50, 53, 54, 93, 0, 42,115, 99,114,105,112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0,114,101,100,114, 97,119,115, 0, 42,
+105,100, 0, 97,115,112,101, 99,116, 0, 42, 99,117,114,102,111,110,116, 0,109,120, 0,109,121, 0, 42,101,100,105,116,116,114,
+101,101, 0,116,114,101,101,116,121,112,101, 0,110,117,109,116,105,108,101,115,120, 0,110,117,109,116,105,108,101,115,121, 0,
+118,105,101,119,114,101, 99,116, 0, 98,111,111,107,109, 97,114,107,114,101, 99,116, 0,115, 99,114,111,108,108,112,111,115, 0,
+115, 99,114,111,108,108,104,101,105,103,104,116, 0,115, 99,114,111,108,108, 97,114,101, 97, 0,114,101,116,118, 97,108, 0,112,
+114,118, 95,119, 0,112,114,118, 95,104, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 41, 40, 41, 0, 40, 42,114,101,116,
+117,114,110,102,117,110, 99, 95,101,118,101,110,116, 41, 40, 41, 0, 40, 42,114,101,116,117,114,110,102,117,110, 99, 95, 97,114,
+103,115, 41, 40, 41, 0, 42, 97,114,103, 49, 0, 42, 97,114,103, 50, 0, 42,109,101,110,117,112, 0, 42,105,109,103, 0,102,105,
+108,101,110, 97,109,101, 91, 50, 53, 54, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,111,110,116, 95,105,100, 0,114, 95,116,
+111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0,105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115,
+104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,111,119, 97,108,112,104, 97, 0,115,104,
+ 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,114,111,117,112,108, 97, 98,101,108, 0,
+119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,112, 97,110,101,108,122,111,111,109, 0,109,105,110,
+108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101,116, 99,104, 97,114,115, 0, 99,111,108,117,109,110,
+115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101, 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116,
+116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99,
+101, 0,112, 97,110,101,108,111,117,116,101,114, 0,112, 97,100, 91, 49, 93, 0,111,117,116,108,105,110,101, 91, 52, 93, 0,105,
+110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, 52, 93, 0,116,101,120,
+116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, 97,100,101,116,111,112,
+ 0,115,104, 97,100,101,100,111,119,110, 0,105,110,110,101,114, 95, 97,110,105,109, 91, 52, 93, 0,105,110,110,101,114, 95, 97,
+110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,
+121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 91, 52, 93, 0,105,110,110,101,114, 95,100,
+114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,119, 99,111,108, 95,114,101,103,117,108, 97,114, 0,119, 99,111,108, 95,116,
+111,111,108, 0,119, 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, 99,111,108, 95,111,112,
+116,105,111,110, 0,119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,109, 0,119, 99,111,108, 95,110,
+117,109,115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117,108,108,100,111,119,110,
+ 0,119, 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95,105,116,101,109, 0,119,
+ 99,111,108, 95, 98,111,120, 0,119, 99,111,108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,105,
+ 99,111,110,102,105,108,101, 91, 56, 48, 93, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93, 0,116,101,120,
+116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52,
+ 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91,
+ 52, 93, 0, 98,117,116,116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,
+116,111,110, 95,116,101,120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,
+115,116, 91, 52, 93, 0,108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93,
+ 0,108,105,115,116, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,
+116,105,116,108,101, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,
+116, 95,104,105, 91, 52, 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,
+116,101, 91, 52, 93, 0,103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,
+108, 97,109,112, 91, 52, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112,
+ 95, 97, 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52,
+ 93, 0,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,
+115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,
+112, 91, 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,
+101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,111,116, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52,
+ 93, 0, 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114,
+105,112, 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,
+100,115, 95, 99,104, 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0,118,
+101,114,116,101,120, 95,115,105,122,101, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, 0, 98,112, 97,100, 91, 50, 93, 0,
+115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116, 97,120, 98, 91, 52, 93,
+ 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,105,101, 91, 52, 93, 0,
+105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110,101, 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,
+116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52, 93, 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116,
+ 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104, 95, 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,
+101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93,
+ 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 95,115,105,122,101, 0,104,112, 97,100, 91, 51, 93, 0,115,111,108,105,
+100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, 0,116,102,105,108,101, 0,116,105,112,111, 0,116,
+105,110,102,111, 0,116,115,110,100, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, 0,116,105,109, 97, 0,116,105,
+109, 97,115,101,108, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111,
+103,105, 99, 0,116, 97,114,109, 91, 50, 48, 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,
+101,116,105,109,101, 0,116,101,109,112,100,105,114, 91, 49, 54, 48, 93, 0,102,111,110,116,100,105,114, 91, 49, 54, 48, 93, 0,
+114,101,110,100,101,114,100,105,114, 91, 49, 54, 48, 93, 0,116,101,120,116,117,100,105,114, 91, 49, 54, 48, 93, 0,112,108,117,
+103,116,101,120,100,105,114, 91, 49, 54, 48, 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 49, 54, 48, 93, 0,112,121,116,
+104,111,110,100,105,114, 91, 49, 54, 48, 93, 0,115,111,117,110,100,100,105,114, 91, 49, 54, 48, 93, 0,121,102,101,120,112,111,
+114,116,100,105,114, 91, 49, 54, 48, 93, 0,118,101,114,115,105,111,110,115, 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,
+101,101,108,108,105,110,101,115, 99,114,111,108,108, 0,117,105,102,108, 97,103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,
+101,114,112,114,101,102, 0,118,105,101,119,122,111,111,109, 0,109,105,120, 98,117,102,115,105,122,101, 0,100,112,105, 0,101,
+110, 99,111,100,105,110,103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49,
+ 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,
+105,115,116,121,108,101,115, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111,109,101,109,111,114,121, 0,103,112, 95,
+109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105,100,101, 97,110,100,105,115,116, 0,103,
+112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116, 98, 95,108,101,102,116,109,111,117,115,
+101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91, 51, 93, 0,116,119, 95,104,111,116,115,
+112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,105,122,101, 0,116,119, 95,115,105,122,
+101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99,116,114, 97,116,101, 0,119,109,100,114,
+ 97,119,109,101,116,104,111,100, 0,119,109,112, 97,100, 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,
+102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114, 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,
+114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101,110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,
+118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110,116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,
+119,116,120, 0,103,108,114,101,115,108,105,109,105,116, 0,110,100,111,102, 95,112, 97,110, 0,110,100,111,102, 95,114,111,116,
+ 97,116,101, 0, 99,117,114,115,115,105,122,101, 0,105,112,111, 95,110,101,119, 0,118,101,114,115,101,109, 97,115,116,101,114,
+ 91, 49, 54, 48, 93, 0,118,101,114,115,101,117,115,101,114, 91, 49, 54, 48, 93, 0,103,108, 97,108,112,104, 97, 99,108,105,112,
+ 0, 97,117,116,111,107,101,121, 95,102,108, 97,103, 0, 99,111, 98, 97, 95,119,101,105,103,104,116, 0,118,101,114,116, 98, 97,
+115,101, 0,101,100,103,101, 98, 97,115,101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,102,
+117,108,108, 0,119,105,110,105,100, 0,100,111, 95,100,114, 97,119, 0,100,111, 95,114,101,102,114,101,115,104, 0,100,111, 95,
+100,114, 97,119, 95,103,101,115,116,117,114,101, 0,100,111, 95,100,114, 97,119, 95,112, 97,105,110,116, 99,117,114,115,111,114,
+ 0,115,119, 97,112, 0,109, 97,105,110,119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,
+116,105,109,101,114, 0, 42, 99,111,110,116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,
+118,101, 99, 0, 42,118, 49, 0, 42,118, 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,
+116, 97, 98,110, 97,109,101, 91, 54, 52, 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,
+115,121, 0,115,105,122,101,120, 0,115,105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0,114,117,110,116,105,109,101, 95,
+102,108, 97,103, 0, 99,111,110,116,114,111,108, 0,115,110, 97,112, 0,115,111,114,116,111,114,100,101,114, 0, 42,112, 97,110,
+101,108,116, 97, 98, 0, 42, 97, 99,116,105,118,101,100, 97,116, 97, 0,108,105,115,116, 95,115, 99,114,111,108,108, 0,108,105,
+115,116, 95,115,105,122,101, 0,108,105,115,116, 95,115,101, 97,114, 99,104, 91, 54, 52, 93, 0, 42,118, 51, 0, 42,118, 52, 0,
+ 42,102,117,108,108, 0, 98,117,116,115,112, 97, 99,101,116,121,112,101, 0,104,101, 97,100,101,114,116,121,112,101, 0, 99,117,
+114,115,111,114, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110,100,108,101,114,115, 0, 97, 99,116,105,111,110,122,111,
+110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, 0,115,119,105,110,105,100, 0,114,101,103,105,111,110,
+116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,117,105, 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,
+104,101, 97,100,101,114,115,116,114, 0, 42,114,101,103,105,111,110,100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93,
+ 0,115,117, 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0,109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,
+117, 98,118,101,114,115,105,111,110, 0, 42, 99,117,114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,
+105,108,101,102,108, 97,103,115, 0,103,108,111, 98, 97,108,102, 0,110, 97,109,101, 91, 56, 48, 93, 0, 42,105, 98,117,102, 0,
+ 42,105, 98,117,102, 95, 99,111,109,112, 0, 42,115,101, 49, 0, 42,115,101, 50, 0, 42,115,101, 51, 0,110,114, 0, 98,111,116,
+116,111,109, 0,114,105,103,104,116, 0,120,111,102,115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109,
+ 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,115, 97,116,117,114, 97,116,105,111,110, 0,100,105,114, 91, 49, 54, 48, 93,
+ 0,100,111,110,101, 0,115,116, 97,114,116,115,116,105,108,108, 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,
+100, 97,116, 97, 0,111,114,120, 0,111,114,121, 0, 42, 99,114,111,112, 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,
+111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 0, 42,116,115,116,114,105,112,
+100, 97,116, 97, 95,115,116, 97,114,116,115,116,105,108,108, 0, 42,116,115,116,114,105,112,100, 97,116, 97, 95,101,110,100,115,
+116,105,108,108, 0, 42,105, 98,117,102, 95,115,116, 97,114,116,115,116,105,108,108, 0, 42,105, 98,117,102, 95,101,110,100,115,
+116,105,108,108, 0, 42,105,110,115,116, 97,110, 99,101, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,
+114,114,101,110,116, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115,
+ 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,110,101, 0,115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,
+112, 0,104, 97,110,100,115,105,122,101, 0, 97,110,105,109, 95,112,114,101,115,101,101,107, 0, 42,115,116,114,105,112, 0,102,
+ 97, 99,102, 48, 0,102, 97, 99,102, 49, 0, 42,115,101,113, 49, 0, 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113,
+ 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,104,100, 97,117,100,105,111, 0,108,101,118,101,108, 0,112, 97,110, 0,115,
+ 99,101,110,101,110,114, 0,115,116,114,111, 98,101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,
+116, 97,114,116,111,102,115, 0, 97,110,105,109, 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,
+108,101,110,100, 95,111,112, 97, 99,105,116,121, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,
+115,101,113, 98, 97,115,101,112, 0,109,101,116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,
+105,109, 97,103,101,100,105,114, 91, 50, 53, 54, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 50, 53, 54, 93, 0,
+101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101,116,121,112,101, 0,102, 77,105,110,105,
+ 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78,
+111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121, 73,110,105, 0, 83, 99, 97,108,101,120,
+ 70,105,110, 0, 83, 99, 97,108,101,121, 70,105,110, 0,120, 73,110,105, 0,120, 70,105,110, 0,121, 73,110,105, 0,121, 70,105,
+110, 0,114,111,116, 73,110,105, 0,114,111,116, 70,105,110, 0,105,110,116,101,114,112,111,108, 97,116,105,111,110, 0, 42,102,
+114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97,108, 83,112,101,101,100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,
+109,101, 0, 98,117,116,116,121,112,101, 0,117,115,101,114,106,105,116, 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,
+111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0,114, 97,110,100,102, 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,
+108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93, 0,118,101, 99,116,115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,
+102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91, 52, 93, 0,108,105,102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93,
+ 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97,112, 0, 99,117,114,109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,
+112, 0,111,109, 97,116, 0,116,105,109,101,116,101,120, 0,115,112,101,101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103,
+ 0,118,101,114,116,103,114,111,117,112, 95,118, 0,118,103,114,111,117,112,110, 97,109,101, 91, 51, 50, 93, 0,118,103,114,111,
+117,112,110, 97,109,101, 95,118, 91, 51, 50, 93, 0, 42,107,101,121,115, 0,109,105,110,102, 97, 99, 0,117,115,101,100, 0,117,
+115,101,100,101,108,101,109, 0,111,116,121,112,101, 0,111,108,100, 0, 42,112,111,105,110, 0, 42,111,108,100,112,111,105,110,
+ 0,114,101,115,101,116,100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, 0,
+113,117, 97,108, 50, 0,116, 97,114,103,101,116, 78, 97,109,101, 91, 51, 50, 93, 0,116,111,103,103,108,101, 78, 97,109,101, 91,
+ 51, 50, 93, 0,118, 97,108,117,101, 91, 51, 50, 93, 0,109, 97,120,118, 97,108,117,101, 91, 51, 50, 93, 0,100,101,108, 97,121,
+ 0,100,117,114, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 51, 50, 93, 0,100, 97,109,112,116,
+105,109,101,114, 0,112,114,111,112,110, 97,109,101, 91, 51, 50, 93, 0,109, 97,116,110, 97,109,101, 91, 51, 50, 93, 0, 97,120,
+105,115,102,108, 97,103, 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 51, 50, 93, 0, 98,
+111,100,121, 91, 51, 50, 93, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,115, 0, 42, 42,108,105,
+110,107,115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,108,101, 0, 97,120,105,
+115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,111,110, 0,115,116,114,
+ 91, 49, 50, 56, 93, 0,109,111,100,117,108,101, 91, 54, 52, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116,115, 0,116,
+111,116,115,108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95,109, 97,115,
+107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 51, 50, 93, 0, 98,108,101,110,100,105,110, 0,112,114,105,
+111,114,105,116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116,114,105,100,
+101,108,101,110,103,116,104, 0,115,110,100,110,114, 0,112, 97,100, 49, 91, 50, 93, 0,109, 97,107,101, 99,111,112,121, 0, 99,
+111,112,121,109, 97,100,101, 0,112, 97,100, 50, 91, 49, 93, 0,116,114, 97, 99,107, 0, 42,109,101, 0,108,105,110, 86,101,108,
+111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0,108,111, 99, 97,108,102,108, 97,
+103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,108,111, 99, 91, 51, 93, 0,102,111,114, 99,
+101,114,111,116, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103,117,108, 97,
+114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102,101,114,101,110, 99,101, 0, 98,117,116,115,116, 97, 0, 98,
117,116,101,110,100, 0,109,105,110, 0,109, 97,120, 0,118,105,115,105,102, 97, 99, 0,114,111,116,100, 97,109,112, 0,109,105,
110,108,111, 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, 0,109,105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,
111,116, 91, 51, 93, 0,109, 97,116,112,114,111,112, 91, 51, 50, 93, 0,100,105,115,116,114,105, 98,117,116,105,111,110, 0,105,
@@ -1892,1028 +2277,1043 @@ char datatoc_B_blend[]= {
114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51, 93, 0, 97,114,109, 95,109, 97,116, 91, 52,
93, 91, 52, 93, 0,120,119,105,100,116,104, 0,122,119,105,100,116,104, 0,101, 97,115,101, 49, 0,101, 97,115,101, 50, 0,114,
97,100, 95,104,101, 97,100, 0,114, 97,100, 95,116, 97,105,108, 0, 98,111,110,101, 98, 97,115,101, 0, 99,104, 97,105,110, 98,
- 97,115,101, 0, 42,101,100, 98,111, 0,112, 97,116,104,102,108, 97,103, 0,108, 97,121,101,114, 95,112,114,111,116,101, 99,116,
-101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116,116,121,112,101, 0,112,
- 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97,116,104,115,102, 0,112,
- 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,114,111,112, 0, 99,111,110,115,116,102,
-108, 97,103, 0,105,107,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120,
- 0, 42, 98,111,110,101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0, 42, 98, 95, 98,111,110,101, 95,109, 97,116,
-115, 0, 42,100,117, 97,108, 95,113,117, 97,116, 0, 42, 98, 95, 98,111,110,101, 95,100,117, 97,108, 95,113,117, 97,116,115, 0,
-101,117,108, 91, 51, 93, 0,114,111,116,109,111,100,101, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,
-115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116,
- 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115,
-116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0, 42, 99,117,115,116,111,109, 0, 99,104,
- 97,110, 98, 97,115,101, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102,115,101,116,
- 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0, 97, 99,116,
-105,118,101, 95,103,114,111,117,112, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,103,114,
-111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0, 42,115,111,117,114, 99,101, 0,102,105,108,116,101,
-114,102,108, 97,103, 0, 97,100,115, 0, 97, 99,116,110,114, 0, 97, 99,116,119,105,100,116,104, 0,116,105,109,101,115,108,105,
-100,101, 0, 42,103,114,112, 0,116,101,109,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116,
- 97,114,115,112, 97, 99,101, 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0, 42,116, 97,114, 0,115,117,
- 98,116, 97,114,103,101,116, 91, 51, 50, 93, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,116,
- 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,
-101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116,
- 97,114,103,101,116, 91, 51, 50, 93, 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101,110,116,119,101,105,103,104,116,
- 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93, 0,114,101,115,101,114,118,101,100, 49, 0,114,101,115,101,114,118,101,
-100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99,
-107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0,112,108, 97,110,101, 0,111,
-114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120,
- 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54,
- 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109,
- 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91,
- 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,122,109,105,110, 0,122,109, 97,120,
- 0,112, 97,100, 91, 57, 93, 0, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,
-115,116,114,105,100,101, 95, 97,120,105,115, 0, 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,
-110,100, 0, 97, 99,116,111,102,102,115, 0,115,116,114,105,100,101,108,101,110, 0,115, 99, 97,108,101, 0, 98,108,101,110,100,
-111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91,
- 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0,
-115,111, 99,107,101,116,116,121,112,101, 0, 42,110,101,119, 95,115,111, 99,107, 0,110,115, 0,108,105,109,105,116, 0,115,116,
- 97, 99,107, 95,105,110,100,101,120, 0,105,110,116,101,114,110, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 95,101,120,116,
- 0,108,111, 99,120, 0,108,111, 99,121, 0,111,119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,116,
-111,115,111, 99,107, 0, 42,108,105,110,107, 0, 42,110,101,119, 95,110,111,100,101, 0,117,115,101,114,110, 97,109,101, 91, 51,
- 50, 93, 0,108, 97,115,116,121, 0,111,117,116,112,117,116,115, 0, 42,115,116,111,114, 97,103,101, 0,109,105,110,105,119,105,
-100,116,104, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115,116,
-111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0,116,
-111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42,116,121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,
-101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0,
- 42,115,116, 97, 99,107, 0, 42,116,104,114,101, 97,100,115,116, 97, 99,107, 0,105,110,105,116, 0,115,116, 97, 99,107,115,105,
-122,101, 0, 99,117,114, 95,105,110,100,101,120, 0, 97,108,108,116,121,112,101,115, 0, 42,111,119,110,116,121,112,101, 0, 42,
-115,101,108,105,110, 0, 42,115,101,108,111,117,116, 0, 40, 42,116,105,109,101, 99,117,114,115,111,114, 41, 40, 41, 0, 40, 42,
-115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0, 42,116,
- 98,104, 0, 42,116, 99,104, 0, 42,115,100,104, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,
-115, 0,109,105,110,115,112,101,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121, 0, 98,111,107,
-101,104, 0, 99,117,114,118,101,100, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103,101, 95,105,
-110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112,105,110, 0,
-105,116,101,114, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,
-101, 0,104,117,101, 0,115, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108,
-112,104, 97, 0,107,101,121, 91, 52, 93, 0,120, 49, 0,120, 50, 0,121, 49, 0,121, 50, 0, 99,111,108,110, 97,109,101, 91, 51,
- 50, 93, 0, 98,107,116,121,112,101, 0,114,111,116, 97,116,105,111,110, 0,112,114,101,118,105,101,119, 0,103, 97,109, 99,111,
- 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101,115,104, 0, 42,
-100,105, 99,116, 0, 42,110,111,100,101, 0, 97,110,103,108,101, 95,111,102,115, 0, 99,111,108,109,111,100, 0,109,105,120, 0,
-116,104,114,101,115,104,111,108,100, 0,102, 97,100,101, 0,109, 0, 99, 0,106,105,116, 0,112,114,111,106, 0,102,105,116, 0,
-115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110, 91,
- 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114,101,
-109,117,108,116, 97, 98,108,101, 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91,
- 51, 93, 0,119,104,105,116,101, 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,111,
-102,102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,105,110,110,101,114,114, 97,100,105,117,115, 0,114, 97,116,101, 0,
-114,103, 98, 91, 51, 93, 0,114,111,116, 0,115, 99,117,108,112,116, 95,116,111,111,108, 0, 97, 99,116,105,118,101, 95,114,110,
-100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99,116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,
-114,115, 0,116,111,116,108, 97,121,101,114, 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,
-111,108, 0,101,100,105,116,102,108, 97,103, 0,118,101,108, 91, 51, 93, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93,
- 0,110,117,109, 0,112, 97,114,101,110,116, 0,112, 97, 91, 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,
-102,102,115,101,116, 0,114, 97,110,100, 91, 51, 93, 0, 42,115,116,105, 99,107, 95,111, 98, 0,112,114,101,118, 95,115,116, 97,
-116,101, 0, 42,104, 97,105,114, 0,105, 95,114,111,116, 91, 52, 93, 0,114, 95,114,111,116, 91, 52, 93, 0,114, 95, 97,118,101,
- 91, 51, 93, 0,114, 95,118,101, 91, 51, 93, 0,100,105,101,116,105,109,101, 0, 98, 97,110,107, 0,115,105,122,101,109,117,108,
- 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 98,112,105, 0, 97,108,105,118,101, 0,108,111,111,112, 0,100,105,115,116,
-114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100,101, 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114,
- 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115,105,122,101, 0, 99,104,105,108,100,116,121,112,101, 0,100,
-114, 97,119, 95,115,116,101,112, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115,
- 95,115,116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,
-114,111,109, 0,105,110,116,101,103,114, 97,116,111,114, 0,110, 98,101,116,119,101,101,110, 0, 98,111,105,100,110,101,105,103,
-104, 98,111,117,114,115, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,
-110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114,
- 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0,115,105,109,112,108,105,102,121, 95,102,
-108, 97,103, 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105,109,112,108,105,102,121, 95,114, 97,
-116,101, 0,115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0,115,105,109,112,108,105,102,121, 95,
-118,105,101,119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0,106,105,116,102, 97, 99, 0,107,101,121,101,100, 95,
-116,105,109,101, 0,101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95,114,101,115, 0,112, 97,114,116,102, 97, 99, 0,116,
- 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97, 99, 0, 97,118,101,102, 97, 99, 0,112,
-104, 97,115,101,102, 97, 99, 0,114, 97,110,100,114,111,116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,
-114, 97,110,100,115,105,122,101, 0,114,101, 97, 99,116,115,104, 97,112,101, 0, 97, 99, 99, 91, 51, 93, 0,100,114, 97,103,102,
- 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,100, 97,109,112,102, 97, 99, 0, 97, 98,115,108,101,110,103,116,104, 0,114, 97,
-110,100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114,
- 0,112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101,
- 0, 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100,102,108, 97,116, 0, 99,104,105,108,100,115,112,114,101, 97,100, 0,
- 99,108,117,109,112,102, 97, 99, 0, 99,108,117,109,112,112,111,119, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,
-115,105,122,101, 0,114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,
-104,114,101,115, 0,114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 98,
-114, 97,110, 99,104, 95,116,104,114,101,115, 0,100,114, 97,119, 95,108,105,110,101, 91, 50, 93, 0,109, 97,120, 95,108, 97,116,
- 95, 97, 99, 99, 0,109, 97,120, 95,116, 97,110, 95, 97, 99, 99, 0, 97,118,101,114, 97,103,101, 95,118,101,108, 0, 98, 97,110,
-107,105,110,103, 0,109, 97,120, 95, 98, 97,110,107, 0,103,114,111,117,110,100,122, 0, 98,111,105,100,102, 97, 99, 91, 56, 93,
- 0, 98,111,105,100,114,117,108,101, 91, 56, 93, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0,
- 42, 98, 98, 95,111, 98, 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,101,100,105,116, 0, 40, 42,102,114,101,101, 95,101,
-100,105,116, 41, 40, 41, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,
-112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, 99,104,101, 98,117,102,115, 0, 42,116, 97,
-114,103,101,116, 95,111, 98, 0, 42,107,101,121,101,100, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,101,102,102,101, 99,
-116,111,114,115, 0,114,101, 97, 99,116,101,118,101,110,116,115, 0,116,111,116, 99,104,105,108,100, 0,116,111,116, 99, 97, 99,
-104,101,100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, 95,112,115,121,115, 0,107,101,
-121,101,100, 95,112,115,121,115, 0,116,111,116,107,101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,
-118,110, 97,109,101, 91, 51, 93, 91, 51, 50, 93, 0,118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,
-116, 51, 0, 42,114,101,110,100,101,114,100, 97,116, 97, 0, 42, 99, 97, 99,104,101, 0, 67,100,105,115, 0, 67,118,105, 0, 91,
- 51, 93, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,101,110,100, 0,109,
- 97,120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,105,110,103, 95,108,
-101,110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0,101,102,102,
- 95,119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,115,116,101,112,115, 80,101,
-114, 70,114, 97,109,101, 0,112,114,101,114,111,108,108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,
-101,114, 95,116,121,112,101, 0,118,103,114,111,117,112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,
-118,103,114,111,117,112, 95,115,116,114,117, 99,116, 0,112,114,101,115,101,116,115, 0, 42, 99,111,108,108,105,115,105,111,110,
- 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105,111,110, 0,115,101,108,102,
-101,112,115,105,108,111,110, 0,115,101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99,111,117,
-110,116, 0,112,114,101,115,115,117,114,101, 0, 42,112,111,105,110,116,115, 0,116,111,116,112,111,105,110,116,115, 0,116,104,
-105, 99,107,110,101,115,115, 0,115,116,114,111,107,101,115, 0,102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,
-109,101, 0,103,115,116,101,112, 0,105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,
-115, 98,117,102,102,101,114, 95,115,102,108, 97,103, 0, 42,115, 98,117,102,102,101,114, 0, 42,119,105,110,100,114, 97,119, 97,
- 98,108,101, 0, 42,119,105,110, 97, 99,116,105,118,101, 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,
-101,100, 0,102,105,108,101, 95,115, 97,118,101,100, 0,111,112,101,114, 97,116,111,114,115, 0,113,117,101,117,101, 0,114,101,
-112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, 99,117,114,115,111,114,115, 0,107,101,121,109, 97,112,115, 0,
- 42,103,104,111,115,116,119,105,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 51, 50, 93, 0,112,111,115,120, 0,112,111,
-115,121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,115,111,
-114, 0, 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42,116,119,101, 97,107, 0,100,114,
- 97,119,109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, 97,116, 97, 0,116,105,109,101,
-114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, 52, 93,
- 0, 42,112,116,114, 0,115,104,105,102,116, 0, 99,116,114,108, 0, 97,108,116, 0,111,115,107,101,121, 0,107,101,121,109,111,
-100,105,102,105,101,114, 0,107,101,121,109, 97,112, 0,110, 97,109,101,105,100, 91, 54, 52, 93, 0,115,112, 97, 99,101,105,100,
- 0,114,101,103,105,111,110,105,100, 0, 42, 99,117,115,116,111,109,100, 97,116, 97, 0, 42,114,101,112,111,114,116,115, 0, 42,
-101,100, 97,116, 97, 0,105,110,102,108,117,101,110, 99,101, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0,
- 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100,
-101,114, 0,102,117,110, 99, 95,116,121,112,101, 0,109,105,100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0,
- 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99,
-121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0, 42,114,
-110, 97, 95,112, 97,116,104, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0,118,101, 99, 91, 50, 93, 0, 42,102,112,116, 0,
- 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,114, 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,111,
- 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0, 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,115, 0, 97, 99,
-116, 95,116,105,109,101, 0, 98,108,101,110,100,109,111,100,101, 0,115,116,114,105,112,115, 0,105,110,102,111, 91, 54, 52, 93,
- 0,103,114,111,117,112, 91, 54, 52, 93, 0,105,100,116,121,112,101, 0,116,101,109,112,108, 97,116,101,115, 0,103,114,111,117,
-112,109,111,100,101, 0,112, 97,116,104,115, 0,107,101,121,105,110,103,102,108, 97,103, 0,110,108, 97, 95,116,114, 97, 99,107,
-115, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105,100,101,115, 0, 84, 89, 80, 69, 0, 0, 1,154, 99,104, 97,114,
- 0,117, 99,104, 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111,
-110,103, 0,102,108,111, 97,116, 0,100,111,117, 98,108,101, 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,
-116, 97, 0, 76,105,115,116, 66, 97,115,101, 0,118,101, 99, 50,115, 0,118,101, 99, 50,105, 0,118,101, 99, 50,102, 0,118,101,
- 99, 50,100, 0,118,101, 99, 51,105, 0,118,101, 99, 51,102, 0,118,101, 99, 51,100, 0,118,101, 99, 52,105, 0,118,101, 99, 52,
-102, 0,118,101, 99, 52,100, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101,114,116,121, 68, 97,116, 97,
- 0, 73, 68, 80,114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105,108,101, 68, 97,116, 97, 0,
- 80,114,101,118,105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98,106,101, 99,116, 0, 73,112,
-111, 67,117,114,118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73,112,111, 0, 75,101,121, 66,
-108,111, 99,107, 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 83, 99,114,105,112,116, 76,105,110,107, 0, 84,101,120,
-116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101,
- 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80,
- 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0,
- 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,
-110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,101,120, 77, 97,112,112,105,110,103,
- 0, 76, 97,109,112, 0, 67,117,114,118,101, 77, 97,112,112,105,110,103, 0, 87, 97,118,101, 0, 77, 97,116,101,114,105, 97,108,
- 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, 0,
- 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, 0,
- 84,101,120,116, 66,111,120, 0, 67,117,114,118,101, 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70,111,
-110,116, 0, 77,101,115,104, 0, 77, 70, 97, 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116,
- 0, 77, 69,100,103,101, 0, 77, 68,101,102,111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0,
- 77, 83,101,108,101, 99,116, 0, 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108,116,
-105,114,101,115, 0, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 0, 77, 68,101,102,111,114,109, 87,101,
-105,103,104,116, 0, 77, 84,101,120, 80,111,108,121, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, 77,
- 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,112,101,114,116,121, 0, 77, 83,116,114,105,
-110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, 97, 99,101, 0, 77, 68,105,115,112,115, 0,
- 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 32, 40, 49, 60, 60, 49, 41, 32, 35,100,101,102,
-105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 32, 40, 49, 60, 60, 50, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 71,
- 79, 78, 32, 40, 49, 60, 60, 51, 41, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, 82,
- 32, 40, 49, 60, 60, 53, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 32, 40, 49, 60,
- 60, 55, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 32, 40, 49, 60, 60, 56, 41, 32,
- 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 32, 40, 49, 60, 60, 57, 41, 32, 32, 32, 35,100,101,102,105,110,
-101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 32,
- 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69,
- 95, 70, 76, 73, 80, 86, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 32, 49, 54, 32, 35,
-100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 32, 51, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80,
- 82, 79, 74, 89, 90, 32, 54, 52, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 32, 49, 32, 35,100,101,102,
-105,110,101, 32, 77, 69, 95, 86, 50, 86, 51, 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 32, 52, 32,
- 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 52, 86,
- 49, 32, 56, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 32, 49, 32, 35,100,101,102,105,110,101,
- 32, 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 32, 50, 32, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, 69,108,
- 32, 48, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95,
- 70, 83, 69, 76, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 49, 32, 32, 35,100,101,
-102,105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76,
- 49, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70,
- 95, 83, 69, 76, 51, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 32, 51, 50, 32, 35,100,101,102,
-105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 32, 54, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65,
- 77, 73, 67, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 32, 50, 32, 35,100,101,
-102,105,110,101, 32, 84, 70, 95, 84, 69, 88, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 86,
- 69, 82, 84, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 32, 49, 54, 32, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 73, 76,
- 69, 83, 32, 49, 50, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 32, 50, 53, 54, 32,
- 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 32, 53, 49, 50, 32, 35,100,101,102,105,110,101, 32, 84,
- 70, 95, 73, 78, 86, 73, 83, 73, 66, 76, 69, 32, 49, 48, 50, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79,
- 76, 32, 50, 48, 52, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 32, 52, 48, 57,
- 54, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 32, 56, 49, 57, 50, 32, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 66, 77, 70, 79, 78, 84, 32, 49, 54, 51, 56, 52, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 79,
- 76, 73, 68, 32, 48, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84,
- 70, 95, 65, 76, 80, 72, 65, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 32, 52, 32, 32, 32, 35,100,
-101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 32, 51, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69,
- 67, 65, 84, 69, 68, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 50, 32,
- 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 32, 52, 32, 35,100,101,102,105,
-110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80,
- 73, 78, 49, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 32, 51, 50, 32, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 80, 73, 78, 51, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 52, 32, 49, 50, 56,
- 32, 35,101,110,100,105,102, 32,108,118,108, 59, 10, 9,117,110,115,105,103,110,101,100, 32, 99,104, 97,114, 32,117,115,101, 95,
- 99,111,108, 44, 32,102,108, 97,103, 59, 10, 10, 9, 47, 42, 32, 83,112,101, 99,105, 97,108, 32,108,101,118,101,108, 32, 49, 32,
-100, 97,116, 97, 32,116,104, 97,116, 32, 99, 97,110,110,111,116, 32, 98,101, 32,109,111,100,105,102,105,101,100, 32,102,114,111,
-109, 32,111,116,104,101,114, 32,108,101,118,101,108,115, 32, 42, 47, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,118,100,
- 97,116, 97, 59, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,102,100, 97,116, 97, 59, 10, 9,115,104,111,114,116, 32, 42,
-101,100,103,101, 95,102,108, 97,103,115, 59, 10, 9, 99,104, 97,114, 32, 42,101,100,103,101, 95, 99,114,101, 97,115,101,115, 59,
- 10,125, 32, 77,117,108,116,105,114,101,115, 59, 10, 10, 47, 42, 42, 32, 69,110,100, 32, 77,117,108,116,105,114,101,115, 32, 42,
- 42, 47, 10, 10,116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,
-108,105,116,121, 32,123, 10, 9,117,110,115,105,103,110,101,100, 32,105,110,116, 32, 42,118,101,114,116, 95,109, 97,112, 59, 32,
- 47, 42, 32,118,101,114,116, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, 32, 78,101,119, 32, 73,110,100,101,
-120, 32, 42, 47, 10, 9,105,110,116, 32, 42,101,100,103,101, 95,109, 97,112, 59, 32, 47, 42, 32,101,100,103,101, 95,109, 97,112,
- 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, 32, 78,101,119, 32, 73,110,100,101,120, 44, 32, 45, 49, 61, 32,104,105,100,100,
-101,110, 32, 42, 47, 10, 9, 77, 70, 97, 99,101, 32, 42,111,108,100, 95,102, 97, 99,101,115, 59, 10, 9, 77, 69,100,103,101, 32,
- 42,111,108,100, 95,101,100,103,101,115, 59, 10, 9,117,110,115,105,103,110,101,100, 32,105,110,116, 32,116,111,116,102, 97, 99,
-101, 44, 32,116,111,116,101,100,103,101, 44, 32,116,111,116,118,101,114,116, 44, 32,112, 97,100, 59, 10,125, 32, 80, 97,114,116,
-105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 59, 10, 10, 47, 42, 32,109,118,101,114,116, 45, 62,102,108, 97,103, 32, 40,
- 49, 61, 83, 69, 76, 69, 67, 84, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69,
- 83, 84, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 77, 80, 9, 52, 10, 35,100,101,
-102,105,110,101, 32, 77, 69, 95, 72, 73, 68, 69, 9, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 69, 82,
- 84, 95, 77, 69, 82, 71, 69, 68, 9, 9, 40, 49, 60, 60, 54, 41, 10, 10, 47, 42, 32,109,101,100,103,101, 45, 62,102,108, 97,103,
- 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65,
- 87, 9, 9, 9, 40, 49, 60, 60, 49, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 9, 9, 9, 9, 40, 49,
- 60, 60, 50, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 71, 79, 78, 9, 9, 9, 9, 40, 49, 60, 60, 51, 41, 10, 9,
- 9, 9, 9, 9, 9, 47, 42, 32,114,101,115,101,114,118,101, 32, 49, 54, 32,102,111,114, 32, 77, 69, 95, 72, 73, 68, 69, 32, 42,
- 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, 82, 9, 9, 40, 49, 60, 60, 53, 41, 10,
- 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 9, 9, 40, 49, 60, 60, 55, 41, 10, 35,100,101,
-102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 9, 9, 40, 49, 60, 60, 56, 41, 10, 35,100,101,102,105,110,
-101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 9, 9, 9, 40, 49, 60, 60, 57, 41, 10, 10, 47, 42, 32,112,117,110,111, 32, 61, 32,118,
-101,114,116,101,120,110,111,114,109, 97,108, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 10, 47, 42, 32,114,101,110,100,101,114,
- 32, 97,115,115,117,109,101,115, 32,102,108,105,112,115, 32,116,111, 32, 98,101, 32,111,114,100,101,114,101,100, 32,108,105,107,
-101, 32,116,104,105,115, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 49, 9, 9, 49, 10, 35,
-100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 9, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70,
- 76, 73, 80, 86, 51, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 9, 9, 56, 10, 35,100,
-101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80,
- 82, 79, 74, 88, 90, 9, 9, 51, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 89, 90, 9, 9, 54, 52, 10,
- 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69,
- 95, 86, 49, 86, 50, 9, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 50, 86, 51, 9, 9, 9, 50, 10, 35,100,
-101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86,
- 52, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 52, 86, 49, 9, 9, 9, 56, 10, 10, 47, 42, 32,102,108,
- 97,103, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9,
- 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 65, 67, 69, 95, 83, 69, 76, 9, 9, 9, 50, 10, 9, 9, 9, 9,
- 9, 9, 47, 42, 32,102,108, 97,103, 32, 77, 69, 95, 72, 73, 68, 69, 61, 61, 49, 54, 32,105,115, 32,117,115,101,100, 32,104,101,
-114,101, 32,116,111,111, 32, 42, 47, 32, 10, 47, 42, 32,109,115,101,108,101, 99,116, 45, 62,116,121,112,101, 32, 42, 47, 10, 35,
-100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, 69,108, 9, 48, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 83, 69,108,
- 32, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45,
- 62,102,108, 97,103, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 9, 49, 32, 47, 42, 32,
-117,115,101, 32, 77, 70, 97, 99,101, 32,104,105,100,101, 32,102,108, 97,103, 32, 40, 97,102,116,101,114, 32, 50, 46, 52, 51, 41,
- 44, 32,115,104,111,117,108,100, 32, 98,101, 32, 97, 98,108,101, 32,116,111, 32,114,101,117,115,101, 32, 97,102,116,101,114, 32,
- 50, 46, 52, 52, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 67, 84, 73, 86, 69, 9, 50, 32, 47, 42, 32,100,
-101,112,114,101, 99, 97,116,101,100, 33, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 9, 9, 52,
- 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 9, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83,
- 69, 76, 51, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 9, 9, 51, 50, 10, 35,100,101,102,
-105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 9, 9, 54, 52, 32, 47, 42, 32,117,110,117,115,101,100, 44, 32,115, 97,109,101, 32,
- 97,115, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 42, 47, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,109,111,100,101,
- 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 9, 9, 49, 10, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 69, 88, 9,
- 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 86, 69, 82, 84, 9, 56, 10, 35,100,101,102,
-105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 9, 9, 49, 54, 10, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65,
- 82, 69, 68, 67, 79, 76, 9, 54, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 73, 76, 69, 83, 9, 9, 49, 50, 56, 10,
- 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 9, 50, 53, 54, 10, 35,100,101,102,105,110,101,
- 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 73, 78, 86, 73,
- 83, 73, 66, 76, 69, 9, 49, 48, 50, 52, 10, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79, 76, 9, 9, 50, 48,
- 52, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 9, 52, 48, 57, 54, 9, 47, 42,
- 32,119,105,116,104, 32, 90, 32, 97,120,105,115, 32, 99,111,110,115,116,114, 97,105,110,116, 32, 42, 47, 10, 35,100,101,102,105,
-110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 77,
- 70, 79, 78, 84, 9, 9, 49, 54, 51, 56, 52, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,116,114, 97,110,115,112, 44, 32,
-118, 97,108,117,101,115, 32, 49, 45, 52, 32, 97,114,101, 32,117,115,101,100, 32, 97,115, 32,102,108, 97,103,115, 32,105,110, 32,
-116,104,101, 32, 71, 76, 44, 32, 87, 65, 82, 78, 73, 78, 71, 44, 32, 84, 70, 95, 83, 85, 66, 32, 99, 97,110,116, 32,119,111,114,
-107, 32,119,105,116,104, 32,116,104,105,115, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 79, 76, 73, 68, 9,
- 48, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65,
- 76, 80, 72, 65, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 9, 9, 52, 32, 47, 42, 32, 99,108,105,
-112,109, 97,112, 32, 97,108,112,104, 97, 47, 98,105,110, 97,114,121, 32, 97,108,112,104, 97, 32, 97,108,108, 32,111,114, 32,110,
-111,116,104,105,110,103, 33, 32, 42, 47, 10, 10, 47, 42, 32,115,117, 98, 32,105,115, 32,110,111,116, 32, 97,118, 97,105,108, 97,
- 98,108,101, 32,105,110, 32,116,104,101, 32,117,115,101,114, 32,105,110,116,101,114,102, 97, 99,101, 32, 97,110,121,109,111,114,
-101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 9, 9, 51, 10, 10, 10, 47, 42, 32,109,116,102, 97,
- 99,101, 45, 62,117,110,119,114, 97,112, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65,
- 84, 69, 68, 49, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 50, 9, 50, 10,
- 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 9, 52, 10, 35,100,101,102,105,110,101,
- 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78,
- 49, 9, 9, 32, 32, 32, 32, 49, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, 9, 32, 32, 32, 32, 51,
- 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 10, 35,100,101,102,105,110,
-101, 32, 84, 70, 95, 80, 73, 78, 52, 9, 32, 32, 32, 32, 9, 49, 50, 56, 10, 10, 35,101,110,100,105,102, 10, 32, 79, 67, 75, 33,
- 99,116, 32, 77, 86,101,114,116, 59, 32,115,116,114,117, 99,116, 32, 77, 69,100,103,101, 59, 32,115,116,114,117, 99,116, 32, 77,
- 70, 97, 99,101, 59, 32,115,116,114,117, 99,116, 32, 77, 67,111,108, 59, 32,115,116,114,117, 99,116, 32, 77, 83,116,105, 99,107,
-121, 59, 32,115,116,114,117, 99,116, 32, 77,101,115,104, 59, 32,115,116,114,117, 99,116, 32, 79, 99, 73,110,102,111, 59, 32,115,
-116,114,117, 99,116, 32, 77,117,108,116,105,114,101,115, 59, 32,115,116,114,117, 99,116, 32, 80, 97,114,116,105, 97,108, 86,105,
-115,105, 98,105,108,105,116,121, 59, 32,115,116,114,117, 99,116, 32, 69,100,105,116, 77,101,115,104, 59, 32, 32,116,121,112,101,
-100,101,102, 32,115,116,114,117, 99,116, 32, 77,101,115,104, 32,123, 32, 32, 73, 68, 32,105,100, 59, 32, 32, 32,115,116,114,117,
- 99,116, 32, 66,111,117,110,100, 66,111,120, 32, 42, 98, 98, 59, 32, 32, 32, 76,105,115,116, 66, 97,115,101, 32,101,102,102,101,
- 99,116, 59, 32, 32, 32, 32,115,116,114,117, 99,116, 32, 73,112,111, 32, 42,105,112,111, 59, 32, 32,115,116,114,117, 99,116, 32,
- 75,101,121, 32, 42,107,101,121, 59, 32, 32,115,192, 0, 77,117,108,116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,
-101,115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 69,
-100,103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,
-117, 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 77,111,100,105,102,105,
-101,114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,117,105,108,100, 77,111,
-100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,114, 97,
-121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,111,100,105,102,105,101,114, 68, 97,116, 97,
- 0, 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,101,118,101,108, 77,111,100,105,
-102,105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,105,115,112,108,
- 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99,116, 77,111,100,105,102,105,101,
-114, 68, 97,116, 97, 0, 68,101, 99,105,109, 97,116,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,111,116,
-104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,
- 97,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, 77,111,100,105,102,105,101,114,
- 68, 97,116, 97, 0, 72,111,111,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,102,116, 98,111,100,121, 77,111,
-100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,
-116,104, 0, 67,108,111,116,104, 83,105,109, 83,101,116,116,105,110,103,115, 0, 67,108,111,116,104, 67,111,108,108, 83,101,116,
-116,105,110,103,115, 0, 80,111,105,110,116, 67, 97, 99,104,101, 0, 67,111,108,108,105,115,105,111,110, 77,111,100,105,102,105,
-101,114, 68, 97,116, 97, 0, 66, 86, 72, 84,114,101,101, 0, 83,117,114,102, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,
-116, 97, 0, 68,101,114,105,118,101,100, 77,101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,114,111,109, 77,101,115,104, 0, 66,
-111,111,108,101, 97,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73,110,102,108,117,101,110, 99,101,
- 0, 77, 68,101,102, 67,101,108,108, 0, 77,101,115,104, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97,
- 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,
-105, 99,108,101, 83,121,115,116,101,109, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,
-105,101,114, 68, 97,116, 97, 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,
-105,114,101,115, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,
-114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,
-112, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,
-101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 98, 65, 99,116,
-105,111,110, 0, 98, 80,111,115,101, 0, 66,117,108,108,101,116, 83,111,102,116, 66,111,100,121, 0, 80, 97,114,116, 68,101,102,
-108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72,111,111,107, 0, 82, 78, 71, 0, 83, 66, 86,101,114,116,101,
-120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,114, 97,116, 99,104,
- 0, 87,111,114,108,100, 0, 82, 97,100,105,111, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,
-117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 70, 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116,
- 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101,110,101, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 82,101,110,
-100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, 70,114, 97,109,105,110,
-103, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0,
- 66,114,117,115,104, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101,
- 69,100,105,116, 83,101,116,116,105,110,103,115, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,
-110, 0, 83, 99,117,108,112,116, 0, 83, 99,117,108,112,116, 83,101,115,115,105,111,110, 0, 86, 80, 97,105,110,116, 0, 84,111,
-111,108, 83,101,116,116,105,110,103,115, 0, 98, 83,116, 97,116,115, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103,
- 70,111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, 0, 98, 71, 80,100, 97,116,
- 97, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,116,111,112,111, 86,105,101,119, 68, 97,116, 97, 0, 86,105,101,119,
- 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,114,101, 0,119,109, 84,105,109,101,114, 0, 86,
-105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119, 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111,
- 0, 98, 83, 99,114,101,101,110, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116, 0, 83,112, 97,
- 99,101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 83,101,
-108,101, 99,116, 80, 97,114, 97,109,115, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116,111,114, 0, 70,
-105,108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114,101, 0, 84,114,
-101,101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83,112, 97, 99,101, 78,108, 97, 0,
- 83,112, 97, 99,101, 84,101,120,116, 0, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 83, 99,114,105,112,116, 0, 83,112, 97,
- 99,101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 73,109, 97, 83,101,108, 0,117,105, 70,
-111,110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105,100,103,101,116,
- 67,111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, 84,104,101,109,101, 87,
-105,114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 83,111,108,105,100, 76,105,103,104,116, 0, 85,115,101,114, 68,
-101,102, 0, 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,
-112,101, 0,117,105, 76, 97,121,111,117,116, 0, 72,101, 97,100,101,114, 0, 72,101, 97,100,101,114, 84,121,112,101, 0, 77,101,
-110,117, 0, 77,101,110,117, 84,121,112,101, 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,
-101,103,105,111,110, 0, 65, 82,101,103,105,111,110, 84,121,112,101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,
-105,112, 69,108,101,109, 0, 84, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,112, 67,114,111,112, 0, 83,116,114,105,
-112, 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 83,116,114,
-105,112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,113, 0, 83,101,113,117,101,110, 99,101,
- 0, 98, 83,111,117,110,100, 0,104,100, 97,117,100,105,111, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 69,100,105,116,105,110,
-103, 0, 87,105,112,101, 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,
-115, 0, 83,111,108,105,100, 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,
-115, 0, 69,102,102,101, 99,116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,
-108,101, 0, 87, 97,118,101, 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114,
- 0, 98, 77,111,117,115,101, 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,
-111, 97,114,100, 83,101,110,115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117,
- 97,116,111,114, 83,101,110,115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,
-111,110, 83,101,110,115,111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,
-115,111,114, 0, 98, 82, 97,121, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114, 0, 98, 83,
-101,110,115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,110,115,111,
-114, 0, 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116, 0, 98, 65,
- 99,116,117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65, 99,116,105,
-111,110, 65, 99,116,117, 97,116,111,114, 0, 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 68, 65, 99,116,
-117, 97,116,111,114, 0, 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110,101,
- 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106,101,
- 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, 65,
- 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114,111,
-117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115,115,
- 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, 98,
-105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116,111,
-114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111,114,
- 0, 70,114,101,101, 67, 97,109,101,114, 97, 0, 98, 83, 97,109,112,108,101, 0, 98, 83,111,117,110,100, 76,105,115,116,101,110,
-101,114, 0, 83,112, 97, 99,101, 83,111,117,110,100, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98,
- 65,114,109, 97,116,117,114,101, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 65, 99,116,105,111,110, 71,114,111,
-117,112, 0, 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,
-111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,
-110,115,116,114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116,
- 0, 98, 75,105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,107, 84,111, 67,111,
-110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98,
- 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 77,105,110, 77, 97,120, 67,111,110,115,
-116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,
-111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,
-116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,116,114,101,116, 99,104,
- 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,105,103,105,100, 66,111,100,121, 74,111,105,110,116, 67,111,110,115,
-116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,104,105,108,100,
- 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115,102,111,114,109, 67,111,110,115,116,114, 97,105,110,
-116, 0, 98, 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105,116, 67,
-111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98,
- 68,105,115,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97,112, 67,
-111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,101,114, 0, 98, 65, 99,116,105,111,
-110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 0, 98, 78,
-111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,111,100,101,
- 84,121,112,101, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, 78,111,100,101, 66,108,117,114, 68, 97,116, 97, 0,
- 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, 97,116,101,114, 97,108, 66,108,117,114, 68,
- 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, 73,109, 97,103,101, 70,105,108,101, 0, 78,111,100,
-101, 67,104,114,111,109, 97, 0, 78,111,100,101, 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111, 97,116,115,
- 0, 78,111,100,101, 71,101,111,109,101,116,114,121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,111,100,101,
- 68,101,102,111, 99,117,115, 0, 78,111,100,101, 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101,
- 0, 78,111,100,101, 84,111,110,101,109, 97,112, 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 84,101,120, 78,111,100,
-101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,114,118,101, 77, 97,112, 0, 66,
-114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,114, 0, 72, 97,105,114, 75,101,
-121, 0, 80, 97,114,116,105, 99,108,101, 75,101,121, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116,
-105, 99,108,101, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,
-108,101, 69,100,105,116, 0, 80, 97,114,116,105, 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 76,105,110,107, 78,111,100,101,
- 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101,
- 0, 98, 71, 80, 68,108, 97,121,101,114, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,
-100,111,119, 0,119,109, 69,118,101,110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,116,117,114,
-101, 0,119,109, 75,101,121,109, 97,112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,101,121, 77,
- 97,112, 0,119,109, 79,112,101,114, 97,116,111,114, 84,121,112,101, 0, 82,101,112,111,114,116, 76,105,115,116, 0, 70, 77,111,
-100,105,102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,
-112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115,
- 0, 70, 77,111,100, 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,
-105,115,101, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70,
- 80,111,105,110,116, 0, 70, 67,117,114,118,101, 0, 65,110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,
-112,101,114, 0, 78,108, 97, 83,116,114,105,112, 0, 78,108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,
-121,105,110,103, 83,101,116, 0, 65,110,105,109, 79,118,101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,
-116,101, 0, 0, 84, 76, 69, 78, 0, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 0, 0, 8, 0, 12,
- 0, 8, 0, 4, 0, 8, 0, 8, 0, 16, 0, 12, 0, 12, 0, 24, 0, 16, 0, 16, 0, 32, 0, 16, 0, 16, 0, 20, 0, 76, 0, 52,
- 2, 40, 0, 0, 0, 32, 0,140, 3, 80, 0, 92, 0, 36, 0, 56, 0, 84, 0,112, 0,124, 0, 40, 0, 16, 0, 24, 0, 40, 0,120,
- 0, 12, 0,136, 0, 36, 4,248, 1,124, 0, 0, 0, 0, 0, 0, 0,136, 1, 24, 1, 84, 0, 24, 3, 8, 0,168, 0, 0, 0,140,
- 0,132, 1,132, 1, 8, 0, 56, 2,112, 0, 76, 1, 60, 0, 0, 0,108, 0,104, 0,140, 0, 56, 0, 8, 0, 16, 1, 76, 0, 0,
- 0, 0, 0, 0, 1, 24, 0, 20, 0, 44, 0, 60, 0, 24, 0, 12, 0, 12, 0, 4, 0, 8, 0, 8, 0, 0, 0, 24, 0, 76, 0, 32,
- 0, 8, 0, 12, 0, 8, 0, 8, 0, 4, 0, 4, 1, 0, 0, 32, 0, 12, 0, 0, 0, 16, 0, 64, 0, 24, 0, 12, 0, 40, 0, 56,
- 0, 72, 0, 92, 0,100, 0, 72, 0,100, 0,120, 0, 68, 0, 64, 0,112, 0, 64, 0,152, 0,156, 0, 64, 0, 96, 0,108, 0,188,
- 0,104, 0,184, 0, 56, 0, 76, 0, 0, 0,132, 0, 28, 0, 20, 0,104, 0, 0, 0, 64, 0, 0, 0, 0, 0, 68, 0, 8, 0, 8,
- 0,220, 0, 80, 1, 68, 0, 68, 0, 68, 0, 68, 0, 64, 1,164, 0,112, 0,108, 0,188, 0, 40, 0, 92, 0, 56, 0,112, 0,128,
- 0,152, 0,208, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 1,104, 0, 40, 0, 28, 0,176, 0,144, 0, 52, 0, 16, 0, 72, 3,224,
- 0, 56, 0, 16, 0, 80, 0, 16, 0,196, 0, 8, 0, 76, 0, 80, 0, 32, 0, 0, 0, 32, 1, 12, 0, 32, 0, 0, 0, 0, 0, 64,
- 2,152, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 0, 40, 0,136, 0, 48, 0,136, 0,196, 0, 20, 0,224, 0,204,
- 0, 44, 0, 0, 0, 0, 0, 92, 0, 0, 0,248, 0, 12, 0, 12, 0,136, 0,184, 2,124, 2, 80, 0, 40, 0,168, 0,232, 2,136,
- 1, 16, 0, 24, 0,192, 0, 32, 1,176, 1, 16, 0, 16, 19, 8, 0, 56, 11, 40, 0, 20, 0, 24, 0,240, 0, 0, 0, 0, 0, 8,
- 0, 0, 0, 8, 0, 0, 0,112, 0, 0, 0,236, 0, 0, 0, 32, 0, 80, 0, 28, 0, 16, 0, 8, 0, 52, 0,160, 0,240, 1,168,
- 0,204, 1, 28, 0, 0, 0, 16, 2, 24, 0, 12, 0, 24, 0, 48, 0, 16, 0, 20, 0, 16, 0, 24, 1, 56, 0, 0, 0, 56, 0, 64,
- 0, 48, 0, 8, 0, 44, 0, 72, 0,104, 0, 40, 0, 8, 0, 72, 0, 44, 0, 40, 0,108, 0, 68, 0, 76, 0, 80, 0, 60, 0,128,
- 0, 4, 0, 60, 0, 12, 0, 92, 0, 28, 0, 20, 0, 80, 0, 16, 0, 76, 0,104, 0, 84, 0, 28, 0, 96, 0, 60, 0, 56, 0,108,
- 0,140, 0, 4, 0, 20, 0, 12, 0, 8, 0, 40, 0, 0, 0, 68, 0,184, 0, 24, 1, 4, 0,120, 1,172, 0,104, 0,216, 0, 64,
- 0, 44, 0, 64, 0,116, 0, 60, 0,104, 0, 52, 0, 44, 0, 44, 0, 68, 0, 44, 0, 64, 0, 44, 0, 20, 0, 52, 0, 96, 0, 12,
- 0,108, 0, 92, 0, 28, 0, 28, 0, 28, 0, 52, 0, 20, 0, 60, 0,140, 0, 36, 0,120, 0, 32, 0,208, 0, 0, 0, 0, 0, 16,
- 0, 40, 0, 28, 0, 12, 0, 12, 1, 16, 0, 40, 0, 8, 0, 8, 0, 64, 0, 32, 0, 24, 0, 8, 0, 24, 0, 32, 0, 8, 0, 32,
- 0, 12, 0, 44, 0, 20, 0, 68, 0, 24, 0, 56, 0, 72, 0,252, 1,224, 0, 0, 0, 0, 0, 0, 0, 16, 0, 20, 0, 24, 0,172,
- 0,124, 0,144, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 88, 0, 0, 0, 0, 0, 88, 1, 20, 0, 16, 0, 20, 0, 8, 0, 8,
- 0, 24, 0, 20, 0, 88, 1, 24, 0, 16, 0, 68, 1, 0, 0, 20, 0,160, 0, 88, 0, 96, 0, 88, 0, 20, 0, 56, 83, 84, 82, 67,
- 0, 0, 1, 94, 0, 10, 0, 2, 0, 10, 0, 0, 0, 10, 0, 1, 0, 11, 0, 3, 0, 11, 0, 0, 0, 11, 0, 1, 0, 9, 0, 2,
- 0, 12, 0, 2, 0, 9, 0, 3, 0, 9, 0, 4, 0, 13, 0, 2, 0, 2, 0, 5, 0, 2, 0, 6, 0, 14, 0, 2, 0, 4, 0, 5,
- 0, 4, 0, 6, 0, 15, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0, 16, 0, 2, 0, 8, 0, 5, 0, 8, 0, 6, 0, 17, 0, 3,
- 0, 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 18, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 19, 0, 3,
- 0, 8, 0, 5, 0, 8, 0, 6, 0, 8, 0, 7, 0, 20, 0, 4, 0, 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 4, 0, 8,
- 0, 21, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 8, 0, 22, 0, 4, 0, 8, 0, 5, 0, 8, 0, 6,
- 0, 8, 0, 7, 0, 8, 0, 8, 0, 23, 0, 4, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 11, 0, 4, 0, 12, 0, 24, 0, 4,
- 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 25, 0, 4, 0, 9, 0, 13, 0, 12, 0, 14, 0, 4, 0, 15,
- 0, 4, 0, 16, 0, 26, 0, 10, 0, 26, 0, 0, 0, 26, 0, 1, 0, 0, 0, 17, 0, 0, 0, 18, 0, 2, 0, 19, 0, 0, 0, 20,
- 0, 4, 0, 21, 0, 25, 0, 22, 0, 4, 0, 23, 0, 4, 0, 24, 0, 27, 0, 9, 0, 9, 0, 0, 0, 9, 0, 1, 0, 27, 0, 25,
- 0, 28, 0, 26, 0, 0, 0, 27, 0, 2, 0, 28, 0, 2, 0, 19, 0, 4, 0, 29, 0, 26, 0, 30, 0, 28, 0, 8, 0, 27, 0, 31,
- 0, 27, 0, 32, 0, 29, 0, 33, 0, 0, 0, 34, 0, 0, 0, 35, 0, 4, 0, 36, 0, 4, 0, 37, 0, 28, 0, 38, 0, 30, 0, 6,
- 0, 4, 0, 39, 0, 4, 0, 40, 0, 2, 0, 41, 0, 2, 0, 42, 0, 2, 0, 43, 0, 4, 0, 44, 0, 31, 0, 6, 0, 32, 0, 45,
- 0, 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 0, 48, 0, 33, 0, 21, 0, 33, 0, 0, 0, 33, 0, 1,
- 0, 34, 0, 49, 0, 35, 0, 50, 0, 24, 0, 51, 0, 24, 0, 52, 0, 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 53, 0, 2, 0, 54,
- 0, 2, 0, 55, 0, 2, 0, 56, 0, 2, 0, 19, 0, 2, 0, 57, 0, 7, 0, 11, 0, 7, 0, 12, 0, 4, 0, 58, 0, 7, 0, 59,
- 0, 7, 0, 60, 0, 7, 0, 61, 0, 31, 0, 62, 0, 36, 0, 7, 0, 27, 0, 31, 0, 12, 0, 63, 0, 24, 0, 64, 0, 2, 0, 46,
- 0, 2, 0, 65, 0, 2, 0, 66, 0, 2, 0, 37, 0, 37, 0, 16, 0, 37, 0, 0, 0, 37, 0, 1, 0, 7, 0, 67, 0, 7, 0, 61,
- 0, 2, 0, 17, 0, 2, 0, 47, 0, 2, 0, 68, 0, 2, 0, 19, 0, 4, 0, 69, 0, 4, 0, 70, 0, 9, 0, 2, 0, 7, 0, 71,
- 0, 0, 0, 20, 0, 0, 0, 72, 0, 7, 0, 73, 0, 7, 0, 74, 0, 38, 0, 13, 0, 27, 0, 31, 0, 39, 0, 75, 0, 37, 0, 76,
- 0, 0, 0, 77, 0, 4, 0, 78, 0, 7, 0, 61, 0, 12, 0, 79, 0, 36, 0, 80, 0, 27, 0, 81, 0, 2, 0, 17, 0, 2, 0, 82,
- 0, 2, 0, 83, 0, 2, 0, 19, 0, 40, 0, 5, 0, 27, 0, 84, 0, 2, 0, 85, 0, 2, 0, 86, 0, 2, 0, 87, 0, 4, 0, 37,
- 0, 41, 0, 6, 0, 41, 0, 0, 0, 41, 0, 1, 0, 0, 0, 88, 0, 0, 0, 89, 0, 4, 0, 23, 0, 4, 0, 90, 0, 42, 0, 10,
- 0, 42, 0, 0, 0, 42, 0, 1, 0, 4, 0, 91, 0, 4, 0, 92, 0, 4, 0, 93, 0, 4, 0, 43, 0, 4, 0, 14, 0, 4, 0, 94,
- 0, 0, 0, 95, 0, 0, 0, 96, 0, 43, 0, 15, 0, 27, 0, 31, 0, 0, 0, 97, 0, 4, 0, 94, 0, 4, 0, 98, 0, 12, 0, 99,
- 0, 41, 0,100, 0, 41, 0,101, 0, 4, 0,102, 0, 4, 0,103, 0, 12, 0,104, 0, 0, 0,105, 0, 4, 0,106, 0, 4, 0,107,
- 0, 9, 0,108, 0, 8, 0,109, 0, 44, 0, 3, 0, 4, 0,110, 0, 4, 0,111, 0, 9, 0, 2, 0, 45, 0, 21, 0, 27, 0, 31,
- 0, 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116,
- 0, 7, 0,117, 0, 7, 0,118, 0, 7, 0,119, 0, 7, 0,120, 0, 7, 0,121, 0, 7, 0,122, 0, 2, 0,123, 0, 2, 0,124,
- 0, 7, 0,125, 0, 36, 0, 80, 0, 40, 0,126, 0, 32, 0,127, 0, 46, 0, 13, 0, 4, 0,128, 0, 4, 0,129, 0, 4, 0,130,
- 0, 4, 0,131, 0, 2, 0,132, 0, 2, 0,133, 0, 2, 0, 19, 0, 2, 0,134, 0, 2, 0,135, 0, 2, 0,136, 0, 2, 0,137,
- 0, 2, 0,138, 0, 47, 0,139, 0, 48, 0, 31, 0, 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,140, 0, 49, 0,141, 0, 50, 0,142,
- 0, 51, 0,143, 0, 2, 0,134, 0, 2, 0, 19, 0, 2, 0,144, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0, 4, 0,145,
- 0, 2, 0,146, 0, 2, 0,147, 0, 2, 0,148, 0, 2, 0,149, 0, 2, 0,150, 0, 2, 0,151, 0, 4, 0,152, 0, 4, 0,153,
- 0, 44, 0,154, 0, 30, 0,155, 0, 7, 0,156, 0, 4, 0,157, 0, 2, 0,158, 0, 2, 0,159, 0, 2, 0,160, 0, 2, 0,161,
- 0, 7, 0,162, 0, 7, 0,163, 0, 52, 0, 31, 0, 2, 0,164, 0, 2, 0,165, 0, 2, 0,166, 0, 2, 0,167, 0, 32, 0,168,
- 0, 53, 0,169, 0, 0, 0,170, 0, 0, 0,171, 0, 0, 0,172, 0, 0, 0,173, 0, 0, 0,174, 0, 7, 0,175, 0, 7, 0,176,
- 0, 2, 0,177, 0, 2, 0,178, 0, 2, 0,179, 0, 2, 0,180, 0, 2, 0,181, 0, 2, 0,182, 0, 2, 0,183, 0, 7, 0,184,
- 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0, 57, 0, 7, 0,189, 0, 7, 0,190, 0, 7, 0,191,
- 0, 7, 0,192, 0, 7, 0,193, 0, 54, 0, 15, 0, 0, 0,194, 0, 9, 0,195, 0, 0, 0,196, 0, 0, 0,197, 0, 4, 0,198,
- 0, 4, 0,199, 0, 9, 0,200, 0, 7, 0,201, 0, 7, 0,202, 0, 7, 0,203, 0, 4, 0,204, 0, 9, 0,205, 0, 9, 0,206,
- 0, 4, 0,207, 0, 4, 0, 37, 0, 55, 0, 6, 0, 7, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,208, 0, 7, 0, 67,
- 0, 4, 0, 64, 0, 56, 0, 5, 0, 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,209, 0, 55, 0,203, 0, 57, 0, 17,
- 0, 32, 0,168, 0, 48, 0,210, 0, 58, 0,211, 0, 7, 0,212, 0, 7, 0,213, 0, 2, 0, 17, 0, 2, 0,214, 0, 7, 0,114,
- 0, 7, 0,115, 0, 7, 0,215, 0, 4, 0,216, 0, 2, 0,217, 0, 2, 0,218, 0, 4, 0,134, 0, 4, 0,145, 0, 2, 0,219,
- 0, 2, 0,220, 0, 53, 0, 57, 0, 27, 0, 31, 0, 39, 0, 75, 0, 7, 0,221, 0, 7, 0,222, 0, 7, 0,223, 0, 7, 0,224,
- 0, 7, 0,225, 0, 7, 0,226, 0, 7, 0,227, 0, 7, 0,228, 0, 7, 0,229, 0, 7, 0,230, 0, 7, 0,231, 0, 7, 0,232,
- 0, 7, 0,233, 0, 7, 0,234, 0, 7, 0,235, 0, 7, 0,236, 0, 7, 0,237, 0, 7, 0,238, 0, 7, 0,239, 0, 7, 0,240,
- 0, 2, 0,241, 0, 2, 0,242, 0, 2, 0,243, 0, 2, 0,244, 0, 2, 0,245, 0, 2, 0,246, 0, 2, 0,247, 0, 2, 0, 19,
- 0, 2, 0, 17, 0, 2, 0,214, 0, 7, 0,248, 0, 7, 0,249, 0, 7, 0,250, 0, 7, 0,251, 0, 2, 0,252, 0, 2, 0,253,
- 0, 2, 0,254, 0, 2, 0,132, 0, 4, 0, 23, 0, 4, 0,129, 0, 4, 0,130, 0, 4, 0,131, 0, 7, 0,255, 0, 7, 1, 0,
- 0, 7, 0,190, 0, 46, 1, 1, 0, 59, 1, 2, 0, 36, 0, 80, 0, 48, 0,210, 0, 54, 1, 3, 0, 56, 1, 4, 0, 57, 1, 5,
- 0, 30, 0,155, 0, 0, 1, 6, 0, 0, 1, 7, 0, 60, 0, 8, 0, 7, 1, 8, 0, 7, 1, 9, 0, 7, 0,176, 0, 4, 0, 19,
- 0, 7, 1, 10, 0, 7, 1, 11, 0, 7, 1, 12, 0, 32, 0, 45, 0, 61, 0, 81, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17,
- 0, 2, 0, 19, 0, 4, 1, 13, 0, 2, 0,178, 0, 2, 1, 14, 0, 7, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187,
- 0, 7, 1, 15, 0, 7, 1, 16, 0, 7, 1, 17, 0, 7, 1, 18, 0, 7, 1, 19, 0, 7, 1, 20, 0, 7, 1, 21, 0, 7, 1, 22,
- 0, 7, 1, 23, 0, 7, 1, 24, 0, 7, 1, 25, 0, 62, 1, 26, 0, 2, 1, 27, 0, 2, 0, 70, 0, 7, 0,114, 0, 7, 0,115,
- 0, 7, 1, 28, 0, 7, 1, 29, 0, 7, 1, 30, 0, 2, 1, 31, 0, 2, 1, 32, 0, 2, 1, 33, 0, 2, 1, 34, 0, 0, 1, 35,
- 0, 0, 1, 36, 0, 2, 1, 37, 0, 2, 1, 38, 0, 2, 1, 39, 0, 2, 1, 40, 0, 2, 1, 41, 0, 7, 1, 42, 0, 7, 1, 43,
- 0, 7, 1, 44, 0, 7, 1, 45, 0, 2, 1, 46, 0, 2, 0, 43, 0, 2, 1, 47, 0, 2, 1, 48, 0, 2, 1, 49, 0, 2, 1, 50,
- 0, 7, 1, 51, 0, 7, 1, 52, 0, 7, 1, 53, 0, 7, 1, 54, 0, 7, 1, 55, 0, 7, 1, 56, 0, 7, 1, 57, 0, 7, 1, 58,
- 0, 7, 1, 59, 0, 7, 1, 60, 0, 7, 1, 61, 0, 7, 1, 62, 0, 2, 1, 63, 0, 2, 1, 64, 0, 4, 1, 65, 0, 4, 1, 66,
- 0, 2, 1, 67, 0, 2, 1, 68, 0, 2, 1, 69, 0, 2, 1, 70, 0, 7, 1, 71, 0, 7, 1, 72, 0, 7, 1, 73, 0, 7, 1, 74,
- 0, 2, 1, 75, 0, 2, 1, 76, 0, 52, 1, 77, 0, 36, 0, 80, 0, 30, 0,155, 0, 40, 0,126, 0, 63, 0, 2, 0, 27, 0, 31,
- 0, 36, 0, 80, 0, 64, 0,130, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 1, 78, 0, 2, 0, 19, 0, 7, 0,184, 0, 7, 0,185,
- 0, 7, 0,186, 0, 7, 1, 79, 0, 7, 1, 80, 0, 7, 1, 81, 0, 7, 1, 82, 0, 7, 1, 83, 0, 7, 1, 84, 0, 7, 1, 85,
- 0, 7, 1, 86, 0, 7, 1, 87, 0, 7, 1, 88, 0, 7, 1, 89, 0, 7, 1, 90, 0, 7, 1, 91, 0, 7, 1, 92, 0, 7, 1, 93,
- 0, 7, 1, 94, 0, 7, 1, 95, 0, 7, 1, 96, 0, 7, 1, 97, 0, 7, 1, 98, 0, 7, 1, 99, 0, 7, 1,100, 0, 7, 1,101,
- 0, 7, 1,102, 0, 7, 1,103, 0, 7, 1,104, 0, 7, 1,105, 0, 2, 1,106, 0, 2, 1,107, 0, 2, 1,108, 0, 0, 1,109,
- 0, 0, 1,110, 0, 7, 1,111, 0, 7, 1,112, 0, 2, 1,113, 0, 2, 1,114, 0, 7, 1,115, 0, 7, 1,116, 0, 7, 1,117,
- 0, 7, 1,118, 0, 2, 1,119, 0, 2, 1,120, 0, 4, 1, 13, 0, 4, 1,121, 0, 2, 1,122, 0, 2, 1,123, 0, 2, 1,124,
- 0, 2, 1,125, 0, 7, 1,126, 0, 7, 1,127, 0, 7, 1,128, 0, 7, 1,129, 0, 7, 1,130, 0, 7, 1,131, 0, 7, 1,132,
- 0, 7, 1,133, 0, 7, 1,134, 0, 7, 1,135, 0, 0, 1,136, 0, 7, 1,137, 0, 7, 1,138, 0, 7, 1,139, 0, 4, 1,140,
- 0, 0, 1,141, 0, 0, 1, 47, 0, 0, 1,142, 0, 0, 1, 6, 0, 2, 1,143, 0, 2, 1,144, 0, 2, 1, 64, 0, 2, 1,145,
- 0, 2, 1,146, 0, 2, 1,147, 0, 7, 1,148, 0, 7, 1,149, 0, 7, 1,150, 0, 7, 1,151, 0, 7, 1,152, 0, 2, 0,164,
- 0, 2, 0,165, 0, 56, 1,153, 0, 56, 1,154, 0, 0, 1,155, 0, 0, 1,156, 0, 0, 1,157, 0, 0, 1,158, 0, 2, 1,159,
- 0, 2, 1,160, 0, 7, 1,161, 0, 7, 1,162, 0, 52, 1, 77, 0, 59, 1, 2, 0, 36, 0, 80, 0, 65, 1,163, 0, 30, 0,155,
- 0, 7, 1,164, 0, 7, 1,165, 0, 7, 1,166, 0, 7, 1,167, 0, 7, 1,168, 0, 2, 1,169, 0, 2, 0, 70, 0, 7, 1,170,
- 0, 7, 1,171, 0, 7, 1,172, 0, 7, 1,173, 0, 7, 1,174, 0, 7, 1,175, 0, 7, 1,176, 0, 7, 1,177, 0, 7, 1,178,
- 0, 2, 1,179, 0, 2, 1,180, 0, 7, 1,181, 0, 7, 1,182, 0, 7, 1,183, 0, 7, 1,184, 0, 7, 1,185, 0, 4, 1,186,
- 0, 4, 1,187, 0, 4, 1,188, 0, 40, 0,126, 0, 12, 1,189, 0, 66, 0, 4, 0, 27, 0, 31, 0, 0, 1,190, 0, 67, 0, 2,
- 0, 44, 0,154, 0, 68, 0, 26, 0, 68, 0, 0, 0, 68, 0, 1, 0, 69, 1,191, 0, 4, 1,192, 0, 4, 1,193, 0, 4, 1,194,
- 0, 4, 1,195, 0, 4, 1,196, 0, 4, 1,197, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 1,198, 0, 2, 1,199, 0, 7, 0, 5,
- 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 1,200, 0, 7, 1,201, 0, 7, 1,202, 0, 7, 1,203, 0, 7, 1,204, 0, 7, 1,205,
- 0, 7, 1,206, 0, 7, 0, 23, 0, 7, 1,207, 0, 7, 1,208, 0, 70, 0, 16, 0, 27, 0, 31, 0, 69, 1,191, 0, 12, 1,209,
- 0, 12, 1,210, 0, 12, 1,211, 0, 36, 0, 80, 0, 64, 1,212, 0, 2, 0, 19, 0, 2, 1,213, 0, 4, 0,177, 0, 7, 1, 8,
- 0, 7, 0,176, 0, 7, 1, 9, 0, 7, 1,214, 0, 7, 1,215, 0, 7, 1,216, 0, 35, 0, 11, 0, 7, 1,217, 0, 7, 1,218,
- 0, 7, 1,219, 0, 7, 1,220, 0, 2, 0, 55, 0, 0, 1,221, 0, 0, 1,222, 0, 0, 1,223, 0, 0, 1,224, 0, 0, 1,225,
- 0, 0, 1,226, 0, 34, 0, 7, 0, 7, 1,227, 0, 7, 1,218, 0, 7, 1,219, 0, 2, 1,223, 0, 2, 1,226, 0, 7, 1,220,
- 0, 7, 0, 37, 0, 71, 0, 21, 0, 71, 0, 0, 0, 71, 0, 1, 0, 2, 0, 17, 0, 2, 1,228, 0, 2, 1,226, 0, 2, 0, 19,
- 0, 2, 1,229, 0, 2, 1,230, 0, 2, 1,231, 0, 2, 1,232, 0, 2, 1,233, 0, 2, 1,234, 0, 2, 1,235, 0, 2, 1,236,
- 0, 7, 1,237, 0, 7, 1,238, 0, 34, 0, 49, 0, 35, 0, 50, 0, 2, 1,239, 0, 2, 1,240, 0, 4, 1,241, 0, 72, 0, 5,
- 0, 2, 1,242, 0, 2, 1,228, 0, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0, 73, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6,
- 0, 7, 0, 8, 0, 7, 1,243, 0, 74, 0, 62, 0, 27, 0, 31, 0, 39, 0, 75, 0, 69, 1,191, 0, 12, 1,244, 0, 12, 1,210,
- 0, 12, 1,245, 0, 32, 1,246, 0, 32, 1,247, 0, 32, 1,248, 0, 36, 0, 80, 0, 75, 1,249, 0, 38, 1,250, 0, 64, 1,212,
- 0, 12, 1,251, 0, 7, 1, 8, 0, 7, 0,176, 0, 7, 1, 9, 0, 4, 0,177, 0, 2, 1,252, 0, 2, 1,213, 0, 2, 0, 19,
- 0, 2, 1,253, 0, 7, 1,254, 0, 7, 1,255, 0, 7, 2, 0, 0, 2, 1,231, 0, 2, 1,232, 0, 2, 2, 1, 0, 2, 2, 2,
- 0, 4, 2, 3, 0, 34, 2, 4, 0, 2, 0, 23, 0, 2, 0, 99, 0, 2, 0, 67, 0, 2, 2, 5, 0, 7, 2, 6, 0, 7, 2, 7,
- 0, 7, 2, 8, 0, 7, 2, 9, 0, 7, 2, 10, 0, 7, 2, 11, 0, 7, 2, 12, 0, 7, 2, 13, 0, 7, 2, 14, 0, 7, 2, 15,
- 0, 0, 2, 16, 0, 76, 2, 17, 0, 77, 2, 18, 0, 0, 2, 19, 0, 66, 2, 20, 0, 66, 2, 21, 0, 66, 2, 22, 0, 66, 2, 23,
- 0, 4, 2, 24, 0, 4, 2, 25, 0, 4, 2, 26, 0, 4, 0, 37, 0, 73, 2, 27, 0, 4, 2, 28, 0, 4, 2, 29, 0, 72, 2, 30,
- 0, 72, 2, 31, 0, 78, 0, 39, 0, 27, 0, 31, 0, 69, 1,191, 0, 12, 2, 32, 0, 36, 0, 80, 0, 38, 1,250, 0, 64, 1,212,
- 0, 79, 2, 33, 0, 80, 2, 34, 0, 81, 2, 35, 0, 82, 2, 36, 0, 83, 2, 37, 0, 84, 2, 38, 0, 85, 2, 39, 0, 86, 2, 40,
- 0, 78, 2, 41, 0, 87, 2, 42, 0, 88, 2, 43, 0, 89, 2, 44, 0, 89, 2, 45, 0, 89, 2, 46, 0, 4, 0, 54, 0, 4, 2, 47,
- 0, 4, 2, 48, 0, 4, 2, 49, 0, 4, 2, 50, 0, 4, 0,177, 0, 7, 1, 8, 0, 7, 0,176, 0, 7, 1, 9, 0, 7, 2, 51,
- 0, 4, 2, 52, 0, 2, 2, 53, 0, 2, 0, 19, 0, 2, 2, 54, 0, 2, 2, 55, 0, 2, 1,213, 0, 2, 2, 56, 0, 90, 2, 57,
- 0, 91, 2, 58, 0, 81, 0, 8, 0, 9, 2, 59, 0, 7, 2, 60, 0, 4, 2, 61, 0, 0, 0, 19, 0, 0, 2, 62, 0, 2, 1, 13,
- 0, 2, 2, 63, 0, 2, 2, 64, 0, 79, 0, 8, 0, 4, 2, 65, 0, 4, 2, 66, 0, 4, 2, 67, 0, 4, 2, 68, 0, 0, 0, 37,
- 0, 0, 1,228, 0, 0, 2, 69, 0, 0, 0, 19, 0, 83, 0, 5, 0, 4, 2, 65, 0, 4, 2, 66, 0, 0, 2, 70, 0, 0, 2, 71,
- 0, 2, 0, 19, 0, 92, 0, 2, 0, 4, 2, 72, 0, 7, 1,219, 0, 84, 0, 3, 0, 92, 2, 73, 0, 4, 2, 74, 0, 4, 0, 19,
- 0, 82, 0, 6, 0, 7, 2, 75, 0, 2, 2, 76, 0, 0, 0, 19, 0, 0, 1,228, 0, 0, 2, 71, 0, 0, 2, 77, 0, 85, 0, 4,
- 0, 0, 0,208, 0, 0, 0,184, 0, 0, 0,185, 0, 0, 0,186, 0, 93, 0, 6, 0, 48, 2, 59, 0, 0, 0, 19, 0, 0, 2, 62,
- 0, 2, 1, 13, 0, 2, 2, 63, 0, 2, 2, 64, 0, 94, 0, 1, 0, 7, 2, 78, 0, 95, 0, 5, 0, 0, 0,208, 0, 0, 0,184,
- 0, 0, 0,185, 0, 0, 0,186, 0, 4, 0, 37, 0, 86, 0, 1, 0, 7, 2, 79, 0, 87, 0, 2, 0, 4, 2, 80, 0, 4, 0, 17,
- 0, 80, 0, 7, 0, 7, 2, 60, 0, 48, 2, 59, 0, 0, 0, 19, 0, 0, 2, 62, 0, 2, 1, 13, 0, 2, 2, 63, 0, 2, 2, 64,
- 0, 96, 0, 1, 0, 7, 2, 81, 0, 97, 0, 1, 0, 4, 2, 82, 0, 98, 0, 1, 0, 0, 2, 83, 0, 99, 0, 1, 0, 7, 2, 60,
- 0,100, 0, 3, 0, 4, 2, 84, 0, 0, 0, 96, 0, 7, 2, 85, 0,102, 0, 4, 0, 7, 0,208, 0, 7, 0,184, 0, 7, 0,185,
- 0, 7, 0,186, 0,103, 0, 1, 0,102, 2, 61, 0,104, 0, 5, 0, 4, 2, 86, 0, 4, 2, 87, 0, 0, 0, 19, 0, 0, 1,228,
- 0, 0, 0,183, 0,105, 0, 2, 0, 4, 2, 88, 0, 4, 2, 87, 0,106, 0, 10, 0,106, 0, 0, 0,106, 0, 1, 0,104, 2, 89,
- 0,103, 2, 90, 0,105, 2, 91, 0, 4, 0, 54, 0, 4, 2, 48, 0, 4, 2, 47, 0, 4, 0, 37, 0, 82, 2, 92, 0, 90, 0, 14,
- 0, 12, 2, 93, 0, 82, 2, 92, 0, 0, 2, 94, 0, 0, 2, 95, 0, 0, 2, 96, 0, 0, 2, 97, 0, 0, 2, 98, 0, 0, 2, 99,
- 0, 0, 2,100, 0, 0, 0, 19, 0, 89, 2, 44, 0, 89, 2, 46, 0, 2, 2,101, 0, 0, 2,102, 0, 91, 0, 8, 0, 4, 2,103,
- 0, 4, 2,104, 0, 79, 2,105, 0, 83, 2,106, 0, 4, 2, 48, 0, 4, 2, 47, 0, 4, 0, 54, 0, 4, 0, 37, 0,107, 0, 7,
- 0,107, 0, 0, 0,107, 0, 1, 0, 4, 0, 17, 0, 4, 1, 13, 0, 0, 0, 20, 0, 47, 0,139, 0, 0, 2,107, 0,108, 0, 7,
- 0,107, 2,108, 0, 2, 2,109, 0, 2, 2, 93, 0, 2, 2,110, 0, 2, 0, 94, 0, 9, 2,111, 0, 9, 2,112, 0,109, 0, 3,
- 0,107, 2,108, 0, 32, 0,168, 0, 0, 0, 20, 0,110, 0, 5, 0,107, 2,108, 0, 32, 0,168, 0, 0, 0, 20, 0, 2, 2,113,
- 0, 0, 2,114, 0,111, 0, 5, 0,107, 2,108, 0, 7, 0, 92, 0, 7, 2,115, 0, 4, 2,116, 0, 4, 2,117, 0,112, 0, 5,
- 0,107, 2,108, 0, 32, 2,118, 0, 0, 0, 72, 0, 4, 1, 13, 0, 4, 0, 19, 0,113, 0, 13, 0,107, 2,108, 0, 32, 2,119,
- 0, 32, 2,120, 0, 32, 2,121, 0, 32, 2,122, 0, 7, 2,123, 0, 7, 2,124, 0, 7, 2,115, 0, 7, 2,125, 0, 4, 2,126,
- 0, 4, 2,127, 0, 4, 0, 94, 0, 4, 2,128, 0,114, 0, 5, 0,107, 2,108, 0, 2, 2,129, 0, 2, 0, 19, 0, 7, 2,130,
- 0, 32, 2,131, 0,115, 0, 3, 0,107, 2,108, 0, 7, 2,132, 0, 4, 0, 94, 0,116, 0, 10, 0,107, 2,108, 0, 7, 2,133,
- 0, 4, 2,134, 0, 4, 0, 37, 0, 2, 0, 94, 0, 2, 2,135, 0, 2, 2,136, 0, 2, 2,137, 0, 7, 2,138, 0, 0, 2,139,
- 0,117, 0, 3, 0,107, 2,108, 0, 7, 0, 37, 0, 4, 0, 17, 0,118, 0, 11, 0,107, 2,108, 0, 53, 2,140, 0, 7, 2,141,
- 0, 4, 2,142, 0, 0, 2,139, 0, 7, 2,143, 0, 4, 2,144, 0, 32, 2,145, 0, 0, 2,146, 0, 4, 2,147, 0, 4, 0, 37,
- 0,119, 0, 10, 0,107, 2,108, 0, 32, 2,148, 0, 48, 2,149, 0, 4, 0, 94, 0, 4, 2,150, 0, 7, 2,151, 0, 7, 2,152,
- 0, 0, 2,146, 0, 4, 2,147, 0, 4, 0, 37, 0,120, 0, 3, 0,107, 2,108, 0, 7, 2,153, 0, 4, 2,154, 0,121, 0, 5,
- 0,107, 2,108, 0, 7, 2,155, 0, 0, 2,139, 0, 2, 0, 19, 0, 2, 2,156, 0,122, 0, 8, 0,107, 2,108, 0, 32, 0,168,
- 0, 7, 2,155, 0, 7, 1,220, 0, 7, 0,110, 0, 0, 2,139, 0, 2, 0, 19, 0, 2, 0, 17, 0,123, 0, 21, 0,107, 2,108,
- 0, 32, 2,157, 0, 0, 2,139, 0, 53, 2,140, 0, 32, 2,145, 0, 2, 0, 19, 0, 2, 0, 37, 0, 7, 2,158, 0, 7, 2,159,
- 0, 7, 2,160, 0, 7, 1,254, 0, 7, 2,161, 0, 7, 2,162, 0, 7, 2,163, 0, 7, 2,164, 0, 4, 2,144, 0, 4, 2,147,
- 0, 0, 2,146, 0, 7, 2,165, 0, 7, 2,166, 0, 7, 0, 43, 0,124, 0, 7, 0,107, 2,108, 0, 2, 2,167, 0, 2, 2,168,
- 0, 4, 0, 70, 0, 32, 0,168, 0, 7, 2,169, 0, 0, 2,139, 0,125, 0, 9, 0,107, 2,108, 0, 32, 0,168, 0, 7, 2,170,
- 0, 7, 2,171, 0, 7, 2,164, 0, 4, 2,172, 0, 4, 2,173, 0, 7, 2,174, 0, 0, 0, 20, 0,126, 0, 1, 0,107, 2,108,
- 0,127, 0, 6, 0,107, 2,108, 0, 47, 0,139, 0,128, 2,175, 0,129, 2,176, 0,130, 2,177, 0,131, 2,178, 0,132, 0, 14,
- 0,107, 2,108, 0, 82, 2,179, 0, 82, 2,180, 0, 82, 2,181, 0, 82, 2,182, 0, 82, 2,183, 0, 82, 2,184, 0, 79, 2,185,
- 0, 4, 2,186, 0, 4, 2,187, 0, 2, 2,188, 0, 2, 0, 37, 0, 7, 2,189, 0,133, 2,190, 0,134, 0, 3, 0,107, 2,108,
- 0,135, 2,191, 0,136, 2,190, 0,137, 0, 4, 0,107, 2,108, 0, 32, 0,168, 0, 4, 2,192, 0, 4, 0, 37, 0,138, 0, 2,
- 0, 4, 2,193, 0, 7, 1,219, 0,139, 0, 2, 0, 4, 0,130, 0, 4, 2,194, 0,140, 0, 20, 0,107, 2,108, 0, 32, 0,168,
- 0, 0, 2,139, 0, 2, 2,195, 0, 2, 2,196, 0, 2, 0, 19, 0, 2, 0, 37, 0, 7, 2,197, 0, 7, 2,198, 0, 4, 0, 54,
- 0, 4, 2,199, 0,139, 2,200, 0,138, 2,201, 0, 4, 2,202, 0, 4, 2,203, 0, 4, 2,204, 0, 4, 2,194, 0, 7, 2,205,
- 0, 7, 2,206, 0, 7, 2,207, 0,141, 0, 8, 0,107, 2,108, 0,142, 2,208, 0,135, 2,191, 0, 4, 2,209, 0, 4, 2,210,
- 0, 4, 2,211, 0, 2, 0, 19, 0, 2, 0, 57, 0,143, 0, 5, 0,107, 2,108, 0, 32, 0, 45, 0, 2, 2,212, 0, 2, 0, 19,
- 0, 2, 2,213, 0,144, 0, 5, 0,107, 2,108, 0, 4, 2,214, 0, 2, 0, 19, 0, 2, 2,215, 0, 7, 2,216, 0,145, 0, 7,
- 0,107, 2,108, 0, 82, 2,217, 0, 4, 2,218, 0, 0, 2,219, 0, 0, 2,220, 0, 0, 2,221, 0, 0, 2,222, 0,146, 0, 3,
- 0,107, 2,108, 0,147, 2,223, 0,131, 2,178, 0,148, 0, 10, 0,107, 2,108, 0, 32, 2,224, 0, 32, 2,225, 0, 0, 2,226,
- 0, 7, 2,227, 0, 2, 2,228, 0, 2, 2,229, 0, 0, 2,230, 0, 0, 2,231, 0, 0, 2,114, 0,149, 0, 9, 0,107, 2,108,
- 0, 32, 2,232, 0, 0, 2,226, 0, 7, 2,233, 0, 7, 2,234, 0, 0, 1, 13, 0, 0, 2,129, 0, 0, 2,235, 0, 0, 0, 37,
- 0,150, 0, 27, 0, 27, 0, 31, 0, 2, 1,229, 0, 2, 1,230, 0, 2, 2,236, 0, 2, 0, 19, 0, 2, 2,237, 0, 2, 2,238,
- 0, 2, 2,239, 0, 2, 0, 70, 0, 0, 2,240, 0, 0, 2,241, 0, 0, 2,242, 0, 0, 0, 17, 0, 4, 0, 37, 0, 7, 2,243,
- 0, 7, 2,244, 0, 7, 2,245, 0, 7, 2,246, 0, 7, 2,247, 0, 7, 2,248, 0, 34, 2,249, 0, 36, 0, 80, 0, 38, 1,250,
- 0, 84, 2, 38, 0, 7, 2,250, 0, 7, 2,251, 0,150, 2,252, 0,151, 0, 3, 0,151, 0, 0, 0,151, 0, 1, 0, 0, 0, 20,
- 0, 69, 0, 3, 0, 7, 2,253, 0, 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,111, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17,
- 0, 2, 2,254, 0, 4, 2,255, 0, 4, 3, 0, 0, 4, 3, 1, 0, 0, 3, 2, 0, 32, 0, 38, 0, 32, 3, 3, 0, 32, 3, 4,
- 0, 32, 3, 5, 0, 32, 3, 6, 0, 36, 0, 80, 0, 75, 1,249, 0, 69, 1,191, 0,152, 3, 7, 0,152, 3, 8, 0,153, 3, 9,
- 0, 9, 0, 2, 0, 12, 3, 10, 0, 12, 2, 32, 0, 12, 1,210, 0, 12, 3, 11, 0, 12, 3, 12, 0, 64, 1,212, 0, 7, 1, 8,
- 0, 7, 3, 13, 0, 7, 3, 14, 0, 7, 0,176, 0, 7, 3, 15, 0, 7, 1, 9, 0, 7, 3, 16, 0, 7, 3, 17, 0, 7, 2,170,
- 0, 7, 3, 18, 0, 7, 0,212, 0, 4, 3, 19, 0, 2, 0, 19, 0, 2, 3, 20, 0, 2, 3, 21, 0, 2, 3, 22, 0, 2, 3, 23,
- 0, 2, 3, 24, 0, 2, 3, 25, 0, 2, 3, 26, 0, 2, 3, 27, 0, 2, 3, 28, 0, 2, 3, 29, 0, 2, 3, 30, 0, 4, 3, 31,
- 0, 4, 3, 32, 0, 4, 3, 33, 0, 4, 3, 34, 0, 7, 3, 35, 0, 7, 3, 36, 0, 7, 3, 37, 0, 7, 3, 38, 0, 7, 3, 39,
- 0, 7, 3, 40, 0, 7, 3, 41, 0, 7, 3, 42, 0, 7, 3, 43, 0, 7, 3, 44, 0, 7, 3, 45, 0, 7, 1,160, 0, 0, 3, 46,
- 0, 0, 3, 47, 0, 0, 1,213, 0, 0, 3, 48, 0, 0, 3, 49, 0, 0, 3, 50, 0, 7, 3, 51, 0, 7, 3, 52, 0, 40, 0,126,
- 0, 12, 3, 53, 0, 12, 3, 54, 0, 12, 3, 55, 0, 12, 3, 56, 0, 7, 3, 57, 0, 2, 2, 80, 0, 2, 3, 58, 0, 7, 2, 61,
- 0, 4, 3, 59, 0, 4, 3, 60, 0,154, 3, 61, 0, 2, 3, 62, 0, 2, 0,219, 0, 7, 3, 63, 0, 12, 3, 64, 0, 12, 3, 65,
- 0, 12, 3, 66, 0, 12, 3, 67, 0,155, 3, 68, 0,156, 3, 69, 0, 65, 3, 70, 0, 2, 3, 71, 0, 2, 3, 72, 0, 2, 3, 73,
- 0, 2, 3, 74, 0, 7, 2, 53, 0, 2, 3, 75, 0, 2, 3, 76, 0,147, 3, 77, 0,135, 3, 78, 0,135, 3, 79, 0, 4, 3, 80,
- 0, 4, 3, 81, 0, 4, 3, 82, 0, 4, 0, 70, 0, 12, 3, 83, 0,157, 0, 14, 0,157, 0, 0, 0,157, 0, 1, 0, 32, 0, 38,
- 0, 7, 2,170, 0, 7, 1, 10, 0, 7, 2,171, 0, 7, 2,164, 0, 0, 0, 20, 0, 4, 2,172, 0, 4, 2,173, 0, 4, 3, 84,
- 0, 2, 0, 17, 0, 2, 3, 85, 0, 7, 2,174, 0,155, 0, 36, 0, 2, 3, 86, 0, 2, 3, 87, 0, 2, 0, 19, 0, 2, 2,164,
- 0, 7, 3, 88, 0, 7, 3, 89, 0, 7, 3, 90, 0, 7, 3, 91, 0, 7, 3, 92, 0, 7, 3, 93, 0, 7, 3, 94, 0, 7, 3, 95,
- 0, 7, 3, 96, 0, 7, 3, 97, 0, 7, 3, 98, 0, 7, 3, 99, 0, 7, 3,100, 0, 7, 3,101, 0, 7, 3,102, 0, 7, 3,103,
- 0, 7, 3,104, 0, 7, 3,105, 0, 7, 3,106, 0, 7, 3,107, 0, 7, 3,108, 0, 7, 3,109, 0, 7, 3,110, 0, 7, 3,111,
- 0, 2, 3,112, 0, 2, 3,113, 0, 2, 3,114, 0, 2, 3,115, 0, 53, 0,169, 0,158, 3,116, 0, 7, 3,117, 0, 4, 0, 37,
- 0,131, 0, 5, 0, 4, 0, 19, 0, 4, 3,118, 0, 4, 3,119, 0, 4, 3,120, 0, 4, 3,121, 0,159, 0, 1, 0, 7, 1,227,
- 0,154, 0, 28, 0, 4, 0, 19, 0, 7, 3,122, 0, 7, 3,123, 0, 7, 3,124, 0, 4, 3,125, 0, 4, 3,126, 0, 4, 3,127,
- 0, 4, 3,128, 0, 7, 3,129, 0, 7, 3,130, 0, 7, 3,131, 0, 7, 3,132, 0, 7, 3,133, 0, 7, 3,134, 0, 7, 3,135,
- 0, 7, 3,136, 0, 7, 3,137, 0, 7, 3,138, 0, 7, 3,139, 0, 7, 3,140, 0, 7, 3,141, 0, 7, 3,142, 0, 7, 3,143,
- 0, 7, 3,144, 0, 7, 3,145, 0, 7, 3,146, 0, 4, 3,147, 0, 4, 3,148, 0,156, 0, 44, 0,142, 3,149, 0, 4, 3,150,
- 0, 4, 3,151, 0,160, 3,152, 0,161, 3,153, 0, 7, 0, 37, 0, 7, 3,154, 0, 7, 3,155, 0, 7, 3,156, 0, 7, 3,157,
- 0, 7, 3,158, 0, 7, 3,159, 0, 7, 3,160, 0, 7, 3,161, 0, 7, 3,162, 0, 7, 3,163, 0, 2, 3,164, 0, 2, 3,165,
- 0, 7, 3,166, 0, 7, 3,167, 0, 4, 0,131, 0, 4, 3,168, 0, 4, 3,169, 0, 2, 3,170, 0, 2, 3,171, 0,159, 3,172,
- 0, 4, 3,173, 0, 4, 0, 82, 0, 7, 3,174, 0, 7, 3,175, 0, 7, 3,176, 0, 7, 3,177, 0, 2, 3,178, 0, 2, 3,179,
- 0, 2, 3,180, 0, 2, 3,181, 0, 2, 3,182, 0, 2, 3,183, 0, 2, 3,184, 0, 2, 3,185, 0,162, 3,186, 0, 7, 3,187,
- 0, 7, 3,188, 0,131, 3,189, 0,147, 0, 48, 0, 2, 0, 17, 0, 2, 3,190, 0, 2, 3,191, 0, 2, 3,192, 0, 7, 3,193,
- 0, 2, 3,194, 0, 2, 3,195, 0, 7, 3,196, 0, 2, 3,197, 0, 2, 3,198, 0, 7, 3,199, 0, 7, 3,200, 0, 7, 3,201,
- 0, 7, 3,202, 0, 7, 3,203, 0, 7, 3,204, 0, 4, 3,205, 0, 7, 3,206, 0, 7, 3,207, 0, 7, 3,208, 0, 78, 3,209,
- 0, 78, 3,210, 0, 78, 3,211, 0, 0, 3,212, 0, 7, 3,213, 0, 7, 3,214, 0, 36, 0, 80, 0, 2, 3,215, 0, 0, 3,216,
- 0, 0, 3,217, 0, 7, 3,218, 0, 4, 3,219, 0, 7, 3,220, 0, 7, 3,221, 0, 4, 3,222, 0, 4, 0, 19, 0, 7, 3,223,
- 0, 7, 3,224, 0, 7, 3,225, 0, 82, 3,226, 0, 7, 3,227, 0, 7, 3,228, 0, 7, 3,229, 0, 7, 3,230, 0, 7, 3,231,
- 0, 7, 3,232, 0, 7, 3,233, 0, 4, 3,234, 0,163, 0, 68, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0,178, 0, 2, 1, 14,
- 0, 2, 1, 47, 0, 2, 3,235, 0, 7, 3,236, 0, 7, 3,237, 0, 7, 3,238, 0, 7, 3,239, 0, 7, 3,240, 0, 7, 3,241,
- 0, 7, 3,242, 0, 7, 3,243, 0, 7, 1, 85, 0, 7, 1, 87, 0, 7, 1, 86, 0, 7, 3,244, 0, 4, 3,245, 0, 7, 3,246,
- 0, 7, 3,247, 0, 7, 3,248, 0, 7, 3,249, 0, 7, 3,250, 0, 7, 3,251, 0, 7, 3,252, 0, 2, 3,253, 0, 2, 1, 13,
- 0, 2, 3,254, 0, 2, 3,255, 0, 7, 4, 0, 0, 7, 4, 1, 0, 7, 4, 2, 0, 7, 4, 3, 0, 7, 4, 4, 0, 7, 4, 5,
- 0, 7, 4, 6, 0, 7, 4, 7, 0, 7, 4, 8, 0, 7, 4, 9, 0, 7, 4, 10, 0, 7, 4, 11, 0, 2, 4, 12, 0, 2, 4, 13,
- 0, 2, 4, 14, 0, 2, 4, 15, 0, 7, 4, 16, 0, 7, 4, 17, 0, 7, 4, 18, 0, 7, 4, 19, 0, 2, 4, 20, 0, 2, 4, 21,
- 0, 2, 4, 22, 0, 2, 4, 23, 0, 7, 4, 24, 0, 7, 4, 25, 0, 7, 4, 26, 0, 7, 4, 27, 0, 2, 4, 28, 0, 2, 4, 29,
- 0, 2, 4, 30, 0, 2, 0, 19, 0, 7, 4, 31, 0, 7, 4, 32, 0, 36, 0, 80, 0, 52, 1, 77, 0, 30, 0,155, 0, 40, 0,126,
- 0,164, 0, 16, 0, 2, 4, 33, 0, 2, 4, 34, 0, 2, 4, 35, 0, 2, 0, 19, 0, 2, 4, 36, 0, 2, 4, 37, 0, 2, 4, 38,
- 0, 2, 4, 39, 0, 2, 4, 40, 0, 2, 4, 41, 0, 2, 4, 42, 0, 2, 4, 43, 0, 4, 4, 44, 0, 7, 4, 45, 0, 7, 4, 46,
- 0, 7, 4, 47, 0,165, 0, 8, 0,165, 0, 0, 0,165, 0, 1, 0, 4, 3, 19, 0, 4, 4, 48, 0, 4, 0, 19, 0, 2, 4, 49,
- 0, 2, 4, 50, 0, 32, 0,168, 0,166, 0, 13, 0, 9, 4, 51, 0, 9, 4, 52, 0, 4, 4, 53, 0, 4, 4, 54, 0, 4, 4, 55,
- 0, 4, 4, 56, 0, 4, 4, 57, 0, 4, 4, 58, 0, 4, 4, 59, 0, 4, 4, 60, 0, 4, 4, 61, 0, 4, 0, 37, 0, 0, 4, 62,
- 0,167, 0, 5, 0, 9, 4, 63, 0, 9, 4, 64, 0, 4, 4, 65, 0, 4, 0, 70, 0, 0, 4, 66, 0,168, 0, 13, 0, 4, 0, 17,
- 0, 4, 4, 67, 0, 4, 4, 68, 0, 4, 4, 69, 0, 4, 4, 70, 0, 4, 4, 71, 0, 4, 0, 94, 0, 4, 4, 72, 0, 4, 4, 73,
- 0, 4, 4, 74, 0, 4, 4, 75, 0, 4, 4, 76, 0, 26, 0, 30, 0,169, 0, 4, 0, 4, 4, 77, 0, 7, 4, 78, 0, 2, 0, 19,
- 0, 2, 2, 77, 0,170, 0, 11, 0,170, 0, 0, 0,170, 0, 1, 0, 0, 0, 20, 0, 64, 4, 79, 0, 65, 4, 80, 0, 4, 3, 19,
- 0, 4, 4, 81, 0, 4, 4, 82, 0, 4, 0, 37, 0, 4, 4, 83, 0, 4, 4, 84, 0,171, 0,131, 0,166, 4, 85, 0,167, 4, 86,
- 0,168, 4, 87, 0,169, 4, 88, 0, 4, 4, 89, 0, 4, 0,131, 0, 4, 3,168, 0, 4, 4, 90, 0, 4, 4, 91, 0, 4, 4, 92,
- 0, 4, 4, 93, 0, 2, 0, 19, 0, 2, 4, 94, 0, 7, 3, 36, 0, 7, 4, 95, 0, 7, 4, 96, 0, 7, 4, 97, 0, 7, 4, 98,
- 0, 7, 4, 99, 0, 2, 4,100, 0, 2, 4,101, 0, 2, 4,102, 0, 2, 4,103, 0, 2, 0,218, 0, 2, 4,104, 0, 2, 4,105,
- 0, 2, 3,115, 0, 2, 4,106, 0, 2, 4,107, 0, 2, 1, 34, 0, 2, 0,110, 0, 2, 4,108, 0, 2, 4,109, 0, 2, 4,110,
- 0, 2, 4,111, 0, 2, 4,112, 0, 2, 4,113, 0, 2, 4,114, 0, 2, 4,115, 0, 2, 4,116, 0, 2, 1, 35, 0, 2, 4,117,
- 0, 2, 4,118, 0, 2, 4,119, 0, 2, 4,120, 0, 4, 4,121, 0, 4, 1, 13, 0, 2, 4,122, 0, 2, 4,123, 0, 2, 4,124,
- 0, 2, 4,125, 0, 2, 4,126, 0, 2, 4,127, 0, 24, 4,128, 0, 24, 4,129, 0, 23, 4,130, 0, 12, 4,131, 0, 2, 4,132,
- 0, 2, 0, 37, 0, 7, 4,133, 0, 7, 4,134, 0, 7, 4,135, 0, 7, 4,136, 0, 7, 4,137, 0, 7, 4,138, 0, 7, 4,139,
- 0, 7, 4,140, 0, 7, 4,141, 0, 2, 4,142, 0, 2, 4,143, 0, 2, 4,144, 0, 2, 4,145, 0, 2, 4,146, 0, 2, 4,147,
- 0, 7, 4,148, 0, 7, 4,149, 0, 7, 4,150, 0, 2, 4,151, 0, 2, 4,152, 0, 2, 4,153, 0, 2, 4,154, 0, 2, 4,155,
- 0, 2, 4,156, 0, 2, 4,157, 0, 2, 4,158, 0, 2, 4,159, 0, 2, 4,160, 0, 4, 4,161, 0, 4, 4,162, 0, 4, 4,163,
- 0, 4, 4,164, 0, 4, 4,165, 0, 7, 4,166, 0, 4, 4,167, 0, 4, 4,168, 0, 4, 4,169, 0, 4, 4,170, 0, 7, 4,171,
- 0, 7, 4,172, 0, 7, 4,173, 0, 7, 4,174, 0, 7, 4,175, 0, 7, 4,176, 0, 7, 4,177, 0, 7, 4,178, 0, 7, 4,179,
- 0, 0, 4,180, 0, 0, 4,181, 0, 4, 4,182, 0, 2, 4,183, 0, 2, 1,160, 0, 0, 4,184, 0, 7, 4,185, 0, 7, 4,186,
- 0, 4, 4,187, 0, 4, 4,188, 0, 7, 4,189, 0, 7, 4,190, 0, 2, 4,191, 0, 2, 4,192, 0, 7, 4,193, 0, 2, 4,194,
- 0, 2, 4,195, 0, 4, 4,196, 0, 2, 4,197, 0, 2, 4,198, 0, 2, 4,199, 0, 2, 4,200, 0, 7, 4,201, 0, 7, 4,202,
- 0, 43, 4,203, 0,172, 0, 9, 0,172, 0, 0, 0,172, 0, 1, 0, 0, 0, 20, 0, 2, 4,204, 0, 2, 4,205, 0, 2, 4,206,
- 0, 2, 0, 43, 0, 7, 4,207, 0, 7, 0, 70, 0,173, 0, 5, 0, 7, 4,208, 0, 0, 0, 17, 0, 0, 0, 43, 0, 0, 0, 70,
- 0, 0, 1,160, 0,174, 0, 5, 0,174, 0, 0, 0,174, 0, 1, 0, 4, 4,209, 0, 0, 4,210, 0, 4, 0, 19, 0,175, 0, 6,
- 0,176, 4,211, 0, 2, 0, 19, 0, 2, 4,212, 0, 2, 4,213, 0, 2, 4,214, 0, 9, 4,215, 0,177, 0, 4, 0, 2, 0,110,
- 0, 2, 2,141, 0, 2, 4,216, 0, 2, 4,217, 0,178, 0, 8, 0, 2, 0, 19, 0, 2, 4,218, 0, 2, 4,219, 0, 2, 4,220,
- 0,177, 4,221, 0, 9, 4,215, 0, 7, 4,222, 0, 4, 4,223, 0,179, 0, 4, 0,179, 0, 0, 0,179, 0, 1, 0, 0, 4,224,
- 0, 7, 4,225, 0,180, 0, 8, 0,181, 4,226, 0,176, 4,211, 0, 7, 4,227, 0, 4, 0, 94, 0, 0, 4,228, 0, 0, 4,229,
- 0, 0, 4,230, 0, 0, 4,231, 0,182, 0, 9, 0,176, 4,211, 0, 7, 4, 47, 0, 7, 4,232, 0, 2, 1, 13, 0, 2, 0, 19,
- 0, 4, 0, 36, 0, 4, 4,233, 0, 84, 4,234, 0, 9, 4,215, 0,183, 0, 64, 0,182, 4,235, 0,182, 4,236, 0,180, 4,237,
- 0, 2, 4,238, 0, 2, 4,239, 0, 7, 4,240, 0, 7, 4,241, 0, 2, 4,216, 0, 2, 4,242, 0, 7, 4,243, 0, 7, 4,244,
- 0, 2, 4,245, 0, 2, 4,246, 0, 2, 4,247, 0, 2, 4,248, 0, 7, 4,249, 0, 7, 4,250, 0, 7, 4,251, 0, 7, 0, 37,
- 0, 2, 4,252, 0, 2, 4,253, 0, 2, 4,254, 0, 2, 4,255, 0, 2, 5, 0, 0, 2, 5, 1, 0, 2, 5, 2, 0,175, 5, 3,
- 0,178, 5, 4, 0, 7, 5, 5, 0, 7, 5, 6, 0, 7, 5, 7, 0, 0, 5, 8, 0, 0, 5, 9, 0, 0, 5, 10, 0, 0, 5, 11,
- 0, 0, 5, 12, 0, 0, 5, 13, 0, 2, 5, 14, 0, 7, 5, 15, 0, 7, 5, 16, 0, 7, 5, 17, 0, 7, 5, 18, 0, 7, 5, 19,
- 0, 7, 5, 20, 0, 7, 5, 21, 0, 7, 5, 22, 0, 7, 5, 23, 0, 7, 5, 24, 0, 2, 5, 25, 0, 0, 5, 26, 0, 0, 5, 27,
- 0, 0, 5, 28, 0, 0, 5, 29, 0, 4, 5, 30, 0, 32, 5, 31, 0, 0, 5, 32, 0, 0, 5, 33, 0, 0, 5, 34, 0, 0, 5, 35,
- 0, 0, 5, 36, 0, 0, 5, 37, 0, 0, 5, 38, 0, 0, 5, 39, 0, 0, 5, 40, 0,184, 0, 8, 0, 4, 5, 41, 0, 4, 5, 42,
- 0, 4, 5, 43, 0, 4, 5, 44, 0, 4, 5, 45, 0, 4, 5, 46, 0, 4, 0, 54, 0, 4, 2, 48, 0, 47, 0, 46, 0, 27, 0, 31,
- 0, 39, 0, 75, 0, 32, 5, 47, 0,163, 5, 48, 0, 47, 5, 49, 0, 48, 0,210, 0, 12, 5, 50, 0,165, 5, 51, 0, 32, 5, 52,
- 0, 7, 5, 53, 0, 7, 5, 54, 0, 7, 5, 55, 0, 7, 5, 56, 0, 4, 3, 19, 0, 7, 5, 57, 0, 2, 5, 58, 0, 2, 5, 59,
- 0, 2, 5, 60, 0, 2, 5, 61, 0, 2, 5, 62, 0, 2, 0, 19, 0, 2, 5, 63, 0, 2, 1, 6, 0, 59, 1, 2, 0, 9, 5, 64,
- 0,164, 5, 65, 0,173, 5, 66, 0,183, 5, 67, 0,185, 5, 68, 0,171, 0,184, 0,169, 4, 88, 0, 40, 0,126, 0, 12, 0,104,
- 0, 12, 5, 69, 0, 2, 5, 70, 0, 2, 5, 71, 0, 2, 5, 72, 0, 2, 5, 73, 0,186, 5, 74, 0, 2, 5, 75, 0, 2, 5, 76,
- 0, 2, 1, 64, 0, 2, 0,219, 0, 4, 5, 77, 0, 4, 5, 78, 0, 12, 5, 79, 0,187, 0, 9, 0, 48, 0,210, 0, 46, 1, 1,
- 0, 7, 2, 13, 0, 7, 2, 14, 0, 7, 0,110, 0, 7, 5, 80, 0, 7, 5, 81, 0, 2, 5, 82, 0, 2, 5, 83, 0,188, 0, 34,
- 0, 7, 5, 84, 0, 7, 5, 85, 0, 7, 5, 86, 0, 7, 5, 87, 0, 7, 5, 88, 0, 7, 5, 89, 0, 7, 5, 90, 0, 7, 5, 91,
- 0, 7, 1, 20, 0, 7, 5, 92, 0, 7, 5, 93, 0, 7, 5, 94, 0, 7, 5, 95, 0, 7, 0,175, 0, 2, 5, 96, 0, 2, 5, 97,
- 0, 4, 5, 98, 0, 2, 5, 99, 0, 2, 5,100, 0, 2, 5,101, 0, 2, 5,102, 0, 7, 5,103, 0, 69, 5,104, 0,189, 5,105,
- 0,188, 5,106, 0,190, 5,107, 0,191, 5,108, 0,192, 5,109, 0,193, 5,110, 0,194, 5,111, 0, 7, 5,112, 0, 2, 5,113,
- 0, 2, 5,114, 0, 4, 1,160, 0,195, 0, 54, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117,
- 0, 2, 5,118, 0, 7, 5, 91, 0, 7, 1, 20, 0, 7, 0, 43, 0, 4, 5,119, 0, 2, 5,101, 0, 2, 5,102, 0, 32, 5, 47,
- 0, 32, 5,120, 0,187, 5,121, 0,195, 5,106, 0, 0, 5,122, 0, 4, 3, 19, 0, 4, 5,123, 0, 2, 4, 35, 0, 2, 5,124,
- 0, 2, 5,125, 0, 2, 5,126, 0, 2, 1,160, 0, 2, 0, 19, 0, 2, 5,127, 0, 2, 5,128, 0, 7, 0,116, 0, 7, 5,129,
- 0, 7, 5,130, 0, 7, 5,131, 0, 7, 5,132, 0, 7, 5,133, 0, 7, 0,175, 0, 7, 5, 53, 0, 2, 5,134, 0, 2, 1, 64,
- 0, 2, 5,135, 0, 2, 5,136, 0, 2, 5,137, 0, 2, 5,138, 0, 2, 5,139, 0, 2, 5,140, 0, 2, 5,141, 0, 2, 5,142,
- 0, 4, 5,143, 0, 12, 5,144, 0, 2, 5,145, 0, 2, 2, 62, 0, 2, 5,146, 0, 0, 5,147, 0, 0, 5,148, 0, 9, 5,149,
- 0,189, 5,105, 0,197, 0, 22, 0, 24, 0, 36, 0, 24, 0, 64, 0, 23, 5,150, 0, 23, 5,151, 0, 23, 5,152, 0, 7, 5,153,
- 0, 7, 5,154, 0, 7, 5,155, 0, 7, 5,156, 0, 2, 5,157, 0, 2, 5,158, 0, 2, 5,159, 0, 2, 5,160, 0, 2, 5,161,
- 0, 2, 0, 19, 0, 2, 5,162, 0, 2, 5,163, 0, 2, 5,164, 0, 2, 5,165, 0, 2, 5,166, 0, 2, 5,126, 0, 7, 5,167,
- 0,196, 0, 6, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,198, 0, 8,
- 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,199, 5,168, 0, 47, 0,139,
- 0,200, 0, 14, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169,
- 0,201, 5,170, 0, 12, 5,171, 0, 2, 1, 13, 0, 2, 0, 19, 0, 2, 5,172, 0, 0, 5,173, 0, 0, 5,174, 0,202, 0, 28,
- 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,190, 5,107, 0, 2, 5,175,
- 0, 2, 5,176, 0, 2, 5,162, 0, 2, 5,177, 0,197, 5,169, 0, 2, 5,178, 0, 2, 0,138, 0, 2, 5,173, 0, 2, 5,179,
- 0, 9, 5,180, 0, 2, 5,181, 0, 0, 5,182, 0, 0, 5,183, 0, 2, 5,184, 0, 2, 5,185, 0, 2, 3, 28, 0, 2, 5,186,
- 0, 2, 5,187, 0, 0, 0, 19, 0, 0, 1, 47, 0, 0, 5,188, 0,203, 0, 16, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115,
- 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169, 0, 7, 2, 13, 0, 7, 2, 14, 0, 2, 5,178, 0, 2, 0, 37,
- 0, 2, 5,189, 0, 2, 5,190, 0, 4, 0, 19, 0, 7, 5, 80, 0,189, 5,105, 0,204, 0, 10, 0,196, 0, 0, 0,196, 0, 1,
- 0, 12, 5,115, 0, 4, 5,116, 0, 4, 0, 37, 0,205, 5,191, 0,206, 5,192, 0,207, 5,193, 0,194, 5,194, 0,208, 5,195,
- 0,209, 0, 17, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169,
- 0, 12, 5,196, 0,210, 5,197, 0, 0, 5,198, 0,211, 5,199, 0, 4, 5,200, 0, 4, 5,201, 0, 2, 0, 19, 0, 2, 5,202,
- 0, 2, 5,203, 0, 2, 0, 37, 0,212, 0, 29, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117,
- 0, 2, 5,118, 0, 48, 2,149, 0, 46, 1, 1, 0, 62, 5,204, 0, 2, 0,138, 0, 2, 5,205, 0, 2, 0, 70, 0, 2, 5,206,
- 0, 4, 0, 19, 0, 2, 5,207, 0, 2, 5,174, 0, 2, 5,173, 0, 2, 1,160, 0, 0, 5,208, 0, 0, 5,209, 0, 0, 5,210,
- 0, 0, 0, 37, 0, 7, 2, 13, 0, 7, 2, 14, 0, 7, 5, 80, 0, 7, 1, 64, 0, 7, 5,211, 0, 7, 5,212, 0,189, 5,105,
- 0,213, 0, 11, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0, 2, 0,138,
- 0, 2, 5,174, 0, 2, 5,172, 0, 2, 0, 19, 0,197, 5,169, 0,214, 0, 24, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115,
- 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0, 43, 5,213, 0, 4, 5,214, 0, 4, 5,215, 0, 2, 0, 94, 0, 2, 0,138,
- 0, 4, 5,216, 0, 4, 5,217, 0, 4, 5,218, 0, 4, 5,219, 0, 4, 5,220, 0, 4, 5,221, 0, 7, 5,222, 0, 23, 5,223,
- 0, 23, 5,224, 0, 4, 5,225, 0, 4, 5,226, 0, 0, 5,227, 0, 0, 5,228, 0,215, 0, 10, 0, 27, 0, 31, 0, 9, 5,229,
- 0, 9, 5,230, 0, 9, 5,231, 0, 9, 5,232, 0, 9, 5,233, 0, 4, 0, 94, 0, 4, 5,234, 0, 0, 5,235, 0, 0, 5,236,
- 0,216, 0, 10, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0,215, 5,237, 0, 2, 0, 94,
- 0, 2, 0,138, 0, 4, 0, 43, 0, 9, 5,238, 0,217, 0, 8, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116,
- 0, 7, 5,117, 0,197, 5,169, 0, 4, 0, 19, 0, 4, 5,239, 0,218, 0, 22, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115,
- 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169, 0, 27, 5,240, 0, 27, 0, 81, 0, 2, 0, 19, 0, 2, 0,138,
- 0, 7, 5,241, 0, 9, 5,242, 0, 7, 2, 13, 0, 7, 2, 14, 0, 7, 5,243, 0, 7, 5,244, 0, 59, 1, 2, 0, 59, 5,245,
- 0, 4, 5,246, 0, 4, 0, 37, 0,189, 5,105, 0,219, 0, 42, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116,
- 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169, 0,206, 5,192, 0, 0, 5,247, 0, 0, 5,248, 0, 0, 5,249, 0, 2, 0, 17,
- 0, 2, 5,250, 0, 2, 0, 19, 0, 2, 5,251, 0, 9, 5,242, 0, 4, 5,252, 0, 4, 5,253, 0, 4, 5,254, 0, 4, 5,255,
- 0, 23, 6, 0, 0, 23, 6, 1, 0, 7, 6, 2, 0, 7, 6, 3, 0, 7, 6, 4, 0, 7, 5,241, 0, 2, 6, 5, 0, 2, 0,209,
- 0, 2, 1,103, 0, 2, 6, 6, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 6, 7, 0, 2, 6, 8, 0, 9, 6, 9, 0, 9, 6, 10,
- 0, 9, 6, 11, 0, 9, 6, 12, 0, 9, 6, 13, 0, 2, 6, 14, 0, 0, 6, 15, 0, 58, 6, 16, 0,220, 0, 7, 0,220, 0, 0,
- 0,220, 0, 1, 0, 0, 6, 17, 0, 2, 6, 18, 0, 2, 6, 19, 0, 2, 6, 20, 0, 2, 0, 37, 0,221, 0, 10, 0, 2, 6, 19,
- 0, 2, 6, 21, 0, 2, 6, 22, 0, 2, 6, 23, 0, 2, 6, 24, 0, 2, 6, 25, 0, 2, 6, 26, 0, 2, 5,162, 0, 7, 6, 27,
- 0, 7, 6, 28, 0,222, 0, 17, 0,222, 0, 0, 0,222, 0, 1, 0, 0, 4,210, 0,221, 6, 29, 0,221, 6, 30, 0,221, 6, 31,
- 0,221, 6, 32, 0, 2, 6, 33, 0, 2, 6, 34, 0, 2, 6, 35, 0, 2, 6, 36, 0, 2, 6, 37, 0, 2, 6, 38, 0, 2, 6, 39,
- 0, 2, 6, 40, 0, 2, 6, 41, 0, 2, 2, 77, 0,223, 0, 10, 0, 0, 6, 42, 0, 0, 6, 43, 0, 0, 6, 44, 0, 0, 6, 45,
- 0, 0, 6, 46, 0, 0, 6, 47, 0, 2, 6, 48, 0, 2, 6, 49, 0, 2, 6, 50, 0, 2, 0, 37, 0,224, 0, 12, 0,223, 6, 51,
- 0,223, 6, 52, 0,223, 6, 53, 0,223, 6, 54, 0,223, 6, 55, 0,223, 6, 56, 0,223, 6, 57, 0,223, 6, 58, 0,223, 6, 59,
- 0,223, 6, 60, 0,223, 6, 61, 0, 0, 6, 62, 0,225, 0, 71, 0, 0, 6, 63, 0, 0, 6, 64, 0, 0, 6, 46, 0, 0, 6, 65,
- 0, 0, 6, 66, 0, 0, 6, 67, 0, 0, 6, 68, 0, 0, 6, 69, 0, 0, 6, 70, 0, 0, 6, 71, 0, 0, 6, 72, 0, 0, 6, 73,
- 0, 0, 6, 74, 0, 0, 6, 75, 0, 0, 6, 76, 0, 0, 6, 77, 0, 0, 6, 78, 0, 0, 6, 79, 0, 0, 6, 80, 0, 0, 6, 81,
- 0, 0, 6, 82, 0, 0, 6, 83, 0, 0, 6, 84, 0, 0, 6, 85, 0, 0, 6, 86, 0, 0, 6, 87, 0, 0, 6, 88, 0, 0, 6, 89,
- 0, 0, 6, 90, 0, 0, 6, 91, 0, 0, 6, 92, 0, 0, 6, 93, 0, 0, 6, 94, 0, 0, 6, 95, 0, 0, 6, 96, 0, 0, 6, 97,
- 0, 0, 6, 98, 0, 0, 6, 99, 0, 0, 6,100, 0, 0, 6,101, 0, 0, 6,102, 0, 0, 6,103, 0, 0, 6,104, 0, 0, 6,105,
- 0, 0, 6,106, 0, 0, 6,107, 0, 0, 6,108, 0, 0, 6,109, 0, 0, 6,110, 0, 0, 6,111, 0, 0, 6,112, 0, 0, 6,113,
- 0, 0, 6,114, 0, 0, 6,115, 0, 0, 6,116, 0, 0, 6,117, 0, 0, 6,118, 0, 0, 6,119, 0, 0, 6,120, 0, 0, 6,121,
- 0, 0, 6,122, 0, 0, 6,123, 0, 0, 6,124, 0, 0, 6,125, 0, 0, 6,126, 0, 0, 6,127, 0, 0, 6,128, 0, 0, 6,129,
- 0, 0, 6,130, 0, 0, 6,131, 0, 0, 0, 96, 0,226, 0, 5, 0, 0, 6,132, 0, 0, 6, 87, 0, 0, 6, 89, 0, 2, 0, 19,
- 0, 2, 0, 37, 0,227, 0, 20, 0,227, 0, 0, 0,227, 0, 1, 0, 0, 0, 20, 0,224, 6,133, 0,225, 6,134, 0,225, 6,135,
- 0,225, 6,136, 0,225, 6,137, 0,225, 6,138, 0,225, 6,139, 0,225, 6,140, 0,225, 6,141, 0,225, 6,142, 0,225, 6,143,
- 0,225, 6,144, 0,225, 6,145, 0,225, 6,146, 0,225, 6,147, 0,225, 6,148, 0,226, 6,149, 0,228, 0, 5, 0, 4, 0, 19,
- 0, 4, 0, 37, 0, 7, 2, 61, 0, 7, 6,150, 0, 7, 1,227, 0,229, 0, 67, 0, 4, 0, 19, 0, 4, 6,151, 0, 4, 6,152,
- 0, 0, 6,153, 0, 0, 6,154, 0, 0, 6,155, 0, 0, 6,156, 0, 0, 6,157, 0, 0, 6,158, 0, 0, 6,159, 0, 0, 6,160,
- 0, 0, 6,161, 0, 2, 6,162, 0, 2, 0, 37, 0, 4, 6,163, 0, 4, 6,164, 0, 4, 6,165, 0, 4, 6,166, 0, 2, 6,167,
- 0, 2, 6,168, 0, 4, 6,169, 0, 4, 0, 43, 0, 4, 6,170, 0, 2, 6,171, 0, 2, 6,172, 0, 2, 6,173, 0, 2, 6,174,
- 0, 12, 6,175, 0, 12, 6,176, 0, 12, 6,177, 0, 2, 6,178, 0, 2, 6,179, 0, 2, 6,180, 0, 2, 6,181, 0, 2, 6,182,
- 0, 2, 6,183, 0, 2, 6,184, 0, 2, 6,185, 0,228, 6,186, 0, 2, 6,187, 0, 2, 6,188, 0, 2, 6,189, 0, 2, 6,190,
- 0, 2, 6,191, 0, 2, 6,192, 0, 2, 6,193, 0, 2, 6,194, 0, 4, 6,195, 0, 4, 6,196, 0, 2, 6,197, 0, 2, 6,198,
- 0, 2, 6,199, 0, 2, 6,200, 0, 2, 6,201, 0, 2, 6,202, 0, 2, 6,203, 0, 2, 6,204, 0, 2, 6,205, 0, 2, 6,206,
- 0, 2, 6,207, 0, 2, 6,208, 0, 0, 6,209, 0, 0, 6,210, 0, 7, 6,211, 0, 2, 5, 63, 0, 2, 6,212, 0, 56, 6,213,
- 0,199, 0, 20, 0, 27, 0, 31, 0, 12, 6,214, 0, 12, 6,215, 0, 12, 6,216, 0, 12, 5,115, 0, 47, 0,139, 0, 2, 6,217,
- 0, 2, 6,218, 0, 2, 6,219, 0, 2, 6,220, 0, 2, 6,221, 0, 2, 6,222, 0, 2, 6,223, 0, 2, 0, 37, 0, 2, 6,224,
- 0, 2, 6,225, 0, 4, 0, 70, 0,194, 6,226, 0, 9, 6,227, 0, 2, 6,228, 0,230, 0, 5, 0,230, 0, 0, 0,230, 0, 1,
- 0,230, 6,229, 0, 13, 6,230, 0, 4, 0, 19, 0,231, 0, 7, 0,231, 0, 0, 0,231, 0, 1, 0,230, 6,231, 0,230, 6,232,
- 0, 2, 4,129, 0, 2, 0, 19, 0, 4, 0, 37, 0,232, 0, 20, 0,232, 0, 0, 0,232, 0, 1, 0,233, 6,233, 0,234, 5,195,
- 0, 0, 6,234, 0, 0, 6,235, 0, 0, 6,236, 0, 2, 6,237, 0, 2, 6,238, 0, 2, 6,239, 0, 2, 6,240, 0, 2, 6,241,
- 0, 2, 0, 37, 0, 2, 0, 19, 0, 2, 6,242, 0, 2, 6,243, 0, 2, 6,244, 0, 4, 6,245, 0,232, 6,246, 0, 9, 6,247,
- 0,235, 0, 2, 0,236, 6,233, 0,234, 5,195, 0,237, 0, 2, 0,238, 6,233, 0,234, 5,195, 0,239, 0, 23, 0,239, 0, 0,
- 0,239, 0, 1, 0,230, 6,231, 0,230, 6,232, 0,230, 6,248, 0,230, 6,249, 0,199, 6,250, 0, 23, 0, 52, 0, 0, 5,116,
- 0, 0, 6,251, 0, 2, 5,163, 0, 2, 5,164, 0, 2, 6,252, 0, 2, 0, 37, 0, 2, 6,220, 0, 2, 6,253, 0, 2, 0, 19,
- 0, 40, 0,126, 0,240, 6,233, 0, 12, 6,254, 0, 12, 5,115, 0, 12, 6,255, 0, 12, 7, 0, 0,241, 0, 21, 0,241, 0, 0,
- 0,241, 0, 1, 0,197, 5,169, 0, 23, 7, 1, 0, 23, 7, 2, 0, 2, 5,163, 0, 2, 5,164, 0, 2, 7, 3, 0, 2, 7, 4,
- 0, 2, 7, 5, 0, 2, 0, 19, 0, 7, 2, 9, 0, 2, 6,219, 0, 2, 6,223, 0, 4, 0, 43, 0,242, 6,233, 0, 12, 7, 6,
- 0, 12, 7, 7, 0, 12, 6,255, 0, 0, 7, 8, 0, 9, 7, 9, 0,243, 0, 11, 0, 0, 7, 10, 0, 2, 7, 11, 0, 2, 7, 12,
- 0, 2, 7, 13, 0, 2, 7, 14, 0, 2, 7, 15, 0, 2, 4,113, 0,199, 7, 16, 0, 47, 7, 17, 0, 4, 7, 18, 0, 4, 7, 19,
- 0,244, 0, 1, 0, 0, 7, 20, 0,245, 0, 8, 0, 58, 7, 21, 0, 58, 7, 22, 0,245, 7, 23, 0,245, 7, 24, 0,245, 7, 25,
- 0, 2, 0,134, 0, 2, 0, 19, 0, 4, 7, 26, 0,246, 0, 4, 0, 4, 5,214, 0, 4, 7, 27, 0, 4, 5,217, 0, 4, 7, 28,
- 0,247, 0, 2, 0, 4, 7, 29, 0, 4, 7, 30, 0,248, 0, 7, 0, 7, 7, 31, 0, 7, 7, 32, 0, 7, 7, 33, 0, 4, 0, 19,
- 0, 4, 0, 37, 0, 7, 3,246, 0, 7, 7, 34, 0,249, 0, 1, 0, 0, 7, 35, 0,250, 0, 21, 0,250, 0, 0, 0,250, 0, 1,
- 0, 4, 0, 57, 0, 4, 0, 23, 0, 4, 0, 28, 0, 4, 7, 36, 0, 4, 7, 37, 0, 4, 7, 38, 0,244, 7, 39, 0, 0, 7, 35,
- 0, 4, 7, 40, 0, 4, 7, 41, 0,249, 3, 4, 0,246, 7, 42, 0,247, 7, 43, 0,248, 7, 44, 0,245, 7, 45, 0,245, 7, 46,
- 0,245, 7, 47, 0, 58, 7, 48, 0, 58, 7, 49, 0,251, 0, 12, 0, 0, 1,190, 0, 9, 0,195, 0, 0, 0,196, 0, 4, 0,199,
- 0, 4, 0,207, 0, 9, 0,200, 0, 7, 0,202, 0, 7, 0,203, 0, 9, 7, 50, 0, 9, 7, 51, 0, 9, 0,204, 0, 9, 0,206,
- 0,252, 0, 45, 0,252, 0, 0, 0,252, 0, 1, 0, 9, 7, 52, 0, 9, 0, 26, 0, 0, 0, 27, 0, 4, 0, 19, 0, 4, 0, 17,
- 0, 4, 0, 23, 0, 4, 0, 92, 0, 4, 7, 53, 0, 4, 7, 54, 0, 4, 7, 37, 0, 4, 7, 38, 0, 4, 7, 55, 0, 4, 0,218,
- 0, 4, 7, 56, 0, 4, 7, 57, 0, 7, 4,232, 0, 7, 7, 58, 0, 4, 0,131, 0, 4, 7, 59, 0,250, 7, 60, 0, 36, 0, 80,
- 0, 47, 0,139, 0, 50, 0,142, 0, 7, 7, 61, 0, 7, 7, 62, 0,251, 1, 3, 0,252, 7, 63, 0,252, 7, 64, 0,252, 7, 65,
- 0, 12, 7, 66, 0,253, 7, 67, 0,254, 7, 68, 0, 7, 7, 69, 0, 7, 7, 70, 0, 4, 7, 71, 0, 7, 7, 72, 0, 9, 7, 73,
- 0, 4, 7, 74, 0, 4, 7, 75, 0, 4, 7, 76, 0, 7, 7, 77, 0, 4, 7, 78, 0, 4, 0, 37, 0,255, 0, 4, 0,255, 0, 0,
- 0,255, 0, 1, 0, 12, 7, 79, 0,252, 7, 80, 1, 0, 0, 6, 0, 12, 7, 81, 0, 12, 7, 66, 0, 12, 7, 82, 0,252, 7, 83,
- 0, 0, 7, 84, 0, 0, 7, 85, 1, 1, 0, 4, 0, 7, 7, 86, 0, 7, 0,113, 0, 2, 7, 87, 0, 2, 7, 88, 1, 2, 0, 6,
- 0, 7, 7, 89, 0, 7, 7, 90, 0, 7, 7, 91, 0, 7, 7, 92, 0, 4, 7, 93, 0, 4, 7, 94, 1, 3, 0, 12, 0, 7, 7, 95,
- 0, 7, 7, 96, 0, 7, 7, 97, 0, 7, 7, 98, 0, 7, 7, 99, 0, 7, 7,100, 0, 7, 7,101, 0, 7, 7,102, 0, 7, 7,103,
- 0, 7, 7,104, 0, 4, 2,153, 0, 4, 7,105, 1, 4, 0, 2, 0, 7, 4,208, 0, 7, 0, 37, 1, 5, 0, 5, 0, 7, 7,106,
- 0, 7, 7,107, 0, 4, 0, 94, 0, 4, 2,115, 0, 4, 7,108, 1, 6, 0, 6, 1, 6, 0, 0, 1, 6, 0, 1, 0, 2, 0, 17,
- 0, 2, 0, 19, 0, 2, 7,109, 0, 2, 0, 57, 1, 7, 0, 8, 1, 7, 0, 0, 1, 7, 0, 1, 0, 2, 0, 17, 0, 2, 0, 19,
- 0, 2, 7,109, 0, 2, 0, 57, 0, 7, 0, 23, 0, 7, 0,131, 1, 8, 0, 45, 1, 8, 0, 0, 1, 8, 0, 1, 0, 2, 0, 17,
- 0, 2, 0, 19, 0, 2, 7,109, 0, 2, 0,214, 0, 2, 3,164, 0, 2, 7,110, 0, 7, 7,111, 0, 7, 0, 93, 0, 7, 2,166,
- 0, 4, 7,112, 0, 4, 0, 82, 0, 4, 2,117, 0, 7, 7,113, 0, 7, 7,114, 0, 7, 7,115, 0, 7, 7,116, 0, 7, 7,117,
- 0, 7, 7,118, 0, 7, 2,163, 0, 7, 1, 0, 0, 7, 7,119, 0, 7, 7,120, 0, 7, 0, 37, 0, 7, 7,121, 0, 7, 7,122,
- 0, 7, 7,123, 0, 2, 7,124, 0, 2, 7,125, 0, 2, 7,126, 0, 2, 7,127, 0, 2, 7,128, 0, 2, 7,129, 0, 2, 7,130,
- 0, 2, 7,131, 0, 2, 5,127, 0, 2, 7,132, 0, 2, 1,210, 0, 2, 7,133, 0, 0, 7,134, 0, 0, 7,135, 0, 7, 0,212,
- 1, 9, 7,136, 0, 65, 1,163, 1, 10, 0, 16, 1, 10, 0, 0, 1, 10, 0, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 7,109,
- 0, 2, 0,214, 0, 7, 2,158, 0, 7, 2,159, 0, 7, 2,160, 0, 7, 1,254, 0, 7, 2,161, 0, 7, 2,162, 0, 7, 7,137,
- 0, 7, 2,163, 0, 7, 2,165, 0, 7, 2,166, 0,211, 0, 5, 0, 2, 0, 17, 0, 2, 7, 26, 0, 2, 0, 19, 0, 2, 7,138,
- 0, 27, 5,240, 0,210, 0, 3, 0, 4, 0, 69, 0, 4, 7,139, 0,211, 0, 2, 1, 11, 0, 11, 1, 11, 0, 0, 1, 11, 0, 1,
- 0, 0, 0, 20, 0, 2, 0, 17, 0, 2, 7,140, 0, 4, 0, 22, 0, 4, 7,141, 0, 2, 0, 19, 0, 2, 0, 37, 0, 9, 7,142,
- 0, 9, 7,143, 1, 12, 0, 5, 0, 0, 0, 20, 0, 7, 1, 20, 0, 7, 7,144, 0, 4, 7,145, 0, 4, 0, 37, 1, 13, 0, 4,
- 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 43, 0, 2, 0, 70, 1, 14, 0, 4, 0, 0, 0, 20, 0, 64, 7,146, 0, 7, 1, 20,
- 0, 7, 0, 37, 1, 15, 0, 6, 0, 2, 7,147, 0, 2, 7,148, 0, 2, 0, 17, 0, 2, 7,149, 0, 0, 7,150, 0, 0, 7,151,
- 1, 16, 0, 5, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0, 0, 7,152, 0, 0, 7,153, 1, 17, 0, 3, 0, 4, 0, 17,
- 0, 4, 0, 37, 0, 0, 0, 20, 1, 18, 0, 4, 0, 2, 7,154, 0, 2, 7,155, 0, 2, 0, 19, 0, 2, 0, 37, 1, 19, 0, 6,
- 0, 0, 0, 20, 0, 0, 7,156, 0, 2, 7,157, 0, 2, 2,163, 0, 2, 1, 13, 0, 2, 0, 70, 1, 20, 0, 5, 0, 0, 0, 20,
- 0, 7, 0,113, 0, 7, 3,248, 0, 2, 0, 19, 0, 2, 2,129, 1, 21, 0, 3, 0, 0, 0, 20, 0, 4, 2,117, 0, 4, 7,154,
- 1, 22, 0, 7, 0, 0, 0, 20, 0, 7, 3,248, 0, 0, 7,158, 0, 0, 7,159, 0, 2, 1, 13, 0, 2, 0, 43, 0, 4, 7,160,
- 1, 23, 0, 3, 0, 32, 7,161, 0, 0, 7,162, 0, 0, 7,163, 1, 24, 0, 17, 1, 24, 0, 0, 1, 24, 0, 1, 0, 2, 0, 17,
- 0, 2, 7,140, 0, 2, 0, 19, 0, 2, 7,164, 0, 2, 7,165, 0, 2, 7,166, 0, 2, 0, 43, 0, 2, 0, 70, 0, 0, 0, 20,
- 0, 9, 0, 2, 1, 25, 7,167, 0, 32, 0, 45, 0, 2, 4,217, 0, 2, 7, 69, 0, 4, 0, 37, 1, 26, 0, 11, 0, 0, 0, 20,
- 0, 0, 0, 17, 0, 0, 7,168, 0, 2, 0, 19, 0, 2, 2,129, 0, 2, 7,169, 0, 4, 7,170, 0, 4, 7,171, 0, 4, 7,172,
- 0, 4, 7,173, 0, 4, 7,174, 1, 27, 0, 1, 0, 0, 7,175, 1, 28, 0, 1, 0, 43, 5,213, 1, 25, 0, 18, 1, 25, 0, 0,
- 1, 25, 0, 1, 1, 25, 7,176, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 7,177, 0, 2, 7,166, 0, 2, 7,140, 0, 2, 7,178,
- 0, 2, 0, 70, 0, 2, 1,160, 0, 0, 0, 20, 0, 9, 0, 2, 1, 29, 7,167, 1, 24, 7,179, 0, 2, 0, 15, 0, 2, 7,180,
- 0, 4, 7,181, 1, 30, 0, 3, 0, 4, 2,189, 0, 4, 0, 37, 0, 32, 0, 45, 1, 31, 0, 12, 0,152, 7,182, 0, 2, 0, 17,
- 0, 2, 0, 19, 0, 4, 7,111, 0, 4, 0, 93, 0, 0, 0, 20, 0, 0, 7,183, 0, 2, 7,184, 0, 2, 7,185, 0, 2, 7,186,
- 0, 2, 7,187, 0, 7, 7,188, 1, 32, 0, 10, 0, 2, 0, 19, 0, 2, 7,189, 0, 4, 7,111, 0, 4, 0, 93, 0, 2, 7,190,
- 0,253, 7, 67, 0, 2, 0, 17, 0, 2, 7,191, 0, 2, 7,192, 0, 2, 7,193, 1, 33, 0, 7, 0, 2, 0, 19, 0, 2, 7,189,
- 0, 4, 7,111, 0, 4, 0, 93, 0, 2, 0, 17, 0, 2, 7,194, 0, 7, 3,124, 1, 34, 0, 11, 0, 4, 2,189, 0, 2, 0, 17,
- 0, 2, 0, 19, 0, 32, 0, 45, 0, 78, 7,195, 0, 0, 0, 20, 0, 7, 7,196, 0, 7, 7,197, 0, 7, 3, 37, 0, 2, 7,198,
- 0, 2, 7,199, 1, 35, 0, 5, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 37, 0, 47, 0,139, 0, 32, 5, 47, 1, 36, 0, 5,
- 0, 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0, 0, 7,152, 0, 32, 0, 45, 1, 37, 0, 12, 0, 2, 0, 19, 0, 2, 0, 17,
- 0, 2, 7,140, 0, 2, 3, 38, 0, 7, 7,200, 0, 7, 7,201, 0, 7, 1, 8, 0, 7, 1, 9, 0, 7, 3, 13, 0, 7, 3, 16,
- 0, 7, 7,202, 0, 7, 7,203, 1, 38, 0, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 7,111, 0, 4, 0, 93, 0, 0, 0, 20,
- 0, 0, 7,183, 0, 2, 0, 43, 0, 2, 0, 64, 0, 2, 7,204, 0, 2, 7,205, 1, 39, 0, 8, 0, 32, 0, 45, 0, 7, 2,160,
- 0, 7, 7,206, 0, 7, 7,207, 0, 7, 2,155, 0, 2, 0, 19, 0, 2, 2,129, 0, 7, 7,208, 1, 40, 0, 12, 0, 2, 0, 17,
- 0, 2, 1, 13, 0, 2, 0, 19, 0, 2, 2,163, 0, 2, 2,189, 0, 2, 7,209, 0, 4, 0, 37, 0, 7, 7,210, 0, 7, 7,211,
- 0, 7, 7,212, 0, 7, 7,213, 0, 0, 7,214, 1, 41, 0, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 7,111, 0, 4, 0, 93,
- 0, 0, 0, 20, 0, 2, 2, 77, 0, 2, 0, 64, 0, 2, 7,204, 0, 2, 7,205, 0, 65, 1,163, 1, 42, 0, 7, 0, 4, 2,117,
- 0, 4, 7,215, 0, 4, 7,216, 0, 4, 7,217, 0, 7, 7,218, 0, 7, 7,219, 0, 0, 7,158, 1, 43, 0, 7, 0, 0, 7,220,
- 0, 32, 7,221, 0, 0, 7,162, 0, 2, 7,222, 0, 2, 0, 43, 0, 4, 0, 70, 0, 0, 7,163, 1, 44, 0, 6, 0, 2, 0, 19,
- 0, 2, 0, 17, 0, 4, 7,111, 0, 4, 0, 93, 0, 0, 7,223, 0, 0, 7,224, 1, 45, 0, 1, 0, 4, 0, 19, 1, 46, 0, 6,
- 0, 0, 0, 96, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 7,225, 0, 7, 7,226, 0, 43, 5,213, 1, 47, 0, 3, 0, 0, 0, 96,
- 0, 4, 0, 17, 0, 32, 0, 45, 1, 48, 0, 2, 0, 4, 0, 17, 0, 4, 5,152, 1, 29, 0, 10, 1, 29, 0, 0, 1, 29, 0, 1,
- 1, 29, 7,176, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 7,140, 0, 2, 7,227, 0, 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45,
- 1, 49, 0, 10, 0, 7, 3, 37, 0, 7, 7,228, 0, 7, 7,229, 0, 7, 7,230, 0, 7, 7,231, 0, 4, 0, 19, 0, 7, 7,209,
- 0, 7, 7,232, 0, 7, 7,233, 0, 7, 0, 37, 0,253, 0, 20, 0, 27, 0, 31, 0, 0, 0,194, 1, 50, 7,234, 0, 9, 7,235,
- 0, 44, 0,154, 0, 44, 7,236, 0, 9, 7,237, 0, 36, 0, 80, 0, 7, 3,124, 0, 7, 7,238, 0, 7, 7,239, 0, 7, 7,240,
- 0, 7, 7,241, 0, 7, 7,242, 0, 7, 7,243, 0, 4, 0, 94, 0, 4, 7,244, 0, 0, 7,245, 0, 0, 7,246, 0, 0, 7,247,
- 1, 51, 0, 6, 0, 27, 0, 31, 0, 7, 7,248, 0, 7, 7,249, 0, 7, 7,250, 0, 2, 7,251, 0, 2, 7,252, 1, 52, 0, 15,
- 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0,239, 7,253, 0,197, 5,169, 0,253, 7, 67,
- 0, 2, 1, 13, 0, 2, 7,189, 0, 2, 2, 13, 0, 2, 2, 14, 0, 2, 0, 19, 0, 2, 5,174, 0, 4, 0, 70, 1, 53, 0, 6,
- 1, 53, 0, 0, 1, 53, 0, 1, 0, 32, 0, 45, 0, 9, 7,254, 0, 4, 0,219, 0, 4, 0, 37, 0, 65, 0, 4, 0, 27, 0, 31,
- 0, 12, 7,255, 0, 4, 0,136, 0, 7, 8, 0, 1, 54, 0, 25, 1, 54, 0, 0, 1, 54, 0, 1, 1, 54, 0, 38, 0, 12, 8, 1,
- 0, 0, 0, 20, 0, 7, 8, 2, 0, 7, 8, 3, 0, 7, 8, 4, 0, 7, 8, 5, 0, 4, 0, 19, 0, 7, 8, 6, 0, 7, 8, 7,
- 0, 7, 8, 8, 0, 7, 1, 20, 0, 7, 1,219, 0, 7, 8, 9, 0, 7, 2,115, 0, 7, 8, 10, 0, 7, 8, 11, 0, 7, 8, 12,
- 0, 7, 8, 13, 0, 7, 8, 14, 0, 7, 0,176, 0, 2, 0,136, 0, 2, 4,245, 1, 55, 0, 20, 0, 27, 0, 31, 0, 12, 8, 15,
- 0, 12, 8, 16, 0, 12, 8, 17, 0, 4, 0, 19, 0, 4, 4, 35, 0, 2, 2,167, 0, 2, 8, 18, 0, 2, 0,136, 0, 2, 8, 19,
- 0, 2, 8, 20, 0, 2, 8, 21, 0, 2, 8, 22, 0, 2, 8, 23, 0, 4, 8, 24, 0, 4, 8, 25, 0, 4, 8, 26, 0, 4, 8, 27,
- 0, 4, 8, 28, 0, 4, 8, 29, 1, 56, 0, 38, 1, 56, 0, 0, 1, 56, 0, 1, 0, 26, 8, 30, 0, 12, 3, 64, 0, 0, 0, 20,
- 0, 2, 0, 19, 0, 2, 8, 31, 0, 2, 8, 32, 0, 2, 8, 33, 0, 2, 3, 22, 0, 2, 8, 34, 0, 4, 1,252, 0, 4, 8, 26,
- 0, 4, 8, 27, 1, 54, 8, 35, 1, 56, 0, 38, 1, 56, 8, 36, 0, 12, 8, 37, 0, 9, 8, 38, 0, 9, 8, 39, 0, 9, 8, 40,
- 0, 7, 1, 8, 0, 7, 0,176, 0, 7, 8, 41, 0, 7, 1,200, 0, 2, 8, 42, 0, 2, 0, 37, 0, 7, 8, 43, 0, 7, 8, 44,
- 0, 7, 3, 18, 0, 7, 8, 45, 0, 7, 8, 46, 0, 7, 8, 47, 0, 7, 8, 48, 0, 7, 8, 49, 0, 7, 8, 50, 0, 7, 1,249,
- 0, 32, 8, 51, 0,153, 0, 9, 0, 12, 8, 52, 0, 2, 0, 19, 0, 2, 8, 53, 0, 7, 3, 36, 0, 7, 8, 54, 0, 7, 8, 55,
- 0, 12, 8, 56, 0, 4, 8, 57, 0, 4, 0, 37, 1, 57, 0, 7, 1, 57, 0, 0, 1, 57, 0, 1, 0, 12, 7,245, 0, 4, 0, 19,
- 0, 4, 8, 58, 0, 0, 4,210, 0,226, 8, 59, 0,152, 0, 7, 0, 27, 0, 31, 0, 12, 8, 60, 0, 12, 8, 52, 0, 12, 8, 61,
- 0, 12, 0,104, 0, 4, 0, 19, 0, 4, 8, 62, 0,201, 0, 4, 0, 27, 8, 63, 0, 12, 8, 52, 0, 4, 8, 64, 0, 4, 0, 19,
- 1, 58, 0, 17, 0,196, 0, 0, 0,196, 0, 1, 0, 12, 5,115, 0, 4, 5,116, 0, 7, 5,117, 0, 2, 5,118, 0,197, 5,169,
- 0,152, 3, 7, 0,201, 8, 65, 0, 0, 1, 13, 0, 0, 5,172, 0, 2, 0, 19, 0, 2, 8, 66, 0, 2, 5,173, 0, 2, 5,174,
- 0, 2, 8, 67, 0, 7, 8, 68, 1, 59, 0, 8, 1, 59, 0, 0, 1, 59, 0, 1, 1, 57, 8, 69, 0, 36, 0, 80, 0, 12, 3, 10,
- 0, 4, 0, 19, 0, 0, 0, 20, 0, 4, 8, 70, 1, 60, 0, 5, 1, 60, 0, 0, 1, 60, 0, 1, 0, 36, 0, 80, 0, 2, 0, 19,
- 0, 0, 8, 71, 1, 61, 0, 12, 1, 61, 0, 0, 1, 61, 0, 1, 0, 9, 0, 2, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 8, 72,
- 0, 0, 8, 73, 0, 0, 8, 71, 0, 7, 8, 74, 0, 7, 8, 75, 0, 4, 0, 37, 0, 36, 0, 80, 1, 62, 0, 9, 1, 62, 0, 0,
- 1, 62, 0, 1, 0, 32, 8, 76, 0, 0, 8, 77, 0, 7, 8, 78, 0, 2, 8, 79, 0, 2, 0, 19, 0, 2, 0, 17, 0, 2, 0, 37,
- 1, 63, 0, 7, 0, 43, 5,213, 0, 26, 8, 30, 0, 4, 0, 19, 0, 4, 8, 80, 0, 12, 8, 81, 0, 32, 8, 76, 0, 0, 8, 77,
- 1, 64, 0, 12, 0, 32, 8, 76, 0, 2, 8, 82, 0, 2, 0, 19, 0, 2, 8, 83, 0, 2, 8, 84, 0, 0, 8, 77, 0, 32, 8, 85,
- 0, 0, 8, 86, 0, 7, 8, 87, 0, 7, 1,219, 0, 7, 8, 88, 0, 7, 8, 89, 1, 65, 0, 6, 0, 32, 8, 76, 0, 4, 8, 90,
- 0, 4, 8, 91, 0, 4, 0, 94, 0, 4, 0, 37, 0, 0, 8, 77, 1, 66, 0, 4, 0, 32, 8, 76, 0, 4, 0, 19, 0, 4, 8, 90,
- 0, 0, 8, 77, 1, 67, 0, 4, 0, 32, 8, 76, 0, 4, 0, 19, 0, 4, 8, 90, 0, 0, 8, 77, 1, 68, 0, 10, 0, 32, 8, 76,
- 0, 4, 8, 92, 0, 7, 0,130, 0, 4, 0, 19, 0, 2, 5,209, 0, 2, 8, 93, 0, 2, 0, 43, 0, 2, 0, 70, 0, 7, 8, 94,
- 0, 0, 8, 77, 1, 69, 0, 4, 0, 32, 8, 76, 0, 4, 0, 19, 0, 4, 8, 90, 0, 0, 8, 77, 1, 70, 0, 10, 0, 32, 8, 76,
- 0, 2, 0, 17, 0, 2, 3,170, 0, 4, 0, 92, 0, 4, 0, 93, 0, 7, 7,206, 0, 7, 7,207, 0, 4, 0, 37, 0,152, 7,182,
- 0, 0, 8, 77, 1, 71, 0, 4, 0, 32, 8, 76, 0, 4, 3, 23, 0, 4, 8, 95, 0, 0, 8, 77, 1, 72, 0, 5, 0, 32, 8, 76,
- 0, 7, 0,130, 0, 4, 8, 96, 0, 4, 3, 23, 0, 4, 3, 24, 1, 73, 0, 6, 0, 32, 8, 76, 0, 4, 8, 97, 0, 4, 8, 98,
- 0, 7, 8, 99, 0, 7, 8,100, 0, 0, 8, 77, 1, 74, 0, 16, 0, 32, 8, 76, 0, 32, 8, 36, 0, 4, 0, 17, 0, 7, 8,101,
- 0, 7, 8,102, 0, 7, 8,103, 0, 7, 8,104, 0, 7, 8,105, 0, 7, 8,106, 0, 7, 8,107, 0, 7, 8,108, 0, 7, 8,109,
- 0, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 1, 75, 0, 3, 0, 32, 8, 76, 0, 4, 0, 19, 0, 4, 5,127,
- 1, 76, 0, 5, 0, 32, 8, 76, 0, 4, 0, 19, 0, 4, 0, 37, 0, 7, 8,110, 0, 0, 8, 77, 1, 77, 0, 10, 0, 32, 8, 76,
- 0, 0, 8, 77, 0, 2, 8,111, 0, 2, 8,112, 0, 0, 8,113, 0, 0, 8,114, 0, 7, 8,115, 0, 7, 8,116, 0, 7, 8,117,
- 0, 7, 8,118, 1, 78, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 8,119, 0, 7, 8,120,
- 0, 2, 0, 19, 0, 2, 5,127, 1, 79, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 8,119,
- 0, 7, 8,120, 0, 2, 0, 19, 0, 2, 5,127, 1, 80, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12,
- 0, 7, 8,119, 0, 7, 8,120, 0, 2, 0, 19, 0, 2, 5,127, 1, 81, 0, 7, 0, 32, 8, 76, 0, 0, 8, 77, 0, 7, 1, 20,
- 0, 7, 1, 30, 0, 2, 0, 19, 0, 2, 1, 13, 0, 4, 0, 37, 1, 82, 0, 5, 0, 32, 2,224, 0, 7, 1, 20, 0, 2, 2,228,
- 0, 0, 2,230, 0, 0, 8,121, 1, 83, 0, 10, 1, 83, 0, 0, 1, 83, 0, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 0, 8,122,
- 0, 7, 0,221, 0, 7, 0,222, 0, 2, 7,245, 0, 2, 8,123, 0, 32, 0, 45, 1, 84, 0, 22, 1, 84, 0, 0, 1, 84, 0, 1,
- 0, 2, 0, 19, 0, 2, 1, 13, 0, 2, 8,124, 0, 2, 8,125, 0, 36, 0, 80, 0,152, 7,182, 0, 32, 0,168, 0, 7, 0, 92,
- 0, 7, 0, 93, 0, 7, 8,126, 0, 7, 8,127, 0, 7, 8,128, 0, 7, 8,129, 0, 7, 2,156, 0, 7, 8,130, 0, 7, 7,184,
- 0, 7, 8,131, 0, 0, 8,132, 0, 0, 8,133, 0, 12, 3, 12, 1, 85, 0, 8, 0, 7, 1,227, 0, 7, 7,206, 0, 7, 7,207,
- 0, 9, 0, 2, 0, 2, 8,134, 0, 2, 8,135, 0, 2, 8,136, 0, 2, 8,137, 1, 86, 0, 18, 1, 86, 0, 0, 1, 86, 0, 1,
- 1, 86, 8,138, 0, 0, 0, 20, 1, 85, 8,139, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 8,140, 0, 2, 8,141, 0, 2, 8,142,
- 0, 2, 8,143, 0, 4, 0, 43, 0, 7, 8,144, 0, 7, 8,145, 0, 4, 8,146, 0, 4, 8,147, 1, 86, 8,148, 1, 87, 8,149,
- 1, 88, 0, 33, 1, 88, 0, 0, 1, 88, 0, 1, 1, 88, 8,150, 0, 0, 0, 20, 0, 0, 8,151, 0, 2, 0, 17, 0, 2, 0, 19,
- 0, 2, 7, 36, 0, 2, 7, 69, 0, 2, 8,152, 0, 2, 0,138, 0, 2, 8,141, 0, 2, 7, 26, 0, 12, 7,177, 0, 12, 8,153,
- 0, 27, 5,240, 0, 9, 8,154, 0, 7, 8,144, 0, 7, 8,145, 0, 7, 1,254, 0, 7, 8,155, 0, 2, 8,156, 0, 2, 8,157,
- 0, 7, 8,158, 0, 7, 8,159, 0, 2, 8,160, 0, 2, 8,161, 0, 9, 8,162, 0, 24, 8,163, 0, 24, 8,164, 0, 24, 8,165,
- 1, 89, 0,155, 1, 90, 8,166, 1, 87, 0, 8, 1, 87, 0, 0, 1, 87, 0, 1, 1, 88, 8,167, 1, 88, 8,168, 1, 86, 8,169,
- 1, 86, 8,148, 0, 4, 0, 19, 0, 4, 0, 37, 0, 59, 0, 20, 0, 27, 0, 31, 0, 39, 0, 75, 0, 12, 8,170, 0, 12, 8,171,
- 1, 85, 8,172, 0, 12, 8,173, 0, 4, 0, 17, 0, 4, 8,174, 0, 4, 8,175, 0, 4, 8,176, 0, 12, 8,177, 1, 90, 8,178,
- 1, 86, 8,179, 1, 86, 8,180, 0, 9, 8,181, 0, 9, 8,182, 0, 4, 8,183, 0, 9, 8,184, 0, 9, 8,185, 0, 9, 8,186,
- 1, 91, 0, 6, 0, 4, 0,129, 0, 4, 0,131, 0, 4, 7, 26, 0, 0, 8,187, 0, 0, 8,188, 0, 2, 0, 37, 1, 92, 0, 16,
- 0, 2, 6,239, 0, 2, 6,240, 0, 2, 8,189, 0, 2, 7,229, 0, 2, 8,190, 0, 2, 0, 68, 0, 7, 2,155, 0, 7, 8,191,
- 0, 7, 8,192, 0, 2, 1, 34, 0, 0, 8,193, 0, 0, 4, 47, 0, 2, 8,194, 0, 2, 0, 37, 0, 4, 8,195, 0, 4, 8,196,
- 1, 93, 0, 9, 0, 7, 8,197, 0, 7, 8,198, 0, 7, 7,243, 0, 7, 0,113, 0, 7, 8,199, 0, 7, 5, 80, 0, 2, 8,200,
- 0, 0, 8,201, 0, 0, 0, 37, 1, 94, 0, 4, 0, 7, 8,202, 0, 7, 8,203, 0, 2, 8,200, 0, 2, 0, 37, 1, 95, 0, 3,
- 0, 7, 8,204, 0, 7, 8,205, 0, 7, 0, 15, 1, 96, 0, 7, 0, 0, 1,190, 0, 2, 4,115, 0, 2, 4,116, 0, 2, 4,117,
- 0, 2, 4, 67, 0, 4, 0,131, 0, 4, 3,168, 1, 97, 0, 7, 0, 7, 8,206, 0, 7, 8,207, 0, 7, 8,208, 0, 7, 2, 9,
- 0, 7, 8,209, 0, 7, 8,210, 0, 7, 8,211, 1, 98, 0, 4, 0, 2, 8,212, 0, 2, 8,213, 0, 2, 8,214, 0, 2, 8,215,
- 1, 99, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 1,100, 0, 2, 0, 0, 0,170, 0, 0, 8,216, 1,101, 0, 1, 0, 0, 0, 20,
- 1,102, 0, 10, 0, 0, 8,217, 0, 0, 8,218, 0, 0, 8,219, 0, 0, 8,220, 0, 2, 8,189, 0, 2, 8,221, 0, 7, 8,222,
- 0, 7, 8,223, 0, 7, 8,224, 0, 7, 8,130, 1,103, 0, 2, 0, 9, 8,225, 0, 9, 8,226, 1,104, 0, 11, 0, 0, 4,117,
- 0, 0, 0, 17, 0, 0, 8,200, 0, 0, 0,113, 0, 0, 8,227, 0, 0, 0,110, 0, 0, 0,183, 0, 7, 8,228, 0, 7, 8,229,
- 0, 7, 8,230, 0, 7, 8,231, 1,105, 0, 8, 0, 7, 7,147, 0, 7, 0,130, 0, 7, 4, 47, 0, 7, 2, 81, 0, 7, 8,232,
- 0, 7, 0,208, 0, 7, 8,233, 0, 4, 0, 17, 1,106, 0, 4, 0, 2, 8,234, 0, 2, 8,235, 0, 2, 8,236, 0, 2, 0, 37,
- 1,107, 0, 1, 0, 0, 0, 20, 1,108, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 19, 0, 2, 8,237, 1,109, 0, 10,
- 0, 2, 3,150, 0, 2, 0, 19, 0, 7, 3,248, 0, 7, 8,238, 0, 7, 8,239, 0, 7, 8,240, 0, 7, 8,241, 1,108, 8,242,
- 1,108, 8,243, 1,108, 8,244, 0, 62, 0, 9, 0, 4, 0, 19, 0, 4, 0, 64, 0, 24, 8,245, 0, 24, 8,246, 1,109, 8,247,
- 0, 7, 8,248, 0, 7, 8,249, 0, 7, 8,250, 0, 7, 8,251, 1,110, 0, 4, 0, 48, 2,149, 0, 7, 8,252, 0, 7, 1, 93,
- 0, 7, 0, 37, 0,176, 0, 17, 0, 27, 0, 31, 1,110, 8,253, 0, 62, 8,242, 0, 52, 1, 77, 0, 2, 0, 19, 0, 2, 5, 81,
- 0, 4, 0,110, 0, 7, 8,254, 0, 7, 2, 6, 0, 7, 8,255, 0, 7, 9, 0, 0, 7, 1, 93, 0, 7, 9, 1, 0, 2, 1, 47,
- 0, 0, 9, 2, 0, 0, 3,112, 0, 0, 0, 96, 1,111, 0, 10, 0, 4, 0, 17, 0, 4, 0,130, 0, 4, 0, 19, 0, 4, 3, 85,
- 0, 4, 9, 3, 0, 4, 9, 4, 0, 4, 9, 5, 0, 0, 0, 96, 0, 0, 0, 20, 0, 9, 0, 2, 0, 89, 0, 6, 1,111, 9, 6,
- 0, 4, 9, 7, 0, 4, 9, 8, 0, 4, 9, 9, 0, 4, 0, 37, 0, 9, 9, 10, 1,112, 0, 5, 0, 7, 2, 75, 0, 7, 2,189,
- 0, 7, 1,219, 0, 2, 9, 11, 0, 2, 0, 37, 1,113, 0, 5, 0, 7, 2, 75, 0, 7, 9, 12, 0, 7, 9, 13, 0, 7, 9, 14,
- 0, 7, 2,189, 1,114, 0, 7, 0, 4, 9, 15, 0, 4, 9, 16, 0, 4, 9, 17, 0, 7, 9, 18, 0, 7, 9, 19, 0, 7, 9, 20,
- 0, 7, 9, 21, 1,115, 0, 26, 0, 32, 9, 22, 1,113, 3, 81, 1,113, 9, 23, 1,112, 9, 24, 1,113, 7,136, 0, 7, 9, 25,
- 0, 7, 9, 26, 0, 7, 9, 27, 0, 7, 9, 28, 0, 7, 9, 19, 0, 7, 9, 20, 0, 7, 2,189, 0, 7, 2,166, 0, 7, 9, 29,
- 0, 7, 9, 30, 0, 7, 0,110, 0, 7, 9, 31, 0, 4, 9, 15, 0, 4, 9, 32, 0, 4, 0, 37, 0, 4, 0, 82, 0, 4, 9, 33,
- 0, 2, 0, 19, 0, 2, 9, 34, 0, 2, 9, 35, 0, 2, 3,115, 1,116, 0,112, 0, 27, 0, 31, 0, 4, 0, 19, 0, 2, 0, 17,
- 0, 2, 8,111, 0, 2, 9, 36, 0, 2, 9, 37, 0, 2, 8, 42, 0, 2, 9, 38, 0, 2, 9, 39, 0, 2, 9, 40, 0, 2, 9, 41,
- 0, 2, 9, 42, 0, 2, 9, 43, 0, 2, 9, 44, 0, 2, 9, 45, 0, 2, 9, 46, 0, 2, 9, 47, 0, 2, 9, 48, 0, 2, 9, 49,
- 0, 2, 1,210, 0, 2, 7,129, 0, 2, 7,105, 0, 2, 9, 50, 0, 2, 9, 51, 0, 2, 3,113, 0, 2, 3,114, 0, 2, 9, 52,
- 0, 2, 9, 53, 0, 2, 9, 54, 0, 2, 9, 55, 0, 2, 9, 56, 0, 2, 9, 57, 0, 7, 9, 58, 0, 7, 9, 59, 0, 7, 9, 60,
- 0, 2, 9, 61, 0, 2, 9, 62, 0, 7, 9, 63, 0, 7, 9, 64, 0, 7, 9, 65, 0, 7, 7,111, 0, 7, 0, 93, 0, 7, 2,166,
- 0, 7, 7,117, 0, 7, 9, 66, 0, 7, 9, 67, 0, 7, 9, 68, 0, 7, 9, 69, 0, 7, 0, 57, 0, 4, 7,112, 0, 4, 7,110,
- 0, 4, 9, 70, 0, 7, 7,113, 0, 7, 7,114, 0, 7, 7,115, 0, 7, 9, 71, 0, 7, 9, 72, 0, 7, 9, 73, 0, 7, 9, 74,
- 0, 7, 9, 75, 0, 7, 9, 76, 0, 7, 9, 77, 0, 7, 9, 78, 0, 7, 3, 37, 0, 7, 0,110, 0, 7, 9, 79, 0, 7, 9, 80,
- 0, 7, 9, 81, 0, 7, 9, 82, 0, 7, 9, 83, 0, 7, 9, 84, 0, 7, 2,115, 0, 7, 9, 85, 0, 7, 9, 86, 0, 4, 9, 87,
- 0, 4, 9, 88, 0, 7, 9, 89, 0, 7, 9, 90, 0, 7, 9, 91, 0, 7, 9, 92, 0, 7, 9, 93, 0, 7, 9, 94, 0, 7, 9, 95,
- 0, 7, 9, 96, 0, 7, 3,109, 0, 7, 3,107, 0, 7, 3,108, 0, 7, 9, 97, 0, 7, 9, 98, 0, 7, 9, 99, 0, 7, 9,100,
- 0, 7, 9,101, 0, 7, 9,102, 0, 7, 9,103, 0, 7, 9,104, 0, 7, 9,105, 0, 7, 3, 44, 0, 7, 9,106, 0, 7, 9,107,
- 0, 7, 9,108, 0, 7, 9,109, 0, 7, 9,110, 0, 7, 9,111, 0, 7, 9,112, 0, 0, 9,113, 0, 65, 3, 70, 0, 65, 9,114,
- 0, 32, 9,115, 0, 32, 9,116, 0, 36, 0, 80, 0,155, 3, 68, 0,155, 9,117, 0,142, 0, 38, 0,142, 0, 0, 0,142, 0, 1,
- 1,116, 9,118, 1,115, 3,149, 1,114, 8, 36, 1,117, 9,119, 0, 9, 9,120, 1,118, 9,121, 1,118, 9,122, 0, 12, 9,123,
- 0, 12, 9,124, 0,156, 3, 69, 0, 32, 9,125, 0, 32, 9,126, 0, 32, 9,127, 0, 12, 9,128, 0, 12, 9,129, 0, 7, 0,212,
- 0, 7, 4, 89, 0, 4, 2,117, 0, 4, 0, 19, 0, 4, 7,112, 0, 4, 9,130, 0, 4, 9,131, 0, 4, 9,132, 0, 4, 0, 57,
- 0, 2, 0,219, 0, 2, 9,133, 0, 2, 9,134, 0, 2, 9,135, 0, 2, 3, 62, 0, 2, 9,136, 0, 0, 9,137, 0, 2, 9,138,
- 0, 2, 9,139, 0, 2, 9,140, 0, 9, 9,141, 0,131, 3,189, 0,129, 0, 34, 1,119, 9,142, 0, 7, 3,161, 0, 7, 9,143,
- 0, 7, 9,144, 0, 7, 3,251, 0, 7, 9,145, 0, 7, 3, 46, 0, 7, 3, 37, 0, 7, 9,146, 0, 7, 2, 8, 0, 7, 9,147,
- 0, 7, 9,148, 0, 7, 9,149, 0, 7, 9,150, 0, 7, 9,151, 0, 7, 9,152, 0, 7, 3,162, 0, 7, 9,153, 0, 7, 9,154,
- 0, 7, 9,155, 0, 7, 3,163, 0, 7, 3,159, 0, 7, 3,160, 0, 4, 9,156, 0, 4, 0, 94, 0, 4, 9,157, 0, 4, 9,158,
- 0, 2, 9,159, 0, 2, 9,160, 0, 2, 9,161, 0, 2, 9,162, 0, 2, 9,163, 0, 2, 0, 37, 0, 4, 0, 70, 0,130, 0, 8,
- 1,119, 9,164, 0, 7, 9,165, 0, 7, 9,166, 0, 7, 1,164, 0, 7, 9,167, 0, 4, 0, 94, 0, 2, 9,168, 0, 2, 9,169,
- 1,120, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 9,170, 1,121, 0, 6, 1,121, 0, 0, 1,121, 0, 1,
- 1,120, 9,171, 0, 4, 9,172, 0, 2, 9,173, 0, 2, 0, 19, 1,122, 0, 5, 1,122, 0, 0, 1,122, 0, 1, 0, 12, 9,174,
- 0, 4, 9,175, 0, 4, 0, 19, 1,123, 0, 9, 1,123, 0, 0, 1,123, 0, 1, 0, 12, 0,129, 1,122, 9,176, 0, 4, 0, 19,
- 0, 2, 9,173, 0, 2, 9,177, 0, 7, 0, 95, 0, 0, 9,178, 0,189, 0, 6, 0, 27, 0, 31, 0, 12, 4,131, 0, 4, 0, 19,
- 0, 2, 9,179, 0, 2, 9,180, 0, 9, 9,181, 1,124, 0, 13, 0, 27, 0, 31, 1,125, 9,182, 1,125, 9,183, 0, 12, 9,184,
- 0, 4, 9,185, 0, 2, 9,186, 0, 2, 0, 37, 0, 12, 9,187, 0, 12, 9,188, 0, 12, 9,189, 0, 12, 9,190, 0, 12, 9,191,
- 0, 12, 9,192, 1,125, 0, 29, 1,125, 0, 0, 1,125, 0, 1, 0, 9, 9,193, 0, 4, 6,218, 0, 4, 0, 37, 0,199, 5,168,
- 0, 0, 9,194, 0, 2, 9,195, 0, 2, 9,196, 0, 2, 6,239, 0, 2, 6,240, 0, 2, 9,197, 0, 2, 9,198, 0, 2, 3, 85,
- 0, 2, 6,253, 0, 2, 9,199, 0, 2, 0, 70, 0, 4, 1,160, 1,126, 9,200, 1,127, 9,201, 1,128, 9,202, 0, 4, 9,203,
- 0, 4, 9,204, 0, 9, 9,205, 0, 12, 9,206, 0, 12, 9,188, 0, 12, 6,255, 0, 12, 9,207, 0, 12, 9,208, 1,129, 0, 12,
- 1,129, 0, 0, 1,129, 0, 1, 0, 0, 9,209, 1,130, 9,210, 0, 2, 0, 17, 0, 2, 0, 15, 0, 2, 9,211, 0, 2, 9,212,
- 0, 2, 9,213, 0, 2, 9,214, 0, 2, 9,215, 0, 2, 0, 37, 1,131, 0, 6, 1,131, 0, 0, 1,131, 0, 1, 0, 12, 9,216,
- 0, 0, 9,217, 0, 4, 9,218, 0, 4, 9,219, 0,207, 0, 8, 0,207, 0, 0, 0,207, 0, 1, 0, 0, 9,209, 0, 26, 0, 30,
- 1,132, 6,233, 0, 9, 9,220, 1,130, 9,210, 1,133, 9,221, 1,134, 0, 8, 1,134, 0, 0, 1,134, 0, 1, 0, 9, 0, 2,
- 0, 9, 9,222, 0, 0, 4,210, 0, 2, 0, 17, 0, 2, 0, 19, 0, 7, 9,223, 1,135, 0, 8, 0, 0, 9,224, 0, 7, 9,225,
- 0, 4, 9,226, 0, 2, 9,227, 0, 2, 9,228, 0, 4, 0, 37, 0, 2, 0, 19, 0, 2, 1, 13, 1,136, 0, 5, 0, 7, 7,206,
- 0, 7, 7,207, 0, 7, 2,189, 0, 2, 1,223, 0, 2, 1,224, 1,137, 0, 5, 1,136, 0, 2, 0, 4, 0, 54, 0, 7, 9,229,
- 0, 7, 7,206, 0, 7, 7,207, 1,138, 0, 4, 0, 2, 9,230, 0, 2, 9,231, 0, 2, 9,232, 0, 2, 9,233, 1,139, 0, 2,
- 0, 43, 5,237, 0, 26, 8, 30, 1,140, 0, 3, 0, 24, 9,234, 0, 4, 0, 19, 0, 4, 0, 37, 1,141, 0, 6, 0, 7, 0,110,
- 0, 7, 2,141, 0, 7, 9,235, 0, 7, 0, 37, 0, 2, 0,218, 0, 2, 9,236, 1,142, 0, 7, 1,142, 0, 0, 1,142, 0, 1,
- 0, 27, 5,240, 0, 0, 9,237, 0, 4, 9,238, 0, 4, 0, 94, 0, 0, 4,210, 1,143, 0, 6, 0, 12, 8, 81, 0, 0, 9,224,
- 0, 7, 0, 61, 0, 7, 9,223, 0, 4, 0, 17, 0, 4, 0, 19, 1,144, 0, 3, 0, 7, 9,239, 0, 4, 0, 19, 0, 4, 0, 37,
- 1,145, 0, 15, 1,145, 0, 0, 1,145, 0, 1, 1, 57, 8, 69, 1,143, 0, 62, 0, 12, 3, 12, 0, 35, 0, 50, 1,144, 9,240,
- 0, 4, 0, 54, 0, 7, 0, 61, 0, 2, 0, 19, 0, 2, 0,254, 0, 4, 9,238, 0, 0, 9,237, 0, 4, 9,241, 0, 7, 9,242,
- 1,146, 0, 2, 0, 0, 9,243, 0, 0, 9,244, 1,147, 0, 4, 1,147, 0, 0, 1,147, 0, 1, 0,152, 2,224, 0, 12, 9,245,
- 1,148, 0, 24, 1,148, 0, 0, 1,148, 0, 1, 0,152, 7,182, 1,147, 9,246, 0, 12, 3, 12, 0, 12, 9,247, 0, 7, 9,223,
- 0, 7, 9,248, 0, 7, 0, 92, 0, 7, 0, 93, 0, 7, 8,126, 0, 7, 8,127, 0, 7, 2,156, 0, 7, 8,130, 0, 7, 7,184,
- 0, 7, 8,131, 0, 4, 9,249, 0, 4, 0, 19, 0, 4, 8,124, 0, 4, 0, 37, 0, 7, 8,128, 0, 7, 8,129, 0, 0, 8,132,
- 0, 0, 8,133, 1,149, 0, 6, 1,149, 0, 0, 1,149, 0, 1, 0, 12, 9,250, 0, 4, 0, 19, 0, 4, 2, 80, 0, 0, 9,251,
- 1,150, 0, 10, 1,150, 0, 0, 1,150, 0, 1, 0, 27, 5,240, 0, 0, 9,252, 0, 4, 9,253, 0, 4, 9,254, 0, 0, 9,237,
- 0, 4, 9,238, 0, 2, 0, 19, 0, 2, 9,255, 1,151, 0, 6, 1,151, 0, 0, 1,151, 0, 1, 0, 12, 10, 0, 0, 0, 4,210,
- 0, 4, 0, 19, 0, 4, 10, 1, 1,152, 0, 5, 1,152, 0, 0, 1,152, 0, 1, 0, 0, 9,237, 0, 4, 9,238, 0, 7, 2,133,
- 0, 39, 0, 7, 0,152, 3, 7, 1,147, 9,246, 0, 12, 10, 2, 0, 12, 10, 3, 0, 12, 10, 4, 0, 4, 0, 19, 0, 4, 0,219,
- 1,153, 0, 2, 0, 27, 0, 31, 0, 39, 0, 75, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 97,115,101, 0, 42,101,100, 98,111, 0,108, 97,121,101,114, 95,112,114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,
+112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116,116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,
+104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97,116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,
+104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,114,111,112, 0, 99,111,110,115,116,102,108, 97,103, 0,105,107,102,108, 97,
+103, 0,115,101,108,101, 99,116,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120, 0, 42, 98,111,110,101, 0, 42, 99,
+104,105,108,100, 0,105,107,116,114,101,101, 0, 42, 98, 95, 98,111,110,101, 95,109, 97,116,115, 0, 42,100,117, 97,108, 95,113,
+117, 97,116, 0, 42, 98, 95, 98,111,110,101, 95,100,117, 97,108, 95,113,117, 97,116,115, 0,101,117,108, 91, 51, 93, 0,114,111,
+116,109,111,100,101, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,109, 97,116, 91, 52, 93,
+ 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115,101, 95,116, 97,105,108, 91, 51, 93, 0,108,105,
+109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, 93, 0,115,116,105,102,102,110,101,115,115, 91,
+ 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0, 42, 99,117,115,116,111,109, 0, 99,104, 97,110, 98, 97,115,101, 0,112,114,
+111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102,115,101,116, 91, 51, 93, 0, 99,121, 99,108,105,
+ 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,103,114,111,117,112,
+ 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,103,114,111,117,112,115, 0, 97, 99,116,105,
+118,101, 95,109, 97,114,107,101,114, 0, 42,115,111,117,114, 99,101, 0,102,105,108,116,101,114,102,108, 97,103, 0, 97,100,115,
+ 0, 97, 99,116,110,114, 0, 97, 99,116,119,105,100,116,104, 0,116,105,109,101,115,108,105,100,101, 0, 42,103,114,112, 0,116,
+101,109,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, 97,114,115,112, 97, 99,101, 0,101,
+110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0, 42,116, 97,114, 0,115,117, 98,116, 97,114,103,101,116, 91, 51,
+ 50, 93, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,116, 97,114,110,117,109, 0,116, 97,114,
+103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,
+116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 51, 50, 93,
+ 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101,110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, 97,114,103,
+101,116, 91, 51, 93, 0,114,101,115,101,114,118,101,100, 49, 0,114,101,115,101,114,118,101,100, 50, 0,109,105,110,109, 97,120,
+102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0,102,111,108,
+108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0,112,108, 97,110,101, 0,111,114,103,108,101,110,103,116,104, 0,
+ 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, 97,120, 90,
+ 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, 97, 70,122,
+ 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0,101,120,112,
+111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95,109,105,110,
+ 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, 93, 0, 99,
+104, 97,110,110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, 95, 97,120,
+105,115, 0, 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116,111,102,102,
+115, 0,115,116,114,105,100,101,108,101,110, 0,115, 99, 97,108,101, 0, 98,108,101,110,100,111,117,116, 0,115,116,114,105,100,
+101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97,115,105,110,
+112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116,116,121,112,
+101, 0, 42,110,101,119, 95,115,111, 99,107, 0,110,115, 0,108,105,109,105,116, 0,115,116, 97, 99,107, 95,105,110,100,101,120,
+ 0,105,110,116,101,114,110, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 95,101,120,116, 0,108,111, 99,120, 0,108,111, 99,
+121, 0,111,119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,116,111,115,111, 99,107, 0, 42,108,105,
+110,107, 0, 42,110,101,119, 95,110,111,100,101, 0,117,115,101,114,110, 97,109,101, 91, 51, 50, 93, 0,108, 97,115,116,121, 0,
+111,117,116,112,117,116,115, 0, 42,115,116,111,114, 97,103,101, 0,109,105,110,105,119,105,100,116,104, 0, 99,117,115,116,111,
+109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115,116,111,109, 52, 0,110,101,101,100, 95,
+101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0,116,111,116,114, 0, 98,117,116,114, 0,
+112,114,118,114, 0, 42,116,121,112,101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101,
+ 0, 42,102,114,111,109,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0, 42,115,116, 97, 99,107, 0, 42,116,
+104,114,101, 97,100,115,116, 97, 99,107, 0,105,110,105,116, 0,115,116, 97, 99,107,115,105,122,101, 0, 99,117,114, 95,105,110,
+100,101,120, 0, 97,108,108,116,121,112,101,115, 0, 42,111,119,110,116,121,112,101, 0, 42,115,101,108,105,110, 0, 42,115,101,
+108,111,117,116, 0, 40, 42,116,105,109,101, 99,117,114,115,111,114, 41, 40, 41, 0, 40, 42,115,116, 97,116,115, 95,100,114, 97,
+119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0, 42,116, 98,104, 0, 42,116, 99,104, 0, 42,
+115,100,104, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,115, 0,109,105,110,115,112,101,101,
+100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121, 0, 98,111,107,101,104, 0, 99,117,114,118,101,100,
+ 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103,101, 95,105,110, 95,104,101,105,103,104,116, 0,
+ 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112,105,110, 0,105,116,101,114, 0,119,114, 97,112,
+ 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,101, 0,104,117,101, 0,115, 97,116,
+ 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108,112,104, 97, 0,107,101,121, 91, 52,
+ 93, 0,120, 49, 0,120, 50, 0,121, 49, 0,121, 50, 0, 99,111,108,110, 97,109,101, 91, 51, 50, 93, 0, 98,107,116,121,112,101,
+ 0,114,111,116, 97,116,105,111,110, 0,103, 97,109, 99,111, 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, 0,109, 97,
+120, 98,108,117,114, 0, 98,116,104,114,101,115,104, 0, 42,100,105, 99,116, 0, 42,110,111,100,101, 0, 97,110,103,108,101, 95,
+111,102,115, 0, 99,111,108,109,111,100, 0,109,105,120, 0,116,104,114,101,115,104,111,108,100, 0,102, 97,100,101, 0,109, 0,
+ 99, 0,106,105,116, 0,112,114,111,106, 0,102,105,116, 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109,
+ 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110, 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,
+114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114,101,109,117,108,116, 97, 98,108,101, 0, 99,117,114,114, 0, 99,108,105,
+112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,104,105,116,101, 91, 51, 93, 0, 98,119,109,117,108,
+ 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,111,102,102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,105,110,
+110,101,114,114, 97,100,105,117,115, 0,114, 97,116,101, 0,114,103, 98, 91, 51, 93, 0,114,111,116, 0,115, 99,117,108,112,116,
+ 95,116,111,111,108, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99,
+116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,111,116,108, 97,121,101,114, 0,109, 97,120,108, 97,
+121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,111,108, 0,101,100,105,116,102,108, 97,103, 0,118,101,108, 91, 51,
+ 93, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0,110,117,109, 0,112, 97,114,101,110,116, 0,112, 97, 91, 52, 93,
+ 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,114, 97,110,100, 91, 51, 93, 0, 42,115,116,
+105, 99,107, 95,111, 98, 0,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, 0,105, 95,114,111,116, 91, 52, 93,
+ 0,114, 95,114,111,116, 91, 52, 93, 0,114, 95, 97,118,101, 91, 51, 93, 0,114, 95,118,101, 91, 51, 93, 0,100,105,101,116,105,
+109,101, 0, 98, 97,110,107, 0,115,105,122,101,109,117,108, 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0, 98,112,105, 0,
+ 97,108,105,118,101, 0,108,111,111,112, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100,
+101, 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115,
+105,122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,114,116, 50, 91, 51, 93, 0,100,114, 97,119,
+ 95,115,116,101,112, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115,116,
+101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111,109,
+ 0,105,110,116,101,103,114, 97,116,111,114, 0,110, 98,101,116,119,101,101,110, 0, 98,111,105,100,110,101,105,103,104, 98,111,
+117,114,115, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,110,105,109,
+ 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114, 97,110,100,
+ 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0,115,105,109,112,108,105,102,121, 95,102,108, 97,103,
+ 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105,109,112,108,105,102,121, 95,114, 97,116,101, 0,
+115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0,115,105,109,112,108,105,102,121, 95,118,105,101,
+119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0,106,105,116,102, 97, 99, 0,101,102,102, 95,104, 97,105,114, 0,
+103,114,105,100, 95,114,101,115, 0,112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101,
+ 0,114,101, 97, 99,116,102, 97, 99, 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,114,111,
+116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115,105,122,101, 0,114,101, 97, 99,116,
+115,104, 97,112,101, 0, 97, 99, 99, 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,100, 97,
+109,112,102, 97, 99, 0,114, 97,110,100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,
+104,105,108,100, 95,110, 98,114, 0,112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,
+114, 97,110,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100,102,108, 97,116, 0, 99,108,117,109,
+112,102, 97, 99, 0, 99,108,117,109,112,112,111,119, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,115,105,122,101,
+ 0,114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,104,114,101,115,
+ 0,114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 99,108,101,110,103,
+116,104, 0, 99,108,101,110,103,116,104, 95,116,104,114,101,115, 0, 98,114, 97,110, 99,104, 95,116,104,114,101,115, 0,100,114,
+ 97,119, 95,108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, 97,116,104, 95,101,110,100, 0,116,
+114, 97,105,108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0,109, 97,120, 95,108, 97,116, 95, 97,
+ 99, 99, 0,109, 97,120, 95,116, 97,110, 95, 97, 99, 99, 0, 97,118,101,114, 97,103,101, 95,118,101,108, 0, 98, 97,110,107,105,
+110,103, 0,109, 97,120, 95, 98, 97,110,107, 0,103,114,111,117,110,100,122, 0, 98,111,105,100,102, 97, 99, 91, 56, 93, 0, 98,
+111,105,100,114,117,108,101, 91, 56, 93, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98,
+ 98, 95,111, 98, 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,101,100,105,116, 0, 40, 42,102,114,101,101, 95,101,100,105,
+116, 41, 40, 41, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,
+116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, 99,104,101, 98,117,102,115, 0, 42,116, 97,114,103,
+101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0,101,102,102,101, 99,116,111,114,115, 0,114,101, 97, 99,116,101,118,
+101,110,116,115, 0,107,101,121,101,100, 95,116, 97,114,103,101,116,115, 0,116,111,116, 99,104,105,108,100, 0,116,111,116, 99,
+ 97, 99,104,101,100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, 95,112,115,121,115, 0,
+116,111,116,107,101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, 97,109,101, 91, 51, 93, 91,
+ 51, 50, 93, 0,118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, 0, 42,114,101,110,100,101,
+114,100, 97,116, 97, 0, 42, 99, 97, 99,104,101, 0, 67,100,105,115, 0, 67,118,105, 0, 91, 51, 93, 0,115,116,114,117, 99,116,
+117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98,101,110,100, 0,109, 97,120, 95,115,116,114,117, 99,116,
+ 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114,105,110,103, 95,108,101,110, 0,116,105,109,101,115, 99,
+ 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0,101,102,102, 95,119,105,110,100, 95,115, 99, 97,
+108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,115,116,101,112,115, 80,101,114, 70,114, 97,109,101, 0,112,114,
+101,114,111,108,108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, 95,116,121,112,101, 0,118,
+103,114,111,117,112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103,114,111,117,112, 95,115,116,
+114,117, 99,116, 0,112,114,101,115,101,116,115, 0, 42, 99,111,108,108,105,115,105,111,110, 95,108,105,115,116, 0,101,112,115,
+105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105,111,110, 0,115,101,108,102,101,112,115,105,108,111,110, 0,115,
+101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99,111,117,110,116, 0,112,114,101,115,115,117,
+114,101, 0, 42,112,111,105,110,116,115, 0,116,111,116,112,111,105,110,116,115, 0,116,104,105, 99,107,110,101,115,115, 0,115,
+116,114,111,107,101,115, 0,102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0,103,115,116,101,112, 0,
+105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,115, 98,117,102,102,101,114, 95,115,
+102,108, 97,103, 0, 42,115, 98,117,102,102,101,114, 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110, 97,
+ 99,116,105,118,101, 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95,115,
+ 97,118,101,100, 0,111,112,101,114, 97,116,111,114,115, 0,113,117,101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,
+115, 0,112, 97,105,110,116, 99,117,114,115,111,114,115, 0,107,101,121,109, 97,112,115, 0, 42,103,104,111,115,116,119,105,110,
+ 0, 42,110,101,119,115, 99,114,101,101,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 51, 50, 93, 0,112,111,115,120, 0,
+112,111,115,121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,
+115,111,114, 0, 97,100,100,109,111,117,115,101,109,111,118,101, 0, 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,
+114,115,119,105,110, 0, 42,116,119,101, 97,107, 0,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108,
+ 0, 42,100,114, 97,119,100, 97,116, 97, 0,116,105,109,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,
+116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, 52, 93, 0, 42,112,116,114, 0,115,104,105,102,116, 0, 99,116,114,108, 0,
+ 97,108,116, 0,111,115,107,101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,107,101,121,109, 97,112, 0,110, 97,109,
+101,105,100, 91, 54, 52, 93, 0,115,112, 97, 99,101,105,100, 0,114,101,103,105,111,110,105,100, 0, 42, 99,117,115,116,111,109,
+100, 97,116, 97, 0, 42,114,101,112,111,114,116,115, 0,109,118, 97,108, 91, 50, 93, 0,112,114,101,118,120, 0,112,114,101,118,
+121, 0,117,110,105, 99,111,100,101, 0, 97,115, 99,105,105, 0, 42,107,101,121,109, 97,112, 95,105,100,110, 97,109,101, 0, 99,
+117,115,116,111,109, 0, 99,117,115,116,111,109,100, 97,116, 97,102,114,101,101, 0, 42,101,100, 97,116, 97, 0,105,110,102,108,
+117,101,110, 99,101, 0, 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,
+108,121, 95,111,114,100,101,114, 0, 97,109,112,108,105,116,117,100,101, 0,112,104, 97,115,101, 95,109,117,108,116,105,112,108,
+105,101,114, 0,112,104, 97,115,101, 95,111,102,102,115,101,116, 0,118, 97,108,117,101, 95,111,102,102,115,101,116, 0,109,105,
+100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0, 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,
+114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99,121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,
+101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0, 42,114,110, 97, 95,112, 97,116,104, 0, 97,114,114, 97,121, 95,105,
+110,100,101,120, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0,118,101, 99, 91, 50, 93, 0, 42,102,112,116,
+ 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,114, 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,
+111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0,115,116,114,105,112,115, 0, 42,114,101,109, 97,112, 0,102, 99,
+117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101, 0, 98,108,101,110,100,109,111,100,101, 0,101,120,116,101,110,
+100,109,111,100,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,105,100,116,121,112,101, 0,116,101,109,112,108, 97,116,101,115,
+ 0,103,114,111,117,112,109,111,100,101, 0,112, 97,116,104,115, 0,107,101,121,105,110,103,102,108, 97,103, 0, 42,116,109,112,
+ 97, 99,116, 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115,
+ 0,111,118,101,114,114,105,100,101,115, 0, 0, 84, 89, 80, 69,158, 1, 0, 0, 99,104, 97,114, 0,117, 99,104, 97,114, 0,115,
+104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111,110,103, 0,102,108,111, 97,116,
+ 0,100,111,117, 98,108,101, 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66,
+ 97,115,101, 0,118,101, 99, 50,115, 0,118,101, 99, 50,105, 0,118,101, 99, 50,102, 0,118,101, 99, 50,100, 0,118,101, 99, 51,
+105, 0,118,101, 99, 51,102, 0,118,101, 99, 51,100, 0,118,101, 99, 52,105, 0,118,101, 99, 52,102, 0,118,101, 99, 52,100, 0,
+114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101,114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,111,112,101,
+114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105,108,101, 68, 97,116, 97, 0, 80,114,101,118,105,101,119, 73,
+109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98,106,101, 99,116, 0, 73,112,111, 67,117,114,118,101, 0, 66,
+ 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73,112,111, 0, 75,101,121, 66,108,111, 99,107, 0, 75,101,121,
+ 0, 65,110,105,109, 68, 97,116, 97, 0, 83, 99,114,105,112,116, 76,105,110,107, 0, 84,101,120,116, 76,105,110,101, 0, 84,101,
+120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109,101,114, 97, 0,
+ 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120,116,117,114,101,
+ 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, 80,108,117,103,
+105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97,112, 0, 73,109,
+ 66,117,102, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84,101,120, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, 67,117,
+114,118,101, 77, 97,112,112,105,110,103, 0, 87, 97,118,101, 0, 77, 97,116,101,114,105, 97,108, 0, 71,114,111,117,112, 0, 86,
+ 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, 0, 66,111,117,110,100, 66,111,120,
+ 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, 0, 84,101,120,116, 66,111,120, 0,
+ 67,117,114,118,101, 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70,111,110,116, 0, 77,101,115,104, 0,
+ 77, 70, 97, 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, 77,
+ 68,101,102,111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0, 77, 83,101,108,101, 99,116, 0,
+ 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 0, 80, 97,114,
+116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 0, 77, 68,101,102,111,114,109, 87,101,105,103,104,116, 0, 77, 84,101,
+120, 80,111,108,121, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, 77, 70,108,111, 97,116, 80,114,111,
+112,101,114,116,121, 0, 77, 73,110,116, 80,114,111,112,101,114,116,121, 0, 77, 83,116,114,105,110,103, 80,114,111,112,101,114,
+116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, 97, 99,101, 0, 77, 68,105,115,112,115, 0, 32, 35,100,101,102,105,110,101,
+ 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 32, 40, 49, 60, 60, 49, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83,
+ 69, 65, 77, 32, 40, 49, 60, 60, 50, 41, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 71, 79, 78, 32, 40, 49, 60, 60, 51,
+ 41, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68, 69, 82, 32, 40, 49, 60, 60, 53, 41, 32,
+ 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 32, 40, 49, 60, 60, 55, 41, 32, 35,100,101,102,
+105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 32, 40, 49, 60, 60, 56, 41, 32, 35,100,101,102,105,110,101, 32,
+ 77, 69, 95, 83, 72, 65, 82, 80, 32, 40, 49, 60, 60, 57, 41, 32, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73,
+ 80, 86, 49, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 32, 50, 32, 35,100,101,102,105,110,
+101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 52, 32,
+ 56, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 77,
+ 69, 95, 80, 82, 79, 74, 88, 90, 32, 51, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 89, 90, 32, 54, 52,
+ 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86,
+ 50, 86, 51, 32, 50, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 32, 52, 32, 35,100,101,102,105,110,101, 32,
+ 77, 69, 95, 86, 51, 86, 52, 32, 52, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 52, 86, 49, 32, 56, 32, 32, 35,100,101,
+102,105,110,101, 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 65, 67, 69,
+ 95, 83, 69, 76, 32, 50, 32, 32, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, 69,108, 32, 48, 32, 35,100,101,102,105,
+110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 32, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 32, 32,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 49, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95,
+ 65, 67, 84, 73, 86, 69, 32, 50, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 49, 32, 52, 32, 35,100,101,102,
+105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 51, 32, 49, 54,
+ 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 52, 32, 51, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 72,
+ 73, 68, 69, 32, 54, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73, 67, 32, 49, 32, 35,100,
+101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95,
+ 84, 69, 88, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 86, 69, 82, 84, 32, 56, 32, 35,100,
+101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 32, 49, 54, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65,
+ 82, 69, 68, 67, 79, 76, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 84, 73, 76, 69, 83, 32, 49, 50, 56, 32, 32,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 32, 50, 53, 54, 32, 35,100,101,102,105,110,101,
+ 32, 84, 70, 95, 84, 87, 79, 83, 73, 68, 69, 32, 53, 49, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 73, 78, 86, 73, 83,
+ 73, 66, 76, 69, 32, 49, 48, 50, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79, 76, 32, 50, 48, 52, 56, 32,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 32, 52, 48, 57, 54, 32, 32, 35,100,101,102,
+105,110,101, 32, 84, 70, 95, 83, 72, 65, 68, 79, 87, 32, 56, 49, 57, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 77,
+ 70, 79, 78, 84, 32, 49, 54, 51, 56, 52, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 79, 76, 73, 68, 32, 48, 32, 35,
+100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 32, 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65,
+ 32, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 32, 52, 32, 32, 32, 35,100,101,102,105,110,101, 32, 84,
+ 70, 95, 83, 85, 66, 32, 51, 32, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 49, 32,
+ 49, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 50, 32, 50, 32, 35,100,101,102,105,
+110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 32, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68,
+ 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 32, 56, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 49, 32, 49, 54, 32,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 32, 51, 50, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73,
+ 78, 51, 32, 54, 52, 32, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 52, 32, 49, 50, 56, 32, 35,101,110,100,105,102,
+ 32, 32, 99,104, 97,114, 32,117,115,101, 95, 99,111,108, 44, 32,102,108, 97,103, 59, 10, 10, 9, 47, 42, 32, 83,112,101, 99,105,
+ 97,108, 32,108,101,118,101,108, 32, 49, 32,100, 97,116, 97, 32,116,104, 97,116, 32, 99, 97,110,110,111,116, 32, 98,101, 32,109,
+111,100,105,102,105,101,100, 32,102,114,111,109, 32,111,116,104,101,114, 32,108,101,118,101,108,115, 32, 42, 47, 10, 9, 67,117,
+115,116,111,109, 68, 97,116, 97, 32,118,100, 97,116, 97, 59, 10, 9, 67,117,115,116,111,109, 68, 97,116, 97, 32,102,100, 97,116,
+ 97, 59, 10, 9,115,104,111,114,116, 32, 42,101,100,103,101, 95,102,108, 97,103,115, 59, 10, 9, 99,104, 97,114, 32, 42,101,100,
+103,101, 95, 99,114,101, 97,115,101,115, 59, 10,125, 32, 77,117,108,116,105,114,101,115, 59, 10, 10, 47, 42, 42, 32, 69,110,100,
+ 32, 77,117,108,116,105,114,101,115, 32, 42, 42, 47, 10, 10,116,121,112,101,100,101,102, 32,115,116,114,117, 99,116, 32, 80, 97,
+114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 32,123, 10, 9,117,110,115,105,103,110,101,100, 32,105,110,116, 32,
+ 42,118,101,114,116, 95,109, 97,112, 59, 32, 47, 42, 32,118,101,114,116, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120,
+ 93, 61, 32, 78,101,119, 32, 73,110,100,101,120, 32, 42, 47, 10, 9,105,110,116, 32, 42,101,100,103,101, 95,109, 97,112, 59, 32,
+ 47, 42, 32,101,100,103,101, 95,109, 97,112, 91, 79,108,100, 32, 73,110,100,101,120, 93, 61, 32, 78,101,119, 32, 73,110,100,101,
+120, 44, 32, 45, 49, 61, 32,104,105,100,100,101,110, 32, 42, 47, 10, 9, 77, 70, 97, 99,101, 32, 42,111,108,100, 95,102, 97, 99,
+101,115, 59, 10, 9, 77, 69,100,103,101, 32, 42,111,108,100, 95,101,100,103,101,115, 59, 10, 9,117,110,115,105,103,110,101,100,
+ 32,105,110,116, 32,116,111,116,102, 97, 99,101, 44, 32,116,111,116,101,100,103,101, 44, 32,116,111,116,118,101,114,116, 44, 32,
+112, 97,100, 59, 10,125, 32, 80, 97,114,116,105, 97,108, 86,105,115,105, 98,105,108,105,116,121, 59, 10, 10, 47, 42, 32,109,118,
+101,114,116, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32,
+ 77, 69, 95, 83, 80, 72, 69, 82, 69, 84, 69, 83, 84, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 80, 72, 69, 82,
+ 69, 84, 69, 77, 80, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 72, 73, 68, 69, 9, 9, 9, 49, 54, 10, 35,100,101,
+102,105,110,101, 32, 77, 69, 95, 86, 69, 82, 84, 95, 77, 69, 82, 71, 69, 68, 9, 9, 40, 49, 60, 60, 54, 41, 10, 10, 47, 42, 32,
+109,101,100,103,101, 45, 62,102,108, 97,103, 32, 40, 49, 61, 83, 69, 76, 69, 67, 84, 41, 42, 47, 10, 35,100,101,102,105,110,101,
+ 32, 77, 69, 95, 69, 68, 71, 69, 68, 82, 65, 87, 9, 9, 9, 40, 49, 60, 60, 49, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69,
+ 95, 83, 69, 65, 77, 9, 9, 9, 9, 40, 49, 60, 60, 50, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 71, 79, 78, 9,
+ 9, 9, 9, 40, 49, 60, 60, 51, 41, 10, 9, 9, 9, 9, 9, 9, 47, 42, 32,114,101,115,101,114,118,101, 32, 49, 54, 32,102,111,
+114, 32, 77, 69, 95, 72, 73, 68, 69, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 69, 68, 71, 69, 82, 69, 78, 68,
+ 69, 82, 9, 9, 40, 49, 60, 60, 53, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 76, 79, 79, 83, 69, 69, 68, 71, 69, 9,
+ 9, 40, 49, 60, 60, 55, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 69, 65, 77, 95, 76, 65, 83, 84, 9, 9, 40, 49,
+ 60, 60, 56, 41, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 83, 72, 65, 82, 80, 9, 9, 9, 40, 49, 60, 60, 57, 41, 10, 10,
+ 47, 42, 32,112,117,110,111, 32, 61, 32,118,101,114,116,101,120,110,111,114,109, 97,108, 32, 40,109,102, 97, 99,101, 41, 32, 42,
+ 47, 10, 47, 42, 32,114,101,110,100,101,114, 32, 97,115,115,117,109,101,115, 32,102,108,105,112,115, 32,116,111, 32, 98,101, 32,
+111,114,100,101,114,101,100, 32,108,105,107,101, 32,116,104,105,115, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95,
+ 70, 76, 73, 80, 86, 49, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 50, 9, 9, 50, 10, 35,
+100,101,102,105,110,101, 32, 77, 69, 95, 70, 76, 73, 80, 86, 51, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70,
+ 76, 73, 80, 86, 52, 9, 9, 56, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 89, 9, 9, 49, 54, 10, 35,
+100,101,102,105,110,101, 32, 77, 69, 95, 80, 82, 79, 74, 88, 90, 9, 9, 51, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95,
+ 80, 82, 79, 74, 89, 90, 9, 9, 54, 52, 10, 10, 47, 42, 32,101,100, 99,111,100,101, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47,
+ 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 49, 86, 50, 9, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95,
+ 86, 50, 86, 51, 9, 9, 9, 50, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 49, 9, 9, 9, 52, 10, 35,100,101,
+102,105,110,101, 32, 77, 69, 95, 86, 51, 86, 52, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 52, 86, 49,
+ 9, 9, 9, 56, 10, 10, 47, 42, 32,102,108, 97,103, 32, 40,109,102, 97, 99,101, 41, 32, 42, 47, 10, 35,100,101,102,105,110,101,
+ 32, 77, 69, 95, 83, 77, 79, 79, 84, 72, 9, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 65, 67, 69, 95, 83,
+ 69, 76, 9, 9, 9, 50, 10, 9, 9, 9, 9, 9, 9, 47, 42, 32,102,108, 97,103, 32, 77, 69, 95, 72, 73, 68, 69, 61, 61, 49, 54,
+ 32,105,115, 32,117,115,101,100, 32,104,101,114,101, 32,116,111,111, 32, 42, 47, 32, 10, 47, 42, 32,109,115,101,108,101, 99,116,
+ 45, 62,116,121,112,101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 86, 83, 69,108, 9, 48, 10, 35,100,101,102,
+105,110,101, 32, 77, 69, 95, 69, 83, 69,108, 32, 49, 10, 35,100,101,102,105,110,101, 32, 77, 69, 95, 70, 83, 69, 76, 32, 50, 10,
+ 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,102,108, 97,103, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83,
+ 69, 76, 69, 67, 84, 9, 49, 32, 47, 42, 32,117,115,101, 32, 77, 70, 97, 99,101, 32,104,105,100,101, 32,102,108, 97,103, 32, 40,
+ 97,102,116,101,114, 32, 50, 46, 52, 51, 41, 44, 32,115,104,111,117,108,100, 32, 98,101, 32, 97, 98,108,101, 32,116,111, 32,114,
+101,117,115,101, 32, 97,102,116,101,114, 32, 50, 46, 52, 52, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 67,
+ 84, 73, 86, 69, 9, 50, 32, 47, 42, 32,100,101,112,114,101, 99, 97,116,101,100, 33, 32, 42, 47, 10, 35,100,101,102,105,110,101,
+ 32, 84, 70, 95, 83, 69, 76, 49, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 50, 9, 9, 56, 10, 35,
+100,101,102,105,110,101, 32, 84, 70, 95, 83, 69, 76, 51, 9, 9, 49, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 69,
+ 76, 52, 9, 9, 51, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 72, 73, 68, 69, 9, 9, 54, 52, 32, 47, 42, 32,117,110,
+117,115,101,100, 44, 32,115, 97,109,101, 32, 97,115, 32, 84, 70, 95, 83, 69, 76, 69, 67, 84, 32, 42, 47, 10, 10, 47, 42, 32,109,
+116,102, 97, 99,101, 45, 62,109,111,100,101, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 89, 78, 65, 77, 73,
+ 67, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72, 65, 83, 79, 82, 84, 9, 50, 10, 35,100,101,102,
+105,110,101, 32, 84, 70, 95, 84, 69, 88, 9, 9, 9, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68,
+ 86, 69, 82, 84, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 76, 73, 71, 72, 84, 9, 9, 49, 54, 10, 10, 35,100,101,
+102,105,110,101, 32, 84, 70, 95, 83, 72, 65, 82, 69, 68, 67, 79, 76, 9, 54, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95,
+ 84, 73, 76, 69, 83, 9, 9, 49, 50, 56, 9, 9, 47, 42, 32,100,101,112,114,101, 99, 97,116,101,100, 32, 42, 47, 10, 35,100,101,
+102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 9, 50, 53, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70,
+ 95, 84, 87, 79, 83, 73, 68, 69, 9, 9, 53, 49, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 73, 78, 86, 73, 83, 73, 66,
+ 76, 69, 9, 49, 48, 50, 52, 10, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 79, 66, 67, 79, 76, 9, 9, 50, 48, 52, 56, 10,
+ 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 73, 76, 76, 66, 79, 65, 82, 68, 50, 9, 52, 48, 57, 54, 9, 47, 42, 32,119,105,
+116,104, 32, 90, 32, 97,120,105,115, 32, 99,111,110,115,116,114, 97,105,110,116, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32,
+ 84, 70, 95, 83, 72, 65, 68, 79, 87, 9, 9, 56, 49, 57, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 66, 77, 70, 79, 78,
+ 84, 9, 9, 49, 54, 51, 56, 52, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45, 62,116,114, 97,110,115,112, 44, 32,118, 97,108,
+117,101,115, 32, 49, 45, 52, 32, 97,114,101, 32,117,115,101,100, 32, 97,115, 32,102,108, 97,103,115, 32,105,110, 32,116,104,101,
+ 32, 71, 76, 44, 32, 87, 65, 82, 78, 73, 78, 71, 44, 32, 84, 70, 95, 83, 85, 66, 32, 99, 97,110,116, 32,119,111,114,107, 32,119,
+105,116,104, 32,116,104,105,115, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 79, 76, 73, 68, 9, 48, 10, 35,
+100,101,102,105,110,101, 32, 84, 70, 95, 65, 68, 68, 9, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 65, 76, 80, 72,
+ 65, 9, 50, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 67, 76, 73, 80, 9, 9, 52, 32, 47, 42, 32, 99,108,105,112,109, 97,
+112, 32, 97,108,112,104, 97, 47, 98,105,110, 97,114,121, 32, 97,108,112,104, 97, 32, 97,108,108, 32,111,114, 32,110,111,116,104,
+105,110,103, 33, 32, 42, 47, 10, 10, 47, 42, 32,115,117, 98, 32,105,115, 32,110,111,116, 32, 97,118, 97,105,108, 97, 98,108,101,
+ 32,105,110, 32,116,104,101, 32,117,115,101,114, 32,105,110,116,101,114,102, 97, 99,101, 32, 97,110,121,109,111,114,101, 32, 42,
+ 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 83, 85, 66, 9, 9, 51, 10, 10, 10, 47, 42, 32,109,116,102, 97, 99,101, 45,
+ 62,117,110,119,114, 97,112, 32, 42, 47, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68,
+ 49, 9, 49, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 50, 9, 50, 10, 35,100,101,
+102,105,110,101, 32, 84, 70, 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 51, 9, 52, 10, 35,100,101,102,105,110,101, 32, 84, 70,
+ 95, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 52, 9, 56, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 49, 9, 9,
+ 32, 32, 32, 32, 49, 54, 10, 35,100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 50, 9, 9, 32, 32, 32, 32, 51, 50, 10, 35,
+100,101,102,105,110,101, 32, 84, 70, 95, 80, 73, 78, 51, 9, 32, 32, 32, 9, 9, 54, 52, 10, 35,100,101,102,105,110,101, 32, 84,
+ 70, 95, 80, 73, 78, 52, 9, 32, 32, 32, 32, 9, 49, 50, 56, 10, 10, 35,101,110,100,105,102, 10,105,110, 79, 67, 75, 33,116, 95,
+102, 97, 99,101, 59, 32, 32, 32, 32, 32, 65, 69, 0, 77,117,108,116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,101,
+115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 69,100,
+103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,117,
+ 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,117,105,108,100, 77,111,100,
+105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,114, 97,121,
+ 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0,
+ 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66,101,118,101,108, 77,111,100,105,102,
+105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,105,115,112,108, 97,
+ 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99,116, 77,111,100,105,102,105,101,114,
+ 68, 97,116, 97, 0, 68,101, 99,105,109, 97,116,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,111,116,104,
+ 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87, 97,
+118,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, 77,111,100,105,102,105,101,114, 68,
+ 97,116, 97, 0, 72,111,111,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,102,116, 98,111,100,121, 77,111,100,
+105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,
+104, 0, 67,108,111,116,104, 83,105,109, 83,101,116,116,105,110,103,115, 0, 67,108,111,116,104, 67,111,108,108, 83,101,116,116,
+105,110,103,115, 0, 80,111,105,110,116, 67, 97, 99,104,101, 0, 67,111,108,108,105,115,105,111,110, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 66, 86, 72, 84,114,101,101, 0, 83,117,114,102, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116,
+ 97, 0, 68,101,114,105,118,101,100, 77,101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,114,111,109, 77,101,115,104, 0, 66,111,
+111,108,101, 97,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73,110,102,108,117,101,110, 99,101, 0,
+ 77, 68,101,102, 67,101,108,108, 0, 77,101,115,104, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0,
+ 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105,
+ 99,108,101, 83,121,115,116,101,109, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,105,
+101,114, 68, 97,116, 97, 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,105,
+114,101,115, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,114,
+ 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,112,
+ 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,101,
+114, 68, 97,116, 97, 0, 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 98, 65, 99,116,105,
+111,110, 0, 98, 80,111,115,101, 0, 66,117,108,108,101,116, 83,111,102,116, 66,111,100,121, 0, 80, 97,114,116, 68,101,102,108,
+101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72,111,111,107, 0, 82, 78, 71, 0, 80, 84, 67, 97, 99,104,101, 77,
+101,109, 0, 83, 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105,110,103,
+ 0, 83, 66, 83, 99,114, 97,116, 99,104, 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,
+116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 70, 70, 77,112,101,103, 67,111,100,101,
+ 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101,110,101, 82,101,110,100,101,114, 76, 97,121,101,114,
+ 0, 82,101,110,100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, 70,114,
+ 97,109,105,110,103, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 73,109, 97,103,101, 80, 97,105,110,116, 83,101,116,116,105,
+110,103,115, 0, 66,114,117,115,104, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116,
+105, 99,108,101, 69,100,105,116, 83,101,116,116,105,110,103,115, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116,
+ 97,116,105,111,110, 0, 83, 99,117,108,112,116, 0, 83, 99,117,108,112,116, 83,101,115,115,105,111,110, 0, 86, 80, 97,105,110,
+116, 0, 84,111,111,108, 83,101,116,116,105,110,103,115, 0, 98, 83,116, 97,116,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,
+101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111,114,101,115,116, 0, 66, 71,112,105, 99, 0, 82,101,103,105,111,110, 86,
+105,101,119, 51, 68, 0, 98, 71, 80,100, 97,116, 97, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,116,111,112,111, 86,
+105,101,119, 68, 97,116, 97, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,
+114,101, 0,119,109, 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119,
+ 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111, 0, 98, 83, 99,114,101,101,110, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,
+111,112,101, 83,104,101,101,116, 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 70,105,108,101,
+ 83,101,108,101, 99,116, 80, 97,114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 76,105,115,116, 0,
+119,109, 79,112,101,114, 97,116,111,114, 0, 70,105,108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0,
+ 84,114,101,101, 83,116,111,114,101, 0, 84,114,101,101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,
+103,101, 0, 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83, 99,114,105,112,116, 0, 83,112, 97,
+ 99,101, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97,
+ 99,101, 76,111,103,105, 99, 0, 83,112, 97, 99,101, 73,109, 97, 83,101,108, 0,117,105, 70,111,110,116, 0,117,105, 70,111,110,
+116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105,100,103,101,116, 67,111,108,111,114,115, 0,117,105,
+ 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,
+112, 97, 99,101, 0, 84,104,101,109,101, 87,105,114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 83,111,108,105,100,
+ 76,105,103,104,116, 0, 85,115,101,114, 68,101,102, 0, 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100,103,101, 0, 80, 97,
+110,101,108, 0, 80, 97,110,101,108, 84,121,112,101, 0,117,105, 76, 97,121,111,117,116, 0, 72,101, 97,100,101,114, 0, 72,101,
+ 97,100,101,114, 84,121,112,101, 0, 77,101,110,117, 0, 77,101,110,117, 84,121,112,101, 0, 83, 99,114, 65,114,101, 97, 0, 83,
+112, 97, 99,101, 84,121,112,101, 0, 65, 82,101,103,105,111,110, 0, 65, 82,101,103,105,111,110, 84,121,112,101, 0, 70,105,108,
+101, 71,108,111, 98, 97,108, 0, 83,116,114,105,112, 69,108,101,109, 0, 84, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,
+105,112, 67,114,111,112, 0, 83,116,114,105,112, 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114,
+ 66, 97,108, 97,110, 99,101, 0, 83,116,114,105,112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,
+101,113, 0, 83,101,113,117,101,110, 99,101, 0, 98, 83,111,117,110,100, 0,104,100, 97,117,100,105,111, 0, 77,101,116, 97, 83,
+116, 97, 99,107, 0, 87,105,112,101, 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109,
+ 86, 97,114,115, 0, 83,111,108,105,100, 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108,
+ 86, 97,114,115, 0, 69,102,102,101, 99,116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,
+116,105, 99,108,101, 0, 87, 97,118,101, 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,
+115,111,114, 0, 98, 77,111,117,115,101, 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,
+101,121, 98,111, 97,114,100, 83,101,110,115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65,
+ 99,116,117, 97,116,111,114, 83,101,110,115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,
+105,115,105,111,110, 83,101,110,115,111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109,
+ 83,101,110,115,111,114, 0, 98, 82, 97,121, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115,111,114,
+ 0, 98, 83,101,110,115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, 83,101,
+110,115,111,114, 0, 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111,110,116,
+ 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 65,
+ 99,116,105,111,110, 65, 99,116,117, 97,116,111,114, 0, 98, 83,111,117,110,100, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 68,
+ 65, 99,116,117, 97,116,111,114, 0, 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,
+101,110,101, 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79,
+ 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,
+114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98,
+ 71,114,111,117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,
+101,115,115, 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,
+115,105, 98,105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117,
+ 97,116,111,114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,
+116,111,114, 0, 70,114,101,101, 67, 97,109,101,114, 97, 0, 98, 83, 97,109,112,108,101, 0, 98, 83,111,117,110,100, 76,105,115,
+116,101,110,101,114, 0, 83,112, 97, 99,101, 83,111,117,110,100, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,
+101, 0, 98, 65,114,109, 97,116,117,114,101, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 65, 99,116,105,111,110,
+ 71,114,111,117,112, 0, 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108,
+ 0, 98, 67,111,110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0,
+ 98, 67,111,110,115,116,114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,
+105,110,116, 0, 98, 75,105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,107, 84,
+111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,
+116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 77,105,110, 77, 97,120, 67,
+111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65,
+ 99,116,105,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114,
+ 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,116,114,101,
+116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,105,103,105,100, 66,111,100,121, 74,111,105,110,116, 67,
+111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,104,
+105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115,102,111,114,109, 67,111,110,115,116,114,
+ 97,105,110,116, 0, 98, 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,
+105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,
+116, 0, 98, 68,105,115,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114,
+ 97,112, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,101,114, 0, 98, 65, 99,
+116,105,111,110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, 83,111, 99,107,101,116,
+ 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,
+111,100,101, 84,121,112,101, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, 78,111,100,101, 66,108,117,114, 68, 97,
+116, 97, 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, 97,116,101,114, 97,108, 66,108,
+117,114, 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, 73,109, 97,103,101, 70,105,108,101, 0,
+ 78,111,100,101, 67,104,114,111,109, 97, 0, 78,111,100,101, 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111,
+ 97,116,115, 0, 78,111,100,101, 71,101,111,109,101,116,114,121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,
+111,100,101, 68,101,102,111, 99,117,115, 0, 78,111,100,101, 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108,
+ 97,114,101, 0, 78,111,100,101, 84,111,110,101,109, 97,112, 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 84,101,120,
+ 78,111,100,101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,114,118,101, 77, 97,
+112, 0, 66,114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,114, 0, 72, 97,105,
+114, 75,101,121, 0, 80, 97,114,116,105, 99,108,101, 75,101,121, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 75,
+101,121,101,100, 80, 97,114,116,105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68, 97,116, 97, 0,
+ 80, 97,114,116,105, 99,108,101, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 0, 80, 97,
+114,116,105, 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,
+110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,
+114, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 69,118,101,
+110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,116,117,114,101, 0,119,109, 75,101,121,109, 97,
+112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114,
+ 97,116,111,114, 84,121,112,101, 0, 82,101,112,111,114,116, 76,105,115,116, 0, 70, 77,111,100,105,102,105,101,114, 0, 70, 77,
+111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, 77,111,100, 95, 70,117,110, 99,116,105,111,110, 71,101,110,101,114, 97,
+116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,
+112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115, 0, 70, 77,111,100, 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95,
+ 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,105,115,101, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 67,
+104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117,114,118,101, 0, 65,110,105,109, 77,
+ 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116,114,105,112, 0, 78,108, 97, 84,114,
+ 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65,110,105,109, 79,118,101,114,114,105,
+100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 0, 0, 0, 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0,
+ 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 0, 0, 16, 0, 24, 0, 16, 0, 4, 0, 8, 0, 8, 0, 16, 0, 12, 0, 12, 0, 24, 0,
+ 16, 0, 16, 0, 32, 0, 16, 0, 16, 0, 32, 0, 96, 0, 72, 0, 72, 2, 0, 0, 40, 0,144, 0, 64, 4,112, 0, 36, 0, 56, 0,
+112, 0,128, 0,168, 0, 88, 0, 24, 0, 40, 0, 48, 0,176, 0, 16, 0,176, 0, 40, 0, 96, 5,184, 1, 0, 0, 0, 0, 0, 0,
+144, 0, 80, 1,120, 1, 24, 0, 8, 3,200, 0, 0, 0,232, 0,136, 0,248, 1, 56, 1, 80, 0,248, 2,104, 0, 88, 1, 0, 0,
+128, 0,104, 0,192, 0, 80, 0, 8, 0, 16, 0,200, 1, 0, 0, 0, 0, 0, 0,144, 1, 20, 0, 48, 0, 64, 0, 24, 0, 12, 0,
+ 16, 0, 4, 0, 8, 0, 8, 0, 0, 0, 32, 0,112, 0, 48, 0, 8, 0, 16, 0, 8, 0, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0,
+ 16, 0, 0, 0, 16, 0, 64, 0, 24, 0, 12, 0, 64, 0, 72, 0, 96, 0,112, 0,120, 0, 88, 0,120, 0,152, 0, 88, 0, 80, 0,
+128, 0, 80, 0,176, 0,216, 0, 80, 0,112, 0,128, 0,216, 0,128, 0,208, 0, 72, 0,112, 0, 0, 0,136, 0, 32, 0,240, 0,
+152, 0, 0, 0, 88, 0, 0, 0, 0, 0, 88, 0, 8, 0, 8, 0, 8, 1,104, 0,176, 1, 96, 0, 88, 0, 88, 0, 88, 0,184, 1,
+136, 0,128, 0,232, 0, 48, 0,144, 0, 72, 0,120, 0,136, 0,176, 0,224, 0, 0, 0, 40, 0, 16, 0, 0, 0, 0, 0, 0, 0,
+232, 1, 40, 0,184, 0,152, 0, 56, 0, 16, 0, 88, 0,248, 3, 64, 0, 16, 0, 88, 0, 24, 0, 40, 1, 8, 0, 88, 0, 88, 0,
+ 40, 0, 0, 0, 48, 0, 64, 1, 32, 0, 48, 2, 0, 0, 0, 0, 64, 0,248, 2,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 32, 1, 56, 0,136, 0, 72, 0,208, 0,224, 0, 32, 0, 8, 1,224, 0,128, 1, 96, 0, 0, 0,120, 0, 0, 0, 24, 1, 16, 0,
+ 16, 0,168, 0,208, 0,144, 2,120, 2, 64, 0,184, 0, 16, 1, 72, 0,192, 2, 24, 1, 32, 0,232, 0, 32, 0, 32, 0, 48, 2,
+ 16, 1, 16, 0,160, 20, 56, 0, 64, 11, 32, 0, 40, 0, 80, 1, 0, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0,184, 0, 0, 0,
+ 24, 1, 0, 0, 40, 0, 80, 0, 48, 0, 16, 0, 8, 0, 52, 0, 0, 1, 32, 1,200, 1, 8, 1, 72, 1, 0, 0, 32, 0, 12, 0,
+ 24, 0, 48, 0, 16, 0, 24, 0, 24, 0, 32, 0, 72, 1, 0, 0, 64, 0, 80, 0, 48, 0, 8, 0, 48, 0, 72, 0,104, 0, 40, 0,
+ 8, 0, 72, 0, 44, 0, 40, 0,108, 0, 72, 0, 96, 0,104, 0, 60, 0,128, 0, 80, 0, 80, 0, 16, 0, 96, 0, 32, 0, 20, 0,
+ 88, 0, 24, 0, 80, 0,112, 0, 84, 0, 32, 0, 96, 0, 64, 0, 56, 0,112, 0,140, 0, 4, 0, 24, 0, 16, 0, 8, 0, 40, 0,
+ 0, 0, 88, 0,208, 0, 40, 0, 24, 1,160, 0,232, 1,120, 0,248, 0, 88, 0, 56, 0, 80, 0,128, 0, 80, 0,112, 0, 56, 0,
+ 48, 0, 48, 0, 72, 0, 48, 0, 72, 0, 48, 0, 24, 0, 56, 0,104, 0, 16, 0,112, 0, 96, 0, 28, 0, 28, 0, 28, 0, 56, 0,
+ 24, 0, 72, 0,168, 0, 40, 0,144, 0, 56, 0, 0, 1, 0, 0, 0, 0, 16, 0, 40, 0, 28, 0, 12, 0, 12, 0, 16, 1, 40, 0,
+ 8, 0, 8, 0, 64, 0, 32, 0, 24, 0, 16, 0, 24, 0, 32, 0, 8, 0, 32, 0, 12, 0, 56, 0, 24, 0, 72, 0, 24, 0, 56, 0,
+ 72, 0, 40, 0, 8, 1, 40, 2, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0,208, 0,224, 0, 72, 0, 0, 0, 0, 0,
+104, 0, 0, 0,104, 0, 0, 0, 0, 0,104, 0, 24, 0, 24, 0, 16, 0, 24, 0, 8, 0, 16, 0, 24, 0, 20, 0,104, 0, 32, 1,
+ 16, 0,104, 0, 0, 1, 40, 0,192, 0,104, 0,112, 0,104, 0, 32, 0, 80, 0, 83, 84, 82, 67,100, 1, 0, 0, 10, 0, 2, 0,
+ 10, 0, 0, 0, 10, 0, 1, 0, 11, 0, 3, 0, 11, 0, 0, 0, 11, 0, 1, 0, 9, 0, 2, 0, 12, 0, 2, 0, 9, 0, 3, 0,
+ 9, 0, 4, 0, 13, 0, 2, 0, 2, 0, 5, 0, 2, 0, 6, 0, 14, 0, 2, 0, 4, 0, 5, 0, 4, 0, 6, 0, 15, 0, 2, 0,
+ 7, 0, 5, 0, 7, 0, 6, 0, 16, 0, 2, 0, 8, 0, 5, 0, 8, 0, 6, 0, 17, 0, 3, 0, 4, 0, 5, 0, 4, 0, 6, 0,
+ 4, 0, 7, 0, 18, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 19, 0, 3, 0, 8, 0, 5, 0, 8, 0, 6, 0,
+ 8, 0, 7, 0, 20, 0, 4, 0, 4, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 4, 0, 8, 0, 21, 0, 4, 0, 7, 0, 5, 0,
+ 7, 0, 6, 0, 7, 0, 7, 0, 7, 0, 8, 0, 22, 0, 4, 0, 8, 0, 5, 0, 8, 0, 6, 0, 8, 0, 7, 0, 8, 0, 8, 0,
+ 23, 0, 4, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 11, 0, 4, 0, 12, 0, 24, 0, 4, 0, 7, 0, 9, 0, 7, 0, 10, 0,
+ 7, 0, 11, 0, 7, 0, 12, 0, 25, 0, 4, 0, 9, 0, 13, 0, 12, 0, 14, 0, 4, 0, 15, 0, 4, 0, 16, 0, 26, 0, 10, 0,
+ 26, 0, 0, 0, 26, 0, 1, 0, 0, 0, 17, 0, 0, 0, 18, 0, 2, 0, 19, 0, 0, 0, 20, 0, 4, 0, 21, 0, 25, 0, 22, 0,
+ 4, 0, 23, 0, 4, 0, 24, 0, 27, 0, 9, 0, 9, 0, 0, 0, 9, 0, 1, 0, 27, 0, 25, 0, 28, 0, 26, 0, 0, 0, 27, 0,
+ 2, 0, 28, 0, 2, 0, 19, 0, 4, 0, 29, 0, 26, 0, 30, 0, 28, 0, 8, 0, 27, 0, 31, 0, 27, 0, 32, 0, 29, 0, 33, 0,
+ 0, 0, 34, 0, 0, 0, 35, 0, 4, 0, 36, 0, 4, 0, 37, 0, 28, 0, 38, 0, 30, 0, 6, 0, 4, 0, 39, 0, 4, 0, 40, 0,
+ 2, 0, 41, 0, 2, 0, 42, 0, 2, 0, 43, 0, 4, 0, 44, 0, 31, 0, 6, 0, 32, 0, 45, 0, 2, 0, 46, 0, 2, 0, 47, 0,
+ 2, 0, 17, 0, 2, 0, 19, 0, 0, 0, 48, 0, 33, 0, 21, 0, 33, 0, 0, 0, 33, 0, 1, 0, 34, 0, 49, 0, 35, 0, 50, 0,
+ 24, 0, 51, 0, 24, 0, 52, 0, 2, 0, 46, 0, 2, 0, 47, 0, 2, 0, 53, 0, 2, 0, 54, 0, 2, 0, 55, 0, 2, 0, 56, 0,
+ 2, 0, 19, 0, 2, 0, 57, 0, 7, 0, 11, 0, 7, 0, 12, 0, 4, 0, 58, 0, 7, 0, 59, 0, 7, 0, 60, 0, 7, 0, 61, 0,
+ 31, 0, 62, 0, 36, 0, 7, 0, 27, 0, 31, 0, 12, 0, 63, 0, 24, 0, 64, 0, 2, 0, 46, 0, 2, 0, 65, 0, 2, 0, 66, 0,
+ 2, 0, 37, 0, 37, 0, 16, 0, 37, 0, 0, 0, 37, 0, 1, 0, 7, 0, 67, 0, 7, 0, 61, 0, 2, 0, 17, 0, 2, 0, 47, 0,
+ 2, 0, 68, 0, 2, 0, 19, 0, 4, 0, 69, 0, 4, 0, 70, 0, 9, 0, 2, 0, 7, 0, 71, 0, 0, 0, 20, 0, 0, 0, 72, 0,
+ 7, 0, 73, 0, 7, 0, 74, 0, 38, 0, 13, 0, 27, 0, 31, 0, 39, 0, 75, 0, 37, 0, 76, 0, 0, 0, 77, 0, 4, 0, 78, 0,
+ 7, 0, 61, 0, 12, 0, 79, 0, 36, 0, 80, 0, 27, 0, 81, 0, 2, 0, 17, 0, 2, 0, 82, 0, 2, 0, 83, 0, 2, 0, 19, 0,
+ 40, 0, 5, 0, 27, 0, 84, 0, 2, 0, 85, 0, 2, 0, 86, 0, 2, 0, 87, 0, 4, 0, 37, 0, 41, 0, 6, 0, 41, 0, 0, 0,
+ 41, 0, 1, 0, 0, 0, 88, 0, 0, 0, 89, 0, 4, 0, 23, 0, 4, 0, 90, 0, 42, 0, 10, 0, 42, 0, 0, 0, 42, 0, 1, 0,
+ 4, 0, 91, 0, 4, 0, 92, 0, 4, 0, 93, 0, 4, 0, 43, 0, 4, 0, 14, 0, 4, 0, 94, 0, 0, 0, 95, 0, 0, 0, 96, 0,
+ 43, 0, 15, 0, 27, 0, 31, 0, 0, 0, 97, 0, 4, 0, 94, 0, 4, 0, 98, 0, 12, 0, 99, 0, 41, 0,100, 0, 41, 0,101, 0,
+ 4, 0,102, 0, 4, 0,103, 0, 12, 0,104, 0, 0, 0,105, 0, 4, 0,106, 0, 4, 0,107, 0, 9, 0,108, 0, 8, 0,109, 0,
+ 44, 0, 3, 0, 4, 0,110, 0, 4, 0,111, 0, 9, 0, 2, 0, 45, 0, 21, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0,
+ 2, 0, 19, 0, 7, 0,112, 0, 7, 0,113, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0,116, 0, 7, 0,117, 0, 7, 0,118, 0,
+ 7, 0,119, 0, 7, 0,120, 0, 7, 0,121, 0, 7, 0,122, 0, 2, 0,123, 0, 2, 0,124, 0, 7, 0,125, 0, 36, 0, 80, 0,
+ 40, 0,126, 0, 32, 0,127, 0, 46, 0, 13, 0, 4, 0,128, 0, 4, 0,129, 0, 4, 0,130, 0, 4, 0,131, 0, 2, 0,132, 0,
+ 2, 0,133, 0, 2, 0, 19, 0, 2, 0,134, 0, 2, 0,135, 0, 2, 0,136, 0, 2, 0,137, 0, 2, 0,138, 0, 47, 0,139, 0,
+ 48, 0, 32, 0, 27, 0, 31, 0, 0, 0, 34, 0, 12, 0,140, 0, 49, 0,141, 0, 50, 0,142, 0, 51, 0,143, 0, 2, 0,134, 0,
+ 2, 0, 19, 0, 2, 0,144, 0, 2, 0, 17, 0, 2, 0, 37, 0, 2, 0, 43, 0, 4, 0,145, 0, 2, 0,146, 0, 2, 0,147, 0,
+ 2, 0,148, 0, 2, 0,149, 0, 2, 0,150, 0, 2, 0,151, 0, 4, 0,152, 0, 4, 0,153, 0, 44, 0,154, 0, 30, 0,155, 0,
+ 0, 0,156, 0, 7, 0,157, 0, 4, 0,158, 0, 2, 0,159, 0, 2, 0,160, 0, 2, 0,161, 0, 2, 0,162, 0, 7, 0,163, 0,
+ 7, 0,164, 0, 52, 0, 31, 0, 2, 0,165, 0, 2, 0,166, 0, 2, 0,167, 0, 2, 0,168, 0, 32, 0,169, 0, 53, 0,170, 0,
+ 0, 0,171, 0, 0, 0,172, 0, 0, 0,173, 0, 0, 0,174, 0, 0, 0,175, 0, 7, 0,176, 0, 7, 0,177, 0, 2, 0,178, 0,
+ 2, 0,179, 0, 2, 0,180, 0, 2, 0,181, 0, 2, 0,182, 0, 2, 0,183, 0, 2, 0,184, 0, 7, 0,185, 0, 7, 0,186, 0,
+ 7, 0,187, 0, 7, 0,188, 0, 7, 0,189, 0, 7, 0, 57, 0, 7, 0,190, 0, 7, 0,191, 0, 7, 0,192, 0, 7, 0,193, 0,
+ 7, 0,194, 0, 54, 0, 15, 0, 0, 0,195, 0, 9, 0,196, 0, 0, 0,197, 0, 0, 0,198, 0, 4, 0,199, 0, 4, 0,200, 0,
+ 9, 0,201, 0, 7, 0,202, 0, 7, 0,203, 0, 7, 0,204, 0, 4, 0,205, 0, 9, 0,206, 0, 9, 0,207, 0, 4, 0,208, 0,
+ 4, 0, 37, 0, 55, 0, 6, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,209, 0, 7, 0, 67, 0, 4, 0, 64, 0,
+ 56, 0, 5, 0, 2, 0, 19, 0, 2, 0, 36, 0, 2, 0, 64, 0, 2, 0,210, 0, 55, 0,204, 0, 57, 0, 17, 0, 32, 0,169, 0,
+ 48, 0,211, 0, 58, 0,212, 0, 7, 0,213, 0, 7, 0,214, 0, 2, 0, 17, 0, 2, 0,215, 0, 7, 0,114, 0, 7, 0,115, 0,
+ 7, 0,216, 0, 4, 0,217, 0, 2, 0,218, 0, 2, 0,219, 0, 4, 0,134, 0, 4, 0,145, 0, 2, 0,220, 0, 2, 0,221, 0,
+ 53, 0, 57, 0, 27, 0, 31, 0, 39, 0, 75, 0, 7, 0,222, 0, 7, 0,223, 0, 7, 0,224, 0, 7, 0,225, 0, 7, 0,226, 0,
+ 7, 0,227, 0, 7, 0,228, 0, 7, 0,229, 0, 7, 0,230, 0, 7, 0,231, 0, 7, 0,232, 0, 7, 0,233, 0, 7, 0,234, 0,
+ 7, 0,235, 0, 7, 0,236, 0, 7, 0,237, 0, 7, 0,238, 0, 7, 0,239, 0, 7, 0,240, 0, 7, 0,241, 0, 2, 0,242, 0,
+ 2, 0,243, 0, 2, 0,244, 0, 2, 0,245, 0, 2, 0,246, 0, 2, 0,247, 0, 2, 0,248, 0, 2, 0, 19, 0, 2, 0, 17, 0,
+ 2, 0,215, 0, 7, 0,249, 0, 7, 0,250, 0, 7, 0,251, 0, 7, 0,252, 0, 2, 0,253, 0, 2, 0,254, 0, 2, 0,255, 0,
+ 2, 0,132, 0, 4, 0, 23, 0, 4, 0,129, 0, 4, 0,130, 0, 4, 0,131, 0, 7, 0, 0, 1, 7, 0, 1, 1, 7, 0,191, 0,
+ 46, 0, 2, 1, 59, 0, 3, 1, 36, 0, 80, 0, 48, 0,211, 0, 54, 0, 4, 1, 56, 0, 5, 1, 57, 0, 6, 1, 30, 0,155, 0,
+ 0, 0, 7, 1, 0, 0, 8, 1, 60, 0, 8, 0, 7, 0, 9, 1, 7, 0, 10, 1, 7, 0,177, 0, 4, 0, 19, 0, 7, 0, 11, 1,
+ 7, 0, 12, 1, 7, 0, 13, 1, 32, 0, 45, 0, 61, 0, 81, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 17, 0, 2, 0, 19, 0,
+ 4, 0, 14, 1, 2, 0,179, 0, 2, 0, 15, 1, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,188, 0, 7, 0, 16, 1,
+ 7, 0, 17, 1, 7, 0, 18, 1, 7, 0, 19, 1, 7, 0, 20, 1, 7, 0, 21, 1, 7, 0, 22, 1, 7, 0, 23, 1, 7, 0, 24, 1,
+ 7, 0, 25, 1, 7, 0, 26, 1, 62, 0, 27, 1, 2, 0, 28, 1, 2, 0, 70, 0, 7, 0,114, 0, 7, 0,115, 0, 7, 0, 29, 1,
+ 7, 0, 30, 1, 7, 0, 31, 1, 2, 0, 32, 1, 2, 0, 33, 1, 2, 0, 34, 1, 2, 0, 35, 1, 0, 0, 36, 1, 0, 0, 37, 1,
+ 2, 0, 38, 1, 2, 0, 39, 1, 2, 0, 40, 1, 2, 0, 41, 1, 2, 0, 42, 1, 7, 0, 43, 1, 7, 0, 44, 1, 7, 0, 45, 1,
+ 7, 0, 46, 1, 2, 0, 47, 1, 2, 0, 43, 0, 2, 0, 48, 1, 2, 0, 49, 1, 2, 0, 50, 1, 2, 0, 51, 1, 7, 0, 52, 1,
+ 7, 0, 53, 1, 7, 0, 54, 1, 7, 0, 55, 1, 7, 0, 56, 1, 7, 0, 57, 1, 7, 0, 58, 1, 7, 0, 59, 1, 7, 0, 60, 1,
+ 7, 0, 61, 1, 7, 0, 62, 1, 7, 0, 63, 1, 2, 0, 64, 1, 2, 0, 65, 1, 4, 0, 66, 1, 4, 0, 67, 1, 2, 0, 68, 1,
+ 2, 0, 69, 1, 2, 0, 70, 1, 2, 0, 71, 1, 7, 0, 72, 1, 7, 0, 73, 1, 7, 0, 74, 1, 7, 0, 75, 1, 2, 0, 76, 1,
+ 2, 0, 77, 1, 52, 0, 78, 1, 36, 0, 80, 0, 30, 0,155, 0, 40, 0,126, 0, 63, 0, 2, 0, 27, 0, 31, 0, 36, 0, 80, 0,
+ 64, 0,130, 0, 27, 0, 31, 0, 39, 0, 75, 0, 2, 0, 79, 1, 2, 0, 19, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0,
+ 7, 0, 80, 1, 7, 0, 81, 1, 7, 0, 82, 1, 7, 0, 83, 1, 7, 0, 84, 1, 7, 0, 85, 1, 7, 0, 86, 1, 7, 0, 87, 1,
+ 7, 0, 88, 1, 7, 0, 89, 1, 7, 0, 90, 1, 7, 0, 91, 1, 7, 0, 92, 1, 7, 0, 93, 1, 7, 0, 94, 1, 7, 0, 95, 1,
+ 7, 0, 96, 1, 7, 0, 97, 1, 7, 0, 98, 1, 7, 0, 99, 1, 7, 0,100, 1, 7, 0,101, 1, 7, 0,102, 1, 7, 0,103, 1,
+ 7, 0,104, 1, 7, 0,105, 1, 7, 0,106, 1, 2, 0,107, 1, 2, 0,108, 1, 2, 0,109, 1, 0, 0,110, 1, 0, 0,111, 1,
+ 7, 0,112, 1, 7, 0,113, 1, 2, 0,114, 1, 2, 0,115, 1, 7, 0,116, 1, 7, 0,117, 1, 7, 0,118, 1, 7, 0,119, 1,
+ 2, 0,120, 1, 2, 0,121, 1, 4, 0, 14, 1, 4, 0,122, 1, 2, 0,123, 1, 2, 0,124, 1, 2, 0,125, 1, 2, 0,126, 1,
+ 7, 0,127, 1, 7, 0,128, 1, 7, 0,129, 1, 7, 0,130, 1, 7, 0,131, 1, 7, 0,132, 1, 7, 0,133, 1, 7, 0,134, 1,
+ 7, 0,135, 1, 7, 0,136, 1, 0, 0,137, 1, 7, 0,138, 1, 7, 0,139, 1, 7, 0,140, 1, 4, 0,141, 1, 0, 0,142, 1,
+ 0, 0, 48, 1, 0, 0,143, 1, 0, 0, 7, 1, 2, 0,144, 1, 2, 0,145, 1, 2, 0, 65, 1, 2, 0,146, 1, 2, 0,147, 1,
+ 2, 0,148, 1, 7, 0,149, 1, 7, 0,150, 1, 7, 0,151, 1, 7, 0,152, 1, 7, 0,153, 1, 2, 0,165, 0, 2, 0,166, 0,
+ 56, 0,154, 1, 56, 0,155, 1, 0, 0,156, 1, 0, 0,157, 1, 0, 0,158, 1, 0, 0,159, 1, 2, 0,160, 1, 2, 0,161, 1,
+ 7, 0,162, 1, 7, 0,163, 1, 52, 0, 78, 1, 59, 0, 3, 1, 36, 0, 80, 0, 65, 0,164, 1, 30, 0,155, 0, 7, 0,165, 1,
+ 7, 0,166, 1, 7, 0,167, 1, 7, 0,168, 1, 7, 0,169, 1, 2, 0,170, 1, 2, 0, 70, 0, 7, 0,171, 1, 7, 0,172, 1,
+ 7, 0,173, 1, 7, 0,174, 1, 7, 0,175, 1, 7, 0,176, 1, 7, 0,177, 1, 7, 0,178, 1, 7, 0,179, 1, 2, 0,180, 1,
+ 2, 0,181, 1, 7, 0,182, 1, 7, 0,183, 1, 7, 0,184, 1, 7, 0,185, 1, 7, 0,186, 1, 4, 0,187, 1, 4, 0,188, 1,
+ 4, 0,189, 1, 40, 0,126, 0, 12, 0,190, 1, 66, 0, 4, 0, 27, 0, 31, 0, 0, 0,191, 1, 67, 0, 2, 0, 44, 0,154, 0,
+ 68, 0, 26, 0, 68, 0, 0, 0, 68, 0, 1, 0, 69, 0,192, 1, 4, 0,193, 1, 4, 0,194, 1, 4, 0,195, 1, 4, 0,196, 1,
+ 4, 0,197, 1, 4, 0,198, 1, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,199, 1, 2, 0,200, 1, 7, 0, 5, 0, 7, 0, 6, 0,
+ 7, 0, 7, 0, 7, 0,201, 1, 7, 0,202, 1, 7, 0,203, 1, 7, 0,204, 1, 7, 0,205, 1, 7, 0,206, 1, 7, 0,207, 1,
+ 7, 0, 23, 0, 7, 0,208, 1, 7, 0,209, 1, 70, 0, 16, 0, 27, 0, 31, 0, 69, 0,192, 1, 12, 0,210, 1, 12, 0,211, 1,
+ 12, 0,212, 1, 36, 0, 80, 0, 64, 0,213, 1, 2, 0, 19, 0, 2, 0,214, 1, 4, 0,178, 0, 7, 0, 9, 1, 7, 0,177, 0,
+ 7, 0, 10, 1, 7, 0,215, 1, 7, 0,216, 1, 7, 0,217, 1, 35, 0, 11, 0, 7, 0,218, 1, 7, 0,219, 1, 7, 0,220, 1,
+ 7, 0,221, 1, 2, 0, 55, 0, 0, 0,222, 1, 0, 0,223, 1, 0, 0,224, 1, 0, 0,225, 1, 0, 0,226, 1, 0, 0,227, 1,
+ 34, 0, 7, 0, 7, 0,228, 1, 7, 0,219, 1, 7, 0,220, 1, 2, 0,224, 1, 2, 0,227, 1, 7, 0,221, 1, 7, 0, 37, 0,
+ 71, 0, 21, 0, 71, 0, 0, 0, 71, 0, 1, 0, 2, 0, 17, 0, 2, 0,229, 1, 2, 0,227, 1, 2, 0, 19, 0, 2, 0,230, 1,
+ 2, 0,231, 1, 2, 0,232, 1, 2, 0,233, 1, 2, 0,234, 1, 2, 0,235, 1, 2, 0,236, 1, 2, 0,237, 1, 7, 0,238, 1,
+ 7, 0,239, 1, 34, 0, 49, 0, 35, 0, 50, 0, 2, 0,240, 1, 2, 0,241, 1, 4, 0,242, 1, 72, 0, 5, 0, 2, 0,243, 1,
+ 2, 0,229, 1, 0, 0, 19, 0, 0, 0, 37, 0, 2, 0, 70, 0, 73, 0, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 8, 0,
+ 7, 0,244, 1, 74, 0, 62, 0, 27, 0, 31, 0, 39, 0, 75, 0, 69, 0,192, 1, 12, 0,245, 1, 12, 0,211, 1, 12, 0,246, 1,
+ 32, 0,247, 1, 32, 0,248, 1, 32, 0,249, 1, 36, 0, 80, 0, 75, 0,250, 1, 38, 0,251, 1, 64, 0,213, 1, 12, 0,252, 1,
+ 7, 0, 9, 1, 7, 0,177, 0, 7, 0, 10, 1, 4, 0,178, 0, 2, 0,253, 1, 2, 0,214, 1, 2, 0, 19, 0, 2, 0,254, 1,
+ 7, 0,255, 1, 7, 0, 0, 2, 7, 0, 1, 2, 2, 0,232, 1, 2, 0,233, 1, 2, 0, 2, 2, 2, 0, 3, 2, 4, 0, 4, 2,
+ 34, 0, 5, 2, 2, 0, 23, 0, 2, 0, 99, 0, 2, 0, 67, 0, 2, 0, 6, 2, 7, 0, 7, 2, 7, 0, 8, 2, 7, 0, 9, 2,
+ 7, 0, 10, 2, 7, 0, 11, 2, 7, 0, 12, 2, 7, 0, 13, 2, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0, 16, 2, 0, 0, 17, 2,
+ 76, 0, 18, 2, 77, 0, 19, 2, 0, 0, 20, 2, 66, 0, 21, 2, 66, 0, 22, 2, 66, 0, 23, 2, 66, 0, 24, 2, 4, 0, 25, 2,
+ 7, 0, 26, 2, 4, 0, 27, 2, 4, 0, 28, 2, 73, 0, 29, 2, 4, 0, 30, 2, 4, 0, 31, 2, 72, 0, 32, 2, 72, 0, 33, 2,
+ 78, 0, 39, 0, 27, 0, 31, 0, 69, 0,192, 1, 12, 0, 34, 2, 36, 0, 80, 0, 38, 0,251, 1, 64, 0,213, 1, 79, 0, 35, 2,
+ 80, 0, 36, 2, 81, 0, 37, 2, 82, 0, 38, 2, 83, 0, 39, 2, 84, 0, 40, 2, 85, 0, 41, 2, 86, 0, 42, 2, 78, 0, 43, 2,
+ 87, 0, 44, 2, 88, 0, 45, 2, 89, 0, 46, 2, 89, 0, 47, 2, 89, 0, 48, 2, 4, 0, 54, 0, 4, 0, 49, 2, 4, 0, 50, 2,
+ 4, 0, 51, 2, 4, 0, 52, 2, 4, 0,178, 0, 7, 0, 9, 1, 7, 0,177, 0, 7, 0, 10, 1, 7, 0, 53, 2, 4, 0, 54, 2,
+ 2, 0, 55, 2, 2, 0, 19, 0, 2, 0, 56, 2, 2, 0, 57, 2, 2, 0,214, 1, 2, 0, 58, 2, 90, 0, 59, 2, 91, 0, 60, 2,
+ 81, 0, 8, 0, 9, 0, 61, 2, 7, 0, 62, 2, 4, 0, 63, 2, 0, 0, 19, 0, 0, 0, 64, 2, 2, 0, 14, 1, 2, 0, 65, 2,
+ 2, 0, 66, 2, 79, 0, 7, 0, 4, 0, 67, 2, 4, 0, 68, 2, 4, 0, 69, 2, 4, 0, 70, 2, 2, 0,229, 1, 0, 0, 71, 2,
+ 0, 0, 19, 0, 83, 0, 5, 0, 4, 0, 67, 2, 4, 0, 68, 2, 0, 0, 72, 2, 0, 0, 73, 2, 2, 0, 19, 0, 92, 0, 2, 0,
+ 4, 0, 74, 2, 7, 0,220, 1, 84, 0, 3, 0, 92, 0, 75, 2, 4, 0, 76, 2, 4, 0, 19, 0, 82, 0, 6, 0, 7, 0, 77, 2,
+ 2, 0, 78, 2, 2, 0,229, 1, 0, 0, 19, 0, 0, 0, 73, 2, 0, 0,184, 0, 85, 0, 4, 0, 0, 0,209, 0, 0, 0,185, 0,
+ 0, 0,186, 0, 0, 0,187, 0, 93, 0, 6, 0, 48, 0, 61, 2, 0, 0, 19, 0, 0, 0, 64, 2, 2, 0, 14, 1, 2, 0, 65, 2,
+ 2, 0, 66, 2, 94, 0, 1, 0, 7, 0, 79, 2, 95, 0, 5, 0, 0, 0,209, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0,
+ 4, 0, 37, 0, 86, 0, 1, 0, 7, 0, 80, 2, 87, 0, 2, 0, 4, 0, 81, 2, 4, 0, 17, 0, 80, 0, 7, 0, 7, 0, 62, 2,
+ 48, 0, 61, 2, 0, 0, 19, 0, 0, 0, 64, 2, 2, 0, 14, 1, 2, 0, 65, 2, 2, 0, 66, 2, 96, 0, 1, 0, 7, 0, 82, 2,
+ 97, 0, 1, 0, 4, 0, 83, 2, 98, 0, 1, 0, 0, 0, 84, 2, 99, 0, 1, 0, 7, 0, 62, 2,100, 0, 3, 0, 4, 0, 85, 2,
+ 0, 0, 96, 0, 7, 0, 86, 2,102, 0, 4, 0, 7, 0,209, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0,103, 0, 1, 0,
+102, 0, 63, 2,104, 0, 5, 0, 4, 0, 87, 2, 4, 0, 88, 2, 0, 0, 19, 0, 0, 0,229, 1, 0, 0,184, 0,105, 0, 2, 0,
+ 4, 0, 89, 2, 4, 0, 88, 2,106, 0, 10, 0,106, 0, 0, 0,106, 0, 1, 0,104, 0, 90, 2,103, 0, 91, 2,105, 0, 92, 2,
+ 4, 0, 54, 0, 4, 0, 50, 2, 4, 0, 49, 2, 4, 0, 37, 0, 82, 0, 93, 2, 90, 0, 14, 0, 12, 0, 94, 2, 82, 0, 93, 2,
+ 0, 0, 95, 2, 0, 0, 96, 2, 0, 0, 97, 2, 0, 0, 98, 2, 0, 0, 99, 2, 0, 0,100, 2, 0, 0,101, 2, 0, 0, 19, 0,
+ 89, 0, 46, 2, 89, 0, 48, 2, 2, 0,102, 2, 0, 0,103, 2, 91, 0, 8, 0, 4, 0,104, 2, 4, 0,105, 2, 79, 0,106, 2,
+ 83, 0,107, 2, 4, 0, 50, 2, 4, 0, 49, 2, 4, 0, 54, 0, 4, 0, 37, 0,107, 0, 7, 0,107, 0, 0, 0,107, 0, 1, 0,
+ 4, 0, 17, 0, 4, 0, 14, 1, 0, 0, 20, 0, 47, 0,139, 0, 0, 0,108, 2,108, 0, 7, 0,107, 0,109, 2, 2, 0,110, 2,
+ 2, 0, 94, 2, 2, 0,111, 2, 2, 0, 94, 0, 9, 0,112, 2, 9, 0,113, 2,109, 0, 3, 0,107, 0,109, 2, 32, 0,169, 0,
+ 0, 0, 20, 0,110, 0, 5, 0,107, 0,109, 2, 32, 0,169, 0, 0, 0, 20, 0, 2, 0,114, 2, 0, 0,115, 2,111, 0, 5, 0,
+107, 0,109, 2, 7, 0, 92, 0, 7, 0,116, 2, 4, 0,117, 2, 4, 0,118, 2,112, 0, 5, 0,107, 0,109, 2, 32, 0,119, 2,
+ 0, 0, 72, 0, 4, 0, 14, 1, 4, 0, 19, 0,113, 0, 13, 0,107, 0,109, 2, 32, 0,120, 2, 32, 0,121, 2, 32, 0,122, 2,
+ 32, 0,123, 2, 7, 0,124, 2, 7, 0,125, 2, 7, 0,116, 2, 7, 0,126, 2, 4, 0,127, 2, 4, 0,128, 2, 4, 0, 94, 0,
+ 4, 0,129, 2,114, 0, 5, 0,107, 0,109, 2, 2, 0,130, 2, 2, 0, 19, 0, 7, 0,131, 2, 32, 0,132, 2,115, 0, 3, 0,
+107, 0,109, 2, 7, 0,133, 2, 4, 0, 94, 0,116, 0, 10, 0,107, 0,109, 2, 7, 0,134, 2, 4, 0,135, 2, 4, 0, 37, 0,
+ 2, 0, 94, 0, 2, 0,136, 2, 2, 0,137, 2, 2, 0,138, 2, 7, 0,139, 2, 0, 0,140, 2,117, 0, 3, 0,107, 0,109, 2,
+ 7, 0, 37, 0, 4, 0, 17, 0,118, 0, 11, 0,107, 0,109, 2, 53, 0,141, 2, 7, 0,142, 2, 4, 0,143, 2, 0, 0,140, 2,
+ 7, 0,144, 2, 4, 0,145, 2, 32, 0,146, 2, 0, 0,147, 2, 4, 0,148, 2, 4, 0, 37, 0,119, 0, 10, 0,107, 0,109, 2,
+ 32, 0,149, 2, 48, 0,150, 2, 4, 0, 94, 0, 4, 0,151, 2, 7, 0,152, 2, 7, 0,153, 2, 0, 0,147, 2, 4, 0,148, 2,
+ 4, 0, 37, 0,120, 0, 3, 0,107, 0,109, 2, 7, 0,154, 2, 4, 0,155, 2,121, 0, 5, 0,107, 0,109, 2, 7, 0,156, 2,
+ 0, 0,140, 2, 2, 0, 19, 0, 2, 0,157, 2,122, 0, 8, 0,107, 0,109, 2, 32, 0,169, 0, 7, 0,156, 2, 7, 0,221, 1,
+ 7, 0,110, 0, 0, 0,140, 2, 2, 0, 19, 0, 2, 0, 17, 0,123, 0, 21, 0,107, 0,109, 2, 32, 0,158, 2, 0, 0,140, 2,
+ 53, 0,141, 2, 32, 0,146, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,159, 2, 7, 0,160, 2, 7, 0,161, 2, 7, 0,255, 1,
+ 7, 0,162, 2, 7, 0,163, 2, 7, 0,164, 2, 7, 0,165, 2, 4, 0,145, 2, 4, 0,148, 2, 0, 0,147, 2, 7, 0,166, 2,
+ 7, 0,167, 2, 7, 0, 43, 0,124, 0, 7, 0,107, 0,109, 2, 2, 0,168, 2, 2, 0,169, 2, 4, 0, 70, 0, 32, 0,169, 0,
+ 7, 0,170, 2, 0, 0,140, 2,125, 0, 9, 0,107, 0,109, 2, 32, 0,169, 0, 7, 0,171, 2, 7, 0,172, 2, 7, 0,165, 2,
+ 4, 0,173, 2, 4, 0,174, 2, 7, 0,175, 2, 0, 0, 20, 0,126, 0, 1, 0,107, 0,109, 2,127, 0, 6, 0,107, 0,109, 2,
+ 47, 0,139, 0,128, 0,176, 2,129, 0,177, 2,130, 0,178, 2,131, 0,179, 2,132, 0, 14, 0,107, 0,109, 2, 82, 0,180, 2,
+ 82, 0,181, 2, 82, 0,182, 2, 82, 0,183, 2, 82, 0,184, 2, 82, 0,185, 2, 79, 0,186, 2, 4, 0,187, 2, 4, 0,188, 2,
+ 2, 0,189, 2, 2, 0, 37, 0, 7, 0,190, 2,133, 0,191, 2,134, 0, 3, 0,107, 0,109, 2,135, 0,192, 2,136, 0,191, 2,
+137, 0, 4, 0,107, 0,109, 2, 32, 0,169, 0, 4, 0,193, 2, 4, 0, 37, 0,138, 0, 2, 0, 4, 0,194, 2, 7, 0,220, 1,
+139, 0, 2, 0, 4, 0,130, 0, 4, 0,195, 2,140, 0, 20, 0,107, 0,109, 2, 32, 0,169, 0, 0, 0,140, 2, 2, 0,196, 2,
+ 2, 0,197, 2, 2, 0, 19, 0, 2, 0, 37, 0, 7, 0,198, 2, 7, 0,199, 2, 4, 0, 54, 0, 4, 0,200, 2,139, 0,201, 2,
+138, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2, 4, 0,205, 2, 4, 0,195, 2, 7, 0,206, 2, 7, 0,207, 2, 7, 0,208, 2,
+141, 0, 8, 0,107, 0,109, 2,142, 0,209, 2,135, 0,192, 2, 4, 0,210, 2, 4, 0,211, 2, 4, 0,212, 2, 2, 0, 19, 0,
+ 2, 0, 57, 0,143, 0, 8, 0,107, 0,109, 2, 32, 0, 45, 0, 2, 0,213, 2, 2, 0, 19, 0, 2, 0,130, 2, 2, 0, 57, 0,
+ 7, 0,214, 2, 7, 0,215, 2,144, 0, 5, 0,107, 0,109, 2, 4, 0,216, 2, 2, 0, 19, 0, 2, 0,217, 2, 7, 0,218, 2,
+145, 0, 7, 0,107, 0,109, 2, 82, 0,219, 2, 4, 0,220, 2, 0, 0,221, 2, 0, 0,222, 2, 0, 0,223, 2, 0, 0,224, 2,
+146, 0, 3, 0,107, 0,109, 2,147, 0,225, 2,131, 0,179, 2,148, 0, 10, 0,107, 0,109, 2, 32, 0,226, 2, 32, 0,227, 2,
+ 0, 0,228, 2, 7, 0,229, 2, 2, 0,230, 2, 2, 0,231, 2, 0, 0,232, 2, 0, 0,233, 2, 0, 0,115, 2,149, 0, 9, 0,
+107, 0,109, 2, 32, 0,234, 2, 0, 0,228, 2, 7, 0,235, 2, 7, 0,236, 2, 0, 0, 14, 1, 0, 0,130, 2, 0, 0,237, 2,
+ 0, 0, 37, 0,150, 0, 27, 0, 27, 0, 31, 0, 2, 0,230, 1, 2, 0,231, 1, 2, 0,238, 2, 2, 0, 19, 0, 2, 0,239, 2,
+ 2, 0,240, 2, 2, 0,241, 2, 2, 0, 70, 0, 0, 0,242, 2, 0, 0,243, 2, 0, 0,244, 2, 0, 0, 17, 0, 4, 0, 37, 0,
+ 7, 0,245, 2, 7, 0,246, 2, 7, 0,247, 2, 7, 0,248, 2, 7, 0,249, 2, 7, 0,250, 2, 34, 0,251, 2, 36, 0, 80, 0,
+ 38, 0,251, 1, 84, 0, 40, 2, 7, 0,252, 2, 7, 0,253, 2,150, 0,254, 2,151, 0, 3, 0,151, 0, 0, 0,151, 0, 1, 0,
+ 0, 0, 20, 0, 69, 0, 3, 0, 7, 0,255, 2, 4, 0, 19, 0, 4, 0, 37, 0, 32, 0,112, 0, 27, 0, 31, 0, 39, 0, 75, 0,
+ 2, 0, 17, 0, 2, 0, 0, 3, 4, 0, 1, 3, 4, 0, 2, 3, 4, 0, 3, 3, 0, 0, 4, 3, 32, 0, 38, 0, 32, 0, 5, 3,
+ 32, 0, 6, 3, 32, 0, 7, 3, 32, 0, 8, 3, 36, 0, 80, 0, 75, 0,250, 1, 69, 0,192, 1,152, 0, 9, 3,152, 0, 10, 3,
+153, 0, 11, 3, 9, 0, 2, 0, 12, 0, 12, 3, 12, 0, 34, 2, 12, 0,211, 1, 12, 0, 13, 3, 12, 0, 14, 3, 64, 0,213, 1,
+ 0, 0, 15, 3, 4, 0,214, 1, 4, 0, 16, 3, 7, 0, 9, 1, 7, 0, 17, 3, 7, 0, 18, 3, 7, 0,177, 0, 7, 0, 19, 3,
+ 7, 0, 10, 1, 7, 0, 20, 3, 7, 0, 21, 3, 7, 0,171, 2, 7, 0, 22, 3, 7, 0,213, 0, 4, 0, 23, 3, 2, 0, 19, 0,
+ 2, 0, 24, 3, 2, 0, 25, 3, 2, 0, 26, 3, 2, 0, 27, 3, 2, 0, 28, 3, 2, 0, 29, 3, 2, 0, 30, 3, 2, 0, 31, 3,
+ 2, 0, 32, 3, 2, 0, 33, 3, 2, 0, 34, 3, 4, 0, 35, 3, 4, 0, 36, 3, 4, 0, 37, 3, 4, 0, 38, 3, 7, 0, 39, 3,
+ 7, 0, 26, 2, 7, 0, 40, 3, 7, 0, 41, 3, 7, 0, 42, 3, 7, 0, 43, 3, 7, 0, 44, 3, 7, 0, 45, 3, 7, 0, 46, 3,
+ 7, 0, 47, 3, 7, 0, 48, 3, 7, 0, 49, 3, 0, 0, 50, 3, 0, 0, 51, 3, 0, 0, 52, 3, 0, 0, 53, 3, 7, 0, 54, 3,
+ 7, 0, 55, 3, 40, 0,126, 0, 12, 0, 56, 3, 12, 0, 57, 3, 12, 0, 58, 3, 12, 0, 59, 3, 7, 0, 60, 3, 2, 0, 81, 2,
+ 2, 0, 61, 3, 7, 0, 63, 2, 4, 0, 62, 3, 4, 0, 63, 3,154, 0, 64, 3, 2, 0, 65, 3, 2, 0,220, 0, 7, 0, 66, 3,
+ 12, 0, 67, 3, 12, 0, 68, 3, 12, 0, 69, 3, 12, 0, 70, 3,155, 0, 71, 3,156, 0, 72, 3, 65, 0, 73, 3, 2, 0, 74, 3,
+ 2, 0, 75, 3, 2, 0, 76, 3, 2, 0, 77, 3, 7, 0, 55, 2, 2, 0, 78, 3, 2, 0, 79, 3,147, 0, 80, 3,135, 0, 81, 3,
+135, 0, 82, 3, 4, 0, 83, 3, 4, 0, 84, 3, 4, 0, 85, 3, 4, 0, 70, 0, 12, 0, 86, 3,157, 0, 14, 0,157, 0, 0, 0,
+157, 0, 1, 0, 32, 0, 38, 0, 7, 0,171, 2, 7, 0, 11, 1, 7, 0,172, 2, 7, 0,165, 2, 0, 0, 20, 0, 4, 0,173, 2,
+ 4, 0,174, 2, 4, 0, 87, 3, 2, 0, 17, 0, 2, 0, 88, 3, 7, 0,175, 2,155, 0, 36, 0, 2, 0, 89, 3, 2, 0, 90, 3,
+ 2, 0, 19, 0, 2, 0,165, 2, 7, 0, 91, 3, 7, 0, 92, 3, 7, 0, 93, 3, 7, 0, 94, 3, 7, 0, 95, 3, 7, 0, 96, 3,
+ 7, 0, 97, 3, 7, 0, 98, 3, 7, 0, 99, 3, 7, 0,100, 3, 7, 0,101, 3, 7, 0,102, 3, 7, 0,103, 3, 7, 0,104, 3,
+ 7, 0,105, 3, 7, 0,106, 3, 7, 0,107, 3, 7, 0,108, 3, 7, 0,109, 3, 7, 0,110, 3, 7, 0,111, 3, 7, 0,112, 3,
+ 7, 0,113, 3, 7, 0,114, 3, 2, 0,115, 3, 2, 0,116, 3, 2, 0,117, 3, 2, 0,118, 3, 53, 0,170, 0,158, 0,119, 3,
+ 7, 0,120, 3, 4, 0,118, 2,159, 0, 6, 0,159, 0, 0, 0,159, 0, 1, 0, 4, 0,121, 3, 4, 0,122, 3, 7, 0, 2, 0,
+ 9, 0,123, 3,131, 0, 12, 0, 4, 0, 19, 0, 4, 0,124, 3, 4, 0,125, 3, 4, 0,126, 3, 4, 0,127, 3, 4, 0,128, 3,
+ 4, 0,129, 3, 4, 0,130, 3, 0, 0,131, 3, 0, 0,132, 3, 0, 0,133, 3, 12, 0,134, 3,160, 0, 1, 0, 7, 0,228, 1,
+154, 0, 30, 0, 4, 0, 19, 0, 7, 0,135, 3, 7, 0,136, 3, 7, 0,137, 3, 4, 0,138, 3, 4, 0,139, 3, 4, 0,140, 3,
+ 4, 0,141, 3, 7, 0,142, 3, 7, 0,143, 3, 7, 0,144, 3, 7, 0,145, 3, 7, 0,146, 3, 7, 0,147, 3, 7, 0,148, 3,
+ 7, 0,149, 3, 7, 0,150, 3, 7, 0,151, 3, 7, 0,152, 3, 7, 0,153, 3, 7, 0,154, 3, 7, 0,155, 3, 7, 0,156, 3,
+ 7, 0,157, 3, 7, 0,158, 3, 7, 0,159, 3, 4, 0,160, 3, 4, 0,161, 3, 7, 0,162, 3, 7, 0, 46, 3,156, 0, 44, 0,
+142, 0,163, 3, 4, 0,122, 3, 4, 0,164, 3,161, 0,165, 3,162, 0,166, 3, 7, 0, 37, 0, 7, 0,167, 3, 7, 0,168, 3,
+ 7, 0,169, 3, 7, 0,170, 3, 7, 0,171, 3, 7, 0,172, 3, 7, 0,173, 3, 7, 0,174, 3, 7, 0,175, 3, 7, 0,176, 3,
+ 2, 0,177, 3, 2, 0,178, 3, 7, 0,179, 3, 7, 0,180, 3, 4, 0,131, 0, 4, 0,181, 3, 4, 0,182, 3, 2, 0,183, 3,
+ 2, 0,184, 3,160, 0,185, 3, 4, 0,186, 3, 4, 0, 82, 0, 7, 0,187, 3, 7, 0,188, 3, 7, 0,189, 3, 7, 0,190, 3,
+ 2, 0,191, 3, 2, 0,192, 3, 2, 0,193, 3, 2, 0,194, 3, 2, 0,195, 3, 2, 0,196, 3, 2, 0,197, 3, 2, 0,198, 3,
+163, 0,199, 3, 7, 0,200, 3, 7, 0,201, 3,131, 0,202, 3,147, 0, 48, 0, 2, 0, 17, 0, 2, 0,203, 3, 2, 0,204, 3,
+ 2, 0,205, 3, 7, 0,206, 3, 2, 0,207, 3, 2, 0,208, 3, 7, 0,209, 3, 2, 0,210, 3, 2, 0,211, 3, 7, 0,212, 3,
+ 7, 0,213, 3, 7, 0,214, 3, 7, 0,215, 3, 7, 0,216, 3, 7, 0,217, 3, 4, 0,218, 3, 7, 0,219, 3, 7, 0,220, 3,
+ 7, 0,221, 3, 78, 0,222, 3, 78, 0,223, 3, 78, 0,224, 3, 0, 0,225, 3, 7, 0,226, 3, 7, 0,227, 3, 36, 0, 80, 0,
+ 2, 0,228, 3, 0, 0,229, 3, 0, 0,230, 3, 7, 0,231, 3, 4, 0,232, 3, 7, 0,233, 3, 7, 0,234, 3, 4, 0,235, 3,
+ 4, 0, 19, 0, 7, 0,236, 3, 7, 0,237, 3, 7, 0,238, 3, 82, 0,239, 3, 7, 0,240, 3, 7, 0,241, 3, 7, 0,242, 3,
+ 7, 0,243, 3, 7, 0,244, 3, 7, 0,245, 3, 7, 0,246, 3, 4, 0,247, 3,164, 0, 72, 0, 27, 0, 31, 0, 39, 0, 75, 0,
+ 2, 0,179, 0, 2, 0, 15, 1, 2, 0, 48, 1, 2, 0,248, 3, 7, 0,249, 3, 7, 0,250, 3, 7, 0,251, 3, 7, 0,252, 3,
+ 7, 0,253, 3, 7, 0,254, 3, 7, 0,255, 3, 7, 0, 0, 4, 7, 0, 86, 1, 7, 0, 88, 1, 7, 0, 87, 1, 7, 0, 1, 4,
+ 4, 0, 2, 4, 7, 0, 3, 4, 7, 0, 4, 4, 7, 0, 5, 4, 7, 0, 6, 4, 7, 0, 7, 4, 7, 0, 8, 4, 7, 0, 9, 4,
+ 2, 0, 10, 4, 2, 0, 14, 1, 2, 0, 11, 4, 2, 0, 12, 4, 2, 0, 13, 4, 2, 0, 14, 4, 2, 0, 15, 4, 2, 0, 16, 4,
+ 7, 0, 17, 4, 7, 0, 18, 4, 7, 0, 19, 4, 7, 0, 20, 4, 7, 0, 21, 4, 7, 0, 22, 4, 7, 0, 23, 4, 7, 0, 24, 4,
+ 7, 0, 25, 4, 7, 0, 26, 4, 7, 0, 27, 4, 7, 0, 28, 4, 2, 0, 29, 4, 2, 0, 30, 4, 2, 0, 31, 4, 2, 0, 32, 4,
+ 7, 0, 33, 4, 7, 0, 34, 4, 7, 0, 35, 4, 7, 0, 36, 4, 2, 0, 37, 4, 2, 0, 38, 4, 2, 0, 39, 4, 2, 0, 40, 4,
+ 7, 0, 41, 4, 7, 0, 42, 4, 7, 0, 43, 4, 7, 0, 44, 4, 2, 0, 45, 4, 2, 0, 46, 4, 2, 0, 47, 4, 2, 0, 19, 0,
+ 7, 0, 48, 4, 7, 0, 49, 4, 36, 0, 80, 0, 52, 0, 78, 1, 30, 0,155, 0, 40, 0,126, 0,165, 0, 8, 0,165, 0, 0, 0,
+165, 0, 1, 0, 4, 0, 23, 3, 4, 0, 50, 4, 4, 0, 19, 0, 2, 0, 51, 4, 2, 0, 52, 4, 32, 0,169, 0,166, 0, 13, 0,
+ 9, 0, 53, 4, 9, 0, 54, 4, 4, 0, 55, 4, 4, 0, 56, 4, 4, 0, 57, 4, 4, 0, 58, 4, 4, 0, 59, 4, 4, 0, 60, 4,
+ 4, 0, 61, 4, 4, 0, 62, 4, 4, 0, 63, 4, 4, 0, 37, 0, 0, 0, 64, 4,167, 0, 5, 0, 9, 0, 65, 4, 9, 0, 66, 4,
+ 4, 0, 67, 4, 4, 0, 70, 0, 0, 0, 68, 4,168, 0, 13, 0, 4, 0, 17, 0, 4, 0, 69, 4, 4, 0, 70, 4, 4, 0, 71, 4,
+ 4, 0, 72, 4, 4, 0, 73, 4, 4, 0, 94, 0, 4, 0, 74, 4, 4, 0, 75, 4, 4, 0, 76, 4, 4, 0, 77, 4, 4, 0, 78, 4,
+ 26, 0, 30, 0,169, 0, 4, 0, 4, 0, 79, 4, 7, 0, 80, 4, 2, 0, 19, 0, 2, 0, 81, 4,170, 0, 11, 0,170, 0, 0, 0,
+170, 0, 1, 0, 0, 0, 20, 0, 64, 0, 82, 4, 65, 0, 83, 4, 4, 0, 23, 3, 4, 0, 84, 4, 4, 0, 85, 4, 4, 0, 37, 0,
+ 4, 0, 86, 4, 4, 0, 87, 4,171, 0,131, 0,166, 0, 88, 4,167, 0, 89, 4,168, 0, 90, 4,169, 0, 91, 4, 4, 0, 92, 4,
+ 4, 0,131, 0, 4, 0,181, 3, 4, 0, 93, 4, 4, 0, 94, 4, 4, 0, 95, 4, 4, 0, 96, 4, 2, 0, 19, 0, 2, 0, 97, 4,
+ 7, 0, 26, 2, 7, 0, 98, 4, 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 2, 0,103, 4, 2, 0,104, 4,
+ 2, 0,105, 4, 2, 0,106, 4, 2, 0,219, 0, 2, 0,107, 4, 2, 0,108, 4, 2, 0,118, 3, 2, 0,109, 4, 2, 0,110, 4,
+ 2, 0, 35, 1, 2, 0,110, 0, 2, 0,111, 4, 2, 0,112, 4, 2, 0,113, 4, 2, 0,114, 4, 2, 0,115, 4, 2, 0,116, 4,
+ 2, 0,117, 4, 2, 0,118, 4, 2, 0,119, 4, 2, 0, 36, 1, 2, 0,120, 4, 2, 0,121, 4, 2, 0,122, 4, 2, 0,123, 4,
+ 4, 0,124, 4, 4, 0, 14, 1, 2, 0,125, 4, 2, 0,126, 4, 2, 0,127, 4, 2, 0,128, 4, 2, 0,129, 4, 2, 0,130, 4,
+ 24, 0,131, 4, 24, 0,132, 4, 23, 0,133, 4, 12, 0,134, 4, 2, 0,135, 4, 2, 0, 37, 0, 7, 0,136, 4, 7, 0,137, 4,
+ 7, 0,138, 4, 7, 0,139, 4, 7, 0,140, 4, 7, 0,141, 4, 7, 0,142, 4, 7, 0,143, 4, 7, 0,144, 4, 2, 0,145, 4,
+ 2, 0,146, 4, 2, 0,147, 4, 2, 0,148, 4, 2, 0,149, 4, 2, 0,150, 4, 7, 0,151, 4, 7, 0,152, 4, 7, 0,153, 4,
+ 2, 0,154, 4, 2, 0,155, 4, 2, 0,156, 4, 2, 0,157, 4, 2, 0,158, 4, 2, 0,159, 4, 2, 0,160, 4, 2, 0,161, 4,
+ 2, 0,162, 4, 2, 0,163, 4, 4, 0,164, 4, 4, 0,165, 4, 4, 0,166, 4, 4, 0,167, 4, 4, 0,168, 4, 7, 0,169, 4,
+ 4, 0,170, 4, 4, 0,171, 4, 4, 0,172, 4, 4, 0,173, 4, 7, 0,174, 4, 7, 0,175, 4, 7, 0,176, 4, 7, 0,177, 4,
+ 7, 0,178, 4, 7, 0,179, 4, 7, 0,180, 4, 7, 0,181, 4, 7, 0,182, 4, 0, 0,183, 4, 0, 0,184, 4, 4, 0,185, 4,
+ 2, 0,186, 4, 2, 0,161, 1, 0, 0,187, 4, 7, 0,188, 4, 7, 0,189, 4, 4, 0,190, 4, 4, 0,191, 4, 7, 0,192, 4,
+ 7, 0,193, 4, 2, 0,194, 4, 2, 0,195, 4, 7, 0,196, 4, 2, 0,197, 4, 2, 0,198, 4, 4, 0,199, 4, 2, 0,200, 4,
+ 2, 0,201, 4, 2, 0,202, 4, 2, 0,203, 4, 7, 0,204, 4, 7, 0, 70, 0, 43, 0,205, 4,172, 0, 9, 0,172, 0, 0, 0,
+172, 0, 1, 0, 0, 0, 20, 0, 2, 0,206, 4, 2, 0,207, 4, 2, 0,208, 4, 2, 0, 43, 0, 7, 0,209, 4, 7, 0, 70, 0,
+173, 0, 5, 0, 7, 0,210, 4, 0, 0, 17, 0, 0, 0, 43, 0, 0, 0, 70, 0, 0, 0,161, 1,174, 0, 5, 0,174, 0, 0, 0,
+174, 0, 1, 0, 4, 0,121, 3, 0, 0,131, 3, 4, 0, 19, 0,175, 0, 6, 0,176, 0,211, 4, 2, 0, 19, 0, 2, 0,212, 4,
+ 2, 0,213, 4, 2, 0,214, 4, 9, 0,215, 4,177, 0, 4, 0, 2, 0,110, 0, 2, 0,142, 2, 2, 0,124, 3, 2, 0,216, 4,
+178, 0, 10, 0, 2, 0, 19, 0, 2, 0,217, 4, 2, 0,218, 4, 2, 0,219, 4,177, 0,220, 4, 9, 0,215, 4, 7, 0,221, 4,
+ 4, 0,222, 4, 4, 0,223, 4, 4, 0, 37, 0,179, 0, 4, 0,179, 0, 0, 0,179, 0, 1, 0, 0, 0,224, 4, 7, 0,225, 4,
+180, 0, 8, 0,181, 0,226, 4,176, 0,211, 4, 7, 0,227, 4, 4, 0, 94, 0, 0, 0,228, 4, 0, 0,229, 4, 0, 0,230, 4,
+ 0, 0,231, 4,182, 0, 9, 0,176, 0,211, 4, 7, 0,232, 4, 7, 0,233, 4, 2, 0, 14, 1, 2, 0, 19, 0, 4, 0, 36, 0,
+ 4, 0,234, 4, 84, 0,235, 4, 9, 0,215, 4,183, 0, 72, 0,182, 0,236, 4,182, 0,237, 4,180, 0,238, 4, 7, 0,239, 4,
+ 2, 0,240, 4, 2, 0,241, 4, 7, 0,242, 4, 7, 0,243, 4, 2, 0,124, 3, 2, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4,
+ 7, 0,247, 4, 2, 0,248, 4, 2, 0,223, 4, 2, 0,249, 4, 2, 0,250, 4, 2, 0,251, 4, 2, 0,252, 4, 7, 0,253, 4,
+ 7, 0,254, 4, 7, 0,255, 4, 2, 0, 0, 5, 2, 0, 1, 5, 2, 0, 2, 5, 2, 0, 3, 5, 2, 0, 4, 5, 2, 0, 5, 5,
+ 2, 0, 6, 5,175, 0, 7, 5,178, 0, 8, 5, 7, 0, 9, 5, 7, 0, 10, 5, 7, 0, 11, 5, 2, 0, 12, 5, 2, 0, 70, 0,
+ 0, 0, 13, 5, 0, 0, 14, 5, 0, 0, 15, 5, 0, 0, 16, 5, 0, 0, 17, 5, 0, 0, 18, 5, 2, 0, 19, 5, 7, 0, 20, 5,
+ 7, 0, 21, 5, 7, 0, 22, 5, 7, 0, 23, 5, 7, 0, 24, 5, 7, 0, 25, 5, 7, 0, 26, 5, 7, 0, 27, 5, 7, 0, 28, 5,
+ 7, 0, 29, 5, 2, 0, 30, 5, 0, 0, 31, 5, 0, 0, 32, 5, 0, 0, 33, 5, 0, 0, 34, 5, 32, 0, 35, 5, 0, 0, 36, 5,
+ 0, 0, 37, 5, 0, 0, 38, 5, 0, 0, 39, 5, 0, 0, 40, 5, 0, 0, 41, 5, 0, 0, 42, 5, 0, 0, 43, 5, 2, 0, 44, 5,
+ 2, 0, 45, 5, 2, 0, 46, 5, 2, 0, 47, 5, 2, 0, 48, 5,184, 0, 8, 0, 4, 0, 49, 5, 4, 0, 50, 5, 4, 0, 51, 5,
+ 4, 0, 52, 5, 4, 0, 53, 5, 4, 0, 54, 5, 4, 0, 54, 0, 4, 0, 50, 2, 47, 0, 34, 0, 27, 0, 31, 0, 39, 0, 75, 0,
+ 32, 0, 55, 5,164, 0, 56, 5, 47, 0, 57, 5, 48, 0,211, 0, 12, 0, 58, 5,165, 0, 59, 5, 32, 0, 60, 5, 7, 0, 61, 5,
+ 7, 0, 62, 5, 7, 0, 63, 5, 7, 0, 64, 5, 4, 0, 23, 3, 2, 0, 19, 0, 2, 0, 7, 1, 59, 0, 3, 1,185, 0, 65, 5,
+173, 0, 66, 5,183, 0, 67, 5,186, 0, 68, 5,171, 0,185, 0,169, 0, 91, 4, 40, 0,126, 0, 12, 0,104, 0, 12, 0, 69, 5,
+187, 0, 70, 5, 2, 0, 71, 5, 2, 0, 72, 5, 2, 0,220, 0, 2, 0, 73, 5, 4, 0, 74, 5, 4, 0, 75, 5, 12, 0, 76, 5,
+188, 0, 6, 0, 48, 0,211, 0, 46, 0, 2, 1, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0,110, 0, 7, 0, 77, 5,189, 0, 35, 0,
+ 7, 0, 78, 5, 7, 0, 79, 5, 7, 0, 80, 5, 7, 0, 81, 5, 7, 0, 82, 5, 7, 0, 83, 5, 7, 0, 84, 5, 7, 0, 85, 5,
+ 7, 0, 86, 5, 7, 0, 21, 1, 7, 0, 87, 5, 7, 0, 88, 5, 7, 0, 89, 5, 7, 0, 90, 5, 7, 0,176, 0, 2, 0, 91, 5,
+ 2, 0, 92, 5, 4, 0, 93, 5, 2, 0, 94, 5, 2, 0, 95, 5, 2, 0, 96, 5, 2, 0, 97, 5, 7, 0, 98, 5, 69, 0, 99, 5,
+190, 0,100, 5,189, 0,101, 5,191, 0,102, 5,192, 0,103, 5,193, 0,104, 5,194, 0,105, 5,195, 0,106, 5, 7, 0,107, 5,
+ 2, 0,108, 5, 2, 0,109, 5, 4, 0,161, 1,196, 0, 54, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5,
+ 7, 0,112, 5, 2, 0,113, 5, 7, 0, 86, 5, 7, 0, 21, 1, 7, 0, 43, 0, 4, 0,114, 5, 2, 0, 96, 5, 2, 0, 97, 5,
+ 32, 0, 55, 5, 32, 0,115, 5,188, 0,116, 5,196, 0,101, 5, 0, 0,117, 5, 4, 0, 23, 3, 4, 0,118, 5, 2, 0,119, 5,
+ 2, 0,120, 5, 2, 0,121, 5, 2, 0,122, 5, 2, 0,161, 1, 2, 0, 19, 0, 2, 0,123, 5, 2, 0,124, 5, 7, 0,116, 0,
+ 7, 0,125, 5, 7, 0,126, 5, 7, 0,127, 5, 7, 0,128, 5, 7, 0,129, 5, 7, 0,176, 0, 7, 0, 61, 5, 2, 0,130, 5,
+ 2, 0, 65, 1, 2, 0,131, 5, 2, 0,132, 5, 2, 0,133, 5, 2, 0,134, 5, 2, 0,135, 5, 2, 0,136, 5, 2, 0,137, 5,
+ 2, 0,138, 5, 4, 0,139, 5, 12, 0,140, 5, 2, 0,141, 5, 2, 0, 64, 2, 2, 0,142, 5, 0, 0,143, 5, 0, 0,144, 5,
+ 9, 0,145, 5,190, 0,100, 5,198, 0, 22, 0, 24, 0, 36, 0, 24, 0, 64, 0, 23, 0,146, 5, 23, 0,147, 5, 23, 0,148, 5,
+ 7, 0,149, 5, 7, 0,150, 5, 7, 0,151, 5, 7, 0,152, 5, 2, 0,153, 5, 2, 0,154, 5, 2, 0,155, 5, 2, 0,156, 5,
+ 2, 0,157, 5, 2, 0, 19, 0, 2, 0,158, 5, 2, 0,159, 5, 2, 0,160, 5, 2, 0,161, 5, 2, 0,162, 5, 2, 0,122, 5,
+ 7, 0,163, 5,197, 0, 6, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,
+199, 0, 8, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,200, 0,164, 5,
+ 47, 0,139, 0,201, 0, 14, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,
+198, 0,165, 5,202, 0,166, 5, 12, 0,167, 5, 2, 0, 14, 1, 2, 0, 19, 0, 2, 0,168, 5, 0, 0,169, 5, 0, 0,170, 5,
+203, 0, 31, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,191, 0,102, 5,
+ 2, 0,171, 5, 2, 0,172, 5, 2, 0,158, 5, 2, 0,173, 5,198, 0,165, 5, 2, 0,174, 5, 2, 0,138, 0, 2, 0,169, 5,
+ 2, 0,175, 5, 9, 0,176, 5, 2, 0,177, 5, 0, 0,178, 5, 0, 0,179, 5, 2, 0,180, 5, 2, 0,181, 5, 2, 0, 32, 3,
+ 2, 0,182, 5, 2, 0,183, 5, 0, 0, 19, 0, 0, 0, 48, 1, 9, 0,250, 1, 4, 0,184, 5, 4, 0,185, 5, 27, 0,186, 5,
+204, 0, 16, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,198, 0,165, 5,
+ 7, 0, 14, 2, 7, 0, 15, 2, 2, 0,174, 5, 2, 0,187, 5, 2, 0,188, 5, 2, 0,189, 5, 4, 0, 19, 0, 7, 0,190, 5,
+190, 0,100, 5,205, 0, 15, 0, 0, 0,191, 5, 0, 0,192, 5, 0, 0,193, 5, 2, 0, 19, 0, 2, 0,194, 5, 2, 0,195, 5,
+ 2, 0,104, 1, 2, 0,196, 5, 2, 0, 37, 0, 4, 0,197, 5, 4, 0,198, 5, 2, 0,199, 5, 2, 0,200, 5, 0, 0,201, 5,
+ 0, 0,202, 5,206, 0, 12, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 4, 0, 37, 0,205, 0,203, 5,
+207, 0,204, 5, 12, 0,205, 5, 12, 0,206, 5,208, 0,207, 5,195, 0,208, 5,209, 0,209, 5,210, 0, 17, 0,197, 0, 0, 0,
+197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,198, 0,165, 5, 12, 0,210, 5,211, 0,211, 5,
+ 0, 0,212, 5,212, 0,213, 5, 4, 0,214, 5, 4, 0,215, 5, 2, 0, 19, 0, 2, 0,216, 5, 2, 0,217, 5, 2, 0, 37, 0,
+213, 0, 29, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5, 48, 0,150, 2,
+ 46, 0, 2, 1, 62, 0,218, 5, 2, 0,138, 0, 2, 0,219, 5, 2, 0, 70, 0, 2, 0,220, 5, 4, 0, 19, 0, 2, 0,221, 5,
+ 2, 0,170, 5, 2, 0,169, 5, 2, 0,161, 1, 0, 0,222, 5, 0, 0,223, 5, 0, 0,224, 5, 0, 0,122, 5, 7, 0, 14, 2,
+ 7, 0, 15, 2, 7, 0,190, 5, 7, 0, 65, 1, 7, 0,225, 5, 7, 0,226, 5,190, 0,100, 5,214, 0, 11, 0,197, 0, 0, 0,
+197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5, 2, 0,168, 5, 2, 0, 19, 0, 4, 0, 37, 0,
+202, 0,166, 5,198, 0,165, 5,215, 0, 27, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5,
+ 2, 0,113, 5, 43, 0,227, 5, 4, 0,228, 5, 4, 0,229, 5, 2, 0, 94, 0, 2, 0,138, 0, 2, 0,230, 5, 0, 0,231, 5,
+ 0, 0,232, 5, 4, 0,233, 5, 4, 0,234, 5, 4, 0,235, 5, 4, 0,236, 5, 2, 0,237, 5, 2, 0,238, 5, 7, 0,239, 5,
+ 23, 0,240, 5, 23, 0,241, 5, 4, 0,242, 5, 4, 0,243, 5, 0, 0,244, 5, 0, 0,245, 5,216, 0, 10, 0, 27, 0, 31, 0,
+ 9, 0,246, 5, 9, 0,247, 5, 9, 0,248, 5, 9, 0,249, 5, 9, 0,250, 5, 4, 0, 94, 0, 4, 0,251, 5, 0, 0,252, 5,
+ 0, 0,253, 5,217, 0, 10, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5,216, 0,254, 5,
+ 2, 0, 94, 0, 2, 0,138, 0, 4, 0, 43, 0, 9, 0,255, 5,218, 0, 8, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5,
+ 4, 0,111, 5, 7, 0,112, 5,198, 0,165, 5, 4, 0, 19, 0, 4, 0, 0, 6,219, 0, 23, 0,197, 0, 0, 0,197, 0, 1, 0,
+ 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,198, 0,165, 5, 27, 0, 1, 6, 27, 0, 81, 0, 2, 0, 19, 0,
+ 2, 0,138, 0, 7, 0, 2, 6, 9, 0, 3, 6, 7, 0, 14, 2, 7, 0, 15, 2, 7, 0, 4, 6, 7, 0, 5, 6, 59, 0, 3, 1,
+ 59, 0, 6, 6, 4, 0, 7, 6, 2, 0,178, 5, 2, 0, 37, 0,190, 0,100, 5,220, 0, 10, 0,197, 0, 0, 0,197, 0, 1, 0,
+ 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5, 2, 0, 19, 0, 2, 0, 32, 3, 4, 0, 37, 0,190, 0,100, 5,
+221, 0, 42, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5, 2, 0,113, 5,198, 0,165, 5,
+207, 0,204, 5, 0, 0,191, 5, 0, 0,192, 5, 0, 0,193, 5, 2, 0, 17, 0, 2, 0,200, 5, 2, 0, 19, 0, 2, 0,194, 5,
+ 9, 0, 3, 6, 4, 0,197, 5, 4, 0, 8, 6, 4, 0, 9, 6, 4, 0,198, 5, 23, 0, 10, 6, 23, 0, 11, 6, 7, 0, 12, 6,
+ 7, 0, 13, 6, 7, 0, 14, 6, 7, 0, 2, 6, 2, 0, 15, 6, 2, 0,210, 0, 2, 0,104, 1, 2, 0,196, 5, 2, 0, 37, 0,
+ 2, 0, 43, 0, 2, 0, 16, 6, 2, 0, 17, 6, 9, 0, 18, 6, 9, 0, 19, 6, 9, 0, 20, 6, 9, 0, 21, 6, 9, 0, 22, 6,
+ 2, 0, 23, 6, 0, 0,202, 5, 58, 0, 24, 6,222, 0, 7, 0,222, 0, 0, 0,222, 0, 1, 0, 0, 0, 25, 6, 2, 0, 26, 6,
+ 2, 0, 27, 6, 2, 0, 28, 6, 2, 0, 37, 0,223, 0, 12, 0, 2, 0, 27, 6, 2, 0, 29, 6, 2, 0, 30, 6, 0, 0,115, 2,
+ 2, 0, 31, 6, 2, 0, 32, 6, 2, 0, 33, 6, 2, 0, 34, 6, 2, 0, 35, 6, 2, 0,158, 5, 7, 0, 36, 6, 7, 0, 37, 6,
+224, 0, 18, 0,224, 0, 0, 0,224, 0, 1, 0, 0, 0,131, 3,223, 0, 38, 6,223, 0, 39, 6,223, 0, 40, 6,223, 0, 41, 6,
+ 7, 0, 42, 6, 2, 0, 43, 6, 2, 0, 44, 6, 2, 0, 45, 6, 2, 0, 46, 6, 2, 0, 47, 6, 2, 0, 48, 6, 2, 0, 49, 6,
+ 2, 0, 50, 6, 2, 0, 51, 6, 2, 0, 52, 6,225, 0, 10, 0, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6, 0, 0, 56, 6,
+ 0, 0, 57, 6, 0, 0, 58, 6, 2, 0, 59, 6, 2, 0, 60, 6, 2, 0, 61, 6, 2, 0, 37, 0,226, 0, 8, 0, 0, 0, 62, 6,
+ 0, 0, 63, 6, 0, 0, 64, 6, 0, 0, 65, 6, 0, 0, 66, 6, 0, 0, 67, 6, 7, 0, 77, 5, 7, 0, 37, 0,227, 0, 16, 0,
+225, 0, 68, 6,225, 0, 69, 6,225, 0, 70, 6,225, 0, 71, 6,225, 0, 72, 6,225, 0, 73, 6,225, 0, 74, 6,225, 0, 75, 6,
+225, 0, 76, 6,225, 0, 77, 6,225, 0, 78, 6,225, 0, 79, 6,225, 0, 80, 6,225, 0, 81, 6,226, 0, 82, 6, 0, 0, 83, 6,
+228, 0, 71, 0, 0, 0, 84, 6, 0, 0, 85, 6, 0, 0, 57, 6, 0, 0, 86, 6, 0, 0, 87, 6, 0, 0, 88, 6, 0, 0, 89, 6,
+ 0, 0, 90, 6, 0, 0, 91, 6, 0, 0, 92, 6, 0, 0, 93, 6, 0, 0, 94, 6, 0, 0, 95, 6, 0, 0, 96, 6, 0, 0, 97, 6,
+ 0, 0, 98, 6, 0, 0, 99, 6, 0, 0,100, 6, 0, 0,101, 6, 0, 0,102, 6, 0, 0,103, 6, 0, 0,104, 6, 0, 0,105, 6,
+ 0, 0,106, 6, 0, 0,107, 6, 0, 0,108, 6, 0, 0,109, 6, 0, 0,110, 6, 0, 0,111, 6, 0, 0,112, 6, 0, 0,113, 6,
+ 0, 0,114, 6, 0, 0,115, 6, 0, 0,116, 6, 0, 0,117, 6, 0, 0,118, 6, 0, 0,119, 6, 0, 0,120, 6, 0, 0,121, 6,
+ 0, 0,122, 6, 0, 0,123, 6, 0, 0,124, 6, 0, 0,125, 6, 0, 0,126, 6, 0, 0,127, 6, 0, 0,128, 6, 0, 0,129, 6,
+ 0, 0,130, 6, 0, 0,131, 6, 0, 0,132, 6, 0, 0,133, 6, 0, 0,134, 6, 0, 0,135, 6, 0, 0,136, 6, 0, 0,137, 6,
+ 0, 0,138, 6, 0, 0,139, 6, 0, 0,140, 6, 0, 0,141, 6, 0, 0,142, 6, 0, 0,143, 6, 0, 0,144, 6, 0, 0,145, 6,
+ 0, 0,146, 6, 0, 0,147, 6, 0, 0,148, 6, 0, 0,149, 6, 0, 0,150, 6, 0, 0,151, 6, 0, 0,152, 6, 0, 0, 96, 0,
+229, 0, 5, 0, 0, 0,153, 6, 0, 0,108, 6, 0, 0,110, 6, 2, 0, 19, 0, 2, 0, 37, 0,230, 0, 21, 0,230, 0, 0, 0,
+230, 0, 1, 0, 0, 0, 20, 0,227, 0,154, 6,228, 0,155, 6,228, 0,156, 6,228, 0,157, 6,228, 0,158, 6,228, 0,159, 6,
+228, 0,160, 6,228, 0,161, 6,228, 0,162, 6,228, 0,163, 6,228, 0,164, 6,228, 0,165, 6,228, 0,166, 6,228, 0,167, 6,
+228, 0,168, 6,228, 0,169, 6,228, 0,170, 6,229, 0,171, 6,231, 0, 5, 0, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0, 63, 2,
+ 7, 0,172, 6, 7, 0,228, 1,232, 0, 67, 0, 4, 0, 19, 0, 4, 0,173, 6, 4, 0,174, 6, 0, 0,175, 6, 0, 0,176, 6,
+ 0, 0,177, 6, 0, 0,178, 6, 0, 0,179, 6, 0, 0,180, 6, 0, 0,181, 6, 0, 0,182, 6, 0, 0,183, 6, 2, 0,184, 6,
+ 2, 0, 37, 0, 4, 0,185, 6, 4, 0,186, 6, 4, 0,187, 6, 4, 0,188, 6, 2, 0,189, 6, 2, 0,190, 6, 4, 0,191, 6,
+ 4, 0, 43, 0, 4, 0,192, 6, 2, 0,193, 6, 2, 0,194, 6, 2, 0,195, 6, 2, 0,196, 6, 12, 0,197, 6, 12, 0,198, 6,
+ 12, 0,199, 6, 2, 0,200, 6, 2, 0,201, 6, 2, 0,202, 6, 2, 0,203, 6, 2, 0,204, 6, 2, 0,205, 6, 2, 0,206, 6,
+ 2, 0,207, 6,231, 0,208, 6, 2, 0,209, 6, 2, 0,210, 6, 2, 0,211, 6, 2, 0,212, 6, 2, 0,213, 6, 2, 0,214, 6,
+ 2, 0,215, 6, 2, 0,216, 6, 4, 0,217, 6, 4, 0,218, 6, 2, 0,219, 6, 2, 0,220, 6, 2, 0,221, 6, 2, 0,222, 6,
+ 2, 0,223, 6, 2, 0,224, 6, 2, 0,225, 6, 2, 0,226, 6, 2, 0,227, 6, 2, 0,228, 6, 2, 0,229, 6, 2, 0,230, 6,
+ 0, 0,231, 6, 0, 0,232, 6, 7, 0,233, 6, 2, 0, 12, 5, 2, 0,234, 6, 56, 0,235, 6,200, 0, 21, 0, 27, 0, 31, 0,
+ 12, 0,236, 6, 12, 0,237, 6, 12, 0,238, 6, 12, 0,110, 5, 47, 0,139, 0, 47, 0,239, 6, 2, 0,240, 6, 2, 0,241, 6,
+ 2, 0,242, 6, 2, 0,243, 6, 2, 0,244, 6, 2, 0,245, 6, 2, 0,246, 6, 2, 0, 37, 0, 2, 0,247, 6, 2, 0,248, 6,
+ 4, 0, 70, 0,195, 0,249, 6, 9, 0,250, 6, 2, 0,251, 6,233, 0, 5, 0,233, 0, 0, 0,233, 0, 1, 0,233, 0,252, 6,
+ 13, 0,253, 6, 4, 0, 19, 0,234, 0, 7, 0,234, 0, 0, 0,234, 0, 1, 0,233, 0,254, 6,233, 0,255, 6, 2, 0,132, 4,
+ 2, 0, 19, 0, 4, 0, 37, 0,235, 0, 23, 0,235, 0, 0, 0,235, 0, 1, 0,236, 0, 0, 7,237, 0,209, 5, 0, 0, 1, 7,
+ 0, 0, 2, 7, 0, 0, 3, 7, 2, 0, 4, 7, 2, 0, 5, 7, 2, 0, 6, 7, 2, 0, 7, 7, 2, 0, 8, 7, 2, 0, 37, 0,
+ 2, 0, 19, 0, 2, 0, 9, 7, 2, 0, 10, 7, 2, 0, 11, 7, 4, 0, 12, 7,235, 0, 13, 7, 9, 0, 14, 7, 4, 0, 15, 7,
+ 4, 0, 16, 7, 0, 0, 17, 7,238, 0, 2, 0,239, 0, 0, 7,237, 0,209, 5,240, 0, 2, 0,241, 0, 0, 7,237, 0,209, 5,
+242, 0, 23, 0,242, 0, 0, 0,242, 0, 1, 0,233, 0,254, 6,233, 0,255, 6,233, 0, 18, 7,233, 0, 19, 7,200, 0, 20, 7,
+ 23, 0, 52, 0, 0, 0,111, 5, 0, 0, 21, 7, 2, 0,159, 5, 2, 0,160, 5, 2, 0, 22, 7, 2, 0, 37, 0, 2, 0,243, 6,
+ 2, 0, 23, 7, 2, 0, 19, 0, 40, 0,126, 0,243, 0, 0, 7, 12, 0, 24, 7, 12, 0,110, 5, 12, 0, 25, 7, 12, 0, 26, 7,
+244, 0, 21, 0,244, 0, 0, 0,244, 0, 1, 0,198, 0,165, 5, 23, 0, 27, 7, 23, 0, 28, 7, 2, 0,159, 5, 2, 0,160, 5,
+ 2, 0, 29, 7, 2, 0, 30, 7, 2, 0, 31, 7, 2, 0, 19, 0, 7, 0, 10, 2, 2, 0,242, 6, 2, 0,246, 6, 4, 0, 43, 0,
+245, 0, 0, 7, 12, 0, 32, 7, 12, 0, 33, 7, 12, 0, 25, 7, 0, 0, 34, 7, 9, 0, 35, 7,246, 0, 11, 0, 0, 0, 36, 7,
+ 2, 0, 37, 7, 2, 0, 38, 7, 2, 0, 39, 7, 2, 0, 40, 7, 2, 0,121, 4, 2, 0,116, 4,200, 0, 41, 7, 47, 0, 42, 7,
+ 4, 0, 43, 7, 4, 0, 44, 7,247, 0, 1, 0, 0, 0, 45, 7,248, 0, 8, 0, 58, 0, 46, 7, 58, 0, 47, 7,248, 0, 48, 7,
+248, 0, 49, 7,248, 0, 50, 7, 2, 0,134, 0, 2, 0, 19, 0, 4, 0, 51, 7,249, 0, 4, 0, 4, 0,228, 5, 4, 0, 52, 7,
+ 4, 0,233, 5, 4, 0, 53, 7,250, 0, 2, 0, 4, 0, 54, 7, 4, 0, 55, 7,251, 0, 7, 0, 7, 0, 56, 7, 7, 0, 57, 7,
+ 7, 0, 58, 7, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0, 3, 4, 7, 0, 59, 7,252, 0, 6, 0, 0, 0, 60, 7, 0, 0,193, 5,
+ 50, 0,142, 0, 2, 0,110, 0, 2, 0,120, 4, 4, 0, 37, 0,253, 0, 21, 0,253, 0, 0, 0,253, 0, 1, 0, 4, 0, 57, 0,
+ 4, 0, 23, 0, 4, 0, 28, 0, 4, 0, 61, 7, 4, 0, 62, 7, 4, 0, 63, 7,247, 0, 64, 7, 0, 0, 60, 7, 4, 0, 65, 7,
+ 4, 0, 66, 7,252, 0, 6, 3,249, 0, 67, 7,250, 0, 68, 7,251, 0, 69, 7,248, 0, 70, 7,248, 0, 71, 7,248, 0, 72, 7,
+ 58, 0, 73, 7, 58, 0, 74, 7,254, 0, 12, 0, 0, 0,191, 1, 9, 0,196, 0, 0, 0,197, 0, 4, 0,200, 0, 4, 0,208, 0,
+ 9, 0,201, 0, 7, 0,203, 0, 7, 0,204, 0, 9, 0, 75, 7, 9, 0, 76, 7, 9, 0,205, 0, 9, 0,207, 0,255, 0, 43, 0,
+255, 0, 0, 0,255, 0, 1, 0, 9, 0, 77, 7, 9, 0, 26, 0, 0, 0, 27, 0, 4, 0, 19, 0, 4, 0, 17, 0, 4, 0, 23, 0,
+ 4, 0, 92, 0, 4, 0, 78, 7, 4, 0, 79, 7, 4, 0, 62, 7, 4, 0, 63, 7, 4, 0, 80, 7, 4, 0,219, 0, 4, 0, 81, 7,
+ 4, 0, 82, 7, 7, 0,233, 4, 7, 0, 83, 7, 4, 0,131, 0, 4, 0, 84, 7,253, 0, 85, 7, 36, 0, 80, 0, 47, 0,139, 0,
+ 50, 0,142, 0, 7, 0, 86, 7, 7, 0, 87, 7,254, 0, 4, 1,255, 0, 88, 7,255, 0, 89, 7,255, 0, 90, 7, 12, 0, 91, 7,
+ 0, 1, 92, 7, 1, 1, 93, 7, 7, 0, 94, 7, 7, 0, 95, 7, 4, 0, 96, 7, 7, 0, 97, 7, 9, 0, 98, 7, 4, 0, 99, 7,
+ 4, 0,100, 7, 4, 0,101, 7, 7, 0,102, 7, 2, 1, 4, 0, 2, 1, 0, 0, 2, 1, 1, 0, 12, 0,103, 7,255, 0,104, 7,
+185, 0, 6, 0, 12, 0,105, 7, 12, 0, 91, 7, 12, 0,106, 7,255, 0,107, 7, 0, 0,108, 7, 0, 0,109, 7, 3, 1, 4, 0,
+ 7, 0,110, 7, 7, 0,113, 0, 2, 0,111, 7, 2, 0,112, 7, 4, 1, 6, 0, 7, 0,113, 7, 7, 0,114, 7, 7, 0,115, 7,
+ 7, 0,116, 7, 4, 0,117, 7, 4, 0,118, 7, 5, 1, 12, 0, 7, 0,119, 7, 7, 0,120, 7, 7, 0,121, 7, 7, 0,122, 7,
+ 7, 0,123, 7, 7, 0,124, 7, 7, 0,125, 7, 7, 0,126, 7, 7, 0,127, 7, 7, 0,128, 7, 4, 0,154, 2, 4, 0,129, 7,
+ 6, 1, 2, 0, 7, 0,210, 4, 7, 0, 37, 0, 7, 1, 5, 0, 7, 0,130, 7, 7, 0,131, 7, 4, 0, 94, 0, 4, 0,116, 2,
+ 4, 0,132, 7, 8, 1, 6, 0, 8, 1, 0, 0, 8, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,133, 7, 2, 0, 57, 0,
+ 9, 1, 8, 0, 9, 1, 0, 0, 9, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,133, 7, 2, 0, 57, 0, 7, 0, 23, 0,
+ 7, 0,131, 0, 10, 1, 45, 0, 10, 1, 0, 0, 10, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,133, 7, 2, 0,215, 0,
+ 2, 0,177, 3, 2, 0,134, 7, 7, 0,135, 7, 7, 0, 93, 0, 7, 0,167, 2, 4, 0,136, 7, 4, 0, 82, 0, 4, 0,118, 2,
+ 7, 0,137, 7, 7, 0,138, 7, 7, 0,139, 7, 7, 0,140, 7, 7, 0,141, 7, 7, 0,142, 7, 7, 0,164, 2, 7, 0, 1, 1,
+ 7, 0,143, 7, 7, 0,144, 7, 7, 0, 37, 0, 7, 0,145, 7, 7, 0,146, 7, 7, 0,147, 7, 2, 0,148, 7, 2, 0,149, 7,
+ 2, 0,150, 7, 2, 0,151, 7, 2, 0,152, 7, 2, 0,153, 7, 2, 0,154, 7, 2, 0,155, 7, 2, 0,123, 5, 2, 0,156, 7,
+ 2, 0,211, 1, 2, 0,157, 7, 0, 0,158, 7, 0, 0,159, 7, 7, 0,213, 0, 11, 1,160, 7, 65, 0,164, 1, 12, 1, 16, 0,
+ 12, 1, 0, 0, 12, 1, 1, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,133, 7, 2, 0,215, 0, 7, 0,159, 2, 7, 0,160, 2,
+ 7, 0,161, 2, 7, 0,255, 1, 7, 0,162, 2, 7, 0,163, 2, 7, 0,161, 7, 7, 0,164, 2, 7, 0,166, 2, 7, 0,167, 2,
+212, 0, 5, 0, 2, 0, 17, 0, 2, 0, 51, 7, 2, 0, 19, 0, 2, 0,162, 7, 27, 0, 1, 6,211, 0, 3, 0, 4, 0, 69, 0,
+ 4, 0,163, 7,212, 0, 2, 0, 13, 1, 11, 0, 13, 1, 0, 0, 13, 1, 1, 0, 0, 0, 20, 0, 2, 0, 17, 0, 2, 0,164, 7,
+ 4, 0, 22, 0, 4, 0,165, 7, 2, 0, 19, 0, 2, 0, 37, 0, 9, 0,166, 7, 9, 0,167, 7, 14, 1, 5, 0, 0, 0, 20, 0,
+ 7, 0, 21, 1, 7, 0,168, 7, 4, 0,169, 7, 4, 0, 37, 0, 15, 1, 4, 0, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 43, 0,
+ 2, 0, 70, 0, 16, 1, 4, 0, 0, 0, 20, 0, 64, 0,170, 7, 7, 0, 21, 1, 7, 0, 37, 0, 17, 1, 6, 0, 2, 0,171, 7,
+ 2, 0,172, 7, 2, 0, 17, 0, 2, 0,173, 7, 0, 0,174, 7, 0, 0,175, 7, 18, 1, 5, 0, 4, 0, 17, 0, 4, 0, 37, 0,
+ 0, 0, 20, 0, 0, 0,176, 7, 0, 0,177, 7, 19, 1, 3, 0, 4, 0, 17, 0, 4, 0, 37, 0, 0, 0, 20, 0, 20, 1, 4, 0,
+ 2, 0,178, 7, 2, 0,179, 7, 2, 0, 19, 0, 2, 0, 37, 0, 21, 1, 6, 0, 0, 0, 20, 0, 0, 0,180, 7, 2, 0,181, 7,
+ 2, 0,164, 2, 2, 0, 14, 1, 2, 0, 70, 0, 22, 1, 5, 0, 0, 0, 20, 0, 7, 0,113, 0, 7, 0, 5, 4, 2, 0, 19, 0,
+ 2, 0,130, 2, 23, 1, 3, 0, 0, 0, 20, 0, 4, 0,118, 2, 4, 0,178, 7, 24, 1, 7, 0, 0, 0, 20, 0, 7, 0, 5, 4,
+ 0, 0,182, 7, 0, 0,183, 7, 2, 0, 14, 1, 2, 0, 43, 0, 4, 0,184, 7, 25, 1, 3, 0, 32, 0,185, 7, 0, 0,186, 7,
+ 0, 0,187, 7, 26, 1, 18, 0, 26, 1, 0, 0, 26, 1, 1, 0, 2, 0, 17, 0, 2, 0,164, 7, 2, 0, 19, 0, 2, 0,188, 7,
+ 2, 0,189, 7, 2, 0,190, 7, 2, 0, 43, 0, 2, 0, 70, 0, 0, 0, 20, 0, 9, 0, 2, 0, 27, 1,191, 7, 32, 0, 45, 0,
+ 2, 0,216, 4, 2, 0, 94, 7, 2, 0,192, 7, 2, 0, 37, 0, 28, 1, 11, 0, 0, 0, 20, 0, 0, 0, 17, 0, 0, 0,193, 7,
+ 2, 0, 19, 0, 2, 0,130, 2, 2, 0,194, 7, 4, 0,195, 7, 4, 0,196, 7, 4, 0,197, 7, 4, 0,198, 7, 4, 0,199, 7,
+ 29, 1, 1, 0, 0, 0,200, 7, 30, 1, 4, 0, 43, 0,227, 5, 0, 0,201, 7, 4, 0, 14, 1, 4, 0, 19, 0, 27, 1, 18, 0,
+ 27, 1, 0, 0, 27, 1, 1, 0, 27, 1,202, 7, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,203, 7, 2, 0,190, 7, 2, 0,164, 7,
+ 2, 0,204, 7, 2, 0, 70, 0, 2, 0,161, 1, 0, 0, 20, 0, 9, 0, 2, 0, 31, 1,191, 7, 26, 1,205, 7, 2, 0, 15, 0,
+ 2, 0,206, 7, 4, 0,207, 7, 32, 1, 3, 0, 4, 0,190, 2, 4, 0, 37, 0, 32, 0, 45, 0, 33, 1, 12, 0,152, 0,208, 7,
+ 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,135, 7, 4, 0, 93, 0, 0, 0, 20, 0, 0, 0,209, 7, 2, 0,210, 7, 2, 0,211, 7,
+ 2, 0,212, 7, 2, 0,213, 7, 7, 0,214, 7, 34, 1, 10, 0, 2, 0, 19, 0, 2, 0,215, 7, 4, 0,135, 7, 4, 0, 93, 0,
+ 2, 0,216, 7, 0, 1, 92, 7, 2, 0, 17, 0, 2, 0,217, 7, 2, 0,218, 7, 2, 0,219, 7, 35, 1, 7, 0, 2, 0, 19, 0,
+ 2, 0,215, 7, 4, 0,135, 7, 4, 0, 93, 0, 2, 0, 17, 0, 2, 0,220, 7, 7, 0,137, 3, 36, 1, 11, 0, 4, 0,190, 2,
+ 2, 0, 17, 0, 2, 0, 19, 0, 32, 0, 45, 0, 78, 0,221, 7, 0, 0, 20, 0, 7, 0,222, 7, 7, 0,223, 7, 7, 0, 40, 3,
+ 2, 0,224, 7, 2, 0,225, 7, 37, 1, 5, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0, 37, 0, 47, 0,139, 0, 32, 0, 55, 5,
+ 38, 1, 5, 0, 4, 0, 19, 0, 4, 0, 17, 0, 0, 0, 20, 0, 0, 0,176, 7, 32, 0, 45, 0, 39, 1, 13, 0, 2, 0, 19, 0,
+ 2, 0, 17, 0, 2, 0,164, 7, 2, 0, 41, 3, 7, 0,226, 7, 7, 0,227, 7, 7, 0, 9, 1, 7, 0, 10, 1, 7, 0, 17, 3,
+ 7, 0, 20, 3, 7, 0,228, 7, 7, 0,229, 7, 32, 0,230, 7, 40, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,135, 7,
+ 4, 0, 93, 0, 0, 0, 20, 0, 0, 0,209, 7, 2, 0, 43, 0, 2, 0, 64, 0, 2, 0,231, 7, 2, 0,232, 7, 41, 1, 8, 0,
+ 32, 0, 45, 0, 7, 0,161, 2, 7, 0,233, 7, 7, 0,234, 7, 7, 0,156, 2, 2, 0, 19, 0, 2, 0,130, 2, 7, 0,235, 7,
+ 42, 1, 12, 0, 2, 0, 17, 0, 2, 0, 14, 1, 2, 0, 19, 0, 2, 0,164, 2, 2, 0,190, 2, 2, 0,236, 7, 4, 0, 37, 0,
+ 7, 0,237, 7, 7, 0,238, 7, 7, 0,239, 7, 7, 0,240, 7, 0, 0,241, 7, 43, 1, 10, 0, 2, 0, 19, 0, 2, 0, 17, 0,
+ 4, 0,135, 7, 4, 0, 93, 0, 0, 0, 20, 0, 2, 0, 81, 4, 2, 0, 64, 0, 2, 0,231, 7, 2, 0,232, 7, 65, 0,164, 1,
+ 44, 1, 7, 0, 4, 0,118, 2, 4, 0,242, 7, 4, 0,243, 7, 4, 0,244, 7, 7, 0,245, 7, 7, 0,246, 7, 0, 0,182, 7,
+ 45, 1, 7, 0, 0, 0,247, 7, 32, 0,248, 7, 0, 0,186, 7, 2, 0,249, 7, 2, 0, 43, 0, 4, 0, 70, 0, 0, 0,187, 7,
+ 46, 1, 6, 0, 2, 0, 19, 0, 2, 0, 17, 0, 4, 0,135, 7, 4, 0, 93, 0, 0, 0,250, 7, 0, 0,251, 7, 47, 1, 1, 0,
+ 4, 0, 19, 0, 48, 1, 6, 0, 0, 0, 96, 0, 2, 0, 17, 0, 2, 0, 19, 0, 4, 0,252, 7, 7, 0,253, 7, 43, 0,227, 5,
+ 49, 1, 4, 0, 0, 0,184, 0, 2, 0, 19, 0, 4, 0, 17, 0, 32, 0, 45, 0, 50, 1, 2, 0, 4, 0, 17, 0, 4, 0,148, 5,
+ 31, 1, 10, 0, 31, 1, 0, 0, 31, 1, 1, 0, 31, 1,202, 7, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0,164, 7, 2, 0,254, 7,
+ 0, 0, 20, 0, 9, 0, 2, 0, 32, 0, 45, 0, 51, 1, 10, 0, 7, 0, 40, 3, 7, 0,255, 7, 7, 0, 0, 8, 7, 0, 1, 8,
+ 7, 0, 2, 8, 4, 0, 19, 0, 7, 0,236, 7, 7, 0, 3, 8, 7, 0, 4, 8, 7, 0, 37, 0, 0, 1, 20, 0, 27, 0, 31, 0,
+ 0, 0,195, 0, 52, 1, 5, 8, 9, 0, 6, 8, 44, 0,154, 0, 44, 0, 7, 8, 9, 0, 8, 8, 36, 0, 80, 0, 7, 0,137, 3,
+ 7, 0, 9, 8, 7, 0, 10, 8, 7, 0, 11, 8, 7, 0, 12, 8, 7, 0, 13, 8, 7, 0, 14, 8, 4, 0, 94, 0, 4, 0, 15, 8,
+ 0, 0, 16, 8, 0, 0, 17, 8, 0, 0, 18, 8, 53, 1, 6, 0, 27, 0, 31, 0, 7, 0, 19, 8, 7, 0, 20, 8, 7, 0, 21, 8,
+ 2, 0, 22, 8, 2, 0, 23, 8, 54, 1, 15, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5, 7, 0,112, 5,
+242, 0, 24, 8,198, 0,165, 5, 0, 1, 92, 7, 2, 0, 14, 1, 2, 0,215, 7, 2, 0, 14, 2, 2, 0, 15, 2, 2, 0, 19, 0,
+ 2, 0,170, 5, 4, 0, 70, 0, 55, 1, 6, 0, 55, 1, 0, 0, 55, 1, 1, 0, 32, 0, 45, 0, 9, 0, 25, 8, 4, 0,220, 0,
+ 4, 0, 37, 0, 65, 0, 4, 0, 27, 0, 31, 0, 12, 0, 26, 8, 4, 0,136, 0, 7, 0, 27, 8, 56, 1, 25, 0, 56, 1, 0, 0,
+ 56, 1, 1, 0, 56, 1, 38, 0, 12, 0, 28, 8, 0, 0, 20, 0, 7, 0, 29, 8, 7, 0, 30, 8, 7, 0, 31, 8, 7, 0, 32, 8,
+ 4, 0, 19, 0, 7, 0, 33, 8, 7, 0, 34, 8, 7, 0, 35, 8, 7, 0, 21, 1, 7, 0,220, 1, 7, 0, 36, 8, 7, 0,116, 2,
+ 7, 0, 37, 8, 7, 0, 38, 8, 7, 0, 39, 8, 7, 0, 40, 8, 7, 0, 41, 8, 7, 0,177, 0, 2, 0,136, 0, 2, 0,249, 4,
+ 57, 1, 20, 0, 27, 0, 31, 0, 12, 0, 42, 8, 12, 0, 43, 8, 12, 0, 44, 8, 4, 0, 19, 0, 4, 0,119, 5, 2, 0,168, 2,
+ 2, 0,184, 5, 2, 0,136, 0, 2, 0, 45, 8, 2, 0, 46, 8, 2, 0, 47, 8, 2, 0, 48, 8, 2, 0, 49, 8, 4, 0, 50, 8,
+ 4, 0, 51, 8, 4, 0, 52, 8, 4, 0, 53, 8, 4, 0, 54, 8, 4, 0, 55, 8, 58, 1, 38, 0, 58, 1, 0, 0, 58, 1, 1, 0,
+ 26, 0, 56, 8, 12, 0, 67, 3, 0, 0, 20, 0, 2, 0, 19, 0, 2, 0, 57, 8, 2, 0, 58, 8, 2, 0, 59, 8, 2, 0, 26, 3,
+ 2, 0, 60, 8, 4, 0,253, 1, 4, 0, 52, 8, 4, 0, 53, 8, 56, 1, 61, 8, 58, 1, 38, 0, 58, 1, 62, 8, 12, 0, 63, 8,
+ 9, 0, 64, 8, 9, 0, 65, 8, 9, 0, 66, 8, 7, 0, 9, 1, 7, 0,177, 0, 7, 0, 67, 8, 7, 0,201, 1, 2, 0, 68, 8,
+ 2, 0, 37, 0, 7, 0, 69, 8, 7, 0, 70, 8, 7, 0, 22, 3, 7, 0, 71, 8, 7, 0, 72, 8, 7, 0, 73, 8, 7, 0, 74, 8,
+ 7, 0, 75, 8, 7, 0, 76, 8, 7, 0,250, 1, 32, 0, 77, 8,153, 0, 9, 0, 12, 0, 78, 8, 2, 0, 19, 0, 2, 0, 79, 8,
+ 7, 0, 26, 2, 7, 0, 80, 8, 7, 0, 81, 8, 12, 0, 82, 8, 4, 0, 83, 8, 4, 0, 37, 0, 59, 1, 7, 0, 59, 1, 0, 0,
+ 59, 1, 1, 0, 12, 0, 16, 8, 4, 0, 19, 0, 4, 0, 84, 8, 0, 0,131, 3,229, 0, 85, 8,152, 0, 7, 0, 27, 0, 31, 0,
+ 12, 0, 86, 8, 12, 0, 78, 8, 12, 0, 87, 8, 12, 0,104, 0, 4, 0, 19, 0, 4, 0, 88, 8,202, 0, 4, 0, 27, 0, 89, 8,
+ 12, 0, 78, 8, 4, 0, 90, 8, 4, 0, 19, 0, 60, 1, 17, 0,197, 0, 0, 0,197, 0, 1, 0, 12, 0,110, 5, 4, 0,111, 5,
+ 7, 0,112, 5, 2, 0,113, 5,198, 0,165, 5,152, 0, 9, 3,202, 0, 91, 8, 0, 0, 14, 1, 0, 0,168, 5, 2, 0, 19, 0,
+ 2, 0, 92, 8, 2, 0,169, 5, 2, 0,170, 5, 2, 0, 93, 8, 7, 0, 94, 8, 61, 1, 8, 0, 61, 1, 0, 0, 61, 1, 1, 0,
+ 59, 1, 95, 8, 36, 0, 80, 0, 12, 0, 12, 3, 4, 0, 19, 0, 0, 0, 20, 0, 4, 0, 96, 8, 62, 1, 5, 0, 62, 1, 0, 0,
+ 62, 1, 1, 0, 36, 0, 80, 0, 2, 0, 19, 0, 0, 0, 97, 8, 63, 1, 12, 0, 63, 1, 0, 0, 63, 1, 1, 0, 9, 0, 2, 0,
+ 2, 0, 17, 0, 2, 0, 19, 0, 0, 0, 98, 8, 0, 0, 99, 8, 0, 0, 97, 8, 7, 0,100, 8, 7, 0,101, 8, 4, 0, 37, 0,
+ 36, 0, 80, 0, 64, 1, 9, 0, 64, 1, 0, 0, 64, 1, 1, 0, 32, 0,102, 8, 0, 0,103, 8, 7, 0,104, 8, 2, 0,105, 8,
+ 2, 0, 19, 0, 2, 0, 17, 0, 2, 0, 37, 0, 65, 1, 7, 0, 43, 0,227, 5, 26, 0, 56, 8, 4, 0, 19, 0, 4, 0,106, 8,
+ 12, 0,107, 8, 32, 0,102, 8, 0, 0,103, 8, 66, 1, 12, 0, 32, 0,102, 8, 2, 0,108, 8, 2, 0, 19, 0, 2, 0,109, 8,
+ 2, 0,110, 8, 0, 0,103, 8, 32, 0,111, 8, 0, 0,112, 8, 7, 0,113, 8, 7, 0,220, 1, 7, 0,114, 8, 7, 0,115, 8,
+ 67, 1, 6, 0, 32, 0,102, 8, 4, 0,116, 8, 4, 0,117, 8, 4, 0, 94, 0, 4, 0, 37, 0, 0, 0,103, 8, 68, 1, 4, 0,
+ 32, 0,102, 8, 4, 0, 19, 0, 4, 0,116, 8, 0, 0,103, 8, 69, 1, 4, 0, 32, 0,102, 8, 4, 0, 19, 0, 4, 0,116, 8,
+ 0, 0,103, 8, 70, 1, 10, 0, 32, 0,102, 8, 4, 0,118, 8, 7, 0,130, 0, 4, 0, 19, 0, 2, 0,223, 5, 2, 0,119, 8,
+ 2, 0, 43, 0, 2, 0, 70, 0, 7, 0,120, 8, 0, 0,103, 8, 71, 1, 4, 0, 32, 0,102, 8, 4, 0, 19, 0, 4, 0,116, 8,
+ 0, 0,103, 8, 72, 1, 10, 0, 32, 0,102, 8, 2, 0, 17, 0, 2, 0,183, 3, 4, 0, 92, 0, 4, 0, 93, 0, 7, 0,233, 7,
+ 7, 0,234, 7, 4, 0, 37, 0,152, 0,208, 7, 0, 0,103, 8, 73, 1, 4, 0, 32, 0,102, 8, 4, 0, 27, 3, 4, 0,121, 8,
+ 0, 0,103, 8, 74, 1, 5, 0, 32, 0,102, 8, 7, 0,130, 0, 4, 0,122, 8, 4, 0, 27, 3, 4, 0, 28, 3, 75, 1, 6, 0,
+ 32, 0,102, 8, 4, 0,123, 8, 4, 0,124, 8, 7, 0,125, 8, 7, 0,126, 8, 0, 0,103, 8, 76, 1, 16, 0, 32, 0,102, 8,
+ 32, 0, 62, 8, 4, 0, 17, 0, 7, 0,127, 8, 7, 0,128, 8, 7, 0,129, 8, 7, 0,130, 8, 7, 0,131, 8, 7, 0,132, 8,
+ 7, 0,133, 8, 7, 0,134, 8, 7, 0,135, 8, 2, 0, 19, 0, 2, 0, 37, 0, 2, 0, 43, 0, 2, 0, 70, 0, 77, 1, 3, 0,
+ 32, 0,102, 8, 4, 0, 19, 0, 4, 0,123, 5, 78, 1, 5, 0, 32, 0,102, 8, 4, 0, 19, 0, 4, 0, 37, 0, 7, 0,136, 8,
+ 0, 0,103, 8, 79, 1, 10, 0, 32, 0,102, 8, 0, 0,103, 8, 2, 0,137, 8, 2, 0,138, 8, 0, 0,139, 8, 0, 0,140, 8,
+ 7, 0,141, 8, 7, 0,142, 8, 7, 0,143, 8, 7, 0,144, 8, 80, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0,
+ 7, 0, 12, 0, 7, 0,145, 8, 7, 0,146, 8, 2, 0, 19, 0, 2, 0,123, 5, 81, 1, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0,
+ 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,145, 8, 7, 0,146, 8, 2, 0, 19, 0, 2, 0,123, 5, 82, 1, 8, 0, 7, 0, 9, 0,
+ 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 12, 0, 7, 0,145, 8, 7, 0,146, 8, 2, 0, 19, 0, 2, 0,123, 5, 83, 1, 7, 0,
+ 32, 0,102, 8, 0, 0,103, 8, 7, 0, 21, 1, 7, 0, 31, 1, 2, 0, 19, 0, 2, 0, 14, 1, 4, 0, 37, 0, 84, 1, 5, 0,
+ 32, 0,226, 2, 7, 0, 21, 1, 2, 0,230, 2, 0, 0,232, 2, 0, 0,147, 8, 85, 1, 10, 0, 85, 1, 0, 0, 85, 1, 1, 0,
+ 2, 0, 17, 0, 2, 0, 19, 0, 0, 0,148, 8, 7, 0,222, 0, 7, 0,223, 0, 2, 0, 16, 8, 2, 0,149, 8, 32, 0, 45, 0,
+ 86, 1, 22, 0, 86, 1, 0, 0, 86, 1, 1, 0, 2, 0, 19, 0, 2, 0, 14, 1, 2, 0,150, 8, 2, 0,151, 8, 36, 0, 80, 0,
+152, 0,208, 7, 32, 0,169, 0, 7, 0, 92, 0, 7, 0, 93, 0, 7, 0,152, 8, 7, 0,153, 8, 7, 0,154, 8, 7, 0,155, 8,
+ 7, 0,157, 2, 7, 0,156, 8, 7, 0,210, 7, 7, 0,157, 8, 0, 0,158, 8, 0, 0,159, 8, 12, 0, 14, 3, 87, 1, 8, 0,
+ 7, 0,228, 1, 7, 0,233, 7, 7, 0,234, 7, 9, 0, 2, 0, 2, 0,160, 8, 2, 0,161, 8, 2, 0,162, 8, 2, 0,163, 8,
+ 88, 1, 18, 0, 88, 1, 0, 0, 88, 1, 1, 0, 88, 1,164, 8, 0, 0, 20, 0, 87, 1,165, 8, 2, 0, 17, 0, 2, 0, 19, 0,
+ 2, 0,166, 8, 2, 0,167, 8, 2, 0,168, 8, 2, 0,169, 8, 4, 0, 43, 0, 7, 0,170, 8, 7, 0,171, 8, 4, 0,172, 8,
+ 4, 0,173, 8, 88, 1,174, 8, 89, 1,175, 8, 90, 1, 33, 0, 90, 1, 0, 0, 90, 1, 1, 0, 90, 1,176, 8, 0, 0, 20, 0,
+ 0, 0,177, 8, 2, 0, 17, 0, 2, 0, 19, 0, 2, 0, 61, 7, 2, 0, 94, 7, 2, 0,178, 8, 2, 0,138, 0, 2, 0,167, 8,
+ 2, 0, 51, 7, 12, 0,203, 7, 12, 0,179, 8, 27, 0, 1, 6, 9, 0,180, 8, 7, 0,170, 8, 7, 0,171, 8, 7, 0,255, 1,
+ 7, 0,181, 8, 2, 0,182, 8, 2, 0,183, 8, 7, 0,184, 8, 7, 0,185, 8, 2, 0,186, 8, 2, 0,187, 8, 9, 0,188, 8,
+ 24, 0,189, 8, 24, 0,190, 8, 24, 0,191, 8, 91, 1,155, 0, 92, 1,192, 8, 89, 1, 8, 0, 89, 1, 0, 0, 89, 1, 1, 0,
+ 90, 1,193, 8, 90, 1,194, 8, 88, 1,195, 8, 88, 1,174, 8, 4, 0, 19, 0, 4, 0, 37, 0, 59, 0, 20, 0, 27, 0, 31, 0,
+ 39, 0, 75, 0, 12, 0,196, 8, 12, 0,197, 8, 87, 1,198, 8, 12, 0,199, 8, 4, 0, 17, 0, 4, 0,200, 8, 4, 0,201, 8,
+ 4, 0,202, 8, 12, 0,203, 8, 92, 1,204, 8, 88, 1,205, 8, 88, 1,206, 8, 9, 0,207, 8, 9, 0,208, 8, 4, 0,209, 8,
+ 9, 0,210, 8, 9, 0,211, 8, 9, 0,212, 8, 93, 1, 6, 0, 4, 0,129, 0, 4, 0,131, 0, 4, 0, 51, 7, 0, 0,213, 8,
+ 0, 0,214, 8, 2, 0, 37, 0, 94, 1, 16, 0, 2, 0, 6, 7, 2, 0, 7, 7, 2, 0,215, 8, 2, 0, 0, 8, 2, 0,216, 8,
+ 2, 0, 68, 0, 7, 0,156, 2, 7, 0,217, 8, 7, 0,218, 8, 2, 0, 35, 1, 0, 0,219, 8, 0, 0,232, 4, 2, 0,220, 8,
+ 2, 0, 37, 0, 4, 0,221, 8, 4, 0,222, 8, 95, 1, 9, 0, 7, 0,223, 8, 7, 0,224, 8, 7, 0, 14, 8, 7, 0,113, 0,
+ 7, 0,225, 8, 7, 0,190, 5, 2, 0,226, 8, 0, 0,227, 8, 0, 0, 37, 0, 96, 1, 4, 0, 7, 0,228, 8, 7, 0,229, 8,
+ 2, 0,226, 8, 2, 0, 37, 0, 97, 1, 3, 0, 7, 0,230, 8, 7, 0,231, 8, 7, 0, 15, 0, 98, 1, 7, 0, 0, 0,191, 1,
+ 2, 0,118, 4, 2, 0,119, 4, 2, 0,120, 4, 2, 0, 69, 4, 4, 0,131, 0, 4, 0,181, 3, 99, 1, 7, 0, 7, 0,232, 8,
+ 7, 0,233, 8, 7, 0,234, 8, 7, 0, 10, 2, 7, 0,235, 8, 7, 0,236, 8, 7, 0,237, 8,100, 1, 4, 0, 2, 0,238, 8,
+ 2, 0,239, 8, 2, 0,240, 8, 2, 0,241, 8,101, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,102, 1, 2, 0, 0, 0,171, 0,
+ 0, 0,242, 8,103, 1, 1, 0, 0, 0, 20, 0,104, 1, 10, 0, 0, 0,243, 8, 0, 0,244, 8, 0, 0,173, 5, 0, 0,245, 8,
+ 2, 0,215, 8, 2, 0,246, 8, 7, 0,247, 8, 7, 0,248, 8, 7, 0,249, 8, 7, 0,156, 8,105, 1, 2, 0, 9, 0,250, 8,
+ 9, 0,251, 8,106, 1, 11, 0, 0, 0,120, 4, 0, 0, 17, 0, 0, 0,226, 8, 0, 0,113, 0, 0, 0,252, 8, 0, 0,110, 0,
+ 0, 0,184, 0, 7, 0,253, 8, 7, 0,254, 8, 7, 0,255, 8, 7, 0, 0, 9,107, 1, 8, 0, 7, 0,171, 7, 7, 0,130, 0,
+ 7, 0,232, 4, 7, 0, 82, 2, 7, 0, 1, 9, 7, 0,209, 0, 7, 0, 2, 9, 4, 0, 17, 0,108, 1, 4, 0, 2, 0, 3, 9,
+ 2, 0, 4, 9, 2, 0, 5, 9, 2, 0, 37, 0,109, 1, 1, 0, 0, 0, 20, 0,110, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0,
+ 2, 0, 19, 0, 2, 0, 6, 9,111, 1, 10, 0, 2, 0,122, 3, 2, 0, 19, 0, 7, 0, 5, 4, 7, 0, 7, 9, 7, 0, 8, 9,
+ 7, 0, 9, 9, 7, 0, 10, 9,110, 1, 11, 9,110, 1, 12, 9,110, 1, 13, 9, 62, 0, 9, 0, 4, 0, 19, 0, 4, 0, 64, 0,
+ 24, 0, 14, 9, 24, 0, 15, 9,111, 1, 16, 9, 7, 0, 17, 9, 7, 0, 18, 9, 7, 0, 19, 9, 7, 0, 20, 9,112, 1, 4, 0,
+ 48, 0,150, 2, 7, 0, 21, 9, 7, 0, 94, 1, 7, 0, 37, 0,176, 0, 17, 0, 27, 0, 31, 0,112, 1, 22, 9, 62, 0, 11, 9,
+ 52, 0, 78, 1, 2, 0, 19, 0, 2, 0, 77, 5, 4, 0,110, 0, 7, 0, 23, 9, 7, 0, 7, 2, 7, 0, 24, 9, 7, 0, 25, 9,
+ 7, 0, 94, 1, 7, 0, 26, 9, 2, 0, 48, 1, 0, 0, 27, 9, 0, 0,115, 3, 0, 0, 96, 0,113, 1, 10, 0, 4, 0, 17, 0,
+ 4, 0,130, 0, 4, 0, 19, 0, 4, 0, 88, 3, 4, 0, 28, 9, 4, 0, 29, 9, 4, 0, 30, 9, 0, 0, 96, 0, 0, 0, 20, 0,
+ 9, 0, 2, 0, 89, 0, 6, 0,113, 1, 31, 9, 4, 0, 32, 9, 4, 0, 33, 9, 4, 0, 34, 9, 4, 0, 37, 0, 9, 0, 35, 9,
+114, 1, 5, 0, 7, 0, 77, 2, 7, 0,190, 2, 7, 0,220, 1, 2, 0, 36, 9, 2, 0, 37, 0,115, 1, 5, 0, 7, 0, 77, 2,
+ 7, 0, 37, 9, 7, 0, 38, 9, 7, 0, 39, 9, 7, 0,190, 2,116, 1, 7, 0, 4, 0, 40, 9, 4, 0, 41, 9, 4, 0, 42, 9,
+ 7, 0, 43, 9, 7, 0, 44, 9, 7, 0, 45, 9, 7, 0, 46, 9,117, 1, 8, 0,117, 1, 0, 0,117, 1, 1, 0, 32, 0, 45, 0,
+ 4, 0,213, 2, 2, 0, 19, 0, 2, 0, 57, 0, 7, 0,190, 2, 7, 0,179, 7,118, 1, 26, 0, 32, 0, 47, 9,115, 1, 84, 3,
+115, 1, 48, 9,114, 1, 49, 9,115, 1,160, 7, 7, 0, 50, 9, 7, 0, 51, 9, 7, 0, 52, 9, 7, 0, 53, 9, 7, 0, 44, 9,
+ 7, 0, 45, 9, 7, 0,190, 2, 7, 0,167, 2, 7, 0, 54, 9, 7, 0, 55, 9, 7, 0,110, 0, 7, 0, 56, 9, 4, 0, 40, 9,
+ 4, 0, 57, 9, 4, 0, 37, 0, 4, 0, 82, 0, 4, 0, 58, 9, 2, 0, 19, 0, 2, 0, 59, 9, 2, 0, 60, 9, 2, 0,118, 3,
+119, 1,117, 0, 27, 0, 31, 0, 39, 0, 75, 0, 4, 0, 19, 0, 2, 0, 17, 0, 2, 0,137, 8, 2, 0, 61, 9, 2, 0, 62, 9,
+ 2, 0, 68, 8, 2, 0, 63, 9, 2, 0, 64, 9, 2, 0, 65, 9, 2, 0, 66, 9, 2, 0, 67, 9, 2, 0, 68, 9, 2, 0, 69, 9,
+ 2, 0, 70, 9, 2, 0, 71, 9, 2, 0, 72, 9, 2, 0, 73, 9, 2, 0, 74, 9, 2, 0, 75, 9, 2, 0, 76, 9, 2, 0,211, 1,
+ 2, 0,153, 7, 2, 0,129, 7, 2, 0, 77, 9, 2, 0, 78, 9, 2, 0,116, 3, 2, 0,117, 3, 2, 0, 79, 9, 2, 0, 80, 9,
+ 2, 0, 81, 9, 2, 0, 82, 9, 2, 0, 83, 9, 2, 0, 84, 9, 7, 0, 85, 9, 7, 0, 86, 9, 7, 0, 87, 9, 2, 0, 88, 9,
+ 2, 0, 89, 9, 7, 0, 90, 9, 7, 0, 91, 9, 7, 0, 92, 9, 7, 0,135, 7, 7, 0, 93, 0, 7, 0,167, 2, 7, 0,141, 7,
+ 7, 0, 93, 9, 7, 0, 94, 9, 7, 0, 95, 9, 4, 0,136, 7, 4, 0,134, 7, 4, 0, 96, 9, 7, 0,137, 7, 7, 0,138, 7,
+ 7, 0,139, 7, 7, 0, 97, 9, 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, 7, 0,101, 9, 7, 0,102, 9, 7, 0,103, 9,
+ 7, 0,104, 9, 7, 0, 40, 3, 7, 0,110, 0, 7, 0,105, 9, 7, 0,106, 9, 7, 0,107, 9, 7, 0,108, 9, 7, 0,109, 9,
+ 7, 0,110, 9, 7, 0,111, 9, 4, 0,112, 9, 4, 0,113, 9, 7, 0,114, 9, 7, 0,115, 9, 7, 0,116, 9, 7, 0,117, 9,
+ 7, 0,118, 9, 7, 0, 57, 0, 7, 0,119, 9, 7, 0,120, 9, 7, 0,112, 3, 7, 0,110, 3, 7, 0,111, 3, 7, 0,121, 9,
+ 7, 0,122, 9, 7, 0,123, 9, 7, 0,124, 9, 7, 0,125, 9, 7, 0,126, 9, 7, 0,127, 9, 7, 0,128, 9, 7, 0,129, 9,
+ 7, 0,130, 9, 7, 0,131, 9, 7, 0,132, 9, 7, 0,133, 9, 4, 0,134, 9, 4, 0,135, 9, 7, 0, 47, 3, 7, 0,136, 9,
+ 7, 0,137, 9, 7, 0,138, 9, 7, 0,139, 9, 7, 0,140, 9, 7, 0,141, 9, 7, 0,142, 9, 0, 0,143, 9, 65, 0, 73, 3,
+ 65, 0,144, 9, 32, 0,145, 9, 32, 0,146, 9, 36, 0, 80, 0,155, 0, 71, 3,155, 0,147, 9,142, 0, 39, 0,142, 0, 0, 0,
+142, 0, 1, 0,119, 1,148, 9,118, 1,163, 3,116, 1, 62, 8,120, 1,149, 9, 9, 0,150, 9,121, 1,151, 9,121, 1,152, 9,
+ 12, 0,153, 9, 12, 0,154, 9,156, 0, 72, 3, 32, 0,155, 9, 32, 0,156, 9, 32, 0, 38, 0, 12, 0,157, 9, 12, 0,158, 9,
+ 12, 0,159, 9, 7, 0,213, 0, 7, 0, 92, 4, 4, 0,118, 2, 4, 0, 19, 0, 4, 0,136, 7, 4, 0,160, 9, 4, 0,161, 9,
+ 4, 0,162, 9, 4, 0, 57, 0, 2, 0,220, 0, 2, 0,163, 9, 2, 0,164, 9, 2, 0, 65, 3, 2, 0,165, 9, 2, 0,118, 3,
+ 0, 0,166, 9, 2, 0,167, 9, 2, 0,168, 9, 2, 0,169, 9, 9, 0,170, 9,131, 0,202, 3,129, 0, 34, 0,122, 1,171, 9,
+ 7, 0,174, 3, 7, 0,172, 9, 7, 0,173, 9, 7, 0, 8, 4, 7, 0,174, 9, 7, 0, 50, 3, 7, 0, 40, 3, 7, 0,175, 9,
+ 7, 0, 9, 2, 7, 0,176, 9, 7, 0,177, 9, 7, 0,178, 9, 7, 0,179, 9, 7, 0,180, 9, 7, 0,181, 9, 7, 0,175, 3,
+ 7, 0,182, 9, 7, 0,183, 9, 7, 0,184, 9, 7, 0,176, 3, 7, 0,172, 3, 7, 0,173, 3, 4, 0,185, 9, 4, 0, 94, 0,
+ 4, 0,186, 9, 4, 0,187, 9, 2, 0,188, 9, 2, 0,189, 9, 2, 0,190, 9, 2, 0,191, 9, 2, 0,192, 9, 2, 0, 37, 0,
+ 4, 0, 70, 0,130, 0, 8, 0,122, 1,193, 9, 7, 0,194, 9, 7, 0,195, 9, 7, 0,165, 1, 7, 0,196, 9, 4, 0, 94, 0,
+ 2, 0,197, 9, 2, 0,198, 9,123, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,199, 9,124, 1, 6, 0,
+124, 1, 0, 0,124, 1, 1, 0,123, 1,200, 9, 4, 0,201, 9, 2, 0,202, 9, 2, 0, 19, 0,125, 1, 5, 0,125, 1, 0, 0,
+125, 1, 1, 0, 12, 0,203, 9, 4, 0,204, 9, 4, 0, 19, 0,126, 1, 9, 0,126, 1, 0, 0,126, 1, 1, 0, 12, 0,129, 0,
+125, 1,205, 9, 4, 0, 19, 0, 2, 0,202, 9, 2, 0,206, 9, 7, 0, 95, 0, 0, 0,207, 9,190, 0, 6, 0, 27, 0, 31, 0,
+ 12, 0,134, 4, 4, 0, 19, 0, 2, 0,208, 9, 2, 0,209, 9, 9, 0,210, 9,127, 1, 13, 0, 27, 0, 31, 0,128, 1,211, 9,
+128, 1,212, 9, 12, 0,213, 9, 4, 0,214, 9, 2, 0,215, 9, 2, 0, 37, 0, 12, 0,216, 9, 12, 0,217, 9, 12, 0,218, 9,
+ 12, 0,219, 9, 12, 0,220, 9, 12, 0,221, 9,128, 1, 30, 0,128, 1, 0, 0,128, 1, 1, 0, 9, 0,222, 9, 4, 0,241, 6,
+ 4, 0, 37, 0,200, 0,164, 5,200, 0,223, 9, 0, 0,224, 9, 2, 0,225, 9, 2, 0,226, 9, 2, 0, 6, 7, 2, 0, 7, 7,
+ 2, 0,227, 9, 2, 0,228, 9, 2, 0, 88, 3, 2, 0, 23, 7, 2, 0,229, 9, 2, 0,230, 9, 4, 0,161, 1,129, 1,231, 9,
+130, 1,232, 9,131, 1,233, 9, 4, 0,234, 9, 4, 0,235, 9, 9, 0,236, 9, 12, 0,237, 9, 12, 0,217, 9, 12, 0, 25, 7,
+ 12, 0,238, 9, 12, 0,239, 9,132, 1, 12, 0,132, 1, 0, 0,132, 1, 1, 0, 0, 0,240, 9,133, 1,241, 9, 2, 0, 17, 0,
+ 2, 0, 15, 0, 2, 0,242, 9, 2, 0,243, 9, 2, 0,244, 9, 2, 0,245, 9, 2, 0,246, 9, 2, 0, 37, 0,134, 1, 6, 0,
+134, 1, 0, 0,134, 1, 1, 0, 12, 0,247, 9, 0, 0,248, 9, 4, 0,249, 9, 4, 0,250, 9,208, 0, 8, 0,208, 0, 0, 0,
+208, 0, 1, 0, 0, 0,240, 9, 26, 0, 30, 0,135, 1, 0, 7, 9, 0,251, 9,133, 1,241, 9,136, 1,252, 9,129, 1, 23, 0,
+129, 1, 0, 0,129, 1, 1, 0, 2, 0, 17, 0, 2, 0, 15, 0, 2, 0, 5, 0, 2, 0, 6, 0, 2, 0,253, 9, 2, 0,254, 9,
+ 2, 0,255, 9, 2, 0, 0, 10, 0, 0, 1, 10, 0, 0, 37, 0, 2, 0,242, 9, 2, 0,243, 9, 2, 0,244, 9, 2, 0,245, 9,
+ 2, 0,246, 9, 2, 0, 43, 0, 0, 0, 2, 10, 2, 0, 3, 10, 2, 0, 4, 10, 4, 0, 70, 0, 9, 0,251, 9,137, 1, 8, 0,
+137, 1, 0, 0,137, 1, 1, 0, 9, 0, 2, 0, 9, 0, 5, 10, 0, 0,131, 3, 2, 0, 17, 0, 2, 0, 19, 0, 7, 0, 6, 10,
+138, 1, 5, 0, 7, 0, 7, 10, 4, 0, 8, 10, 4, 0, 9, 10, 4, 0, 14, 1, 4, 0, 19, 0,139, 1, 6, 0, 7, 0, 10, 10,
+ 7, 0, 11, 10, 7, 0, 12, 10, 7, 0, 13, 10, 4, 0, 17, 0, 4, 0, 19, 0,140, 1, 5, 0, 7, 0,233, 7, 7, 0,234, 7,
+ 7, 0,190, 2, 2, 0,224, 1, 2, 0,225, 1,141, 1, 5, 0,140, 1, 2, 0, 4, 0, 54, 0, 7, 0, 14, 10, 7, 0,233, 7,
+ 7, 0,234, 7,142, 1, 4, 0, 2, 0, 15, 10, 2, 0, 16, 10, 2, 0, 17, 10, 2, 0, 18, 10,143, 1, 2, 0, 43, 0,254, 5,
+ 26, 0, 56, 8,144, 1, 3, 0, 24, 0, 19, 10, 4, 0, 19, 0, 4, 0, 37, 0,145, 1, 6, 0, 7, 0,110, 0, 7, 0,142, 2,
+ 7, 0, 20, 10, 7, 0, 37, 0, 2, 0,219, 0, 2, 0, 21, 10,146, 1, 7, 0,146, 1, 0, 0,146, 1, 1, 0, 27, 0, 1, 6,
+ 0, 0, 22, 10, 4, 0, 23, 10, 4, 0, 94, 0, 0, 0,131, 3,147, 1, 6, 0, 12, 0,107, 8, 0, 0, 24, 10, 7, 0, 61, 0,
+ 7, 0, 6, 10, 4, 0, 17, 0, 4, 0, 19, 0,148, 1, 3, 0, 7, 0, 25, 10, 4, 0, 19, 0, 4, 0, 37, 0,149, 1, 15, 0,
+149, 1, 0, 0,149, 1, 1, 0, 59, 1, 95, 8,147, 1, 62, 0, 12, 0, 14, 3, 35, 0, 50, 0,148, 1, 26, 10, 4, 0, 54, 0,
+ 7, 0, 61, 0, 2, 0, 19, 0, 2, 0,255, 0, 4, 0, 23, 10, 0, 0, 22, 10, 4, 0, 27, 10, 7, 0, 28, 10,150, 1, 2, 0,
+ 0, 0, 29, 10, 0, 0, 30, 10,151, 1, 4, 0,151, 1, 0, 0,151, 1, 1, 0,152, 0,226, 2, 12, 0, 31, 10,152, 1, 22, 0,
+152, 1, 0, 0,152, 1, 1, 0, 12, 0, 32, 10,152, 0,208, 7,151, 1, 33, 10, 12, 0, 34, 10, 12, 0, 14, 3, 0, 0,131, 3,
+ 7, 0, 6, 10, 7, 0, 35, 10, 7, 0, 92, 0, 7, 0, 93, 0, 7, 0,152, 8, 7, 0,153, 8, 7, 0,157, 2, 7, 0,156, 8,
+ 7, 0,210, 7, 7, 0,157, 8, 2, 0, 36, 10, 2, 0, 37, 10, 2, 0, 19, 0, 2, 0, 17, 0,153, 1, 6, 0,153, 1, 0, 0,
+153, 1, 1, 0, 12, 0, 32, 10, 4, 0, 19, 0, 4, 0, 81, 2, 0, 0,131, 3,154, 1, 10, 0,154, 1, 0, 0,154, 1, 1, 0,
+ 27, 0, 1, 6, 0, 0, 38, 10, 4, 0, 39, 10, 4, 0, 40, 10, 0, 0, 22, 10, 4, 0, 23, 10, 2, 0, 19, 0, 2, 0, 41, 10,
+155, 1, 6, 0,155, 1, 0, 0,155, 1, 1, 0, 12, 0, 42, 10, 0, 0,131, 3, 4, 0, 19, 0, 4, 0, 43, 10,156, 1, 5, 0,
+156, 1, 0, 0,156, 1, 1, 0, 0, 0, 22, 10, 4, 0, 23, 10, 7, 0,134, 2, 39, 0, 9, 0,152, 0, 9, 3,152, 0, 44, 10,
+151, 1, 33, 10, 12, 0, 45, 10,152, 1, 46, 10, 12, 0, 47, 10, 12, 0, 48, 10, 4, 0, 19, 0, 4, 0,220, 0,157, 1, 2, 0,
+ 27, 0, 31, 0, 39, 0, 75, 0, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0};
diff --git a/source/blender/editors/datafiles/Bfont.c b/source/blender/editors/datafiles/Bfont.c
index 4080a0d369f..cd45debcbe4 100644
--- a/source/blender/editors/datafiles/Bfont.c
+++ b/source/blender/editors/datafiles/Bfont.c
@@ -1,6 +1,6 @@
/* DataToC output of file <Bfont> */
/*
- * $Id: Bfont.c 125 2002-11-25 12:02:15Z mein $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/datafiles/Makefile b/source/blender/editors/datafiles/Makefile
index 4162125623e..d7bb4e7222f 100644
--- a/source/blender/editors/datafiles/Makefile
+++ b/source/blender/editors/datafiles/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c
index fa000034caf..d2668d21e52 100644
--- a/source/blender/editors/datafiles/blenderbuttons.c
+++ b/source/blender/editors/datafiles/blenderbuttons.c
@@ -1,5538 +1,5501 @@
/* DataToC output of file <blenderbuttons> */
-int datatoc_blenderbuttons_size= 177005;
+int datatoc_blenderbuttons_size= 175808;
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, 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,168,136, 73, 68, 65, 84,120,218,236,157,119,120, 20,197, 31,198,223,217,221,235,119,233, 36, 33,133, 22, 58,132,150, 4,
-148, 94,165, 73, 17, 4, 5, 4, 21, 27,168,232, 15, 21, 1, 11, 2, 42, 96, 65,138, 10, 40, 22, 20, 4, 20,149,166, 72,147,222,
- 9, 82, 66,111,129, 52, 66, 18,210,175,223,238,252,254,200,221,121, 57, 46,185, 11,132,234,124,158,231,158, 43,187,251,222,236,
-238,204,236,187,223, 41, 75, 40,165, 96, 48, 24, 12, 6,131,193, 96, 84, 30, 28, 59, 4, 12, 6,131,193, 96, 48, 24,247,144,193,
- 34,132, 52, 97,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,100, 6,203,251, 65,165,183,224, 68, 81,251,171,227,221,174,121,
- 11,247,157, 86,162,102, 71,187,230,228,123, 36,157, 29,239, 86, 77,199,254, 86,166,174,235, 49,172,172,227,233,146, 78, 90,217,
-233,188, 85,154,149, 93, 46, 43, 51,143,122, 56,239,147,239,145,116,118,188,219, 52,221,243, 79,101,232,122,202,147, 55,123, 60,
- 61,164,147, 86,118, 58,111,149,102,101, 95, 47, 43, 43,143,150,115,238, 43,237,218,116, 55, 35,220,105,131, 1, 0,148, 82,226,
-162, 79,238, 86, 77,215,227,224,208,175,204,180, 86, 34, 91, 43, 91,211,237,120, 86, 22,147, 41,165,132, 16,178, 13, 64,199,202,
-220,247,202, 56,239,110,251, 90, 41,186,183,210, 92, 85,102,190,191,213,154,149, 85,150,220, 53, 43, 35,223,123, 58,239,183,240,
- 28, 85, 86, 58, 43,165, 44,221,138, 60,239, 33,255,220,180,174,187,102,101,148, 37,119,205,202,200,247,183, 67,179, 50,202,146,
- 39,205,202,200,247,101,157,123, 22,193,186, 61, 70,192,189, 96,119,186,155,141,208, 45,142, 98,117,188, 23, 52, 43,249, 28, 77,
-182,107, 86,230,221, 76,167,202, 58, 71,238,121,167, 50,238,186, 92, 53, 43, 43,111,122, 72,231, 77,159, 39, 79,154, 55,155,222,
- 50,210, 89,233,251,126,179,249,254,118,105, 86,242, 57,170,148,178,228,166,217,169,146,111, 2, 58, 85,102, 89,114,213,172,172,
-178,228, 33,157, 55,125,158, 60,105,222,108,122,203, 72,103,165,239,123, 37, 70, 68, 43, 93,247,190,139, 96,221, 74,115,117, 43,
-204,155,227, 46,169,178, 47,100,149,105,178,110, 85,164,173,178,162, 56, 30,116,183, 85,162,220,214,202, 78,167, 61,125,228, 86,
- 24, 97, 74,233,100, 66,200,123,119,115,129,102,101,137,149,165,187,173, 44,121,202, 55, 55, 91,150,110,213,205,179,171,102,101,
- 25, 33, 15,251,126, 83,101,201,125,219,202, 40, 75, 94, 52,201,173,216,255,202, 46, 79,119, 35,119,205, 40,194, 91,208,191,135,
-222,138,168,216, 45,220,239,202, 76,103,167,123, 97,223,111, 69, 58, 9, 33,147,111,209,190,223, 43,199,148,149, 37, 86,150,238,
-186,178,228,150, 39, 59, 85, 86,100,168,178,111,164,220, 53, 43,179, 31, 82,101,230,209, 91,189,239,149, 89,150,110,197,185,191,
- 87,168,112, 4,235, 86,221, 29,223, 11,154,183, 66,251, 22,237,251,182, 91,113,119,112, 11,250,117, 85,122, 58, 41,165,147, 81,
-137, 77,142,142,125,174,204,180,222,202,102,194, 91,145, 55,111,101,126,175,204,126, 30,183,104,223,239,149,243, 94,233,233,172,
-172,178,228,225,156,223,116, 90, 61, 29,191,202,110,194,174,204,188,121, 43, 53, 43, 67,251, 86,164,243, 86,157,251,123, 9,194,
- 38, 26,101, 48, 24, 12, 6,131,193,168, 92,202,140, 96,197,197,197,173, 85,169, 84,117,202, 90,174,215,235, 51, 14, 31, 62,220,
-153, 29, 66, 6,131,225,245, 78,142, 16, 14,255,118, 73,144, 74,110,102,217,221, 29,131,193,248, 15, 26, 44,185, 92, 30,179,125,
-251,246,122,146, 36,193,102,179, 65, 20, 69,136,162, 8,155,205, 6,179,217,140, 71, 31,125,180,194,205,139,205,155, 55,223,206,
-113, 92,205,138,108, 35,138,226,229, 35, 71,142,180, 43,107,121,120,120,248,110, 0, 49,132, 16,215,202, 28,142,239,174,191,115,
-156,179,203, 89,122, 74, 74, 74, 92,121,154,132,144, 24, 87, 61,119, 45, 15,186,229,106, 54,104,208,224,160, 32, 8,209,158,182,
- 47, 75, 91,146,164, 11,199,142, 29,107,195,178,233,237,161,121,243,230,219,121,158,175,112,254, 60,124,248,112,153,249,179, 73,
-147, 38,255,112, 28, 23,233,233, 28,151,145,159,120, 81, 20, 79, 31, 57,114,164, 93, 89, 6, 36, 34, 34, 98, 55,165, 52,198,199,
-124,233, 32, 53, 37, 37, 37,193, 91, 57, 42, 47,157, 30,180,203,213,116, 53, 87, 81, 81, 81, 51, 66, 67, 67, 71,235,245,122, 35,
- 0,202,113, 28,109,212,168, 81, 41,125, 81, 20,179, 78,158, 60,201, 38, 47,100, 48, 24,247,183,193,146, 36,137, 51,153, 76, 56,
-115,230, 12, 60,213,243, 28,199,137, 21,253, 51, 74,105,189,205, 75, 23,135,169, 67,195, 33, 90,204, 80, 86, 9,115,106,231,157,
- 56, 6,209, 98,129,100,181,160, 74,194,131,142, 52,160, 83,167, 78,188, 23,217,232,177, 99,199,134,249,249,249,193,104, 52,194,
-104, 52,194,100, 50,193,100, 50,193,108, 54,195,108, 54,195, 98,177,192, 98,177,192,106,181,194,100, 50,225,216,177, 99,162,151,
- 11, 66,244, 43,175,188,226,212, 52,153, 76, 48, 26,141, 78, 45,147,201,228,212, 52,155,205, 48,153, 76, 56,126,252,120,185,154,
-130, 32, 68, 31, 58,116, 40, 76, 46,151,131, 82, 10, 73,146, 64, 41, 45,245,114, 59, 86,104,219,182,173,133,101,209,219, 74,189,
-149, 31,125, 24,166, 12,169, 2,201,106, 69, 72,243,120,231,185, 72,219,252, 23, 36,171, 21,146,213,138, 26,125, 7, 58,127,239,
-216,177,163,183,252, 89,227,215, 73, 19, 3,229,126,126,176, 25,141,168,213,103,128,115, 65,210,252, 89,160, 86, 43,168,205,130,
-166,175,189, 3, 0,200,206,206, 54, 52,108,216, 48, 29, 37,253, 20,202,138,240, 68, 95,188,120, 49,204,145, 6,119,163,206,113,
- 92,169,215,206,157, 59, 49,124,248,112,111,251, 30,253,246,219,111,135, 57,202,136,107, 94,183, 90,173,206,242, 99,179,217, 96,
-181, 90, 97, 54,155,241,207, 63,255,248, 20,185,138,136,136,248,168,125,251,246, 35,151, 44, 89,162,253,253,247,223,181,181,106,
-213,130, 92, 46, 7,207,243,224,121, 30, 28,199,129,231,121,244,239,223,159,176, 44,200, 96, 48,238,123,131,101,177, 88, 46,118,
-239,222,157, 2,128,217,108,142, 82, 40, 20,114, 55, 3, 22,217,182,109,219,211,238,219,121,107, 58, 84,135,134,227,187, 90,193,
- 0,128,193,231,115,156, 23,133, 21, 29, 90, 56,215, 25,122, 41,191,100, 93,181, 26, 28,199, 17, 47, 21, 56,116, 58, 29,186,119,
-239, 14,133, 66,129,248,248,120,200,229,114,200,100,178, 50, 95,190,160,213,106, 49,101,202, 20,135, 57,130, 86,165,196,139,237,
- 31,132,138, 80,124,119,228, 20, 76,162, 4, 65, 16, 32, 8, 2,100, 50,217,117, 17, 41, 79,200,229,114, 28, 59,118, 12, 60,207,
- 67, 16,132, 82,239, 60,207, 99,205,154, 53, 24, 52,104, 16,120,158,135, 70,163, 1,254, 67,157, 1,239, 22,148, 33, 85,240,107,
-199,146, 64,228, 19, 41,133,206,223,255, 26,210,215,249,121, 68, 90, 49, 8, 33,144,203,229,190,157,119, 63, 63,252, 57,168, 23,
- 0, 96,224,153,171,206, 60,115,116,214,135,144, 41, 20, 16,100,114, 52, 25,251, 54,178,179,179, 13, 3, 7, 14,220,169, 82,169,
-214,251,112,179,130,203,151, 47, 59,181,100, 50,217,117,249,158,227, 56,124,255,253,247,184,116,233,146, 79,251,110, 48, 24, 48,
-109,218, 52,231,190,121,210,117,253,236,109,223, 9, 33, 92,213,170, 85, 63,104,223,190,253,240, 37, 75,150, 4, 17, 66, 48,111,
-222, 60, 8,130,128,135, 31,126, 24, 33, 33, 33,216,176, 97, 3,228,114, 57,198,141, 27,199, 50, 31,131,193,248,111, 24,172,195,
-135, 15,247,114,124,126,240,193, 7, 79,238,220,185,179,129, 75, 40, 31, 54,155, 77,110,179,217,234, 57,154, 13,109, 54, 27, 76,
- 38, 19,134, 14, 29, 90,238, 29,189,104, 49, 95,103,144,202, 50, 78,190, 98, 54,155, 49,120,240, 96,167,137, 41,207, 92,249,120,
- 97,128,201,100,130, 32, 8,168, 93, 61, 20,239, 12, 78, 64, 91,158,194,144, 3, 32,187, 24, 79, 69, 8, 56, 28, 93, 15,159, 95,
-206,193,165,130, 34, 8,130,111,173,165,146, 36,149, 50, 84,238,159, 23, 44, 88,128, 33, 67,134,128,231,249,235,154,144, 24,183,
- 7,201,106,245,154, 15, 43,122,110,108, 70, 35, 0,128,119, 49,228, 50,153, 12, 10,149, 10,188, 76, 6, 65, 33, 71,118,118,182,
-225,161,135, 30,218,171, 86,171,127,168, 90,181,106, 90,106,106,106,185,249,147, 82, 10,153, 76, 6, 65, 16,202,204,243,223,127,
-255, 61, 22, 47, 94,140, 86,173, 90,249,148,231,205,102, 51,228,114, 57, 62,252,240,195,235,150,207,159, 63,255, 58,131,229, 69,
-143, 0,224,194,195,195, 95, 92,186,116,169,191,227,255, 67, 66, 66, 32,147,201, 16, 27, 27, 11, 63, 63, 63,236,220,185, 19,162,
- 40,250,108, 86, 25, 12,198,127, 22, 25,128,230, 0, 66, 1,136, 0, 10, 1, 4,186, 44,207,178,191,135,186,124, 63,224, 65,167,
-165,125, 29,199,114,199,119, 51, 0,133,135,223,115, 0,168,237, 47, 19,128,221, 0, 98, 93,254,199,177, 29,220,255, 87,176, 87,
-134, 29, 1,108, 5,208,201,211,228,119,142,230,194, 83,167, 78,193, 91,191, 84,111,195, 59,149, 85,194,156,145,171, 95,106,135,
- 56,127, 31,146,156,231,172, 96,255,108, 85, 23, 74,157, 22, 9,147, 63,241,122,196, 29, 23,134,171, 87,175, 94,119,231,125,163,
- 6, 11, 0,172, 86, 43,212,106, 37,182,124,213, 1, 25, 23,108,248,112,109, 10, 86,237,191, 8, 65, 16,208,167, 65, 93, 60,106,
- 3,102, 4,171,240,130, 77,132, 69,162, 62, 93,192, 40,165,215,153, 43, 87,147, 69, 8,113,254,198, 46, 54,119,134,144,230,241,
-206,200,213,146,106,126,215, 69,173, 0, 96, 85,139,154, 80,249,233, 16,251,234, 4,159,242,103,173, 62, 3,156,145,171, 63,226,
- 99, 32,200,229,144, 41, 21,120,244, 72, 10,128,146,102,193, 46, 77, 27,109,203,227, 21,139,158,124,242,201, 11,155, 55,111,214,
-248,146, 86,185, 92, 94,202,176,121, 50, 87,130, 32,192,234,102, 26,203,187,169, 40,203, 56, 57,202, 85, 69, 34, 88, 0,160,215,
-235,205,171, 86,173,194,231,159,127,142,144,144, 16,116,239,222, 29, 85,171, 86,197,138, 21, 43, 64, 41,197,203, 47,191, 12,181,
- 90, 13,181, 90,205,242, 60,131,241, 31,199,139, 23,233, 48,113,226,196,132, 25, 51,102, 76,107,221,186,245,178,221,187,119, 47,
- 37,132,172,117,241, 30,125,236, 26,107, 93,190,183,116, 51, 89, 50, 0,161,132,144,181,142,245, 93,191,187,252,222, 13,128,194,
-241,125,226,196,137,177, 51,102,204,152, 54, 97,194,132,183,166, 79,159, 46,159, 56,113, 98,211, 25, 51,102, 76,115,252,143,167,
-116,184, 70,176,202,157, 5,216, 98,177, 92,236,214,173,155, 79, 35,126, 12, 6,195, 21, 47, 6,204, 99,100,192, 53, 42,160,244,
-211, 65,237,231, 7,194,249, 86,225, 90,173, 86, 8,130, 0,142,227,176,113,227, 70,168,213,106,244,238,221,251,134,155, 8, 29,
-166, 77,161,144, 67, 8,228,240,228,103, 7,145,149,171,119, 54, 9,110, 74, 78,193,126,181, 26,239, 52,106, 10, 93, 81, 50, 10,
- 76,230,155,138, 96, 13, 25, 50, 4, 70,163, 17, 28,199, 57,127,227, 56, 14,255,165,103, 54,221,133, 5,221,227,119, 66, 8, 84,
-254,126, 80,233,116,224, 5,222, 39, 45, 74,233,191, 70, 72,161,128, 76,169,128, 32,151, 59,205,213, 67, 15, 61,180, 55,143, 87,
- 44, 74, 75, 75,219, 11, 64,229,171,193,114, 68,176,202, 51, 87,130, 32,192, 98,177,248,100, 94, 76, 38, 19,228,242,127,123, 2,
- 92,190,124,185, 92,131,229,101,159, 41, 33, 68, 34,132, 72, 49, 49, 49,206,109,194,195,195, 17, 24, 24, 8, 73,146, 32, 73, 18,
- 84, 42, 21,212,106,117,169,255,101, 48, 24,255, 89,202,243, 34,202, 25, 51,102, 76,115, 53, 48,238,134,198,213, 56,185,153, 40,
- 87,147, 22,235,165,238, 95,235,110,154, 28,255, 75, 8, 89, 59,125,250,244, 62, 94,210,145,229,110,176,202,157,102,223,181,185,
-176,178, 46, 94,229, 93,192,212, 1,254, 80,104,181,176,119,191,162,222,180, 44, 22,139,179,207,201,232,209,163,203,188,171,119,
-237,155,226, 13,179,217, 12,158,227, 1,101, 45, 72,216,231,188, 88, 57, 95,114, 57,146,171, 55, 3,185,146, 6, 65,240,173,191,
-191, 35,130,229, 48, 81, 47,191,252, 50, 22, 46, 92,232,236,152, 12, 0, 60,207,163,126,253,250, 56,127,254, 60, 43,106,119, 0,
- 74,169,215,102,107,149,191, 31,148, 58, 29,120, 31, 34,141,142,229,206, 62, 76, 42, 37,120,185, 28,130,188,164, 89,176, 95,191,
-126,219,242,242,242, 22, 53,110,220,248, 44, 74,166, 49, 32,190,150, 31, 79,249,124,209,162, 69,165,204, 85, 69, 34, 88,142,114,
-228,138,167,230,194,129, 3, 7,250, 26,193,162,132, 16, 42,147,201,208,173, 91, 55, 52,109,218, 20,171, 86,173,130, 36, 73,120,
-233,165,151,160, 86,171, 49,123,246,108,216,108, 54,204,152, 49,131, 69,176, 24, 12, 70,121, 94,196, 48, 97,194,132,183, 8, 33,
-107,237,145,164,164,114,140,148, 39, 90,186,153,180,172, 50,174, 1,125, 60,153, 44,215,207, 14, 38, 78,156, 24,235, 33, 29, 7,
-174, 51, 88, 46,174,241,150,146,119,226,152,179, 67,187,163, 89,144, 16,130,191,218, 52,128, 66,167,133, 74,167, 67,187,149, 59,
-156,119,205,248, 96,166, 79, 17, 44,135,113,202,201,201,241,218, 68,232,107, 84,140,151,203,176, 87, 39, 3,149,241,165, 46, 88,
- 50,153, 12,156, 32, 67,114,104, 61, 16, 97, 3, 4,209,230,211,197,193, 17,201,112, 29, 61,245,228,147, 79,130,227, 56,167,201,
-106,209,162, 69,169,188,198,138,219,237, 37,253,239,245, 88,247,120, 73, 89,117,109, 22, 92,219,170, 14,148,126, 58, 40,181, 90,
-116, 92,179,219,217,156,139,217, 95,123,213, 60,245,237,151, 72,154, 51, 29,130, 76,134, 1,135,146,157,145,171,182, 13,234,238,
- 53,107,253, 23, 93,190,124,121, 47, 0,238,241,199, 31, 15,140,139,139,227,125,172,132, 74,117, 60, 23, 4,193,163,185, 18, 4,
- 1, 54,155,205,167,125,183, 88, 44, 62, 69,146, 28, 81, 44, 31,242, 59,109,216,176, 33,120,158, 71, 64, 64, 0,252,252,252,156,
- 35,104, 29,145, 43, 71,255, 77, 95,203, 37,131,193,184,239,111,114,203,242, 34,166,233,211,167, 39, 77,159, 62,221, 25, 73,114,
-143, 96,149,193,195,118, 51, 21,234, 48,103, 40,233, 75,117,160,156, 52,244, 41,203,120,185,254, 54, 99,198,140,105, 30,210,225,
-108,150,244,216, 59,187,121,243,230,235, 52, 26, 77, 45, 95, 15, 72, 69, 38, 29, 21, 45,150,235,238,196, 9, 33, 80,233,116, 80,
-248,233,160,212,233,202,140,114,149,117,161,113, 52, 17,242, 60,239,188,232,252,240,195, 15,208,233,116,120,250,233,167,111,168,
-147,123,137,193,226,177, 90,126, 6,144, 11,215, 93,180,120,153, 12,151, 3,170,129,147,201, 32,136,190, 69, 8,242,243,243,193,
-243, 60,222,123,239, 61,204,152, 49,195, 57,140,222,117,104,189,107,212,131,113,251,113,237,228, 94, 42,170,234,231,231,204,159,
-174,191,123,235,147, 72, 8, 1, 68, 91,201,104, 65,165,194,105,174,250,245,235,183,205,172,245, 95,212,160, 65, 3, 71,228,138,
-211,104, 52, 94, 71,205,186,150, 13,135,209,113, 55, 87,142, 40,169,227,179,213,106,245, 41,207, 59, 12,214,194,133, 11,203,189,
- 25,113,252,175,175,249,148,227, 56,108,223,190, 29,135, 14, 29,194,232,209,163,161, 86,171, 49,119,238, 92,216,108, 54, 76,157,
- 58, 21,106,181, 26, 10,133,130,101, 62, 6,131, 81, 30, 65, 14,131, 99, 55, 73,165, 34, 75,148,210, 62,174, 38,168,172,166, 66,
-123,196,105,187,151,255,250,195,110,204, 60,226,136,164,185,213,161,107,221,205,153,224,112,140,174,239, 10,133,162,214,174, 93,
-187,234, 73,146, 4, 81, 20, 81,222,187,217,108,198, 99,143, 61,230,243,164,163,146,181,196, 96,113,110, 35,229,148,254,126, 80,
-232,254,189,128,185, 92,196,188,214,226,142, 8,150,171,193,122,239,189,247, 32, 8, 2, 22, 46, 92, 8, 0,120,227,141, 55, 42,
- 28,193,162, 18,176, 91,220,138,200,121,205, 64, 23,169,144,185,253, 36,100, 50, 25,170,182,122, 8, 82,194,163,200, 81,248, 67,
-107,239, 87,229, 75,179, 99, 78, 78, 14, 46, 93,186, 4, 66, 8, 94,123,237,181,114,205,213,198,141, 27, 89, 31,172, 59,104,176,
- 56,158, 47,117, 62, 92,243,167,155,249,242,222, 78,102,179, 65,166, 84,150, 26, 45,152,151,151,183,232,242,229,203,251, 0,144,
-225,195,135, 7,106, 52, 26,124,251,237,183,122, 0,242,149, 43, 87,170,189,105,186,246,227,115,143, 92,185, 27, 44, 81,244,222,
-132,237,184,169,240, 37,218, 91, 17,131,229,200,223,132, 16,136,162,232,140, 92, 89,173, 86,231,119,165, 82,201, 50, 30,131,193,
-240,246, 92,209, 44,183,126, 78,196, 45,210,148,229,201, 88,185, 54, 7,186,124,182,122,208, 53,187, 53, 29,186,255,238,120,207,
-153, 62,125,250, 22, 71,228,202,229,247, 82,233, 40, 51,130,197,113, 28, 76, 38, 19, 78,156, 56,225,235, 29,170,207,147,142,134,
-196, 63,128,161,151,242, 65, 8,193,134,246,141,161,210,233, 32,215,105,209,230,215,173,206, 10, 59,121,198, 56,200,181, 58,132,
-180,123,200,167, 10, 92, 20,197,235, 12, 86, 94, 94, 30,100, 50, 25, 62,248,224, 3,112, 28,135,143, 62,250, 8, 81, 81, 81,200,
-200,200, 64,199,142, 29,125,186,216,112, 18, 7,213, 83,193, 80,189,224, 7,110,116, 29,196,246,125, 1,249,133, 53,113,212,172,
- 69,195,226, 51, 8,250,123, 50, 44,146,205,167,105, 26, 8, 33,176,217,108,216,178,101, 11,100, 50, 25,108, 54,155,243,226, 67,
- 41,117,206,146,239,152,212,241,163,143, 62, 98,165,237, 14, 80,237,225, 71,240,100,186, 30, 0,176,174, 77, 3, 40,181, 90, 40,
-252,116,104,247,251,118,103,254,188, 48,237,117,200,181, 58, 4,182,108,239,147,102,163,151,222, 64,195, 23, 95, 71,118,118,182,
-161, 91,139,216,237,249,188,242,251, 38, 77,154, 56,251, 92,105, 52, 26,168, 84, 42,226,136,100,249,106, 90, 56,142,243,106,174,
- 28,159,125,189,169,112, 31,133, 91,158,193,242, 21,142,227,240,244,211, 79, 35, 34, 34, 2,159,127,254,121,169,200,213, 91,111,
-189, 5,171,213,138,217,179,103,179,204,199, 96, 48,202,227, 64, 5,214,109,233, 98,150, 14,220,160,238,129,155, 77,176,199,154,
-215,100, 50, 37,119,237,218, 21,101, 44,139, 82, 42,149,165,106, 87,199,164,163,238, 77,133,132,144, 38,148,210, 99,110, 14,245,
-223,102, 65,123,103, 97,133, 91,179,139, 66,231, 7,153, 86, 7,206, 67, 37,238, 73,211, 83, 4,203,209,116,146,159,159, 15,153,
- 76,134,207, 63,255, 28,254,254,254, 48,153, 76,158, 58,216,123,212,228,121, 30,250, 75,122, 92,124,247, 40,148,218,115,168,255,
-144, 31,252,100,231, 81,119,199, 74,216,108,102,192,165,201,208, 23,205,250,245,235,227,189,247,222,187,110,122,134,178,136,143,
-143,247,170,121,179, 48, 77,207,154,132, 16, 40,253,116, 80,249,249,149,153, 63, 5, 15,115, 55,185,107, 58,150, 59, 34, 87, 69,
-114,205,247,151, 47, 94,220, 7,128, 27, 62,124,120,128, 70,163,193,130, 5, 11,244, 0,184,247,223,127, 95, 83,163, 70, 13,222,
-151,116,114, 28,135, 31,126,248,225,186, 62, 87,101, 25, 44, 95,210,105,179,217,174, 51, 88,131, 7, 15,190,110,162,209,178, 34,
- 88,158,210,233,232,171, 86,165, 74, 21,104, 52, 26,231, 99,183, 84, 42, 21, 84, 42,149,115,118,248,178,154, 90, 89,254,100,154,
- 76,243,191,163,121,135,204,216, 45,195,163,193,250,231,159,127,122,150,181, 65,219,182,109,207,236,218,181,171,174,235,179, 9,
-109, 54,155,220,100, 50,213,235,223,191,191,215, 91,101, 73,146,160, 84, 42, 65, 41, 69,243,119,102,148,220,194,115,255, 54, 9,
- 82, 74, 17,216,182, 27, 8,207, 67, 20, 37, 88,173, 86,175,163, 8,141, 70, 99,169, 14,232,158,134,175, 23, 21, 21,149, 59,207,
-143,187,166,193, 96, 40,213,175,139,136, 20, 23, 54,173,184,126, 52,161,253,127,124, 69,165, 82,149,106, 54,241,150, 20,118,211,
-114,123,113, 76,224, 73, 41, 69,236, 43, 19, 74, 34, 69, 60, 87,106,121, 64,203,246, 32,130, 12, 82, 73,191, 37,111, 3, 67, 72,
- 86, 86,150,161, 95,191,126,219, 40,165,223,245,239,223,255, 52, 74, 58, 88, 82,157, 78,167,148,201,100, 18,128,107, 0,104,110,
-110,110, 64, 90, 90,154,100, 52, 26,171,123, 75,231,246,237,219,113,238,220, 57,196,197,197, 57, 35,159,142,151,163,249,254, 70,
- 34, 88,158,102,132, 47,107, 38,247,138, 68,176, 2, 2, 2,160, 80, 40,240,193, 7, 31, 64, 46,151, 67,173, 46,105, 5,157, 61,
-123,182,243,152, 51, 24, 12,198,253, 68,133, 31,216, 44, 73, 18, 95, 86,243,161,183,166, 66, 81, 20, 83, 31,120,224,129,138,254,
- 95,166,151, 11, 98,234,142, 29, 59,228,238, 15,164,245,244, 0, 92,151,223,188,106, 30, 56,112, 64, 94,206,246,158, 62,103, 86,
-100,223,125,233,191, 98,179,217,210, 88, 22,189,125,216,108,182,212, 86,173, 90,121, 94,248,222, 71,101,157,215, 76, 47,166,229,
-108,189,122,245,210,117, 58,221, 31,225,225,225, 57,187,118,237, 10,105,217,178,101,136,235, 58, 45, 91,182,140,112,219,204,140,
-114,166, 39, 33,132,164, 62,249,228,147,114, 47,249,209,253,115,170,151,155,138,212,164,164, 36,185,167,252, 94,214, 59,165, 52,
-213,135,195,122,169, 87,175, 94,156,167, 50,228,225, 88,102,177, 92,200, 96, 48,254,179, 6,203,104, 52,166,116,237,218,213,227,
-184,111,189, 94,127,185,188,109,147,146,146, 18, 42,123, 7, 82, 83, 83,219,220, 11,154,183, 98,223, 25,119,255, 57, 74, 74, 74,
-106, 85,217,154,151, 47, 95,110,115, 47,104, 2,192,241,227,199, 91,179,156,197, 96, 48,152,193,242, 1, 95,167, 99, 96, 48, 24,
- 12, 6,131,193,248,175,194,177, 67,192, 96, 48, 24, 12, 6,131, 81,185, 16, 0, 77, 60, 45,168,200,232, 0, 66, 72,147,138,254,
-177, 55,125,166,201, 52,153, 38,211,100,154, 76,147,105,222,127,154,222,180,239,226,209,137, 21, 51, 88,222,102,162,190, 41,113,
- 54,132,149,105, 50, 77,166,201, 52,153, 38,211,100,154,255, 65, 88, 19, 33,131,193, 96, 48, 24, 12, 70, 37, 35,176, 67,112,103,
- 32,132,240,148, 82,177, 18, 37, 3, 1,148,245, 64, 55, 51,128,188, 27,212, 85, 0,144,217, 95, 64,201, 35, 6,172,118, 77, 6,
-131,113, 31,145,144,144, 48,146, 82,250, 97, 73, 21, 69, 62, 56,120,240,224, 23,236,168, 48, 24,149,108,176,234,212,169,115,144,
-227,184,104, 79, 15, 32, 46,107, 94, 28, 81, 20, 83, 79,158, 60,233,211, 80,119, 66,136, 16, 17, 17, 49, 88,171,213,118,230,121,
-190,173,125,251, 93,197,197,197, 91, 50, 50, 50,126,161,148,218,110,100,135, 98, 98, 98,252,141, 70,227, 99,132,144, 97, 0, 64,
- 41,253, 73,165, 82,253,124,225,194,133,130, 27, 52, 66,117,170, 86,173,250,147, 76, 38,227, 83, 82, 82, 58, 3, 64,181,106,213,
-182,152,205,102,241,234,213,171,195, 40,165,231, 42,168,199,201,229,242, 25,237,219,183,111, 71, 8,249,145, 82, 58,191,146,206,
-165,146,227,184, 75,158, 22, 72,146, 84,227, 6,244,228, 0, 2,102,207,158, 29,188,120,241,226, 22, 25, 25, 25, 77, 1, 32, 34,
- 34,226,232,240,225,195,255,249,223,255,254,119, 13, 64, 62, 0, 11, 43, 70,247, 54,245,234,213, 59,200,113, 92,116, 69,230,146,
-179, 63,162, 42,245,248,241,227, 9,101,105,242, 60, 31,237,101, 62,186,235, 62, 75,146,116, 33, 41, 41,201,227,148, 17,245,235,
-215,223,195,243,124, 45,111,105,243,148,206,178,166,224,168, 95,191,254, 65,158,231,163, 43,170, 41, 73,210,133, 99,199,142,181,
-169, 76,205,219,157, 78, 0,232,212,169,147,178,184,184,248, 39,157, 78,215,172,184,184,120, 36,165,116,210,214,173, 91,195, 57,
-142, 67,183,110,221, 38, 37, 36, 36, 92, 84, 42,149,243,140, 70,227, 63, 58,157,110,232,214,173, 91, 77,172,196, 48, 24, 55,105,
-176, 56,142,139, 62,116,232, 80,152, 86,171,133,221,168,192, 49,123,187, 36, 73,206, 23,165, 20,148, 82,216,108, 54,116,234,212,
-201,167, 63,141,142,142,110, 82,191,126,253, 21, 47,191,252,114,245,190,125,251, 42,194,195,195, 65, 8,193,149, 43, 87,234,173,
- 93,187,246,137,207, 63,255,252,189,232,232,232, 65,169,169,169,190,118,148,227, 34, 34, 34,186, 2,120,170, 73,147, 38, 3,223,
-120,227, 13,121,219,182,109, 33,138, 34,254,254,251,239,246,179,102,205,250, 60, 50, 50,242, 55, 0,139, 50, 50, 50, 54, 83, 74,
- 37, 31,117, 91,212,170, 85,235,231,237,219,183,215, 74, 78, 78, 22, 7, 12, 24,240, 35, 0,236,218,181,171, 25,165,148,180,109,
-219,118, 29, 33,228, 49, 74,233, 63, 21, 56,230,253,199,140, 25, 51,232,165,151, 94, 10, 29, 57,114,228,112, 0,243,237,255,229,
-120,200,101, 69, 59,197, 57, 35, 87,148, 82,121, 57,235,133, 87, 32,146,165,189,112,225, 66, 96,219,182,109, 95,186,122,245,234,
- 88, 87,221,204,204, 76, 28, 62,124,216,242,209, 71, 31,205,218,181,107,215,151, 49, 49, 49,121, 0,138, 89, 81,186,119,225,121,
- 62,234,224,193,131, 97, 26,141,198,249, 32,119,215,114,238, 40,227,174, 89,147, 82,138, 14, 29, 58,148,167, 25,157,152,152, 24,
-166, 86,171,157,117, 71,121,122, 46,154,150,114,234,164, 26, 7, 14, 28, 8,211,104, 52,160,148,122,213, 35,132,128, 82, 90,238,
-179, 71, 29,233, 84,169, 84, 62,105, 58,104,219,182,173, 88, 89,154,142,116,182,110,221,154,150,167,121,232,208,161, 48,199, 83,
- 48, 42,144,206,114,111,128,138,139,139,127,250,229,151, 95, 6,132,135,135,163,127,255,254, 27, 26, 55,110,172,208,104, 52, 88,
-183,110, 29,162,163,163,171,248,251,251,255, 57,125,250,116,204,156, 57,179,250,198,141, 27,151, 2, 24,192, 74, 12,131,113,243,
- 6, 11, 90,173, 22,203,150, 45,243,248,248, 25,247,207, 53,106,248, 22, 36,169, 90,181,106, 66,205,154, 53,183,173, 92,185, 82,
- 29, 22, 22,230,252,221, 98,177,192,223,223, 31, 79, 63,253,180,162, 91,183,110,117,159,120,226,137,189, 85,171, 86,237,120,229,
-202,149,131,229,233, 69, 68, 68, 12,140,141,141,253, 98,236,216,177,225,253,250,245, 67, 80, 80, 80,169,229,125,250,244, 65,239,
-222,189,229, 23, 46, 92, 24,242,203, 47,191, 12,249,241,199, 31,175, 68, 68, 68,140,201,200,200,248,173, 92,135,161,213,118,107,
-222,188,249,183,155, 55,111,142, 14, 12, 12, 68,100,100, 36,247,238,187,239, 54,169, 93,187,182, 58, 34, 34,130, 75, 79, 79,199,
-111,191,253, 86,123,248,240,225,171, 84, 42,213, 72,163,209,184,217, 7,195,166, 8, 14, 14, 30,247,194, 11, 47,132, 20, 22, 22,
-218, 14, 29, 58,116,206,241,187, 82,169,156,244,224,131, 15,198, 17, 66,150, 83, 74, 23,221, 72,228,138, 82, 90,128,127,155,242,
- 28, 88, 29,203,125,140,100, 41, 14, 29, 58, 20,212,182,109,219,223, 77, 38, 83,220,179,207, 62,155,246,201, 39,159, 40,252,253,
-253,253, 1,144,188,188,188,220, 41, 83,166,136,115,231,206, 29,223,184,113,227,174,187,118,237, 26, 16, 23, 23,199,154, 12,239,
-113, 52, 26, 13,214,172, 89,227,241, 49, 83,158,202,124, 96, 96,160,215,167, 17,168,213,106,108,220,184,209,185,157,235,163,165,
- 60,125, 14, 12, 12, 4,165,180, 92, 81,149, 74,133,157, 59,119, 58, 31, 3, 84, 86,189,228,120,215,104, 52, 32,132,112,222, 52,
-183,109,219,230, 85,203,241,174,211,233, 0,128,247, 37,157,222,246,217,241, 89,171,213,122, 61,158, 74,165,210,169,233,170, 81,
-214,119,251,205, 49,241,114,142,154,133,135,135, 99,223,190,125,152, 60,121,178, 34, 54, 54, 22,103,206,156, 1,199,113, 24, 57,
-114, 36, 26, 55,110,140, 43, 87,174,160,113,227,198,216,185,115,103, 11, 86, 82, 24,140, 74, 48, 88, 14,202,170, 96,221, 63, 59,
-238,196,220,238, 72, 75, 69,160,106,214,172,169,212,233,116,191,174, 89,179, 70, 29, 18,242,239,211, 66,204,102, 51, 10, 11, 11,
- 81, 84, 84,132,194,194, 66,104,181, 90,204,155, 55, 79, 61,108,216,176, 95,107,214,172, 89, 47, 57, 57,217, 84,150, 38, 33,100,
-214,225,195,135,195,109, 54, 27, 20, 10, 69,153,102,177, 78,157, 58, 24, 51,102, 12,218,181,107, 87,117,200,144, 33,179, 0,252,
- 86,150,166,221,184,125,185,107,215,174,104,133, 66,129, 51,103,206, 32, 53, 53, 21,163, 70,141,170, 33, 73, 18, 82, 82, 82,112,
-230,204, 25,164,167,167,227,235,175,191,142, 30, 54,108,216, 60, 0,117,203,219,119, 59,207,189,246,218,107,117,131,130,130,184,
- 79, 62,249, 36,191,168,168,232,107,251,239, 19,103,207,158, 61,180, 99,199,142,161,207, 62,251, 44, 37,132, 44,163,148, 94,103,
- 88,220, 52, 61, 69,174, 68, 74,233, 73,183,205, 26,186, 69,182,194, 81,242, 44,188,124, 15,154, 4,128,127,207,158, 61, 95, 55,
-153, 76,113, 59,118,236, 56,215,174, 93,187, 26, 0, 50, 40,165, 89, 0, 16, 20, 20,164,157, 51,103, 78,120,159, 62,125, 78,119,
-235,214, 45,174,103,207,158,175,103,101,101,125, 8, 32, 27,246,199,187,220,138,145, 37, 76,243,214,105,218,155,146, 32, 8, 2,
-122,245,234, 5, 66,136,199,231,109,238,217,179, 7, 93,187,118,133, 76, 38,195, 51,207, 60,227,179,102,143, 30, 61, 96,179,217,
-174,211,115, 55, 32,142,103,116,150,183,239,148,210, 82,207, 8,245,100, 46, 92, 95,238,122,158, 52, 37, 73,242,168, 85,150,201,
-114, 60,172,222,151,125,247,213, 92,122, 75,167,171,166, 76, 38, 67,155, 54,109,112,232,208,161,114,205,150,183,116,218, 35, 88,
- 79,245,239,223,127,195,168, 81,163, 84, 0,144,157,157, 93,234, 65,244,167, 78,157,130,201,100,194,146, 37, 75, 96, 50,153, 70,
-179,114,196, 52,111,165,166, 55, 59, 2,160, 57,128, 80, 0, 34,128, 66,251,117,208,108,191, 22,230, 0, 80,219, 95, 38, 0, 69,
- 0,170,216,183,205,182, 95,223, 92, 31, 83,150,133,210, 15,133,110,105,215,118, 60,178, 43,212,101,153,227, 63,220,191,187,191,
-151,210,230,236,133,151,218, 95, 29,221,195,214,190,152, 43, 71,229,232,195, 9,121,121,226,196,137,225,174,230,202,100, 50,161,
-160,160, 0,133,133,133,206,247, 51,103,206, 64,161, 80, 96,240,224,193,225,148,210,151,189,200,202,121,158,199,161, 67,135,176,
-114,229, 74, 92,188,120,241,186, 21,206,159, 63,143, 57,115,230, 96,230,204,153, 40, 40, 40, 0, 74,250, 23,121,164,121,243,230,
-147,135, 13, 27,182,183, 83,167, 78, 74, 65, 16,112,248,240, 97,212,171, 87, 15,187,119,239,198,229,203,151,145,155,155,139, 83,
-167, 78,161, 73,147, 38, 56,119,238, 28, 10, 10, 10, 16, 27, 27,171,140,143,143,223, 81,179,102,205,201,229, 68,175,228, 81, 81,
- 81,111,189,240,194, 11,202,140,140, 12,233,135, 31,126,216, 69, 41,221, 77, 8, 25,245,246,219,111,143,232,209,163, 71,232,201,
-147, 39, 11, 14, 28, 56,112,208,147,185, 42, 35,114,117,153,227,184, 75,148,210, 2, 74,169, 1, 37,157,207, 75, 93,140,108, 54,
-155,201, 96, 48,228,231,228,228,100,115, 28,119,137,227,184, 51, 0,148,101,105, 14, 31, 62,188,118,118,118,246, 75,255,251,223,
-255, 46,182,107,215,174, 6,165,244, 20,165, 52,199,158, 97, 77, 54,155, 45, 39, 47, 47,239,116,219,182,109, 35,134, 14, 29,122,
- 46, 59, 59,251,165,225,195,135,215, 46, 71,147,113,247, 67, 69, 81,132, 76, 38,195,214,173, 91,177,115,231, 78,236,220,185, 19,
-187,118,237,194,238,221,187,177,103,207, 30,236,217,179, 7,130, 32, 96,247,238,221,216,189,123, 55,198,140, 25,227,181,204,139,
-162, 8, 65, 16,176,109,219, 54,236,223,191,223,249, 58,112,224, 0,246,239,223, 15,181, 90,237,213, 12,185,149, 33,167,166,167,
-215,151, 95,126,233, 52,135,142,186,137,227,184,114,163, 98,238,198,197,221,176,212,168, 89,243,186,101,222,210,233, 48,109,130,
- 32,224,155,111,190, 65, 90, 90, 26, 62,255,252,115,156, 63,127, 30, 31,127,252, 49,146,146,146, 48,117,234, 84, 28, 56,112, 0,
- 19, 39, 78,196,142, 29, 59, 28, 15,127,167,222, 52, 29,230,202, 98,177, 56,211,115,234,212, 41, 76,155, 54, 13,135, 15, 31,198,
-164, 73,147,176,103,207, 30,140, 27, 55, 14, 60, 95,110,144, 13, 9, 9, 9, 35, 9, 33,191,212,175, 95, 95,217,165, 75, 23, 8,
-130,128,105,211,166, 73,147, 38, 77,186,250,246,219,111, 95, 93,187,118, 45,173, 93,187, 54,204,102, 51,252,252,252, 64, 41, 93,
-148,144,144,240, 50, 43, 46,140, 91,133, 39, 47,226, 66,135,137, 19, 39,118, 33,132,172,109,211,166,205,112, 0,129,132,144,181,
- 0, 20,246,247,144,137, 19, 39,182, 34,132,172,157, 56,113, 98, 2,128, 42,132,144,181,246,239,157, 1,132, 56,190,219,215, 15,
-117, 51,111,161, 46,191,135,186,173,171,240,244,221,253,221, 93, 91,112,185, 24, 19,123, 1, 39,174, 21,100, 69, 12,150,183, 10,
- 87,167,211,245,238,217,179,167,220,213, 92,185, 70,174, 28,239,133,133,133, 56,125,250, 52,154, 52,105, 34,215,233,116,189, 1,
-124,234, 53, 20, 39, 8,136,140,140, 68,118,118, 54,142, 29, 59,134, 26, 53,106,192,106,181, 98,253,250,245,200,203,203,131, 92,
- 46,135, 92, 46,135,217, 92,190,119,105,216,176, 97,175,197,139, 23, 39,252,248,227,143,185,130, 32,224,212,169, 83,248,233,167,
-159, 64, 41, 69,149, 42, 85,160,215,235,113,245,234, 85,204,154, 53, 11, 22,139, 5, 58,157, 14, 81, 81, 81,170,151, 95,126,185,
-221,148, 41, 83,100, 0,202, 50, 89, 15, 12, 28, 56,208,223,207,207, 15,175,190,250,170,100,177, 88,102, 18, 66, 30, 28, 56,112,
-224, 91, 99,198,140, 9, 78, 78, 78, 54, 63,247,220,115, 7, 45, 22,203, 44,123, 70,147, 81, 74,173, 94, 12,107,153,145, 43,155,
-205,230, 56,166, 23, 11, 11, 11, 17, 22, 22, 86,157, 82, 42,247,114,142,228,187,119,239,110, 3,128,127,255,253,247, 85,148,210,
- 76, 87,211,102,177, 88, 28,154,182,252,252,252,171,227,198,141,179, 45, 93,186,148,183,111,115, 2,128,145, 85, 17,247,100,165,
-230, 44,235,189,122,245, 42,101, 40,182,111,223,142,158, 61,123, 58,203,187, 92, 46,119,174,231, 77,211, 53, 42,230,136, 60, 57,
-116,183,108,217,114, 93,228,197,199,155, 52,103,132,197,147,241,113, 55, 93,142, 27, 69, 95,204,144, 39,147,229,168, 91,220, 35,
- 67,190,164, 83, 38,147, 97,204,152, 49, 16, 4, 1,227,198,141,131, 76, 38, 67,243,230,205, 33, 8, 2, 90,183,110, 13, 65, 16,
-208,185,115,103,159,111, 80, 29,233,220,179,103, 15,226,227,227,157,233,105,222,188, 57, 90,182,108, 9, 65, 16,208,190,125,123,
- 8,130,128,238,221,187,123,213,116,116,104,215,233,116, 56,125,250, 52,120,158, 7, 33, 36, 39, 49, 49, 49, 28, 0, 38, 79,158,
-156,109, 52, 26, 67,140, 70, 35,186,118,237,138, 54,109,218,132, 46, 93,186,244, 93, 0,108,100, 33,227,214,221,237,121,240, 34,
-142, 0,192,140, 25, 51,166, 81, 74,251,148,181,173, 99, 57, 33,100,237,244,233,211,251,216,245,174,251,238, 18,101,114, 53,111,
-177,174, 17, 40,199,118,174,255, 87,222,127,187,173,159, 85,202, 96,217,119,168,147,167, 74,215, 83,168,220,253,179, 47, 21,132,
-209,104,108,238,136, 94, 25,141,198, 82,134,170,168,168,168,148,209, 50,155,205,136,137,137,129,209,104,108, 94,209,139, 69, 68,
- 68, 4, 44, 22, 11, 22, 46, 92,232, 52, 86,174, 38,161, 60,142, 31, 63,126,113,239,222,189,113,241,241,241, 65,191,255,254,123,
- 86,183,110,221, 66,123,244,232, 1,149, 74, 5,163,209, 8,155,205,134, 7, 30,120, 0, 13, 27, 54,196,213,171, 87,177,110,221,
-186,236,122,245,234, 85,217,183,111,159,116,229,202,149, 75,229, 72,119,237,218,181, 43, 8, 33, 88,183,110,221, 53, 74,105,162,
- 90,173,254,109,218,180,105,129, 38,147, 73, 26, 49, 98, 68,202,181,107,215,198, 1,176, 42,149,202, 79, 31,122,232,161, 7,120,
-158, 95, 46,138, 98,133, 43, 51,147,201, 84,234,216, 22, 22, 22, 66,163,209,248, 50, 37,132, 44, 47, 47,175, 41, 0,104, 52,154,
- 96, 0,206, 17,146, 6,131,193,121,142,236,231,199, 24, 28, 28,172, 5, 0,251, 54, 50, 86, 53,220,187, 56, 46,222, 91,183,110,
- 45, 85,190, 29, 17, 40,247, 50,175, 80, 40,176,102,205, 26,159, 52, 93,205,148, 15,205,121,229, 70,155, 28, 6, 75, 16, 4,124,
-253,117, 73, 11,251,171,175,190,234,220,222,253, 63,124,169, 47, 28,102, 72, 16, 4, 52,124, 79, 2, 96, 65,234,103, 42,200,100,
- 37, 89,218, 61,205,142,139,128, 47,230,242,243,207, 63, 71,159, 62,125,176,118,237,218,114,223,123,247,238,237, 83, 58, 5, 65,
-128, 82,169, 44,101,252, 14, 31, 62,236, 81,119,193,130, 5, 94,251,180, 73,146,132, 63,254,248, 3, 28,199,149,138,120,189,251,
-238,187, 47,248,251,251,235,182,109,219,134,204,204, 76, 20, 23, 23,163,168,168, 8, 65, 65, 65,129,221,186,117, 59,124,229,202,
-149,228,227,199,143,179, 14,239,140, 91, 18,197,114,245, 34, 46, 24, 38, 76,152,240, 22, 33,100,237,132, 9, 19,222,154, 62,125,
-122,146,125,253,181,110,219,175,245,162,239, 48, 65,142,230,193,150,110,230,205,209,116,248,112, 57,219,154,221, 12,149,123, 19,
-225, 1,175, 17, 44,247,190, 9,229,125,182,135,184,189, 85,184, 2, 33,228, 58, 3,224, 41,130,101,181, 90,145,147,147, 3, 73,
-146, 42,117,174, 46,111, 6,235,216,177, 99, 79,143, 28, 57, 50, 61, 32, 32,160, 89, 78, 78, 78,134, 82,169,108,191,125,251,246,
-106, 86,171, 21,254,254,254,240,247,247,199,159,127,254,137,128,128, 0,252,239,127,255,187,108, 48, 24,118,107,181,218,112,131,
-193,112,228,202,149, 43,239,148,233, 92,100,178,174,237,219,183, 71, 98, 98, 34,242,242,242,254, 38,132, 52,123,246,217,103,187,
- 87,171, 86,141,124,248,225,135,198,115,231,206,125, 1, 32, 75,171,213,126,179,120,241,226,142,113,113,113,186, 17, 35, 70,128,
- 16,242, 45,165,212,231,200,144, 94,175, 47,101,172, 28,199,212,207,207,207,167, 57,183,236,199,155, 18, 66,156, 3, 26, 93,141,
-149,139, 1,166, 60,207, 75, 0,104,101,159, 35,198,237,143, 96, 57,202,122,223,190,125,175,235,220, 46,151,203,177, 97,195, 6,
- 60,242,200, 35,206, 27,150,248,248,120,159,163, 77,253,250,245,115, 26,130, 13, 27, 54,148,105,176,188, 53,105,185, 71,155, 94,
-121,229, 21,200,100, 50,124,241,197, 23, 24, 59,118, 44,120,158,199,103,159,125, 6,142,227,240,238,187,239, 86,216, 92,202,100,
- 50, 92,252,168,228, 61,250,181, 2,228,204, 15, 7, 0,248,249,251,151,236,143, 36,249,172,233,216,119,111,145, 43, 87, 99,229,
-173,137,208, 53, 10,120,230,204, 25,231,231,214,173, 91,151,138, 92, 9,130,224,213,176,217,255,111,106,151, 46, 93, 62,140,142,
-142, 14, 27, 53,106, 20, 17, 4, 1, 9, 9, 9, 85, 38, 77,154,148, 47,147,201, 84,111,188,241,134,167,174, 20, 50, 0,205, 26,
- 53,106,164,101, 37,135,113,155, 35, 88,166,233,211,167, 39, 77,159, 62,221, 99,132,202, 61,146, 84, 94,164,201,197, 88, 29,128,
-189, 57,112,194,132, 9,111,161,164, 43,204, 1, 31,182, 85, 56,204,149,123,148,203, 21,247, 8,214, 20,247,138,199, 23,131,229,
- 75,255, 9,123, 84,228,104,118,118,118,107,165, 82,137,130,130,130,235, 46,218,174,166,128,231,121, 92,189,122, 21, 26,141,230,
-104,101,158, 60,111, 77,132,118, 51,243,186,203,113,105, 57,120,240,224,165,203,151, 47,143,217,180,105, 19,246,237,219,135, 42,
- 85,170, 96,218,180,105, 23,146,147,147,135, 82, 74, 15,248,242,191,181,107,215,110,172,211,233,176,107,215, 46, 0,216, 1,224,
-169, 23, 95,124,145, 88, 44, 22,204,155, 55, 79, 15, 96, 83, 64, 64,192,111, 43, 86,172,104,214,172, 89, 51,229,166, 77,155, 10,
-247,237,219,183,213, 71,115, 37, 82, 74, 61, 26,171,194,194, 66, 20, 23, 23, 67,167,211,249, 98,176,108,254,254,254,199, 10, 11,
- 11, 31, 51, 24, 12, 5, 74,165,210,175,160,160,192,228, 26, 97, 44, 42, 42, 66,113,113, 49, 4, 65,144,157, 57,115, 38, 29, 64,
-109,127,127,255, 99, 0,108,172,106,184, 55,225, 56,142, 58, 76,198,166, 77,155, 60,150,117,153, 76,134,245,235,215,151, 42,239,
-235,214,173,243,106,218, 4, 65,112,142, 36,244, 22,193,114,108,234, 53,204, 42,147,129,231,121,204,159, 63, 31,148, 82,103,228,
-138,227, 56, 76,152, 48, 1, 74,165, 18, 31,124,240, 1, 38, 76,152,224, 83, 20,203, 53, 42, 86,107,188,225,223,202,209,190,173,
-197,108, 46,137,210,115,156,171,201,242, 41,210,230,173,131,123, 69, 76,176,107,164, 77,169, 84,150,217,185,221,125,211,178, 52,
- 15, 30, 60,248, 93, 92, 92,220,185,208,208,208,141,109,218,180, 81, 30, 60,120, 16, 99,198,140, 33, 38,147,201,127,211,166, 77,
-206,255,245,116,188,138,139,139, 85,172,228, 48,110, 97, 4,107,138,135, 69, 65, 14,227,100, 55, 67,190,234,173,117, 93,223,161,
-225,110,138,236, 17,177,237,222,180, 60,109, 91, 22, 66, 89,225,110,247, 74,194,155,209,242,229,238,211, 96, 48,108,222,186,117,
-107,203, 71, 30,121, 68, 40,175,121,176,168,168, 8,225,225,225, 56,127,254,188,205, 96, 48,120,157,254, 64, 20,125,159, 16,221,
- 91, 4,203, 67,101,114, 32, 54, 54,214,102,177, 88, 80,183,110, 93, 68, 69, 69,193, 96, 48, 96,206,156, 57, 54, 95,205, 21, 33,
- 68,158,144,144,192, 3, 64,126,126, 62, 80, 50,218,161, 94,189,122,245,144,152,152,136,220,220,220, 85, 0,186, 78,153, 50,165,
-197,131, 15, 62, 40, 95,190,124,185,126,244,232,209,171,172, 86,235,135, 62,222,129,155,109, 54, 91, 45,142,227, 44,121,121,121,
-105,174,198, 42, 60, 60, 60, 72,167,211,113, 87,175, 94,181,250,114,120,154, 54,109,186, 63, 53, 53, 21,239,191,255,126,214,180,
-105,211,234, 21, 22, 22,230,230,231,231,219, 28,198,170,160,160, 0, 6,131,129, 11, 13, 13, 85, 46, 88,176, 64, 3, 0, 77,155,
- 54,221, 15, 54,225,232,189,126,215,120, 93,211,160,167,105, 26,124,189,153,114, 53, 46,253,251,247,191, 46, 34,230,120,173, 88,
-177,162, 84,191, 38,111, 77,111, 14,205, 47,191,252, 18,175,190,250, 42,148, 74, 37,102,207,158, 93,170, 15,150,167, 77,203,211,
-116,152,182, 90,227, 13,184, 50, 55, 24, 50,153, 12, 33,163, 51, 75, 53, 17,122,186,203,246,197, 8, 78,155, 54,173, 82,154, 8,
- 93, 77,159, 99, 74,156,133, 11, 23, 98,240,224,193,216,177, 99,199, 13, 55, 17,214,170, 85,107,241,156, 57,115,148, 39, 78,156,
- 64, 65, 65, 1,178,178,178, 96, 52, 26,145,146,146,226, 60,135,101, 68,202,213,172,212, 48,110, 69,244,170,156,197, 89,110,253,
-167,136,107,115, 93, 57,239,238,235,195,229, 55, 87,221, 44,148, 30, 40,230,250,187,187,169,114,255, 15,215,117,178,174,139, 96,
-149,113,225,246,121,154, 6,123, 7, 73,111, 70, 96,214,123,239,189,247, 82,187,118,237,130,253,253,253,145,158,158,238, 49,130,
-229,239,239, 15,139,197,130,173, 91,183, 22, 72,146, 52,203,203, 57,177, 90,173, 86,132,133,133, 33, 59, 59, 27, 82, 25, 97,124,
-142,227,160, 86,171, 81, 84, 84, 4,183,131,232,211,133,194,106,181,194, 98,177,192, 98,177,192,106,181, 86, 52,223,168, 29, 19,
-182, 22, 23, 23, 3, 64,113,100,100,100,109,149, 74,229, 24,245,120, 6, 64,151, 30, 61,122,200,114,114,114,232,115,207, 61,183,
-135, 82, 58,198,203,108,246,230,173, 91,183,214, 4, 0,181, 90,125, 6, 0, 82, 82, 82,172,121,121,121, 40, 42, 42,114, 70, 8,
-213,106, 53, 6, 12, 24, 80,149, 82,138,173, 91,183,214,148,203,229,180, 28, 51,100, 90,187,118,237,241,128,128,128,165, 51,102,
-204, 24,250,240,195, 15, 39, 53,109,218,180, 86, 81, 81,209, 85,189, 94,111, 48, 24, 12, 84, 16, 4,121, 72, 72,136,114,227,198,
-141,231,246,236,217,243,144,191,191,255,210,181,107,215, 30,183,135, 86, 25,247,230, 29, 99,169, 40,142, 39, 83, 85,145, 17,116,
-174,198, 69, 16, 4,172, 95,191,190,220, 40,142,175,154,174, 38,227,245,215, 95,199,220,185,115,175,139, 96,125,248, 97,201, 61,
-201,219,111,191, 93,161, 8,145, 32, 8,184, 50, 55, 24, 85, 95,185,118, 93, 4,139,216,211, 87,145, 38, 66,199,246, 83,167, 78,
-133, 76, 38,115, 54,225, 61,244,208, 67,165,154, 6,125, 53, 86,174,154, 87,175, 94,133, 32, 8, 8, 14, 14,198,208,161, 67,209,
-189,123,247,235,244,124,213, 77, 73, 73,249,103,230,204,153,213,163,162,162,176,124,249,114,179, 86,171, 85,116,233,210,133,230,
-231,231,147,242, 34, 88, 6,131,129, 69,176, 24,183,155, 3,183, 89,247,166,255, 79,240, 86,233,222,204, 52, 13,238, 79,219, 78,
- 78, 78,206,143,136,136, 24, 54,100,200,144,223,231,207,159,175,174, 93,187, 54, 78,157, 58,133,220,220, 92, 88, 44, 22,200,229,
-114, 68, 70, 70,162,168,168, 8,191,254,250,171, 94,175,215, 15,203,200,200,200, 47, 79,147, 16,242,118,175, 94,189, 22,188,243,
-206, 59,170,198,141, 27, 35, 55, 55, 23, 69, 69, 69,206, 59, 47, 66, 8,252,253,253,161,209,104,112,236,216, 49,236,217,179,199,
- 64, 8,121,187, 60, 77, 79, 70,211, 97,172, 28, 70,203,219,200, 36, 55, 77,173, 70,163,113,220,249, 1,128,173,122,245,234,225,
- 0, 28, 6,235, 82, 76, 76,204, 59,117,234,212, 33,139, 23, 47,166,148,210, 77,158,204,149,155,102,110,199,142, 29,243, 0,132,
-155,205,102, 57, 0, 20, 20, 20, 88, 66, 66, 66,194,148, 74,165,164, 84, 42, 37,149, 74, 37,101,100,100,216,108, 54,155, 28, 0,
- 58,118,236,104, 6,144, 9,251,124, 85, 30, 52, 37, 0,133,243,230,205,155,252,212, 83, 79,181,110,219,182,109,236,115,207, 61,
-119, 98,244,232,209,136,138,138, 10, 42, 42, 42, 50,158, 57,115, 38,111,254,252,249,198,253,251,247, 63, 36,147,201, 46,205,155,
- 55,111, 50, 74,230, 35,145,124, 61,158, 55,104, 2,152,230, 45,210,116,244,253,241,100,172, 92,191,251, 48,141, 66,169,116, 58,
- 76,219, 99,143, 61,230, 28,125,232, 30,185,170,168, 38, 0,231, 8,194, 55,223,124,179, 84,250,222,121,167,204, 46,144,164,156,
-125,119, 70,155, 4, 65, 64,254,194,168, 82,230,207, 87, 83,229, 73, 83, 16, 4, 76,154, 52,201,231, 8,150,123, 31,172,242,210,
-217,177, 99, 71, 20, 23, 23, 67, 38,147, 97,195,134, 13,101, 70,176,188, 29, 79,181, 90, 61,116,213,170, 85, 63, 41,149,202,166,
-102,179,249,153,236,236,236, 31,244,122,125,245,188,188,188,114, 35, 88, 70,163, 81,201,202, 17,211,188, 3,115, 97,221, 83,148,
-123,139,103,179,217, 80,173, 90,181, 82,207,182,114,116,102,231,121,222, 57,242,196,151, 17,132, 14, 50, 50, 50, 54, 68, 68, 68,
- 12, 28, 48, 96,192,146,167,158,122,202,175, 97,195,134,178, 26, 53,106,192, 96, 48, 32, 57, 57, 25,201,201,201,182,191,255,254,
-187, 64,175,215, 63,145,145,145,177,193,155, 94, 90, 90,218,143,225,225,225,235,135, 15, 31, 62,169, 69,139, 22,163,198,142, 29,
-203,199,196,196, 32, 63, 63, 31, 65, 65, 65, 8, 13, 13, 69,114,114, 50,126,253,245, 87, 49, 47, 47,111,129, 40,138, 83, 51, 51,
- 51,179, 42,114,144,108, 54, 27,111,181, 90, 49,100,200, 16, 72,146,132,217,179,103,195,102,179,241, 21,144,176, 88, 44, 22, 10,
-128,100,103,103, 3,128,222, 97,184,206,158, 61, 11, 0,151,107,214,172,169, 3,128,205,155, 55, 19, 0,187,125, 13,174,185, 70,
-178, 26, 54,108,152,236, 94, 41, 58, 34, 87,142,168,151,171,185, 42, 3,227,208,161, 67,179, 76, 38, 83,143,215, 94,123,109,210,
-194,133, 11,135, 46, 92,184,240,186,149,252,253,253,151,126,246,217,103, 83,135, 14, 29,154, 5, 54, 61,195,253, 81, 25,184, 69,
-171, 42,218, 5,160, 44,205,213,171, 87,251, 60,185,166,183,168, 24, 33,196,227,136,196,242,234, 32, 95,158, 62, 85,214,132,162,
- 55, 19, 21, 20, 4, 1,159,124,242,137, 51,114,229,218,249,252, 70, 34, 88, 14,205,224,224,224,146,187, 54,173, 22,146, 36,161,
-119,239,222, 55,172,107,127,182,224, 64,199,247,132,132,132,169,203,150, 45,251,144, 82, 26, 2, 64,112, 61, 6, 21,127,138, 23,
-131,193, 12,150, 71, 68, 81, 76,117, 60, 91,208,151,135,192,218,141, 72,170,143, 38,107,125, 76, 76, 76,204,194,133, 11, 95,213,
-106,181,221,140, 70, 99, 83, 0, 80,169, 84, 71,139,139,139, 55,113, 28, 55, 39, 35, 35,195,231,135, 51,219, 13,211,203,209,209,
-209,179,135, 15, 31,254, 97,155, 54,109, 6, 61,247,220,115, 68, 16, 4,252,242,203, 47, 52, 45, 45,109, 5,199,113,111,167,167,
-167,159,191,145,131,164,209,104, 78,175, 88,177,162,246,234,213,171, 97,181, 90,177, 96,193, 2, 40,149,202,211,190,110, 79, 41,
-205, 18, 4, 97, 73,219,182,109,135,238,217,179,103, 41,165,244,152, 82,169,252,169, 67,135, 14,195,118,239,222,253, 51,165,244,
-132, 32, 8, 63,181,105,211,102,216,254,253,251,127,163,148, 30,169, 64,242,156,145, 44,155,205,115,139,162,167,200,149, 23, 10,
- 70,142, 28,105, 25, 57,114,228,107,131, 6, 13, 90,152,152,152,248,128, 99,250,134,192,192,192,163,241,241,241,251, 86,172, 88,
-113,202, 30,185, 98,230,234, 30,199,209, 33, 61, 40, 40, 8, 28,199, 57, 95,142,217,188, 43,106,132, 28,154,148, 82, 4, 5, 5,
-121,188, 49, 43, 71,147,120, 41, 75,208,233,116, 78, 77, 31, 71, 47,123, 13, 67,233,116,186, 82,105,244,241,230,166,220,125,119,
- 79,167, 47,199,204,155,166, 86,171,133,197, 98,241, 89, 19, 62, 12, 26,112,229,224,193,131,223, 1,248,174,110,221,186,103, 1,
-212, 97,166,138,193,184, 5, 6,235,228,201,147, 9,183,242,143, 47, 92,184, 80, 0, 96,170,253, 85, 41,164,166,166,158, 7,240,
- 88,213,170, 85, 63,221,189,123,247,187,246,202,245,125,111,207, 51,244,198,145, 35, 71, 30,145,201,100,243, 22, 45, 90,212,134,
- 82,138,128,128,128,221,231,206,157,123,177,130, 81,176, 81,132,144,177,142, 81,129, 38,147,105, 20, 33,228, 13, 74,105,177,203,
-114,231,247, 10, 66, 81,210,217, 46,162,140,229,190, 68,174,174,139,100, 1, 48,175, 88,177,162, 8,192, 97,252, 59,207,149,213,
-254, 50,193,165, 89,144,113,239, 98,179,217,210, 58,117,234, 36,120,187,129,242,176, 93,106,121, 55,104,237,219,183,199, 13,104,
-166,149,147,212, 75,109,218,180,225,124,213,114, 96,181, 90,175,150, 99,190, 82, 91,183,110,237, 49,157, 94,142, 89,185,251,222,
-186,117,235, 10,165,209,158,150,180,202,214,244,114, 60,203,196, 96, 48,228,134,134,134, 22, 25,141, 70,153,201,100,146,185, 71,
-236,213,106,117, 22, 43, 57, 12,198, 13, 26,172,123, 25,187,161,234, 91, 89,122,246,254, 80,207, 87,130,142,209,237,123,113,121,
-223, 43, 72,238, 45, 56,148, 18, 0, 3, 43, 38,247, 55,199,142, 29,123,160,178, 53,143, 31, 63,158,112, 11,210,217,186,178, 53,
-147,146,146, 18,254,171,154,229,145,150,150,246, 0, 43, 25, 12,198,205,193,177, 67,192, 96, 48, 24, 12, 6,131, 81,185, 16, 0,
- 77, 60, 45,168,200,232, 0, 66, 72,147,138,254,177, 55,125,166,201, 52,153, 38,211,100,154, 76,147,105,222,127,154,222,180,239,
-151,209,137,228, 86,118, 98,100, 67, 88,153, 38,211,100,154, 76,147,105, 50, 77,166,249, 95,132, 53, 17, 50, 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, 55, 10, 33,
-132, 68, 71, 71,119,140,140,140,108,253, 95, 61, 6, 2,203, 6, 12, 6,131,193, 96, 48, 42,131,234,213,171, 7,138,162,248, 84,
-100,100,228,139,181,107,215,174, 13, 0, 81, 81, 81,199, 40,165,115,212,106,245, 79,231,206,157, 51,255,103, 76, 38,123, 20, 2,
-131,193, 96, 48, 24,140,155, 33, 50, 50,178, 5,128, 23,213,106,245, 19, 15, 60,240,128,162, 75,151, 46, 8, 10, 10,130,205,102,
- 67, 70, 70, 6,254,254,251,111, 28, 62,124,248,154,213,106,157,103,181, 90,231,101,101,101,101,254,103, 12, 22, 33,100, 27, 0,
- 80, 74, 59,178,172,194, 96, 48, 24, 12, 6,195, 23, 34, 34, 34,102,246,236,217,243,181,160,160, 32,212,173, 91, 23, 85,171, 86,
-133,201,100,130,193, 96, 0,165, 20,130, 32,128, 82,138,194,194, 66, 28, 60,120, 16,251,246,237,179, 21, 20, 20, 44, 37,132,204,
- 73, 79, 79,255,167,148, 41,185,143,188, 8,161,148,130, 16, 66, 1,116,178,239,212, 54,150, 93, 24, 12, 6,131,193, 96,248, 66,
-100,100,100,230,230,205,155,195, 68, 81, 68,118,118, 54, 76, 38, 19,244,122,189,211, 96,241, 60, 15, 74, 41,108, 54, 27, 0, 64,
-146, 36,156, 56,113, 2,123,246,236, 65, 74, 74,202,103, 25, 25, 25,175,219,205,213,125,229, 69,156,157,220, 41,165,219,152,185,
- 98, 48, 24, 12, 6,131, 81, 81, 76, 38, 19, 22, 47, 94,140,236,236,108, 84,171, 86, 13, 81, 81, 81, 8, 8, 8,128, 74,165, 2,
- 0,167,185, 2, 0,142,227, 16, 27, 27,139, 97,195,134,129, 16, 50,204, 85,231,126,242, 34,172,147, 59,131,193, 96, 48, 24,140,
-155,193,106,177, 88,144,144,144,128,139, 23, 47, 34, 49, 49, 17,113,113,113,104,212,168, 17,178,179,179,145,158,158, 94,106,229,
-253,251,247,227,208,161, 67,232,208,161,195,125,125, 80, 28, 77,132,147, 1,116,180,187,199,142, 44,175, 48, 24, 12, 6,131,193,
-240,133,168,168,168, 17,161,161,161,243,135, 15, 31,174,110,222,188, 57, 82, 83, 83,145,150,150,134,220,220, 92,180,104,209, 2,
-177,177,177, 56,127,254, 60,214,175, 95,143, 67,135, 14, 65,169, 84, 34, 58, 58, 26,186,165,203,240, 71,100, 68, 90,122,122,122,
- 52,128,251,206,139,184,118,114,119,236,212, 54,150, 93, 24, 12, 6,131,193, 96,248, 74,100,100,100, 8, 33,228,237,200,200,200,
-151,158,120,226, 9, 89,157, 58,117,144,154,154,138,236,236,108,228,230,230, 98,239,222,189, 14, 51,134,168,168, 40, 36, 39, 39,
-227,216,177, 99, 6,147,201, 52, 58, 45, 45,237, 71,167, 41,185,143,188, 8,155,166,129,193, 96, 48, 24, 12, 70,101, 25,173,106,
- 0,166,212,169, 83,103,196,224,193,131,185,200,200, 72,164,165,165,225,239,191,255, 70,237,218,181,113,245,234, 85, 28, 60,120,
- 80, 44, 40, 40, 88, 32,138,226,212,204,204,204,172,251,245, 88,220,210,153,220, 9, 33, 77,152, 38,211,100,154, 76,147,105, 50,
- 77,166,249,223,208, 76, 79, 79, 79, 73, 79, 79,127,250,204,153, 51,177, 31,126,248,225,170,249,243,231,131,231,121, 68, 70, 70,
- 98,203,150, 45,116,243,230,205, 43,138,138,138,234,167,167,167,191,124, 63,155, 43,128,117,114,103, 48, 24, 12, 6,131, 81,201,
- 92,185,114,229, 36,128, 71,162,162,162, 30, 72, 74, 74,122, 11, 0, 36, 73,122,255,202,149, 43, 7,255, 43,199,128, 25, 44, 6,
-131,193, 96, 48, 24,183,132,180,180,180,125, 0,250,254, 23,247,157, 61,236,153,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,254, 83, 16, 0, 30, 71, 2, 80, 74,143,249, 44,114, 3, 35, 20,188,233, 51,
- 77,166,201, 52,153, 38,211,100,154, 76,243,254,211,244,166, 93, 17,255,113, 87, 27, 44, 95,230,193, 34,132, 16,122, 3, 19,102,
- 17, 66,154, 84,246,129, 98,154, 76,147,105, 50, 77,166,121,107, 52,111,164,174,247,164, 73, 8, 33, 46, 55,241, 0, 64,237, 23,
- 78,122, 55,165,243, 94,217,247,255,138,230,253,134,224,229, 0,114, 40,105, 70, 36,132, 16, 9,128, 84, 25, 7,202,126, 18,184,
-202,210, 99,220, 2,231, 93,114,142,200,191, 55, 20,236, 60, 49, 24,247,113,121,175,180,186,222,165,238,224, 29,154, 0, 68, 0,
- 34, 33,228,166, 46,182,183,226,154,116,183,239,251,127, 89,243,190, 52, 88,142, 3, 21, 26, 26,186, 33, 44, 44,172,115,118,118,
-182,100,255, 29, 81, 81, 81,224, 56, 14,130, 32, 24, 46, 94,188,232, 95,209, 63, 12, 15, 15,255, 54, 54, 54,246,169,156,156, 28,
-137,227, 56, 84,171, 86, 13,132, 16,240, 60, 15,158,231, 13,231,206,157,243,191,211, 7, 37, 62, 62, 62,215,108, 54,235,220,127,
- 87, 40, 20,198,196,196, 68,191,255, 64,101, 43,212,171, 87,239,113,141, 70,163,118,252, 22, 23, 23,231,186, 10, 61,116,232,208,
- 66, 95,245,106,213,170,181, 95,173, 86, 7, 10,130, 0,158,231, 33, 8, 2,138,139,139,243, 78,156, 56,209,202,190,124,151, 90,
-173, 14,225,121,222,145,183, 96, 52, 26,115,142, 31, 63,222,150, 93,250,174,167, 83,167, 78, 2, 42, 62,197,138,109,235,214,173,
-182,219,152, 76,206,156,232, 87,135,216, 12,205, 8, 71, 3,168, 68,242,169,160, 62,162,136, 47, 60,231,227,246,210, 29, 46, 3,
-213, 1,216, 40,165,233, 55,178,177,135,138,182,167, 8, 12,177,127, 53,114, 64, 14, 1,206,132, 0,191,102, 2,134, 82, 43,223,
-198, 11,145,163,174,143,142,142,158, 19, 30, 30,254,116, 97, 97,161,158,231,121, 16, 66,104,108,108,236,117,187, 67, 8,129, 36,
- 73,169, 73, 73, 73, 9, 94, 46,178,178,234,213,171,127, 22, 26, 26,250,164, 94,175,215, 19, 66, 64, 8,161,132, 16, 52,109,218,
-212,169,233,120, 23, 69, 49,245,216,177, 99, 9,183, 43,157,119,106,223,155, 52,105,226,212,114,104, 75,146, 84,230,190,187,106,
- 70, 71, 71,127, 22, 30, 30,254,100, 81, 81,145,158,227, 56,167,102,108,108,236, 13,167,243,110,214,188,159, 35, 88, 92, 88, 88,
-216,170, 86,173, 90,117, 90,189,122, 53,119,242,228, 73,174, 97,195,134, 16, 69, 17,146, 36,129, 82,138,248,248,120, 77, 69,255,
-172,106,213,170, 63,180,108,217,114,200,154, 53,107,184, 85,171, 86,113, 45, 91,182, 4, 33, 4,162, 40, 66, 20, 69,116,237,218,
- 85,125,147,149,133, 78, 16,132,177, 10,133,162,163,205,102,107, 4, 0, 50,153,236,132,201,100,218,102,179,217,102, 81, 74,139,
-124,209,177, 90,173,154,164,164,164,235,142, 77,171, 86,173, 20, 55,154,182,122,245,234,237,230, 56, 46,198,181,208,122,123,167,
-148, 94, 72, 74, 74,106, 83,150,102,131, 6, 13,188,106,186,255, 38, 73,210,133, 99,199,142,181, 41,207, 92,213,173, 91,119, 72,
-227,198,141, 85,191,252,242, 11, 82, 82, 82,160,213,106, 33, 73, 18, 68, 81,132,213,106,197, 35,143, 60, 66, 42,178,239,106,181,
-218,255,239,191,255,174, 19, 22, 22,134,171, 87,175, 34, 59, 59, 27,163, 70,141, 58,227,178, 60,100,203,150, 45,245,130,131,131,
-161,215,235,145,159,159,143, 97,195,134,221,243,133,171,123,135,218, 31, 16, 32,216,241, 93,148,112,109,211,206,243,239,220,172,
-174,201,100,202, 16, 69, 49,200,203, 53,189, 20, 60,207,231, 2, 8,245, 82,126,106, 2,232,203,243,124, 93,153, 76,214,128, 82,
- 90,211,102,179,133, 3,128, 92, 46,207,228,121, 62,217,106,181,158, 50,155,205,103, 1,172,161,148, 38,151,165,101, 78,244,171,
- 35,154,244,131,138, 77, 82,111,137,162, 42, 71,112, 69,171,212,255,105, 78,244, 91, 81, 1,147,117,167,204, 85,173,200,200,200,
- 79,236,159,199, 81, 74, 47,222,172,166, 8, 12,161,148, 6, 0, 64,126,126,126, 64, 74, 74, 74,213, 53,107,214,196, 78,155, 54,
-173,139,194,104,252,216, 12,156, 40,111,251,135, 58,214, 57, 40, 16, 18,237,116,203, 84, 74,221,184,237,124,101, 92,152,184,168,
-168,168, 57,189,122,245, 26,190, 96,193, 2,205,190,125,251, 52, 77,155, 54, 69,201,133, 17,206,250,158, 82,234,204, 99, 15, 62,
-216,186,220,195, 7, 64,136,140,140,156,221,171, 87,175,161,243,230,205,211,156, 58,117, 74, 83,171, 86, 45,167,166,107,158,181,
- 95,128,209,188,121,139,219,157,206, 91,186,239, 61,122,244, 24,186, 96,193, 2,205,209,163, 71, 53,245,234,213,115,106,186,123,
-103,142,227,144,144,208,210, 39,205,158, 61,123, 14,253,234,171,175, 52,137,137,137,154, 70,141, 26,217, 77, 26,156,105,188,145,
-116,222,229,154,247,159,193, 34,132,112,161,161,161,139, 19, 18, 18,122,172, 94,189,154, 7,128,196,196, 68,228,228,228, 32, 42,
- 42, 10, 58,157, 14, 42,149, 10, 70,163,177, 66,119, 89,225,225,225,223,182,106,213,106,200,234,213,171,101, 0,240,219, 19,143,
-224,130, 12, 24,115,213, 12,185, 92,142,115,231,206,129,231,249,155, 9, 29,119,240,243,243,251,113,229,202,149, 65,113,113,113,
- 92,118,118, 54,106,213,170,133,107,215,174,181,218,190,125,123,252, 51,207, 60,243, 12, 33,100, 4,165,116,187,175,154,127,252,
-241, 7,180, 90,173,243,101,177, 88,200,141,166,143,231,249,232,125,251,246,133,233,116, 58,136,162, 8, 74,105,169, 2,236, 94,
-240, 36, 73, 66,251,246,237, 45,229,158, 60, 65,136,222,183,111, 95,152, 90,173,190, 78, 75, 20, 69, 40, 20, 10,112, 28,231,184,
- 67,132,205,102, 67,155, 54,109, 44,229,221,209,213,171, 87,239,113,135,185,226, 56, 14,203,151, 47, 71,213,170, 85, 17, 22, 22,
- 6,173, 86, 11,181,186,226, 30, 88, 16, 4,132,132,132,224,165,151, 94,194,227,143, 63,142, 37, 75,150, 64, 38,147,149, 90, 30,
- 28, 28,140,191,254,250, 11,254,254,254,168, 81,163, 70,169,229,247,108, 36, 16, 8, 94,191,253,188, 51, 34, 59,168, 79,115,161,
- 91,251,152,121,206,202,181,100, 37, 42,149,172, 75, 37, 81,204,221,188,235,210, 36, 31,110, 0,170,236,218,181, 11, 74,165,210,
-183,139,187, 40,162, 85,171, 86, 85,188,148,159,222, 77,154, 52,249,237,165,151, 94,146,215,169, 83,135,200,100, 50, 8,130, 0,
- 65, 16, 28,249,177, 6,165,180,134, 36, 73,157, 50, 51, 51,233,231,159,127,254, 49, 33,100, 0,165,244, 79,143,122, 54, 67,179,
- 98,147,212,155, 82, 84, 13,239, 70,171, 95,221, 68, 80,108,146,122, 7, 8,134,115, 0,238, 90,131, 69, 8,241, 87,171,213,239,
-254,242,203, 47,114, 0,232,214,173,219,187,132,144,255, 81, 74, 11, 42,235, 63, 2, 2, 2, 16, 16, 16,128, 38, 77,154, 96,224,
-192,129,129, 45, 90,180,120,163,166,201, 52, 42, 25, 48,151, 89,134, 56, 46,122,221,150, 51, 97,142,239, 67, 31,137,147,247,232,
- 84, 39,179,164,131,139,251,218, 20,146, 72, 83, 55,237,188,144,224,101, 95,185,170, 85,171,126,218,179,103,207,199, 22, 44, 88,
-224, 7, 0,223,126,251, 45,122,247,238,141,170, 85,171, 66,173, 86, 67, 46,151, 67, 46,151, 67, 38,147, 57,223,189, 68,132,248,
-170, 85,171,126,252,240,195, 15, 15,154, 55,111,158, 31, 0,252,240,195, 15,232,211,167, 15, 66, 66, 66,224,239,239, 15,165, 82,
- 9,133, 66, 97,215, 34,240, 22,175,243,148,206,231,186,119, 65,140, 90,137,190, 31,126,130,192,192, 64,252,253,250,139,144,113,
- 28, 94,252,107, 27,252,253,253,189,214, 31,158, 52, 19, 19, 19,145,153,153,233,113,223,121,158, 47,183,188,185,238,123,239,222,
-189, 7, 57, 52,127,248,225, 7,244,232,209, 3, 33, 33, 33,208,233,116,206,125,255, 87,155,243, 73,179, 71,143, 30,131,190,250,
-234, 43,167,102,215,174, 93, 17, 28, 28, 12, 63, 63, 63,200,229,114,231,241,172,200, 57,186,155, 53,239, 75,131,229,232, 27, 21,
- 22, 22,246,216,218,181,107,157,103, 94, 38,147, 65,169, 84, 58, 51,135,235,133,219,215, 48,116,108,108,236, 83,171, 87,175,118,
-110,100,118, 43, 84, 42,149,170, 66,154,110,250,221, 58,119,238,188,108,237,218,181, 42,185, 92, 14,131,193,128,164,164, 36, 4,
- 4, 4, 64,161, 80,160,127,255,254,124,155, 54,109, 66, 58,119,238,252, 43, 33,100, 40,165,116,147, 55, 77, 74, 41,116, 58, 93,
- 41,131,117, 51,145,123, 66, 8,212,106, 53, 86,173, 90, 5, 65, 16, 74,101, 50, 79,149, 88,120,120,184,215,168, 4, 0, 40,149,
- 74,236,222,189, 27, 28,199, 65, 38,147, 57, 95,127,252,241, 7, 94,127,253,117,100,102,102, 58,151,249,249,121,109,221, 36, 26,
-141, 70,237, 48, 87,142,115,175, 86,171, 33,147,201,136, 32, 8,132,231,121, 0,160, 21,233, 16, 42, 8, 2,146,147,147,241,196,
- 19, 79, 96,209,162, 69,120,255,253,247, 49,116,232,208, 82,203, 11, 10, 10, 16, 20, 20,132,192,192, 64, 40,149,202, 27,206, 11,
-119, 19,146,219,209,153,250,254,199,154,146, 14, 30, 18, 32, 1, 20,212,249, 57, 35,227, 28,102,126, 58,151,247, 85, 91,169, 84,
- 98,215,174, 93,112,109,118,229, 56, 14,114,185,188,212,111,130, 32, 32, 34, 34,194, 23,189, 41, 43, 87,174, 84, 44, 95,190, 28,
-191,255,254, 59, 68, 81,132, 76, 38,131, 74,165,130,191,191, 63,130,131,131,157,175, 26, 53,106,144,239,190,251, 78,222,172, 89,
-179, 41, 0, 60, 27, 44,142, 6, 72,118,115, 5, 0, 97,221,104,245,243,171,249,160, 64,191,146, 40,206, 93,106,174, 4, 0, 19,
-191,248,226,139,144,248,248,120, 0,192, 23, 95,124, 17, 50,114,228,200,137,132,144,119, 40,165, 55,220,196,202, 3,203, 8, 33,
- 67,236, 17, 91,213, 67, 15, 61,164,248,242,203, 47,209,160, 65, 3,188,242,202, 43,193, 51, 63,254,184, 47,128, 21,101,231,165,
-210,153,105,250, 39,115, 3, 93,111,168,254,125, 1,215,178,146,241,238,187, 31,120,173,147, 1,112,145,145,145,207,124,253,245,
-215,206,238, 16,193,193,193,206, 58,200,189,142,114,188,151, 83, 47, 17,123, 84,104,228,130, 5, 11,156,154,161,161,161,165, 52,
-100, 50, 25,146, 79,252,131,117,223,206,128, 54, 36, 2,195, 94,159, 94,225,116, 70, 41, 21,136, 86, 43,208,172, 89, 51,168,213,
-106, 36,202, 74, 46,101, 14,115, 85, 94, 58,203,210,228,121,222,153, 70, 74, 41,140, 70, 35, 10, 11, 11, 33,138, 34,204,102, 51,
-226,227,227,125,218,247,175,190,250,202,169, 89,165, 74, 21,103,253,238, 90,207, 59, 94,142, 27,152,242, 52, 35, 35, 35, 71,126,
-243,205, 55, 78,205,144,144, 16,167,150, 32, 8,144,203,229,248,225,135, 31,224, 99, 68,219,103,205,138,158,119,119,205,139, 23,
- 47, 98,218,180,105,144,203,229,142, 46, 64,206,136,101, 84, 84, 20, 62,255,252,115,159,174,113,247, 85, 4, 11, 0,201,206,206,
-150, 78,158, 60,201, 29, 60,120, 16,114,185, 28,161,161,161,104,213,170, 21, 0,192, 98,177, 64, 16, 4,168,213,106, 82,175, 94,
-189, 76,199, 65,115,188,187,182,165,187,140, 48,224,174, 93,187, 38,109,216,176,129, 91, 50,176, 7,204, 20,104,241,238,116,244,
-232,211, 7,235,163, 20,224, 1,180, 58,153, 13,133, 66, 33, 68, 68, 68, 88, 29, 39,193,161,235,218, 55,203,195,168, 5, 63,173,
- 86,251,221,154, 53,107, 84, 28,199,161,176,176, 16,146, 36,161,109,219,182, 32,132,224,232,209,163,120,231,157,119,240,219,111,
-191, 97,229,202,149,234,184,184,184,239, 8, 33,141, 40,165,133, 46,102,234,152,167,204,233,239,239, 15,181, 90,237, 52, 88,106,
-181,154, 52,104,208, 32,211,209,126,238,214, 28,151,150,148,148, 20, 95,150,166, 35,146, 48, 96,192, 0,103,159, 51,199, 5,208,
-181,176, 57, 62, 39, 37, 37,121, 50,125,215,105, 74,146,132,118,237,218, 1, 0,180, 90, 45,116, 58, 29,182,108,217,226, 92, 30,
- 23, 23, 7,179,217,140, 42, 85,170,224,196,137, 19, 62,105, 94,185,114, 5,139, 23, 47,134, 76, 38, 67, 72, 72, 8,100, 50,153,
-124,211,166, 77,239,107,181,218, 0,158,231, 17, 24, 24,136, 62,125,250, 44,232,219,183,175, 35, 13,226, 31,127,252, 33,148,165,
-201,243, 60, 84, 42, 21,126,248,225, 7, 76,155, 54, 13,111,189,245,150,123,116, 15, 70,163, 17, 33, 33, 33, 8, 10, 10, 66, 80,
- 80,144, 79,233,188, 89,110,181, 38, 5, 69,210,161,245, 56,126,120, 19, 68, 42, 66, 18, 37, 80,137, 66,148, 36, 28,218,184,191,
- 94,198,133,244, 40, 10,234,236,109, 36, 22, 21,219, 58, 85, 81, 54, 0,176,106,107,182,105,182,183,116,242, 60, 15,139,197,130,
-245,235,215,227,220,185,115,216,176, 97, 3, 12, 6, 3,170, 84,169,130,192,192, 64,180,105,211, 6, 35, 71,142,244,104,176,220,
- 53, 69, 81,252, 33, 45, 45,173, 69,155, 54,109, 72,126,126, 62,178,179,179, 81, 88, 88, 8,139,197, 2,139,197,226, 60,135, 90,
-173, 22, 85,171, 86,133,193, 96,160, 38,147,233,135, 50,247, 93, 34,249, 28,193,149,243,171,132, 42,181,251,219,212,153, 91, 66,
- 76, 6,179,220, 54,127,149,102,228, 31,227,107,119,231, 40, 71,129,146, 93, 39, 4, 84, 18,197,236, 77, 59, 46,188,116,135,207,
-251,168,177, 99,199, 54,114,109,158, 30, 54,108, 24,146,146,146, 26,205,154, 53,107, 20,128, 47, 42,170,169, 6,162, 0,192, 6,
-252,133,146, 23,166, 24, 12,228,253, 85,171, 6, 0,120,114,229,202,149, 24, 58,116, 40, 62,253,248,227, 38,238, 6,171,212,241,
-164, 20,201,103,182,227,226,153, 93,144, 36,201,254,162,101,126,166,190,165,147, 20, 21, 21, 25,247,237,219,167,251,254,251,239,
- 17, 28, 28,140,154, 53,107,194,207,207, 15, 74,165,242, 58, 51,224,120,121,219,119,189, 94,111, 60,121,242,164,110,217,178,101,
- 8, 9, 9, 65,141, 26, 53,160,213,106,161, 82,169,156, 55,232,251, 54,172,196,168, 17,253,145,115,249, 20,230,254,239,113,159,
-211,249,220, 67, 93, 16,173, 86,160,255,212,233,104,212,168, 17, 86, 60,222, 15, 28, 1, 70,255,189, 23, 50,153, 12,223,247,238,
- 0,165, 82,129,209,127, 31,240, 89,243,192,129, 3,160,148,162, 70,141, 26, 48, 24, 12,206, 40,155, 92, 46,199,166, 77,155,208,
-175, 95, 63, 44, 89,178, 4, 15, 62,248,160,215,125, 47, 42, 42, 50, 30, 61,122, 84,247,211, 79, 63, 33, 56, 56, 24,213,170, 85,
-131, 70,163,113,234,185,154,152,152,152, 24,228,229,229,161,118,237,218,229,106, 22, 23, 23, 27, 19, 19, 19,117, 75,150, 44, 65,
-112,112, 48,162,163,163,161,209,104, 74, 69,194,166, 76,153, 82, 74,163, 89,179,102, 55,173, 89,209,243,238,174, 57,112,224, 64,
-212,174, 93, 27,254,254,254,206, 99,224,110,180, 43, 72, 75,148,238,230, 96, 6,160,112,121,207, 2,112,192,195,122,142,223,101,
- 0,154,219,151,137, 0, 10, 1, 4,122,208, 43, 75, 39,219, 30, 47, 14,117, 91,223,253,127, 74, 27, 44, 66,136,163, 60,118, 2,
-176, 19, 0, 26, 54,108,136,156,156, 28, 40,149, 74,180,106,213, 10, 89, 89, 89,206, 48,159, 36, 73, 24, 60,120, 48, 63,126,252,
-248, 48,142,227, 96,181, 90, 65, 41, 5,207,243,112,220,249,185,251, 0,142,227,208,166, 77, 27, 28,183, 31,211, 30,125,250, 32,
- 58, 58, 26,201, 46,119,228, 67,135, 14, 37,175,191,254,186,224,136, 94, 80, 74, 97, 48, 24,208,172, 89, 51,117, 57,209,145,255,
-253,250,235,175, 1, 10,133,194,105,174, 28,105, 57,121,242, 36,102,206,156,137, 39,159,124, 18,151, 47, 95, 70, 68, 68, 4,222,
-120,227, 13,221,140, 25, 51,254, 7, 96,170,183,179,169,211,233, 74, 25,172, 17, 35, 70, 8,109,218,180, 9,211,104, 52,206,232,
-150,221, 84,162, 77,155, 54,196, 91, 4, 75,146, 36,252,245,215, 95, 30,239, 14,221,239, 24,236,163, 46,124,210,220,183,111,159,
-211,156, 57,162, 23,142,229, 73, 73, 73,206, 8,150,221, 8,150,167, 73, 29, 70,205, 17, 38,151,201,100,242,125,251,246,125, 24,
- 17, 17,161, 27, 49, 98, 4, 10, 11, 11, 17, 25, 25,137,238,221,187, 67,146, 36, 88, 44, 22,140, 25, 51,166,220,200,139, 76, 38,
-195,254,253,251, 49, 99,198, 12,140, 31, 63, 30, 11, 22, 44, 64,183,110,221, 74, 69,176, 28,119,186,254,254,119,124,140, 67, 37,
-134,176, 0,139,205, 10,189,222, 0, 74, 69,136, 18,133, 36, 74, 56,186,245, 80,189, 11,135,207,197,174, 93,186, 88, 6, 0,198,
-109, 43, 93,183,138, 24, 56,239,231,250,157,130,229,251,182, 94,179,236,243,210,236,140, 23, 95,124, 17,147, 38, 77,194, 99,143,
- 61,134,141, 27, 55,226,237,183,223,198, 51,207, 60,227, 52,239,142,188,224, 67,179,227,215,195,134, 13,123, 97,197,138, 21, 13,
- 94,123,237, 53,206, 81, 38, 53, 26, 13, 8, 33, 48, 26,141,206,215,201,147, 39,165,231,159,127,254,180,217,108,254,186,204,140,
- 36,168,143,104,149,250, 63, 51,114,184,186, 87,254, 14,230,136,224,111, 9,173,209, 41,255,225,122,221,104,183,199,107, 6, 81,
-169, 36,194, 71, 65, 97, 50, 22,227,173,241,227,248, 59,121,170, 8, 33,189, 31,122,232,161,238, 31,126,248,225,117,203, 62,252,
-240, 67,156, 56,113,162, 59, 33, 36,185,172, 38,209, 50,204, 85,116, 64,213,170,179, 0, 64,125,229,202, 88, 3,144, 10, 0,239,
- 3, 61, 68,160,223,198,141, 27, 1, 0,213,171, 87,135, 4, 52, 38,192,143, 60,176,204, 6,172,243, 20, 81,183, 88,109, 48, 24,
-140,144,104, 73, 62,146,168, 4, 73, 44,137,130,186,155, 44,111,237,110,148, 82, 74, 8,145,120,158, 71,147, 38, 77,208,163, 71,
- 15, 40, 20, 10,232,116, 58,103, 61,239, 94, 39,249,112, 81,164, 0, 36, 66, 8, 98, 98, 98,208,189,123,119,200,229,114,104,181,
- 90,248,251,251, 59, 13, 22,207,243,104,210,166, 11,150, 45,249, 4,195,123,196, 98, 68,135,112,252,122, 52,219,167,116,214,208,
- 40, 80, 67,173, 68,195,134, 13,225,231,231, 7, 66, 0,158,231,156,233,212,106, 84,144, 59,155, 31,125,219,247, 43, 87,174, 32,
- 57, 57, 25,201,201,201,224, 56, 14,109,219,182,133, 66,161,128, 32, 8, 56,115,230, 12,166, 78,157, 10,179,217,236,211,190,115,
- 28,135,186,117,235,162, 75,151, 46, 80, 40, 20,112, 92, 43, 92,155, 6,101, 50, 25, 10, 11, 11, 81,167, 78, 29,172, 90,181, 10,
-237,219,183,247,170,217,168, 81, 35,116,234,212, 9,114,185, 28,106,181,218,217, 85, 71,225,178,175, 69, 69, 69,206,227,208,162,
- 69,139, 10,105,110,216,127, 25, 11, 55,108,129,201, 44,161, 64,111, 45,181, 65, 68, 21,127,236,252,105,188, 79,251,238,208,252,
-250,235,175,145,151,151,231,172,135, 56,142,115,190, 8, 33,136,142,142,198, 87, 95,125,229,169, 28, 58,189, 8,165,116,155,219,
-226, 80, 66,200, 90,151,243,216,135, 16,178,214,245,189,172,245,236, 31, 59, 76,156, 56, 49, 97,198,140, 25,211, 90,183,110,189,
-108,247,238,221, 75,203,210, 43, 75,103,226,196,137,177, 51,102,204,152,230,186,190,135,255,185, 62,130, 85,146,231, 8, 5,192,
- 57, 34, 51, 81, 81, 81,206,118,103,157, 78, 7,185, 92,238,220,208,102,179,225,187,239,190, 67, 88, 88, 24,194,195,195,157,239,
-101,101,232,234,213,171,131, 82,138, 87,178, 74,186, 0,253, 21, 41, 71, 50,128,135,179,168, 83, 79, 20, 69,172, 88,177, 2,126,
-126,126,206,130,174,211,233,202,109, 46, 82, 40, 20,157, 90,182,108,201,153, 76, 38,103,152,156,227, 56,156, 60,121, 18, 51,102,
-204,192,208,161, 67, 81,191,126,125,136,162,136,226,226, 98,116,238,220, 89, 54,119,238,220, 78,190, 26, 44,141, 70,227,236,119,
-100, 50,153,176,121,243,102, 4, 6, 6, 34, 40, 40, 8, 33, 33, 33, 8, 14, 14,134, 82,169,116,205, 24,229, 54, 59, 14, 24, 48,
-160, 84,228,202, 53,106,229, 90,161, 57,154,253,124,209,124,240,193, 7,157,209, 43,157, 78,135,117,235,254,173,159, 91,181,106,
- 5, 74, 41, 66, 67, 67,177,103,207, 30,175,149,110, 92, 92, 28, 36, 73, 66, 88, 88, 24,100, 50, 25,217,180,105,211,251,118,115,
- 69,100, 50, 25,254,249,231, 31, 36, 37, 37, 33, 52, 52,212,121, 87,234,141,226,226,226,140,185,115,231,138, 95,126,249, 37, 0,
-160,107,215,174,200,207,207,191,234,178, 60,103,248,240,225,165,246, 55, 55, 55, 55,231, 62,240, 87,176, 89,108,208, 27,140, 40,
- 42, 44,134, 85, 18, 97,181,137,184,154,150, 21, 56,254,245,177,178, 79,199,140, 4, 0,188, 62,251, 11, 20,126,245,111, 5,246,
-251,235, 67,194, 6,204, 92, 62, 1, 64,255,242,244,245,122, 61,140, 70, 35,170, 87,175,142, 3, 7, 14,160,176,176, 16,221,186,
-117, 43, 21,253,245,210, 4,225,122,238,205,132,144,182,125,250,244, 57,240,217,103,159,213,110,220,184, 49, 41, 46, 46, 70,113,
-113, 49,244,122, 61, 28,159,143, 29, 59, 70,151, 46, 93,122, 65,175,215,183,161,148,150,217,103, 72, 17, 95,120,206,156,232,183,
- 98,199, 17,121,159, 71, 7,246, 11, 72, 77, 75,177,229, 24, 84, 69,249,134,211, 38,145,158, 0, 21, 41, 68, 74, 65, 69, 9, 34,
-149,112, 39,199,111, 19, 66,162,235,213,171,247,252,146, 37, 75, 60, 26, 82,158,231,177,100,201, 18,180,107,215,238,121, 66,200,
-201,242, 58,247, 59,168, 9, 40,108, 50,217,248,159,127,254, 89, 14, 0, 93,186,116, 25, 95,211,106,125, 61, 25, 48, 55,110,218,
-116,208,238,221,187, 3, 52,154,146,113, 66, 1, 1, 1,160,148,242,122,189, 62,160, 77,155, 54,131,224,201, 96, 73, 20, 86,171,
- 13, 6,163, 9,121,249, 69,176,154,173,176, 73, 54,136, 54, 9, 54,169, 36, 58,106, 19, 69, 72, 54, 17, 54, 73, 4, 47,240,126,
-157, 30,172, 94, 84, 18,203, 34,121,219,246, 94,174,230, 41,139,150,140,240, 2,170, 86,173,234,108, 18,118,237, 43,227, 45,138,
-225, 1,177,164, 46,164,206,186,241,200,214,181,184,122, 98, 39,228,132, 66, 18,173,144,108, 22,136, 86, 11,120, 72, 56,113, 62,
- 13,141, 35,189,214, 33,206,116,246,124,247, 3,180,106,213, 10,191, 14,233, 15, 66,128,209,155,247, 64, 46,151, 99,233, 35,221,
-160, 80, 41,240,236,134,189,190,166,179,212,190, 39, 38, 38,226,149, 87, 94,193, 71, 31,125, 4,181, 90,237,188, 57, 57,117,234,
- 20,150, 47, 95,142,135, 30,122,200,231,125, 39,164,164,169,213,113, 12, 39, 78,156,136,244,244,116,204,154, 53, 11, 9, 9, 9,
-144,201,100,200,203,203, 67,155, 54,109,144,153,153,233,147, 38,165, 18,130,131,131,157,221,117,220,251,136, 57,110,100, 43,114,
-142, 92, 53,159,126, 36, 2,171,119, 45, 5, 1,193,222,159,198,150,186, 30,205, 95,190,163,194,154,147, 38, 77, 42,149,206,138,
- 68,175, 92,188, 8, 41, 99,121, 31, 31,235, 52,199,122,142,131,172,156, 49, 99,198, 52,247,237,189,233,185, 46,119,219,222,236,
-102,202, 50,189, 54, 17, 82, 74,105, 84, 84, 20, 36, 73,130, 78,167,131, 66, 81, 18, 1,115,191,144,106,181,218, 82,142,220, 91,
-123, 50,207,243,160,148, 58, 15, 44,239, 97,249,158, 61,123,174, 51, 1,223,124,243, 77,185,237,180, 54,155,173,145,159,159, 31,
- 10, 11, 11,157,125,164, 20, 10, 5, 38, 76,152,128,225,195,135, 59,205,149, 66,161,192,162, 69,139, 16, 31, 31, 15,179,217,220,
-168,188, 3, 42,151,203,245, 77,155, 54,229, 28, 81, 32,181, 90, 77,134, 14, 29,202, 91, 44, 22,168, 84,170, 82, 81, 39, 71,223,
- 52,111,102,200, 17,109, 90,191,126,189, 79, 17, 44, 95,251, 32, 81, 74,113,232,208,161, 82, 70,205, 62,212, 24, 0,112,248,240,
- 97,231,133,214,215,246,110, 81, 20,161, 86,171,137, 92, 46, 39, 90,173, 54, 96,196,136, 17, 78, 93,199, 57,119,236,183, 47, 29,
-173,143, 28, 57,210,185,188,229, 71,143, 30,189, 47,167, 99,144, 36, 9, 22,171, 21, 6,131, 17,133,197,122, 76,153,110,111, 81,
-155,130,125, 0,246,181, 29,245, 10, 94,236,241, 80, 23,120, 25,221, 87, 22,193,193,193,248,237,183,223, 32,147,201,176,106,213,
- 42,248,251,251,163, 95,191,126,240,247,247,199,248,241,227,241,248,227,143,251,108,176,236,121, 41,159, 16,210,118,236,216,177,
- 7, 62,254,248,227,234,213,171, 87,135,197, 98,129,217,108,134,197, 98,193,249,243,231,177,116,233,210, 20,189, 94,223,150, 82,
-154,239, 77, 79, 17, 95,120,110,237,107,181, 51,218, 13,124,196,120,226,202, 6,100, 94,201,130, 77, 76,133, 77, 20, 97,179,218,
- 74, 12,129, 36,193,102,177,129,231, 57,255,206,173,107,108, 42,233,240, 79,204, 91,247, 36,247,186,141,167,138,158, 57,115, 38,
- 39, 52, 52,212,113, 7,233,111, 54,155,137,189, 46,161, 0, 28, 29,220,139, 1, 88,124, 17, 76, 1, 70,125,250,209, 71,213, 28,
-205,247, 31,125,244, 81,181, 55, 94,123,109, 20,128, 57, 39,142, 30, 93,252,244,211, 79,143,253,229,151, 95, 74,109,243,244,211,
- 79,227,196,209,163,139,203, 10, 17, 88,173, 86, 24, 12, 38,100,103, 95,195,115,163,223,253, 55,228, 12,234,236,232,110,159,213,
- 17, 0, 84, 0,144,157,121, 22, 99, 94,121, 67, 89,214, 13, 85,227,198,141, 29,229, 29, 50,153,236,186, 78,200,174,245,187,183,
-250,195, 30, 25, 42,213,197, 66, 46,151,227,220,238,181, 24, 59,106, 16, 32,218, 0, 75, 49, 96,209,131, 90,244,160,230, 98, 16,
-133, 26,212,106,244,170,235, 72,167,163,219,134,192,115, 80, 42,254,173, 55, 53, 26, 53, 20, 42,133, 79,233,244,180,239,151, 46,
- 93,194, 75, 47,189, 4,179,217,140,129, 3, 7,194,104, 52,194,100, 50,193,104, 52, 34, 38, 38, 6, 6,131,193,231,125,151, 36,
-201, 25, 5, 28, 59,118, 44, 18, 18, 18, 48,117,234, 84,188,249,230,155,136,137,137,193,168, 81,163,176,108,217, 50,196,198,198,
- 66,175,215,123,213,116,212, 37, 58,157, 14,130, 32, 56,235, 96,215,115,229, 48, 88,190,158, 35, 79,154, 37,211,129,225,186,243,
-254,234,136,174, 21,214,156, 54,109, 26,178,179,179,175,139, 92,185, 70,176,230,205,155,119,163, 55, 68,107,125, 49, 89, 46,235,
- 37,218,127, 50, 76,152, 48,225, 45, 66,200,218, 9, 19, 38,188, 53,125,250,244, 36, 95,244,202, 88,254,135,253,253, 97,151,223,
- 18,189, 26, 44,160,100,232, 40,165,212, 25,214,116, 28, 56,199, 50, 0,208,104, 52, 88,187,118, 45, 86,172, 88, 81,234,130, 82,
- 22, 28,199, 65,146, 36,252, 25, 90,114, 34,122,219, 35, 87,142,239,189,174, 74,232,211,167, 15, 98, 98, 98, 74, 69,175,212,106,
-117,185,102, 67,146, 36, 92,186,116, 9,199,142, 29, 67,235,214,173,145,159,159, 15, 1,192,235, 71,143,162,241,136, 17, 48,217,
-141,159, 66,161,192,243,207, 63,239,211, 9, 60,112,224, 64,169, 78, 64,141, 27, 55, 78,109,211,166, 77,212,158, 61,123,156, 17,
- 45,165, 82, 9,149, 74,229, 52, 25, 62, 22,106, 12, 26, 52,168,148, 25,114, 55, 88,142,194,243,215, 95,127,249,212, 68, 72, 41,
- 69,199,142, 29,157,209, 43, 63, 63, 63,252,254,251,239,206,117, 58,116,232, 0, 66, 8,194,194,194,176,110,221, 58,175,154,142,
- 99,234, 56,247, 60,207,163,184,184, 24,137,137,137, 80, 40, 20,206,254, 25,106,181,218,185,255,140,178, 78,184, 4,179,213, 10,
-189,193,136,194,194,146,138,244,220,177, 95, 75,173, 98, 49,221,248,224, 52, 71, 36,180,160,160, 0,155, 55,111,198,111,191,253,
-134,132,132,132, 82,205,131,190, 54, 17,186,228,209, 44, 66, 72,187, 55,223,124,115,239,251,239,191, 31, 25, 18, 18, 2,139,197,
-130, 75,151, 46,225,187,239,190, 75,215,235,245,237, 40,165, 89, 21, 16,132,205,106,131, 81,111, 64,126, 97, 49, 38,127,184,168,
-204, 42, 2, 0, 44,230, 66,244,233,213, 81,113, 91, 79, 19,165,105, 0,158,113, 41, 87,139, 1, 4,216,191, 22, 80, 74,135, 87,
- 68, 79, 6,116, 26, 56,104, 80,151,177, 99,199, 58,127, 27, 59,118, 44,246,238,221,219, 69,182, 98,197, 49, 43,176,149, 95,177,
-162,201,172, 89,179,156,235,204,154, 53, 11,191,173, 88,241,183, 8,108, 45,235, 56, 90,237, 77,132, 69,197, 6,248, 7, 70, 32,
-237,226, 54,175,105,145,243, 38,208,114,234,101, 71, 29, 82, 86,191, 27, 95,205,149,235,197,182,105,211,166,112, 52, 49,203,229,
-114, 52,233, 50, 8,159,205,249, 6, 74,142, 98, 64,151,198, 8, 85, 75, 32,154, 96,200, 59, 78, 0, 9,172, 81,178,225,228,230,
-240,165,174,219,246,246,235, 56,175, 85,225,249,141,187, 32,147,201,240,219,144,222,144, 43,228,120,242,143,237, 37,131,123, 70,
- 14,128, 92,169, 64,247,249,203,125,185, 80, 59,247,253,220,185,115,216,181,107, 23, 26, 54,108,136,179,103,207, 58,251,216, 58,
-174, 91, 62,182, 38, 80,199, 60, 87,142,122,252,202,149, 43,232,211,167, 15,228,114, 57, 22, 45, 90,132,109,219,182,225,205, 55,
-223,196,211, 79, 63,141,206,157, 59,123,236, 23,235,174, 25, 27, 27, 91,234, 28,149,213, 63,170, 34,231,200,147,166, 51,255,222,
-224,121,119,213,116,116,110,247,100,214,111,182, 99,187, 75,180,200, 83,147,217,195, 30, 34, 79, 45, 81,210, 55,202, 52,125,250,
-244,164,233,211,167,247, 33,132,172,157, 62,125,122,159,114, 34, 88, 15,123,137,112, 61,140,146, 62, 87,229,215,209,110,109,159,
-157, 92, 77,148,162,156,182,108,173, 86,139,103,158,121, 6,227,199,143,119,118,100, 44, 15,135,115, 45,143,181,107,215, 94,247,
-219,170, 85,171,188, 53, 17,158, 12, 8, 8, 72,232,210,165, 11,242,243,243,113,249,242,101,232,116, 58, 52,158, 57, 19, 71, 95,
-124, 17,205, 23, 44, 0,215,165,139,179,192, 31, 61,122, 20, 74,165,242,100, 69, 79,170, 78,167, 67, 80, 80, 16, 84, 42, 21,252,
-252,252,224,231,231, 7,173, 86,235, 52, 90,222,154, 8, 29,133,249,143, 63,254, 40, 55,114,229, 26,242,245,197, 12, 81, 74,177,
-103,207,158,235, 34, 88,142,255,116, 44,115, 68, 50,124,209,180, 71, 44,169, 82,169, 4,207,243,208,104, 52,206,112,191, 74,165,
-114,190,124,141, 96,121,155, 72,180,102,205,154,165, 38, 34,149,201,100,165, 38, 34,189,247,155, 8, 77, 40, 46, 42,174,116,125,
-179,217, 12, 65, 16,240,219,111,191,225,129, 7, 30,112,154, 43,135,177,114, 61,239, 21,172,192, 82, 9, 33,157,230,206,157,187,
-239,179,207, 62, 11, 42, 42, 42,194,162, 69,139,242,139,138,138, 58, 81, 74, 83, 43,164, 5,192,106,177, 65,111, 50,161,168,176,
-228, 24,156, 79,250,213,171, 41,187,151,105,212,180,233,240,239,191,255,254,186,223,191,255,254,123,156, 61,123,118, 56,142, 30,
-221, 90, 13, 88, 48,126,252,248, 58,241,241,241,213, 0, 96,252,248,241, 41,213,128, 5,229,149,115, 71, 19, 97,145,221,172, 27,
-139,179, 43, 45,210,234,126,195,119,179, 23, 68, 66,136,211,100, 60,244,216, 51, 72,191,112, 10, 13, 53,217, 8, 11,212, 66, 42,
- 76,135,188,235,100, 28,189,166,193,236, 5,235, 43,148, 78,141, 66, 14,149,250,223,230, 38,149, 90, 5,165,189, 85,129, 16, 2,
-149, 70, 13,153, 66, 81,225,125, 63,117,234, 20, 52, 26, 13, 68, 81,188,238,122, 83,209, 17,205,148, 82,231,181,243,179,207, 62,
-195,184,113,227,176,104,209, 34, 28, 61,122, 20,205,155, 55, 71,183,110,221,112,245,234, 85, 28, 57,114, 4, 38,147,201,231,116,
-186, 94, 47, 78,156, 56,129, 77,155, 54,225,244,233,211, 72, 73, 73,185,225,243,238,222,204,104,111,193, 41, 49,175,155,254,193,
-163, 15,197,221,144,230,228,201,147,113,245,234,213,235, 34, 87,174,221,143,202,138, 96,185,122,145,114, 72,116,139, 30,193,209,
- 31,202, 97,136,220,191, 3, 8,114,252, 54, 97,194,132,183,124,221,206,245,187, 35, 2,230,107, 83,165,224,233,162,235,104, 98,
-114, 28,116,215,200,148,227,179, 70,163,113, 70,153,106,212,168, 81,110,244,202, 81,224,120,158, 71,251, 11,133, 80, 40, 20,206,
-230,188, 94, 87,165, 82, 33,242,152,152,152, 82,125,176, 92, 79,138, 39, 76, 38,211,214,173, 91,183,182,232,215,175, 31,127,226,
-196, 9, 8,130, 0, 73,146, 96,122,240, 65, 52, 95,176, 0,199,198,142, 69,135,139, 23, 97,178, 90,161, 82,169,240,215, 95,127,
- 89,244,122,253,214,138,100, 26,142,227,136,195, 96, 41,149, 74,248,249,249,193,223,223,223, 25,205,169, 72, 37, 84,214, 29,162,
-235,171, 34, 5,218,209,161,223,245,194,234, 56,127, 6,131,161,148,225,242, 21,215, 38, 3,135, 41, 10, 8, 8, 40,213, 44,234,
-136,226,249, 98,176,188, 77, 36,170, 84, 42,253,183,111,223, 94,199,223,223, 31,148, 82,100,103,103, 99,200,144, 33,103,238,249,
- 0, 22,104, 73, 39,119,131, 17, 69, 6, 99,165,235,255,244,211, 79, 56,119,238, 28, 44, 22, 11,166, 79,159,126,157,177,186,145,
- 8,150, 75,190, 58, 23, 23, 23, 39,245,236,217, 19,123,246,236,129, 82,169,180, 82, 74, 43, 60,127, 21,149, 36, 88,172, 54, 24,
- 13, 38, 20, 21, 23,227,191,192,241,163, 71, 87,104,181,218, 33, 0,116,121,121,121,124, 64, 64, 0, 52, 26, 13, 12, 6, 67, 62,
-111, 31, 41,152, 12,152,213, 86,235, 71,143, 61,246,216, 44, 0, 16,172,214,143,202,155, 7,203,105,176, 42,249, 56, 58,234,173,
-178,162, 87, 55,106,174, 8, 33, 37,195,243, 57, 14,139,166,143, 67, 67, 77, 22,226,106,105, 97,188,122, 14, 74,255, 42, 32,129,
- 53, 49,123,193,122,156, 72,190, 86,161,116, 14, 93,252, 43,170, 85,171,134,181, 79,246,135, 82,169,196,144, 95, 55,149,116,210,
- 30,245, 56,228, 42, 37,186,126,241,211, 13,237,187, 94,175, 47, 51, 82,229,107, 4,203, 85,211, 97, 0,227,226,226, 80,183,110,
- 93,108,221,186, 21,113,113,113, 56,123,246, 44,206,158, 61,139,228,228,100, 28, 61,122, 20,185,185,185, 21, 62, 71,203,151, 47,
- 71, 86, 86, 22,228,114, 57, 10, 10, 10,112,241,226,197, 50,251, 63, 87,228,188, 59,104,240,240,100, 0, 64,100,104, 64,133, 12,
-150,171,230, 39,159,124, 82,145,105, 30, 92,243,121,121, 43,101,187,245,117,114,124, 55,187,153, 29,247,239,238,235, 3,192, 85,
- 0,188,151,237,220,191,103, 79,159, 62,125,171, 35,242,101,215,229,203,234,127, 85, 42,130,229,102, 2, 12, 13, 26, 52, 80,187,
-182,159,114, 28, 7, 63, 63, 63,242,198, 27,111,240,132, 16,232,116, 58, 4, 4, 4,160, 94,189,122,176, 88,188,119, 75,144,203,
-229,134, 86,173, 90,169, 93, 67,175,132, 16,104,181, 90,254,205, 55,223, 36,223,124,243,141,199,237, 86,175, 94, 93,110,230,182,
-217,108,179, 70,140, 24,241,108,106,106,106, 80,120,120, 56, 50, 50, 50, 32,151,203, 75,102,139,237,220, 25,237, 47, 92,128,197,
-110, 24, 78,157, 58,133,133, 11, 23, 22, 91, 44,150, 89, 55, 18,193, 10, 9, 9,129, 82,169, 44, 53, 42,198, 37,180,234, 83, 4,
-171, 50,205,149, 67,211,245,194,234,248, 60,106,212, 40,231,247,138, 84,146,114,185,156, 62,252,240,195,206,103, 16, 6, 6, 6,
-162, 74,149, 42,200,204,204,252,119,164,142, 61,114,231,171,193,242, 54,145,168, 76, 38,131,197, 98,113, 54,103,126,241,197, 23,
- 55,108, 12,238, 42,131,101,147,136, 78, 23,138,200,200,250, 8, 13, 51, 66,146,196, 74,211,182,217,108, 24, 61,122,116,169, 57,
-175, 28, 23, 98,199, 36,182,142, 17,190,174,225,255,138,222,137,223,116,116,132, 2, 86,155, 61,138,167, 55,223,115,231,176, 70,
-141, 26,254,246, 38, 67,119,150, 81, 74,215,121, 60, 55,246, 41, 25,120,224,131,203,151, 47, 55, 9, 8, 8, 64,247,238,221,177,
-102,229,202,213,239, 2,206,144,141, 1, 72, 85, 95,185,242, 63,251,231, 52,111, 65, 61, 71, 19, 97,177,190,178,205, 58,185, 46,
-122,117,179, 77, 57, 28, 87,114, 99,246,251, 87, 31,161,161, 58, 19,205,171, 43,177,107,239, 17, 60, 80,141,130,154,228, 55,156,
- 78,157, 78, 87,210, 25, 95,163,129, 82,249,111,159, 43,165, 70, 13,185, 66,121,195,251,238, 26,169,186,217, 8, 22, 33, 92,169,
-227,248,236,179,207, 98,252,248,241,232,222,189, 59,206,158, 61,139,237,219,183,227,204,153, 51,120,229,149, 87, 16, 27, 27,139,
- 30, 61,122, 84,232, 28,253,254,251,239,200,207,207, 7,165, 20, 89, 89, 89, 48, 26,141,152, 52,105,210, 77,159,119, 7, 23, 54,
- 78, 3, 0,252,186,241,208, 13,107, 78,156, 56,209, 57, 7,163,227,154, 95, 94,212,202, 71,246,123,249, 94,209,237,111, 57, 30,
- 13,214,233,211,167, 61,142,149,111,212,168, 81,102,215,174, 93,195, 78,159, 62, 13,157, 78,135,122,245,234,193,100, 50,149,217,
- 12,225,250,180,237,164,164, 36,143,154,181,107,215,182, 60,244,208, 67,178,170, 85,171,150,138, 92, 57, 70,216,184, 58, 99,119,
- 77,251, 69,160,144, 16,242,124,219,182,109,127, 92,183,110,157,186, 94,189,122,200,207,207, 7, 0, 44, 90,180, 8, 47,191,252,
- 50,212,106, 53, 78,159, 62,141,254,253,251,235,245,122,253,243,174,115, 96,121,210,244,100,100,228,114,185,179,153,204,209, 84,
-166, 40, 39, 20, 93,198,147,198, 49,119,238, 92,143,115, 65,185,179, 96,193,130,146,220,234, 67, 58, 63,253,244,211, 74,211,220,
-187,119,111,169,103, 12,246,237,219,247,171, 30, 61,122, 32, 37, 37,165, 84,179, 96,121, 6,203, 93,211,219, 68,162, 60,207, 35,
- 60, 60, 28,239,191,255, 62,170, 84,169,130,170, 85,171, 94,103,176,188,157,163, 27,188,123,191,165,154,148,163,137,115, 62,155,
-220,238,171,111,127,149, 41, 21, 28,246,108,255, 21, 5,185, 87, 74, 71, 96, 45,255, 14,137, 86,196,117,133,249,208,102,159,210,
-105, 50,153,240,241,199, 31, 99,242,228,201,152, 60,121,114,185,105, 42, 99, 56,180,215,125,119, 53, 88,190,152, 45, 79,154,146,
- 36, 18,149, 38, 8, 26,109, 36, 98, 99,131, 32,249, 48, 87,167,116,231,207,187, 62, 37, 37, 37,160, 90,181,106, 56,115,230, 12,
-193,191,253,177,254, 61, 87, 10,197, 16,184,140,246,243, 88,222,129,163, 75,151, 46,109,210,180,105, 83,124,241,197, 23, 0,240,
-228,199, 27, 54, 60, 62,217, 80, 18,206,180, 79,201,240,151, 47,233, 20,169, 72, 84,154, 64,168,117,246,227, 40,249, 62,231, 41,
- 45,103,223, 29, 23,191,155,188,209,187, 78,211,177,253,249, 61,127,224,225, 94,209,216,189,239, 40, 54,167,106, 81, 77,153,142,
- 8,125, 22,164,172,147,248,223,160, 56,204, 94, 81,114, 17, 63,122,208,187, 38, 33, 4, 59,223,120, 30, 58,149, 18,143, 46,253,
- 19, 50,153, 12, 91,199, 62, 5,185, 92,142,142,159,149, 52,201, 30,251,120, 34, 4,165, 2, 13, 95,153,236, 83, 58,221, 91,106,
- 28,125,174, 92,205, 85,121, 17,172,242,246,189,168,168, 8,185,185,185,248,241,199, 31, 49,114,228, 72, 92,189,122, 21, 23, 47,
- 94,196,233,211,167,177,108,217,178, 82,215, 56, 84,224, 28, 77,152, 48, 1,175,191,254, 58, 56,142, 67,147, 38, 77, 48,121,242,
-100,180,110,221,186,194,231,200,253,188,187,227, 45,122, 85,158,230,156, 57,115, 42, 60, 96,235,126,164, 66, 29, 52, 28,145,172,
- 42, 85,170, 64,171,213, 2, 64,169, 11,172,183,102,194,178, 52,109, 54, 27,212,106, 53,212,106,117,169,105, 17,250,245,235,231,
- 53,130,101,175,252,255, 34,132, 12,107,220,184,241,119,147, 39, 79,214,118,234,212, 73, 22, 25, 25,137,248,248,120,156, 62,125,
- 26,127,252,241,135,101,222,188,121,122,189, 94, 63,146, 82,186,241, 70,234,100, 71,199,111,215, 25,237, 43,130, 40,138, 41, 23,
- 47, 94,140,248,244,211, 79,121, 66, 8,102,205,154, 85,106,130, 86,247,125,220,187,119,175,205, 91,147,140,205,102, 75,185,120,
-241, 98,196,204,153, 51, 75,105, 58, 94,238, 38,197, 23,205,178,112,236,179,251, 49,240,165,240,120,155, 72, 84, 16, 4,156, 58,
-117, 10,239,189,247, 30, 8, 33,165, 6, 78,220,203,236,218,159,254, 77,155,132,200,160, 33,131,186, 52, 37,224, 96,246, 16,233,
-229,115,242,156,230,106,192,204,229,248,253,245,199,125, 57, 23, 23,183,109,219, 86,125,218,180,105, 60,207,243,248,228,147, 79,
- 74,229, 37,247,243,254,247,223,127,139,106,181,250,242,141,238,135,197, 98,241, 58,138,170,156, 2,190,107,238, 39,239,117,255,
-234,251, 53, 50, 66,204,216,179,237, 87,228,231,121, 30,154,174,144, 9, 88,188,116,181, 77,224,185,148, 59,124,234,190,234,214,
-173,219,164, 77,155, 54, 9,213,170, 85,187, 97,145,104, 96,205,220,185,115,123,141, 24, 49, 34,184, 81,163, 70,142,193, 39, 10,
-251, 11,246,153,221,255,242,209, 36,173,154,253,233,123, 79,126,253,253, 26, 5, 71, 44,216,179,253, 87,228,187,153,245,235,163,
-209, 50, 44, 89,186,202, 34, 8,252, 41,111,117,240,141,140, 96,246,133, 22, 15,143,196,151,127, 46, 68, 88,211, 94, 24,220,183,
- 29,118,126,241, 36, 30,107,100,128,229,231,161,104, 50,120, 49, 22, 77, 44,137,222, 52,255,101,162, 79,215, 10,127,221,191, 19,
- 86,114, 28, 7,165, 74, 13,153,226,223,232,139, 66,163, 1, 95,129,136,173, 99,223,203,139, 84, 85,244,120,240, 60,143,152,152,
- 24,212,174, 93, 27,109,219,182, 69,139, 22, 45,208,185,115,103, 28, 57,114, 4, 71,142, 28,193, 43,175,188, 82,166,185,242,229,
- 28,117,239,222, 29, 61,123,246,188,233,115,227,126,222, 43, 3, 95,242,210,139, 47,190, 8, 0, 55, 27,205,186,127, 13, 86,104,
-104, 40, 20, 10,197, 13, 25, 42, 79,154,102,179,217,105,172,212,106,181, 51, 98,181,122,245,106,159, 51, 56,165,116, 35, 33, 36,
-246,157,119,222,121, 85,173, 86,119, 54, 24, 12, 13, 1, 64,163,209,156,212,235,245, 91, 44, 22,203, 28, 74,105,222,205,164,213,
-213, 96,120,112,243,229,222,226,103,101,101,245, 24, 62,124,248, 70,142,227,106,149,247, 96,102, 23,179,154,156,153,153,217,203,
-155,230, 19, 79, 60,225, 81,211,147,174, 47,154,101,152,195, 82,166,202,117,132,161, 79,153,204,203, 68,162, 50,153, 12, 58,157,
- 14, 43, 87,174, 68, 72, 72,200,125, 85,192,118, 31, 76,255,184,188,229,157,170, 40,183, 1, 8, 29, 48,115,249,229,173,217,230,
- 26,157,170, 40, 46,253,254,250,227,213,189, 24,158, 54, 51,102,204,216,105,181, 90,107,248,152,111, 47,153, 76,166,118, 21, 77,
- 59,165, 20,167, 78,157,146,158,125,246,217,236,172,172,172,193, 55,178,255,219,247, 92,250,172, 93,171,200, 42,131,250,183,107,
- 9, 66, 96, 54,155,202,106, 89,160,148, 82, 42,240, 92,202,182,189, 41,207,222,201,115, 70, 41, 61, 76, 8,153, 90,167, 78,157,
- 23, 0,148,117, 37, 92,230, 77, 39, 25, 48, 43, 76,166, 79, 19, 18, 18,222,124,235,173,183, 2,251,246,237,139,106,213,170, 33,
- 32, 32,160,194,105,218,185, 47,245,133,214, 9, 17,209,143,246,107,215,131, 35,132,154,204, 38, 47,209, 5,251,241, 20,248, 83,
-219,246,166, 52, 43, 47, 58,239, 48,229,183, 34,218,208,117,208,211,232, 58,232,105,103,126,218,188,162, 19, 18,211, 54, 32,158,
- 75,131,233,235,118, 32,254,142,172,238,125,154, 27,142,227,208,247,251,149,144,203,229,206,116,182,153, 81,122, 92, 64,189,151,
-124,127,150,186,235,190,187, 70,176, 60,212,197, 21,234,131,197,243, 60,178,179,179,113,250,244,105,100,102,102, 66,175,215,227,
-196,137, 19, 48,155,205,200,205,205,133, 99,164,225,141,164,179,178,206,209,157,212,252, 47, 24,171, 27, 50, 88,148,210,212, 7,
- 30,120,192,219,197,184, 66,163,140, 4, 65, 48,182,107,215,142,120, 26,109,224,248,172, 86,171, 13, 62,166, 47, 15,192,100, 0,
-147,237,207,155,130,217,108,190,233,142, 36,162, 40,166,183,106,213,138, 47,175, 79,130, 36, 73,153, 94,204, 80, 49,128, 74,125,
-116,248,173,208,244, 80,104,196, 23, 94,120,161, 92, 39,165,213,106,203,237, 92,228,109, 34, 81,189, 94,159, 49,124,248,112,209,
-181,169,217,117, 34,210,251, 26, 66, 47,245, 30,242, 76,141,173,217,230, 26, 0,224, 48, 89,160,244, 82, 89,155, 28, 56,112, 32,
- 19, 64,157, 91,157,180, 11, 23, 46,152, 31,120,224,129, 37,133,133,133, 47, 82, 74,245, 55,170,179,115,127,250,196,123,237,180,
- 80, 74, 15, 3, 24,117,179, 58,102,224, 68,184,209, 56,122,242,187,239, 62,250,222,187,239,214,147,128, 16,216,231,168,226,125,
- 48,105,174,236, 57,152, 81,233,115,131,137,162,152,218,166, 77,155, 10,111,227,109,121, 57, 51,137,227, 39, 84, 3, 14, 86, 92,
-243, 86,164,211,161,217,180,105, 83, 52,111,222,220,249,238,192,245,247, 22, 45, 90,248,164, 25, 23, 23,135, 70,141, 26,149, 57,
- 67,187,123,159,171, 59,189,239, 14, 28,183,190, 45, 90,172,175, 52,205,155, 77,231,189, 95,189,223,194, 33,209,247, 98,191, 25,
-166,201, 52,153,166,115, 29,158, 82, 42,178,227,201, 52,153, 38,211,188, 29,154,247, 27, 28, 59, 4, 12, 6,163,140, 40,142,200,
-142, 2,131,193, 96,220,160, 9, 5,208,164,140,202,213,103,103, 74, 8,105, 82,209, 63,246,225,238,153,105, 50, 77,166,201, 52,
-153, 38,211,100,154,247,153,166, 55,237,251, 37, 50,198,154, 8,153, 38,211,100,154, 76,147,105, 50, 77,166,121,199, 53,239, 55,
- 88, 19, 33,131,193, 96, 48, 24, 12, 70, 37, 35,176, 67,192, 96,252,183,153, 66,200, 77,221,104,189, 71,169,196,210,201, 96, 48,
- 24,165, 97, 17, 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,248, 79,
-113, 75, 71, 17, 50, 24,140,187, 31,214, 7,139,193, 96, 48, 42, 31, 22,193, 98, 48, 24, 12, 6,131,193,168,100, 4,160,244,131,
-138, 41,165,132, 29, 22, 6,131,193, 96, 48, 24,183,147,251,205,139, 8,204, 88, 49, 24, 12, 6,131,193,184, 27,184,159,188, 8,
-231,201, 57, 50, 24, 12, 6,131,193, 96,220,110,238, 39, 47,194,221,143,174,145,193, 96, 48, 24, 12,198,189,199,125, 27,193, 98,
- 81, 44, 6,131,193, 96, 48, 24,119,138,251,201,139, 8,247,155, 99,100, 48, 24, 12, 6,131,113,239,113,191,121,145, 91, 58, 77,
- 3, 33,164, 9,211,100,154, 76,147,105, 50, 77,166,201, 52,153,230,127, 13, 54, 15, 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,252,167, 16,216, 33, 96, 48,254,219,220, 43,207,232, 99,207, 18,100,
- 48, 24,247, 18, 44,130,197, 96, 48, 24, 12, 6,131, 81,201, 16, 0, 30, 71, 2, 80, 74,143,249, 44,114, 3,163, 9,188,233, 51,
- 77,166,201, 52,153, 38,211,100,154, 76,243,254,211,244,166, 93, 17,255,113, 87, 27, 44, 74,111,221,124, 94,132,144, 38,149,125,
-160,152, 38,211,100,154, 76,147,105, 50, 77,166,121,255,105,222,111,176, 38, 66,134,123,161, 17, 8, 33,194,141, 46,191, 93,154,
- 12, 6,131,193, 96,220,205,176,139, 26,195,213,232,180, 6,208,199,254,121, 45,165,116, 79, 69,150,223, 46,205, 59, 69,124,124,
-188, 90,165, 82,117,255,251,239,191,229,167, 78,157,194,222,189,123,233, 79, 63,253,100, 53, 26,141, 27, 18, 19, 19, 13, 44, 7,
-221, 31,196,197,197,245, 32,132,140, 7, 0, 74,233, 71,135, 14, 29, 90,127, 19,101,138,212,169, 83,231, 21,133, 66,209, 91, 38,
-147, 69,138,162, 72, 76, 38, 83,186,193, 96,216,152,150,150, 54,147,222, 64,199,125, 66, 72,203, 42, 85,170,140,138,141,141,173,
-119,225,194,133,148,203,151, 47, 47, 6,176, 30, 64,143,234,213,171, 15,143,137,137,169,150,148,148,116, 38, 59, 59,123, 1,165,
-244,192,157, 74, 39,131,193, 12,150,111,133,143, 11, 10, 10,122, 72,173, 86,191, 90, 84, 84, 20,231,239,239,159,100,179,217,230,
-102,100,100,172,101, 5,239,190, 49, 87, 2,128, 62,148, 82, 25, 0,240, 60,223,191,117,235,214, 53, 8, 33, 18, 33,132, 82, 74,
- 9,199,113, 45, 68, 81,228,236,235,247, 33,132, 28,160,148,218,110, 84,211,102,179, 85, 88,243, 86, 17, 27, 27, 59,141, 82, 26,
- 89,222, 58, 90,173, 54, 97,243,230,205, 13, 86,173, 90,101, 91,188,120,113,222,227,143, 63,174,123,234,169,167,132, 69,139, 22,
-125, 9,224,127,238,235, 55,110,220,248, 51,142,227,170,248,242,255,146, 36,101, 31, 63,126,252, 53,150, 19,239,138,178, 48,254,
-153, 25, 91, 59, 72, 20,248,110, 66, 71,206,110, 94,110,136, 22, 45, 90,252,240,200, 35,143, 12,169, 95,191,190, 32, 73, 18,172,
- 86, 43, 76, 38, 83,131, 67,135, 14,117, 90,191,126,125, 2,128,193, 21, 76, 91,159, 9, 19, 38, 44,156, 58,117,106,168, 76, 38,
- 35, 86,171,245,193,159,127,254,185,231,168, 81,163, 14, 47, 88,176,160,249, 99,143, 61,230,231,248,253,189,247,222,235, 69, 8,
- 25, 75, 41, 93,118,187,211,201, 96, 48,188, 24, 44, 63, 63,191,186,161,161,161,175,135,132,132,244, 74, 72, 72,200,127,254,249,
-231,207, 31, 57,114,228, 68,108,108,108,209,247,223,127,255,161,213,106,157, 87,191,126,253, 13, 5, 5, 5, 51,175, 92,185,114,
-162,130, 21, 69, 93, 0,207, 3,232, 5, 32, 26, 64, 58,128,117, 0, 22, 82, 74, 79,221,200,206, 68, 69, 69, 53,213,106,181,111,
- 18, 66, 30, 44, 46, 46,142,214,106,181,233,148,210,125,133,133,133,159,100,100,100, 28,186, 17,205,232,232,232,218, 0,198, 8,
-130,208, 94, 20,197, 90, 60,207, 95, 18, 69,113,135, 40,138, 95,164,167,167,159,185, 17,205,182,213,252,250, 74, 58,255,153, 86,
- 94, 93,173,200,104,147,235,148,130, 85, 38, 25, 83,164,226,188, 9,251, 46, 23,253,122, 55,100, 12,133, 66,193, 45, 94,188,184,
-185, 66,161, 0, 0,152,205,102,196,198,198,222,212,115,162,100, 50, 25,247,201, 39,159, 52,151,203,229, 0, 0,139,197,130, 46,
- 93,186,220, 21,207,158, 34,132, 68, 39, 38, 38, 6, 56,210,230,142, 40,138,232,223,191,127, 77,133, 66,129, 5, 11, 22,216,178,
-179,179,227,190,251,238,187,196, 47,191,252,178,202, 15, 63,252, 48,200,147,193,226, 56,174, 74, 89,154,162, 40,194, 98,177,192,
-102,179,193,108, 54,163,115,231,206,172, 54,186, 75,160,148,214,160, 0,214, 29, 49, 2, 64,200,205,104,169,213,234,134, 3, 6,
- 12, 16,178,178,178, 32,147,201, 96,177, 88,112,229,202, 21,212,174, 93,155, 55,155,205,245, 43,170,215,160, 65,131, 81,211,167,
- 79, 15,251,243,207, 63, 45, 75,150, 44, 49,117,235,214, 77, 62,114,228, 72,255, 14, 29, 58,180,143,142,142,230,190,251,238, 59,
-211,166, 77,155, 44, 79, 60,241,132,114,218,180,105, 97,235,214,173, 27, 2, 96,217,237, 78, 39,131,193, 40,199, 96,249,249,249,
-109,211,233,116,117,158,123,238,185, 83, 47,190,248,226, 6,157, 78, 39, 2,192,149, 43, 87,148,253,251,247,207, 26, 56,112,224,
- 85,189, 94,207,207,155, 55,175,250,231,159,127,190,209,207,207, 47,173,176,176,176,149, 15, 23, 50, 2,224, 85,142,227,198,116,
-239,222,125,155,213,106,205, 90,185,114,229, 47,131, 6, 13,106, 39, 73,146,246,239,191,255,254,131, 16,242, 21,128, 79,125,141,
-142, 17, 66,248,152,152,152,201,209,209,209,111,204,159, 63, 95, 89,171, 86, 45,104, 52, 26, 20, 22, 22, 86, 63,115,230, 76,181,
- 87, 95,125,181, 95,237,218,181,231, 6, 4, 4,188,147,152,152,104,245, 81,147, 68, 70, 70,254,207,223,223,255,131, 15, 63,252,
- 80,213,184,113, 99,162,209,104,144,156,156,220,100,207,158, 61,177,223,126,251,237,200,232,232,232, 41,105,105,105, 62,167,179,
- 19, 33,130,169, 78,232,250,192, 6,173, 58, 47, 88,248, 45,169,162,213, 64, 32, 4, 86,139, 69,150,169, 55,196,188, 60,250,133,
- 95, 90,215,171,186,171, 80,150,217,245,248,113,106,185,205, 23, 21, 27, 33,100, 45,207,243,253, 21, 10, 5,215,191,127,127,108,
-218,180,137, 24,141, 70, 1, 0, 84, 42,149,173,127,255,254, 80,171,213, 48,155,205, 18,128,181,246,109,148,246,237, 77,229,105,
-202,100, 50,174,115,231,206,250,131, 7, 15,230,232,245,122,153, 67,179,115,231,206,193, 74,165, 82, 99,181, 90,125,210,188,197,
-166, 18,231,206,157,187,206, 8, 93,189,122, 21, 57, 57, 57, 48,153, 76, 36, 55, 55, 23,162, 40,194,100, 50,101,137,162, 8,142,
- 43, 9,190,149,165, 41,151,203,113,250,244,233,235,126,183, 88, 44, 48, 24, 12,176, 90,173, 40, 40, 40, 80,171, 84,170, 58,237,
-219,183, 79, 5,176,170,168,168,104,230,225,195,135, 47,177,234,233,142,113,249,143,127,140,213, 1, 88, 0, 92,184, 73,227, 46,
- 1,192,142, 29, 59,144,153,153,137,172,172, 44,100,101,101,161, 90,181,106,184,145,232,255,169, 83,167,230,180,104,209,130, 28,
- 62,124,120, 13,128,133,203,151, 47, 31,112,237,218,181,249,227,198,141, 11,254,228,147, 79,174,189,249,230,155,163, 1,252,190,
-124,249,242,167,155, 54,109,218,247,232,209,163,179,239, 68, 58, 25, 12, 70, 57,157,220, 41,165,145,117,235,214,189, 54,107,214,
-172, 6, 19, 38, 76, 8, 41, 42, 42,226, 1, 32, 50, 50,210, 8, 0,122,189,158, 31, 63,126,124,232,140, 25, 51, 26, 40,149,202,
- 92,155,205, 22,234, 65,195,211, 8,131, 49,254,254,254,253,206,159, 63,191,188, 65,131, 6,193,211,167, 79,255, 71,171,213,210,
-217,179,103, 31,170, 93,187,118,196,165, 75,151,126,244,247,247,239, 2,224,141, 50,210,117,157,102,205,154, 53,223, 27, 52,104,
-208, 27,187,118,237, 82, 54,107,214, 12,126,126,126,224,121, 30,129,129,129,120,224,129, 7,200,246,237,219,149,189,123,247,126,
- 37, 63, 63,255, 19, 95, 53,163,162,162,222,232,217,179,231,135, 7, 15, 30, 84,119,237,218,149, 40, 20, 10,228,229,229, 65,161,
- 80,160,117,235,214,100,254,151, 95,168,155, 52,110,244, 94,116,116,244, 84, 95, 53, 77,117,171,108,124,252,197,241, 93,214,174,
- 91, 79,194,195,195,113,254,211,169,216,209, 33, 22,103,223,159,128,136,136, 8,172,249,243, 47,210,103,196,139,237,252,173,225,
-127,251,170, 89, 9,198,234,152,203,231, 61,177,177,177,137, 39, 78,156, 64,251,246,237,241,203, 47,191, 52, 27, 55,110,220,139,
-227,198,141,123,241,151, 95,126,105,214,190,125,123,156, 56,113, 2,177,177,177,137,148,210, 61,132,144, 23, 1, 92, 3,112,205,
-254,185, 76,205,109,219,182,161, 75,151, 46,185,203,151, 47,175, 61,105,210,164,105,147, 38, 77,154,246,203, 47,191,196,116,233,
-210, 37,119,219,182,109, 21,210,188, 21,251,238,106,168,220, 95,148, 82, 72,146,132,176,176,176,171,127,254,249, 39,237,211,167,
- 15, 95,181,106,213,244,254,253,251, 43,247,237,219, 71, 9, 33,107, 43,146, 78, 74, 41, 12, 6, 3, 12, 6, 3, 46, 92,184,160,
-158, 59,119,110,187, 55,222,120,163,238,207, 63,255, 28,245,202, 43,175,140,246,247,247, 63,212,188,121,243, 26,183,123,223,153,
-166, 51,242,120,197,110,174,138, 57,142,187,124,163,154,143, 62,250,104,147, 26, 53,106,132,255,156, 20,132, 92,121, 3,136,178,
- 0, 72,242, 64,136, 33, 45,113, 86,222, 19,145,145,145,225, 53,106,212,104, 93, 17, 77, 74,233,198,127,254,249,167, 23,165,116,
- 1,165, 84,164,148,174,120,243,205, 55,159, 37,132,252,250,230,155,111,190, 64, 41, 93, 97,255,253,155, 35, 71,142,244,165,148,
-110,185, 19,233,100,121,137,105,222, 2, 90, 2,120,216,254,106, 5,224, 1,183,239, 10,183,245,186,149,241,254,176,219,247,150,
-110,219,181,172, 84,131, 69, 8,161,142,151,203, 29,141,245,227,143, 63,222,251,237,183,223,110,202,200,200,136,136,137,137,121,
-120,192,128, 1, 53, 10, 10, 10,184,129, 3, 7,214,140,136,136,232,179,101,203,150,170, 3, 7, 14,252,123,208,160, 65,123, 8,
- 33, 94,251,205, 16, 66,106,243, 60, 63,246,240,225,195, 59,107,214,172,105, 73, 79, 79,247,107,209,162, 69, 33, 0,212,171, 87,
- 79,159,147,147,163,246,243,243,195,159,127,254,185,159, 16,242, 60, 33,164,129, 55,205,200,200,200, 22, 85,170, 84,121,227,131,
- 15, 62, 80,242, 60,239,113, 29,165, 82,137, 15, 62,248, 64,233,239,239,255, 92, 84, 84,212,131,222, 52,171, 86,173,218,208,207,
-207,111,242,220,185,115, 85,102,179, 25, 22,139, 5,225,225,225,208,233,116,200,200,200, 64,218,197,139,184,154,156,140, 87,158,
-121, 70,173, 85,171,199, 70, 70, 70, 54,247,166,217,190,166, 95,127, 93, 84,163, 78, 47,143,121, 21,199, 95,125, 6,155,162, 20,
-168, 58,102, 60,154,109, 61,134,232, 41, 51,177, 37,198, 31,137,131, 31,194,216,177,175, 67, 30, 22,211,166, 77, 53,221,227,119,
- 36,164, 41, 8, 84,169, 84,194,104, 52, 10, 59,118,236,104,111,179,217,100, 54,155, 77,182,125,251,246, 78, 27, 54,108,232, 53,
-125,250,244, 30,106,181,122,116,235,214,173,127, 32,132,204,161,148,170, 41,165,106, 0,159, 56, 34, 79,158, 52,101, 50, 25, 12,
- 6,131,236,224,193,131, 47,136,162,168, 16, 69, 81,113,240,224,193,151,182,108,217, 50,124,193,130, 5, 21,214,188, 93,240, 60,
- 15, 65, 16, 32,147,201,208,188,121,243,243, 75,151, 46,181, 70, 70, 70, 10, 95,127,253,117, 80, 88, 88,152,246,135, 31,126,200,
-203,205,205,253,184, 34,154,102,179, 25, 38,147, 9, 6,131, 1, 59,118,236,168,245,220,115,207, 9,102,179, 89, 28, 49, 98,196,
- 53,171,213,106,122,233,165,151,252,117, 58,221,235,236,254,239,206, 64, 41, 21, 1, 20, 3, 40,114, 68, 81,107,214,172,169,140,
-138,138,106, 90,179,102, 77,159,243, 99, 81, 81,209, 87,159,125,246, 89, 52,167, 12,196, 78,115,111, 44,167, 83,177, 49,240, 75,
-100,213, 28,135,240,106,117,209,179,103,207, 48, 66,200, 23,149,144,222, 85,148,210, 65,148,210,223,110,100,251, 91,157,206,150,
- 45, 91,182, 79, 72, 72, 56, 24, 31, 31,159,145,144,144,112,176,101,203,150,237,111,118,159,167,142, 34,221, 62, 26,195,167,190,
- 63,154,208,143,198,240,169, 83, 71,145,110, 44,231,222,251,120,242, 34, 46,132, 18, 66,214, 18, 66,214, 78,156, 56,177, 51,128,
- 16,183,239,109, 92,215, 3,160,240,244,238,120,185,252, 30,106, 55, 86,161, 46,223, 43,231,122,234, 82, 72, 61, 54,115,132,134,
-134,154,223,122,235,173,195, 70,163,241,216, 15, 63,252, 80,231,197, 23, 95,108, 81,163, 70,141,211, 3, 7, 14,252, 67,163,209,
-216, 28,125,116,124,228,153,222,189,123,255, 25, 28, 28, 76,178,179,179,229,102,179, 89,184,114,229,138, 92, 20, 69,194,243, 60,
-213,235,245,194,217,179,103,101, 22,139, 69,122,240,193, 7, 87,239,217,179,231,121, 0, 99,203, 19,212,104, 52, 47,125,253,245,
-215,170,178,204,149, 40,138, 40, 42, 42,130,205,102,195,148, 41, 83, 84,111,188,241,198,171, 0,246,150,167, 41,147,201, 94,153,
- 53,107,150,202,209, 4, 36, 73, 18, 14, 29, 58,132,236,171, 87, 97, 42, 44,128,185,176, 0,230,252, 92,112, 69,249, 24,222,171,
-135,106,193,111, 43, 95, 3, 48,188,220,139,170, 82, 55,227,135,133,223, 66, 20, 69,164,175,244,220, 37,226,218,174,173, 16,109,
- 86, 76,251,232, 19, 50,246,153,199,166, 3, 88,126,183,100,124,133, 66,193,125,250,233,167, 13, 20, 10, 5, 8, 33,212,108, 54,
-163,113,227,198,228, 38, 53,249, 57,115,230,180,144,203,229,196,161,217,164, 73, 19,114,183, 21,122,185, 92, 14,181, 90,141,154,
- 53,107, 26,250,246,237,187,103,206,156, 57,213,121,158,215, 8,130,240, 87,126,126,254,244,164,164,164, 10, 53, 35,153, 76, 38,
- 24,141, 70, 24,141, 70, 92,190,124,185,106,157, 58,117,200,255,254,247, 63,177,184,184, 56,230,155,111,190, 57,183,124,249,114,
-205, 23, 95,124, 49, 16,192, 24, 86,229,222, 94,234,212,169,163,240,247,247, 15,168, 30, 34, 20,203,120, 20,103,216,108,225,209,
-209,209,227, 1, 36,212,171, 87, 47,232,236,217,179,185, 81, 81, 81,123, 57,142, 91,150,146,146,146,225,197,248, 16,155,205,134,
- 23, 90,229, 97,244,131, 28,108, 54, 27,242,242,242,112,249,242,101, 36, 37, 37, 97,223,190,164, 27, 74, 99,173, 90,181,158, 81,
-169, 84,221, 21, 10, 69, 77, 81, 20, 57,189, 94,127,201,100, 50,109, 74, 79, 79,255,138,222,192,196,134,183, 42,157, 46,250, 51,
- 7, 12, 24, 16, 25, 16, 16,128,127,254,249, 39,242,200,145, 35, 51, 1, 36,220, 84,221, 33,227,190, 27,241,236, 23, 81,193,129,
-129, 72, 62,177, 38,106,213,186,159,191, 67, 73, 95, 94,198,189,127,131, 83,214, 53, 32,139, 82,234, 28,113, 62,125,250,244, 62,
-246,245,251,184,126,247, 65,191,143, 7, 99,183,214,211,239,149,102,176, 28, 35,197,202, 90, 81,165, 82,137,163, 70,141, 58,189,
-122,245,234,154, 9, 9, 9, 39,203,234, 12,236,133,182, 13, 26, 52,184,180,127,255,126, 26, 26, 26,106,150, 36,137,104, 52, 26,
- 81,173, 86, 75,249,249,249,176, 90,173,244,210,165, 75,194,229,203,151,229, 85,170, 84,145,251, 18,170,147,201,100,173,107,213,
-170, 85,102,164,160,168,168, 8,133,133,133, 48,153, 76, 8, 15, 15, 39, 28,199, 61,224, 53,172,199,113,237, 26, 52,104, 64,114,
-115,115, 17, 25, 25,137,157, 59,119,162, 40, 63, 15,166,194, 66,152,242,243, 96, 41,200,135, 88,144,135,188,171, 25,168, 25, 17,
- 77,236, 83, 13,148,139,141, 87,215, 8,211,105,113,118,234,120,180, 60,116, 9, 68, 38,199,254, 38, 17,160,214,146,174, 86,173,
-142,166,131,200, 21, 56,249,202, 83,168, 58,236, 57, 88, 57,101,212,157,200,220, 54,155,141,152, 76, 38,168, 84, 42, 91,251,246,
-237,119,240, 60,223, 73,161, 80,112,163, 71,143,198,149, 43, 87,156,217, 5, 0, 70,143, 30, 13,181, 90, 13,147,201,100, 3, 48,
-174,172, 62, 83, 54,155,141, 88,173, 86,168,213,106,107, 66, 66,194, 87, 60,207,191,164, 80, 40,248,250,245,235,103,206,152, 49,
- 35, 93,171,213,106, 47, 95,190,124, 77,161, 80,164,214,172, 89,179,149, 90,173,174,225, 77,243,118,162, 84, 42, 33, 8, 2, 56,
-142, 67, 72, 72, 72,113, 78, 78,206,190,243,231,207, 15,189, 17, 45, 81, 20, 97, 54,155, 97,181, 90, 97, 52, 26, 33, 73, 18,142,
- 28, 57, 2,165, 82, 41, 19, 69, 49, 73, 20, 69,141, 76, 38, 3,207,243,108,142,186,219, 76,124,124,124,167,102, 85,253,103,142,
-142, 48, 5,213,238,163, 45,210, 40,249,226, 33, 43,173, 45,187,117, 27,220, 99,220,184,241,186, 42, 85,170, 40, 46, 94,188,104,
-156, 61,123,118,173,223,127,255,157, 0,248,180, 60,189,244,244,244, 95,103,204,152, 17,220,169, 83,167, 24,153, 76, 70,242,242,
-242,144,149,149,133,171, 87,175,226,242,229,203, 52, 57, 57,249,188,205,102,251,165, 34,105,108,214,172,217, 55,195,134, 13, 27,
-209,184,113, 99, 25,165, 20, 86,171, 21,122,189,190,197,190,125,251,250,237,220,185,179, 61,128, 10,231,203,140,140,140, 95, 62,
-250,232, 35,109,199,142, 29, 27,200,100, 50,174, 50,210,233,118, 65,139,212,233,116,216,180,105, 19,252,253,253,225,109,180,174,
- 47, 88,108, 82, 84,112, 96, 8,140,103, 62, 67,164,127, 13, 88,108, 82, 20,203,193,247, 79, 20,171, 12, 47,114, 0,192,195, 55,
-107,134,110,149,153,186,161, 8,150,131, 43, 87,174, 40,139,138,138, 4, 73,146, 56,147,201, 36,147, 36, 9, 50,153,204, 90,193,
-255,107, 60, 96,192,128,189, 45, 91,182,212,219, 35, 24,182,128,128, 0, 91,126,126, 62,236, 6, 75, 18, 4,193,168,211,233,140,
- 49, 49, 49, 0,224,181,137,208, 96, 48, 84, 87,171,213,215,253,174,215,235, 81, 84, 84,228, 52, 88,122,189, 30,254,254,254, 40,
- 46, 46,246, 90,184, 69, 81,172,169,209,104,144,158,158, 14, 0, 40,202,203,133,177,160, 0,150,194,124, 88,242,114, 97,205,207,
-131, 53, 63, 23,156,193,128,192,232,106,176,217,108,213,188,105, 22,155, 68, 5, 15,138,171,107,127, 69,248, 75,227,202, 92,239,
-218,142, 45,208,213,169, 15,131,193, 34,220,129,140,221,154,227,184,248, 70,141, 26,161,127,255,254, 24, 60,120,240, 17,181, 90,
- 29,246,197, 23, 95, 52, 78, 75, 75,187,110,253, 71, 30,121, 4, 99,198,140,193,128, 1, 3,126,252,231,159,127,230,149,167,217,
-177, 99, 71,116,238,220, 57,120,240,224,193,201, 58,157, 46,113,225,194,133,173,166, 76,153,146,169,215,235,211, 18, 19, 19,155,
-166,166,166,106,234,213,171,183, 53, 54, 54,150,251,243,207, 63,107,148,167,121, 7, 76, 39,172, 86, 43, 44, 22, 11, 76, 38,147,
-215,178,226,118,113, 41,245,221,106,181, 58, 71, 16, 26,141, 70, 88,173, 86,178,106,213, 74,172, 89,179,134, 59,113,226,120,244,
-132, 9, 19,145,151,151, 7, 81, 20, 89, 77,123,155, 72, 72, 72,232, 37, 80,233,235, 39,170,218, 84, 79,132,219,138, 4,142, 22,
-157,249,246,157,226, 35,129,130,201, 84, 76,252,222,126,231,157,160,115,231,206, 89, 62,250,232,163,140,254,253,251,171,158,125,
-246,217, 70,127,254,249,103,251,234,213,171,127,123,249,242,229,188, 50,242,189,252,153,103,158,217, 27, 20, 20, 84,123,201,146,
- 37,153,233,233,233,193, 86,171, 85, 99, 54,155, 45,102,179,249,156,197, 98,217,105, 54,155, 55,101,100,100, 36, 86, 36,173, 58,
-157,174,217,227,143, 63, 46,203,205,205,133, 32, 8,176, 88, 44,200,202,202, 66, 92, 92, 28,191,121,243,230,198, 55,178,255,199,
-143, 31,255, 44, 50, 50,114,235,154, 53,107,186,107,181,218,120,133, 66, 81, 85, 20, 69,209,104, 52,102, 26,141,198,195, 55,146,
- 78,183, 99,145,126,232,208,161, 72, 63, 63, 63,164,165,165,129, 16,146,126,179,231, 76, 46,227, 82,146, 79,174,174, 22,233, 95,
- 11,167, 78,237,133, 92,198,165,176,156,124,223, 71,176, 90,186, 70,172,202, 49, 73,134, 9, 19, 38,188, 69, 8, 89, 59, 97,194,
-132,183,202,137, 96,137,174,235,185,172, 95,105, 55,245,229, 94,196, 11, 11, 11,133, 3, 7, 14,132, 92,190,124, 89, 87,181,106,
- 85,125,108,108,108, 30, 33,132,138,162,200, 93,187,118, 77,155,154,154,170, 10, 10, 10, 50, 85,171, 86, 45,223,199,255, 59,243,
-242,203, 47,119,156, 52,105, 82,226, 67, 15, 61,148, 13, 0,185,185,185,200,202,202,114,140,210, 66,122,122, 58,119,240,224,193,
-224,191,254,250,171, 5,124, 24,193,163, 86,171, 47, 23, 22, 22,214, 15, 12, 12,116, 94,208, 28,166,202,245,221, 98,177,160,176,
-176, 16, 90,173,214,107,225,230, 56, 46, 45, 45, 45,173,142,193,160,199,165,179,103, 97, 42,204,135,165, 32, 31,214,130, 60, 88,
-243,242, 32,230, 93, 3, 87, 84, 8,157, 90,141,194,107, 57,224,121,254,138, 55, 77,173,146, 55, 91,109,162, 34,180,103, 63,128,
-148,125,125, 14,124,160, 29,104,195,102, 80,171,127,179,222,206, 76,237,152,179,202, 49, 39,149, 90,173,198,135, 31,126,136,196,
-196, 68,169,188,102, 96,133, 66, 1,142,227, 68, 95, 52,149, 74,165,122,210,164, 73,234,195,135, 15,171, 20, 10, 5,116, 58,157,
-230,240,225,195, 77,119,239,222,205,233,245,122,190, 78,157, 58, 3,162,162,162,138,202,211,188,213, 70,202,211,111, 69, 69, 69,
-206,126, 83,215,174, 93, 19, 84, 42, 85,189, 14, 29, 58,236, 49,155,205,191,216,108,182,239, 19, 19, 19, 11,202,188,211,182, 92,
- 63, 24, 84,146, 36,216,108, 54,216,108, 54, 8,130, 32,173, 90,181, 26,159,207,155,131, 21,203,127,163, 29, 59,118, 36,127,254,
-249, 39, 36, 73, 74,101, 85,237,237, 65,146,164,153, 91,198, 63,170,130, 40, 22,153,182, 46, 45, 94,159, 35, 20,127,123,108,203,
-193, 28,171, 73, 89,183,110, 76, 67,127,191, 0,238,135,197,223, 94,203,200, 60,127,230,243,207, 83,171, 77,155, 54, 45, 48, 38,
- 38, 38,224,244,233,211, 81, 0,242,202, 48, 66, 53,159,122,234,169,145,215,174, 93,147, 45, 92,184,112, 81, 90, 90,218,118, 74,
-233,121,183,242, 17, 71, 8,249, 4,128, 12, 64, 56, 0, 27,128,141,148,210, 31,203, 41,167, 18, 33, 4, 91,183,110,189,110,180,
-159, 36, 73, 55, 60,218, 47, 35, 35, 35,247,129, 7, 30,104,118,230,204,153, 85,185,185,185, 75,220,151,107, 52,154,126,177,177,
-177, 67,246,239,223,255, 46,165,244, 92, 5, 47,152, 99, 79,156, 56,241,177, 36, 73, 53, 56,142,187, 68, 41,125,243,102,207,153,
-217, 34, 61,187,122,221,242,133,102,171, 88, 93, 33,227, 47,155, 45,210,115, 44, 39,223,247, 56,250, 72,193,213, 56,121, 48, 70,
-187,167, 79,159,174,158, 49, 99, 6,166, 79,159,158,228, 41,130,229, 48, 90,211,167, 79, 79,114,172,231,178,254,246, 74, 53, 88,
-158, 28,163,205,102,211, 77,156, 56,177,109,139, 22, 45,210, 59,117,234,148, 81,171, 86, 45,189, 75, 97, 51, 7, 6, 6,154, 77,
- 38,147, 50, 61, 61, 61,244,228,201,147,181, 36, 73, 82,251,240,127,127, 7, 6, 6, 6, 31, 60,120, 48,100,217,178,101,117, 15,
- 29, 58, 84, 99,216,176, 97, 29, 77, 38, 19,204,102, 51, 46, 92,184, 80,227,235,175,191,150,228,114,121, 30, 33,228, 0, 0,175,
- 23, 89,171,213,186,231,204,153, 51,245, 30,120,224, 1, 98,181, 90, 75,153, 42,215,207, 10,133, 2,105,105,105, 84,146,164,125,
- 62,164,115,239,193,253,251,235, 52,105,212, 8,166,252, 92,152, 11,242, 96,201,207,131, 45, 63, 15, 82, 65, 30,184,162, 66,132,
- 4,203,160, 86,107,113, 38, 61, 3,246,180,150,139,204,102, 72, 78,203, 47,168, 95,103,242,167,216, 18,227, 15,106,181, 56,155,
- 5, 1, 56,155, 11,219,156,204,194,142,221,123, 32,136,166,180, 59,153,147,205,102,179, 52,112,224,192,253, 28,199, 53,169, 44,
- 77,171,213, 42,189,248,226,139, 78,205,148,148,148,107, 41, 41, 41, 42,131,193,192,233,116,186,162, 59, 93,122,173, 86,171, 71,
-131,100, 54,155, 97, 48, 24,144,145,145,161,216,184,113, 99,251, 61,123,246,200,143, 31, 63,142, 61,123,246, 52, 95,181,106,213,
-196,134, 13, 27, 54, 59,121,242,228, 21, 95, 76,155, 36, 73,112, 92, 7, 41,165,160,148,242, 0,176,250,247,181,232,217,179, 39,
- 41, 44, 44,196,154, 53,107, 42,165, 25,133,225, 51,197,176,137,106,243,182,165,197,175,159, 85, 20, 36,233,133, 15, 18, 19, 19,
-215,247,238,221,123, 71,100,120,140, 63, 0, 40,229,186, 80,158,250,233, 66, 67, 67,149, 0, 16, 25, 25, 25,111,181, 90,231, 1,
-104,231, 73,240,145, 71, 30,105, 19, 22, 22,214, 98,221,186,117,135,211,210,210,118,184,155, 43, 0,168, 95,191,254,148, 99,199,
-142,245,146,201,100,196,165,242,167, 0, 60, 26,172, 71, 31,125,180,126,116,116,116,200,159,103, 2, 80, 32,175, 3,137,203, 3,
-229,149, 16, 3,155,225,146,188, 49,194,195, 79,134,212,169, 83,167,249,185,115,231, 14, 87,240,230,170,250, 99,143, 61,246,199,
- 55,223,124,211,176,103,207,158, 10, 0,215, 25,172,134, 13, 27, 14,220,188,121,243,160,209,163, 71, 55, 35,132,244,165,148,158,
-245, 85, 63, 49, 49,113, 23,128,214,149,121,194, 38, 45,160,155, 0,212, 96, 89,247, 63, 19,189, 2, 92,250, 96, 1,200, 66,201,
-179,148, 93,191, 59,242,189,217,101,221, 44,151,168,149,217, 45,234,229,105, 89, 22,128, 74, 11,110, 8,229,220,121,111,188,112,
-225, 66,203,199, 30,123, 44,203,213, 92,185, 30, 0,157, 78,103,242,247,247, 47,218,191,127,127,164, 40,138, 91,125,248,191,133,
-155, 55,111,222, 50,119,238,220,165,193,193,193,214,225,195,135,115,227,199,143,223,145,147,147, 67,115,114,114,240,197, 23, 95,
-116,104,223,190,253,142, 75,151, 46,137,137,137,137, 79, 3,232,233, 77, 80,175,215,127,249,210, 75, 47, 13,217,177, 99,135,202,
-108, 54, 35, 47, 47,239,186,232,149,213,106, 5,207,243,152, 55,111,158,169,184,184,120,142, 15,145,140,175,190,252,242,203, 65,
- 95,127, 62, 87, 37, 88, 45,208,231,229, 66,180,191,120, 99, 49,116, 42, 14,117, 90,132, 34, 47, 93,137,197,235,118, 25,108, 54,
-219,151, 94, 13,150,177,104,220,232, 23,158, 95,187,241,239, 45, 8,105,215, 5,217, 91,254,186, 62, 26, 20, 26, 14,179,197,130,
- 15,166, 78,166,196,144, 55,254, 54,103,108,155,125,116,133, 35, 3,174,253,231,159,127,246,180,104,209,162,151,217,108, 46,207,
-136, 65,146, 36,254, 70, 52,149, 74,101,106,253,250,245,255,174, 93,187,246, 0, 0,104,212,168,209,239, 28,199,117, 41, 79,243,
- 86, 27,172, 73,147, 38, 97,198,140, 25,152, 48, 97,130,211, 32, 57,110, 0, 76, 38, 83,173,191,254,250, 75,177,107,215, 46,186,
-120,241,226,236, 71, 31,125, 52,112,216,176, 97,129, 75,150, 44,249, 31,128,241,101,105,190,249,230,155, 88,176, 96, 1, 70,141,
- 26,117,221,114,158,231,165,180,180, 84,152,204, 38,186,122,245,234,116, 65, 16,130,102,207,158,173,126,227,141, 55, 8,171,110,
-111, 15,162, 40,190,221,238,179, 85,175, 2,106,171,205,102,155,115,228,200,193,173, 0, 48,120,240,224,176,207, 62,251, 76, 1,
- 0,159,126,242,169,140, 82, 42,115, 76, 12,251,254,251,239,171, 94,120,225,133,176,178, 52,127,253,245,215,220,247,223,127, 63,
-228,217,103,159,237,185,101,203, 22, 21, 33,228, 47,148,244, 33,201,182,223, 56, 86, 1,176, 43, 52, 52, 52, 98,249,242,229,117,
-186,119,239,174,245,234, 2,139,139,191,157, 63,127,126,205,153,219,253,240,103,241, 0,164,208,193,160,193, 20,193,242, 66, 52,
-210, 93, 70,199,136,148,200, 37, 75,150, 44, 4, 16, 95, 1,115,213,248,209, 71, 31, 93,249,205, 55,223,212,122,254,249,231, 83,
-119,237,218,149, 66, 8,153,226, 97,213,156,167,158,122,234,210,162, 69,139,234, 72,146,180,158, 16,210,147, 82,122,134,229, 30,
-198,109,228,192, 45, 90,247,150, 33,148, 99, 50,158, 33,132,196, 78,152, 48,225,227,200,200,200,234,147, 39, 79,190,216,168, 81,
-163, 98,103,105,203,201,209,109,219,182, 45,166,160,160,160,208,102,179,141,160,148, 30,241, 80,120,155,184,205,137,116,137, 16,
-242,113,243,230,205,135,252,252,243,207,219,252,252,252, 10,246,238,221,235,239,239,239,159,127,252,248,113, 45,207,243,250,243,
-231,207, 99,211,166, 77, 29, 0,124,238,233, 46,201, 93, 51, 61, 61,253,159, 90,181,106,125,250,198, 27,111,188,241,238,187,239,
-170, 36, 73,130,193, 96, 64, 97, 97, 33,140, 70,163,179,115,242,178,101,203, 76, 38,147,233,235,180,180,180,189, 62,104,238,169,
- 86,173,218,130, 57,179,231,188,248,220,144,199, 20, 52, 47, 7,249, 25, 6, 16, 99, 49,116, 42, 5, 26,119,137, 66,113, 14,193,
- 55,219, 14,154,175,153, 45,203,211,210,210,182,122,211,220,121,185,240,143, 7,235,134,109,122,127,234,228,110, 19,191,255, 13,
-146, 36,225,228, 75,195,145,187,125, 19, 52,141,154,162,205,201, 44,152,205,102, 76,120,243, 13,240,250,204, 29,123, 47, 23,173,
-240,166, 89, 25,184,106,218,231,161, 58,224, 98,142, 94, 36,132,140,104,216,176, 33, 70,143, 30,141, 71, 30,121,164,212,182, 43,
- 87,174,196,252,249,243, 97, 50,153, 70, 16, 66, 14, 81, 74,231, 85, 68,179, 86,173, 90,173, 26, 55,110,204, 71, 70, 70,234,237,
-102,163, 75, 82, 82, 82,203,134, 13, 27,150,171,121,139,246, 61,247,236,217,179,254,159,124,242, 9,177, 88, 44,152, 50,101, 10,
- 28,198,210, 17,113,122,251,237,183, 35,253,252,252, 48,115,230, 76,115,118,118,118,215,156,156,156,205,115,231,206,173,178,108,
-217,178,161, 14,131,229,166,121,245,196,137, 19,126, 11, 22, 44,224,108, 54, 27, 62,251,236,179,235, 34, 90, 99,199,142,133,197,
- 98,133, 76,144,153, 77, 70, 83, 99,181, 90,125, 46, 40, 40, 72, 45, 73, 18,189, 93,231,253,191,174,121,228,200,145,141, 0, 54,
-150,115,243, 1, 0, 48, 24, 12,200,206,206, 70,118,118, 54, 2, 2, 2, 0,151, 9,102,221, 53, 13, 6,195,225, 55,223,124, 51,
-241,171,175,190,234,185,123,247,238,199,182,111,223,222,123,211,166, 77,198, 75,151, 46,217,172, 86, 43,141,136,136, 16,218,181,
-107,167,234,221,187,183, 86,169, 84,114,111,191,253,118,246,135, 31,126, 88, 5, 64, 78, 57,245, 39, 47, 73, 18, 94,107, 95,128,
- 55, 59, 11, 48,153, 74,110, 40,211,211,211,144,148,148,132, 61,123, 78,129, 16,194, 85,240,120,206, 89,178,100, 73,140, 66,161,
- 32, 75,151, 46,173,190,116,233,210, 87,188, 29,191, 31,127,252,177,230,210,165, 75,231, 17, 66,186, 81, 74, 37,150,151,152, 38,
-163,130, 6,203, 94,160,147, 0,244, 36,132,180,123,254,249,231, 63,106,216,176,161,201,102,179,201,214,175, 95,223, 32, 59, 59,
- 91, 97,179,217,222,164,148, 86,168,189,146, 82,186,128, 16,130,254,253,251,191, 89,187,118,237,205,135, 14, 29,106,246,240,195,
- 15,175, 95,185,114,101, 59,155,205,118,254,216,177, 99, 35, 0,204, 1,240,185,175,154,201,201,201, 83, 54,109,218, 68,246,238,
-221,251,250,132, 9, 19,148,161,161,161, 36, 48, 48, 16, 6,131, 1, 41, 41, 41,116,209,162, 69, 38,147,201,244,121, 64, 64,192,
- 59,190,106,134,134,134,142,223,126,240,160,226,244,185,179, 79, 63,221,235, 33, 85,245,122,245,161, 35, 64,209,181, 28,108,219,
-150,129,239,247, 29, 54,102,155, 45, 63,241, 60,239,243, 80,250,232,115, 89, 61, 55, 46,255,102,221,214,191,255,238, 54,109,198,
-199, 36,242,137,231,160,173, 81, 11, 82,205,186,216,182,117, 43, 62,124,127, 10,229,139, 50,183, 91,207,101, 62,116, 7, 67,180,
- 54,123,225, 81, 2,248, 68,146, 36, 1, 40,233,147, 53,102,204, 24,184, 62, 58,103,254,252,249, 48, 24, 12, 0, 32, 16, 66, 62,
- 33,132,124, 87,214,140,238,101,104, 86,251,227,143, 63,170,185,106, 54,108,216,208, 39,205,202, 38, 51, 51,243,157,103,158,121,
-102,134, 76, 38, 11,144, 36, 9,158, 70,187,107,181, 90, 20, 20, 20, 64, 20, 69, 91,112,112,240, 41,171,213, 10, 65, 16,202, 44,
- 71,197,197,197,239,140, 26, 53,234, 3, 66, 72,153,145, 14,181, 90,125,105,231,206,157,117,135, 13, 27,198, 45, 95,190,252,194,
-208,161, 67,149,187,119,239, 22, 1,252,198,170,167,187, 19, 74, 41,138,139,139, 1,128,150,179,206,101, 66,200,155,137,137,137,
-170, 81,163, 70,197, 63,241,196, 19,254,157, 59,119,214,185,174, 99, 48, 24,164, 53,107,214, 20, 47, 88,176, 32,103,251,246,237,
- 7, 70,142, 28, 57, 0, 37,205, 27, 30, 73, 79, 79,255,227,139, 47,190, 8,232,216,177, 99, 61, 81, 20,145,157,157,237,236,131,
-149,154,154,138, 75,151, 46, 93,146, 36,105,117, 5,119,231,165, 97,195,134,253,185,104,209,162, 26,207, 63,255,124,234,178,101,
-203, 86, 3,200,247,176,158,110,224,192,129,253, 22, 45, 90, 84,227,133, 23, 94,184, 12,224, 21, 54,195, 59,131,113, 19, 6,203,
-165,178,216, 9,160, 53, 33,164, 63,207,243,227,138,138,138, 62,163,148,174,186,137, 10,106, 1, 33,100,253,217,179,103,159, 5,
-144, 48,103,206,156,137, 0, 82,236, 97,189,238,158,250, 43,120,209, 19, 1,188, 27, 21, 21,245,235,228,201,147, 43,229, 89,132,
-246, 71,234,188, 20, 25, 25,185,236,163,101,191,190, 67, 41,141,227,168, 20, 34, 17, 46,151,227,184,127, 68, 81,252, 48, 53, 53,
-117, 91, 69, 52,127, 41, 73,103,247, 7,171,251,245,121,243,133, 97, 31,219,100,234,154, 69, 70,155, 66,171, 20,204,114,209,116,
-137, 51,228,190,189,247, 82,209, 93,121, 97, 53,153, 76,182, 1, 3, 6,124,203,113,156, 4, 0,162, 40, 10, 38,147,233,105, 95,
-243,208,237,210,188, 81,178,179,179,139, 0,188, 84,222, 58,237,219,183,255,113,221,186,117,195,186,119,239, 46,174, 93,187, 54,
-179, 79,159, 62, 66, 98, 98, 34, 5,176,169, 12,227,111, 66, 25, 79, 36,112,208,188,121,243, 26,223,125,247,221,161,103,159,125,
-214,127,222,188,121,193,251,247,239, 23,191,249,230,155,130,162,162,162,153,172,122,186, 59, 32,246, 65, 41, 50,153, 12, 26,141,
- 6,254,254,254,200,202,202,242, 58,210,147, 82,122,142, 16,242,240,184,113,227,218,143, 27, 55,238,225,232,232,232,198,213,171,
- 87,175,206,113, 28,151,145,145,145,149,146,146,146,108,177, 88, 54, 3,248, 3,128,188,118,237,218,255, 0, 88, 92,150,222,241,
-227,199, 63,136,140,140,220,242,251,239,191, 63,172, 84, 42, 27, 41, 20,138, 96,171,213,202, 21, 23, 23, 95,179, 88, 44, 39, 76,
- 38,211,218,244,244,244,221, 21,172, 59, 79, 19, 66, 58, 11,130,240,199, 55,223,124,211, 48, 35, 35,163,230,182,109,219,250,186,
-175, 23, 31, 31,191,104,209,162, 69, 53, 70,143, 30,125,110,233,210,165, 21,234,131,197, 96, 48,131,229, 91, 97, 92, 5, 96, 85,
-101,252, 49,165,244, 18,128,119,236,175, 74, 33, 45, 45,237, 40,128, 97,149,121,128,210,211,211,119, 1,232, 1,148,204,230,156,
- 82,114,209,188, 41,246, 94, 46, 92, 11, 96,237, 93,126,151,110, 34,132,140,179,143,114, 2,128,113,238,211, 38, 16, 66,142,184,
- 46,247, 22,105,186, 21,154,183,147,220,220,220,255,125,255,253,247,251, 95,126,249,101,229,224,193,131,113,226,196, 9,204,155,
- 55,207,148,155,155,187,236, 70, 53, 15, 31, 62,124,169,121,243,230,113, 11, 23, 46,124,253,235,175,191,238, 79, 8, 97,207, 34,
-188, 75, 48,155,205,231, 31,127,252,113,199,243, 83,169,227,209, 73,142,105, 59,108, 54,219,121, 31,202,145, 13,192, 22,251,203,
- 27,159,248, 80, 31,237, 1,176,167,146,203,250,101, 66,200,195,201,201,201,211, 78,159, 62,253,151,167,117,146,146,146, 86,118,
-239,222, 93,179,103,207,158,183, 42, 58,138,144,193,248,207,222,156,221,192,196,191, 21,185,243, 99,237,211,247,184,166,183, 7,
- 47,123, 90,126, 39, 52,217,121,103,154, 76,147,105, 50,205,123, 91,243,126, 67, 96,135,128,225,229,238,214,116, 51,203,111,151,
- 38,131,193, 96, 48, 24,119, 19, 4, 64,147, 50, 46,114, 62, 59, 83, 66, 72,133,231, 74,242,166,207, 52,153, 38,211,100,154, 76,
-147,105, 50,205,251, 79,211,131,246,163,110,139,210,220,244,190,190, 39, 13, 22,107, 34,100,154, 76,147,105, 50, 77,166,201, 52,
-153,230,157,214, 44,227,127,158,191, 87, 13, 22,123,160, 44,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,119,
- 55, 62,117,114, 87, 40, 20,177,148,210,145,132,144,170,132,144, 43,148,210,239,204,102,115,210,127,237, 96, 41, 20,138, 88, 66,
-200, 72, 74,105, 85, 74,233, 21, 66,200,157, 61, 14,132,144, 41,147, 75,102,147,126,111, 50, 40,110,101,123, 47,131,193, 96, 48,
- 24,140,155, 55, 88, 53,171, 85,123,140,227,201, 92,139, 85, 12, 10, 12, 12,228,190,248,226, 11,174,111,223,190, 88,179,102, 13,
- 94, 25, 51,230,149,168,168, 72, 73, 46, 8,185, 84,178,189,146,156,146,254,179, 47,127, 54,112,224,192, 76,171,213, 90,230,172,
-214, 60,207, 95, 93,185,114,101,248,205,238, 84, 84,252, 99,153, 86,139,165,204,255, 17, 4,217,213,244,127,126,241,233,127,170,
- 85,139,124,140, 39,220, 92,171, 40, 5, 5, 5, 5,113,159,127,254,185,243, 56,188,252,242,203,175, 68, 71, 69, 73,114, 25,159,
- 43,137,244,149,228,148,148,159,111,219,153,115, 49, 87, 0, 48,101, 50,200,123,132,128,153, 44, 6,131,193, 96, 48,238, 98,131,
- 69, 56,204, 91,250,213, 39, 65, 57,215,114,177,108,229,122, 52,108,216, 16,199,143, 31, 71,195,134, 13,209,174, 85, 51,174, 71,
-235,230, 28,207, 33,116,210,231,139,231, 1,240,201, 88, 88,173,214,176,223,127,255, 29,132, 16,231,132,125,142, 73,251, 10, 11,
- 11,241,234,171,175,134, 85,198, 78, 89, 45,150,176,243, 7,126,131,140, 39,176,138, 20, 86, 27,133,213, 38,193, 34, 82, 20,232,
-109,232,242,240, 48,159,255,135, 3, 55,239,187,185,159, 4,229,229,231,227,183, 63, 55,150, 58, 14, 93,218,182,228, 6,247,238,
-196,105,212,242,208,231,199,127,228,243,113,168, 12, 92,205, 85, 41,147, 85,206,227, 59, 24, 12, 6,131,193, 96,220, 97,131,101,
-182,138, 65,225,193, 1,248,254,187,239,240,230,132,247,209,160, 65, 3, 80, 74, 65, 8,193, 91,239, 78,197,172,247, 39,224,241,
- 94, 29, 96,181, 73, 65,101,105,120, 26, 97, 64, 8,193,197,139, 23, 97, 48, 24, 74,189, 98, 99, 99,125, 74,176,175,163, 22,100,
- 60,193, 31,135, 10, 97,177, 74,176,216,236, 47,171,132,206, 77,252, 42,164,105, 21,165,160, 64,127, 29, 22,126, 53, 31,111, 78,
-253,164,212,113, 24,255,214,187,248,114,198, 59, 24, 59,250, 73,152,173, 98,208,141,164,179, 34, 48, 77,166,201, 52,153, 38,211,
-100,154,247,171,230,125,105,176, 8, 33, 29, 1,108,181, 31, 52,103,100,196,106, 54,162,113,181, 16,204,159,249, 1, 40, 56, 72,
-148, 2, 20,160,146, 21,181,170,104, 96,208,235, 43,252,135,146, 36,193, 98,177,192,106,181,226,235,175,191, 70, 81, 81, 17, 36,
- 73, 66,195,134, 13, 1, 0,241,241,241,174, 17,152,203,137,137,137, 53,188,105,134, 53,125,228, 18, 40,170,187,254,246,222, 39,
-223, 98,215,161,243,160, 20, 80,170, 53, 24,244,196, 11, 16, 37, 10,139,181,226,207, 39, 53,234,245,136,208,201, 48,235,195,119,
-193,201,228,224, 64,192,113, 4, 28,145,208, 32, 58, 8,166,146,135, 19,223, 86,222,155, 12,234, 30,197,122,111, 50, 40,222, 99,
-153,154,193, 96, 48, 24,247, 30,101,121,145,123,218, 96, 1,216,234,105,103,204, 70, 3,162,131,228,168,170, 11,128,205, 38, 34,
-201, 18,129, 66,189, 17, 22,139, 21,151, 44, 22,156,251, 39, 3,109,218,180,193, 35,143, 60, 34, 90, 44, 22,200,229,242,252,149,
- 43, 87, 6,123, 51, 88, 86,171, 21, 22,139, 5,197,197,197, 88,178,100, 9, 4, 65,128, 36, 73, 14, 87,236,124,111,219,182,109,
-117,223,172, 52,170,159,219,255, 43,252, 84, 60,108, 18,133,205, 70, 97, 21, 1, 81,162,208,155, 37, 12,124,230, 29,216, 36, 9,
- 54, 73,130,217, 7,131, 85,202,176, 5,183, 68,255,137,203, 0,232,156,203,253,149, 20,111,182,229, 32, 87, 40,161,144,243, 48,
- 25,244,183,255,204, 81, 74,223, 35, 4,172,147, 59,131,193, 96, 48,238, 19,182,222, 15,198,202,221, 96, 57,221, 35,165,116,219,
-191, 6, 75, 15,155, 85,132,213, 38,194,102,181, 33,191,200,128,143, 63,254, 24, 74,165, 18,132, 16,167, 89,146, 36,137,179, 90,
-173,232,221,187,119,144,183, 63, 20, 69, 17, 22,139, 5, 22,139, 5,148, 82,240, 60,143, 7, 30,120,224,186,245,246,238,221, 91,
-161, 29,241, 83,241,168,213,109,226,117,191,239,251,245, 3, 80, 74, 33,138, 37, 47, 95, 12,150, 55,195,214,162,227, 96,152,204,
- 86, 80, 10,128,150, 68,184,238, 8,148, 82,103,159, 43, 22,185, 98, 48, 24, 12,198,125,128,187, 23,185, 47, 12, 22, 74, 66,115,
- 78,247,104, 50, 24, 96,181,218, 96,179,137,176, 90, 75,140,145, 90,173, 70,135, 14, 29, 28,215,119,231,251,250,245,235, 97,177,
- 88,188,254,161,163, 83,187,221,152,129, 82,138,101,203,150, 65, 38,147, 57, 95,114,185,188,194, 59, 98, 19, 41, 38,142,127, 13,
-114,129,131, 76,224,156,239, 34,165,160,180,196, 28,137, 18,133,201,234, 91,144,167, 60,195, 6, 0,102,147, 5,160, 20, 20, 20,
-134,226, 98, 86, 34, 24, 12, 6,131,193,168, 28, 74,121,145,123,221, 96,117, 34,132, 92,231, 60,204,134, 98,123,244, 74,132,213,
-102,115, 26,168,153, 51,103, 66, 16, 4, 40, 20, 10, 8,130,224, 52, 68,190, 24, 44,163,209,136,152,152, 24,152,205,102, 52,108,
-216, 16,148, 82, 12, 25, 50,228,186,245,246,239,223, 95,161, 29,177,138, 20,211, 63,250,236,186,223,119,254,242, 62,154, 54,170,
-133, 86,117,181, 48, 90, 36, 20,232,109, 55,109,216, 0,148, 68,176, 0, 80, 10, 24,138,245,172, 56, 48, 24, 12, 6,131,113,115,
-120,244, 34,247,180,193,178,135,226,174,115,139, 70,189, 30, 54,171,205,105,178,204,102, 51, 36, 73,194,152, 49, 99,174, 19,218,
-188,121, 51,204,102,115,249,127, 38, 8, 87,159,123,238,185, 82, 83, 36, 80, 74,241,235,175,191, 66,169, 84,150,138, 98, 17, 82,
- 49,243,106, 21, 41, 38,191,253, 6, 20, 50,190,148, 33,146, 36, 96,205, 31, 27,176,230,143, 13,206,117,121, 94,118,245,102, 12,
- 27, 0,152,205,246, 8, 22,165, 40, 46, 42,100,197,130,193, 96, 48, 24,140,155,160, 44, 47,114, 79, 27,172,178, 48, 26,138, 97,
-117,233,131,101,177, 88, 96,179,217,240,245,215, 95,151,106,206,147,201,100,224, 56,206,107, 4,235,247,223,127, 47, 53,185,103,
-124,124, 60,165,148, 98,208,160, 65,206,230,198,167,159,126, 26,207, 63,255,124,133, 13,150, 77,164,152, 50,109,166, 83,167,119,
-183,246,232,223,171, 35, 36,187, 23,190,122,108,101,133, 4,203, 51,108, 0, 96, 54,149,244,193,162, 0,244,133,172,137,144,193,
- 96, 48, 24, 12,134, 15, 6, 75, 38,112,249,231, 46, 93, 9,168,162, 85,193, 38,153, 96,147, 74, 70,254,137,162,136,231,159,127,
-222,185,222,208,161, 67, 49, 98,196, 8,143, 6,203,151,167,109, 75,146,132,157, 59,119,130, 16, 2,142,227,156,175,178, 40, 75,
-179,216, 36, 97,215,207, 83, 33, 81, 10,137, 2,146,125, 32,130,217,230, 61,218,232, 73,211,155, 97, 83,234, 2,193,115, 20,132,
- 0,231, 82, 51, 33,240, 92,126, 69,247,189,162, 48, 77,166,201, 52,153, 38,211,100,154,247,171,230,127,198, 96, 81,145,190,178,
- 96,237,222,185, 86, 81, 10,112,252,214,184,113, 99, 88, 44, 22,252,245,215, 95, 78,227,193,243,188,179, 73,207,151, 62, 88,110,
- 92,238,208,161, 67,121, 83, 49, 92,246,237, 76,227,114, 66,231,199,170,151,183,188,162, 9,243,102,216,190,217,254,239, 35, 8,
- 5,142,203, 7,165,175,176,236,196, 96, 48, 24, 12, 6,163, 92,131,117, 57, 45,109, 49,128,197,174,191, 61,252,240,195, 69,253,
-250,245, 83,219,108, 54,152,205,102, 88, 44, 22,152,205,102,231, 75,169, 84, 86,104,198, 77, 95, 38, 17,245,133,171, 71, 87,214,
-168,212,163,226,131, 97, 75, 79, 79,175,193,178, 15,131,193, 96, 48, 24,140, 10, 25, 44, 79,232,245,250, 64, 66,136,144,158,158,
-126,221,178, 43, 87,174, 0,128,237,126, 56, 40,149,110,216, 24, 12, 6,131,193, 96, 48,131, 85, 22, 91,183,110,181,221, 47, 38,
-138,193, 96, 48, 24, 12, 6,227, 86,193,177, 67,192, 96, 48, 24, 12, 6,131, 81,185, 16, 0, 77, 60, 45,168,200,232, 0, 66, 72,
-147,138,254,177, 55,125,166,201, 52,153, 38,211,100,154, 76,147,105,222,127,154,222,180, 93,183, 39,132, 60, 79, 41,253,250,158,
- 52, 88,183,242,249,192,108, 8, 43,211,100,154, 76,147,105, 50, 77,166,201, 52,111,226,127,238, 89,131,197,154, 8, 43,114,162,
-227, 95,144,177,163,192, 96, 48, 24, 12, 6,195, 27,194,237,250,163, 41, 83,166,220,148,153,123,239,189,247,164, 59,102,172,162,
- 31,173,195, 11,248, 56,174, 69,211, 94, 92,141,129,127, 82,145,140,167,169,191,158, 99,217,231,198,104,161, 35, 85,172, 68,214,
- 39, 72,167,234, 95,221, 79,120,240,108,182,126,183,222, 34,173,161,196,186,234,120, 1,205,101, 71,136,193, 96,120, 34, 58, 58,
- 58,104,215,174, 93,213,219,182,109,123, 57, 53, 53, 53,215,215,101,101, 81,181,118,194, 8, 63,157,230, 37,163,201, 84, 43,192,
-223,255,234,181,156,156, 5,233,231, 15,125,225, 88, 30, 19, 19,227,191,116,233,210,200,161, 67,135,166, 95,184,112,161,128,157,
- 1,198,109, 53, 88, 45, 91,182,172, 37, 73,210,147, 0,158,160,148, 30, 62,116,232,208,163, 55,162,179,121,243,230, 40,171,213,
-218,210,102,179,197, 1,136, 83,107,116,205, 77, 38,227, 85, 2,250, 84,175, 94,189,254,169,168, 94,124,124,252, 31, 0,122,123,
- 52, 76,132, 76, 57,120,240,224,100, 95,181,120, 1, 31,111, 88,245, 77,255, 12,189, 26,219, 18, 47, 61,242,221,167, 19, 0, 96,
-192,221,120, 66, 35, 35, 35,213, 0,158,226, 56,174,171, 82,169,172,103, 52, 26,147, 1, 28, 37,132,204, 75, 77, 77, 77,191, 33,
-131, 73, 8, 23,171,147, 61,163, 81,107,122, 70,248, 41,226,210,114, 11,210,140, 22,105,135, 68, 44,159, 84,212, 16,213, 33, 68,
- 81,187,122,224,182,215, 7,182,107,216,172,113, 93, 72,151, 14,195,152,151,213, 47, 49, 77,223,239,171,125, 87, 95,171, 67, 72,
-220, 57, 74,205,190,104, 85,171, 86, 45, 66, 20, 69, 33, 61, 61, 61,197, 81, 25,154, 76,166, 4, 0, 13, 1,156, 84, 42,149, 7,
-111,182, 82,188, 87, 52,163,163,163, 35, 37, 73,122, 54, 60, 60,252,225,204,204,204, 63, 56,142,251,230, 70,207, 55,227,191, 67,
-205, 7, 71,124, 70, 56, 82,165, 34,219, 80,137,102, 39,239,253,241,181,219,125,159, 11, 0,148,210,167,171, 87,175, 94,151, 82,
-122, 26,192,236, 82,233,242,188,172,204, 62, 48, 53, 99,219,172, 28, 51,234,169, 46,175,142,126, 90,167,209,168,161, 55, 24, 67,
-230, 45,252,225,211,154,141,219,246, 78, 62,190,171, 23, 0,152, 76,166, 1,213,170, 85,171,105, 54,155, 47, 2,248,193,155, 38,
-131,113,211, 6,171,113,227,198, 90,133, 66, 49,136,227,184,167,154,197,183,110,215,111,240, 83,196, 74, 52,248,240,141,161, 21,
-158,194,225,208,161, 67,202,140,140,140,247,107, 53,136,255, 95,167,238,253,185, 70, 13, 27,160, 74, 72, 16, 36, 78,129, 69,127,
-157, 9,217,250,213,211, 95, 0,104,125, 3,201,236,253,243,159,251,144,145, 39,130, 16,128, 16,128, 35, 64,145, 81,194, 91, 35,
-219,189, 7,192, 39,131, 69,226, 95,144,197, 54,110,216,235,204, 53, 21,254, 58,102, 5, 16, 9, 77, 80,120, 47, 18,255,130,140,
- 38,126,101,189,155, 78,102, 68, 68, 68, 92, 72, 72,200,151, 79, 63,253,116, 80,189,122,245, 34, 20, 10,133,198,104, 52,214,189,
-116,233, 82,173, 89,179,102, 61, 20, 17, 17, 49, 35, 35, 35,227,183,138,104, 54, 12, 84, 85,239,213,160,198,207,227, 71, 63,217,
-170, 94, 76, 53, 8,230, 98, 80, 83, 81,181, 75, 23,207,183,158,246,205,111,207,197, 6,200,134, 36,229, 91, 55,249,170,167,242,
-147,191,253,214,243, 67, 26,214,241,163, 48, 31,223, 9,129,167, 80,249, 5,161, 85,117, 30, 4,180,209,228,191,211,223, 2,240,
-158, 15, 70,114, 42,128,183, 0,144,136,136,136,159,101, 50,217,254, 7, 31,124,176,193,227,143, 63, 78,154, 54,109,138,127,254,
-249,167,209,154, 53,107, 30,173, 94,189,250, 41,179,217,188, 47, 36, 36,228,240,241,227,199, 45, 62,230,111,121, 78, 78, 78,115,
-133, 66,241,192,221,172, 25, 25, 25,169, 54,155,205, 79, 70, 71, 71, 63,223,175, 95,191,166,125,251,246, 37,245,235,215,199,169,
- 83,167,226,215,173, 91,247, 94,243,230,205,143,166,166,166,126,173, 80, 40,126, 72, 79, 79,247,105, 18,224,193,221,200,169, 95,
- 54,209, 6, 55,186,220,205,152, 7, 2, 80, 81, 74, 51,124, 88, 55, 28,128,134, 82,122,225,118,107,222,162, 72,203, 9, 66, 72,
-176, 61, 29,142,244,148,250,236,250, 46,138, 98,241,165, 75,151,106,151,167, 89,189,122,245, 70,146, 36,241,174,191,201,100,101,
-247, 90,176,217,108, 82, 74, 74,202,241,114,143, 17, 71,170,124,253,229,103, 1, 2, 7,136,212,254,178, 82,136,148, 66,146, 0,
- 81, 2, 68, 73,130, 77,164,144,168, 4,171,141, 98,202,123,111,221,201,106,238, 97, 0, 29, 0,108, 7, 48,167,156,101,179,203,
- 19, 9,171,211, 98,248,232,167, 71,116,126,235,141,151,116,148, 82, 80, 74,161, 86, 41, 49,238,213, 81, 10,163,209,220, 54,162,
-110,194,243, 25,103, 15, 46, 36,132,116, 6,144, 0,224,160,139,193, 98, 48, 42,215, 96, 17, 66, 72,124,124,124, 7, 74,233, 83,
- 53, 99,234, 12, 26, 56,236, 5,117,205,186, 77, 80, 36,249,227, 98,182,132, 67, 91,150, 2,192,242,138,252,249,250,245,235, 19,
- 40,197,247,163, 39,124,214,160, 89,139,150, 56,150,102,195,174, 20, 17,197,231, 68, 8,188, 1,146, 4, 80, 74, 77, 55,186,115,
-169,185, 54,236, 56,101, 6,207, 1, 28, 7,240, 28, 1, 95,193,231,116,211,196,175,172, 92,141,129,127,110,216,159,246, 8, 84,
-225,208,231,166, 65,159,155,185,142,166,252,126, 87,153,171,168,168,168, 46, 49, 49, 49,179, 95,125,245,213,170, 25, 25, 25,193,
-251,246,237,131, 82,169, 68, 80, 80,144, 80,165, 74,149, 6, 19, 38, 76,200,159, 54,109,218,184,240,240,240,127, 50, 51, 51,147,
-125, 50, 5, 58, 69,195,142,113,141,119, 79,154, 58, 57,192,148,184, 14,121, 43, 86,128,231, 36,200,181, 58, 68,168, 53,152,243,
-112,205,224, 9,235, 83,126,107,170, 86, 55, 60,106, 48,164,249, 20,117, 10, 11,238, 94,167, 94,125,228,173,157,135,179,121, 38,
-236,201, 52,161, 95,199, 4,212, 9, 82,163,133, 77, 68,136, 74,232,226,205, 96, 69, 71, 71, 7, 1, 24,159,156,156,204,201,229,
-114, 82,171, 86,173, 33, 95,127,253, 53,109,212,168,145,243,169,219,173, 91,183, 70,235,214,173, 73, 81, 81, 81,195, 93,187,118,
- 53, 92,185,114,165, 53, 42, 42, 42, 49, 45, 45,109, 81,217,145,165,218,151, 77, 38, 99, 53,165, 74,109,156, 53,107,214, 79, 15,
- 62,248,160,164, 80, 40,112, 51,154,118,227,187, 36, 58, 58, 90, 51,105,210,164,236,150, 45, 91,210,202,208,172, 85,171,214,134,
-246,237,219,119,238,222,189,187,208,182,109, 91, 68, 70, 70, 58,151, 85,169, 82, 5,237,219,183, 39, 41, 41, 41,205,118,236,216,
- 49,111,195,134, 13,115,107,213,170,181,229,226,197,139,221,125, 56, 69,245,111,114,121,169,224, 47,128,233,132,144,133,148,210,
- 93,229,212, 45,113, 0,134, 2,248,248, 14,105,150,139, 90,173,206, 52, 26,141, 97, 0,160, 82,169,174, 26, 12,134,112, 31,234,
- 75,221,172, 89,179,194,228,114, 57, 56,142,131, 40,138, 16, 69, 17,146, 36,129, 82,234,124,119, 12, 50,154, 58,117,170,232, 77,
- 83,146, 36,238,179,207, 62,147,169,213,106, 0,128,213,106, 45,245,238,192,241,125,234,212,169, 62,213, 81,106, 5,143,119,223,
-120,190, 21, 39,154, 85,229,254, 63,175, 48, 62, 51,110,246,254, 59, 96, 86,131, 40,165, 79, 2,232, 11,192, 81,198,155, 70, 69,
- 69,253,237,182,106, 83,251,123,113, 84, 84,212, 22, 0,127, 16, 66,190,247,212, 92, 24,160,245, 27,245,250,152,103,253, 40,165,
-152,178, 34, 27, 83,126,205,198,187, 3,130, 49,174,183, 6, 35,159,120, 84,251,253,226, 95, 94, 0,176,208,101,147,211,246, 40,
- 26,139, 94, 49, 42,223, 96,181,104,209,226,207, 94, 3, 70,244,124,176, 67,119,216,228, 97, 56,117,149, 32,229, 34,133,192,219,
-192, 65,194,133, 3,171, 40,199,113, 63,184,133,108,203, 28, 97,240,231,159,127,190, 86,189, 78,243, 25,111, 77,158,206, 31,203,
- 84,224,251, 29, 6,136,166,124, 24,178,207,161,248,234, 25, 20, 94, 57,129,188,180, 99, 71, 57,142,155,236,171,230,117,230,136,
- 2, 18,165, 32,148, 0,146, 61,178,203, 17, 15,235,149,175, 73, 69, 50, 62,113,195,247,143,180,232, 63, 17,103,118, 44, 6, 40,
- 55,222,251,127, 87,254,232,138,178, 52, 35, 35, 35, 31,170, 89,179,230, 39, 47,188,240, 66,244,145, 35, 71,252,245,122,125,241,
-254,253,251,183,101,100,100,132, 87,169, 82, 37,229,241,199, 31,111, 19, 22, 22, 22,214,161, 67, 7,205,250,245,235,223, 6,240,
-172, 55,205, 38, 90, 69,108,251, 86, 77,246,124,240,201, 76,109,246,111,115, 97,190,120, 4,123, 50,141, 56,146,101,160, 81,254,
-249,228,177, 38, 65,208, 42, 4, 60,255, 64,152,238,127,107,146, 63, 2, 48,204,151,125,175, 21, 21, 94,219,106, 48,192,104,176,
-224,207, 51,249,134, 61,185,249, 97,156, 95,106,214,184, 71, 18, 84,124,118, 58,170,250,201,234, 86,244,120, 18, 66,160,209,104,
- 60, 46, 11, 8, 8, 64,235,214,173, 81,187,118,109,217,208,161, 67, 31, 4,176,168, 44, 77,139,197, 18,145,150,150,142,122,245,
-235, 41,187,118,237, 74,120,158,135,217,108,190, 41, 77, 0,208,106,181,125,227,226,226,132, 31,127,252, 49, 47, 57, 57, 57,105,
-224,192,129,105, 26,141,166,212, 5, 85,163,209,160,122,245,234,120,241,197, 23,101,207, 61,247,156, 87,205,240,240,240,135, 22,
- 47, 94, 12, 66,136,243,226,237, 78,141, 26, 53, 80,181,106, 85,244,238,221, 91,120,244,209, 71, 31, 42,239,120, 14,238, 70, 78,
- 57,204,211,224,110,132,122,137,114, 81, 0,167,221, 35, 89,238,154,148,210, 28, 66,200, 2, 0,191, 19, 66, 6,121, 50, 68,132,
-144,182, 0, 86, 0,232, 69, 41,189,234,237,188,187,106, 42, 20, 10,185,197, 98, 9,114, 55, 62, 21,213,116, 73, 11, 77, 76, 76,
- 68,124,124, 60, 92,223,141, 70,163,211, 8, 17, 66,194,124,205,159, 60,207, 99,254,252,249,224, 56, 14,114,185, 28, 50,153, 12,
-114,185,252,186, 87,139, 22, 45,124, 46,239, 50,153, 12,243,231,207,135, 40,138, 92,114,114,242, 83,162, 40,246, 55, 26,141, 97,
-106,181, 58, 75, 46,151,175,237,216,177,227,119, 74,165,210, 86, 17, 77,142, 7, 56,209,172,218,180,126,181,182,172,115,110, 50,
-153,208,167,255, 99,224, 8,119,219,235,186, 93,187,118, 85,175, 94,189,122,125,123,116, 10, 0,182,167,165,165,117,112,249,238,
-202,246,180,180, 52, 71,215,144,179,151, 47, 95,174, 14, 32,215, 93,211,108,182,212,210,233,180,160,148, 98,202,175,217, 48,254,
- 24, 3,213,136, 11, 24,249,128, 9,126,126,126,176,217,108, 13,162,162,162,126, 0, 80,207, 30,189,234, 23, 21, 21, 85,159, 82,
-186, 69,169, 84,254,238,104,210,191,157,245,252,127, 65,211, 11, 45, 1,132,186,124, 55, 3,112,220,173,102,219, 13,112,136,219,
-239,174,235, 57,222,179,236,191,135,218,183,163, 46,186, 89, 0, 14, 84,170,193, 34,132, 80, 74, 41,113,188,151,177,174,127,170,
- 33, 16, 69, 23,171, 64,224, 36, 8, 60,129,192, 3, 0, 65, 78,234, 9,152,139,115,118, 30, 60,120,240,162, 47,127,250,215, 95,
-127,181,174,217,168,213, 71,147, 63,248,148,251,110,187, 1,249,122, 35,178,143,175, 70,198,254,111, 51, 36,155,101, 53,199,113,
- 7, 57,142, 59, 20,215,172,233,169,136,136, 8,241, 70,119, 78,162, 37, 33,110,167,177,146, 0,114, 3, 55, 32, 52,245,215,115,
-145, 29,223, 41,245,253,110,113,200,209,209,209,189,234,212,169, 51,253,133, 23, 94,168,113,232,208, 33,191,194,194,194,172, 77,
-155, 54,157,178, 88, 44,255,112, 28, 55, 39, 61, 61,189,227,226,197,139, 53,111,190,249,102,247,250,245,235,215,223,176, 97,131,
-222,107,228, 74, 43,111, 54, 98,248,227,123,250, 63,255,138, 42,233,215, 47,160, 60,117, 8, 95, 31,207, 21, 15,102, 26,222, 54,
- 22,217,102,171, 53, 66,219, 60,163,109,227,235,237, 35,184, 8, 63, 25,170, 5,200, 59,249,154, 94,133, 76, 41, 80, 65, 5,179,
-201,134, 98,179,100, 62,158, 69,139, 95,235,212,196, 66,181, 85, 84, 0, 32,240,156, 87,211,159,154,154,154, 27, 25, 25,249, 81,
-205,154, 53,223, 33,132,208, 14, 29, 58, 28,143,143,143, 47,150, 36, 9, 6,131, 1, 22,139, 5, 50,153, 12, 6,131, 1,151, 46,
- 93,194,190,125,251, 16, 16, 16, 80,161,227,154,151,151,135,154, 53,107, 66,163,209,220,180,166, 36, 73,100,222,188,121,170,164,
-164, 36,213,239,191,255, 30,252,218,107,175,229,183,104,209,226,196, 35,143, 60,146, 18, 28, 28,108, 57,124,248, 48,246,236,217,
-131,220,220, 92,180,106,213,202, 39, 77,139,197, 2, 65, 16, 96, 48, 24,160, 84, 42, 33, 8, 2,108, 54, 27, 36, 73,114,154,174,
-162,162, 34, 92,187,118, 13, 50,153,204,235,131,216, 29,102,105,112, 55, 66,127, 89,177,251,106, 73,219, 80,129, 21,150,124, 43,
-108,249, 86, 88,243,173,176,230, 89, 7,191, 58,179,217, 47,155, 40,169, 64, 37,188,151, 16, 50, 8,192, 10,119,147,229, 98,132,
- 6, 81, 74, 15, 87, 84,211, 98,177,236,116, 24, 31,149, 74, 21, 70, 72,137, 49, 84, 42,149, 86,147,201,212,185, 34,154, 0,144,
-152,152,136,184,184, 56,222,174, 73, 29,239, 55, 18,181, 32,132,128,231,121,200,100, 50,240, 60,143,184,184, 56,244,237,219, 23,
-245,235,215, 71,106,106, 42,182,110,221,138, 51,103,206, 64, 46,151,151,106, 58,244,134, 76, 38, 3,199,113,220,233,211,167,191,
-235,218,181,107,157, 87, 94,121, 69, 81,189,122,117,156, 58,117,170,234,188,121,243, 70,108,222,188,185,227,128, 1, 3, 70, 0,
-176,149,215,124, 88,202, 8,218, 77,147,201,100,194,137, 19, 39,202, 95,183,162, 77, 0,149, 64,219,182,109, 47, 83, 74,207,162,
-164,233,175,105, 90, 90, 90,135,168,168,168, 63, 1,184, 27,194,226,180,180,180,222, 81, 81, 81,249, 0,142, 2, 56, 77, 8,185,
-156,154,154,122,157,102, 96,128,127, 86, 81, 81,113,184, 86,171,193,219,253, 3,161, 26,113, 1, 99, 58,243,176, 90,173, 56,127,
-254, 34,106,213,140, 38,203,191, 95,229,104, 26, 76, 56,120,240, 32, 80,210, 84,152,156,146,146, 18, 9,128,117,120,191, 5,120,
-241, 34,161,132,144,181, 46,245, 64, 31,199,247, 9, 19, 38,188, 53,125,250,244, 36, 66,200, 90,215,223, 93,215,115,125,183,255,
-215, 90, 74,105,159,137, 19, 39,198,206,152, 49, 99,154, 99,221, 59, 18,193,226,121,126,224,177,191,102,239,173,107,161, 53,194,
- 99, 31,182,215, 57, 37, 17,211, 75,135,255,130, 36, 73,139,124,209,217,179,103,143,202, 38,225,187, 55,223,154,202,125,181,197,
-128,204, 43,233, 72,223,246, 49, 12, 87, 79,124,175, 86,171, 95,239,218,179,207, 77,103,220,248,248,248,216,192,144,170, 48, 89,
-168,221, 96,149, 54, 89,247, 11,145,145,145,125,235,212,169, 51,117,245,234,213, 53, 12, 6,131,223,174, 93,187,242, 54,110,220,
-120,214, 98,177,124,147,145,145,177,196,158,137, 86, 11,130,240, 62,165, 20, 58,157, 78,224,121, 94,237,200,189, 30, 35, 87, 1,
-242,184,167,159,122, 98,231,107,115, 22,170,206, 30, 59,140,185,203,255,132,146, 90,196,227, 57,230, 71,142, 21, 90, 29,153,246,
-239,222, 81,154, 52, 74, 81, 77,198, 17, 4,107,100, 85, 91, 19,162,218, 67,169,209, 91,154,171, 84,171,193,217,162, 98,176, 67,
-111,130,206, 95,174, 0,128,168,122,141,249,195, 5, 54,236,218,127, 18, 42, 85,144,220,151,125, 79, 79, 79,159, 20, 21, 21, 85,
-115,227,198,141,156, 94,175, 47, 62,114,228, 8, 66, 66, 66, 16, 22, 22, 6,127,127,127,156, 58,117, 10,155, 54,109,194,233,211,
-167, 65, 41, 45, 51, 74, 80, 22,153,153,153, 40, 40, 40,168, 20, 77,155,205, 70, 0, 32, 54, 54, 22,177,177,177,138,180,180,180,
-176,181,107,215, 6, 77,155, 54,237, 74, 68, 68,196,122,131,225,223,238, 81,238,205, 61,229, 69, 20, 0,192,104, 52,194,100, 50,
- 65, 46,151, 67,165, 82, 65, 46,151,163,160,160, 0,153,153,153, 40, 44, 44, 44,185,152, 4, 6, 58,215,247, 9, 81, 2,246,182,
- 59,120,221,239, 81, 79,133,221,224,157,238, 46,187,201,250,155, 16,226, 56,191,153,246,247, 65,229, 53,245,121,209, 44,117, 60,
- 92,162, 76,178, 27,209,140,143,143,119,104,148,170, 37, 84, 42,213, 85, 71,228, 74,165, 82, 93,245, 69,203,209, 44,168, 80, 40,
- 16, 27, 27,139,215, 95,127, 29,167, 78,157,194,206,157, 59, 17, 22, 22,134, 30, 61,122, 64, 16, 4,164,164,164,128,227, 56,159,
- 12,150, 92, 46,135,213,106,197,217,179,103,159,234,210,165, 75,204,220,185,115, 21,201,201,201, 56,117,234, 20,252,253,253,241,
-254,251,239, 43,199,143, 31, 31,189,126,253,250,231,154, 55,111, 62,223,231,186,157,148, 52,255,245,233,255,152, 7, 35,162,149,
-253,184,232, 91,133,195,120,113,119, 96, 98, 31,123, 19,223,103, 0,102,217,155, 5, 59, 0,208,166,165,165,117,182, 95,132, 0,
-128,218,155, 5, 1,224,104, 90, 90, 90,151,242,204,113,198,213,140, 5, 31,207,249,106,214,148,183,198, 42,198,245,214, 96,228,
- 3, 38,136,162, 8,158,231, 49,119,193,247,214, 51, 39,142, 29, 73, 72, 72, 88, 11,160,223,193,131, 7,145,144,144, 80, 8,224,
- 12,128,139, 10,133, 34,253,194,133, 11, 96,220, 25,220, 77,144,195, 56, 77,159, 62,189,143, 39, 83,229,193,196,149,250,125,198,
-140, 25,211, 92,190, 87,234, 40,118,193,213, 57,122,185, 11,143, 8, 12,141, 10,126, 97, 88, 15,172, 60,226,120, 32, 33,133,197,
-164,199,149, 83, 91,244,102,179,121,133, 47,127,152,147,147,243,254,200,215,103,214, 57,120, 89, 64, 70,174, 30,233,155,167, 82,
- 75, 94,242,160,190,125,251,174,172,140, 29,138,143,143,143, 13,170, 18,185,245,157,143, 22,226,239,179,102, 72, 20, 32,212,165,
-202,188, 79,102,254,138,138,138,170, 27, 20, 20,244,233,170, 85,171,194, 20, 10,133,223,209,163, 71,197,109,219,182,165, 91,173,
-214,121, 25, 25, 25,203, 92, 76,216, 19, 77,154, 52,177,106,181, 90,100,100,100, 24,173, 86,107, 81, 89,230, 42, 86,173,142,142,
- 79,104,178,253,181, 57, 11, 85, 70,179, 25,249, 6, 19, 66, 35, 34,196,157, 71, 79, 60,114,188,208,230,188, 35,104,236, 39,107,
-243,104, 66,173, 40, 78,237, 7,232, 11,144, 86, 96, 78,247,197, 92, 1,128,214, 47,144,139, 78,232,132,132, 87, 63,199,241,201,
-111, 83, 0, 8, 12,143,228, 58,191,248, 33,116,241,125, 49,255,149,167, 42, 98,129, 13,245,234,213,195, 63,255,252,227,200, 91,
-200,201,201, 65, 76, 76, 12,230,206,157, 91,106, 69,163,209,120, 67,199,185, 50, 52, 37, 73, 34,110,231, 14,163, 71,143,150,173,
- 91,183, 78,235,106,174, 42,162,105, 54,155,157,134,130, 82, 10,179,217, 12,179,217, 12,173, 86,139,179,103,207,150,246, 75,162,
-232,177,169,179,236, 4,231,123, 14,119, 89,115,172, 55, 81, 41,238, 34,132,200, 93, 76, 80, 56,128,118, 55, 98,132, 60, 25,159,
-202, 32, 49, 49, 17,158, 46,200,142,166,199, 67,135, 14,209,184,184,184,240, 10,236, 51, 20, 10, 5,250,245,235,135,147, 39, 79,
- 34, 61, 61, 29,126,126,126, 48,153, 76, 48,153, 76,136,139,139, 67,102,102,166,207,209, 43, 23,221, 94, 99,198,140, 81, 93,188,
-120, 17,215,174, 93,131, 74,165,130,205,102,131, 40,138,120,238,185,231, 84, 47,190,248, 98, 79, 0,190, 27, 44,158,160,219, 83,
- 31,121,236, 91,245,247,183,255,235,168, 84, 42,157,205, 45, 60,119, 87, 85,160,174,125,162, 42,116, 16,175, 94, 56, 58,191, 70,
-163, 54, 15,217, 44,150,206,207, 60,249,152,159, 78,171,193,249, 11,201,152,255,205,143,214,191,119,252,159,189,243,142,138,226,
-250,219,248,115,103,123, 97,233,189, 8, 40, 29, 81, 17, 80,177,162,177,119, 77,140, 26, 77, 44,177, 38, 26,163,198,154,216, 91,
-140,177,166,153,216,141, 26, 75,212,216,123,141, 29, 43, 22, 16,145,222, 59,203, 46, 91,231,190,127, 0, 6, 13,101, 65,243, 75,
-121,231,115,206, 28,216,153,217,103,239,157,185,115,231,153,239, 45,115,227,108, 70,242,211,110, 0,136,139,139,139,111, 89,228,
- 42, 38, 37, 37,229,131,186, 70, 52, 57,106, 23,197,170,100,221,232,242,129, 45, 85, 25,167,218, 24,180,138, 17,174,114,102,206,
-156,217,112,233,210,165,111,180,143, 33, 83,225, 71, 73, 53,166, 37,216,210,214,229,220,204, 37, 63,153,237,191,199, 67,110, 90,
- 52,146,110, 31,132,129, 5,210,162,127, 7, 53,234,127,125,248,240, 97,113, 77, 63,118,226,196, 9, 31, 55,223,208, 79,154,132,
- 52,199,137, 7, 26,228,222,223, 5,109,222,243,239,123,244,232,241,230,204,149,141,211,249, 89,203,126,178, 62, 20, 37, 64,226,
-243,104,156, 95,219, 27, 39,151,191,133,227, 95,190,133, 35, 75, 59,224,183,197, 29, 0,224,104,109,116, 35, 8,225,123, 90,233,
-208, 41,128,192,217, 86, 5, 18, 65,248,127,119, 33, 76, 73, 73,121, 10, 96,235, 79, 63,253, 84,116,249,242,101,227,216,177, 99,
- 99, 10, 10, 10, 22,165,166,166,238,170,112, 35,239, 80,191,126,253,169, 11, 22, 44,240, 53, 26,141,184,120,241,226, 83, 30,143,
- 87,101,251,114,148, 90,157,124,231,254,195,239, 46,239,216,128, 59,183,110, 98,251,156,201,134, 43, 15, 30,245,122,201, 92,153,
-137,252,195, 27,122, 31,254,104,226, 71, 12, 17,203,241, 36, 91,131, 52,165,254,140,201,233, 46, 82,233, 5, 98, 41,204, 28, 61,
-144,160,102,133, 46, 46, 46,215,147,243,213, 66,134,199, 7,195, 23, 34, 46, 79, 83,171,155, 56,203,254,217,143,189,106, 90, 0,
-212,216, 68, 86,163,147,123, 13,205,242, 8,214,159,252,138, 94, 79,234,170, 89,209, 96,189,106,166, 42, 59, 70,181, 50, 88,186,
-194,202,207,129, 54,231, 77, 12,236,208,150, 45,120, 29,115, 85,110,124,202, 35, 74, 98,177,248, 69, 83,155,169, 81,166,202, 34,
- 88,175,179,253,149, 27, 2, 88,150,133, 64, 32,128,183,183, 55, 10, 10, 10, 96,110,110, 14,133, 66, 1, 51, 51, 51,136,197, 98,
- 56, 56, 56, 64, 36, 18,129, 97, 24, 48, 38, 26, 23,189, 94, 15,173, 86,235,232,234,234, 10,165, 82, 9,137, 68,242, 98, 17,137,
- 68,240,245,245,133, 82,169,172,149,233,172,141,105,226,253,135,166,166, 78,120,116,165,223,150,221, 7, 39,118,236, 53,228,102,
-227,240,110,154, 47, 22,175,214,156, 57,125,250,118,250,179,219,221, 56,155,243,183, 70,168, 72, 37,235,126,172, 42,130,245, 38,
-162, 96,229,145, 44, 0,210,191, 36,130, 85,147,185,154,190,248, 71,243, 61,183, 25,228,167, 61, 65,194,241, 89, 69, 70,157, 42,
-143,101,245,238,121,207, 46, 3, 21, 58,228,214,112, 51, 12,107,217,161, 15,115,254,177, 22,186,162, 84, 20, 70,253, 18, 47, 22,
-139,103,188, 73,115, 53, 99,233, 79,214,251,239,241,145,155, 26,141,103, 71,103, 22, 24,117,170, 14,145,145,145,181,158, 71,107,
- 12, 33,130,245,148,234,251,216,219,247,117,115,115, 88, 62,162,191, 2,109, 59, 74, 97, 46, 52,199,130,175,152,199, 14,173,200,
-212,140,223,233, 33, 18, 66, 4, 52,146,254, 45, 35, 10,163,162,162, 22,123,123,123, 51, 6,131, 97,132, 78,167,155,151,154,154,
-186,183, 66,228,170,147,187,187,251,242,133, 11, 23,186,198,199,199,139,174, 93,187,150,123,231,206, 29,214,104, 52, 46,171, 78,
-243,126,129,102, 90,144, 66,200,243,114,115,158, 16,155,156,220,251, 65,161,225,120,249,182, 32,185,168, 97,235, 96,255,223, 23,
-206,159,169,208, 93,219,135,226,244,100,124,115, 45,189,144, 53,234,103,154, 24,117,179,246, 16, 2, 51, 71, 13, 99,139,138,138,
- 32, 19, 9,217,228, 39,207,120,239,119,108,107,252,114,250, 20, 38, 61, 61, 29,170,226, 98,158,139,139,139,117, 74, 74, 74,174,
- 41,154,149, 25,138,202,162, 64,181, 50, 24,149,240, 58,154,175, 70,176,170, 51, 88,166,106, 86,108, 18,171,233,120, 24,141,198,
-218, 53, 17, 26,170, 48, 88,186, 44,221,107, 22,217, 68, 66, 72,189,242,255,223,196, 53, 80, 82, 82, 98, 95, 33, 42, 86,237,131,
-162,137, 17,172, 58,111,175, 42,130, 21, 27, 27, 11, 59, 59, 59, 24, 12, 6,200,229,114, 72,165, 82, 72,165, 82,168,213,106,136,
- 68, 34,240,120,188, 90,233,138,197,226,244, 39, 79,158,184, 91, 89, 89,193,104, 52,190,100,178,158, 63,127, 14, 11, 11,139, 76,
- 83,251, 95,149, 70,176,128,211, 91,166, 87, 58,138,208,210, 66,254,146, 16,143, 16,252,131,160, 21, 34, 87,117,138, 42,165,199,
-220,216, 14, 96,187,139,139,203,214, 29, 27,142,132,134,134,134, 30,121, 93, 77,142,191, 60,194,117,184,162, 73, 34,132, 28,158,
- 49, 99, 70,157,231, 14,153, 49, 99,198,172,202, 34, 90,111,204, 96,149, 87, 74,175, 86, 78, 33, 33, 33,193,150, 54,206,231,166,
- 46, 92,111,190,227, 22,131,130,180,199, 72, 61,253,121, 1,171, 83,117, 96, 24, 38, 45,233,202,143,123, 1,168,110,223,190,125,
-193,196,155, 97, 83, 63, 31, 31,236,137, 50,160, 36,253, 30, 24, 66,183,116,236,216, 81,245,186,153, 40, 55, 87,211,150,252,104,
-189,231, 14, 31,121,165, 38,176,128,173,131,185,122, 79, 44,246, 18, 48,204,114,175,240,166, 61, 6, 57,216, 42,187,123,201, 44,
-187,123,137,193,187,118, 0,135,156, 51,145,107,123, 22,227, 86,185,120, 93, 57, 88,248, 91,189,183,248,185,189,219, 54, 49,119,
-110,199, 63,162,167,198,105, 89, 23,233,255,188,243,251,211,167, 79, 23, 58, 58, 58,238, 79, 79, 79,127,209, 59,213,213,213,181,
-155,135,135,199,146, 5, 11, 22,120, 36, 37, 37, 41,238,222,189, 91,184,119,239,222,231, 12,195, 44, 72, 75, 75,171,241,233,254,
- 65,145,110, 74, 67, 51,209,134, 40,165,225,201,139,200,149, 92,216,120,216,251,131,174,118, 28, 52, 92, 18,119,126, 43,172,147,
- 31, 98,245,141, 76, 99,114, 65,201,224,199, 42,154,110,138,185, 18,137, 68,123,214,238,219,247, 52, 40, 40,136,168, 84, 42,232,
-245,122,100,101,101,225,171,159,247, 68,177, 44, 11, 43, 43, 43,156, 57,115,134,253,228,147, 79,246,184,184,184, 12, 48,197,100,
-177, 44,251,226,102, 85, 85, 20, 72, 42,149,214,206, 96,148,125,167,162,129,121, 29,205,170, 12,214,171,145,173, 90,106,150, 94,
-192,101,157,219,171,138,232,241,120, 60,176, 44, 91,105,164,175,234, 48, 73,126, 21, 6, 43,243,181, 30, 36, 40,165,238, 53, 12,
-164,249,219, 40,155,138, 1, 0,216,170,166, 98,168,208, 71,203,164, 8, 22, 0,136, 68, 34, 92,185,114, 5, 93,187,118, 5,203,
-178, 16,139,197,144, 74,165,144, 72, 36,184,113,227, 6,132, 66, 33,120, 60, 94,173,154, 9, 5, 2,193,177,111,190,249,102,216,
-178,101,203,164, 44,203, 66, 36, 18, 65, 42,149, 66, 44, 22, 99,229,202,149,106,145, 72,116,188, 86, 6, 11, 53,143, 34,172,104,
-198,254,215,188, 50, 77,195,171, 83, 49, 84,228,213, 41, 28,170,156,166,193,197,197,197,154, 16,242, 33,165, 52,176,108,213, 75,
-163, 5, 43, 6, 74,203,183,187,184,184,108,125,117, 20, 33,199, 95, 19,189,170,162,142,200,122, 37,242,164,173,240, 57, 11,165,
-239, 86,238, 89,246, 63, 42,249, 95, 91,201,186,156,165, 75,151,158,171,208,127, 43,235,127, 18,193, 10, 14, 14,246,183,182,115,
- 61, 55,121,225,122,243,173,215,121, 40, 72,123,132,236,115, 95, 20, 80,131,186,162,105,105, 93,203,223, 11,182,183,183, 65,246,
-149, 18,232,243,158,130, 16,114,251,117, 51,208,172, 89, 51,111, 75,107,199,243, 83, 23,253,104,189, 51,146,143,252,212, 63, 76,
- 96, 93, 34, 87,124,134,249,234,235, 19,191,244, 22,167, 63,134,250,222,121, 75, 65,110, 50,162, 50,117,216,115, 37,189,232,252,
-239, 63, 93,102, 2,104,155, 14,131, 45,205, 58, 12,182,198,234,113,199,173, 51, 74, 30,226,122,204,225, 62, 75,102, 30,166,248,
-155,102,119,175,104,174,156,157,157,123,185,186,186,206, 63,114,228,136,187,193, 96, 80, 92,188,120,177,104,239,222,189,207, 12,
- 6,195,218,180,180,180, 35, 38, 71,199,148,218, 23,230, 42,200, 66,216,244,195,145, 31, 92,254,100,213, 15,146,135,145, 55,177,
-124,235, 17, 40, 4,122, 99,100,106,201,128, 40,165,225,152, 73,199,149,207, 95,176,115,231, 78,121, 64, 64, 0,201,201,201,121,
-113,195,215,233,116, 40, 44, 44, 68, 65, 65, 1,180, 90, 45,130,130,130,152,185,115,231,202,231,204,153,179, 0,192, 71, 53, 92,
-140,153,243,231,207,183, 31, 61,122, 52,204,205,205,145,147,147, 3,189, 94,255, 34,218, 36, 22,139, 97,105,105,137,252,252,124,
-156, 62,125, 26,149, 13,217,175,136, 80, 40, 76,115,113,113,118,147,202,228, 90,153, 76, 70,205,204,204, 94, 91,179,236,102,155,
-222,189,123,119,199,249,243,231,139, 42, 54, 51,233,116, 58, 82, 87, 77, 74,169,170,115,231,206,178,181,107,215,194,221,221, 29,
- 90,173, 22, 44,203,190,136, 96,149, 79, 13,144,152,152,136,197,139, 23,131, 82,106,250,131,140, 62, 79, 15,215, 15,236,160,203,
-209, 67,151,163,135, 54, 91, 15, 93,166, 30, 6,213, 63,110,136, 72, 93, 58,160,155, 16, 9,179,127,221, 8, 86, 89, 52, 13, 66,
-161, 16, 73, 73, 73, 56,115,230, 12,154, 53,107, 6,133, 66,129,226,226, 98, 92,189,122, 21,233,233,233,117,138, 96,117,232,208,
- 97,203,201,147, 39,219,124,252,241,199,158, 99,199,142,149,250,251,251, 35, 62, 62, 30,171, 86,173, 42,121,244,232, 81,202,196,
-137, 19,127,170,141, 30, 83, 54,117,141, 73,163, 8,153,255,189, 55,174, 98,154,134,238, 85,236, 94,113, 10,135,151,166,105,168,
-200,129, 3, 7, 60, 93, 92, 92,252, 81,218,191, 10,248,243,104,193,138,220,186,117,235, 86, 40,184, 81,132,127, 55, 55,255,109,
- 9,230, 87,125,209, 49,159, 54,127,123,182,249,150,107,124,228,165, 68,161,224,210,220, 87,205,149, 41,149,204, 75,111,219, 22,
- 72, 20, 65, 6, 42, 4, 80, 2, 67,254, 51,136, 68,162, 90, 27,160, 87, 53, 89,150,157,210,226,237,217,214,219,110,242, 81,144,
-250, 8, 89,231,231,212,218, 92,149,107,142, 33, 68,224,221, 50,180,135, 56, 35, 26, 37,231,119,129, 0,216,112,167, 24, 87,147,
-181, 43,117, 90,237,162,135, 5,154,124,215,112, 98,181,107, 73,230,156,110,253, 26,125,226, 59,240, 52,174,103,125, 15,200, 0,
- 43, 59,126,183,138,205,133,127,199,219,203, 93, 92, 92,188, 21, 10,197, 87,199,142, 29,179, 19,137, 68,230, 15, 31, 62, 52,238,
-219,183, 47,201,104, 52,126, 93,177,227,123,109, 52, 27, 74,165,174,129,126,158, 23, 38,126,253,157,164, 72, 89,140, 98,173, 14,
-206,245, 92,140, 23, 34, 31,191, 29,165,212, 30, 52, 69,211,193,193,161,253,123,239,189,215, 56, 36, 36,132,169,202, 92, 21, 22,
- 22, 66,169, 84, 34, 57, 57, 25,109,218,180, 97,252,253,253,131, 28, 28, 28,218,103,100,100,156,171, 42,157,105,105,105,243,118,
-237,218,213,106,247,238,221, 61, 71,141, 26,165,232,223,191, 63,164, 82, 41,138,139,139,225,230,230, 6,150,101,113,233,210, 37,
-196,196,196, 20, 1, 56,156,150,150,246,123,117,233,140,139,123, 86,143, 16,194,184,186,186,182,234,218,181,235, 27,209, 4,128,
-172,172, 44,175, 11, 23, 46, 76,239,211,167,207,164, 46, 93,186, 40,102,205,154, 37,244,244,244,132,209,104, 36,117,213,204,203,
-203,179,184,125,251,246,138,214,173, 91,127,212,181,107, 87,254,146, 37, 75, 96, 97, 97, 1,163,209, 8,169, 84,138,194,194, 66,
- 44, 88,176, 0,151, 47, 95, 54, 80, 74,191, 45, 40, 40,152, 90,157,230, 75,243, 96, 77, 92,217,164,186,114, 88,213, 60, 88,127,
- 71,153, 87,171,213, 14,181,141,138,153,146,206,219,183,111,211, 87,231,195,170, 46,130,245,170,102,121,127, 48,145, 72, 4, 62,
-159,143,172,172, 44,156, 60,121,242,165,249,175, 68, 34,209,139,105, 28, 42,139, 96, 85,149, 78,133, 66,193,190,243,206, 59, 35,
-142, 29, 59, 54,108,202,148, 41,125,138,138,138,236,205,205,205,179,228,114,249,225,137, 19, 39,110,178,180,180,172,114,138,134,
-202, 52,121, 12,169,114, 20,225, 75, 81, 83,158,168,164,178,238, 90,127,245,121,127,101,154,134, 87,167, 98,168,200,171, 83, 56,
-188, 52, 77, 67, 69,205,190,125,251, 62, 71,233,228,161, 76,217,223, 87, 71, 11,150,227,115,235,214,173,208,208,208,208,139, 40,
-237,159,243,210, 40,194,191,163,204,255,151, 53,255,107, 84,215, 7, 75,242,123,100, 12, 24,113, 38,138,174,127, 85,107,115, 85,
- 25, 6, 77,113,236,194, 95,226,130,141, 90, 53, 12,133, 9,209, 93,123,116,207,124,221, 12, 80, 74,229,151,111,199,130, 47,201,
- 65,254,181, 47,243,137, 81,211, 33, 50, 50,242,110, 93,180,214, 83,170, 31, 34,151,159,127,118,249,204, 91,206, 0, 18,114,181,
-184,251, 36,247,228,126,149,106, 74,249, 62,201, 87,105, 30,128, 73, 78,109, 25, 63,107,159,130, 78, 22,206, 64,102,162, 30,121,
- 89,134, 99,127, 87, 95,172,114, 82, 82, 82,158, 54,108,216,112,235,198,141, 27,199, 53,109,218,212,108,194,132, 9,229, 29,223,
-119,215, 85, 51, 74,173, 78,110,168, 16,125,127,126,195,170,207, 36,254,205,176,111,201, 76,227,197,200, 39,125, 31, 20,105, 77,
-110,179, 22,139,197, 17,227,198,141, 19,170, 84,170, 42,205, 85, 97, 97, 33,138,138,138, 80, 88, 88,136,187,119,239,162,127,255,
-254,226,199,143, 31, 71, 0, 56, 87,205,185,103, 1, 92,242,242,242,186,241,253,247,223,119,220,182,109, 91,167,145, 35, 71,138,
- 34, 34, 34,240,240,225, 67,220,184,113, 67,171,211,233, 78, 73, 36,146,211,177,177,177, 90, 19,203,211, 95,161,105, 0,176,216,
-214,214,118,237,222,189,123, 23,157, 61,123,118,232,176, 97,195,228, 6,131,129,188,166,230, 36, 59, 59,187,207,143, 30, 61,186,
-229,228,201,147,125,135, 14, 29,202, 76,156, 56, 17,235,214,173,195,190,125,251, 88,163,209,120, 80, 32, 16,124,144,149,149, 85,
-227, 0,148,151,230,193,170,102,158,171,154,182,255, 77, 79,161,175,173,249,106, 36,172,105,211,166, 14, 21, 71,105, 86,252, 91,
- 27, 26, 55,110,252,210, 60, 87,229, 29,218,203, 23, 30,143, 7, 62,159, 95,171, 38,194,134, 13, 27, 66, 32, 16,176,193,193,193,
-155, 0,108, 2, 94,126,101,142, 64, 32,120, 49,169,169, 41,104, 12, 44, 54,108,220,122,195,192, 82, 24, 89, 10,202, 2,122, 10,
-176, 70, 22, 70,150,194,200,178,165,211,162, 81, 64, 93, 98,252,159,215,107, 21,166,105, 88, 89,201, 84, 12, 21, 31, 48, 95,157,
-194, 1,168,162, 31, 85, 89,247,131,242,254,168,149,141, 22, 44,215,220, 90,182, 94,154,146,146,242,126,117,154, 28, 28,181, 49,
- 88,179,148,145,107,244, 0,108, 8, 33, 51, 35, 35, 35, 31,190,238,143,241,120,204,204,204, 67,195,215, 82, 32,143, 71, 48,243,
- 77,100,192,104, 52,206, 46,190,189,150,165,148, 90, 18, 66,102,220,186,117,235,181,210, 73, 13,134,241, 95,253,116,105,165,157,
-133,168, 83,118,190,230, 40, 8,169,116,214,118, 3,232,199,219,191, 76,252,210,202,142,223, 45, 47,203,112,140,101, 48,253,159,
-112, 66,163,162,162,150,120,123,123,243,126,248,225,135, 17, 90,173,246,165,142,239,117,214, 44,210, 78, 11, 82, 8,121,126,158,
-174, 19,158,196, 39,246,121, 80,100, 90,179, 96, 5, 68, 46, 46, 46, 81, 42,149, 10,132, 16,104, 52,154,151, 12, 85, 69,131,165,
-211,233,144,153,153, 9, 79, 79, 79, 84,152, 51,169, 90,202, 76,201, 17, 91, 91,219,139,107,214,172,233,177,110,221,186,150, 44,
-203, 94,209,233,116, 71,178,179,179,149,117,201,243, 95,161, 89,246,189, 79,100, 50,217,178,117,235,214,173,144, 72, 36,161,153,
-153,153, 23, 94, 71,179,204, 60,189,109, 99, 99,227,188,117,235,214, 61, 27, 55,110,108,193,231,243,175, 17, 66, 6,228,231,231,
-215,229,101,207,209,175,185,189, 38,246,253, 5,197,254,181, 53, 77,121,253, 77,173, 30, 38, 13, 6,229,204,153, 51, 51, 95,125,
-231, 96,197, 57,175, 42,254,213,106,181, 37, 38,104,178, 95,124,241, 69,181, 15,113, 21,141, 86, 73, 73, 73,141, 77,186,148,165,
-217,221,223, 29, 95,187, 58,146,165,217,127, 99, 21,119, 8,192,211,178,133, 86,179,173, 86, 89, 2,112, 22, 64, 60,165, 52,254,
- 21,221,138,235, 57, 56,222,140,193,138,140,140, 76, 2, 48,252, 77,254, 88,215,174, 93,207, 0,240,127,147,154,119,239,222, 77,
- 0, 48,244, 77,233,237,208,104, 98, 1,244, 28, 67,136, 96, 59,173, 58, 34, 85,214,161,189,223,223, 57,138,176, 42, 42,235,248,
-254,186, 84,214,241,189, 22, 55,155, 19, 98,177,152, 20, 22, 22, 66,167,211,161,168,168,232,133,185,170,104,178, 12, 6, 3, 8,
- 33, 40, 42, 42,130,153,153, 25,244,122,125,173,158, 20,203, 76,202,174,136,136,136,189,231,207,159, 55,188,137,124,255, 21,154,
- 42,149, 42, 29,192,123, 17, 17, 17,252, 55,165,153,147,147,147, 10,160,165,151,151,151,200,212, 40, 88,117,145,172,186,110, 55,
-129, 31,254,130, 34,255,243, 63,173, 98,141,143,143, 15,120,211,154,137,137,137,143,222,120, 58,175,109,155,252, 47,185, 87,209,
- 50, 51,186, 53, 49, 49,177, 30, 33, 36,241, 85,131, 85,221,182,234, 52, 1, 64, 36, 18, 29, 72, 74, 74,114, 22,139,197,169,166,
-172,231,224, 48, 5, 82,151,176,183,201,226, 92,251, 52,167,201,105,114,154,156, 38,167,201,105,114,154,117,255,157,209, 21,231,
-193,250, 55,241, 31,154, 54,142,131,131,131,131,131,131,131,227,159, 1, 1, 16, 84,217,134,218, 56, 83, 66, 72, 80,109,127,184,
- 38,125, 78,147,211,228, 52, 57, 77, 78,147,211,228, 52,255,123,154, 53,105,191, 50, 34,247, 95, 27,193,226,154, 8, 57, 77, 78,
-147,211,228, 52, 57, 77, 78,147,211,252,219, 53,171,248, 29,174,137,144,131,131,131,131,131,131,131,131,163, 20, 62,119, 8, 56,
- 76,193,213,213,117,105,243,230,205,199,223,188,121,243,235,196,196,196, 5,117,212,112,182,177,177, 89, 12,160, 37,165, 84,204,
-227,241, 30,101,103,103, 47, 73, 74, 74,186, 84,215,116, 57, 59, 59,187,217,217,217, 45, 6,208,130,101, 89,161, 64, 32,136,202,
-200,200, 88,148,146,146,114,173,174,154,118,118,118,114, 39, 39,167, 80, 74,169, 61,165,148, 17, 8, 4,121, 41, 41, 41,119, 51,
- 51, 51, 51,185,146,192,193,193,193,193,241,218, 6,107,254, 4,226, 4, 29,248,115,215,211, 36, 0, 32,132,152,163,116,210, 53,
-127, 0,143, 1,220,162,148,190,214, 43, 3,254, 45,154,255,116, 8, 33,140,165,165,101,103,153, 76,246,137, 82,169, 12, 54, 55,
- 55,143, 42,123, 61,206,225,178,201, 51,235,140,189,189,189,253,187,239,190, 59, 99,205,154, 53, 24, 49, 98,196,231,182,182,182,
-171,106, 59,111, 83, 64, 64, 64,111, 23, 23,151,245, 11, 23, 46,178,107,214,172, 25,145, 72, 36,136,141,141,117,153, 61,123, 86,
-211,166, 77,155,238,185,125,251,246, 71,181, 77, 87,195,134, 13, 7,184,187,187,175, 93,178,100,137, 93,104,104, 40,225,243,249,
-184,127,255,190,235,252,249,243,155, 5, 7, 7,111,189,115,231,206,148,218,106, 6, 5, 5,121,122,121,121,181, 92,180,104,145,
-164, 89,179,102, 16,139,197,120,244,232,145,124,214,172, 89,118, 77,155, 54,125,122,251,246,237,235,181,209, 11, 25,115, 91, 32,
-148,233,248, 0,160, 83, 9, 13,145,235,155,234, 77, 93,199, 85, 79, 28, 28, 28, 28,255, 65,131,181, 96, 28, 89,192, 0,179,192,
-128, 76, 26, 76,118,175,219,205,220,232,216,177,163,223,200,145, 35, 73,217,171, 35, 2,118,237,218,245, 54,143,199,123,194,178,
-236,117, 0,119, 41,165, 58, 19,205,128, 16, 64, 19,134, 97,154,255,147, 53,255, 13, 40, 20, 10,111, 59, 59,187, 41, 54, 54, 54,
-221, 66, 67, 67, 11,199,142, 29, 27,127,237,218,181,184,176,176,176,146,141, 27, 55, 46,209,235,245,223,249,248,248,156, 42, 42,
- 42, 90, 81,215,121,177, 4, 2,129, 63, 33, 4, 41, 41, 41, 16, 8, 4, 2,145, 72, 20, 0,192,100,163,225,230,230,230,228,236,
-236,252,195,238, 3, 39,236, 11, 53, 12,158,102,177, 0, 84, 48, 50,182, 88,184,124,157,205,138,197,159, 15,246,241,241,185, 28,
- 19, 19,243,139,169,154,206,206,206,110,238,238,238,107,207,158, 61,107, 47, 22,139,193,178, 44,138,138,138, 96,111,111,143,165,
- 75,151, 90, 47, 92,184,112,164,167,167,231,197,231,207,159, 31, 50, 85,211,206,206, 78,238,229,229,213,242,220,185,115, 18,145,
- 72, 68,244,122, 61,209,104, 52,112,116,116,164, 43, 87,174, 20,207,158, 61,219,215,211,211, 51,253,249,243,231,137, 38,153,171,
- 31,111, 11, 10,179,207,133,211, 36,245,231, 0, 64, 36,210, 69, 17,243,173,111, 20,102,159,107, 86,211,186,144, 31,113, 53,114,
- 52,103,178, 56,254,183, 56, 59, 59,183,242,244,244, 60,144,152,152,120,133,199,227, 13,140,143,143,215,188,174, 38, 33,196, 21,
-128, 39, 0, 43,148, 14,172,202, 69,233,228,157, 73,117,213,180,245,106,223, 11, 98,217,112, 80,218,132, 1, 0,134,185,203,234,
-138, 55,103, 71,159, 59,244, 90,154, 18,249, 8,176,108, 19, 6,148, 5,195,187, 71, 13,197, 63,101, 61, 62,119,140, 43, 25, 28,
-111,204, 96,205,255,144, 88, 49, 2, 76,159, 57,118, 52,195,231,241,200,146,245, 63, 14,186,121,229, 16,117,170,215,228,197, 43,
- 55,218,180,105,131, 54,109,218,144,229,203,151,251,159, 61,123,214,127,199,142, 29,122, 66, 72, 36,165,116, 75, 85, 63,182,116,
-162, 44,209,160, 87,187, 45, 24, 47, 45,241,104,241,221,142,150, 45,219,176, 98,177, 24,175,163, 9, 0, 31, 13, 16,156, 26, 49,
-192,147, 68,244,156,147,240,166, 52,255, 37,230,234,130, 66,161,240, 26, 51,102,204,211,113,227,198, 93,148,203,229, 20, 0, 50,
- 51, 51,229, 61,122,244,200,235,219,183,111,142, 74,165,194,247,223,127,239,182,118,237,218, 83,230,230,230, 41,133,133,133,205,
-106, 81, 49,242,157,156,156,150,117,234,212,105,242,123,239,189, 7,133, 66,129, 97,195,134, 65,163,209, 92,113,118,118, 94,158,
-150,150,246, 57,165,180,198,119,103, 88, 89, 89,205,157, 63,127,190,189, 82,203,195,231,219, 98,145,171, 44,245, 13, 50, 17,131,
-143,222, 18,227,253,247, 63,176,184,115,231,206,114, 0, 38, 27, 44, 59, 59,187,197, 75,150, 44,177, 43, 63,215, 74,165, 18, 74,
-165, 18, 69, 69, 69, 80, 42,149,120,239,189,247,204,159, 62,125,186, 26,165,179, 59,155,132,147,147, 83,232,162, 69,139, 36, 34,
-145, 8,135, 14, 29,106, 92, 82, 82,194,215,235,245,160,148, 26,252,252,252,238,126,240,193, 7,194,152,152,152,112, 0, 38, 25,
- 44,167,116, 8, 10,212,234,111,191,249,242, 51, 59, 0,248,120,250, 87,223, 2,234,230,212,132,117, 78,233, 8, 3,192, 25,172,
-234,203, 39, 15, 64, 63,129, 64,208,223,203,203, 43,244,233,211,167,119, 12, 6,195,175, 0,126,165,244,245, 38,255, 37,132,188,
-229,236,236,188, 56, 53, 53,245, 27, 74,233,246,255, 47,199,180, 65,131, 6,251,119,236,216, 97,115,244,232,209,222, 11, 23, 46,
-124, 23,192,214,215, 56,134, 2, 0,225,101,166,234,113,153,177, 66,153,209,242, 35,132, 52, 0,240,123,109, 30,120,109,125, 91,
-153,129,111,190, 43,188, 67,215,214, 3,222,238,171,176,179,182, 64,177,198,136,152,248,244,122, 39,143,238,111,231, 24,212,227,
-138, 65, 87, 48, 40, 59,250,119,101,109, 53,219,119,235,221,186,195, 91, 29, 21, 22, 22,150,200, 41,210,227, 89,124,178,251,133,
- 83, 7,219, 56, 4,245,184, 8,162, 31,154,113,255,164,138,187,234, 56,106, 3, 99,226,133, 2,185,153,188,210,109, 22, 22, 22,
-136,136,136,192,146, 37, 75, 4, 0, 90, 84,220,246,234, 8, 3,163, 81,235,244,249, 71, 19, 32,226, 83,113,143,110, 93,136,185,
-185,249,107,107, 2,128,131,181,161, 99,115, 95,117,187,140,187, 19,135,220,189,176, 56, 72, 91,146,255,167, 55,157,202,100, 50,
-120,123,123, 99,246,236,217, 38,105,190, 46,255, 11, 77, 74,169,115, 64, 64, 64,209,170, 85,171,124,231,204,153, 99, 85, 82, 82,
- 34, 7,224, 26, 16,220,202,153, 97, 24, 55,173, 86,171,152, 55,111,158,237,151, 95,126,233,107,103,103,151, 79, 41,181,171, 77,
- 58,157,156,156, 86, 45, 89,178,100,202,230,205,155, 73, 88, 88, 24, 20, 10, 5,194,195,195,177,109,219, 54,102,238,220,185, 51,
-156,156,156,150,153,152,247, 54,205,154, 53, 35, 44,128, 60,165, 1,231,150,134,224,247,175,194,160,210,178, 40, 40, 82, 66,173,
- 86, 67, 34,145, 72,109,109,109,205,106,113, 60, 91,132,134,134, 18, 0, 47, 76, 85, 81, 81,233,162, 84, 22, 67,171,213,129, 97,
- 24,115, 15, 15, 15,113, 45,142,167,125,179,102,165,254,179,164,164,132,223,187,119,111,244,236,217, 19, 69, 69, 69,252,194,194,
- 66,104,181, 90, 48, 12, 35, 44,187,177,215,168,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, 59,203, 39, 33,196,142,199,227,109,242,242,242,122,196,227,241,182, 18, 66, 28, 95, 71,147, 16, 18, 70, 8,
- 89, 34,147,201, 78, 7, 4, 4, 36,201,229,242,179,132,144,101,132,144,240,186,104, 18, 66, 68, 50,153,236,236,146, 37, 75,246,
-220,185,115,231,221, 51,103,206,120,222,191,127,255,237,229,203,151,239, 50, 51, 51,187, 72, 8,145,190,206,181,233,233,233,185,
-241,250,245,235, 97, 45, 91,182,220, 64, 8, 17,191,137,235,157, 16,194, 35,132, 4, 19, 19, 95, 60,248,191, 62,239,174,174,174,
- 94,193,193,193,182, 60, 30, 15,109,218,180, 1,165,180,205,107,106,182, 4,144, 78, 41,189, 64, 41,205,162,148, 26,203,150,108,
- 74,233,165,178, 7,149, 54,181,210,228,155,239,250,228,211,105, 93,167, 78,248, 80,113, 59,193,136,159, 78,166, 97,247,229, 44,
-164, 20,137,209,169,207, 8,139,118,221,223,235,194, 23, 90,236,170,173,230,140, 25,179,186,126, 56,108,136,226, 65, 42,131, 61,
-191,103,227,242,227, 66,168,136, 21, 34,250,140,182, 10,104,214,173, 7,129,112,203, 63,225, 28,253,215, 53,255, 95, 68,176,230,
-110,160,121, 11,198,145, 47,151,124,255,227,231, 12, 33,212,213,167,203, 67, 79,239, 22,197, 44,203, 66,173, 86, 67,167,211, 65,
- 32, 16, 64,173, 86, 35, 33, 33, 1,215,175, 95,135,133,133, 69,173,126, 56,191,160, 0, 46,174,158,144,201,100,111, 68,115,212,
- 59,125,249,137,105,105,252, 43,183,207,133,252,178,102, 71,136, 91,131, 78,143,155, 68, 76,123, 96,102, 81, 79,125,247,238, 93,
- 92,189,122, 21,121,121,121, 40,191,129,254, 71,158,224,245, 43, 86,172,184,157,154,154,138, 75,151, 46, 5,207, 95,253,179,199,
-131,194, 6,252, 44, 37, 21,216,153,101,184,251, 75,163,141,121,185,185,113, 83,166, 76, 57,235,228,228,164,157, 48, 97, 66, 59,
- 83,116, 93, 93, 93, 37,132,144,144,238,221,187,127,244,193, 7, 31, 32, 62, 62, 30, 83,167, 78,213,222,189,123, 55, 63, 36, 36,
-196,106,197,138, 21,194,209,163, 71,227,202,149, 43, 83, 92, 93, 93,247, 2,136, 74, 78, 78,174,238, 93,106, 34,137, 68, 2, 20,
-148, 62,168,234, 12, 20, 0,251, 34,242,196,208,124, 8,133, 66,134, 97, 24, 59, 0, 38, 61,121,178, 44, 43, 20,137, 68, 40, 46,
- 46,134, 82,169, 68, 74,150, 18, 9, 25,197, 40, 42,214, 64,173,214, 67, 83, 66, 33, 86, 56, 48,250,172, 44, 27, 0, 41, 38, 86,
- 24, 76,121,115,163, 86,171,133, 90,173,134, 86,171,133, 86,171,125,241, 58, 31, 30,143,167,112,113,113, 49, 7,144, 87,147, 30,
- 79, 36, 53,240, 24,225,146, 89,139,190,157, 7, 0, 60, 70,184,196, 12, 37,172, 41,235,120, 34,169,225,111, 44, 87, 98, 59, 59,
-187,115,123,246,236, 9,240,246,246,198,243,231,207,253, 7, 12, 24,208,156, 16, 18, 76, 41, 85,213, 82, 75,198, 48,204,151,195,
-135, 15, 31, 63,120,240, 96,226,227,227, 3, 62,159, 15,131,193,224, 26, 27, 27,219,126,247,238,221,211,249,124,254, 79, 70,163,
-113, 10,165, 84,105,162, 38, 35, 18,137,126, 89,191,126,125,219,230,205,155, 99,235,214,173,184,113,227, 6, 27, 22, 22,198,188,
-255,254,251,112,119,119,111,241,254,251,239,239, 35,132,244, 52, 37,194, 90,137,190,251,144, 33, 67,220,120, 60, 30, 90,182,108,
- 41,188,114,229, 74, 83, 0, 87, 94,243,152,154,185,186,186, 94,136,136,136, 8, 62,125,250,244,109, 66, 72,132,169,249, 5, 0,
-103,103,231, 62, 14, 14, 14,203, 21, 10,133,149,169,223, 81, 42,149,170,140,140,140,169, 41, 41, 41,123, 77, 44,255, 45, 27, 53,
-106, 4,131,193, 0, 11, 11, 11, 56, 58, 58,182,118,113,113,153, 98, 97, 97,209,175,176,176,112,114,114,114,242,141, 90,228,215,
- 5, 0, 67, 41,125, 90,246,217, 3, 64,249,107,150,162, 41,165,207, 41,165,113,132, 16,103, 66,136,155, 41,205,133,182, 94,237,
-123,181,236,216,189,117,155,230, 65,204,210,189,241, 48,178, 44,248, 48,130,207, 99,145,109, 20,128, 16, 2,119,223, 48,158,195,
-131, 91, 45,108,125, 59,245,202,142, 62,117,200, 20,205,174,189,251,182,241,243,245, 97,190, 62,144,136,252,148, 7,198,140,199,
-103,179, 9,195,160,126,147, 78,182,238,190,193, 60,175,224,183, 4, 25,241, 15,218, 91,123,183,235,152,251,244,194,105,206, 54,
-112,212,218, 96, 17, 66, 40,165,244,197,147,213,156,239,233, 28, 91, 43,226,241,240,193, 61, 38, 41, 93, 91,124,239,222, 61,216,
-216,216,192,222,222, 30,230,230,230,120,242,228, 9, 78,159, 62,141,232,232,104, 80, 74, 17, 28, 28, 92,171, 31,206, 72, 79, 71,
- 78,110,209, 27,213,172,231,228,132,122, 78, 78,252,236,188,124, 92,189,119, 63,224,208, 79, 29,253, 50,152, 49,155,213,106,245,
-139,125,244,250,255, 94,171,139,189,189,189,241,227,143, 39,228,140,250, 54,174,193,160, 14, 46,188, 62,225,142, 56,112, 37,141,
-183,235, 60,143,126, 62,178,113,118,108,108,140,201,153,118,119,119, 95,220,190,125,251,207,248,124,190, 96,244,232,209, 0,128,
-137, 19, 39,106,238,223,191, 31,152,148,148, 20,231,228,228,228, 55,121,242,228,251,251,246,237, 19,124,248,225,135,164,164,164,
-228,134, 64, 32,160,206,206,206, 11, 82, 83, 83,231, 85,106, 52,120,188, 59, 15, 31, 62,244, 48, 72,156, 97,171, 96,208,229,243,
-219, 0, 0, 51, 49, 69,118, 70, 10,162, 98,111,194,206,206,206,194,214,214,246,113,171, 86,173, 52, 25, 25, 25,159, 60,123,246,
-108, 75,117,233, 20, 8, 4, 81,247,239,223,119,117,112,112,128, 82,169, 68, 82,102, 49, 54, 93, 37, 80,105,164, 0,164,224, 65,
- 1,133,173,155,162, 62, 85,221, 13, 10, 10,210,105,181,218, 25, 49, 49, 49,219,107,208,204,123,244,232,145,220,197,197, 5, 60,
- 30, 79,183,123,247,110,161, 86,171, 5,165,212,112,244,232,209,129,249,249,249, 45, 27, 52,104,192,184,187,187,175,104,213,170,
-149, 58, 45, 45,109,212,243,231,207,171,124,209,240,241,137, 94,186,118,243,206,127,151,255, 60,105, 55, 0,184, 52, 15,200, 61,
- 60,175,169,182,221, 60,101,141,235,142, 79,244,210, 97,194,223,246,234,179,225,179,102,205, 10,176,182,182,198,216,177, 99, 49,
-127,254,124,204,153, 51,199,123,236,216,177,163, 1,172,170,197, 77, 86,234,232,232,120,115,205,154, 53,254,173, 90,181,194,209,
-163, 71,177,115,231, 78,196,197,197, 25, 60, 61, 61,249,205,155, 55,199,220,185,115,209,165, 75,151, 81, 19, 38, 76,104, 71, 8,
-105,106,162,233, 24, 49,119,238,220, 62,173, 91,183,198,176, 97,195, 52,231,207,159,127, 23,192,201, 83,167, 78,117,184,112,225,
-194,222,159,127,254, 89,186,100,201,146,174,147, 39, 79, 30, 7,224,155, 58,228,191,111,219,182,109, 1, 0,173, 91,183,198,242,
-229,203,187,188,142,193, 34,132,136,108,108,108,142,108,221,186, 53,216,215,215, 23, 67,135, 14,109,250,238,187,239, 30, 33,132,
-116,162,148,154,244,222, 72, 39, 39,167, 47,215,175, 95,239, 37,149, 74, 77,254, 93,173, 86,107, 61,102,204,152,101, 0, 76, 54,
- 88, 65, 65, 65, 56,127,254, 60, 58,118,236,136,134, 13, 27,122,141, 25, 51,102, 69,151, 46, 93,240,233,167,159, 94,118,116,116,
-116, 78, 79, 79, 55,245, 69,207,238, 0,158,148,229,191, 30, 0,111, 0,191,151,109,107, 78, 8, 1,165,244, 57, 74, 95, 30,238,
- 7,160,230,254, 88, 18,249,240,222, 61,123, 42,126,189,146, 9, 35,203,194,223, 69,130,128,122,230,136,207, 44, 65,124, 74, 14,
- 4, 68, 7,133, 84,140, 70, 45,123, 88,229,102,196, 15,135, 41,221, 3,196,178,225,125,123,247, 52,219,127, 53, 19,249, 41, 81,
- 52,225,230,238,179,250,146,226, 81, 0,240,240,226,246, 31, 28,172, 36,157,124,154,132,240, 84,109,250, 88, 93, 56,240,253,112,
- 0,156,193,250,235, 31,240, 94,242, 34,255,185, 8, 86, 57, 57,249, 80,219, 56, 6, 32, 41,253, 78,233,231,156, 28,228,228,228,
-160,126,253,250, 88,187,118,237, 75,251,150,148,148,212, 41, 1,127,133,166,173,149, 37,122,183,111,199,123,240,228,123,158,154,
- 85,191, 17,205,127, 42,148, 82, 74, 8, 33, 9,217,122,203,236, 66,189,112, 96,123, 55, 42,224, 49, 24,212,190, 30,249,230, 80,
-130, 48, 91, 45,179,228,241,120,140, 41, 79,242, 33, 33, 33,130,246,237,219,127,182,113,227, 70, 65, 90, 90, 26, 44, 45, 45,161,
-215,235,113,231,206,157,212,212,212,212, 56, 0, 72, 75, 75,123,226,234,234,154, 97, 52, 26, 93,253,253,253, 49,102,204, 24,248,
-249,249,145, 41, 83,166, 76, 39,132, 44,168,108,196, 98, 70, 70,198,146,217,179,103,183, 93,188,124,173,205,144,230, 4,197, 42,
- 45,148, 74, 37,226, 99,162, 64,149, 90,124,253,245, 74, 72,165, 82, 2, 64,152,149,149, 37,156, 55,111,238,134,208,208,208,158,
-183,110,221,234, 95,165, 65,207,200, 88, 52,119,238,220,102, 95,127,253,181,181, 82,169,132,186,164, 4, 69,106, 17,174,175, 44,
-141, 80, 54,159,124, 3,223,124,181,130, 9,114,151,219, 40,149, 74,124,246,217,103,107,130,131,131, 91,220,185,115,103,124, 85,
-154, 41, 41, 41,119,103,205,154,101,183,110,221, 58,177,159,159,223,253,194,194, 66,228,229,229, 49,251,246,237, 91,232,238,238,
-110,189,102,205, 90, 34,147,201, 0, 0, 73, 73, 73,194,207, 63,159,253, 75,163, 70,141,126,190,127,255,254,176,170,206, 13, 0,
- 13, 33, 72,115,118,174,239,165,186,202,204,115,118, 46,185,124,126,110,202, 54, 66,144, 86,186, 15,168,211,122,167, 33,137, 91,
-197,173, 53, 26,118,117,122,122, 66, 52,165,160,152,251,247,189, 87,214,214,214,118, 66,159, 62,125,176,108,217, 50, 28, 58,116,
-104,178,181,181,245,202,249,243,231,195,217,217,249, 99, 66,200,106,106,250,236,196, 95,173, 90,181,202,223,223,223, 31, 31,124,
-240,129,246,244,233,211,179, 0, 28, 0,144,112,233,210,165,122, 91,182,108,233,245,203, 47,191, 44, 91,179,102,141,100,221,186,
-117, 94,111,191,253,246,106, 0, 35,107, 18,117,112,112,248,116,240,224,193, 88,177, 98, 5,206,159, 63,255, 54,165,244,104,217,
-166, 99,132,144, 94, 75,150, 44, 57,243,249,231,159, 99,213,170, 85,147,106,107,176, 8, 33,102, 1, 1, 1, 95,116,237,218, 21,
-151, 46, 93, 66,155, 54,109, 16, 30, 30, 62,153, 16,178,150, 82,154, 93,135,155, 5, 99,102,102,246,203,230,205,155,219,120,120,
-120, 96,209,162, 69,248,236,179,207,176,113,227,198, 54, 67,135, 14,253,133, 16,210,223,148, 81,190,102,102,102,102, 82,169, 20,
-203,150, 45,163,137,137,137, 53, 70, 79,157,156,156,172,190,248,226, 11, 98, 97, 66, 51, 0, 33,132,231,236,236,108,225,232,232,
-216,214,209,209, 17,107,214,172,129,189,189, 61, 38, 79,158, 12, 27, 27, 27, 20, 23, 23,163,127,255,254,130,107,215,174, 13, 2,
-176,214,196,172,219, 0, 40,143,120, 5,160,180,175, 85, 81,217,239, 93, 3,208, 26,192,115,148,246,203,178, 54, 69,144,161, 52,
-200,202,210, 28,169,247, 51,192,135, 1,254,245, 20,184, 21, 91, 12,157,145, 66, 38, 55, 67,113, 81, 62,154,120,217,161, 80,229,
- 10,128, 53,105,246,113, 33,143, 9, 17,137,165,200, 44, 44, 64,250,163, 51, 57, 58,163,102, 76,126,220,229, 36, 0,176,110,208,
-118, 76,212,245,227,183,250,119,107, 99,159,149, 87, 15,148,178,205,192,193, 81, 11,106,236,131,197,178,127,190,246, 43, 70,132,
-202,209,233, 94,111, 96,222, 95,161, 89, 25,127,133,230, 63,193,103,185, 88,241, 11,228, 18,198,112,234, 86,166, 81,111, 48,226,
-196,173,116,163, 76, 76, 12, 86, 98,109, 33,203,178, 38,221, 16, 35, 35, 35,245,151, 46, 93,218, 58,115,230, 76,172, 90,181, 10,
-207,158, 61,131, 64, 32,128,175,175,175,131,155,155,155, 19, 80, 58,122,175, 97,195,134,182, 60, 30, 15,177,177,177,216,185,115,
- 39,230,205,155, 71, 35, 35, 35, 55, 86,117,163, 72, 77, 77,189,147,145,145,177,126,233,130, 89,249, 2, 77, 42,100,198, 44, 24,
-243,159, 65, 96, 44,192,132,201, 51,241, 60,219,136, 59,207,139,112,231,121, 17,210,213, 18,124,177,232,107,158,183,183,119, 47,
- 87, 87,215, 46,213,152,161,107,105,105,105,219,230,204,153, 83,144,157,157,253,162,252,232, 12, 44,116, 6,246,213,155, 19,150,
- 46, 93,106,233,228,228, 52,208,197,197, 37,162, 42,205,204,204,204,204,212,212,212,216,153, 51,103,234,178,178,178, 80, 88, 88,
-136,227,199,143,191, 93,191,126,125,235, 41, 51, 23,144,231,217,244, 69, 58, 11, 88, 75,172, 88,251, 19,175, 65,131, 6,239, 57,
- 59, 59, 87,219,143,200,217,217,197, 43, 32,160,193,158,107,215,174, 13,243,242,242, 26, 95,110,172, 40, 5, 5, 0, 79, 79,207,
-177,145,145,145, 35,130,131, 3,247, 56, 56, 56,250,253,205, 79,143,237, 7, 14, 28,232,199,178, 44,246,236,217,115,159, 82,186,
-106,255,254,253, 55, 53, 26, 13, 6, 13, 26,228, 9,160,171,137, 58, 97,239,189,247,222,248, 54,109,218, 96,210,164, 73,186,211,
-167, 79,135, 80, 74, 87, 82, 74,227,105, 41, 9,148,210,181, 23, 46, 92,104, 50, 97,194, 4, 77,179,102,205, 48,108,216,176, 17,
-132,144, 54, 53,232,182, 28, 60,120,176, 63,203,178,216,181,107,215,189, 10,230,170,220,212,158,221,187,119,239, 53,173, 86,139,
- 33, 67,134,212, 39,132,116,168, 69,222,133, 98,177,120,207,194,133, 11, 45, 83, 82, 82,240,254,251,239,107,158, 60,121,130,121,
-243,230, 73, 45, 44, 44,142, 18, 66,204,106,123, 60,197, 98,241,143,223,127,255,125,159, 70,141, 26, 97,220,184,113,218,239,190,
-251,110,226,248,241,227,181, 33, 33, 33,248,246,219,111,251,136, 68,162, 90,205, 80,157,145,145,145,127,254,252,121,155,154,150,
-244,244,244, 12,147,162,254,245,234, 89, 54,108,216,240,126, 88, 88, 88,118,227,198,141, 27, 0, 64, 84, 84, 84,214,158, 61,123,
-168,141,141, 13,142, 31, 63,142, 31,127,252, 17,173, 90,181,130, 66,161, 24, 84,155, 58,169,108, 65,133,191,175,110,127,117,191,
-154, 78, 16, 45, 80, 25,192,103, 24, 8,120, 20, 9, 25, 37,208, 25, 41,132, 2, 6, 2, 30,192,103, 40,108, 20, 2, 8, 4, 60,
- 0,196, 36, 77,134, 16,228, 21,235,193,231, 17, 8, 68, 66,194, 24,140, 47, 66,132, 12,223, 40, 21, 75,196,196,222, 66, 8, 33,
-159,128, 16,112,112,188,185, 8, 22, 0, 24,141,127, 14,124, 84, 22, 5,210,106,181,175,149,144,191, 66,179,138,176,249,127,234,
- 4, 22, 22, 22,242, 47, 92,184, 96, 33, 16, 8,228, 61, 27,181,202,249,114,119,140,237,252, 29,209, 16,241, 64,122, 53,102,210,
-206,159, 59, 77,242,242,242,172,188,189,189,243, 76,209,123,246,236,217, 40, 39, 39,167, 69, 12,195, 52, 51, 26,141,187, 87,173,
- 90,133,111,190,249, 70, 54,118,236,216, 39,206,206,206, 41, 62, 62, 62,110,171, 87,175, 22, 3,192,182,109,219,112,226,196,137,
-190, 2,129,224, 70, 66, 66, 66,122,117,186,119,239,222,253,220,221,221,253, 74, 92, 92,220, 90, 66,136,165, 66,161,176,218,191,
-127, 63, 73,203,215,226,243,109,207, 94,140, 44,148,139,121,152,217,207, 14,239,188, 51,128,255,244,233,211,175, 0,156,168, 74,
-243,246,237,219,147, 61, 61, 61, 47,196,196,196,172, 18,218,248,218, 72,130, 70, 43, 58,204, 44,109,126,116,178, 22,131, 41,171,
- 16, 11, 10, 10,144,157,157,141, 17, 35, 70, 88, 46, 94,188,120, 58,128,243, 85,105,222,185,115,231,154,167,167,103, 90, 76, 76,
- 76, 11, 74,169,200,194,194,162,213,170, 85,171, 72, 66,174, 22, 51,182,196,162,168,164, 52,157, 10,137, 0, 11, 6,187, 98,216,
-176, 97,252,231,207,159,127, 89,246, 68,254, 39, 92, 92, 92,188, 3, 2, 2,246,236,216,177, 35, 96,245,234,213,185, 79,159, 62,
- 45,118,118,118,158,255,202,110,154,165, 75,151,230,108,219,182,205,247,253,247,223,223,227,232,232,248,110, 93,167,212,120, 93,
-204,205,205,151,141, 25, 51, 6,191,252,242, 11,242,242,242, 86,151,149,177, 85, 59,118,236,216, 53,106,212, 40,108,219,182,109,
- 25, 33,228,184, 9, 81,172,110,131, 6, 13,194,177, 99,199,112,230,204,153, 47, 40,165, 15,171,136,242,197, 16, 66,166, 31, 60,
-120,112,205,224,193,131,177,105,211,166,174, 0,170,155,120,182, 83,151, 46, 93,112,244,232, 81,228,228,228,124, 91,217, 14,249,
-249,249,223,253,246,219,111, 45,186,116,233,130,165, 75,151,118, 2,112,214, 4,115,229,111, 97, 97,177,121,205,154, 53, 97,141,
- 26, 53,194,123,239,189, 87,162,211,233,186,126,246,217,103,135,118,238,220,169,216,186,117,107,232,232,209,163,175, 19, 66, 62,
-164,148,154, 52,137, 45,143,199, 91,178,110,221,186,145, 17, 17, 17,152, 60,121,178,225,196,137, 19,189, 41,165, 39, 9, 33,177,
-211,166, 77, 59,242,245,215, 95,243, 86,172, 88, 49,146,199,227,101, 25,141,198, 89,127,147,161, 94,241,245,215, 95, 7, 4, 6,
- 6,162,164,164, 4,207,158, 61, 67, 70, 70,198,142,227,199,143,159,124,240,224,193,242,244,244,244,125, 14, 14, 14,163, 38, 79,
-158,236, 26, 22, 22, 22,230,234,234,106,149,156,156,108, 74, 93, 82, 30,153,202, 4,240, 8, 64,139,178,200, 21, 0, 52, 71,105,
-211, 32, 80, 58,162, 48,207,196,196,222,143,121,158, 82,223,202,204, 28,121,172, 8,207, 83,178, 33,149,203,193, 80, 6, 6,117,
- 30,188,221,237,193, 82,160, 48, 59, 5, 12, 67,238,155, 34,169, 55,178,145,241, 73, 25, 46,150,114, 9,188, 67,186,219,220, 59,
-187,105,187, 69,131,214,163,249, 60,194, 19,138,205,215,191, 55,248, 3, 91,189,145, 66,153,151, 6,194, 99,110,128,131,227, 77,
- 26, 44,150,101, 33,149, 74, 95,138, 48,189, 26, 5,146, 74,165,208,104,106, 55, 93,138, 84, 42,133,206,128, 55,170,105,202,111,
-190,105,205,191, 19,189, 94,175, 24, 63,126,124,235, 22, 45, 90, 36,117,235,214, 45,214,223,223, 46,190, 71, 75,137,237,186,141,
- 7,131,187,181,107,120,167, 48, 55, 35, 43, 65, 44, 46,201,203,203,179,217,182,109, 91, 83,189, 94, 47, 51, 69, 55, 45, 45, 45,
- 17, 64,162,139,139, 75,143,246,237,219, 15,237,217,179, 39, 46, 94,188,168, 40, 46, 46,246,151,203, 75, 71,147,238,219,183, 15,
-191,253,246,219, 79,169,169,169, 7, 77, 77,111, 66, 66,194,113, 0, 94,245,234,213,179,172, 87,175, 94,134,165,165,165, 48,165,
-168,248,197,200, 66, 33,159, 65,171,207,110, 34,191,176, 8,150,150,150,144,201,100,158, 53,105,150,205,115,117,168,217,192,133,
-141,120,113, 59, 46,172, 91,179,218,162,252,201,212,193, 82,136,252,252,124,100,103,103, 35, 43, 43, 11,148, 82, 24,141,198, 0,
- 19, 52, 19, 1, 36,218,218,218, 58,121,123,123, 19, 51, 51, 51,208,220, 98,228, 41,117, 47, 53, 65, 22, 41,139,225,226,226, 2,
-133, 66, 81,105,115,132,181,181,181, 66, 44, 22,111,217,176, 97,131,191, 66,161,224,141, 26, 53,202,114,212,168, 81,173,171, 50,
- 99, 50,153,140,183,105,211, 38,159,224,224,224,205, 30, 30, 30,157,226,227,227, 11,254,135, 55, 90, 30,128,177, 83,167, 78, 13,
-149, 72, 36,248,230,155,111,226, 0,252, 92,182,121,207,119,223,125, 55,103,240,224,193,126, 19, 39, 78,108,248,249,231,159, 79,
- 46,107, 42,172,178,217, 89, 40, 20,134, 4, 4, 4, 96,255,254,253, 0,176,191,134,159,223,123,229,202,149, 53, 61,123,246,132,
- 68, 34, 9,171, 97, 95, 79, 55, 55, 55, 28, 60,120, 16, 0,238, 84,229,147,159, 60,121,130,254,253,251,131, 16,226,105, 66,222,
-251,116,238,220,121,239,210,165, 75,249, 10,133, 2, 35, 71,142,212, 94,191,126,189, 59,165,244, 34, 33,164,253,144, 33, 67, 46,
-252,252,243,207,242, 11, 23, 46,248, 47, 94,188,248, 10,143,199, 91, 98, 52, 26, 63,175, 65,115,196,162, 69,139,102,246,237,219,
- 23,243,231,207,167,187,119,239,126,143, 82,122,178,204, 84,158, 32,132,188,111,101,101,245,243,236,217,179, 73, 65, 65,193, 76,
- 66, 72, 50,165,244,251,170,244, 84, 42, 85,129,209,104,116, 84,169, 84, 38, 61, 33,154,186,127,253,250,245,187, 5, 6, 6,226,
-224,193,131,232,213,171, 23, 78,157, 58, 5,134, 97,142,164,164,164,156, 3,112, 18, 0,156,156,156, 44, 98, 99, 99, 39,183,105,
-211,134, 57,125,250,116,127, 0, 63,153,144,132,231, 0, 26, 1, 56, 69, 41, 77, 42, 27, 56,217, 18,165, 83, 54, 60,162,148,150,
- 79,117, 18, 4, 32,214,148, 60,177, 90,229,214, 51, 71,247,182,239,244,246,120, 11, 30,143, 1, 31, 66,168,138, 10, 1,163, 17,
- 94,238, 14,104, 22,224,128,123,241,106, 92, 57,189, 39, 95,165, 84,153, 52,189,132, 81, 87,188,249,204,241,131,237,194, 58,127,
- 96, 33,246, 10,132,155,195,164,224,168, 27, 39, 79,137, 69, 66,242,246,219, 3, 44,219, 55,243,198,153,251,133,184,118,230, 64,
-158,170,168,112, 51,103, 25, 56,234,100,176,170,232, 84,150, 57,121,242,100,251, 41, 83,166,192,220,220, 28, 57, 57, 57,208,235,
-245, 47,162, 77, 98,177, 24,150,150,150,200,201,201,193,174, 93,187, 80,246,180, 82,205, 19,157, 40,109,209,183,235,220, 8, 79,
-174, 21, 75,101,212, 90,246,250,154, 0,160,213,243, 51,191,223,181,207,186, 91,219,112,126, 61, 39,167, 63,109,175,139,230,191,
-196, 96,157, 74, 79, 79, 15,245,243,243, 75,119,119,119, 87,151,148,148,128,170,213, 69, 71,119,173,110,224,102, 49,238, 25,195,
- 48, 84, 42,149,178,150,150,150,197,207,158, 61, 35, 6,131,225, 92,109,244, 41,165, 99,199,142, 29,203, 92,186,116,233,189,161,
- 67,135,194,195,195, 3,119,238,220,193,182,109,219,176,119,239,222, 45, 66,161,112, 98, 93,210,157,148,148,164, 12, 8, 8,120,
- 41, 2,242,234,200, 66,189, 38, 11, 44,203,154,220, 57, 63,239,246,182,104,158,173,173,190, 97,189, 63,166, 19,201,203,203, 67,
- 86,153,185,170, 96,178, 76, 14, 97, 18, 66,138,180, 90,237, 43,233,252,163,249,177,184,184, 24, 58, 77, 38,140, 70, 99,165,154,
-185,185,185, 69,206,206,206,235,214,174, 93,251,245,194,133, 11,237, 87,173, 90,149,251,248,241,227, 66,134, 97, 74, 94,121,136,
-145,120,121,121, 41, 86,172, 88,225,176,118,237,218, 92,150,101,215,253,143,205, 85,223, 70,141, 26,109,233,214,173,155, 98,252,
-248,241, 88,187,118, 45,210,210,210,102, 80, 74, 13,101,229,128, 37,132, 76,251,246,219,111, 15, 79,159, 62, 29, 58,157,110,197,
-209,163, 71,231, 19, 66,198, 82, 74,127,174, 76,211,206,206,206,149,207,231,227,246,237,219,133,148,210,103, 53,148,179,116, 95,
- 95,223, 12, 66,136,131,147,147, 83,131,234,246,181,182,182,246, 82, 40, 20, 72, 73, 73, 41,191,137, 87, 70,124,106,106, 42, 21,
-137, 68,196,217,217,217,187,166,252, 91, 89, 89, 77,219,176, 97, 3,255,220,185,115,152, 59,119,110,114, 66, 66,194,144,178,105,
- 4, 64, 41,189, 77, 8,105,211,190,125,251,157,211,167, 79,247,253,242,203, 47,201,147, 39, 79,198, 1,168,214, 96,185,187,187,
-143, 29, 49, 98, 4,214,173, 91,135,245,235,215,143,163,148,238,121, 37,207, 59, 9, 33, 86, 54, 54, 54,235,198,140, 25,131,205,
-155, 55, 15, 1, 80,165,193, 74, 73, 73,153, 62,112,224,192, 57,185,185,185, 75, 76, 57,167,166,236,239,236,236,220,123,232,208,
-161, 14,148, 82,172, 93,187, 54,125,221,186,117,170,194,194,194,159, 83, 83, 83, 95,170, 39, 24,134,217,119,252,248,241,201,227,
-199,143,199,185,115,231,190,113,118,118,166,169,169,169, 27,106, 56,167,105,132,144, 6,132,144, 0, 74,233,163,178, 81,130, 73,
-175,148, 59,223,178,125,147, 77,201, 83,118,244,185, 67, 14, 13,187,255,126,247,198,249,206,158, 13,219, 8,236,173, 20,112,241,
-182,133,181,153, 16, 20,192,131, 4, 53,174, 93, 60,169,207, 76, 75,188, 98,202, 8,194,114, 77,199,160, 30, 87,100,182,238,157,
-235, 7,182,230,123,122,251,160, 83,171,198, 86, 54,230, 2,104,245, 20,167,238, 22,224,234,133, 99,250,204,140,164,115,220, 8,
-194,255, 13,255,149, 14,238,166, 68,176,230,173, 95,191,190,213,198,141, 27,123, 78,158, 60, 89,241,193, 7, 31, 64, 42,149,162,
-184,184, 24,110,110,110, 48, 24, 12, 56,122,244, 40,110,223,190, 93,196,178,236, 97,252, 49, 74,164,252, 2,122,233,109,219, 51,
-215,170,234, 17, 66, 24,160,184,213,252,245,141,223,136, 38, 0, 92,137, 51,184, 56,167,101,207,203,201, 59,250,169,187,139,147,
-176, 75,235, 22,124, 91,171,210,209,204,117,213,124, 3, 55,173,191, 92,211, 96, 48,140, 32,132, 52,156, 54,109,218,114, 23, 23,
- 23,231,249,243,231, 39, 6, 6, 6,170, 11, 11, 11,169, 86,171,101,179,178,178,100,123,247,238,245,204,201,201, 41,210,235,245,
-239, 83, 74,239,213, 38,157,169,169,169,106, 0, 67, 28, 29, 29, 15,102,102,102,238, 29, 52,104, 16, 54,111,222,140,171, 87,175,
-246, 72, 77, 77, 61, 90,215,188, 83, 74, 13,225,225,225,249, 81, 81, 81, 14, 60, 11, 79, 56, 88, 10,208,245,139,210, 96,132, 66,
- 12,168,139,139, 16, 23,243, 8,133,133,133,183, 76,213,140,141,141,213, 6, 7, 7,231,103,101,101,217,218,217,217,149,154,171,
- 10,198, 42, 55, 55, 23, 5, 5, 5,148, 97,152,223, 77,213,204,202,202, 42,110,217,178,165, 42, 54, 54, 86,196, 19, 57,193,201,
- 74,140,210, 38, 72, 10, 59, 5, 31,106, 85, 49,238,223,185,133,194,194,194,243, 85,105,166,166,166,238,114,118,118, 6,128,175,
-231,204,153, 99,219,181,107,215,167, 55,110,220,104, 87,241,119, 66, 66, 66, 14,204,159, 63,191,199,226,197,139,179,183,108,217,
- 50, 61, 45, 45,109,251,255,178, 44,217,216,216, 76, 57,114,228,136, 66,167,211, 97,237,218,181, 88,185,114,229, 70, 74,233,190,
- 87,206,217, 17, 30,143,247, 45,195, 48, 31,125,252,241,199, 24, 51,102,140, 44, 52, 52,116,114,133, 40,215, 75,154, 41, 41, 41,
-159,135,132,132,204,201,204,204, 52,201, 16,196,196,196,140, 14, 9, 9,249, 60, 51, 51,115,121,117,121,151,203,229,114,163,209,
-136,231,207,159,231, 81, 74, 11,170, 40, 95, 37, 62, 62, 62, 41, 70,163,209, 85, 38,147, 89,215, 84, 62,243,242,242,150,132,134,
-134,206,203,200,200, 56, 9, 96, 17,165,180,228, 21,189,187,132,144,134,159,124,242,201,132,101,203,150,245, 79, 79, 79,223, 85,
-147,102, 66, 66,194,146,246,237,219,127, 17, 29, 29,189,133, 82,186,190,138,116,126, 67, 8,209,109,223,190,125,220,243,231,207,
-151, 86,167,153,154,154,122, 24,192, 97, 83,207,111, 85,251, 87,212,180,182,182,158, 62, 97,194, 4, 28, 59,118, 12, 69, 69, 69,
-107, 82, 83, 83,191,172,194,172, 93,243,244,244,252, 45, 60, 60,188,247,138, 21, 43,132, 61,122,244, 24, 7, 96,131, 9,229,243,
- 42,128, 86,101,253,224, 30, 3,200, 41,247,201, 40, 29, 57, 72, 94,173,139,107,210, 52,234, 11, 7,223,185,180,127,103, 82,236,
-253,240,144,118,125,173, 10, 84,174, 16,242, 25, 40,243,210,112,245,244,175,121,169,201,207,174,106, 75,242, 7,215, 70,211,160,
- 43, 24,116,255,242,129, 93,233,241,143, 90,168, 90,117,183,202, 47,114,135, 80, 64,144,159,149,140,235,231, 15,230,166, 37, 62,
-191,164,103, 53,195,254,174,122,254,255,147,230,127, 13, 98,202,128, 32, 66,136, 8, 64, 71,133, 66,209,233,211, 79, 63, 21,117,
-237,218, 21,139, 23, 47,198,169, 83,167,180, 90,173,246, 20,128,211,149, 69, 6,170, 59, 1,127,133,102,183,230, 68,225,232,192,
-172,246,112, 98,134, 4,122,123,145,168,152, 39,252, 91,169, 61,127,124, 29,205,127, 75,129, 38,132,180, 22, 8, 4, 95,250,251,
-251,107,226,227,227, 3,173,173,173,163, 83, 82, 82, 68,122,189,126, 26,165,244,226,235,164,211,209,209,209,182,123,247,238,153,
-179,103,207, 38,243,231,207,199,197,139, 23, 45,171,139,176,152,162, 89,175, 94,189, 14,161,161,161, 39, 86,125,179,129,159,144,
-161, 68, 97, 81, 17,138,138,138, 80,172, 84,162,164, 48, 29,199, 14,236,212, 62,120,240,192, 55, 61, 61, 61,193, 84, 77,119,119,
-247,174,141, 27, 55,222,185, 97,195, 6,139,156,156,156, 23, 6, 43, 55, 55, 23, 44,203, 98,253,250,245,185, 57, 57, 57,141,146,
-147,147, 83, 77,213,244,240,240,232,211,170, 85,171,189,203, 87,255,192, 79,202, 80,162,168,184, 24, 42,149, 10, 37,106, 53,116,
-202, 12,108,249,113,173,230,209,163, 71, 30, 89, 89, 89, 25,213,105, 58, 59, 59, 15,108,221,186,245,130,251,247,239,159,123,242,
-228,201,216,138,219,124,124,124,190,109,210,164, 73,247,223,127,255,125, 78, 74, 74,202,182,255,117, 89, 34,132,116,117,113,113,
- 89,153,149,149, 21,167,211,233,246, 80, 74,183, 85,243,189, 65,124, 62,127,144,173,173,173, 67,122,122,250, 50, 74,233,254,255,
-101,153, 39,132,244,180,183,183,159,149,153,153,185,140, 82,250, 91, 53,223, 43,223,111, 57,165,244, 0,119, 3,251,179,166,179,
-179,115, 79,123,123,251, 5, 25, 25, 25,231,210,211,211,167, 85,215,228,235,234,234, 42, 97, 89,118,129,131,131, 67,203,244,244,
-244,175,211,210,210,126, 53, 53,157,101,175,202,241, 64,105,127, 43,160,180,207, 85, 66,117,115, 95,213,164,105,235,219,169,151,
- 88, 38, 29, 78, 89, 99, 19,128,128,225,241,238,150, 20,171, 54, 87, 23,185, 50, 69, 83, 34,151,141, 96, 89, 99, 19, 6,132,101,
- 24,230,158, 90,173,250, 41,235,241,169, 99,156, 25,250,251, 12, 22, 33,100, 52,165,244, 71,252, 11, 33,166,143,184, 46, 29,194,
- 12,160, 7,195, 48, 45, 89,150,189, 2,224, 72,117,243,214,152,114, 2,254, 10,205,110, 17,196,197,195,150,183, 94, 33, 99, 66,
-151,109,209,127,242, 38, 52,255, 45, 5,154, 16,210,135,207,231,127,102, 48, 24,190,162,148, 30,124, 83,233,244,241,241,217, 16,
- 17, 17, 49,252,196,137, 19,223, 37, 36, 36, 76,120, 19,154,129,129,129, 95,215,175, 95,127, 66,143, 30, 61, 4,246,246,246,200,
-206,206, 70, 76, 76, 12, 34, 35, 35,181,233,233,233, 99,159, 60,121,178,165,182,154,141, 27, 55, 94,104, 99, 99, 51,246,195, 15,
- 63,180, 33,132, 32, 39, 39, 7, 69, 69, 69,116,223,190,125,217,106,181,250,195, 39, 79,158, 28,174,173,102,163, 70,141,126,244,
-244,244, 28,214,183,111, 95,129,139,139, 11,178,179,179,241,240,225, 67,252,254,251,239,154,244,244,244,161,209,209,209,251, 76,
-209,244,242,242, 18,197,198,198, 86,218,156, 24, 18, 18, 34,136,140,140,212,115, 21, 46,167,201,105,114,154,156,193,250,111, 24,
- 44,126,109,118, 46, 51, 41,187, 8, 33,123,203,251,103,188, 46,127,133,230,177,243, 52, 5, 64,119, 66, 8,255, 77,105,254, 91,
- 40, 51, 85, 7,223,180,110, 76, 76,204,135,206,206,206, 19,203,154, 13,223, 8, 15, 31, 62,156,226,226,226,178, 61, 62, 62,126,
-133, 76, 38, 11,102, 89, 86,175,209,104, 46,231,228,228, 76, 78, 77, 77,173,211,139, 96,239,221,187,247,133,179,179,243,129, 21,
- 43, 86,204,160,148, 54, 38,132,104, 13, 6,195,149,188,188,188, 5, 73, 73, 73,105,117,209,188,127,255,254,104, 23, 23,151, 77,
-241,241,241, 75,197, 98,113, 99, 74,169, 86,173, 86,159,207,204,204,252,180, 60,114,101, 10, 85,153, 43,160,116,138, 12,112,112,
-112,112,112,252,103,224,215,229, 75,127,133,105,249,183,104,254,127,230, 77,154,171,114, 82, 82, 82,238, 1,120,235, 13,167,243,
- 14,128, 1,111, 56,157,215, 1, 68,112,165,128,131,131,131,131,195, 20, 24,238, 16,112,112,112,112,112,112,112,112,188, 89, 8,
- 74,231, 33,249, 19,181,105, 91, 37,132, 4,213,246,135, 77,232, 75,196,105,114,154,156, 38,167,201,105,114,154,156,230,127, 76,
-179, 18,237,183, 95,217,148,242,138,222,127,191,147,123,173,197,185, 14,128,156, 38,167,201,105,114,154,156, 38,167,201,105,254,
- 63,132,107, 34,228,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,193, 25, 44, 14, 14, 14, 14, 14, 14, 14,142,127, 12,127,233, 40, 66, 14, 14, 14,
- 14, 14, 14, 14,142,255,143,188, 20,193, 34,132,112,110,139,131,131,131,131,131,131,227,111,227,191,226, 69,184, 38, 66, 14, 14,
- 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,252, 11, 12, 22,215, 52,200,193,193,193,193,193,193,241,119,242,
- 95,243, 34,229, 17,172,136,178,140, 69,112,167,152,131,131,131,131,131,131,227,111,224, 63,229, 69,184, 81,132, 28, 28, 28, 28,
- 28, 28, 28, 28,111, 24,174, 15, 22, 7, 7, 7, 7, 7, 7, 7,199,191,201, 96, 17, 66,130, 56, 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, 64,165,
- 35, 1, 40,165, 15, 76, 22,169,195,104,130,154,244, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,239,105,214,164, 93, 27,
-255,241,143, 54, 88,127,229, 68,163,132,144,160, 55,125,160, 56, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,239,105,254,215,
-224,115,135,128,131,227, 95,206, 94,194,131,189,159, 39, 88,234, 12,190, 40, 13,103,239, 63,195, 92,202,190,182,166,115,160, 59,
-180,122, 7, 72, 37, 89, 56,113, 47,238,181, 53, 57, 56, 56, 56, 56,131,197,193,193,241,175,193,201,223, 23, 70, 44, 5, 15, 78,
-160,186, 88,180, 10, 92, 10,224,245,158, 44,109,252,125,161,103, 23,129,207,184, 66,171,139, 70, 91,191,101, 0, 30,114, 7,155,
-131,131,131,195, 52,254,150, 78,238, 97, 97, 97,145, 97, 97, 97, 11, 35, 34, 34,196,220, 41,224,224,120, 13, 30, 52,146,193, 96,
-236,166,213,179, 46,199,175,228,219,171, 74,140,190, 16, 26,186,227,138,175,217,107,105, 10, 72,231, 18, 61, 91,111,251, 41,149,
- 67,113,137, 33, 0, 12, 94, 79,179,140,160,160, 32,203,102,205,154, 29, 15, 14, 14,182,229, 78, 30, 7, 7, 7,103,176,222, 48,
- 44,203, 54,181,183,183,159,172, 86,171, 19, 66, 67, 67,123,255,127, 58,224, 45, 90,180,184, 18, 30, 30,158,209,178,101,203,140,
-150, 45, 91,222,174,105,253,127, 17,103,103,103,223, 70,141, 26, 37, 52,108,216, 48,186,226,122,251, 38,253, 91, 6,180,253, 96,
-174,109,195,190,237,184, 75,211, 68,138, 89, 7, 48,188,246, 15,227, 85,178,244,124,189, 67,228, 19,149, 2,148, 23, 1, 29,156,
- 94, 75,147,165, 29,238,198,170,229, 87,159,217, 57, 92,122,160, 49, 7,101,218,131, 18,199,215, 77,174, 72, 36, 26, 71, 41,237,
- 36, 16, 8, 38,113, 39,239,255, 55,132,144, 32, 66, 72,111, 66, 72,216, 27,212,252,210,223,223, 63,133, 16,242, 9,119,132, 57,
-254, 53, 6,107, 64,125,210,234,189, 6,228,194,192,250,164,104, 80, 3,162, 28,218,128, 92,126,199,139,212,249, 70,184,111,223,
- 62,233,182,109,219,236, 3, 3, 3,119, 53,111,222,252,114,104,104,168, 79, 93,116,194,194,194,142,135,133,133, 13,120,117, 93,
-104,104,232,192,138,235,154, 53,107, 22,213,172, 89,179,130,176,176,176,103,166,232,134,132,132, 60, 13, 9, 9, 41, 14, 11, 11,
-123, 90,113,125,104,104,232,192,102,205,154, 29,127,229,247, 6,188,186,174,202, 3,206, 48,174,135, 14, 29,178, 63,114,228,136,
- 61,159,207,119,120,117,253,225,195,135, 95, 90, 95,135,227, 49, 42, 44, 44,236,202, 43,121,249,240,213,117,213, 17, 26, 26,122,
- 37, 36, 36,228,195, 87,116,175,132,133,133,141,122, 19,230,170,109,219,182,151,239,220,185, 83, 79,161, 80, 88, 86,220,230,104,
- 99,217,229,202,225,111, 39, 15, 27,208,121,156,125, 96,191, 70,220,229, 89, 3,143, 3,133, 48,176,109, 89,150,218, 61,124, 86,
- 98,215,189,199, 59,252,187, 79,213,118,122,131,209, 26,132, 23,129, 11, 30,226, 58,105,234,245,109, 88, 74, 29,206,220, 21,218,
- 69,244,250,152,119,238, 62,223, 78,111, 52,218, 64,143,118,117,210,252,163, 28, 10,120, 60,222,228, 49, 99,198, 48,132,144,143,
-189,188,188, 68,255,159, 78, 87,243, 70,196,229,173, 80,254,141,144, 64,210,234, 13, 26,138,134,114,185,252, 22, 33,196,247, 95,
-102,174,154, 2,144, 81, 74,127, 3,224, 64, 8,225,191, 1,205, 85, 11, 22, 44,152,246,224,193, 3,231,250,245,235,207, 39,132,
-240,184, 74,130,227, 31,111,176, 6,213, 39,243, 28, 28, 93, 78,206, 94,181,163,237,134, 11,113,102,223, 29,186, 45,159, 60,125,
- 73, 43, 71, 43,187,163, 67,189,200,178,170,190, 87,221, 8, 3,145, 72,132,103,207,158, 97,237,218,181,146,121,243,230,181,180,
-176,176,184,215,188,121,243,213,129,129,129,242,234,210,242,170, 38,165,180,149, 64, 32,216,208,188,121,243,205,229, 21, 54, 33,
-164,149, 88, 44,254,177,121,243,230,219,203,155, 33, 67, 66, 66,234,223,184,113,195,156, 16,226, 96, 74, 58,155, 53,107,230, 20,
- 25, 25, 41, 3, 74, 35, 1, 17, 17, 17,226,102,205,154,109,115,113,113, 89, 15,160, 21, 0,120,121,121,137,154, 55,111,190,217,
-205,205,237, 39, 66, 94,174, 52,171,202, 59,195, 48,176,180,180,196,142, 29, 59,192,227,241, 42, 86, 14,176,180,180,196,207, 63,
-255, 12, 66, 72,173,143,103, 96, 96,160, 60, 44, 44,108,159,147,147,211,106,150,101,195, 1,160, 81,163, 70,178,102,205,154,237,
-117,113,113, 89, 83,190,206, 20, 77, 74,105,184, 80, 40, 92,221,172, 89,179,189,141, 26, 53,146, 1, 0,203,178,225,124, 62,127,
- 85, 88, 88,216,190,218,156,163,166, 77,155,142,105,220,184,113,106,227,198,141, 83,253,252,252, 22, 59, 56, 56,156, 95,183,110,
-157, 77,197,188,151, 71,174, 50, 50,115,242,174,220,140,122, 50,121,204, 59, 17,245,220, 28,134, 88, 54,233,107, 97, 74,222,235,
-202,191, 94, 51,135,216,131,208,142, 79, 18,212, 18, 15,239, 80,185,189,255, 59,176,179,228,139,175, 62, 42, 86,128,135,183, 32,
-144,217,213, 77,147,255, 86, 84,156, 90,106, 85,191,155, 44,172, 69, 91, 16,185,143,248,252,157, 98,115,240,153,186,105,254,193,
- 59,225,225,225,162,142, 29, 59,194,217,217,153,103, 97, 97, 49,228, 63,127,142, 42,152, 43,133, 68,116,253,235, 5,159,134, 58,
-219,200, 14,154, 98,178, 76, 24, 62,223,208,222,222,254,220,183,223,126, 27,162, 80, 40, 46,154, 98,178,254, 9,199,179,204, 92,
- 9, 41,165,215,202, 86, 61, 4,208,230, 53, 53, 87,205,155, 55,111,210,204,153, 51, 81, 84, 84,132, 97,195,134,153, 3,248,218,
- 84, 77,133, 66,225,221,184,113,227,237, 13, 27, 54, 76, 12, 14, 14,214, 6, 4, 4,148,248,249,249,197, 7, 5, 5,109,145, 72,
- 36,158,255,245,242,249, 79,209,172, 1, 17,128,246, 0,122, 0,120, 11, 64,179,178,255,195,202,150, 30, 0, 58,190,242,183, 60,
- 58, 90,190,189,121, 21, 26, 61, 42,249, 94, 88,133,245, 21, 63,191,250,127,245, 6,139, 16, 66, 43,254,173,200,187, 13, 72, 75,
- 27, 71,151,105, 95, 30,184, 41,101, 99,238, 34,114,100, 7, 60,249,164, 47,164, 79,239, 98,198,132, 25, 82,133,194,106,194,128,
- 6,164,125, 93,142, 86,116,116, 52,118,237,218, 5, 91, 91, 91,178,113,227, 70,241,128, 1, 3,198,153,155,155, 39,133,133,133,
- 13, 49, 85,131,199,227, 25, 55,111,222,108,214,167, 79,159, 65,214,214,214, 81, 33, 33, 33,245, 25,134, 49,110,221,186,213,108,
-224,192,129, 3,180, 90,237,163,208,208, 80,159,219,183,111, 27,111,222,188, 9,134, 49, 45,104, 23, 25, 25,105, 56,118,236, 88,
-121, 68,199,135, 82,250,104,217,178,101,131,246,239,223,175,176,176,176, 96, 67, 66, 66,234,187,185,185, 69,125,249,229,151, 67,
-246,238,221,171, 48, 55, 55,103, 77,172, 8, 80, 82, 82, 2,137, 68,242,146,145, 34,132, 64,173, 86, 67, 44, 22,155,156,198, 10,
-145,129,134, 54, 54, 54,143,151, 46, 93,218,231,192,129, 3, 82,133, 66,129,176,176,176, 0, 75, 75,203, 39,203,151, 47,239,123,
-240,224, 65,169, 66,161, 48, 89, 79, 40, 20,226,231,159,127,150,189,247,222,123,189,197, 98,241,227,176,176,176, 0,161, 80,136,
-157, 59,119,202,134, 12, 25,210, 83, 38,147, 61, 10, 9, 9,105,104,138,150, 94,175,159,115,243,230, 77,167,243,231,207, 59,185,
-187,187, 79,252,238,187,239, 28, 4, 2, 1, 0,192,104, 52,190, 20,185, 26,210,191, 83,243, 73,115,190, 61,167, 46,209,104, 23,
-205, 24, 17, 33, 48,162, 5,247, 12, 84, 5,123, 9, 15,172,177, 41, 0,175,219,209,106,219, 38,109,135,240,145,249, 27,154, 5,
-152,241, 47,220, 86,218, 83, 74,221, 97,160,205,112, 33,130, 95, 43, 77, 30,109, 2,194,250,156,188, 67,108, 91,118, 28,194, 79,
- 72, 72,128,103, 64, 4,239,240, 77, 56, 80, 74, 61,193, 34,180, 86,154, 21, 16, 8, 4,115,223,125,247, 93,121,124,124, 60, 90,
-182,108, 41, 19,137, 68,115,222, 72, 20,239,186,159, 59, 46,250, 70,224,138,175, 83, 93,211,246, 87, 71,174,204, 37,162,107, 59,
-183,255,226,220,168,205, 40,178,254, 83,119,107, 59,133,224,224,235, 68,178,202,204,213,217,235,215,175,219,116,238,220, 25,243,
-230,205,179, 51, 55, 55,191,248, 79,143,100, 85, 52, 87,132, 16,105, 89,243, 96, 10, 0,215,215,208, 92, 51,111,222,188, 73,179,
-102,205,194,181,107,215,176,124,249,114,116,235,214, 13, 86, 86, 86, 53,214, 31,239,191,255,190,172, 85,171, 86,145,189,123,247,
-190, 59,105,210,164, 33,135, 15, 31,118,219,188,121,179,112,248,240,225,226,119,223,125,215,253,211, 79, 63,253,160,123,247,238,
- 15,154, 55,111,126,125,192,128, 1,146,186, 38,177,108,225,168,249, 92, 86,233, 69, 0, 52,158, 57,115,102, 51, 66,200,225,153,
- 51,103,134, 2,176, 37,132, 28, 6, 96, 7,192,174,236,127,209, 43,127,237,202, 76, 83,249,118,155,202, 52,202,151, 87,190,103,
- 87, 97,125,197,223,120,245,255,154, 35, 88,132,144,118, 0, 46,190,186, 3,159, 98,193,152,201, 11, 37,207,183,172, 68,218,246,
- 85, 96,178, 83,192,203, 79,135,230,226,111,208, 95, 58,132,247,195,195,165, 82, 66, 22,213,229, 96, 42, 20, 10, 8,133, 66,196,
-196,196,224,209,163, 71,232,222,189,187,112,237,218,181,150, 13, 27, 54,252,177, 85,171, 86,119,195,194,194, 26,155, 98, 88,188,
-189,189, 49,104,208, 32,209, 39,159,124,210, 64, 34,145,220,166,148, 10, 60, 61, 61, 49,112,224, 64,225,244,233,211, 61, 36, 18,
-201, 77,150,101,133, 50,153,172,202,232, 80,101,186, 82,169, 20, 0, 4, 62, 62, 62,183,118,237,218,229,217,170, 85, 43,254,201,
-147, 39, 81, 88, 88,200,247,245,245,189,187,115,231, 78,175,150, 45, 91,242, 47, 95,190,140,226,226, 98,106,170,110,113,113, 49,
-164, 82,233,159, 12, 86,113,113,241,159,140, 87, 77,132,133,133,141,242,242,242,186,185,107,215, 46,215, 54,109,218,240,206,157,
- 59,135,162,162, 34,184,187,187,223,218,181,107,151,107,171, 86,173,120, 87,174, 92, 65, 81, 81,145,233,143, 9, 34, 17, 60, 61,
- 61,241,238,187,239, 10,166, 78,157,234, 42, 16, 8,110,138, 68, 34,184,187,187,227,221,119,223, 21, 78,153, 50,197, 85, 36, 18,
- 93, 55,177,201,144, 7, 0, 6,131, 1, 3, 6, 12,144, 75,165, 82, 36, 37, 37,129,101, 89,176,108,169, 39, 77,203,202,185,255,
-251,205, 7,143, 39,143, 29,208,174, 88,163,209,156, 56,127,235, 81,160,143,187, 43, 33,212,131,171,114,170,192, 42,208, 6, 60,
-116, 74, 72,213,138, 69,114, 87,133,153,173, 31,144,123, 17,245,157,197, 0, 37,146,155,143, 85,114, 48,180, 19,144,109, 83, 43,
- 77, 35,219, 41, 46, 69, 43,214, 73,131,204,156, 93,234, 33, 39, 39, 7,110,158,254,208,192, 78,116,229, 65,177, 25,104, 45, 53,
-203, 8, 14, 14,110,227,230,230,230,232,225,225,129,236,236,108,120,123,123,195,204,204,204, 42, 36, 36,164, 83,157,143,193, 5,
- 15, 49, 10,208, 10, 58,242, 53, 8, 51, 31,148,191, 20,252,172,166,184, 29, 34,248,199,153,171,159,127,113,177,113,242, 7, 30,
-140,132,131,181, 8, 27,103, 54,177,182, 83,136,235,100,178, 8, 33, 13, 29, 28, 28,206, 94,191,126,221, 86, 34,145, 32, 50, 50,
- 18,129,129,129, 88,185,114,165,157,149,149,213, 63,214,100,189, 98,174,172, 41,165,106, 0, 44,128,193,168,195,168, 87, 82,202,
- 55, 11, 23, 46,156, 56,107,214, 44, 92,189,122, 21, 46, 46, 46,200,204,204, 68,155, 54,109, 18,242,242,242,170,189, 47, 53,108,
-216,208, 53, 38, 38, 38,229,211, 79, 63,109,186,109,219, 54,169, 92, 46, 71,126,126, 62,126,250,233, 39,204,156, 57, 19,132, 16,
- 80, 74,177,105,211, 38,217,136, 17, 35,154,197,198,198,166,120,120,120,152,218,125,131,148, 69, 92,100, 0,228,101,127, 37, 19,
- 39, 78, 20, 17, 66,196,101,230, 82, 66, 8, 17,112,149,217,159,206,107,165, 94, 4,128,237,178,101,203,150, 80, 74,123, 46, 91,
-182,108, 73,133,253, 15, 87,163, 85,209, 52, 1, 0, 94,213,160,148,246,172,248,183,226,119, 41,165, 61, 41,165, 61, 43,126,191,
-186,223,171,210, 96, 1, 56, 79, 41,109,247,167, 48, 32,208,216,177,190, 31,242, 79,237,129,148, 71, 94, 90,152,184,251,112,147,
-240,161,167,180, 97, 93, 14,164,153,153,217,139,133, 97, 24,164,165,165,129,199,227, 97,206,156, 57,146, 9, 19, 38, 52, 18, 10,
-133, 87,219,182,109,187,180, 38,195, 2, 0, 55,110,220,128,183,183, 55,153, 53,107,150,121,187,118,237,248, 0,112,239,222, 61,
-120,121,121,145,197,139, 23, 43,122,245,234, 69,100, 50,153,201,209, 33,134, 97, 32,149, 74, 17, 17, 17, 65, 54,111,222,108, 38,
- 22,139,113,228,200, 17,100,103,103,163,115,231,206,252,205,155, 55,155, 73, 36, 18, 92,184,112, 1, 5, 5, 5, 38,235, 18, 66,
-160,209,104, 42, 53, 88,149, 69,182,170,163,101,203,150, 27, 29, 29, 29, 87,111,219,182, 77, 44,149, 74,113,238,220, 57, 20, 20,
- 20, 96,208,160, 65,134,159,127,254, 89, 98,110,110,142, 43, 87,174,160,160,160,160, 78, 5,253,198,141, 27,240,242,242, 34,179,
-103,207,150,134,135,135,235, 1,224,206,157, 59,240,241,241, 33,179,103,207,150,154,155,155,175,106,221,186,245,198,234, 52, 88,
-150, 69, 90, 90, 26, 30, 60,120,128,184,184, 56,100,103,103, 35, 43, 43, 11, 69, 69, 69, 48, 24, 12, 0, 0, 89, 81,225,145,111,
- 54, 31,186, 43,151, 74,101,205, 27,249,212,187,126,251, 97,166, 92, 42,149,249,120,214,243, 37,100, 62,247, 58,167,202, 10,145,
- 64,235, 3, 74,154, 94,123,168,180,110,211,101,176, 16, 89,199, 0,170, 7, 8, 31,237,155,187,242, 15, 94, 46,118, 0,139,198,
- 16,194, 31, 48,161, 64, 17, 66,192,215,121, 3, 36,244,100,164,193,166,117,151,113,194,228,228,100, 8,133, 66,136,197, 98, 4,
-183,122,155,191,243,156,222, 17, 64, 19, 8,224,103,146,102, 5,196, 98,241, 23, 35, 70,140,144,167,164,164,188,208,236,214,173,
-155, 92, 38,147,205,173,179,185, 98,100,225, 48,208, 73, 81,113,106,247,197, 91,210,252,159, 37,169,253, 65, 49, 5,122,125,240,
-235,154, 44,119,119,247, 8, 95, 95,223, 56, 79, 79,207,214,175,105,174,174,238,250,249, 23, 23,107,199, 82,115, 5,163, 10,224,
- 73,225,104,111,133,141,115, 35,172,237,204,165,181, 50, 89,101,230,234,204,181,107,215,108, 37, 18, 9,110,221,186, 5,145, 72,
- 4,137, 68,130, 70,141, 26, 97,253,250,245,118,214,214,214,255, 8,147, 69, 8,177, 34,132,116, 33,132,188, 67, 8,121,187,130,
-185,242, 4,208,129, 16,210, 9,128, 35,128, 11,148,210,187, 38,106,182,230,243,249, 71,154, 52,105,146,202,231,243, 31, 46, 89,
-178,228,163,233,211,167, 99,205,154, 53,136,136,136,120, 54, 99,198, 12, 60,121,242,196,160, 82,169,122, 83, 74,171,189, 17, 42,
-149,202,223,102,207,158,109,209,175, 95,191,242,207,184,124,249, 50,182,110,221, 10,185,252,143, 94, 16,148, 82,244,234,213, 11,
-163, 70,141,178,210,106,181,251,170,211,116,112,112,120,235,252,249,243, 62,101,230, 74, 82,193, 96,201, 79,159, 62,109, 41,145,
- 72,172,155, 53,107,102, 94,182, 94,214,175, 95, 63, 27,129, 64,208,154,171,212, 94,162, 82, 47, 82,149,193,121,213, 0, 85,182,
-173, 50,243, 84,215,196, 85,247,123,213, 25,172, 8, 66,200,133,202,118,210,229,102, 64, 12, 35,100, 60, 2, 41,159,148,254,229,
- 17, 72, 9, 11,126, 94, 70, 45,171,218,151, 13,150, 66,161,248,147,209, 82,171,213, 80, 42,149, 38, 25,141,242,190, 60, 86, 86,
- 86, 47,110,218,102,102,165,163,201,173,173,173,161,209,104, 64, 8,129, 92, 46,135, 92, 46,175, 85, 4, 75, 34, 41,141, 8, 95,
-185,114, 5,191,255,254, 59,248,124, 62,172,173,173, 1, 0,183,110,221,194,253,251,247, 33, 18,137, 96, 99, 99, 83, 43, 93,157,
- 78, 87,105, 19,161, 86,171,173, 85, 19, 33,195, 48, 40, 41, 41,161,183,110,221,194,131, 7, 15, 32, 22,139, 97,103,103, 7,145,
- 72,132,164,164, 36, 60,126,252, 24, 34,145, 8,118,118,118,117, 58, 63,230,230,230,200,207,207, 7,203,178,229,209, 60,152,155,
-155, 67,169, 84,130, 97, 24,147,210,201,178, 44, 82, 82, 82,144,157,157,141,196,196, 68,100,101,101,189, 48, 89,229, 77,132, 28,
-181,228,114, 67, 11, 16, 65,231,172,124,189, 56, 75, 41,178,112,240,234, 8,100, 31, 3, 8, 15, 16, 88,161, 69,211,250, 72, 72,
- 55,202,159, 36,106, 37,208,163, 11,206,250, 90,153,164,201, 19,116,202, 44,208,139,227,243,237,204, 3,130, 66,144,153,153, 9,
-177, 88, 12,177, 88,140,208, 22,111, 33, 46,149,149, 61,124,174,150,129,162,179, 73,154,101, 52,109,218,180,129, 84, 42, 13,111,
-218,180, 41,201,200,200,128, 88, 44,134, 68, 34, 65,120,120, 56, 24,134,105, 20, 28, 28,236, 95,171,252, 63,243, 18, 65, 32,107,
- 1,208, 73,143,159,171,156, 15, 94, 81,251,246,234,251,182,245,170,221,153,254,143,159,151,120, 66,107,152,138, 98, 93, 72, 93,
- 77,150,135,135, 71, 59, 51, 51,179,195, 95,124,241,133,167, 88, 44, 62,230,233,233,217,166, 78,245,155,152,247,195, 23,147, 6,
-187, 88,149,155, 43, 67, 49,192,147, 2, 60, 89,169,201,114,176,197,162, 79, 58, 90,203,132,130, 95, 77,213,148, 74,165, 59,191,
-249,230, 27,187,114,115, 37, 20, 10, 33,145, 72, 94, 44, 77,155, 54,197,156, 57,115,236,172,173,173,119,252,205,230,202, 26,165,
-253,170,238, 1,216, 7,224, 76, 5,115,229, 13,224,215,178,168,213,109, 74,105,130,137,154, 45,187,118,237,122,238,217,179,103,
-221,239,222,189,235,148,158,158,238, 63,101,202, 20,172, 94,189, 26,211,167, 79,223, 65, 41,245,221,179,103, 79,240,141, 27, 55,
- 26,153,210, 63, 40, 61, 61,253,189, 25, 51,102,100,103,103,103, 3, 0,130,130,130,144,159,159,143,169, 83,167, 98,210,164, 73,
-229,145, 87, 0, 64,102,102, 38, 86,172, 88,145,145,158,158, 62,172, 58, 77,163,209,152,180,127,255,254,112,173, 86, 91, 15,128,
- 16,128, 24,128, 44, 33, 33,193,162,184,184,216,156,199,227, 41,228,114,185,185, 88, 44,150,143, 24, 49, 66,248,240,225,195, 0,
-131,193,144,194, 85,106, 47, 81,165, 23,169, 44,210, 84,213,186,186,238,111,170,201,170,149,193,162,148, 94, 0,208,246, 79, 6,
-134,224, 94,226,205, 11,176, 14,108,250,114, 4,139, 79, 32, 83,152, 35, 46, 37, 9, 66,144,168, 58, 36,240,133,169,170,104,178,
-210,210,210, 48, 99,198, 12,213,246,237,219,239,107,181,218,240,139, 23, 47,206, 52, 37,130,101,111,111,143,196,196, 68,250,213,
- 87, 95, 21, 30, 59,118,204, 80,190, 46, 41, 41,137,126,254,249,231, 69,191,252,242, 11,173, 77, 19, 97,121, 4,235,194,133, 11,
-116,238,220,185, 5,169,169,169,212,218,218, 26, 54, 54, 54, 56,125,250,180, 97,230,204,153, 5,177,177,177,212,218,218, 26,214,
-214,214,181, 50, 88, 6,131, 1, 82,169,244, 37,131, 66, 8,129, 94,175,255, 83,100,171,218,123,226,229,203, 35, 11, 10, 10, 62,
-157, 58,117,170,250,209,163, 71,212,206,206, 14,118,118,118,216,178,101, 11,255,131, 15, 62, 80,223,187,119,239,197,186,186, 96,
-107,107,139,232,232,104,186,100,201, 18,245,153, 51,103, 4, 0, 96,103,103,135, 39, 79,158,208, 5, 11, 22,168,243,243,243, 63,
-189,124,249,242,200, 26, 42, 28,196,197,197,161,176,176, 16, 70,163, 17, 26,141, 6, 89, 89, 89, 72, 78, 78,126, 97,176,212,114,
-243,174, 31, 15,239,213,164, 88,173, 86, 93,191, 31,147,216,188,105,160,125,177, 90,173,138,121,158, 24, 77,233, 92,110,246,240,
- 63, 93, 60,172, 35, 40,109,125,249,190,210,178, 83,143,129, 34, 82,120, 3,208, 43, 1,129, 21, 32,176, 4, 95, 98,131,110,111,
- 5,243, 54,159, 40,116, 4, 97, 91, 66, 34,174,185,127, 11, 75, 29,192,178,109, 78,223, 42,177,106,221,125,130, 40, 55, 55, 23,
- 12,195,188, 48, 88, 50,185, 28,111,245, 28,202,108, 58,161,113, 4, 75, 91,129,199, 51,185,207,140, 80, 40,156, 54,124,248,112,
- 97, 94, 94,222, 75,154, 82,169, 20,125,251,246, 21, 43, 20,138,207, 77,206,251,227, 64, 33, 50,196, 45,192,210, 73, 79,226,213,
-206,251,127, 87,251, 78,153,179, 73,218,176,113,115,140,237, 99, 47, 93,188, 45, 51,240,110,172,202, 19,140,113, 50, 84,218, 80,
-252, 88, 59,147,229,233,233,217, 70, 46,151, 31, 57,112,224,128,172,125,251,246,152, 50,101,138, 92, 44, 22, 31,243,240,240,104,
- 91,219,211, 84, 92,100,252,120,193,170,109, 25,247,118,119, 1, 12, 69,101,230,234,143, 37,179,128,197,156,111,206, 21,232,141,
-116,176,169,154,106,181,250,131, 15, 63,252, 48,103,223,190,125,127, 50, 87, 18,137, 4,207,159, 63,199,226,197,139,115,115,115,
-115,135,253,205,165, 52, 24,192, 29, 0, 37, 0,218, 1,144,149,141, 20, 12, 7,112,154, 82,106,164,148,102, 80, 74,211, 76, 21,
-228,241,120,211,191,251,238, 59,190, 90,173,198,168, 81,163,144,148,148,132,212,212, 84,204,158, 61,251, 57,203,178, 31,148,105,
-222,165,148, 62, 54, 69, 79,171,213, 62,201,203,203,235,217,181,107,215,252,188,188, 60, 52,110,220, 24, 61,123,246,132,163,163,
- 35,156,157,157,209,187,119,111,248,248,248, 32, 39, 39, 7,131, 7, 15,206,205,202,202,234, 66, 41,173,118, 20,122, 78, 78, 78,
-236,238,221,187, 99, 63,250,232,163,176,164,164,164, 32, 0, 78,122,189,222, 90,173, 86, 43, 12, 6,131,153,185,185,185, 77, 72,
- 72,136,221,216,177, 99, 45,111,222,188, 25,152,156,156,172, 4,144,192, 85,106, 47,121,131, 74,189,200,107,112,228,117, 34, 85,
-149, 69,192, 76,133, 41, 19, 34, 21,255,190, 20,189, 2,230,108,221,187,181, 68,228,238, 3, 11,255, 38,144, 73, 36,144,138, 69,
-144, 90, 90,163,132,101,177,225,121,186,170,152,210,207,235,144,248,151, 34, 87, 44,203, 98,253,250,245, 37,139, 22, 45,202, 79,
- 79, 79, 31,123,241,226,197, 38, 55,111,222,188,103,138, 17, 42, 44, 44,196,158, 61,123,212,155, 55,111,126,166, 86,171,155, 10,
-133, 66,189, 86,171,197,142, 29, 59, 74, 86,175, 94, 29,175, 82,169,194, 4, 2,129,174, 54,205,111,229,125,176, 4, 2,129,190,
-164,164,164,233,174, 93,187, 98,143, 28, 57,162, 54, 55, 55,135, 64, 32,208,171, 84,170, 70,219,182,109,123,178,107,215, 46,181,
-185,185,121,173,140, 27,203,178,149, 70,176,140, 70, 35,196, 98,113,173,250, 96,221,188,121,243, 39,157, 78,215,124,199,142, 29,
-201,155, 54,109, 42, 49, 55, 55, 7, 0,232,245,250,176,173, 91,183, 38,255,240,195, 15,154,218,116,112, 47,171,120, 96, 52, 26,
-177,109,219, 54,205,206,157, 59,147, 13, 6, 67, 88,249,186, 77,155, 54,149,108,219,182, 45, 89,167,211, 53,191,121,243,230, 79,
- 53,105, 25,141, 70, 99,126,126, 62,248,124, 62,158, 61,123,166, 17,139,197,224,241,120,136,137,137,121, 97,176,236,109,173, 3,
- 91,133, 5,249,175,252, 97,207, 5,185, 88, 44,238, 18, 17, 26,240, 48, 38, 33,153, 82, 18,207, 85, 55,149,133,148, 33, 3,129,
- 52, 38, 73,163,144, 8,244, 4,233,191, 2, 66,171, 50,131, 85,186, 56,187,184,226,230, 99,149, 2, 4, 34,104,245,246, 53,106,
-234,169, 28, 4,178, 7, 9, 80,240,133, 82,146,158,158,254, 34,210, 84,110,136, 60,189, 2,112, 59, 70,105, 6, 66,197, 0, 28,
-106, 83, 81,153,153,153,241,211,210,210, 94,104,189,208,244,244,228,233,245,250, 46, 38,231, 61,203,232, 4,150,253, 56, 58,177,
-196,249,192,239,106,159,201,115, 54, 73,165,188, 60, 32,126, 13, 26,250, 56, 98,202,176, 38,162,217, 27,178, 26,222,124,168,106,
- 0, 66,199,162,161,210,228,167, 11, 79, 79,207,214, 50,153,236,216,129, 3, 7,100,114,185, 28,207,158, 61, 67,227,198,141,177,
-112,225, 66,153, 76, 38, 59,234,238,238, 30, 81,155,211,116,237, 9, 77, 80, 22, 25,195,167,173, 79, 74,191,247,220, 88,106,172,
-152, 82,115,149, 85, 64,241,225, 23,135,242,243, 10, 75,222,190,122, 95,127,182, 22,199,242, 78, 65, 65, 65,231, 47,190,248, 34,
- 39, 59, 59,251, 37,115,149,144,144, 80,110, 4, 34, 40,165, 81,127,115, 41,149,163,180,243,186, 31, 0, 47, 0, 77, 40,165, 6,
- 0, 69,148,210, 58,133,174, 3, 3, 3,155,186,187,187,227,251,239,191,199,134, 13, 27,242, 86,174, 92, 9, 74, 41,124,124,124,
-204,235,170,153,145,145,113,227,201,147, 39, 93,154, 52,105,242,104,221,186,117,201, 78, 78, 78,236,168, 81,163, 48,114,228, 72,
-216,217,217, 25,215,172, 89,147,216,166, 77,155, 7,177,177,177, 29,139,139,139,239,155,112,126,104,118,118,246,149,141, 27, 55,
-222,120,235,173,183, 20,195,135, 15,119,216,176, 97,131,227,227,199,143,235,169, 84, 42,151,204,204, 76,249,197,139, 23,197, 91,
-183,110,117,124,248,240,225,115,181, 90,125,131,254,149, 47, 4,254,247,153,171, 42,189, 8,128,172, 50,163,163,125,229,111, 86,
- 13,219, 76,253,110,165,255,155,176, 95,149,212, 56,226,102,247, 51,122,101,168, 23, 89,190,112,211,250,207,134, 54,242,151,122,
-120, 6,192,168,204,199,253,244,116,108, 77, 43, 80,233, 41,253,102,207, 51,122,174,174, 6,139,199,227,225,196,137, 19,198, 29,
- 59,118,232, 40,165, 63, 22, 22, 22,126,254,240,225,195, 98, 83,117, 88,150,229,141, 24, 49, 66,153,151,151,247,107, 90, 90,218,
-216,216,216, 88,109,155, 54,109,120,239,189,247,158, 50, 55, 55,247, 55, 66,200,168, 91,183,110,105, 90,183,110,141,218,148, 99,
- 66, 8,132, 66, 33, 8, 33,184,121,243,230,243,192,192,192,134,215,174, 93,251, 54, 58, 58,250, 93, 74, 41, 47, 50, 50, 50, 41,
- 36, 36,164,241,149, 43, 87,214, 61,126,252,120, 48,203,178, 60, 83,117,203,163, 99, 21,141, 20,195, 48, 47, 76, 29,169,101,155,
-107,100,100,100, 84, 96, 96, 96,192,141, 27, 55,182,140, 30, 61,186, 11, 0,217,205,155, 55, 31, 53,106,212,200,255,218,181,107,
- 91, 62,248,224,131,174, 40,109,243, 55,237,254,173,211,161,111,223,190,170,130,130,130,227, 69, 69, 69,195,238,223,191,175, 10,
- 9, 9, 41, 95,119, 34, 63, 63,127, 88, 45,206,209,130,181,107,215,206, 41, 59, 87, 91, 86,173, 90,245,225,212,169, 83,237, 82,
- 82, 82, 94, 24,172,204,236,220,179, 45,123, 76, 48,230,228, 23,104, 55,173,154,246,142, 84, 34, 22,125,190,108,211,121, 61, 15,
-215,184, 42,167, 18, 68,198, 66, 80, 38,245,157, 14, 86,226, 53,223,108, 20, 14,239,221, 64, 18,228,239, 94,106,174,132, 86,184,
-249, 48, 31,115,190,218,195,126, 57,206, 46, 14, 44,146, 96,196,147, 26, 53,205,248,133, 40,209,103,126,216, 69, 40, 94,250,227,
-164,250,173,122,126, 38, 14, 8,106,246,194, 8, 61,142,186,133, 85,139, 39,176, 95,142,181,142, 3, 75, 82, 97,192, 99, 83,147,
-107, 48, 24,222, 89,182,108,217,241,225,195,135,203, 27, 54,108,248, 66,243,249,243,231,248,242,203, 47,213, 26,141,230,109, 83,
-175, 74, 48,129,193, 70,163,209,254,231,147, 57,222,159, 78, 28, 43,147, 50,185, 64,220,138, 82,243, 34,176, 64,112,144, 45,230,
- 76,116, 20, 76, 89,122, 40,240,242,183,245,149,208, 11, 3, 0,164,154,162,206,231,243,143, 44, 89,178, 68, 38,149, 74, 17, 19,
- 19, 3,169, 84, 10,137, 68,130,144,144, 16,172, 94,189, 90,246,209, 71, 31, 29,139,136,136, 48, 59,127,254,188,161, 54, 38,171,
-133, 31, 9,159,246, 93,236,213,229,159, 88, 58, 54,246,179, 69,118, 17,240,225,220,195,121,185,133,234, 1,181, 49, 87, 21, 77,
- 22, 33,164,243,164, 73,147, 78,110,222,188,217, 38, 32, 32, 0, 73, 73, 73, 24, 52,104, 80, 78, 86, 86, 86,251,127,128,185, 2,
-128, 98, 0, 46, 0,162, 81,218, 23,233, 41, 33, 68,132,215,120, 61,219,195,135, 15,111, 39, 36, 36, 56,141, 28, 57, 18,133,133,
-133, 86, 3, 7, 14,196,179,103,207, 16, 29, 29,125,231,117, 18,170, 86,171,111, 18, 66, 26,125,250,233,167, 67,167, 77,155,214,
- 74,161, 80,120, 82, 74,105, 97, 97, 97,156,209,104,188, 12, 96, 7,165,166,191,135,179,204, 48, 61, 37,132,196,197,198,198, 58,
-108,217,178,197,178,236, 24, 0,128, 26, 64, 1,128,140,186,154,194,255,199,220,252,155,190,251, 90,142,209,164,229, 29, 79,180,
- 26,222,128, 92,120,175, 62,138, 6,215,135,114,184, 23,185,252,118, 3,180,171,238, 59, 0,130, 42, 91,223,180,105, 83,106, 48,
- 24,232,201,147, 39,105,183,110,221,138, 91,183,110,125, 57, 36, 36,196,199,148,116,188,170, 25, 17, 17,113, 60, 52, 52,116,192,
-171,235,154, 53,107, 54,176,226,186,118,237,218, 69,181,107,215,174,160,109,219,182,207, 76, 73,103,219,182,109, 31,183,106,213,
-170,184,109,219,182,143, 43,174, 15, 11, 11,235,211,161, 67,135, 35, 21,215, 53,107,214,172,247,171,235,170,202,123,199,142, 29,
-147,162,163,163,105, 98, 98, 34,237,222,189,123,106,249,250,183,222,122, 43,233,238,221,187, 52, 58, 58,154,118,237,218, 53,181,
- 54,199,179,226, 18, 26, 26, 58,170, 77,155, 54, 87, 94, 73,243,135,175,174,171, 78,179, 77,155, 54, 87,194,194,194, 62,124,117,
- 93,104,104,232,168,186,156,163,138,139,147,147,147,111,112,112,112,230,170, 85,171,104,253,250,245, 51, 43,110,107, 24, 49,226,
-139,252, 66,101,225,212, 5,223,239,182, 11,232,219,168,182,121,175,237,242,175,213,124, 20, 32,164,191, 7,180,162, 23, 3,142,
- 60,222,230,254,104, 88,103,185, 38,114, 71, 87, 74, 31,127, 70,175,237, 25, 73,195, 3, 68,198,223,191,117,139,166, 23,253,143,
-209, 75,190,109,233,177, 6, 34,147, 52, 47,122,181,161, 23,253,143, 61,220,226,254,168,111, 91, 59,237,142,109,235,233,211,167,
- 79,233,111,251,119,208, 22, 1,178, 50,205,128,147,244, 98, 64,123,147, 52, 95,190,230, 91,133,135,135, 43,119,239,222, 77, 99,
- 98, 98,232,169, 83,167,104,203,150, 45, 85,193,193,193,237, 77,207, 59, 8,189, 16,216,215,112,206,239,242,204, 65,102,249, 31,
-118,145,104, 6,181, 23,105,251,132, 11,117,157,155, 10, 13,173, 2,248,198,198,245, 25, 54,192, 13,180,115,136, 84, 67, 47,250,
- 93,162,151, 3,186,152,154, 78, 31, 31,159, 68, 15, 15, 15, 90,213,226,235,235,155,213,174, 93, 59,126, 93,206,123,115, 95,184,
-119, 12, 19,167,157,249,177, 61,237,213, 86,145,211, 34,136,223,225,117,203, 18,128, 96, 91, 91,219,236,205,155, 55, 83, 7, 7,
-135, 44, 0, 13,255, 41,101, 30,128, 53,128, 62, 0,236,202, 62,155,161,116,254,161,250,175,161,217,178,115,231,206,250,219,183,
-111,211,103,207,158,209,227,199,143,211, 86,173, 90, 25, 0, 68,252,167,175,247,255, 71,154,255,181,133,252,149,209, 73, 66, 72,
- 80,101,157, 13, 67, 66, 66,104,151, 46, 93,212, 23, 46, 92, 80,106,181,218, 49,183,110,221,250,237,117, 53,255,138,116,254, 21,
-154, 29, 58,116,184,194, 48, 76,253,178, 33,192,169,167, 79,159,110, 10, 0,237,219,183,191,194,227,241,234,151,153,222,212, 51,
-103,206, 52,253,175,229,189, 28,103,103,103, 95,134, 97, 78, 0,208, 36, 39, 39,191, 24,237,100,223,176, 79,184,181,149, 69,251,
-252,252,130, 59,233, 15, 14, 30,251, 47,230,253,141,105, 30,247, 18, 65, 33, 10,133, 17, 51, 30, 60, 83,121,126,190, 49,187, 65,
-207,206, 45, 5, 91,246, 92,100,151,143,183,143,109, 25, 40,127, 14,194,126, 9,163,230, 6,218,197,107, 76,214,148,145,102,128,
- 96,198,221, 88,149,251,212,239,242,188, 59,246,250,144,119,104,239,122,246,171,241, 54,177, 45, 3,205, 18, 1,124, 9, 86,117,
-213,100,205,151,175,251, 86, 98,177,248,216,224,193,131,205,118,238,220,169, 46, 41, 41,233,121,251,246,237,115,181,202,251, 85,
-255,122, 48,144,197, 0,117, 51,161, 65,254, 41, 12,236, 66,180,127,156,248, 79, 56,239, 45,252,136,187, 92, 33, 62,172,210, 24,
- 38,153, 18,185, 50, 69,147, 16, 18,108,101,101,181, 61, 47, 47,111,160, 41,145,171,255,101,222, 9, 33,118, 40,157,136,145,143,
-210,105, 11,162,106,234,195,100,130,102,107, 30,143, 55,189, 65,131, 6,141,159, 61,123,246,192,104, 52,126, 69, 41, 61,255,255,
-225,222,241,255, 65,243,191,198,223, 98,176,218,180,105, 19,105, 52, 26,143, 11,133,194,197,231,207,159,215,112,133,143,211,228,
- 52,235,160, 89,193,100, 69, 70, 23,215, 95,250,115,174,251,228,129, 86,137, 53,153,171, 26, 53,203, 76,214,141, 39, 42,143, 47,
-119, 20,185, 79, 25,104,150, 88,147,185, 50, 53,239, 33, 33, 33,173, 36, 18,201, 86,181, 90, 61,170, 38,115, 85,169,230,227, 64,
- 33,242,244, 46, 48,240,130,192,160,234, 87,237,176, 84, 5, 1,239, 1,210,144,129,119, 30,234,184,178,196,105,114,154,156,193,
-250, 95,243,183,204,122,124,233,210,165, 16,238,208,115,112,188, 38, 93, 99,181, 56,238,117, 11, 10,209,178, 16, 95,233,132, 95,
- 23, 75, 85, 96, 73, 50, 8,187,186, 58,115,101,130,230, 13,200,244,203,154,249, 74, 39,237, 95, 44, 85, 1, 72, 7,197,170,234,
-204,149,169, 68, 70, 70,254, 14,160,126,157, 5,252, 31,234, 0, 60, 7, 72, 60,230, 87, 51, 59,246, 92, 80,128,235, 60,204,193,
-193,241,255,204, 96,113,112,112,188, 65,147,245, 56,240, 38,114,120, 83, 97, 68,125,136, 13, 9,200, 55,164,163,107,188,246, 53,
- 53,175, 35,135,124, 2, 22,190, 16, 25, 98,145,175,125, 61,205, 55, 14,165,165, 38,138,131,131,131,131, 51, 88, 28, 28, 28,127,
- 5,165, 81,157,228,178,229,159,171,201,193,193,193,241,255, 8, 2, 32,168,242,231, 67,211,219, 86, 9, 33, 65,181,127,254,172,
-177,243, 38,167,201,105,114,154,156, 38,167,201,105,114,154,255, 49,205,154,180,255, 43,125,187,254,150, 78,238,156, 38,167,201,
-105,114,154,156, 38,167,201,105,114,154,255,101,184, 23,233,114,112,112,112,112,112,112,112,188, 97,254,214, 62, 88, 50, 91, 95,
- 39,240,153,198,132,165,254, 0, 64, 25,242, 24, 6,246,158, 42, 59, 58,237,117,181,137, 67, 35,153,153,128,183, 67,169, 55,190,
- 71, 51,238,171,222,144, 99,111, 13,192, 29, 64, 2,165,244, 50, 87,124, 56, 56, 56, 56, 56, 56, 56,106,101,176,124, 91,246,187,
- 36,151,202,189, 1,128,165, 20, 70, 22, 40,204,203,188,154,112,239, 84, 63, 0,112,110,248,214,126,145,220, 54,156,101, 41, 88,
- 74, 97, 96, 41, 12, 26,245,211,172,135, 71, 76,122,243,188,153,189, 95,191,142,157, 59,246,239,217,179,135, 95,163,160, 70, 94,
- 0,112,255,193,253,216,195,135,143, 60, 49,179,247,251, 85,153,249,100,255,235,100,204, 76, 32,248, 34,172, 89,243, 46, 55,111,
- 94,159, 13, 96,214, 27, 58, 94, 66,122,185,251, 54,210,250,232, 91, 92,209,225,224,224,224,224,224,224,168,181,193,146, 75,229,
-222,103, 15,110,180,223,127, 41, 9, 0,208, 49,196, 17,243,191,222,220,151, 16,242, 4, 0,222,254,232,107,223,207, 63, 29,134,
- 43, 81, 89,160,148, 34,216,219, 26,125,135,124,100,210,143, 74, 29, 3,195, 6,190,251,238,123, 83,167, 78,233,253,244,233,211,
-248,157, 59,119, 94, 2,128, 54,109,219,122, 47, 89,178,228,221, 21, 86,214, 98,169, 99, 96,138, 58,253, 97,157,222, 31,100,230,
-232,101, 27,208, 48,244,195, 29, 63,125,197,239,208,125,208, 72, 51, 71,175, 85,202,244,216,236,186,104,137,221, 26,214,183, 16,
- 8,231, 19,134,225, 91,216,123,216, 3,128,149, 91,240, 97,231,134,221,140, 18,137,244,126,177, 90,189, 53,243,209,241, 13,220,
- 11, 59, 57, 56, 56, 56, 56, 56, 56,106, 52, 88, 0, 96, 38,225,227,201,243,210,214, 58, 75, 25, 48,250,131,183,145,145,145,238,
-171, 51,176, 24, 58,176, 31,110, 63, 73, 67,244,243, 44, 80, 10,248,186,154,252, 46, 97,240,192,134,142, 24, 57,162,221,137,147,
- 39,111,124,241,249, 23,219, 8,193, 85, 0, 88,255,227, 79,225,115,230,206, 25, 53,244,131,161,157,246,238,221, 27,133, 58,190,
-160,145, 17, 90,174,250,114,241,124,179,148,236,146,146,137, 83, 62,227, 77,253,244,147, 21, 0, 62,168,139,185, 10,112,115, 93,
-124,233,228, 94,153, 76, 38,195,134, 13, 27,196,192, 65,204,155, 58, 66,210,163,103, 79, 24,193,107,249,213,183, 59, 27,159, 20,
-137, 70,218,250,118,234,151, 29,125, 42,141, 43, 82, 28, 28, 28, 28, 28, 28, 28,213,118,114, 55,178, 20,143,227,210,241, 56, 46,
- 29,215, 31,103, 65,107,228, 99,197,162,233, 88, 54,111, 26,114, 84,192,129,223,147,240,228,121, 58,158, 60, 79, 71, 78,190, 18,
-175, 78,251,247,234, 8,131,175, 63,145, 53, 93, 61,205,226,171,174,161,242, 8,107, 43, 43,171,152, 27,219,138,231, 12,201, 8,
-152,255,110,146, 80, 32,113, 72,182,114,168,215,114,207,222,189,129, 14,118,246,114,115,115,139,105,214,254,157, 55, 90,122, 68,
- 88, 84,167,249, 39, 83,232,216,176, 93,175, 30,221,123, 56, 58, 58, 24,199,172,190,245, 56,200,223,215,224,227,235, 31, 97,230,
-232,215,174,170,239, 84,166, 41,118,107, 88,223,203,201, 97,241,133,227,123,101, 37, 37, 37,120,240,224, 1,114,114,114, 74, 55,
- 18, 2,134,225,161,158,139, 19,214, 45,157, 34,155, 55,125, 92,136, 88, 34, 59, 72, 8, 33,166,166,179, 46,112,154,156, 38,167,
-201,105,114,154,156,230,127, 85,243, 63,105,176, 8, 33,149, 54,111,197, 38,229,224, 73, 92, 26,154,250,187,192,203,195, 17, 55,
- 98,242,176,227,108, 18, 54,157,140,199,217,123, 89, 96, 5, 10,164, 23, 17, 60, 77,200, 64,116,124,118,141,211, 42,243, 68,130,
-129,147,150, 23, 76, 13,172, 95,216,226,252,238, 9,112, 54,139, 9,156,254,117,254, 4,158, 72, 48,208,222,209,114,231,212, 79,
-198, 14, 81,200,164, 34,173, 70, 11, 79, 15, 55,201,184, 81, 35,134, 11,205,228, 59, 77,205,140,157, 93,160, 92, 36,149,111, 91,
- 60,103,138,100,229,254,152,196, 98, 45, 45,222,123, 37,245,217,212, 25,115, 10,121, 2,233,143,118,118,129,114, 83,116,196,110,
- 13,235,187,219,216, 44,190,124, 98,175, 76,167,211, 32, 53, 53, 21, 90,173, 22, 6,131,225,143,194, 5,160, 72,109, 64, 92,154,
- 26,237,218,182,226, 53, 13,110,232,111,231,223,109, 12, 87,164, 56, 56, 56, 56, 56, 56,106, 79, 85, 94,228, 95,109,176, 42,163,
- 88, 93,252,244,253, 49, 83, 51,189, 21,105,218,126,237, 3, 0, 10,100,165,197,227,225,141, 19,136,137, 60,137,162,172, 68, 80,
- 10,120,120,212,131, 80, 29,167, 93,255,195,119,153,172,161,228,105, 85,122,125, 58, 59,187, 62, 77,145, 51,203,167,214,187, 26,
- 19,157,102, 59,126,234,102,196, 68,167,217, 46,159, 90,239,234,211, 20, 57, 35, 19, 26, 91,126, 48,168, 15,233,211,179, 43,166,
- 79,159,138, 62, 61,187, 98,234,216,119,137, 68, 36,104, 97,106,102, 74, 68,146,101, 51,190, 88,160, 72,207,215,105,175, 71, 23,
-106,204,100, 50,241,239,143,139, 85, 26, 42,213,245, 30, 56, 58, 75, 35,228, 47, 48,197, 92, 57,153,155, 47,190,114,122,159,140,
- 82,138,228,228,100,232,116, 58,232,245,122,232,245,250, 23,251,229, 43,245, 72,204, 82, 35, 33, 83,133, 7,241,133,232,214,181,
-171,140, 47, 16, 13,225, 46, 17, 14, 14, 14, 14, 14, 14,142, 42, 13, 86,244,149,253,109, 34, 79,111,115,200,206,200, 40,144,139,
-249,224, 51, 12, 50,147,159, 97,235,215,159, 96,239, 55, 83,144,159,246, 20,148, 2, 82, 33, 15, 26,101, 78, 65,218,157, 61, 14,
-217,213,140, 32, 36,208,119,250,118,251,115,207,248, 52,106,177,227,184, 82, 0, 0, 59,142, 43, 5,241,105,212,226,219,237,207,
- 61, 69, 52, 11,172,209,136,158,125,222,198,182, 45, 27, 16,222,161, 15,246, 94, 76,132, 74,173, 51,233,253,103, 18, 7, 95, 15,
-123, 71,199,183, 39, 13,125, 75,209,204,215,202,204,199,205,146,199, 19, 8, 13, 34,129,152, 61,116,171, 32,165, 75,207,126,140,
- 76,110,222, 85,226,224,235, 81,157,142,133, 64, 56,255,247,147,251,100, 60, 30, 15,137,137,137,208,233,116,208,106,181,208,104,
- 52, 47, 34, 88,133, 42, 61, 82,114,212, 72,202, 82, 33, 49, 75,133, 71,137,133, 16,201,173,160,215,235,131,184, 34,197,193,193,
-193,193,193,193, 97,210, 68,163,169,153,185,176, 86,240, 96,231,236,137,247, 62, 89, 1, 0, 48,178, 6, 80,148, 78,207, 96, 74,
- 76,143, 66,112,234,227,161,158,113, 30, 78,164, 96, 72, 55,153, 26, 0,134,116,147,169, 61,156, 72,193,199, 67, 61,227, 84, 70,
- 43,157,209,104,196,229,168, 76, 44,255,229, 17,190,216,124, 15, 39,110,153,222,103,156, 47,144, 78,250,114,233, 18, 25,159, 71,
- 72, 84, 66,145, 50, 45,215,160, 20, 10, 5, 58,129,136,175, 87,106,137, 58, 62,203,152,211,117,192,248,231, 60,158, 96,124,141,
-105,165, 44, 40,165,208,104, 52,208,106,181, 47,150,242, 8, 86,174, 82,135,212,156, 18, 36,102,169,145, 84,182,100,228,169,193,
- 13, 36,228,224,224,224,224,224,224,120,201, 96, 17, 66,104,101,237,159, 44,128,152,248, 44,136,249, 44, 92,235,121,253,209,145,
-157, 2,148, 2,122, 3,107,210, 15, 29, 60,153,154, 92,223,165,152, 78, 91,145, 24, 30,228,111,115,111,220, 96,183,199, 65,254,
- 54,247,166,173, 72, 12,175,239, 82, 76,245,172,200, 72, 41, 5,101, 41, 40,165,160, 20, 96, 89,211, 13, 11, 33,188, 22,193,254,
-238,252,249, 59,159, 38,140,255, 46,250, 49,225,243,245, 34,145,200,224, 96, 33, 37,174,182, 82,126,145, 6, 37,126, 65, 77,245,
- 4,104, 90,157, 78,129, 94, 55,183, 85,151, 1, 42,157,206, 0, 55, 55, 55,104,181,218, 23, 77,132,229, 17,172,124,165, 14, 41,
-185, 37, 72,202, 82, 35, 49, 75, 13,117,137, 17,247, 31,199,131, 48, 60,174,211, 31, 7, 7, 7, 7, 7, 71, 29,169,202,139,252,
-107, 13, 22,165,148,148, 47,149,237,228,238,230,128,235, 15, 18, 80,207, 65, 12,115, 11, 5, 30,199, 38,131,225,241,193, 99, 8,
- 12, 70,211,143, 3,213,234,127, 89, 57,205, 98, 69, 98,154,241,218,119,219,159, 61, 77, 76, 51, 94, 91, 57,205, 98, 5,213,234,
-127, 41, 77, 71,233,164,166,108,133,191, 38,107, 83,214,222,214, 66,204,191, 25,171,204, 37, 60,190, 70, 40,224,107,156,108,196,
-196,201, 86,202,119,179,145,138,228, 18, 1,227,228,224,192,130, 82,135,234,116, 52, 73, 81,113,233,133,133,179,219,116,126, 91,
- 37, 16, 8, 80,191,126,253, 23, 17,172,114,131, 85, 26,193, 82, 35, 49, 75,133,244,220, 18, 72,197, 12,238, 94, 61,163, 50, 26,
-245, 91,185,203,131,131,131,131,131,131,163,246,212,228, 69,254,109,240, 77,200, 49,228, 50, 41, 88, 70,130,203,183, 98,225, 31,
-208, 24,155,127,187, 1,175,160,230, 72, 43, 50,128,214,226,117,134, 83,214,168,110, 3,184,221,167,179,179,107,191,110, 46,157,
- 40, 4,167,190,221, 89,144, 12, 0, 27,195,251,149, 25,171,210,200, 21, 75, 75,167,137, 48,217,245, 2,169,137,153,197,102,158,
-142,114, 60, 74,210,106, 20, 50,137,193, 82, 38,228,219, 89,136,120,230, 82, 62,159, 47,100,152,252,252,172, 34,128,164,214,164,
-165, 73,138,138, 19,187, 53,156,221,182,219,160,197,151,142,239,150, 53,104,208, 0,119,239,222,125,209, 68,168, 42, 49,128, 20,
-233, 32,144, 82,248,184,152,225,241,237, 75,198,156,204,148,135,121,209,199, 55,112,151, 8, 7, 7, 7, 7, 7, 7,135, 73,238,
-136,101, 41,236,108,173, 32, 54,179, 64, 92,150, 22, 74,216,161, 64, 77,192, 26, 1,163,161,106, 19, 68, 8,169,180,211,247,193,
-147,169,201, 7, 78,102,109, 60,120, 50, 53,249, 21,247,250,162,121,144, 82, 90,105, 19, 97, 85,154,148, 26,143, 29, 62,117, 57,
-183,111, 11,123, 75, 70, 32, 80,139,196, 60,157, 84, 34,208,203,196,124,216, 91, 8, 69,174, 86, 66,241,249, 35,187, 24,194,210,
-179,166,104,106,146,162,226,158,103,102,206,238,208,115,176,202,193,209, 17, 67,135, 14, 69,189,122,245, 0, 0,214,114, 6,238,
- 86, 12,248,154,116, 92,248,109, 99,241,227,200,115,145, 48,106,250, 85,156,205,189,170,116,190, 14,156, 38,167,201,105,114,154,
-156, 38,167,249, 95,213,252,175, 97,210,203,158, 27, 56,201,225,237, 34, 71,137,214, 1,106,173, 17,197, 26, 3,138, 84,122, 20,
-168,244,136, 79, 87, 33,250,252,235, 39,132,150, 25, 44, 80, 2,150, 82,128,148, 54, 19,154, 26, 40, 44, 22, 20,174,248,114,201,
-252, 65,187,247,236,167, 19,187, 59,185, 94,127,170, 78, 18,243, 4, 90,153,152,225,155, 75, 25,227,243,184,231,169, 39, 15,239,
-106,168,146,168,134,153,154,166,242, 72,150, 95,211, 14,243, 65,193,215,170, 11,228, 51, 90, 5,226,196,241, 35,106,209,229, 72,
- 61,225,139, 30,176, 70,221,246,188,104,238, 85, 57, 28, 28, 28, 28, 28, 28, 28,181, 48, 88, 42,181,234,105,167,254, 31,150,189,
-240,153,194,104, 44,141, 44, 25,203,155,242, 88, 10,163, 78,253,244,117, 19, 98,100,217, 27,223,111,254,165,123,147,224,230,188,
- 64,119, 5, 10,243,179,113,235,250, 85, 3,101,217,171, 38, 25,180,248,120,141,153,131,255,187, 3,222,238,187,107,228,216,137,
-202, 54,237,218,203,108,108,204, 13,217,153, 57,133, 91, 55,236,206,219,191,251,231,134,132,101,223,167,241,241,154,218,164, 75,
-147, 20, 21, 7, 96, 72,153, 99,239, 0, 4,182, 43, 78,189,215, 75, 73,255, 28, 9,227,224,224,224,224,224,224,224, 48,201, 96,
-197, 92,221,223,230,127,145,144,220,220,140,161,219,119,253,186,232,231,221,191,181,210,232,116, 46, 44,120, 73, 70,189,254,130,
-184, 40,103,142,169, 26,202,140,199, 15,137,135, 71,232, 79,223,172,248,244,199,111, 87,190, 5,214,232, 5, 66,158, 19,150,158,
- 85, 74, 84, 35,105, 74,237,204, 85, 37,100,147,214, 71, 59, 3,200,230,138, 14, 7, 7, 7, 7, 7, 7, 71,157, 13,214,255,138,
-220,216,235, 69, 0, 38,190,174, 78, 89,132,106,105,217,242, 70, 41,123,247, 18, 55, 21, 3, 7, 7, 7, 7, 7, 7, 71,181, 48,
-220, 33,224,224,224,224,224,224,224,224,120,179, 16, 0, 85,140,202, 51,253, 77,217,117, 25, 77, 80,147, 62,167,201,105,114,154,
-156, 38,167,201,105,114,154,255, 61,205,154,180,107,227, 63,254,209, 6,235,175, 28,252, 70, 8, 9,122,211, 7,138,211,228, 52,
- 57, 77, 78,147,211,228, 52, 57,205,255,158,230,127, 13,174,137,144,131,131,131,131,227,255, 29,182,190,189,205,108,125,123,155,
-153,186,191, 93,224, 0, 7,187,192, 1, 14,220,145,227, 48, 21, 62,119, 8,222,136,147, 23, 3, 96, 41,165,186,191, 43, 13, 86,
- 86,245,205, 13, 10,219,253, 12,171,249,178, 32,233,222,169, 55,157,191,192,192,192, 96, 0,120,248,240,225, 29, 74,233,235,142,
-198,132,220,193,111,176,149,185,229, 24, 29,171, 53,170,138, 85,223, 43,211,163,247,190,201, 52,219,217, 5,202,181, 98,233,114,
- 16,218, 13, 20, 12,101,200, 25, 94,161,126,114,126,254,221,130,234,190, 87,175,207, 82,255,145,239,244,248,124,227,222, 35,139,
- 18, 15,206,124,252,234,118,235,110,235, 20, 19,135,190, 53,237,155, 95, 14,127,153,253,219, 52, 37, 87,250,107, 79,189,214,239,
- 89, 26,248,142,188,212,243, 43,114,106,243, 61, 87,191,240, 40,129, 64, 96,167,211,233, 50, 83,162,175,153,212,108,225,230,223,
-242, 54,143,199, 56, 27, 13,108,114,210,147, 43,161,220,209,175, 25,153,179,127, 48, 49, 26,167, 83,214, 40, 96,193, 91, 85,146,
- 21,115,249,117,244,156,157,157,165, 22, 22, 22,109,205,205,205,221,100, 50,153, 36, 47, 47, 79,157,151,151,151,152,144,144,112,
-150, 82,106,248, 59,242,104,215,176,239, 76,190,136,153, 91,246,255,252,172,168, 3, 75,171,223,191,207, 34,194,144,153,101,255,
- 47,205,138, 58,248,249, 63,225, 92, 57, 52,234,223, 28,148,253,148, 97,120, 45,141,212,176, 36,243,254,193,239,106,243,253,240,
-240,240,190,122,189, 94, 92,254, 89, 32, 16,104,174, 94,189,122,128,187, 10,254, 38,131,229, 26, 56,192, 74,207,167,243,248, 60,
-230,109,150, 82, 69,218,157, 61,242,127,114, 6,221,155,191,127,139, 97, 24,215,138,235, 88,150, 77, 78,184,190,237,141, 84,182,
-132, 16,215,175, 39,133, 76,207,200, 81, 23, 18, 66, 22, 86,101, 62, 28,130, 7, 95, 33, 12,169, 79, 8, 1, 67, 0, 30, 67, 0,
- 32, 53,241,250,246,166,149,104, 58,153,203,249,190,133,197,134, 7,148,210, 26,111, 66, 82, 27, 31,103,185,141,203,133,136,126,
- 19, 60,111,157,216, 28, 96,230,224,255,150, 50,227,241,195, 55,144, 55, 59, 47, 47,175, 48, 95, 95, 95,155, 9, 19, 38, 8, 1,
- 96,213,170, 85,222,222,222,222, 57,177,177,177, 55, 41,165, 89,117, 50, 87,246,254, 67,215,172, 88,176,173, 91,183,110, 72,205,
- 42,198,242, 85,223, 69,152, 57,250, 14,120, 83, 38,139, 56,135, 72, 45,229,178, 7, 31,125, 58,199,181,123,251, 48,126,190, 82,
-143,163,103,175, 13,221,187,105,121, 7, 75,203, 38,141,170, 51, 89,172, 42,255,115, 7, 5,237,202,170,242, 1, 96,240,171,219,
- 93,204,244, 29,173,101,232,230, 36,230,223, 5,240,107,141, 55,151,176, 15, 78, 8,132, 66,119, 66,152,210,243,206, 35, 96,202,
-202,128, 65,175, 77,120,122,105, 83,151,127, 68, 69, 29, 50, 52,157,128,216, 48,101,233, 35, 4, 96, 24, 6,124, 2,128,210,194,
-103, 87, 54,219,188,129,242,100, 17,228,109,217,176, 71,171,214, 27, 47,196,229,154,213,107,247,233, 17, 66,153,239, 18, 46,126,
-125,215,148,239, 75, 36, 18,171, 67,135, 14,217,117,237,218,213,194, 33,168,239, 5, 83,190, 99, 38,146, 4, 30, 62,252,155,176,
-107,215, 46,181, 40,159,126,157,192, 48,219, 9, 32, 96, 89,186,138,199,210,221,202,156,232,216,218, 78, 38,108, 31,212,119, 1,
- 8, 2, 76,254, 2,197,163,204, 7, 7,230,212,241,216,242,164,246,126,195,164, 18,201, 84,111, 95,127,223,248,231,207,162, 11,
- 11, 11, 86,170, 51,163, 55, 82, 74,217, 90,105, 25,140,147, 78,158,189,242, 14, 95, 32, 32, 93,218,135,201, 9, 33, 93,106,171,
-241, 82,217,114,112,232,187,110,221,186, 6,225,225,225, 0, 0,131,193, 96,190,103,207, 30,199,133, 11, 23,202, 77,185,134, 42,
-195,197,197,197,197,194,194,162,158, 84, 42,117, 1, 0,181, 90,157, 82, 80, 80,144,152,146,146,146, 82,211,119, 29,131, 7,216,
- 50, 12, 22, 28,255,245, 71, 62, 0,116,233, 63,102,145,103,196,103, 86,132, 39, 80, 87,182,191,209,160,149, 51,132,124,122,230,
-208,102, 2, 0,111,245, 30, 62,195, 46,112,192, 55, 89, 15,247,100,252, 45, 15,244, 3, 6,240,108, 99,116,125, 9, 37,147, 67,
- 66,195, 90,244,239,211, 13,129, 94,206,232, 59,104,220, 84, 0,181, 50, 88,122,189, 94,188,119,239, 94, 87,134, 97,120, 58,157,
-174,100,208,160, 65,153,175,147, 54,159,214, 31, 92, 1, 33,110, 58,131,225,167,132,107, 94,139, 40,157,203,190,154,118,167,231,
-252,217, 32,204, 40,202,178, 73,105,183,119,182,228, 12, 86, 25,182,190,189,205,120, 98,225,131,136, 54, 45,108,102,142,235, 39,
-250, 97,247, 37, 56, 7,191,155,146,122,103,183,203, 63, 53,131, 12,195,184, 30,220,177,206, 94, 42,230, 1, 0,148,106, 35,250,
- 15,157, 80,243, 5, 28, 54,228, 60, 8,252,202,219, 80,141, 70,131,132,207, 23,148, 16, 0, 32,165,163, 3,164, 82,209,181,141,
-179,195, 11,134,247,170,255,254,244,111,110,111, 1, 96, 9, 32,189,210,139,130, 97, 92,119,109, 90,101,239, 98, 35, 1,159, 71,
-160, 84, 27,208,239,253,201,198,202, 12,219,198,217,225, 11,134,118,243, 24,104,223,117, 95,127, 0,199,170,189,129, 56, 6,250,
- 43,108,157, 79,245, 31,189,192, 89, 13,115,124,190,104,165,253,149,147,123, 47,117,236,251,161, 46, 49, 57, 89,101,208,233,159,
-228,228,166, 77, 41, 74,141,142, 49,181,162, 54, 51, 51,107, 96,102,102,214,164, 91,183,110,146,169, 83,167, 10, 34, 34, 34, 94,
-108, 31, 61,122,180,240,252,249,243, 78, 43, 86,172,232,238,236,236, 92,162, 84, 42,239, 42,149,202,103,148, 82,163,169,231,196,
-209,209,238,227,183,251,246, 66,135,183, 63,130,145, 37, 24, 53,126, 18, 78, 28,251,117, 44,128, 55, 98,176,204,120,204,252, 81,
- 19,102,185,182, 11, 15,225, 47,219,243, 20, 22, 50, 33,186, 52, 15,229,139,121,211,156,118,109, 90,177, 18,192,136,202, 34, 87,
-172, 42,255,243, 32, 91,221,160,222, 45,235,227,183, 93,186, 65,174, 29,167,129,145, 89,190,136,100,121,117,155,168,176,146, 74,
-214,185, 88,242,236,197,198,204,117, 94,221, 38,158,142, 61,182,182,168,186,180, 8,132, 66,247,141,223, 44,246,177, 54, 19,130,
-199, 35,224, 51, 12,120, 60, 2,141,214,136,161,227,102,190,169, 8, 35, 79,106,239,211,157, 1,134, 3, 0, 11,108, 86,103,198,
- 28,173,205, 57, 33, 12,207,102,207,166, 21,124,123, 11, 17,120, 60, 2, 30, 83,186, 60, 79, 87, 99,226,103,243, 44, 94,215,168,
-119,107,101, 31,118,254,155,118, 93, 90, 4, 89, 55,254,229, 42,177,108,209,109,160, 77,118,137,116,216,174,131,231, 7,213,107,
- 59,249, 58,165,236, 87, 73,151, 86,159,172, 78, 71,163,209,100,116,233,218,205,156,240,229,178,211,251,183,180, 45,127,217,188,
-222,200,254,241,114,120, 10,148, 63,196,176, 20, 24,253,225, 72,116,233,218, 77,197, 26,216,228, 90, 84, 26,219,143,159,190,108,
- 87,162,167,248,122,221,134, 5,197, 5,217, 11,226, 30,219,196,203, 28,124, 63, 85,101, 68,255,102,122,198, 17, 16,125,101, 79,
-191, 29,135,175, 34, 40, 48, 0, 70,182,244,253,170,190,174,114,236, 60,114, 13,254,126,254,165,147, 55,179, 20,126,110,102,104,
-215,227,253, 58, 30,223, 8,190,220,193,127,103,223,129,195,223,233,247,246, 32, 88,154,155, 65,171,211,248,158, 61,121,236,199,
-239,215, 45,111, 69, 8, 25, 86, 27,115,200,178, 70,209, 31,255,235, 37, 0, 4, 0,180,175, 17,193,178, 11, 11, 11,123,241,217,
- 96, 48,192,211,211, 19, 41, 41, 41,126,117, 48,107, 50,103,103,231, 30,203,151, 47,183,111,223,190,189,192,206,206, 14, 0,144,
-149,149,229,114,238,220,185,166, 77,155, 54,205, 76, 77, 77, 61,146,145,145,161,170,210, 84,176, 37, 66, 30,229,243,196, 98,105,
-153,175, 5, 51,117,194,123,141,237,236,236, 42,125, 56,206,201,201, 21,205,157, 59,135,240,249,130,210,253, 41,101, 40,107,172,
-242, 29, 35, 45, 91,182,236,173,211,233, 36,149,109,203, 54,216,117, 47, 97, 69, 3, 75,239, 34, 0,159,199,203, 75,189,179,215,
-206,100,211,222,184, 79,103, 39, 70,240,125,175, 62,125, 60,250,118,143,128,147,157, 5,206, 94,123,130, 79,102,127, 13,189,193,
-184,186, 46,231,135,199,227,241, 51, 51, 51,227,173,172,172, 28,223,192,253,182,254,193, 29,107,237,207, 93,186, 53,227, 27,241,
-174,113, 13, 90, 15,215,151,191,254,206,200, 82,248, 73,204, 5,109,251,116, 82,216,184,248, 74, 55,124,179, 76,192, 69,176, 42,
-158, 8, 17,111, 97,235,150, 97, 54, 51, 39,141, 20, 45,220,112, 1, 87, 79, 30, 81,167,222,217,243, 70,204,149,194,222, 47,156,
-240,248, 99, 8,143, 39, 39, 12, 17,177, 70, 54,201,160,213, 46, 82,101, 71,167,189,174,182,145, 5,246,253, 94, 75, 99, 78,169,
-247,143,223,126,109,239, 96, 41,134, 90,107,192,136,143,191,192,250,213, 11, 20,118, 22, 34,104,116, 70,108, 62,120, 51,187,113,
-241, 74, 58,188,123,253,247, 23,111,140,250,245,171,237,143,127, 45,189, 86,171, 40,120,132,129,189,133, 24,139,118, 62,129,185,
- 76, 0,107, 51, 17, 24,166,114,115, 53,188, 87,169,102,126,145,214, 64, 8, 17, 81, 74, 43,173,220,204,156,130,218, 40,236, 92,
-247,246,251,112,129, 93, 76, 22, 1,165, 90, 60,179, 16,163,255,208,113,150, 94,142, 82,200, 37, 60,196, 39,165,121,126, 54,109,
- 90,168,196,201, 63,172, 36,237,113, 98, 77,217,246,240,240,232,223,179,103, 79,217,148, 41, 83, 4,110,110,110,216,190,231,132,
-123,167,119, 38,246, 74, 73,207,113, 99, 41,224, 96,111,157, 52,114, 96,247, 67, 71,143, 30, 77, 72, 74, 74, 18, 44, 95,190,188,
-249,254,253,251, 3,107,243, 36,106,164, 20,106,173, 17, 70, 35, 11, 35, 75,144,149,175,169,195, 77,133, 48, 85, 63, 85,211, 62,
-157, 35,154,241, 87, 29,120,134, 34,149, 30, 82, 33, 15, 79,211,138, 17, 30, 30,198,223,189,153,180,175,236, 27, 35,223,233,241,
-185,131,130,118,237,221,178, 62,236,173,100,216,244,205, 98,252,118, 37,174,107, 70, 17,129,109,239,229, 99,156,196,252, 78,118,
- 50,225,186,136, 80,111,199,183, 66,220,113, 43,212,219,241, 98,228,227,232, 70,239,174,156,144,162, 20,156,206, 61, 54,161,168,
-170,243,110,109, 38,196,134, 19,241,144,139, 5,144, 75,248,165,139,152, 15,134,121,189, 23,198, 75,157, 3,221,120,172,113,164,
-185,115,224,200, 65,239, 14,112, 30, 60,232, 29, 74, 24, 30,246,252,122,168,207,207, 63,111, 79, 51,115,244,219, 96,100,120, 27,
-213,169, 15,147,106, 62,158,128,189,133, 8,159,253,244, 0, 10,153, 0,230, 50, 1, 20, 82, 1,222,106, 98, 87,231,116, 18, 66,
-172,198,246,105,208,253,222,182,142,237,253,234,153,249,220,141, 45,120, 56,114,209,173,213,231,243,219, 79, 90,183, 42,208, 70,
-148,167,225,127, 49,245, 67,126, 74,106, 90,251, 61,135, 46,116,112,110, 54,242,137, 65, 87, 60, 43,243,238,238,131,149,233, 37,
- 61,190,210,212, 53,124,128, 68,167,212,223,191, 27,157,236,149, 91, 34,194,195,132,194,178, 99, 42,128, 89,249,177, 45, 59,190,
-105,201,241,200, 85,241, 46,167,216, 48,237,233,249, 43,181,106,138, 82,235, 88,220,141, 83,194,195,183, 41, 28,157,156,161,237,
-254,158,199,141,179,251, 14,202,157, 2,150, 22,167, 61,154,101,170,206,142,195, 87,177,112,233,234, 24, 16, 60, 42,187,155, 7,
- 76,153, 60,193,231,235,149,235, 94, 90, 55,238,163,241, 62,117, 53,215, 50, 7,191,159, 59,246, 30,246, 78,227,230,157, 16, 19,
-251, 12, 49, 81,183,240, 86,199, 46,232,214,179, 31,180,154,146,247, 55,254,184,238, 38,128,111,255, 84,231, 58, 5,180,110, 20,
- 20,240,179,179,147,179, 27,165,101,175, 38,163, 20,237,219,183,199,180, 79, 71, 65,165, 44,130,159, 95, 80, 43,203, 54,157, 53,
- 93, 7,126, 12,150,165,200,201,201, 46,126,242,248, 97, 71,117,198,227,235,166,166, 81,165, 82,233,179,178,178,112,231,206, 29,
- 68, 71, 71, 35, 42, 42, 10, 57, 57, 57,176,176,176,168, 85, 19,187,149,149,149,121,104,104,232,123,187,119,239,150, 88, 88,252,
-225,249,181, 90, 45,100, 50, 25,250,246,237, 43,104,221,186,181,203,240,225,195, 63,176,178,178,218,145,151,151, 87, 88,169, 97,
-186,119, 56,213,177, 81,223, 31,186,191, 51,122, 28, 0, 8,197,102,113,107,126,250, 53,170,186,223, 22, 74,204,221, 59,246, 29,
-225, 5, 74, 65, 8, 89,147,253,248,215,244,170,246,213,233,116,210, 95,126,249,197,133, 16,242,210,253,117,193,218, 95, 90,222,
-143, 73,235,248,253,188,233,124,133, 92,140,236, 2, 45,198,140,155, 96,107,178,185,106,212,103,124, 88,211,166,223,126, 49,117,
- 20,228, 50, 41, 78, 94,123,134, 79,103, 46, 53,228,102,103,110, 3, 33,171,178,162,246,191,110,171,197, 27, 25,241,230,227, 98,
- 6, 69,151,112,201,168,119, 35, 36, 90,189, 17,121, 74, 61, 52, 58, 35, 88, 74, 81, 80,172,199,195,132, 34,216, 90, 8,177, 1,
-255,125,106,101,176,248, 2, 81,207,137,195,186,139, 86,236,184,142,171, 39,119,168, 83,111,239,145,149,111,115, 11, 29, 20,151,
-116,107, 87,253,151, 61, 74,205, 35, 12,164,206,129,110,124,194, 91,217,178, 77,203,206,163,199,140,163,141,253,220,133, 0,131,
- 71, 49,207,245,155, 54,110, 24,102,225,214,104,117, 97,242,131,207,203,111,166,181, 29,181,192,178,108,242,171, 17, 43,150,101,
-147,107, 74, 39, 33,128,165, 92,128, 31,142,196,149, 62, 25,131,194, 66, 38,192,206,115,201, 40,204, 77,201,110,172, 94,249,251,
-200,238,246,189, 23,109,124,120,240,187, 67, 25,145, 0,162, 40,165, 25, 85,105, 18, 6,224,243, 8, 44,228, 66, 88,200, 4,176,
- 48, 19,128, 33,164, 74,115,245,197,143,247,182, 0,120, 82,209, 92, 85,212,148, 59,248, 53, 52,183,243, 56,240,246,216, 37, 86,
-247, 19,117, 96, 24,160,190,163, 28, 86,102, 34,104,245, 64,124,150,174, 44,175,230, 24, 63,101,158,221,140,201, 99,143, 18, 18,
-209,152,210,243,134,234,242,174, 82,169, 68, 67,135, 14, 21,232,245,122,221,240, 79, 22,117, 78,203,200,238,179,122,201,103, 98,
- 91, 91, 27, 20,151, 24,112,231, 81,124,192,210,175,190,169,127,236,252,141,253, 51,198,246,249,173,107,215,174, 22,191,252,242,
- 11, 91,155,243,158,149,145,253,205,230,237,123,183,173, 90,177, 20,143,227,115,177,233,199,239, 64,141,134, 31,170,247,187, 47,
-107,174, 95,191,222, 62, 60, 60,156,185,118,237, 90,206,171, 6,148, 16,200,115, 11, 52,176,148, 11, 33, 19,243,225,104, 41,134,
-141, 66, 8,177,144, 1,195,252, 81,137, 84,212,220,184,247,200, 34, 86,149,143,223,118,233, 6,109,250,102, 49, 70,124, 60, 27,
- 15,178,133,199, 25,153,229,162,143, 7,246,153,110, 45, 67, 55, 23, 75,198,254,173, 16, 15,200, 37, 66,204,156, 56, 20, 97,145,
-241,246,201,249,236,236, 92, 21,154, 0,248,188,178,116, 50, 60, 2, 62,143,129, 66, 42,192,249, 35, 59, 51, 85, 69, 5, 5,132,
- 87, 26, 97,209,107,117, 9,166,121,253, 63, 31, 79,185,131,223,140,144,224,198,139,199,141, 30,201,180, 10,111, 70, 25,134,143,
-236, 66, 29,161,160,152,244,241, 88,140, 31, 59,202, 49, 57, 37, 99,206,183,223,173,255,220,204, 62, 96,161, 50,243,209,188,234,
- 52,121,132, 1,195, 16,200,165, 2,152, 73,254, 88, 74,180, 44, 8, 1,207, 53,100, 80, 1, 8, 64, 8, 73, 77,186,185, 51,192,
-148,116, 58, 55,234,118,230, 66,166,208, 95,117,180,228,234,211,152,219,139,110,220, 75,188, 65, 41,205,173,215,110,242, 7,122,
- 61,133,178,196,128,231, 25, 42, 24,180,148,140,232,234, 14,207,119,136,223,146, 77,183,183, 17, 66,204,203, 35, 46,175,106, 38,
- 95,221, 83, 98,219,168,255,192, 85,107,215,223, 92,177,120, 54, 47,167, 80, 11, 35, 5,164, 34, 30, 36,101,139, 84,200, 67, 73,
-113, 1,190,253,225,167,116, 3, 72,127,122,190,250, 50,255,231, 74,131, 14,233,223,189,237, 46, 2,136, 8, 35, 76,118,118,247,
-112,239,208,115,152,228,173, 94,239,195,104,208,205,144, 59,248,159, 43,206,120,124,198, 20,205,160,192, 0,128,224, 81,230,253,
- 3,253, 75,111,146,125,127,245,247,243,247,121,117,157,183,183,175,143, 41,231,189,252,225, 66,106,231, 51,218,219,191,209,180,
-113, 95,172,247, 72,205,209,192,202,197, 27,119,110, 71,226,196,158,111,111,171,139,242, 86,156, 56,188,127,218,194,101,171,155,
-244,236,251, 46, 14, 30,216, 61,133, 16,242, 29, 45,229,133, 38,101,217, 33, 91, 54,172,119, 19, 8,197,208, 27, 41,244, 6, 22,
-122, 35, 11,189,129, 34, 45, 45, 21, 69, 74, 37, 36, 82, 5,228,230,214,208, 27, 74, 35,133, 26,141, 94, 62,246,253,158,227, 1,
- 92,175, 44,157,158,205,135,222, 2, 67, 92, 75,215,151,153, 19,198, 74,229,228,228,180, 13, 0,196, 98, 49,196, 98, 49, 12, 6,
- 3,238,167, 98,146,115,216,144,153,160,101,119,118,150, 77, 78,187,189, 51,180,170,188,187,185,185,245,170,204, 92, 41,149, 74,
-252,126,243,158,197,230, 95, 78,118,141, 79, 74,111,192, 26,237, 53, 82,199, 38, 93, 0,244,170,234,120,166,223, 63, 48,190, 94,
-196, 36,102,202,184,161,222,107,126,218,123, 35,230,248,194,106,195,201,245, 59,206,208, 78, 27, 63, 56,244,203, 53,155, 98,146,
- 47,172,254,180,166,115, 36, 20, 10, 5, 89, 89, 89, 47,174,239, 5,235,246,117, 75,204, 40,236,248,213,226,217,194, 59,207,148,
-184,247, 60, 13,195, 58,185,155,124,189, 59, 53,236,231,231,238,225,182,122,245,194, 79, 16,157,170,198,186,125, 55,112,225,200,
-182, 72, 93, 73, 81,143,204,168,223, 50,235, 82,135,188,174,193,170, 76,179,252, 70,112,238, 94, 54,138,212,165,198, 74,111,100,
- 81,164, 54, 32, 51, 95,131,130, 98, 61,148, 37,122, 12,235,232, 94, 23,191, 18, 6,192, 14, 64, 22,128,155,175,124, 70,217,255,
-168,228,115,118, 89,196,208,166, 44, 18, 43,170,160, 89,254,185,170,245,229,223,127, 8, 32,160, 76,211, 8,224, 6,128,188, 26,
- 61, 19, 33,132, 82,250,199, 43,149, 95,253,252, 82,228,193,160,119,117,118,114, 2, 75,147,203, 35,156,165, 81,143,230,131, 84,
-159,142, 30, 32,117, 14,126,167, 56,245,206, 94,147,251,100, 41,236,125, 91, 74,165,178, 35, 75,151, 45,167, 3,123,181, 19,165,
- 23,232,213, 15, 83, 74,178,148, 26,106,112,180,243, 18, 47,251,242, 75,179, 37,203, 86,124,180,255, 87, 54, 31,192, 87,149,134,
-159,195, 6,223, 34,132,113,101,254, 8,203,131,178, 52, 57,249,230,142, 80, 0,120,157,190, 86,197, 37, 6,240,120, 4,130,178,
- 62, 41, 42,173, 17,170,252,244,156,198,170,213,191,143,236, 90,106,174,174,167, 56, 62,227,241,178,116,148,210,106,155, 32, 24,
- 66, 80,168,210,195, 92, 42,128,133, 92, 8, 75,153,240, 69, 4,171, 10,115, 21, 85,157,166, 80,167, 75, 50,234, 53, 37,212,104,
- 68,247, 48, 59,216, 91,136,224,100, 37,134, 68,196,135,222, 8,168,181, 44,212, 90, 35, 18, 50, 85, 40, 82,137,209,168,221, 32,
-111, 91,167,235, 42, 91,143,176, 45,217,241, 55,199, 84, 27, 97, 50, 26,241,243,222, 19,222, 41,105,153,125, 14,110, 95, 41,206,
- 44,208,227, 94,188, 18,153,121, 90, 80, 98,129,153,159,127, 46,254,226,139,185,253,118, 31, 56,243,188,101,168,111,114,173,143,
-107,230,227,237,141, 91,245,248,166, 71,175,190,138,135, 55,142, 33,230,206,153, 47,148, 25,181,235,127,229,238,238,110,252,246,
-219,111, 45,127,248,225, 7,111,123,123,251,164,204,204,204,184,242,230, 40,207,192,240,212, 83,103, 47,218,180,107,213,150,159,
-148, 93, 2, 91,133, 16,238, 14, 50, 68, 94, 57,167,101, 8, 57, 94,153, 94, 89, 51,224, 96,215,142,211,240,219,149,184,174, 81,
- 57,226,243, 31,142, 26, 17,127,234,200,141,156,181,219,207, 44,119, 49,211,223,149,176,153,235, 34, 67,189, 29,103, 76, 24,138,
-165,107,183,227, 66,228,227,204, 98,198,121,113,154,198,112,106,238,160,202, 91, 59,120, 12, 32,224, 19, 40,164, 2,168,138, 11,
- 10, 30,156,254,206,247, 13, 61, 28,125,112,226,192,118, 38,183, 72,143,228,108, 53, 73,205, 41,130,129,101, 97, 41, 23,193,192,
- 2,249,185,217,228,231,159,183,227,230,205,171, 12,120,204,135, 0,230,213, 20,193,226, 49, 4,102, 18, 62,204,164,165, 81, 32,
- 51, 41, 31, 58, 3, 11,159,250,110, 88,189, 96,162,185,157,189, 3, 58,247, 31, 99,122,132, 77,110,213,100,235,247, 11,113,254,
-234,221,136,115, 79,119,134,217, 7, 53, 89,235, 26, 56, 96, 5, 99,237,172,214,232,141, 40, 44,200, 67,137, 38, 9,205, 92,178,
- 97, 45, 55, 34,190,208, 9, 15,210, 99,204,106,106,206,202,190,255,235, 29,187,160,126,159,239, 57,116,118,105,151, 78, 17,136,
-122, 94, 88,106,174,132,165,230,138, 79, 88,172,252, 97,189, 62,175,160,168,103,246,131, 3,217,117, 40,159,167,203, 42,227,210,
- 72,177, 67, 3,187,159,215,125,190,117,212,180,229, 93,186,244,251,128, 60,184,121,110, 22,128, 51,166, 70,207,255,188,142,154,
-180,174, 42,115,101,239, 21,186, 99,243,150,157, 3, 3,125,220,144,145,175, 71,106,158, 14,151, 34,159, 98,255,250, 89,249,249,
- 25,207,134, 64,167, 84,178,196, 80,112,242,196,161,227, 31, 77,156,134,134, 13,155,120, 20, 38, 23,154, 3, 40,120,233,102,200,
- 35,235,223, 31, 57,118,160,131,189,131,130, 45,139, 96,177,148,194,207, 47, 16,221,123,245,199,249,139, 87,240, 48,234, 94,233,
-122, 22,160,148, 34, 63, 47, 39,221,160,215,110,169, 50,125, 60,226,186,249,135,149,246, 12, 1,116, 6, 22, 90, 61,139, 25, 51,
-191,208,126, 50,103, 93,235, 46,173, 26, 71,241,192, 22, 38,166,229, 91,222,124,146,214,136, 8,204,157,222, 27, 61, 93,168,214,
- 25, 81,168,210,227,204,158, 53, 85, 55, 51, 54,104, 18,238, 25,208,122,228,232,217, 63,136,197, 60, 70,215,208,215, 45,174, 93,
-139,134, 73,245,156,109,139,150,172,249,185,217,149,200, 39,221,251,191,221, 79, 50,176, 65, 32,113,182,145, 40,198,142,159,208,
-216,209,167,245,251,233, 49,151,183, 85,121,243,227,139,243,221, 92,221, 94, 52, 37,218, 7,245,189, 7,224,213, 59,127, 66,230,
-131, 3,141, 1,192,222,193,177,132, 8,196, 69,181, 48, 32, 20, 0,230,175,221,219, 61, 57, 75,249,206, 87,139,103, 11,239,196,
- 21,227,206,179, 2,136,132, 60,104,116,166,119,107, 51, 18, 58,105,250,132, 17,130,220, 98, 3,206,221,203,194,131, 91,103,169,
- 65, 87, 56,140, 18,254,112,187,160,190,239, 19,192,147, 2,207, 25,130, 31,181, 12,182,228,223, 61, 80, 80,215, 8,150,125, 96,
-255,150,132,135,238, 60,190, 48, 12, 96,253, 13,122,189, 61,195,227,101,167,223,221,235, 80,139,188, 67,149, 25,131,229, 75,230,
- 96,245,134,253,184, 17,157, 11, 11, 67, 18, 14,110, 90,140, 41, 75,127,134, 74,107,172,170,124, 87,231, 71,236, 8, 33,135, 41,
-165, 61, 1,116, 4, 32,170,240, 25,132,144,195,101,191,253,210,231, 25, 51,102,204, 90,186,116,105, 84,249,190,229,235,203,247,
-173,110,125,133,239,219,204,156, 57, 51,104,217,178,101, 75,194,195,195,119, 93,185,114, 37,206, 36,131, 85, 49, 19,132,144, 42,
-175,114,135, 70,125,154, 1, 12,207,209,198, 12,222,245,221, 32, 31, 48, 92,234, 26, 50,176,152,199, 99,152, 45,171,103, 73,114,
-212,124,240,121,188, 98,147, 43, 95, 7,255,230, 10,133,226,232, 47,187,247, 81, 31, 15, 71,209,190,107,249,137,145,113,170, 23,
- 33,221,194,172, 4,145,183,181,134, 55,240,221,254,242,227, 39, 79, 77,170,202, 96, 17,194,184,174, 93,249,165,189, 66, 42, 0,
- 67,128, 66,181, 1,147, 38, 79,127,237,187, 23, 5,229,141,159, 60, 23, 12, 41,189,249, 40, 11,114,177,120,213,102,101,127,215,
-179,151, 71,118,181,237,189,104,227,195,131, 39, 31, 73,159,246,235,215,161, 32, 62, 62,190,198, 3, 77,168, 49,249,157, 15, 62,
- 17, 50, 76,105,179, 17, 33, 4,128, 49,163, 46,230, 10, 0,242,242,226, 10,165,142,141,251,109, 95, 57, 97, 67, 61, 87, 23,107,
-133, 76, 2, 51,185,152,248,251,121, 73, 90, 52, 15,151,186,123, 53, 20, 94,124,164, 68, 98,150, 26,207, 82, 10, 33,182, 11, 18,
- 12,140,232,132,237,107,166,119, 55, 37,255,103,175, 62,232,245,221,138,217,226,140, 60, 29, 30, 37, 21, 33, 61, 87,131,244,188,
- 18,164,231,105, 96, 38,225,163,197, 91,253,197,191,157,217,219,183,101,168,239,218,186, 28,223,103,177,113,251, 19, 82,210,134,
- 53, 14,110,134,159,183,110,110, 65, 92, 93, 37, 52, 57,185,196,212,239,111,216,176, 33,183,105,211,166,182, 95,125,245, 85,177,
-159,159, 95, 19, 63, 63,191,250,209,209,209,231, 27, 52,104,208,235,251, 53, 11,207,127, 50,123,133, 59, 31, 6,139, 22,173, 90,
-241,100, 34,130,107, 23, 79,106,182,108,248, 33, 85,151,175,156, 86,173, 17,150, 89, 46,202, 40, 34,176,115,118,123, 32, 23,232,
- 59, 11,100,186,232,220,109, 19,182, 3,248,213,171,219,196,211,231,110, 61,137, 14,137,140,183, 63, 27, 25,157,153,171,210,251,
-198, 30,155, 92,109,133,203, 35,101, 17, 44,217, 31, 17, 75,135, 38, 3,158, 82, 66,236,202,141, 13, 65,105, 68,139,148, 62, 31,
-164, 38, 71,254, 98, 66,199,104, 66, 89, 22,136, 78, 86,162, 72,109, 64,137,222, 0, 55, 91, 57,178, 50,146,241,253,218, 45,184,
-125,235, 38, 58,119,235,141,111,127,250, 25,163,222, 31, 80,227,113,101, 24, 2,134, 33,101,145,171, 82,115,101, 38,225, 3, 4,
-200, 47,214,227,215,203, 73,240,170,207,128,212,162,181, 80, 97, 38, 69, 65, 81, 9, 24,129, 25, 30, 95,218, 38, 59,118,246,198,
-204,121, 43, 54,126, 86,168,204, 72,140,125,120, 21,126, 86, 57,168,239,172, 69, 84,134, 5,110,229,122,192,207,171, 1, 24,225,
- 77,147,180,179,163, 26, 45,255,141,217,215, 51, 44, 56, 48,188,158,189, 5,212, 90, 99, 89, 20,139,143, 45,155, 55, 35,254,121,
-242,200,236,168, 3,183,223,132,147, 85,102, 60,203,146, 56,248,124,116,255,218,153,184,190, 67,198,195,209,165, 94, 19,211,187,
- 39,152,102,166, 88, 19, 12, 22, 33,132,177,246, 8,222,186,117,251,158,129,245,235, 57,226,212,141,231,184, 29,155, 7,115,133,
- 37,120,114, 39,248,182, 27,110,121,255,248,154,183,213,217,202,173, 2,161,236,195,102, 45, 90,129, 82,138, 39,143,163,114, 11,
- 10, 44,254, 84, 55,171, 82, 31,223, 1, 96, 94,113,157,204, 46,160,137,194,194,250, 78,137,206,136,148,148,100,252,126,229,124,
-211,178,253, 76, 70, 44,100,112, 50, 50, 19, 58, 3, 11,157,158, 69,211, 70,254, 37, 2,161,180,205,151, 27,142,180, 72,207,200,
-100,100,102, 22,172,133,109, 3,161,165, 62, 93,115, 55,174, 64,168, 51,176,104,224, 84,253,115,185,204,186,193,146, 79, 39,127,
- 18,192, 23, 73, 81, 88,172,209,166, 37,167, 56,254,184,243,156,242,209,147,135, 46,158, 30,245,204, 23, 46,156, 39, 44, 44,161,
-200,204,215, 32,187, 72, 71,222, 29, 60,210,121,219,166,111,135, 0,216, 86,139,164, 55,218,181,237, 7,189,181,153,144, 20,169,
-244, 52,171,176,196, 56,254,163, 73,141, 94,167,236,188,100,174,158, 21,227, 78, 92, 62,196, 66, 30,196, 66, 30,244, 6,211,186,
- 72,218, 5, 14,144,219,217, 89, 14,105, 30,236,141, 19,145, 89,224,243, 8,212,197,133, 90,137,216,236,129,191,191, 15, 19,220,
- 36, 8, 17,173, 91, 34, 54, 46,222,239,196,169,179,171,110,220,188,189,216, 46,168,223,180,172, 7,251,191,173, 77, 90, 19, 82,
-178,228, 25, 6,183, 65,246,142,182, 65,189,123,247, 18,215,115,113, 32,182, 54,150, 48, 66,136,113,227, 63,182, 55,185,213,136,
- 82, 80, 0,203, 22,204,132, 70,171,133,189,165, 8,148, 2,155,214,205,135, 86,171,133,179,141, 4, 5,197,250,234,202,121,181,
-126,164, 50, 67,244,170,209, 42,255,191,124,191,165, 75,151,246,124,197, 0,246,172,194, 24,254,105,191,242,239, 47, 91,182,108,
- 73,133,237, 42,147,155, 8,203, 51, 83, 85,166,236, 26,247,107, 37, 21,203, 79,126,187,116, 18,147, 95,172,131, 88,200,160, 65,
-125, 79, 76,152,248,137,236,173, 96,123,168, 97,142,125, 59,183, 20, 26,140,250,195,166,252,168,204,209, 39,212, 76,166, 56,190,
-105,235, 78,214,209,222,150,252,120, 58, 43, 46,171,208,240, 98,138,131,232,235,191,177,183, 78,252,232, 68, 65,142,203, 36, 82,
-111,141, 86, 99, 85,229,141,161,236,132,110, 58, 25, 15, 30,195,128,247,134,102,246, 98, 24,198,248,211,218,133,176, 53, 47,237,
-115, 53,127,245,246,162, 94,118,199,207, 86, 52, 87,193,193,193, 5, 77,154, 52,201,103,152,154,127, 52,241,198,207, 45, 43, 41,
- 40,117, 50, 87, 47,250,137,164,223,187,137, 87,102,226, 39, 36, 68, 96,235,185,103,202,160,247,134,204,116,104,216, 75,241, 60,
-173, 0, 34, 70,143,176, 0, 39,156, 63,241, 43,155, 20,247,104,172, 41,218,153, 57, 5,110,182, 54, 54,184,253, 76,137,212,156,
- 18,164,229,150,154,171,244,220, 18, 20,170, 13, 8,246,180, 71,126,129,210,173,206, 6,150,208, 3, 39,142,159, 24,214,173,207,
- 64, 76,248,108, 94,183, 13,223,125,125, 79,234, 16,240,190, 58,227,209, 13, 83,190,191,103,207, 30,163,135,135, 71, 92,118,118,
-118,216,180,105,211,138, 60, 61, 61, 29, 23, 46, 92, 56,186, 65,131, 6,206,111,181,111, 95,112,243, 92,139,173,159,124, 54,175,
-253,172, 79, 54,212,103, 24, 38,131,178,244,183,212, 98,253, 92,154,245, 80, 93,237,121, 58, 56,243, 49, 9,156, 63,236,173, 54,
- 54,191,217, 72,153, 64, 1,209, 12, 38,129,243,119,211,135,115,117,177,199,214, 22, 53,122,119,229,132,148,124,118,118, 9,227,
-184,184, 38,115, 85, 26,193, 34,208,234, 88,152, 75, 5,229, 35, 71, 1, 10,167,239,214,125, 45,179,179, 16,131,207, 35, 16,240,
- 24, 20,168,244,200, 41,212,226,179,105,211, 76, 61,130,172,145,101,161,210, 24,161,214, 26, 64, 64, 80, 84,152,141,153,159,125,
-138,110,189,250, 99,228,216,201,200, 87, 3,183,226,138,160,211,235,107,180, 69, 60, 2,168, 52, 6,140,236,226,142,156, 34, 29,
-138, 75, 12,208,234, 88,200, 36,124,240,249, 12,228, 98, 62, 20, 82, 1, 8,161, 66, 39, 39,167,209, 0, 32, 16, 8, 74, 18, 19,
- 19,183, 87,221, 60, 79,225,225,230, 0,181,142, 65,179,129, 43,208, 49,220, 23,119, 78,109,228, 95,188,126,191,254,103,243, 86,
- 97,252,224,112,236,125,226, 5,107,123, 15,152,201, 36,208, 83, 6,128,105, 83,128, 80, 58,151,117,242,239, 63,248,135,159, 54,
- 61, 89,240,197,116, 73, 94, 49,129, 88,200,199,217,179,167,113,245,250,173, 53, 89, 81, 7,182,191,201,190, 20, 2,202, 56,152,
- 91,152, 67, 34,226, 65,167,211,152,220,225,219,200, 82,128, 34,192,190, 81,223, 95,203,206,125, 0, 91,201,186,154, 34, 88,132,
- 16, 98,225, 28,180,249,135, 13, 63, 15,113,114,180,199,254, 51,247,176,117,195, 55,112, 9,234,134,167,145, 63,192, 45,164, 47,
-204,234,119,128, 72,177,103, 52,195,227, 55, 26,255,201,204,254, 33,161,225,184,114,233, 28, 50,211,211,126,160,244,177, 73,125,
-208,120, 2, 50,177,125,199,158,208,232,140,104,211,161, 39,142, 31,218, 63, 1,101,131, 39,234, 10,143,199,176, 31,143, 26, 36,
-200,204,215, 10, 50, 11, 52, 72,201, 86, 35, 46,189, 24, 7,127,217,104,114,147, 20,225, 49, 97,237,154,184, 10, 70, 47, 63,155,
-228,230,234,164, 17,104,212,210,232,216, 88,255, 15,135, 13, 17,120,122,251, 49, 89,249, 26,100, 21,104,145, 85,160, 69,113,137,
- 30, 94,206,245, 24,141,129, 31, 94,219,180,218, 91, 72, 4,223, 30,142,131,185,140,143,150, 1, 54,117,238,132,205,178,236, 31,
-230,106, 81,105,228,234,110, 92, 1, 36, 66, 30, 68, 2, 30,196, 66, 6,122, 35, 53,241, 94,100, 24, 52,102,216,187, 82,173,158,
- 34,187, 80, 11, 30, 67,224,104,107, 35,118,115,242,197,166, 21, 31, 3, 0, 70, 77,255, 14, 31,142, 24, 10, 63, 95,111, 20, 20,
- 20, 73, 63, 28,247,201, 74, 84,210,239,174,170, 72,219,207, 7, 47, 6,222,122,144, 48,229,131, 97,239, 11, 6,246,110,203,220,
-126, 86,136,180, 92, 13,158, 61, 85, 65,171,175,221,108, 52, 6, 99,105,155,239,230,221,135, 33, 19,242,144, 85, 80,122,185, 44,
- 90,183, 27,102, 82, 62,210,243,180, 96, 89,182,186,244, 84,235, 71,170,138, 58,213,134,138, 38,172,186,245,132,144,195, 51,102,
-204,152, 5,128,206,152, 49, 99, 86,249,231,165, 75,151,170, 1,164,154,100,176,202, 51, 85,169,123,110,220,175,149, 84, 36, 57,
-185,109,221, 44,233,153,104,138, 53, 39, 35,209,189,133, 19,132,124, 2,137,153, 35,238,196,229,227,204,153,131, 69,151,174, 94,
- 47, 33,140,190,198, 97, 81, 50, 39,191,166, 50,137,226,244, 55,235,183, 26, 28, 28, 29,177,243,114, 94,106,142,210,160,255,163,
-121, 74, 79,110,157,248,177,190,129,213,119, 85,167,199,212,248, 56,203, 82, 42, 92,250,253,111,160,148, 2,172, 17, 44, 88,240,
-132, 98,185,123,243,161, 25, 32,128,209,200, 74,248, 60,166,228, 69, 59, 72,233,173, 41, 57,225,250,142,106,155, 14, 9, 0,115,
-153, 0,191, 92, 72, 70, 65,110,106,118, 47,187,227,191,151,155,171,227, 81,226,167, 33, 33,193, 5,205,155, 55,207, 23,139,197,
-224,241,120,117, 57,193,175,101,174,170, 46,156,145,122, 0,203,156,253,219,246,238, 38, 15,106, 46, 34, 2,132,248, 59,225,252,
-201,253,236,213, 99, 27,251,169, 50,162,143,152, 26,226, 85,150, 24,144,154,171, 70, 74,182, 26,105,121,101, 17,172, 92, 13, 8,
- 1, 74,180,175, 55,125,141, 42, 35,250,144,153, 75,195, 31, 52,122,140,109,211,185, 47,166,204,251,198,123,251, 15,203, 47,201,
-237,125,194,138, 51, 99,238,155,162, 17, 31, 31,175,113,112,112,184, 93, 84, 84,212,105,229,202,149,202,128,128, 0,145, 84, 42,
-205, 1, 32,137,121,242, 68,120,246,232,158,231, 89,169,169, 99,116, 58,221, 77, 83,211,229, 17, 49, 92,236,111,158, 59,218, 93,
-214,178, 75, 3, 71, 25,220,101,197, 93,252,205,238,126,101,255,214,164, 37,153,103, 86,103,166,105, 12,167,114, 85,104,146,162,
- 20,156, 54,169,178,209,105, 19,222, 27, 51, 3, 60,134, 64,167,209,190,232,147, 97,103, 33,198,188,237,143,160,144, 10, 96, 38,
- 21, 64, 33,229,163, 85,128, 13,106, 17, 32,162,122, 3,133, 90,107,128, 90, 99,132, 90, 99,128,109, 61, 75,252,180,109, 47, 18,
-179,212,248,237,102, 54, 30,199, 23,194,215, 77, 14, 74,107,142, 59,177,212, 88,252,238,232,217, 10, 30,195,128, 71,192,248,123,
-123, 32, 87,169,133,144,207, 64, 36, 18, 65, 38,225,195, 92, 38,128,128, 47,192,141,123,247,160,209,104,208,188,121,115, 73, 77,
- 13, 14, 10, 51, 41,124,234, 59, 67,167, 55,224,232,197,135, 88, 52,169, 31, 58,181, 13,197,103, 60, 17, 30,107,130,161,176, 86,
-128, 37, 60,232, 12, 44, 52,122, 35, 0,162,174,230,154,105, 89,214, 47,162,132, 82,122, 45,237,241,175,137,246, 13,251,142, 62,
-118,242,236,246, 94,221, 59,227,246,221, 40,236,219,255,219,165,108,155,130,169, 21,190,211, 8,101,163,224, 40,165, 81,117,172,
-140,137,220,193,127, 82,120,171, 8, 40,243, 50,145,145,244,220,228, 74, 61,176,158, 2,159, 78,154,224,227,231,231,231, 99,100,
- 41, 88,150, 34,208, 93,129, 49,227,198,249,120,121,251,250,176,101,163, 8,253,221, 20,213,234,200, 29,252,198, 47, 94,249,253,
-251,110,110,110, 56,126,249, 17,150,206, 30,123, 91, 38, 51,243, 12,181, 86, 88,178,126, 77, 16,247,224, 20,172, 61,242, 97,238,
-224,227,218,187,211, 48,215,110, 61,250,226,254,221, 72,172,254,106,225,213, 98,158,116,137, 41,105, 53,115,104, 96, 23, 28,214,
-246, 61,115,107, 7,228, 21, 40, 97,102,101,143,128,198,161,239,153, 57, 52,152,174,204,120,150, 85,215,107,157,165, 20, 26, 29,
-139, 92,165, 14,201, 89,106, 60,207, 80,225,121,186, 10, 44,251, 71, 83,112, 77, 37,148,128, 16,185,152,207,183,214, 63,173,119,
-239,244, 89,234,238,230, 64,150, 47,156,198,211, 81, 49, 50, 11,180,200, 42,212, 34,171, 64,131,172,194, 82,131,101,101,198, 7,
- 75,217, 90,143,206,200, 85,234,160,144,242, 97, 33, 23,194,104,172,123,159,239,121,171,118,182, 76,206, 82,190,245,213,162,217,
-194, 59,207,139,113, 47,174, 0, 98, 33, 83, 26,189, 42, 51, 88,166, 54, 11,243,248,204,132, 30, 29,155, 35, 41,171, 4,124, 30,
- 3, 62,143,129,119,195,166,176,149,177,120,107,224, 12, 0, 64,175,238,165,211,144,196,165, 21,227,208,181, 52, 0, 16,154,154,
-214,204,236, 66,201,254, 83,183, 63,217,249,211,114, 81,137, 81,128,239,143,196,163, 68,107,132, 88, 88,214,236, 46,170,221,253,
-205, 96, 44,141, 96, 37,101,233, 80,172, 49,162, 80,165, 3,165,192,141,167, 69, 80,105,140, 40, 80,233,208,194,207,186,166,251,
- 15,169, 97,123,207,215,187, 79,210,158, 40,237,171,101,103,106, 4,107,233,210,165, 81, 75,151, 46,173, 52, 34, 86,163,193,170,
-210, 92, 9, 37, 39,183,174,157, 37, 61,253,132,226,252,189, 28,188,211,198, 21, 57,153,201,216,240,221, 26,150, 82, 64, 44, 17,
-165, 27, 13,236,177, 18,214, 48, 45,255,238,161,106,219,125,229,118,129,141,165, 50,217,217,165,171,127,208, 57, 58,185,178,191,
- 94,203,207, 44, 80, 25, 95,138, 21, 26, 53, 26,134,178, 84,104,138,185, 42,107,218,208,205,155,208, 15, 44,165,152,187,102, 55,
-150, 78, 25, 4, 51, 9, 95, 70, 8,145, 21,151, 24, 48,105,225, 70,172,252,124,132, 66, 38,230,151, 25, 3, 35,198, 78,248,204,
-164,147,160,214, 24, 81,156,151,158,211, 72,185,234, 21,115, 21, 82, 16, 22, 22,150,111,101,101, 5,185, 92, 94,107,131, 85,153,
-185,114,116,116,116,150,201,100,214, 62, 62, 62,101, 79,125, 60, 24,141,198,226,152,152,152, 58, 77,250, 86,152,159,125, 32,245,
-249,131,230,173, 34,122,224,194,201, 3,236,213,163, 27,250,213,102,136,185,165,133,121, 82,228,195,132, 0,192, 12, 41, 57, 37,
- 72,207, 43, 65, 90,174, 6, 58, 3, 11,119, 7, 25,146,147, 18, 97,105, 97,150,100,170,158,204,209,167, 43, 67,121, 99, 88,130,
-159, 84,233,143,143, 2,128, 50, 37,106,156,204,222,247,126, 84,212,221,213, 61, 7, 77, 16,117,122,123,156,112,253,178,143,102,
- 0, 24,100,170,110, 70, 70,134,202,222,222,254,170,179,179,115,207,185,115,231,106, 0,136, 52, 26,141,108,196,136, 17,178,132,
-132,132, 79, 41,165, 38,165,177,205,136,205,182, 68, 66,187, 54,240, 11, 25,236, 46, 43,238,220,161,109, 56, 90, 6,185, 33,185,
-109, 56, 0, 76, 76, 80,153,249,182, 30,187,225,151,250,118, 86,199,190,223,114,116,233,168,129, 29, 62,117,238, 53,127,101,234,
-161,185,213, 70,196,158, 92,220,216,165, 50,247, 46, 40,235,248, 94,209, 96, 25,140,180, 54, 77,112, 84,111,100,161,210, 24,160,
-210, 24,160, 44,209,227,204,157, 76,100,228,107,145, 87,172, 67,137,198, 8, 10, 64,167,167,229,179,138, 84,111, 86,175,108,177,
- 44,255,223, 53,100, 80,193,154, 5, 19,204,247, 93, 78,134, 92, 92,218, 31,203, 66, 46,130,185, 76, 0,128,226,252,249,243, 40,
- 31, 30, 95,211, 83,252,190,227, 55,176,114,203, 89, 28,223, 56, 13, 18, 17, 15, 77,250, 46,192,176,190,205,193,178, 20,177, 79,
- 30,100,248, 4, 4, 59, 48,102, 50, 48, 12,202,251,164, 84,119, 60,109, 40,165,191, 17, 66,122, 18, 66,122,148, 90, 56,228, 29,
- 48,230, 20,159, 61,178, 83, 94,172,214, 24,242, 18, 30,125,131,226,236,118,165, 77,240, 96,203, 30,208,207, 19, 66,218,214,209,
- 92, 49, 82,123,223, 53, 31,142,155,244,142,151, 87, 3,236,222,177, 9,148,146,125,166,126,127,251,161,171, 88,181,250,229, 17,
-131, 99,198,141,243, 89,255,253,247, 47,173,123,127,196,104,159,234, 12,158,107, 80,135,105,126,254,129,184, 22,149,140,229, 95,
-140,191, 93,146, 25, 55, 88,107,102, 51, 70, 87,156, 54, 57, 48, 40, 24,142, 14, 54, 72, 79,203, 64,251, 62,157,208,173, 75, 23,
-220,191, 27,137, 69,115, 62,187, 10,149,182,115, 77, 81,219, 63,140,144, 96,108, 68,151,190, 2,149, 70,135,117,203,231, 96,204,
-212,197,104,209,190,151,224,193,157,235, 99, 1, 44, 48, 53,207, 90, 61,139,246,141,237,160,213, 27,161,211,179,248, 45,142,199,
-255,115,158, 0, 62,143, 97,130, 27,148, 54,239, 22,170,245,213,215,243,124,146,158, 87, 88,228,241,205,226, 79,120,197, 26, 35,
-178, 10, 52,200,204,215, 34,171, 80,131,236, 2, 77,169,185, 42,208, 34,187, 64, 3, 62,143, 32, 38, 46, 5, 60, 30,169,117,255,
-187,252, 98, 29,154,249, 90, 1, 32, 96,234,216, 28,146,109,176,235,118, 55, 58,249,173,229, 11,103, 11,239,196, 41,113,239,121,
- 97,153,177, 98, 32,170, 96,176, 88, 19,186, 96,217, 7,246,110,249,254,160, 62, 13,205,229, 18,164, 60, 41, 2,159, 33,224,243,
- 8,204,237,220, 96, 33, 41,193,132,241, 99, 96, 99,109,129,196,236, 18,172,217, 31,141,123, 15,159,130, 85,215, 46,219,223,253,
-124,188,223,251, 67, 6,138, 25,129, 4,219, 79,198, 65, 36,228,129, 15, 45, 30, 94,191,168,201, 72,126,174, 43, 42,204,151,243,
-249, 2,147, 68, 9, 64, 13, 70, 22,148, 82, 44,153, 63, 19,187,182,124,135,227,183, 50, 64, 81, 58, 85,195,239,191,126,141, 73,
- 51, 22, 33,171, 80, 11,128,188,206,168,197, 35, 0,122,188,106,132, 94, 53, 73, 21, 34, 80,149,113,179,162, 70,249,254, 85, 25,
-184,138,125,178, 0,152, 20,105,231,191,234, 20,203, 63,219, 53,238,215, 74, 34, 18,157,220,178,102,166,244, 76, 52, 94,152, 43,
-181, 50, 27,219, 54,174, 87, 82,176, 29, 51, 30, 28,188, 97,234,209,144,219,251, 6,137,229,242, 11,179, 23,173,209, 56,187,214,
- 55, 28,189, 83,152, 83, 84, 98,252, 83, 24, 68, 40,147, 27,229, 22,118, 37,150,238, 77, 87, 10,212,218, 57, 89, 89, 15,139,107,
- 58,165, 44,165, 56,116, 61, 29, 96, 75, 79,226,238,139, 41,165,243,248,240, 8,140,108,105, 59,247,169,219,153, 47,214,153, 86,
-177, 2,191,156,188,157, 93,149,185,178,180,180,132,165,165, 37,204,204,204,106, 91, 97, 87, 26,185,146,201,100,214, 39, 78,156,
-144,152,155,155,131,199,227, 65,163,209,160, 83,167, 78,117, 42,121,114, 7,191, 65, 45,222,234,191,180,117,251, 30, 56,119,226,
- 87,246,234,209,205,253, 85,153,181,152,191, 7, 64,183,182,141, 15, 45,255,122, 93,253,169, 51,102,139,229, 18, 62,242,148, 58,
-240, 24, 2,119,123, 41,108,204,120,184,122,246,112,201,224,174,193, 38,155, 63, 55, 87,143,109, 95,175,249,193,102,229,151,243,
- 59, 91, 89,213,119,200,203,139, 43, 4, 0, 85,102,244, 15,102,142,126, 79, 92,235,157,188,208,164,109, 63,216,187,120,119,175,
-109,126, 51, 51, 51, 51,131,130,130, 30, 5, 6, 6,134,246,239,223,159, 46, 89,178,196, 42, 57, 57,121,143,169,230, 10, 0, 58,
-116,105, 57, 73, 46,208,135,219, 72,153,192, 6,142, 50,180, 12, 42,109,253, 28,216,163, 53, 92,221,234,225, 89,186, 42, 56, 71,
-205, 10,139,245,130, 6,223,255,176,233,166,187, 53,127,148, 65,169,126, 8,224, 96,173,111,218, 40,171, 36,101,101,230, 74,194,
-135,153, 84, 0,150,150,110, 51, 61,130,197, 66,171, 99,161,210, 26,160,210, 24, 75,205,150,214, 8,150, 45,237,172, 76, 8,129,
- 78,111, 44, 15,200,214, 38,129, 48,183,178, 69,125,143,210, 52,190, 88,164, 2, 16, 2,216,217,217,193,198,166,230,121, 71, 89,
-150,133, 86,103, 40,187,233, 26, 95, 12,234,208,234, 12,160,148, 34, 58, 58,102, 90,124, 92,124, 31,111, 31,175,182,129,141,131,
-173,165, 34, 6, 0, 74,106, 8, 38, 13, 6,160,167,148,190, 24, 20,225,209,176,117,201,254, 95,247,201,123,246,234,149,167, 85,
-102,237,173,176, 51, 15, 64,215, 50, 51,166,174,229,117, 74,228,118,190,125,221,252, 91, 46, 30, 58,124,140,111,251,142, 93,112,
-254,204, 41,252,246,235,206,173,197,153, 79, 78,154,170,227,231,231,247,167, 81,132, 94,222,190,127, 26, 69,232, 81,223,167, 74,
-131,101, 97,209,216,188,113, 88,132, 91, 66,182, 14,199,142, 29, 69,113, 65,250, 23, 90,173, 82, 5, 1,221,112,250,215, 31, 71,
- 14, 30, 59,215,188, 69, 88, 40, 44, 21, 50,216, 90,153, 33,242,214, 85,124,185, 96,246, 85,168,180,157,107,174, 63,203,242, 27,
- 24, 40,244,174,231,241,137,123,131,134,136,188,126, 25,177,209, 15,162,238,220,188,218,208, 59,168, 57,236,156,221, 63, 33,129,
-129,203,232,195,135, 53,190,169,130, 26,105,242, 7,163, 39,151,221, 75, 74,215,181,104, 82, 95,244,231, 66, 72, 96,208,235,140,
-219,215,127,153, 89,113, 20, 97, 85,186, 37, 69,249,123, 47, 93,191,255, 89,239, 46,109, 72,121, 83, 96,185,169,122,245,179,183,
-139, 28,177,247, 31,179,250,226,130,125,181,187, 50,105,198,184,241, 19,165,165,105,103, 65, 75, 39, 86, 83,215,246,250, 46, 49,
- 10,223,251,126,254, 44,114, 55,190, 24,247,159, 23,150, 54, 11,150, 25, 44,177,144, 7, 81,217, 95,147,166, 38, 99,152,229,239,
- 15,232,130,236, 2, 45, 88, 74,203,230,210, 35,224,243, 5, 72, 40, 4,146, 10,149,200,202,207, 64,220,243,120, 20,164,199,129,
- 97,120,176,113,241,134, 42,209,180,180, 22, 25,205,124,245, 44,188, 6,244,108,195, 59,112, 37, 13, 82, 49, 31, 69,217, 73,184,
-124, 98,183,154, 26,141, 63,104,245,218, 93,246, 84,244,224,225,253, 61, 58, 19,171,142,172,194, 98,173,131, 88,200,195,238,205,
-223,224,221, 97,227, 94, 68,179, 1,224,179,217, 11, 65, 8, 65, 94,129, 18, 0,201,170, 41,114,245,202,231,172, 10,145,167, 63,
-125,174, 96,138, 42,251, 76,202, 62,107,171,208,208,190, 98,170,180,175,172,215,190,162,103,210,228,200, 85, 70,176, 4, 12,239,
-212,230,213,179, 36, 81,153, 98,220,120,156,142,119,218,184, 66, 85,152,141,245,223,174, 82,150,232,117,221,178,238,155,110,174,
-202, 10, 74,151,119, 71, 76,137,106,224, 29,160, 61,243,160, 40, 46,191, 88, 95,101, 63,134,230,239,204,138,186,125,228,155,238,
- 5,250,184,241,102,206, 13,141,172,193,176, 92,149,249,100,126,229,149, 56, 21,205, 93,179,187,212, 92,177, 44,166,127,185, 13,
-148, 53,150, 77,224,103, 4, 53,178,248,248,139,239, 96, 40,251,223,200, 26, 65,244, 70, 89,141,225,114,137,240,100, 35,229, 42,
-139, 87,205, 85,211,166, 77,243, 45, 45, 45, 97, 99, 99, 3, 43, 43, 43,148, 27,162,215,109, 22,244,241,241,129,153,153, 25,206,
-159, 63, 15, 51, 51, 51,200,229,117,155, 32,223,204,193,255,221,230, 29,250,253,220,190,215, 8,230,244,254,245,198,235,231, 15,
-191,163,206,124,108,178, 9, 48, 26,141, 68,175,215,163, 75, 68, 72,194,157, 39,137,199, 23,206,159,223, 53,172,195,219,226,150,
-126,246, 80,107, 13, 72, 78, 74,194,213,115,191,149,120,215,179, 61,222, 50,212, 55, 89,175,215,195,104, 52,214,120, 3,215,104,
-180, 57,140, 64, 98, 51,112,208,123,226,155, 55,110,252, 44,119,240,219,201,240,216,187,212,200,107, 12,208,119, 27, 55, 10,128,
-206,192, 66,173, 42,204,173, 75,190,163,162,162,110,126,253,245,215,126, 2,129,192,117,239,222,189,217,121,121,121,181,122, 93,
-208,169, 35, 55,214,240,205,244, 49, 66, 90, 50,216, 93, 86,220, 57,169, 77, 56, 6,245,108,141, 93, 71, 46,227,220,197,171, 72,
- 80,153,221, 41,214,242, 14, 36, 39,167,106, 2,173, 10,126,237,219,202,147,183,111, 91,225, 62,251,246,211, 7, 80, 42, 61,149,
-117,126,110,177,233, 55,111,160, 80,173,175, 16,193, 42,237,223,196, 48,196,228, 8, 22, 1,226, 46, 94,137, 12, 10,241, 13,192,
-157,103,133,200,202,211, 64,165, 45, 45,247, 20, 20, 54,230, 66,136,133, 60, 36, 60,143, 3, 75,117,207,107,119,159, 65, 86,183,
-119,198,240,203, 30, 95,248, 2, 1, 31,180,236, 6, 41,149,136,148,246,246,246, 38, 25, 44,189,209,136,254, 93,154,163, 69, 88,
- 99,244, 25,251, 53, 0,224,204,214,233,176, 50, 19, 98,239,222,189, 72,188,188,106,123,131,150,227, 78, 62,184,255,240,237,168,
-219, 87,222,235, 22, 34, 13,118,228,167, 9,171, 9,235, 31, 36,132,136, 0,180, 39,132,116, 2,112,158, 82,170, 55, 26,216,196,
-174, 93,187,176, 70, 35,155, 90,225, 90,179, 2, 16, 14, 32, 23, 64, 36,165, 84, 95,253, 3,160,127, 71, 48,216, 9, 66, 36,102,
- 82, 89, 66,120,199, 65,206, 97, 45,154, 91,244,237, 63, 0, 34,161, 8,167, 79,157,192,218, 85,203,118, 43,211, 30,141,168, 85,
-243,152,137, 29,218,171,107, 46, 42, 40,176, 40,142,126,120, 39, 47, 46, 67,107,197,183,244,129, 64,172, 24, 67, 44,156,215,240,
-196,102,115, 93, 90, 12, 51, 63,115,249, 6,162,238, 92,129,179,173, 20,113,177, 79, 85, 15,238,222,254, 78, 69, 4,243,105,214,
- 67,149,169,233,148,229, 24,223,110, 49,180,171, 85,137,206,136, 75,103,143,148,176, 6,182,235,181, 11, 71, 99,221,124,195, 36,
- 65, 97,111, 89,101, 31,220,208, 31,192,174,154,116,158, 95,223,254,167,174, 23, 13,154,191,155,122,244,212, 69, 51,231,122,222,
- 60, 16, 6, 26,117, 49,178, 18, 30, 24, 74, 10, 51, 84, 25,247, 15, 56,155,146,190, 4, 67,202, 23,115,150,253, 48, 62,164, 73,
- 67, 57,165,162,151, 34, 86,229,255,231, 20,105, 75,251,204, 22,231,227,217,253,203, 37, 89, 79, 11,102, 86, 95,215,233,101, 57,
- 57,185, 47,134,230, 75,149,150, 30, 5, 22, 5,226,242, 11, 12, 60,192,162,192,242, 69,164, 34, 39, 39, 87,100, 52,234,101,166,
- 92,158,150, 10, 9,238, 63, 79,125,209,161, 93, 44,100,202,250, 94,253, 17,201, 50,241, 58, 15,225,139,228, 72,201, 41, 1, 67,
- 41, 88,214, 0,131, 94, 11,101, 97, 33, 82, 83,210,145,145,145, 9,101, 81, 1,164,102,150, 8, 10, 14,133, 66,161,192,163, 91,
-231, 0,144, 67, 38,153, 65, 86,232, 19, 22, 26, 42,136,138, 47,130, 78,207, 66, 0, 29, 46, 29,255,165,196,160,215,246,202,184,
-127,224,108,109,235, 97, 3, 75, 79, 63,120,146,208,208,205,214,137,220,126,150,143,109, 63,174, 43, 29, 77,106, 40,141,102, 70,
- 37, 22, 35, 53,167, 24, 41, 73, 9, 20,172,241,116, 45,229,111,214,240,185, 46,188, 9,141,218, 27, 44,131,193, 32,169,231,238,
-129, 65, 99,134,226,187,239,190, 71,244,179, 4,252,248,237,234, 82,115,117,111,255,239, 38, 26,138, 23,111,219, 46, 78,127,188,
-124,196,119,207,147, 15,221,205, 99,212,218,234,223, 63, 37,179,243, 68,155, 17, 43, 79,168,139,114, 69, 70,141,138,127,104,251,
-136,157,149,105, 2, 0,143, 33,218,178,102, 65, 16, 66, 80,222, 44,248,221,130, 81,144,137,121, 32,132, 64,165, 49,224,253, 79,
- 87, 98,235,202,210, 39,171, 15,199, 79, 81, 85,149,206, 10, 70,136, 12,239, 90,191,247,162,141, 15, 15, 94,142,183,121,214,163,
- 71,187,130,224,224,224,124,169, 84, 10,185, 92, 14,115,115,115,152,155,155,195,210,210,178,198,188,151,125,118,168,169,207, 21,
-195, 48, 48, 55, 55,135, 84, 42,173,212,184,213,244,246,114, 51, 71,223, 1,205,218,247,219,217,161,247, 72,230,244,254, 31,217,
- 91,231, 15, 13, 80,103, 62, 57, 96,234, 57, 42,139, 58,220,237,223,191,127,163, 49, 99,198, 8,103,141,239,127,226,196,249,200,
-232, 95, 79,237,235,149,155, 95,228, 70, 41,133,165,133, 89,210, 59,157, 26, 29,106, 19,230,151,112,230,204,153,255, 99,239,188,
-195,163,168,218, 54,126,159,217,158,222,123, 35,141,144, 70,239,189, 74,175,130,160, 32, 96,161, 40,168, 96, 1, 84,164, 42, 40,
- 32, 96, 67,145, 46,189, 11,210, 91,232,189, 37,129, 64,122,239, 61,217, 62, 51,231,251,131,132, 47,242,166,108, 0, 95, 95,241,
-252,174,107,175,236,110,102,238, 61,231,204,153,153,123,158,211,196,173, 91,183,234, 8, 33,119,235, 74,103, 94, 94,206,250,147,
- 39, 79,125,221,185, 75, 87,172,222,176,181,127,116,244,189,254,113,177, 15,225,229,227, 15, 95,255,134, 80, 19, 91,156,140, 56,
-135,210,130,236,245,166,164,179, 42,141, 27, 55,246,104,218,180,169,103, 81, 81,145,118,246,236,217,141, 4, 65,248, 61, 60, 60,
-188,101, 88, 88, 88,102, 84, 84, 84,154, 41,121,191,184,105, 76, 46,128, 77, 13,186,142,223,153, 97, 40,122, 31,192, 98, 47,111,
-111,156, 62,123, 9,151, 47, 92, 89,149,103,238, 61,111,252,107, 99,223,110,224, 32,123,123,112,251, 6, 18,103, 59,115,108, 89,
-189, 76,178,255, 98,210,242,164,124,227,175, 0, 22,154,114,140, 42, 41, 40, 53,160, 67,168, 3,120,158, 66,160, 20, 28, 33,176,
- 50,147, 86,107,176,170,211,148,234,149,111, 76,158, 52, 49, 46,188, 73,179, 15, 94, 27, 55, 81,222, 44,192, 27, 87, 31, 22, 2,
- 32,112,176, 54, 71, 70, 70, 38,206,253,254, 43, 95,152,126,127,149, 68, 34,206,175, 79,121,166,221,216, 22, 88,249,222,205,205,
-109,194,173,200, 72,156, 57,115, 6, 14, 14, 14,168, 52, 87,213, 53, 17, 62,169, 89, 88, 88,122, 97,193,178, 95, 59,188, 61,122,
- 48, 6,116, 13, 67,196,181, 56,232,141, 34, 12,188,248,184,147,107,194,165,159, 21,239,143,244,215,191, 51, 44,168, 68,109, 84,
- 36,205, 73, 42,137,168, 58,137,236,147,154,148, 82, 61, 33,228, 40,128, 54, 0, 6, 19, 66,142, 81, 74, 91, 86,141, 60, 1,104,
- 12, 32, 12,192, 37, 74,105,130, 73,121,231,176,229,198,181,235, 14, 6, 94,196,185, 43,183, 67,186,119,104, 6, 42, 82, 92,187,
-118, 29,107,214,173,209,222,189,115,107,105,121,182,235,252,154, 38,183,173,169, 60, 77, 29, 69, 88,221,119,149,154,148,158,225,
- 45, 93,130, 87, 93, 60, 31,241,153,210,189, 37,130,251,125, 58, 40,253,246,239,131, 92, 67,123,195, 49,160, 3, 50,110,239,195,
-205, 11, 91, 14, 93,231,249,153, 42,145, 75, 46,207,189, 95,110,234,249, 94,137, 82,101, 62, 53,172,121, 23,164,166, 36, 33,241,
- 97,228, 70, 77,254,195, 12, 75,215,224,141,233,105,201,147,124, 67, 59,224,252,209,109,239,213,100,176,234,170,243,142,138,226,
- 85,103,206, 95, 28,149,190,243,119,151,210, 50,141,153, 84,202,169,149, 18,100,203,213,113,219, 77, 77, 39,141,142, 54, 56, 7,
-180, 31,246,218,196,207,255, 88,254,245,108,153,179,173, 18, 89,133, 90,148,168,141, 40,209, 24, 33, 33, 64,160,187, 37, 52,229,
- 37,184,124,104,147,145, 26, 10,134, 85,244, 71,173, 86,211, 41,108,240, 66, 66, 48,229,243,207,103, 65,162,176,118,247,235,241,
-169,129,243,115,133, 29,158,152,204,220, 30,240,235,241, 41,116,165,217, 3, 63,255,124, 86, 35, 74,105, 15,167,176,193,165,149,
-107, 17,214,148,247,252, 82, 3, 70,119,243,130,222,248,104,254, 48, 65,120,212,215, 78,172,152,213, 28,181,196,149,171,106, 82,
- 64,190,227,143, 75, 72,207, 46,132, 70,103,132,222,192, 67,207, 11,224, 56, 9,236,236,236, 16,232,215, 28,182, 54,214,200,201,
-203,199,181, 75,231,113,249,193,173, 4, 10, 44,204,179, 47,222,108,202, 49, 34, 82,139, 64, 23,103, 71,146, 93,170,135, 74, 41,
-193,229, 51, 17, 70, 0,235, 77, 49, 87,213,105, 22,171,139,190,157,185, 96,229,171, 63, 45,155,227,218,196,215, 26,169,121, 90,
-164,229,106, 80,170,229, 1, 80,240, 2,133, 94, 91,140,152,107, 71,178,120,168,191,197, 11, 78,205, 17, 44,153, 76,119,237,206,
- 3,229,204,185, 75,112, 47, 54, 1,107, 86,125, 95,174,171,135,185,170,142,117,239,248,110,171,223, 30, 21,243,150,206, 79,170,
-253,129,187,154,102, 65,145, 82, 28,184,156,245,120,217,143,202,166,194, 27,177, 69,117, 85, 26,217,146,169,205, 62,169, 52, 66,
-223,237, 77,191,172, 84,230,137, 41, 41, 41,133,155, 55,111,126,108,122, 36, 18, 9, 42, 71, 15,234,245,250, 58, 71, 21,217, 89,
- 43,194,198,244,109, 48,178, 38,115, 37,145, 72, 32,138,226,227,232, 85,125,155, 30, 45,156, 27,245,106,221,125,232,182,238,131,
-223,226, 78,238,251, 85,188,126,230,247,225,101, 57, 49,123,235,123,140, 10, 11, 11,163, 8, 33, 15,151, 46, 93,218,108,205,154,
- 53,126, 31,125,244, 81,252,175,139, 38,125,247,232, 9,238,209,178,136, 55,111,222,164,147, 39, 79,214,105,181,218,132,194,194,
-194, 27,166, 44,114,173,206,142, 89,186,254,167,111, 26,165,166,103,142, 11, 8,107, 3, 71,223,214,112, 13,104,131,130, 50, 3,
-174,196,166, 35, 62,250, 36,238, 93,220,181, 93,147,235,242, 85,125,210,219,172, 89, 51,111,153, 76, 54,144, 82, 26,100, 97, 97,
-225, 75, 41, 85, 72,165,210, 17,132,144,135, 60,207, 71,135,134,134,158,140,142,142, 54,121,205,176,164, 51,235,117, 13,186,142,
- 95,153,172,182,232, 26,159,165,110,158,172,182,184,169, 86,218, 76,207, 57,185, 66,231,242,210,210,229, 48,230, 71,237,218, 88,
-188,103,203,234,101,146,209, 19, 62, 20, 34, 11,172,223,151, 90,154, 29, 95, 60,222,228,145,251,224, 8,201,252,232,163,143,255,
-127,154, 6,242,168, 97,176, 98,202,134, 12, 83, 52, 42,214, 83,156, 97,230, 30,246, 67,228, 7,147, 22, 52,110,213, 97, 76,151,
- 62, 35, 57, 75,185, 5,142,239,253,153, 38,220, 57,189, 83, 74,133,207,212, 57,113, 9,207,122,145,208,235,245,127, 50, 86,166,
- 68,175, 0, 32,215,161,184,235, 31,199,206,140, 59,120, 36, 98, 81,223, 94, 29, 29,126,156,253, 10,190,249,101, 63, 44,205,149,
-160,162,128,145,221,189,135,223,219,218,123,160,151,139,202, 99,247,233,180,179, 83,150, 71,206, 80,171, 13, 15,234, 90,247,174,
- 98,126,161,203,132,144, 64, 0, 3, 9, 33, 34, 0, 11, 0,229, 0,202, 42, 26, 36,246, 81, 74,203,235,147, 79, 3, 47, 34, 49,
- 91,139,253,123,118,225,246,149,147,184,119, 47,166,244, 94,244,189,239,137,148, 46, 47,203,122,240, 84,145, 85,161,218, 17,131,
-168,126,100, 97, 45,148, 75,204,190,186,121,112, 73,215,134,221,223,107,231, 16,208, 1,118, 62,143, 60,101,113, 90, 36, 82,175,
-237,218, 95,154, 33, 31, 65,105,164,241,105,143,177,187,151, 95, 67, 81,162,192,197, 51,135, 64, 69,113, 21, 0, 80, 81, 92,117,
-235,252,161, 73,109,250,190, 9,123,103,159,166,149, 67,187,234,171,109, 38,229,139,255,216,240,213,206,196,196, 68,220,191,127,
- 31,177,177,177, 40, 40, 40,192,150, 45,231,138,235,213, 21, 32,238,226,113,151,160,206,189, 95, 29,255,193,129,161, 47, 15, 85,
-121,251, 6,112,141, 60,173,225, 96, 37, 69, 76, 92, 58,226, 34, 31,138,177,119,206,106,169, 38,103, 72, 78,236,133, 26,163, 35,
- 78,161, 35, 92, 56, 9,153,121,242,247, 71,107, 11,246, 28,252, 70,163, 79,166,124,212,214,222,193,174,218,235,120, 65,126,161,
- 98,238,220, 47, 26, 85,110, 95,215, 90,132,156, 68, 82, 58, 97,210, 84, 11,142,112,143,155, 1,105,101, 27, 25,125, 92,135, 1,
- 2,200,101,210, 58,235,232,184,161, 29,193,139, 34,202, 52, 6,148,169, 13, 40, 42,211, 34, 43,175, 8, 81,209,113,184,122,238,
- 48, 18,227, 98, 75,121,158, 63, 13,138, 61,185, 14,197,219,159,156, 88,183,214, 8, 43, 36,222,246,118, 86, 72, 44,212,194, 76,
- 46, 69, 70, 74, 44,111,224,181, 79, 61,201,122,222,173,223, 51, 93,194, 7,191, 52,254,157, 79,143,116,238,220,201,186, 73,243,
-150, 22,142,214, 86,144, 75, 9,226, 82,178,113,247,230,181,242,228, 7,183, 74, 4,163,166, 79, 94,228,239,207,188, 74,203, 63,
-214, 96, 25, 4,190,231,135,159, 46, 62, 38, 8,130,153, 84, 34,209, 24,169,216,231, 89,204,213, 95, 5,165, 98,218, 59,239,127,
-252,167, 7, 2,163, 32,154,189,245,206, 71,154,170, 15, 8,196, 40,152, 87, 70,174,234, 24,169, 39,201, 45,210,149,206,250,233,
-246,198,175, 55, 70,239, 2, 16,253,172, 35,251, 0,160,176, 68,127,219,161,215,142,193,165,106,158, 0,184, 87,141,102,121,247,
-238,221, 31,155,173,138,230, 58,147,111, 16, 10,149,249,164,110, 3,223,224, 78,238, 95, 35, 94, 59,189,127,196,211,152,171, 42,
- 55, 48, 3,128, 43,132,144,200,207, 62,251,172,149,139,139,139,203, 23, 95,124,161, 42, 41, 41,145,253,248,227,143,218,188,188,
-188,172,146,146,146, 75,148,154,222, 63,161,226,166, 57,222,204, 37,228,103,178,107,237, 75,118,206, 30,189,109, 29,189,130, 10,
-115,211,226, 74,242,211,142, 16, 17,199, 75,115, 98, 46,213, 55,173,183,110,221, 74,105,220,184,241, 62,137, 68,226, 41, 8,130,
- 35, 33,196,146, 82, 90,200,243,124,161, 40,138,153,245, 49, 87, 85, 77, 86,231,119,215,109,205,215,136, 10, 3, 81,109, 77, 58,
-179, 94, 7, 0,217,199, 62, 82, 3,248,221,165,219,140,161,251, 47, 38,126, 31, 85,104, 61, 53,231,204,215, 7,234,171,159,126,
-115,123,224,243,170,255,154,140,168, 52, 0,227, 44, 92, 26, 45,139,188,121,105, 14,161,144, 9,224, 23,170,179, 31, 94,127, 30,
-250, 50,153, 76,219,178,101,203,106, 71, 11, 42,149,202, 90,231,215,170,184,208,175, 33, 93,187,110, 56,114,242,220,184,195,199,
-207, 47,106,219,174,163,131, 74,233, 14, 31, 59, 3, 54,124,220,226,189,147, 55,115,175, 14,250,248,236, 79,241, 25,218, 59,148,
- 82,109, 61,235,105, 44, 33,164, 24,192, 96, 74,233,106, 66,200, 4, 0,247, 0, 68,214,219, 8,136,120,173, 93,187,214, 91, 8,
- 33, 82,202,139,223, 92,146, 73,182,106, 51,239,165, 61,141,161,168, 74, 19, 95,107, 76,152, 52,169,161,127,192,255,143, 34, 12,
-107, 96,133,209,227,222,110,232,227,215,240,241,119,141,188,106,127,160,162, 25, 55, 52,196,165,113,175,152, 99, 75,103, 59,196,
- 93,120,199,204,222,211,178, 60, 47,169,160, 48,233,250, 82,117,142,203,210, 39, 87,104,168, 47,137,177, 81,203,215, 46,155,241,
- 81,102,122,220,154,242,156, 7,143, 90, 29,114, 30, 68,154,187, 4,205,206,203, 74,251, 40, 63, 39,126,233,211,150, 69,121,121,
-121,198,230,205,155,109, 59,116,232,192,185,184,184, 32, 55, 55, 23,167, 79,159, 22, 69, 81, 76,175,175, 86,246,131,179,167, 73,
- 64,128,253,214, 13,197,223, 72,205,172,250,241, 2,220, 41,165,144,114, 36,211,160, 43, 62,146,107,171,249,152,222,185, 84,123,
-189, 20, 5, 66, 57,202, 85,174, 45, 40,138, 34, 89,242,195,166, 36,137, 76, 81,109,147,170, 96,212,155,139,162,104,242, 90,132,
-217,146,100,135,112, 99,112,221,163,248, 40, 16, 73,238,215,241,112, 74,143,182,239,251,122,111,158, 23,140,120,212, 63,177,242,
-149, 67, 41, 57, 5, 34, 28,203,179, 47,189, 84, 31, 83,245,167,251,188,193, 96, 11, 78, 14, 43,115, 35, 56, 16,148, 20, 23, 43,
-157, 4,197,189,103,169, 75,217,145,251,163, 72,215,174, 62,250, 19,167,198, 70,156,187, 48,130,138,162,175, 64, 1, 80,146,168,
- 55,104,119,230, 88,231,109,124,218,244,254,211, 32,207,120,253,168,119, 8,241,159,160, 73, 8,145, 3,112, 4, 32, 84, 93,254,
-230,121,164,179,182,181, 5,159, 37,239, 86,110, 33, 29,149, 42,243,143,213,234,210, 53,234,236, 7, 7,158,103,121, 18, 66,108,
-148, 74,101,115, 75, 75, 75, 89, 94, 94,222, 21, 74,105,241,139,120,220,171,210,233,141,245,142,221,123,183,255,224,248, 31, 87,
- 87, 86, 52, 31, 62,198,115,196,114,213,232,126,157,167,111,218,115,112,249,147,163, 8, 95,132,188,255, 85,154,164,107, 87,169,
-115,161,245, 56, 65, 16, 23,118,111, 88,170,206, 74,136,153,124,238,110,238, 21, 74,105,233, 51,214,207, 87, 43, 35, 88,148,210,
-173,255, 43,121,119, 14, 31, 50, 31, 4, 33, 38,139, 80,220,203,137,220,247, 69,157,215,144,208, 80,185,121, 46,236,212,121,142,
-249,245, 53, 86,127,203,113, 39, 68,210,184,113,227, 78,114,185,220, 91, 16, 4,115,189, 94,175,214,104, 52,137, 73, 73, 73, 23,
-107, 90,144,252,175, 78,167, 75,227, 33,203,101, 50,217,251, 0, 96, 52, 26, 87,102,223,221, 55,173,182,125,107,218,254,191,114,
- 63, 26, 49, 66, 66,119,238, 20,254,138, 99,228,209,124,120,145,209,200,219, 84,126,150,203,164,197,105, 55,119,217,254, 93,117,
-137, 25,172,127,225,141,129,105, 50, 77,166,249,124, 53,107, 95,172,155,149, 39,211,252,235, 53,221, 67, 7,122, 1, 64, 70,244,
- 1,147, 70, 27, 87,183, 61, 43, 79,102,176,106, 67,202,138,128,193, 96,252,183, 49,197, 92, 49, 24,127, 37,166, 26,171,167,221,
-158,193, 32,120, 98,169,149, 42, 23, 64,147,157, 41, 33, 36,252, 41, 46,176,145, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,
-119,105,214,165,253,162, 68,198, 88, 19, 33,211,100,154, 76,147,105, 50, 77,166,201, 52,255,118,205, 23, 13,142, 21, 1,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,127,133,191,116, 20, 33,131,193, 96, 48, 24, 12,198,191, 17, 22,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,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,227,239, 55, 88,
-132,144,112,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,218,145, 0,148,210, 72,147, 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,159, 54, 88,148,210,191, 78,156,144,240,231, 93, 80, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241,
- 52, 95, 52, 88, 19, 33,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,127,134,191,116, 20, 33,131,193, 96, 48, 24, 12,198,
-191, 17, 22,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,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,227,239, 55, 88,132,144,112,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,218,145, 0,148,210, 72,147, 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,159, 54, 88,148,210,191, 78,156,144,240,231, 93, 80, 76,147,105, 50, 77,
-166,201, 52,153, 38,211,124,241, 52, 95, 52, 88, 19, 33,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,127,134,191,116, 20,
- 33,131,193, 96, 48, 24, 12,198,191, 17, 22,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,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,227,239, 55, 88,132,144,112,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,218,145, 0,148,210, 72,147, 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,159, 54, 88,148,210,191, 78,156,144,240,
-231, 93, 80, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241, 52, 95, 52, 88, 19, 33,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,127,134,191,116, 20, 33,131,193, 96, 48, 24, 12,198,191, 17, 22,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,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,227,239, 55, 88,132,144,112,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,218,145, 0,148,
-210, 72,147, 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,159, 54,
- 88,148,210,191, 78,156,144,240,231, 93, 80, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241, 52, 95, 52, 88, 19, 33,131,193,
- 96, 48, 24, 12,198,115, 70, 90,221,151,178, 54, 95,102,243, 60,239, 12, 0, 82,169, 52,199,120,245,115,215,218, 68,188,220,220,
-122, 10,192,175, 0, 32, 1,222, 78,205,200, 56, 94,141,230,113,158,231,237, 42, 52, 11,141, 87, 63,127,169, 54, 77, 89,235,133,
-199,254,180,253,149,207,122, 85, 99,161, 57, 89,235,133,153, 79,164,213,205,228,220, 83, 42,254, 55,210,249, 79,209,252, 55, 35,
-111,251,101,182,209,248,168, 30,201,100,210, 28,195,149,218,235,145,188,205,194,204, 63,109,127,249, 51,151, 39,183, 81,182, 95,
-148, 98, 52,242,110, 0,160, 84, 40,114, 3,125, 92, 86,212,166, 25,159,154,243,129, 70,171,115,170,208,204,212, 93,156,229,253,
-143, 61, 55, 77,196,213,213,181, 37,199,113,159, 19, 66,172,171,124,125, 39, 61, 61,253, 3, 86, 43, 25, 12,198, 11,103,176,120,
-158,119,190,177,119, 14,202,117, 64,143,215, 23, 58,251, 13, 89,189,229,201,109,140,218, 66,133,250,225,254, 80,137,177,200,206,
-214,140,218, 61,124,248,144, 3, 0,119,119,247, 95, 1,120, 87,163,105,119, 99,239, 28,168,245, 64,231, 81,243,236,154,250,248,
- 88,151, 16,242,161,153,153, 89,119,173, 86, 27, 6, 0, 42,149, 42, 74,163,209,156,178,166,116,217,147,219,215,148,129,170,105,
-237, 62,102,161,115,208,208, 95,223, 19, 4, 65,161,139,223,209, 69, 44, 77,150, 74, 4,253, 15,125, 50, 51, 15,255, 2, 8,166,
- 20, 72,213,223,237, 50,242, 83, 7, 47, 55,183,158,102,230,230, 45,205, 45, 45, 59, 9,130, 16, 34,138, 34, 68, 81,188,167, 41,
- 47, 63,199, 27,141,215, 5,163,218,225,198,190,175,196,218,210,249,100, 94, 90, 0,210, 28, 87,215, 17,102,150,150, 93, 37, 18,
- 73, 7, 0, 16, 4,225,130,166,172,236,140,115, 86,214, 78, 83,242,110,106,249, 60,237,246,255, 54,140, 70,222, 57,225,232, 28,
-232,140, 64,243,151, 23, 57, 55,121,109,227, 86, 0,208,231,220,118, 41,123,248,123, 27, 0,176, 8, 24,112, 69,233,218, 60, 27,
- 0,164,201,153,206, 15, 14,126, 6,157, 17, 8, 25, 48,207,185, 58, 77,189,222,224, 21,123,104, 54,116, 70,224,173,185,187,220,
- 62,158, 52,220, 28, 0, 78,239,251, 37,224,216,174,149,253, 1,224,165,225,239,255,209,109,200,196, 56, 0, 88,242,243, 46,183,
-205, 95, 14,135,206, 8,132, 15, 94,224,245,180,231, 38,175, 43,150, 23, 61, 56, 24,104, 44,201,176,243,178,144,186,214,247,220,
-180, 1,108,202,128, 41, 68, 34,233, 24, 24, 24,216, 2, 0,226,226,226,110,136, 60,127,222, 18,248,225,121,214, 37,137, 68,242,
- 94,122,122,250,192,170,223,121,120,120,176, 10,201, 96, 48, 94, 76,131, 5, 0,229, 58, 32, 34, 22,232,210,182, 9, 38,140,238,
-111, 89,245,127,251,214, 47,246, 74,143, 58, 22,178,100,219, 10, 73, 80, 80, 16, 30, 62,124,104,210,143,169,245,192,153,135,128,
- 82,155,104,165,150,201,226,231,126,254,185,117,199,142, 29,165,238,238,238, 0,128,156,156,156,182,231,206,157,107, 57,111,222,
-188,201, 74,109, 98,161, 90,143,210, 51, 38, 72, 87,166, 53, 44,168, 1, 62,155, 58,202, 6, 0, 86,124,184,179,229,161,139,183,
-237, 19, 19, 19,123,124,245,213, 87,249, 30,151, 46,173,178, 20,197,117, 49,217,217,169,166,164,115,251,225,155,102,129,134,227,
-126,195,223,120, 99,143,183,183,183,185,167,167, 39, 81,169, 84,144, 72, 36, 40, 43, 43,115,143,137,137,233,121,235,214, 45,205,
-217, 75,251,101,183,111, 14, 75,200,144, 53,215,152,146,119, 57,159,167, 42,111,216, 48,122,120,223,190,158, 3, 6, 12, 80,249,
-250,250, 2, 0, 18, 19, 19, 27,254,241,199, 31,175, 30, 58,116,232, 11, 57,159,199,171,245,208,214,149,247, 74, 77, 0,144, 1,
-237,237,157,157, 71,203,100,178,112,158,231, 61, 42,162, 11,233, 70,163, 49,178, 32, 39,103,243,147,219, 51,254, 19,157, 17,184,
-151, 9,244,236,212, 28, 99,134,245,180, 0,128, 25, 35,191,108,155,156, 24, 43,215,235,245, 8,106, 20,210, 97,193,162,111,143,
-130,227,240,219,158, 19,143,183,175,213,216, 82, 14, 15,115,128, 59,247, 19, 48,231,203,239,104,214,157, 93,173,248,194,232, 94,
-249,121,121, 82, 0,112,112,116, 28,177,125,235,230,227,174, 77,134, 95,139,203, 46,127,188,189, 41,245,189,186,115,243,208,182,
-239,220,211, 35, 79,133,254,116,116,141,204,219,219, 27,145,145,145,245, 58, 55, 81, 28, 99,101,238,230,118,111,238,199, 31,187,
-118,238,220, 25, 22, 22, 22,144,201,100, 48, 26,141, 61, 47, 92,184,208,115,206,156, 57,147, 75,138, 99,202, 77, 61, 55,235, 70,
-182,204, 37,168, 75,183,161,131,250,185,117,239,210, 22,195,250,116, 96, 21,145,193, 96,188,184, 6, 75, 42,149,230,244, 26,251,
-149,115,167, 54,225,184,118,251, 65,113, 98, 74, 86, 89,229,255,138,238,239,109, 56,105,104,211,240,213,135, 14,194, 96, 48,224,
-226,197,139,184,126,253, 58, 46, 94,188, 72,151, 45, 91,166,145, 0,111,215,160, 89,216,121,212, 60, 59,165, 46,213,178,133, 67,
-170,239,246,173,103, 36, 26,141, 6, 17, 17, 17, 40, 44, 44,132, 82,169,132,135,135, 7, 58,117,234, 36, 61,125,250,180,253,200,
- 87, 71,219,188, 52,228,205, 4,157,210,171, 76, 42,149, 22,214,152, 1,169, 52,167,199,235, 11,157, 67, 27, 54, 64, 92, 82, 70,
-241,103,139,214,148,137, 2,149,106,147,211, 12,103,207,158, 69,179,102,205,176,125,251,118,135,194,194,194,217, 27, 54,108,248,
-220,229,251,245, 43,179,211, 98, 62,172, 69,175,176,243,168,121,118, 65,194, 73,239,157, 91,214,201,111,223,190, 45, 95,181,106,
- 21, 10, 10, 10,160, 80, 40, 96, 99, 99, 3, 87, 87, 87, 4, 5, 5,145,201,147, 39,155,119,235,246, 16,159,125,248,134,119,150,
-221,208,152,154,210, 89,169, 41,215,103,154, 55,148, 92, 15,248,117,227, 70,174,117,235,214,164,234, 54,222,222,222,232,218,181,
-171,106,232,208,161, 1,147,223,157, 42,246, 28, 58, 49,206,160,112, 83,215,165,137,242, 84, 51, 7,245, 37,247,158,163, 70, 29,
-152, 59,119,174,173,155,155, 27,204,205,205, 1, 0,197,197,197,158, 73, 73, 73,109,231,204,153, 51,252,202,157,237,210,206, 3,
- 82, 51, 96,225,165,169,173, 60,255,173,200,100,210,156,202, 72,148,149,133, 89, 97,106, 90,118,249,163, 40,148, 30,122,189, 30,
- 58,157, 14,239, 76,158, 40,121,251,229,214,129, 62,157,222,187,149,152,158, 93, 16,114,226,178,125,229,190, 53,104,230,133, 14,
- 90, 96, 7, 0, 92, 73, 66,121, 97,210,177,183,102, 78,155,230,225,234, 58, 9,114,185, 28, 0,176,126,221, 58,105,126,126,126,
-223, 5, 11, 22,132, 83,139, 30, 37,161,131, 22, 88, 84,236, 91, 88,223,115,179,240,193, 65,191, 47,167,244,110,250,235,162,131,
- 16, 4, 1,151, 47, 95,198,217,179,103,241,237,183,223,210,195,135, 15, 23, 91, 91, 88,212,122,110,162, 56,198,170,163, 91,150,
-255,215, 95,239, 38, 10,133, 2,251,247,239,199,253,251,247,193,113, 28,154, 52,105,130, 49, 99,198,160,103,207,158,174, 19, 38,
- 76,164,157,251,140,140,135, 77,163,210,103,169, 75,132,204,227,156,195,154,190, 55,101,194,107,110, 47, 15,238,141,239,190,255,
-137, 25, 44, 6,131,241,226, 64, 41,253,207, 23, 64,124,135,172,222,186,243, 6, 61,232, 59,100,245, 86, 10, 16, 10, 16, 37,224,
-221,189,123,119,125, 89, 89, 25,189,125,251, 54, 29, 49, 98, 68,225,140,143, 63, 94,187,113,253,250,185, 58,181,250,157, 22, 77,
-155,142,161, 21, 35, 19,171,213,180,181,181,246,247,247,207, 77, 77, 77,165,135, 15, 31,166,243,230,205,163, 91,182,108,161, 71,
-142, 28,161, 39, 79,158,164, 71,142, 28,161, 59,118,236,160,183,111,223,166,177,177,177, 52, 32, 32, 32,215,215,214,214,186, 22,
- 77,142, 2, 92,224,208, 95, 62,220,117, 93,152,219,112,232,175, 31, 80,128, 11,112,117,109,212,171, 87, 47, 97,247,238,221,116,
-243,230,205,116,227,198,141,244,206,157, 59, 52, 47, 47,143,122,248,248,231, 86,238, 87, 83, 58, 41, 64,154, 55,111,158, 91, 84,
- 84, 68,189,189,189,169, 92, 46,167,206,206,206, 52, 40, 40,136,182,109,219,150,246,233,211,135,190,250,234,171,116,246,236,217,
-180,168,168,136,250,248,248,100, 87,238, 87,147,102, 91, 15, 15, 85, 64, 64, 64,202,221,187,119,105, 77,104,181, 90,154,151,151,
- 71, 79,157, 58, 69, 3, 2, 2, 82,218,122,120,168,106,211,148, 1,205,195,195,195,115,243,242,242,168, 40,138, 84,173, 86,211,
-252,252,124,154,159,159, 79, 11, 11, 11,169, 94,175,167,162, 40, 82, 81, 20,105, 76, 76, 12,245,247,247,207,145, 1,205,107,212,
-252, 55,191, 42,235,196, 19, 47, 15, 23,151, 62,174,174,174,154,221,187,119,211,244,244,116,186, 97,195, 6,202, 1, 95,254,199,
-182,213,104, 14, 15, 25, 46,111,222,124,130,153, 68, 98,214,191,125,251,246,194,197,139, 23,233,141, 27, 55,232,204,153, 51,233,
-192,129, 3,233,160, 65,131,232,220,185,115,105, 74, 74, 10, 77, 77, 77,165, 47,189,244,146, 32,145,152,245,111,222,124,130,217,
-240,144,225,242,250,156,155, 42,192,107,192,128, 1, 26,131,193, 64,227,227,227,105, 88, 88, 88,154, 4, 24, 45, 7, 66,252, 1,
- 69, 93,245,211, 26,176,117,115,115,203,188,116,233, 18,221,189,123, 55,245,241,241,201,149, 0,227,149,128,175, 18,240,149, 0,
-227,253,252,252,114, 47, 93,186, 68,243,242,242,168,183,183,119,166, 53, 96,251,180,117, 9,152,203, 57,135, 13, 89,183,224,251,
-221, 52, 38,173,156, 46,248,126, 55,117, 9,234,154, 66, 41,165,110,110,110,199, 89,157,100, 47,246, 98,175,127,250, 75, 90, 31,
- 51,198,153,153,205, 89,180,104,145, 92,163,209, 96,254,252,249,185,239, 76,154,180,208,209,217,217, 32,147,201, 32, 83, 42,235,
- 22,176,182,254, 96,214,172, 89,182,122,189, 30, 55,111,222, 68,139, 22, 45,160, 82,169, 32,147,201, 32,151,203, 33,149, 74,225,
-234,234,138,188,188, 60,184,184,184, 96,242,228,201, 54, 63,124,247,221, 7, 40, 42,154, 95,155,172, 40, 80, 41, 0, 8,130,160,
-240,114,119,159, 16,214,184,241,178,201,147, 39,115, 22, 22, 22,208,233,116,208,233,116,136,137,137,129,131,131, 3,204,205,204,
- 76,202, 51,199,113,156,165,165, 37, 34, 34, 34,176,110,221, 58, 36, 36, 36, 32, 35, 35, 3,214,214,214,104,214,172, 25, 66, 66,
- 66,208,161, 67, 7,196,198,198,130, 16, 66,234,210,203,150, 72,166,140, 25, 53,202, 57, 60,188,250, 41, 69,116, 58, 29,138,138,
-138, 80, 84, 84, 4, 23, 23, 23,244,237,219,215,249,192,254,253, 83, 0, 44,173,110,123,115,192,213,183, 97,195, 3, 87,175, 94,
-117,228, 56, 14, 17, 17, 17, 80,171,213,208,106,181,224,121, 30,132, 16,168, 84, 42,180,107,215, 14, 14, 14, 14,104,216,176, 33,
-246,238,221,235,212,171, 87,175, 63,204,179,179,155,171,129, 76,246,120, 81, 55,105,217,217,199, 90, 0, 14,175,189,246,218,225,
- 59,119,238,116, 30, 61,122, 52,178,179,179, 63,149,204,156, 89, 40, 0,203,107,219,119,231,189, 93,188, 39, 96, 97,239,228,244,
-203,226,197,139,185,172,172, 44, 76,159, 62, 61, 63, 35, 53,117,150, 10,184, 4, 0,127,252,254,123,187, 77,155, 54, 45,218,188,
-121,179,195,198,141, 27,185, 22, 45, 90,172,206,185,185, 58,244, 6, 80, 92,159,116,106,129,247, 86,172, 88,161,210,106,181,232,
-213,171, 87,188, 58, 49,177, 9, 15,104, 76,221,191, 12,152, 50,247,227,143, 93,149, 74, 37, 62,250,232,163,188,188,228,228, 48,
- 30,200,173,178, 73,146, 69, 66,194,225,215, 95,127, 61,234,206,157, 59,142,203,151, 47,119,125,121,232,208, 41, 0, 22,154,250,
- 27,255,223,161,157,179,118, 9,242,111, 56,164, 79, 95,151, 70,126,206,216,189,255, 40,126, 88,189,101, 61,138,226,126,241,240,
-240,152,194,113,220, 18, 86,243, 24, 12,198, 11,217, 68, 88, 19,118,118,118, 45, 3, 2, 2,112,242,228, 73, 4, 7, 7,239,117,
-174, 52, 87, 50, 25, 4,161,238, 62,228,102, 22, 22, 61, 58,119,238, 44,189,120,241, 34,124,125,125, 97,102,102,246,216, 88, 85,
-154, 44,153, 76, 6, 87, 87, 87, 20, 23, 23,163, 99,199,142,178,117,235,214,245, 0, 48,191, 46,237,204,164, 24, 75,196,175,123,
-109,222,130, 5,254, 45, 91,182,132,193, 96,120,100, 68,204,205,161,211,233, 32,147,201, 96, 48, 24,160,213,211, 18, 83,242, 42,
- 8,130, 32,145, 72,224,237,237,141, 47,190,248, 2, 90,173,246,113,179, 78, 73, 73, 9,138,138,138,112,243,230, 77, 36, 38, 38,
- 66, 20,197, 58, 39, 19, 51,183,180,236, 59,104,208, 32, 69,117,255,211,235,245,143,205, 85,113,113, 49,180, 90, 45,154, 54,109,
-170, 56,117,234, 84,223,154, 12, 22, 81,169,134,111,220,184,209, 89,161, 80, 64,171,213,226,225,195,135,136,139,139, 67, 76, 76,
-140,174,160,160,128,183,180,180, 36,110,110,110,146,226,226, 98,197,235,175,191, 78, 74, 75, 75, 1, 0, 67,135, 14,117, 88,191,
-118,237, 43,168,195, 28, 48,254,159, 27,128, 46, 64,175, 31,216,186,117,235, 83,215,174, 93,107,241,254,251,239,227,206,157, 59,
-223,152,111,223,126, 86, 13,220,170,181, 94, 2,147,151,204,152,225,102, 97, 97,129, 49, 99,198, 20,168, 83, 83,155,240, 64, 86,
-149, 77, 30, 56, 36, 38, 30, 25, 59,118,108,228,157, 59,119,236,150, 47, 95,238,250,202,240,225,147, 1, 44,170, 79, 26,109,108,
-108, 90,187,186,186,226,200,145, 35, 72, 73, 76,156, 81, 31,115, 5, 0, 68, 34,233,216,165, 75, 23,236,219,183, 15,105,201,201,
- 51,158, 48, 87, 0,128,114, 32, 87, 26, 31, 63, 99,253,250,245,235,222,120,227, 13,112, 82,105, 71,240,188,201,191, 81, 93,135,
-246,119,102, 44,193,222, 35,151,215,231, 68, 53,126,139,210,189, 34,128,171,172,198, 49, 24,140, 23,129,122,205,131,229,231,231,
-231,167, 84, 42,145,148,148,132, 54,109,218, 36,202, 20, 10, 40, 21, 10, 40,205,204, 76,123,202,214,106, 27,187,186,186,162,164,
-164, 4,142,142,142,144,203,229,144,203,229, 80, 40, 20, 80, 40, 20,143, 63, 91, 89, 89,129,227, 56,120,120,120, 64,171,213, 54,
-174, 75,151, 47,126,232,124,116,195,140,119, 15,237,221,228, 63,116,232, 80,184,187,187,193,195,195, 29, 22, 22, 22,144, 74,165,
-240,246,246, 70, 64, 64, 0,214,174, 93, 11, 98,221,240,138, 41,105,173,106,154, 36, 18, 9, 4, 65, 64,118,118, 54, 98, 98, 98,
-112,231,206, 29, 92,186,116, 9, 55,111,222, 68, 89, 89,153, 73,121, 87,171,213,205,170, 11,116, 61,105,174,138,138,138,144,155,
-155,139,184,184, 56,148,150,150, 54,175,209,236, 58, 56, 12, 11, 15, 15,151, 0,128, 74,165,130,159,159, 31,126,254,249,103,254,
-248,145, 35,175,152, 93,187,102, 43,156, 58,101,179,245,183,223, 94,121,243,205, 55,133, 43, 87,174,160,164,164, 4, 15, 30, 60,
-128,147,147,147, 84,105,102,246, 10,171,250,245, 35, 14, 40,183, 40, 45,237,211,190,125,251,132,226,226, 98, 44, 89,178,132,147,
- 90, 89,253, 50, 17,144,212,122,130, 73, 36,157,186,117,235,134,253,251,247, 35, 45, 57,121,102,254,159,205, 21, 0, 32, 31,200,
- 74,140,139,155,177,126,253,122,244,237,219, 23, 82,169,180, 83,125,211,215,182,109,219,112, 74, 41,238,222,189, 11, 5,112,185,
-190,251, 7, 6, 6,182,176,180,180,196,253,251,247, 33, 3,206,214,180,157, 12, 56,123,243,230, 77,152,153,153, 33, 52, 52,180,
-101,253,126, 69,182,204, 37,168, 75,230, 59, 51,150, 96,207,145, 11, 0,128,125, 7, 14,103, 63, 50, 87,115, 68, 86,203, 24, 12,
-198,191,214, 96, 1,143,250,108, 73, 36, 18,200,165, 82,152, 41,149, 80, 40,149, 80,200,100,166, 63, 41, 19, 2,165, 82,249, 31,
-166,170,210,104, 85,254,181,176,176, 48, 89,211,152,121,190,243,184,177,175, 43, 44, 45, 45, 33, 8, 60,164, 82, 41,204,205,205,
-225,234,234,130, 70,141, 26,161,160,160, 0, 3, 7, 13,209, 38, 23, 72, 15,200, 60,123,220,121,154,130,226,121, 30,229,229,229,
- 40, 44, 44, 68, 65, 65, 1, 74, 74, 74,160,213,106, 97, 66,235,224, 99,159,150,146,146,130,109,219,182, 33, 63, 63,191, 70,115,
- 21, 31, 31,143, 77,155, 54, 33, 49, 49, 17, 18,137,196,228,227,211,163, 71, 15, 28, 60,120, 80,210,181, 71,143, 53,201, 62, 62,
-153,201, 62, 62,153, 93,123,244, 88,243,251,239,191, 75, 60, 60, 60,144,146,146,130,155, 55,111,162,160,160, 0,162, 40, 18, 86,
-245,235, 79, 6, 80,168, 46, 40,120,227,211, 79, 63,165,150,150,150, 88,186,116,105,179,181,192,171,181,237,227, 31, 16,208,194,
-210,210, 18,247,238,221,131,121, 45,198,197, 28, 56,123,227,198, 13,152,153,153,161, 81, 72, 72,203,167, 57, 47, 69, 81,132, 32,
- 8, 32, 64,189,205, 10, 33, 4, 50,153, 12, 28,247,215,204, 61, 76,200, 60,142,183,107,250,222,148, 41, 83,221,222,155,250, 14,
- 78, 69, 60,242,128,146,178,248,135,204, 92, 49, 24,140, 23,145,122, 53, 17,198,197,197, 37,106,181,218, 16, 95, 95, 95, 68, 69,
- 69,249,134, 53,110,124, 71, 38,147, 65, 41,147,213,254, 24, 95,129, 74,165,186,155,157,157,221,193,211,211, 19, 70,163,241,113,
-147, 96,101, 51, 97,229,103, 0, 80, 42,149,184,119,239, 30, 84, 42,213,221, 58, 51, 33,148,249,248,249,249, 33, 43, 43, 27, 74,
-165, 18,118,118,182, 48, 51, 51,131, 82,169,194,162, 69,139,196, 53,171, 87,255,168, 12,155, 82, 52,237,205, 25,244,234,194, 95,
-255,150,130, 54, 55, 55,191,235,235,235,219,206,194,194, 2,123,247,238, 69, 98, 98, 34,138,138,138, 30,247,155,210,104, 52,208,
-233,116, 80,169, 84, 8, 13, 13,133,189,189, 61,162,162,162,106,204,123, 97,126,254,158,200,200,200,118,173, 90,181,122, 92,244,
- 93,187,118, 37, 93,187,118,117,172, 18, 53, 67,126,126, 62,110,223,190,141,136,136, 8,240, 60,143,232,232,104, 65,167,209,108,
-103, 85,255,233,208, 2, 23, 36,235,215,175,155, 52,105,210,155, 29, 58,116, 0, 5,250, 1,248,173,198, 39, 24,142, 35, 82,169,
- 20,132,144, 90,141, 15, 1,196,202,101,171, 72, 61, 92,123, 37,151, 46, 93,138, 20, 4,161, 67, 80, 80, 16,116, 64,107, 0, 7,
-235,179,127,108,108,236, 13,163,209,216,179,105,211,166,216,179,115,103,103, 0, 73,213, 62,204, 0,157,155, 55,111, 14,141, 70,
-131,232,232,232,235,166,154, 43,231,176,187,107,166, 76,120,109,252,203,131,123, 99,247,254,163,216,119,224, 72,234, 79, 95,127,
-236, 69,169,104, 96,181,138,193, 96,252,235, 35, 88,197,197,197,215,238,223,191,143,182,109,219, 34, 54, 62,126,168, 78,163,145,
- 87, 70,177, 56, 73,221, 22, 75, 83, 94,126,242,252,249,243,124,179,102,205, 80, 86, 86,246,216, 84, 85,141, 94, 85, 26, 46, 11,
- 11, 11, 28, 62,124,216,160, 41, 47, 63, 89,151,174,192, 11, 34,199,113, 32,132, 64,167,211, 33, 51, 51, 11, 90,173, 14,191,254,
-250, 43,214,174, 94,253,106, 90,102,230, 7, 80,218,105,254,138, 2, 52,245, 94,168,209,104, 78,158, 60,121,210,232,235,235,139,
-113,227,198, 97,218,180,105,152, 54,109, 26, 38, 78,156,136,241,227,199, 99,244,232,209, 24, 54,108, 24,218,180,105, 3, 39, 39,
- 39, 36, 36, 36, 24, 53, 26, 77,141,121,167, 90,237,174,177, 99,199,230,104,181, 90, 8,130, 0,157, 78, 7,141, 70,243, 56,202,
-118,243,230, 77,236,217,179, 7,171, 87,175,198, 31,127,252,129,242,242,114,148,148,148,224,198,141, 27, 69, 18,163,113, 7,171,
-250,207,116,210,236, 62,127,254, 60,236,236,236,224,238,233,217,165,214,135,146,216,216, 91,130, 32,160, 73,147, 38, 40, 7,106,
-220,182, 28,232,210,172, 89, 51,104,181, 90,220,139,142,190, 89,223, 52,149,150,150, 94, 77, 72, 72, 64,215,174, 93,225,230,233,
-185,204, 5, 48,171,207,254, 34,207,159,191,112,225, 2, 94,127,253,117,248,248,249,125,109, 1, 56, 61,185,141, 5,224,228, 27,
- 16,240,245,248,241,227,113,236,216, 49,136, 60,127,190, 38, 61, 87, 87,215,150,238,238,238,191,123,120,120, 68,184, 4, 28, 79,
- 26,218,167,237,248,170, 29,218,105, 81,220, 8, 15, 15,143,205, 28,199,125,196,106, 20,131,193,248,215, 27, 44, 81,163,153, 55,
-107,214, 44,189, 68, 34,193,187,239,190,235,244,195, 79, 63,205,219,177, 99, 71,171,219,119,239,186,234,117,186,186, 29, 86, 73,
-201,138, 5, 11, 22, 20, 25, 12, 6, 4, 7, 7,163,160,160, 0,130, 32, 64, 34,145, 64, 42,149, 66, 34,145,128,227, 56,152,155,
-155, 35, 50, 50, 18,219,183,111, 47, 65, 73,201,138, 58,211, 37,138,119,247,238,221, 11,169, 84, 74, 85, 42,213, 99,211,243,221,
-119,223,229,188,153,153,185, 7, 0, 36, 18,137, 30, 0, 56, 9, 49,169, 87, 46,199,113,117,118, 92, 87, 40, 20,149,157,251,235,
-238,228,206,243, 43,126,254,249,231,210,135, 15, 31, 66,173, 86, 63,110, 26, 44, 43, 43, 67,105,105,233,227,207,149, 38,241,236,
-217,179,165,230, 60, 95, 99,222,213, 64, 86,226,195,135, 3, 91,181,106,149,159,148,148,132,178,178, 50,196,198,198,226,210,165,
- 75, 56,120,240, 32, 78,159, 62,141,184,184, 56,232,245,122,216,218,218,162,164,164, 4,191,255,254,123,137,174,172,172,183,186,
-154,126, 64,140,255,199,203,205,173,135,139,179,115,170,147,163, 99,186,151,155, 91,143,106,140,198,131, 7, 15, 30, 64, 16, 4,
-248,251,251,219,215,214, 15, 75,224,249,243,151, 46, 93,194,232,209,163,225,234,225,177,200,169, 26,227,226, 4, 56,185,121,122,
- 46, 26, 55,110, 28, 78,158, 60, 9,161, 22,227, 82, 19, 42,224,187,143, 63,254, 88, 35,151,203,177,125,251,118,127,235,192,192,
- 24, 41,240,154, 2, 8, 14, 0,228,117,237,111, 9,252, 48,123,246,236, 44, 0,216,188,121,179,163, 91, 64, 64,148, 20, 24,167,
- 2, 26,168,128, 6, 82, 96,156, 91, 64, 64,212,246,237,219, 29,121,158,199,180,105,211,178, 44,129, 31,106,210,147, 72, 36,239,
-101,100,100, 12, 76, 79, 79,239,156, 21,123,209,235,167,175, 63,198,169,136,203,248, 97,245,150,245, 57, 81,141,223,202,206, 78,
-187,154,158,158, 62, 38, 45, 45,141, 45, 22,203, 96, 48, 94, 72, 72,101,179, 68, 85,100,109,190,204, 6,168,115,151,182, 77,112,
-237,118, 76,177,131,157,205,145,202,255, 21,221,223,219,240,149,174, 62,205,230,205,155, 7, 66, 8,238,223,191,143, 59,119,238,
- 0, 0,150, 44, 89,162,230, 40, 29, 90,185,222, 89,213,213,182, 43,215, 59, 83,234, 82, 45,155,219, 37,248,253,182,113,189,196,
-202,202, 10,101,101,101,144, 72, 36, 80,169, 84,176,176,176,128, 82,169,196,157, 59,119,240,250,184, 55,132, 56,190,233,227,137,
- 70, 43,215, 59,251,211, 10,222,132,112, 0,208,193,193,193, 60, 69, 46,255,208,201,197,229,227,169, 83,167,154,117,238,220, 25,
- 10,133, 2, 45,219,116,202, 50,107,246,241, 74, 78, 66,248,140,188,226,207, 3, 26,184,219, 68, 63, 76, 2, 64, 30,173, 89, 88,
-177, 22, 97,117,233,108,172,186,227,255,219, 79,243,173,195,194,194, 64, 41, 69,113,113, 49,178,179,179,145,147,147,131,162,162,
- 34,104, 52, 26,136,162,136, 19, 39, 78,224,196,149,248,146,108,171,151,226,107, 74,231,255,231, 61,201, 42,196,236,129,239,202,
-229,203, 36,118,118,118,200,206,206, 70, 94, 94,222,227,166, 66, 65, 16, 80, 90, 90,138,253, 7,254, 16,226,133,198,137, 58,101,
-131,210,186, 52, 81,158,106,102, 95,118,193,163,101,184, 47,157, 56,113,162,149,181,181, 53, 68, 81, 68, 65, 65, 1, 18, 19, 19,
-241,224,193, 3,156, 59,119, 78,157, 83, 98,164, 26,199, 94,105,149, 19,141, 86, 91,158,207, 47,170,247,207,211,172,168, 75, 0,
-224,238,230,150,153,156,156,236, 44, 8, 2, 60, 60, 60,248,162,130,130,197, 10,224,152, 28,200, 32, 0, 45, 5,102, 47, 95,185,
-242,141,193,131, 7,163,117,235,214,169, 89,217,217, 13,170,171, 75, 32,132,115, 7,236,228, 62, 62,247, 46, 95,190,236,244,224,
-193, 3,140, 29, 59, 54, 55, 35, 53,245, 67,107, 32, 2, 0, 74,128, 46,238, 94, 94,203,182,110,221,234, 20, 30, 30,142, 38, 77,
-154,228,234, 18, 19, 67, 50,128,194, 26,234,103,141,231,102,225,131,131,126,239, 14, 13,111,245,206, 59,239,128,231,121, 68, 68,
- 68,224,202,149, 43, 72, 73, 73,193,133, 11, 23,138,172, 45, 44, 70,214,118,110,162, 56,198,170,111,195,114,255,205,155,127, 35,
-114,185, 28,235,215,175,199,205,155,143,130,105,205,155, 55,199,248,241,227,193,243, 60, 70,143, 30, 67,255,136, 49,123, 60,209,
-104,117,117,201,211,211, 51, 92, 20,197,165,132, 16,185,160,112,110,149,149,112, 83,229, 22,212, 49, 35,235, 97, 15,175,250,244,
-185, 98,245,147,105, 50,205,127,143,230,139, 70,157,107, 17, 46, 92, 5,155, 63, 47,199,241,118,230,254,245,139,165,253,250, 15,
- 12,249,252,179, 89,146,198,141, 27, 67, 20, 69,180,110,221, 26, 99,199,142, 53, 15, 9, 9,169,107,189,179,178,151,134,188,153,
-240,210, 75, 47,217,190,251,238,187, 54, 93,186,116,145, 85, 46,149,115,247,238, 93, 28, 58,116,200,176,109,219,182,146,116, 69,
-167,162, 11,135,215,150,153,178,222,217,133,252,124, 53,128,249, 65, 6,195,234,217,159,125, 54, 55,172,113,227, 55, 63,248,224,
- 3,206,210,194, 92,182,240,243,183, 85, 0,240,229,247,219,108, 6, 15,127, 13, 43, 2,129, 46,175, 86,191,118, 92,213,116,166,
-101,230, 36,191,246,198,136,192, 55, 71, 15, 21,135, 12, 25, 98,110, 99, 99, 3, 47, 47, 47,216,218,218, 34, 33, 33, 1,119,239,
-222,165,199,142, 29, 43,187,125, 63, 69,182,105,199,177,100,133,165,179, 41,235, 6,150,190, 52,120,108,226,184,113,227,236,134,
- 14, 29,106, 21, 22, 22, 38,147,201,100, 80, 42,149,200,203,203, 67, 90, 90,154,225,244,233,211,101,233,242,118,133, 23,142,108,
- 40, 53,113, 45, 66, 77,231, 81,243, 98, 79, 30,157,251,193,237,219,183,199, 0,104,106, 48, 24, 60, 5, 65, 32, 28,199,101, 10,
-130,112, 71, 91, 86,182,142,111, 62,119, 5, 91,139,208, 52, 4, 65,144, 11,130,128,162,162, 34, 28, 63,126, 92, 26, 23, 23,247,
-249,237,219,183, 63,207,200,200,128,193, 96,192,240,225,195,209,188,121,115,156, 57,115, 6,185,217,217, 7,106,211,202, 0, 10,
-165,201,201,111, 76,158, 60,249,224,134, 13, 27,200,221,187,119,157,214,173, 91,247,219,141, 27, 55, 0, 0, 45, 90,180,192, 27,
-111,188, 1,169, 84,138,177, 99,199,210,148,196,196, 55,120,160,176,150,250, 89,219,185,153,123,104,219,119,183,135, 12, 27, 30,
- 58,103,246,103,178, 14, 29, 58,192,201,201, 9,157, 58,117,130,193, 96,176, 53,225,220, 44,237,220,103,100,124,211,166, 77, 45,
-150, 47, 95,238,250,198, 27,111, 96,202,148, 41, 0, 0,141, 70,131, 99,199,142, 97,218,180,105, 89, 41,210, 54,229, 55, 78,111,
-175,181,126, 86, 68,166,122, 1,128,135,135, 71, 4,128,206, 92,121, 82, 60,235,208,206, 96, 48,254,213, 6, 11,248,255,245,206,
-206, 93,137, 68,213,229, 56, 30, 97,127,207,104, 63, 52,254,141,105,139, 67, 37,198, 34, 59, 51,169,222,238,206,237,219, 92, 66,
- 66, 66,173, 63, 86,185,222,153, 78,233, 85, 38,100,230,183,250,110,197,138, 15,214,172, 89,211,163,114, 42, 6,149, 74,117, 87,
- 83, 94,126, 18, 37, 37, 43,116,190, 94,167,234,187,118,222,131,252,252,108, 0,147, 2, 68,113,229,184, 55, 39, 46, 33,150, 94,
-210, 89, 11,127,213, 74, 36, 18,125,124,122, 54, 86, 4, 2, 22, 38,204,135,170,214, 3,119,243,157,249, 40,218, 37,102,233,226,
-197,211, 87,253,240, 67, 27, 51, 75,203,206, 6,131, 33, 68, 20, 69, 0,184,167, 85,171,207,242, 6,195,149,116,247, 9,223, 42,
- 44,157,169,169,235, 6,234, 84,190,165, 22,154,115,173,118,239,220,249,254,225,195,135,255, 35,239, 86,192, 74,157,181,239, 73,
- 83,242, 94,117, 27, 35,112, 17, 57, 57, 23,107,124,218, 0, 91,139,208, 84, 56, 74,223,182,179,179,251,173, 71,143, 30,170,158,
- 61,123,162, 95,191,126,104,223,190, 61, 68, 81, 4,165, 20,165,165,165,216,177, 99, 7,190,249,230,155,135, 46,192,188,186,244,
-120,224,136,116,255,254, 65, 45, 90,180, 88,183,124,249,114,135, 73,147, 38,193,172, 98,106, 19,141, 70,131,211,167, 79, 99,218,
-180,105,249, 73,241,241,111,240,192,145,186,244,106, 63, 55, 85, 15,120,219,193,137, 35,167, 44, 14, 52,150,100,216, 57,152,243,
-174, 81,145,119, 77, 62, 55, 97,211,168,180,248,230,142,214, 47, 15, 29, 58,133,147, 74, 59, 86, 78,197, 16, 29, 29,125,189,114,
-177,103, 52, 31,127,162, 62,117,137,210, 71,115,207, 81, 74, 89,135,118, 6,131,241,239, 54, 88, 82,169, 52,167, 50,202, 35,149,
- 74,115, 18,246, 77,120,173, 54, 17, 47, 55,183,158, 21, 79,199,168,107, 45,194,202,247, 9, 69, 69,165, 21, 51,180, 87, 59,137,
-168,236,137,237,235,147,169,184,236,236, 24, 0,253,129,100, 32,230,220, 35,189,214, 11,103, 86,205, 83,141, 5,242,167,223,149,
- 23,164,101,103,159, 3,112, 14,192, 55,213,166,211, 91, 94, 80, 87, 58,159,204,251,237,228,228,146,138,124, 87,159,119,231,186,
-243, 46,173,103,249, 72,159,161, 60,255,109,100,230,230,238, 3, 96,225,120,240,160,203,161,131, 7, 95,153, 62,125,250,203,238,
-238,238,129,142,142,142,118, 86, 86, 86,220,229,203,151, 19,244, 90,237,202, 0, 96,195, 3, 64,109,138, 38, 15, 28,114,141,143,
- 15, 30, 52, 96,192, 7,156, 84,218, 49, 36, 36,164, 57, 0,220,187,119,239,166,200,243,231,157,128, 21, 60, 80, 96,194,113,172,
-223,185,169,172,255,185, 89,252,104, 22,249,133,224,121,160,162,249,255, 89,206, 77, 81, 20, 23,122,120,120,148,178, 25,218, 25,
- 12,198,191,137,106,251, 96, 61, 55,113,214, 62,205, 52, 95, 32, 77, 66,136, 4,128, 69,101, 68,134,149, 39,211,100,154, 76,147,
-105, 50,106,124, 32,102, 69,192, 96,152, 6,165, 84, 0, 80,194, 74,130,193, 96, 48, 24,117,154, 80, 0,225, 53,220, 76,234,243,
-100, 31,254, 20, 55,171, 72,166,201, 52,153, 38,211,100,154, 76,147,105,254,187, 52,235,210,126, 81, 34, 99,172,137,144,105, 50,
- 77,166,201, 52,153, 38,211,100,154,127,187,230,139, 6,199,138,128,193, 96, 48, 30, 49,111, 30,225, 0, 66,128,121, 28,176, 75,
- 2,140,144, 60,250,252,244,140, 24, 65,170,157,136,246,189,209,196,138,149, 56,131,241,226,194,250, 96,253,141,184,185,185,121,
-187,184,184,252, 66, 41, 37, 57, 57, 57, 19, 50, 51, 51, 83, 88,169,252,239,225,224,224,208, 3, 0,242,243,243, 79,190,168,121,
- 12,243, 35, 67, 41, 65,240,159,158, 80, 69,164, 68, 37,210, 63,173,179, 24,230, 75,198, 80,238,207,115,105, 17,138,251, 81, 9,
-116,111, 61,158,124,185, 33, 61,156,150, 2,192,190,147,185, 31,209,138, 9, 85,159, 39,238,238,238, 65, 14, 14, 14, 71, 37, 18,
-137, 84, 16,132,201,119,239,222, 61, 88, 91,122, 0,224,157, 97,152,101,231,224, 56,107,246, 36, 34,211,235,150, 20,233,180,218,
- 98,142,227, 18,229,114,249, 57,157, 40, 63,242,253,102, 99, 84,117,251,215,150,254,112, 63,210, 55, 56, 36,116, 96,139, 16,179,
-248,165, 35, 90,175,232,242,166,163, 44,225,250, 45,203, 85,123, 83,126,113,178,243, 24,248,254, 40,233, 65,165,153, 48,230,235,
-181,180,140,157,105,166,177,136, 16,123, 3,208, 88,174, 84,122, 10, 60,239, 2, 0, 18,169, 52,219,168,211,165,202,129, 59, 51,
- 41, 45,250, 31,209,116, 52, 74,165,225,114,133,194, 83, 48, 26, 93, 8, 64, 33,147,229,136,122,125,170,192,243,145,115, 40,205,
-127,218,116,202,148, 74, 47,129,231, 93, 8, 64,159, 87,222,159,167, 38,163, 14,131, 21, 16, 16,112,157,227, 56, 79,142,227, 42,
- 47, 66, 85, 47, 72,213,254, 21, 4, 33,237,254,253,251, 45, 77,253,113, 63, 63, 63,107,173, 86,251, 10, 33,228,181,138, 11,213,
- 22,149, 74,181, 35, 33, 33,225,169, 58, 18,251,249,249, 89, 83, 74, 63, 50, 51, 51,235,174,213,106,195, 0, 64,165, 82, 69,105,
- 52,154, 83,132,144,165, 79,163, 75, 8,145,186,185,185,141,176,176,176,232,198,243,124, 55, 74, 41,145, 74,165,167,213,106,245,
-169,204,204,204,157,148, 82,190,190,154,238,238,238,102, 14, 14, 14, 95, 6, 6, 6,190,250,238,187,239,230,219,219,219, 55,154,
- 55,111,222,181,240,240,240,173, 5, 5, 5,159,101,100,100,104,254, 23, 42, 7, 33, 36,192,213,213,117,139, 76, 38,147,164,166,
-166,118, 3, 0, 47, 47,175,211,122,189, 94,200,201,201,121,141, 82, 26, 87, 31, 61, 39, 39, 39, 11,153, 76,214,214,194,194,162,
-165,133,133, 69,103, 65, 16, 66, 68, 81,132, 40,138,247,202,203,203,207, 26,141,198,235, 70,163,241,114,110,110,110,249,255,202,
- 9, 66, 8,177,114,117,117,253,141,231,121, 16, 66, 26, 82, 74, 75, 95,196, 11, 1, 37, 8,142,142,186,215,168,234,119,161, 97,
- 33,255,185, 29, 7,239, 26,182, 51,217, 96,245,235,104,219,103, 96,223,166, 28, 0, 24,244,215,250, 0, 56,244,188,205, 85,191,
-126,253, 46,174, 92,185,210, 78,167,211,225,227,143, 63,222,210,176, 97,195, 31, 31, 62,124, 56,171,182,253,172,173,109,166,207,
-255,234, 7,243,138,235,153,179, 40,138,206,153, 25,169, 13, 99,238,223,237, 19,115, 63,114,209,212,225,247, 47,105,120, 97,226,
-218,125,184,111, 74, 58, 66,125,201,128,193, 47, 15,237, 63,255,139,185,120,245,213, 87, 27, 68, 21,104,205, 60,162,110, 43,202,
-169,101,128,163,179,231,160, 25,159,125, 77, 46, 95, 60, 51,104,231,182, 53,167,102,188, 73,186, 51,147, 85,231,185, 72, 22, 74,
-165,109,237,130,131, 59,143,220,183, 15,150, 94, 94, 82,169, 82,201, 1, 0,175,211,121,149,165,166,186,109, 31, 52,168,205, 60,
- 66,206,204,161,244,202,223,169, 57, 95, 42,237,224, 16, 28,220,225,213, 67,135, 96,233,230, 38,229,228,114, 14, 0, 68,131,193,
-179, 36, 35,195,109,123,255,254,173,231,201,100,103,231,242,252,101,106, 66, 63,157,127, 74,222, 25, 38, 26, 44,142,227, 60,111,
-222,188,233,108, 97, 97, 81,249,148, 6, 65, 16, 32, 8, 2, 42,110,138,143, 39, 94,164,148,130,231,121,116,237,218,213,164,167,
- 87, 55, 55,183,238, 0,198,133,135,135,191,252,209, 71, 31,201, 59,116,232, 0, 65, 16,112,234,212,169, 78,203,151, 47,255,222,
-221,221,125, 15,128, 13,153,153,153, 39, 77,125,186,117,115,115,235,109, 97, 97,177,249,243,207, 63,183,238,216,177,163,180,114,
-118,248,156,156,156,182,231,206,157,107, 57,111,222,188,201,110,110,110,163, 51, 51, 51,143,154, 90, 56,158,158,158,225, 13, 27,
- 54,220,213,183,111, 95,207,150, 45, 91,170,130,130,130, 64, 41,197,173, 91,183,222,136,137,137, 25,117,232,208,161, 57,158,158,
-158,195, 77, 93, 79,141, 16, 66, 2, 2, 2,198,186,186,186,126, 57,125,250,116,251, 33, 67,134, 40, 34, 35, 35, 11,253,253,253,
-201,158, 61,123,156, 14, 28, 56, 48,249,199, 31,127, 28, 17, 24, 24,248, 89, 92, 92,220, 70, 83, 78,188,134, 13, 27, 94,231, 56,
-206,211, 20, 3, 92, 31, 19, 76, 8,105,230,235,235,187,227,236,217,179,190, 73, 73, 73,194,208,161, 67, 55, 1,192,133, 11, 23,
-154, 80, 74, 73,135, 14, 29, 14, 19, 66, 94,161,148,222, 50, 37,239, 30, 30, 30, 77,156,156,156,246, 15, 25, 50,196,222,219,219,
-219,220,211,211,147,168, 84, 42, 72, 36, 18,148,149,149,185,199,196,196,244,188,117,235,150,230,194,133, 11, 5, 30, 30, 30,131,
-210,211,211,239,212,227,194,219,222,217,217,121,140, 76, 38, 11,231,121,222, 3, 0,164, 82,105,186,209,104,140,204,201,201,249,
-141, 82,122,241,105, 79, 16, 23, 23,151,239,151, 47, 95,238,152,157,157, 77,231,206,157,251, 61,128,177, 47,242, 5, 33,242,214,
-101,156,187,112, 22, 63,175,254,173,152, 82, 36,255,135,193, 18, 17, 27, 22, 22,226, 52,241,237, 49,246,157, 58,116, 70,120,179,
-182,117,106, 14,233,225, 56, 95, 33,151, 58,168,117,186, 43,121,105,220,126,239, 0,197,208,209,195, 90,198, 3,192,145, 19,119,
-135,182, 9,176, 63,239,232, 41, 14, 54, 87, 42,219,232, 13,124,254,190,147,121, 95,212,199, 76,185,186,186, 30,181,180,180, 52,
- 47, 42, 42,202,202,207,207, 95,213,175, 95,191,133,203,151, 47,183,139,143,143, 71,106,106, 42,198,141, 27,103,153,158,158,254,
-174,183,183,247,165,148,148,148, 26, 35, 89, 37,165,197, 43,190,156, 59,125,142,149,141,157,196,220,204, 2,150, 86,214,240,245,
-107,136, 86,109, 58,161,231, 75,131, 16, 31, 23,211,110,199,230, 53,183, 38, 15, 75, 91, 20, 83,128, 5, 17, 17,168,241,218, 20,
-214,128,116, 25, 60,252,145,185,250, 98,254, 92, 60,136,185, 95,154,148,194, 77,253,227, 6,103,222,183,123,168, 82,175, 43, 75,
-186,124,241,140,111,219,246, 93, 1,160,229,206,109,107, 78,205, 27, 77,122,204,217,252, 98, 26,248,231, 97,174,230,203,100, 99,
-123, 47, 95,238,220,124,242,100,121, 89, 98,162, 33,254,231,159,213,217,103,207, 10, 82,165,146,122,245,233, 67,156,186,117, 83,
- 77,190,119, 79,126, 97,241,226,206, 95, 41, 20,254,159,234,245,155,255, 46,205,126,223,125,231,212,108,194, 4,121, 73,124,188,
-225,193,247,223,107,178, 78,156,224,229, 42,149,232,217,175,159,196,165, 87, 47,229,228,168, 40,249,165, 37, 75, 58, 72,103,207,
-246, 3,240,219,139,144,119, 70,253, 12, 22, 44, 44, 44,176,109,219, 54,200,100, 50,200,100, 50, 72,165,210, 26,223,251,248,248,
-152, 98,130,134,133,133,133,253, 48,125,250,116,151,129, 3, 7,194,206,238,207,171,108, 12, 24, 48, 0,253,250,245,147, 39, 36,
- 36,140,218,185,115,231,168, 77,155, 54,101,185,185,185, 77,205,172, 88,176,185,150,155,119, 55,127,127,255, 61,219,182,109, 51,
-211,104, 52,136,136,136, 64, 97, 97, 33,148, 74, 37, 60, 60, 60,208,169, 83, 39,233,233,211,167,237, 71,141, 26,181,199,195,195,
- 99, 64,122,122,250,233,186,210,234,234,234,218,210,201,201, 41, 98,245,234,213,170,224,224, 96, 18, 27, 27,139,166, 77,155, 2,
- 0,242,243,243, 49, 96,192, 0,213,144, 33, 67, 2,222,125,247,221, 75,174,174,174, 93,179,178,178,174,215,145,247, 22, 77,155,
- 54,221,216,167, 79, 31,247,153, 51,103, 90, 91, 90, 90, 34, 41, 41, 41,211,213,213,181, 97,165, 9, 26, 60,120,176,162, 87,175,
- 94,110,171, 86,173, 90,121,232,208,161,143,221,220,220,198,102,102,102,222,168, 77,151,227, 56,207, 27, 55,110, 56,155,155,155,
- 35, 59, 59, 27,155, 55,111,198,187,239,190, 11,169, 84,138,156,156, 28,236,216,177, 3, 83,167, 78, 5,199,113, 40, 41, 41, 49,
-201, 4, 91, 88, 88,244,108,218,180,233,218,147, 39, 79,122,218,218,218,194,221,221,157,155, 61,123,118,184,191,191,191,153,155,
-155, 27,151,145,145,129, 61,123,246,248,143, 25, 51,102,191, 74,165,122, 67,171,213,214,217,116,230,224,224,176,110,211,166, 77,
-222,183,111,223,198,170, 85,171, 80, 80, 80, 0,133, 66, 1, 27, 27, 27,184,186,186, 34, 40, 40,136, 76,158, 60,217,188, 91,183,
-110,230,115,231,206, 93, 7,160,153, 9, 23,221,166,206,206,206,191,140, 26, 53,202,127,238,220,185,182,110,110,110, 48, 55, 55,
- 7, 0, 20, 23, 23,123, 38, 37, 37,181,157, 51,103,206,112, 23, 23,151,132,156,156,156,137,148,210,219,245,188,168, 55,235,209,
-163,199,128, 33, 67,134, 72,178,178,178,176,102,205,154, 1,132,144,102,166,154,202,127, 34,231, 46,156, 69,183, 62,163,160,225,
-205,100, 7,246,110,166,101,177,171, 29, 44,109,109,165, 0, 80, 86, 84,196,219,219, 91,136, 3, 6,141, 54,116,239, 51, 88,125,
-234,200, 22,115, 83, 12,150, 66, 46,117,216,190,118, 82,234,217,203, 15, 67,142,158, 74,234, 57,100, 80, 79, 78,106,209, 40, 0,
- 0, 62,252,224,109,197,190,223, 79,252,216,187,123,131,204,206,109, 27,166,142,124,243,103,175,250,152, 43,127,127,255, 51, 71,
-143, 30,117, 81, 40, 20, 40, 44, 44,116, 88,191,126,253,183,109,219,182,229,226,226,226,112,255,254,125, 36, 38, 38,162,168,168,
- 8,173, 91,183,182,140,142,142, 94, 5,160, 70,131,245,211,110,124,185,120,134,203,119, 78,110, 78,190, 70,189,206,137,215,101,
-135,157, 60,122,187,201,238, 29,234, 22,206,174,158, 13, 71,141,158,128, 25,179,191,150,237,221,181,241, 11,156, 62,134,136,218,
-102,241, 39,104,255,233,204, 89, 40, 81,235, 48,250,181,183, 49,102,244,219, 14, 84,212,187, 81, 81,107,161,215, 22,218,218,200,
- 99, 14,110, 92,191, 99, 40, 0,207, 42, 38,235, 36, 51, 89,213, 51, 95, 42,109,243,210,178,101,206, 77, 39, 79, 86,222,158, 55,
-175, 60,239,236, 89,141, 95,191,126,133,205, 39, 77,210, 1, 64,105, 98,162,252,193,156, 57,230, 78,157, 59,155,117,248,228, 19,
- 91,163, 90,237,186,128,144,214,179, 41,189, 90, 95, 77,223, 87, 95, 21,150,238,217,211,234,242,226,197, 93,177, 96,129,164, 91,
-243,230,183,102,255,252,115,154, 41,154, 11,165,210,182,125,127,252,209,185,241,248,241,202,235,179,102,149, 23, 93,189,170, 9,
- 24, 58,180,160,213,180,105,122, 72, 36, 80,167,165,201,226,230,205,179,176,105,211,198,172,221,135, 31,218, 10,122,189,203, 60,
- 66,218,212, 22, 33,154, 47,149,182,233,179, 98,133, 83,211, 73,147,148,183, 23, 46, 44,207, 56,117, 74, 87, 18, 18,130,102, 47,
-191,156,239,225,224,160,123,218,188, 87,213,204, 59,125,250,153,203,147, 81,205,101,160,166, 32, 73,163, 70,141,178, 99, 98, 98,
-156,119,239,222,109,146,193,114,119,119, 71,167, 78,157,114,238,222,189,235, 82,203, 5, 49, 53, 53, 53,213,147,231,121, 40, 20,
-138, 90, 19, 86, 90, 90,138, 59,119,238, 96,212,168, 81,105, 25, 25, 25, 53, 94,116,237,237,237,173,236,236,236,226, 79,159, 62,
-237, 24, 29, 29,141,235,215,175,195,223,223, 31,118,118,118,144,201,100, 48, 26,141, 40, 45, 45, 69, 96, 96, 32,204,205,205,209,
-175, 95,191,188,130,130, 2,255,130,130,130, 26, 47, 98, 13, 26, 52, 80,202,100,178,135,187,119,239,246, 10, 15, 15,199,213,171,
- 87,225,229,229, 5, 87, 87, 87, 0, 64, 98, 98, 34, 46, 92,184,128,190,125,251, 34, 50, 50, 18,147, 38, 77, 74, 53, 26,141, 13,
-147,146,146,116, 53, 54, 23,132,134,102,238,220,185, 51, 45, 56, 56, 88, 91, 94, 94,206,101,103,103,203,206,158, 61,203,151,149,
-149, 89, 22, 21, 21,201,138,139,139,165,197,197,197,178,242,242,114, 25,199,113,114,157, 78, 39,187,124,249,178, 36, 63, 63,223,
-186,182,114, 10, 14, 14,206,190,127,255,190,243,239,191,255,142,198,141, 27, 99,247,238,221,248,232,163,143,112,225,194, 5,120,
-122,122, 98,215,174, 93,248,232,163,143,112,255,254,125, 56, 57, 57,161,123,247,238,181, 30, 35, 0, 8, 12, 12,140,189,115,231,
- 78,128, 66,161, 64, 92, 92, 28,210,210,210,208,185,115,103,136,162,136,172,172, 44, 60,124,248, 16, 25, 25, 25, 8, 8, 8,192,
-107,175,189, 22,151,150,150, 22, 88, 87, 69,107,209,162, 69,238,201,147, 39, 29,155, 52,105,130,172,172, 44,216,218,218, 62,126,
-217,216,216,192,214,214, 22,126,126,126,152, 62,125, 58,154, 54,109,154,147,148,148,228, 82,151,249, 9, 15, 15, 63,122,234,212,
- 41, 71,123,123,123,104,181, 90,104,181,218,199, 15, 7,230,230,230,144,201,100, 0,128,135, 15, 31, 98,192,128, 1,185,241,241,
-241,125, 76, 53, 71,132, 16,206,197,197,229,254,237,219,183, 27, 90, 89, 89, 33, 53, 53, 21,145,145,145,120,243,205, 55, 31,150,
-151,151, 7,255, 21,253,134,254, 78, 66,253,201,231,209, 81,247, 26,133,134,134, 20,191,254,198, 68,217,224,129,131,203,111, 94,
- 57,102,148,233,206,148,189,212,201, 38, 3, 0, 78, 94, 46,117,214,201, 58,201, 91,182,238, 77,246,239,223,175,218,184,225, 23,
-105, 84,212, 61,215,208,176,144,152,232,120,186,176, 38,237, 1,221,108, 95,255,104, 74,159,144,206, 29, 58, 75, 75,202,169,235,
-218,117,191,182, 78, 78,138,119, 1, 0,159, 6,254,217,111,190,241,246, 85,107, 11,146,117,246,194, 89,126,233, 15, 71,238, 29,
- 60, 93,180,201,132,232,178,191,151,151,215,165,245,235,215, 59, 58, 58, 58,194,198,198, 6,106,181, 26, 6,131, 1,209,209,209,
-218,237,219,183, 27,173,173,173,173,178,178,178, 80, 88, 88, 8,169, 84,138,203,151, 47,167,100,101,101,249, 84,119,172, 43,223,
-239,220, 57, 87,218,165,165,183,157,156,163,102, 10, 33,198, 93, 42,161, 10, 2, 91,151,147, 17,151,155,158,137, 56, 59,186,223,
-192,145, 78,237, 58,116,195,215, 11,103, 24, 19, 83, 83,155,173,221,135,251,213,213,133, 16, 63,210,125,200,176,161, 35,230,127,
- 49, 23,115,231,207,195,193, 3,251,138, 45,205, 56,157,181,149,204,166,115,199, 14,218,233, 83, 95, 73, 85,151, 22,121,125,187,
-124,233,171,189,250, 12,245,108,219,190, 43, 46, 95, 60,131,157,219,214, 92,151, 43,141,172,185,176, 10,243, 8,177,179,245,247,
-159, 56,229,225, 67,249,221,185,115,203,248,140,140,194,150,211,166,229, 85,183,109,218,241,227, 22, 10,119,119,107,135, 65,131,
-236,150,251,248,192,152,147,243, 75,117,125,136,170,211,188,234,230,102,187,247,244,233, 30,162, 84,218,229,221, 41, 83,204,122,
-246,236,137,146,146, 18, 28, 60,120, 16, 91,183,108,209,185,186,186,222,177,189,122,245,150,127,102,230,231,213,105, 46, 34,196,
-222, 42, 40,104,194,187,247,238,201,111,126,254,121, 25, 10, 10, 10,154, 79,157,154, 47, 8, 2,153,176,112, 97,191,248,204,204,
- 46,217,121,121, 62, 0,224,108,107,155, 26,236,230,118,243,187, 77,155,162,127,104,212,136,150,101,100,252, 50,135,210,194,186,
-210,185,253,194, 5,151,195,185,185,111,217,217,217,153,229,229,231, 75,228, 50, 89, 65,139,134, 13,183,127, 61,117,106,132,230,
-250,117,197,211,230,189,229,180,105,121,197,106,181,244,179,239,190,235,144,145,159,223,160, 92,175, 15, 44, 46, 43,115,229, 13,
- 6,206,202,204, 44,191, 65, 64, 64,118,201,169, 83, 89, 62,101,101,239,175, 40, 47,207, 97,181,242, 25, 35, 88,132, 16, 80, 74,
- 77, 50, 87, 50,153,236, 79,205, 80,181, 32,151, 72, 36,184,122,245, 42,114,114,114,208,184,113, 99,248,250,250,254,105,131,248,
-248,120, 28, 58,116, 8,133,133,133,104,209,162, 5, 0,200,107, 19,180,178,178,250, 96,214,172, 89,182,122,189, 30, 55,111,222,
- 68,139, 22, 45,160, 82,169, 32,147,201, 32,151,203, 33,149, 74,225,234,234,138,188,188, 60,184,184,184, 96,242,228,201, 54,223,
-125,247,221, 7,168, 97,153,154,138,230,208, 41,163, 70,141,114, 14, 15,127, 52, 69, 71,106,106,106,101, 90, 0, 0,206,206,206,
-184,117,235, 22, 90,180,104, 1, 23, 23, 23,244,237,219,215,121,255,254,253, 83, 0, 44,173, 49,227,114, 57, 23, 28, 28,220,170,
- 34, 66, 4,142,227, 30, 88, 91, 91, 59,185,184,184, 88, 88, 91, 91,255, 71, 30,215,175, 95, 95,164, 80, 40,140,166, 20,106, 86,
- 86, 22,194,195,195, 81, 84,244,232, 92, 42, 47, 47, 71, 96, 96, 32,138,139,139, 1, 0, 58,157, 14,238,238,238,143, 13, 72, 77,
- 52,109,218,116,110,112,112,240, 75, 93,187,118, 85, 74,165, 82,220,190,125, 27,205,155, 55,199,246,237,219,225,227,227, 3,115,
-115,115,196,196,196,160, 73,147, 38,136,136,136,128,147,147, 19,194,194,194,148, 45, 90,180, 56, 87, 80, 80,112, 58, 41, 41,105,
-110, 45,145, 54,206,210,210, 18, 17, 17, 17, 88,183,110, 29, 18, 18, 18,144,145,145, 1,107,107,107, 52,107,214, 12, 33, 33, 33,
-232,208,161, 3, 98, 99, 99, 65,234,168, 76,132, 16,215,134, 13, 27, 30,188,122,245,170, 35,199,113,136,136,136,128, 90,173,134,
- 86,171, 69, 69, 95, 41,168, 84, 42,180,107,215, 14, 14, 14, 14,104,216,176, 33,246,238,221,235,212,171, 87,175, 67, 21, 17,168,
-172,186,202,212,206,206,238,253, 47,190,248,194,203,197,197, 5,165,165,165, 80,171,213,112,119,119, 71,175, 94,189, 60, 14, 29,
- 58,244, 62,128,229, 47,212,147,150,136,148,208,176, 16, 80,138,228, 3,123, 55, 83, 79, 39, 85,120,215, 22,162,243,131,104,105,
-187,203,151, 35,195, 0,192,206,194,247,118,195, 16,195,131,136,107,199,211, 14,254,190,245,182, 32,128, 11, 9, 13,105,196, 81,
-164,215,166,157,151,198,237, 63,122, 42,169,103,147, 38,157, 36,223,125, 59,103,240,132, 55,122, 43,237,237, 58,145,146,180, 29,
-184,112,227,174,207,236,217, 51,157, 23, 44, 88,124,224,232,169, 36, 33, 47,141,251,210,148,244, 6, 52,176,255,126,247, 50,153,
- 99,105,233, 22,220,142,181, 4, 49,107, 2, 95,191, 0,148,148,148, 64,169, 84,170, 94,125,245, 85, 97,214,172, 89,106, 43, 43,
- 43,243,138,186,156,195,113, 92,239, 58,133,239,223, 3,223, 56,144,151, 89,233, 69,145, 90,106,160, 45,150,223,141,141, 71,167,
-110,125,179, 91,183,104,182,112,241,210,229,159,251, 7, 54,114,122,245,245,137,178,101, 95,127,254, 51, 64, 59, 85, 39,115, 47,
-129,158, 10,245, 37,102, 0,250,207,255, 98, 46,226,227, 31,218, 77, 24, 86, 52, 79, 42, 49,115, 15,110,220,197,234,231,245,199,
-251, 4, 6, 53,106, 48, 97,242,251,127,172, 94,181,178,127,213, 72,214,182, 45,171,247, 19, 66,122,208,191,114, 14,157,127, 22,
- 77,198, 28, 60, 8,117, 74,138,177,224,220, 57,109,143, 31,126,200,107,241,250,235,203, 13, 70,163, 35, 33,228, 79, 93, 33, 8,
- 33,128, 40, 18,233,210,165, 28,117,119,135,209,214,118,220, 76, 32,168, 46,205,197, 70,227,176, 33,205,154,245, 95,187,121, 51,
-124,124,124, 30,107,218,216,216, 96,202,148, 41,152, 60,121,178,242,206,157, 59,109, 14, 29, 58,212,102,211,143, 63,186,204, 4,
-134, 61, 41,104, 0, 26,191,250,251,239, 40, 75, 76, 52, 20, 92,189,170,237,190,114,101,254,153,107,215,236,103,254,248,227,236,
-198,205,155,123,252, 52,119,174,210,219,251,209,248,144,148,148,148,192,149, 43, 86,120,119,235,213,171,195,140, 15, 63, 92,127,
-107,250,244, 80, 60, 90,146,173,198,116,102,157, 61,171, 63, 92, 80,240,214,206, 93,187,108, 27, 53,106, 4, 74, 41, 98, 99, 99,
-157,215,173, 91, 55,177,203,228,201, 99, 62, 28, 53,106,118,175,132,132, 66, 33, 63, 95, 49,224,251,239,101,219, 70,140, 8,171,
- 75,179,178, 60, 1,224,229,143, 62,250,160,117,251,246,161,125, 95,125,213,222,221,221,157,152,153,153,193, 96, 48, 32, 43, 43,
-203, 46, 38, 38, 38,224,100,113,113,201,177, 91,183,126, 67,197, 34,238,140,103, 48, 88, 0, 32, 8, 66,189, 12,150,137, 38,235,
-113,196, 43, 47, 47, 15,145,145,145,240,241,241,129,209,104,196,209,163, 71, 81, 84, 84, 4,185, 92, 14,185, 92, 14,189, 94,111,
- 82,115, 86,231,206,157,165, 23, 47, 94,132,175,175, 47,204,204,204, 30, 27,171, 74,147, 37,147,201,224,234,234,138,226,226, 98,
-116,236,216, 81,182,110,221,186,158,181, 25, 44, 75, 75,203,126,131, 6, 13,122, 28, 98, 43, 47, 47,135, 68,242,104,164,181, 94,
-175, 71,105,105, 41,242,243,243, 81, 92, 92, 12,173, 86,139,166, 77,155, 42, 78,157, 58,213,175, 54,131, 85, 21,181, 90, 93,150,
-147,147, 99,219,169, 83, 39,187, 13, 27, 54,196,180,107,215,238, 79,157,134,207,156, 57,163,213,233,116, 82,133, 66, 97, 82,103,
-247,205,155, 55, 63, 46,251,140,140, 12,252,242,203, 47, 16, 69, 17,132, 16, 60,124,248, 16,223,125,247,221,227,190,114,181, 29,
-163,224,224,224,190,191,253,246, 91,203, 77,155, 54, 21, 74,165, 82,196,196,196, 96,203,150, 45,160,148,194,209,209, 17,106,181,
- 26, 57, 57, 57, 88,190,124, 57, 12, 6, 3, 44, 45, 45,225,225,225,161,154, 50,101, 74,199,121,243,230,201, 0,204,173,165, 46,
- 9, 18,137, 4,222,222,222,248,226,139, 47,160,213,106, 33,151, 63,242,149, 37, 37, 37, 40, 42, 42,194,205,155, 55,145,152,152,
- 8, 81, 20,107,189,177,168, 84,170,225, 27, 55,110,116, 86, 40, 20,208,106,181,120,248,240, 33,226,226,226, 16, 19, 19,163, 43,
- 40, 40,224, 45, 45, 45,137,155,155,155,164,184,184, 88,241,250,235,175,147,210,210, 82, 80, 74, 49,116,232, 80,135,181,107,215,
-190, 2, 96, 69, 29, 6,206, 41, 36, 36,228,211, 9, 19, 38,168, 42,203, 77, 20, 69,228,230,230, 98,196,136, 17,230,167, 79,159,
-158, 69, 8,217, 66, 41,205,125, 81, 46, 4, 85, 71, 11,150,197,174,118, 56,118,236,167, 6, 15,162,165,237, 36,200,111,211,188,
-203,251, 82, 0,184,127,125,125,135,216,123, 87, 5, 75,145,196,255,177,101,233, 37,203,192, 9,249, 0,246,215, 22, 5,236,215,
-209,182,143,119,128, 98,232,144, 65, 61,185,181,235,126,109, 61,225,141,222, 74,231,166,191, 18, 0,176, 83,122,162,189,241, 67,
- 78,171, 47, 87,173, 93,247,107,235, 33,131,250, 93, 73, 76, 74, 94,222,191,147,221,222, 67,231,139,142,212, 22, 37,116,115,148,
-122,216,153,229,193,206,171, 39,124, 66,236,112,243,230, 77,236,223,115, 17,129,141, 90, 65,175,215,195,104, 52, 90, 12, 24, 48,
- 64,189,107,215, 46,109,126,126,126,169,193, 96,232,146,145,145,241,160, 78,127,133, 60,177, 41, 39, 26, 20,130,140,215,148, 43,
-202,167,206,222,243, 74,235,246,125, 91,216,123,123,200, 28, 84,252,129,174, 93, 58,111,222,186,233,151,233, 31,206, 88,128,166,
-205,219,181,159, 42,191, 22, 6,224,110,117, 90,209,137,244, 96,184, 63,225,227, 31,196,246, 79, 78, 77, 74, 11,242,114,213,199,
-165, 80,227,251,179,126,238,213,169,231,240, 38, 1,141,218, 42,162,238, 95, 36,211,167, 77,223,250,237,183, 75, 94,173, 52, 89,
-103, 35,142,118,153, 59, 46, 73, 1, 64,199,110, 81,128, 92,169,244,180,244,241,145, 38,110,216,160,241, 31, 56,176, 16, 0,140,
- 60,239,120,249,202, 21, 27,115,115,115, 80, 74, 97, 52, 26,255,212, 71,184,178, 95,112,207,174, 93, 93, 76,209, 76,253,233,167,
- 38,239,190,251, 46,178,178,178,192,243,252,227,232,119,149,107, 54, 74, 74, 74, 48,108,216, 48,172, 95,181,170,218,118,113,153,
- 82,233,101,233,229, 37, 77,220,176, 65, 19,208,191,127, 1, 4,129,204,248,241,199, 47, 62,252,248, 99,223, 17,175,188,242,167,
-231,198,144,144, 16,252,180,106,149, 98,203,150, 45, 30,139, 87,173,122,163,175, 82, 25, 95, 87, 58, 75,195,194, 96, 23, 25,105,
-214,168, 81,163,199,134,178, 97,195,134,248,250,235,175,149,163, 71,143, 86,140, 29, 51,102, 89, 84,163, 70, 43,231, 38, 38,198,
- 58, 4, 5, 89, 75,149, 74, 79, 83,203, 19, 0,202,244,250,240,185, 11, 22,216, 93,185,114, 5, 25, 25, 25,168,244,247,132, 16,
- 52,105,210,132,188,242,202, 43, 54,109, 91,182,108,205,106,228,115,138, 96, 85,103,176,106, 50, 90,228, 41,166,138, 33,132,192,
-205,205, 13, 6,131, 1,191,254,250,235, 99, 99,245,248,137,192, 96,168, 83, 67,171,213, 54,118,117,117, 69, 73, 73, 9,130,130,
-130, 30,107, 84,166,171,242,165, 82,169,160,213,106,225,225,225, 1,173, 86,219,184, 14, 3,212,204,198,198,166, 50,154, 5,157,
- 78,247,216, 92, 21, 21, 21,161,168,168, 8,122,189, 30,133,133,133, 40, 43, 43, 67, 81, 81, 17, 74, 75, 75,155,155,146,103, 81,
- 20, 17, 25, 25, 25,215,168, 81,163,102, 18,137, 4,150,150,150, 22,229,229,229,168, 28, 76, 80, 80, 80,128,141, 27, 55,150,191,
-254,250,235,142,151, 47, 95,214,152, 82,134, 83,167, 78,133, 82,169,132, 90,173,198,170, 85,171, 48,117,234, 84,200,229,114,148,
-150,150, 98,213,170, 85,152, 62,125, 58,164, 82, 41,116, 58, 29,182,111,223, 94,163, 86,116,116,116,226,229,203,151,155,183,104,
-209,194,110,239,222,189,185, 61,123,246,116,234,221,187,247,227,178,227,121, 30,109,218,180, 65,112,112, 48,114,114,114,112,248,
-240,225,188,134, 13, 27, 58, 94,185,114, 69,204,202,202, 74,174, 35,223,143, 77,147, 68, 34,129, 32, 8,200,206,206, 70, 81, 81,
- 17,114,115,115,145,145,145,129,180,180, 52, 72,165,117,207, 28,226,224,224,240,114,120,120,184,164,194,108,193,207,207, 15, 31,
-126,248, 33,175,209,104, 70, 0, 56, 92,177, 89,223,173, 91,183,238, 13, 12, 12,148,186,187,187,227,225,195,135,112,114,114,146,
-154,153,153,141,172,203, 96,185,186,186,174, 63,112,224,128,125,229, 8,218, 74, 52, 26, 13,120,158,199,168, 81,163,236,215,174,
- 93,187, 30, 64,191, 23,241,162, 96,105,107, 43,125,169,147, 77,198,229,203,145, 97,205,187,188, 47,181, 15,154,243,200,128, 3,
-210,155,103, 87, 54,239,212, 38,124, 75,101,191,172,218, 24,210,195,105,233,192,190, 77,185,209,195, 90,198, 75, 45, 26, 5,108,
-222,184,210,197,222,174,211,255, 95, 40,164,246,176, 80, 1,193, 62, 2,119,233, 96,188,203,244,233,141,244, 91,126,126, 43,126,
-243,158,235, 61,229,138,219,221, 1, 76,175,209, 16,198, 27,127, 47,214,218,135,216, 20,239, 33,112,120, 27,205,155, 55,135,147,
-147, 59,126, 90,253, 27, 60, 26,180,128, 94,175,135,181,181,181,249,163,203,136, 97,179, 41,230, 10, 0,230,206,141, 16, 59,119,
-238, 98,144, 58, 57,242, 83,166,124, 59,172,119,223, 97, 33, 93,186,246,160,199,143, 31, 49,180, 15, 49,100,244,232,210, 54,235,
- 76, 68,196,195,172,172,244,134,193, 33, 77, 16, 19,117,189, 55, 64, 34,129,234,163, 77,145,241,244, 72, 64, 0, 57,189,253,227,
- 9,162, 70,127,211,108,225,143,119,251,246, 31, 60, 54,188,115,199, 78,226,241, 19,199,244, 10, 20,221,179,236,216, 62,125,236,
-152,145,123,183,239,216,253,210,233, 19, 7, 3,139,139,178, 15, 46,217, 68,153,185,170,124, 56,227,121, 23,169, 82,201,101,159,
- 62,205, 55,125,243,205,199,229, 98,110,110,142,253,251,247, 67,161, 80, 64, 46,151, 67,161, 80, 60,126,201,229,114,184,186,186,
-130, 80,202,213, 71, 51, 51, 51, 19, 89, 89, 89,176,177,177,129,147,147, 19,178,178,178,112,225,194, 5, 60,124,248, 16, 82,169,
- 20,125,251,246, 5, 87,195,125,243, 9, 77,253, 91,243,231,247, 9,107,210,196,253, 73,115, 85,121,111, 43, 40, 40, 64,151, 46,
- 93,200,241,227,199,157,206,198,199, 15,254,172,154,206,238, 85, 53, 27, 15, 26,148,159,115,242,100,181,191, 29, 26, 26, 74,246,
-238,223,175,124,117,212,168,105, 95,175, 94,189, 98,246,178,101, 89,224,121,215,250,228,157, 16,194, 17, 66,224,229,229,133,130,
-130, 2,148,149,149, 85, 6, 28, 96,103,103, 7,163,209, 8, 81, 20,101,172, 70,154, 14, 87,151, 25,120,210, 72,213,244,226, 56,
-238,169, 76, 86,109,152, 98,176, 42, 77,134, 82,169,252,211,201, 85,249,170,122,242, 85,154, 24, 19,144,148,148,148, 96,207,158,
- 61, 40, 40, 40, 64,105,105,233,159,204, 85,101,228, 42, 33, 33, 1, 91,183,110, 69,122,122, 58, 36, 18,137, 73,147,182, 38, 36,
- 36, 92,247,245,245,109, 86, 25, 17,235,214,173,155,231,185,115,231, 50, 42,205,220,231,159,127,158,215,182,109, 91,199, 39,111,
-238,181, 38, 86, 34,193,133, 11, 23,160, 86,171, 65, 41,133, 92, 46, 71, 76, 76, 12,120,158, 7,165, 20, 82,169, 20,185,185,185,
-117, 70,176, 34, 35, 35,199,191,241,198, 27, 43,222,124,243,205,211, 51,102,204, 56,222,189,123,247, 84, 66, 8,140, 70, 35,172,
-173,173,225,234,234,138, 7, 15, 30, 64,163,209,224,131, 15, 62, 72,217,180,105,211,137, 85,171, 86,157, 94,179,102,205,138,180,
-180,180, 55,234,115,108,121,158, 71,121,121, 57, 10, 11, 11, 81, 80, 80,128,146,146, 18,104,181,218,167,170, 67, 61,122,244,192,
-193,131, 7, 37, 61,122,244, 88,235,227,227,147,229,227,227,147,213,163, 71,143,181,191,255,254,187,196,195,195, 3,169,169,169,
-184,121,243, 38, 10, 10, 10, 32,138, 98,173, 63, 32,147,201,186,141, 25, 51,166,163,183,183, 55, 49, 24, 12,208,233,116,208,235,
-245, 48, 24, 12, 16, 4, 1, 41, 41, 41, 8, 13, 13,229,188,189,189,219, 17, 66,186,177, 75, 72,253, 40, 73,219, 1,154,243, 3,
-104,193, 54,136, 57, 63,162, 92,251,116, 58,133,133,133, 95,190,243, 85,113,142, 80,124, 26,209, 55,246,160, 84, 35,133,103, 96,
- 55, 76,124,115, 20,174, 93, 57,141,252,252,124,220,187,119, 15,157, 59,119,150, 19, 66,234, 85, 55,183,109, 59, 40,188, 58,234,
-147, 87,122,244, 30,214,178, 71,207,126,194,241,227, 39,117, 87, 47, 29,185, 30,232,107,157, 67,249,162,108, 27,107,243, 27,177,
- 15,238,161, 97,163, 80, 24,121,177, 51, 48,183,214, 58, 21, 23, 71,245,127,100,185, 9,175, 76,141, 28,211,123,224,184,166, 61,
-122,246, 54, 30, 61,114, 64, 56,119,108,215,205,222,221, 26, 68, 44, 90,178,197,171,192, 24, 20,166,178,118, 61,212,174,153,121,
-167, 73, 67,188, 39,176,154, 82, 77,228, 69,165, 18, 81,113,221, 36,132, 64, 20,197, 63,153,170, 39, 95,166,220,147,170,106, 86,
- 66, 41, 69, 81, 81, 17, 30, 62,124,136, 37, 75,150,224,214,173, 91, 16, 4,225,113, 36,171,198,251, 16, 64, 31,107, 2,136,207,
-204,236,242,238,187,239, 42,171, 51, 87,249,249,249,200,203,203, 67,122,122, 58,250,246,237, 43, 47,177,183,111, 86, 87, 58, 61,
-156,157,117,230, 42, 85,246,131, 7, 15,254, 35,189,165,165,165, 80, 42,149,248,225,199, 31,229, 7, 35, 35,167,158,187,112,193,
-182, 62,229, 89,169, 67, 8,129,179,179, 51, 2, 2, 2,208,188,121,115, 52,110,220, 24, 42,149, 10, 81, 81, 81,248,229,151, 95,
- 32, 33,132,103, 53,241, 57, 68,176,106, 50, 88,213,189,151, 74,165,168,143, 33, 48, 21, 83,154, 8, 85, 42,213,221,236,236,236,
- 14,158,158,158, 48, 26,141,143,163, 87,149,205,132,149,159, 1, 64,169, 84,226,222,189,123, 80,169, 84,119,107,211, 52, 55, 55,
-191, 43,145, 72,218,181,106,213, 10,123,247,238,197,233,211,167,145,144,144, 0,141, 70, 3,173, 86, 11,141, 70,131,168,168, 40,
-136,162,136,240,240,112,216,216,216,192,220,220,252,110, 93,105, 45, 47, 47,207,148, 74,165,141,204,204,204,254,191,169,195,205,
- 13,121,121,121,162,209,104,196,198,141, 27, 75, 92, 93, 93, 45,204,204,204, 76, 46, 79, 66, 8,114,114,114,224,229,229,133,146,
-146, 71,211,124,149,150,150,194,217,217, 25, 6,131, 1,162, 40, 66,167,211,193,210,210, 18,117,117,233,160,148,106, 1,124, 88,
- 69,187,213,136, 17, 35,182,110,223,190,221,239,196,137, 19,184,114,229, 10, 28, 29, 29,241,213, 87, 95, 37, 36, 37, 37,189, 74,
- 41,189,246,119, 84,218,252,252,252,221,145,145,145,237, 90,181,106,245,248,234,208,181,107, 87,210,181,107, 87,199,170, 33,253,
-252,252,124,220,190,125, 27, 17, 17, 17, 48, 26,141,184,119,239,158,160,209,104,182,213, 82,150,114, 31, 31,159, 13,179,103,207,
-182,228,121, 30, 18,137, 4, 50,153, 12, 60,207, 67,169, 84, 62,142,212,166,164,164, 96,232,208,161, 54, 43, 87,174, 92, 79, 8,
- 9,160,148, 26, 94,164,139, 66, 89, 81, 17,127,242,114,169,179,157,133,239,237,251,215,215,119, 8,174,184, 78,220,191,190,142,
- 87, 89,120, 93,185,114, 91, 99,213, 70, 85,196, 91, 58,214,174,179,239,100,238, 71, 6,253,181, 62, 71, 78,220, 29,250,225, 7,
-111, 43,124, 26,248,103, 95,184,113,215,167,189,241, 67,206, 66, 5,148,107,129,130, 98,224,126,178, 68,244,105,224,159,125,237,
- 70,140, 98,217,138, 53,254,234,114,253,222, 67,231,139,142,212,166,157,150,150,166,245,240,240, 24,242,225,183,230, 17,163, 70,
- 75, 20, 10,149, 61, 74, 11, 98,225,227,227,129, 87,134,116,192, 15,191, 30,131,141,173, 29, 92, 92, 92, 64, 8,177,168, 71,246,
-201,165,147, 55,223,124,253,141,137,109,123,189,212, 79, 56,122,236, 16, 78, 30,221,115,101,195,138, 89,123, 12,210, 82, 11, 78,
- 40, 51,243,242,116,189,147,152,240,224,181,206, 93, 95,130,202,204, 60, 0, 8,174,246, 46, 30,234, 75, 94, 7, 7,111,136, 72,
-225, 56,168, 94,127, 99, 66,251,222,125, 7,241, 71, 15,239,195,209, 3,155, 46,207,153,218,224, 80,194,237, 45,242, 75, 87,211,
- 84, 67,134, 79, 46, 60,120,242,158,254,229,249,190, 15,220, 27, 54,211,176, 91, 83,149, 7, 72,169, 52,155,215,233,188, 60,123,
-247,150,168,147,147,101,150, 46, 46,124,229, 67, 90,213,135,234, 39, 35, 88, 28,199, 1, 28, 39,154,162,105,106, 90, 52, 26, 13,
- 68,160, 90,147, 65, 42, 53,251,246,149,168,211,210,100, 57,249,249, 13, 26, 52,104,240,167,109,140, 70, 35,242,243,243, 31,191,
-138,138,138,160, 82,169, 80, 96, 52,186,152,146,206,206, 77,154,108,252,118,217,178,143, 86,255,250,235,227,166,158,210,210, 82,
-148,148,148,160,184,184, 24, 28,199,225,147, 25, 51,148, 51,230,207,127,119,128, 84, 58,173, 62,229, 89,249,176,206,113, 28,164,
- 82, 41,146,147,147, 31,191, 82, 82, 82,160, 82,169, 64, 9, 17, 89,141,124, 14, 6,171,178,147,123, 93,230,170,242,189, 68, 34,
- 49, 45,220, 91,241, 36,240,188, 34, 88,229,229,229, 39,206,159, 63,223,166,119,239,222,210, 75,151, 46,193,205,205,237, 63,154,
- 9,165, 82, 41, 8, 33, 48, 55, 55,199,225,195,135, 13,229,229,229, 39,234, 56,137, 78,158, 60,121,178,229,244,233,211,101,227,
-198,141, 67, 84, 84, 20, 38, 77,154,132,194,194, 66,148,148,148, 32, 63, 63, 31, 26,141, 6,109,218,180,129, 74,165, 66,108,108,
-172, 81,163,209,212, 53, 85, 1,205,201,201, 41,115,114,114,114,123,242, 31,195,135, 15,119,249,233,167,159,212,247,239,223, 55,
-118,232,208,193, 26, 64,189, 12,235,214,173, 91, 31, 31,179,152,152, 24,172, 90,181,234,113, 63,132, 27, 55,110, 96,233,210,165,
- 16, 4, 1,245,237, 51, 75, 41,189, 22, 22, 22,198, 27, 12, 6, 4, 6, 6,194,195,195, 3, 26,141, 6, 43, 87,174,228,255, 42,
-115,101, 74, 4, 75,171,213,238, 26, 59,118,236,140, 91,183,110,185,201,229,242,202,208, 53, 68, 81,132,193, 96, 64, 82, 82, 18,
-238,221,187,135,216,216, 88,228,229,229,129, 82, 10,189, 94,143, 27, 55,110, 20, 25,141,198, 29, 53,233, 58, 57, 57,125,190,118,
-237, 90, 87, 51, 51,179,255,152, 88,183,242,162, 83,217,244,234,236,236,140,174, 93,187, 58,159, 58,117,234,115, 0, 95,252,211,
- 47, 4,149, 51,180, 83, 17,177,246,246, 22,226,228, 73,111,202, 27,134, 24, 30,196,222,187, 42,220, 60,187,178, 57, 0,168, 44,
-188,174, 52,108,212, 34,250, 92,164,165,216,255,245, 79,154,229,231, 79,148, 16,138, 70,132, 34,239,201, 25,223, 43,234,143, 8,
-224, 80,155, 0,251,243,251,126, 63,241,227,204, 15,223,190, 58,123,246, 76,103,173,190, 92, 21,236, 35,112,192, 35,115,117, 41,
-202, 66,187, 96,193,219, 87, 23, 47,219, 40,166,196, 25,166, 93,137, 43,172,113,132,111, 85,211, 98,167,132,202,213,127, 90,134,
-111,195,238, 13,238, 92,254,133, 56, 90, 75, 96, 21, 50, 0,125,251,188,132,227, 39,207, 35, 57, 83,131,156,156, 28, 0,168,117,
-218,131, 16, 31,140,169,212, 36, 28, 84, 99,198, 79,232,220,183,239, 32,122,232,143,223,249,125, 59, 55,157,223,186,109,233, 14,
- 78, 46,151, 26, 68,107, 61,145,104,139, 4,137,109, 84,121,113,193,163,136,167, 84,110, 93, 75,251,128,119,116,212,253, 70,161,
-161,193,174, 99,198, 79,180,233,215,119, 48, 61,116,104,159,184, 99,243,198,211, 59,190,107,188, 89, 52,150,200, 51,147,212,202,
-226, 82, 99, 49,149, 40,108,203, 74, 69,117,182, 54, 64,235,126,121,184, 1,195,217,205,233,241,125, 64,167, 75, 43, 75, 77,117,
-179,239,210, 69, 25, 59,119,174,185, 75,155, 54, 90, 66, 72,157, 6, 75, 34,145,128,162,250,185,202,158,212,172,143,193,162,132,
- 84, 59,248, 72,208,233, 82,203,146,147,221, 28,187,116, 81,197,125,241,133,121,117, 81,251,252,252,124, 20, 20, 20,252,201, 96,
- 85, 92,107, 76, 74,231,146, 15, 62,184,220,106,220,184,130, 75,151, 46,185,180,107,215,142,148,148,148, 60, 54, 87,149,239,157,
-156,156,136,119,131, 6, 86, 39,210,211,253,231,153, 88,158,166,228,157,227,184, 26,203,147,241, 12, 17, 44, 83, 13,150, 9, 55,
- 71,163,209,104,132,179,179, 51,242,242,242, 32,138, 98,141, 7,210,204,204,172,178, 13,184,214,145,116,165,165,165, 43, 22, 44,
- 88, 48,165, 91,183,110,142,193,193,193,200,205,205,133,179,179, 51, 36, 18,201,227,116, 85,234, 69, 70, 70, 98,251,246,237, 37,
-165,165,165, 43,234,200,247,242,159,127,254,249,221,126,253,250,217, 59, 57, 57,193,206,206, 14,119,238,220,129,173,173, 45, 74,
- 75, 75, 17, 19, 19, 3, 43, 43, 43, 16, 66,160,211,233,112,246,236,217, 82, 81, 20,151,215,113, 98,210, 11, 23, 46, 24,204,205,
-205,239,228,231,231, 75,242,242,242, 36, 21,211, 51,200,138,139,139,101, 71,142, 28,113,180,177,177, 81,159, 58,117, 42,215,219,
-219, 91,146,152,152, 40,209,235,245,117,186, 44, 66, 8, 62,248,224, 3,200,229,114,232,116, 58,172, 88,177, 2, 31,126,248, 33,
-164, 82, 41,244,122, 61,190,249,230, 27,124,246,217,103,143, 13,243,129, 3, 7,234,107,178, 96, 52, 26, 97, 48, 24, 96, 48, 24,
- 96, 52, 26,255,210, 10,105,138,193,162,148,102, 17, 66, 6,180,106,213,234,216,190,125,251, 28,172,173,173,145,145,145,129,220,
-220, 92,100,103,103, 35, 39, 39, 7,165,165,165,208,233,116,176,181,181, 69,114,114, 50,142, 29, 59, 86, 82, 86, 86,246, 82,109,
- 35, 8, 37, 18,201,216,206,157, 59, 75,159, 76, 3,199,113,143,235,147, 76, 38,131, 66,161, 64,122,122, 58, 58,119,238,172,136,
-136,136, 24,251, 34, 24,172,202, 25,218,195,194, 66,156, 6, 12, 26,109,104,217,186,119, 89,196,181,227,105,150, 34,137,239,212,
- 38,124, 11, 0, 92,185,173,177, 58, 23,105, 41, 54,109,209,147,244, 31,160,105,182, 97,221,106, 69,116, 84,180,111,104,120,104,
-173, 51,250, 59,122,138,131,123,119,111,144,105,109, 65,164, 11, 22, 44, 62,176,118,221,175,173, 47, 29,252,255,105, 26, 22, 44,
-120, 52, 77, 67,239,238, 13,248,232,152, 7,131, 1,108, 50,213,180, 12, 24,208,251,230,218,245,219,145, 30,123,192,125,249, 71,
-102, 10,228,231, 0,230, 45,208,185,165, 3,174,175,185,135,219,183,111,103,137,162, 88,123, 83, 46, 7,239,200,200,232, 70, 97,
-225,161,174,175,143,159, 96,211,175,223, 96, 28, 58,180, 31,191,173, 95, 29,209,206,182,249,218,228,107,121, 18,143, 70,118,114,
-115, 91,133, 92, 42, 87, 73,229, 82,121,158,193,248, 40,186, 46,149,203,172,129, 17, 98, 69,235, 80,181, 76,154, 56,218,166,123,
-175,193,248,163, 66,115,118,179,225,107,124,165, 33,164,205, 71, 75, 38,251,250,248,250,148,171,179, 75, 56, 78, 97,208,234, 68,
-171, 37,107,146,190,141,143, 27, 27,127,115,196,136,101,108, 20,225, 99,238,252,214,175, 95,235,247,226,226,228, 78, 29, 59,154,
-101,156, 62,109,254,100, 19, 97,117, 6, 75, 42,149, 2, 28,199,155,162, 73,142, 31,231, 0, 64, 46,151,215,248, 96, 47,151,203,
-161, 86,171,193, 19, 82,237, 6,114,224,206,111, 3, 6,180,121, 47, 46, 78,102,223,173,155,185,211,173, 91, 41,137,137,137, 65,
-205,155, 55,135, 32, 8,127,138, 92, 85,190,180, 90, 45,244,122, 61, 84, 74,101,164, 41,233,204, 62,123, 86,251,217,248,241, 95,
-188,251,206, 59,223,109,223,177, 67,101,109,109,141,146,146, 18,148,150,150, 62,126,233,116, 58,180,108,213, 74,182, 41, 38,102,
- 12,128, 57,166,148,167, 75,183,110,234,186,174,201, 21,134,149, 53, 17,214, 3,174,174, 8,214,179, 76,211, 64, 8, 9,127,226,
-243,103,125,251,246,213, 38, 36, 36,192,203,203,235,177, 73,169,250,155,214,214,214,176,181,181, 69,116,116, 52,214,174, 93,171,
- 33,132,124, 86,155,102, 65, 65, 65,169, 86,171, 29, 57,106,212, 40,141, 76, 38, 67,163, 70,141, 30, 55,235, 80, 74, 31,247,189,
-138,140,140,196,216,177, 99,213, 90,173,118,228,147,115, 96, 61,169,153,148,148, 84, 92, 94, 94,254,218,232,209,163,213,247,239,
-223, 71,167, 78,157,112,235,214, 45,148,151,151,163,172,172, 12,137,137,137, 8, 13, 13,133,193, 96,192,174, 93,187,212,229,229,
-229,175, 37, 37, 37, 21,215,166, 89, 90, 90, 58,240,235,175,191,150, 28, 58,116,200,215,221,221, 61,172, 85,171, 86,193,221,187,
-119, 15, 24, 58,116,168, 79,191,126,253,220, 26, 54,108,168,237,221,187,183, 83,223,190,125,157, 36, 18,137, 44, 46, 46, 46,147,
- 82,218,183, 54,205,170, 6,224,193,131, 7, 48, 24, 12,255,209,231,170,114, 52,161, 32, 8, 38, 29,163,234, 76,118,165,177,170,
- 52, 90,117, 93,247,171,211,228, 56,174,206,155,133, 66,161,168,140,112,210,186, 52, 41,165,183,238,221,187,215,171,125,251,246,
- 55,199,142, 29, 91,154,146,146, 2,185, 92, 14, 15, 15, 15,248,248,248,192,194,194, 2, 5, 5, 5,216,181,107,151,250,240,225,
-195,145, 37, 37, 37, 93,159,156, 3,235, 73, 77,142,227, 18,171,187,184, 74, 36,146,255, 48, 88,149, 43, 5,112, 28,151, 88,159,
-242,124, 74,211,249, 95,211,156,248,246, 24,251,254, 3, 7, 91,237,223,191, 95,181,106,213,154,232, 78,157, 38,108,180,116,123,
-247,136,165,219,187, 71,218,180,123,107,203,247, 63,175,127,184,247,247,223,205,250,247, 31,106, 51,121,194, 24,119, 16, 34,173,
- 75,211, 92,169,108,211,185,109,195,162,179, 23,206,242,139,151,109, 20, 58,116,234,119,229,187,239,127,222,241,221,247, 63,239,
-232,208,169,223,149,197,203, 54, 10,103, 47,156,229, 59,183,109, 88,100,174, 84,182, 49, 37,157,147, 38,142,182,233,223,111, 48,
- 14, 30,220,203,111,221,184,226,155,253,103,244, 93,134,207,208,102, 39, 63, 60, 73,145,245, 37,156, 21,231,145,146,146, 82,204,
-243,124,183, 39, 59,184,215,164, 57,121,194,232,170,230,234,108,116, 34,126, 93,125,243,166,240,211,248,185,198, 45, 71,247,106,
- 14, 70,220, 44,137,184,158, 82,152,251,176, 56,190,188,180, 68, 47,138, 34,168, 40, 72,230,205, 3,169,237, 24,117,232,208, 21,
-167,142,111,193,198,117,191, 20,139, 34,180,195,119,238, 20, 70,252, 52,151,250,248, 52,240,217,188,121, 11, 25, 48,112,136, 13,
-165, 16, 7, 14, 25,108,187,117,243, 86,226,231,231,215,192,223, 31,242,127,122, 93,122, 94,154,115, 40, 45, 44, 73, 78,142,184,
-182,114,165,222,101,228, 72,123,133,139,139, 53, 68,145,212,213, 7,235,201, 8, 86,109,154, 46,246,246,233, 71,143, 30, 69,163,
- 70,141,224,225,225,241,167, 22, 25,153, 76, 6,111,111,111, 56, 57, 57,225,216,177, 99,160,192,245,234, 52,103, 82, 90, 84, 20,
- 31,127,230,202,146, 37, 58,151,225,195,237,154,249,249, 93,255,110,229, 74,189, 32, 8,143,163, 86, 85,255, 22, 22, 22, 66, 16,
- 4,156, 62,117, 74, 95,166,209,172,173, 45,157, 55,126,248, 65, 87,153,247, 54, 90,109,249,144,150, 45, 23,141, 25, 51,198,144,
-152,152, 8, 65, 16, 80, 53,146,149,147,147, 3, 43, 43, 43,104,180, 90, 79, 23, 23, 23,115, 83, 52,115, 14, 29,178, 68, 29,215,
-117,137, 68,242,167, 38,194,191,226,184,255,171, 34, 88, 60,207,195,203,203,235, 79,243,140, 84,118, 28,172,140, 12,153, 24,185,
- 2, 0,164,167,167,111,114,113,113, 57, 58,102,204,152, 47,154, 53,107, 54,105,218,180,105, 18, 63, 63, 63, 20, 23, 23,195,206,
-206, 14, 78, 78, 78, 72, 74, 74,194,238,221,187,133,162,162,162,159, 5, 65,152,159,157,157,157,107,130,238,105, 15, 15,143, 1,
- 47,189,244,210,246,119,223,125,215,166, 75,151, 46,178,202, 27,224,221,187,119,113,232,208, 33,195,182,109,219, 74,180, 90,237,
- 72, 83,102,113, 7,128,204,204,204, 99,110,110,110, 47,143, 27, 55,110,243,208,161, 67,173,180, 90,173, 44, 33, 33, 1,122,189,
- 30, 60,207,163,160,160,192,112,230,204,153, 50,181, 90, 61, 58, 51, 51,243,152, 9,122, 55, 8, 33,161, 6,131, 97,236,205,155,
- 55,191,124,249,229,151, 29,218,183,111, 47,231,121, 30,231,207,159,207,109,222,188,185,115, 73, 73,137,225,194,133, 11,249, 90,
-173,246,179,140,140,140,141, 38,174, 81,133,146,146, 18, 56, 58, 58, 66,171,213, 66, 20, 69,232,245,122, 88, 89, 89, 61, 94,222,
-136, 82,250,232,228,120,138, 7, 98,158,231, 37, 70,163, 17,163, 70,141,130, 40,138, 88,177, 98, 5,120,158,151,212, 87,199,210,
-210,242,122, 84, 84,212,128,176,176,176,199,233,225, 56, 14, 28,199, 65,169, 84,194,209,209, 17, 14, 14, 14, 56,113,226, 4, 56,
-142,187,110, 98,116,237, 54,128, 22,132,144,246,183,111,223,126, 29, 64, 83,131,193,224, 41, 8, 2,225, 56, 46, 83, 16,132, 59,
-101,101,101,107, 77, 93, 42, 39, 39, 39,231,203,177, 99,199, 54,223,186,117,171,165, 84, 42,125, 92, 94, 28,199, 65, 46,151,195,
-209,209, 17, 42,149, 10, 1, 1, 1,208,104, 52,248,252,243,207, 75,212,106,245,151, 47,210, 5,161, 83,135,206, 56,117,100,139,
-249,198, 13,191,149, 10, 2,184,138,169, 24, 30, 29, 67, 71, 32, 63,127,162,100,195,186,213, 10,149, 84,107,215,169, 67,103,147,
-154, 86,244, 6, 62,127,228,155, 63,123, 85, 44,149,243,101, 98, 82,242,242, 45, 63,191, 21, 15, 0,203, 86,172,241, 79,137, 51,
- 76,139,142,121, 48,120,213,154, 51,109,244, 6,222,164, 5,112,255,223,180,108, 46, 6,133, 54, 61, 61,253,138,167,167,167,111,
-167, 55, 12,159, 53,106, 64, 6,101,231,139,233,132,144,169,233,233,233,241,166,230,189,125,251, 46, 56,115,124, 43, 54,174,223,
- 92, 76, 68,104, 43,141,254, 46,128,238,154, 27, 65,129,136,202, 77,203, 39,191,140,121,159,125, 50,233,195,146,210,226,111,127,
-250,145,138,115,107,233,231,222,164,105, 91, 52,105,218, 22, 83,166,126,106, 19, 26, 22,236, 13, 0, 59,119, 82, 33,220,143, 28,
-248, 98,254,220, 65,243,191,152,139, 18,181, 14,149,203,234,196,220,143,254, 35, 46,158,234,159,247,160,161,127, 50, 95,240,252,
- 21,124,252,113, 67,109,113,177, 83,199, 25, 51, 28,165, 75,150,112,149, 15,208, 79, 70,176, 30, 71,175,234,161,121,228,228,201,
- 63, 62,254,232,163,244,165, 75,150,244, 94,252,245,215,102, 33, 33, 33,200,202,202, 66,112,112, 48, 60, 60, 60,112,254,252,121,
- 28, 59,124,184,188, 76,163,249,204,213,213,117, 85, 77,154,115, 40,189,242,165, 92, 30,160, 47, 47,119, 89,186,110,221,195,238,
- 61,123,102,175, 93,187,214,179, 79,159, 62,156, 90,173, 70,113,113, 49,138,139,139,161,211,233, 32,151,203,145,145,158, 46,166,
-165,167,223, 73, 73, 73, 89, 91,107, 58,167, 79,111,168, 46, 40,112,234, 56, 99,134,163, 49, 63, 95,245, 97, 82, 82, 26,183, 97,
-195,215,147, 38, 78,252,104,218,244,233, 74, 79, 79, 79,162,211,233, 30, 27, 45,163,209, 8, 51, 51, 51, 35,207,243, 14, 0,212,
-166,104,170,254,248,131,207,207,207,135,189,189,253,227,105,151, 56,142,131, 74,165,130,157,157, 29,202,202,202, 64, 41,155, 0,
-183, 94, 15, 10, 53,221,116,131,131,131,175, 75,165, 82,207,170, 33,194,234,214,182,171,250,158,231,249,180,200,200,200,150, 85,
- 29, 46,165,180,218,208,167,167,167,167,191, 40,138, 95,181,111,223,254,229,183,223,126,155, 68, 68, 68,224,228,201,147, 52, 61,
- 61,125, 23,199,113,159,165,165,165,197,215,244,100, 83,147,166,189,189,189,149,149,149,213, 7, 22, 22, 22, 61, 43,167, 98, 80,
-169, 84,119,203,203,203, 79,148,150,150,174,168,105,246,246,218, 52,253,252,252,172, 69, 81,124,223,194,194,162, 87, 94, 94, 94,
- 51, 0,112,116,116,188, 85, 94, 94,126,156,227,184,149, 53, 45, 32, 93,155,166,187,187,187,153,165,165,229,151,246,246,246,175,
-189,253,246,219, 14, 17, 17, 17,153,183,110,221,146,151,148,148,108,225,121,190,198,197,158,171,211, 12, 13, 13,253,211, 90,132,
-207,243, 24, 1, 64,211,166, 77, 15, 14, 28, 56,176,255,107,175,189, 6,163,209,136,159,127,254, 25,199,142, 29,251, 35, 54, 54,
-118, 64,109, 79,159, 79,106,186,186,186, 58,122,120,120,156, 25, 61,122,180,207,144, 33, 67,204,109,108,108, 32,145, 72, 80, 94,
- 94,142,248,248,120,220,189,123,151, 30, 59,118,172, 44, 58, 58, 58, 77,163,209,116,205,202,202,202, 51,181, 60,159,229, 41,249,
- 73, 77,153, 76,214,197,203,203,107,219,156, 57,115,172,122,245,234,101,230,224,224, 0,169, 84, 10,158,231,145,157,157,141,200,
-200, 72, 28, 58,116,168,124,231,206,157,229,249,249,249,163, 40,165, 17,127, 71, 58,159,183,102,229, 76,238, 85,183, 9, 9, 13,
-137,190,151, 64, 23,253,169,190,249,145,233,209, 81,209,141,171, 70,174, 42,103,114, 55, 53,157,253, 59,217,245,123,121, 72,171,
-158, 0,176,123,223,181, 19,127,156, 43, 60, 84,143,116,206,142,142,186,255,196, 98,211,193, 49,209,241,116,193, 83,231,221,143,
-124, 17, 25, 25,253, 39,205,240,240,208,152,123,137, 88,104,162,209, 23,171, 61, 55, 43,251,139,253, 41, 36,140,148,232, 68,186,
-169,202, 54, 3, 6,191, 60,180,255,167, 51,103,225,171,197,139,176,127,247,222, 63,162, 19,233,193,127,114, 93,250,171, 52, 43,
- 23, 39, 54,119,115,235,188,213,209,113,214,209,227,199, 45, 43,251,215, 86,246,145,124,114,192, 85,243,230,205,115,110,221,186,
-229, 98,138,230,128,239,191, 55,104,173,172,148,139,127,254,185,139, 90,175,239,242,225,135, 31, 74,175, 95,191,142,109, 91,182,
-240,154,212,212,205, 89,130,240,126,117,173, 31,213,229,253, 75,185,188,141,202,193,161,107,195, 89,179,148,139,183,111, 31,231,
-225,233,233, 50, 96,224, 64,185, 84, 42, 69,121,121, 57, 50, 50, 50,112,225,252,121,109,114, 74, 74,164, 86,171, 29,154,154,154,
-154,105,106,222, 7,124,255,189,193,214,223, 31,150, 46, 46,226,185, 11, 23,108,103,204,153, 51,201,197,205,205,166, 99,167, 78,
- 50,115,115,115, 20, 22, 22, 34, 37, 37, 5,231,206,157,203,137,143,143,119,167,148, 10,166,104,254,126,247,110,147, 83, 87,174,
- 12,255,248,227,143, 21,193,193,193,176,178,178, 66, 73, 73, 9,238,221,187,135, 11, 23, 46,232,182,111,223, 94, 92, 94, 94, 62,
- 41, 53, 53,245,247,191,234,184,255,107, 12,214,127,235,196,115,117,117,109,201,113,220,236,138,230,168, 5,117,173,233,247, 34,
- 93,116,220,220,220,188,237,236,236, 86,107, 52, 26,170,211,233, 38,102,102,102,166,252,175,165,147, 16, 34,109,217,178,229, 79,
- 57, 57, 57,237, 41,165,176,177,177,185, 24, 21, 21,245, 14,165,148,175,175, 38, 33, 68,226,234,234,218,222,194,194,162,141,133,
-133, 69, 23,131,193, 16, 82,209, 15,239,158, 90,173,142, 48, 26,141, 87,178,178,178, 46, 82, 74,133,191, 51,239,132, 16, 9,128,
- 94,238,238,238,111,137,162, 24,200,113,156,109, 69, 83,105, 17,165, 52,182,176,176,112, 13,128,227,127,119, 58,159,167,102,152,
- 31, 25, 74, 9,130,255,180,141,136,148, 39, 59,175, 87,118,134,255,243, 69, 4,247,163, 18,232, 94, 83,211, 73, 8,225,134,244,
-112, 90, 10, 60, 26,105, 88,219,132,162,255, 97,134, 76, 48, 45,245, 54, 88, 13,200,216,234, 52,239, 37,215,190, 8,111, 93, 6,
-203, 84,194, 26,144, 46, 32,104, 47, 18, 92,185,151, 64, 79,189,136,215,186,231,169,185,136, 16,251,157, 65, 65, 23, 57,169,212,
-181,114,153, 35,194,113,162, 8, 8,224, 56,190,106,179, 96,213, 7,202,186, 52, 13, 64, 99,185, 82,233, 41,240,188, 75,190, 92,
-110,117,193,194,162,133, 14, 40,115, 21,132,217, 39,242,243, 99,234,155,206,121,132,216, 1, 8,149, 42,149,222, 23,204,205, 7,
- 22,216,217,181, 40,228,121, 23, 0,162, 82,169,140, 42, 83,171,215,166,166,166,174,121,178,165,194,148,116,202,148, 74, 47,129,
-231, 93, 8, 64, 57,169, 52,231,168, 82,233,149,235,228,244,186, 90,163,241, 81, 42,149, 70, 0, 37, 6,131, 97,116, 74, 74,202,
-201,250,104,166, 72, 36,161,119,172,172, 58, 9,214,214, 14, 6,192,194, 32,138, 6,131,209,152,170,211,233,238, 74, 36,146,111,
-211,210,210,226,254,202,227,206, 12,214,191,236,100,102,154, 76,147,105, 50, 77,166,201, 52,255, 9,154, 46, 46, 46,230, 28,199,
- 57,100,101,101,165, 87,125, 0,252,167,228,253, 69, 67,202,138,128,193, 96, 48, 24,140,127, 62,217,217,217,106, 84,211,231,138,
-241,247, 64, 0, 84, 59, 18,160, 62,206,244,105, 70, 19,212,165,207, 52,153, 38,211,100,154, 76,147,105, 50,205, 23, 79,179, 46,
-237, 23, 37, 50,198,154, 8,153, 38,211,100,154, 76,147,105, 50, 77,166,249,183,107,190,104,112,172, 8,106,172, 60, 46,132, 16,
-151,231,189, 45,227,197,174, 11,213,236,235, 65, 8,241,168,231,246,110,172,212, 25, 12, 6,227,159,205,127,189, 15, 86,229,141,
-138, 82,154,253, 60,182,123,222,251, 86,236,191,136, 16,124, 82,241,254, 27, 74,233,172,103,220,214, 36, 35, 27, 22, 22,230, 72,
- 8,233, 97, 99, 99,211,184,180,180, 52,146, 82,122,252,238,221,187,249, 48,113,121, 2,111,111,111, 95,149, 74, 53,142, 16, 18,
- 82,145,255,123, 90,173,118, 67, 74, 74, 74,226,115, 56,110, 4,192, 4,165, 82,249,138,173,173,109, 96, 97, 97, 97,172, 94,175,
-223, 9,224,151,167,153,113,218,221,221, 61, 8,192, 88, 81, 20,165, 28,199,109,205,200,200,184,109,234,190, 46,225, 67,118, 80,
-160, 33, 0, 78, 36,226,112,142,114,187, 0,136, 4,120,152, 29,185,239,149,231, 92, 95, 77,174, 11, 79, 34,145, 72, 22, 19,130,
-143, 43,222, 47, 17, 4,225,211, 58,182, 95, 70,128,247, 65, 64, 43,182,159,201, 46, 81, 12, 6,131,241, 47, 48, 88,158,158,158,
-125, 69, 81,124, 21, 0, 56,142,219,154,150,150,118,248,175,184, 89, 61,203, 77,237,137,125,151, 83, 74, 63,170,127,180, 2,159,
-136, 34,229, 30,229,147,204,112,113,113,177,151, 74,165,255, 49, 55, 21,207,243,102,132,224, 45, 81,164,164, 98,219, 79, 8, 33,
- 43,159,198,216,181,104,209,194,174, 85,171, 86,159,206,159, 63, 95,233,228,228, 68,178,178,178, 58,126,252,241,199, 45,131,131,
-131, 23,223,191,127, 63,171,174,253,253,253,253,135, 52,107,222,234,189,105, 31,207,112,113,118,112,180,226, 5,222,144,158,158,
-233,190, 98,249,215,109,253,253,253,127,138,143,143,223, 87, 31, 35, 37,149, 74, 95, 81,169, 84, 1, 90,173, 54,142,231,249, 93,
- 18,137,164,247,194,133, 11,195,251,247,239,175, 42, 46, 46, 86,240, 60, 31,184,121,243,230,233,235,214,173,235, 75, 8, 25, 92,
-199, 80,123,143, 10,195,151, 94,229,235, 87,175, 92,185,210, 67, 42,149,146,214,173, 91,155, 17, 66,166, 86,106,212,176,253, 99,
- 40,208, 48,234,252,206,198, 0, 16,214,113,196,131,168,243, 59, 81,241,254,185, 63, 12, 60, 89, 23, 44, 45, 45, 55,149,149,149,
-197,212,101,228, 43,246,253,184,202,190,159, 56, 56, 56,124,159,159,159,159, 21, 24, 24,216, 82,171,213,142, 1, 0,149, 74,245,
- 91,108,108,236,117, 7, 7, 7, 87,133, 92,254,190, 70,171, 37, 0, 8,199,145,143, 9, 33, 43,158,246, 33,129,193, 96, 48, 24,
-255, 32,131, 69, 41,125, 61, 54, 54,214, 92, 20, 69, 52,106,212,104, 12, 0,147, 13, 86,117, 55,171, 30, 61,122, 52, 55, 51, 51,
-211, 87,221, 78,163,209, 40, 8, 65,143,167, 49, 45,149,191,161,215,235, 56,153, 76, 1,137,132,251,176,105,211,166, 45,243,242,
-242, 78, 10,130,240,243,147,147, 87,154,152,110,172, 93,187, 54,196,197,197,229, 63,214, 80,201,206,206,150, 15, 28, 56,160, 94,
-122,175, 55,110,172,210,198,199,119,226,100, 50,111,131,209,232, 8, 0, 50,153, 44, 95,101,105,233,245,249,103,159,153, 91, 88,
- 88,136,249,249,249, 40, 41, 41, 33, 83,166, 76, 81, 77,153, 50,165, 23,128,141,181,105,122,121,121,249,181,104,213,230,189, 13,
-235,215,183, 41, 46, 40,208,174,249,118,213, 77,157, 84,169,246, 9, 9,146,207,158,179,208,102,254, 23,179, 38,122,121,121, 69,
-166,166,166, 38,212,145, 87, 14,192,222, 15, 62,248, 32,108,192,128, 1,138,210,210, 82,149, 90,173,110,176,121,243,230,207, 91,
-181,106,101,217,188,121,115,197,182,109,219, 72, 81, 81, 17, 40,165,230,193,193,193,116,196,136, 17,218, 29, 59,118, 76, 1,240,
- 93,125,204,178, 32, 8,178,202,192, 23,207,243,138,138,186,104, 48,197, 92, 19,224, 97, 88,199, 17, 0, 65, 96,212,249,157,170,
-176, 78, 35,180,160,136, 37,192,195,138, 7,129,183, 69, 81,244,173, 46, 61, 28,199, 37,166,165,165,253,250, 52, 39, 75,255,254,
- 3, 0, 96,181,155,155,219,217,220,220, 92, 79, 66, 48,218,212,135, 0, 66, 8,145, 74,165, 99, 1, 44,214,104, 52,111,158, 60,
-121,178, 25, 0,244,232,209, 67, 14,224, 58,165,180,253,163,172, 49, 24, 12, 6,227,223,104,176,228, 0,112,246,236, 89, 80, 74,
- 21, 79, 19, 20,168,106, 92,222,127,255,125,184,185,253,185,187, 73,102,102, 38,206,156, 57,253, 44,121,250,211, 77,234,203, 47,
-191,180,201,207,207, 31,180,118,237,218,222,174,174,174,159,103,101,101,157,169, 35,143,217,132,144,111, 56,142,204, 32,132, 64,
-161, 80, 38, 78,156, 56,241,122,197,255,252, 15, 28, 56, 96, 62,112,224, 64, 53, 33, 36, 30, 0, 20, 10,165,179, 68,194,249, 82,
- 74, 65, 41,190,169,205, 8,190,108,105,217,136, 82, 58,112,210,178,101, 66,139,126,253,164,214,206,206, 18,112, 28,114, 83, 82,
- 28, 86,255,248, 99,251,152, 99,199,148,174,193,193, 41,122,133,162,232,193,131, 7,112,115,115,131, 92, 46,175,115, 4,135,185,
-185,249,155, 31, 76,251,200,169,184,160, 80, 99, 44, 45, 53, 88,138, 2,111,173,146,145,146,220,252,162,196, 84,107,245,155,147,
-223,147,126, 49,115,250,155, 0, 62,173, 67,106,202,180,105,211, 66, 90,183,110,237,177,125,251,118, 82, 92, 92, 12,169, 84,106,
-217,172, 89, 51,180,108,217, 82, 56,121,242, 36,241,243,243, 67,120,120, 56,206,159, 63,143, 11, 23, 46,144,230,205,155,155,239,
-221,187,119, 76,117, 6,235, 73, 83, 45,145,112, 51, 71,142, 28,217,215,220,220,220,216,181,107, 87,188,253,246,219, 40, 47, 47,
- 71, 72, 72, 72,147,174, 93,187, 94, 26, 54,108,152,140,227, 72,184, 32,136,168,205, 92, 87, 54, 3, 58,135, 15,185, 3,160, 49,
- 40, 98,115, 34,247, 53,169,252,191, 40,138,190, 49, 49, 49,161, 69, 69, 69, 16, 69,241,241,154,140, 0,208,185,115,231,250,212,
-247,108, 66,200, 55, 3, 7, 14,152, 1, 16,116,239,222, 61,255,189,247,222, 19,238,221,187,215,117,216,176,161,109, 31, 62,140,
-173,241, 33,128, 82,154, 45,145, 72,150, 84,252,143,140, 27, 55, 62,219,210,210,114,168,151,151, 87, 12, 33, 68, 42,151,203, 43,
-203, 72, 18, 18, 18,226, 20, 30, 30, 62,217,206,206, 46, 71,194,113,206, 20,148, 18,194, 45, 17, 69,129, 69,175, 24, 12, 6,227,
-223, 96,176, 8, 33,121,183,110,221,114,211,106,181, 32,132,212, 25, 13,170, 58,194,160,226,134,243, 19,199,145,119, 8, 33, 8,
- 15,111,156,176, 98,197, 10,125, 53,187,233,195,195, 27, 39, 72, 36,156, 31,165, 20,132,112,171,170,222,104,106, 27,181, 80,121,
- 67, 84, 40,148,159, 0,128,155,155,123,246,193,131, 7,141,195,135, 15,199,146, 37, 75, 20, 51,103,206, 92,232,238,238, 62, 50,
- 35, 35, 35,173,166,116, 86,124,158,229,226,226, 98,191,118,237,218,144,137, 19, 39, 94, 79, 79, 79,255, 0, 0, 60, 60, 60, 86,
- 0,104, 76, 8,137,175,242, 29,126,249,229,151,150,111,190,249,230,189,236,236,236, 89, 53,105,190,108,101, 21,232,224,238, 62,
-100,233,249,243, 84,202,243,164,248,250,245,162,180,172, 44,131, 94, 16,184,195, 9, 9,109, 70,142, 31, 47,119,113,115,163,251,
-127,249,197, 71, 45,147, 81, 65,165, 42,142,138,138,162, 6,131,225,110, 93,121, 39,132, 4,219,217,218, 89,172, 89,182,234,186,
-147, 82, 66, 28,189,220,137,220,218, 86,202, 89, 90, 41,169, 68,162,241,241,114,183, 34,132, 4,215,117,140,228,114,249,152,222,
-189,123,155,111,219,182,141,132,135,135,195,214,214, 22,103,207,158,197,173, 91,183, 80, 88, 88,200,241, 60,143, 86,173, 90,225,
-155,111,190,129,151,151, 23,138,139,139,145,148,148,228, 40,151,203,157,106, 41,207, 63, 25,222, 79, 62,249, 4,206,206,206, 16,
- 4, 1,153,153,153, 40, 43, 43,131,133,133, 5,108,108,108,144,145,145,129,253,251,247,213, 89,151, 76,165, 93,187,118,106, 0,
- 73, 79, 70,176,234,163,233,225,225,113, 44, 39, 39,183, 83,183,110,221, 80, 84, 84,100,152, 51,103, 14,154, 53,107,134,134, 13,
-131,234, 76,167, 32, 8,159, 58, 58, 58,174,115,112,112, 88,246,222,123,239,185, 58, 56, 56, 64,167,211,125,150,159,159,143, 79,
- 62,249, 4, 0,208,178,101,203,198,148,210, 63,222,124,243, 77,248,250,250,166, 23, 20, 20,164,196,196,196, 76,204,201,201,137,
-124,150,188,215,231,220,100,154, 76,147,105, 50,205,255, 5,205, 23,210, 96, 17, 66, 40,165,143,154,228,170,190,175,166, 64, 11,
- 61, 60, 60,220,204,204,204, 64, 41, 45,172,239,143, 9,130, 48,197,209,209, 49,103,214,172, 89, 29,131,130,130,244, 83,166, 76,
-137, 76, 76, 76,252,172,234, 54,190,190,190, 95,254,240,195, 15,120,240,224, 65,210,162, 69,139,206,231,229,229, 45,168,231, 65,
-159, 73, 8, 89, 1, 0, 25, 25, 25,121, 7, 14, 28,104, 29, 17, 17, 49,115,197,138, 21,110, 83,166, 76, 81,188,247,222,123,147,
- 77,136,228, 64, 42,149,106,170,107, 22,172, 14, 23, 23, 23, 67,117,125,180, 42,153,216,162,133,146,138,226,144,175,207,158, 21,
-197,180, 52,237,161,245,235,177,228,194,133, 73, 54,142,142,222, 78, 78, 78,212,215,211, 51,215,140,231,179, 75,114,115,185,230,
-189,123,203,142,110,220,232,163,244,245,141,222,181,107, 87,153, 40,138,199, 76, 72, 66,153,222,104,212, 89,120,185, 27, 7, 14,
-238,221,248,238,213, 91, 15,204,236,237,185,198,173,154,133,222,143, 77,186, 65, 0, 61, 30,189,106,197,198,198, 38, 40, 47, 47,
- 15, 37, 37, 37,112,114,114,194,202,149, 43,225,226,226, 2,181, 90,141,168,168, 40,234,233,233, 73,206,157, 59, 7,119,119,119,
-228,230,230, 66,175,215, 67,173, 86,231,232,245,122, 77, 77,134, 87, 42,149,174,225, 56,242, 54, 33, 4,129,129, 13,179,191,251,
-238, 59, 35,165, 20,193,193,193, 24, 58,116, 40,206,158, 61,139,168,168,168,202, 40,147,209,215,215, 47,155,227,136,243,163,221,
-107,143, 8,214, 70, 69,196, 42, 41, 35, 35, 99,214,211,236,239,233,233,169, 18, 4, 97, 82,163, 70,141, 6,188,250,234,171, 6,
-185, 92, 14,181, 90, 93, 89, 22,134, 62,125,250,228, 15, 28, 56,192,225,143, 63,254,168, 53,157,121,121,121,241, 33, 33, 33,111,
-127,244,209, 71,191,173, 90,181,202,246,211, 79, 63,125,188, 8,183, 32, 8, 16, 69,241,113,148,109,239,222,189, 72, 76, 76,252,
-170,170,185, 98, 48, 24,140,127, 11,166,122,145,127, 92, 4,235,191,149, 25,137, 68,242,203,177, 99,199,154,117,238,220, 89,218,
-163, 71,143,112, 79, 79,207,240,180,180,180,200,138,155, 90,120,159, 62,125,194,157,157,157,177,114,229, 74,181, 68, 34,249,229,
- 41,157,117,213,155,221, 37, 15, 15,143,217,123,246,236, 89, 59,113,226, 68,184,184,184, 52,251,111, 23,114,225,131, 7, 29,198,
-205,159, 47,170, 0,201, 31,191,253, 70, 23,158, 63,255,245,142,157, 59,229,254,254,254,160,148, 34, 41, 41,201,250,231,181,107,
-237, 71,246,234, 21,149, 85, 94, 78,226,178,178,132,232,131, 7,185,124,142,251, 62, 62, 62,190,206, 72,161,193, 96,184,150,146,
-156, 28,212,161, 83, 7,183,179,215,163,111, 14, 27, 50,160, 27, 39,229,184,196,228,204,107, 78, 14,246, 22, 23, 46,158, 47, 49,
- 24, 12,215,234,210, 41, 47, 47, 79,228,121,222,158, 82,234,116,230,204, 25, 56, 58, 58,162,176,176, 16, 70,163, 17, 6,131, 65,
-175, 86,171, 85,247,239,223,135, 78,167,131, 78,167,131,181,181, 53,238,222,189,155,205,243,252,169,154, 52,121,158,159, 64, 8,
-153, 79, 41, 69, 76, 76, 76, 58, 0,184,187,187, 55,180,181,181,221,194,243, 60, 50, 50, 50,112,230,204,153,209, 25, 25, 25, 15,
-170,212,197, 90, 59,185,155, 88, 7,158,250,120, 57, 59, 59,135, 91, 88, 88,204,154, 58,117,170, 75, 88, 88, 24,180, 90, 45, 0,
-192,210,210, 18,106,181, 26,214,214,214,104,223,190,253,189, 5, 11, 22, 24, 40,197, 56, 74,105,173,131, 16,238,221,187,151, 27,
- 20, 20, 52,117,226,196,137,243,130,130,130,252, 40,165, 8, 12, 12, 68,239,222,189,113,232,208, 33, 60,124,248, 16,229,229,229,
-194,213,171, 87,183,165,166,166, 30,100,151, 89, 6,131,193, 76,214, 11, 18,193,170,184, 33, 17, 66, 8,253,171,127, 48, 59, 59,
- 59,215,211,211,243,200,141, 27, 55, 6,188,242,202, 43, 56,115,230,204, 56, 0,211, 1, 64,169, 84,142,123,229,149, 87,112,227,
-198, 13,220,191,127,255, 72,118,118,118,238,115, 58, 96,106,189,254, 81, 0, 71,165, 82,153,213,243, 70,237, 95,209, 52, 8, 74,
-169,127, 77,223,213, 17, 13,243,110, 55,116, 40, 87,118,235, 86,209,252,163, 71, 63,216,186,103,143,220,203,203, 11,165,165,165,
-144, 72, 36,176,182,182, 38,189,251,245,179, 91,179,117,171,171,151,149,213,133,201,227,199,199,124,117,252,184,250, 66,113,177,
- 73,211, 43,104,181,218,181, 95, 46,152,221,237,183,205, 59,130, 27, 5, 7,218, 29, 58,118,250,166,131,131,181,153,175,175,191,
-178,184,168, 72,247,195,138, 37,210,242,242,242,117,117,233,104, 52,154,189, 39, 79,158, 28,226,229,229,229, 20, 25, 25, 9,189,
- 94, 15, 65, 16,208,179,103, 79, 80, 74,149, 0, 68,169, 84,138,123,247,238,193, 96, 48,228, 60,124,248, 48, 61, 46, 46, 78, 9,
- 96,113, 29,101,248, 39,163,196,113,220,200, 1, 3, 6,128,231,121,244,238,221, 27,251,246,237,123, 5,192,188,154,182,127,134,
- 8, 86, 3,119,119,247, 69, 21,191,105, 82,231,118, 55, 55,183,142, 65, 65, 65,243,150, 46,253,134,184,184,184, 65, 16,120, 24,
-141, 6,228,230,230,163,180,180, 20,161,161,161,240,246,246,198,226,197,139, 1, 96, 95, 93,230,170,146, 7, 15, 30,196, 2, 24,
- 53,126,252,120,249,217,179,103, 91,106,181,218,229,189,122,245,194,205,155, 55,113,251,246,237,215,156,157,157,115,188,188,188,
-120, 15, 15,143,183, 9, 33,214, 42,149,106,107,108,108,108, 58,187,220, 50, 24,140,127, 19,255, 45, 47,242, 95, 53, 88,117,101,
-204,197,197,197,188,164, 40,255,125, 95, 95, 95, 21, 0, 40,229,146,238,142,142,142, 95,229,229,229,149,213,247, 71,213,106,245,
-142,205,155, 55,191,244,237,183,223,202,251,245,235, 23,224,233,233,217, 26, 0,134, 13, 27, 22, 96,101,101,133,205,155, 55, 27,
-212,106,245,142,231,149, 73, 81, 20,123,183,106,213, 10, 5, 5, 5, 72, 74, 74,186, 94,159,125, 15, 28, 56, 96, 14,160,113, 93,
-223,213,134,222,104,116,178,118,115,147,102,159, 61,107,208,240,188,119, 80, 80, 16, 74, 75, 75,161, 80, 40,160,211,233,144,152,
-152, 8,185, 92, 78, 30, 38, 36, 56,206,156, 62,253,156, 89, 80,144,101,229, 8, 67, 83,200,200,200,208,184,187,187,191,183,240,
-203,133, 91,150, 46, 89,226, 92,144, 95,248, 64,174, 48,211,154,155, 41,237,103,124,180,128,102,103,103,127, 88,177, 70, 85, 93,
- 44,222,178,101, 75,159,151, 94,122,233,142,151,151,151,115, 94, 94,158,107, 73, 73, 9, 45, 40, 40, 32,120,212,151,138, 0,192,
-157, 59,119,144,156,156,204, 11,130,112, 14,192,124, 74,169,222,212,180,122,122,122,218,181,110,221,186,143,131,131,195,227,166,
-200,230,205,155,247,241,244,244,252, 62, 45, 45,173,240,121, 86,238, 99,199,142,153,139,162, 24, 10, 0,125,250,244, 49,213,140,
-191, 62,114,228, 72, 98,102,102, 1,158,231,161, 84,202,161, 84, 42, 97,105,105, 13,123,123,123, 36, 39, 39,163,123,247,238, 98,
- 66, 66,194,126,115,115,243,245,245, 77,211,233,211,167, 7,181,110,221,122,250,228,201,147, 97, 52, 26, 49,100,200, 16,164,167,
-167, 47, 77, 76, 76,220,238,234,234, 58,250,179,207, 62,115,116,112,112,192, 39,159,124, 98, 6, 96, 46,187,220, 50, 24, 12,102,
-178, 94, 0,131, 85,203, 77,177,149,179,179,243,148,156,156, 28, 85,101,211, 11, 33, 68,213, 52, 32,224, 23,119,119,247,159, 50,
- 50, 50, 46,212,231, 71, 11, 11, 11, 75,220,220,220,246, 95,186,116,105,196,176, 97,195,112,252,248,241,177, 21, 6, 11,151, 46,
- 93, 66, 66, 66,194,254,194,194,194,146,231,145, 65, 15, 15,143,151,187,117,235, 54,182,117,235,214, 56,112,224, 0, 4, 65, 56,
- 85,159,253,171,142, 24,172,110, 20, 97,229,119,166,104, 41,148, 74,177,178,255,141, 68, 34,129, 86,171, 69,102,102, 38, 98, 98,
- 98, 96,109,109,141,194,130, 2, 98,109,111,111,208,233,116, 66,125,243,153,145,145,145, 22, 20, 20, 20,167,209,106,101,118, 14,
-246,106, 43, 11, 5, 45, 41, 45,229,238,220,185,153,153,157,157,157,100, 98,165,214, 19, 66,186, 28, 61,122,244, 11,137, 68,242,
-138,135,135, 7, 70,140, 24, 65,122,244,232, 1,133, 66, 1,141, 70,131,162,162, 34, 28, 56,112, 0, 60,207,251, 1,128,147,147,
-147, 75,131, 6, 13,118,115, 28,151,157,144,144,240,102, 93,191, 33, 8,194,176,193,131, 7, 75,141, 70, 35, 22, 44, 88,128,185,
-115,231,162,111,223,190,210,107,215,174, 13, 3,240,235,115, 60, 65,241,210, 75, 47, 61,238,228, 94,181,115,123, 77,116,237,218,
- 85, 42,145, 72,252, 61, 60, 60,144,148,148, 4,115,115,115,184,184,184,192,214,214, 22,142,142,142,248,246,219,111,177,124,249,
-242,219, 18,137,100, 85, 70, 70, 70, 92,125,211,228,237,237,253,246,152, 49, 99,222, 30, 49, 98, 4, 74, 75, 75,113,233,210, 37,
-116,232,208, 1,139, 22, 45,114, 61,127,254,252,180, 86,173, 90, 65, 42,149, 34, 34, 34, 2,130, 32,164,178,203, 44,131,193, 96,
-252,195, 13, 86,213,246,206,170,239,237,236,236,172, 85, 42,213,196, 1, 3, 6,116, 28, 50,100, 8,122,247,238,253,167,157, 87,
-174, 92,105,121,230,204,153, 25, 30, 30, 30, 93, 0,172, 74, 79, 79, 47,168, 71, 84,105,239,150, 45, 91,250,181,107,215,206,188,
- 91,183,110,254, 0,160, 84, 42,245, 91,182,108, 81,139,162,184,183,190, 25,121,114,210, 71, 79, 79,207, 86, 18,137,100,220,192,
-129, 3, 91,189,241,198, 27,136,138,138,194,230,205,155,239, 5, 5, 5, 29,175,167,110,124, 29,163, 8, 87,212, 21,205, 82,200,
-100,185, 37,153,153, 14, 82, 55, 55,133,133, 66,145,122,237,218, 53,255,128,128, 0,146,144,144,128, 7, 15, 30,192, 96, 48,224,
-214,173, 91,148, 3,210, 36,214,214, 92,242,157, 59, 68, 46,147,213,123,206, 46, 51,185,216,226,243, 79, 38, 4,106,181,154,208,
-226,226, 98, 94, 42,149, 74,149, 50, 33,161,158,198, 68,231,237,237, 61, 88, 16, 4, 71,189, 94,111,116,113,113,145,157, 56,113,
- 2, 10,133, 2,143, 70,127,134, 67,161, 80,232, 61, 61, 61, 75, 1,192,193,193,129, 91,180,104,145,108,218,180,105, 81,117,105,
-183,104,209, 66,214,160, 65,131,145, 65, 65, 65,184,120,241, 34,162,163,163,227, 47, 94,188,232,223,162, 69, 11,120,121,121,141,
-108,209,162,197,134, 27, 55,110, 24,159,151,193, 66, 61, 59,185, 71, 68, 68,136,238,238,238, 32,132, 64, 34,145, 64,173, 86, 35,
- 33, 33, 1,237,219,183,199,186,117,235,176, 98,197,138, 77,153,153,153,235,159, 38, 61,227,199,143,151, 55,105,210,228,245, 17,
- 35, 70, 32, 62, 62, 30,139, 23, 47,206,207,202,202, 58,125,244,232,209, 97,147, 39, 79,150,116,232,208, 1,121,121,121,216,176,
- 97, 3,127,243,230,205,245,253,250,245,251,141, 93,158, 24, 12,198,191, 45,114, 85,221,251, 23, 46,130,229,225,225,209,223,222,
-222,254,173,145, 35, 71, 74, 26, 53,106,132,236,236,108, 88, 89, 40,245,132, 16, 5, 0, 88, 89,168,244, 70,163, 17,147, 39, 79,
- 70,179,102,205, 90,207,152, 49,163,149,171,171,235,166,172,172,172,221,166,252,112,118,118,182,218,205,205,109,215, 59,239,188,
-179,248,214,173,155,126, 0,112,245,234,213,132,140,140,140,153, 38, 54,103, 85, 53, 65,149,147, 83, 18,115,115,243, 59,129,129,
-129,249,125,250,244,177, 27, 58,116, 40, 28, 29, 29,113,243,230, 77, 44, 90,180, 40, 74,171,213, 78, 57,115,230, 12,255,223, 46,
-100,158,231, 83,174, 28, 60,104,247,210,232,209,118, 11, 70,142,252,225,141,241,227,191,249,106,209, 34,185,135,135, 7,177,182,
-182,198,237,219,183,233,154, 95,127, 53,108, 95,178,228, 7,137,153,153,252,236,190,125, 10,193,104,140,173,207,111,120,122,122,
-118,233,215,167, 75,248,210,111,191,131, 70, 93,134,171,151, 14,162,176, 32, 15,191,252,186,167,177,167,167,103,151,180,180,180,
-136,122,164,215,127,215,174, 93,143,204,161, 66,129,249,243,231,195,221,221, 29,214,214,214, 40, 43, 43,195,132, 9, 19, 20,239,
-191,255, 62, 0, 32, 58, 58, 26,150,150,150, 38,233,102,102,102,118,155, 56,113,162,181,209,104,196,225,195,135,117,130, 32,188,
-119,252,248,241,189, 77,155, 54, 85,118,238,220,217,250,183,223,126,235, 14,224,232,223,120,114,139,238,238,238, 41,199,142, 29,
-243, 30, 49, 98, 4,228,114, 57, 10, 11, 11, 97,101,101,133,165, 75,151, 82,131,193,176,251,105,181,211,211,211, 21,142,142,142,
- 10, 65, 16,176,107,215, 46,148,148,148,188,153,150,150,150, 21, 16, 16,176,119,198,140, 25, 31, 6, 6, 6,250,198,198,198, 38,
- 11,130,176, 36, 61, 61, 61,145, 93,106, 25, 12, 6,227, 5, 53, 88, 0, 94, 59,114,228,136, 68, 20, 69,172, 94,189, 26, 55,110,
-220,160,150,214,246, 31, 88,217,144,141,214,214,214, 66, 81, 81,209,107,223,124,243,205,144, 47,190,248,130,116,234,212, 9,151,
- 46, 93, 34,126,126,126,195, 0,236,174, 98,124,106, 93,109,187,184,184,248, 90,118,118,150, 95,149, 89,219,253,148, 74,213,181,
- 58,204,212,159, 52,171,153,204,178,233,151, 95,126, 25,233,236,236,108,140,140,140,196,170, 85,171,196, 27, 55,110,252, 1, 96,
-105,118,118,182,198, 20,205,231, 65, 85, 77,187,160,160, 11,235,102,205,106,222,110,208, 32,218,253,149, 87,196,101, 10,197, 71,
-179,231,204,121,175,160,164,196, 75, 20, 69, 56,216,216,164,108,250,242,203,111, 59,116,234,164,185,123,249,178,197,249,223,127,
- 55,115,105,208,224, 92,125,210,153,150,150, 22,209, 48,192, 27, 27,126,253, 22, 6,131, 14,153,233,201, 0,128,188,252, 98,212,
-102,174,170,211,228, 56,174,104,220,184,113,230,122,189,158,140, 28, 57, 82,150,147,147,131,128,128, 0, 0, 64, 73, 73, 9,254,
-248,227, 15, 4, 7, 63,154, 86,235,238,221,187,143,223,215,149, 78,115,115,243, 87, 58,118,236,136,164,164, 36, 68, 69, 69, 29,
-202,206,206,206,117,115,115, 59,148,156,156, 60,172,101,203,150,216,187,119,239,136,154, 12, 86,125,143, 81,229,196,162,245,169,
- 75, 21,230,114,198,222,189,123, 39, 94,186,116,169,203,244,233,211, 73,143, 30, 61, 0, 0,229,229,229,130, 41,253, 13,107, 75,
-103,101,243,176, 40,138,240,242,242, 42, 7,128,184,184,184, 68, 0,239, 62,173,230,243,168,159, 76,147,105, 50, 77,166,249,191,
-160,249,111, 50, 88,188, 40,138, 56,115,230, 12,246,236,217, 35,232,245,250, 89,153,153,153, 49, 85,254,191,222,203,203,235,220,
-176, 97,195,150, 61,120,240, 64, 18, 29, 29, 13, 74,105,189,250, 14,105,181, 90, 35, 33,255,249,221,179,102,106,221,186,117,200,
-202,202,210, 39, 39, 39,255,110, 48, 24, 54,231,229,229,101, 62, 67, 84,227,153, 71, 17,254,114,227,134,238,101, 43,171,125, 51,
-187,117, 27,182,224,200, 17, 85,223,241,227,245, 93,251,244,249, 10,122,189, 94, 38,147,137, 48, 51,147, 72,204,204,228,209,151,
- 47, 91, 44,157, 52,201,129,112,220,254, 31,163,163, 53, 79, 17,193,194,184,183,166, 65,163, 41,195,229,139, 7, 81, 84,144,135,
- 75,215, 30,160,190, 17, 44,169, 84,234,109, 52, 26,149, 60,207,167, 83, 74,241,250,235,175, 67, 16, 4,104,181, 90,148,150,150,
-162,160,160, 64, 59,117,234, 84,174,194, 52,225,165,151, 94, 50,105, 86,127,127,127,127,111,169, 84,138,163, 71,143, 66, 34,145,
-236,126,100,136, 37,187, 79,158, 60, 57,108,228,200,145,240,240,240, 8, 34, 21, 99,116,107,211,121,188,216, 51, 65,224,163, 51,
- 29,129,206,225, 67,238, 84, 46,246,204,113, 92, 98,179,102,205, 76,234,119,245, 36, 57, 57, 57, 57, 0,230,187,187,187,239,252,
-228,147, 79, 38,183,110,221, 58,124,222,188,121, 0, 32,121,214,122, 41,138, 34,120,158,127,166, 41, 36, 24, 12, 6,131,241, 15,
- 55, 88,132,144,109,221,186,117, 27, 69, 41,149,112, 28,183,249, 9,115, 5, 0, 72, 77, 77, 77,240,244,244, 92,237,235,235,251,
-120, 1,232,122,154,151,108, 66,200,215, 28, 71, 62,121,244,185,254, 19, 75, 86, 89,218,230, 19, 0, 68, 42,149,109,190,114,229,
-202,167, 25, 25, 25, 89,245, 53,124,213,241, 60, 70, 17, 2,192,238,210,210,216,151, 45, 45,247, 79,110,218,116,224,144,247,222,
-163, 45,123,245,178,113,109,208,128,231,141, 70, 33,254,206, 29,114,126,239, 94,249,249,223,127, 55,147, 16,114, 96,119,121,121,
- 76,125,211,153,150,150, 22, 17,224,239,121,108,248,176,126, 47,249,251,186, 3, 0,226, 19, 51,144, 87, 80,124,172, 62,230, 10,
- 0,146,146,146,116, 0,116,110,110,110,195,118,236,216,177,171,194,244, 84,141, 10,233,164, 82,105, 67, 0, 40, 45, 45,245,217,
-187,119,239, 22,169, 84,154, 86,151,110,116,116,244,182, 57,115,230,140, 78, 72, 72,248, 61, 45, 45, 45,174, 34,221,113,238,238,
-238,171, 50, 50, 50, 70, 39, 39, 39,255, 70, 77,112, 31, 79, 44,246,140,168,243, 59, 85, 0, 26, 87, 46,246,252,180,107, 13, 86,
-165, 98, 94,174,247,221,221,221,219,245,238,221,123, 28,165, 52,231, 89,244, 84, 42,149, 81,167,211,241,130, 32, 72, 13, 6, 3,
- 85,169, 84, 70,118,249, 97, 48, 24,140, 23, 23,242, 87, 62, 77,155, 26, 66,124,178,131,250,211,104,214, 71,195, 20, 77,119,119,
-247, 41,132, 16,127, 83, 53, 40,165,241, 25, 25, 25, 63,212,160,201, 85,126, 95,211, 98,207,212,104, 76, 86,249,251,159,219,116,
-247,174,182,186,224, 71,125,202,179, 97,195,134, 52, 54, 54,214,164, 78,130,117,105,122,122,122,170,164, 82,233,147, 17, 42, 93,
-133, 9,171,212, 32, 0, 36,148, 82,190, 62,233,124,218, 99,244, 56,130, 5,112, 34, 17,135,115,148,219, 5, 64,172,140, 96, 61,
-239,250,249, 12,117,137,171,250, 63,127,127,255,119,130,131,131, 71,223,185,115,103, 71,106,106,234, 74, 19,228,196,255, 82, 58,
-153, 38,211,100,154, 76,243,111,215, 52,129, 86, 0, 42,151,102,171,156, 39,211,233,137,247,122, 0, 85,239, 89,149,159,115, 1,
- 92,171,162, 81,245,251,186,246, 5,128, 60, 0,119, 96,194,170, 40,117, 70,176,254,155, 60,237,114, 40,207, 91,227,137, 8,198,
- 15,207, 81,238,113,232,103,211,221,187,106, 0, 71,254,202,242,124,248,240,225,115, 27,125,145,150,150,166, 5,160,173,163,236,
- 41,128,255,218,224,129,106, 76, 84, 56,254, 55,249, 83, 71,176,248,248,248, 31,186,118,237,250,115,106,106, 42, 15, 6,131,193,
- 96,212,219, 92, 17, 66, 14, 86,220,119, 6, 84, 24,189,131, 79,190,175,220,166,114,187,170,219, 84,106, 60,249,125,109,251, 2,
-192,204,153, 51, 63, 93,180,104,145, 57,128,211,166, 38,152, 99,199,140,193,248,239,241,119,140, 98,101, 48, 24,140, 23,128,199,
-198,232, 73, 35, 84,205, 67,255,128,170,127,107,163, 58,157,202,223,168,250,121,241,226,197, 95, 1,168,215, 74, 48, 82, 66, 72,
-120, 13, 9, 52, 57,244, 87,147, 70,109,255,171, 75,159,105, 50, 77,166,201, 52,153, 38,211,100,154, 47,158,230,243,218,255,121,
- 80,157, 89,123, 34,226, 5, 66,200,193,153, 51,103,126,138,122, 52, 15, 86,138,255,101, 47, 0,225, 76,147,105, 50, 77,166,201,
- 52,153, 38,211,100,154,207,248,234,255,200,178,208,254, 85,223, 87,247, 93,109,239,235,218,215,132,109, 77, 78,243,255, 68, 31,
- 44, 6,131,193, 96, 48, 24,140, 90,200,173, 26,109,170,136, 48, 9, 51,103,206,252,180,106, 63, 41, 0, 58, 0,202,106,162,101,
-127,234,187, 85, 71,100,205,228,109,107,131, 25,172, 26,104, 22, 40, 89,224,237,237,220,242,113,148,175, 98,138, 2, 17,180, 50,
-242, 87,241, 70, 4, 21, 41, 50, 50,139,110,220,137,167,179,107,144,171,179,175, 91,167, 78,174,246, 18, 77,217,114, 65, 20, 58,
- 0, 0, 1,119, 86, 38,179,157,126,242,106,122, 17,158,232, 44, 93, 19, 33, 1, 36, 68, 37,197,199,162,136, 38,132, 0,132,224,
-142,150,199,146,123,113,244,222,179,150, 7, 33,132,132,249, 97,130, 66,105, 62,210,198,214, 46,176, 48, 63,239,161,193,160,219,
- 25,157,136, 95,232, 83, 12, 69, 13, 14, 32,205, 32, 96,134, 32, 66, 38,229,176,252, 94, 34, 61,207,106, 29,131,193,248, 47,241,
-172,253,143,171,187, 38, 63,235,224, 34, 54, 65, 94,237, 92, 3,208,170,138,233,201, 5,112,119,209,162, 69,133,139, 22, 45,170,
-250,221,109, 0, 77, 43,182,203,173,198, 40,233, 43, 62,235,171,217, 70,111,202,182,127,137,193, 10,243, 34,147, 65, 49, 23, 4,
- 20,192,188,168, 84,186,170, 94,251, 7,146,158, 42,169,100, 13, 40, 36, 90,163,240, 33, 21,112,182,218,155,185, 4,157, 85, 50,
-201, 50, 16,136, 90, 94,120, 51, 42,150,158, 48,245, 55,194, 27,146, 62, 82,194,253, 38,138, 84, 38,136,116, 35, 68, 28,180, 52,
-226,194,165, 52,170,173, 79, 90,189,189,157, 91,238, 59,145,249,210,233,109,239,161, 77,179, 64, 80,209, 8, 80, 30,230,193, 31,
-227,228,166,215,209,166,177,247,163,239, 68, 35, 44,155, 47, 67,223,142, 54, 79,125,114,116,234,228,106,111, 38,138,119, 86,173,
-253,205,213, 59,176, 29,161,162, 14,177,183, 14,191,246,254, 39,159,117,235,209,218,163,201,201,171,117,175,241,216,180, 33,121,
- 43,160, 65,163,143,167,125,246, 45,231,238,238,105, 41,242,122, 62, 51, 53,186,197,247,223,206,217,221,180, 33, 89,118,251, 33,
- 93, 99,170,145, 10,245,197, 68,169, 76, 49,194,204,220, 34, 80,173, 46,141, 21,140,198,157,225, 1,210, 62, 75,190, 89,209,172,
- 75,183,190,150,162, 46,139, 51,242, 36,116,251,142,173, 62, 63,252,180,170, 31, 33,100, 16,165, 84,172, 87,166, 5,124,112,119,
-255,132,225, 50,169,132, 4,247,255,213,130, 16,210,187,222, 26, 0,194,253, 72, 24,173, 99, 38,244,138, 43,223,143,145, 9, 52,
-234,105,142, 79,136, 31, 89, 75,128, 32, 0,187, 8,197,182,168,196,103,155, 19,139,193, 96,252,239,225,225,225,113, 58, 61, 61,
-189,219,115,214,108,147,158,158,126,133,149,238,115, 53, 89, 79,114,213,196,237,254,235,212, 55,130,181, 48, 42, 54,213, 14,162,
- 1, 97, 65,254, 11, 0,212,203, 96,169,164,146,141,215,238,100,187,130, 26,240,235,183,239,108,215, 27, 1,158, 55, 64,224,141,
- 16,120,227,163,247,130, 17, 34,175,197,156,229,103, 0,190, 20, 45,155, 53,220, 8,192,205,212,223,144,129,251,237,198,133, 99,
-246,132, 47,198,246, 13,139,166, 38,103,148, 77, 61,113, 53, 35, 47,204,151,204,138, 78,194,250,250,220,196, 79,111,123, 31,155,
-119, 31, 74, 91,249,235,142,251, 34, 40,236, 44,149,141,198, 12,139,242,218,180,251,116,234,138,117,218,251, 84,164,176,181, 82,
- 54, 26, 59, 40,214,251, 89, 14,130, 68, 83,182,252,167, 95,215,187,122,251,248, 16, 99,226, 66,192,168,131,151,119, 63,201,103,
-211,222,114,155,247,205,143,223, 2, 24, 91,107, 52,200,159,132, 6, 53, 12,249,112,227,246,139,222,229,101, 57,250, 83,127,124,
- 26, 71, 40, 53, 58, 58, 6,203,231, 47, 92,106,246,249,172,105,211,131,253,201,149,251,241, 52,186, 14,115,197,133,248, 98,255,
- 87, 95, 45,105,210,163,215, 64, 75, 65,159, 43,209,150,149, 6,173, 89,191,118,110,112, 88,107,243,142,205, 61,229,185, 23, 38,
- 17,117,105, 1, 12,212, 76,217,189,101, 15,107,245,152, 87,140,107, 55,109,157, 2,224,187,122,249, 43,254,255,231, 26, 49,240,
- 80, 1,144,161,190, 29, 8, 31, 61,242,189,123,235,210,233,137,124,225, 53, 64, 52, 84,152, 94, 3, 32, 26, 65,171,252,109,251,
-234,122, 0,152,244, 84,143,186, 4, 47,157, 56,113,205, 45, 59, 59,179,213,242,229, 95,205, 10,245, 35,135, 65,240,219,189, 4,
- 68, 60,141, 41,100, 48, 24,255,155,184,187,187, 11, 25, 25, 25,146,231,169,233,225,225,209, 47, 61, 61,253,208, 51,166,235, 99,
- 0,111, 85,124, 92,147,145,145,177,228, 89,211,213,170, 85, 43, 79, 74,169,107,197,181, 63,235,218,181,107,105,172, 6,252,189,
- 6, 75, 5, 42, 2, 23,134, 0,164,126,195, 21, 43,110,134, 42, 16, 9, 96, 44,195,224, 1, 61,225,232,224, 6, 8,229,128,160,
- 1,120, 53, 32, 60,122,229,229, 38, 3,124, 57,144,123, 24, 60,165,202,122,231,202, 88, 12,228,236,196, 75,237,188, 97,107,165,
-194,251,163, 66, 29, 87,239,123,176,102,205,190,152,158, 0, 70,154,148, 86, 74,209,166,121, 32, 86,254, 90,126,255,247,211, 57,
-189, 1,160,127, 87,199, 35,109, 26,251,120,173, 88,167,189,255, 71, 68, 65, 31, 0,232,219,209,230,112,235,112, 87,111,241, 25,
- 38,108, 21, 68,161,163,119, 64,115,194,167,124, 3,142, 43, 68, 89, 89, 30, 82,227, 55,192,209,165, 55,199,139, 98,231,186,246,
- 55,147, 98,230,251, 31, 47,150,150,151,101,235, 41,159, 35,186, 88,230,201,101, 32, 18,177,252,156, 94,147, 85, 84,246,193,187,
- 99,248, 15,103,126, 53, 19,192,232,218,116, 66,253, 48,101,217, 55, 43, 26,119,104,221,200, 57,235,252,251,164,172, 56, 27, 70,
-106,166, 28,212,165, 3,236,124, 66,197,236, 91,203,136,210,173, 39,236,124,253,145,118,119, 51,146,239,236, 33,157, 90, 15, 83,
-110,220, 34, 31, 83,147,193,106,232, 70, 58,246,126,169,245,118,127, 31,119, 55, 74, 69,136,162, 8, 74, 69,140, 29,217, 7,179,
-126,136, 67,185,134,199,128,158,109, 59, 56,216, 72,116,139, 62,236, 10, 74, 69,164,102,228,171, 79, 93,188,223, 35, 46,157,214,
-249,228, 71,128, 31,155,182,235,214,241,206,213, 75,193,134,140,131,104, 53,116,209,125, 2,156,175, 82,231, 58,222, 60,185, 62,
- 24, 88,255, 84,199,134, 16, 66, 66,124, 33,164, 92, 94, 12,207,230, 19, 36,191,172, 63,226, 84,156,159, 62,118,207,142,159,134,
-255,180,250,151,205, 79,107,218, 24, 12,198,255, 30, 25, 25, 25,207,221,100, 93,188,120, 49,227, 89, 76, 86,171, 86,173, 58, 3,
-248, 38, 35, 35,163,210,108,125,211,166, 77,155, 47, 42,239, 83, 79, 80, 76, 41, 29,125,237,218,181,179,181,105, 78,159, 62,221,
- 29,128,239,245,235,215, 43,127,195,183, 85,171, 86,190,213,109,107,110,110, 46, 52,109,218, 52,233,219,111,191,205, 96, 53,228,
-175, 53, 88,247,179,206,125,208, 92, 95,160, 6,128,251, 38,152,148, 63, 13,181,212, 26,133,197, 27, 86,140, 93, 28, 22,100,135,
-146, 82, 61,142,159, 75,170,136, 96,241, 16, 4,227,227,191,189,219, 57,162, 61, 63, 9,223,109,139, 1, 47,136,139,106,211,124,
- 18,131, 40,190,218,172,243, 43, 59, 68, 74, 21,230,230, 92,113,128,151,131,243,135, 99,154,114,239,143, 10,131, 70,203,191, 18,
-234, 75, 78, 69, 39,210, 95, 77,210, 20,249,106,242, 84,205,119,162, 80,103,222,107,162,105, 35,179, 54, 67,251,118,178,134,177,
- 0, 66,121, 34,244,130,136,204,204,114, 36,100,200, 97, 35,102,155,164, 41,138,104,226,234,234,102,126,241,216,140, 68,103,171,
- 66,185,131,153, 32,151, 19,145,114, 70, 42,209,235,239,107,237,220,123,202, 68, 17, 77,234, 58, 70,102,102, 86,175,119,234,214,
-223, 38,229,228, 91,196,204,171, 47,156,253, 60,145,120, 99, 3,114, 34, 15, 34, 63, 39,153,216,208, 66,152, 55,244, 71,223, 97,
-163,240,205,148,150, 40, 41, 41, 3,201,141,183, 81, 40,148,182, 53,105, 82, 14,163,151,125,253,165,155, 84,202, 61, 42, 79,202,
- 3,212, 8, 80, 35, 74,203,116,208,235,245, 80,201, 41, 44, 84, 20,168,104,134, 21, 4,189,121,147, 30, 51,223, 1,112,165,174,
-188, 71, 38,208,168, 48, 63,114, 30,148, 15,166,130, 6, 4, 56, 31,149, 64, 31,155,158,112, 63, 18,214,162,199,248,119, 9,240,
-227,211, 28,163,240, 6, 24,208, 50,216,210,194,140,191,143,180, 51, 83, 17, 39,168,168, 75,227,183, 48,106,244, 20,243, 95,214,
-172, 30, 72, 8,153, 92,181, 15,218, 95, 49,188,152,105, 50,205,127,170,166,141,141,141, 95,131, 6, 13,190, 48, 26,141,157,229,
-114,185,139,193, 96,128, 40,138, 89, 10,133,226, 92, 82, 82,210,252,226,226,226,132,255,181,188, 31, 62,124,216,100,147,101,138,
-166, 76, 38,195,161, 67,135, 98, 77, 53, 89, 79,106,114, 28,247,219,174, 93,187,176, 99,199, 14, 0,192,233,211,167,209,176, 97,
- 67,139,234,246, 77, 77, 77,181,120,249,229,151,127, 3,224, 85,155,230,195,135, 15,253,190,252,242, 75,236,218,181, 11, 0,176,
-105,211, 38, 4, 5, 5, 85,155,158,219,183,111, 75, 62,255,252,115, 63, 0, 25,127,245, 49,122, 97, 13, 86,197, 26,187,117,117,
-210,139,119,181,146, 53,135,209, 8, 0,241,245,253,177,232, 56,250,117,211, 32, 89,159,147,123,126,236,172, 82,112,152,187,252,
-195,212,220,220,210,182, 82,201,163, 14,131,188, 0,206,206, 86,113,105,209,212,166,222,133,197, 90,252, 30,145,126, 54, 42,158,
-214, 43, 20, 26, 21, 71,143, 3,176,253,255, 27, 36, 9, 26,251,217,241,109,219,190,238,211,100,218,232, 38,216,127, 38,105, 26,
-128, 58,215,170,163,162, 8, 74,249,199,157,218, 43,190,172,104,114,250,255,239, 68, 74, 1,106, 4,173,103,255,196,121,243, 70,
- 72,247,111,219,219,199, 66, 41,253,126,210,219, 19,173,141,249,209, 40, 46, 18,144,149, 87,142,228, 92, 91, 8,102, 1,120, 16,
-117, 69,144,112, 92,157,253,207, 8,135, 18,106, 44,183,178, 51, 51,227, 66, 91,191,227, 86, 28,249,105,137, 82, 98,148,216, 54,
-251,210, 42,251,238,178, 20, 94,151, 83, 70, 56, 24,234,210,177,182,177,105,168, 43, 77,146, 20, 23,229,195,182,113, 40,250, 14,
- 26,136,185,111,134,160,180,180, 28,185,249, 23,105,160,143, 13,209,222,220,130,207, 94, 15, 70,126, 94, 38,244, 70,128, 43,209,
- 22,104,245,218,178,154, 47, 22,248,229,131, 15, 63,121,213,199,211,201,162,114,176, 0, 21, 5, 52, 13,247, 71,175,110,109,112,
-252,210, 69, 92,187,249, 0, 34, 21, 43, 6, 19, 8, 72,203, 41,202,214, 26,132, 13,245,186,120,138,252,163, 72,104, 53, 6,236,
-105,162, 76,141, 27, 19,115,161, 28,179,219,134, 90,189, 57,227,117, 31, 43, 43, 5,129,214, 76,128, 86,107, 68,233,253, 31,224,
-224,217, 24,230, 42, 21,105,222, 92, 35, 5,192,214, 21,100, 48,170, 48, 98,196, 8, 85,118,118,246,153,254,253,251,135,246,236,
-217,211,188,115,231,206, 40, 47, 47,199,209,163, 71,161, 86,171,125,188,188,188,124,142, 29, 59, 54,172, 77,155, 54,209, 94, 94,
- 94, 93,119,238,220,169,125,138,159,169,188, 95, 61,215,206,225, 10,133, 2,151, 46, 93,122,174,145, 44,133, 66,129,171, 87,175,
-198, 62, 77, 36,171,188,188, 92,238,234,234, 10, 7, 7, 7, 8,130,128,242,242,114,236,219,183, 15, 37, 37, 37, 16, 69, 17,102,
-102,102, 88,118,184, 24,218,152, 93, 88,243,253,151, 40, 46, 46,150,215,165,153,151,151, 71, 26, 53,106, 4,157, 78, 7,158,231,
-161,213,106,113,226,196,137,199,159,165, 82, 41, 22,236,202,134,238,193, 54,108,252,101, 25,242,242,242,200,127,171,238,152,232,
- 69,254, 57, 6,171, 50, 67,255,141,140, 9, 2, 63,107,245,134,109,151,102, 77, 29,137, 41,175,247,240,154,255,221,222,158,209,
-241,116, 35, 0,132,250,147,177, 99,250, 5,122,219, 90,200, 48,239,231,235, 0,232,172,103,253,189,200, 36,250, 32, 44,128, 76,
-219,123, 38,249,204,167,111, 54,135,191,151,117,195,128, 0,162,136,139,163,117,247,247, 17,141,176,179, 84, 54,234,223,213,241,
- 8,168, 8, 91, 75,101, 48,168, 0, 91, 43,101,163,190, 29,109, 14,139,148,194,214, 66, 30, 76, 69,211, 39,231,110, 29,174,124,
-219, 76,198,189,109, 97,101,235,253,193,164, 49,102,253,251,191,108,102,161,160,200,143, 62,132, 18, 26, 6,189,133, 5,168,186,
- 8, 9, 15, 35,133,195, 17,215,211,149, 14,110, 31,213,153, 76, 1,103, 51, 82,239, 13,109, 16,216,211, 54,247,250,103, 57,126,
- 61,182,248,114, 16,184,242, 75,195,114, 44,172, 66,229,231,111, 71,242,162,128,139,117,233,148,150,148, 36, 25, 13,112,211, 26,
-101, 86,113, 87,215, 99,230,152, 48, 20, 21,230, 66,171,227, 81, 84,206, 27,220, 28, 13, 74,109,225, 93,232,244, 60,116, 6, 10,
-153,185, 59,142, 93,138,204, 19,121,227,225,154, 52,227, 50,232, 45, 0,150, 85,191, 11,112, 39, 77,103,216,153,221,130,160, 65,
-114, 74, 6, 54,238,190,212,188, 98,187,103,120, 60,229, 65,249,255,191, 70, 87,118,126,127,154,206,237, 33, 13, 72,107, 51, 51,
-217,247,243,102,246, 15,237, 26, 38, 40,137, 54, 19, 4,128,185, 74, 10,157, 74,128,141,202, 31,212, 80, 74,213, 90,109, 81, 84,
- 36,216,204,236, 12, 70, 21,130,131,131, 93,109,108,108,162, 62,252,240, 67,251,161, 67,135, 62, 54, 3, 27, 54,108,192,138, 21,
- 43, 48,119,238, 92, 24,141, 70,172, 94,189,218,124,247,238,221,173,127,252,241,199, 52, 31, 31,159,176,228,228,228, 44, 19, 77,
-149,188,226,222,197, 85,152, 43, 97,222,188,121,116,238,220,185,168,250, 29,165,212,240, 52,233, 87, 40, 20, 80, 40, 20,184,127,
-255,254,115, 49, 89, 50,153, 12,114,185, 28, 10,133, 2, 49, 49, 49,245, 54, 89, 60,207, 75,210,210,210, 80, 82, 82,130, 94, 3,
- 7, 98,197,226,197,232,220,185, 51,122,246,236, 9, 74, 41, 78,158, 60,137,246,118, 15, 96, 63,176, 11,238,221,187, 7,163,209,
-104, 82,203, 84, 90, 90, 26,242,243,243,209,103,224, 64,252,250,211, 79,104,209,162, 5, 26, 53,106, 4, 0, 56,115,230, 12,122,
-120, 36,193,178, 81, 79, 60,120,240,224,191, 86,119,254,155, 94,228,191, 26,193,250,111, 17, 25, 71, 47,135,250,145,131,163,250,
-183, 26, 48,176,123, 40,126,221,118,234,203,208, 80,178, 13, 0, 28,108,148, 11, 95,239,239,143,232,248, 66,156,188,154,113, 48,
- 58,129, 94,126, 30,191, 41, 10,112,116,176, 53, 7, 56, 5,212,122,129,183,182,174,123,218, 3, 17, 20,230, 33, 51, 49,102,232,
- 61,175, 54,141,189,188, 40,229, 43, 70, 12,126,139,177,131, 98,189, 91,133,185,120, 63,106,242, 50,194,186,253, 22, 64,180,168,
- 51, 29,157,154,169,142,125,244,222,212,118,253, 7,142, 50,147,155, 59, 64,212,164,194, 88,112, 7,249, 9,167,161, 51,107,134,
-220,180, 68,108,219,255,123,241,253,132,236, 18,137,132, 59, 46,181,113,249,228,196,137,132,178,186,116,181, 18, 44,154,251,197,
-172,254,219, 54,111,181, 49,115,239,132,135,251,251, 21, 41, 36, 70,165,179, 71, 16, 52,188,149,176,116,221, 65,219,114, 96,113,
- 93, 58,234,242,146, 61, 39, 78, 30, 25, 25,232,214,209, 42, 49,242, 32,212,106, 61,116, 70, 32,188, 69, 55, 8, 34, 85, 16,142,
-136,214, 18, 9,201,206, 46, 0, 49,138,217,231,110, 38,102,158,191, 22, 47,209,113,117,107,255,169,210,201, 37,239, 13,236,217,
- 20, 16, 52, 24,212, 43, 28,203,215,157,156, 10, 96,252,179, 25, 44, 35,168,160, 1, 5, 58,134,249,145,159, 41,208,241,198,225,
-229,193, 45,251, 78, 67,125, 34, 88,225,126,164,111,227, 96,247,245,203,191,156,101,111,239,236, 37,129,160, 1,225, 75,168, 88,
-112, 25,210,242,135,176,246,236, 15,193,166, 3,126,249,105,105,153, 40,210,109,244,175, 92, 45,157,193,248, 7,162,213,106,247,
- 44, 94,188,216,126,192,128, 71,163,221,203,202,202,112,241,226, 69,172, 89,179, 6, 22, 22,255,127,157,164,148,162, 95,191,126,
-160,148,218,207,153, 51,103, 15,128,118, 53,105,118,232,208, 97,224,183,223,126,155,210,170, 85,171,135,120, 52,199,145, 28,128,
- 4, 0, 61,113,226, 4, 7, 0,173, 91,183, 22,174, 94,189, 42, 2,160,163, 71,143,150, 89, 90, 90, 54, 44, 43, 43,139,120, 90,
-131,165, 80, 40,144,158,158,254,204, 38, 75, 38,147, 61,214,147,203,229, 72, 79, 79,175,151,201,226,121, 94,250,199, 31,127,224,
-230,205,155,152,215,188, 57,222,119,115,131,131,131, 3, 34, 34, 34, 64, 41,133,133,133, 5, 10, 10, 10,176,109,219, 54,116,235,
-214, 13, 60,207,203, 77,209,221,183,111, 31,110,220,184,129, 5, 45, 91, 98,170,133, 5,108,109,109,113,230,204, 25, 0,128, 82,
-169, 68,122,122, 58, 78,156, 56,129,174, 93,187,178, 74,253, 87, 27,172,174,132, 72,137, 23, 92,141, 6, 13, 40, 79, 1, 2,247,
-208, 80, 34,143,142,174,255, 83, 2, 7,124,182,114,221,193,254,203,103, 13, 34, 19,134, 55,119,159,255,227,233,201, 0,240,230,
- 43, 65, 30,230, 74, 41, 86,110,139,166, 28,240,217,243,200, 96,104, 40,145,115, 28, 38,247,234,208, 8, 25,121,122,196,167, 20,
-159,138, 78,160, 38, 53,233,156,220, 56, 6,155,246,156, 73, 93,177,254,207, 35, 6,215,239,187,145,178,108,163,246, 62, 5,133,
-173,153, 44,120,252,160,246,117,142, 34,108, 29,174,124,123,198,180,105,237, 6,191,246,137,153, 49,109, 47,116, 73,127, 0,130,
- 26,234,114,130, 18, 62, 16,153, 41,105,152,183,124,107,170,206,200,189,122, 61, 90, 91, 47, 99,249,224, 1, 45, 11,245, 39, 67,
- 23,127,253,197,241,175,230,205,177, 84,166,159, 44,145, 73, 81,206, 57,116,150, 45,252, 98,149,180,180, 88,255,114, 92, 50, 45,
-173, 75, 71,199, 97,241,215,203,190,235,255,214,152,161,247,131,188,186, 58, 8, 89,241, 14,234,226,226,156, 45,135,111,184, 86,
- 60, 57, 18, 0,136, 75,204, 71,110, 65, 57, 47,240,198, 8, 43, 3,230, 71,165, 81,147, 71,255,249,187, 16,167,161,253,155,188,
-230,100,171,128,166,188, 16,206,118,114,244,238, 24,240,154,191, 11,153, 17,159, 77,115,159,246, 56, 87, 54, 17, 94, 90,211, 61,
- 24,162, 33,152,138, 70,232,147,127,171,191, 14, 48,109,218, 72, 31, 27,123, 11, 61, 71,132,114, 64,102, 7, 40,156, 8,103,230,
- 11,137,153, 55,146, 98,175,243,211,222, 25,153,159,148,148,181,214,145, 98, 9,187,132, 48, 24,127, 38, 57, 57,249,245, 79, 63,
-253,244,124,155, 54,109, 92, 28, 29, 29, 17, 30, 30,142, 3, 7, 14,224,163,143,254, 63, 24,223,172, 89, 51, 0, 64,126,126, 62,
-190,254,250,235,172,140,140,140,215,107,211,140,138,138,186,255,219,111,191,117,108,210,164,137, 94, 46,151, 23, 86,154,172,228,
-228,100,105,121,121, 57,209,235,245,212,194,194, 66, 84, 42,149,198, 17, 35, 70, 24,174, 94,189,218,176,188,188, 60,249, 89, 34,
- 88, 45, 91,182,188, 91, 84, 84, 84, 76, 8,121,230, 41, 28, 42,205, 85,112,112,176,147, 94,175, 23, 0, 20, 60,205, 20, 14, 60,
-207,163,101,203,150, 56,113,246, 58, 14,159,189,139,178,220,120,140,126,185, 55,130,131,131,113,244,232,209,167, 62,102, 45, 91,
-182,196,137, 19,231,113,230,122, 12,178,147,163, 49,102,212, 16, 52,106,212, 8, 39, 78,156, 96, 21,250, 89, 13, 86, 93, 33,185,
- 16, 31,210,212, 37, 92,177,233,179, 65, 1,161,210,240,185, 32, 82, 51,236, 93,127,160,195,172,175,126,190,223,216,131,140,190,
-107,194,104,175, 63, 69,177, 30,117, 76,222,122, 59, 58,248,181, 65,157,189,240,235, 78,243,217, 0,240, 74, 47, 63, 92,141,206,
-197,149,200,156,173, 81, 79, 57,103, 81, 85, 26,187, 16,115, 88, 96,235,215,159, 12,238,234,227,233,138, 53, 59,206,131, 80,236,
- 49,233, 70, 75, 41,109,211,196, 27, 43,214, 63, 57, 98,208,205,123,217, 70,237,253,163, 23, 74,250, 2,192, 75,237, 44, 14,183,
- 10,177,247,174, 43,146,161,146,113, 19,250, 14,122,221,140,207, 62, 10,177, 96, 39,100, 10, 57, 52,229, 2, 50,115,116,208,152,
-155,225,212,185, 8, 77,153,154,159,118, 39,150,127,170,168, 93,116, 60,141,111, 22, 68, 82,202, 53, 26, 55, 75,251,128,114,142,
-128,150,233,101,244, 70,116,122,121, 84, 50,141, 49, 69, 35, 46,142,234,219,121,146, 78,191,108,220,249,133, 76,166,120, 69, 34,
- 1,113,182,181,112,250,121,229, 2, 88, 89, 89,130,242,165,160,186, 60, 12,125,243,171,220,187, 15, 13,126, 0, 16, 20, 68, 44,
- 59, 55,149,111,148,114, 36,237,212, 77,253,231,117,134,128, 37,152, 52,122, 80, 83,153,104, 44,199,123,115,182,227,151,133,131,
- 48,102, 96,136,236,143, 83, 15, 38, 1,152,255,244, 97,202, 71, 77,132,237, 38,156,189, 79,128,243, 20,232,120,253,224,194, 96,
-192,244,150,199, 22, 45,136, 76, 42, 37, 33, 33, 30,122,153,144,182, 13, 68,229, 65, 37,142, 93, 1,139,134,132, 90,134,227,135,
-149, 95,148,253,186,102,205, 49,145, 96,222,253,196,218,167,188, 96, 48,254,173, 80, 74,227,109,109,109,251,244,235,215,239,228,
-209,163, 71,237,195,195, 31, 45, 55,119,227,198,141,138,243,236, 81, 83, 84,118,118, 54, 94,125,245,213,188,204,204,204, 62,148,
-210, 90,251,244,150,150,150, 38,236,221,187,215, 69,163,209,180,250,252,243,207,179, 27, 52,104, 80,106, 52, 26,105,105,105, 41,
-120,158,167, 78, 78, 78,178, 22, 45, 90,144,176,176, 48,205,201,147, 39, 29, 82, 83, 83, 75, 1, 36, 61, 77,250,223,122,235, 45,
-236,222,189, 27, 0,240, 60,230,197,146,203,229,232,215,175,159,199,197,139, 23,211, 43, 52,175, 60, 67,217,226,206,157, 59, 56,
- 23, 43, 64, 97, 97,135,164,251, 37, 56,241,251,126,140,158, 48, 17, 60,255,244,189, 21,110,223,190,141,109, 39,110,195,197, 35,
- 0,197,186, 59,216,183,111, 31, 38, 79,158,252, 76,154, 79,153, 63,242,194,245,193,170,204,216,147,255, 12, 8, 32, 10,165, 30,
-115,122,183,245,248,100, 68,143, 0, 9,175,206,128, 40,138,144, 0,112,180,226,176,238,215, 95,252,118,238, 61,116,169,177,183,
-228, 59,232,197,207,238,102, 83,117, 61,194, 88,115,190,221,112,225,149,223, 22,116,145, 78, 30, 30,108, 15, 0,114, 25,135,149,
- 91,163,120,112,152,243, 44,153,106,231, 73, 84,101,114, 76,112,245,181,153, 61,235,157,254,246, 93,219, 4, 33,226, 82, 36,190,
-219,124,233,172,194, 14,155,234, 19, 21,169,218,161,253,209,119,213, 4,191,104,221,149, 80, 16,169,171,194,220, 17,218,164, 67,
-144, 42,148,224,121, 3,114,179,213, 72,204, 18,161,114,151,225,234,157,100,205,144,215,134,254,241,180,121, 38,132,144,142,205,
- 84,238,115, 22, 46,245,212,104, 74,249,146,162, 60, 94, 42,191, 36, 53, 55, 83,102,213, 71,231, 82, 26,213,118,105, 38,111, 1,
- 42, 74,148, 18,170,158, 53,109,156, 69,250,131,163, 8,116,202, 0, 1,133,153,123,127, 88, 89, 72,228,157,154,202, 83, 0,192,
-215,193, 70,241,245,252,143,108, 62,152, 49,239,156, 41,209,196,198, 65,174, 31,132, 7,218, 35,226,202, 61,156,189,150, 28,117,
-246,242,131,176,110,173,221, 17,228,103,251,126,104, 40, 89,252, 52, 17,209, 71,199,224, 81, 19, 97,229, 40,194,112, 63, 18,214,
-106,192,231,213,142, 30,172, 9,223,155, 16, 31,248, 81, 16, 34, 1, 5, 1,180,233,224, 83,127,131,196,111, 42,221,179,127,161,
-102,205,175,107, 22, 68, 39, 82, 22,181, 98, 48,234,160,168,168,232,142,185,185,121,239,166, 77,155,110,120,239,189,247,172, 94,
-123,237, 53,247,183,222,122,139, 3,128,236,236,108,113,197,138, 21, 25,223,127,255,125,113, 94, 94,222,120,131,193,112,215,148,
- 7, 94, 66,200,197,117,235,214,229,158, 63,127, 62,172,109,219,182,230,173, 90,181, 18,157,157,157,229,106,181, 90, 72, 77, 77,
-213, 92,186,116, 73,136,141,141,181, 41, 42, 42,138, 5, 16,247, 52,205,247,238,238,238,224, 56,110,190,151,151,215, 23,233,233,
-233,141,159, 71, 31,172,192,192, 64,119, 0,177, 30, 30, 30,129,245,109, 30,252,143, 27,182, 84,138,194,194, 66,148,166,197, 65,
-157,159,135, 70, 18, 53,154,217, 59,194,202,202,234,153,204, 80,113,113, 49,164,186,108,196,223, 73, 70, 81, 86, 18, 66,125, 90,
-194,194,194, 2, 58,157,238,239, 48,232,228, 69, 57, 15,106,108, 34, 12,243, 34,147,237, 20, 88, 49,110,132,159,220,207,199, 19,
-250,220, 27,184, 21, 87,134,207,215,182,142,150,200,173,116, 83,198,246,106,209,173,167, 19,186,116,109, 77, 26,248,216,190,191,
-120,241,170,119,195,188,201, 71, 81, 41,116,165, 41, 63, 28, 21, 71, 19, 66,252,200,154,211,215,210, 39,121, 58,105, 64, 65,113,
-250,122, 38,238,198, 21,174,185,151, 64, 19,234,147,137,176, 64,210, 83, 74,184,237, 84,160, 42, 27, 43,139,210,102,157,131, 29,
-123,118,108,194,245,233,214, 10,114, 41,112,254,202,109, 76, 91,184,231,178,168,160,253,111,220, 48,173,121, 16, 84,252, 15,227,
-244,104,196, 32,255,167, 17,131,148, 82, 10,145, 71, 93,243, 77, 74, 56,146, 85,158,125,221, 85, 97, 21, 10, 67,254, 41,100,103,
-151, 33, 42,222,128,255, 99,239,186,227,163, 40, 30,239,155,221,171, 73, 46,189,222, 37, 33, 64,168, 9, 37,141, 14,210,171, 20,
- 81, 16, 16, 65, 80, 80, 64, 80, 65,165,137,244,162, 8, 34, 69,154, 10, 88, 64, 58,130,244, 18, 58,132, 4, 66, 73, 32,148, 64,
-218,165,247,114,125,119,126,127, 36,151,111, 8, 41,151,128,141,223,190,207,231, 62,119, 91,238,237,204,206,236,206,155, 55,173,
- 0,222,200, 78, 76, 4,165, 92,252,220,185,187,106,253,132,184,184,184,184,213,111,212,184,193,154,205,187, 97,208,229,226, 81,
-212, 22, 20,228,165, 96,209,210, 63, 26,120,121,121,117, 78, 76, 76, 60,107,177, 88, 3,105,124,234,244,118, 55, 80,128, 21,201,
-240,231,166,157,200, 16, 89,193,197, 94, 2, 94,155,134,241,227, 70,218,247,123,117,164, 61, 0,196, 63,140, 68, 29, 39,203,116,
-181, 33, 7,175,191, 57,166,137, 3,184, 34,252,188, 63, 82,203, 16,244,249,249,143, 59, 15,187, 6, 59,200,223,236,233,227,184,
- 96, 99,206, 27, 0,182,215,234,161,228,185,167, 70, 17,214,102,244,224, 46, 74, 57,191,250,228,225,246,147,233,138,161,253,130,
-172, 36, 34, 66,168, 54, 9, 60,145,144,239,214,253,148, 47, 37,216, 36, 20,157, 2, 4, 88,134,162,162,162, 8, 66, 72,139,207,
- 62,251,108,196,172, 89,179, 94,177,177,177,169, 15, 0,133,133,133,177, 70,163,241, 28,128,237,148, 82,174, 6, 5, 47, 5,240,
-128, 16, 18,251,240,225, 67,247,159,127,254,217, 1,128,188,228,176, 22, 64, 14,128,212,154,112,150,135, 89, 76,169, 84,170, 47,
- 95,212,125, 48,139, 41, 79, 79,207,134,181,249, 63,203,178, 28,195, 20,175,236, 35,147,201,112,254,252,121,244,237,216, 9,145,
- 39,227,208,212,221, 27, 93, 71,190,131,253,103,206,128,101, 89,243,249, 53, 42, 71, 68, 34, 17, 46, 92,184,128, 33,253,187, 96,
-255,254,253,240, 13, 9,192,228,201,147,113,244,232, 81,136, 68,194,106,122,127,137,192, 2,197,130, 19,191, 47,145,128, 55, 98,
-247,111, 95,227,196,181, 34,253,189, 36,204,110,146,136, 85,187,145,207,167,101,236,249,224,207,208, 71,203,199,142,233,111,221,
-173,115, 79,116,123,165,171,168, 89, 64,231, 57, 0,190, 43,227,170, 52,175,106,174, 12,206,136,133,155,246,220,125,255,247,195,
- 49, 4,166,124, 12, 27,216,138,114, 70, 44,172,198,169,121,134,211,222, 90,241,251,133,243,151, 29,193, 21, 32,229,241, 25,185,
-135,123,125,128, 26,113,255,126, 12,214,254,180,159, 15,189,124,239, 23, 61,139, 41, 15,163,104,161,165,156,197,138,202, 4,123,
-133,244,153, 17,131, 14, 86,226,166,189,218,217, 28,161,148, 82, 91,107,113,211,138,230,198, 42,207,169, 53,242,155,126,217,182,
-249,155,119,223,125,207, 38, 83,151,132,152,132, 59,208,178,158, 96,173, 27,224, 78,248, 49,141,198,200, 87, 59,117, 68, 85,247,
- 51, 35, 35, 35, 45, 34, 60, 11,191,111, 93, 10,163, 81,135,180,228, 98,141,154,156,154, 7, 59, 59,207,203, 53,225, 52,152,248,
-220,215, 7,143,151, 88,201, 97, 53,242,205, 87,165, 15,213, 58, 4, 53,177, 45,206, 22,134, 12,220, 13, 61,143,174,110,197,157,
- 33, 31,222,101, 81,167,173,202,162,112,218,218, 74,166,244,237,228,137,216,184, 20,156,143, 72,218,246, 40,137,170,125, 61,201,
-182,135,241, 57, 31, 12,234, 90, 7,223,254, 18, 53,185, 50,129, 85, 25,103,201,104,193,142,160, 70, 80,147, 22, 20,232,216,188,
- 62,105,102,201,200,193,138, 56, 69, 12,222, 90,249,251,147, 47,118,135,166, 15,250,252,189, 78,118, 29,218,245,149,130, 55,210,
-252, 34,157, 49, 42,150,230, 61, 79, 26, 61,135, 59, 41,112, 10,156,255, 73,206, 18,177,243, 75,201,231, 69,114,170, 81,110, 94,
-166,231,141,123,217,230, 64,181, 90,205,170, 84, 42,174,186, 78,238, 22,112, 94, 45, 43,180, 74,220,171, 42, 93,172, 10, 56,213,
-109,218,180,113, 26, 48, 96, 0, 76, 38, 19, 30, 60,120,128,184,184, 56, 12, 24, 59, 6,142,142,142,184, 26, 21,133, 7, 15, 30,
-224,203, 47,191,132,201,100, 66, 88, 88, 88, 98,117,156, 98,177,216, 16, 16, 16, 32,121,237,181,215, 96, 50,153,240,232,209, 35,
- 60,121,242, 4,147, 39, 79,134,189,189, 61,162,162,162,240,232,209, 35,124,249,229,151,208,233,116,136,141,141, 53,252, 29,121,
-233,255,143,192, 34,224,192, 27,145,123,109, 46, 54, 28,130,193, 96, 66,211, 59, 9,244,113,153, 51,214,183,244, 34, 7,111,222,
-185, 27, 27,113,181,155, 20,121,183, 0,160, 70, 53,135,152, 4,154,220,170,137, 40, 31,166,124, 59,164, 31,193,227,164,252,130,
-152, 4,154, 92, 11,247,130,128, 43, 2,114,195,177,255, 80, 40,100,242, 27,184,118,253, 46,119, 41, 34,230,119,134, 98, 97,212,
- 99,122,191,230,156, 20,138,224, 85,120,103,224,195,226, 17,131,212, 8,202,155, 96,223, 97, 59,198, 12,108, 95,167, 85, 83,135,
- 58,224,141,160,212, 8,199,238,103,128, 47,228, 85,242,133,221,214,109,238, 20, 40,127, 35, 63, 47,163, 77,207,174, 93,108, 92,
- 27,191,137,220,251, 81,184,115,253,132, 38,252, 86,204,229,176,219,186,205,207,147,144,158,158,158,175,116,239,222, 4,195,222,
-153, 9,131, 46, 7,143,238,252,132,252,188, 20,156,191,168,192,221,248,188,118, 0, 44,118,176, 46,221, 54, 54, 3,128,142, 45,
- 36,241,118, 82,189,199,168, 33,253, 33, 19,105,193, 27,243, 65, 12, 25,120,152,101,200,125, 99,110, 34, 7, 0,214,114, 34,178,
- 17,229,218, 89,194,235,239,235,220,200, 90, 98,196,207, 7,238,128, 39,197,203, 44,241, 4,235,127, 62,248,240,131,133, 31, 6,
-193,223,215, 49,192,220, 0,111,113, 58, 1,147,194,255,152,223, 84,123,103, 14, 40,111,196,133,229,142, 77, 59,125,150, 61, 9,
-181,156, 97,253,214, 67,154, 4,224, 3, 63, 31,178,241,163,197, 71,231,132, 52,143,234, 56,237,131, 65,118, 32,194,194,232, 2,
- 4, 8,248, 71,156,192,247,167, 79,159,190,145,101, 89, 87, 0,132, 82, 10,157, 78, 39,250,225,135, 31,196, 38,147,137, 97, 89,
-150,147,203,229,166,136,136, 8, 35,207,243,233, 6,131,225,253,234, 56,245,122,253,195,181,107,215, 54, 48, 26,141,165, 35, 14,
-117, 58, 29,126,249,229, 23,232,116, 58,200,100, 50, 40, 20, 10, 60,122,244, 8,132, 16, 3,199,113, 15,133,148,120,145, 2, 11,
-152,223,225,245,185,115, 65, 65, 64, 48,175,156,184, 2, 0,220, 76,164,234,102,222,228,147,102,129,157,231,150,136,178,249, 53,
- 13,128,150,227,134,180, 10,110,188, 3, 0,116, 60,247,118,109, 34,145,167,213,188, 25,216,186,221,239, 60,165, 34, 19, 71,127,
- 96, 24,236,209, 2,209, 15, 99,171, 31, 57, 87, 25,212,201, 57, 17,125, 59,218, 83,243, 18, 56,165,205,130, 37,211, 49, 80, 74,
-255,183, 12,221, 23,114,100,100,234,170,237, 77,125,254,134,182, 87,235,230,178,113,199,206, 94, 31,207,241,212,131,101, 72,138,
-214,200,111,122, 94,113, 5, 0,137,137,137,103,253,125,201,241,155, 29,221,123,185,148, 76,179,154,145, 3,100,228,226,120, 98,
- 98,254,217,218,112,102,107,140,131,102, 45, 63,240,135, 84,196,138, 0, 10,158, 47,142,175,214,192,101,153, 69, 88,203, 70, 68,
-245,217, 15,166, 29, 44, 75,226,170,227,187,122, 43,249,219, 97,159,157,252,244,206,131,236, 31, 30, 39, 22,215,124, 30, 39,210,
-219, 13, 61,201,156,135, 9,249,159,222,126,144,253, 77, 77,251, 77, 16, 96, 93,171,129,115,159,217,247,188,247, 51, 58,142, 70,
- 2, 24,220,172, 30,233, 57,108,194,154,105,132, 64, 88, 38, 66,128,128,255, 71, 48,187, 88, 12,195, 44,120, 81,156,102, 23, 11,
-192,131, 26,252,231, 42,128, 22, 47, 50,110, 17, 17, 17,153, 0, 50,133, 84,254,107, 65,254,202,105,124, 4,219,188,148,147,121,
- 78, 58,190, 38,225,108,212,168, 17,125,240,224,129, 69,157, 5,133, 52, 18, 56, 5, 78,129, 83,120, 39,191,144,119,242,243,118,
-206,166,255,223,211,232,101,131,208,236,241,247,128,255, 59, 47,118,255,254,125, 34,220,114, 1, 2, 4, 8,248, 91,223,201,194,
-164,195, 2,158, 2, 35,220, 2, 1, 2, 4, 8, 16, 32, 64,128,128, 23, 11, 2,160,121,133, 82,188, 6,214, 31, 33,164,121,141,
-165,126, 53,252, 2,167,192, 41,112, 10,156, 2,167,192, 41,112,190,124,156,213,113,191, 44, 77,143, 66, 31, 44,129, 83,224, 20,
- 56, 5, 78,129, 83,224, 20, 56,255,113,206,151, 13, 66, 19,161, 0, 1, 2, 4, 8, 16, 32, 64,128, 32,176, 4, 8, 16, 32, 64,
-128, 0, 1, 2, 4,129, 37, 64,128, 0, 1, 2, 4, 8, 16, 32, 8, 44, 1, 2, 4, 8, 16, 32, 64,128, 0, 1,130,192, 18, 32,
- 64,128, 0, 1, 2, 4, 8,248,215,224, 47, 29, 69, 40, 64,128, 0, 1, 2, 4, 8, 16,240,255, 17, 12, 0, 16, 66,104,201,167,
-179,112, 75, 4, 8, 16, 32, 64,128, 0, 1,127, 55, 94, 54, 45, 82,186, 84, 14,165,148, 16, 66, 40,158,127, 61, 37, 1, 2, 4,
- 8, 16, 32, 64,128,128, 26,227,101,210, 34, 76, 89,229, 8,160,139,144,188, 2, 4, 8, 16, 32, 64,128,128,127, 2, 47,147, 22,
-121,202,193, 18,146, 86,128, 0, 1, 2, 4, 8, 16,240, 79,225,101,210, 34,194, 40, 66, 1, 2, 4, 8, 16, 32, 64,128,128, 23,
- 12, 97, 20,161, 0, 1, 2, 4, 8, 16, 32, 64,192, 11,134,224, 96, 9, 16, 32, 64,128, 0, 1, 2, 4,252,151, 4, 22, 33,164,
-185,192, 41,112, 10,156, 2,167,192, 41,112, 10,156, 2,167, 32,176, 4, 8, 16, 32, 64,128, 0, 1, 2, 4, 8, 2, 75,128, 0,
- 1, 2, 4, 8, 16, 32, 64, 16, 88, 2, 4, 8, 16, 32, 64,128, 0, 1,130,192, 18, 32, 64,128, 0, 1, 2, 4, 8, 16, 32, 8,
- 44, 1, 2, 4, 8, 16, 32, 64,128,128,127, 8, 4, 64,133, 35, 1, 40,165,183, 45, 38,169,197,104,130,234,248, 5, 78,129, 83,
-224, 20, 56, 5, 78,129, 83,224,124,249, 56,171,227,174,137,254,248, 87, 11,172,191,114,162, 81, 66, 72,243, 23,125,163, 4, 78,
-129, 83,224, 20, 56, 5, 78,129, 83,224,124,249, 56, 95, 54, 8, 77,132, 2, 4, 8, 16, 32, 64,128, 0, 1, 47, 24,162,127,234,
-194,132, 16,166,140,192,227, 1, 80,250,156,118,218, 95,193, 41, 64,128,128, 23,131, 87, 2,201,116,169, 68, 60, 86,107, 48,126,
-117,225, 6,253,169, 75, 48,113, 54,241, 88, 38,151,136, 58,233,244,166,175,207, 71,210, 31,106,248,188, 63,181, 40,172,240,172,
- 63, 63,122,245,234, 53, 30,192, 92, 74, 41,229,121,126,246,169, 83,167,182,189,136,119,189,135,135,199,112, 0,214, 0,192, 48,
- 76,110, 82, 82,210, 46, 75,254,219,165, 75, 23, 81, 65, 65,193, 19, 0,158, 37,187,238, 71, 68, 68, 52,174,238,152,128,154, 35,
- 60, 60,156,250,248,248,160, 69,139, 22,247, 82, 82, 82,214, 80, 74,215, 11,119,229, 95, 36,176,154,184, 89,181,173,235,237,250,
-234,145,240,184,217,213, 61,112,158,158,158,203, 92, 93, 93, 39, 20, 21, 21,105, 1, 80,134, 97,168,159,159, 31, 8, 33, 48,191,
- 55, 57,142, 75,191,123,247,110,115, 75, 31,226, 23,197,217,184,113,227,112,134, 97,188,202,190,191,171,251,205,243,124, 98, 84,
- 84, 84, 72,117,225, 84, 42,149,189, 25,134,153, 81,221,121, 60,207, 47, 75, 78, 78, 62, 86,213, 57, 45, 90,180,184,110, 99, 99,
-227,206, 48, 76,165,171,143,151, 45,115, 76, 38, 19, 45, 42, 42, 74,189,115,231, 78, 80, 77,211,214,211,211,115, 54,165, 52, 8,
-192,214,228,228,228,195,148, 82,238,121,242,138,167,167,231, 27,148,210, 47, 74,238,225,162,164,164,164, 61, 53,249,127,163, 70,
-141,194, 37, 18,137, 23,203,178,164,124,154, 84,180,205,243, 60,213,235,245,137,247,238,221, 11, 17, 30,251,191, 31,237, 3, 73,
-219, 38,245,148, 95,126,248, 86, 87,124,186,236,247, 15, 59,182, 32, 25, 86, 54,146,245,111,116,108,224,224,239,235,128, 5, 27,
- 47, 79, 1, 96,177,192, 34,132, 16,111,111,239, 64,119,119,247,122, 26,141,134, 3,128,102,205,154, 81,150,101,159, 58,207, 96,
- 48, 24,238,222,189,123, 88, 72, 1, 11, 11, 4,145,232,203,131, 7, 15, 42,121,158, 71,191,126,253,230, 1,216,246, 2,104,137,
- 76, 38,179,122,252,248, 49,140, 70, 35,227,227,227,163,168, 97, 25,229, 18, 17, 17, 1,131,193,160,111,215,174,157, 79,217, 99,
- 82,169,212,229,210,165, 75, 0,160, 15, 14, 14,246,169,109, 0,253,253,253,109,108,172,172,166,178,132,244,224, 40,109, 10, 0,
- 44, 33,119, 57, 74, 79, 22,106, 52, 43,163,162,162, 10, 95,246,180, 63,113,226, 4,198,143, 31,143, 91,183,110, 53, 57,124,248,
-240,247, 42,149,106, 82,114,114,114, 87, 74,105,186,240,100,252,195, 2,171,161, 82,209,196,195,197,249,208, 87,139,231, 3,192,
-236,170,132,144, 82,169,252,170, 83,167, 78, 99,127,253,245, 87,155,125,251,246,217,212,171, 87, 15, 18,137, 4, 44,203,130,101,
- 89, 48, 12, 3,150,101, 49,104,208, 32, 98,169,184, 42,203,121,234,212, 41,155,198,141, 27,151, 22,178,148,210, 82,145,213,175,
- 95,191,106, 57, 25,134,241,186,126,253,186,155, 92, 46, 47,253, 63,207,243, 79,125, 40,165,165, 31,142,227,208,169, 83, 39,139,
-238, 19,195, 48, 51,162,163,163, 95, 41, 44, 44,124,138,195,124, 13,243,239, 87, 94,121, 5, 0,142, 85,195,165,186,120,254,148,
- 27, 49,196, 2,166, 44, 80,214, 9,144,214, 7, 24, 89,133,231,103,101,101,161,107,215,174,108,109,210,215,213,213,117, 84,104,
-104,104,195,199,143, 31,191,182,100,201,146, 76,149, 74,245, 61,128, 31,213,106,117, 66,109,248, 40,165,139, 98, 99, 99, 27, 81,
- 74,225,235,235,187, 16, 64,141, 4, 22,203,178, 94, 39, 78,156,112,147, 74,165,165,233, 92,217, 55,199,113, 48, 24, 12,232,211,
-167,143, 73,120,228,255,161, 23, 13,193,194, 97, 3,123, 66, 99,100, 96, 52,154, 92,149,174,182,191, 76, 25,213, 89, 12,170,199,
-182, 63,174,195,104,226,127,170,169,184,234,219,183,175,207,250,245,235, 69,209,209,209, 34, 63, 63, 63,112, 28, 87,250,225,121,
-190, 70,207,165,128, 82,129, 69, 24,134, 65, 82, 82, 18, 20, 10,133,125,215,174, 93,213, 28,199,205, 58,119,238,220,182, 23,125,
-173,242,206, 22, 33,164, 80,173, 86,111,255,187,227, 28, 24, 24,216,201,206,218,250,247,249,115, 63,113,107,218,172, 57,227,236,
-234,140,135, 15, 19, 33, 21,209, 14, 15,239,221,111,179,112,233,119, 31, 4, 6, 6, 14,187,113,227,198,249,151, 45,189,125, 94,
-255,225,123,222,100,152, 80,188,229, 0, 96, 19,242,243,243,241,222,123,239,225,192,129, 3,126,109,219,182, 93, 6, 96,172,240,
-100,252,131, 2,171,129,167,149,167,173,204,230,248,198, 13,107,136, 49, 63,213,177,154, 7,106, 81,167, 78,157,222,254,245,215,
- 95, 29, 9, 33, 56, 53,249, 93, 56, 24,180, 80,125,249, 53, 28, 93, 92,161,159, 49, 30,182,156, 9, 45, 78, 71,214,228, 33,125,
-138,243,222,189,123,200,202,202,130,171,171, 43,172,173,173, 33,147,201, 32,145, 72, 32,149, 74, 45,229,132, 92, 46,199,137, 19,
- 39, 32, 18,137, 74, 63, 44,203, 86,184,237,238,238,110,241,189,226,121,126, 89,211,166, 77, 91,198,196,196,216,101,103,103,163,
- 93,187,118,121,132,144,155,101,132, 71,203,155, 55,111,218, 89,252,146, 50,196,162, 32,126, 3,104,246, 30,192,225,117,112,118,
-195,160, 69,253,167, 10, 25,179, 40,228,184,218,155, 78,233,233,233,134,115,231,206, 33, 48, 48, 16,191,255,254,187,115,118,118,
-246,151, 91,183,110,253, 66,165, 82,205, 86,171,213,203,106, 65,233, 4, 0,247,238,221, 3, 0,199,218,132, 73, 42,149,226,202,
-149, 43,160,148,150,138,114,134, 97,192, 48, 12, 14, 62,112, 65,161,158, 65, 81,234,109, 76, 25,224,131,122,245,234, 61,227,106,
- 9,248,123,208, 41,128,244, 11, 9,108,222,214,199,187, 14, 66, 47,133, 65, 34, 21, 59, 76, 28,221, 31,182, 10, 17,150,255,248,
- 39, 31,159,152,245,225,249, 72,186,205,194,103,147, 40,149,202,150,189,122,245,242, 94,191,126,189, 4, 0,110,223,190,141,228,
-228,100,184,185,185, 65, 46,151, 67, 44, 22,131,101, 89, 72, 36, 18,225,230,215, 0,193,193,193,205,122,247,238,109,195,113, 28,
-138,138,138,176, 97,195, 6,123,185, 92,110,223,191,127,127,139,157,172,138,154,237, 0, 52,213,233,116, 26,165, 82,105, 13,128,
-103, 24,166,160,188,179, 5, 0, 74,165,210,166, 2, 74, 19,128,140,224,224, 96, 79, 0,210, 18,190,210, 99,122,189,190,178, 99,
-150,198,185, 67, 72,160,223,225,133,139,230,218,164,164,222,135,189, 93, 10,120, 99, 26,190,255,254,123, 88, 89,217, 97,222,188,
- 89,162,253, 33,193, 30, 31,127, 50,243, 80,171, 86,173,250, 92,187,118,237,242,203,148,230,188,201, 48, 33, 32,164,125,233,246,
-182, 19,171,161,179, 15, 66,210,188,121, 88,181,106, 21, 26, 53,106,212, 90,120, 50,254, 65,129,213,188,142,189,131,140,136,143,
-255,176,126,165, 20,134, 66,199,123,215, 46,162, 89,223,247,205, 98,225,118,217, 23, 35, 0,198,221,221,125,226,246,237,219,237,
-204,133, 93, 99,194,193, 1, 6,212,245,247,135,181,189, 3, 82, 77, 6, 80,163, 1, 82,137,164,194, 2,209, 18, 78,134, 97, 32,
- 22,139,159,250, 72,165, 82,148,117, 59, 42,227, 44, 87,155, 3,203,178, 56,113,226, 4,140, 70, 35,134, 12, 25, 82,161,216,170,
-196,161,169,144, 51, 57, 57,249,152,167,167,231, 77, 74,233, 43, 60,207,131, 16,114, 51, 41, 41,169,179,249,184, 82,169,236, 29,
- 16, 16, 48,131,231,249,101,213,113, 82, 74, 1, 83, 38,104,214,118,216,182,203, 64,222,101, 23, 16,155, 30,224,224,131,219, 15,
- 82,112, 42,252, 9, 50,178, 10, 16,220,216, 13,189,218,249,130,231,121,139,195, 89, 22, 42,149,170,145,191,191,127, 83,163,209,
-136,115,231,206,129,227, 56,180,104,209, 2, 99,198,140, 97, 86,175, 94, 61, 6,192,178,154,114, 2,136,140,136,136,232,145,146,
-146, 2, 0,183, 44,112,188,110, 87, 36,132,127,254,249,103,104,181,218,103,206,119,236,188, 4,159,190,238,131, 49,147,183,225,
-235,152, 93, 88,183,110, 29,202,119,209,249, 43, 70,192, 8,156, 21,169, 34,140, 25, 58,248, 53,176, 18, 27,220,123,152,136,206,
-109,131,224,230,230,134,155,209, 15, 17,159,148,149, 74, 8,222,233,211, 65,182, 76,163,209,127,113,238, 6,253,177, 58, 78,165,
- 82, 89,127,211,166, 77,226,178,251, 36, 18, 73,169, 11, 94,214, 13, 47,223,100, 40,164, 81,197,156,193,193,193,205,122,246,236,
-121,126,238,220,185,182,241,241,241,184,120,241, 34,124,124,124,160,209,104, 80, 93,215,182,114,156,207, 52,219, 81, 74,121, 0,
-191,213, 38,156,161,161,161, 38, 0, 94, 21,157, 83,213, 49, 75,226,222,162, 69, 11,107,107,185,124,231,130,133,115,108, 34, 34,
- 14,163,125,135, 62,176,178,109, 8,147, 33, 17,153, 89, 5,200,126,160,198,210,165, 43,241,197, 23, 51,177,100,241, 66,219,225,
- 35,199,252,222,174, 93,187, 70,151, 47, 95,214,190, 44,233,206,136, 36,235, 35,195, 47, 77, 0,128,188,232,189,248,104, 68,123,
-228,231, 63,192, 7, 31,204, 65, 82, 82, 18,238,223,191, 31,241,119,134,243,165, 21, 88,132, 16, 74, 41,173, 81, 21,223,203,139,
-200,109, 57,171, 67,223,127,187,204,222, 86, 97,237, 26,126,124, 63,226,226, 82,170,252, 79, 81, 81,145,254,192,129, 3, 56, 62,
-105, 44, 26, 17, 19, 28,191, 92, 14, 55,149, 10,185, 99, 7,161,192,104, 64,131, 35, 97,144, 41, 20,144,218, 40, 44,118, 28,138,
-138,138,244,103,206,156,193,157, 59,119, 32, 18,137,160, 80, 40, 96, 99, 99, 3,153, 76, 86, 42,172,204, 47, 96, 75, 57, 41,165,
- 16,137, 68,184,125,251, 54,226,226,226,224,224,224,128,139, 23, 47,162, 71,143, 30, 79,137, 43,150,101,159,234,227, 85,131, 12,
- 95,161,163, 84,210,239,234,152,197, 68, 98, 23,192,233,109,228, 95, 81, 1,142, 35, 97,164,246,224, 41,143, 27, 15, 50,241,254,
-200, 87, 1, 0, 19,191,216,128, 30,109,234,149, 54, 65,214, 4,158,158,158,239,183,108,217,114,229,132, 9, 19, 24, 27, 27, 27,
-232,116, 58,232,116, 58,220,187,119, 15,206,206,206,176,182,182,150,212,242,129,127,172, 82,169, 32,151,203, 65, 41,125, 92, 27,
- 14, 66, 8,118,238,220, 89,225,177,119, 86, 70, 65, 84,220, 61, 11,235,215,175,135,201,100, 66, 77,243,183,128, 23,245,118,135,
-167,187,135, 23, 24,106,132, 58, 53, 3,131,250,245,130, 72,162,192,147,196, 12, 4,248,251, 42,223, 26,208, 65,201, 18, 19, 62,
-255,106,251, 68, 0, 63, 90,240,188,115,209,209,209,226,200,200, 72,176, 44, 11, 59, 59, 59, 88, 91, 91, 67, 34,145, 64, 38,147,
-149, 10, 43,193,193,170, 26,189,123,247,254,144,231,249, 89, 60,207,103,247,236,217, 83, 53,127,254,124,251,196,196, 68,220,190,
-125, 27,219,183,111,207,160,148,154, 74, 58,187,207,123,222,107, 89,224,108,129, 16, 82,227,126, 78,254,254,254, 18,147, 33,231,
- 35,123, 43,110,160,136,177,243, 49,229, 21, 60,206, 51, 50, 7, 98, 18,213,171, 41,165, 85,118, 9,144,137,197, 31,174, 90, 62,
-203,221,197,217,128,222,189, 7,226,209,227,108,204,156, 57, 4,121,121, 90,252,250,243, 10, 0, 82, 24, 76, 44,130, 90,247,129,
- 82,233,141,142,237, 59, 42,207, 93, 56, 55, 17,192,138,151, 37, 15,196,237,125,111, 34, 33,100, 97,157, 58,117,206,110, 88,186,
-180, 97,247,238,221, 1, 0,167, 78,157,194, 79, 35, 70, 96, 30, 48,106, 53, 33,201, 83, 40,157,249,119,133,169, 54, 90,228, 95,
- 45,176,204, 17,170, 73,196, 8, 33,164,129,187,237,174,249,179, 62,172, 87,167,190,175,199,213, 63,119, 34, 54, 54, 9,169,169,
-217,149, 21,168,148, 16,194, 19, 66,248,250,245,235,195,206,168,133, 61,213,195, 77,169,130,173,147, 51,178,141, 37,206,149,141,
- 13,164, 54, 10,139, 94,142,101, 57,253,253,253,145,154,154, 10,137, 68, 2,133, 66, 1, 91, 91,219, 82,129,101, 22, 87,150,190,
-112, 9, 33,224,121, 30, 34,145, 8, 55,111,222, 68,199,142, 29,225,237,237,141,223,127,255, 29,189,123,247,126,198,197,170, 77,
-211,147,185,207, 85, 89,231,138, 97,152, 25,150,116,110,127, 10,210, 6, 48,217,190, 9,198,186, 59, 12,212, 14, 58,170, 44,105,
- 18,164,248, 51, 44, 21, 49,113, 25, 79, 53, 23, 90, 46,158,189, 84,114,185,124,219,194,133, 11,187,133,132,132,192, 96, 48, 0,
- 0,172,173,173,161,211,233, 32, 22,139, 97, 48, 24,160,209,104,146,254,137,140,107,190,231,199,143, 31, 7, 33,164, 84,232,154,
-155, 10, 11,147, 19, 48,102,202,175,144,138,128,155, 55,111,162,105,211,166, 66,137,250, 15,193, 74, 46,119,150,202,237,193,155,
-180, 16,137,197,168,227, 93, 23, 60,167, 67,118, 94, 17,222,121,115, 0,174,223,138,194,225, 51, 87, 77, 70, 35,191,218, 82,206,
-198,141, 27, 35, 45, 45, 13, 44,203,194,214,214, 22, 54, 54, 54,104,210,164, 9, 18, 18, 18,158,114,177, 4, 84, 14,134, 97,102,
- 31, 62,124,216,157,101, 89, 15,147,201,132,132,132, 4,220,188,121, 19,107,214,172, 73, 45, 44, 44,236, 18, 17, 17, 17, 83, 11,
-218,202,154,237,158,233,172, 94, 27,103,171, 92,229,175, 97, 29,119,249,201,229, 95, 77,242,106, 17,208,138,200, 89, 69,110,209,
-195,180,142, 97, 87, 47,119,248,226,199,221, 31,186,187,187,119, 79, 77, 77,173,180,242,198, 50, 76,143, 38,205,154, 51, 60,159,
- 8, 86,210, 20,223,174,252, 20, 89,217,133, 40,200,215, 0,144, 66,111, 20, 65,167, 35,232,218,173, 59,126,223,121, 0,173, 66,
- 90,177, 44,195,244,122,153, 4, 22, 0,176, 44,187,108,255,254,253, 13,229,114, 57, 22, 47, 94, 12, 91, 91, 91, 92, 89,184, 16,
- 63, 73, 36,176, 2,176,222, 96,152, 1,224,111, 17, 88,181,209, 34,255, 9, 7,171,166,240,242,242, 90,209,182, 67,155, 87,234,
-251,183,146, 95, 61,186, 23, 15,238,199, 33, 35, 35, 23, 20,208, 84,165, 43, 8, 33, 84, 44, 22,195,237,243, 5,168,211,162, 5,
-138,198,191,129,108,163, 1,190,127, 94,129, 76,161,192,221,158, 65,160,122, 61, 58, 69,167, 90, 42, 92, 40, 33,132, 2,128,139,
-139, 11, 36, 18, 9,228,114, 57,228,114,121,105,223,171,178, 31, 75,197, 16,207,243,200,203,203,195,227,199,143, 49,126,252,120,
- 88, 91, 91,131, 16,130,212,212, 84,248,248,248,128,101, 89, 36, 37, 37,225,244,233,211,168, 95,191, 62,164, 82,105,141, 50, 67,
-153, 78,237, 45, 61, 61, 61,207, 18, 66, 90,134,135,135,219,133,132,132,160, 70, 14, 22,145, 64, 7, 31,112,240, 2, 79,255,215,
-215,202,104,122,186,242,102, 22, 89,150,192,195,195,195,175,121,243,230,151,215,172, 89,109,235,230,230, 14,158,231, 96, 52, 26,
-145,155,155,135,162,162, 34,212,169, 83, 7, 54, 54, 54,116,249,242,229,132,227,184,127,108, 40,175, 89, 80,153, 29, 68,115,255,
- 43,134, 97, 48,101, 96, 29,100,103,219,130,101,139,183, 45,141,187,128, 23, 15, 27, 27, 91, 39,145,196, 6, 60, 35,130,189,189,
- 35, 68, 82, 27,240, 38, 17, 56, 30,176,181,119,193,165,235,247,112,249, 86,254,251,105,153,216,101,193,115, 67,155, 55,111, 78,
- 89,150,133,155,155, 91,169,152, 18,139,139, 91, 12,221,221,221,145,151,151, 7,150,101, 75,247, 9,168,186, 34,249,228,201, 19,
- 20, 22, 22,226,202,149, 43,216,185,115,103,122,121,113,213,171, 87,175, 9,214,214,214, 95,104,181,218,197, 71,143, 30,253,190,
- 42,206,154, 54,219,213,198,249,138,136,136,104, 28, 28, 28, 44,246,114,147, 28, 62,178,119,165,151, 29,119,157,224,201, 56, 32,
- 38, 47, 90, 17,230,214,190,123,235,254,196,127,193,199, 62,131,230,172, 60, 66, 8,241,171,108,196, 51, 5,154,203,173,228, 0,
- 37,184,120,225,104,113,179, 96, 86, 62, 10, 10,181,208, 25, 88,232,244, 4, 90, 3, 65,247, 30,125,176,233,199, 29, 72, 78,203,
- 6, 5, 90,188,108,249,160, 81,163, 70,193,158,158,158,248,248,227,143,161,221,190, 29, 5, 0,250, 3,216, 95, 82,169,182, 5,
-166, 9, 79,203,223, 40,176,188,188,188, 62, 12, 8, 8,120,111,243,214, 95, 21, 95,205,249, 60, 47, 59,250, 22,171,215, 24,108,
-116, 70,163,254, 97,114,230,234,170, 94,142, 77,155, 54, 45,174,117, 58, 56,194,218,206, 30,186,114,206, 21,213,235,193, 27,244,
-144, 88,248,114, 52,115, 82, 74, 97,101,101, 5,169, 84, 90,161,115, 85, 19, 7, 11, 0,114,114,114,176,115,231, 78,180,110,221,
- 26,214,214,214, 96, 89, 22, 45, 91,182, 68,116,116, 52,124,125,125, 1, 0,251,247,239,199,235,175,191,142, 7, 15, 30,192,207,
-207,175, 38, 67,143, 75,155, 8,143, 31, 63,110, 71, 41,125,133, 82,138,244,244,218,141,134,229, 56, 14,133,133,133, 56,126,252,
- 56,212,106, 53, 60, 60, 60,144,155,107, 11, 59, 21, 95, 42, 22,205, 31, 11, 95,188,159,191,251,238,187,182, 10,133, 2, 28,103,
-130, 88, 44, 46, 21,174, 98,177, 4,247,238,221,195,136, 17, 35,114,159, 60,121,242, 89,109, 70,253, 16, 66,136,151,151,210, 61,
- 55, 55, 27,249,121, 57, 96, 89,120, 19, 66,216,218, 76,253,192, 48, 76,233,183,249, 67, 8,129, 68,204,194,195,221,181,180,227,
-123,137,123, 39, 52, 17,254,125,133,183, 13,128, 97, 0,222,238,210,218, 94,148,149,175, 1, 76,122, 60,126,242, 24, 57,133, 6,
- 80,147, 17,241,137,201, 40,212,241,200,204,202, 71, 64,112,239, 53,103,206,156,153, 77, 8,153, 69, 41, 61,100, 73,158,191,118,
-237, 26,206,157, 59,135, 11, 23, 46,192,220, 81, 26, 0,236,236,236,112,226,196, 9,116,237,218, 85, 72,136, 42, 96, 48, 24, 22,
-247,234,213,107,150,135,135,135,124,197,138, 21,246,117,234,212, 1, 33, 36,175,188,115, 21, 18, 18, 50,123,198,140, 25,202, 33,
- 67,134, 76, 1,240,125, 45, 47, 87, 85,103,245, 42,203,168,138,166, 98, 72, 75, 75,153,176,113,219, 24, 87, 27,241, 99, 53,158,
-124, 91, 34,190, 88,160, 40, 15, 56,243, 43, 36,175, 44,120, 50,178,219, 68, 55,117,254,234,119, 1,108,170, 36,147,242,247, 98,
-226,176,110,221, 42,124,241,197, 68,108,255,117, 21,120, 42, 65,126,161, 17,238,170, 64,232,141, 60, 8, 35, 70,187,246,157,112,
-225,210, 85,128, 51, 96,202,248,203, 47,221, 92,107,247,239,223, 15,139,139,139,107, 58,103,206, 28,108,241,244,132,173,173, 45,
-166,206,157,123,217,100, 50,181, 23,158,146, 23, 32,176,106, 98,201,121,121,121, 13, 86, 42,149, 95,253,250,235,175, 86,106,181,
- 26,170, 70,205,236, 14,238,222,169,115, 83, 72, 52,201, 89,217,163,111, 36, 21, 84, 59,220,158, 97, 24,152, 22, 78, 69,166, 73,
-143,122, 7, 47, 65,166, 80, 32,166,119, 8,168, 94,143,246, 17, 79, 32, 83, 40, 32,146, 91,213, 56, 50, 21, 57, 86,101, 63,230,
-194,184, 58,232,245,122,135, 30, 61,122,160,123,247,238,120,227,141, 55, 74,155, 2, 3, 3, 3,177, 99,199, 14, 12, 30, 60, 24,
-145,145,145, 80,169, 84,104,210,164, 9,154, 52,105,130, 51,103,206,212, 40,172,102, 7,171,119,239,222,121,132,144,155,148,210,
-150, 97, 97, 97,118, 53,229, 48, 11,168,227,199,143,227,213, 87, 95,133,175,175, 47,174, 95,191,142, 19, 11,150, 67,164,112, 1,
- 24, 55, 80,158,150, 58, 91,150,244,193,146, 72, 36, 29,235,215,175,143,148,148, 84,200,100, 50, 56, 58, 58,192,202,202, 10, 50,
-153, 28, 75,151, 46,229, 55,109,218,180,150, 16,178, 64,173, 86,103,213, 66,156, 55, 8, 8, 8,248,121,244,168,145,109,156,157,
- 93,224,238,174,196,140,233, 51,251,108,223,241,251, 29, 79, 79,207,225, 73, 73, 73,183, 44,229, 34,132, 64,175,215,131,101, 89,
-236,143,113, 69,161,158, 32, 47, 49, 2, 31, 13,244, 41, 21, 91,230,166, 94,243,244, 23, 2,254, 30,176, 44,187,101,234,212,169,
- 93,134, 14, 29, 74, 36,140, 81,127,226,216, 54, 17,199,153,200,167,179,126,224, 66,207,159,101, 56,206, 68,222, 24, 49,141, 63,
-124,250, 22,243,254,148,229, 92, 96,219, 87,113,251,246,109,143,254,253,251, 47, 2, 96,145,192, 50,167,113, 37,215, 23,154, 8,
-171,193,201,147, 39,215, 2, 88,219,171, 87,175, 20,107,107,107, 20, 20, 20, 60,211, 79,209,223,223,223,166, 89,179,102, 18,169,
- 84,138,224,224, 96,215, 94,189,122,197, 16, 66, 86, 28, 59,118,108,115, 77,174, 85,145,179,245, 60,211, 52,216, 58,113, 3, 90,
-180,106, 98,123,207,102,142,173,149, 88,123,163,110,140,220,142, 0,200,213,120, 60,186,152, 56,188,128, 73, 99, 3, 90,116,243,
-135,173,216,122, 96,101, 2,139, 0, 55, 11,243,243,123, 21,105, 76, 56, 27, 26,137, 33, 67,234, 64,107, 96,160,209, 50, 48, 24,
- 41, 24, 86, 2,194, 74, 48,122,236,123,208,155,120,228, 36, 39,131, 0,145, 47, 91, 62,224, 56,110,198,160, 65,131, 90, 45, 94,
-188,216,111,234,212,169, 0, 0,149, 74,213, 78,165, 82, 69,253,221,243, 96,189, 76,205,131, 79, 57, 88,213, 69,172, 75,151, 46,
-155,141, 70,227,107, 54, 54, 54,142,239,189,247,158, 33, 35, 35, 3,251,246,237,195, 79, 63,253, 84, 84,104,100,195,115, 50, 77,
-163, 30,169, 11, 18, 45, 41, 20, 25,134,129,196,104, 4, 53,253,207,185,226,117,186, 82, 39, 75,108,101, 93,211,218, 50, 40,165,
- 21,138, 42,179,147, 85,147,151,173, 76, 38,203,185,112,225,130, 91, 98, 98,226, 83, 29,218,235,213,171, 7, 0, 8, 11, 11,195,
-149, 43, 87, 48,124,248,112,136, 68, 34, 72, 36, 18,220,188,121, 51,191, 38, 97, 54, 11, 30,243, 40, 66,165, 82,217,187, 77,155,
- 54, 21,142, 30,180,132, 43, 62, 62, 30,190,190,190,208,233,116,112,112,112, 64,102,242, 99,196, 63,142, 69,145, 46, 6,245, 61,
-228, 72, 75, 75,131, 76, 38,179,244,129,227,204, 5,151, 78,167, 67,114,114, 10, 84, 42, 21,126,249,229, 87,108,222,188,121,184,
- 90,173,222, 85,211, 48, 18, 66, 68, 74,165,114, 90,255,254,253, 23,189,246,218,107,162,162,194, 2, 80,190, 88,240, 72,164, 18,
-124,247,221,119, 77, 78,159, 62,125,195,211,211,115,137, 92, 46, 95,244,240,225, 67,125,117,105, 14, 0, 91,182,108, 1, 0, 88,
-183,157,139, 25, 67,235,226,237,137,219,176, 98,197,222,167,226,202,178, 44,230,207,159, 47,148,168,127, 35,218,182,109, 27, 56,
-107,214, 44,177,185, 79,156,170,206, 98,147,193, 96,224, 1,160,105,203, 87,254,231, 84,246, 6, 30, 60,120,128, 21, 43, 86,160,
-176,176, 16, 34,145,200, 98,155,185, 71,143, 30,232,221,187,119,105, 51,161,139,139, 11, 12, 6, 3, 76, 38,147, 32,174,106,232,
-100,189,250,234,171,179,120,158,167, 60,207,207, 49,239, 15, 14, 14,182,170, 83,167,206,197, 85,171, 86, 57,155, 76, 38, 76,155,
- 54,205, 33, 35, 35,195, 97,210,164, 73, 51, 1,108,174,164,156,168,201,236,234, 22, 77,211, 80, 81,159, 46, 66, 72,125, 27, 27,
-123,164, 35, 5, 57, 46,198,192, 28,103, 83,214,241,228,247,111,122, 39, 4, 52,181,226,140,190, 76,158, 30,246, 86,118, 0, 79,
- 27, 85,250,158,227,249,227,209,119,162,186,123,121,250,178, 7, 14,134,226,213, 1,131,161,213, 19,104, 13, 12, 8, 43, 6, 97,
- 37,104,213,166, 61,234,249, 54, 6,207, 3, 81,145, 17, 6, 35,207, 31,121,153,210,222,231,245, 31,190,247, 26,176,110, 2, 0,
- 76,251,238, 20,102, 47,252, 22, 35,223,232,141, 49, 99,198,252, 99,243, 96,189,180,125,176,170, 16, 87,239, 56, 58, 58,142, 24,
- 59,118,172, 85, 88, 88, 24, 22, 46, 92, 40, 58,113,226,132,225,218,181,107, 38,142,227,166, 37, 37, 37,109,172,201, 69, 25,134,
- 65,253, 95,255,132,202,195, 3,247,251,180,122,202,185, 58,219,210, 11,188, 78,135,158,177,185, 53,142,140,185, 41,203, 44,172,
-204,226,170,178,169, 20,170,169,129, 87, 56,239,213, 7, 31,124,128,205,155, 55,163,125,251,246,104,216,176, 33, 68, 34, 81,105,
-179, 84,109, 28, 44, 51,106, 60,122,176, 92,109,190, 78,157, 58,184,117,235, 22,236,237,237,241,243,207, 63,195,219,203, 19,163,
-122,213,131, 94,175,135,209,104, 68, 97, 97,161,217,193,170, 54,160, 60,207,223,217,183,111,159,239,208,161, 67,169, 72, 36, 34,
- 58,157, 14, 0,176,122,245,234, 52,181, 90,189,167,166,225,243,244,244,124,163,126,253,250, 63, 14, 31, 62,220,182, 73,147, 38,
- 72, 77, 77,197,213,171,151, 49,115,230,140,171, 98,177, 72,219,167,111,191, 46,126,126,205, 48,113,226, 68, 38, 48, 48,240,139,
-153, 51,103, 78,243,246,246, 30,147,144,144,176,179, 58,145,181, 99,199, 14, 0,192,187,223,221,133, 94,111, 4, 80, 60,106,208,
-195,195,227,169,115, 31, 62,124, 40,140, 34,252, 27, 97, 50,153, 40,195, 48, 36, 33, 33,193, 96,109,109, 77,156,156,156, 68, 50,
-153, 12, 58,157,174, 84,104, 61,120,240, 0,135, 14, 29, 66, 98, 98, 34,156,156,156, 24,123,123,123,152, 76,166,108, 75,243,124,
-217,209,130,102, 65, 37,136,171,154, 35, 52, 52,116, 45,128,181,101,132,235,120, 66,200,116,133, 66, 97,183,121,243,102, 7, 59,
- 59, 59,114,232,208, 33,253,134, 13, 27, 10, 88,150,205, 6,176,188,170, 50,229, 69,205,174, 94,153,243, 5, 0,156, 9,247,179,
- 11, 98,125,196, 10, 37, 31,169, 37,151, 62, 78,152,209, 52,155,105,228, 78,154, 53, 51, 13, 73,187,115,113,148,241, 81,251,244,
-212, 52,194, 81,122,183, 50,238,236,220,220,239,127,220,250,251, 71,251,246,108,171, 35,183,179,198,200,183, 63,196,241,147,231,
- 33,149, 89,227,106,248, 13,232, 13, 28,158,196, 39, 97,248, 91, 35,161,116,115, 6, 91,164, 78,214,233,245, 27, 95,166,180,127,
-106, 30,172,144,246,184,184,119, 57,118,196,212, 65,210,194,133,255,232, 60, 88, 47,157,131, 85, 25,218,180,105, 99,171,211,233,
-190,251,228,147, 79,172, 10, 11, 11,145,145,145,129,204,204, 76, 92,189,122,245,132,209,104,252,168,170, 81, 26, 21,173,182,109,
- 30,241,229,228,234, 6,153,194, 22, 84,175, 47,117,174, 36,214, 54,224,117, 58,240, 6, 61, 80, 73,115, 78,101,156,132,144,103,
- 92, 43, 75,197, 85,121, 78,179, 35, 86,209,164,162,222,222,222, 88,178,100,201, 51,211, 52, 88, 18,206,146, 90, 90,111, 66, 72,
- 75,179,243, 68, 41,109,169, 84, 42,123, 91, 50,114,176, 50, 78,158,231,209,185,115,103,156, 56,113, 2,183,110,221, 2,195, 48,
-232,219,183, 47, 8, 33,176,183,183,135, 72, 36, 42, 21,115,230, 1, 1, 85,113,114, 28,247,246, 79, 63,253,244,233,145, 35, 71,
- 62,159, 60,121,178,213, 43,175,188, 98,238,231,149, 94, 50,242,167, 70,225,228,121,126,222,205,155, 55,109, 77, 38, 19, 22, 47,
- 94,140,240,240,240,194,135, 15, 31,126,146,156,156,252, 35,165,148, 42,149,202,145,143, 30, 61, 94,247,229,151, 95,218,118,235,
-214, 13, 97, 97, 97,114,111,111,239, 47, 1,236,172, 46,238, 87,175, 94, 5,203,178, 48,101,197, 97,226,140,223,161,176, 22,227,
-222,189,123,200,204,204, 44,205,107,149, 53, 37,253,127, 94,181,254,175,230,188,118,237,218,238,181,107,215,126, 48,122,244,104,
- 9,165,148,139,139,139, 51, 2, 32, 30, 30, 30,236,181,107,215,248, 63,254,248, 3, 26,141, 6, 94, 94, 94,140,167,167, 39, 57,
-113,226, 4, 31, 29, 29,125,149, 82, 58,203,210,112,150, 21, 87, 98,177, 24, 26,141,198, 34,113, 37,164, 81,181,156,115,247,238,
-221,171,212,106,181,144, 74,165,216,181,107,151, 97,219,182,109, 81,121,121,121,157, 34, 34, 34, 52,181,225,172,233, 52, 13,213,
-113,230,103, 51,135, 78, 28,143,106,105,236,250, 3,153,156,146,217,177,180, 96, 38,196,101,151,123,115, 23,121,235,128, 36,197,
-185,111,152, 2, 90,244, 71,101,156, 15, 31, 62,212, 7, 5, 5,189, 62,245,211, 57,103, 22,206,155,107,187,236,235,175,112,251,
-213, 33,200,201, 45,130, 78,207,193, 96,226, 49,111,222, 2,184, 57, 57,192, 81, 98, 40,200,209,144,215,163,162,162, 12, 47, 83,
-186, 63,207, 60, 88,127, 69, 56, 95, 54, 84,171, 62,138,138,138, 22, 54,110,220, 88, 26, 29, 29,141,135, 15, 31, 34, 38, 38, 6,
- 28,199, 61, 72, 76, 76,236, 95,219,139, 50, 12, 3,123,123,123, 72,165, 82,180,187,149, 4,169, 68, 2,169, 77,113, 31,241,158,
-177,185, 0,165, 96,164,178, 26,115,150,159,243,234,121, 70, 17,113, 28, 87, 58, 67,187, 89,192, 85, 52, 90,173,166,206, 21,195,
- 48, 51, 46, 95,190,108, 23, 23, 23, 7, 74, 41,246,238,221,107,247,198, 27,111,204,168,141,123, 69, 41, 69,102,102, 38,120,158,
-135, 88, 44, 70,183,110,221, 16, 20, 20,132,130,130, 2,112, 28, 87,218,124, 41,145, 72,106, 52,138, 48, 53, 53,181, 8,192,124,
- 87, 87,215,141, 95,124,241,197,252,230,205,155,191,247,241,199, 31, 51,168,229,160, 8, 66,136,201,100, 50, 97,215,174, 93,216,
-179,103, 79, 62,165,180,177, 90,173, 78, 41,227,222,253,234,238,238,126, 98,240,224,193, 15, 30, 61,122,100,151,155,155, 11, 20,
-119,138,173, 46,111,162, 97,195,134,224, 56, 14, 95, 77,244, 66,126,126, 11,112, 28, 7,147,201, 4,107,107,235,167,150, 32, 18,
-102,113,255,123,193,113,220, 76, 66,200,209, 37, 75,150,204,152, 50,101, 74,155,209,163, 71,139, 37, 18, 9,159,148,148,100,218,
-190,125, 59,105,212,168, 17, 35, 22,139,201,241,227,199,249,176,176,176, 43, 38,147,233, 43, 74,105,141,150, 34, 41, 43,174,132,
- 62, 87, 47, 20, 59,135, 14, 29, 58,122,200,144, 33, 86,129,129,129,178,159,126,250, 41,167,176,176,176, 66,113, 85,145,121, 89,
-217, 52, 13, 47, 98, 2,210, 50,239,140,141, 11,230,158,155, 56,178,225,136, 70,239, 57,215,197,201,194, 52,100,139, 89,198,206,
-129, 65,160, 15,139,162,156, 71,110, 39,195,246,198, 36, 39, 39,111,169,138,231,250,245,235,215, 67, 66, 66, 58,191,253,206,187,
-251,198,142, 30,171,250,252,227,143,196,135, 78,156, 1,103,212,225,252,169, 83,112, 81, 48,156,161, 48, 85,157,107,100, 6, 69,
- 68, 68,188,116,253,175,226,246,190, 55, 17,192, 68, 66,200,240,185,115,231,110,159, 56,113, 34,120,158, 71,104,104, 40,214, 77,
-159,142,121, 28, 55,106, 53, 33, 69, 83, 40,157, 40, 60, 22, 47, 80, 96,181,110,221,186,110, 97, 97,225,207, 70,163, 49,144,231,
-121,233,217,179,103,161,213,106, 17, 29, 29,173,225,121,126,247,243,164,105,223,190,125,153,242,235,197, 85,242,146,182,180,115,
- 93, 92,143, 30, 61, 94, 24, 39,207,243,137,101,215, 48,171,140,183,236,182,201,100, 74,180, 36,160, 60,207, 47,107,215,174,221,
- 51,251,106,101,239,242,124,108,247,238,221, 13,229, 69, 87, 69,191,203,196, 63,209, 82,254,244,244,244, 84, 0,239, 43,149,202,
- 85, 99,198,140,153, 11,224, 65, 45, 5,214, 34, 63, 63,191, 47,138,127,146,133, 73, 73, 73, 41, 21,136,186,116, 79, 79,207,247,
-188,189,189, 75, 23,128,174, 46,238, 61,123,246, 52, 84,183,200,115, 89,231,138,231,249, 68,225,145,255,251, 80, 34,152,206, 19,
- 66, 58,173, 91,183,110,230, 7, 31,124,208,122,216,176, 97,162,206,157, 59,227,240,225,195, 92,104,104,232, 85,141, 70,179,172,
-166,194,138, 16, 82, 80,254, 25,170, 34, 12, 90, 33, 37,106,134,147, 39, 79, 78,237,208,161,195,220,157, 59,119, 62,241,241,241,
-145, 17, 66, 76, 22,138,171, 23, 62, 77, 67, 21,233,106,242,246,246, 30,240,235,136, 15, 14, 5, 78,126,215,167,119,251, 96,185,
- 87, 3,165,199,189,184, 76, 36,220, 60,161,121,116,118,221, 99,170,205, 28, 96,137,227, 30, 30, 30, 30,217,160, 65,131,198, 27,
-127,218,252,174,132,101,123,242,148, 6,125, 54,105, 20, 24, 66,174, 27, 56,238, 68, 94,126,254,143,213,245, 9,253,175, 67, 38,
-145,140,154, 52,105, 18,126,249,229, 23,236, 91,181, 10,189, 19, 19,177, 67, 34,129,149, 68,130,245, 6,195, 4, 0,130,192,170,
- 77,217, 87,217,200,170, 38, 77,154,236,200,202,202, 26,146,151,151,103, 50,153, 76, 28, 33,196, 68, 8,209,240, 60,191,128,231,
-249, 13,212,130, 33, 89,130, 21, 47,112, 10,156, 2,103,153,227,157,236,236,236, 62,230,121, 30, 5, 5, 5,171, 44, 17, 86,194,
-253,252,231, 56,187,117,235,182,146, 97,152, 54, 28,199,109, 61,115,230,204,166,231,225,172, 97,231,119,139,195, 73, 8, 17,121,
-120,120,140,165,142,138,254, 48,138, 26, 82, 3,123,143, 53,100, 29, 74, 78, 78,222, 82, 94, 92, 9,233, 94, 57,103, 76, 76, 12,
-117,114,114, 66, 86, 86, 22,246, 52,105,242,212, 49, 91, 96,125, 69, 14,214, 63,208, 68,216, 10,128,107,201,239, 12, 0,247, 0,
- 4, 3,176, 2,160, 3, 80, 0,192,165,204,249,153, 37,199,204,199,207, 1, 48,254,221,181,204,191,236, 3,160,185,192, 41,112,
- 10,156, 2,167,192, 41,112, 10,156, 2,231,115,126, 94, 5, 64, 1,208, 25, 51,102,204,164,148,246,153, 49, 99,198,204, 50,219,
-165,199,139,165, 13,125,181,220,241, 86,127,115,120,193, 64,128, 0, 1, 2, 4, 8, 16, 32,224, 63, 0, 74,105,255,101,203,150,
- 45, 1,192, 46, 91,182,108, 73,153,109, 80, 74,251,151,253, 46,119,220,245,239, 14, 43, 1,208,188,146, 72, 88,108,253, 17, 66,
-154,215,226, 38,221, 22, 56, 5, 78,129, 83,224, 20, 56, 5, 78,129,243,255, 23,103,117,220,149,252,255, 85, 66,200, 33, 74,105,
-255,178,223,101,133, 87, 9,231,161,178,191,203, 29,255,243,239, 86,131, 66, 19,161,192, 41,112, 10,156, 2,167,192, 41,112, 10,
-156,255,250, 38,194,170,190, 43,251, 93,102,223,223,218, 68, 88,249,176,251,221,187,217, 36, 63,216, 73,173,172, 37, 0,160,215,
- 20, 25, 60,163,145,135, 33, 67, 56, 8, 16, 32, 64,128, 0, 1, 2, 4,252,205, 32,132, 28,154, 49, 99,198,172,255, 66, 88, 69,
-149,137,171,140, 16,107, 23,145, 46,187, 49,103, 50, 52, 5, 0, 17, 67,239,102,132, 56,198,184,236,222,157,241,162, 69, 86,223,
-190,125,103, 81, 74,221,197, 98,241,159, 30, 30, 30,161, 27, 55,110, 52, 10,217,232, 31, 65,181,125,242,130,131,131, 29,117, 58,
-221,114,158,231,187,149,172,243, 23, 42,145, 72, 62,189,113,227, 70, 22,128, 74,135, 68,251,248,248,108,247,245,245,109, 76,139,
- 1, 0, 79,205,203,101,222,103, 62, 30, 31, 31,127, 63, 33, 33,225, 45, 75, 3, 94,167, 78,157,122,114,185,252, 29, 66,136, 95,
- 9, 79,180, 86,171,221, 26, 31, 31,255,248,255, 91, 34,170, 84, 42, 43, 74,233,107, 98,177,120,180,147,147, 83,235,244,244,244,
-121, 73, 73, 73,223,214,242,101, 38, 2, 48,205,193,193, 97,184,131,131, 67,253,172,172,172, 71,121,121,121, 59, 1,172,160,148,
- 86,251,156, 46,252,208,179,237, 43,253, 58,207, 57,119,248,236,194, 57,107,147,174,148, 63, 62,255, 83,149,115,183,238, 29,230,
- 28,249,243,210,130, 37,107,147,178,106, 24, 54,166, 76,158,229,205,217,231, 95,156, 46,129, 0,166,115, 28, 39,102, 24,230,219,
-228,228,228, 11,255,246,188,212,180,105,211,207,165, 82,233, 4,134, 97, 30,165,166,166,142, 85,171,213, 47,100,170, 19, 66, 8,
-227,227,227, 99, 27, 23, 23,151,111,201, 84, 10, 2,138,209,174, 93,187, 84,131,193,224, 86,213, 57, 18,137, 36,237,242,229,203,
-238, 47, 97,244, 51,204, 77,127, 0,210, 0,176, 37,219,250,146,239,212, 50,251, 82, 43, 57,254,207, 11,172, 36, 63,216,137,116,
-217,141, 51, 83,163,134,165, 39,223,120, 19, 0, 92,149,129, 59,157,221,253,127, 79,242,147, 26, 90, 53,125, 93, 33,182, 22,125,
-207,178,226, 64,173, 94,231, 34, 22,137, 51, 12, 38,227, 13, 70, 79, 39, 38,223,221, 27,111,201,133, 7, 12, 24,208, 24,128,125,
- 80, 80,208, 53,189, 94,223,250,219,111,191, 85,238,217,179,167,101, 68, 68,196,136,129, 3, 7, 30,164,148, 30, 59,120,240,160,
-166, 70, 15,109,151, 46, 34,183, 28,167, 81,172, 72, 52, 0, 64, 75, 74, 1, 16,246, 38,111, 52,252,153,230,152,185,149, 22,207,
-209, 82,187,140, 29,236,220,152,240,134,207,196, 44,237,100,228,200,121,202, 72,150, 95,142,200,140,177, 92, 0,168,122, 72, 69,
-228, 7, 0,208,155,232,123,241,241,234,147,207,115, 94, 37, 47,240,158, 0,126, 37,132,136, 1,172,231, 56,110,127,106,106,106,
- 36,165,212,244, 34, 50,139,191,191,191, 43, 33,228,230,202,149, 43,157,219,180,105,195,242, 60,143,211,167, 79,191,245,197, 23,
- 95,244,110,214,172, 89,243, 59,119,238,164, 85,246, 95, 95, 95,223,198,167, 78,157, 10, 56,122,244, 40,218,183,111, 15,158,231,
-193,243, 60, 28, 28, 28,240,199, 31,127,160, 77,155, 54,165,251,220,221,221,209,185,115,103,139,195,229,235,235,251, 90, 96, 80,
-171, 41,159,124, 54,221,221,205,217,197,214,196,153, 12, 73, 73,201,170, 85,223,126,213,214,215,215,247,251, 71,143, 30,237,175,
- 69, 1, 64,188,188,188,134,137,197,226,254, 0,252, 74,118, 71, 27,141,198, 67,137,137,137,191, 91, 90,144, 7, 4, 4,156, 99,
- 24,166,110, 77,174,205,113, 92,252,205,155, 55, 59,214, 38,141, 60, 61, 61,135,122,122,122,254,212,182,109, 91,235,192,192, 64,
- 72, 36, 18,124,253,245,215,211, 0,124,107,137,144,178,182,182, 30,102, 99, 99,227, 91, 80, 80,240, 80,163,209,236,145, 74,165,
- 61,190,251,238, 59,239, 14, 29, 58,216,166,166,166, 18,150,101,221, 15, 30, 60, 56,106,205,154, 53,189, 9, 33,221,171,203, 91,
-217,143,248, 57, 50,113,211, 78,217, 15,207,204, 1,208,183,252,113,147, 86, 62,154, 21,123,247,103,233,245, 4, 0, 43,106, 82,
- 64,123,121,121,125,231,238,238, 62, 70,163,209,104, 9, 33,148, 16, 66, 91,180,104, 97, 62, 14, 0,208,235,245,217,247,238,221,
-107, 82, 21, 87,189,118, 78,225, 44,195, 86, 58,119, 19,199,115,137,143, 47,103,133, 60,239,243, 67, 41,253, 56, 50, 50,114,136,
- 72, 36, 34, 1, 1, 1, 54,132,144,222,150,138, 11,149, 74,213,152, 16, 50,155, 82,122, 45, 57, 57,249,123, 74, 41,231,233,233,
-217,149, 82,250,121, 73,124,191, 78, 74, 74, 58, 83,146, 7,190,111,216,176,225,192, 7, 15, 30,172, 79, 74, 74, 90, 84,219,240,
- 54,106,212,104,226, 71, 31,125, 52,119,194,132, 9, 86,153,153,153, 62,189,122,245,250, 13, 64,167,231,185, 7,193,193,193,226,
-148,148,148,105, 45, 91,182,156,220,170, 85, 43,101, 84, 84, 84,138, 74,165, 90,237,225,225,177, 34, 34, 34,162, 90,193,222,178,
-101, 75,149, 72, 36, 26, 3, 96, 84, 73, 1,186, 3,192,214,235,215,175, 63,250,255, 32,176, 12, 6,131,219,201, 69,115, 64, 88,
- 22,242, 78, 61,192,243, 60, 50,150,207,133, 41, 43, 3, 46,139, 86,195,100, 50,161, 71,143, 30,110, 47,105,244,195,254,107, 1,
-174, 80, 96, 73,173,172, 37,156,201,208, 52, 61,249,198,155,173,251,172,182, 7,128,176,163, 83,222,116,246,108,118, 91, 42,178,
-142,145,217,201,247,190, 62,160, 71,224,144,254,157,137,151,210, 13,137,201,105,238, 63,238, 56,214,231,208,177, 51,123, 81, 60,
- 47, 69,181,200,203,203, 91,236,227,227,227,122,234,212,169, 39, 82,169,212, 74, 46,151,147,161, 67,135, 90,141, 24, 49,194,255,
-244,233,211,190, 71,143, 30, 29, 50,104,208,160,163, 18,137,228,207, 93,187,118, 85,187, 62,153,123,139,193,254, 30, 34,143,221,
-131, 94,235, 91,247,213,158,110, 82, 31, 15, 87,240,188, 28,247, 98, 13,117, 78,156,191,222,231,240,209,227,159,185,249, 15, 30,
-154, 22,181,239,150,165, 55,167,121,115,123, 7, 43,134, 78,181,146,210,225,125, 58,249,215, 27,208,183, 61,169,223,160, 62, 98,
-162, 99,124,207,156,189, 54,166,107,107,219,199, 26, 61,217,161,225,201,202,219,183,115,115,170,226,146,138,200,150,155,119, 30,
-168, 56,142,195,215, 95, 45, 57, 49,123,246,236,210,217,213,205, 31,142,227,240,234,171,131,240,205, 55,223, 64,167,211,161, 85,
- 96,179, 45,248,223,188, 49,150,224,183,168,168, 40,231,162,162, 34, 28, 61,122,116,102,114,114,242,204, 99,199,142, 37,171, 84,
-170,207,146,147,147,119,188,128,218,253,218,245,235,215, 59,183,110,221,154, 53, 24,138,231, 55,237,208,161, 3, 59,107,214, 44,
-167,165, 75,151,174, 2, 48,188,138,194,133, 30, 61,122, 20, 63,255,252,115,198, 87, 95,125,149, 8, 0, 46, 46, 46,158,111,189,
-245,150,235,175,191,254,154,190,114,229,202, 68, 74, 41,156,157,157,189,134, 13, 27,230,106,105, 80,189,189,189,235, 7,183,106,
- 51,101,235,150, 45,109,114,179,178,180, 63,172, 92,127, 93, 39,146, 21,249,248, 53,150,204,153,187,200,126,193,151, 51,223,247,
-246,246,190,157,144,144, 16,107,105, 36,149, 74,101,157,186,117,235,238,157, 53,107, 86,243,142, 29, 59,138,221,220,220,144,154,
-154,138,123,247,238, 53,191,120,241,226,107,251,247,239,159,166, 84, 42, 95, 79, 78, 78,174,182, 50, 65, 41,109,116,224,235, 37,
-110, 50,103, 23,240, 70, 35, 28, 91, 4,150, 30, 83,159, 62, 6,222,104, 4,111, 52,194,251,213,215, 74,157,188,174, 93,187,214,
-106, 74,114, 47, 47, 47, 85,227,198,141,127,153, 49, 99,134, 68,167,211,225,198,141, 27,184,124,249, 50,159,150,150,182,172, 58,
-113, 69, 8, 57, 62,119,238, 92,175,142, 29, 59,218,102,100,100,128,227, 56,151,253,251,247, 79, 12, 10, 10,178,243,242,242,146,
-110,219,182,205,188, 66,128,147,175,175,175,211,136, 17, 35,244, 63,255,252,243, 52, 0, 95, 85,230, 92,229, 60,228,231,164,136,
-124,251, 52, 9,121, 7, 41,162, 99,125,166,246, 86, 30,113,240,101, 74,157,172,190, 13, 26,216,214,111,106, 61, 93, 97,215,220,
- 41, 55,233,196,244,190, 13, 26,108, 62,242,240, 97,181,139,166, 19, 66, 24, 79, 79,207,239,250,245,235,247,214,250,245,235,173,
-163,163,163,173,253,252,252,192,243, 60, 76, 38, 19, 56,142, 51,175,187,137,178, 19, 6, 87, 6,150, 97,189, 46,238,189,227,102,
-101,101, 85,250, 28,154,191, 11, 11, 11,209,123,116,219, 23,242,178,229,121, 94,106,206,215, 38,147, 73, 14, 64, 12,192,210, 9,
- 44,231, 95,186,116,105,232,145, 35, 71, 70, 46, 90,180,168, 17,128, 15,121,158,159, 19, 29, 29,221, 25, 0,252,252,252,164, 0,
-206,168, 84,170,177, 19, 38, 76,152, 48,105,210, 36,140, 30, 61,122, 14, 33,100,113,109,159,123,169, 84,250,229, 7, 31,124, 96,
-101, 52, 26, 97,101,101, 5,131,193,208,224, 57, 43,104,146,162,162,162, 61,243,231,207,239, 63,104,208, 32,243, 18, 94, 30,231,
-206,157, 91,250,233,167,159,182, 15, 14, 14, 30, 92,153,200, 10, 14, 14, 14, 4,176,160, 97,195,134,189, 71,143, 30,205,118,232,
-208, 1, 5, 5, 5, 56,126,252,248,236,189,123,247,206, 14, 14, 14,190, 4, 96, 78, 68, 68, 68,232,203, 46,178, 88,133, 45,238,
-189,222, 21,190,209,153, 0,128,148,239,139,151,134,180,251,242, 27,193,226,251, 47, 8,172,234, 80, 84, 84, 20, 52,115,202, 40,
- 48, 76,113, 45,177, 97,253, 58, 88, 58,107, 60, 57,112,232, 88, 80, 53,246,230, 74,142,227, 26, 57, 57, 57,125,166,213,106,229,
-171, 86,173,146, 39, 37, 37, 53,221,179,103, 15,141,140,140,132, 68, 34,129,189,189, 61,186,117,235, 38,235,211,167, 79,131, 75,
-151, 46,213,217,187,119,239,160, 87, 95,125,117,235,159,127,254,121,176, 50, 94,151, 22, 3, 27,185,187,122,156,253,102,209, 56,
-167,230,245,125,161, 55, 26,145,152,150, 4, 10, 41, 60,220,108, 48,242,181, 0, 73,135, 16, 73,195, 21,235, 78,133,186, 55, 31,
-244, 74,234,237, 3,119,170,139, 99,167, 96,155,176,193,157, 27, 4, 15,236,221,158,105,232,231, 15,137,204,186,244, 88,139,160,
- 32,180, 8, 10, 34,227,199,231,215,143,188, 30,249,197,209, 83, 87,103,117, 10,182,137, 56, 31, 81, 88,249,194,152, 20, 50,243,
-218,105,175,191,241, 38, 26, 55,110,252,212,203,220,252,251,201,147, 39, 32,132, 32, 35, 35, 3, 60,133,180, 22,105,131, 43, 87,
-174, 32, 32, 32, 0,189,122,245,194,240,225,195,149,251,247,239,255,109,237,218,181,157, 1,140,127,158,204,194,113, 92,135,160,
-160, 32,214, 96, 48,128,101, 89,100,102,102, 34, 54, 54, 22,190,190,190, 44,199,113, 93,170, 17, 26,104,223,190, 61,190,250,234,
-171,196,179,103,207, 6, 1,192, 43,175,188,114,189, 77,155, 54,174, 43, 87,174, 76, 60,127,254,124,112,137, 96,139, 8, 9, 9,
-177,120, 56,173,181,181,245,187, 31,127,242,169,107,110, 86,182,198,152,159,111, 80,240,156,201, 78, 46, 38,121,233,153, 57,143,
- 19,236,138,222,157, 48, 69,244,229,140,169,239, 2,176,168,205, 94,169, 84,214,105,218,180,105,216,230,205,155,221,156,157,157,
-145,147,147,131,204,204, 76,132,133,133,129,231,121,244,233,211, 71, 22,212,178,101,208,138,149, 43, 47, 43,149,202,118,150,136,
- 44,153,179, 11,246,116, 46,126, 52,134, 62,202, 44,117, 88,142, 14, 31, 80,122,206,136,184, 92, 0,128, 92, 46,175,245,178, 62,
-148,210,118, 29, 58,116,144, 0,192,180,105,211,242, 10, 11, 11,151, 18, 66,126, 83,171,213, 73,213,252,117,218, 23, 95,124,225,
- 89,191,126,125,159,223,126,251, 13, 5, 5, 5, 0,224, 86,191,126,125, 52,106,212,136, 59,123,246, 44, 26, 55,110, 12, 91, 91,
- 91,156, 61,123, 22, 87,174, 92, 65, 96, 96,160,173, 68, 34,121,179, 50,129,245, 74,191,206,115,100,226,166,157,154,132,188, 3,
-133,157, 18,155,183,255,142,123,225, 91, 59,233,140,119,231,204,250,208,243,109,150,202,222,241,108,164,152, 81, 47,164,139,115,
-195,102,131, 80, 55,248,134,139,142, 59, 23, 59,103,146,239, 50,145, 92,187,109,238, 55,234,204,202,196,149,135,135,199,242,190,
-125,251, 14, 93,191,126,189, 3, 0,220,186,117, 11, 41, 41, 41,112,117,117,133, 92, 46,135, 88, 44,134, 72, 36,170,209, 82, 89,
- 86, 86, 86, 72, 78, 78,134,185,226,192,113, 28,242,243,243, 75, 23, 13,159, 63,159, 48,115,231, 90,230, 54, 41,149,202,142, 65,
- 65, 65,191,122,121,121,121,151,221,223,183,111, 95,140, 31, 63, 30,133,133,133, 8, 12, 12,236,224,238,238,174, 27, 55,110, 28,
-120,158, 71,106,106,106,193,173, 91,183,122, 38, 37, 37, 93,173, 36,222,154,148,148, 20, 76,152, 48, 1,241,241,241,147, 84, 42,
- 85, 28,195, 48,114,169, 84,106, 62, 46, 85,169, 84,141, 27, 55,110,252,221,184,113,227,240,228,201, 19,196,196,196,132, 61, 79,
-165, 74, 38,147, 21,114, 28,231,102, 50,153,160,209,104,208,167, 79, 31,121,211,166, 77, 83,197, 98,241,221,156,156,156,145, 9,
- 9, 9,201, 22,186,141, 34,165, 82,233, 33, 22,139,215, 79,153, 50,165, 95,231,206,157,113,247,238, 93, 28, 61,122, 20, 3, 7,
- 14, 68,151, 46, 93, 48,123,246,236, 87,231,204,153, 51, 13, 64,101,149,129,221,123,246,236,169,231,229,229, 85,186, 36,146,157,
-157, 29,222,125,247, 93,140, 26, 53, 10,135, 15, 31,110,191,100,201,146, 61, 93,186,116,113, 11,125,142,150,138,255, 2,100, 33,
-237,225, 27,157,137, 71,126,206,197, 14,126,137,208, 50,111,195, 51, 72, 80, 54,255,102,129,165,215, 20, 25, 68, 12,189,235,170,
- 12,220, 25,118,116, 74,105, 19, 33, 76,244,174,222, 80,100, 40,182,205, 41,242,138, 76,176,146, 49,120,146,156,143,219,143, 50,
- 42,122,225,223, 46, 87,248,127,178,122,245,106,124,253,245,215,125, 53, 26, 77, 65,108,108,108,114, 65, 65, 65,225,200,145, 35,
-137, 88, 44,198,197,139, 23,241,248,241, 99,180,104,209, 2, 14, 14, 14,232,216,177,163,164, 87,175, 94,222, 99,199,142,125, 27,
-192,193,138, 56,201,208,161,172, 82, 42,251, 99,249,162, 97, 78,132,141, 65, 76,124, 14, 26,120,181,134,179,189, 55,146,210, 11,
- 16, 17,117, 24, 49, 15,255, 68, 3,175, 58, 24,255, 86, 3,135,111, 55,164, 31, 34,193,239, 55,160, 17,255,235,231, 85,209,144,
- 80,185,132,107, 53,111,117, 36,184,194,135,160,198,120, 80, 67,202,179,133,187,131, 55,154, 6,184,195, 90,234,202,220,138,254,
-182, 85, 85,113,215,153,232,231,139, 23,206,255,177,101, 96, 48,114,115,115,177,102,205,154, 82, 97, 69, 41, 45,173,113,183,109,
-219, 22, 70,163, 17, 63,254,248, 35,140,124,177,253, 95, 85, 56,203, 97, 68,155, 54,109,126,167,148, 74,173,172,172, 82, 2, 2,
- 2,124, 62,252,240, 67,209,176, 97,195,160,209,104,198, 41,149,202, 99,201,201,201,251,106,200, 9, 0,168, 91,183,110,199, 46,
- 93,186, 88,177, 44, 11,131,193,128,220,220, 92, 36, 38, 38, 34, 54, 54, 22, 46, 46, 46, 64,153,254, 91,149,113,150, 95, 11,145,
- 82, 74,205,241, 47, 43,196,204,247,197,146,112, 18, 66,154, 58, 58, 56,218,252,176, 98,125,184,171,140, 37, 46,222, 42, 34,177,
-115, 16, 49, 10, 91, 25,101, 89,141,143,183,202,150, 16,210,180, 18, 65, 82,126,209,112, 82,183,110,221,189, 91,182,108,113, 19,
-139,197,224, 56, 14,174,174,174,136,141,141, 69, 78, 78, 14,242,243,243, 17,123, 55, 26,245,188,188,240,209,248,247,148,243,191,
- 89,185,151, 16, 18, 82,182, 16,171,112, 49,110,163,177,124,152, 43, 43,136, 96, 73, 56,171,112, 72, 30,171,213,106, 88, 91, 91,
-195,207,207, 79,113,237,218,181,243, 73, 73, 73, 73,213,113,202,229,242, 55, 59,116,232, 96,187,125,251,118, 4, 7, 7,195,222,
-222, 30,103,206,156,193,173, 91,183, 96, 48, 24,152,252,252,124, 40, 20, 10, 44, 91,182, 12,117,234,212, 65,110,110, 46,226,226,
-226,156,197, 98,177, 75,101,156,231, 14,159, 93,152,253,232,204,156, 20,246, 88,159,205,219,127,199,184, 17,195,224, 97,122,116,
-222,177, 1,179,176,239,171,237,191,100,197,222,253,109,108,155, 59, 54,106, 62, 8, 18,169, 2, 31,126,190, 0, 49,183,255,112,
- 44,202,191, 53,137, 51, 38,120, 3,248,168, 60, 39, 41,190, 65,140, 74,165,122,111,227,198,141,182,230,253, 12,195, 64, 44, 22,
- 63, 37,172,204,139,177, 87,116, 79, 43,186,159, 28,199,193, 96, 48,192, 96, 48,128,231,121,164,167,167, 35, 63, 63, 31,142,142,
-142,197, 39,204, 5, 8, 8,161,149,172, 66, 95,150,147, 97,152,145,191,255,254,187,183,181,181,245, 51,231, 37, 36, 36, 32, 55,
- 55, 23, 54, 54, 54,112,112,112,128,209,104,132,201,100,130, 78,167, 83,116,233,210,101, 34,128,171, 21,113,178, 44, 59,117,194,
-132, 9, 29, 14, 29, 58,228,187,104,209, 34, 24, 12,134,229,233,233,233, 48, 11,180,142, 29, 59,182,165,148,222,155, 50,101, 74,
-137, 32,156,111, 44, 40, 40,248,160,182,121,201,221,221,221,127,192,128, 1,142, 39, 79,158, 68,199,142, 29,161,211,233, 48,113,
-226, 68,187,247,222,123,207,238,210,165, 75,174,171, 86,173,218, 6,160, 71, 85,156,193,193,193,226,212,212,212,233, 35, 71,142,
-156,214,163, 71, 15,251,140,140, 12,200,100, 50,236,220,185, 19, 63,252,240,195, 17,131,193,240,197,158, 61,123, 22,111,218,180,
-169,207,160, 65,131,176,105,211,166, 41,132,144,175, 41,165,124, 5,156, 42,111,111,111,220,188,121, 19,142,142,142,112,113,113,
- 65,110,110, 46,174, 92,185,130,176,176, 48, 52,109,218, 20,132, 16,199,146, 50,205,244, 60,207, 81, 13, 43, 53,127, 59,103,233,
- 26,171,101,242, 46, 0,112, 40,158, 97,179,182,225, 36,132,136, 84, 42,213, 32, 7, 7,135, 73,148, 82, 81,118,118,246, 70,107,
-107,235,221,149, 45, 19, 36, 44,244,108,161,192, 34,132,152,211,165, 11,165,244,172,103, 52,242, 50, 66, 28, 99,156,221,253,127,
-119,246,108, 86,124, 19, 77,244, 46, 43,115,140,113, 15, 47,202, 3, 0,131,145,226,210,221,108,220,124,144,138,155,247, 83,160,
-144, 87, 95,235,118,118,118, 70,251,246,237,113,224,192, 1, 36, 36, 36, 40,150, 45, 91,214,200, 96, 48, 24, 6, 12, 24,160,174,
- 91,183,110,118,199,142, 29, 33, 22,139,113,245,234, 85,228,229,229,129,101, 89, 72,165, 82,240, 60, 95,169,211,230,118,159,123,
-103,244,248, 32, 95, 23, 7, 6, 7, 47, 30, 67,219,166,131, 97, 45, 19, 35, 61, 91, 3,134, 16, 60,124,124, 18, 28,103,131,200,
-187,241,104,215,220, 6,157,218,216,123, 21,156,202, 26, 15, 96,157, 37, 55,200,144, 20, 10,105,221,215, 1,121, 51, 80,253, 67,
-240,250, 36, 80,177, 27, 10,139,228,200,120, 18,135,187, 87,118,131,154,138,170,229, 73, 72, 80,255,164, 82,169, 58,134,142,122,
-231, 29,158,231,241,213, 87, 95,133,222,191,127,191,107,217,115, 26, 52,104,112,102,246,236,217, 93,178,179,179,113,236,216,177,
-173,106,181,122, 75, 77, 18, 83,173, 86,159, 4,224, 84,214,141,185,126,253,250,246, 95,126,249,165,221,219,111,191,141, 93,187,
-118,125, 6, 96, 95, 77, 56,167, 76,153, 34, 62,112,224, 64,111, 43, 43,171, 53,115,230,204, 81,232,245,122, 36, 39, 39, 35, 37,
- 37,165,212,109,187,115,231, 14, 39, 18,137, 46, 85, 83,248, 87,184,216,116,121,129, 85,102,159,165, 53,239, 2,189,209,168,179,
-241, 86, 25, 7, 12,234,221,226, 86,216,141, 24, 43, 39, 39,166, 69,171, 64,255,187, 15,158, 68,144,226, 38, 24,139,154, 97,188,
-188,188,134,205,157, 59,183,133,157,157, 29,120,158,135,189,189, 61,210,211,211, 75, 5,165, 62, 63, 15,134,188, 92,220,140,139,
- 69,199, 46,221,208,171, 93, 91,191, 63,141,198, 97, 0,118, 84,197,235,212, 50,168,212,185,218,229,235, 92,186,127,248,147,156,
- 82, 1,112,184,117, 67,200, 20, 54,104,254,241,204, 90, 63,204,201,201,201,215,125,124,124, 14,247,233,211,167,223,248,241,227,
-153,148,148,148,163,238,238,238, 29, 82, 83, 83,163,170,250,159, 66,161,104,144,145,145,129,252,252,124,216,219,219, 99,213,170,
- 85,112,115,115, 67, 81, 81, 17,174, 93,187, 70,189,188,188,200,153, 51,103,224,233,233,137,204,204, 76, 24, 12, 6, 20, 21, 21,
-165,232,245,250, 74,251, 72,150, 52, 3,246,157,218, 75,121,228, 94,248,214, 78,158,136,189, 54,228,179, 78,247, 35,195, 98, 18,
- 78,159,186,184,208,164,149, 39,228, 36,158,152, 94,191, 85,164,203,164,207,230, 99,237,242,185,184,119,245,108,150,123,157,252,
-117, 28,209,109,237,208,187, 74,151, 86, 27, 29, 29,109, 27, 25, 25, 9,134, 97, 96,103,103, 7, 27, 27,155,210,133,205,205,226,
- 74, 36,178,220,160, 55, 87,112,204,226, 42, 61, 61, 29, 15,227, 98,176,231,244, 54, 24, 77, 70,151, 45,109,236, 82,124, 37,146,
-155, 46,185,100, 86,198,109,122,189,154, 2,112,227,240,225,195,135,121,122,122,218,150,221, 31, 16, 16,128,183,222,122, 11, 71,
-143, 30, 69,120,120,248, 83, 21,172,244,244,244,100,142,227,182, 86,198, 25, 31, 31,159,227,229,229,213,231,189,247,222,139,216,
-183,111,159,221, 55,223,124, 83,186,176,185,185, 89,212,252,189,125,251,118, 68, 68, 68,204, 73, 73, 73,185, 91,155,124,228,225,
-225,209,116,192,128, 1,231,214,173, 91,231,144,154,154,138,140,140, 12, 20, 22, 22, 66, 44, 22,195,100, 50,161, 97,195,134,132,
-227,184,122,213, 53, 7, 50, 12,243,199,233,211,167,123, 55,106,212, 8, 0, 96, 52, 26,113,241,226, 69,140, 31, 63, 62,211,218,
-218,250,205, 39, 79,158, 20,170, 84,170,217,135, 14, 29,234, 19, 16, 16,128, 22, 45, 90,120,164,165,165,217, 2,200,173,236, 29,
-194,113, 92,105,250,252,248,227,143,165,199,180,218,226, 37, 39,245,122, 61,105,213,170, 85,189,107,215,174,189,180,131, 91,226,
-126,217,140, 39,179, 38,195,231,252, 61, 0, 64,132,127,113,151, 43,159,179,209,197, 39,140, 26, 85, 35, 62,149, 74,229, 76, 41,
- 29,215,163, 71,143,143,251,244,233,227,170, 84, 42,225,236,236,140, 91,183,110,117, 56,118,236,216, 26, 47, 47,175, 13, 28,199,
-109,176,196,173,127, 94,148,215, 34, 47,141,131, 69, 41, 37, 37,145, 35, 24, 50,132,115,217,189, 59, 35,201, 79,106,144,138,172,
- 99, 0, 64,111, 40, 50,184,135, 23, 21, 79,211,176,112, 59, 40, 40, 56,190,196,109,160, 20,156,133,227, 64,180,119,223, 0,159,
-243, 7,220, 28, 7, 97,211,166,125, 72, 75, 75,147,172, 90,181,170,238,190,125,251,188, 70,142, 28, 25,223,176, 97,195,220,110,
-221,186, 97,219,182,109,240,240,240,128, 94,175, 7,207,243,149,170, 55, 91, 39,110, 72,155, 22, 13,217,152,184, 91, 8,105,244,
- 6,234, 41, 59,226, 97, 82, 46,178,243,117,200,204,213,160,113,227,207,144,154, 85,132,188, 66, 45,110,221,251, 13, 94,202,250,
- 12, 43,126,216,199, 82,129,165,123,248, 43,116,177,191, 67,162,236, 10,105,253, 97, 16,187,180, 67,194,189, 80,220, 56,185, 18,
-137,247, 47,128,242, 28,220,189,155, 90, 90, 51,153,183,122,245,234,145, 75,151, 46, 21, 77,158, 60,185,139,167,167,103,151,164,
-164,164, 80, 0,240,244,244,236, 50, 97,194,132, 46,182,182,182, 88,188,120,177,145, 82, 58,239,121, 19, 55, 57, 57, 57,222,211,
-211,115,210,201,147, 39, 35,199,142, 29,139,166, 77,155, 6, 17, 66, 24, 75, 58,214, 54,108,216,112,188, 84, 42, 29, 99, 50,153,
- 26,141, 24, 49,130, 25, 55,110,156,194,205,205, 13, 79,158, 60,129, 78,167, 3,195, 48,144, 72, 36,184,115,231, 14,255,199, 31,
-127,228, 74, 36,146, 41, 22, 56, 44,112,113,113,241,236,212,169, 83, 4, 0, 56, 57, 57,121,241, 60, 15,103,103,103,175,246,237,
-219, 71, 0,128,163,163,163,103, 69, 66,172, 82, 1,108, 48, 92,139,143,139,107,220,161, 83, 7,229,185,240,168,235,175,191,214,
-191, 43, 35, 98,152,199,113,201,215, 92,157,157,108, 46, 94,186,144,103, 48, 24,174, 89,194, 37, 22,139,251,119,236,216, 81,148,
-157,157, 13,149, 74,133,244,244,116, 36, 37, 37,193,104, 52, 66,155,155, 13, 67, 94, 30, 12,185, 57,160, 69, 5,120,116,237, 42,
-252,188, 61,101,199,139, 59,193,239,168,174,198, 89,145, 67, 69, 8, 41,221, 39,179, 85,192,202,214,182,180,249,163, 6, 47,199,
- 65,118,118,118,211,243,243,243, 15, 39, 37, 37, 45,210,235,245, 31, 46, 93,186,180,213,130, 5, 11, 92,166, 79,159,110, 55,125,
-250,244, 93,117,235,214, 13,124,242,228,137,174, 82,133, 90, 80,240,208,104, 52, 58, 3,112, 63,117,234, 20, 92, 93, 93,145,151,
-151, 7,163,209, 8,141, 70,163,119,116,116,148,103,102,102, 66,171,213, 66,175,215,195,206,206, 14, 17, 17, 17, 89, 38,147,233,
- 96,117,225,115,104,192, 44,212, 25,239,206,113,242,183, 73,226,168,115,231,124, 13,159, 61,247, 27,245, 66, 0, 43,250, 54,104,
-176, 89,207,159,141,141,185,125,192, 49,246,218,153, 44,245,253, 34,223,205,127, 62,202,175,226, 62, 82, 66, 8, 79, 8,161, 77,
-154, 52, 65,122,122, 58, 88,150,133,141,141, 13, 20, 10, 5,154, 54,109,138,132,132,132, 90, 11,172,178,226,234,228,229, 67,200,
- 40, 72,198,230,229,219,225,233,225,205, 0,112, 77, 74, 73,232, 57,118,218,208, 54,245, 59, 58, 46,141,189,144,189,172,138,138,
-206, 13, 0,118,101,247,121,122,122,118,117,116,116, 60,109, 48, 24,240,228,201, 19, 28, 63,126,188, 75, 98, 98, 98,141, 10,144,
-196,196,196, 71,158,158,158,125, 94,123,237,181,109, 45, 90,180,104, 64, 41, 69,211,166, 77, 49,104,208, 32,236,217,179, 7, 81,
- 81, 81,200,203,203,227,207,159, 63,191, 37, 57, 57,185, 86, 29,114,148, 74,101,147, 87, 95,125,245,194,218,181,107, 29, 51, 50,
- 50,160,213,106, 81, 80, 80,128,221,187,119,163, 67,135, 14,144,203,229, 88,189,122,117,158,201,100, 90, 91,149,184,162,148, 30,
-216,183,111, 95,111, 95, 95, 95,220,189,123, 23,231,207,159,135,171,171, 43,172,172,172, 48, 96,192, 0,231,223,127,255,253, 67,
-127,127,255,149, 98,177,120, 97,191,126,253,192,113, 28,194,195,195,147,227,226,226,242,171, 74,163, 74,203, 21,173, 22,148, 82,
- 24,141,198, 85, 12,195,188, 25, 28, 28,220, 43, 34, 34, 34, 12, 47, 9,188,188,188,154,137,197,226,143, 28, 29, 29,145,158,158,
-142, 28, 30, 80,100, 21, 15,186,205, 45,121, 93,102,101,101,149,190,107, 26, 53,106,244,167, 70,163,153,149,152,152, 88,169,203,
-228,233,233,217,210,218,218,250,227, 1, 3, 6,140,124,245,213, 87, 89,131,193,128, 67,135, 14, 97,237,218,181,232,211,167, 15,
- 26, 54,108,136,207, 62,251,204, 94,167,211,205, 56,122,244,232,116, 63, 63,191,163,249,249,249, 51,171,226,124, 65, 14,222,255,
-180,200,203, 34,176, 74, 34,244,191,126, 52, 67,134,112,158, 64,118, 73,141,198,197,201,201,105, 45,199,113, 93,241,229,151,176,
- 21,217,227,201,195,251,200,207,230, 97,212,235,192,243, 20,148,183,236, 94,240, 57,127,192,238, 21,138,188,115, 4, 6,131, 1,
-110,110,110, 88,182,108, 25,114,115,115, 69, 99,199,142,173, 55,127,254,252, 27, 90,173, 22,133,133,133,208,104, 52,208,104, 52,
- 85, 10, 44,137, 92,215,194,199,189, 17,242, 53,173, 97, 45,149, 34, 51, 79,135,236,124, 29, 50,114,180,216,123, 96, 4,116,154,
- 34,152,244,122,112, 6, 19, 20,238,131,209,208,169, 43,128, 7,205, 45, 76,232,146, 64,155, 96, 72, 58, 1, 67,210, 9, 88, 7,
-204,198,129,213,111, 63,117,158,201,100, 89,147,127,114,114,114,188, 74,165,250,126,204,152, 49, 83, 94,123,237, 53,108,216,176,
-225,107, 0, 33, 37, 46,194,215,131, 7, 15,198,157, 59,119,112,238,220,185,245, 47,170,182, 64, 41,117,118,114,114, 2,195, 48,
- 40, 42, 42,210, 85, 39,174,118,239,222, 77,230,207,159,127,116,192,128, 1,237, 62,252,240, 67,107, 15, 15, 15, 80, 74,161,215,
-235,145,152,152, 8,134, 97,144,147,147,131, 31,127,252,177, 48, 60, 60,156, 74,165,210, 75, 98,177,248,253, 59,119,238,168,171,
- 11,139,163,163, 35, 70,140, 24,225,218,186,117,107,215,178, 35, 6,223,124,243, 77,215,144,144,144,210,125, 94, 94, 94, 22,199,
- 79,171,213,254,184,120,225,156,174,191,252,186,179,105,147,166, 13, 29, 15, 31, 63,115,221,217,217,206,170, 94, 61, 95, 89,110,
- 78,142,110,237,170,229,162,194,194,194,159, 44,164,243,115,113,113, 65, 74, 74, 10, 30, 60,120, 0,157, 78, 87,220,132, 83, 84,
- 0,125, 78, 14, 12,185,217,128, 86, 3, 41,199, 65,151,145,138,122,190,245,128,255,141, 48,172,174,102, 86,161,192, 50,127, 91,
-217,219, 65,106, 99, 3, 86, 44,178,184, 15,150, 82,169, 12, 14, 10, 10,218,185,105,211, 38,201,212,169, 83,219,212,173, 91,119,
-109, 74, 74, 74,156,151,151, 87,247,229,203,151,135, 45, 90,180, 72, 54,114,228,200, 38, 27, 55,110, 28, 13, 96, 99, 21,247,112,
-231,225,195,135,223,170, 83,167,142,251,237,219,183,161,213,106,193,243, 60,250,246,237, 11, 0,114,243,121,247,238,221,211,104,
- 52,154,212, 59,119,238,228,199,197,197, 25, 96,193,168,191, 57,107,147,174, 76, 29,234,245,186, 82,169,186, 44,149,249,212,103,
-138, 34, 6, 79, 29,234,245,205,202, 93,137,218, 35, 15, 31,230,207,153,228,187,172, 40,255,246, 36, 71,175,194,117,235, 14, 62,
-202,183, 36, 75,151,140, 24,132,139,139, 75,105,147,160, 68, 34, 49, 55,109, 33, 55, 55,183,202, 38,194,202, 10,239,220,220, 92,
-228,230,230,226,254,227,187, 72,207, 79,198,137, 29,151,193,113, 92,169, 59,162,114,247,194,201, 29, 97,182, 93,134,180,154,229,
-220,146,156,201,188, 73,175, 89,154, 79, 25,134,249,248,141, 55,222,128,193, 96,192,160, 65,131,176,125,251,246,143, 1,212,184,
-134,158,148,148,116,133, 16,210,232,193,131, 7,118, 70,163,113,224,128, 1, 3,182,246,235,215, 15,151, 47, 95,198,169, 83,167,
-186,232,245,250, 24,142,227, 52, 74,165,114,169, 82,169,116, 35,132, 44, 85,171,213, 85,142,118,110,220,184,241, 72, 91, 91,219,
-197, 86, 86, 86,249,253,250,245, 83,153,157,171,194,194, 66,152, 76, 38, 36, 38, 38,226,200,145, 35,201,135, 15, 31, 78,166,148,
- 90, 23, 20, 20,204,141,143,143,223, 93, 89,179,160,209,104,220,255,199, 31,127,244,241,245,245,197,217,179,103,241,213, 87, 95,
-161, 65,131, 6,216,178,101, 11,218,183,111,143,122,245,234,193,201,201,233,163,188,188,188,118, 95,125,245, 85,191,160,160, 32,
-236,219,183, 15,105,105,105,107,170,122, 63, 85,245,158,213,104, 52,160,148,162, 91,183,110,227,167, 78,157,138, 1, 3, 6, 28,
- 15, 9, 9,105, 29, 30, 30,126,255,191, 94, 72,171, 84,170,101, 61,122,244,152,222,178,101, 75,252,250,235,175,208,133,116,132,
-205,150,131,184,221,191, 3, 40, 0,213,150, 3, 0,128,219, 3,139, 7,116,212,235, 62, 4,211,167, 79,239, 55,120,240,224, 58,
- 0,154, 85,194,249,205,219,111,191, 61,237,237,183,223,198,245,235,215,177,113,227, 70,220,184,113,163,180,204, 51, 26,141,136,
-142,142, 70,116,116, 52,148, 74, 37,250,247,239, 79,222,127,255,253,190,125,251,246,117, 53,151, 89,127,177,139,213,229,165,105,
- 34,172, 74, 53,122,120,120,184, 56, 58, 58,222, 89,187,118,173,115,155, 54,109, 88,147,201,132, 83,167, 79,227,211,201, 99,209,
-167,255, 36,104,117, 82,152,180, 4,156, 68, 97,217, 21,237,250, 35,239, 28, 1,175,232, 7,189, 94,143,241,219, 37,112, 32,169,
- 88,245,142, 59, 0, 16,141, 70, 3,157, 78, 7,141, 70,131,194,194, 66, 20, 22, 22,130,227,184, 74,223,146,249, 57, 54, 6,131,
-145, 71, 82, 90, 28, 18,147,111,195, 94, 81, 7,148,241, 70,106, 86, 17, 8,220, 96,212,222, 3, 95,242, 96,234, 52,137, 40,212,
- 61,159, 40,230,242, 99, 43,112,102, 44,239, 83,201,113,220,226,229,203,151,143, 95,187,118,173,108,210,164, 73,193, 42,149,106,
- 32, 0, 76,155, 54, 45, 88, 46,151, 99,221,186,117, 58,142,227, 22,191,160,140,202,122,122,122,126,252,202, 43,175, 32, 47, 47,
- 15,119,238,220, 57, 84,221,127,102,207,158, 61,241,141, 55,222,104, 55,127,254,124,107,173, 86,139,162,162,226,230,207,220,220,
- 92, 20, 22, 22, 34, 53, 53, 21,211,166, 77,203, 54, 24, 12, 19, 30, 63,126,188,167, 6, 66, 15,127,252,241, 7,126,249,229,151,
-167, 70, 12,190,249,230,155,174,219,183,111, 79, 91,189,122,117, 18,165,148, 58, 57, 57,121, 13, 25, 50,196,205,210, 22, 66,181,
- 90,173, 81,169, 84, 83, 22, 45, 94,244,219, 55,203,151,187,101,101,102,199, 72,164, 86, 90,107, 43,153,211,244, 79, 23,210,212,
-212,212,105,169,169,169, 69,150,134, 51, 59, 59, 27,177,177,177,176,178,178,130, 68, 34, 1, 87, 84, 0,190,176, 16,186,236, 76,
- 48,122, 29,100, 28, 7, 39,107, 25,188,221,221, 81,199,205,178,190,248,201,103,142,227,200,176,254, 79, 53, 11, 18, 66,112,180,
-125, 19, 72, 21, 54,144, 43, 20,232,184,255,124,113,133, 65, 34, 1, 86,109,178,164, 25,199, 69,165, 82,253,177,102,205, 26, 73,
- 70, 70, 6,238,220,185, 19,249,228,201,147, 92, 39, 39, 39, 91,177, 88,204,223,191,127,255,228,189,123,247,250,215,171, 87, 15,
-148,210,234, 70,127,173,216,187,119,111,207, 14, 29, 58,152,234,213,171,103,147,158,158, 94, 39, 59, 59,155, 36, 39, 63,221,135,
-249,218,181,107,242,248,248,248, 34,158,231,247,161,120, 30,172,106, 51,254,212,161, 94,242, 75,215, 49,165,179, 75,189,150,246,
-174, 45,145, 97,188,209,242, 74,100,202,148,169, 67,189, 86,175,220,149,168,229,136,110, 43,103, 76,240, 22,201,181,219, 44,204,
- 71,212,223,223, 31,148, 82, 92,187,118, 13,231,207,159,199,249,243,231,241,228,201,147,210,115,236,237,237,113,226,196, 9,116,
-237,218,213,226,103,165,168,168, 8, 74,165, 18, 14, 14, 14,216, 23,250, 51,126,248,102,123,105, 71,119, 51, 50, 50, 50, 96,109,
-109,141,197,159,174, 84,140,253,124,200, 66, 0,189, 44,225,246,246,246,174,223,161, 67,135, 87,221,221,221,145,157,157, 13, 87,
- 87, 87,180,106,213,106,128,187,187,123,189,212,212,212, 90, 53,101,233,245,250,137, 93,187,118, 93, 52,109,218, 52, 24,141, 70,
- 12, 27, 54, 12,177,177,177, 59, 31, 61,122,180,202,199,199,103,202,164, 73,147,220, 93, 92, 92, 48,113,226, 68, 27, 0,175, 87,
-198,211,180,105,211, 79,102,204,152,177,100,212,168, 81, 50,163,209,136, 83,167, 78,149,186,212, 38,147, 9,113,113,113,152, 59,
-119,110,114, 94, 94, 94,231,196,196,196,135,213,133, 43, 37, 37,101,218,254,253,251,251, 54,110,220, 24, 71,143, 30,197,132, 9,
- 19,254, 84, 40, 20,205, 94,125,245,213, 58, 54, 54, 54,136,140,140,132,193, 96,128, 82,169,116,159, 49, 99, 70,255,222,189,123,
-227,228,201,147, 88,184,112,225, 33, 15, 15,143, 21,213,137, 96,145, 72, 4, 99,185, 62,141, 44,203,226,198,141, 27,232,214,173,
- 27,166, 79,159, 14, 0, 56,121,242,164, 93,175, 94,189,110,119,233,210,197, 46, 52, 52, 84,247, 95, 46,164,109,108,108,198,108,
-217,178, 5, 15, 30, 60,192,133, 11, 23,144,153,153, 9,189, 94,143, 92,190,184,207,149,172,196,185,162,158, 62,104, 63,109, 22,
-134,247,127, 29,201,201,201, 96, 24,198,165,138,178, 97,228,172, 89,179,112,228,200, 17, 44, 91,182, 12,121,121,121, 21,158,103,
-101,101,133, 86,173, 90, 33, 48, 48, 16,177,177,177, 0,224,242, 87,199,247,165,116,176,170,112, 29, 86,125,255,253,247,206, 29,
- 58,116, 96, 11, 11, 11,193,243, 60,218,181,109,139,209,239,140,198,177,125,187,161,172,223, 21,172,214, 10, 38, 91,107,203, 4,
-134,247, 86,100,101,101, 65, 38,147, 65, 94,210,161,244,102, 98,169,189, 11,173, 86, 91, 42,174,204,223, 85,193,164,151, 70, 68,
- 63,226,188,243, 10,110,224,106,196, 47, 48,234,245,168,215,104, 38,116, 38, 23,216,184,189, 11,141,225, 15, 24,114,138, 71,238,
- 74,237,186, 32, 53, 53, 3, 0,185,109, 97, 66, 63, 43,166, 52,207,118,118,231, 57,203, 5, 86,106,106,106,186, 82,169, 92,113,
-227,198,141,217,125,251,246,197, 15, 63,252,176,140, 82,138,126,253,250,225,218,181,107,136,140,140, 92,145,154,154,154,254, 2,
-196,149,200,195,195,227,199,117,235,214,245,115,119,119,199,222,189,123, 65, 41,173, 86, 16, 73,165,210,113, 83,166, 76,177, 54,
-187, 24, 82,169, 20, 26,141, 6, 41, 41, 41, 48, 24, 12,216,183,111,159, 78,175,215, 79,125,242,228,201,158, 26, 62, 52,180,117,
-235,214, 88,185,114,101,226,133, 11, 23,130, 1,160,125,251,246, 17, 33, 33, 33,174,171, 87,175, 78,186,114,229, 74, 48, 0,180,
-105,211, 38, 60, 48, 48,176, 70,243,184,168,213,234,196,198,141, 27, 63,212,104,181, 98, 71,103,167, 34, 91, 27, 41,205,203,207,
-103,110,222,188,158,156,154,154,250,164, 6, 84,209,119,238,220,105,158,148,148,132,184,184, 56,112, 69, 5, 96,116, 58, 16,157,
- 6,221,219,181,133, 21, 40,100,224, 33,225,141, 16,179, 34,228,231, 23, 0, 64,116,181,174,109,153, 2,193, 44,174, 8, 33,144,
- 43, 20,144,218, 42, 32, 83, 40,158,114,180, 44, 17,151, 86, 86, 86,191,109,220,184, 81,169, 84, 42,241,237,183,223, 66,169, 84,
- 54,237,209,163, 71, 81,231,206,157,173, 92, 92, 92,208,184,113, 99,132,132,132,224,204,153, 51, 32,132, 60,172, 38,109, 76,132,
-144, 94, 23, 46, 92,152,118,233,210,165,161, 42,149,138,140, 26, 53, 10,125,250,244,129, 76, 38,131, 70,163, 65,118,118, 54,254,
-252,243, 79,194,113, 92, 80,137,192,243,169, 91,183,238,118, 66, 72,226,227,199,143,223, 44,207,185, 97,113, 75, 85,190,134, 31,
-171,244, 80,189,222,185,119,189, 22,221,122,247, 64,253, 70,221,209,173,119, 2, 0, 44,115, 17, 63, 30,246,245,236,230,251,234,
-121, 59,109,185,180,255,228,151, 29,251,118,253, 98,254, 20,167,133,115, 87,103, 89, 50, 77, 67,105, 97,203, 48, 76,133, 46, 21,
-203,178, 96, 24,203,214,178,231,120, 46,177,207, 59,237, 74,183,141, 38,131,139,167,135, 55, 99,118,174, 0, 32, 47, 47, 15,241,
-241,241, 48, 26,141,112,118,118,134,209,104,104, 89,131, 74,213,148, 97,195,134, 17,173, 86,139,105,211,166, 97,249,242,229, 24,
- 52,104, 16,185,122,245,234, 20, 0, 31,215,194,209, 88, 62,113,226,196,105, 99,198,140, 65, 78, 78, 14, 78,159, 62,141,174, 93,
-187,226,251,239,191,119, 61,125,250,244,146,246,237,219,131,101, 89,156, 56,113, 2, 6,131,225, 94, 53,207,251,228, 81,163, 70,
-201, 18, 18, 18, 32,145, 72, 16, 18, 18,130,196,196, 68, 20, 22, 22, 34, 45, 45, 13, 11, 22, 44, 72,201,205,205,237,146,148,148,
-244,208,130,116, 97, 58,117,234,244, 81,195,134, 13,113,234,212, 41, 76,156, 56,241,136,141,141,205,235,217,217,217,239,235,116,
-186,213,253,251,247, 71,251,246,237,113,239,222, 61, 12, 24, 48, 0,173, 90,181,194,233,211,167, 49,125,250,244, 63,173,173,173,
-223,168,102, 30,172,251,161,161,161,205, 67, 66, 66, 80, 88, 88,136,252,252,124,136,197, 98, 56, 56, 56, 32, 58, 58, 26,141, 26,
- 53,194,244,233,211,177,114,229, 74, 76,157, 58,149,239,213,171,151,201, 96, 48, 72,204,163, 44,255,203, 40, 44, 44,164,201,201,
-201,176,179,179,195,174, 93,187,112,235,228, 49, 28,158,252, 46,228, 95, 44, 7,165, 20,137,139,102,160,219,231, 95,160,109,228,
- 35, 36, 39, 39, 99,219,182,109, 96, 24,166,116, 68,108,101,101, 91,110,110, 46, 2, 3, 3,113,237,218, 53,108,219,182, 13,223,
-126,251,109,169, 91, 43, 22,139,209,165, 75, 23,244,236,217, 19,247,239,223,199,198,141, 27, 97,103,103, 7, 1,181, 16, 88,148,
- 82, 82,246,251,105,119,134,239,214,170, 85, 43,182,160,160, 0, 90,173, 22,169,169,169,120,252,248, 49,172,172,172,144,148, 22,
-143,214, 13, 10,144, 66,244,184,115, 35,134, 35,172,248, 70,117, 53, 16,131,193, 0,189, 94,143,155, 55,111, 22, 15,125,111,180,
-180,180,243,115, 73,159, 15,104,181, 90,132,134,134, 82, 43, 43, 43,216,216,216,144,170,218,222,121,147,238,200,153,139,145,253,
-222, 30,220, 77,122, 34,244, 7, 24,117, 38, 20,232, 28, 80,168,213, 35, 95, 35,134, 94,214, 27,132,156, 7,195,202,208, 62,176,
- 1, 78, 95,184,175,229,140,134,163,150,169, 2, 14,172, 83, 75,112, 89, 55,203, 8,172,167,107,245, 18,153, 2,156,169,102,163,
-130,229,114,249,242, 21, 43, 86, 76,254,241,199, 31,109,223,127,255,253,198,230,194, 98,221,186,117,249,114,185,124,249,243, 10,
- 43,165, 82,249,118,135, 14, 29, 22,204,157, 59,215, 51, 48, 48, 16, 17, 17, 17, 88,186,116,233,159, 41, 41, 41, 7, 44,168, 25,
-123, 57, 59, 59,163,160,160, 0, 82,169, 20, 28,199, 33, 45, 45, 13,241,241,241,144,201,100, 8, 11, 11,211,251,248,248,236,173,
- 77,216, 44,233,208, 94,118, 68,101, 77, 96, 37,225,131,191,248,124,124, 67,173, 86,227,159,159,159,111, 18,137, 68, 34,153,152,
-139,173, 9,135,209,104, 60,116,254,252,249,215, 58,118,236, 40,139,185,121, 3,134,220, 92, 24,243,114, 32,225, 76,112, 10, 14,
- 4,163,215,130,232,141,240,244,163,208,228,216,224,226,245, 71, 70,163,209, 88,173, 43,104, 22, 88, 12,203, 62,221,239,202,206,
- 22, 82, 69,177,192, 42,187,159, 84,211,174,229,238,238,110,221,183,111,223,238, 65, 65, 65,160,148, 98,249,242,229,208,235,245,
- 82,163,209, 8,163,209, 8,131,193,128,252,252,124,236,217,179, 7, 63,255,252,243, 69,123,123,251,106, 7, 75, 80, 74, 77, 94,
- 94, 94, 31,242, 60,239,102, 50,153, 12,174,174,174,146,157, 59,119, 66, 46,151,131, 97, 24, 4, 6, 6, 66, 46,151,235, 84, 42,
-149,161, 36, 12,198, 21, 43, 86,136,222,123,239, 61, 73, 69,124, 1,173, 27,127,202, 81,231,206, 82,153, 79, 61,123,215,150,168,
-223,168, 59, 0,160,103,255,177,168,223,208, 27,185,233, 55,235,235,117,113,131, 89,146,233,248,203,229,164,232, 78,214,205,199,
-100, 38,134,198, 0,248,209,210,188,212,189,123,119,244,234,213,171,180, 57,208,205,205, 13,122,189, 30, 38,147,201, 98,113, 5,
- 0,230, 73, 68,231,207, 39, 12,230, 2, 91,218,216,166, 0, 40,181, 39,115,115,115,145,144,144,128,184,184,184,210,247, 20, 79,
- 45,171, 93,171, 84, 42,171,250,245,235,191,211,172, 89, 51,156, 62,125, 26, 55,111,222, 76, 58,123,246,172,103,235,214,173,225,
-229,229, 53, 70,165, 82,205, 82,171,213, 22, 79,168,236,234,234,106,211,169, 83,167,201, 99,198,140,193,189,123,247, 48,125,250,
-244,204,148,148,148,125,135, 14, 29,122,239,147, 79, 62, 97, 58,119,238,140,180,180, 52,108,216,176,129, 11, 11, 11,251,198,209,
-209,113, 65, 53,247, 49, 86,173, 86,215,213,106,181,200,204,204,132,121, 74,134,163, 71,143,226,216,177, 99,169, 57, 57, 57, 93,
-212,106,245, 3, 75,194,230,227,227, 99, 27, 28, 28,236, 30, 19, 19,131, 29, 59,118,192, 96, 48,124,241,228,201, 19,131,189,189,
-253,175,235,214,173,155,235,235,235,235,244,202, 43,175,160,125,251,246,160,148,226,224,193,131,152, 55,111,222,159, 86, 86, 86,
-175, 71, 69, 69, 25,170,161, 31,188,112,225,194,133, 46, 46, 46,111,190,245,214, 91, 76,112,112, 48,194,195,195,193,113, 28,186,
-119,239, 94, 42,174,142, 30, 61,250,219,209,163, 71,135, 0,144, 40, 20, 10,249,127,221,189, 50, 67,171,213, 34, 38, 38, 6,238,
-238,238,104,216,186, 29,166,223,126,140,243,151, 46,131, 82,138,142,119, 30,163,160,160, 16, 91,182,108, 65, 68, 68, 4, 88,150,
-133,175,175,111,181,156, 6,131, 1, 15, 30, 60, 64,122,122, 58, 6, 13, 26,132,145, 35, 71,226,235,175,191,134,193, 96,192,236,
-217,179,145,149,149,133, 77,155, 54,225,193,131, 7, 16,137, 68, 80, 40, 20,127,121, 60,171,210, 34, 47,165,131, 5, 20,183,125,
-243, 60, 15,181, 90,141,107,215,174,225,241,227,199,176,177,177,129,198,196,243,107,174, 68,242, 12, 17, 39,113, 20, 23,168, 9,
-159, 87,167,196,141, 70, 35, 17,137, 68,184,116,233, 18, 30, 62,124, 8,187,134,180,212,189, 50, 26,141,208,233,116, 40, 42, 42,
-130, 88, 44, 46,184,124,249,242,147,240,240,240,250, 34,145,168,210, 81, 96,105,141,216,173, 39, 78,158,250, 52, 56,208,191,113,
-143,206,243,112,232,208,151,200,201,203, 67,161, 78,132, 2,141, 1,133, 90, 10,149,109, 3,180,105, 25,132,244, 76, 61,238,223,
-137, 72,204,144, 56, 85,219, 6, 99,228,152,220,223,214,190,111, 63,112,200, 68,200, 61, 94,129,254,241, 78,240,154,212, 82,129,
- 37,145,219,194,206,165, 14,242, 10, 52,184, 24, 29, 11, 35,199,228, 90,122,211, 99, 99, 99,243, 84, 42,213,226,139, 23, 47,126,
-101, 30,249,115,238,220, 57, 60,122,244,104,177, 90,173,206,171, 97,109,182, 7,128,237, 0,228,110,110,110,169,239,191,255,190,
-178, 87,175, 94,242,206,157, 59,131,101, 89, 92,191,126, 29,239,191,255,254,113,133, 66,241,186, 37, 35,243,164, 82,105,106,110,
-110,174,189, 76, 38,131,209,104, 68, 74, 74, 10,238,221,187, 7,141, 70,131,212,212, 84, 16, 66,212,161,161,161,154, 90, 60, 56,
-207,140, 34, 52,143, 10,170, 68,136, 89,172,176,188,188,188, 58,247,235,211,185,249, 55, 43, 87, 67, 83, 84,128,176,203,135,144,
-157,149,129,141,155,247,182,240,242,242,234,108,105,103,226,196,196,196,223,247,238,221, 59, 45,160, 89,179, 32, 95,111,111,220,
-138,123, 12, 9,207, 65,202,113, 96,245, 90, 48,156, 14, 94,205, 41, 24, 70,129,212,148,124,172, 63,126,250,118, 98, 98,226,239,
-213,241,122,246, 29,136, 17,113,185, 32,132,224,120, 39,127,200, 21, 10, 72, 20, 54,104,191, 39,180, 84, 84, 61, 89,246, 25, 36,
- 54, 10, 56,182,170,126, 98,204,212,212,212,162,134, 13, 27,134,223,189,123,183, 85,147, 38, 77, 48,127,254,124, 36, 36, 36,128,
- 82,138,180,180, 52,109,122,122,122, 82,102,102,230, 19, 66,200, 62,181, 90,189,217,210,217,194,121,158,119, 59,120,240, 32, 0,
- 72, 0,224,212,169, 83, 80,169, 84,176,183,183, 71, 94, 94, 30, 70,141, 26, 37,155, 51,103, 14, 0,224,250,245,235, 98,185, 92,
- 94, 41,215,157, 27,247, 86,100,231,209,108,166, 48,226,245, 12,211,141, 22,221,122, 39,162,103,255, 49, 56,113,104, 11, 78, 31,
- 59, 9, 23,241,227, 88,206,170,224, 72,122,108, 70,126,114, 97,163, 13,254, 33,239,177,234,130, 99, 27, 39, 13,114, 20,121, 41,
-249, 93, 51,190,175,122,226, 94, 74, 41, 88,150,125,166, 67,123, 77,197, 85, 89,204,157, 75,121, 2, 66,234,139, 69, 55,146, 82,
- 18,122,171,220,189, 74, 43, 23,241,241,241, 72, 72, 72, 64,195,134, 13,241, 56,238, 17,164, 82,201, 13, 11,243,253, 91,253,251,
-247,183,213,235,245,216,191,127,191,137, 16,210,255,224,193,131,225, 1, 1, 1,162,174, 93,187,218,110,217,178,229, 45, 0,155,
-107,210, 98,164, 80, 40, 36, 70,163, 17, 91,183,110, 69, 82, 82, 82,231,148,148,148,104,149, 74,181,225,131, 15, 62,248,222,207,
-207,175, 97,116,116,244,125,141, 70, 51, 81,173, 86,223,172,142, 44, 39, 39,103,116,159, 62,125,118,241, 60,239,211,161, 67, 7,
-155, 17, 35, 70,216, 81, 74,225,231,231,135,195,135, 15,171,213,106,181,197,125,152,226,226,226,242,207,159, 63,159,234,239,239,
-239,174, 84, 42, 33,145, 72,150, 41,149,202, 69, 10,133,226,155, 1, 3, 6, 56,237,220,185, 19,187,119,239,134,141,141, 13, 98,
- 99, 99,213,119,239,222, 93,229,225,225,241,157, 37, 51,184, 71, 68, 68,196, 2, 24,209,186,117,235,121,223,126,251,237, 23, 12,
-195,188,125,252,248,241,210,185,206,204,226,170, 94,189,122,163,119,237,218, 53,242, 37, 51, 66,140,122,189, 30,206,206,206, 72,
- 79, 79, 71, 90, 90, 26,234,212,169,131,118,237,218,193,104, 52,226,192,161, 63,113,254,252,121, 80, 74,225,226,226, 2, 59, 59,
- 59, 68, 70, 70, 2, 64, 85,163,135,141, 6,131, 1, 78, 78, 78,200,201,201, 65,100,100, 36,220,220,220, 48,117,234, 84,232,245,
-122,236,220,185, 19, 55,110,220, 0,195, 48,112,117,117,133,173,173, 45,110,220,184, 81, 29,167,128,154, 10, 44,150,101,207,156,
- 57,115,102, 72,203,150, 45, 69,247,239,223,199,253,251,197,207,155, 70,163, 49,137, 88,236, 78,189,185,127, 68, 21,110, 74,243,
-178,115,101, 72,165,210,245, 67,134, 12,153, 56,118,236, 88, 76,154, 52, 9, 12,195,224,199,235, 58,196,199,243, 48, 24, 12, 72,
- 77, 77,197,173, 91,183,104,171, 86,173, 8,207,243,134, 46, 93,186,140,139,136,136,104,205,178,108, 94,101,156,116,215, 46,206,
-165,197,192, 65,235,214,111,190,244,206, 59,239, 56, 13, 28,180, 14,215,163,238, 32,167,176,184,149, 73,229, 98,131, 54, 77, 62,
- 67, 90,166, 14,199,142, 28,202,230, 77,218, 55,232,237, 29,198,170,194, 9, 0,233, 69, 26,183, 13,219,246, 46,223,177,103,223,
-184,241,163, 71,200,187,116, 25, 13,113,254, 45,112,153, 17, 80, 53,234, 0,194, 90,227,106,228,117,220,124,144,160, 45,210,178,
-155,243, 12,154,207,170,227, 44, 11,134, 97,214,108, 90,191,122,201,209, 19,161,172,193, 96, 64,191, 62,221, 57,134, 97,214, 84,
-227, 78, 61,195,105,109,109,189, 35, 50, 50,210, 73,167,211, 33, 49, 49,177,126,227,198,141, 65, 41, 69, 92, 92, 28, 86,173, 90,
-101, 58,124,248,240, 58,185, 92, 62,189,178, 26, 98,121, 78,163,209,184,125,235,214,173, 51, 63,252,240, 67,121, 90, 90, 26,238,
-222,189,139,194,194, 66, 24, 12, 6, 68, 68, 68,104,141, 70,227, 14, 11, 92,180,103,194,105, 22, 88, 78, 78, 78,158,109,219,182,
- 53,143, 34,244,228,121, 30,142,142,142, 94,173, 91,183, 14, 7, 0,123,123,251, 10, 71, 17, 86,117, 63, 19, 19, 19,207, 54,106,
- 80, 7, 91, 55,175,132,193,160, 67,114, 82,177,211,144,145,153,139,170,196,213, 51,121,137, 82,170, 84, 42, 95,255,118,213,170,
- 43, 19, 70,191,237,209,169, 91,119, 36,220,140,132, 62, 43, 29, 12,103,130,152,138, 80,148,102,133,212,212, 2, 44, 57,124, 50,
- 77,163,213, 62, 35, 90, 43, 11,103,105,179,160,157, 45,100, 10, 5,164, 37,174,149,249,152, 84, 97, 11,177,141, 2,172, 68, 82,
- 81,103,248,230, 21,204, 41,247,198,248,241,227,111, 30, 62,124,216,113,196,136, 17, 24, 56,112,224,245,156,156,156,174, 89, 89,
- 89,150,116, 20,175,144,147, 97,152,180,126,253,250,185,233,245,122,211,176, 97,195, 68, 25, 25, 25, 48, 15,177,207,207,207,199,
-145, 35, 71,208,164, 73,241,170, 51,119,238,220,129,191,191,127,165,156,239,125,126, 43, 9,192,194,169, 67,189,190,185, 18,153,
- 50, 5,192,178,250, 13,189,112,250,216, 73,156, 63,125,105, 70,219,230,252,234, 87,223,106,189, 64,222,237,205,207,252,131,223,
- 99, 21,118, 74,108,219,187,135,141,138,248, 97,177,182,240,182, 47,128,207, 42, 11, 39, 33,164,120,165,250, 50,226, 74, 36, 18,
-161,168,168,200, 34,113, 85, 85, 94,162,160,212, 37,143,124,241,206,212,161,237, 78,237,184,106,107, 99, 99, 83,218,231,167, 65,
-131, 6, 16,137, 69,248,113,223,154,194,156,156,140, 57,150,112,218,216,216,124,216,181,107, 87, 60,122,244, 8, 55,111,222,220,
-163, 86,171,111,170, 84,170, 61,177,177,177,195, 90,183,110,141,223,127,255,253,195,202, 4, 86,101,156,230, 25,235, 75,220,222,
-172,146,102,242, 72, 0,109,107, 26,247,146,201, 66, 59, 0,128,159,159, 95,194,224,193,131,237, 76, 38, 19, 74,196,179,115, 77,
-242, 18,165,148, 87,169, 84,223,133,133,133, 45, 13, 12, 12,196,240,225,195,123,134,135,135,247, 12, 8, 8,128,175,175, 47,178,
-179,179, 17, 26, 26,250, 11,207,243, 31, 36, 39, 39,107,171,170, 68, 85, 22,247,176,176,176, 7, 0, 70, 5, 7, 7,191, 41, 18,
-137, 96,103,103,199, 38, 37, 37,177,199,143, 31, 7,128,241,187,118,237,226,106,147,238,207,209, 98,240,151,115, 18, 66,102,143,
- 30, 61,122,195,251,239,191, 47,111,221,186, 53,114,115,115, 75, 69,255,225,195,135, 81, 50, 18, 27,206,206,206,120,240,224, 1,
-246,237,219,167,207,205,205, 93, 37,145, 72,150, 85,197, 57,106,212,168,167, 56,205,226,237,208,161, 67, 48, 15, 34,113,118,118,
-198,253,251,247,177,119,239, 94,109,110,110,238, 74,189, 94,255,245, 95, 25,247,255,119, 2, 43, 43, 43,235,163,153, 51,103,118,
-125,247,221,119,157, 53, 26, 13,235,226,226, 2,181, 90,109, 58,118,236, 88, 86,126,126,254, 71, 53,185,216,165, 75,151, 38,245,
-239,223,127,213, 79, 63,253,180,105,211,166, 77,157,135, 15, 31,142, 81,253,250, 97, 98, 59, 27,232,116, 58, 16, 66,112,236,216,
-177,123,103,206,156,169, 47,145, 72,116,115,231,206,229, 1, 92,169,142, 55,227,214, 31,247,221, 91, 12,238,188,122,205,247,187,
-131, 66,218,250,212,173, 87, 87,214,193,219, 30, 6, 35,135,212,180, 76,156,189, 20,165,187, 31, 21,153,192, 27,244, 67,211,162,
-170,159,197, 29, 0,162,162,168, 1,192, 71,254,254,118,243,191, 94,255,219,250,159,119,237, 25, 60,110,248,235,162,224, 22, 93,
-241, 56,229, 0,206,133,159, 49,101,231,211,125,249,122,118, 66, 84, 84, 94,118, 77,111,124, 98, 98,162,182, 97, 61,207, 92,173,
- 86,235,244,248,241, 99,164, 38,171,243, 18, 19,147,180,181,105,118,211,233,116,120,244,232, 17, 78,158, 60,137,235,215,175,227,
-226,197,139,134,227,199,143,255,196, 48,204,226,202, 38,154,172, 12,205,155, 55,255,234,135, 31,126, 24,194,113,156,111,151, 46,
- 93,228, 78, 78, 78,200,200,200, 64, 88, 88,152,254,198,141, 27,143,154, 55,111,254,117,109, 51,155,135,135, 7,134, 14, 29,234,
- 22, 28, 28,236,102, 30, 49,232,237,237,141, 55,222,120,195, 45, 32, 32,160,116, 95,157, 58,117, 80,147,169, 26, 74, 28, 44,188,
-243,222, 39,208,104, 10,112,229,210, 33,228,100,101,224,242,181, 24,212,196,193, 2,138, 71,122, 42,149,202,182,139, 86,173,222,
-219,167, 77, 43,191,198, 42, 15,153,115,189,186,176,113,245, 64, 86,102, 38,174, 68, 62, 52,174, 61,113,246,182, 70,171,125,221,
-210,145,158, 60,207,151,142,114,243,159, 50, 3, 12,195,148,174,130, 96, 62,110, 23,210, 17,140, 72, 12,142, 2, 6,131,161, 90,
-247, 78,173, 86, 39,122,122,122,190, 49,121,242,228, 83, 91,183,110,101,186,116,233, 18,248,199, 31,127, 60,215,162,185,137,137,
-137, 94, 37,174,104,158,157,157,157,104,204,152, 49, 48, 26,141, 40, 42, 42, 66, 94, 94, 30, 50, 51, 51,117, 31,127,252,177, 12,
- 0, 36, 18,137,177, 79,159, 62,213,190, 63, 86,238, 74,212, 78, 29,234,181,218, 69,252,120, 88,110,250,205,250, 46,226,199,177,
-109,155,243,171, 87,238, 74,212,126,245,190,227,162,164,244,208, 24,117,193,177,141,219,246,238, 97, 71, 15,126,131, 83, 42,238,
-207,112,241,198,174,174, 3, 45,120,121,149, 19, 88,181,117,174,158,121,159,220,166,215,235,183,179, 95,218,117,104,235, 89,139,
-166,173, 80,184,184,186,192,100, 50, 33, 54,254, 17,126,218,187,182, 48, 95,151,189, 56, 51,138,134, 91,194, 85,191,126,253,122,
- 44,203,226,192,129, 3, 0, 96,158,218, 96,237,145, 35, 71,134,189,245,214, 91,168, 83,167,142,127,221,186,117,101, 85, 77,163,
- 81,145,123,103, 52, 26,241,162,215,181, 38,132, 60,138,140,140,244,244,244,244, 36, 59,118,236, 40, 48, 24, 12,243,106,241,140,
-175,248,243,207, 63, 59, 81, 74,251, 4, 5, 5,193,199,199,167,228,125, 26,133,243,231,207,111, 79, 74, 74,122,231, 5, 45,238,
- 76, 9, 33,200,203,203, 51,207,107, 98, 80, 40, 20, 47,229,162,209, 73, 73, 73, 63,187,187,187, 31,155, 55,111,222,151, 13, 26,
- 52,248, 96,252,248,241,108,227,198,141,145,155,155, 11, 59, 59, 59, 40,149, 74, 36, 37, 37,225,231,159,127,230,210,210,210,126,
- 98, 24,102,190, 90,173, 86,215,150,211,209,209, 17, 74,165, 18,137,137,137,102,206, 77, 70,163,113, 65,122,122,122, 42, 4,212,
-236,153,178,228, 33, 45,153,166,225, 59,142,227,186,154, 93,173,172,172,172,143, 82, 82, 82, 50,106,171,238,251,247,239,223, 32,
- 35, 35, 99,147,193, 96,232, 60,112,224, 64, 12, 31, 62, 28, 3, 6, 12,192,240,225,195, 89,179,107,117,224,192,129,187, 53,225,
- 52, 47,246,204,176,146,254,148,210,150, 0, 8, 97,152,106, 23,123,182, 68,137, 7,249,219,249, 90,201,248,205, 86, 82,190,163,
- 70,207, 92,208,232,152,113,215,163,242, 30, 61, 79,205,166,100, 97,231, 95, 1, 64,103,164,111, 39, 36,168, 79,212,244,126,150,
- 52, 17,238, 32,132,176,148,210, 53,148,210, 29, 74,165,242,145, 37,182,123, 5,156, 12, 80, 60,185,232,201,147, 39,191, 36,132,
-188,173,211,233, 92,101, 50, 89, 58,165,244,151, 30, 61,122, 44, 88,189,122,117, 85,188,124,101,225,244,246,246,254, 77,165, 82,
- 53, 50, 59, 69,101, 11, 11,243,183,121,127,201,124, 68, 15, 19, 19, 19,223,178,244,126, 54,240,245, 58,230, 91,207,179,151,111,
- 61, 21, 0,224,209, 99, 53, 30, 61, 78, 58,254,240, 81, 98,239,218,164, 81,217,197,158, 73,201, 84, 12,212,130,197,158,203,115,
- 54,107,214, 44,156,101, 89,175,154, 60,148, 60,207,171,111,223,190, 29,100, 73, 56, 85, 42,213, 8,111,111,239,101,106,181,122,
-111, 66, 66,194, 39, 47,162,230,173, 82,169,218, 51, 12,115,152,231,121,171,242, 14,151, 89,132,121,120,120,248,200,100,178,167,
- 58,185, 87,197,249,245,236,230,115, 58,116,238, 52,248,226,217,243,251, 62, 95,124,123, 97,217, 99, 31, 14,118, 26,251,214,164,
-143,190,254,109,221,119,159,175,221,151,245, 83,117,225,108,217,178,101, 40,128, 70,102, 55,171, 42,112, 28,167,190,125,251,118,
- 72,109, 92, 7,231,150,164,149,131,141,203, 66,189,193, 16,192, 16, 80,177, 68, 18,153,147,147, 49,167, 34,113, 85, 25,167,151,
-151,215,178,134, 13, 27,126,244,240,225,195,237, 9, 9, 9,239,150,185,199,223,212,173, 91,119, 82, 66, 66,194,218,132,132,132,
-207, 44, 77,163,250,245,235,219, 5, 4, 4,100,207,159, 63,159,153, 59,119, 46,194,194,194,156, 18, 19, 19,179, 95, 68,186,251,
-248,248,120,200,229,242,109, 60,207,251,114, 28,183,238,209,163, 71, 43,106,195,233,239,239, 47,201,201,201,249,200,219,219,123,
-170,187,187,187,123,106,106,106, 92,124,124,252,210,148,148,148, 31, 44, 21, 87,150,164, 81,112,112,176, 14, 40, 94, 78,204,146,
-254, 86,255, 85, 7,171, 92,126,242,229,121,126,113, 64, 64,192,144,177, 99,199,146,232,232,104,156, 56,113, 2, 79,158, 60,217,
- 71, 41,157, 85, 89,147,110, 77, 57,143, 29, 59, 70,227,226,226,118, 49, 12,243, 69, 98, 98,226,163,191, 43,238, 47, 29,204,211,
-238,255, 21, 31, 0,205,171, 59,231,213, 87, 95,109,208,186,117,235,208, 22, 45, 90,240, 45, 90,180,200,127, 17,156,127, 69, 56,
-205,159,206,157, 93,108, 94, 52,231, 95, 17,206, 90,114, 50,207,249,249,199,227,222,176, 97, 67,106,214,112, 47,105, 26,253, 39,
- 57,215, 47,106,161,186,122,242,205,111, 55,127,213,220,179,252,177,121,147, 29,109, 79, 29,120,253,235,121,147, 29,109, 95,198,
-184, 3, 96, 42,217, 79,106,195,233,237,237,189,225,181,215, 94,227,188,189,189, 55,253,155,227, 14,128,248,248,248,200,132,231,
-232,197,115,186,187,187,135, 40,149,202,131, 74,165,242,160,167,167,103,235, 23,204,185,223,195,195, 35,232,159,136,251,203,246,
- 17,253,211, 2,239,208,161, 67, 15, 1,116, 25, 56,112,160, 27,203,178,255,250, 69, 58, 67, 67,211, 11, 95, 98,189,253,159,183,
-216,239,223,191, 79,132,106,211,191, 15, 31,204,190,169, 6,240, 73,235,238,207, 30, 43,153,154,225,243,110, 3, 95,206,184, 87,
-230,218,212,118, 33,230,248,248,248, 15, 84, 42,213,212,154,140, 62,252,135,226, 77, 1,232,132,220,255,226,145,146,146, 18, 14,
- 96,192,191,157,243,255, 59, 68,255,150,128,252,241,199, 31,105, 66,114, 8, 16, 32, 64, 64,245,248,183,139, 43, 1, 2, 4, 20,
-207,148,218,188,146,218,135,197,109,171,132,144,230, 53,189,112,117,252, 2,167,192, 41,112, 10,156, 2,167,192, 41,112,190,124,
-156,213,113,191, 44,125,187,200,139, 30,137, 82,254,230,253,215, 59, 21, 10,156, 2,167,192, 41,112, 10,156, 2,167,192,249,215,
-115,190,108, 96,132, 91, 32,224,175,198,154,113,196,115,205, 56,226,249, 87,157, 47, 64,128, 0, 1, 2, 4,252,219, 32,122,217,
- 34, 20, 18, 18,226, 79, 41,125,139, 16, 50, 4, 0, 40,165,187, 9, 33,191,133,135,135, 91, 52, 3,173,149,149, 85,138, 86,171,
-117, 3, 0,185, 92,158,166,213,106,149,101, 69,123,153, 15, 80,188,214,166,121,212, 90,165, 86, 96,253,250,245, 83,116, 58,157,
- 37,235,235,221, 32,132, 92,231,121, 62, 66,161, 80, 92,184,127,255,126,140,165,241,238,217,179,231, 7, 54, 54, 54,115, 52, 26,
-205,215,199,142, 29,251,238,175,190,207,132,144, 54,222, 42,143, 45, 70,147,129, 79, 73,203,154, 77, 41, 61, 80,209,121,223,191,
- 75,150,138, 72,241,164,145,223,191, 75,150, 79,252,145,206,172,138,183,166,231, 87, 17,190, 16,177, 88,252,161,187,187,123,223,
-196,196,196,112, 0,159, 83, 74,133, 89,136, 5, 8, 16, 32, 64,192,191, 79, 96,181, 11,118,110, 76,120,195,103, 98,150,118, 50,
-114,228, 60,101, 36,203, 47, 71,100,198, 60, 79, 0, 84, 42,149, 55, 33,164, 11,165,212,143, 97,152, 91, 60,207, 31, 87,171,213,
-153, 53,225, 8, 14, 14,246, 6, 48, 28,192,136,182,109,219, 54,159, 48, 97, 2, 26, 54,108, 8,173, 86,139,176,176,176, 25,191,
-254,250,235,140,224,224,224,219, 40, 94, 82,102, 71, 68, 68, 68, 66,101, 92, 90,173,214,205,172,149, 8, 33,110, 67,134, 12, 9,
- 43,179, 8, 47, 49, 47, 46, 75, 41,189, 2,224, 50, 33,228,210,142, 29, 59, 18,155,184, 89,181,173,235,237,250,234,145,240,184,
-217,229, 57,117, 58,157,219,141,131,251, 64, 77, 28, 10,146,226,209,224,245,225,165,199, 78,188,222, 29,180, 48, 15, 98,153,228,
- 70,215, 63, 46, 93, 7, 16, 17, 31, 31,127,189, 78,157, 58, 49, 85,113,150, 71, 96, 96,224,130,121,243,230,185, 12, 28, 56,240,
- 67, 0,149, 10,172,154,112, 86, 33, 94,100,109, 67, 90,158, 57,184,103,135, 28,132,193,107,131,135,108, 39,132,140, 42,191,152,
-244,247, 99,136, 59, 97,241,217,132,143, 39,176, 0,240,253,170,245,159,175,122,155,172,254,248, 23,154,226,233,233,217,149, 82,
-250,121, 9,223,215, 73, 73, 73,103,190, 31, 67,220,193, 96,250,132,143, 39, 16, 0, 88,191,106,253,103,223,143, 33,223, 77,220,
- 66, 83,107, 24,190,137,239,188,243,206,234,197,139, 23,179, 37,147,240,245,241,247,247,111, 76, 8,241,167,148, 10,157,131, 5,
- 8, 16, 32, 64,192, 63, 47,176,154, 55,183,119,176, 98,232, 84, 43, 41, 29,222,167,147,127,189, 1,125,219,147,250, 13,234, 35,
- 38, 58,198,247,204,217,107, 99,186,182,182,125,172,209,147, 29, 26,158,172,188,125,187,234,245,195,230,140, 35, 70,147,169,248,
-154, 34, 17,184,109,199,189,246,245,232,209,163,222,216,177, 99, 17, 20, 20,132,240,240,240,174,187,118,237,250,200,219,219,251,
-154,209,104, 60, 44,147,201, 66,171,155,225, 56, 56, 56,120,153,167,167,231,231,211,166, 77, 35, 33, 33, 33,144,201,100,165,199,
- 20, 10, 5,186,119,239,142,238,221,187, 35, 37, 37,165,121,104,104,104,243,223,126,251,109,105,112,112,240,215, 17, 17, 17, 51,
- 44,185, 65,115,230,204, 9,174, 96,247, 49, 66,200, 67,134, 97, 34,154, 54,109,154,216, 80,169,104,226,238,234,124,232,171,197,
-243, 1,160, 82,225,178,191,119,123, 0,120, 74, 96, 25, 50, 82, 33,183, 85,220,144, 88, 89, 93, 7, 16, 1,224,122,157, 58,117,
-110, 88,202, 9, 0, 93,186,116,145,217,218,218, 18, 74, 41, 90,183,110,237,212,187,119,239, 24,134, 97,190, 59,114,228,200,250,
-178,231,213,132,179, 26,180,153,247,217, 36, 73,198,163, 27,184,123,233, 56, 6, 5,123,202,175,223,185,183, 8,192,158,170,133,
- 15,195,108, 13,119,153,241, 49,240, 17,207,243,115,162,163,163, 59, 3,128,159,159,159, 20,192,153,109, 97,142,253,222,105,159,
- 91,235,105, 22, 8, 33, 18,150,101,215,109,219,182,237,189, 81,163, 70, 33, 46, 46, 14, 23, 46, 92,128, 66,161,192,130, 5, 11,
-234, 78,155, 54,109, 41,128,143,132,199, 94,128, 0, 1, 2, 4,252,163, 2,171, 83,176, 77,216,224,206, 13,130, 7,246,110,207,
- 52,244,243,135, 68,102, 93,122,172, 69, 80, 16, 90, 4, 5,145,241,227,243,235, 71, 94,143,252,226,232,169,171,179, 58, 5,219,
- 68,156,143, 40,108, 93, 25,159,201, 4,209,210,197,191, 1, 0,182,109,126,139,141,137,137,169,103,101,245,191,201,162, 59,119,
-238,140,206,157, 59, 51, 75,151, 46,109,115,230,204,153, 54, 59,118,236, 48,120,122,122,174, 74, 74, 74,218, 85, 69, 48, 63,223,
-181,107, 23, 97, 89, 22, 44,203, 86,122,146,135,135, 7,122,246,236, 9, 15, 15, 15,242,217,103,159,125, 14,160, 66,129, 37,151,
-203,211, 8, 33,110, 0,224,232,232,200,205,155, 55, 47,146,150, 0, 0,120,158,191,194,178,236,101, 66,200,149,189,123,247, 38,
- 53,240,180,242,180,149, 89, 31,223,180, 97, 13,140,121,169, 78,149, 93,191, 72,157,104, 86, 1, 79,237,151,218, 88,223,144,218,
-216, 92,151, 42, 20, 17, 0,174, 3,184, 97, 41,167, 89, 92, 89, 89, 89,157,219,176, 97,131, 35, 0, 76,158, 60,217,161,168,168,
-200, 97,220,184,113, 51, 0,148, 10,172,154,112, 86, 33, 96, 28, 58,181, 11,121,178,122,217,151,118, 65,109, 58,226,202,238,239,
-145,147, 83,136,194,252, 34,240, 60,255,204,202,191, 19,183,208,212,239,223, 37,203,191,255,118,253,116,194, 48, 36,160,247,231,
-232,237, 68,167,168, 84,170, 59,132, 16,177, 84, 42, 53,243,138,188,188,188, 84,141, 27, 7, 46,111,216,177, 9,214,127,183, 14,
-148,231, 41,128,229,150,186, 87,132, 16, 55, 91, 91,219, 3,199,143, 31,111,211,170, 85, 43, 92,185,114, 5,143, 30, 61,194,164,
- 73,147,244,147, 38, 77,146,140, 30, 61,154, 76,157, 58,117, 50, 33,100, 55,165,244,162,240,232, 11, 16, 32, 64,128,128,127, 76,
- 96,201, 37, 92,171,121,171, 35,193, 21, 62, 4, 53,198,131, 26, 82,158, 57,199,218,193, 27, 77, 3,220, 97, 45,117,101,110, 69,
-127,219,170,236,177,234, 70, 24,152,197,213,238, 21,170,102,154,194,100, 9, 0, 88,217, 40, 13,111, 76, 77,186,211,170, 85, 43,
-184,186,186, 74, 46, 93,186, 52, 21,192,174, 42, 56,137,254,102, 56,238, 14,232,128, 6,119,179, 96,109,109, 13,115,193,109, 70,
- 76, 76, 12,206,157, 59,135,184,184, 56,248,250,250, 2,255,235, 67,245, 12,167, 70,163,241,232,211,167, 79,232,215, 95,127,253,
-202,178,101,203,110,109,223,190,189, 11,165,180,168, 66,119,175,142,189,131,148,138,143,111, 94,255,173, 24,250, 66,167,123,215,
- 46,162, 89,223,247, 43, 12,103,189, 1,111, 96, 66, 78,113,211,227, 78,127, 21,228,118, 10,200, 20,182, 55,122, 30,187, 86,234,
- 92, 1,184, 97, 41,103,183,110,221,198,136, 68,162,217, 0,236, 55,110,220,232,224,224,224,192, 28, 56,112,192,176, 97,195,134,
-124,137, 68,162, 39,132, 44,169, 77, 56,171,130,152,101, 23,126, 51,239, 51, 59,107,198,132,235,135,127, 65, 98, 92, 60,110, 62,
- 72, 50,254,126, 62,138,211, 27,185,177, 21,221,207,137, 63,210,153,211, 6,203,182,132, 39,251, 30,236, 63,119, 82,163, 69, 3,
-221, 97, 48, 24, 54,167,167,167, 99,220,184,113,224,121, 30, 29, 59,118,236, 64, 41, 77,154, 50,101, 10,124,125,125,177,249,143,
-251, 69,162,188,171, 93,126, 61,149, 23,110, 73, 94, 34,132, 52,247,241,241, 57,126,230,204, 25,119, 79, 79, 79,132,134,134, 34,
- 37, 37, 5, 74,165, 18,147, 38, 77,146, 46, 91,182,108, 91, 94, 94,222,208,197,139, 23,203,111,223,190,189,131, 16,226, 93,162,
-153, 95,248, 8, 24,129, 83,224, 20, 56, 5, 78,129,243, 47, 65, 43, 0,174, 0,210, 1, 92, 43,183,141,146,223,168, 96, 59,163,
-164,204, 47,187,120,121, 6,138,251, 79,187, 2,224, 0,132, 1,200,126,209, 1, 22,149, 20, 80,157, 1,132, 2,152, 79, 41,157,
- 87,254, 36, 67, 82, 40,164,117, 95, 7,228,205, 64,245, 15,193,235,147, 64,197,110, 40, 44,146, 35,227, 73, 28,238, 94,217, 13,
-106, 42,170,254, 98, 34,152,214,172,122, 75,100,107, 13, 72,100,174,134,252,252,124,216,216,216, 64, 83,152, 44, 25, 61,174,212,
-217,146,156, 57,115, 6, 17, 17, 17, 80,169, 84,213,138, 64, 0,160,250,226, 86, 68,189, 94, 15,189, 94,143,148,126,173, 97,211,
-246, 21,100,191, 61, 9, 39, 79,158, 68,122,122, 58, 36, 18, 9, 36, 18, 9, 76,166,234, 39,139,103, 74, 86,226, 53,155, 86, 21,
-157,227,229, 69,228,182,156,213,161, 53, 43,151,216,217, 41,172,221,195,143,239, 71, 92, 92,138, 69, 55, 93,106, 99, 13,169,149,
-245, 13,169,141,213, 83,226,170, 38,156, 44,203, 46,216,179,103,143,167, 78,167,131, 68, 34,193,238,221,187, 13, 91,183,110,189,
- 83, 88, 88,216, 41, 34, 34, 66,243, 34,194, 89, 30,206,174,174,127,190, 62,242,253, 73,139,222,237, 9, 77,161, 22,251,206, 71,
-225,212,173,199, 3, 1, 92,160,148, 86, 58,195,253,138,125,186, 7,158,158,158,221,199,141, 27,119, 99,239,222,189, 46,223,124,
-243, 13, 56,142,131,201,100,130,201,100, 42,253,205,113, 28,182,111,223,142, 11, 87,163,166,168,213,121, 22, 45,166, 75, 8, 81,
-213,171, 87,239,228,213,171, 87, 93,173,173,173,113,226,196, 9,228,228,228, 96,226,196,137,165,206, 85, 78, 78,206,240,245,235,
-215,191,241,228,201,147,111,206,159, 63,159, 9,128, 5,240,175, 95, 53, 64,128, 0, 1, 2,254, 63,161, 26, 45,226, 74, 8, 57,
- 68, 41,237, 15,160, 7, 0,105,153,109, 16, 66, 14,149,148,219, 79,109,207,152, 49, 99,214,210,165, 75,239,152,183,205,231,204,
-156, 57,179,217,178,101,203,150,180,107,215,110,199,165, 75,151, 98,255, 50,129, 5, 32,148, 82, 90,105,223, 23,221,195, 95,161,
-139,253, 29, 18,101, 87, 72,235, 15,131,216,165, 29, 18,238,133,226,198,201,149, 72,188,127, 1,148,231,224,238,221,180,218,139,
- 45,220, 76,197, 42,149, 42, 66,173, 86,227,250,245,235,120,248,240, 33,228,242,103, 90,150,112,234,212, 41, 0,128,187,187,187,
-101,130,165, 85, 7,120, 71, 38, 35, 33,160,120,192,159,119,100, 50, 0, 96,201,204,153,144, 74,165,144, 72, 36,165,231,114, 28,
-103, 73, 34,155, 5,150,121,148,224, 51,199, 27,184,219,238,154, 59,227, 67,159,122,190, 13, 85, 87,255,220,137,216,216, 36,164,
-166, 90,150, 62, 50,133,205, 13,153,173,205,117,169,213,255,154, 5,107,193,185,115,232,208,161, 99, 6, 15, 30,108,213,182,109,
- 91,217,143, 63,254,152, 83, 94, 92, 61,111, 56,203, 66,169, 84,246,126,245,213, 87,255, 28, 63,126, 60, 6,245,233,129,183, 58,
-250,209,196,180, 92, 13,128, 19,148,210,106,111,106, 82, 82, 82,146,167,167,103,207,215, 95,127,253,215,102,205,154,249, 81, 74,
-209,180,105, 83, 12, 26, 52, 8,123,246,236, 65, 84, 84, 20,242,243,243, 13,231,207,159, 95,165, 86,171,127,178,240, 97,180,118,
-116,116, 60,122,250,244,105, 87,107,107,107, 28, 63,126, 28, 69, 69, 69,207, 56, 87, 75,150, 44,145, 63,126,252,120,237,177, 99,
-199,234,162,120, 93, 56, 65, 92, 9, 16, 32, 64,192,191, 15, 85,106, 17,179,112,162,148,246, 47, 43,152,202, 11, 45,243,111,243,
-121, 75,151, 46,237, 95, 86,124, 1,192,178,101,203,150,148,217, 46,250, 43, 34, 99, 22, 88, 93, 8, 33, 20, 64, 23, 74,233,217,
-114, 54, 96,241, 15,222, 4, 67,210, 9, 24,146, 78,192, 58, 96, 54, 14,172,126,251, 41, 34, 75,156,161,138,160,213,106, 33,150,
- 58, 27,182,109,126, 75, 2, 0, 28,181, 49, 60,115,237,234, 28,172, 26, 76,150,106, 73, 56, 9, 33, 76, 25, 94,238, 89,247,202,
-107, 69,187, 14,109, 58, 54,108,209,218,250,234,209,189,120,112, 63, 14, 25, 25,185, 0,133,182, 50,206, 19,195,250,162,240, 81,
- 12,172,236,236,110,244, 62, 29,249,148,115, 85, 27,206, 19, 39, 78,124,218,174, 93,187, 57,187,119,239, 86,251,250,250,202, 68,
- 34,145,161,172,184,170,109, 56,203, 66,165, 82,117, 16,137, 68,199, 25,134,177,234,211,167, 15,166, 76,153,130,239,190,251,206,
-196,139,229,253,215, 31, 13, 31, 90,160, 51,204,182, 68, 92,149, 17, 89, 55, 1,248,215,173, 91, 87,102, 50,153,186, 14, 24, 48,
-224,112,191,126,253,112,249,242,101,156, 60,121,178,145,193, 96, 72, 46,185,238, 2, 0,238, 12,195,124, 93,197, 74,238,140, 68,
- 34,217,113,242,228,201,102, 42,149, 10, 39, 78,156, 64, 81, 81, 81,169,115,245,206, 59,239, 60,229, 92, 93,186,116, 41, 83, 16,
- 87, 2, 4, 8, 16,240,175, 70,165, 90,164,172,251, 84,145,200,178,176, 82,110, 22, 95,154, 25, 51,102,204, 34,132, 28, 42,113,
-184, 52, 0,212,127,137,192, 42,137, 8, 41,137, 88,181,163,184,184,252,216,103,246,241,124,237,203,173, 70, 61,142,221,177,178,
-178,194,250,245,235, 97,109,109, 93, 99,225, 84,120,120, 47, 18, 38,141, 44,117,174,204, 78, 22,122,143,174,173,192, 50, 59, 88,
- 87, 80,174,137,208,203,203,235,195,150, 45, 91,190,187,105,235,175,182,203,230,124,158,155,119,247,142, 72, 91,164,179,209, 25,
- 77,134,135,169, 25,149, 78,143, 96,202,203,129,204,198,230,134,216,218,170, 34,113, 85, 43,206,203,151, 47,107,187,119,239,190,
-101,201,146, 37,109,121,158,223,250, 34,194, 89, 86, 92, 57, 59, 59, 31, 91,187,118,173,149,149,149, 21,116, 58, 29,190,254,250,
-107,156, 58,117,170,127,114,114,242, 49, 0,199,106,155,222, 6,131,225,189, 30, 61,122,124,251,233,167,159,194,104, 52, 98,216,
-176, 97,120,242,228,201,241, 7, 15, 30,124,231,229,229,245,233,196,137, 19, 85, 46, 46, 46,152, 48, 97,130, 4,192, 59,149,208,
-124,245,219,111,191,245, 15, 8, 8,192,217,179,103,145,155,155, 11,165, 82,137, 15, 63,252, 80,186,116,233,210,109,249,249,249,
- 67,151, 46, 93, 42, 56, 87, 2, 4, 8, 16,240, 31,129,165, 90,164,172, 19, 85, 67,126,243,255,196, 75,151, 46,189,179,116,233,
-210,167, 28,174,191, 68, 96,149, 68, 6, 0,186, 88,226, 14,241,154,103,251,240,240,156,169, 38,145,180,232, 60, 75,154,243,128,
-255,245,193,170, 64, 40, 61,179, 93,131, 62, 88,199, 40,165,151,202, 10, 44, 47, 47,175,215, 60, 60, 60,190,250,237,183,223,172,
-212,106, 53,188, 26, 55,183,255,115,207,239, 58,119, 27,153, 54, 49, 43,107,116,100, 82,193,238,202, 56,121,109,225, 13,185,141,
-226,186,220, 90, 81, 94, 92,213,154, 19, 0, 78,157, 58, 53,173, 2,135,237,185, 56, 85, 42, 85, 7, 23, 23,151, 99,107,215,174,
-181, 86,171,213,144, 72, 36, 80, 40, 20, 56,125,250, 52, 74,196, 85,173,225,229,229, 53,111,242,228,201,115,223,121,231, 29,100,
-103,103,227,228,201,147,232,218,181, 43,214,174, 93,235,115,250,244,233,111,219,183,111, 15,150,101,113,226,196, 9, 24,141,198,
-251,149,164,235,224,241,227,199,127,250,198, 27,111, 32, 44, 44, 12,201,201,201,152, 48, 97,130,254,195, 15, 63, 44,237,115,245,
-253,247,223,191,241,248,241, 99,193,185, 18, 32, 64,128,128,255, 8,170,210, 34,229,240, 39,128, 87,203,187, 90,229,197,151,217,
-161, 42,187, 93,254,252,146,227,218,191, 34, 62,102, 7,171,114,215,138,114, 96,157, 90,130,203,186, 89, 70, 96, 37, 63,117,138,
- 68,166, 0,103,129,112,153, 51,142, 24,103,188, 5,209,207, 11, 24,136,165,206,134, 70, 61,142,221,169,236, 92,133, 66, 1,158,
-231, 45,210, 97,146,126,111,176, 13,122,191,134, 71, 45, 60, 64,141,134, 82, 39, 11,179,102, 61, 37,174, 36, 18, 9,244,122, 61,
- 80, 65,179, 95, 57,132, 17, 66,158,176, 44,123,153, 82, 74,187,116,233,178,217,104, 52,190,166, 80, 40, 28,199,141, 27,103,200,
-200,200,192,190,125,251,176,101,203, 22, 77,129, 65, 20,158,157,105,124,251,145,186, 32,177, 10,190, 27,175,158,189,243,148,115,
-245, 2, 56,159,193,139,224, 84,169, 84, 29,220,220,220, 74,197,149, 76, 38,131, 66,161, 64, 82, 82, 18, 68, 34,209,115, 77,210,
- 89,183,110, 93, 89,155, 54,109,166,143, 30, 61, 26,119,239,222,197,140, 25, 51,146,213,106,245,222, 3, 7, 14, 76,152, 58,117,
-170,168,115,231,206, 72, 75, 75,195,134, 13, 27,140, 97, 97, 97, 75, 82, 82, 82,150, 87,152,105, 69,162,247, 22, 46, 92, 72,213,
-106, 53,121,244,232,209, 83,206, 85, 94, 94,222,208,165, 75,151,202, 99, 99, 99, 5,231, 74,128, 0, 1, 2,254, 91, 14, 86, 85,
- 45,104, 25, 37,226, 41,181,130,109,182,140,176, 42,191,157, 86,110, 27, 0,244,229,142, 71,254,101, 2,171, 50, 24, 57, 38,247,
-183,181,239,219, 15, 28, 50, 17,114,143, 87,160,127,188, 19,188, 38,181, 84, 96, 73,228,182,176,115,169,131,188, 2, 13, 46, 70,
-199,194,200, 49,185, 85,241,153, 76, 16, 77,254,248,127,163, 5, 29, 28, 28,144,155,155,251,148,163,101,109,109, 13,149, 74,133,
-188,188, 60,236,222,189, 27,213,205, 89, 68, 41, 93, 56,122,244,232, 47, 39, 78,156,200, 52, 24, 49, 22, 5, 87,206, 63,227, 90,
-201,229,114, 88, 89, 89, 33, 41, 41, 9,247,238,221,227, 41,165, 11,171, 81,209, 87, 25,134,185,177, 99,199,142,196, 46, 93,186,
-188,227,232,232, 56, 98,236,216,177, 86, 97, 97, 97, 88,184,112,161,232,196,137, 19,134,107,215,174,153, 56,142,155,150,148,148,
-180,193, 2, 85, 94, 94, 92, 61, 55,103, 5,226,234,185, 57, 85, 42, 85,123,149, 74,117,236,187,239,190,179, 78, 73, 73,129, 76,
- 38,131,173,173, 45,226,227,227,177,112,225,194, 66,147,201,212,231, 57,243,155,204,198,198, 70,102, 52, 26,177,117,235, 86, 36,
- 37, 37,181, 75, 78, 78,142,247,240,240,216,240,193, 7, 31,172,246,243,243,107,122,239,222,189,251, 5, 5, 5,147, 82, 82, 82,
-238, 86, 70,226,224,224,208,206,213,213,149, 92,190,124, 25, 19, 38, 76,208, 79,158, 60,185,180,207,149,224, 92, 9, 16, 32, 64,
-192, 75,137,176,106,182,255,117,168, 82, 96,165, 23,105,220, 54,108,219,187,124,199,158,125,227,198,143, 30, 33,239,210,101, 52,
-196,249,183,192,101, 70, 64,213,168, 3, 8,107,141,171, 55,174,227,230,195, 4,109,145,150,221,156,103,208,124, 86, 78, 88, 84,
-185,218,118,110,110, 46,234,214,173,139,227,155,155, 52,211,107,211, 36, 65, 78, 0,129,189,225,196,233,126,119,206,157, 59, 87,
- 0, 96,115,163, 70,141,118, 85,197,121,253,250,245,249,129,129,129, 7,102,206,156,185,180, 81,163, 70,125,198, 47, 88, 7,201,
-199,163,161,137,186, 9,235, 46, 67,225,224,224,128,172,172, 44,132,135,135, 35, 63, 63,255, 40,165,116,230,141, 27, 55,110, 85,
-197, 73, 41,189,210,180,105,211,196, 54,109,218,216,234,245,250,239, 62,249,228, 19,171,194,194, 66,100,100,100, 32, 51, 51, 19,
- 87,175, 94, 61, 97, 52, 26, 63, 74, 77, 77,125, 92,133,168, 42,229,228,121,190, 84, 92,189, 40,206,178,120, 81,156, 54, 54, 54,
-159,237,219,183,239, 41,231, 42, 46, 46, 14, 11, 22, 44, 40,212,106,181,125,212,106,181, 69, 19,116, 86,149,238, 60,207,195,100,
- 50,129, 82, 10,169, 84,154, 7, 0, 37, 98,170,187,165,156, 25, 25, 25,161, 79,158, 60, 25,100, 99, 99,131,201,147, 39, 75,151,
- 44, 89,178, 45, 55, 55,183,198,206,213,255,231, 85,235, 5, 78,129, 83,224, 20, 56,255,109,156, 47, 27,170, 20, 88, 81, 81,212,
- 0,224, 35,127,127,187,249, 95,175,255,109,253,207,187,246, 12, 30, 55,252,117, 81,112,139,174,120,156,114, 0,231,194,207,152,
-178,243,233,190,124, 61, 59, 33, 42, 42,175,218,177,255, 34, 17, 76, 51,103,191, 37, 2, 0,177, 24,166, 89,253,251,135, 54,107,
-214,172,227,192,128, 52,201,132,201,197,206,214,250, 53,111, 73, 66, 67, 67,119,201,100,178,141,177,177,177,121,150, 68,162, 68,
- 48,245,109,213,170,213, 43,159,126,250,233, 87,253,234,121,181, 30,220,174, 11,196, 98, 49,174, 93,187,134,172,172,172, 48,134,
- 97,166, 95,191,126,253,156, 37,124, 7, 14, 28, 72, 4,128,162,162,162,133,141, 26, 53,146, 70, 71, 71,227,225,195,135,136,137,
-137, 1,199,113, 15, 18, 19, 19,107,212, 33, 78, 46,151, 95, 5,112,231, 69,114,150,197,139,226,212,104, 52, 75, 22, 45, 90,212,
-107,254,252,249, 50, 91, 91, 91,220,184,113, 3,243,231,207,175,145,184,170, 14,148, 82, 24,141,198, 26,141,252,172, 0,211, 3,
- 2, 2,154, 44, 90,180,168, 81, 73, 95, 46,193,185, 18, 32, 64,128, 0, 1,255, 29,129,245, 63,161,149,151, 13,224,205, 32,127,
- 59,223, 37,235,126,221,108, 37,229, 59,106,244,204, 5,141,142, 25,119, 61, 42,239,145,165, 23, 91,184,153,138,203,110, 47, 0,
-224,239,239,111,147,224,129, 2,243,190,132, 84, 64,173, 86,127, 93,155,200, 92,187,118,237, 28,128, 54, 65, 65, 65,131, 15, 19,
- 50, 11,136, 5,165,116,201,245,235,215,247,213,132,167,117,235,214,117, 11, 11, 11,127, 54, 24, 12,129, 60,207, 75,207,158, 61,
- 11,173, 86,139,232,232,104, 13,207,243,187,107, 26,174,216,216,216, 59, 47,154,243,175, 8,103, 98, 98,226, 53,149, 74,213,131,
- 16,114,114,250,244,233,178,154, 58, 87,213,193,201,201,169, 40, 37, 37, 37, 83,171,213, 58,167,166,166,234,157,156,156,106, 53,
-247, 8,165,244, 1, 33,164,197, 39,159,124,178,224,211, 79, 63,253,236,171,175,190,146, 8,125,174, 4, 8, 16, 32, 64,192,127,
- 78, 96,153, 81, 34,166,186,116,233,226,106,115,225, 82,122,225,139, 8, 64, 84, 84, 84,225,156,113,164,212,217, 18,137,158,127,
-134,237, 18, 65,181,175,182,255,207,207,207, 95,146,149,149,213, 54, 47, 47,207,244,248,241, 99, 13, 33,196, 68, 8,209,240, 60,
-191,128,231,249, 13, 47, 51,167, 90,173,190,232,225,225,209,233,226,197,139, 83, 11, 11, 11,215,170,213,234, 75, 47, 42,179, 69,
- 68, 68, 24,149, 74,229,200, 1, 3, 6,140,229,121,126, 67, 82, 82,146,177,182, 92,148, 82, 61,128,233,132,144,189,183,110,221,
-218,121,233,210,165,100, 65, 92, 9, 16, 32, 64,128,128,255,164,192, 50, 35, 52,244,197,136, 43, 51,202, 59, 91,255, 52,238,221,
-187, 55, 28,192,240,255,143,156, 0,144,146,146, 18,254, 87,240, 2, 64,114,114,242,113, 0,199, 95, 20, 31,165,244, 26, 33,164,
- 30,138, 71,137, 8,226, 74,128, 0, 1, 2, 4,252,119, 5,150, 0, 1,255, 38,148, 44,105, 36,136, 43, 1, 2, 4, 8, 16,240,
-175, 1, 1,208,188,146, 66,203,226,209, 1,132,144,230,181, 40, 20,111, 11,156, 2,167,192, 41,112, 10,156, 2,167,192,249,255,
-139,179, 58,238,151,101,116, 34,121,206,209, 92,213,222, 60, 97, 8,171,192, 41,112, 10,156, 2,167,192, 41,112, 10,156,255,223,
-192, 8,183, 64,128, 0, 1, 2, 4, 8, 16, 32,224,197,162,198,125,176, 90,183,110,221, 16, 0,194,194,194, 30,252, 85,129, 34,
-132,124,168, 84, 42,199,181,108,217,210, 79, 34,145, 48,185,185,185,243, 67, 67, 67,231, 87,116,110, 64, 64, 64,120,175, 94,189,
-124,207,156, 57,163, 47,249, 47,202,126,115, 28,151, 24, 30, 30, 30, 34, 36,245, 63, 3,165, 82,121, 76, 46,151,251, 20, 79, 48,
- 74, 97,226, 57,112, 60, 5,199,241, 48,114, 20, 6,189, 54, 78, 87,152,219,187, 86,220,129,175,215,225, 56,126, 41, 5, 93, 79,
- 40,153, 64, 9, 93, 79, 40,249,128, 50,100, 61,225,233,251, 16,153,190,129, 73,244,169,136, 23,207, 86, 71,237, 74,120, 25,238,
-231,252,249,243,159,171, 82, 52,119,238,220, 10,215,159, 10, 10, 10, 58, 36,151,203, 27, 84,246,191,162,162,162,228,200,200,200,
-174, 47,115, 94,245,240,240,120,133, 97,152, 53, 0,154,149, 59,116, 23,192, 71,106,181,250,212,191, 45,204,110,110,110,231, 88,
-150,109, 84, 88, 84, 84,152,159,151,231,107,107,107,251,200,202,218,198,134, 51,113,247, 51, 50,210, 94, 17,222, 64, 2, 4,252,
-139, 5, 86,112,112,112, 99, 0,157, 9, 33,157, 41,165,175, 52,109,218,212,189,168,168, 8,193,193,193,169,132,144,115, 37,171,
- 95,159,141,136,136,136,121, 17, 1, 98, 89,118,249,119,223,125, 55,109,242,228,201,165, 34,233,246,237,219, 85,157,239,181,108,
-217, 50,251,248,248,120, 72, 36, 18, 72,165,210,210, 15,203,178,104,219,182,109,141,174,239,228,228,100,235,230,230, 54,159, 16,
- 50,148, 97, 24,182,186,243,121,158,231, 40,165,187,210,210,210,230,102,101,101,229,215,228, 90,173, 66, 90, 26, 1, 82,201, 53,
- 40,119, 45,252,102,149,163, 43,155, 52,105, 18, 46, 18,137,188,202, 10,202, 50, 34,181,194,223, 28,199, 37,222,185,115, 39,196,
-210,123, 33,183,182,254,140, 48,162, 30,160,124,211, 98, 50,230, 46,229, 77, 39,181, 69, 69,203, 45,137,175, 76, 38,243,137,184,
-126,189, 81,212,189, 88,248,214,175, 3,189,193, 4,157,222,136, 3, 39,175, 33,192,175, 30, 6,246,235, 89,235,188, 98,226,201,
-188,217, 31,190,221,109,201,154,237,173,102, 77, 30,161, 88,178,102,123,200,172,201, 35,108,151,172,221, 30, 50,123,202, 91,182,
-139,214,252, 22, 50,123,202, 91,246,139,215,252,166, 7,240, 94,109,174,241,110, 11,159, 66,134, 51,201, 42, 76,123, 86,164,251,
-241, 86,156,205, 63,241,224, 46, 89,178,164,177,193, 96,136,126,103, 88,200,194,166, 13,221,210, 42, 58, 39, 55, 55,205,237,225,
-221,240, 57, 16, 75,252,252, 90,207,170,242,249,148, 72, 36,245,207,157, 59,215,200, 60,211, 62,199,113,224, 56, 14, 38,147, 9,
-122,189, 30,111,188,241,198, 11, 25, 16, 19, 18, 18, 50,150, 82,186,184, 56, 91,146, 69,225,225,225,107,159,163, 34,166, 16,137,
- 68,159, 72,165,210,206, 38,147,201, 15, 0,196, 98,113,180, 78,167, 59,107, 50,153,190,165,148, 22,212,132,143, 97,152, 85, 97,
- 97, 97,254,182,182,182, 48, 24, 12,165, 11,195,179, 44,219,180, 77,155, 54,235, 0, 52,178,148,203,203,203, 43,156, 16,226, 85,
-147,235, 83, 74, 19, 19, 19, 19, 67,106,248,190,108,244, 36, 94,237, 86,183,142, 10, 0, 96,109,109, 99,115,237,246, 99,183,224,
-102,117,133,210, 77,128,128,127,171,192, 10, 14, 14, 62, 12,160,115,211,166, 77,173,122,246,236,137,160,160, 32,248,248,248, 64,
- 46,151, 3, 0,178,178,178,220,163,162,162,222,188,113,227,198,155,151, 47, 95, 70,112,112,176, 6,192,133,136,136,136, 10,221,
-136, 30, 3, 58, 77,150, 43,100,223, 1, 64,122, 82,102,114,226,163,180, 53,201,201,201,203, 41,165,124,153, 23,166,239, 59,239,
-188, 51,117,202,148, 41, 56,116,232, 16,182,111,223, 14,157, 78,135,220,220, 92,132,134,134, 86, 24, 78,142,227, 18, 71,141, 26,
- 37,138,137,137, 49, 85,230, 96,213,176, 70, 56,127,216,176, 97, 31,251,251,251,151, 46,235, 98, 52, 26, 75,191,179,179,179, 49,
-117,234, 84,243, 11, 17, 60,207,227,244,233,211,147, 63,255,252,115, 0,248,164, 34,206,158,157, 27,132,139, 8,241,226,255, 39,
-202, 18, 79,156,123, 20, 2, 16,246, 90,120, 36, 41,247,146, 5, 0,180,110, 21, 88,173,184, 19,137, 68, 94,215,175, 95,119,147,
- 72, 36, 22,197,141,231,121, 4, 5, 5, 89,116,174,167,167,103, 87, 27,133,221,246,193,195,223,117, 12, 12, 10, 18,123,169,148,
- 48,154, 76,136,125, 28,223, 58,242, 70, 68,224,241,131,191,143,243,244,244, 28,145,148,148,116,166, 42, 30, 35,199, 35,242,206,
- 3,156,184,112, 29, 3, 36,114, 20,105,245,200, 47,210,227,231, 63, 46, 34, 49, 45,183,214, 25,183, 77,155, 54,158, 54, 34,151,
- 54, 83,222,123,205,230,155,239,183,217, 76,121,239, 53,172, 88,255,115,233,247,228,119, 7, 97,249,247,219, 20, 83,222, 29,132,
- 53, 27,182,180,107,211,166,141,231,213,171, 87,147, 42,227,171, 44,141, 24,206, 36,219, 28,149,196, 2, 64,250,134, 13, 48,164,
-166, 66, 53,119, 46, 0, 96,124, 51, 47, 89, 77,194,220,188,121,243, 82, 65, 92,165,112, 52,153, 18,111,223,190, 29, 82,157,184,
- 50,153, 76, 84, 36, 18,205, 57,127,100,254,238,246,173, 27, 63,117, 51, 99,238,199,216,207,251,114,238,144,157, 71,243,233,155,
-125,108,163,163,195,150, 84, 41,178,120,158,103,116, 58, 29,238,223,191, 95,225, 44,251, 12,195,112,181, 73,167, 46, 93,186,200,
- 10, 11, 11,127, 83, 40, 20, 45, 11, 11, 11,199, 82, 74,191, 12, 13, 13,117,103, 24, 6, 61,122,244,248, 50, 36, 36,228,177, 76,
- 38,251, 94,171,213,222, 80, 40, 20, 35, 66, 67, 67,117, 22,138,171, 87,108,109,109,127,222,191,127,191, 99, 80, 80, 16,147,145,
-145,129,122,245,234, 33, 43, 43,171,245,185,115,231,130,223,125,247,221,119, 9, 33,163, 40,165,231,106, 16,220, 38, 54, 54, 54,
-116,244,232,209,132,227,254, 23,221, 31,127,252, 17,193, 13, 82, 27, 76, 24, 98, 85,164, 53,208,220,243, 55,229, 31, 80,134, 94,
-120,242, 36, 39,183,138,240,121,205,223,252,145,155, 84, 42,133,209,104, 44,253, 80, 30, 0, 5, 40, 15, 80,158,130, 82, 0,148,
-128,231,120,172,152,185,185,214,207,131,181,141,141,181,135,135, 50,213,202,218,218,154, 10,229,154, 0, 1,255,122, 7,171,111,
-104,104, 40, 76, 38, 19,108,109,109,193,178,108,121,119, 3,175,188,242, 10,218,180,105,131, 30, 61,122,224,222,189,123, 86, 95,
-125,245, 85,165,118,196, 91,211,250,195,187,145,187, 89, 68, 40,207, 31,186,190,244,135,249,123, 92, 0,124, 90,230,180,177,227,
-199,143, 39,153,153,153, 24, 58,116,232, 57,157, 78, 55,136, 82, 90,229,114, 57,145,145,145, 47,180,249,143, 16, 50, 84,169, 84,
- 98,199,142, 29,208,235,245,207, 28,183,179,179,195,157, 59,119,202,214, 32, 17, 24, 24,200, 18, 66,134, 86, 38,176, 24, 66,188,
-142,132, 62,112, 51,111, 15, 27, 24, 40,233,213,185, 65,170,136,145, 82, 0,100,246,236,217,165,226,138, 82,138, 5, 11, 22, 88,
- 28, 94,137, 68,130,187,119,239,130,101, 89, 60,234,216,184,184, 32,191,158, 0,150,101, 17,217,178,184, 86,219,238,126, 54, 68,
- 34, 17, 20, 10,133,165,226,170,139,187,210,107,255,204,185, 75,109,181, 70,138, 63, 79,135, 33, 94,125, 2,148, 82, 40,221,156,
-208, 62, 56, 72,236,215,162,165,219, 79,235,150,239,247,244,244, 28,148,148,148, 20, 90,185, 88,224,224,215,184, 62,182,238, 63,
-135,197,223,239, 70,102,158, 22,249, 69,197,247,181, 71, 59,127,252,184,162,246, 78,103,211,250,245,189,183,238, 60,134,246,109,
- 91, 99,235,206,163,104,215,182, 53,182,238, 42,222,222,182,235, 24, 58,181,107,131,109,187,142,161,185, 95,163, 58,153, 79,114,
-151,163,138,185,189,158, 73,163, 65,197,105, 84,143,149, 16,115,218, 60,153, 48, 1, 0, 74, 5, 86,141, 31,182, 18, 65, 92,221,
-121, 85,137,224, 50,226, 10,105,105,105, 36, 39, 39,135, 58, 56, 56, 12, 41, 43,178,204,226,234,247, 35,121,208,196,172, 33,191,
-254,122,150, 31, 57,178,115,116,116,216, 18, 63, 96,110,133,139,104, 27, 12,134,199,189,122,245,162, 0,160,215,235, 61,165, 82,
-169,164,156, 0, 83,117,232,208,225, 25,129, 86, 93,211, 97, 97, 97,225,111,187,118,237, 26,236,238,238,142, 65,131, 6, 29,247,
-247,247,151, 90, 91, 91,227,200,145, 35,240,242,242,114,177,179,179, 59,188,116,233, 82,172, 92,185,178,206,241,227,199,183, 3,
- 24,108,193, 51,218,163,107,215,174, 59, 14, 29, 58, 36,151, 72, 36,208,104, 52,184,115,231, 14,236,237,237, 33,149, 74, 49,104,
-208, 32,182,125,251,246,206, 93,187,118,221, 67, 8, 25, 65, 41, 61,105,105, 26,105, 52, 26, 58,115,230, 76, 88, 91, 91,195,198,
-198,166,244, 99, 37,229,200,250,121,245,173, 62, 94,150, 98, 53,251,243,145,203, 54,253,116,240, 76,157, 58,246, 95,198,199,231,
-230, 84,234, 98,177, 45, 48,227,211, 25,102,129, 10,169, 84,250,148,203,110,254, 45,145, 72, 16, 24, 24, 88,109,216,252,252,252,
- 54,176, 44,235, 90, 78,248,178,115,190,152,101,186,117,231,158,141,209, 4, 27,173,222,136, 69, 11,190, 52,177, 12,203, 54,111,
-222,124, 31,165, 52,253,206,157, 59, 31, 8, 69,157, 0, 1,255, 46,129, 5,133, 66,129,107,215,174,129, 16, 2, 91, 91, 91,216,
-217,217,193,222,222, 30,121,121,121,136,138,138,194,221,187,119,241,248,241, 99, 48, 12, 3, 95, 95, 95,160,120,218,135,178,110,
- 76,105,219,222,111, 43, 14, 65,174,144,129, 16,160, 85,207,150, 8,233, 22,128,219, 87, 31,125,164, 82,169, 54,171,213,234,251,
-132, 16, 81,243,230,205,223,109,219,182, 45, 86,174, 92, 9,157, 78,247,109, 69,226,170,162, 81, 11, 31, 12, 22,159,151,136, 24,
-111,131,137, 79,216,176,207,216, 41, 48, 48, 48, 60, 40, 40,168,222,173, 91,183,140,102, 55,171,124, 51, 89,217,126, 89,229, 57,
- 51, 50, 50,192,243,188,197,174, 80, 78,206,179,239,216,114,139, 71, 63,117,108,209,210,149, 14,249,185,105, 88,248,245, 47, 48,
- 26,141,152, 54,109, 26,120,158, 7,207,243,224, 56, 14,217,217,217, 64, 5,213,208,242,225, 52,199,137,101,217,167, 4,112,117,
-219, 85,113,186,186,186,218,200,228,214,219, 63,157,189,208,246,102, 76, 34, 14,157, 14, 3,165, 20, 7, 54,125, 9, 0, 24, 52,
-126, 1,146,146,211,209, 62,184, 41,222,121,255, 19,219, 85, 75,103,111,119,117,117,109,144,158,254,191,201,103,203,114, 26, 77,
- 60,118, 31,189,140,228,204, 2,140, 26,220, 13, 58,189, 17,105,169,201,216,242,253, 55,152, 56,102, 47, 28, 21, 86, 30,190,190,
-190, 49,101,239,145,173,173, 45,171,213,106,207,197,196,196,188, 87, 89, 56,141, 70, 99,223,153, 31,143,195,170,205,187,209,204,
-215, 29,135, 78, 92, 65,171,230, 62, 56,124, 58, 12,237, 90,212,195,209,179,225,104, 31,224,139, 51,151,111,227,163, 15, 70,226,
-179,143,206,245,173, 81, 26, 45, 89,233,144,159,151,134, 63,151,108, 67,218,218,181,136,155, 60, 25,173, 74,242,196, 53,134,129,
-196,211, 19,176,171,254,126, 86,132,187,119,239, 66,167,123,214,168,145,201,100,104,218,180,105,149,156,102,231, 42, 53, 53,149,
-164,166,166,194,198,198,134, 68,223,185,205,249, 53,107, 62,132,203,218,185, 25, 0,138,157,171, 60, 20,221, 91, 13,205,253, 53,
-144,228,220, 98, 54, 45,120, 95, 63,254,203,141,209,230,103,180,124, 56, 35, 35, 35, 75,239, 79,219,182,109,239, 94,184,112,161,
- 73, 25, 23, 24, 38,147, 73, 98, 50,153, 26,153,155, 13, 77, 38, 19,116, 58, 29, 70,140, 24,193, 86, 21,119, 43, 43,171,150,238,
-238,238,184,122,245, 42,230,205,155, 39,109,214,172, 25,238,223,191, 15,134, 97, 48,118,236, 88,248,251,251, 35, 61, 61, 29,173,
- 90,181,194,249,243,231, 3, 45,200,243,182, 54, 54, 54, 63, 29, 60,120, 80,206, 48, 12,242,243,243,193,243, 60, 58,116,232, 0,
- 66, 8,110,221,186,133, 47,190,248, 2,123,247,238,197,254,253,251,173,130,131,131,127, 34,132,248, 81, 74,243, 45, 72, 35,170,
-211,233,168, 92, 46,135, 92, 46,135, 76, 38,131, 76, 38,131, 68, 34,129, 70,207,226,253,185,143,117, 98,153,130,111,217,194,183,
-193,196,241,131,153,133,203,182,156, 6,112,160, 50, 78, 53,189, 3,167,102, 4,199,183,132, 99,208,132, 87, 32, 17, 75, 33, 17,
- 75, 32,149, 72, 33, 46,249, 45, 17, 75, 32, 21,203,192,186,104,171,205, 75, 98,177,216,229,250,245,235, 14,101,159,101,147,201,
- 20, 61,121,242,100,223,193, 3,251,187,239,220,123,136,125,123,216, 32,206,195,221, 45, 35, 33, 33,238, 1, 0,135,224,224, 96,
- 90,211,252, 89, 83, 8,156, 2,231,223,132, 86, 0,202, 86, 48,244, 0,164,230, 98,187,228,221,230, 92,110, 63, 0,164,155,139,
-183, 74,182, 51, 0, 68, 1,240, 43,217,199, 1, 8, 3,144,253,188, 1, 22,149,188,180,104,153,155, 70, 42,184,145,200,203,203,
- 67, 94, 94, 30, 18, 18, 18,176,126,253,122,136,197, 98,136, 68, 34,136, 68, 34, 48, 12, 83,218, 95,161, 50,156, 60,120,126, 13,
-128, 53,193,193,193,226, 31, 46,239, 62, 60,123,235, 71,221,219,244, 12,102,195, 79,220, 26, 2, 96, 17,128,190,163, 71,143,118,
- 1,128,109,219,182,101, 0, 56, 98,177,139, 35, 98,188, 87,127,247, 75,157, 41, 31,189,109, 22, 20, 94,155, 55,111,118, 76, 76,
- 76,124,170,150, 40,145, 72,170,237,151, 69, 41,221,245,224,193,131,143,149, 74,101,105, 65, 82,182,153,208,100, 50, 65, 46,151,
-151,138, 33,157, 78,135,223,126,251,205, 68, 41,221, 85, 5, 39, 98,238,156,194,253, 59,103,192,113,252, 83, 98, 74,171,213, 98,
-222,188,121,165,238, 21, 0, 76, 40,113, 74, 44, 69, 85,206, 21,203,178,184,224, 91,172, 4,250,165,211,103,250,106,149,135, 88,
- 42,159,214,239,245,145, 78, 38,202,150,138,171,226, 56, 20,139, 11,169, 88, 4, 43,153, 24,247, 31, 37,160,158,103, 48,186,247,
-121,205,241,228,225, 61,211, 0, 84, 56, 8,193,200,241,232,215, 37, 24,223,239, 56,131,188, 2, 45,242,114,178,144,145,112, 23,
-209, 55,195, 32,149, 74,113,229,202, 21, 91,123,123, 7,219,250,245,235,129,227,120, 92,184, 18, 14,107,107, 43,236,216,254,107,
- 61,159,122,245, 17,247, 56,246,189, 74,132,173,168,125,136, 31,242, 50,226, 33, 18,137,208, 62,168, 1, 68, 34, 17, 58, 4, 55,
- 2,203,178,232,216,170, 9, 88,150, 69,231, 54,254,104,208,160, 1,120,158, 23, 85,243,178, 64,204,237, 83,136,137, 58, 3,202,
-243,224,248,226,230, 95, 10,192,144,156,252,108,188, 82, 82, 64,237,220,106,243, 82,194,244,233,211,115,212,106,181,161,252, 49,
-149, 74, 37,217,187,119,175, 67, 85, 83,167, 72, 36, 18, 63,145, 72, 20,157,149,149,197, 91, 91, 91, 51, 28,103,226,253,154, 53,
-103,207, 31,153, 95,186,246,228,188, 5,243,119,191,217,199,110,200, 47, 91, 14, 82,137,107, 7, 66, 88,153,105,220,151, 27,165,
- 16, 75,252, 44,172, 52, 48, 58,157, 14,247,238,221,171,118, 81,238,138,222, 23,229, 28,172,119, 6, 13, 26,116,252,131, 15, 62,
-144,155, 43, 47, 34,145,168, 84,244, 63,124,248, 16, 12,195, 96,211,166, 77,208,233,116,213,102,124,145, 72,244,241,158, 61,123,
-236,165, 82,105,169,184,162,148,130,101, 89,220,189,123, 23, 43, 86,172,192,232,209,163, 17, 31, 31, 15,165, 82,137,105,211,166,
- 41,150, 45, 91,246, 49,138,151, 62,173, 14, 55,245,122,125,136,149,149, 21,100, 50, 25,204, 66, 11, 0, 34, 30,186,223,142,141,
-141,109,225,227,227,226, 81,207,255,214, 31, 93, 58,182, 12,112,118,118,104,103, 22, 88, 21, 86, 80, 11,234, 32, 63, 70,132,206,
-157, 59,227,236,217,115,232,223,191, 63, 56,137, 4,188, 84, 10, 94, 42, 5,149, 72, 0,169, 20, 68, 42, 5,181,182,182, 40,251,
-176, 44,139,148,148,148,167,246,141, 31, 63, 62,110,228,200,145,110, 0,133, 90,157, 68, 63,249,120, 74, 82, 70, 70, 6,117,119,
-119, 23, 44, 4, 1,255, 41, 84,163, 69, 92, 9, 33,135,202, 28,239,111,222,158, 49, 99,198,172,165, 75,151,222, 33,132, 28, 42,
-187,223,124, 94, 9,247,161,138,182, 75,254,235, 60,115,230,204,230,203,150, 45, 91,210,174, 93,187, 29,151, 46, 93,138,125, 97,
- 2,139, 82, 74, 8, 33,180,186,151,101,121,231,228,233,166, 32,203, 38,210,142,136,136, 48,122,122,122,254,112, 55, 60,182,123,
-147,144, 70,176,178,145,245, 36,132,172,145,201,100,159,140, 26, 53, 10, 87,174, 92,193,237,219,183,127,172,201,178, 39, 6, 19,
-159, 48,229,163,183, 97, 48,241, 9,102,135,106,218,180,105,146, 11, 23, 46, 24, 42,115,176, 42,227, 74, 75, 75,155, 27, 22, 22,
-134,170, 58,185,191,249,230,155,101, 11,163,210, 78,238,149,190, 21,121, 10,131,193,136,194, 66, 77,177,176, 42, 41,188, 57,142,
- 67, 97, 97, 33,134, 13, 27, 86, 42,186,120,158, 71, 90, 90, 90,173, 18,147, 97, 24,139,157,171, 74, 57, 88,182,119,203,128, 32,
-241,233, 75, 55,159, 42, 92, 95,123,127, 17,164,146, 98,113,101, 37,151,192, 74, 38, 70,130, 58, 21, 77,253,154, 73,206,158, 56,
-212,187, 82,129,101,226,176,230,215, 19, 0, 33,216,125,232, 52, 66,234, 89, 99,254, 23,211, 49,116,232, 80, 72,165,114,236,217,
-179, 11,203,215,109,197, 4, 31, 31, 80, 0,109, 66, 2,241,245,134, 29, 88,184, 96, 1,179,107,231,238,142,213,133, 87, 44, 22,
-131,101,217,210, 66,187,252, 55,203,178,176,100,174, 55,202, 83, 24,140, 70, 20, 21,106,192,241, 60,120,158,130,242, 60, 64, 41,
- 60, 23, 47,134,231,226,197,184,198, 20, 15,224,243, 47, 44,132, 70,163, 1,186,180,172,177,184,210,235,245, 80,171,213,134,200,
-200,200,103, 74,191,128,128,128, 84,189, 94, 95,101,120,103,205,154, 21,179,100,201, 18, 63, 39, 39,167,232,155, 55, 35,141, 45,
- 91, 6,136,203,247,193,106,220,168,113,238,188, 5,243,119,191, 61,102,192,144, 13, 95, 12, 55,125, 48,247,103,145, 37, 29,221,
-203,184,100,143,123,244,232, 97, 81, 87, 30,141, 70,147, 82,217,177,144,144,144,177,132,144,197,141, 27, 55,150,117,235,214, 13,
-231,206,157,195,226,197,139,121,147,201,148, 1, 0,237,219,183,119, 93,184,112, 33,137,138,138,130,131,131, 3,210,210,210,182,
-134,132,132, 44,172,170,227,187, 84, 42,237,210,170, 85, 43, 70,167,211,149, 86, 74, 24,134,193,221,187,119,177,108,217, 50,140,
- 24, 49, 2,141, 27, 55, 46,125,182,186,118,237, 42, 94,189,122,117, 23, 75, 4, 22,195, 48, 31,117,239,222,253, 27, 20,143, 34,
- 44,251,146,139, 6,240, 25, 0,196,197,101,164,140,120,163,253,157,238,157,131, 66, 26,212,243, 84, 86,197,151, 41,126, 8,101,
-144, 21, 36, 98, 9, 70,127, 62, 16,135, 14, 29,194,164,121, 35, 75,156,172, 98, 7, 75, 44,150, 64, 34,150, 66,234, 90,187,133,
- 8, 74,222, 35,196,206,206, 30, 0, 96,111,111,111,126,199, 17, 0,148, 97, 24,161, 75,150,128,255, 12, 44,209, 34,102,129, 84,
- 94,104, 45, 93,186,180,127,249,125,101,197, 84, 69,191,203,254,119,217,178,101, 75,202,112, 23,189,136,248,188,176,165,114,140,
-198,170,215,237,237,214,173,219,100, 91, 91,219,239, 74, 94,188,120,114, 49, 9, 79, 46, 38,193,175, 73,179, 14, 65, 1, 33, 57,
- 35, 70,140,128,179,179, 51, 62,251,236, 51, 10,224,167,154, 92,123,195, 62, 99,167,178,219, 55,110,220,168,117,191,172,146,145,
-113,159,160,146,254, 84,181,204, 52, 48, 26,140, 40, 44,210,194, 96, 48,192,104,228, 96, 50,113, 8,246,183,197,207, 27,167, 67,
-175, 55,192,200, 21,239, 43,118,202, 56,200, 36, 58,116,110,235,109, 4, 97, 52,103, 47,199,217, 85,197,223, 44, 34, 30, 44,203,
-226,102,128,103,133,206, 85, 79,181,193, 98,161, 69,121,174,137,187,187, 27,226,143, 94, 45,174,133, 91,203,113,108,219, 66,216,
- 88, 23,215,228,251,142,158, 85, 44,178,100, 18, 24, 12,122,184,185,215,133,137, 51, 54,169,140,207,100, 52,232, 91, 54,242,132,
-131,173, 21, 34,175, 93,198, 39, 31,190,135,177, 99,223,133, 68,110,139,179,103,207, 32, 94,157,134,135,137,217,248,112,238,247,
- 48, 26, 57, 24, 76, 28,140, 38, 30,171,182, 28,130,129,171, 94, 25, 73, 36, 18, 76,155, 54,205,170,178,227, 59,118,236,208, 88,
- 36,176,104,137, 8, 46,210, 64,167,213, 65,111, 40, 78, 11,174,190, 24,139,190, 24, 9,163,209, 8,205,240,118, 48, 24,141,224,
- 62, 26, 12,131,193,128, 4,107, 17,211, 49, 68,101, 4, 97, 52, 23,174, 37,218, 89, 42,176, 42, 11, 15,165,180,194,166,195,202,
- 68, 86,203,150, 1,209,163,135,133, 44,189,120,233, 90,250,197, 75,215,158, 57,175,126,227,144, 71, 31, 44,218, 49,179, 38,226,
- 10,120,186,185,240, 57,243,253,151,161,161,161,238, 10,133, 2, 49, 49, 49, 96, 89, 22,132,144,204,136,136, 8,119, 0,152, 55,
-111, 94,134, 88, 44,118,102, 89, 22, 31,127,252, 49, 88,150,117,157, 52,105,210, 28, 0,149, 10, 44,147,201,228,103,107,107,139,
-252,252,252,210,251, 40,149, 74, 49, 99,198, 12,188,253,246,219,165,226, 74, 42,149, 98,235,214,173, 8, 14, 14,134, 94,175,183,
-200,185, 75, 76, 76,188, 6,160,147, 5,162,166,184,153,149,231,171,204, 88,138, 66,111,104, 31, 75,193, 73, 36,216,113,224, 0,
-222,126,251,109, 72,165,178, 82,231, 10, 18, 9,136, 84, 10, 70, 34, 1,199,202,106,124,127,121,158, 71, 94, 94, 30,187,117,235,
-214,250,205,154, 53, 35, 20, 64,211,166,254,228,208,159,127,214, 81, 40, 20,177, 78, 78, 78, 6,161,200, 22,240, 18,186, 92,135,
-202,139,172,231,225,154, 49, 99,198, 44, 0,116,198,140, 25,179,204,219, 75,151, 46,213, 0, 80,255,107, 4, 86,117, 14,214,202,
-149, 43,209,162, 69,139, 42, 11,159,213,171, 87,227,231,159,127, 94, 73, 41,125, 84,147,107,191,255,154,248,170,181,149, 68, 89,
-164, 49, 36,111,220,111,108, 19, 16, 16, 16,222,174, 93,187,250,225,225,225,149, 58, 88,149,205,141,245, 87, 76,211, 64, 41,133,
-222, 96, 68, 81,145, 6, 90,189, 30, 83,167,175,179, 40,237, 13,250,124,209,171,125, 94,177,170,206, 73,180,164, 15, 86,117, 77,
-131, 79,139,101, 19,204, 26,160,160, 72,139,174, 35,102,224,218, 31,223, 1, 64,169,184,178,146,137, 33,151,138,193, 16,128,160,
-114,110,163, 38,111,224,231,147,223, 59,191,254,199,159,189, 94,123,101, 28,166, 76,153, 2,145,212, 26,142,206,174, 48,113, 20,
-117, 84,110,120,152,152,141, 61,107,167,151,116, 59,163,120,229,173,121, 88,249,197, 56, 44,159, 87,125,173,158,101, 89,172, 93,
-187, 86, 83,222,181, 42,235,100, 89, 42,130,205, 46,163, 70,167,199,167, 51,191,183, 60,141,122,119,178,178,244,222, 86, 52,112,
-194, 82, 1, 86, 94,100, 1, 96, 1,160,178, 82, 84,230, 12,248,117,232,247,197, 63,249, 50,228,121, 30,127,254,249,231, 51,238,
-106,249, 52,180,212,109,229,121, 30,113,113,113,184,125,251, 54,218,181,107,135,220,220, 92,136, 0, 76,187,117, 11,254,163, 70,
- 65, 87,210,117, 65, 42,149, 98,252,248,241,127,209, 27,190,164, 31, 27,169, 58,161, 10,173, 19,225,222, 92,134,159,150,237,195,
-228, 5,163,225,218, 84,142, 21, 51, 55,149, 30, 95,254,195,188,146,126, 88, 82,200, 21, 53, 15, 70, 94, 94,158,232,155, 21, 43,
- 90,182,105,221,214,234,237,209, 99, 25,189,137,199,162,175,190, 99,119,110,223,230,188,109,219, 47, 86,114,185, 60, 90, 40,142,
- 5,188,132, 46, 87,255, 23,201,101,118,176,150, 46, 93,122,103,233,210,165,207,184, 97,127,169,192, 98, 89, 22,101,135, 44, 87,
- 84,200, 91,210, 7,107,234,212,169,176,181,181,173,240,152,193, 96,160, 55,111,222,140, 74, 78, 78,222, 76, 41,173,241,188, 56,
- 82, 49,227,190,242,155, 45, 94, 83, 62,122,155, 7,138, 71,107,173, 91,183,206,193,220, 7,171,108, 63,172,234,250, 96,185,185,
-185,205,255,250,235,175,167,244,237,219,151, 97, 24,230,169,194,207, 60, 45, 67,217,143,209,104,196,193,131, 7,167, 44, 93,186,
- 20,149,185, 94,148, 22, 55, 63, 21, 22,105,160,213, 21, 23,176, 15,111,239,182, 52, 7, 84,123,138,217,185,106, 27,147, 85,161,
-115,117,212,189,184,224,234,151, 94, 61, 23, 97,216,152,199,113, 9,173, 61, 92, 28,144,157, 91, 0, 89, 73,179,160, 25,102,113,
-101, 37,147,192,209, 94,129,172,204, 52,136,197,226,152, 42, 50,112, 28, 33,164,211,176,193,253,142, 51,172, 72, 94,246,152,216,
-202,206,250,196,197, 91,142,169,217, 69,224,203,196,147,167, 20,147, 23, 90,102, 98,138,197, 98, 76,154, 52,169, 82,129,115,224,
-192, 1, 77,205, 5,150,174,102,105, 84, 3, 39,179, 58, 7,203, 82,129, 85, 30,230,209,133, 18,137,196,175, 68,124, 89,140,128,
-128,128, 35,214,214,214,245, 44, 61,223,210, 73, 71, 9, 33, 11,186,117,235,182,216,203,203,203,237,131, 15, 62, 32, 34,145, 8,
- 33, 33, 33, 46, 95,126,249,101, 46, 0,248,249,249,217,154,223, 49,171, 86,173, 66,116,116,116, 58, 33,100, 97,149,207,186, 84,
-122,215,222,222, 62,164, 91,183,110,200,205,205, 69,124,124, 60, 20, 10, 5,252, 87,172,192,173,137, 19, 17,176, 97, 3,152,110,
-221,138, 5,166, 76,134, 91,183,110, 65, 38,147,221,173,140,207,211,211,179, 13,165,244,107, 0, 29,240,191,102, 65, 10,224, 34,
- 33,228,243,164,164,164,171,207,252,137, 33, 76,113, 69,173,234,132,146,230,186, 67,151, 32,195, 59,239,188, 3,137, 68, 10, 72,
-165,248,244,211, 79,203,188,143,164, 96, 75,250, 99,241,156,212,146,218, 54, 45, 39,214,137, 76, 42,149,141, 30,243, 46,243,249,
-167,159,240, 70,147,137, 23,137,196,204,180,217, 75,152,251,247,110,203, 10, 11, 11, 25, 82,147,154,149, 0, 1,255, 17, 7,171,
-172,208, 42,227, 66, 85,134,244,178,253,178, 42, 19,104,101,251,100, 1,208,189,136,176,138,202,188,220,203, 63,136,247, 35, 35,
- 35, 27, 53,107,214, 12,241,241,241, 21,142,148, 3, 80, 60,132,217,202, 10, 15, 30, 60, 0,128,251,149, 93,232,244,233,211,107,
- 0,172, 49,111,171, 84,170,118, 93,134,118,185, 24,208, 45, 8,187,191,221,153,155,156,156, 28, 96,158, 19,139, 16, 66, 84, 42,
-213,219, 98,169,232,205, 6,205,235,116,230,120,254,235,211,127, 92,152, 95, 25,119,249, 62, 88, 38,147,169,214,125,176, 8, 33,
- 67,251,246,237,203, 68, 69, 69, 97,216,176, 97,248,229,151, 95, 42,189,121,111,191,253, 54,118,236,216,129,222,189,123, 51,203,
-150, 45, 27, 90,185,192, 2,140, 6, 19, 10,139,180,208,106,117,127, 89,198,123, 94,231, 10, 0, 40,111, 58,121,235, 70, 68, 96,
-139,224,118,226,199, 9, 41,144, 75,197, 79, 9, 44,107,153, 4,114, 89,241, 62, 15, 87, 71,132, 93, 58,107, 48,153,140, 39,171,
- 17, 22,113,168, 96,146, 70,153,173, 75, 76,207, 14, 45, 28, 43,116, 60,103,142, 70,139,223, 87, 90, 36,176,126,252,241, 71, 77,
-101,238,149,165,247,128, 82,148, 54, 17, 22,105, 94,108, 26,185,187,187,187,186,185,185,173,119,112,112,144,155,251, 14, 85,118,
-188, 42,135,171, 58,113, 85, 50, 47, 86,244,146, 37, 75,106, 36,178,164, 82,105,189,139, 23, 47, 54, 50,247, 11,172,234, 91,175,
-215,227,205, 55,223,180,200, 22, 12, 15, 15,255, 41, 40, 40,232,161,171,171,235,137,246,237,219,203,162,162,162,176,104,209, 34,
- 34, 22,139,237,204,207,101,126,126, 62, 68, 34, 17,178,179,179, 65, 8,121, 39, 60, 60,252,104, 85,156, 58,157, 46, 52, 52, 52,
- 52,112,224,192,129,108,116,116, 52, 68, 34, 17,120,158,135,174,109, 91, 4,108,216,128,219,159,124,130, 87, 30, 63,134,206,104,
-132, 92, 46,199,209,163, 71, 13, 69, 69, 69,161, 85,196,125,211,229,203,151,155,201,229,114, 24, 12, 6,240, 60, 15,134, 97, 8,
-203,178, 29,155, 53,107,182, 26,197, 35,151, 74, 81,175,158,155,219,164,247,250, 53,225,120,158, 75, 82,167,167, 87,233, 86,218,
-166,195,213, 79, 86,218,223, 74, 34,150, 64, 34, 42, 22, 86,102,231, 74, 34,150, 64, 34,145, 66, 38,181,168, 9,159,150,207, 59,
-230,190, 87, 54, 54,214,124,195,134, 13,163,238, 63,120,232, 15,128,177,183,119,176,184, 95,172, 0, 1,255, 50,135,138, 84, 37,
-148,202, 62, 98,101,182,211, 81,188,182,114,255,146,223, 40,243,251, 26,128, 86,229,206, 53, 31,215,151,251, 54, 31,143,252,171,
- 29,172,126,239,189,247,222,134, 94,189,122,117,159, 54,109, 26, 20, 10, 5,146,147,147, 75, 31, 90,169, 84, 10,111,111,111,104,
- 52, 26,156, 59,119, 14, 57, 57, 57,167, 1,188,111,233,133,147,147,147,175, 60,184,113, 63,179,227,192, 54,206,126,109,154, 56,
- 36,198, 36,182, 5,112,137, 16, 66, 60, 61, 61,127, 24,254, 73,223, 49, 93, 95,111, 13,137, 84,140,132, 7, 41, 85,114,149,239,
-131,245, 60,115, 99, 49, 12,195, 18, 66, 48,108,216, 48,139,206, 31, 62,124, 56,206,158, 61,139,170,154, 19,139,155, 8, 13, 40,
- 42,212,160,232, 5, 10, 44, 66, 8, 56,142, 43,117,174,204,159,158,106, 3, 24,134, 41, 21, 22,125,211,120,139, 57,181, 69, 69,
-203,207,159, 60, 48,190,137,127, 75,215,118, 65,141,113, 63, 54, 1,203,103,253,175,169,229,211, 9,195,177,117,199, 65,168, 60,
-156,161,211, 20,224,216,225,131,185,121,121,121,203,107, 27,135,173,251,206, 2, 0, 58,189,245,244, 24,129, 97, 31,175,178, 44,
- 3,139, 68, 24, 59,118,108,165, 14,214,137, 19, 39, 52,101,157,200,234,210,168,176, 80,139, 34,141,230,133,165,145, 74,165, 10,
-104,219,182,237,137,141, 27, 55, 58,187,184,184, 64,173, 86, 63, 37,176, 84, 42, 85, 64,155, 54,109, 78,108,220,184,209,217,213,
-213, 21,241,241,241, 22, 79, 17, 82, 78, 92, 33, 61, 61,157,100,103,103,243,142,142,142, 53, 18, 89, 12,195, 64,167,211, 33, 58,
- 58,218,210,103,196,226, 73, 71,235,213,171,247,203,119,223,125, 39,123,242,228, 9,140, 70, 35,162,162,162,158, 25,132,192,178,
- 44,102,204,152,129,217,179,103,175, 7,224, 83, 21,159,201,100,250,118,212,168, 81,239, 37, 37, 37, 57,186,255, 31,123,215, 29,
- 22,197,245, 69,207,155,237,133,222,119, 65, 64, 65,164,136, 5,176, 99, 55, 86,140, 41,118,141, 37,177,198, 22, 19, 91,162,177,
- 70,108, 81, 99,172, 81, 99,139, 13,163,198,216, 53,246, 46, 96, 69, 5, 69, 81, 96,233,189,108,159,153,223, 31, 2, 65,126,148,
- 5, 77, 52,201,156,239,219,111,203,204,158,121,243,230,205,155,243,238,187,239, 94, 71, 71, 36, 37, 37, 65, 40, 20,130,101, 89,
-144,246,237,209,250,233, 83,232,105, 26, 82,169, 20,143, 30, 61,194,198,141, 27, 11,244,122,253,138,242,184, 60, 61, 61, 69, 20,
- 69,121, 9,133, 66, 12, 26, 52,232,149,109,219,182,109, 67, 11,223,172,160, 81, 31,137,242,105, 86,168,205,135,239, 49,138,162,
-200,184, 17,221,235, 5,183,104,224,127, 63,234,217, 19, 85,106,230,229, 74,197,127,142, 45,244, 42, 49, 32, 20,254,233,111, 85,
-228,115,197, 19,137, 74, 86, 20,178, 34, 17, 24,145,105,193,130, 75,139, 38, 66, 8,108,109,109,181, 43, 87, 44, 21,203,229,114,
- 26, 0,204,205,228,244,222,109,107, 96,107, 99,163,101,107, 98, 10,229,192,225,221,197,205,183,244,223, 55, 47,176, 34, 34, 34,
-158, 2,232, 20, 16, 16, 48,240,194,133, 11,203, 39, 79,158,108, 31, 28, 28,140,204,204, 76,184,185,185, 65,161, 80, 32, 60, 60,
- 28,183,111,223, 78,103, 89,246,203,240,240,240, 29,229, 8,128, 10,179,109,179, 44,203, 42,149,202, 48,125, 97,225,216, 70,193,
-222, 56,191,239, 98,168, 66,161, 24,229,226,226, 50,113,200,140,247,135,181,251,160, 9,162, 35,159,225,218,201,187, 72,122,145,
-142,161,173,167, 86,200,105,138, 15, 86,233,247,178, 62, 88,165, 57, 25,134,161,117, 58, 29,246,236,217, 99,146,200,218,181,107,
- 23, 52, 26, 13, 24,134,161, 43, 58,119,154,161,137,185,133, 61,156, 93,125,161,215, 21,128, 97, 76, 31, 89,178, 85,212,167,209,
-104,196,220,185,115, 49,101,202, 20,204,159, 63,191, 82, 33,178,102,205, 26, 84,117,141, 50, 51, 51,243,148, 74,229,224,221,155,
-127,216, 55,112,196, 4,115,151,150,141,240,243,222,163, 48,232, 13,144,136,249,176,182, 48, 67,221,218,206,208,105, 10,177,246,
-199,229,185, 26,141,122,112, 89,223,179,234,100, 89, 31,250, 97, 91, 44,222,120, 8, 23,119,254,105,160,108, 61,112, 54,126, 89,
- 54, 30, 1, 1, 91, 42,229,164,105, 26, 2,129, 0, 59,119,238, 84, 87,180,154,144,199,227,161, 34,129, 85,246, 26, 89, 88,216,
-195,197,221, 15, 58, 77,254, 27,187, 70,182,182,182, 83, 54,109,218,100,171, 86,171,241,240,225, 67, 60,124,248, 16,132,144, 7,
-101,183, 23, 20, 20,224,222,189,123,197, 34,231,129,169,245, 89,108,185, 74, 75, 75, 35, 73, 73, 73,144,201,100,212,157, 59,119,
- 52, 13, 27, 54,124,128, 34, 31,173,170,206, 93,171,213,198,117,236,216,177, 34,139,145,179, 88, 44,126, 37,101, 83,113,208,209,
-178, 83,133,229,149, 51, 62, 62,254,214, 15, 63,252,224, 90,175, 94, 61,252,244,211, 79, 90,115,115,115,209,228,201,147,193,227,
-241,200,202,149, 43,217,204,204, 76,253,244,233,211, 69,151, 46, 93, 66, 65, 65,193,173,170,218, 39,203,178,121,132,144,145, 45,
- 91,182,220,126,236,216, 49,169,151,151, 23,114,114,114, 94,138,245,173, 91, 49,110,220, 56, 72,165, 82, 68, 71, 71,163, 87,175,
- 94,133,133,133,133, 35, 75,199,192, 42,205,105, 52, 26,137, 64, 32, 96, 25,134,193,204,153, 51, 95, 9, 44, 42,147,201, 32, 21,
-209,216, 48,207, 67,254,197,226,100,249,132,177,159,124,242,178,157, 48,244,253,168,103, 79, 54,252,124,232, 44,128, 11,149,157,
- 59, 99,153, 3, 59,175,151, 22, 44, 65,113,204, 43,161,248,149,213,131, 47,227, 96,189,140,139, 85,213,185,151,117,197,176,177,
-177, 49, 6, 6, 6, 68,169,213,106, 94,177,150,178,179,179,187, 87,180, 47, 91,171, 86, 45, 93,153,230, 89,173,123,179, 26, 3,
- 61,142,147,227,228, 80, 77, 11, 22, 0, 32, 50, 50,114,167,191,191,255,177, 69,139, 22, 45, 58,112,224,192,136, 9, 19, 38, 16,
- 11, 11, 11,132,133,133,177,153,153,153, 91, 68, 34,209,148,171, 87,175,214, 40, 94, 4,203,178, 91, 47,253,126,109,204,128, 47,
-122,146, 9,203,134,182,186,117,238,222,131,134,173,188,208,160,165, 23,194,207, 68, 97,205,215,187,119, 24, 13,198,111,147,146,
-146, 94, 84,198, 99,138, 15, 86,241,139,207,231, 87, 25, 7,235,192,129, 3, 19,186,119,239, 78,221,184,113,227,255,124,174, 74,
-251, 97,157, 58,117, 10,122,189, 30, 97, 97, 97, 76,101,113,176, 24,224,183, 21,203,190, 29,178,121,219, 17, 17, 69,244,184,122,
-225, 87,228,100, 85,110,149, 19, 10, 5,248,101,215,111,122, 62,159,247,168,146,178, 62,143,136,136,176, 93,188,120, 49,143,162,
- 40,172, 89,179,230, 21,203, 85, 89,220,189,123,151, 49, 24, 12, 85, 94, 43,149, 74,117,202,201,201,169,255,250, 21,243,182,182,
-239,242,190,149,143, 79,125,190,131,131, 43,248, 20,133,236,204, 52,220,188,118,201,120,252,200,193,108,157, 78, 55, 84,165, 82,
-157,122,157, 6, 24,186,225, 96,185,191,127, 60, 97,121, 85, 86, 20,163,193, 96,224,203,229,114, 24,141,198,114,197, 85,199,142,
- 29,165,151, 47, 95, 86,235,245,122,240,120,188, 74, 21,211,203,107, 52,123,200,230,237,111,246, 26,209, 52,237,155,149,149,133,
-130,130, 2,132,135,135,179,107,214,172, 73,203,206,206,254,186,244,246,204,204, 76,228,229,229,225,230,205,155,236, 79, 63,253,
-148,150,155,155,251,181,169,245, 87, 28, 23, 43, 43, 43,139,145,201,100,148,193, 96, 48, 52,108,216, 80, 34, 20,154, 22,243, 10,
- 0,110,221,186,213,181,162,109,173, 90,181,138,185,124,249,114,221,210,185, 9,141, 70,163, 80,171,213,122,245,234,213,171,202,
-254, 67, 42,149, 14,248,245,215, 95,119, 74, 36,146, 6, 26,141,230,179,212,212,212,173, 0, 92,121, 60, 30, 30, 63,126,156,110,
- 52, 26,251,204,156, 57,115,115, 65, 65,193, 93, 51, 51,179,129, 38,246, 27,199, 9, 33, 3,253,252,252,126,158, 51,103,142,188,
- 93,187,118, 2,165, 82,137,192,192, 64, 68, 71, 71,227,200,145, 35,250,181,107,215, 22, 22, 22, 22, 14,103, 89,246, 84, 37,131,
- 14, 22, 0, 49, 26,141,175,228, 48, 21,137, 68, 16, 8, 4, 40,212, 82, 24, 49, 51, 86,205, 64,160, 94,184,116,199, 17,150, 5,
- 81, 37,165,167, 39,167,100, 95,231, 27, 12, 23,226, 84,121, 57,149,149,147, 78,151,193,221,194,191,100,112, 71, 8, 1,197, 80,
- 32,122, 2, 30,205, 3,207,192, 3,225,243, 95, 90,183, 76, 75,119,197, 26,141, 70,132,132,132,224,240,225,195,248,224,131, 15,
- 88, 84,226, 43,114,248,240, 97,152, 98,189,229,192,129,195, 91, 18, 88, 0,112,239,222,189,108, 0,163,154, 52,105,178,109,252,
-248,241,135, 25,134, 17, 48, 12,211,227,214,173, 91, 23, 95,231,224, 73, 73, 73, 17, 74,165,242,107,123,103,171,208,174, 3, 91,
-161,126, 19, 55,208, 70, 26,151,143,222,194,150,133, 7,119, 39,196, 39, 12, 43,157,171,176, 34,152,226,131, 85,214,130, 85, 17,
- 87,106,106,234,236, 5, 11, 22,224,187,239,190,171,246, 42,194,138,246,185,114, 51,113, 84,139, 32,133,203,199,239,183,234, 66,
- 17,194,106, 43,241,179, 33, 4,108,177,167, 5,159,207,123,116,254, 90,124,195,138,246, 77, 78, 78,238, 56,118,236,216, 63, 40,
-138,114, 43, 53,170, 64, 37, 15,251,164,140,140,140,206,166, 92,155,228,228,228, 99, 46, 46, 46,245,206, 31, 63, 52,227,210,233,
- 99,237,104, 90,239, 73, 64, 32, 20, 10,159, 24,104,227, 57,131, 78, 23,154,144,144,240,218,129,216,102,140,250, 0,207, 85,233,
-224,243,121, 47, 99, 79, 21, 93,238, 95, 87, 77, 70, 64,192, 47, 21,254, 79, 44, 22, 31,251,249,231,159, 67, 62,249,228, 19,194,
-231,243, 75,166,221,138,207,159,162, 40, 92,187,118, 77,173,211,233,176,101,203, 22, 86, 42,149, 86, 26,184,246,175,186, 70,249,
-249,249,195,123,245,234,181, 21,128, 24,192,227,156,156,156,209, 42,149, 42,161,244,246, 15, 62,248, 96, 43, 0, 49, 33,228,255,
-182, 87,133,226,144, 13,214,214,214, 15,138, 44, 87,146,154, 56,186, 87,210,190,121, 21, 77, 31,154, 50, 85, 88,148, 91,240,163,
-226,239, 65, 65, 65,243,198,140, 25, 83, 58,217,243, 5, 0, 30, 53, 24,156,157, 34,132,212,159, 57,115,230, 68,169, 84,218, 94,
-173, 86,251, 0,128, 76, 38,123, 88, 88, 88,120, 86,175,215,255,192,178,108,118,101, 28, 79,158, 60,209,213,169, 83, 39,218,104,
- 52,250, 59, 56, 56,148,172, 62, 20,137, 94, 90,147,174, 61,180, 9, 79, 76, 76,108, 82,195,193, 99, 66,101, 22,229,138,254, 83,
-217,118,157, 78,151,118,229,202, 21,155,211,167, 79,243,104,154,198,241,227,199, 75, 6,125,229,205, 6,198,198,198, 66,167,211,
-105,184,199, 28, 7, 14,111, 7,228,175,156,166, 55,213,132,168, 84, 42,251, 73,228,226,177,110,245, 20, 13, 85, 79, 83,163,242,
-178, 11,127, 73, 74, 74,218,192,178, 44,205,153, 79,255,189,156, 34,153,197, 9,194, 19,186, 85,248,192,161,245,207,117,133,185,
- 93,202,227,108,214,172,153,179, 80, 40, 92,170,213,106,187, 85, 22,165,157,199,227, 25,165, 82,233, 49,141, 70, 51,165,108,178,
-231,127, 98,125,206,157, 59,183, 92,147,132,169,171, 8,103,207,158,205, 84,167,156,141, 26, 53, 58, 43,147,201,202, 13,168, 89,
- 88, 88,248,226,246,237,219,157,223,133,250, 44, 94, 45,103,138,223, 81,105,206, 26,173, 34,124, 75,247,145,139,139,139,196,194,
-194, 98, 41, 69, 81, 10, 19,197,177, 46, 53, 53,117,114,122,122,122, 50,215, 47,113,156,220, 20,225, 59,106,193,250,171,161, 82,
-169,246, 0,216,195, 93,142,255, 22,138,197, 83, 77, 80, 36,150,250,255,215,234,172, 88, 32,149,243,251, 67, 0,111,124, 73,190,
- 41,225, 24,222, 5,212,212,161,187, 72, 64,181,254, 39,156, 99, 66, 66,130, 6,192, 56,174,231,224,192,225,159, 1,110,130,158,
- 3, 7, 14, 28, 56,112,224,192,225, 13,131, 0,240,175, 96, 68,104,178,233,143, 16,226, 95,131, 17,231, 61,142,147,227,228, 56,
- 57, 78,142,147,227,228, 56,255, 91,156, 85,113,255, 91,166, 30,223, 9, 31, 44,142,147,227,228, 56, 57, 78,142,147,227,228, 56,
- 57, 31,172,127, 19,184, 41, 66, 14, 28, 56,112,224,192,129, 3,135,183, 37,176,204,156,124,125,237,221, 27,109,181,169,213,240,
-142, 77,173,134,119,236,221, 27,109, 53,115,242,245,253, 47, 86,154, 82,169,148, 42, 20,138,129,174,174,174,167, 26, 55,110,156,
-235,236,236,252, 5,215,148,170,143,118,132,240,251, 19,242,249, 16, 66, 94, 12, 33,228, 69,127, 66, 62,111, 71, 8,255,223,118,
-158,243,199, 57, 55,191,120,124,208,177,249,227,156,203, 13,192, 54,247, 43,165,237,229, 19,125,127,248,122,156,179,205, 27, 26,
- 89,154, 59, 58, 58,254,228,228,228, 20,231,232,232,248,220,209,209,241,103, 66,136, 37,215,226, 56,112,224,192,225,239,131, 73,
- 15, 51, 27,183, 6,159,249,250,120, 79,153, 55,123, 6,113,118,178,151, 25,140,180,254, 89, 92,130,223,236, 5,139,246,217,184,
- 53, 88,158,249,252,238,166, 26, 60, 4,136,139,139, 75, 63,129, 64, 16, 2,160, 88,168, 61, 48, 24, 12,135, 19, 18, 18,246,152,
-186, 42,168, 97,195,134,151,120, 60,158,107,117,142,205, 48, 76,220,237,219,183,219,212,164,194,156,157,157,251, 56, 59, 59,255,
-220,188,121,115, 89,227,198,141, 33, 20, 10,177,100,201,146, 47, 1,172, 48,249,220,219,181,227, 59,100,219,124,194,227,243,123,
- 2,104,200,178, 0, 8,239, 14, 99,208, 31, 73,181,206,216,202,158, 59,103, 82, 24,113,133, 66,241, 53, 33,100, 40, 94, 46, 43,
-223,164, 82,169,150,254, 21,141, 68,169, 84,214, 34,132,180,103, 89,214,135,162,168,187, 12,195,156, 84,169, 84, 25,175,203,235,
- 8,140,106, 25, 28,252,195,144, 47,191,228,169, 47, 92,192, 15, 63,255,188, 18,185,185, 0,176,166,186,109,169, 89,179,198,189,
-205,205, 17, 66,128, 0, 16, 16, 10,236,173,204,108,234,232,205,155,145,123, 76,137,165, 86, 17, 2, 3, 3,143, 0,232, 94,244,
-245,104, 68, 68, 68,143,234,114,100,197, 50,179,196, 2,159,214, 89, 79,206,206, 2,208,173,236,118,163, 70, 50,132, 39,168, 21,
-194, 99, 35,227, 1,124,255,154,226, 74,102,111,111,127,231,224,193,131, 46,205,154, 53,227, 3, 64,120,120,248, 39, 33, 33, 33,
- 29,138, 76,250,185,111,163,163,105,209,162,133,181,209,104,220,198, 35,164, 57,195, 48, 86, 0, 64, 81, 84, 54,205,178,215,248,
-124,254,144,154, 6, 43,230,192,129, 3,135,127,172,192, 50,115,244,241,171, 95,223,247,203,227, 7,182,213,202,206,204,214,172,
- 89,186, 53, 82,205, 23, 21,214,246,243, 18,174, 90,190,216,106,220,164,175, 38,153, 57,250, 92,207, 79,121, 24,101,234, 65, 21,
- 10,133,171,187,187,251,254,175,191,254,218, 63, 56, 56, 88,224,224,224,128,148,148, 20, 60,122,244,200,255,242,229,203, 31, 28,
- 60,120,240, 75,133, 66,241, 81, 85, 17,220, 1, 64, 46, 18,214,217,179,120,161,147,200,202, 26, 44,109,132, 85,253, 70, 0, 0,
-150, 97,144,116,238, 20, 24,131, 1, 44, 67,195,165,235,251, 47,127,103, 89, 52,109,218, 84, 88,147,202,114,113,113, 81,214,171,
- 87,111,199,244,233,211,133, 90,173, 22,183,110,221,194,213,171, 87,153,212,212,212, 69, 38,139,138, 6, 31,250, 57,241,157,246,
-245,250,160,155,123,143,247, 28, 68,110, 78,246, 96, 24, 9, 30, 61,213,187,158,186, 24,217,245,232,241,147, 83, 28,252, 62,236,
-147, 26,117,224,110,101, 60,254,254,254,205, 41,138,250, 46, 49, 49,177, 88, 4, 45,105,214,172,217,183,165,247, 41,171, 81, 25,
-134, 1,159,207, 79, 41, 44, 44,236,119,239,222,189,200,242,120,103,141, 32, 6,163,241,101,187,224,243, 65,111, 59,233,114,160,
- 83,167, 78,181,135, 15, 31,142,128,128, 0,132,135,135,183, 15, 11, 11,155, 88,171, 86,173,155, 6,131,225,168, 88, 44, 62, 23,
- 23, 23, 87,163, 4,139, 66, 96,234,144, 47,191,228,153,197,197,193,236,214, 45, 12,202,205,229, 47, 6,166, 86, 71, 96, 5, 6,
- 6,214,233,220, 41, 96,223, 7, 31,181,245,117,114,242, 19, 10, 4,118, 96, 89, 22, 6, 67,102,189,180,180, 7,189, 45, 45, 49,
-189,105,211,166, 31,223,184,113,227,177, 41,124, 77,154, 52,113,100, 24,102, 61,203,178, 66, 66,200,120, 0,221,143, 31, 63, 14,
-154,166,209,163, 71,143,238,129,129,129,117, 88,150,253,209,204,204,140, 85,171,213,159,222,188,121, 51,165, 50,203, 85,246, 19,
-102, 86, 50,223,163,171,119,208, 80, 36,243, 79,116,157,220, 69,113,204,202,131,154, 63,107,117,226, 53, 0,232,230,233,105, 94,
-199, 71, 54,205,204,194,223, 38, 39,241,212,180,110,158,158, 27,143, 61,121,146,247, 26, 98,120,233,182,109,219,106, 53,111,222,
-188, 36, 72,110,227,198,141,121, 75,150, 44,113,158, 60,121,242, 74, 0,195, 76,228,169,103,107,107,123,130, 97, 24,237,253,251,
-247,235, 21,255,238,208,232,163,150,182,230,242,142,105, 89,121, 23,210,239, 31, 60,111, 10, 87, 80, 80,208,112, 33, 69,253,180,
-124,230, 56,158,111,195,134,144,217, 57, 64,175, 82,161,192,104,176,185,118,251,126,143,197, 43,126, 74, 11, 10, 10, 26, 25, 30,
- 30,254, 51,215, 37,115,224,192,225, 63, 35,176,196, 98,209,244,217,223, 76, 35, 89, 25,217,106,125, 94,174, 94,198,234,140, 22,
- 50, 9,201, 77, 77,203,126,102, 33, 43,156, 60,105,130,100,218,244,111,166, 3, 24,100,170,184,242,241,241,185,177,113,227, 70,
- 7, 27, 27, 27,228,228,228, 32, 35, 35, 3, 55,110,220, 0,203,178,232,214,173,155,184, 81,131, 6, 1,203, 87,172,184,170, 80,
- 40, 90, 84, 37,178,248, 2, 62, 17,200,229,248,181,109, 0, 40,161, 16, 31, 63, 76,122, 41, 46, 12,122, 28,239,223, 19, 0,192,
- 19,137,208, 55, 38, 21, 0, 32,145, 72,106, 92, 89, 44,203,182,104,213,170,149, 16, 0,190,252,242,203,220,130,130,130, 80, 66,
-200, 78,149, 74,149,104,202,255,237, 26,188,239,229,104,239,116,126,217,130, 17, 54,254,117, 60,160, 51, 24,144,144,154, 8, 22,
- 34, 56, 57,200, 49,232,131, 70,194, 86, 65,194,186,223,175,249,227,156,163,127,175, 54, 41,247,126,187, 95,161,176,148,203,183,
-173, 92,185, 18,123,247,238, 5, 0,156, 61,123, 22, 94, 94, 94,242,170,202,240,232,209, 35,143,161, 67,135,238, 6, 80,183,188,
-237, 70, 35,248,161,223,237, 4, 0,108,219, 56,144, 23, 29, 29, 93, 91, 42,253, 51,151,114,219,182,109,209,182,109, 91, 42, 52,
- 52,180,217,217,179,103,155,237,222,189, 91,239,236,236,188, 50, 49, 49, 49,172, 38,117,170,190,112, 1,102,183,110, 1, 23, 46,
- 84,251,191,141, 27, 55,118,173, 95,223,254,234,247,203,190,181,255,253,240,125, 44, 91,246, 51,158, 60,121, 2, 0,240,240,240,
-192,192, 1,125, 4, 59,127, 89, 95,127,250,244, 57, 87, 2, 3, 3,131, 35, 34, 34,170,140,110,206, 48,204,250,208,208,208,247,
-205,204,204, 48,125,250,244,232, 58,117,234,192,194,194, 2, 27, 54,108,128,181,181, 53, 12, 6, 67,244,146, 37, 75,248, 42,149,
- 10,171, 86,173,218, 92,202,186,245,127,104,211,189,237, 44,177,192,167,181,119,208, 80,152, 89, 40,176,113,215, 30, 60, 10,223,
-218, 90,107,120, 56,235,235,113,206,131,121,172,120,168,179,151,217,244,218, 65,237,108,235,214,239, 5,247,192, 91,118, 90,250,
-194,211, 89,159,123, 44,226, 75, 52,219,102, 47,251,127, 43, 33,233,179,143,231,159,123,211,230,222, 41,121, 6,203,150, 4, 13,
- 37, 40,138,129,229,164, 80,246,108,219,182, 45,175, 88, 96,199,197,197, 65,167,211,193,207,207,143,210,233,116, 38,197,180, 82,
- 42,149,245,218,180,105,115,105,199,142, 29,182,173, 91,183, 78, 43,189,205,201,214,170,203,249,253, 43, 39,124,247,195, 47, 62,
- 14,126, 31,102, 87, 53, 16, 8, 10, 10, 26,222,160,158,199,166,149, 75,102, 19, 94, 65, 2,248, 86, 25, 0,147,129,164,221,155,
- 1,153, 13,122,140,158,140, 38,205,154,241, 38, 76,250,122, 83,147, 38, 77,216,155, 55,111,110,225,186,101, 14, 28, 56,252, 39,
- 4, 22,195, 50, 13,237,237,109, 36,171,150,110, 13, 87, 72, 40,226,228,162, 36, 34, 11, 43, 62,204,228, 98,138, 39, 80,123,120,
-184, 8, 25,150,105, 88,129, 32,121,101,133, 1, 33,132,184,187,187,239,223,178,101,139,131, 64, 32, 0,195, 48,176,183,183,199,
-211,167, 79,145,149,149,133,252,252,124, 60,121,240, 0,238,181, 92, 48, 97,228, 8,197,252,101,223,239, 39,132, 4,149,158, 46,
- 44,203,201, 50, 44, 24,227,171, 51,106,132, 16,148, 55,191, 88, 81, 26, 25, 83, 87, 66, 48, 12,243, 76,165, 82, 65, 38,147,193,
-215,215,215,236,230,205,155, 23, 19,139, 77, 72, 85,157,123,159, 62, 60,133, 72,124,104,233,130,126, 54,132, 23,141,232, 23,217,
-240,116,105, 10, 91,203, 90, 72, 76,203, 71, 68,212, 81, 68, 63, 57, 2, 79, 23, 87,140, 28,232,105,181, 98,125,218, 97, 18, 56,
-202,147,141,216, 96, 40,143, 51, 47, 47,207,204,213,213, 21,206,206,206, 96, 24, 6, 52, 77,227,254,253,251, 37,159,139,243, 37,
- 22,127, 94,185,243, 50,172,121,233,232,247, 97,119,100,102,102,154,153,122,238,197,226,106,223,247,202,250,234,130, 36, 33, 0,
- 72,229, 10,253,199,147, 19,239, 55,105,210, 4,246,246,246,194, 43, 87,174, 76, 6, 16, 86,221,250,212, 3, 75,126,216,178,101,
-213,160,156, 28, 10, 0, 54, 17,194,232, 95, 70,213, 54,169, 45,117,126,175,241,129, 21, 43,102,217, 19, 54, 10, 54,150,139,113,
-227,198,115,232,245, 47,175,124, 70, 70, 42,198,127,158, 11, 62,223, 28,223,127, 63,219,182,111,191, 49,191, 22, 77,145, 49,149,
-149,147,101, 89,225,195,135, 15, 81,191,126,125,236,222,189,155,207,227,241,112,253,250,117, 72,165, 82, 12, 29, 58, 20,254,254,
-254,124,169, 84,138,139, 23, 47, 34, 55, 55,151, 84, 86,206, 11, 71,207,207,207,138, 61, 59, 43,153,119,162,235,198, 93,123, 48,
- 98, 64, 63, 56, 25, 99, 47, 90,123, 82,243,187,245,104,249, 45, 79, 80, 43, 68,110,238,111,237,229,223, 11, 66,145, 25,198, 77,
-157,135,232,123,135,172, 11,243,238,126, 78, 27,226,107, 1,152, 88,150,147, 13,235, 77, 47,223,234, 16,120,218, 53,210, 77, 25,
- 56,234,122, 82,228, 79,119,254, 60,186, 47, 31,148,218,170, 88, 92, 61,126,252, 24, 79,158, 60, 1,143,199,131, 90,173,126, 37,
- 81,112,105,206,128,128,128, 81, 52, 77,127, 11, 0, 58,157,110,171,163,163,227,240, 31,127,252,209,150,199,251, 51, 83, 84,177,
-229, 42, 51, 59, 55,235,202,205,251,143, 38,143,234,221,238,194,181,123,241, 86,141, 62,120,145,125,251, 96, 78,121,245,217,162,
- 69, 11,107, 17,143,247,211, 15,203,230, 18, 58,246, 15,136,125,219,129,111,230, 5,218,144, 8, 77, 86, 62,212, 79,147,161,223,
-176, 26, 30,163, 39, 97,233,146,239,200,128,193,159,254,228,233,233,185,255, 73, 41, 11,222, 95,177, 74,137,227,228, 56, 57,206,
-119,147,243, 63, 39,176, 8,161,114,245,122,131,192,162,150,179,225,227,143,218, 52,136,188,126, 47,218,204,198,146,106,212,180,
-129,223,189,232,132, 8, 24,105, 61, 33,148, 73,126, 29, 46, 46, 46,253,102,207,158,221,192,194,194, 2, 12,195,192,210,210, 18,
-105,105,105,208,235,245,200,205,205,133, 54, 63, 15,250,188, 92,220,126, 17,135,224,118,237,240, 94,139, 22,190, 71, 13,134,126,
- 0,118, 87,196, 73, 83, 60,214, 54,160, 41,250,196,102,128,209,235, 16,230, 97, 91, 98,181,234, 31,151, 13, 66, 8,104,157, 22,
- 71,155,214,133,216, 76,142,134, 83,102,215,184,178,146,146,146, 34,221,220,220,142,117,237,218,181,219,200,145, 35,169,228,228,
-228,227,142,142,142,173, 82, 82, 82,170,156, 30,117,136,161,135, 14, 25, 25,224, 97,103, 69,225,247,203, 39,208,220,231, 67,200,
-196, 2,164,101,169, 65, 17,130, 39,207, 78,131,166,229,184,253,240, 5, 90,248,203,209,186,153,165, 75,254, 31,153, 35, 81,241,
-116, 25,201,202,202, 66,106,106, 42, 12, 6, 3,140, 70, 35,122,247,233,131,109, 91,183,162,160,160, 0, 26,141, 6, 58,157, 14,
- 12,243, 82, 79, 36,167,229,227,198,237,227, 8,106, 80, 15,168, 36,226, 55,159, 15,227,143, 43, 7,242,205,101,128, 80,108,175,
-207,203,203,131, 92, 46,135,186, 32, 73, 56,100, 68,137,101, 75,120,246,236, 89, 68, 68, 68, 64,169, 84,154,212,142,202,195, 19,
-224,167,103, 52, 61,179,219,129, 3, 14,151, 15, 28, 96,174,253,254,123,130, 56, 47,111,131, 41,255,109,214,172,113,239,113,227,
-122,248, 74, 37, 82, 36,188, 88, 9, 31, 31, 33,190,252,194, 22,161,139,211, 1, 0, 19,198,185, 32, 40,200, 22,185,217,251, 96,
-231,240, 53,190,156,252,129,103,126, 62,251, 9,128,173,149,183,119, 50,254,151, 95,126,137,238,220,185, 51, 63, 50, 50, 18, 98,
-177, 24, 82,169, 20, 18,137, 4, 82,169, 20,201,201,201,208,233,116, 8, 11, 11, 51, 22, 77, 33, 86,136,162,105,192,110,147, 59,
- 43,142, 61, 10,223,218,218,153,122,122,251,131,201, 45,159, 69, 94,191,157,127,230,143,203,243,141, 26, 73,124,118,194,169,105,
-117,154,220,182,251,124,202, 92,172, 94, 58, 27,143,174,159,207,116,116,205, 91, 67, 19,237,214, 86,229,196,185,111,215,110, 46,
-127,236,204, 1,134,177,195, 63,182, 60,172,184, 50,226, 48, 31,233, 41,153,119,151, 33,246,134, 90,236, 85,127,112,189, 58, 68,
-119,230,204, 25,105,155, 54,109,160, 86,171, 95,222, 11, 60, 30,126,249,229, 23,198,104, 52,158, 45,175,156, 6,131,225,219,136,
-136, 8, 69, 97, 97, 33, 6, 12, 24, 48, 97,206,156, 57,114,129, 64,240,242,254,162,233, 87, 44, 87, 11, 86,108, 63, 49,233,219,
- 53,103, 79,236, 94,172, 92, 48,125,120,187, 65,227,190, 59, 11,224,120,249,214, 80,227,182, 21,139,103,240,196, 86,122,144, 38,
-157,161, 79, 85,227,249,166,145,208,229,168, 81,111,254, 60, 0, 66,232,244, 60, 28,254,160, 15,120, 54, 74,124,214,166, 21,127,
-195,249, 75,219, 0,124,192,117,205, 28, 56,112, 40,131, 38, 0,236,139, 62,167, 23, 61,199,108, 1, 20, 91,217,237, 1,232, 0,
-136, 74,253,167,236,247,210,251,150,253, 94,250,115, 58, 94,250, 54,219, 3,160, 1,220, 0, 80,109, 63, 81,170,232,161,194,150,
-122,192,176,101,172, 54, 23,158,196,198,169,219,181, 13, 82,156,189, 17, 19,217,245,195,247,154,182,233,208,172,121, 74, 70,110,
-172,147,189,133,252,202,245,107, 98,134, 97, 76,154,223, 17, 8, 4, 33,193,193,193,252,172,172, 44,200,100, 50,164,165,165, 33,
- 49, 49, 17,122,189, 30,234,156,108,104,179,179,160,206,202,132, 33, 47, 27, 79,110, 94,135,183,171,179,184,200, 9,222, 36,148,
-181, 80, 21,103,176, 39, 20, 5,137,133, 57,164, 22, 22,224,241,170, 23,153, 66,169, 84,246,242,241,241,185,230,236,236, 60,179,
-104,132,255,121,104,104,104, 58,203,178,152, 54,109,154,133,133,133, 69,152,187,187,187,184, 42, 30,115, 27,186,119,179, 6,117,
-121,209,207,239, 34,200,235, 99,212, 86,180,193,147,196, 28,164,229,104,144,156, 89,128,122,245,166,192, 94, 57, 2,150, 78,163,
-113,247, 81, 60, 20, 78,181, 41,158, 64,216,181, 50,206,228,228,228, 87,190,239,218,185, 19,133,133,133,168, 91,183, 46,250,247,
-239,143,169, 83,167,162, 95,191,126, 80, 42,149,104, 93,151,143,225,131,123, 35, 53, 53,181,210,114,206,223,200, 10, 22,237, 84,
- 68, 14,153,205, 70,214,237,120,236,254,147, 39, 79, 16, 29,253,255, 51,107,127,252,241, 7,114,114,114, 74, 30,192,166,192,209,
-209,113,134, 66,161,184,163, 80, 40,238, 43, 20,138,163, 41, 74,229, 67,131,135,135, 99,171, 15, 62, 32,126,125,251,242,226,229,
-114,242,172, 86, 45, 51, 83,184, 44, 44,208, 35, 40, 40, 88,148,157,245, 51,128,151, 34,114,248, 48,123, 92, 58, 95, 31,151, 47,
- 6, 98,252, 56, 15, 80, 68, 2, 66, 9, 81, 88,240, 7,252,234,251, 11,205,205,217, 74,219, 82,145, 67,123,108,253,250,245,249,
- 99,198,140,129, 88, 44,198,182,109,219,176,110,221, 58, 44, 95,190, 28,209,209,209,112,115,115,131, 66,161,128,163,163, 35, 31,
- 64,108,209,127, 42,133,149, 39, 53, 95,107,120,120,209,218, 75, 30, 75, 40,135,150, 90,163,228,227,217,203, 84, 25,243,215,196,
-126,255,236,145,218,227,225,245,243, 25,209,247,126, 99,158,222, 60,155,174,138,201,247,152,191, 38,246,251,133,171, 19, 51,203,
-227, 58,127,126, 54,125,240,232,121,125, 65,126, 33,191, 87,183,142,234,209,195,250,215,179,145,121,255, 2,231,206,141,221,107,
- 41, 6,207, 94,184, 74,247,217,152, 73,250, 77,155,127,102,243,242,242,144,155,155,139, 31,126,248,193,248,251,239,191, 39,210,
- 52, 61,169,130, 34,242,138, 4, 17,250,244,233, 35,151, 74,165,136,143,143, 47,177,130, 2, 64, 82, 90,198,221,203, 55,239, 61,
-156, 60,186, 79,219, 2,173, 86,123,226, 92,248, 3, 63, 47, 55, 23, 66, 88,247,138,206,155, 71, 72,243,250, 13, 27,130,101,179,
- 65,241, 93,145,176,125, 25,212,201,153, 40, 76,203, 4, 37,144,195, 0, 9,244,172, 8,146,134, 77,241, 60,226, 22, 28,205, 44,
-192, 39,164, 21,247, 28,225,192,225,191,137,202,180, 8, 0,123, 66,200, 97, 66,200,225, 25, 51,102,180, 7, 96, 75, 8, 57, 92,
- 36,130,236,139, 62,139,138,247,169,224,187,125,105,158, 50,255, 45,253,217,110,198,140, 25, 29, 8, 33,135, 91,182,108, 57,184,
- 72,200, 85, 27, 85,170, 13,158, 70, 23, 58, 99,230,108,202,194, 76,100,238,231, 91,219,250,247,147, 23, 34, 47, 95,187,245,192,
- 92, 38, 17,231, 23, 20,136,150,255,184,206,149, 20,170, 77,117,242,246,181,179,179,131, 94,175,199,227,199,143,145,144,144, 0,
-189, 94, 15, 99, 97, 1,180,217,217,208,100,101,129, 41,204,135,144,102,160, 78, 79,131,181, 68, 4,252,185,194,176, 50, 83,101,
-137,152, 42, 79,112, 17, 66, 32,177, 48,135,200,220, 12, 20,159,103,114,229, 40, 20,138,192,198,141, 27,239, 61,115,230, 76,179,
-224,224,224,249,238,238,238,150,201,201,201,207, 83, 82, 82, 58, 46, 93,186, 84,107,111,111,143, 65,131, 6,121, 27, 12,134, 33,
- 85,113, 9, 37,218, 6,110,142, 94,112,117,236, 5,165,109,115,100,228,106,145,150,173, 70,114, 70, 33,246,252,218, 31,167,142,
-245,199,173,139,131,241,248,250,112,100, 20, 88, 64, 98,211, 30, 0, 91,105, 4,221,107,215,174, 97,253,250,245, 37,175,213,171,
- 87, 35, 51, 51, 19,245,235,215, 71,124,124, 60,142, 31, 63,142,228,228,100,216,219,219,227,214,173, 91,216,176, 97, 3,174, 95,
-191, 94,237, 70,162,209,104, 32, 16,217,234,183,109, 28,136,109, 27, 7,130,102,229,250,210,117,111,114, 99,163,168,161, 73, 31,
-124,208, 32,201,202,202,175, 97,195,134,221,250,246,237,235,209,172, 89,179,146,237,158,158,158,174,124, 62, 63, 89,169, 84,110,
- 82, 42,149,141, 43, 37, 99,216, 0,107, 27, 95,232,180, 15,139,174, 49, 31,132,136,209,225,189, 7,104,213, 58, 2,122,131, 8,
-132, 18,131, 34, 18, 24,141, 25,176, 48,119, 4,203, 86, 25,145,184,251,241,227,199,177,126,253,122, 60,125,250,180,100,122, 52,
- 36, 36,100,252,128, 1, 3,246,211, 52,141,195,135, 15,227,224,193,131,168, 83,167, 14, 26, 55,110, 12,189, 94,223,189,170,243,
-158,181, 58,241,218,206,229,199,250, 11,140, 86,141, 69, 98,183, 58, 84,158,172,215,231,237,236,229, 0,112,236,201,147, 60, 71,
-215,188, 69,133,121,247, 94, 88,187, 20, 44,174,202,193,157,101,193,134, 71,223,191,190,251,215,147, 57, 41,233, 25,130,128, 70,
-254,234,239,230, 78, 17,186,215,174,187,100,246,180,177,142,137,185,146,156,247, 38, 28,123,184,255,248,141,252, 79,134,143, 52,
-126, 58,114,156,230,196,201, 63, 14, 48, 12,211,176,162, 21,132, 12,195, 32, 41, 41, 9,247,238,221,195,211,167, 79,145,158,158,
-142,180,180, 52,228,229,229,149, 76, 43,202,242,114,143,172,222,242,251,109,185, 84, 42,107,214,192,203,245,122,100, 84,170, 92,
- 42,149,121,213,118,173, 71, 72,249, 9,168, 25,134,177,122, 89,135, 4,121,247, 46, 64,147,153, 7,117,118, 62,212,153,249,208,
-234,121,208,104, 41,104,244, 20,236, 90,119, 70,126,129, 26,154,204,108, 48, 44,107,205, 61,102, 56,112,224, 80,201,243, 62,100,
-209,162, 69, 11, 43,219, 94,234, 93, 87,230, 59, 8, 33,135, 89,150, 13, 97, 89, 54,164, 72, 76, 21,235,132,195,165,121, 22, 45,
- 90,180,144,101,217,144, 43, 87,174,236, 2, 80, 88,147,178, 86, 57,181,147,158, 30,157,111, 97,239,247,209,164,105,223, 30,253,
-101,227, 42,135,204,204,172,104,161, 68,170,145, 72, 68, 54, 83,167,205,181, 42, 40,204,249, 40, 63,211,244, 85, 79, 89, 89, 89,
- 37, 15, 47,161, 80, 8,186,176, 0,180,186, 16,154,172, 12, 16,189, 22, 66,154,134,141, 76, 6, 87,165, 35,220, 29,157,170,228,
-227, 49, 52, 81,157, 58,138, 19,131, 63,124,101, 90,144,209,235,112,188,165, 55, 68,102,114, 72,173,172, 17,124,240,226, 75,161,
- 35, 20, 2,179, 23, 87,201,235,228,228,100,167, 84, 42, 15,253,248,227,143,194,244,244,116,220,191,127,255,118, 92, 92, 92,142,
-141,141,141,185, 64, 32, 96, 98, 98, 98, 78, 63,122,244, 40,164,118,237,218, 96, 89,214,179, 42,190,188,108,185, 94,111, 96,144,
-152,250, 28, 9, 73,247, 96,105,230, 10,150,170,133,148,204, 66, 16, 56,192,160,121, 84,226, 75,166, 85, 39,160, 64,107, 90,222,
- 94,189, 94, 15,131,193, 0,131,193, 0,157, 78,135, 79, 62,249, 4, 87,174, 94,197,206,131,231, 16, 31, 31,143, 58, 78, 50,244,
-239,215, 7,141, 26, 53, 66,120,120,120,141, 27,181, 87,167, 19,247,165, 82, 41,214,173, 91, 7,153, 76,134,234, 10, 44,133, 66,
-241,189,143,143, 79,221, 71, 5, 5,136,122,248, 16, 77,251,244, 1, 0, 92,186,116,169,100, 31,181, 90,141,129, 3, 7,138,158,
- 62,125,250,233,195,135, 15, 63, 85, 40, 20,203,147,146,146,190,172,136,243,200,145,171, 24, 61, 58, 10,105,105, 47, 45,187,123,
-118,249,149,108,123,246, 84,143,174, 61, 94,206, 92, 89, 89, 89,225,251,239, 77,203,246, 64,211, 52, 54,108,216, 0,169, 84, 90,
- 34,176,132, 66, 97,171,201,147, 39,127, 84,222,254,126,126,126, 85,114, 78,238,227, 34,185,245, 92,250,185,101,221,218,254,150,
-246, 13,145,110,188,213, 32, 50, 49,121,252,228, 62, 46, 43,151,135, 37,104,104,162,221, 74, 27,226,107,241, 37,154,109,166,148,
-241,201,177, 85, 58,235, 58,163,182, 37,167,230,124, 51,110,228, 32, 91, 43,107,199,252, 77, 63,134, 90, 81, 20,133,223, 35,116,
- 89,245, 61,108,173,123, 53,255, 33,127,244, 23,179, 34,117,198,231,227, 17,127,248, 81,145,185, 27, 21, 9,172,196,196, 68,164,
-167,167,227,197,139, 23, 72, 75, 75, 3, 33, 4,105,105,105,213,178, 80,150,103, 81,214, 37, 36, 34,249,192,102, 56, 13, 28,132,
-122,243,230,129, 97, 4, 80, 23, 26,177,175,117, 71,228,230,168,161, 99, 8,172, 2, 91,226,189,195, 23, 65, 49, 70,224,234, 21,
-238, 9,194,129, 3,135,202,250,149,195,211,167, 79,255,218,196,221, 79, 3, 48, 41,180, 78, 89,193, 53,125,250,244,175,139,143,
- 21, 26, 26,170, 6,160,122,227, 2, 11, 0,114,211,162, 98,109,221, 26, 38,229, 23,170, 37,214, 54,214,133,230,102, 34, 54, 39,
- 59,135,247,240,113,180, 38, 63,233,241,163,106, 28,239,193,253,251,247,253, 19, 19, 19,241,226,249,115, 24, 10, 11, 64,116, 90,
- 64,163, 70,167,214,173, 32, 1, 32, 33,128,144,209,131,199, 19, 33, 63, 63, 23, 0, 30, 84, 69,202, 24, 12,175,116,234, 37,211,
-130,230,230, 16,153,201, 33,182, 48,127,197,162,101, 10,164, 82,233,206, 13, 27, 54, 40, 20, 10, 5, 86,172, 88, 1,133, 66,225,
-211,169, 83,167,194,182,109,219, 74,237,236,236, 80,175, 94, 61, 4, 5, 5,225,236,217,179, 32,132, 60,169,138,207,168, 19, 69,
- 60,136,165,107,229,230,223,194,245,136, 29, 48,232,116,168,237, 53, 3, 90,163, 29,228, 14,159, 66,173, 63, 4,125,246, 57, 0,
-128,200,162, 29, 82, 82,210, 1,144,123, 85, 89,238,202,126,191,115,231, 14,182, 30,184, 4, 87,223,118, 72,206, 60,142,123,247,
-194,225,104,125, 18, 94,126,245, 97, 40, 85, 79,166, 88, 5, 77, 21, 36, 38,222, 20, 3,103,204,152,129, 28,169, 20,232,209, 3,
-194,216, 88,232,245,122, 52,111,222, 28, 77,154, 52, 1, 0, 52,111,222, 28, 60, 30, 15,117,235,214,133,141,141, 13,246,239,223,
- 63, 16, 64,185, 2,139, 37,228, 22, 67,103,248,120,120,120,148, 8,172,109,219,211, 16, 25,222, 9, 4, 34,172, 90,253,231, 37,
-113,117,117, 69,114,242, 83, 16, 82,165, 83,230,209, 30, 61,122,116,183,182,182,198,176, 97,195, 32,149, 74,241,225,135, 31, 66,
-173, 86,247, 45, 26,209, 96,198,140, 25, 0,128,217,179,103, 99,206,156, 57, 40, 44, 44,172, 48, 68,197,250,239, 26, 42,243,212,
-204,112,133, 66,249, 97,123,187,218, 13, 59,116,233,132, 58, 94, 29,209,161, 75, 60, 0, 44,180, 19, 60,235,179,228, 27,255, 3,
-181,107,217,108,185,114,240,244,183,193,221,218,207,156, 59,193,102,254,236, 85,153, 85, 14, 88,178,159,253,148,247, 80,208,115,
-229,170,245,198, 21,179,191,158, 44,126,158,174,207, 84,101, 49,249,114, 49,223,220,211, 17,102,227,167,206,127,170, 82, 61,254,
- 10,241, 39,163, 77,185,134, 79,159, 62,133, 86,171, 5, 77,211,208,106,181,200,207,207, 71, 66, 66, 66,201,245, 85,203, 45,186,
-142, 27,214,179, 81,129, 90, 93,120,253,110,204,139,153, 19, 6,181, 40, 80,171, 11, 99,158,189,136,102,217, 31,152, 10,174,121,
-118, 97, 94,190,141, 46,207,128,236,219,209,176,235,224, 6,157,145, 64,107,228, 33, 51, 61, 15,122, 26, 48, 80, 2,184,244,254,
- 4, 70,194, 71,110, 90, 50, 40, 66,184,120, 88, 28, 56,112,168, 82, 8,133,134,134,134,252, 85,220, 0, 16, 26, 26,122, 63, 52,
- 52,244,181,142, 85, 44,176,218,149,154,239,108, 87, 78, 71, 73, 26, 55,116,117, 94,248,245, 71, 74,131, 65,231,147,159,159, 79,
-243,249, 34,126, 45, 75,117,114,117, 14,102, 48, 24, 14, 95,188,120,241,131,214,173, 91,139, 99,238,222,134, 54, 39, 7,218,156,
-108, 8, 25, 35,108, 36, 65,160, 12, 58, 16,157, 22,206,222, 12,212,185, 18, 92,189,249,200, 96, 48, 24, 14, 87, 90, 33, 96, 89,
-198,248, 82, 56, 80, 20,239,149,169, 66,177,185, 25, 68,102,102, 16,155,153,151, 59,133, 88, 17, 28, 29, 29,101,221,186,117,235,
- 24, 16, 16, 0,150,101,177,116,233, 82,232,116, 58, 81,177,165, 72,175,215, 35, 47, 47, 15,191,254,250, 43,182,111,223,126,217,
-210,210,178,202,165,229,140, 81,123,236,236,229,219,221, 7,127,216, 65,116,234,220, 38, 24,180, 70,228,107,173, 80,160,209, 33,
- 79, 45,128, 78,220, 5,132, 92, 4,197, 19,163,101, 99, 79,156,185, 20,163,161, 13,250,227,213, 17, 67,132, 16,104,181, 90,164,
-166,166, 33, 51,239, 44,144,151, 8, 59,125, 30,242,159, 61, 65,227, 79,134, 64,167,211, 85,201, 53,107, 4, 49, 76, 31, 8,254,
-246,121, 20, 4, 34, 91,189, 87,167, 19, 21,134,138, 48, 51, 51, 43,241,209, 49, 73,168,231,230, 98,199,142, 29,104,222,188, 57,
-218,182,109,139,196,196, 68,196,198,198,162,123,247, 63,103,217,110,223,190,141,200,200, 72,120,122,122, 86,193,197, 30,205,204,
-124,220,167, 87,175, 94,194,107,215,174,129,101, 89,120,121, 89,194,194,220, 12,132, 18,195,215,215, 30,192, 35, 16, 66,208,174,
- 93, 59,232,245, 42, 99, 65, 1,142, 86,198, 25, 17, 17,209, 35, 48, 48,176,142,193, 96,136,246,247,247,231, 39, 39, 39,163,119,
-239,222,216,179,103, 79,241,136, 6,211,167, 79,127,229, 63,249,249,249,154,138,248, 26, 53,173,247, 21,205,218,182, 21,137,221,
-234, 88,218, 55, 68, 29,175,142, 0,128,247, 66,134,163, 78,221, 90,200, 73,187, 83, 71,167,125,254, 33,143,100, 88,255,114, 45,
- 49,170,181,204,127, 88,122,252,185, 24, 0,155, 76,184,230, 44, 33, 36,229,133,192, 98,239,190,223, 14,143,234,217,243,125,190,
-129,102,140,254,174,124,203, 61,251,143,164, 38, 62,127,241, 3, 94,156,188, 95,122,255, 74, 4, 22,157,157,157, 13, 51, 51, 51,
-196,198,198,106,123,246,236, 41, 86,171,213,136,137,137, 41, 17, 88, 14,118, 54,126,173,154,248,251, 44, 88,177,253,132, 92, 44,
- 22,119,105, 23,228, 27, 21,243, 60,129,101, 73, 92,133,188, 44,123, 45,230,193,131, 30,246,118,174, 72, 58,119, 5,242,224,110,
-208,106, 9, 52,122, 6, 58, 26, 48,242,132,176,108,212, 20, 82, 15, 95, 48, 44,240,224,238,109, 24, 89,246, 50,247, 8,225,192,
-225, 63,139, 74,181, 72,177, 5,171, 69,139, 22,187, 75, 91,153,138, 63, 3,208, 2,168,204, 39, 58,173,180,136, 42,158, 54,172,
-232, 56,101,120,107, 38,176, 88,150, 61,143, 74, 86,150,217,217,217, 57,248,122,215,247,216,184,121, 19,244,218, 28,196, 70,109,
- 65, 65, 94, 10,102, 45,188,234,233,226,226,210, 54, 33, 33,225,188, 41, 7, 75, 72, 72,216,179,127,255,254, 47, 27,213,175, 31,
-224,238,226,130, 59,113,207, 32,100,105, 8,105, 26,148, 94, 11, 62,173,131,139, 31, 3,138,146, 35, 57, 57, 15, 27,142,255,113,
- 47, 33, 33, 97, 79,165,163,111,194, 67,173,158, 31, 99,192,123, 61,192, 26,244, 56,217,218, 15, 18, 51, 51,136,173,172,208,242,
-215,115, 47, 67, 54, 24, 13,136, 91, 52, 5, 66,185, 25,108,154,183,171,178,156, 41, 41, 41,133,117,235,214, 13,127,248,240, 97,
- 19,111,111,111,204,157, 59, 23,241,241,241, 96, 89, 22,169,169,169,154,180,180,180,196,140,140,140, 56, 66,200, 1,149, 74,181,
-209,148, 72,225,169, 94,188,173,167, 78,255,241, 85, 96, 99,191,122,157,218,206,193,225,195,223, 34, 59, 55, 23, 5, 90, 62,242,
-213,122, 20,104, 88, 40,205, 61,209,172, 97, 0,210, 50,116,136,185, 31,145,144, 46,180,249,169,154,166, 83,220,190,125, 27,110,
- 54, 4, 81,209,145,176,211,100,194,219,202, 12, 1,193,173,241,244,233, 83,147, 44, 83, 70, 35,248,227, 39,253,185, 90,208,202,
-202, 10, 57, 57, 57,175,252, 79, 38,147, 65,169, 84, 34, 55, 55, 23,251,246,237, 3,107,218, 67,209,160,211,233,224,227,227,131,
-155, 55,111,226,244,233,211,232,208,161, 3,218,180,105,131,115,231,206, 33, 60, 60, 28,145,145,145, 32,132,192,214,214,182,216,
-218, 86,161,201,237,198,141,219, 97,102,102,100,198,176, 97, 99,252, 7, 13, 26,132, 95,127,221,141,225,195,188, 65, 40, 49, 8,
- 17,227,253,158, 62,152, 55, 63, 28,205,154,181,131,157,157, 16,167, 79,223,127,202,231, 91,110, 55, 65,184,252,184,100,201, 18,
-190, 68, 34,129, 78,167, 67,126,126, 62, 50, 50, 94,134,163, 42,207,130,165, 86,171, 43, 12,172,118,255,214,163,239,179,114,217,
- 44,170, 48,226,195,116,195,173,134, 29,186, 36,224,189,144, 97, 56,117,120, 11,206,156, 56, 13, 59,193,179,167,180, 52,255, 88,
-218,211,244, 60, 85,190,215, 6,191,160,207,120, 73, 5, 39,214,127,222,203,154,231,162, 96,194,166,175,205,201,174,170,188,153,
- 81, 59, 14, 29, 98,241,126,112,243,166,158, 13, 92,149,162,204,140, 84,236,255,237,216,125,253,179, 95, 15,227,229,180,160, 41,
-166,200,121,171, 86,173,250, 22, 0, 24,134,217,186, 98,197,138,207,190,250,234, 43,251,196,196,196, 18,129,149,154,158,121,166,
-101,143,241,116, 70,118,142,238,231, 21, 83,123, 75, 37, 98,209,204, 69, 63,159, 51,240,112,173,194,206,133,207, 31,242,245,218,
- 95,210,246,133,109,225,217, 75,132,184, 52,109, 54, 98,255, 56, 11, 61, 17,162,203,201,235,208,233,105,228,166,102,224,204,176,
-177,176, 86,216,224,104, 70, 12,157,147,151, 59,132,123,198,112,224,240,159,181, 78, 85,166, 69,210, 74, 9,162, 76, 0,113,161,
-161,161,233,165,172, 75,105, 0,110, 3,104, 84,180, 95, 90,153,255,165, 1,184, 9,160, 73, 41,158,180, 82, 66,171,244,103, 93,
-153,125,110,191,142, 5,171, 82,164,167,167,167,222, 8,191,135,203,167,214,193,104,208, 34, 39,243,101,236, 79, 85,138, 6, 22,
- 22, 22, 87, 43,121,224,191,146,109,155,101, 89, 86,161, 80,124,180, 98,229,202,107,163,134, 12,118,106,211,177, 35,158,223,189,
- 3,109,102, 58,120, 52, 13, 30, 17, 32, 63, 93,130,148,228, 92,132, 30, 58,150,170,214,104, 62, 42, 59,242, 46, 47,131,119,177,
-147, 59, 75, 8, 36,150, 22, 16,203,229, 16, 91, 90,252,105,177, 34, 4, 34, 51,115, 8,228,102,224, 9, 69, 85,150, 19, 0, 10,
- 11, 11, 63, 30, 57,114,228,157,163, 71,143, 90, 15, 24, 48, 0,239,191,255,126,100,118,118,118,251,204,204, 76,147,252,205,254,
-239,220,195,194,104,187, 6,239,247, 90,179,110,227,149,161, 67,135,218,188,223,107, 13, 34,163,238, 35,187,192, 1, 0,160,180,
-147,163,153,247, 20,164,102,104,113,226,216,225, 44,198,168,249,152,189,183,219, 80, 17, 39,203,178,172,157,157,221, 43, 86, 57,
- 30,143,135,115,231,206, 97,226,196,137,176, 51, 63,135,188,184, 88, 52,104,221, 22,239, 13, 26,130,225,195,135,131,199,227,193,
-214,214, 22,165, 31,186, 85,101, 68,207,201,201,129,187,187, 59, 78,110,244,174,175,211,164, 10, 3,108, 0, 2, 75,253,169, 51,
-221,239, 95,184,112, 33, 31,192, 70, 47, 47,175,176,170,234,147, 16,242,205,194,133, 11,215,181,106,213, 74,106,102,102, 6, 47,
- 47, 47, 92,190,124, 25,151, 47, 95,198,197,139, 47,253,227,108,109,109, 97, 99, 99,131,236,236,108,196,199,199,171, 9, 33,223,
- 84,210,150,152, 38, 77,154,124,112,234,212,129,235, 61,123,126,100,215,181,107, 11, 56, 57,229,193,104, 76, 7,161,132, 16, 75,
- 28,176,113,227, 34,164,166,100,226,202,213,171,153,249,249,252,143,195,195, 95, 77, 65, 84, 65, 57,245,199,143, 31,135, 68, 34,
-193,175,191,254,106,116,116,116,228, 91, 89, 89, 85,104,193,210,104, 52,226,138, 56, 63,155,122, 55, 17,192,252,201,125, 92,150,
- 93,185,159,242, 1,128,157,117,234,186,224,204,137,211,184,120,230,202,244,230,254,204,170, 30, 3,155,206,147,116,232, 59,197,
- 47,240, 51,158,153,133, 2,219,246,255,202,139,138,216,244,157,166,224,158, 7,128, 41, 85, 92, 35, 22, 0,242, 83, 83,102,132,
- 46, 95,189, 53,116,238,183,210,165, 63,172, 85,169,211,147,191,198,203,165,149,108,233,253, 42, 42,103,108,108,236, 6, 0, 37,
-225, 49,148, 74,229,142, 69,139, 22, 93, 24, 60,120,176,125,177,133, 50,245,254,111, 87, 1, 92,245,111,255,233,172,150, 77,234,
-123,127,247,195, 47, 39, 94,196,167,252,146, 29,245, 50, 6, 86,121,229,188,122,245,106, 86, 80, 80,208,200, 41,211,230,108,154,
- 59,111, 54,241,153, 52, 29,209,151,111, 66,171,214, 67,207,242, 96, 0, 65,196,130,229, 48,183,183,192, 37, 54,147,213,242,168,
- 17, 79,202, 56,249, 87,213, 62,107, 2,142,147,227,228, 56,223, 77,206, 42,112,179, 60,123,136, 9,251,221, 52,129,231, 47,129,
- 73, 2,203,217,217,185,205,123, 29,155,163,213,123, 99,160,215,102, 35,246,254,207,200,207, 75,129,179,147, 24,177, 47,114, 91,
- 0, 56,111,234, 1,147,146,146, 94, 40, 20,138,230,223,173, 92,181,191, 75,211, 38,190, 94,206, 10,177,149,187, 27,228, 14,142,
- 72, 79, 75,195,245,136,104,195,218, 19,103,238,169, 53, 26,147, 82,229, 48, 12,195,178, 44, 11,161, 80, 8,150,199,131,223,248,
-105,160, 40,170,204,106, 65, 2,139,160, 96, 80,124, 1, 12, 38,250, 12,169, 84,170, 4,103,103,231,143,199,143, 31,255,199,214,
-173, 91,169,118,237,218, 53, 62,116,232, 16,243, 58,149,157,126,247, 80,140, 99,131, 15,219,174,250,113,237,190,128,160,230,110,
-238,181,221,197,173,106, 89, 66,111,160,145,146,154,129,243, 87,162,180, 49, 81,183,227, 25,189,174, 79,106, 84,197, 81,220, 1,
-192, 96, 48,188, 80, 42,149,142,115,230,204,129,209,104, 4, 77,211, 48, 26,141, 72, 79, 79, 71,100,100, 36, 2,155,183,128,207,
-167,159, 33, 51, 51, 19,155, 55,111,134,139,139, 11,186,119,239,142,188,188, 60, 92,184,112,225, 69,197, 86, 7, 24,103,124, 51,
-144, 15, 0, 2, 1,140, 95,135,132,156,171, 95,191,126,240,251,141, 82,133, 99,198,191,180,108, 45, 94, 52, 80,120,238,220,185,
- 48,177, 88,188,225,233,211,167,149,198, 64,243,244,244, 20,105, 52,154,198, 44,203,242,115,115,115, 87,106,181,218,161,147, 39,
- 79, 86, 44, 89,178, 4, 13, 27, 54, 68,122,122, 58,108,108,108,160, 80, 40,144,159,159,143,167, 79,159,210,122,189,126, 61, 77,
-211,243, 82, 82, 82,210, 42,189,219,110,222,124, 22, 16, 16,208, 34, 37,121,221,254, 49,163, 59,123, 25, 12, 65, 34, 11,203,214,
- 96, 89, 35,178,179,226, 65,216, 59,250, 3, 7,255,120,146,157,205,251, 40, 60, 60, 60,198,148,107, 68, 81,212,232,223,127,255,
- 29,197,169,114, 84, 42, 85, 44, 69, 81, 21, 90,176, 76,193,242,176, 4, 13,128, 93,203,190,104, 49, 41, 39,237, 78, 61, 59,193,
-179,167,205,253,153, 85,203,195, 18, 52,139, 71, 89, 47, 72, 76, 59, 23,173,202, 63,177, 97,219,254, 95,121, 67, 62,252,152, 86,
-152,197, 76,183,171,133,176,246,239, 87, 57,218, 99, 27, 53,106,228, 74, 81,153,181, 83, 51, 30,133, 15, 31, 49,170,175,165, 80,
-125,180,161,115,122, 93,163,163,159, 36, 42, 42, 42,174,104, 55,182, 58,237, 84,165, 82, 69, 43,149,202, 54,223,127,255,253,137,
-178,166,241,212,244,204, 51, 45, 66,198,177,217,217, 57,183, 82,163,126,187, 91, 21, 87,120,120,248,207, 65, 65, 65,248,100,240,
-240,159, 70,124, 58,146,231, 63, 97, 42, 18,206,254, 1, 24, 13, 72,186,120, 30, 50,115, 26,135,211,227,232, 66, 30, 53, 50, 60,
- 60,156,139,226,206,129, 3,135,127, 13,136,169,125,175,167,135,203, 9,143,218,206,157, 61,106, 43, 1, 0,177,207, 84,136,125,
-150,120,242, 73,108, 66,151,154, 40,220,210,201,158, 73, 81, 40, 6,214,132,100,207,101, 57,253,253,253, 35, 41,138, 82, 86,231,
-164,105,154, 78,184,127,255,126,144, 41,229, 84, 42,149, 3,106,213,170,181, 72,165, 82,237,143,143,143,255,226, 77,168,251,226,
-100,207, 20, 79, 24,194,178,108, 67, 0,132, 80, 84,149,201,158, 75,115, 58, 59, 59, 55,144, 74,165, 27,248,124,190,107,177, 73,
-181,184,202,244,122, 61, 47, 39, 39, 71,162,211,233,120, 0,136, 80, 40, 52,154,153,153,105, 4, 2,129,145,166,233, 23, 6,131,
- 97, 84, 98, 98,226, 93, 83, 71, 33,126,126,126,242,144,160, 7,249,197, 41,116,102,124, 51, 16,161, 91, 88, 98,202,185, 63,126,
-252,184,158,181,181,117, 63, 66, 72,111,150,101,189,243,242,242,180,223,126,251,237,173,243,231,207,231,186,186,186,118,109,221,
-186, 53,185,115,231, 14,226,226,226,216,252,252,252,125, 20, 69,125,147,144,144, 16, 91,205,182, 68,181,108,217,184,191,185, 25,
-122, 48, 44, 26, 1, 44, 33,132,220,205,207, 39, 71, 21,138,218,191,132,133,133,209, 53, 29,129, 5, 6, 6, 30,201,207,207,239,
- 30, 19, 19, 83,209,185,130,101,255,172,139,202, 56,151,125,211,224,155, 22,109,131, 63,190,124,254,226,129,169,223,221,155, 95,
-122,219,184, 15,109,134, 15,252,124,226,146,157,107,126,152,186,250, 64,230,207,166,148, 51, 48, 48,176, 14,128,254, 44,203,214,
- 39,132,120, 49, 12, 36,132,176,153,132,144, 40,134, 97,110, 51, 12,243,251,157, 59,119, 84,239,194,136,182,116,178,103, 66,211,
- 86, 52, 33, 38, 37,123,230, 44, 4, 28, 39,199,201, 89,176,254,169, 48, 57, 2,119,177,144,242,242,242, 98, 31, 63,126,252,202,
- 67,165, 38, 40, 18, 80,187, 81, 73,148,118, 83,112,239,222,189,128,191,178,130, 84, 42,213, 46, 0,187,222, 36,103,145,128,250,
-185,232, 85, 35, 20, 9,164,102,127, 71, 35,137,138,138, 42,152, 53,130,148, 88,182,248,124, 24, 77,253,111,231,206,157,159,235,
-245,250,211, 0, 18, 0, 88, 1,200, 52, 24, 12,199,211,210,210, 82,156,156,156,130,158, 63,127, 62,171,200, 18, 57, 63, 57, 57,
- 57,188,134,109,137, 1,176,179,232,245, 70, 17, 17, 17,209, 67,169, 84, 70,218,218,218,122,106, 52, 26,145, 70,163, 17,148,110,
-251, 82,169, 52,205, 84, 46, 75, 11,108,227,145, 12, 91,107, 11,242,127,150, 26, 59,103,252,170, 46,184, 87,207,206, 25,191, 86,
-163,108, 79, 27, 55,110,188,131,162,168,218, 12,195, 56, 2,176, 96, 89,164,179, 44,155, 78,211,116,194,221,187,119, 85,239, 74,
- 71, 83, 36,160, 66,192,129, 3, 7, 14,156,192, 42, 31, 49, 49, 49,132,171,182,255, 30,230,111,100, 5, 53,249, 95, 92, 92,156,
- 22,192,149,162,215, 43, 40, 18, 84, 61,223,245,115, 87,169, 84,111, 68,196, 23,249,100,125,209,180,227,255,111, 43, 10,205, 48,
-181,195,251,213,227,188,117,235,214, 11, 0, 47,184, 22,202,129, 3, 7, 14,239, 22, 40,174, 10, 56,112,224,192,129, 3, 7, 14,
- 28,222, 44, 8,128,114, 67, 92, 87,103,110,149, 16,226, 95,221, 3, 87,197,207,113,114,156, 28, 39,199,201,113,114,156, 28,231,
-191,143,179, 42,238,127,139,111, 23,169,230, 2,163,234,145,115, 14,128, 28, 39,199,201,113,114,156, 28, 39,199,201,113,254, 7,
-193, 77, 17,114,224,192,129, 3, 7, 14, 28, 56,188, 97, 84,232,228,238,225, 81,203,143,162,153, 86, 44, 75,241, 88,138, 53,144,
- 92,245,158, 39,101,130,108,186,186,186, 90, 9, 40,244, 36, 44, 43, 39,132,161, 25, 30,117, 57, 54, 54, 62,202,148, 3,251,249,
-249, 9, 1, 12, 21, 8, 4,193,122,189, 94, 33, 16, 8,146, 52, 26,205, 37,129, 64,176, 53, 42, 42, 74,255, 46, 85, 82,112,112,
-112,255,125,251,246, 89,133,132,132,104,245,122,189, 81, 40, 20,242,119,239,222, 45, 30, 54,108, 88,246,165, 75,151,106,180, 10,
- 50, 32, 32,160,253,226,197,139,235,116,236,216, 17,193,193,193, 5,221,186,117, 19, 6, 5, 5, 9,167, 77,155,246, 52, 50, 50,
-242,108,117,184, 28, 29, 29,253,248,124,254,118, 66, 8,143,101,217, 79,138, 67, 48,252, 21, 32,132, 12, 0,208, 7,128, 2, 64,
- 50,128,189, 44,203,238,170, 33, 87, 87,188,116,114,111, 88,244,211, 29, 0,191,179, 44,123,252, 53,202,215, 21, 64, 79, 66, 72,
- 35, 0, 96, 89,246,246, 27,228,108, 88,196,249,198,202,249,186,231, 30, 24, 24,248,173, 72, 36, 26, 1, 0, 58,157,238,103, 51,
- 51,179,208,242,246, 59,127,254,188,174,162,208, 39,126,117, 8, 27,245,187,207,203,207, 61, 31, 2, 0,170,252,254,180,134,171,
-136, 31,248,178,229,241,194,247, 65,141, 23,207, 40,149,202,177,221,187,119,159,118,252,248,241,239, 18, 18, 18,126, 2, 7, 14,
- 28, 56,188,171, 2,203,195,163,150, 95,239, 15, 62, 90, 56,122,212, 24,194,227, 81,120,240,240, 33,255,243, 9, 95,116,246,245,
-245,117,150,107, 52,190, 44,192,168,165,210,123, 60, 30,149,184,110,205,143,230,222,245,234,209, 52,205, 96,253,134,117,221, 60,
- 60,106,125, 93,149,200,114,112,112,168,163, 80, 40, 86, 78,152, 48,193,161,115,231,206,148,163,163, 35, 18, 18, 18, 44, 14, 28,
- 56, 80,119,243,230,205, 33, 14, 14, 14,147, 82, 83, 83,159,214,228,132, 20, 10, 69,107,133, 53,186, 74,197,108,123,228, 18,168,
-141,228,108,146,142, 61,158,148,148,116,177,166,149,164,211,233,198, 23, 22, 22, 54,247,243,243, 99,214,173, 91, 71, 70,142, 28,
-201, 18, 66, 40,181, 90,189, 5, 53, 12, 51, 33,149, 74,215,116,236,216,209, 43, 56, 56, 56,246,242,229,203, 61, 0, 28,233,211,
-167,143,135, 84, 42,141, 1,224, 93, 29, 46, 30,143,183, 37, 42, 42,170,145, 90,173, 70, 80, 80,208,102, 0,129,127,145,184,218,
-108,109,109,109, 88,187,118,237,134,198,141, 27,123,102,101,101, 21,140, 26, 53,170, 19, 33,164, 3,203,178,159, 86,131, 71, 14,
- 96,149, 76, 38,227, 77,154, 52,233,216,135, 31,126,120, 91, 46,151,155, 61,122,244, 72, 48,113,226,196, 79, 8, 33,189, 1, 76,
- 96, 89,182,160,186,156,182,182,182,210, 5, 11, 22, 68,180,108,217, 50, 85, 34,145, 72,159, 62,125, 74, 38, 77,154, 52,242, 53,
- 57,133,243,230,205,187,220,174, 93,187, 88,177, 88, 44,123,241,226, 5,239,171,175,190, 26,254, 58,156, 86, 86, 86,162,111,191,
-253,246,106,219,182,109,227, 36, 18,137, 60, 54, 54,150,154, 60,121,242,103,213,225,108,219,182,109,127,138,162,230, 94,184,112,
- 1, 0,208,162, 69,139,111,117, 58,221,204,178,251,177, 44,139,224,224, 96, 77,219,182,109, 71,156, 63,127,190,220,246,186, 53,
-124, 74,127, 0,248,106, 86,241,247,151,239,229,125, 31, 26,180,180,218,109,222,175,206,203,252, 98,159,127,181,118,240,203,247,
-151,191,175, 43,186, 43,215,244, 36,108,117, 68,155,179,179,243,168,166, 77,155,206,184,126,253,250,182,160,160,160,137, 63,253,
-244,147, 32, 36, 36,100,129, 82,169,244,236,218,181,107,239,171, 87,175, 46,125,248,240,225, 26,174,139,231,192,129,195, 59, 37,
-176, 40,154,105, 53,122,212, 24,210,111, 64,255,228,164,148, 84,198,204,220,114,192,222,176, 48, 89,189,122,245, 40,205,170, 85,
- 48,166,167,131,254,242,203,150,231,207,159, 55,140,155,244,165, 90,171, 41,220,162,112,116,144,237,217,181,219,105,255,175,251,
- 90, 1,136,170,204,114,165, 80, 40, 86,254,250,235,175, 78,117,234,212,129, 78,167, 67, 90, 90, 26,244,122, 61, 62,252,240, 67,
- 94,243,230,205,157,134, 15, 31,190,210,207,207,239,163,234, 88,178,236,237,237, 29,189, 93, 5, 71,231,124,209,181, 94,251, 54,
- 65, 82, 39,231,218, 64, 2,131,196,216,152, 38,127, 92,139,152,208,166,174,115,244,163, 28,125,247,180,180,180,148,234, 86, 82,
- 70, 70,198,180, 81,163, 70,237,107,216,176,161,189, 88, 44,134,163,163, 35,249,236,179,207, 82,146,146,146,230,213,180,226,139,
-163,131, 83, 20, 69,151,121,175, 9,157,139,165,165, 37, 44, 44, 44, 0,192,249,117, 26, 68,159, 62,125,120, 47, 94,188, 24,193,
- 48,140,111,233,223,147,146,146, 60,236,237,237,211,159, 61,139,107,164,209,233,155,141,253,106,238,130,126, 61,219, 91, 92,189,
-122,149,234,209,163,135,128, 16, 50,160, 26,150,172, 85,222,222,222,119,151, 44, 89,162,123, 16,243,212,255,228,185,171,148,131,
-141,156,169,227,238,110,118,255,254,125, 97,104,104,104, 90,104,104,232, 42, 0,195,171, 81,244, 85,239,189,247, 94,252,140, 25,
- 51,120, 15,162,159,120, 92,188,122, 11, 22,102, 34,218,213, 69, 41,185,122,245, 42,127,221,186,117,248,250,235,175,171,205,217,
-190,125,251,152,249,243,231,179,201,169,153,117,159, 62, 75,130,185,153,200,104,107,107, 43, 61,119,238, 28,217,186,117,171,110,
-226,196,137,213,230,108,217,178,229,147,217,179,103,147,135,143,159,214,189,116,245, 22,204,228, 66,163,187,171,139,228,198,141,
- 27,228,199, 31,127, 52,124,251,237,183, 38,113,178, 44,187,126,233,210,165,248,237,183,223, 0, 0,187,118,237,130,135,135,199,
- 43, 13, 72,173,209,128, 16,130,184,103,207,100,163, 71,143, 94, 95,222,128, 32,234,119, 31,108, 13, 7,134, 14, 29,106, 90,242,
-246, 7, 75,171,109,181, 42, 22, 86, 99,198,140, 73,168, 96,175,193,126,117, 76, 23, 89,173, 90,181,154,182,103,207, 30,187,176,
-176,176,175, 14, 28, 56, 0, 0,144,201,100,178,213,171, 87,143,237,213,171, 23, 62,253,244,211,105, 0, 56,129,197,129, 3,135,
-119, 75, 96,177, 44,197,227,241, 40,164,166,164, 27,222,235,212,121,248,234,181,107,197, 34,145, 8, 58,157, 14, 5,103,206,128,
-213,106, 97, 41,149,162,123,247,238, 2,127,127,127,139,145,195,135,127,150,154,146,188,129,199,163,156, 88,150,226, 85,113,204,
-161, 19, 38, 76,112,168, 83,167,206, 43, 9,132,105,154, 70, 74, 74, 10,204,205,205,209,183,111, 95,187, 29, 59,118, 12, 5, 96,
-146,185,223,209,209,209,221,219,195,225, 74,216,166,175,156, 28,172, 8,144,246, 43,240, 60, 6,216, 41,129,151,131, 27,188, 58,
-180,145,246,108,230,223,168,255,146,173,183, 28, 29, 29, 91,166,164,164,196, 85,167,146,158, 61,123,118, 73,169, 84,142,208,104,
- 52, 7, 1, 80,151, 47, 95,102, 95,188,120, 49, 58, 57, 57,249,121, 77, 43,158,166,105,100,103,103,131, 97, 24, 30,128,146,119,
-218,196, 84, 62,127, 5,250,244,233,195,139,143,143, 31,229,235,235, 91,119,227,198,141, 72, 77, 77,133, 68, 34, 1,195, 48,104,
-209,162,133,107,167, 78,157,158,164,101,230, 88, 27,141,180, 62,225,249,179,160, 69, 75,111,165, 53,242,243,190, 20, 22, 22,214,
-216,206,206,174, 47, 76, 8,200, 74, 8,233,106,110,110,206,255,238,187,239,212, 78, 46, 30,253, 20,174, 94,130, 43, 55,239, 70,
- 11,101, 34, 54, 35, 39, 47,239,214,173, 91,209,115,231,206,109,115,244,232,209, 84, 66, 72, 87, 83,166,204, 8, 33, 93,109,109,
-109,165,211,167, 79, 39,150,182,202,247,130,219,184, 10, 34,238, 68, 61, 17,201, 68, 76,112,112,112,207, 43, 87,174,108,158, 60,
-121,114,227, 35, 71,142,228, 86,135,211,198,198, 70, 48,111,222, 60,218, 81,233,214,203,181,118, 93,129,179,147,157, 31, 0, 60,
-138,126,188, 41, 37, 37,229,201,232,209,163,155, 29, 59,118, 44,175, 58,156,150,150,150,194,111,191,253,150,245,245,111, 60,188,
-126,195, 64,234,247,147, 23,174, 74,229, 34, 58,183, 64,157, 31, 21, 21,245,100,234,212,169, 77,143, 28, 57, 98, 18,103, 97, 97,
-161,185,139,139, 11,156,156,156,192,168,213,200,205,205,197,254,253,251,145,151,151, 7,154,166, 33,149, 74,241,195,241, 76,104,
- 30,255,142, 13, 43,231, 65,173, 86,155,191,137,118,226,215,243, 33,162, 76,181, 47, 63,240,101,215, 93, 28, 55,184, 18, 97,133,
- 82,194,107, 48, 30,248,178,149, 77, 23,150,178, 92, 37,132,133,133, 57,120,122,122,162, 93,187,151, 9,220,135, 15, 31,142, 78,
-157, 58,225,183,223,126,195,201,147, 39, 95,124,248,225,135, 79, 35, 34, 34,150,198,199,199,175,231,186,122, 14, 28, 56,252,221,
- 40,215, 92,194, 18, 82,112,255,193, 3,129,153,149,213,224,213,107,215,138, 5, 2, 1,226,226,226, 16, 21, 21,133,194, 51,103,
-160,190,114, 5,169,169,169,200,203,203,131,189,189, 61, 66,151, 46,149, 11,165,242,225, 49,143, 31,243, 88,138, 53,148, 26, 97,
-255,223, 10, 3,145, 72, 20,220,189,123,119,170,162,213,139,201,201,201,232,220,185, 51,159,207,231, 7, 87, 48,106, 47,155,156,
-151, 40,237,201,239,123,127,154,228,228,192,191, 11, 60,158, 8,100, 95, 4,140,217,128, 58, 31,120,118, 23, 56,240, 61, 92, 50,
- 31,147,157, 19,250, 56, 58, 75,133,191,147,210, 25,146, 81,245,146, 80, 23, 23, 23, 15, 79, 79,207,141, 31,127,252, 49, 5, 0,
-193,193,193,196,211,211,115,131,139,139,139, 71, 37,214,133, 74, 57, 53, 26,205,181,172,172, 44,210,163, 71, 15,219,150, 45, 91,
-158,234,209,163,135, 45, 0,162,209,104,174,213,148,179, 8,182, 29, 58,116,200,240,240,240,216,229,238,238, 46, 54,193, 10, 82,
-194,249,226,197,139, 17, 62, 62, 62,117, 55,110,220,200,227,241,120,248,233,167,159,176,119,239, 94, 92,184,112, 1,105,105,105,
-178,201,147, 39, 91, 29, 58, 19,121,250,212,197,219,135, 39,141, 25,197,188, 23,216, 88, 33, 78, 79,206,176,181,181,237, 6,192,
-201,196,114,246, 28, 63,126,252,209,200,168,103, 78,132, 39, 22, 11,133, 66,137,147,163,157,131,194,193,209, 93,225,224, 88,207,
- 92, 38,179, 46, 40, 40,120,113,240,224, 65, 22,165,130,144, 86,197, 57,119,238,220, 27, 81, 49, 47, 28, 88, 74, 40, 18, 10, 5,
- 66, 59,107, 43,155,222,239,119,238, 9, 0, 50,177, 88, 86, 80, 80,144,180, 99,199,142,106,113,206,158, 61,251, 98, 98, 74,182,
- 19, 95, 32, 20, 75,196,226,146, 44,225, 54,214,150,206,102,114,185, 76,167,211,197,111,220,184,209, 88, 29,206,153, 51,103, 94,
-126,240,248,133, 35, 69,241,120, 20, 69,248,246,182,214,118,182,182,182, 10, 91,107, 27,103,169, 72, 36,207,207,207, 79,216,181,
-107, 23,109, 42,103, 74, 74, 10, 30, 62,124,136, 90, 77,154,224,244,233,211,168, 85,171, 22,250,244,233,131,126,253,250, 65, 42,
-149,162,169,213, 19,124,216,181, 37,158, 60,121, 82,225,117, 47,246,135,170, 12, 74,165,242,124,117,218, 18,240,114, 90,176, 50,
-113, 85,150,179,188,253,202,114,182,106,213,106,218,254,253,251,237, 86,172, 88,209,248,139, 47,190,136,221,191,127, 63, 26, 54,
-108,136, 7, 15, 30,192,217,217, 25,187,119,239,198,184,113,227, 98,231,204,153,211,120,239,222,189,142,254,254,254,211,107,120,
- 31, 85, 11, 28, 39,199,201,113,114, 48,201,130,101, 96,240,251,248,137,147,123,254,186,127,191, 76, 36, 18,225,217,179,103, 72,
- 73, 73,193,209,195,135,233,163, 13, 26, 20,242,120, 60,246,163, 95,127, 53,239,211,175, 31, 17, 10,133,168, 91,183, 46,186,119,
-239, 46,253,108,228,152, 84,126,129,122, 79, 21, 23,197,193,222,222, 30,211,167, 79, 71,104,232,171,254,184, 67,135, 14,197,202,
-149, 43, 97,110,110, 14, 66,136,131, 41, 39,160, 80, 40,250, 12,255,170,125, 45, 11, 55,139, 20, 54,114,139,128,128,178, 1, 95,
- 6, 80, 34, 64,102, 6, 48, 52, 96,208, 65, 27,126, 37,147,109,183, 58,183, 75, 64,129,115,178,110, 87, 31, 0,123, 77,173, 36,
- 59, 59,187,153, 97, 97, 97,246, 83,167, 78,101,243,242,242, 72,106,106, 42, 59,117,234, 84,251,153, 51,103,206, 4, 48,180, 38,
- 21,175, 82,169, 22, 12, 31, 62,188,203,207, 63,255,236,244,241,199, 31, 91, 21,141,192,147, 85, 42,213,130,215,185,160, 2,129,
-128,119,230,204, 25,155,245,235,215,247, 95,176, 96, 65,253,142, 29, 59, 58,101,103,103,199, 37, 37, 37,245,174,202,226,198, 48,
-140,239,198,141, 27,193,227,189, 52, 66,242,120, 60,136, 68, 34, 72, 36, 18, 88, 90, 90,102, 63,125,250,212,232,110, 43,228,191,
-120,145, 92,232,166,116, 49,183,108,228,231,232,224,226,250, 81, 65, 65, 65, 4, 76,207, 10,208,176,107,215,174,151, 15,157,189,
-131,177,159,118,170,199, 39, 58,190, 68, 34,172, 39, 19, 10,136,128, 98, 89,198,200,210,155,247, 92,254,205,205,205,205,151, 16,
- 98,210,116, 39, 33,164, 81,235,214,173, 19, 79, 95,139,162,174,223,138,137,117,180,145, 91,125,216, 45,184,121,201, 1, 3, 2,
-250,149,218,215,212,212, 54, 13,219,181,107,247,240,113, 66, 6,229,170,180,123,197, 39,206,222,222,190, 11, 0, 20,230,231,110,
- 85, 40, 20,222, 98,177,216,212, 92,152, 13, 59,116,232, 16,115,250,218,125,202,201,222,170,184,125,191, 50,144, 72, 79, 73,218,
-225,230,230, 86,143, 16,226,100, 10,225,193,131, 7,113,235,214, 45,204,243,243,195, 84, 55, 55,216,219,219,227,204,153, 51, 96,
- 89, 22,114,185, 28,217,217,217, 8, 11, 11, 43,177,242,188, 14,148, 74,229,121,149, 74,213,182,196, 49,253, 13,160,152,211, 84,
-235,216,165, 75,151,246,135,133,133,141,245,244,244,196,176, 97,195, 60,182,108,217, 18,235,237,237,237, 17, 28, 28,140, 75,151,
- 46, 97,234,212,169,177,115,230,204,241, 24, 58,116, 40,182,110,221,138,219,183,111,111,227,186,121, 14, 28, 56,188, 53,129, 69,
- 8, 97, 89,150, 37,197,239, 47, 94,188,200,246,245,245,117,246,244,244,164,116, 58, 29,114,114,114,112,226,216, 49,122,247,222,
-189, 71,116, 58,221, 4,138,162,132, 91,183,111, 95,239,224,232,216,190,119,159, 62,196, 96, 48,160, 99,199,142,162, 51,103,206,
-216,222,121,241, 34,175,178, 3,242,120,188, 18,235,209,216,177, 99,177,114,229, 74, 0,192,144, 33, 67,254, 20,120, 6, 3,202,
- 24,153, 42,132,204,146, 14,105,219,169,190,121,188,252, 71,115, 77,203,220,188, 58,209,206, 87,204,242,228, 77,193,151,240, 33,
- 51, 3, 99,132, 49, 38,191,121, 68,236,243,218,190,146,163,169,181, 91,121, 55,197,222,171, 7, 66,170, 35,176,164, 82,105, 83,
-185, 92,142, 7, 15, 30,100, 6, 5, 5,101, 91, 88, 88, 88,122,121,121,217, 73,165,210,166, 53,173,248,148,148,148,103,206,206,
-206,109, 63,250,232,163,207, 41,138,234,196, 48,204,233,140,140,140, 53, 41, 41, 41,207, 76,249,191,179,179,243, 24,150,101,103,
- 3,216, 87,252,155, 94,175, 7, 69, 81, 96, 89, 22, 61,123,246,196,162, 69,139,252, 78,159, 62,141, 11, 23, 46,216, 12, 28, 56,
-240,154, 82,169,204, 38,132,124,154,152,152, 88,161,149, 44, 35, 35, 3,235,214,173, 3,143,199,131,149,149, 21,204,205,205, 33,
-145, 72,208,174, 93,187,148, 37, 75,150,120,133,133,133, 25, 50,234,166,178,162,252,156, 2, 91,169,151,146,178,179,175,243,249,
-200, 81,215, 1,132,153,122,238,102,102,102,230,230, 60,117, 62,143,213,240, 86,172,218,192,151,241, 41,200, 5, 66, 72,168,124,
- 50,227,219,249,172,132,240,100,168,102, 26, 39,161, 80, 40,179, 20, 65, 39,148, 9,104, 51,153,232,141,164,115,146, 74,165,114,
- 51, 33,116, 21,109, 23, 81,124, 17, 0, 9, 33,164,208, 84, 78,137, 68, 98,102, 33, 98,181, 21,109, 55, 23, 8,133,132, 16, 9,
-128,114,157,220,251,116, 34,108,216,202, 98,129, 35, 41,249,157,166,105, 52,105,210, 4,123,127, 59,141, 19, 23,239, 35, 51, 33,
- 10,131,251,116,131,187,187, 59, 24,134,169,180, 76,197, 62, 88, 38, 12, 10, 94, 10,162, 83,150, 85,239, 92,228,119, 85,213,212,
- 96,105,206,151,226,170, 98, 31, 44, 23, 23,151,145,141, 27, 55, 30,114,224,192, 1,180,111,223, 30, 33, 33, 33,240,246,246,246,
- 24, 56,112, 32, 0,160, 77,155, 54, 8, 13, 13,245,232,223,191, 63, 14, 30, 60,136,163, 71,143, 34, 40, 40,104,162, 82,169, 76,
- 85,169, 84,107,185,238,158, 3,135,119, 27,101,181,200,191,210,130, 5, 0, 98,189,222, 91,179,110, 29, 10, 79,159,134,232,212,
- 41, 28,105,212, 40,223,104, 52,126,169, 82,169,226, 1,192,209,209,113, 82,216,190,125,151, 59,159, 61,107,161,123,240, 0,181,
-238,221, 3,191, 94,189,198,166, 30,184,216,122,165,215,191,244, 99,223,182,109, 27,114,115,115,145,147,147, 3,163,209,228, 92,
-194, 16, 8, 72, 43, 7, 59, 87, 36, 33, 6, 12,159,111,254,204, 79,215, 82,174,182, 72,172,245,204, 46, 63, 71,208,136, 68,167,
- 54, 50,215,228, 25,154, 81, 66, 29,116,217, 26, 40,109,157,193,167,248,173,170, 83, 73,197, 22, 29,169, 84,154, 25, 17, 17,241,
-126,235,214,173, 15, 1,176, 43,254,189,166, 72, 76, 76,124, 12, 96, 98, 77,254, 75, 81,212,236,115,231,206, 57,132,133,133,141,
- 91,189,122, 53, 11, 0, 58,157,174,196, 73, 94,167,211,129,207,231,131, 97, 24,200,229,114,240,249,124,199, 3, 7, 14, 56,246,
-234,213,107, 13,128, 10,175,147, 76, 38,131,163,163, 35, 4, 2, 1, 44, 45, 45, 81,144,155, 37, 95,183,112,102, 59,153,181,163,
-205,196,137, 95, 82, 67,135, 14,189,191,122,245,106, 23,165,103,221,250, 15, 31, 62,124, 49, 96,216,240,203,187,119,239,206,175,
-134,131,251,157,216,216, 88, 81,125,223,186,146, 35,251,242, 25, 25,159,133, 44,253, 59,200,164, 10,136, 68, 46,144,137,197, 16,
-138, 68,118, 73,201,201, 41, 44,203, 62, 49,133,144,101,217,219, 79,159, 62,229,213,118,117, 18,229, 21, 26,243,100, 60,218,252,
-113,228,157,232,186, 1, 13,235, 1,128,230,193,157,115,226,218,158,162,164,172, 28,177, 82,169,140,170, 70, 57,133,142,142,142,
-162,251, 15, 30,111,180,179,177,112,117,116,116,120, 15, 0, 12,234,194,251, 68,167, 81,241,248,124, 69,102, 86, 86,154, 70,163,
-121,108, 42,103,116,116, 52,223,211,221, 69,188,255,240,169,159, 29, 44,204,106,217, 73,197,142, 22,114,161,153,136,166, 11, 68,
- 12,173, 18,138,197, 78,170,228,228,116,150,101,163, 43, 34, 89,119,113,220,224,151,159, 54,239, 40, 58,255, 98,235, 14,174,196,
-178,176,182, 87, 34, 35,254, 17,206,252,126, 16, 67,198,142, 51,233,126, 90, 54,127,216,238,101,243,135, 85, 24,158,161,140, 32,
-130,234,117,211, 72, 63,240, 61,255,255,156,149,119,168, 93,187,118,253,230,167,159,126,146,149, 80, 60,120,128,224,224,151, 6,
-192,185,115,231,162, 75,151, 46,240,242,242, 66, 84, 84, 20,220,220,220,176,127,255,126,240,120, 60,193,200,145, 35,167, 1,224,
- 4, 22, 7, 14, 28,254, 86, 84,184,100,141, 97, 89,134,206,202, 2,171,211, 21, 91, 8, 88,150,101,101,127, 10, 27,129,204,202,
-202,138, 8,156,157, 65, 36,146, 98,249,249,218, 30,218,124, 62,191, 90, 2,139,166,193, 3, 49,128, 5, 11,128, 2, 1,133, 66,
-169, 8,115, 28, 67,200, 12,197, 52, 94,154,204,154, 16, 30, 5, 66, 17,128, 0,172,129, 1,205,210,213, 85, 70,108,126,126, 62,
-180, 90,173,181,167,167,231, 17,141, 70, 99, 93,244, 96, 99,223,214,133,163,105, 58,150,162, 40,124,242,201, 39,192,203,148, 71,
-208,233,116,136,142,142,134, 70,163,129, 78,167, 67, 84, 84, 20,114,115,115,161,211,233, 16, 30, 30, 14, 55, 55, 55,240,249,124,
- 69,101,188, 70,163, 17,246,246,246, 80, 40, 20,208, 22,228,202,127,253,105,101,143, 37,115,103,216, 13,240,100,169,205,171,190,
-103,234,213,171,151, 93,191,126,125, 59,169, 84,154,213,176, 97,195,140,221,187,119, 31,168, 78,136, 6, 0,191,207,152, 49,163,
- 89,187,118,237,188,172,204,165, 6,185, 4,144,241, 10, 32, 98,213, 16, 24, 83,224, 85,167, 46, 67,100, 50,239,254,253,251,107,
- 1,252,110, 42,231,228,201,147, 61,253,253,253, 21,214, 22,226, 2,169,144, 36, 75,120,116, 82,118,212,157,107, 0, 32,182,178,
- 81, 67, 44,245, 31, 50,100,136,186, 58,156, 83,167, 78,245,173, 93,187,182,147,144,207, 22, 18,218,248,167,164,208,106, 82,120,
- 2, 97, 33,132,194,128,137, 19, 39,234,171,195,249,213, 87, 95,249, 52,106,212,200,209,222, 82, 82, 32, 21, 64, 37,229,209, 42,
-129, 78, 27, 47, 52,234, 82, 36,214,214,133,144,202, 26, 15, 30, 60, 88, 87, 17,103,177,245,170,172,101,136,207,231, 67,165, 82,
- 33,243,217, 21,100, 62,187,139,122, 84, 30,154, 57,218,195,204,204,172,234,251,201,247, 1,137,122,202,146,168,167, 44,129,239,
- 3, 82,222,247,114, 68, 86,165,109,191, 82,191,174, 7,190,231,107,194,121,244,232,209,197,189,122,245, 50,244,235,215, 15,167,
- 78,157, 2, 33, 4,151, 46, 93, 66, 98, 98, 34,186,116,233, 2,150,101,113,235,214, 45,232,245,122, 60,120,240, 0,189,123,247,
- 70, 72, 72, 72,225,241,227,199,191,227,186,122, 14, 28, 56,188, 45,129,213,142, 16,194, 2, 40,113,212, 48,136,197,247,153,241,
-227, 97,249,219,111, 16,196,196,160,247, 71, 31, 89,136,197,226, 85, 10,133, 34, 80,169, 84,182,146, 74,165,107, 38, 79,158,108,
-110, 27, 26, 10,229,133, 11, 72, 58,117, 10, 6,129,224,102,117, 14,174, 86,171,139,173, 49,208, 21, 9, 57, 43, 43, 43, 48, 12,
- 3, 83,181, 11, 75,227,106, 82, 90, 12, 68,112, 7, 11,228, 29,203,235,112,117, 64,236, 60,199,211,121,245,234,197,228, 10, 60,
-151, 56, 52,179,219, 88,187,229, 77, 53, 17,228, 11, 45, 68, 80,169, 84, 96,193, 92,173, 78, 57, 53, 26, 77, 78, 65, 65, 1,241,
-244,244,180,139,136,136,240,172, 91,183,174, 45, 0,162,213,106,111,188, 78,229, 43,149,202, 22, 1, 1, 1,123, 3, 3, 3,159,
- 6, 4, 4,236, 85, 42,149, 45,170,241,247,205,145,145,145,224,241,120, 24, 57,114, 36,242,242,242,160,211,233, 16, 31, 31,143,
- 23, 47, 94, 64,167,211,225,254,253,251,120,248,240, 33,116, 58, 29,110,221,186, 5,173, 86,107,138,112,131,185,185, 57,178, 51,
- 82,229,123,214,125,223,227,187,185,179,164, 57,143, 35,144,160, 74, 1, 67,171, 85,179,102,205,138,245,244,244,188,164,213,106,
-125,140, 70, 99,119,150,101,247, 84,195,252, 75, 1,184,229,237,237,221,110,217,178,101,173,230, 45,222, 46,178, 52,203,133,216,
-202, 6, 34,107, 25, 68,110, 65, 24, 50,101, 57,127,195,134,181,119, 46, 93,186,148,102,226,202, 60, 10,192,173, 38, 77,154,180,
- 74, 78, 78,110, 27, 16, 16, 16,228, 92,187,182, 92,238,164,200, 18, 59, 41,211, 25,173,230, 26,156,156,219,108,219,182,237,198,
-217,179,103,147,170,195,233,230,230,214,102,237,218,181,205,220,221,221,155,201, 44, 44,204, 52,121,121, 59,140,133,133, 97, 60,
- 51, 51, 17,164,242,206,199,143, 31,191,180,123,247,238,228,234,112,250,250,250,182, 14, 13, 13,109, 18, 24, 24,216,204,197,195,
-195, 76,234,224,148, 33, 87,186,164, 74,189,252,132,112,114,233,180,109,219,182, 43,231,206,157, 75, 50, 53,224, 40, 69, 81,224,
-243,249, 48, 51, 51,195,249,243,231, 17,210,218, 27, 10, 42, 19, 13,221, 21,232, 54,236, 83,156, 60,121, 18, 2,129, 0,175,107,
-109, 45, 11, 83, 4, 81,117,197, 87, 85,156, 42,149,106,109,120,120,248, 15,125,251,246, 69,167, 78,157,112,251,246,109, 76,157,
- 58, 53,246,220,185,115, 0,128,219,183,111, 99,193,130, 5,177, 87,175, 94,197,176, 97,195, 16, 28, 28,140, 91,183,110,109,227,
-130,143,114,224,240,143,193,255,105,145,127,188,192, 98, 89,246,124,233,119, 79, 27, 27,115,141,166, 48,225,252,249,243,122,138,
-162, 32,149, 74,209,167, 95, 63,106,225,119,223,181,254,160, 81,163, 51,131, 90,182, 60,182,103,207,158,128,128,128,128,146, 78,
-254,208,161, 67,234,156,156,236, 12, 87, 87, 87, 43, 83, 15,158,158,158, 14,224,229, 20, 92, 65, 65, 1, 88,150, 45, 25,113,155,
-234,131, 85,144, 75,157,186,116,254,126, 54, 75,143,125,209, 57,102,181, 97, 81,210,199, 45,242, 24,150,159,207, 24,144, 83,200,
- 34, 79,203,242,175,179, 86, 77, 70,121,133, 24, 98,219, 53,125,116,245, 89, 68,166,154,213,157,170, 78, 37,101,101,101,205, 28,
- 59,118,108,186,163,163, 35, 49, 55, 55,135,163,163, 35, 53, 98,196,136,180,248,248,248,249, 53,173,120, 63, 63,191,254, 45, 91,
-182, 60, 20, 25, 25,217,123,239,222,189,238, 97, 97, 97,125, 90,182,108,121,200,207,207,175,191,137, 20,123,151, 45, 91, 86, 32,
- 18,137,208,188,121,243, 18,129, 85,217,171,120, 58,182, 50, 48, 12, 3,137, 68,130,176, 77, 43, 59,127, 55,119,150, 52,227,193,
- 85,220,185,116, 10,199,159,105, 11,103, 47,250,225,154, 68, 34,169,217,249, 58,200, 27, 52,247,114,122,248,205,248,225,177,179,
-102,205,146,223,185,115, 71, 54,113,194,120, 54, 41, 57, 7,226,122, 63,128,170, 61, 27, 15,147,237,208,173,123, 27,118,198,148,
-207,155, 0,152, 80, 29,206, 9, 19, 38,200, 22, 47, 94, 92, 24, 28, 28,156,147,155,155, 43,145, 91,219,250, 11, 45,173, 27, 38,
-103,102,137,218,180,105,115,123,248,240,225,153, 12,195,140,175,110, 57, 47, 95,190, 44,238,222,189,123, 65, 94, 94,158, 76, 32,
-149, 6, 80, 18, 73, 96, 78,126,161,168,255,128, 1,145, 61,122,244,200, 99, 24,102, 66,117, 57, 31, 61,122, 36, 14, 14, 14,206,
-207,205,205,149,153,219,217, 55,230, 91,217, 4,168, 50, 50, 69,193,173, 91,223, 26, 62,124,120,110,101,231,222,103,210,159,226,
- 68, 42,149,102,248,250,250, 98,230,204,153,152, 61,123, 54,250,244,233,131,196,196, 68,116, 29, 56, 8,141,134,140,192,217,123,
- 81, 72, 74, 74,194,215, 95,127, 13, 47, 47, 47, 80, 20,149,244,119,137,172,138, 28,225,253,234,144,243,149,249, 89, 85, 37,178,
- 58,119,238, 60,172, 87,175, 94,248,237,183,223, 74, 28,218,251,245,235, 7,161, 80,136,198,141, 27,227,203, 47,191,244, 88,182,
-108, 89,236,242,229,203,209,162, 69, 11,184,184,184,188,207, 61,179, 56,112,248,103,160,172, 22,249,167,131, 95,234,196, 74, 58,
- 61,214, 66,218,239,167,181,107, 44,199, 77,250,178,192,207,207,207,218,209,209, 17, 20, 69,161,107,183,110,164,197,137, 19,230,
- 2,133, 2,182, 13, 26,128,101, 89, 48, 12,131,139, 23, 46,224,204,153, 51, 5, 59,126,222,236, 60,252,179,207,122, 2,216, 86,
- 73, 5,178, 69, 35,122,164,165,165,193,201,201, 9, 60, 30, 15, 18,137, 4, 42,149, 10, 78, 78, 78, 16, 10,133,224,241,120,252,
-162,212, 47,149, 78, 59, 58, 57, 57,109, 15, 93, 16, 53, 61,190,225, 87,117,130,101, 20, 57, 86,144, 12, 10, 4, 70,150, 1,165,
-102,193, 48, 44,180, 6,160,190, 51,207,250,180, 22, 86, 55,238,159,122,234,228,228,180,189, 58,149, 20, 27, 27,123, 86,161, 80,
-140, 46, 40, 40,216, 7,128,186,118,237, 26,243,236,217,179,207, 77,117, 72, 47, 15, 82,169,116, 74, 88, 88,152,205,252,249,243,
-179,206,156, 57,147,211,161, 67, 7,203,208,208, 80,219,254,253,251, 79,129, 9,209,225, 85, 42,149, 90,169, 84,110, 75, 73, 73,
-249,188, 73,147, 38,200,204,204,132, 78,167, 67,100,100, 36,234,214,173,139,240,240,112,120,123,123,227,198,141, 27,240,241,241,
- 1, 77,211,208,104, 52,160, 77, 8,180,165,138,127,110, 38,211,102, 89,168,174, 31,197,163, 59,225, 56, 26,171, 45, 92,250,243,
-158,163, 13, 26, 7, 21,152, 42,124, 75,195,219, 81, 94, 95,105,111,123, 98,249,178, 69,230,137,215,143, 97,239,134,229,236, 31,
-135, 15, 7,138, 45,240, 73,139,247,198,245, 49,232, 81,139, 97, 33, 12, 14,110,137,158,129,247,137, 64,139,172, 63,194, 43,143,
-100, 94, 30,231,190,237,187, 2, 52, 64,253, 58,117,234,244,228,241,120,246, 0,244, 52, 77, 71,193,196, 20, 52, 21,149, 83, 3,
-212, 87, 40, 20, 61, 37, 18,137, 51, 33, 68,173, 86,171, 99,222, 4,167,135,135, 71, 79, 30,143,167, 4, 80, 72,211,116, 52,170,
-153, 42,167, 83,167, 78, 75, 55,111,222, 60, 89,171,213,218,150,178,182,146, 99,199,142, 65,167,211, 65, 36, 18,177,114,185, 28,
-241,241,241, 44,128, 36,150,101, 71,191,169,142,227,227,143, 63,198,181,107,215,230, 2,152, 93,217,126,153,153,153,124, 27, 27,
- 27, 99, 85,194,203, 84,206,235,215,175, 47, 30, 49, 98,196,148,227,199,143, 39,204,153, 51,167,241,208,161, 67,113,240,224, 65,
-184,186,186,226,209,163, 71,152, 60,121, 50, 8, 33, 30,203,150, 45,187,181,123,247,110, 69,114,114,242,247,220, 99,139, 3,135,
-127,148,200, 34,255,150,115, 41,215,201,157, 48, 68,224, 85,183, 46,173, 43,204,223,242,217,176, 97,163, 67,151, 44,145,249,249,
-249,193,104, 52, 66,115,227, 6,116, 18, 9, 44,191,253, 22, 20, 69,225,250,181,107,152, 48,126,124,190,166, 48,127, 83,237,218,
-238,254,132,101,229, 37, 60,229,100,219,214, 21,207, 5,226,229, 20,161, 90,173,134, 80, 40,132,153,153, 25,210,210,210, 32, 18,
-137, 32,149, 74,209,168, 81, 35, 42, 55, 55, 55, 4,192,111,175,148,173, 12,103, 68, 68,132,193,217,217,185,247,111, 67, 38, 30,
-237,188,109,133,211, 72,171,218,228,146, 58, 3,105,180, 22, 44, 0,123,115, 10, 94, 78, 20, 12, 5,169,236,221, 45, 3,146,136,
- 49,167,119, 68, 68,162,161, 50,206,178, 80, 42,149,245,234,215,175,191,166, 75,151, 46, 20, 0,180,110,221,154,146,203,229, 63,
- 42,149,202, 40,149, 74, 85,174, 51,114, 85,156, 18,137, 68, 12, 0,167, 78,157,202,188,124,249,114, 8, 77,211,135, 7, 12, 24,
- 96, 93,252,187, 41,156, 20, 69,253,180, 97,195,134,207,151, 46, 93,138,212,212, 84,232,116, 58,104,181,218,114,173, 87, 78, 78,
- 78, 56,125,250, 52, 24,134, 57, 82, 85, 57,125,253, 27,230,111,227, 91,165,108, 61,244,135, 99, 38, 35,201, 95,250,243,158,227,
-213, 17, 87,165, 57,235, 43,204,188,157,237,109, 79,124,191,116,145,121,198,131,171,120,124, 55, 28, 71,175, 39,222, 82,179,108,
- 34,128,133, 69, 47,180, 15, 36,113, 39,246, 77,183, 71,108, 8,142, 95, 1,251, 26,156,137, 0,142,191,225,114,190, 51,156, 97,
- 43,125, 74,210,203,204,154, 53,235,198,172, 89,179,250, 86,248,199, 7,190,231,225,123,151,212,164,125, 86,114, 47, 64, 85,228,
-225,174, 82,169,230, 0,152, 83, 46,167,239, 3,178,166, 39, 97, 1, 84,185,146,208,100, 78, 0, 69,233,111,214,244,232,209,227,
-121,113, 40,134,125,251,246, 97,254,252,249,216,181,107, 23,178,178,178,208,178,101, 75,184,184,184, 56, 92,191,126,189,206,155,
- 60,119, 83,175, 17,199,201,113,114,156, 28,128, 10,156,220, 9, 97,104,154,102,224,224,232, 96,158,150,154,186,122,236,216, 49,
- 25,243,230,205,211,156, 63,127, 30,186,135, 15,161,137,140,196,233,211,167, 49,113,226,196,194, 81,163, 71, 39,105, 10,243, 87,
- 58, 57, 58,216,209, 52, 3, 66,152, 74, 45, 36, 20, 69,197,198,196,196, 0, 0,180, 90, 45,126,252,241, 71,131, 94,175,135,133,
-133, 5, 88,150,197,198,141, 27, 25, 0,232,216,177,163, 92, 32, 16,152,148,130, 36, 49, 49,241, 78,110,188,170,243,175,253,199,
-196, 62,216,253,123,110,131, 12, 29,250, 74, 20,248,160, 1,139, 58,146,231,120,113,245,231,156,171,235, 63,138, 45,204,138,239,
-146,152,152,120,167,186,149,228,228,228,244,237,206,157, 59, 29, 34, 34, 34, 88,173, 86,139,196,196, 68,118,202,148, 41, 14, 78,
- 78, 78,223,190, 78,251,204,206,206, 6, 69, 81, 76, 81,189, 20,175,165, 55, 89,189, 39, 36, 36,220,219,183,111,223,111,103,207,
-158,133,139,139, 11,104,154, 46, 17, 88,165,223,249,124, 62, 8, 33, 88,191,126,125, 54, 33,100, 70, 85,188, 34,145, 8, 27,246,
- 30, 61,246,213,186,253,123,247,158,190,177,191,166,150, 43, 0,144,153, 91,204,255,126,233, 34,203,226,169,198,157, 17,170, 92,
- 66,179,229, 79,213,233, 19, 95,182, 17, 2,246,141,113,254, 21,229,124,139,156,111, 19, 69, 66,136, 40,149, 74,252,250,235,175,
-213,246,193,242,171, 67,254,207,185,189,166,156,247,238,221, 91,212,183,111,223,148, 57,115,230,172,213,104, 52, 5, 69,131, 55,
-253,247,223,127,191,108,220,184,113, 41,137,137,137,156,229,138, 3, 7, 14,239,158, 5,139,225, 81,151,215,111, 88,215,109,207,
-174,221, 78, 60, 30,229,244,244,233,179,155,159,124,250,105,226,133, 11, 23,108, 4,117,235, 54,165, 40,138,209, 77,159,126, 53,
- 63, 55, 39,115,251,150,159,221,106,215,118,111, 84,148,236,153,101,120,212,229,202, 14,152,153,153,185,117,210,164, 73, 77,183,
-109,219, 38, 92,186,116,105, 65, 98, 98,226,201,235,215,175,119, 91,187,118,173,100,227,198,141,133, 57, 57, 57,135,142, 30, 61,
-218,171,125,251,246, 70,157, 78,103,114,124,161,148,148,148, 40, 66,136, 15,181,124,227,192,232, 13, 59, 58,179, 60,170, 37, 52,
- 66, 16,150,190, 66, 25,243, 79,166,170, 84, 59, 89,150, 53,214,164,146, 36, 18, 73, 35,169, 84,138,199,143, 31,103, 53,109,218,
- 84, 39, 18,137, 4,238,238,238,182, 18,137,164,209,107,152, 65,217,172,172, 44,176, 44,203, 7, 64,104,154,230, 3, 0, 83, 85,
-208,162, 50, 16, 10,133,253,135, 15, 31,254,219,218,181,107, 59,119,236,216, 17, 30, 30, 30, 48, 24, 12,240,246,246,134, 78,167,
-131,151,151, 23, 52, 26, 13,126,248,225, 7,228,231,231, 79, 78, 76, 76,204,170,140,143, 97, 24,136,197, 98,136, 68, 34,120,251,
-250, 23, 74, 36, 18,212, 84, 92, 1,128, 92,132, 58,241,215,142,224,241,221, 8,236,137, 76,202, 46,208, 51, 93, 31,165, 22,220,
- 47,187, 95,161, 14, 5,237,187,142,121, 41,188, 13,200,127, 19,156,127, 69, 57,223, 54,103,159, 73, 15,209,238, 67,211,247, 13,
- 59,253,102, 58, 10,149, 74, 85,237, 70, 16,245,148, 37,120,224,203,226,193,234,114, 99, 92,213,132,179, 24, 69,233,111,214, 3,
-128,139,139,203,147, 9, 19, 38, 76, 73, 76, 76, 92, 81, 20,239,106, 54,215,181,115,224,192,225,157, 20, 88,177,177,241, 81, 30,
- 30,181,190,222,255,235,190, 86, 44, 75,241, 88, 66, 10, 0,234,247,251,247,239,103,151,222,207,211,198,198,124,248,136,225,253,
- 8, 67, 4,132, 48, 52,195,163, 46,199,198,198, 71, 85, 97,109,186, 59,100,200,144,213,237,219,183,255,148,166,233, 37, 49, 49,
- 49, 39,189,189,189,111,117,237,218,245, 43,163,209,184,236,201,147, 39, 39,125,124,124, 78,237,217,179,103, 42, 77,211,213,178,
- 16, 21, 9,168,109,168,196, 7,172,134,152, 7,192, 82, 44, 22,231,132,135,135,239, 14, 14, 14,238, 79, 8,177, 4,144, 83, 83,
- 66,173, 86, 59, 33, 47, 47,207,174, 95,191,126, 6, 0,222, 31,126,248,225,140,152,152, 24, 65, 65, 65, 65,108,117,120,226,226,
-226,180,238,238,238,189,198,142, 29,187, 73, 40, 20,118, 44,178,128,177,165,234, 4, 44,203,130,166,233, 67, 42,149,170,210,122,
- 17, 8, 4,249, 61,122,244, 48, 51,193,194,149,111,106,249,146,211,243, 38, 44,216,122, 52, 84,107, 96, 24, 35,195,142,126,148,
- 82, 80,238, 18,178, 27,247,217,250,111,154,179, 58,248,167,112, 2,192,152,214,171,119,224,193,234, 18,135,247,226,208, 13,101,
-191,255, 85, 40,178, 56,177, 0,230, 86,185,115,145,197,170,170,220,133,213,226, 44,131,162, 85,130,220, 74, 65, 14, 28, 56,188,
- 83, 32,127,101, 40, 39,110,126,154,227,228, 56, 57, 78,142,147,227,228, 56, 57,206,255, 34, 40,174, 10, 56,112,224,192,129, 3,
- 7, 14, 28,222, 44, 8, 0,255,242, 54, 84, 71,153, 18, 66,252,171,123,224,170,248, 57, 78,142,147,227,228, 56, 57, 78,142,147,
-227,252,247,113, 86,197,253,111,177,140,113, 83,132, 28, 39,199,201,113,114,156, 28, 39,199,201,113,190,117,206,127, 27,184, 41,
- 66, 14, 28, 56,112,224,192,129, 3, 7, 78, 96,189,125, 16, 66, 62, 33,132, 28, 39,132,220, 35,132,156, 32,132,124,242, 26, 92,
- 82, 66,200,244, 82,124,199, 8, 33, 83, 9, 33, 98,174,166,223,233, 54,192,227,106,129,195,187, 4,165, 82, 89,207,207,207, 47,
- 66,169, 84,214,227,106,131, 3,135,183, 15,126, 69, 27, 60, 61, 61,175, 80, 20, 85,135,162,168,226, 7, 74,233,135, 75,185,239,
- 44,203, 62,141,138,138,106, 89, 17,103,157, 58,117, 74, 56, 41,138, 2, 33, 4, 20, 69,193, 96, 48,152,243,120,188,188,242, 56,
-105,154, 78,120,244,232, 81,208, 59,244, 96,221, 97,109,109,109, 88,187,118,237,154,128,128,128,186,153,153,153, 5, 35, 71,142,
-236, 66, 8,233,196,178,236,224,106,114,249, 19, 66,182, 55,105,210,100,255,184,113,227,194,252,252,252,204, 11, 10, 10,196,123,
-246,236,113, 90,191,126,253, 69, 66,200,112,150,101,163,184,102,250,238, 64,161, 80, 4, 16, 66, 86,123,121,121, 5, 41,149,202,
-155, 0, 62, 87,169, 84,183,185,154,249, 91,239,193,207, 68, 34, 81, 87, 47, 47,175,166, 90,173, 54,235,233,211,167, 55,104,154,
-254,150,101,217,228, 55,196,111, 9,224, 91,177, 88,220,204,211,211,179, 86, 76, 76, 76,188, 94,175,191, 14, 96, 30,203,178, 57,
-239,170,184,106,214,172,217,165,133, 11, 23,218,206,152, 49,227,146, 82,169, 12,174, 40,203, 4, 7, 14,165,225,234,234,106, 85,
- 80, 80,176,137,162,168, 0,137, 68,226,100,110,110, 14, 51, 51,179,100,177, 88,124, 75, 38,147,125,122,228,200,145,108,174,150,
-222,176,192,226,241,120, 46, 55,110,220,112, 48, 55, 55, 7, 77,211, 96, 24, 6, 12,195,148,228, 31, 44,237,187, 85, 20,103, 9,
-237,219,183,175, 52,155, 48,159,207,175, 21, 17, 17,225, 96,102,246,103,168, 37,189, 94,143,134, 13, 27, 50,145,145,145, 14,101,
- 19, 9,235,116, 58, 4, 6, 6,178,239, 74,101, 17, 66, 6,217,218,218,234,158, 63,127,209, 66,163,213,183, 28, 59,101,254,183,
-253,222,111,107,121,245,234, 85,170,103,207,158, 2, 66,200, 39, 44,203,110, 55,145, 75, 74, 8,217, 60,115,230,204, 69,124,161,
-204, 97,223,209, 43,252, 31, 55,236,140,247,247,173, 77, 38,141, 31, 43,155, 48, 97,194, 13, 31, 31,159,159, 9, 33,173, 89,150,
-213,114, 77,245,157,184,254,252, 90,181,106,253, 22, 26, 26,234,156,156,148,132,229, 43, 86, 52, 7,176, 22, 64,115,174,118,254,
-182,107, 48,125,238,220,185,161, 3, 7, 14,132,209,104,132, 90,173, 86, 62,121,242,164,254,204,153, 51, 63, 36,132, 52,101, 89,
- 54,246, 53,249,237,189,188,188, 30, 78,154, 52,201,166,105,211,166,160, 40, 10,217,217,217,202, 75,151, 46, 53,223,188,121,243,
- 39,132, 16, 31,150,101,211, 94,131,159,178,181,181,157, 0,160, 61,195, 48, 98, 0,215,179,178,178, 22,176, 44,171,127,157,114,
- 91, 91, 91,255,178,108,217, 50, 91,177, 88,140, 45, 91,182,216,246,237,219,247,162, 82,169,108,205,137, 44, 14,149,193,206,206,
-238,179,188,188,188, 53, 50,153, 76,104,101,101, 5,169, 84, 10,161, 80, 8,145, 72,228,106,109,109,237,106,102,102,214,125,192,
-128, 1,159,239,218,181,107, 19, 87, 91,111, 80, 96, 81, 20, 5,169, 84,138, 61,123,246,128,199,227, 65, 40, 20, 66, 32, 16, 64,
- 32, 16,188,242,185,248,123,173, 90,181, 76,233, 92, 0, 0,135, 14, 29,130,165,165, 37, 44, 44, 44,224,235,235, 11, 66, 8,196,
- 98, 49, 78,159, 62,253, 10,111, 80, 80,208,107, 69, 17,175, 9,250,116, 34, 44, 80,126,240,198, 30,109,204,208,115,224,194,143,
- 11,181,134, 54, 44, 75,212,201, 89,134,204,121, 75,215, 68, 53,174,239, 75,246,238,221, 27,104,103,103, 55, 0,128,169,137,164,
- 39, 54,109,218,244,144, 17, 34,199,225, 67,135, 13, 29, 70, 17,227, 71,195,190,156,123, 41,242, 73,214, 38,191,128,157,105,105,
- 9,163,127,252,241,199,232,177, 99,199, 78, 0,176,196,212,242, 55,105,210,228, 5,195, 48,181,138, 68,114,186, 84, 42, 85,156,
- 59,119,206,248,182, 27, 26, 33, 68, 9, 96, 41, 0, 3,128,197, 44,203, 62, 44,181,173,158, 80, 40, 92,162,215,235, 51, 1,204,
-102, 89, 54,254, 93,188, 89,156,157,157,125, 6, 15, 30,108,151,145,150,134,229, 43, 86, 20,255, 28,100, 74, 82,242, 55,141,192,
-192,192, 58, 18,137,100, 41,128, 0,173, 86,235, 12, 0, 82,169, 52,145,101,217, 3,106,181,250,155,136,136, 8,117, 13,175, 83,
- 45, 0,245, 81,113,202, 38,118,201,146, 37,209, 83,166, 76,121,250,119,115, 18, 66,220, 29, 29, 29, 23,246,233,211, 7, 71,142,
- 28,193,209,163, 71, 13, 18,137,132, 63,116,232, 80,242,249,231,159, 91, 79,154, 52,169, 59,128, 31, 94,179,106,187,207,157, 59,
-215,198,215,215, 23,251,246,237,195,237,219,183,213,245,234,213,147,182,109,219, 22, 60, 30,207,230,155,111,190,233, 6, 96,107,
- 53,235, 84, 12, 96, 2,128,246, 60, 30,175,245,208,161, 67,141,227,199,143, 23, 80, 20,101, 88,185,114,165,253,166, 77,155,250,
-217,217,217, 5,164,167,167,231,215,180,208, 89, 89, 89, 11,230,207,159,191,109,245,234,213,230,177,177,177,152, 59,119,174,221,
-184,113,227,206, 43,149,202,182,156,200,170, 24, 60, 30, 79,207, 48,140, 0,128,132,101, 89,109, 85,223,255, 77,231,110,107,107,
- 59, 38, 43, 43,107,173, 82,169,132,189,189,125,201,179,150, 97, 24, 20, 20, 20, 64,173, 86,163, 78,157, 58, 66, 95, 95,223,141,
-227,198,141, 19,172, 94,189,122, 29,215, 98,170, 41,176, 8, 33,109, 89,150, 61, 95,170, 51,104,203,178,236,121, 66, 8, 24,134,
-129, 64, 32, 0,143,199, 3,159,207, 47, 17, 62,165, 63, 23,191,202, 19, 66,101, 87, 24, 80, 20, 69,242,242,242, 74,196,149,165,
-165,101,137, 37,204, 96, 48,252, 31, 39, 77,211,160, 40,138,173,140,243, 77,160, 52,103,216, 74, 31,108, 13,159,210,127,107,248,
-203,239,221, 6,190,124,223, 26, 14,156,190, 62,122,233,146,117,173,106, 77, 92,176, 37, 52, 35, 35, 59,213,207,197,222, 56, 96,
- 96, 91, 55, 81,122, 74,186,109,237,218, 33, 0, 82,171, 81,206,224,209,163, 71,239,219,119,246,177, 92, 44, 22,137,120, 20,120,
-245, 60,234, 8,156, 45,234,218,216,119,105, 42,138,139,141,189,248,201, 39,159,140, 30, 59,118,172,109,177,192, 50,229,220, 89,
-150, 85,156, 60,121, 18,124, 62, 31,157, 58,117,178, 46, 18,209, 70, 83,206,253,175,168,207, 82,152,153,146,146,210, 95,163,209,
- 32, 40, 40,232,125, 66, 72,123,150,101,111, 17, 66, 26,244,234,213,235, 98, 88, 88,152,121,100,100, 36,154, 55,111, 46, 5,208,
-247, 45,150,243,255,160, 84, 42, 79, 2,120,143,199,227, 65,167,209,232,150,126,255, 74,154,187,240,210,226,234,239, 40,103,227,
-198,141,125,100, 50,217,149,239,191,255,222,194,207,207,143, 8, 4, 2, 24,141, 70,196,196,196,212,218,177, 99,199,168,155, 55,
-111,118, 11, 12, 12,244,139,136,136, 48,212,224,220,235, 95,188,120,177,192,195,195,163, 92,193, 88, 88, 88,200,243,240,240,104,
- 7,224,233, 91,224, 76, 72, 73, 73,249,224,189,247,222, 27,157,156,156,252,208,104, 52, 78, 3,224,111,103,103, 23,249,241,199,
- 31, 67, 42,149,182, 55, 69, 96, 85,118,141, 28, 28, 28,122,181,108,217, 18,171, 87,175,198,226,197,139, 59,177, 44,251, 7, 33,
-164, 99,110,110,238,233,247,223,127, 31, 86, 86, 86, 31,148, 39,176, 42,226, 36,132,248,137,197,226,173,187,118,237, 50,243,240,
-240,240, 16, 10,133,148,135,135, 7, 50, 51, 51,161,209,104,196, 11, 22, 44,104, 32,145, 72,110,255,240,195, 15, 91, 1,124, 84,
-195,246, 89,175,105,211,166, 27, 39, 79,158,108,126,248,240, 97,120,121,121, 33, 55, 55, 23,195,135, 15,119, 88,181,106,213, 57,
-165, 82,217,174, 88,100,253,221,247, 17, 33, 36, 7,128, 5, 0,171,234, 76,175, 86, 82,159, 57, 0, 74,252, 83, 5, 2, 1,196,
- 98, 49, 36, 18, 9, 36, 18, 9,158, 62,125,250, 43,143,199, 27, 86, 52,144,171,146,147,252,249,224,106, 68, 8,185,193,227,241,
- 42,253,206,178, 44,243,182,251, 37, 66,136, 11, 33,100, 37,128,246,120,233, 71,125,222,193,193, 97, 98,114,114,242,115, 83, 57,
-149, 74,165,109,126,126,254, 15, 74,165, 18, 14, 14, 14,197, 98, 19, 65, 65, 65,208,104, 52,184,127,255, 62, 24,134,193,147, 39,
- 79, 96, 97, 97,129, 6, 13, 26,252, 48,119,238,220,125,179,103,207,206,248,171,206,189, 34, 45,242, 79,183, 96,157, 43,106,103,
-197, 39,115,174,120,164, 73,211,116,137,192, 42, 43,126,202, 10, 46, 66, 8, 88,150, 37, 85, 84, 32,165,211,233, 74,196,149,133,
-133, 69,137, 56, 51, 26,141,229, 10,172,154,194,218,218,250, 68,118,118,246, 10,150,101, 79,214,228,255, 67,135, 14,253, 63,127,
-142,233,211,167,199,167,165,165,209,189,130,235,137,183,111, 63,146,241, 73, 72, 59, 39, 63, 79, 23,111,185,173, 67,163,194,194,
-194,155, 0, 4,213, 49,136,248,249,249,153,175,219,117, 62,117,224,132,165,243, 92, 28,205,232, 38, 94,142, 22,158, 54,114,145,
-173,132,111,180, 98,141,217, 50,153,172, 62,128,140,234,150,221,210,210, 18,135, 14, 29,122,215,218,154,181, 90,173, 70, 86, 86,
- 22,214,175, 95,111, 49,122,244,232,179,132,144,137,189,122,245, 90,189,111,223, 62,121,118,118, 54,244,122, 61, 0,168,223,193,
-251,100,190,181,181,117,155,246,237,219,139,118,239,221, 43, 98, 89,182, 0, 47,211, 17,229,179, 44, 59,238,239, 46,140, 68, 34,
-249,106,193,130, 5, 22,126,126,126, 36, 61, 61, 29, 44,203,130,162, 40,216,217,217, 97,202,148, 41,146,111,190,249,198, 57, 58,
- 58,250,107,212, 32,237, 12, 0, 82,145, 16, 2, 0,153, 76, 70,163,250,139, 99,202,229, 52, 26,141,164, 85,171, 86, 83,210,211,
-211, 27,168,213,234,239, 76,120,240, 24, 1, 28, 42,122, 21,247, 41,183, 31, 62,124,168,230,243,249,210,218,181,107, 55,123,221,
-186,173, 87,175, 94, 11,129, 64,128,235,215,175,107, 1, 20,119,238,231,239,220,185,163,253,232,163,143,196,181,106,213,106, 81,
- 29,203,149, 88, 44,222,250,248,241, 99,111,133, 66, 33,189,118,237, 26, 26, 54,108,136,244,244,116, 36, 39, 39, 35, 63, 63, 31,
-201,201,201,248,244,211, 79, 29,150, 47, 95,174, 48, 85, 76,121,122,122,158,178,179,179,147, 22,167,193,234,209,163,135, 96,201,
-146, 37,230, 9, 9, 9, 48, 26,141,152, 49, 99, 6, 66, 66, 66, 96,109,109,141, 97,195,134, 57,110,220,184,241, 23, 0,129,111,
-249, 30,202, 22, 8, 4,144,203,229, 86,217,217,217, 57,175,193, 35, 6, 32, 2, 0, 62,159, 95, 34,174,196, 98, 49,196,226,127,
-255,186, 32, 66,136, 51, 33, 36, 74, 32, 16,136,229,114,185,144,162, 40,200,229,242, 46, 46, 46, 46,247, 63,249,228, 19,255,237,
-219,183,199,153,194,163,209,104,182, 75,165, 82,129,189,189, 61, 0,160,115,231,206, 24, 58,116, 40,210,210,210, 24,149, 74, 5,
-111,111,111,234,252,249,243, 72, 73, 73,193,237,219,183,209,164, 73, 19,129,141,141,205,118, 0,221,254,194,211,171, 80,139,252,
-147, 5,214, 43, 39, 87,122, 35,195, 48,175,136,171,242, 44, 87,165, 45, 88, 85, 77,231, 17, 66, 64,211, 52,156,156,156, 32,147,
-201, 32,147,201, 74,182, 21,139,185,210, 47,150,101,107, 60, 69, 88,183,110,221, 14, 50,153,172, 53, 33,228,125,150,101, 77, 78,
-121,219,103,210,195, 18,171, 85, 89, 52,106,212,232,202,140, 25, 51,186,158, 57,115, 38,171, 69,195, 58,140, 88, 21,159, 33,179,
-182,107, 72,236, 29, 58,141, 29, 49,242, 42,128, 93,213, 40,162, 74,163,209,136,221,157, 40,181, 42, 39, 87, 87,199,194,210,170,
-142,165,153,204,221,206,210,214, 90, 34,162,228,142, 14, 74,131,193,144, 13, 64, 85, 21, 81,233,105, 65,137, 68,162, 35,132,240,
-173,172,172, 96,105,105,169,207,202,202,210, 4, 6, 6, 66, 36, 18,165, 11,133, 66,147,167, 11,155, 54,109,154, 66,211,180, 67,
-101,251, 8,133,194,212,171, 87,175, 58,154,120,190,223, 52,106,212,168,237,218,181,107,237,189,188,188,176,126,253,122,139,125,
-251,246,109,253,229,151, 95,144,157,157,141,103,207,158, 97,248,240,225,185,120, 57,141,248, 78,193,198,198,230, 82,239,222,189,
-177,105,211, 38,182,104, 16, 33, 39,132, 52,180,180,180,124, 20, 21, 21,165,255,187,203, 67, 81, 84, 23,111,111,111,146,147,147,
- 3,150,101,193,227,241, 94,121, 77,153, 50, 69,250,233,167,159,206,108,209,162,197, 20,129, 64,144,107, 52, 26,119,231,231,231,
-127,119,239,222,189,119,202, 89,181,117,235,214, 95,196,199,199,135,184,185,185,253,254, 26,163,125,182, 73,147, 38, 58,150,101,
-165, 60, 30, 79,240,186,101, 42, 94, 29, 74,211,180,166, 56, 57, 60,203,178,198,192,192, 64, 77,209,195,189, 58,171, 71, 39,132,
-133,133,153, 43, 20, 10,169, 90,173, 70,108,108, 44, 2, 3, 3,145,151,151,135,130,130, 2, 20, 22, 22, 66,175,215, 35, 39, 39,
-199,138,166,105,157,137,109,241,151, 29, 59,118,184,184,184,184,192, 96, 48,192, 96, 48,160,160,160, 0,231,207,159,135, 86,171,
- 45, 73,244,190,104,209, 34,205,231,159,127, 46,217,187,119,111,170, 90,173, 30,244,182,175, 53,143,199,131, 88, 44,134, 64, 32,
-200,118,117,117, 5, 69, 81,146,184,184,184,154, 76,185, 89, 0,200,229,243,249,162,210,194, 74, 34,145,224,222,189,123,123, 42,
-178, 94, 85,214,126,170,243,253, 29, 16, 88, 43, 5, 2,129,216,214,214, 86, 88,252,155, 94,175, 23, 90, 91, 91,195,205,205,109,
- 53,128,238, 38,242, 52,182,181,181, 5, 33, 4, 66,161, 16, 35, 70,140,192,141, 27, 55, 14, 36, 36, 36,124,146,154,154,138,252,
-252,252,237, 22, 22, 22, 31,166,166,166,130,166,105,196,197,197,161, 81,163, 70,141,255,166,211,252,199, 11,171, 87, 4, 22, 33,
-164,109,233,247, 98, 49,196,178,108,149,150,171,202,166, 8,203, 66,175,215,155,133,132,132, 48,197, 98,172,120, 21, 33, 0, 66,
-211, 52,132, 66,225, 43,156, 69, 2,171, 70, 13, 92, 44, 22,163,123,247,238, 18,153, 76,118,176, 72,100,157,169,105, 37, 29,218,
-183,211,113,201,236, 25,179,109,148,181, 61,191,254,250,107,126,183,110,221, 78,239,222,189,187,137, 93,112,135,174, 23,254,216,
-227,184,126,218,161,223,247,236,217,147,103,170,131,123, 17, 46, 31, 56,112, 64,241,213,248,177,194,182,109,219,254, 58,164,193,
-100,190, 66,196,152,219,136,133, 60, 25,143, 79,137,107,185,119,253,227,252,133, 36, 0, 23, 76,232, 36, 20,167, 79,159,134,149,
-149, 21, 0,136,116, 58, 29,172,172,172,176,126,253,122,137,133,133, 5, 44, 44, 44,208,178,101, 75,107,161, 80, 88,233,116, 97,
-105,208, 52,237,112,238,220, 57,152,153,153,161,160,160, 0, 90,173, 22, 70,163, 17, 44,203,150,140, 28,219,181,107,231, 80,141,
-142, 44,150, 16,210,102,236,216,177, 23,214,174, 93,107,239,233,233,137,121,243,230, 33, 35, 35, 3, 47, 94,188,192,160, 65,131,
-114,159, 62,125,218,190,180,111,214,187,128, 6, 13, 26,176,151, 47, 95,198,177, 99,199,208,179,103, 79,114,232,208, 33, 61, 77,
-211,194,196,196,196,187,111,171, 76, 70,163,209, 92, 36, 18,193, 96, 48,128,207,231,151, 76,225, 23, 11, 44,103,103,103,156, 58,
-117,138, 95, 88, 88,200,207,200,200,144,109,222,188,121,124,120,120,184, 2,192,128,183, 89,151,235,214,173,115, 27, 49, 98,196,
- 11, 62,159,207,118,237,218,117,240,243,231,207, 63, 80, 40, 20,127,156, 61,123,246,123, 0,213, 14, 45,224,239,239, 31,206,227,
-241, 92, 0, 8, 15, 30, 60,104,160,105, 90,216,160, 65,131,148, 98,203, 78,241,179,209,104, 52, 38, 68, 71, 71, 7,153,194, 39,
-145, 72,132, 63,253,244,147, 65,163,209, 8, 27, 54,108,152, 82,138, 71,248,219,111,191, 25, 12, 6,131,208,219,219, 59,220,196,
-149,205,237,154, 53,107,230,150,157,157, 13, 75, 75, 75,228,231,231, 35, 60, 60, 28,126,126,126, 80,169, 84,160, 40, 10, 86, 86,
- 86, 88,183,110, 93, 33, 33, 36,211,148,115,206,204,204, 28, 52,105,210,164,139,123,246,236,177,227,241,120,120,254,252, 57, 50,
- 51, 51, 97,101,101,133, 29, 59,118,192,221,221, 29,167, 79,159,206,164,105,250,179, 77,155, 54,205, 84,171,213,131,222,182, 15,
- 22, 69, 81, 37, 66,168,148, 32,210, 52,111,222, 28,151, 47, 95,222, 89, 29, 81,196,178,172,174,120, 90,176,244,212,160, 88, 44,
- 6,143,199,171,246,148, 7, 77,211, 66, 66, 72, 99,252, 57,107, 83,233,247,119, 0,109,229,114,185,176,236,143, 89, 89, 89, 66,
-111,111,239,214,213,120, 62,218, 74,165,210,151,132,109,219, 34, 53, 53,149,246,240,240,232,215,183,111, 95, 3, 0,140, 26, 53,
-170, 95, 90, 90,154,198, 96, 48,240,248,124, 62,210,210,210, 80,167, 78, 29,219,191, 65, 64,254,159, 22,249, 71, 11, 44,150,101,
- 9, 33,132, 45,253, 94,218,130, 85,149,229,170,120, 91,177, 80,170,226, 70,203,142,136,136,144,203,229,242,146,223, 12, 6, 3,
- 26, 55,110,204, 48, 12, 67,202, 30,235,117, 44, 88, 98,177, 24, 86, 86, 86, 24, 48, 96,128, 44, 49, 49,113, 43, 0, 23, 83,254,
-247,210, 7,235, 85,113,181, 97,241,188,213, 63, 46, 89, 96,251,228,216, 22,108, 90,181,140,150,203,205, 34, 27, 53,106,212, 38,
- 39, 39, 71,107, 37,215, 34, 57, 3,251, 88,150,253,165, 26,141,136, 2,176,231,234,213,171,183, 58,119,238,124,245,217,179,103,
-214,207, 31, 63,190,100,161,203,207, 55,171, 85,219, 40,116,112,236,165,214, 27,248,189,123,247,118, 4,176,202, 4, 62, 48, 12,
-131, 35, 71,142,192,220,220, 28, 22, 22, 22,176,178,178, 66,177,184,170, 41,158, 62,125,138,132,132, 4,200,229,114,200,229,114,
-152,153,153,193,204,204, 12, 34,145,232, 21,235, 99, 53, 68, 86, 52, 33,100,226,254,253,251,119,135,134,134, 34, 43, 43, 11, 5,
- 5, 5,152, 61,123, 54, 98, 99, 99, 39,177, 44,123,235, 93,186, 57, 26, 54,108,200, 94,189,122, 21,151, 46, 93, 66, 65, 65, 1,
- 86,175, 94, 13,133, 66,209, 1,192,172,183, 89, 46,134, 97,132,197,161, 78, 40,138,250, 63, 11, 86,177,216,146, 74,165,176,179,
-179,195,140, 25, 51,132,189,122,245, 10,121,155,101, 94,178,100, 73,221,149, 43, 87,110,222,182,109,219,177, 65,131, 6,237,189,
-119,239,222, 48, 75, 75,203,187,103,206,156, 89, 32, 22,139,153, 26,117, 94,124,190,203,173, 91,183, 74,139,124, 1, 77,211, 50,
-154,166, 97, 52, 26, 97, 48, 24, 80, 88, 88,136, 78,157, 58,153,204,119,227,198, 13, 25, 0,204,154, 53, 75, 0, 64,198, 48, 12,
- 74,243,169,213,106, 65,199,142, 29, 93, 76, 44,162,210,218,218, 90,240,226,197, 11, 24,141, 70, 4, 4, 4, 96,221,186,117,232,
-219,183, 47,234,215,175,143,188,188, 60, 68, 69, 69, 97,235,214,173,214, 66,161,240, 99,147,204,222, 42, 85,180, 82,169,108,221,
-175, 95,191, 43,187,119,239,182,118,115,115, 67, 66, 66, 2, 84, 42, 21, 60, 61, 61,177,106,213,170, 2,150,101, 91, 21,137,170,
-223,222,246, 61, 68, 81, 84,137, 8, 42,239, 85,195, 1,134,133, 68, 34,201,149, 72, 36,162, 98,161,117,243,230,205,106, 91,175,
- 74,245, 75,183,170,243,253,109,162,184, 15, 54, 24, 94, 61, 77,185, 92, 14, 47, 47, 47,147,121,228,114, 57, 41,126,198, 26, 12,
- 6, 36, 37, 37,209,247,238,221,163, 3, 2, 2, 0, 0, 10,133,130,190,118,237, 26,173,213,106,121,230,230,230, 0, 0, 43, 43,
-171,191, 84,100, 86,166, 69,254,209, 22,172, 82, 86,146, 11,101, 45, 88,197,130,167, 50, 39,119, 62,159,111,170,192, 2,143,199,
-195,241,227,199, 97,102,102, 6,115,115,115,248,248,248, 20, 87,110,185, 86,177,154, 10, 44,145, 72, 4, 75, 75, 75,156, 60,121,
- 82,115,251,246,237, 17, 53,181, 92,109, 88, 60,111,245,162,239,230,218,102, 60,184,138, 4, 85, 18, 50, 82,244,225,151,239,197,
-157, 0,112, 2, 0,240,192,247, 60,124, 31,152, 44,174,124,237,101,141,154,123, 57,253,214,254,189,174,206, 31, 12, 25, 75,125,
-254,249,231, 45,134, 14, 29,154, 57,120,240,224, 9, 82,169,180,190,209,104,204, 58,125,254,124, 92,159, 62,125,108,115,114,114,
-134,178, 44, 91,165, 79, 18,143,199, 75,234,220,185,115, 45, 0, 48, 55, 55,215,253,252,243,207, 34, 43, 43, 43, 12, 28, 56, 80,
-147,156,156, 44, 41,170,143, 44, 83,173, 87, 69, 15,155,212,207, 62,251,204,161,138, 58, 78,173,230,232,164,113, 72, 72,200,198,
- 61,123,246, 32, 35, 35, 3, 5, 5, 5, 16, 10,133, 88,186,116, 41, 94,188,120,241, 3, 33,228,222,187,210,153, 53,106,212,136,
-189,126,253, 58,238,222,189, 11,173, 86,139, 17, 35, 70,148,246, 49,236,252,182,103, 10, 18, 19, 19,177, 99,199, 14,208, 52,141,
- 65,131, 6,193,221,221,189, 68, 96, 37, 39, 39,227,231,159,127, 6, 77,211,248,236,179,207,224,234,234, 10,131,193, 32,105,215,
-174, 29,255,109,173, 40,157, 60,121,242,147, 3, 7, 14, 28,139,143,143,239,182,120,241,226,182,132, 16,102,202,148, 41,139, 44,
- 44, 44, 94,107,245,101, 86, 78, 30, 30, 61,126, 14,163,209, 88,238,203,222,206,166,218,124, 49,177, 47, 96, 52,210, 37, 28, 52,
-253, 39,159,173, 77,181,248, 18, 51, 51, 51,189,120, 60,158,240,241,227,199,112,115,115, 67,211,166, 77,177,112,225, 66,164,165,
-165,193,104, 52,194,193,193,129, 49, 24, 12,145, 58,157,238,130,169,164, 73, 73, 73,133, 25, 25, 25, 5,159,125,246,153,213,198,
-141, 27,137,151,151, 23,158, 61,123, 6,129, 64, 0,115,115,243,194,135, 15, 31,190, 51,171, 6,203, 90,174,138, 95, 69,150, 43,
- 10,192,239, 0,170, 37,176, 89,150,213,213,170, 85,235, 21,255,171,154, 88,175,254, 42,252,149, 43, 19,189,188,188,206, 91, 88,
- 88,132, 60,124,248,240, 21, 43,214,128, 1, 3,244,158,158,158, 23, 77,229,177,176,176,200, 18,137, 68,182, 26,141, 6, 87,175,
- 94,133,143,143,143, 48, 39, 39, 39,148, 16, 50,189,104,112, 25,154,146,146, 34,116,118,118, 6, 0,120,123,123, 35, 39, 39, 39,
-203,148,104, 1,175,137,255,211, 34,255,120,129,197,178,108,219,210,239,165, 26,178, 73,211,131,165, 44, 88, 85, 90, 90,212,106,
-117,137, 69, 68, 46,151,131, 97,152, 87,166, 35,203, 10,172,178,171, 8,171,115, 99,159, 61,123, 86,179, 97,195,134,222, 44,203,
-158, 48,245,127,165,125,176,126, 90,190, 96, 73,177,184,186,115,233, 20,126,123,152,147, 62,101,225,242,149, 53,173,108, 63,123,
-121, 67, 39, 71,187,115,203,151, 46,178, 72,188,126, 12,123, 55, 44,103,239,220,184,209,100,204,141, 27, 31,143, 25, 51,198, 6,
- 47,253,173, 18, 1, 92, 2,240,131, 41,226, 10, 0,174, 93,187,230, 90,252,185,105,211,166, 6, 11, 11, 11,152,153,153, 33, 45,
- 45, 77,104,102,102, 38, 57,119,238, 92,181,125, 29,174, 95,191,238,248, 38, 27, 26, 33,164, 94,207,158, 61, 47,252,250,235,175,
-242,236,236,108,196,197,197, 97,234,212,169, 88,179,102, 13, 44, 44, 44,112,228,200, 17,243,144,144,144,115,132,144,150,111, 59,
-184,106,227,198,141,217,155, 55,111, 34, 46, 46, 14, 70,163, 17, 31,124,240, 1,222,165,209, 20,195, 48,236,164, 73,147,176,113,
-227, 70, 80, 20,133, 33, 67,134, 32, 55, 55,183,100,187,141,141, 77,121,219,120,168, 98, 69,233, 95,218,209,240,249,236,249,243,
-231, 23,183,109,219, 22,241,241,241,221, 2, 3, 3,127, 28, 54,108, 88,226,235,242, 90, 91,154,163,145,159, 7,180, 90, 45,180,
- 90, 45,148, 74, 37,242,242,242,240,228,201, 19,104,181, 90, 56, 58, 88, 85,155,175,113,253,186,208,233,116,208,106,181,112,112,
-112, 64, 65, 65, 1,158, 61,123, 6,173, 86, 11,123,123,235,234,208,157,191,116,233,146, 91,167, 78,157,188,163,162,162,112,225,
-194, 5,232,116, 58, 52,110,220, 24, 49, 49, 49,104,209,162, 5,114,115,115,175,223,188,121,243, 80, 53,238,163, 90, 93,186,116,
- 57,187,115,231, 78,219, 95,126,249, 69,247,209, 71, 31,137,230,205,155, 71, 44, 44, 44,144,146,146,130,119,204,101,232,255,132,
- 85,120,120,248, 30,161, 80,200, 2,168,145,181,169, 24,241,241,241,226, 6, 13, 26,104,197, 98,177,232,202,149, 43, 59,107,106,
-189,250, 75, 70, 63,175,185, 50,177, 50,212,173, 91,119,146,139,139, 75,167,128,128, 0, 68, 69, 69, 9,197, 98, 49, 6, 15, 30,
-172,239,222,189,187,158,207,231,155,188,224, 70, 34,145, 60, 48, 55, 55,111,163,213,106,161,211,233,112,250,244,105,216,216,216,
- 76, 13, 9, 9,153,152,148,148, 4,149, 74, 37, 18,139,197, 37, 86,242,246,237,219, 35, 51, 51,243,193, 95, 93,119, 21,105,145,
-127,186, 5,171, 92, 49, 84,218,130, 85,217,244,160,169, 2,139,162, 40,232,116, 58,200,100,178, 18,129, 85, 58, 82,124, 77, 56,
- 43,194,173, 91,183,174,196,198,198,126,207,178,236,209,154,252, 63,236,151,109, 10, 75,166,176,150,234,250, 81, 60,186, 19,142,
- 3, 81,217,233, 83, 22, 46, 31,255,126,239,129, 41,101, 5, 89,152, 9, 46,244,245, 28,228,254,206,142,182,231,150, 47, 93,100,
-145,241,224, 42, 30,223, 13,199,209,235, 9, 17, 90,150,141, 1,240,221,155,188,168,197,115,235,239, 88, 71, 59,169,120,181, 96,
-108,108, 44, 6, 13, 26,148, 29, 23, 23, 55,246,131, 15, 62, 88,115,226,196, 9,107,107,107,107,156, 60,121,210,188, 86,173, 90,
-161, 0, 66,222, 98,231,200,210, 52,141,140,140,151,139, 55, 91,181,106,133,119,205, 84, 29, 30, 30, 46,236,217,179,231, 31, 0,
- 58, 60,120,240, 0, 12,195, 92,137,136,136,104, 85,188,189,178,109,166,232,183,188,188, 60,129,185,185,121,185, 15, 43,161, 80,
- 40,172,174,197,161, 52,231,229,203,151, 23,125,255,253,247, 7,190,252,242,203,199,175,201, 89,174, 5, 43, 36, 36, 4, 26,173,
- 1, 9, 41, 57, 48, 26,141, 40,212,165,188,150, 5, 43, 36, 36, 4,106,141, 14, 47,146, 50, 97, 52, 26,145,175,169,150,161,100,
-213,128, 1, 3,122, 95,190,124, 57,211,219,219,219,230,230,205,155, 72, 77, 77,133,193, 96, 64,135, 14, 29, 32, 22,139,159,135,
-134,134, 10, 97,130, 27, 64, 81,219,148,189,247,222,123, 39,118,239,222,237,116,229,202, 21,232,116, 58, 38, 60, 60,252,217,200,
-145, 35, 45, 62,253,244, 83,219,151,213,248,206,221,247, 16,139,197,120,240,224, 65,177,176, 26,242,166,132, 80,177, 5,235,191,
-132, 95,126,249, 37,113,203,150, 45,126, 10,133, 98,229,224,193,131,219, 43,149, 74, 74, 36, 18,157,231,243,249, 19, 1, 60,175,
- 70,221, 13,179,182,182,126,194,227,241,120,137,137,137,120,252,248, 49,120, 60, 30, 88,150, 21,169,213,106, 56, 58, 58,130,199,
-227, 21, 91,199,224,226,226, 66,199,196,196, 12, 3,135, 55, 35,176,138, 49,127,254,124,108,216,176, 1,163, 70,141,170,116,191,
-162,176, 0,164, 76,135,240, 74,182,237,226, 85,132,115,230,204,121,229,127,197, 83,129, 99,199,142,125,133,243,224,193,131,255,
- 55, 69,104,106, 6,239, 39, 79,158,152,172,128, 75,115, 22,251, 96,245, 25, 52, 36,105,245,162,217,119,183, 30,250,163, 65,146,
-154, 77,154,178,112,249,228,178,226,202, 84, 78, 95, 39, 51, 95, 23, 7,219,243,223, 47, 93,100, 89,108, 13,219, 29,153,156, 3,
- 35, 59,170,154, 15,255, 42,207, 93, 32, 16, 36,181,108,217,178, 22, 96,218,180,224,223,149,101, 93,171,213,226,218,181,107, 0,
-128,225,195,135,103,199,197,197,181, 97, 89,246, 62, 33,228, 65,215,174, 93,207, 31, 63,126,220,186,104,244,157,241, 54,203, 9,
-188, 92,209,202,231,243,225,229,229, 85,109,113,245,119,149, 51, 41, 41,105,212,232,209,163, 55,104,181, 90,126, 65, 65,193, 40,
- 83,183, 85, 85,206,176,176,176,199, 94, 94, 94,109, 81,113, 40, 6, 6,192,213,215,225, 92,185,114, 37, 0,120,191, 14,103, 69,
- 22,172, 61,123,246,128,166,105,184, 56, 90, 66,171,213,162,180,191,167, 41,156,101, 45, 88,123,247,238, 5,195, 48,112, 85,216,
- 64,171,213, 86,232,123, 88, 30, 39,203,178, 90, 66,200,176,150, 45, 91,110, 95,176, 96,193, 83, 31, 31,159, 90, 45, 91,182,180,
-206,204,204, 76,189,117,235, 86,220,134, 13, 27,204,140, 70,227,176,138,166,137,202,114,218,218,218, 46,223,182,109,155,203,131,
- 7, 15,144,152,152,136, 21, 43, 86, 60, 79, 75, 75,235,206,231,243,197, 63,254,248,227,185, 30, 61,122, 56, 26,141, 70,237,187,
-208, 62,139,161, 82,169, 14,225,101,248,154,106, 9, 43, 83,202,121,227,198,141,189, 69,220, 71, 77,225,254,187,206,253,117, 87,
- 38, 86, 85,206, 97,195,134, 37,160, 76,204,180,234,150,243,228,201,147,113,253,251,247,159,239,239,239, 63,199,204,204, 12,209,
-209,209, 37, 97,145,138, 7,232,132, 16,244,233,211, 7, 99,198,140,193,201,147, 39,231,247,238,221, 59,238,175,174,207,255,140,
-192,162,105, 58, 62, 46, 46, 78,177,109,219, 54, 30, 33, 4, 59,118,236, 64, 89,199,218,226,119, 0,184,118,237,154,145,101,217,
- 39,149, 29,140,166,233,248,240,240,112,199, 45, 91,182, 8,164, 82, 41,196, 98, 49, 84, 42, 21, 24,134, 97, 82, 82, 82,168,157,
- 59,119,190,226,172,123,245,234, 85,163, 94,175,127,241,182, 42,231, 98,212,243,137,199,143, 28,176,107,209,188, 77,182,133,141,
- 77,185, 66,165, 56,226,123,101,144,155, 91, 44,250,126,233, 34,171, 98,113,181, 39, 50, 57, 91,163,165,219, 63, 72, 43,188,243,
-166,203,124,249,242,101,215,119,180,173,205,110,219,182, 45, 3,192, 14,192, 76,246,165,229, 14, 69, 34,171,185,151,151,215,151,
- 0,164, 0,102,191, 77,235, 21,195, 48, 37,150,211,119,217,201, 50, 34, 34,226, 41,128,142,213,221, 86, 21,122,247,238, 29, 11,
- 32,246, 77,150,245,175,224, 44, 70,102,118, 46,158, 60, 75, 44, 74,229, 69,131,126,158, 92,202,127,202,128,204,220,234,133,145,
-203,202,201,195,147,103, 9, 96, 24,246, 37, 31,157, 88,226,228,110, 52, 26,145,158, 93,189, 48,109, 44,203, 70, 17, 66, 90, 76,
-155, 54,109, 2,128, 96, 0,174, 0, 94,224,165, 27,192, 42, 83,125,112, 4, 2, 65,240,202,149, 43,187, 83, 20, 69, 93,187,118,
- 77,187,116,233,210,248,180,180,180, 94, 44,203,190, 0, 0,165, 82,217,238,224,193,131,191,188, 11, 33, 25,202, 96,200, 63,148,
-187,198,248,167,172, 76,220,189,123,247,220,177, 99,199,242,155, 53,107,246,117,147, 38, 77,168,103,207,158, 33, 53, 53,181,100,
-112,217,165, 75, 23,184,185,185, 49, 71,143, 30, 93,248,225,135, 31,206, 5,135, 55, 39,176,210,211,211,187, 12, 25, 50,228, 20,
- 69, 81,181, 43, 74,238, 92,218,186,196, 48, 76, 92, 74, 74, 74,165, 65,200,210,211,211,187,204,158, 61,251, 20,159,207,175, 93,
- 42,153,179, 54, 35, 35, 99,108,159, 62,125,214, 10, 4, 2,113,105,107, 23,195, 48,207,147,146,146,254, 86,135,226,178,113,176,
-186,246,248, 48,253,117, 57,229, 34,120,196, 95, 59,130,199,119, 35,176, 39, 50, 57, 43, 79, 71,183,139, 78, 43,248, 79, 41,127,
-150,101, 83, 1,140,173, 96,219, 99, 0,163,222,129, 50,254,107, 86,175,252, 23, 96, 52, 26, 19, 58,117,104,135,178, 97, 25,202,
-126,167,105, 58,193, 84,190,142,237,219, 86,200, 83,252,217, 84,190,210,150, 44,188,204,198,176,164,166,231,202,227,241,190,108,
-214,172, 25,239,203, 47,191, 76, 57,118,236,216, 31, 89, 89, 89,147, 89,150, 45, 44,101, 41,138,198,219, 15, 38,202,225,207,107,
-254,143, 88,153,184,118,237,218, 89, 83,167, 78,221,170, 84, 42,119, 4, 7, 7,123,123,122,122, 90,152,155,155, 35, 55, 55, 55,
- 47, 51, 51,243,209,145, 35, 71, 6, 13, 25, 50,228, 41,119, 69,223,176,192, 74, 75, 75, 43, 0,208,226, 77, 30,172, 10, 78,183,
-119,165, 82,134, 6, 45,221,141, 7, 75, 95,201, 67, 88, 44,190,202,253, 94,133, 15, 86, 82,122,238,152, 5, 91,143, 44,211, 26,
- 89, 70,111,100,134, 71,167, 22, 68,113, 77,239,157,237, 24, 57,113,245, 15,193,189,123,247,130,222,101,190, 55, 9,157, 78, 55,
-177,101,203,150, 63,208, 52,253,189,193, 96,184,196, 93,125, 14,111, 10, 75,150, 44,121, 90,252, 92,238,211,167, 15, 15, 0,194,
-194,194,232,119,176,168, 77, 0,216, 3, 40, 78,182,110, 15, 64,135,151,145,253,211, 0,220,252,199, 8,172,255, 42,194, 78,255,
-249,128, 45, 43,156,170,250, 94, 17, 30, 37,231,159,231, 70,151, 28, 56,112,120, 13,225,255, 2, 64, 47,174, 38, 56,252,165,207,
-191,119, 83, 88, 21,195,158, 16,114,152,101,217, 16, 0, 40,254, 92,250,183,119, 13, 20,215,164, 56,112,224,192,129, 3, 7, 14,
- 28,222, 44, 8, 0,255, 10, 70, 76, 38,251, 8, 17, 66,252,107, 48, 34,187,199,113,114,156, 28, 39,199,201,113,114,156, 28,231,
-127,139,179, 42,238, 10,254,223,163, 10, 11,214,145,119, 78, 96,253,149,129,233,254,238, 37,193, 28, 39,199,201,113,114,156, 28,
- 39,199,201,113,254, 51, 57,171,192, 63, 78, 96,113, 62, 88, 28, 56,112,224,192,129, 3,135,119, 29,234,233,211,167,127, 77, 8,
- 57, 12, 0,211,167, 79,255,250, 93, 47, 48, 39,176, 56,112,224,192,161, 20,148, 74,101, 79, 0,115,241,210,133, 34, 84,165, 82,
-237,229,106,133,195,191, 9,246,246,246,114, 91, 91,219, 63, 40,138,114, 3, 94, 13,185, 84, 94,254, 95,134, 97,146, 50, 51, 51,
- 59, 39, 39, 39,167,255,157,156,101,112, 37, 52, 52,180, 48, 52, 52,180,216,161, 61, 13, 47,103,225, 66,240,231,202,194,127,182,
-192,154,222,185,118,107,165,179,243,206,236,140,140, 72,109, 97,222,167, 11,255, 72,204,172,201,129, 9, 33,182, 34,145,168,159,
- 92, 46,239,196,178,172, 7,143,199,123,152,147,147,115,218, 96, 48,236,102, 89, 54,159,187, 5, 56,188,109, 52,110,220,184,129,
- 72, 36,154, 74, 8,105,110, 52, 26, 93, 4, 2,129, 10,192,117,173, 86,187, 52, 50, 50, 50,146,171,161,127, 7, 8, 33,148, 66,
-161,248,193,202,202,170, 89,118,118,246, 32, 0, 95, 71, 71, 71, 55,164, 40, 10,126,126,126, 95, 43,149,202, 39,230,230,230,155,
-242,242,242,174, 36, 37, 37, 77,172, 78,238, 56, 14,239, 46, 60, 61, 61,195, 41,138,114, 41,157,174,173,172, 32, 40,251,206,178,
-236,211,168,168,168,150, 21,113,186,184,184,120, 88, 88, 88,172, 5,208,164, 60, 81, 81, 26, 69,238, 57, 55,115,115,115,199, 38,
- 36, 36,148, 27,136,215,198,198,198,220,193,193, 97, 46, 33,164, 15, 69, 81,188,170,206,137, 97, 24,154,101,217,176,212,212,212,
-217,153,153,153,121, 21,237,103,107,107,123,250,194,133, 11, 77,236,236,236,170, 12, 75, 99, 52, 26,145,144,144, 96, 31, 18, 18,
-114, 1,128,207,223,201, 89, 6, 58, 0, 55,254, 73,109,172,218, 2,139,208, 24,252,233,136, 33,206,217,241,209,206,219,118, 31,
-175,247, 77, 23,183,118,223,157,120,158, 92, 29, 14,169, 84,218,207,223,223,127,213,170, 85,171,108,107,215,174, 77,164, 82, 41,
-146,146,146,124,110,223,190,253,225,156, 57,115,102, 11, 4,130, 97, 6,131,225,212,107,118,154, 86, 54,102,252,169, 25,121,134,
- 25, 92, 87,194,161, 58,232,211,167, 15, 47, 62, 62,126,142,157,157,221, 87,211,166, 77, 19,215,169, 83, 7,102,102,102, 72, 77,
- 77,117,141,137,137,169,181,118,237,218,158, 45, 91,182,252, 81, 40, 20,126,115,238,220, 57, 35, 87, 99,255,108, 40, 20,138, 31,
- 46, 92,184, 48, 78,169, 84,162, 85,171, 86, 87, 26, 55,110,108, 33,147,201,112,236,216, 49,120,120,120,212,183,180,180,188,190,
-126,253,122,193,220,185,115, 27,237,223,191, 31, 0,198,115,181,246,207, 7, 69, 81, 46,145,145,145, 14, 50,153, 12, 52, 77, 23,
-101, 3, 96,192,178,108,201,123,105, 49, 68,211, 52,218,183,111,175,175,140, 83, 34,145,172,185,123,247,110,167,226, 12, 39,165,
-132, 84,185, 80,169, 84,157,218,183,111,191, 6, 64,185, 1,181, 29, 28, 28,230,246,237,219,119, 82,253,250,245, 75, 82,205, 49,
- 12, 83,242,158,158,158,142,207, 63,255,188,228, 24, 12,195,224,194,133, 11, 19,190,248,226, 11, 0,248,162,146,115,119,179,179,
-179, 35, 85,165,192,155, 51,103, 14,230,204,153,131, 85,171, 86, 17, 62,159,111, 85, 69,125,190,113,206,127, 58,170, 47,176,192,
- 30, 61,186,111,239,167, 33,109,189,201,208, 94, 1, 94,191, 28, 10,191, 58,189, 83,157, 54,139, 78, 63,141, 55, 81, 92, 77, 24,
- 61,122,244,162,121,243,230, 73, 30, 61,122,132,168,168, 40, 24,141, 70,152,153,153,161, 65,131, 6,212,209,163, 71, 21, 19, 38,
- 76,216, 39, 18,137,134,235,116,186,253, 53, 61, 49, 39,107,222, 82,185,148, 55, 80,196,231, 95,215, 25,141,135,222,197,202,111,
-214,172,217, 73,131,193,176, 56, 50, 50,242,236, 63,165,193, 4, 6, 6,182, 18, 10,133,179, 69, 34, 81,215,127,171,184,120,254,
-252,249,236,214,173, 91,127, 53,103,206, 28,241,179,103,207, 16, 29, 29,141,164,164, 36,212,174, 93, 27,181,107,215, 38,171, 86,
-173,146,252,248,227,143,227,111,223,190, 77, 1,152, 82, 29, 75,137,147,147,211,103, 29, 59,118,252,216,206,206,206, 50, 49, 49,
- 49,231,242,229,203,191, 37, 37, 37,253,196,178,108,141,234,146, 16, 66,217,217,217, 13, 13, 9, 9,249,216,198,198,198, 38, 41,
- 41, 41,243,143, 63,254,248, 45, 53, 53,117,211,235, 88, 90, 8, 33, 10, 0, 13, 1,216, 22,253,148,228,238,238,126,255,217,179,
-103,169,111,144, 83,229,238,238, 30, 85, 19, 78,123,123,123, 57,159,207,223, 75, 8, 81, 86, 98, 33, 80, 25,141,198,190, 69, 1,
-142, 43,132,133,133, 69,115,133, 66,129,235,215,175, 99,230,204,153, 54,237,219,183, 71, 76, 76, 12, 40,138,194, 87, 95,125, 69,
-252,252,252, 4,201,201,201, 8, 10, 10,194,233,211,167, 91,114,210,164, 90,215, 60, 12,128, 21,128, 1, 44,203,166,151,250,221,
- 14,192, 65, 0,169, 44,203,126,244,182,202, 39,149, 74,177,107,215, 46, 8, 4, 2, 8,133, 66,100,101,101,193,217,217, 25, 66,
-161, 16, 2,129,160,228, 37, 20, 10, 81,171, 86,173, 42,249, 24,134,105,202,227,241,144,159,159, 15,154,166, 75,210, 44,229,228,
-228,128,101, 89,136, 68,162,146,223,139,183, 49, 12,211,180,146,250,235,163, 84, 42,177,123,247,110,232,116,186,242,218, 46,238,
-221,251,211,207,156,199,227,161, 81,163, 70, 20, 33,164, 79,101, 2,139, 16,194, 2,192,136, 17, 35, 94, 73, 79, 87,246, 85,156,
- 59,152,101,217,146, 20, 98,127, 39,231,191, 90, 96,205,232, 88,103,108,253,128, 70, 75, 69, 34,129,148,161, 13, 96,140, 6,212,
-247,247, 2,195, 24,241,244,121, 18, 60, 28, 68, 24,222,205,211,109,251,201,152,123, 95,119,246,106,182,240,100, 76,116,153, 14,
-238, 94,153, 11,224,222,164, 73,147,185, 11, 22, 44,144,252,241,199, 31,120,244,232, 17, 22, 46, 92, 8, 0,144,203,229, 56,118,
-236, 24,104,154,198,242,229,203,205,187,118,237,186,150, 16,114,158,101,217,204,202, 56, 43,184,208,110,109,130, 92,122,237, 95,
-214, 70, 92,255,195,125, 43, 9, 33, 71, 88,150,165, 43,233,136,223,248, 74, 8, 83, 56,141, 70,227,123, 2,129,160,101, 64, 64,
- 64, 79, 83, 68,214,219, 42,103,105,113, 37, 16, 8,142,235,245,122,153, 72, 36,226,163,130, 68,210,111,187,156,175,195,217,184,
-113,227, 6, 54, 54, 54, 95,205,158, 61, 91,124,237,218, 53,100,101,101, 33, 53, 53, 21, 19, 39, 78,196,186,117,235, 80,191,126,
-125,200,229,114,140, 31, 63, 94,242,249,231,159,143,109,210,164, 73,216,205,155, 55,195,171, 42, 39, 33,132,106,219,182,237,174,
- 29, 59,118,212, 54, 26,141, 20, 0, 24, 12, 6,235,231,207,159, 15,153, 49, 99, 70, 91, 66,200,128,138, 68, 86,101,156, 45, 91,
-182,220,241,203, 47,191,120,138, 68, 34,170,168,179,182,255,228,147, 79, 62,253,230,155,111,218, 19, 66, 6, 86,212,238, 43,171,
- 79, 66, 72, 99,153, 76,230, 59,118,236,216,244, 94,189,122, 37, 2, 64, 68, 68, 4,185,117,235, 86,171,185,115,231,198,205,158,
- 61,251, 86, 13, 56, 3,101, 50,153,247,184,113,227,210,186,119,239,174, 18, 10,133,204,181,107,215,120,247,238,221, 11, 94,184,
-112, 97,236,215, 95,127,125,167, 58,156, 2,129, 96,207,254,253,251,219, 58, 59, 59,211, 0,216,226, 14,158, 16,194, 82, 20,197,
- 82, 20,133,216,216, 88,247,222,189,123,239, 4,240,126,101,156,217,217,217, 67,130,131,131, 47,204,156, 57,211, 6, 0, 46, 92,
-184, 0, 62,159, 95,242, 64,120,244,232, 17,180, 90, 45, 86,173, 90,165,207,203,203,251,236,223,214,230,255, 98,206, 90, 0,154,
- 2, 56, 67, 8,233,192,178,108,122,145,184, 58, 11,192, 15,192,229,183, 85, 78,138,162, 64,211,116,137,136, 58,117,234, 20,214,
-173, 91,135,221,187,119,195,217,217,249, 21,129, 37, 16, 8,202,245, 35, 42,231, 25, 87,220,183,131,166,105,220,184,113, 3,155,
- 54,109,130,131,131, 3,236,108,109, 97,103,111,143,102,205,154,161,216,106, 70,211,244,255,241,150,229, 76, 79, 79, 7,195, 48,
-166,158, 35,114,115,115, 77,174,207,202,132, 80,233, 87,117,174,209,235,112,254,167, 4,150,194,201,238,155,222, 31,191, 39, 5,
-109, 4,244, 5,128,190, 16,172,190, 16,172,174, 0, 68, 36, 5,107,208, 64,206,203,192,168,142,142, 22,251,174,166, 60,152,222,
-193,173,199,162, 51,207,143, 87, 50, 82,156,181, 97,195, 6,203,187,119,239, 34, 58, 58, 26, 43, 86,172,192,188,121,243, 74, 70,
- 14,239,191,255, 62,174, 92,185, 2,157, 78,135,153, 51,103,218, 76,155, 54,109, 28, 94, 58,155, 86,207,122,101,203, 95,183,119,
-251, 42, 27, 27,105, 58,134,247,186,105,187,102,111,220, 88, 0, 63,190,139, 23, 96,218,180,105,178, 37, 75,150,252,110,170,200,
-122,155,150, 43,177, 88,124,124,214,172, 89,242, 89,179,102,209,111,136,179, 62,159,207,223, 99, 48, 24,190,140,140,140, 60, 81,
-131,209,177,107,147, 38, 77, 22, 70, 71, 71, 31,207,205,205,253,165,236,118,145, 72,244,126, 96, 96,224,160,171, 87,175,126, 93,
- 85, 34,242, 98,136,197,226, 9, 95,125,245,149, 36, 33, 33, 1,217,217,217, 16,139,197,175,116,110, 98,177, 24, 20, 69, 65, 36,
- 18,225,147, 79, 62,145,108,222,188,121, 50,128,254, 85,182, 73, 39,167,207,182,111,223, 94, 91,175,215, 83, 5, 5, 5, 16, 10,
-133, 16, 10,133,104,208,160, 1,111,202,148, 41,181, 38, 77,154, 52, 26,192,234,234,156,191,181,181,245,144, 29, 59,118,120,138,
- 68, 34, 42, 41, 41, 9,173, 90,181,194,245,235,215,209,172, 89, 51,222,148, 41, 83, 92,199,143, 31, 63, 18,192,186,234, 90,153,
-100, 50, 89,253, 11, 23, 46,196, 43,149,127, 26,135,106,215,174,205,118,235,214, 45, 51, 58, 58,218, 59, 50, 50, 50, 35, 32, 32,
- 32,190, 26,156,206, 50,153,204,231,196,137, 19, 73,243,230,205,235,184,110,221,186, 94, 0,208,180,105,211, 67, 11, 23, 46,252,
- 35, 35, 35,195,239,198,141, 27, 25, 77,155, 54, 77,172, 70, 81,109,157,156,156,140, 99,199,142, 53, 47,187, 97,246,236,217,152,
- 59,119, 46,182,110,221,154, 1,192,161, 50, 18,165, 82,217,147,162,168,185,245,235,215,183,232,208,161, 3, 46, 92,184,128,241,
-227,199,107, 13, 6, 67, 12, 0,116,234,212,169,222,156, 57,115, 68,145,145,145,176,182,182, 22, 36, 37, 37,253,172, 84, 42, 57,
-199,119,211,209, 11,192, 57, 0,245,139, 68, 86, 95, 0,251, 0,248, 2,136, 6,208,251,109, 22,174, 88, 96, 37, 38, 38, 98,243,
-230,205, 88,184,112, 33,188,188,188,160,215,235,193,231,243, 75,196, 21,159,207, 7, 33,196,228, 84, 90, 52, 77,227,230,205,155,
-216,190,125, 59,102,126,243, 13,204,205, 95, 54, 83,189, 94,143,204,172, 44, 72, 36,146, 18, 17, 86,133, 96, 10,123,252,248,241,
- 36,103,103,231,146,105,202,210, 83,132, 0, 96,102,102, 6,134, 97, 96, 52, 26,161,213,106,177,113,227, 70, 35,203,178, 97, 85,
-220,147, 37, 98,232,139, 47,190,128, 86,251,103,206,241,134, 13, 27, 2, 0,220,221,221,209,168, 81,163,146,239,197, 22, 42, 83,
- 56, 55,181,106, 0,117,169,189,189,231, 44, 3, 0,184,184,184,192,219,219, 27, 10,133,194, 36,206,127,133,192, 42, 78,112, 91,
- 54,209,109,114,114,234,226,173,235,127, 94, 38, 18, 80,130, 78, 45,189, 97, 45, 54,130,200,108, 32,108, 59, 29,196,202,237,101,
- 3,200,140,133,238,196,116,244,109,148, 78,109,215,242, 14,206,237,230,105, 63,251,216,147,114,157,235, 40,138,106,238,234,234,
-138, 11, 23, 46,160,118,237,218,152, 53,107, 22,124,124,124, 32,147,201,144,146,146,130,130,130, 2,200,229,114,208, 52,141,128,
-128, 0,158,185,185,121,251,234, 10, 44, 66, 72,192,103,125,155, 53,229, 91,248,160, 85,215, 22, 56,185,182,173,124,235, 97,213,
- 12, 66,200,207,165,147,163,190, 43,248,224,131, 15,144,146,146, 34,219,177, 99, 71,141, 69, 86,179,102,205, 78, 26,141,198,247,
- 76, 48,135,159,189,120,241, 98,135,154,138,171,205,155, 55,203,173,172,172, 80,149,243,102, 53,196,213,165, 33, 67,134, 88,236,
-216,177,227, 64, 64, 64,192,135,213, 17, 89,132, 16,215,190,125,251, 30,217,180,105,147, 79,143, 30, 61,204, 0,252,159,192,170,
- 95,191,254, 7, 39, 79,158,252,112,204,152, 49,245, 9, 33, 61,139,146, 74, 87,197,219,178, 78,157, 58,120,241,226, 5, 82, 82,
- 82,160,213,106,145,146,146, 2, 0, 72, 72, 72,128,139,139, 11,172,173,173,225,226,226,130,122,245,234, 17,138,162,154,153, 82,
-222,246,237,219,247, 2, 64,197,198,198, 34, 45, 45, 13,150,150,150,144,203,229,112,118,118, 70,135, 14, 29,248,158,158,158,221,
-171, 43,176,186,117,235,246,177, 76, 38,163,158, 63,127,142,184,184, 56,104,181, 90,196,196,196,192,210,210, 18,157, 58,117, 18,
-120,122,122,134, 84, 87, 96, 1,240, 31, 57,114,100,106,105,113, 85, 12,185, 92, 78,188,189,189, 51,173,172,172,130, 0,196, 87,
-135,115,252,248,241, 41,161,161,161,109, 78,159, 62, 61,173,248,199,211,167, 79, 79, 5,128,213,171, 87, 95,176,177,177, 9, 2,
- 80, 29,129, 5,150,101,153, 79, 63,253,244,177, 72, 36, 66,241,171, 88,184, 46, 91,182, 12, 20, 69, 89,154, 64,243,117,116,116,
-116, 67, 51, 51, 51, 68, 71, 71,131,199,227,129, 16,242, 88,165, 82, 53, 44, 26, 0, 61,209,104, 52, 30, 26,141, 6,189,123,247,
- 38, 61,122,244,104,176, 98,197,138,111, 0,188, 19, 2,139, 16,210, 4,192,114,188,116, 0,254,134,101,217,235,239, 82,255,198,
-178,108, 10, 33,164, 93, 41,145,117, 11,128,184, 72, 92,181, 99, 89, 54,229, 45,214, 29, 24,134, 1,159,207,199,178,101,203,160,
-215,235,241,203, 47,191, 96,223,190,125,160, 40, 10,132, 16, 16, 66, 96, 97, 97,129, 31,126,248,161,228,187, 41, 48, 26,141,216,
-178,101, 11,166, 79,155, 86, 34,174, 0, 64, 40, 20,194,201,209, 17,182,118,118,136,141,141,173, 82, 96,165,166,166,206,190,113,
-227, 6, 42,115,114,255,232,163, 63,103, 88, 75, 59,185,155, 82, 78, 30,143, 7,173, 86,139,247,222,251,243,241, 49,110,220,184,
-146,207, 89, 89, 89,197,247, 4,136,137, 39,207,227,241,160,102,129, 15, 36,127,254,214,253,203, 47, 95,177,200, 85,196, 89,145,
- 22,249, 87, 90,176, 68,193,207, 87, 63,187, 66, 53,234, 19,210, 98,168,141,133, 20, 76,158, 10,194,142,115,112, 55, 83,134,149,
-235, 95, 62, 11, 39,245, 14,128,255,123, 11,160,253,185, 51, 58,184,235, 68, 63, 71, 74,167, 0,152, 85, 30,159,157,157,157,157,
-209,104, 4, 69, 81,144,203,229,176,177,177,129, 84, 42, 69,122,122, 58, 38, 76,152,128,227,199,143, 67,167,211, 65, 40, 20,162,
- 78,157, 58,208,235,245, 30,213,182, 94, 89,243, 55,173, 88,182,208, 42, 35,118, 39, 34, 30,101, 67,102,233,130,111, 70, 6, 89,
-207, 89, 27, 62, 27,192,212,119,241, 34,248,249,249, 97,226,196,137,178, 31,127,252,177, 70, 34,203,104, 52,206,231,243,249,173,
-190,252,242, 75,105,239,222,255, 63, 32,140,138,138,194,232,209,163,213,133,133,133,223,213, 68, 92,137, 68,162,227,155, 54,109,
-146, 91, 90, 90,226,197,139, 23,111, 76, 92,173, 90,181,202,194,195,195, 3, 2,129, 64,178,101,203, 22,147, 69, 22, 33,164,222,
- 71, 31,125,116,116,211,166, 77,110, 35, 71,142, 76,184,112,225, 66, 28, 33,164, 60, 33,158, 53,116,232,208,231, 91,183,110,245,
-100, 24,230, 4, 33, 36,132,101,217, 7, 85,212,165,171, 76, 38, 67,122,122, 58, 38, 77,154,244,138,131,106,241,116, 54, 0, 68,
- 71, 71,195,197,197, 5, 26,141,198,217,148,115,182,177,177,177,102, 89, 22, 35, 70,140, 64,124,252,159,218,196,217,217, 25,241,
-241,241, 48, 26,141, 54,213,173, 71,107,107,107, 27,131,193,128,182,109,219, 66,163,209, 0, 0,250,246,237, 11,129, 64,128,212,
-212, 84,232,245,122,219, 26, 92, 30,187, 30, 61,122,168, 42,218, 40,151,203, 13,214,214,214,238,213,228,180, 13, 9, 9, 73,220,
-176, 97,195,251,101, 55,220,184,113,227,125, 75, 75,203,211, 54, 54, 54,222, 53, 40, 43, 35, 22,139, 33, 22,139, 33, 16, 8, 32,
- 18,137, 32, 22,139, 33, 18,137, 32, 16, 8,192,227,241, 76,154, 87, 97, 24, 6, 71,142, 28, 1, 69, 81,175, 76, 93,204,154, 53,
-107,148,149,149,149,227,249,243,231, 75, 6,128,249,249,249,168, 91,183,110,157, 78,157, 58,221, 78, 78, 78,142,139,138,138,250,
-240, 45,119, 31, 75, 1, 20,251,133,173, 3,208,232, 93,235,223,138, 68, 86, 31, 0,225, 69,226, 74, 7,224,227,183, 41,174, 74,
- 95,123, 62,159, 95,114,159, 75, 36, 18, 4, 4, 4,148,136, 41, 66, 8, 10, 11, 11, 75,166, 8, 77,125,232,231,228,228, 64,161,
- 80,192,220,220, 28,117,189,188,240, 56, 38, 6, 0, 74, 62,139, 68,162, 18, 33, 86, 25,138, 86, 2,126,129, 74,252,169,106, 40,
- 46, 89, 0,224,243, 43,119,195, 86, 40, 20, 96, 24,166, 88, 88,178,111,130,211,206,206, 14,249,249,249, 38,113,254, 43, 4, 86,
-121,138,113,238, 92, 66,105,175,212,222,220,167,123,211,161,190, 46,114,104,211, 99, 33, 50,179, 5,177,114,199,202,245, 39,240,
- 32,238,165,107,212,202,125,145,216, 58,163, 11,136,204, 6, 10,245, 35,152, 75,196, 31, 86, 36,176, 50, 50, 50,242,245,122,189,
-141, 84, 42, 5,159,207,135, 80, 40, 68,122,122, 58,190,253,246, 91,236,221,187, 23,238,238,238, 48, 26,141, 16,137, 68, 72, 75,
- 75,131, 80, 40,172,214,234, 68, 62,159,244,152, 51,177, 91,109,185,173, 23, 50, 34,231,189,252,209, 34, 0, 35,251,242, 68,223,
-111,191, 63,132, 16,242, 61,203,178,169,239,218, 69, 48, 51, 51, 67,163, 70,141, 48,112,224, 64,217, 47,191,252,178, 13,128, 75,
-117,254, 31, 17, 17,113, 57, 48, 48,176,243,242,229,203, 79, 38, 37, 37, 73, 27, 55,110, 12, 51, 51, 51,152,153,153, 33, 54, 54,
- 22,243,230,205,211,104,181,218,144,154, 88,199,248,124,254,150, 79, 63,253, 84,110, 97, 97,129,216,216, 88,216,216,216,188,214,
-185, 6, 6, 6,214, 23, 8, 4,151, 86,173, 90,101,225,233,233,137,135, 15, 31, 34, 48, 48, 16, 78, 78, 78,146,208,208, 80, 83,
- 69,214,154,157, 59,119,186,139, 68, 34,178,107,215, 46,215, 93,187,118, 77,168,234,184,219,183,111,119,223,181,107,215, 42, 66,
- 72,167,202,156,191,133, 66, 97, 66, 90, 90,154,103,173, 90,181,176,121,243,102, 80, 20, 5,149, 74,133,111,190,249, 6,161,161,
-161,104,214,172, 25,204,205,205, 81,171, 86, 45, 60,126,252, 24, 18,137, 36,201,148,243, 78, 76, 76,204, 4,224,112,252,248,113,
-164,165,253, 25,178,197,205,205, 13,153,153,153,208,106,181, 25,213,173,203,196,196,196, 12, 0,142,183,111,223, 70, 92, 92, 28,
-186,118,237,138,131, 7, 15, 34, 40, 40, 8, 52, 77,195, 96, 48,100,212,224, 18,209, 60, 30,143,173,164, 19, 37, 0,172,171,201,
-105,172,140, 19, 47,227, 77, 85,151, 19, 44,203,178, 21,137, 43,145, 72,132, 42,142, 89,162,155,125,124,124,230,214,169, 83,199,
-247,155,111,190, 17,240,249,124, 4, 7, 7,215,155, 50,101,202,115,169, 84,106, 59,125,250,116, 89,121,198, 96, 0, 13,125,125,
-125,229,239, 64,247, 81,218, 74,247, 78, 46, 58, 33,132, 56, 20, 89,252, 68, 0,244, 69,239,187,139,125,178,222,182, 5, 75, 40,
- 20, 98,206,156, 57, 24, 51,102, 12, 28, 29, 29, 49,109,218, 52,240,249,252,146, 87,177, 85,166,216,170,101, 98,219,132,163,131,
- 67,229, 55, 90,145,147,123, 21, 3,179,191, 36, 76, 67,177, 24, 50,197, 23,170,148,181,201, 36,209,246, 58,156,255, 38,235, 85,
-137,192, 42,107,150, 43, 17, 87, 93, 3,135,250,184, 72,113, 43,242, 30,252,157, 12, 96, 5,130, 74, 90,139, 1, 68, 40,135,149,
-148,239, 82,201, 5,136,140,139,139,115,179,178,178,130, 94,175,135, 72, 36,130,191,191, 63,174, 94,189, 10,173, 86, 11,157, 78,
- 7,177, 88, 12,161, 80,136,251,247,239, 67,175,215, 95,168,198,205,194,115,180,230,173,154,250,245, 60,115, 36,110,134,149,185,
- 8,237,155,123, 2,114, 95,240, 10, 30, 97,249,204, 16,155, 81,223, 28, 92, 9, 19,252,101,222,134,192,122,254,252, 57,118,237,
-218, 85,168,213,106,135,212,132,163, 88,100,237,221,187,247,164,149,149,149,180, 89,179,102,136,137,137,193,119,223,125,167,209,
-106,181, 61,106,234,223,101, 52, 26,135,109,220,184,241,184,209,104,148, 23,139,139,215,181, 92, 77,152, 48,193,188,110,221,186,
-120,242,228, 9, 44, 45, 45, 97,110,110,142,218,181,107, 67,161, 80, 72, 38, 76,152, 96,138,200,250,124,224,192,129, 71,183,110,
-221,234, 54,114,228,200,132,221,187,119, 31, 2,144, 83, 94,213,126,244,209, 71,239,111,221,186,213,109,212,168, 81, 47, 0, 76,
-168,106,101, 29,195, 48, 87,158, 60,121,226,225,227,227, 67,234,213,171, 7,145, 72, 4,103,231,151, 70,170,134, 13, 27,194,199,
-199, 7, 66,161, 16, 0,240,228,201, 19,192,196,184, 44, 23, 47, 94,252, 45, 58, 58,250,179,160,160, 32,158,147,147,211, 43,171,
-147, 66, 67, 67,245,207,159, 63,175,118,154,135, 51,103,206, 28,188,119,239,222,136,224,224, 96,190,181,181, 53,196, 98, 49,252,
-253,253,161, 80, 40,240,221,119,223,233,159, 61,123, 86,147,212, 17, 47,110,223,190, 45,241,242,242,162, 43,104,171,230, 0,170,
-107,121, 72,136,136,136, 16, 54,111,222,252,208,177, 99,199,234,151,222,208,180,105,211, 67,102,102,102,150, 0,146,106, 80, 86,
-166,244,212, 96,233,169, 66,145, 72, 4, 62,159, 95,165, 5, 75,165, 82,253,238,228,228,244,212,209,209,241,114,203,150, 45, 45,
-195,195,195, 49,107,214, 44,161, 86,171,117, 61,125,250,116,201,131,184,188, 7,104, 65, 65,129,228, 29,232, 62, 38, 1, 88, 1,
- 64, 6, 96,218, 59, 40,174, 28,241,210,161,221, 27, 47,167, 5,251, 22,137,173, 98,159,172,183, 42,178, 24,134,129, 64, 32,128,
-183,183, 55,190,248,226, 11, 44, 94,188, 24, 99,199,142, 69,221,186,117, 75,174,125,177, 15, 86,209,138, 55,147, 30,252, 66,161,
- 16,142, 78, 78, 48, 24, 12, 37,214, 43, 0,120, 28, 19, 3, 62,159, 15,134, 97,160,213,106,171,156, 34,116,112,112,152,187,100,
-201,146, 9,221,186,117,163, 74,175,184, 99, 89,182, 36,156, 68,233,151,193, 96,192,239,191,255, 62, 33, 52, 52, 20,166, 88,189,
-120, 60, 30, 26, 54,108,248,202,180,224,234,213,127,122, 42, 4, 4, 4,160, 83,167, 78,213, 90,237,199,227,241,224, 61,103,217,
- 43,211,130, 71,237,255,172,182, 90,159,140, 68,221,239, 86,149,203,249,159,152, 34,212, 95,117, 91,208,187, 75,163,161, 62,206,
- 98,220,142,188,143,195,225,105,143,156, 90,242,189,237, 10,210,192,164, 61,196,164,222, 1, 88,185,239,101,156,197, 73,189, 3,
-192,164,222, 7,155, 21, 11, 88,212, 66,106, 1,163,170,196,220,185,116,254,252,249,237,214,175, 95,111,157,155,155, 11,129, 64,
-128,132,132, 4,180,111,223, 30, 15, 30,188,156,185, 17,137, 68,160, 40, 10,179,102,205, 74, 75, 75, 75, 91,111,234,137,200,165,
-212,200,197,223,244,119, 20,138,205,129,204, 11,176,176,176,194,230,245,203, 0,173, 10,160, 68,232,217,169, 17,111,238,143,231,
- 59, 16, 66,234,177, 44, 27,253, 46, 93,132, 23, 47, 94, 96,206,156, 57,133,106,181,250,181, 28,221,139, 69,214,250,245,235, 79,
-166,167,167, 75, 15, 28, 56,240, 90,226,170, 20,103,215,109,219,182, 29,119,114,114,146,187,187,187,215,248, 60,133, 66,225,116,
-189, 94,111,177, 98,197, 10,122,229,202,149, 21,117,120, 98,153, 76,182, 4,192,137, 74, 70,135,209,132,144,246,124, 62,255,200,
-166, 77,155,124,146,146,146,220,207,159, 63,223,179, 28, 65,183,117,235,214,173,110, 99,198,140,121,178,107,215, 46,147,124,176,
-180, 90,237,234,117,235,214,245, 89,179,102,141,212,204,204, 12,132, 16,216,219,219,151, 8,225,226, 7,185, 94,175,199,218,181,
-107,213,106,181,122,165, 41,231,158,145,145,177,121,202,148, 41,237,103,204,152,225,214,172, 89, 51,129,173,173, 45, 84, 42, 21,
-118,237,218,165,255,233,167,159, 18,179,179,179,127,170,110,125,230,230,230,110,153, 58,117,106,199,111,190,249,198,173, 83,167,
- 78,130,172,172, 44,104,181, 90,124,247,221,119,250,159,126,250, 41, 49, 47, 47,175,218,156, 45, 90,180,120,146,152,152,216, 74,
-171,213,102,137,197,226, 87, 58, 56,129, 64, 64, 36, 18, 73, 83, 0,219,171,195, 25, 20, 20,244, 36, 46, 46,174,197,130, 5, 11,
-206, 27, 12, 6,193,141, 27, 55,122, 21,139,171,181,107,215,158,149, 72, 36,157, 0, 84,187,172, 20, 69, 49,101, 69, 85,105,177,
- 37, 16, 8, 76,154, 34,244,241,241,217,185,125,251,118,203, 7, 15, 30, 32, 55, 55, 23,105,105,105,208,104, 52, 37, 83,185, 21,
-197, 49, 42, 44, 44,148,190,237,190,131,101,217,115,120, 25,250,226, 93,197,190, 82,226,170, 93, 57, 62, 89,191,225,207, 41,206,
-191,221,130,197,178,108,201, 96,167,127,255,254,232,216,177, 35,220,220,220, 74, 68, 85,233, 85,132,213, 17, 25, 52, 77,195,223,
-223, 31,218, 34,151,151,226, 54,196,231,243, 97,111,111,143,199, 79,158,152,228,228, 78, 8,233,211,173, 91, 55, 42, 42, 42, 10,
-253,250,245,195,142, 29, 59, 42,220,119,240,224,193,216,189,123, 55,186,116,233, 66, 45, 90,180,168, 79, 21, 2,171, 90,214, 38,
- 19,173,119,127, 5,231, 63, 95, 96, 21, 43,197,226,119, 71,107,249, 48, 95, 5, 31,183,111, 63,192,161,136,204,173,132, 80,251,
- 35,159,105, 15,119,169,147, 7,253,222, 1,240,239,179, 3, 91,103,116,121,249, 64, 76,189, 15,125,216, 96, 16,153, 29, 30,231,
-202,161,214,101, 31,169,164, 51,184, 97,109,109,189,103,251,246,237,159, 14, 29, 58, 84,196, 48, 12,164, 82, 41, 38, 79,158, 92,
- 18, 35,132,199,227, 97,236,216,177,249,169,169,169, 43, 76, 93,249, 69, 8,145, 58,219,139,102, 14, 26, 49, 75,130,248, 13, 0,
- 37, 68, 58, 26,163, 97,155, 79,145, 26,119, 21, 40,120, 0, 16, 33,214, 47,250,204,238,253, 97,223,255, 4,160,245,187,114, 1,
- 30, 62,124,136,217,179,103,191,182,184, 42, 43,178, 14, 29, 58,180, 77,171,213,142,120,131,156, 93, 23, 47, 94,124,220,193,193,
-161,198,211, 34,206,206,206,159,164,167,167,127,106,138,225,204,132, 7,203, 11, 66, 72,143,184,184,184,133,209,209,209,229,174,
- 92,189,127,255,254,193,206,157, 59,203,170,179,138, 48, 50, 50, 50,178,121,243,230,235, 86,172, 88, 49,118,226,196,137, 18,169,
- 84, 10, 11, 11, 11, 68, 71, 71,195,213,213, 21, 0,160, 86,171, 49, 99,198, 12,181,193, 96,216,122,243,230,205,171, 38, 62, 8,
- 25, 66,200,160,209,163, 71,127, 86,175, 94,189,247, 25,134,177,213,233,116, 25,207,159, 63, 63,146,151,151, 87,163, 56, 88, 69,
-156, 3,199,140, 25, 51,212,203,203,235, 99,189, 94,111,107, 52, 26, 51,226,227,227, 15,229,230,230,110,174, 9,231,149, 43, 87,
-210, 54,109,218, 20,155,156,156,236,167, 80, 40,114, 44, 45, 45,117, 58,157,142,103,102,102,102, 46, 18,137, 2, 1, 92, 5,240,
-160, 58,156, 55,111,222, 76, 89,191,126,125,156, 86,171,173,183,113,227,198, 11,114,185,252, 15, 66, 8, 17, 10,133,214,114,185,
-188, 61,128,243, 0, 30, 87,183,172, 20, 69, 49,197,211,130,101,173, 88, 66,161, 16,132, 16,147, 4,214,147, 39, 79, 46,207,159,
- 63,191, 65,157, 58,117,176,126,253,250, 76, 51, 51, 51,243,143, 63,254,152,159,147,147, 67, 42,179, 96,169,213,106, 9, 56, 84,
- 57,182, 40,178,242,246, 42,246,185, 42, 37,178,246, 1,200,126,203, 2,245, 21, 33,229,234,234,250,138,168, 42,189,173, 58, 2,
-203,104, 52, 66, 40, 20,130,207,231,195, 73,161, 40, 17,115, 44,203, 34,230,241, 99,100,101,101,149,132,105,168,162,141,243, 8,
- 33,232,215,175,159, 73,199,237,223,191, 63,206,159, 63,143,170,166, 19, 75,175,248,171,106,208, 92, 44,152, 40,138, 50,121, 21,
-161,139,139, 75,141, 56,203,106,145,127,165, 5, 75,149, 89,184, 96,211,129, 91, 51, 84,185,198,253,226,150,207,191,152, 51, 7,
-236,140,142,238, 39, 93,228,162,206,190, 84, 34,180, 63, 5,131, 88,188,124,216,176,249, 42, 16,185, 19,178, 4,174,248, 61, 50,
- 57,153, 18,240,150, 84,118,192,236,236,236, 73, 63,252,240, 3,239,248,241,227,125, 22, 46, 92,104,229,237,237,141, 65,131, 6,
- 65,167,211,225,238,221,187, 24, 61,122,116,102, 90, 90,218,134,236,236,236,197,166,158,132,157, 5,255,219,149, 95,119,182,165,
-152,124, 32, 55, 2,224, 91,194,206,198, 28,119,194, 47, 0, 57,225, 0, 37, 4, 40, 17,130, 26,251,160, 97,125, 79, 31, 66, 72,
- 48,203,178,151,222,133, 11, 48,106,212,168, 55, 38,174, 74, 11, 34, 0,117,222,100, 57,139, 69,214,151, 95,126,121,156, 97, 24,
- 89, 77, 56,194,194,194,104, 0,244, 27,236, 28, 95, 0, 24, 88,209,118,157, 78,119, 8, 64,181,131,204, 26, 12,134, 25, 81, 81,
- 81, 24, 55,110,220,152,193,131, 7, 75,189,189,189,225,230,230,134,152,152, 24, 68, 71, 71, 99,221,186,117, 26,134, 97, 54,103,
-103,103,127, 85,205,242,210, 0, 54, 20,189,222, 84, 29, 48, 0,126, 46,122,189, 17,124,246,217,103,247, 30, 63,126,156,233,236,
-236,220,140,199,227, 53,192,203, 64,145, 73, 69,199,120, 92, 19,206,209,163, 71,223,142,141,141, 77,119,114,114,106, 38, 20, 10,
- 61,139, 56, 19, 1,108,174, 33,103,198,157, 59,119, 60,155, 54,109,202,240,120, 60, 86, 32, 16,176, 69, 15, 67,150,207,231,179,
-132, 16,246,196,137, 19, 18, 0, 85,250, 92, 38, 36, 36, 76,216,186,117, 43,107,102,102,214, 44, 63, 63,127, 16,128,109,106,181,
-186,105,118,118,118,165, 22, 44,141, 70, 35,230,244, 83,149,237,243,131, 10,126, 79, 1, 16,252, 46,148,113,254,252,249,216,176,
- 97, 3,170,138, 64,126,232,208, 33,160,138, 41,194,226,182, 82,236, 95,165,211,233, 16, 21, 21, 5, 66, 72,201,247,210, 65, 70,
-105,154,174, 52,210, 59,195, 48,180, 78,167,195,158, 61,123, 76, 18, 89,187,118,237,130, 70,163, 1,195, 48, 38,245,179, 69,129,
- 73,145,149,149, 85, 18, 58, 33, 32, 32,160,100,187, 94,175,175,118,125,242,120, 60,120,123,123, 35, 61, 61, 29,118,118,118, 0,
- 94, 78, 11,150,136,207,130,130,255, 76,251, 39,149, 93,220,210,152,219,206,221, 82,195,167, 14, 52,114,102,218, 5,185,137, 97,
-103, 37, 1, 79, 32, 70,174,134, 32, 74,165,193,165, 7,185,241,180,145, 13,249,238,143,103, 38, 5,136, 35,132, 52, 87, 40, 20,
- 95,211, 52, 93,159,162, 40, 25,203,178,249, 60, 30,239,150, 74,165,154,203,178,236,253,234,156,132,149, 57,239,177,181,156,103,
- 41, 16,137, 88,218,200, 0,160, 0,138, 2, 8, 5,128, 87,244,254,242,187, 90,173, 23,210, 12,217,159,146,150,254,217,219,174,
-252, 54,109,218,156, 44, 40, 40,248,199, 69,114,151, 74,165,179,121, 60, 94,215,127,123,154,152, 38, 77,154, 4, 73,165,210,175,
- 25,134,105,162,209,104,156,164, 82,105, 10, 33, 36, 60, 47, 47,111,209,173, 91,183,174,113,143,207,183,135, 55, 25,201,189, 44,
-138,147, 61,219,217,217,121,221,185,115, 71, 82,218,130, 85,186,191,172,206,170, 50, 14,239, 30,124,125,125,175,239,220,185, 51,
-200,213,213,149, 42,118,184,166, 40,170,228, 85, 60,141, 85,108,109,185,118,237,154,241,243,207, 63,191,122,251,246,237, 54, 21,
-113,214,173, 91,247,228,233,211,167,223, 43,109,161, 42, 22, 82,101, 63,211, 52,141,194,194, 66,204,158, 61,251,212,227,199,143,
-203, 77,149,227,227,227,179, 98,230,204,153, 19,186,119,239, 78, 81, 20,245,127, 62, 87,101,253,176,244,122, 61,246,239,223,207,
-108,217,178,101,213,195,135, 15, 43,156, 34,108,220,184,113,252,173, 91,183, 92,138, 67, 38,148,125,149, 93, 81, 11, 0,205,155,
- 55, 79,186,126,253,186,242,239,228,252,207, 8,172,162, 14,133, 76,235,224,214,151,128,234, 67, 17,198, 31,132,136, 24, 22,209,
- 4, 56, 41,146,232,214,206,254, 93,165, 46,179,191,255,155,142,200,203,113,114,156,111,131,147, 16, 66,153,146,122,134,171,207,
-127, 15,103,221,186,117, 31, 63,126,252,216,179, 18,158, 18,129,197,213,231, 63,143,211,222,222, 94,110,111,111,255, 7, 69, 81,
-110, 21, 37,119, 46, 45,174, 25,134,137, 75, 73, 73,233,152,146,146, 82, 88, 17,167,139,139,139,135, 68, 34, 89,195, 48, 76, 83,
- 83,146, 61, 83, 20,117, 67,163,209,124, 94, 58,217,115,105,206, 55,181,138,176,108, 57,235,215,175,255,228,198,141, 27, 30, 82,
-169,180,100,234,178,116,187, 46,139,103,207,158,225,227,143, 63,126,126,251,246,109,247,191,146,243,223,134,106,229, 34,100, 95,
-214,216,158,162, 23, 7, 14,255, 25,188, 78, 94, 63, 14,255, 76,168,213,234, 44,123,123,251,124,141, 70, 35,208,106,181, 2,163,
-209,248,202, 3, 78, 42,149,166,113,181,244,207, 69,145,101,179,217,155,228, 44, 18, 74,157,223, 20,223, 95, 21, 7, 43, 43, 43,
- 43,164, 73,147, 38, 39,248,124,190,184,172,248, 41, 79, 12,209, 52,173,201,200,200,232,250,119,115,254,167, 4, 22, 7, 14, 28,
- 56,252, 87,144,152,152,216,140,171, 5, 14,255, 70,168, 84,170,104, 0,110,239, 58,231, 63, 29, 20, 87, 5, 28, 56,112,224,192,
-129, 3, 7, 14,156,192,226,192,129, 3, 7, 14, 28, 56,112,224, 4, 22, 7, 14, 28, 56,112,224,192,129, 3, 39,176, 56,112,224,
-192,129, 3, 7, 14, 28, 56,212, 24,255, 27, 0, 30,206, 65, 61,139,248,242,231, 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, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,
+120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, 42,
+ 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, 7,
+228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, 8,
+ 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33,115,
+253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153,
+ 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, 0,
+ 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,
+101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,
+183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70,242,
+ 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23,
+ 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120,206,
+ 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, 44,
+ 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243,112,
+248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249,126,
+ 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71,252,
+183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, 37,
+210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226,247,
+ 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, 94,
+ 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, 96,
+ 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52,192,
+ 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218,136,
+ 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84,
+ 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12,181,
+ 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15,218,
+143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26,176,
+ 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168,
+ 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, 44,
+ 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,210, 70,210,110, 82,
+ 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,228, 51,228, 27,228,
+ 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50, 65, 85,163,154, 82,
+221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,165,173,162,149,211,
+ 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,119, 12, 13,134, 21,
+131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,235,152,231,153, 15,
+153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170, 11, 85,243, 85,203,
+ 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169, 59,168,135,170,103,
+168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99, 25,179,120, 44, 33,
+107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67, 51, 74, 51, 87,179,
+ 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41, 27,166, 52, 76,185,
+ 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,251,129, 14, 65,199,
+ 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,165, 27,161,187, 68,
+119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,167,245, 71, 12, 88,
+ 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165, 97,149, 97,151,225,
+132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33, 38, 75, 77,234, 77,
+238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,155,231,155,215,155,
+223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165, 88, 85, 90, 93,179,
+ 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,183, 25,176,229,216,
+ 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7, 13,135,217, 14,171,
+ 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,207,216, 51,227,182,
+ 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,155, 27,198,221,200,
+189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,159,204, 52,159, 41,
+158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,231, 35, 47, 99, 47,
+145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89, 95,204, 55,192,183,
+200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,129, 65,129, 91, 2,
+251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,193,173, 33,104,200,
+236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,133,135,133, 87,134,
+ 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,175, 45, 74, 53, 42,
+ 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,174, 54,110,108,190,
+223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46, 18, 44, 58,150, 64,
+ 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209, 54,209,136,216, 67,
+ 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188, 76, 13, 76,221,155,
+ 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,102,118,203,172,101,
+133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,215, 42, 7,178,103,
+101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194, 18,225,146,182,165,
+134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,138,182, 42,109,213,
+ 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,125,235,220,215,237,
+ 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,229, 27,135,111,202,
+191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,110, 13,217,218,180,
+ 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,206,205, 59, 63, 84,
+164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,247,253, 62,201,190,
+219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,113,237,199, 3,210,
+ 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,119, 45, 13, 54, 13,
+ 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,118, 29,103, 29, 47,
+106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,156, 52, 60, 89,121,
+ 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,231, 99,206,223,106,
+ 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184, 87,154,175, 58, 95,
+109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233, 27,158, 55,206,221,
+244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,206,203,187,217,119,
+ 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,160,243,209,220, 71,
+247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,114,253,233,252,167,
+ 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,151,147,191,109,124,
+165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,239,163,223, 15, 79,
+228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,219, 0, 0, 0, 6,
+ 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66,
+ 40,155,120, 0, 0, 0, 7,116, 73, 77, 69, 7,217, 6, 17, 13, 13, 30,217,121,242, 96, 0, 0, 32, 0, 73, 68, 65, 84,120,218,
+236, 93,119,120, 20,213,226, 61,119,202,246, 77, 39,141, 4, 66, 71,186, 16, 64, 9, 96,144, 14,242, 80,121,162,128,160,226,243,
+ 61,236, 15,177,128, 29, 20,136,250, 20,108,136,242, 84,120, 32,250, 19, 21, 36, 54,154,116, 8, 16, 68, 8,197, 8, 18, 8, 37,
+132, 68, 82,183,239,206,253,253,145,157,113,179,217, 50,193, 4, 81,238,249,190,249,182,204,204,153,219,231,220,115,239,157, 1,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,174,100,116, 97,156,140,147,113, 50, 78,198,201, 56, 25,
+ 39,227,188,210,192, 93,196, 57,180, 17,194, 65,189, 91,230,159,128,179,177,226,222,144,220,153, 94,190,231,255, 36,225,204,188,
+140, 57,105, 35,240,210, 70, 40, 83,180, 17,202,125, 99,115,162,145,226, 78, 27, 33,223,159,255,147,132, 51,243, 50,228,244, 47,
+ 63, 13,193, 27,168, 76,210, 6, 14, 39,109,132,112, 54, 22, 39, 26, 41,238,180,145,242,190, 33,239, 77,151, 45,132,203, 64, 96,
+ 0, 0,241,225, 39,151, 49, 39, 26,137,179,161,195,183,177, 17, 56, 73, 35,148,129,231,189,188,155, 26, 80, 16,201,113,111,136,
+ 60,162,141,192,219,152,226,170, 33,203,125, 99,115,162,145, 56, 73, 3,167,231,198, 70,224,108,168,186, 68, 27,161, 46, 53, 70,
+153,247, 47, 63, 13,193,235,207,217, 16,117,201,159,179, 33,202,253,165,224, 68, 35,113,146, 70, 72,211,198,184, 55, 93,182,224,
+ 46, 50,177, 26, 3, 20,192,128,203, 92, 8, 53,150,200,108,104, 23,167, 49, 57, 27, 50,143,158,111,132,222,204,128, 6,204, 35,
+ 18, 32,188, 13,201, 73, 26, 41,156, 13,145, 79,164, 17,234, 18,105,132,186, 68, 26,161,220, 95, 42,206,134,204,163,134,170, 75,
+164,145,234,146,127,124,159,111, 96, 78,210, 72,225,108,136,124, 10,196, 73, 26,129,179, 49,226,158,121, 25,243, 94,246, 16, 46,
+147,112, 52,134, 16, 66, 3, 58, 25,141,233,226, 52,150,211, 70, 26, 41, 93, 55, 53, 32,215,198, 70, 8,231,166, 6,236,209, 6,
+ 18,132,207, 93,230,117,154,213, 37, 86,151, 46,183,186, 68,131,116, 86,158,187,204,202,121, 67, 58, 66,161, 56,126,111, 62,209,
+ 32, 29, 53,218,128,225,108, 72,215,154, 92,162,250,116,217,129,187,140,194,210,208,243,123, 40, 26,199, 21,107,172,120, 55,100,
+ 56, 7,252, 73,226,222, 24,225,124,190,145,226,254,103, 73, 83, 86,151, 88, 93,186, 28,235,146,111,153,108,168,176, 54,116, 57,
+ 15,196,217,144,243,144, 26,178,140, 54,118,220,233,101,158,247,127, 10, 92,140,131,213, 88,189,227, 63, 3,103, 99,112, 55, 70,
+ 56, 55,253, 73,210,180, 49,194,249, 60, 26,118,200,145, 52, 66, 88, 27,115,152,176, 49,202,102, 99,150,119,114,153,135,243,207,
+146,239,141, 17,206,134,170, 75,164, 17,234, 61,105,132,246,169, 49,203,102, 99,114, 54, 4,119, 99,132,179,177,242,158,129,129,
+129,129,129,129,129,129,225, 74, 69, 80, 37,217,189,123,247,108,189, 94,223, 38,216,126,139,197,114,246,199, 31,127,188,158, 37,
+ 33, 3, 3,131, 10,112,248,109, 74,130,132,198, 25,226, 96, 96, 96, 96,184,108, 16,116,136, 80,163,209,180,218,188,121,115, 59,
+ 73,146,224,118,187,225,241,120,224,241,120,224,118,187,225,112, 56,240,247,191,255,189,222,195,139,221,186,117,219,204,113, 92,
+139,250,156,227,241,120, 78,238,223,191,191, 95,176,253, 9, 9, 9,219, 1,180, 34,228, 55,173, 72, 8,129,252,219,247,127,142,
+ 83,166,156,157, 57,117,234, 84,143, 80,156,132,144, 86,190,124,254, 92, 1,120, 67,114,182,111,223,126,143, 32, 8,169,129,206,
+ 15,198, 45, 73,210, 47,121,121,121, 25,172,152, 94, 26,116,235,214,109, 51,207,243,245, 46,159, 63,254,248, 99,208,242,217,185,
+115,231, 31, 56,142,107, 26, 40,143,131,148, 39,222,227,241,252,228,229, 12, 40, 64,146,146,146,182, 83, 74, 91,169, 44,151, 50,
+ 78,157, 58,117,170,103,184,122, 20, 42,156, 1,184, 67,114,250,138,171,148,148,148,172,248,248,248,123, 45, 22,139, 13, 0,229,
+ 56,142,202,220, 50,175,199,227, 57,127,228,200, 17,246,240, 66, 6, 6,134,191,182,192,146, 36,137,179,219,237,200,207,207, 7,
+165,117,219,121,142,227, 60,245,189, 24,165,180,221,250,229, 75, 19, 12,241,137,240, 56, 29,208, 53, 73, 80,184,203, 14, 29,128,
+199,233,132,228,114,162, 73,207,107,229, 48, 96,192,128, 1,124, 24,218,212,169, 83,167, 38, 68, 68, 68,192,102,179,193,102,179,
+193,110,183,195,110,183,195,225,112,192,225,112,192,233,116,194,233,116,194,229,114,193,110,183,227,192,129, 3, 33,195, 78, 8,
+ 73,125,232,161,135, 20, 78,187,221, 14,155,205,166,112,217,237,118,133,211,225,112,192,110,183,227,224,193,131, 33, 57, 5, 65,
+ 72,221,187,119,111,130, 70,163, 1,165, 20,146, 36,129, 82, 90,107,243, 75, 43,244,237,219,215,201,138,232, 37, 69,187,149, 47,
+205, 78,208,197, 53,129,228,114, 33,238,234,116, 37, 47, 78,175,255, 22,146,203, 5,201,229, 66,218,223,198, 40,255,103,102,102,
+134, 43,159,105,159, 61, 59, 35, 90, 19, 17, 1,183,205,134,150,163,110, 86,118,228,189, 51, 15,212,229, 2,117, 59,209,245,145,
+167, 1, 0, 37, 37, 37,214, 14, 29, 58,156, 65,232,213, 91,169,199,143, 31, 79,144,195,224, 47,212, 57,142,171,181,109,221,186,
+ 21, 19, 39, 78, 12, 23,247,212,167,158,122, 42, 65,174, 35,190,101,221,229,114, 41,245,199,237,118,195,229,114,193,225,112,224,
+135, 31,126, 80,229, 92, 37, 39, 39,191,212,191,127,255,201,203,150, 45, 51,125,241,197, 23,166,150, 45, 91, 66,163,209,128,231,
+121,240, 60, 15,142,227,192,243, 60,110,188,241, 70, 54, 55,131,129,129,225,175, 47,176,156, 78,231,241,161, 67,135, 82, 0,112,
+ 56, 28, 41, 90,173, 86,227, 39,192,154,102,100,100,252,228,127, 94,184,161, 67, 67,124, 34, 62,104, 25, 11, 0, 24,123,172, 84,
+185, 41,172,184,174,187,114,204,248, 19,229, 53,199, 26, 12,224, 56,142,132, 17, 67, 48,155,205, 24, 58,116, 40,180, 90, 45,210,
+211,211,161,209,104, 32,138, 98,208, 77, 13, 76, 38, 19,102,206,156, 41,139, 35,152,244, 58,220,215,255, 90,232, 9,197, 7, 63,
+ 30,129,221, 35, 65, 16, 4, 8,130, 0, 81, 20,235, 56, 82,129,160,209,104,112,224,192, 1,240, 60, 15, 65, 16,106,125,242, 60,
+143,213,171, 87,227,150, 91,110, 1,207,243, 48, 26,141, 0,155, 12,120,201,161,139,107,130,207, 50,107,140,200,219, 11, 43,149,
+255,191, 29,247, 55,229,251,164,211,213, 32,132, 64,163,209,168,203,247,136, 8,124,125,203, 8, 0,192,152,252, 98,165,204,236,
+159, 55, 27,162, 86, 11, 65,212,160,203,212,167, 80, 82, 82, 98, 29, 51,102,204, 86,189, 94,255,157,138,206, 10, 78,158, 60,169,
+112,137,162, 88,167,220,115, 28,135, 15, 63,252, 16, 39, 78,156, 80, 21,119,171,213,138, 57,115,230, 40,113, 11,196,235,251, 93,
+ 69,220,185,164,164,164, 23,251,247,239, 63,113,217,178,101, 49,132, 16, 44, 88,176, 0,130, 32,224,134, 27,110, 64, 92, 92, 28,
+214,172, 89, 3,141, 70,131,199, 30,123,140, 21, 62, 6, 6,134, 43, 67, 96,253,248,227,143, 35,228,239,215, 92,115,205,225,173,
+ 91,183, 94,229, 99,229,195,237,118,107,220,110,119, 59,121,216,208,237,118,195,110,183, 99,252,248,241, 33,123,244, 30,167,163,
+142, 64, 10, 38,156,212,194,225,112, 96,236,216,177,138,136, 9, 37,174,212,220, 24, 8, 33,176,219,237, 16, 4, 1,173,155,199,
+227,233,177, 61,209,151,167,176,150, 2, 40,169,198,157,201, 2,246,165,182,195,155, 39, 75,113,162,162, 10,130,160,110,180, 84,
+146,164, 90,130,202,255,251,194,133, 11, 49,110,220, 56,240, 60, 95,103, 8,137,225,210, 64,114,185,194,150,195,250,230,141,219,
+102, 3, 0,240, 62,130, 92, 20, 69,104,245,122,240,162, 8, 65,171, 65, 73, 73,137,117,200,144, 33, 59, 13, 6,195,146,164,164,
+164,211,167, 78,157, 10, 89, 62, 41,165, 16, 69, 17,130, 32, 4, 45,243, 31,126,248, 33,150, 46, 93,138,222,189,123,171, 42,243,
+ 14,135, 3, 26,141, 6,179,103,207,174,179,255,157,119,222,169, 35,176,194,128, 0,224, 18, 19, 19,239, 91,190,124,121,164,124,
+253,184,184, 56,136,162,136,206,157, 59, 35, 34, 34, 2, 91,183,110,133,199,227, 81, 45, 86, 25, 24, 24,174, 76, 80, 74, 69, 0,
+ 87, 3,136, 7,224, 1, 80, 9, 32,218,231,144,243,222,207,120,249, 55, 33,100,119, 0,158, 94,222, 99,206, 19, 66,118,251,252,
+118, 0,208, 6,248,191, 20,128,193,187,217, 1,108, 7,208,217,231, 58,242,121,240,191,174,172, 12, 50, 81,243,160,186, 1, 8,
+240,240, 59,121,184,240,200,145, 35, 1,135, 11,253, 2, 31,178,149,212, 53, 73, 80,156,171, 79, 91,199, 41,255,143, 43, 40, 83,
+ 26,216,175,123,183,133,206,108, 66,207,231, 95, 9,155,232,242,141,161,184,184,184, 78,207,251, 98, 5, 22, 0,184, 92, 46, 24,
+ 12, 58,124,255,238,117, 56,251,139, 27,179,179, 11,177,106,215,113, 8,130,128, 81, 87,181,197,223,221, 64, 86,172, 30,255,114,
+123,224,148,168,170, 27, 24,165,180,142,184,242, 21, 89,132, 16,229, 63,118,179,249, 99, 16,119,117,186,226, 92, 45,107, 22, 81,
+199,181, 2,128, 85,221, 91, 64, 31, 97, 70,231,135,167,171, 42,159, 45, 71,221,172, 56, 87, 95,165,183,130,160,209, 64,212,105,
+241,247, 31, 11, 1,212, 12, 11, 14,236,218,113, 83, 25,175, 93,124,199, 29,119,252,178,126,253,122,163,154,176,106, 52,154, 90,
+130, 45,144,184, 18, 4, 1, 46, 63,209, 24,170, 83, 17, 76, 56,201,245,170,158, 14, 22, 44, 22,139, 99,213,170, 85,120,243,205,
+ 55, 17, 23, 23,135,161, 67,135, 34, 41, 41, 9, 43, 86,172, 0,165, 20, 15, 60,240, 0, 12, 6, 3, 12, 6, 3, 43,243, 12, 12,
+ 12,161,180,200,117, 51,102,204,232,153,149,149, 53,167, 79,159, 62, 31,111,223,190,125, 57, 33, 36,219, 71,123,140,242,182,101,
+217,242,111, 74,105, 47, 95,145,229, 21,105,241,132,144,108,249,120,223,223,242, 39,165,116, 48, 0,173,252,123,198,140, 25,157,
+179,178,178,230, 76,159, 62,253,201,185,115,231,106,102,204,152,209, 53, 43, 43,107,142,124,157, 64,225,240, 21, 88, 33,159, 2,
+236,116, 58,143, 15, 30, 60, 88,213,138, 31,171,213, 90, 20, 70,128, 5,116, 6,124, 93, 1, 93,132, 25,134,136, 8, 16, 78, 93,
+131,235,114,185, 32, 8, 2, 56,142,195,218,181,107, 97, 48, 24, 48,114,228,200,139, 30, 34,148, 69,155, 86,171,129, 16,205,225,
+142,215,246,224,252, 5,139, 50, 36,184,174,160, 16,187, 12, 6, 60,221,177, 43,204, 85, 5,168,176, 59,126,151,131, 53,110,220,
+ 56,216,108, 54,112, 28,167,252,199,113, 92, 88,177,202,208,120, 8,182, 8,129, 16, 2,125,100, 4,244,102, 51,120,129, 87,197,
+ 69, 41,253, 77, 8,105,181, 16,117, 90, 8, 26,141, 34,174,134, 12, 25,178,179,140,215, 46, 62,125,250,244, 78, 0,122,181, 2,
+ 75,118,176, 66,137, 43, 65, 16,224,116, 58, 85,137, 23,187,221, 14,141,230,183,153, 0, 39, 79,158, 12, 41,176,194, 69, 27,128,
+ 68, 8,145, 90,181,106,165,156,147,152,152,136,232,232,104, 72,146, 4, 73,146,160,215,235, 97, 48, 24,106, 93,151,129,129,225,
+138, 69, 40, 45,162,203,202,202,154,227, 43, 96,252, 5,141,175,112,242, 19, 81,190, 34,173,115,152,182, 63,219, 95, 52,201,215,
+ 37,132,100,207,157, 59,119, 84,152,112,156,247, 23, 88,114,131, 24, 16,190,195,133, 13,117,243, 10,117, 3, 51, 68, 69, 66,107,
+ 50,193, 59,253,138,134,227,114, 58,157,202,156,147,123,239,189, 55,104,175,222,119,110, 74, 56, 56, 28, 14,240, 28, 15,232, 90,
+ 66, 66,142,114,179, 82, 54,141, 6, 5,205,187,129, 20,157,134, 32,168,155,239, 47, 59, 88,178,136,122,224,129, 7,176,104,209,
+ 34,101, 98, 50, 0,240, 60,143,246,237,219,227,216,177, 99,172,170,253, 1,160,148,134, 29,182,214, 71, 70, 64,103, 54,131, 87,
+225, 52,202,251,149, 57, 76,122, 29,120,141, 6,130,166,102, 88,112,244,232,209,155,202,202,202, 22,119,234,212,233,103,212, 60,
+198,128,168,173, 63,129,202,249,226,197,139,107,137,171,250, 56, 88,114, 61,242, 69,160,225,194, 49, 99,198,168,117,176, 40, 33,
+132,138,162,136,193,131, 7,163,107,215,174, 88,181,106, 21, 36, 73,194,253,247,223, 15,131,193,128,249,243,231,195,237,118, 35,
+ 43, 43,139, 57, 88, 12, 12, 12,161,238,249,214,233,211,167, 63, 73, 8,201,246, 58, 73,121, 33,132, 84,160,182,189,151,159, 72,
+ 59, 31,228,184, 81,129, 68,150,239,119, 25, 51,102,204,232,236, 31, 14, 95,199,204, 87, 96, 53,214,251,219,106,161,236,208, 1,
+101, 66,187, 60, 44, 72, 8,193,183, 25, 87, 65,107, 54, 65,111, 54,163,223,202, 45, 74,175, 25, 47,190,170,202,193,146,133, 83,
+105,105,105,216, 33, 66,181,174, 24,175, 17,177,211, 44,130,138,124,173, 27,150, 40,138,224, 4, 17, 5,241,237, 64,132, 53, 16,
+ 60,110, 85, 55, 7,217,201,240, 93, 61,117,199, 29,119,128,227, 56, 69,100,117,239,222, 29,126,121,194,112, 9,113,102,195,119,
+248,230,182,154,186,234, 59, 44,152,221,187, 13,116, 17,102,232, 76, 38,100,174,222,174, 12,231, 98,254,123, 97, 57,143,188,255,
+ 54,242, 94,159, 11, 65, 20,113,243,222, 2,197,185,234,123, 85,219,157, 14, 83,228,226,147, 39, 79,238, 4,192,221,118,219,109,
+209, 61,122,244, 80,101,139, 17, 66,106, 77, 60, 23, 4, 33,160,184, 18, 4, 1,110,183, 91, 85,220,157, 78,167, 42, 39, 73,118,
+177,212, 52,148,114, 58, 69, 69, 69, 33, 34, 34, 66, 89, 65, 43, 59, 87,242,252, 77,181,245,146,129,129,225, 47,143, 96, 90,196,
+ 62,119,238,220,188,185,115,231, 42, 78,146,191,131, 21,228,190,123,131, 87, 76,197,203,226, 12,128, 61,208,252,172, 64,174,152,
+191,240,242,253, 47, 43, 43,107,142,127, 56,124,135, 37, 3,206,206,238,214,173,219, 55, 70,163,177,165,218,212,168,207, 67, 71,
+ 61, 78,103,157,158, 56, 33, 4,122,179, 25,218, 8, 51,116,102,115, 80,151, 43,216,141, 70, 30, 34,228,121, 94,185,233, 44, 89,
+178, 4,102,179, 25,119,221,117,215, 69, 77,114,175, 17, 88, 60,190,212,228, 3, 26,161,206, 77,139, 23, 69,156,140,106, 6, 78,
+ 20, 33,120,212, 57, 4,229,229,229,224,121, 30,207, 61,247, 28,178,178,178,148,101,244,190, 75,235,125, 93, 15,134, 75, 15,223,
+ 73,238,181, 92,213,136, 8,165,124,250,254, 31,110, 78, 34, 33, 4,240,184,107, 86, 11,234,180,138,184, 26, 61,122,244, 38,135,
+ 41,114,241, 85, 87, 93, 37, 59, 87,156,209,104, 12,187,106,214,183,110,200, 66,199, 95, 92,201, 46,169,252,221,229,114,169, 42,
+243,178,192, 90,180,104, 81,200,206,136,124, 93,181,229,148,227, 56,108,222,188, 25,123,247,238,197,189,247,222, 11,131,193,128,
+ 55,222,120, 3,110,183, 27,179,102,205,130,193, 96,128, 86,171,101,133,143,129,129, 33, 20, 98,100,129,227, 21, 73,181,156, 37,
+239,220,169, 81,190,191, 3, 57, 92, 94,199,105,115,152,246,240, 43,175, 48, 11, 8,217, 73,243, 59, 39,219, 95,156, 9,126, 78,
+ 9, 1, 0,173, 86,219,114,219,182,109,237, 36, 73,130,199,227, 65,168, 79,135,195,129, 91,111,189, 85,245, 67, 71, 37, 87,141,
+192,226,252, 86,202,233, 34, 35,160, 53,255,118, 3,243,185,137,133,109,197,101, 7,203, 87, 96, 61,247,220,115, 16, 4, 1,139,
+ 22, 45, 2, 0, 60,250,232,163,245,118,176,168, 4,108,247,108, 68,211, 5,221, 64, 23,235,113,110,243, 97,136,162,136,164,222,
+ 67, 32,245,252, 59, 74,181,145, 48,121,231, 85,169, 25,118, 44, 45, 45,197,137, 19, 39, 64, 8,193, 35,143, 60, 18, 82, 92,173,
+ 93,187,150,205,193,250, 3, 5, 22,199,243,181,242,195,183,124,250,137,175,240,227,100,110, 55, 68,157,174,214,106,193,178,178,
+178,197, 39, 79,158,204, 1, 64, 38, 78,156, 24,109, 52, 26,241,254,251,239, 91, 0,104, 86,174, 92,105, 8,199,233, 59,143,207,
+223,185,242, 23, 88, 30, 79,248, 33,108,185, 83,161,198,237,173,143,192,146,203, 55, 33, 4, 30,143, 71,113,174, 92, 46,151,242,
+ 91,167,211,177,130,199,192,192, 80, 71,139,248,225,188,223, 60, 39,226,231, 52,157, 15, 36,172,124,135, 3,229,239,132, 16, 87,
+ 0, 94,135,223,208,161,255,255,242,103,233,220,185,115,191,151,157, 43,159,255,107,133, 35,168,131,197,113, 28,236,118, 59, 14,
+ 29, 58,164,182,135,170,250,161,163,113,233,215, 96,252,137,114, 16, 66,176,166,127, 39,232,205,102,104,204, 38,100,124,182, 81,
+105,176, 11,178, 30,131,198,100, 70, 92,191, 33,170, 26,112,143,199, 83, 71, 96,149,149,149, 65, 20, 69,188,248,226,139,224, 56,
+ 14, 47,189,244, 18, 82, 82, 82,112,246,236, 89,100,102,102,170,186,217,112, 18, 7,253,157,177,208,255, 43, 2,220,189,109,208,
+249,111,255, 66,121,101, 11,236,119,152,208,161, 58, 31, 49, 27,158,135, 83,114,171,122, 76, 3, 33, 4,110,183, 27,223,127,255,
+ 61, 68, 81,132,219,237, 86,110, 62,148, 82,229, 41,249,242, 67, 29, 95,122,233, 37, 86,213,254, 0, 52,187,225, 38,220,113,198,
+ 2, 0,248, 38,227, 42,232, 76, 38,104, 35,204,232,247,197,102,165,124,254, 50,103, 26, 52, 38, 51,162,123,245, 87,197,217,241,
+254, 71,209,225,190,105, 40, 41, 41,177, 14,238,222,121,115, 57,175,251,176, 75,151, 46,202,156, 43,163,209, 8,189, 94, 79, 80,
+251,117, 50, 97, 69, 11,199,113, 97,197,149,252, 93,109,167,194,127, 21,110, 40,129,165, 22, 28,199,225,174,187,238, 66,114,114,
+ 50,222,124,243,205, 90,206,213,147, 79, 62, 9,151,203,133,249,243,231,179,194,199,192,192, 16,170,221,219,173,246, 88, 74,105,
+ 47, 31, 49,181,251, 98,120,235,115,189, 96, 8,216,242,218,237,246,130, 65,131, 6, 33,200,190, 20,157, 78, 87,171,117,149, 31,
+ 58, 26, 96,168,176, 11,128, 3,126, 17,255,109, 88,208, 59, 89, 88,235, 55,236,162, 53, 71, 64, 52,153,193, 5,110,196,235,112,
+ 6,114,176,228,161,147,242,242,114,136,162,136, 55,223,124, 19,145,145,145,176,219,237,129,122,222, 1, 57,121,158,135,229,132,
+ 5,199,159,217, 15,157,233, 40,218, 15,137, 64,132,120, 12,109,183,172,132,219,237, 0,124,134, 12,213,112,182,111,223, 30,207,
+ 61,247, 92,157,199, 51, 4, 67,122,122,122, 88,206, 6, 0,227, 12, 34, 98,116, 17,102,232, 35, 34,130,150, 79, 33,240,179,155,
+106,113,202,251,101,231,170, 74, 99,252,240,228,241,227, 57, 0,184,137, 19, 39, 70, 25,141, 70, 44, 92,184,208, 2,128,123,225,
+133, 23,140,105,105,105,188,154,112,114, 28,135, 37, 75,150,212,153,115, 21, 76, 96,169, 9,167,219,237,174, 35,176,198,142, 29,
+ 91,231, 65,163, 33, 28,172, 58,225,148,231, 96, 53,105,210, 4, 70,163, 81,121,237,150, 94,175,135, 94,175, 87,158, 14, 31, 98,
+168,149,149, 79,198,201, 56,175, 28,206, 75, 46,198, 26, 19, 1, 5,214,190,125,251,134, 7, 59, 33, 35, 35, 35,127,219,182,109,
+109,125,223, 77,232,118,187, 53,118,187,189,221,141, 55,222, 24,182,171, 44, 73, 18,116, 58, 29, 40,165,184,250,233,172,154, 46,
+ 60,247,219,144, 32,165, 20,209,125, 7,131,240, 60, 60, 30, 9, 46,151, 43,236, 42, 66,155,205, 86,107, 2,122,160,229,235, 85,
+ 85, 85, 33,159,243,227,207,105,181, 90,107,205,235, 34, 30,138, 95,214,173,168,187,154,208,123, 29,181,208,235,245,181,134, 77,
+ 84,218,165, 12,151, 8,242, 3, 60, 41,165,232,252,208,244, 26,167,136,231,106,237,143,234,213, 31, 68, 16, 33,213,204, 91, 10,
+183, 48,132,156, 63,127,222, 58,122,244,232, 77,148,210, 15,110,188,241,198,159, 80,243,176, 58,106, 54,155,117,162, 40, 74, 0,
+126, 5, 64, 47, 92,184, 16,117,250,244,105,201,102,179, 53, 15, 23,206,205,155, 55,227,232,209,163,232,209,163,135,226,124,202,
+155, 60,124,127, 49, 14, 86,160, 39,194, 7,123,146,123,125, 28,172,168,168, 40,104,181, 90,188,248,226,139,208,104, 52, 48, 24,
+106, 70, 65,231,207,159,175,164, 57, 3, 3, 3,195, 95, 9,245,126, 97,179, 36, 73,124,176,225,195,112, 67,133, 30,143,231,212,
+ 53,215, 92, 83,223,235,157, 11,115, 67, 60,181,101,203, 22,141,255, 11,105, 3,189, 0,215,231,191,176,156,187,119,239,214,132,
+ 56, 63,208,247,115,245,137,187,154,249, 43,110,183,251, 52, 43,162,151, 14,110,183,251, 84,239,222,189, 3,239,124,238,165, 96,
+249,122, 46,140,104,249,185, 93,187,118,103,204,102,243, 87,137,137,137,165,219,182,109,139,235,213,171, 87,156,239, 49,189,122,
+245, 74,246, 59,205,129, 16, 43,122, 9, 33,167,238,184,227, 14, 77,152,242,232,255,253, 84,152, 78,197,169,188,188, 60, 77,160,
+242, 30,236,147, 82,122, 74, 69,178,158, 24, 49, 98, 4, 23,168, 14, 5, 72,203,243,172, 20, 50, 48, 48, 92,177, 2,203,102,179,
+ 21, 14, 26, 52, 40,224,186,111,139,197,114, 50,212,185, 7, 15, 30,236,217,208, 17, 56,125,250,116,198,159,129,179, 49,226,206,
+112,249,231,209,193,131, 7,123, 3, 64,121,121, 57, 66,189,254,166, 62, 40, 44, 44,108,240,242,217, 24,156, 0,112,232,208,161,
+ 62,172,100, 49, 48, 48, 48,129,165, 2,106, 31,199,192,192,192,192,192,192,192,192,112,165,130, 99, 73,192,192,192,192,192,192,
+192,192,208,176, 32,168, 89, 9, 16, 8,245, 89, 29,208,229, 34,174,125,128,113, 50, 78,198,201, 56, 25, 39,227,100,156, 87, 28,
+103, 56,238,203,114,117,226,229,134, 46,140,147,113, 50, 78,198,201, 56, 25, 39,227,100,156, 87, 26,216, 16, 33, 3, 3, 3, 3,
+ 3, 3, 3, 67, 3, 67, 96, 73,240,135,129, 7,224,105, 40, 50, 74,105, 52,128, 96, 47,116,115, 16, 66,202, 46,146, 87, 11, 64,
+244,110, 0,224, 2,224, 34,132, 56, 88, 22, 50, 48,252,181,144,158,158, 62,153, 82, 58, 27, 53,111,129,122, 49, 55, 55,247, 45,
+150, 42, 12, 12, 13, 44,176, 90,183,110,189,135,227,184,212, 64, 47, 32, 14,246, 92, 28,143,199,115,234,200,145, 35,106,151,186,
+ 11,201,201,201, 99, 77, 38,211,245, 60,207,247,245,158,191,173,186,186,250,251,179,103,207,126, 10,192,125, 49, 17,106,217,178,
+101,164,205,102,187,149, 16, 50,193, 43, 16, 62,210,235,245,255,119,252,248,241,138,139, 76,163, 54, 73, 73, 73, 31,137,162,200,
+ 23, 22, 22, 94, 15, 0,205,154, 53,251,222,225,112,120,138,139,139, 39, 0, 56, 90, 79, 62, 78,163,209,100, 93,115,205, 53,253,
+182,108,217,242, 63, 0,239, 52, 80, 94,234, 56,142, 59, 17,104,135, 36, 73,105, 23, 33,172, 52, 0,162,230,207,159, 31,187,116,
+233,210,238,103,207,158,237, 10, 0,201,201,201,251, 39, 78,156,248, 3,165,244, 87, 0,229,132, 16, 39,171, 70,127,110,180,109,
+219,118, 15,199,113,169,245,121,150,156,247, 21, 85,167, 14, 29, 58,212, 51, 24, 39,207,243,169, 97,158, 71, 87,231,187, 36, 73,
+191, 28, 60,120, 48,224, 35, 35,218,181,107,183,131,231,249,150,225,194, 22, 40,156,193, 30,193,209,174, 93,187, 61, 60,207,167,
+214,151, 83,146,164, 95,242,242,242, 50, 26,146,243, 82,135, 19, 0, 50, 51, 51,117,213,213,213, 31,153,205,230,110,213,213,213,
+147, 37, 73,122,118,227,198,141,137, 28,199, 97,240,224,193,207,166,167,167, 31,215,233,116, 11,108, 54,219, 15,102,179,121,252,
+166, 77,155,236,172,198, 48, 48,252,254, 70,247, 92, 85, 85, 21,149, 33, 73, 18,117,185, 92,212,110,183, 83,171,213, 74,171,171,
+171,105,101,101, 37,173,168,168,160,229,229,229,180,180,180,148,118,238,220,217,255,161,139, 1,199,104, 83, 82, 82,186,180,111,
+223, 62,255,173,183,222,178, 23, 22, 22, 82,167,211, 73, 93, 46, 23, 45, 44, 44,164,111,191,253,182,189,125,251,246,249, 41, 41,
+ 41,193,198,119, 3,253,207, 37, 39, 39, 15, 73, 78, 78, 94, 62,108,216, 48,199,250,245,235,169,221,110,167, 22,139,133,174, 94,
+189,154, 14, 24, 48,192,145,156,156,188, 60, 57, 57,121, 8, 2, 15,139, 6,187, 86,247,150, 45, 91, 30, 61,117,234,148,103,203,
+150, 45,206,184,184,184, 47,227,226,226,190, 44, 44, 44,244,156, 60,121, 82, 74, 77, 77, 61, 10,160,123, 61,194, 9, 0, 55, 79,
+155, 54,173,224,248,241,227,150,204,204,204, 29, 62,255, 19,132,127,114,123,151, 64,206, 21,165, 52,145, 82,154,132,154,135, 83,
+214,217, 40,165, 73,222, 99,162, 85,114,154,142, 29, 59,150,154,152,152,152,229,117,170,106,241, 17, 66, 28,137,137,137, 89,199,
+142, 29, 75,165,148,154,234, 17,247,223, 3,198,217, 72,156, 87, 93,117, 85, 81,117,117, 53,165,148, 82,143,199, 67,157, 78, 39,
+181,217,108,212, 98,177,208,170,170,170, 90,245, 92,222,202,202,202,104,151, 46, 93,206,133,224, 60,103,177, 88,106,181, 29, 14,
+135,131,218,108, 54,106,181, 90,169,197, 98,161,213,213,213,181,182,170,170, 42,218,189,123,247,194, 16,156,103,229,112, 74,146,
+ 68,221,110, 55,117, 58,157,212,225,112, 80,187,221, 78,109, 54, 91,173, 77,254,175,119,239,222, 65,195,217,161, 67,135,115, 86,
+171, 85, 53,167,188,245,232,209,227, 76, 67,113,202,255, 93,125,245,213, 69,161, 56,109, 54,219,197,132,179, 48, 84, 89, 74, 79,
+ 79,255,252,248,241,227,212,106,181,210, 33, 67,134,216, 31,121,228, 17,234,241,120,104,118,118, 54, 29, 59,118, 44,189,231,158,
+123,104,105,105, 41,157, 49, 99, 6,237,209,163,199, 23,172, 30, 49,206, 70,230,188, 50, 28, 44,142,227, 96, 50,153,240,241,199,
+ 31, 7,124,253,140,255,247,180, 52,117, 38, 73, 98, 98, 98,207,212,212,212, 77, 43, 87,174, 52, 36, 36, 36, 40,255, 59,157, 78,
+ 68, 70, 70,226,174,187,238,210, 14, 30, 60,184,237,237,183,223,190,211,237,118,103,158, 59,119,110, 79, 40,190,164,164,164, 49,
+113,113,113,111, 77,157, 58, 53,113,244,232,209,136,137,137,169,181,127,212,168, 81, 24, 57,114,164,230,151, 95,126, 25,247,233,
+167,159,142,251,223,255,254, 87, 84, 85, 85,245, 96, 81, 81,209,231,161,120,141, 70,227,224,182,109,219,190,191,126,253,250,212,
+232,232,104, 52,109,218,148,123,230,153,103,186,180,110,221,218,144,156,156,204,157, 57,115, 6,159,127,254,121,235,137, 19, 39,
+174, 58,121,242,228,100,187,221,190, 94, 69,244,181,177,177,177,143,253,235, 95,255,138,171,172,172,116,239,221,187, 87,118,191,
+180, 58,157,238,217,107,175,189,182,199,198,141, 27, 63, 1,176,248, 98,156, 43, 74,105, 5,126, 27,202,147,225,146,247,171,113,
+178, 40,165,218,189,123,247,198,244,237,219,247, 11,187,221,222,227, 31,255,248,199,233, 87, 94,121, 69, 27, 25, 25, 25, 9,128,
+148,149,149, 93,152, 57,115,166,231,141, 55,222,120,162, 83,167, 78,131,182,109,219,118, 51,165,148, 13, 25,254,201, 97, 52, 26,
+177,122,245,234,128,175,153, 10, 84,231,163,163,163,195,190,141,192, 96, 48, 96,237,218,181,202,121,190,175,150, 10,244, 61, 58,
+ 58, 26,148,210,144,164,122,189, 30, 91,183,110, 85, 94, 3, 20,172, 93,146, 63,141, 70, 35, 8, 33, 92, 56,206, 77,155, 54,133,
+229,146, 63,205,102, 51, 80, 51,196, 31, 54,156,225,226, 44,127, 55,153, 76, 97,211, 83,167,211, 41,156,190, 28,193,126,155, 76,
+ 38,132,235,180, 25, 12,134,110,137,137,137,200,201,201,193,243,207, 63,175,237,220,185, 51,242,243,243,193,113, 28, 38, 79,158,
+140, 78,157, 58,161,168,168, 8,157, 58,117,194,214,173, 91,187,179,154,194,192,208, 0, 2, 75, 70,176, 6,214,255, 59, 16,240,
+ 53, 24,181,150, 90,166,165,165,233, 68, 81,252,108,245,234,213,134,184,184,223,222, 22,226,112, 56, 80, 89, 89,137,170,170, 42,
+ 84, 86, 86,194,100, 50, 97,193,130, 5,134, 9, 19, 38,124,166,211,233,218,157, 56,113,194, 30,140,147, 16, 50,111,223,190,125,
+137,110,183, 27, 90,173, 54,168, 88,108,211,166, 13, 30,124,240, 65,244,235,215, 47,105,220,184,113,243, 0,124, 30,140, 19, 0,
+146,147,147,223,222,182,109, 91,170, 86,171, 69,126,126, 62, 78,157, 58,133, 41, 83,166,164, 73,146,132,194,194, 66,228,231,231,
+227,204,153, 51,120,239,189,247, 82, 39, 76,152,176,224,244,233,211,109, 67,197,221,139,123, 30,121,228,145,182, 49, 49, 49,220,
+ 43,175,188, 82, 94, 85, 85,245,158,247,255, 25,243,231,207, 31,159,153,153, 25,255,143,127,252,131,110,219,182,237, 99,212,188,
+ 46, 37,104,122,250,206,185,242, 14,231, 1,128,135, 82,122,216,239,156, 14, 62,251, 65, 41, 77, 4, 96, 39,132,148, 7,224, 36,
+ 0, 34,135, 15, 31, 62,205,110,183,247,216,178,101,203,209,126,253,250,165, 1, 56, 75, 41, 61, 15, 0, 49, 49, 49,166,215, 95,
+127, 61,113,212,168, 81, 63, 13, 30, 60,184,199,240,225,195,167,157, 63,127,126, 54,165,180,132, 16, 66, 67,196,253,247,130,113,
+ 54, 18,167,119, 40, 9,130, 32, 96,196,136, 17, 32,132, 4,124,223,230,142, 29, 59, 48,104,208, 32,136,162,136,187,239,190, 91,
+ 53,231,176, 97,195,224,118,187,235,240,249, 11, 16,249, 29,157,161,226, 78, 41,173,245,142,208, 64,226,194,119, 11,192, 87,135,
+ 83,146,164,128, 92,193, 68,150,252,178,122, 53,113, 87, 43, 46,195,133,211,151, 83, 20, 69,100,100,100, 96,239,222,189, 33,197,
+ 86,184,112, 2, 64,117,117,245,157, 55,222,120,227,154, 41, 83,166,232, 1,160,164,164,164,214,139,232,143, 28, 57, 2,187,221,
+142,101,203,150,193,110,183,223,203,234, 17,227,108,100,206, 80,157,127, 17,192,213, 0,226, 81, 51,127,185, 18, 64,180,247, 94,
+169, 5, 80, 10,192,224,221,236, 0,170, 0, 52,241,158, 94,226,237,108,248,190,166,236,188,239, 75,161, 41,165,189,188,220,242,
+ 43,187,226,125,142,149,175,225,255,219,255,179, 22,183, 92,171,229,225,159, 76,223, 10, 45,191,132, 53,156,184,146, 27, 71, 21,
+ 9,244,192,140, 25, 51, 18,125,197,149,221,110, 71, 69, 69, 5, 42, 43, 43,149,207,252,252,124,104,181, 90,140, 29, 59, 54,145,
+ 82,250, 64, 24, 90, 13,207,243,216,187,119, 47, 86,174, 92,137,227,199,143,215, 57,224,216,177, 99,120,253,245,215,241,234,171,
+175,162,162,162, 2, 0, 52,193,200,186,117,235,246,252,248,241,227,119, 14, 24, 48, 64, 39, 8, 2,246,237,219,135,118,237,218,
+ 97,251,246,237, 56,121,242, 36, 46, 92,184,128, 35, 71,142,160, 75,151, 46, 56,122,244, 40, 42, 42, 42,208,185,115,103, 93,143,
+ 30, 61,182,164,165,165, 61, 31, 42,156, 41, 41, 41, 79,254,235, 95,255,210,157, 61,123, 86, 90,178,100,201, 54, 0,219, 1, 76,
+121,234,169,167, 38, 13, 27, 54, 44,254,240,225,195, 21,187,119,239,222, 19, 68, 92, 5,114,174, 78,114, 28,119,130, 82, 90, 65,
+ 41,181,162,102, 2,122,173,155,145,219,237,182, 91,173,214,242,210,210,210, 18,142,227, 78,112, 28,151, 15, 64, 23,140,115,226,
+196,137,173, 75, 74, 74,238,255,247,191,255,125,188, 95,191,126,105,148,210, 35,148,210, 82,111,129,181,187,221,238,210,178,178,
+178,159,250,246,237,155, 60,126,252,248,163, 37, 37, 37,247, 79,156, 56,177,117, 8, 78,134,203, 31,212,227,241, 64, 20, 69,108,
+220,184, 17, 91,183,110,197,214,173, 91,177,109,219, 54,108,223,190, 29, 59,118,236,192,142, 29, 59, 32, 8, 2,182,111,223,142,
+237,219,183,227,193, 7, 31, 12, 91,231, 61, 30, 15, 4, 65,192,166, 77,155,176,107,215, 46,101,219,189,123, 55,118,237,218, 5,
+131,193,160, 70, 12,249,118,166, 20,206, 64,219,219,111,191,173,136, 67,185,109,226, 56, 46,164, 43,230, 47, 92,252, 5, 75, 90,
+139, 22,117,246,133, 11,167, 44,218, 4, 65,192,127,255,251, 95,156, 62,125, 26,111,190,249, 38,142, 29, 59,134,151, 95,126, 25,
+121,121,121,152, 53,107, 22,118,239,222,141, 25, 51,102, 96,203,150, 45,242,203,223,105, 56, 78, 89, 92, 57,157, 78, 37, 60, 71,
+142, 28,193,156, 57,115,176,111,223, 62, 60,251,236,179,216,177, 99, 7, 30,123,236, 49,240,124, 72,147, 13,233,233,233,147, 9,
+ 33,159,182,111,223, 94, 55,112,224, 64, 8,130,128, 57,115,230, 72,207, 62,251,108,241, 83, 79, 61, 85,156,157,157, 77, 91,183,
+110, 13,135,195,129,136,136, 8, 80, 74, 23,167,167,167, 63,192,170, 11, 67, 99,182, 69,254, 90,196, 7,215,205,152, 49, 99, 32,
+ 33, 36, 59, 35, 35, 99, 34,128,104, 66, 72, 54, 0,173,247, 51,110,198,140, 25,189, 9, 33,217, 51,102,204,232, 9,160, 9, 33,
+ 36,219,251,251,122, 0,113,242,111,239,241,241,126,226, 45,222,231,255,120,191, 99,181,129,126,251,127,250,115,251, 58, 88,196,
+ 27, 49,226,219, 64,214, 71, 96,133,107,112,205,102,243,200,225,195,135,107,124,197,149,175,115, 37,127, 86, 86, 86,226,167,159,
+126, 66,151, 46, 93, 52,102,179,121, 36,128,255,132,181,226, 4, 1, 77,155, 54, 69, 73, 73, 9, 14, 28, 56,128,180,180, 52,184,
+ 92, 46,124,247,221,119, 40, 43, 43,131, 70,163,129, 70,163,129,195, 17, 90,187,116,232,208, 97,196,210,165, 75,123,254,239,127,
+255,187, 32, 8, 2,142, 28, 57,130,143, 62,250, 8,148, 82, 52,105,210, 4, 22,139, 5,197,197,197,152, 55,111, 30,156, 78, 39,
+204,102, 51, 82, 82, 82,244, 15, 60,240, 64,191,153, 51,103,138, 39, 78,156, 8, 38,178,174, 25, 51,102, 76,100, 68, 68, 4, 30,
+126,248, 97,201,233,116,190, 10,224,218, 49, 99,198, 60,249,224,131, 15,198, 22, 20, 20, 56,238,185,231,158, 61, 78,167,115,158,
+108, 30,250, 11,166, 0,130, 53,168,115,229,118,187,229, 52, 61, 94, 89, 89,137,132,132,132,230,148, 82, 77,152, 60,210,108,223,
+190, 61, 3, 0,255,194, 11, 47,232, 41,165,231,124,195,224,116, 58,101, 78,119,121,121,121,241, 99,143, 61,230, 94,190,124, 57,
+239, 61,231, 16, 0, 27,107, 31,254,124,144,133,139, 40,138, 24, 49, 98, 68, 45, 65,177,121,243,102, 12, 31, 62, 92,169,239, 26,
+141, 70, 57, 46, 28,167,175, 43, 38, 59, 79, 50,239,247,223,127, 95,199,121, 81,217, 73, 83, 28,150, 64,194,199, 95,116,201, 29,
+ 69, 53, 98, 40,144,200,146,219, 22,127,103, 72, 77, 56, 69, 81,196,131, 15, 62, 8, 65, 16,240,216, 99,143, 65, 20, 69, 92,125,
+245,213, 16, 4, 1,125,250,244,129, 32, 8,184,254,250,235, 85,119, 80,229,112,238,216,177, 3,233,233,233, 74,120,174,190,250,
+106,244,234,213, 11,130, 32,160,127,255,254, 16, 4, 1, 67,135, 14, 13,203, 73, 41,125,118,227,198,141,137,102,179, 25, 63,253,
+244, 19,120,158, 7, 33,164,116,239,222,189,137, 0,112,195, 13, 55,148,216,108,182, 56,155,205,134, 65,131, 6, 33, 35, 35, 35,
+126,249,242,229,207, 0, 96, 43, 11, 25, 26,181, 73,242,215, 34,178, 1,144,149,149, 53,135, 82, 58, 42,216,137,242,126, 66, 72,
+246,220,185,115, 71,121,203,121,157,223,178,203,228, 39,222, 58,251, 58, 80,242,121,190,215, 11,117,109,191,227,207,251, 11, 44,
+ 10, 96, 64,160, 70, 55,144, 85,238,255, 93, 77, 3, 97,179,217,174,150,221, 43,155,205, 86, 75, 80, 85, 85, 85,213, 18, 90, 14,
+135, 3,173, 90,181,130,205,102,187,186,190, 55,139,228,228,100, 56,157, 78, 44, 90,180, 72, 17, 86,190, 34, 33, 20, 14, 30, 60,
+120,124,231,206,157, 61,210,211,211, 99,190,248,226,139,243,131, 7, 15,142, 31, 54,108, 24,244,122, 61,108, 54, 27,220,110, 55,
+174,185,230, 26,116,232,208, 1,197,197,197,248,230,155,111, 74,218,181,107,215, 36, 39, 39, 71, 42, 42, 42, 58, 17,130,122,208,
+160, 65,131, 64, 8,193, 55,223,124,243, 43,128, 92,189, 94,255,249,156, 57,115,162,237,118,187, 52,105,210,164,194, 95,127,253,
+245, 49, 0, 46,173, 86,251,159,235,174,187,238,154,245,235,215,127, 34, 73, 82,189, 27, 51,187,221, 94, 43,109, 43, 43, 43, 97,
+ 52, 26,213, 60, 18, 66, 44, 43, 43,235, 10, 0, 70,163, 49, 22, 62, 43, 36,173, 86,171,146, 71,222,252,177,197,198,198,154, 0,
+192,123,142,200,218,133, 63, 47,228,155,247,198,141, 27,107,213,111,217,129,242,175,243, 90,173, 22,171, 87,175, 86,197,233, 43,
+166, 84, 12,231,133,116,155,100,129, 37, 8, 2,222,123,175,102,132,253,225,135, 31, 86,206,247,191,134,154,246, 66, 22, 67,130,
+ 32,160,195,115, 18, 0, 39, 78,189,166,135, 40,214, 20,105,255, 48,123, 27, 83, 85,174,216,155,111,190,137, 81,163, 70, 33, 59,
+ 59, 59,228,231,200,145, 35, 85,133, 83, 16, 4,232,116,186, 90,194,111,223,190,125, 1,121, 23, 46, 92, 24,118, 78,155, 36, 73,
+248,234,171,175,192,113, 92, 45,199,235,233,167,159,254,151,201,100, 50,111,218,180, 9,231,206,157, 67,117,117, 53,170,170,170,
+ 16, 19, 19, 19, 61,104,208,160,125, 69, 69, 69, 5,135, 14, 29,186,153,213, 28,134, 70,114,177, 6, 4,248,223, 58,125,250,244,
+ 39, 9, 33,217,211,167, 79,127,114,238,220,185,121,222,186,145,237, 87, 87,178,195,212,165,108,175, 24,218,237,173,203,218,130,
+ 51, 63, 0, 0, 32, 0, 73, 68, 65, 84,189,252,196,219,121, 66,200,110, 74,233, 13,193,206, 5,224,240, 19, 84,181,134, 8,101,
+238,144, 14,150,255,220,132, 80,223,189, 22,119,184, 6, 87, 32,132,212, 17, 0,129, 28, 44,151,203,133,210,210, 82, 72,146,212,
+160,207,234, 10, 39,176, 14, 28, 56,112,215,228,201,147,207, 68, 69, 69,117, 43, 45, 45, 61,171,211,233,250,111,222,188,185,153,
+203,229, 66,100,100, 36, 34, 35, 35,241,245,215, 95, 35, 42, 42, 10,255,254,247,191, 79, 90,173,214,237, 38,147, 41,209,106,181,
+254, 88, 84, 84,244,116, 80,229, 34,138,131,250,247,239,143,220,220, 92,148,149,149,109, 0,208,109,194,132, 9, 67,155, 53,107,
+ 70,102,207,158,109, 59,122,244,232, 91, 0,206,155, 76,166,255, 46, 93,186, 52,179, 71,143, 30,230, 73,147, 38, 97,211,166, 77,
+239,215,199, 25,178, 88, 44,181,132,149,156,166, 17, 17, 17,170,158,185,229, 77,111, 74, 8,161,114,207,223, 87, 88,249, 8, 96,
+202,243,188, 4,128, 54,116, 30, 49, 92,122, 7, 75,174,235,127,251,219,223,234, 76,110,215,104, 52, 88,179,102, 13,110,186,233,
+ 38,165,195,146,158,158,174,218,109, 26, 61,122,180, 34, 8,214,172, 89, 19, 84, 96,133, 27,210,242,119,155, 30,122,232, 33,136,
+162,136,183,222,122, 11, 83,167, 78, 5,207,243,120,237,181,215,192,113, 28,158,121,230,153,122,139, 75, 81, 20,113,252,165,154,
+207,212, 71, 42, 80,250, 78, 34, 0, 32, 34, 50,178, 38, 62,146,164,254, 14,225,141,123, 56,231,202, 87, 88,133, 27, 34,244,117,
+ 1,243,243,243,149,239,125,250,244,169,229, 92, 9,130, 16, 86,176,121,175, 55,107,224,192,129,179, 83, 83, 83, 19,166, 76,153,
+ 66, 4, 65, 64,207,158, 61,155, 12, 30, 60,184, 92, 16, 4,253,163,143, 62, 26,104, 42,133, 8,160, 91,199,142, 29, 77,172,230,
+ 48, 92, 98, 7,203, 62,119,238,220,188,185,115,231, 6,116,168,252,157,164, 80, 78,147, 44,172,188, 66, 40, 94, 22,109,168,153,
+159,188, 59,220,185,240, 14, 9, 6,114,185,124,225,239, 96,205,244,111,120,212, 8, 44, 53,243, 39,188,174,200,254,146,146,146,
+ 62, 58,157, 14, 21, 21, 21,117,110,218,190,162,128,231,121, 20, 23, 23,195,104, 52,238,111,200,156, 11, 55, 68, 8,192,246,243,
+207, 63, 79,243,249,221,107,236,216,177,203, 63,249,228,147, 86,235,214,173, 67, 78, 78, 14,154, 52,105,130, 57,115,230,252, 82,
+ 80, 80, 48, 30,192,238,226,226,226,176,215,109,221,186,117, 39,179,217,140,109,219,182, 1,192, 22, 0,119,222,119,223,125,196,
+233,116, 98,193,130, 5, 22, 0,235,162,162,162, 62, 95,177, 98, 69,183,110,221,186,233,214,173, 91, 87,153,147,147,179, 81,165,
+184,242, 80, 74, 3, 10,171,202,202, 74, 84, 87, 87,195,108, 54,171, 17, 88,238,200,200,200, 3,149,149,149,183, 90,173,214, 10,
+157, 78, 23, 81, 81, 81, 97,247,117, 24,171,170,170, 80, 93, 93, 13, 65, 16,196,252,252,252, 51, 0, 90, 71, 70, 70, 30,192, 69,
+ 62,183,140,225,143, 7,199,113, 84, 22, 25,235,214,173, 11, 88,215, 69, 81,196,119,223,125, 87,171,190,127,243,205, 55, 97, 69,
+155, 32, 8,202, 74,194,112, 14,150, 79,227, 26,218,102, 21, 69,240, 60,143,119,222,121, 7,148, 82,197,185,226, 56, 14,211,167,
+ 79,135, 78,167,195,139, 47,190,136,233,211,167,171,114,177,124, 93,177,150, 79, 88,127,107, 28,189,231, 58, 29,142, 26,151,158,
+227,124, 69,150, 42,167, 45,220, 4,247,250,136, 96, 95,167, 77,167,211, 5,157,220, 30,224,102, 21, 16,185,185,185, 31,116,239,
+222,253,104,124,124,252,218,140,140, 12,221,158, 61,123,240,224,131, 15, 18,187,221, 30,185,110,221, 58,229,186,129,210,171,186,
+186, 90,207,106, 14, 67, 35, 58, 88, 51, 3,252, 31, 35, 11, 39,175, 24, 82, 91,119,178,125,143,151, 57,252, 69,145,215, 17,219,
+ 28,142, 43,208,185,193, 32, 4,171,132,254,141, 68, 56,161,165,166,247,105,181, 90,215,111,220,184,177,215, 77, 55,221, 36,132,
+ 26, 30,172,170,170, 66, 98, 98, 34,142, 29, 59,230,182, 90,173, 97, 31,127,224,241,168,127, 32,122, 56, 7, 43, 0,118,151,148,
+148,184,157, 78, 39,218,182,109,139,148,148, 20, 88,173, 86,188,254,250,235,110, 0,187, 85,114,104, 76, 38, 19, 15, 0,229,229,
+229, 64,205,106,135,118,237,218,181, 67,110,110, 46, 46, 92,184,176, 10,192,160,153, 51,103,118,191,246,218,107, 53,159,124,242,
+137,229,222,123,239, 93,229,114,185,102,171,236,129, 59,220,110,119, 75,142,227,156,101,101,101,167,125,133, 85, 98, 98, 98,140,
+217,108,230,138,139,139, 93,106,146,167,107,215,174,187, 78,157, 58,133, 23, 94,120,225,252,156, 57,115,218, 85, 86, 86, 94, 40,
+ 47, 47,119,203,194,170,162,162, 2, 86,171,149,139,143,143,215, 45, 92,184,208, 8, 0, 93,187,118,221, 5,128, 61,112,244,207,
+220,162,249, 45,104, 9,244,168, 6,181,147,209,253,133,203,141, 55,222, 88,199, 17,147,183, 21, 43, 86,212,154,215, 20,110,232,
+ 77,230,124,251,237,183,241,240,195, 15, 67,167,211, 97,254,252,249,181,230, 96, 5,233, 17, 7,229,148, 69, 91,203, 39,172, 40,
+122, 35, 22,162, 40, 34,238,222,115,181,134, 8, 3,196, 77,149, 16,156, 51,103, 78,131, 12, 17,250,138, 62,249,145, 56,139, 22,
+ 45,194,216,177, 99,177,101,203,150,139, 30, 34,108,217,178,229,210,215, 95,127, 93,119,232,208, 33, 84, 84, 84,224,252,249,243,
+176,217,108, 40, 44, 44, 84,242, 48,136, 83,110, 96,181,134,161,145,220,171, 96, 56,239, 55,127,138,248, 14,215,133,248,244, 63,
+ 30, 62,255,249,242,158, 39,132,184, 2, 92,239,124, 0, 81,229,127, 13,223, 99,206, 7,114,176, 2,221,184, 85, 63,166,193, 59,
+ 65, 50,156, 16,152,247,220,115,207,221,223,175, 95,191,216,200,200, 72,156, 57,115, 38,160,131, 21, 25, 25, 9,167,211,137,141,
+ 27, 55, 86, 72,146, 52, 47, 76,134,184, 92, 46, 23, 18, 18, 18, 80, 82, 82, 2, 41,136,141,207,113, 28, 12, 6, 3,170,170,170,
+128, 48,147,199, 3,221, 40, 92, 46, 23,156, 78, 39,156, 78, 39, 92, 46, 87,125, 11,141,193,251, 76, 26, 84, 87, 87, 3, 64,117,
+211,166, 77, 91,235,245,122,121,213, 99, 62,128,129,195,134, 13, 19, 75, 75, 75,233, 61,247,220,179,131, 82,250, 96, 24, 87,200,
+177,113,227,198, 22, 0, 96, 48, 24,242, 1,160,176,176,208, 85, 86, 86,134,170,170, 42,197, 33, 52, 24, 12,184,249,230,155,147,
+ 40,165,216,184,113, 99, 11,141, 70, 67, 67,136, 33,123,118,118,246,193,168,168,168,229, 89, 89, 89,227,111,184,225,134,188,174,
+ 93,187,182,172,170,170, 42,182, 88, 44, 86,171,213, 74, 5, 65,208,196,197,197,233,214,174, 93,123,116,199,142, 29, 67, 34, 35,
+ 35,151,103,103,103, 31, 68,205, 42, 67,134, 63, 99,139,230, 55,183, 41,144,168,170,207, 10, 58, 95,225, 34, 8, 2,190,251,238,
+187,144, 46,142, 90, 78, 95,145, 49,109,218, 52,188,241,198, 27,117, 28,172,217,179,107,250, 36, 79, 61,245, 84,189, 28, 34, 65,
+ 16, 80,244, 70, 44,146, 30,250,181,142,131, 69,188,225,171,207, 16,161,124,254,172, 89,179, 32,138,162, 50,132, 55,100,200,144,
+ 90, 67,131,106,133,149, 47,103,113,113, 49, 4, 65, 64,108,108, 44,198,143, 31,143,161, 67,135,214,225, 83,203, 91, 88, 88,248,
+195,171,175,190,218, 60, 37, 37, 5,159,124,242,137,195,100, 50,105, 7, 14, 28, 72,203,203,203, 73, 40, 7,203,106,181, 50, 7,
+139,225, 82,183, 83,187, 47, 37,111, 67, 92, 79, 8,215,232,254,206,199, 52,116,129,207,179, 50, 78,156, 56, 81,158,148,148, 52,
+ 97,220,184,113, 95,188,243,206, 59,134,214,173, 91,227,200,145, 35,184,112,225, 2,156, 78, 39, 52, 26, 13,154, 54,109,138,170,
+170, 42,124,246,217,103, 22,139,197, 50,161,168,168,168, 60, 20, 39, 33,228,169, 17, 35, 70, 44,124,250,233,167,245,157, 58,117,
+194,133, 11, 23, 80, 85, 85,165,244,188, 8, 33,136,140,140,132,209,104,196,129, 3, 7,176, 99,199, 14, 43, 33,228,169, 80,156,
+129,132,166, 44,172,100,161, 21,110,101,146, 31,167,201,104, 52,202, 61, 63, 0,112, 55,111,222, 60, 17,128, 44,176, 78,180,106,
+213,234,233, 54,109,218,144,165, 75,151, 82, 74,233,186, 32,226, 74,225, 36,132, 92,160,148,150, 1, 72,116, 56, 28, 26, 0,168,
+168,168,112,198,197,197, 37,232,116, 58, 73,167,211, 73,122,189, 94, 58,123,246,172,219,237,118,107, 0, 32, 51, 51,211, 1,224,
+156,223, 92, 15, 95, 78,137, 82, 90,185, 96,193,130,231,239,188,243,206, 62,125,251,246,237,124,207, 61,247, 28,186,247,222,123,
+145,146,146, 18, 83, 85, 85,101,203,207,207, 47,123,231,157,119,108,187,118,237, 26, 34,138,226,137, 5, 11, 22, 60, 15,160,146,
+ 16, 34,169, 77,207,139, 4,227,108, 36, 78,185, 60, 4, 18, 86,190,191, 85, 8,161, 90,225,148, 69,219,173,183,222,170,172, 62,
+244,119,174,234,203, 9, 64, 89, 65,248,248,227,143,215, 10,223,211, 79, 63,173,182, 87,236, 27,119,197,109, 18, 4, 1,229,139,
+ 82,106,137,191,122,136,170, 58,156,130, 32,224,217,103,159, 85,237, 96, 5,152,131, 21, 52,156,153,153,153,168,174,174,134, 40,
+138, 88,179,102, 77, 80, 7, 43, 92,122, 26, 12,134,241,171, 86,173,250, 72,167,211,117,117, 56, 28,119,151,148,148, 44,177, 88,
+ 44,205,203,202,202, 66, 58, 88, 54,155, 77,199,234, 17,227,196, 37,126, 22,214,159, 13, 33,187,120,110,183, 27,205,154, 53,171,
+245,110, 43,121, 50, 59,207,243,202,202, 19, 53, 43, 8,101, 20, 21, 21,173, 1, 48,230,230,155,111, 94,118,231,157,119, 70,116,
+232,208, 65, 76, 75, 75,131,213,106, 69, 65, 65, 1, 10, 10, 10,220, 27, 54,108,168,176, 88, 44,183,123,143, 13,137, 51,103,206,
+252,207,237,118,127, 55,113,226,196,103,187,119,239, 62,101,234,212,169,124,171, 86,173, 80, 94, 94,142,152,152, 24,196,199,199,
+163,160,160, 0,159,125,246,153,167,172,172,108,161,199,227,153, 85, 92, 92,124,190, 62,137,228,118,187,121,151,203,133,113,227,
+198, 65,146, 36,204,159, 63, 31,110,183,155,175, 7,133,211,233,116, 82, 0,164,164,164, 4, 0, 44,178,224,250,249,231,159, 1,
+224,100,139, 22, 45,204, 0,176,126,253,122,130,154,231, 99,169, 81,222,148, 82,170, 56, 89, 29, 58,116, 40,240,111, 20,101,231,
+ 74,118,189,194, 77,164, 37,132,216, 40,165,231,237,118,251,176, 71, 30,121,228,217, 69,139, 22,141, 95,180,104, 81,157,227, 34,
+ 35, 35,151,191,246,218,107,179,198,143, 31,127,158, 16,194, 30,207,240, 87,104, 12,252,220,170,250, 78, 1, 8,198,249,229,151,
+ 95,214,231,225,154, 33, 93, 49, 66, 72,192, 21,137,161,218, 32, 21,157,161,160, 15, 20,253, 61,174,160, 32, 8,120,229,149, 87,
+ 20,231,202,119,242,249,197, 56, 88, 50,103,108,108,108, 77,175,205,100,130, 36, 73, 24, 57,114,228, 69,243,122,223, 45, 56, 70,
+254,157,158,158, 62,235,227,143, 63,158, 77, 41,141, 3, 32,248,166,129,154,116,100, 96, 96, 80, 33,176, 60, 30,207,169, 1, 3,
+ 6,192,183,247, 20,238,101,173,110,183,251,148, 74,145,245, 93,203,150, 45, 91, 45, 90,180,232, 97,147,201, 52,216,102,179,117,
+ 5, 0,189, 94,191,191,186,186,122, 29,199,113,175, 23, 21, 21,169,126, 57,179, 87, 48, 61,192,113,220,252,137, 19, 39,206,206,
+200,200,184,229,158,123,238, 33,130, 32,224,211, 79, 63,165,167, 79,159, 94,193,113,220, 83,103,207,158, 61,118, 49,137,100, 52,
+ 26,127, 90,177, 98, 69,235, 47,191,252, 18, 46,151, 11, 11, 23, 46,132, 78,167,251,169, 30, 20,231, 55,108,216,176,172,111,223,
+190,227,119,236,216,177, 28,192,129, 45, 91,182,124,116,221,117,215, 77,216,190,125,251,255, 1, 56,180,113,227,198,143, 50, 50,
+ 50, 38,236,218,181,235,115, 0, 63,214,163,209, 85,156, 44,183, 59,240,136, 98, 16,231, 42, 20,103, 5,165,212, 57,121,242,228,
+ 71,110,185,229,150, 69,185,185,185,215,200,143,111,136,142,142,222,159,158,158,158,179, 98,197,138, 35, 94,231,138,137,171, 63,
+ 57,228, 9,233, 49, 49, 49,224, 56, 78,217,228,167,121,215, 87, 8,201,156,148, 82,196,196,196, 4,236,152,133,224, 12,169,106,
+ 40,165, 48,155,205, 10,167,202,213,203, 97,109, 40,179,217, 92, 43,140, 42, 64,195,197,221, 63,156,106,210, 44, 28,167,201,100,
+130,211,233, 84,205, 9, 21,139, 6,124,145,155,155,251, 1,128, 15,218,180,105,243, 51,128, 54, 76, 84, 49, 48, 52,130,192, 58,
+114,228, 72,207,198,188,240,241,227,199, 43, 0,204,242,110, 13,130,211,167, 79, 31, 3,112,235,214,173, 91,255,179,125,251,246,
+103,188,141,235, 11,225,222,103, 24, 14, 63,254,248,227, 77,162, 40, 46, 88,188,120,113, 6,165, 20, 81, 81, 81,219,143, 30, 61,
+122, 95,125, 56, 60, 30,207,148, 29, 59,118, 76,133,119, 85,160,195,225,152,178,117,235,214, 71, 1, 84,203,251,119,238,220,169,
+252,174,231,205,140, 82, 74, 29,148,210,228, 32,135, 56,212,138, 43, 63, 39,203,177, 98,197,138, 42, 0,251,240,219,115,174, 92,
+222,205,238, 55, 44,200,240, 39,133,219,237, 62, 61, 96,192, 0, 33, 92, 7, 42,192,121,167, 66,117,208,250,247,239,143,139,224,
+ 60, 29, 34,168, 39, 50, 50, 50, 56,181, 92, 50, 92, 46, 87,113, 8,241,117,170, 79,159, 62, 1,195, 25, 38,205, 66,198,189, 79,
+159, 62,245, 10,163, 55, 44,167, 27,154, 51, 76,122, 6,133,213,106,189, 16, 31, 31, 95,101,179,217, 68,187,221, 46,250, 59,246,
+ 6,131,225,188,213,106,101,149,135,129,225, 15, 4,123,211, 56,227,100,156,140,147,113, 50, 78,198,201, 56,175, 56,112, 44, 9,
+ 24, 24, 24, 24, 24, 24, 24, 24, 26, 22, 36,132, 10,173,207,234,128,139, 81,178, 7, 24, 39,227,100,156,140,147,113, 50, 78,198,
+121,197,113,134,227,102,171, 19, 27, 73,120, 49, 78,198,201, 56, 25, 39,227,100,156,140,243,202,227,252, 75,129, 13, 17, 50, 48,
+ 48, 48, 48, 48, 48, 48, 48,129,197,192,192,192,192,192,192,192,192, 4, 22, 3, 3, 3, 3, 3, 3, 3, 3, 19, 88, 12, 12, 12,
+ 12, 12, 12, 12, 12,191, 3, 36, 37, 37, 37, 51, 57, 57,185,207,149,154, 0, 2, 43, 3, 12, 12, 12, 12, 12, 12, 12, 13,129,102,
+205,154, 69,123, 60,158, 59, 1,220,215,186,117,235,214, 0, 64, 8, 57, 64, 41,125,221, 96, 48,124,116,236,216, 49,199, 21,163,
+ 48, 89,113, 96, 96, 96, 96, 96, 96, 96,248, 61, 72, 78, 78,238, 14,224, 62,131,193,112,251, 53,215, 92,163, 29, 56,112, 32, 98,
+ 98, 98,224,118,187,113,246,236, 89,108,216,176, 1,251,246,237,251,213,229,114, 45,112,185, 92, 11, 74, 74, 74,206, 93, 73, 2,
+107,147,247, 51,147, 21, 21, 6, 6, 6, 6, 6, 6, 6, 53, 72, 74, 74,122,117,248,240,225,143,196,196,196,160,109,219,182, 72,
+ 74, 74,130,221,110,135,213,106, 5,165, 20,130, 32,128, 82,138,202,202, 74,236,217,179, 7, 57, 57, 57,238,138,138,138,229,132,
+144,215,207,158, 61,251,131, 31,221, 95, 70,139,200, 2,139, 2, 24,224, 23, 57, 6, 6, 6, 6, 6, 6, 6,134,144, 72, 78, 78,
+ 62,183,126,253,250, 4,143,199,131,146,146, 18,216,237,118, 88, 44, 22, 69, 96,241, 60, 15, 74, 41,220,110, 55, 0, 64,146, 36,
+ 28, 58,116, 8, 59,118,236, 64, 97, 97,225,107, 69, 69, 69,211,254,138, 90,132,243, 83,141, 76, 92, 49, 48, 48, 48, 48, 48, 48,
+212, 11,118,187, 29, 75,151, 46, 69, 73, 73, 9,154, 53,107,134,148,148, 20, 68, 69, 69, 65,175,215, 3,128, 34,174, 0,128,227,
+ 56,116,238,220, 25, 19, 38, 76, 0, 33,100,130, 31,213, 95, 70,139,176, 73,238, 12, 12, 12, 12, 12, 12, 12,191, 7, 46,167,211,
+137,158, 61,123,226,248,241,227,200,205,205, 69,143, 30, 61,208,177, 99, 71,148,148,148,224,204,153, 51,181, 14,222,181,107, 23,
+246,238,221,139,235,174,187,238, 47,157, 40,188,247,147, 0,120, 30,192,157, 0, 22,179,178,194,192,192,192,192,192,192,160, 6,
+ 17, 17, 17,191,110,218,180,105,104, 90, 90,154,152,158,158, 14,157, 78,135,147, 39, 79, 34, 39, 39, 7,102,179, 25, 93,187,118,
+133,205,102,195,230,205,155,177,122,245,106,148,149,149,161, 69,139, 22,192,187,239,225,231,215,204,229, 85, 85, 85,243,254,138,
+ 90,196,119,146,123,166,247,115, 19, 43, 46, 12, 12, 12, 12, 12, 12, 12,106,145,156,156, 28, 71, 8,121,170,105,211,166,247,223,
+126,251,237, 98,155, 54,109,112,234,212, 41,148,148,148,224,194,133, 11,216,185,115, 39, 0, 32, 37, 37, 5, 41, 41, 41, 40, 40,
+ 40,192,129, 3, 7,172,118,187,253,222, 51,103,206,252,239,175,168, 69,216, 99, 26, 24, 24, 24, 24, 24, 24, 24, 26, 74,104, 53,
+ 3, 48,179, 77,155, 54,147,198,142, 29,203, 53,109,218, 20,167, 79,159,198,134, 13, 27,208,186,117,107, 20, 23, 23, 99,207,158,
+ 61,158,138,138,138,133, 30,143,103, 86,113,113,241,121,150,106, 23, 7,246,166,113,198,201, 56, 25, 39,227,100,156,140,243, 10,
+227, 76, 76, 76,236,144,156,156,188,114,232,208,161,244,157,119,222,161, 15, 60,240, 0,237,209,163,135,148,156,156,252,105, 74,
+ 74, 74,235, 43, 65, 0,177, 73,238, 12, 12, 12, 12, 12, 12, 12, 13,138,115,231,206, 29, 6,112, 19, 33,228,154,188,188,188, 39,
+ 1, 64,146,164, 23,206,157, 59,183,231, 74, 73, 3, 38,176, 24, 24, 24, 24, 24, 24, 24, 26, 5,103,206,156,201, 1,240,183, 43,
+ 49,238,236,101,207, 12, 12, 12, 12, 12, 12, 12, 12, 76, 96, 49, 48, 48, 48, 48, 48, 48, 48, 48,129,197,192,192,192,192,192,192,
+192,112, 69,129, 32,248, 74,128, 3,245,224,185,152, 21, 10, 7, 24, 39,227,100,156,140,147,113, 50, 78,198,121,197,113,134,227,
+ 62,128, 43, 8, 23,251,188, 44,182,132,149,113, 50, 78,198,201, 56,255, 60,156,164,129, 56,137,119,227,188, 27,169, 39,247,165,
+ 10,231,159, 37,238, 87, 10,231, 95, 10,225, 86, 17,250, 38,146,228,221,104, 3, 9, 54,174, 1,249, 24, 26, 71, 84,203, 21,131,
+178,124, 98, 96,248, 75,163, 33,219,122,185,237,224,125, 56, 61,222, 13,191,179, 45,105,140,123,210,229, 30,247, 43,153,243, 47,
+ 41,176, 8, 0, 18, 31, 31,191, 38, 33, 33,225,250,146,146, 18, 9, 0, 8, 33,224, 56, 14, 28,199, 65, 16, 4,107, 65, 65, 65,
+100,125, 47,152,144,144,240,126,124,124,252,157,165,165,165,146,204, 69, 8, 1,207,243,224,121,222,122,236,216,177,200, 63, 58,
+ 81,122,244,232,113,193,225,112,152,253,255,215,106,181,182,189,123,247, 70, 92, 9,229,162, 93,187,118,183, 25,141, 70, 67,144,
+253,244,135, 31,126, 88,164,150,172, 69,139, 22,187, 12, 6, 67,180, 32, 8,224,121, 30,130, 32,160,186,186,186,236,240,225,195,
+189,189,251,183, 25, 12,134, 56,158,231,229,178, 5,155,205, 86,122,232,208,161,190,236,190, 87, 23,153,153,153, 2,234,255,136,
+ 21,247,166, 77,155,220,151, 42,140,148, 82,206,145, 27,209,134,184,173,221, 8, 71,163,168, 68,202,169, 96,248, 81,155, 94,121,
+ 84, 85, 75, 77,136,244, 7, 39,115,115, 0,110, 0,103,234, 29,247, 0, 61,118, 1, 24,238, 1,198,121,127,218, 56,160,148, 0,
+249,113,192,103,231, 0,171, 95,227,123, 41,111, 68, 4, 0, 73, 77, 77,125, 61, 49, 49,241,174,202,202, 74, 11,207,243, 32,132,
+ 80, 66,136,156, 23,190,249, 2, 73,146, 78, 29, 60,120,176,103,152,155,172,216,188,121,243,215,226,227,227,239,176, 88, 44, 22,
+ 66,136,194, 41,111,190,220, 30,143,231, 84, 94, 94, 94,207, 75, 24,206, 63, 36,238,190, 92,242,111, 73,146, 66,197, 93,225, 76,
+ 77, 77,125, 45, 49, 49,241,142,170,170, 42,139,247,190,249,187,195,121,153,115,254,101, 5, 22,151,144,144,176,170,119,239,222,
+ 3,190,252,242, 75,238,240,225,195, 92,135, 14, 29,224,241,120, 32, 73, 18, 40,165, 72, 79, 79, 55,214,247, 98,137,137,137, 75,
+122,246,236, 57,110,245,234,213,220,170, 85,171,184, 94,189,122,129, 16, 2,143,199, 3,143,199,131, 65,131, 6, 25,126,103,124,
+204,130, 32, 76,213,106,181,153,110,183,187, 35, 0,136,162,120,200,110,183,111,114,187,221,243, 0, 84,169, 33,113,185, 92,198,
+188,188,188, 58,105,211,187,119,111,237,197, 6,172,109,219,182,219, 57,142,107,229, 91,200,194,125, 82, 74,127, 57,120,240, 96,
+ 70, 48,206,246,237,219,135,229,244,255, 79,146,164, 95,242,242,242, 50, 66,149,137,182,109,219,142,235,212,169,147,254,211, 79,
+ 63, 69, 97, 97, 33, 76, 38, 19, 36, 73,130,199,227,129,203,229,194, 77, 55,221, 84, 47,203,215, 96, 48, 68,110,216,176,161, 77,
+ 66, 66, 2,138,139,139, 81, 82, 82,130, 41, 83,166,228,251,236,143,251,254,251,239,219,197,198,198,194, 98,177,160,188,188, 28,
+ 19, 38, 76,248,211, 87,174, 33,253, 91,189, 72,128, 88,249,183, 71,194,175,235,183,253,242,244,239,229,181,219,237,103, 61, 30,
+ 79,140,159, 32, 9,121, 14,207,243, 23, 0,196,135,211,194, 0,254,198,243,124, 91, 81, 20,175,162,148,182,112,187,221,137, 0,
+160,209,104,206,241, 60, 95,224,114,185,142, 56, 28,142,159, 1,172, 6, 80, 16,140,200,145, 27,209,198, 99,183,220, 82,109,151,
+ 70, 74, 20, 73, 28, 65,145, 73,103,249,218,145, 27,177, 66,173,200,250, 3,209,178,105,211,166,175, 0,192,153, 51,103, 30, 3,
+112,252,247, 18,122,128,113,148,210, 40, 0, 40, 47, 47,143, 42, 44, 44, 76, 90,189,122,117,231, 57,115,230, 12,212,218,108, 47,
+ 59,128, 67,161,206, 31,124, 93,235, 61, 2, 33,169,138, 90,166,210,169,117,155,127,105,136, 27, 19,151,146,146,242,250,136, 17,
+ 35, 38, 46, 92,184,208,152,147,147, 99,236,218,181,171,183,227, 11,165,189,167,148, 42,101,236,218,107,251,132, 19,108, 66,211,
+166, 77,231,143, 24, 49, 98,252,130, 5, 11,140, 71,142, 28, 49,182,108,217, 82,225,244, 45,179,114, 7,251,234,171,187, 95,234,
+112, 54,106,220,135, 13, 27, 54,126,225,194,133,198,253,251,247, 27,219,181,107,167,112, 82, 90, 91, 59,115, 28,135,158, 61,123,
+169,226, 28, 62,124,248,248,119,223,125,215,152,155,155,107,236,216,177,163, 87,164, 65, 9,227,197,132,243, 50,231,252, 75, 10,
+ 44, 46, 62, 62,126,105,207,158, 61,135,125,249,229,151, 60, 0,228,230,230,162,180,180, 20, 41, 41, 41, 48,155,205,208,235,245,
+176,217,108,245,234,101, 37, 36, 36,188,223,171, 87,175,113, 95,126,249,165, 8, 0,159,223,126, 19,126, 17,129, 7,139, 29,208,
+104, 52, 56,122,244, 40,120,158,255, 61, 61,183,235, 34, 34, 34,254,183,114,229,202,152, 30, 61,122,112, 37, 37, 37,104,217,178,
+ 37,126,253,245,215,222,155, 55,111, 78,191,251,238,187,239,174,172,172,156, 4, 96,179, 90,194,175,190,250, 10, 38,147, 73,217,
+156, 78,231, 69,143, 37,243, 60,159,154,147,147,147, 96, 54,155,225,241,120, 64, 41,173, 85,129,253, 43,158, 36, 73,232,223,191,
+191, 51,100,230, 9, 66,106, 78, 78, 78,130,193, 96,168,195,229,241,120,160,213,106,193,113,156,220, 67,132,219,237, 70, 70, 70,
+ 70, 40, 78,210,174, 93,187,219,100,113,197,113, 28, 62,249,228, 19, 36, 37, 37, 33, 33, 33, 1, 38,147, 9, 6, 67,253, 53,176,
+ 32, 8,136,139,139,195,253,247,223,143,219,110,187, 13,203,150, 45,131, 40,138,181,246,199,198,198,226,219,111,191, 69,100,100,
+ 36,210,210,210,106,237,255,179,130, 0,177,223,109,254,205,145,189,101,212,213,194,160,126, 45, 23, 40, 21,173,230, 32, 42,121,
+ 93, 11,201,227,185,176, 97,251,201,103, 85,116, 0,154,108,219,182, 13, 58,157, 78,221,205,221,227, 65,239,222,189,155,132, 57,
+108,100,151, 46, 93, 62,191,255,254,251, 53,109,218,180, 33,162, 40, 66, 16, 4, 8,130, 32,151,199, 52, 74,105,154, 36, 73, 3,
+206,157, 59, 71,223,124,243,205,151, 55,110,220,120, 51,128,175, 3,198,221,109,237, 86,109,151, 70, 82,138,164,196,193,180,121,
+241, 58,130,106,187, 52, 50, 74,176, 30, 5,112, 57, 11,172, 72,131,193,240,204,167,159,126,170, 1,128,193,131, 7, 63, 99,181,
+ 90,255, 13,160,162,161, 46, 16, 21, 21,133,168,168, 40,116,233,210, 5, 99,198,140,137,238,222,189,251,163, 45,236,246, 41, 5,
+128, 35,104, 29,226,184,212,111,190,207, 79,144,127,143,191,169,135,102,104,102,235,115,212,107,153,249,123,104,146,135,158, 90,
+191,237,120, 56, 1,198, 37, 37, 37,253,103,248,240,225,183, 46, 92,184, 48, 2, 0,222,127,255,125,140, 28, 57, 18, 73, 73, 73,
+ 48, 24, 12,208,104, 52,208,104, 52, 16, 69, 81,249, 12,115,147,229,147,146,146, 94,190,225,134, 27,110, 89,176, 96, 65, 4, 0,
+ 44, 89,178, 4,163, 70,141, 66, 92, 92, 28, 34, 35, 35,161,211,233,160,213,106,189, 92, 4, 52,124,171, 95, 39,156,247, 12, 29,
+136, 86, 6, 29,254, 54,251, 21, 68, 71, 71, 99,195,180,251, 32,114, 28,238,251,118, 19, 34, 35, 35,213,180, 31,117, 56,115,115,
+115,113,238,220,185,128,113,231,121, 62, 92,125, 83,226, 62,114,228,200, 91,100,206, 37, 75,150, 96,216,176, 97,136,139,139,131,
+217,108, 86,226,254, 27, 55,167,138,115,216,176, 97,183,188,251,238,187, 10,231,160, 65,131, 16, 27, 27,139,136,136, 8,104, 52,
+ 26, 37, 61,235,147, 71,151, 57,231, 95, 82, 96, 17,175,123,117,107,118,118,182,146,243,162, 40, 66,167,211, 41,133,195,247,198,
+173,246, 94, 19, 31, 31,127,231,151, 95,126,169,156,228,240,171, 84,122,189,190,190,156,181, 58,120,215, 95,127,253,199,217,217,
+217,122,141, 70, 3,171,213,138,188,188, 60, 68, 69, 69, 65,171,213,226,198, 27,111,228, 51, 50, 50,226,174,191,254,250,207,126,
+250,233,167,241, 0,214,169, 24,226,128,217,108,174, 37,176, 40,189,120,253, 71, 8,129,193, 96,192,170, 85,171, 32, 8, 66,173,
+ 66, 22,168, 17, 75, 76, 76, 12,235, 74, 0,128, 78,167,195,246,237,219,193,113, 28, 68, 81, 84,182,175,190,250, 10,211,166, 77,
+195,185,115,231,148,125, 17, 17, 97, 71, 55,137,209,104, 52,200,226, 74,206,123,131,193, 0, 81, 20,137, 32, 8,132,231,121,185,
+ 73, 39, 80, 57,148, 33, 8, 2, 10, 10, 10,112,251,237,183, 99,241,226,197,120,225,133, 23, 48,126,252,248, 90,251, 43, 42, 42,
+ 16, 19, 19,131,232,232,104,232,116,186,223, 83, 22, 46, 27, 72,126,169, 51,235,133,151,141, 18, 0,137, 74,128, 4, 80, 80,229,
+251,217,179, 71,241,234,127,222,224,213,114,235,116, 58,108,219,182, 13,190,195,174, 28,199, 65,163,209,212,250, 79, 16, 4, 36,
+ 39, 39,171,225,155,185,114,229, 74,237, 39,159,124,130, 47,190,248, 2, 30,143, 7,162, 40, 66,175,215, 35, 50, 50, 18,177,177,
+177,202,150,150,150, 70, 62,248,224, 3, 77,183,110,221,102, 86, 84, 84, 4, 22, 88, 28,141,146,188,226, 10, 0, 18, 6,211,230,
+199,190,228, 99,162, 35,106, 92,156,203,184, 61,156,241,214, 91,111,197,165,167,167, 3, 0,222,122,235,173,184,201,147, 39,207,
+ 0,240, 52,106,134, 12, 47,174,131, 5,124, 76, 8, 25,231,117,108,245, 67,134, 12,209,190,253,246,219,184,234,170,171,240,208,
+ 67, 15,197,190,250,242,203,127, 3,176, 34,120, 89,170, 93,152,230,190,242, 70,180,111,135,234,183, 13,248,245,124, 1,158,121,
+230, 69, 21,250, 31, 92,211,166, 77,239,126,239,189,247,148,233, 16,177,177,177, 74, 27,228,223, 70,201,159, 33,218, 37,226,117,
+133, 38, 47, 92,184, 80,225,140,143,143,175,197, 33,138, 34, 10, 14,253,128,111,222,207,130, 41, 46, 25, 19,166,205,173,119, 56,
+ 83,116, 90,164, 26,180,232,214,173, 27, 12, 6, 3,114,197,154, 91,153, 44,174,212,132,211,159,147,231,121, 37,140,148, 82,216,
+108, 54, 84, 86, 86,194,227,241,192,225,112, 32, 61, 61, 93, 85,220,223,125,247, 93,133,179, 73,147, 38, 74,251,238,219,206,203,
+155,220,129, 9, 19,206,201,255,253,239,127, 21,206,184,184, 56,133, 75, 16, 4,104, 52, 26, 44, 89,178, 4, 42, 29,109,213,156,
+245,205,119,127,206,227,199,143, 99,206,156, 57,208,104, 52,242, 20, 32,197,177, 76, 73, 73,193,155,111,190,169,234, 30,247, 87,
+115,176, 72, 73, 73,137,116,248,240, 97,110,207,158, 61,208,104, 52,136,143,143, 71,239,222,189, 1, 0, 78,167, 19,130, 32,192,
+ 96, 48,144,182,109,219,158,147, 19, 77,254,244, 27, 75,151,151, 90,114,191,254,250,171,180,102,205, 26,110,217,152, 97,112, 80,
+160,251, 51,115, 49,108,212, 40,124,151,162, 5, 15,160,247,225, 18,104,181, 90, 33, 41, 41,201, 37,103,130,204,235, 55, 55,203,
+127,249,102,132,201,100,250, 96,245,234,213,122,142,227, 80, 89, 89, 9, 73,146,208,183,111, 95, 16, 66,176,127,255,126, 60,253,
+244,211,248,252,243,207,177,114,229, 74, 67,143, 30, 61, 62,176, 90,173, 29, 1, 84,250,112, 28, 8, 84, 56, 35, 35, 35, 97, 48,
+ 24, 20,129,101, 48, 24, 72,251,246,237,207, 5,153, 71,112,250,224,193,131,233,193, 56,101, 39,225,230,155,111, 86,230,156,201,
+ 55, 64,223,202, 38,127,207,203,203, 11,148, 95,117, 56, 37, 73, 66,191,126,253, 0, 0, 38,147, 9,102,179, 25,223,127,255,189,
+178,191, 71,143, 30,112, 56, 28,104,210,164, 9, 14, 29, 58,164,138,179,168,168, 8, 75,151, 46,133, 40,138,136,139,139,131, 40,
+138,154,117,235,214,189, 96, 50,153,162,120,158, 71,116,116, 52, 70,141, 26,181,208, 39, 12,158,175,191,254, 90, 8,198,201,243,
+ 60,244,122, 61,150, 44, 89,130, 57,115,230,224,201, 39,159,244,119,247, 96,179,217, 16, 23, 23,135,152,152, 24,196,196,196,168,
+ 10,103, 3,160, 81, 57, 41, 40,242,246,126,135,131,251,214,193, 67, 61,144, 60, 18,168, 68,225,145, 36,236, 93,187,171,221,217,
+ 95,206,164, 80,208,154, 41,181, 0, 60, 85,213,238,204, 56,237, 85, 0, 86,109, 42,117,204, 15, 23, 78,158,231,225,116, 58,241,
+221,119,223,225,232,209,163, 88,179,102, 13,172, 86, 43,154, 52,105,130,232,232,104,100,100,100, 96,242,228,201,193, 4,214, 1,
+191,178,185,228,244,233,211,221, 51, 50, 50, 72,121,121, 57, 74, 74, 74, 80, 89, 89, 9,167,211, 9,167,211,169,228,161,201,100,
+ 66, 82, 82, 18,172, 86, 43,181,219,237, 75,130,198, 93, 34,229, 28, 65,209,177, 85, 66,147,214, 55,186, 13,231,190,143,179, 91,
+ 29, 26,247, 59,171,140,147,191,122,162,245, 80,142,114, 20,168,137, 58, 33,160,146,199, 83,178,110,203, 47,247,255,193,249, 62,
+101,234,212,169, 29,125,135,167, 39, 76,152,128,188,188,188,142,243,230,205,155, 2,224,173,250,114, 26,128, 20,212, 40,179,111,
+ 81,179, 97,166,213, 74, 94, 88,181,234,102, 0,119,172, 92,185, 18,227,199,143,199,127, 94,126,185, 75, 0,129,117,192,183,195,
+ 87,144,191, 25,199,243,183, 65,146, 36,239, 70,131,126,167,234,194, 73,170,170,170,108, 57, 57, 57,230, 15, 63,252, 16,177,177,
+177,104,209,162, 5, 34, 34, 34,160,211,233,234,136, 1,121, 11, 23,119,139,197, 98, 59,124,248,176,249,227,143, 63, 70, 92, 92,
+ 28,210,210,210, 96, 50,153,160,215,235,149, 14,122,206,154,149,152, 50,233, 70,148,158, 60,130, 55,254,125,155,234,112,222, 51,
+100, 32, 82, 13, 90,220, 56,107, 46, 58,118,236,136, 21,183,141, 6, 71,128,123, 55,236,132, 40,138,248,112,228,117,208,233,180,
+184,119,195,110,213,156,187,119,239, 6,165, 20,105,105,105,176, 90,173,138,203,166,209,104,176,110,221, 58,140, 30, 61, 26,203,
+150, 45,195,181,215, 94, 27, 54,238, 85, 85, 85,182,253,251,247,155, 63,250,232, 35,196,198,198,162, 89,179,102, 48, 26,141, 10,
+159,175,136,105,213,170, 21,202,202,202,208,186,117,235,144,156,213,213,213,182,220,220, 92,243,178,101,203, 16, 27, 27,139,212,
+212, 84, 24,141,198, 90, 78,216,204,153, 51,107, 17,116,235,214,237,119,115,214, 55,223,253, 57,199,140, 25,131,214,173, 91, 35,
+ 50, 50, 82, 73, 3,127,161, 93, 31, 80, 74,123,161,246, 52, 7, 7, 0,173,207,231,121, 66,200,238, 0,199,201,255,139, 0,174,
+246,238,243,120, 53, 64,116, 0,190, 96, 60, 37, 94, 83, 33,222,239,248, 90,215, 9, 36,176,228,250, 56, 0,192, 86, 0,232,208,
+161, 3, 74, 75, 75,161,211,233,208,187,119,111,156, 63,127, 94,177,249, 36, 73,194,216,177, 99,249, 39,158,120, 34,129,227, 56,
+184, 92, 46, 80, 74,193,243, 60,228,158,159,191, 14,224, 56, 14, 25, 25, 25, 56,232, 77,211, 97,163, 70, 33, 53, 53, 85,153,196,
+161,211,233, 48,126,252,120, 50,109,218, 52, 65,118, 47, 40,165,176, 90,173,232,214,173,155, 33,132, 59,242,239,207, 62,251, 44,
+ 74,171,213, 42,226, 74, 14,203,225,195,135,241,234,171,175,226,142, 59,238,192,201,147, 39,145,156,156,140, 71, 31,125,212,156,
+149,149,245,111,167,211, 57, 43, 92,134,154,205,230, 90, 2,107,210,164, 73, 66, 70, 70, 70,130,209,104, 84,220, 45,175,168, 68,
+ 70, 70, 6, 9,231, 96, 73,146,132,111,191,253, 54, 96,239,208,191,199, 64, 8, 1,165, 84, 21,103, 78, 78,142, 34,206,100,247,
+ 66,222,159,151,151,167, 56, 88, 94, 33, 24,138,147,202, 66, 77,182,201, 69, 81,212,228,228,228,204, 78, 78, 78, 54, 79,154, 52,
+ 9,149,149,149,104,218,180, 41,134, 14, 29, 10, 73,146,224,116, 58,241,224,131, 15,134,116, 94, 68, 81,196,174, 93,187,144,149,
+149,133, 39,158,120, 2, 11, 23, 46,196,224,193,131,107, 57, 88,114, 79, 55, 50,242, 15, 95,227,208,128, 22, 22,224,116,187, 96,
+177, 88, 65,169, 7, 30,137, 66,242, 72,216,191,113,111,187, 95,246, 29,237,156,189,124,169, 8, 0,182, 77, 43,125,207, 74, 30,
+179,224,255,218,103,198,136, 57,155, 46,184,114,194, 12, 59,227,190,251,238,195,179,207, 62,139, 91,111,189, 21,107,215,174,197,
+ 83, 79, 61,133,187,239,190, 91, 17,239,114, 89, 80, 49,236,248,222,132, 9, 19,254,181, 98,197,138,171, 30,121,228, 17, 78,174,
+147, 70,163, 17,132, 16,216,108, 54,101, 59,124,248,176,244,207,127,254,243, 39,135,195,241, 94,208,130, 36, 24,126, 52,233, 44,
+ 95,159, 45,229,218, 22,109,136,229,136, 16,233,140, 79, 27, 80,126, 67,187,193,116,240,109, 45, 98,168, 84,227,240, 81, 80,216,
+109,213,120,242,137,199,248, 63, 56,183, 70, 14, 25, 50,100,232,236,217,179,235,236,152, 61,123, 54, 14, 29, 58, 52,116,237,218,
+181, 5,193,134, 68,131,136,171,212,168,164,164,121, 0, 96, 40, 42,154,106, 5, 78, 1,192, 11,192, 48, 15, 48,122,237,218,181,
+ 0,128,230,205,155, 67, 2, 58, 17,224,127, 60,240, 49,128,111, 2, 57,234, 78,151, 27, 86,171, 13, 18,173, 41, 71, 18,149, 32,
+121,106, 92, 80,127,145,165, 98,220,141, 2,144,120,158, 71,151, 46, 93, 48,108,216, 48,104,181, 90,152,205,102,165,157,247,111,
+147, 84,220, 20, 41, 0,137, 16,130, 86,173, 90, 97,232,208,161,208,104, 52, 48,153, 76,136,140,140, 84, 4, 22,207,243,232,146,
+ 49, 16, 31, 47,123, 5, 19,135,117,198,164,235, 18,241,217,254, 18, 85,225, 76, 51,106,145,102,208,161, 67,135, 14,136,136,136,
+ 0, 33, 0,207,115, 74, 56, 77, 70, 61, 52,202,240,163,186,184, 23, 21, 21,161,160,160, 0, 5, 5, 5,224, 56, 14,125,251,246,
+133, 86,171,133, 32, 8,200,207,207,199,172, 89,179,224,112, 56, 84,113,114, 28,135,182,109,219, 98,224,192,129,208,106,181,144,
+239, 21,190, 67,131,162, 40,162,178,178, 18,109,218,180,193,170, 85,171,208,191,127,255,176,156, 29, 59,118,196,128, 1, 3,160,
+209,104, 96, 48, 24,148,169, 58, 90,159,184, 86, 85, 85, 41,233,208,189,123,247,122,113,174,217,117, 18,139,214,124, 15,187, 67,
+ 66,133,197, 85,235,132,228, 38,145,216,250,209, 19,170,226, 46,115,190,247,222,123, 40, 43, 43, 83,218, 33,121, 65,155,108,158,
+164,166,166,226,221,119,223, 13,122, 15,242,106,145, 77,126,251,226, 9, 33,217, 62,117, 98, 20, 33, 36,219,247, 51,216,113,222,
+175,215,205,152, 49,163,103, 86, 86,214,156, 62,125,250,124,188,125,251,246,229,193,248,130,241,204,152, 49,163,115, 86, 86,214,
+ 28,223,227, 3, 92, 39,160,131, 37, 15,249,112,178, 51,147,146,146,162,140, 59,155,205,102,104, 52, 26,229, 96,183,219,141, 15,
+ 62,248, 0, 9, 9, 9, 72, 76, 76, 84, 62,131,101, 0,199,113,160,148,226,161,243, 53, 83,128,190,109,170, 65, 1,128, 27,206,
+ 83,133,207,227,241, 96,197,138, 21,136,136,136, 80, 42,186,217,108, 14, 57, 92,164,213,106, 7,244,234,213,139,179,219,237,138,
+ 77,206,113, 28, 14, 31, 62,140,172,172, 44,140, 31, 63, 30,237,219,183,135,199,227, 65,117,117, 53,174,191,254,122,241,141, 55,
+222, 24,160, 86, 96, 25,141, 70,101,222,145,221,110,199,250,245,235, 17, 29, 29,141,152,152, 24,196,197,197, 33, 54, 54, 22, 58,
+157, 14,132,144,240, 45, 26,165,184,249,230,155,107, 57, 87,190,174,149,111,131, 38, 15,251,169,225,188,246,218,107, 21,247,202,
+108, 54,227,155,111,126,107,159,123,247,101,240, 54,107, 0, 0, 32, 0, 73, 68, 65, 84,238, 13, 74, 41,226,227,227,177, 99,199,
+ 14, 53,141, 46, 36, 73, 66, 66, 66, 2, 68, 81, 36,235,214,173,123,193, 43,174,136, 40,138,248,225,135, 31,144,151,151,135,248,
+248,120,165, 87, 26, 14,213,213,213,103,223,120,227, 13,207,219,111,191, 13, 0, 24, 52,104, 16,202,203,203,139,125,246,151, 78,
+156, 56,177, 86,124, 47, 92,184, 80,250, 23,208, 87,112, 59,221,176, 88,109,168,170,172,134, 75,242,192,229,246,160,248,244,249,
+232, 39,166, 77, 21,255,243,224,100, 0,192,180,249,111,161,242,221,223, 26,176, 47,166,141, 75,184,249,213, 79,166, 3,184, 49,
+ 20,191,197, 98,129,205,102, 67,243,230,205,177,123,247,110, 84, 86, 86, 98,240,224,193,181,220,223, 48, 67, 16,190,112,156, 62,
+125,186,239,168, 81,163,118,191,246,218,107,173, 59,117,234, 68,170,171,171, 81, 93, 93, 13,139,197, 2,249,251,129, 3, 7,232,
+242,229,203,127,177, 88, 44, 25, 8, 49,103, 72,155, 94,121,212,145, 27,177, 98,203,143,154, 81,127, 31, 51, 58,234,212,233, 66,
+119,169, 85, 95, 85,110,253,201,238,161,135, 64, 61, 20, 30, 74, 65, 61, 18, 60, 84,250,163,215,111,167,182,107,215,238,159,203,
+150, 45, 11, 40, 72,121,158,199,178,101,203,208,175, 95,191,127,230,231,231, 31, 70,136,201,253, 50, 90, 0, 90,183, 40, 62,241,
+127,255,247,127, 26, 0, 24, 56,112,224, 19, 45, 92,174,105, 5,128,163, 83,215,174,183,108,223,190, 61,202,104,172, 89, 39, 20,
+ 21, 21, 5, 74, 41,111,177, 88,162, 50, 50, 50,110,217,191,127,127, 93,129, 37, 81,184, 92,110, 88,109,118,148,149, 87,193,229,
+112,193, 45,185,225,113, 75,112, 75, 53,238,168,219,227,129,228,246,192, 45,121,192, 11,124, 68,230, 53,205,170,106,188, 44, 82,
+182, 57,167,176, 89,160, 34, 90,179,194, 11, 72, 74, 74, 82,134,132,125,231,202,168,112, 49,234, 24,245, 53,109, 33, 85,218,198,
+ 31, 55,102,163,248,208, 86,104, 8,133,228,113, 65,114, 59,225,113, 57,193, 67,194,161, 99,167,209,169,105,216, 54, 68, 9,231,
+240,103, 94, 68,239,222,189,241,217,184, 27, 65, 8,112,239,250, 29,208,104, 52, 88,126,211, 96,104,245, 90,252, 99,205, 78,181,
+225,172, 21,247,220,220, 92, 60,244,208, 67,120,233,165,151, 96, 48, 24,148,206,201,145, 35, 71,240,201, 39,159, 96,200,144, 33,
+170,227, 78, 72,205, 80,171,156,134, 51,102,204,192,153, 51,103, 48,111,222, 60,244,236,217, 19,162, 40,162,172,172, 12, 25, 25,
+ 25, 56,119,238,156, 42, 78, 74, 37,196,198,198, 42,211,117,252,231,136,201, 29,217,250,228,145, 47,231, 93, 55, 37,227,203,109,
+203, 65, 64,176,243,163,169,181,238, 71,239,124,178,165,222,156,207, 62,251,108,173,112,214,211,189,146,181, 8, 9,114,207, 27,
+165,210,241,146,143,147, 19, 89,151,149,149, 53,199,255,252,112,124,190,251,253,206,119,248,137,178,115,106,134, 8, 41,199,113,
+144, 36, 9,102,179, 25, 90,109,141, 3,230,127, 35, 53,153, 76,181, 20,121,184,241,100,158,231, 65, 41, 85, 18,150, 15,176,127,
+199,142, 29,117, 68,192,127,255,251,223,144,227,180,110,183,187, 99, 68, 68, 4, 42, 43, 43,149, 57, 82, 90,173, 22,211,167, 79,
+199,196,137, 19, 21,113,165,213,106,177,120,241, 98,164,167,167,195,225,112,116, 12,149,160, 26,141,198,210,181,107, 87, 78,118,
+129, 12, 6, 3, 25, 63,126, 60,239,116, 58,161,215,235,107,185, 78,242,220,180,112, 98, 72,118,155,190,251,238, 59, 85, 14,150,
+218, 57, 72,148, 82,236,221,187,183,150, 80,243, 46, 53, 6, 0,236,219,183, 79,185,209,170, 29,239,246,120, 60, 48, 24, 12, 68,
+163,209, 16,147,201, 20, 53,105,210, 36,133, 87,206,115, 57,222,106, 38, 90,239,223,191,255,250,144,227, 53, 7, 14,252, 37, 31,
+199, 32, 73, 18,156, 46, 23,172, 86, 27, 42,171, 45,152, 57,215, 59,162, 54, 19, 57, 0,114,250, 78,121, 8,247, 13, 27, 50, 16,
+225, 87,247, 5, 68,108,108, 44, 62,255,252,115,136,162,136, 85,171, 86, 33, 50, 50, 18,163, 71,143, 70,100,100, 36,158,120,226,
+ 9,220,118,219,109,245, 17, 88, 0, 80, 94, 90, 90,218,119,234,212,169,187, 95,126,249,229,230,205,155, 55,135,211,233,132,195,
+225,128,211,233,196,177, 99,199,176,124,249,242, 66,139,197,210, 23, 64,121, 56, 50,109,122,229,209,236, 71, 90,159,237, 55,230,
+ 38,219,161,162, 53, 56, 87,116, 30,110,207, 41,184, 61, 30,184, 93,238, 26, 65, 32, 73,112, 59,221,224,121, 46,242,250, 62,105,
+235,106, 38,252, 19, 7,128, 17,151, 48,171,104,126,126,126,105,124,124,188,220,131,140,116, 56, 28,196,219,150, 80,252, 54,193,
+189, 26,128, 83, 13, 97, 33, 48,229, 63, 47,189,212, 76, 30,190,127,233,165,151,154, 61,250,200, 35, 83, 0,188,126,104,255,254,
+165,119,221,117,215,212, 79, 63,253,180,214, 57,119,221,117, 23, 14,237,223,191, 52, 88,207,199,229,114,193,106,181,163,164,228,
+ 87,220,115,239, 51, 62,221,125,170,244,251,107, 38,189, 83, 0,208, 3, 64,201,185,159,241,224, 67,143,234, 66,117,168,188,245,
+ 29,162, 40,214,153,132,236,219,190,171,104, 63,168,255, 20, 11,141, 70,131,163,219,179, 49,117,202, 45,128,199, 13, 56,171, 1,
+167, 5,212,105, 1,117, 84,131,104, 13,160, 46,155, 42, 94,143,199,163, 76,219, 16,120, 14, 58,237,111,237,166,209,104,128, 86,
+175, 85, 27,206, 58,113, 63,113,226, 4,238,191,255,126, 56, 28, 14,140, 25, 51, 6, 54,155, 13,118,187, 29, 54,155, 13,173, 90,
+181,130,213,106, 85, 29,119, 73,146, 20, 23,112,234,212,169,232,217,179, 39,102,205,154,133,199, 31,127, 28,173, 90,181,194,148,
+ 41, 83,240,241,199, 31,163,115,231,206,176, 88, 44, 97, 57,229,182,196,108, 54, 67, 16, 4,165, 13,246,205, 43, 89, 96,169,205,
+163, 64,156,132,252, 54,239,214, 55,223, 31,158, 52,168,222,156,115,230,204, 65, 73, 73, 73, 29,231,202,215,193, 90,176, 96,193,
+ 69, 85, 86, 63,151, 41,236,113,132,144, 92,239, 95,214,233,211,167, 63, 73, 8,201,158, 62,125,250,147,115,231,206,205, 83,195,
+ 23,104, 63, 33,228, 43,239,253,247, 6,159,255,114,213, 8, 44,200,110,147,108,107,202, 9, 39,239, 3, 0,163,209,136,236,236,
+108,172, 88,177,162,214, 13, 37, 24,100,209,246,117,124, 77, 1, 24,233,117,174,228,223, 35,138, 37,140, 26, 53, 10,173, 90,181,
+170,229, 94, 25, 12,134,144, 98, 67,146, 36,156, 56,113, 2, 7, 14, 28, 64,159, 62,125, 80, 94, 94, 14, 1,192,180,253,251,209,
+105,210, 36,216,189,194, 79,171,213,226,159,255,252,167,170, 12,220,179,103, 79,173, 73, 64, 29, 59,118, 60,149,145,145,145,178,
+ 99,199, 14,197,209,210,233,116,208,235,245,138,200, 80, 83,169, 41,165,184,229,150, 91,106,137, 33,127,129, 37, 87,158,111,191,
+253, 86,213, 16, 33,165, 20,153,153,153,138,123, 21, 17, 17,129, 47,190,248, 66, 57,230,186,235,174, 3, 33, 4, 9, 9, 9,248,
+230,155,111,194,114,202,105, 42,231, 61,207,243,168,174,174, 70,110,110, 46,180, 90,173, 50, 63,195, 96, 48, 40,241,103, 8,150,
+225, 18, 28, 46, 23, 44, 86, 27, 42, 43,107, 26,210,163, 7, 62,171,117,136,211,126,241,139,211,100, 39,180,162,162, 2,235,215,
+175,199,231,159,127,142,158, 61,123,214, 26, 30, 84, 59, 68,232, 59,143,224,215, 95,127,237,247,248,227,143,239,124,225,133, 23,
+154,198,197,197,193,233,116,226,196,137, 19,248,224,131, 15,206, 88, 44,150,126, 0,206,171, 79, 3, 10,183,203, 13,155,197,138,
+242,202,106, 60, 63,123,113,208, 38, 2, 0,156,142, 74,140, 26,145,169,189,196, 57,117, 26,192,221, 62,191,151, 2,144, 39,227,
+ 87, 0,152, 88, 31, 50, 17, 24, 48,230,150, 91, 6, 78,157, 58, 85,249,111,234,212,169,216,185,115,231, 64,113,197,138, 3, 46,
+ 96, 35,191, 98, 69,151,121,243,230, 41,199,204,155, 55, 15,159,175, 88,177,193, 3,108, 12,210,109,175,113,176,172, 54, 84, 85,
+ 91, 17, 25,157,140,211,199, 55,133, 13,139,134,183,131,134,104,151,229, 54, 36,216,188,155,122,136, 43, 37,164,242,177,242,188,
+163, 46, 3,111,193,107,175,255, 23, 58,142,226,230,129,157, 16,111,144, 64,140,177,208,100, 78, 7,137, 78,171, 57,235,249,171,
+161,166,173,219,244,212, 52, 28, 51,233,241,207,181,219, 32,138, 34, 62, 31, 55, 18, 26,173, 6,119,124,181,185,102,113,207,228,
+155,161,209,105, 49,244,157, 79,212,220,168,149,184, 31, 61,122, 20,219,182,109, 67,135, 14, 29,240,243,207, 63, 43,115,108,229,
+251,150,202, 14,175, 18,119,185, 29, 47, 42, 42,194,168, 81,163,160,209,104,176,120,241, 98,108,218,180, 9,143, 63,254, 56,238,
+186,235, 46, 92,127,253,245,193,230,197,214,225,244,205,163, 96,243,163,234,155, 71,254,156, 74,249,253, 29,249, 46,115,202,147,
+219, 3,137,245,223, 59,177,221,199, 45, 74, 12,176,239, 6,127,231,137, 82,218,203, 59, 55,202, 62,119,238,220,188,185,115,231,
+142, 34,132,100,207,157, 59,119, 84, 48, 7, 43, 16, 79,128,253, 97,219, 65,193, 79,133, 14,240, 21, 81,218, 16, 99,217, 38,147,
+ 9,119,223,125, 55,158,120,226, 9,101, 34, 99, 40,200,202, 53, 20,178,179,179,235,252,183,106,213,170,112, 67,132,135,163,162,
+162,122, 14, 28, 56, 16,229,229,229, 56,121,242, 36,204,102, 51, 58,189,250, 42,246,223,119, 31,174, 94,184, 16,220,192,129, 74,
+133,223,191,127, 63,116, 58,221, 97,155,205, 86,175, 76, 53,155,205,136,137,137,129, 94,175, 71, 68, 68, 4, 34, 34, 34, 96, 50,
+153, 20,161, 21,110,136, 80, 46,124, 95,125,245, 85, 72,231,202,215,242, 85, 35,134, 40,165,216,177, 99, 71, 29, 7, 75,190,166,
+188, 79,118, 50,212,112,122, 29, 75,170,211,233,192,243, 60,140, 70,163, 98,247,235,245,122,101, 83,235, 96,133,123,144,104, 90,
+ 90, 90,173, 7,145,254, 63,123,231, 29, 30, 69,181,134,241,119,102,182,111, 54, 13, 82, 72, 15, 1, 2,129,208, 66,151, 38,160,
+ 8, 72, 17, 68,176, 97,167,169,112,189, 82, 45, 24, 80, 1, 69, 64, 16, 1, 1, 5, 1, 1, 43, 77,138,244, 38,229,146,208, 99,
+ 66, 40,233, 33, 36, 33,109,179,117,202,185,127, 36, 27, 55, 33,101, 55, 4, 80, 56,191,231,217,103,119,167,188,115,206,204,153,
+153,119,190, 83, 70, 46,151,151, 27,136,244,223, 95, 69,104, 70,177,190,184,206,245, 45, 22, 11,100, 50, 25,126,253,245, 87,116,
+234,212,169,204, 92,217,140,149,253,113,119,146,180, 91,183,110, 61,186,120,241,226,147, 11, 22, 44,240,212,235,245, 88,179,102,
+ 77,129, 94,175,127, 20,165,237,136, 28,190, 24, 2,224,173, 2, 12,102, 51,244, 69, 37,251,224,234,197, 95,106, 52,101,255,102,
+154,183,106,245,226,234,213,171,111,155,190,122,245,106, 36, 38, 38,190,136,243,231, 15, 6, 1,203,167, 78,157,218,184, 93,187,
+118, 65, 0, 48,117,234,212,212, 32, 96,121,117,231,185,173,138, 80, 95,106,214, 77,197, 57,117, 22,105,173,248,192,119,167, 55,
+ 68,134, 97,202, 76,198,227, 35, 94, 67,198,181,120, 68,104,115,224,227,225, 2,169, 40, 3,138, 62,209, 56,127, 75,139, 47,151,
+239,118, 42,157, 90,165, 2,106,205,223,213, 77,106,141, 26,170,210, 90, 5,134, 97,160,214,106, 32, 87, 42,157,206,123,124,124,
+ 60,180, 90, 45, 68, 81,188,237,126,227,108,143,102, 66, 72,217,189,115,193,130, 5,152, 60,121, 50,214,172, 89,131,243,231,207,
+163, 77,155, 54,120,236,177,199,112,243,230, 77,156, 59,119, 14,102,179,217,225,116,218,223, 47,226,226,226,176,119,239, 94, 36,
+ 36, 36, 32, 53, 53,181,214,199,189, 98, 53, 99,105, 13, 78,137,121,221,123, 6, 79, 63, 30, 85, 43,205,232,232,104,220,188,121,
+243,182,200,149,125,243,163,106, 34, 88,101, 94,164,154,242, 21, 99,111,130,108,145, 38,123, 67, 84,241, 63, 0, 79,219,180,105,
+211,166,189,231,232,122,246,255,109, 17, 48, 71,170, 22,237, 13, 22, 83,177,186,142, 97,152,178,157,110, 31,153,178,253,214,106,
+181,101, 81,166,144,144,144,106,163, 87,182, 19,142,227, 56,116,191, 86, 4,165, 82, 89, 86,157,215,255,166, 84, 46, 68, 30, 22,
+ 22, 86,174, 13,150,253, 65,169, 12,179,217,124,240,224,193,131,109, 7, 15, 30,204,197,197,197, 65, 38,147, 65,146, 36,152, 59,
+119, 70,155,229,203,113,225,157,119,208,227,250,117,152,121, 30,106,181, 26,187,118,237,178, 26, 12,134,131,206, 20, 26,150,101,
+ 25,155,193, 82,169, 84,112,117,117,133,155,155, 91, 89, 52,199,153,139, 80, 85, 79,136,246, 31,103, 78,104, 91,131,126,251, 27,
+171,237,248, 25,141,198,114,134,203, 81,236,171, 12,108,166,200,221,221,189, 92,181,168, 45,138,231,136,193,170,105, 32, 81,149,
+ 74,229,118,248,240,225,198,110,110,110, 32,132, 32, 39, 39, 7,207, 62,251,236,229,127,125, 0, 11,164,164,145,187,209, 4,189,
+209, 84,231,250, 63,252,240, 3,174, 92,185, 2,171,213,138, 57,115,230,220,102,172,106, 25,193,178,113, 69,163,209, 72,253,250,
+245,195,241,227,199,161, 82,169,120,212, 98,252, 42, 34, 73,176,242, 2, 76, 70, 51,244,197,197,120, 24,184,116,254,252,207, 46,
+ 46, 46,207, 2,208,229,231,231,115,238,238,238,208,106,181, 48, 26,141, 5, 92,105, 79,193, 36,192,162,225,249,207, 70,140, 24,
+177, 16, 0,100, 60,255, 89,117,227, 96,149, 25,172, 58,222,143,182,235, 86, 85,209,171,218,154, 43,134, 97, 74,186,231,179, 44,
+214,204,153,140, 8,109, 54,162, 26,186,192,116,243, 10, 84,110, 94, 96, 60, 66,241,229,242,221,136, 75,186,229, 84, 58,159, 91,
+247, 11,130,130,130,176,253,165, 33, 80,169, 84,120,246,151,189, 37,141,180,199,142,132, 66,173, 66,159, 37, 63,212, 42,239, 6,
+131,161,202, 72,149, 19, 17,172, 50, 77,155, 1,140,138,138, 66,147, 38, 77,112,240,224, 65, 68, 69, 69, 33, 49, 49, 17,137,137,
+137, 72, 74, 74,194,249,243,231,145,151,151,231,244, 49,218,180,105, 19,178,179,179,161, 80, 40, 80, 88, 88,136,235,215,175, 87,
+215,254,217,225,227,110,163,217,147,209, 0, 0,127,111,119,167, 12,150,189,230,188,121,243,156, 25,230,161,156, 76, 53,243,114,
+ 42,180,117,178,253,183, 84, 48, 59, 21,255, 87, 92, 30, 0,110, 2,224,106, 88,175,226,255,156, 57,115,230, 28,180, 69,190, 74,
+117,185,170,218, 95, 85,140, 96,217,155, 0, 99,179,102,205, 52,246,245,167, 44,203,194,213,213,149,153, 52,105, 18,199, 48, 12,
+116, 58, 29,220,221,221, 17, 30, 30, 14,171,181,230,102, 9, 10,133,194,216,177, 99, 71,141,125,232,149, 97, 24,184,184,184,112,
+ 83,166, 76, 97, 86,173, 90, 85,233,122, 91,183,110,173,182,112, 11,130,176,112,212,168, 81,175,167,165,165,121,250,250,250, 34,
+ 51, 51, 19, 10,133,162,100,180,216, 94,189,208,253,218, 53, 88, 75, 13, 67,124,124, 60, 86,174, 92, 89,108,181, 90, 23, 58,123,
+209,208,233,116,168, 95,191, 62, 84, 42, 85,185, 94, 49,118,161, 85,135, 34, 88,117,105,174,108,154,246, 55, 86,219,239,177, 99,
+199,150,253,119,230, 34,169, 80, 40,200,147, 79, 62, 89,246, 14, 66, 15, 15, 15,120,121,121, 33, 43, 43,235,239,158, 58,165,145,
+ 59, 71, 13, 86, 77, 3,137,202,229,114, 88,173,214,178,234,204, 37, 75,150,220,137, 49,248,231, 24, 44, 65, 98,116, 58,111,248,
+251, 55,133,183,143, 9,146, 36,214,153,182, 32, 8, 24, 55,110, 92,185, 49,175,108, 55, 98,219, 32,182,182, 30,190,246,225,127,
+103,159,196,239, 56, 58, 66, 0, 94, 40,141,226, 25, 44,255,186, 99, 24, 18, 18,226,150,156,156, 92, 89,187,168, 74,123,251, 1,
+127, 15,201,192, 1,159,164,164,164,180,116,119,119, 71,223,190,125,177,109,243,230,173, 31, 2,101, 33, 27, 35,144,166,185,113,
+227, 63,165,191,211,107, 10,234,217,170, 8,139, 13,117,109,214,153,219,162, 87,119, 90,149,195,178, 37, 15,102,191,125,243, 25,
+ 34, 52, 89,104, 19,172,194,177, 19,231,208, 41,136,128,152, 21,181, 78,167, 78,167, 43,105,140,175,213, 66,165,250,187,205,149,
+ 74,171,129, 66,169,170,117,222,237, 35, 85,119, 26,193, 98, 24,182,220,126,124,253,245,215, 49,117,234, 84,244,237,219, 23,137,
+137,137, 56,124,248, 48, 46, 95,190,140, 9, 19, 38, 32, 50, 50, 18, 79, 60,241,132, 83,199,232,183,223,126, 67, 65, 65, 1, 8,
+ 33,200,206,206,134,201,100,194,140, 25, 51,238,248,184,219,184,182,103, 54, 0,224,151, 61,177,181,214,156, 62,125,122,217, 24,
+140,182,123,126, 13, 81, 43, 71,238,119,167,170,251,239,236,250,247,130, 74, 13,214,229,203,151, 43,237, 43, 31, 17, 17,145,213,
+167, 79, 31,159,132,132, 4,232,116, 58,132,135,135,195,108, 54, 87, 87, 13,209, 18,165, 99,101, 92,186,116,169, 82,205,176,176,
+ 48,235,227,143, 63, 46,111,208,160, 65,185,200,149,173,135,141,189, 51,174,168, 89, 74,145,201,100, 26,221,181,107,215,181, 59,
+119,238,212,132,135,135,163,160,160,164,253,237,154, 53,107,240,214, 91,111, 65,163,209, 32, 33, 33, 1, 67,134, 12, 49, 24, 12,
+134,209, 40, 63, 6, 86,101,154,183, 25, 25,133, 66, 81, 86, 77,102,171, 42, 83, 86, 31,138,190, 77,147, 97, 24, 44, 94,188,184,
+210,177,160, 42,178,124,249,242,202,220,124,165,233,252,226,139, 47,234, 76,243,228,201,147,229,222, 49, 56,112,224,192,111,158,
+120,226, 9,164,166,166,150,171, 22,172,193, 96,149,211,172,105, 32, 81,142,227,224,235,235,139,143, 63,254, 24, 94, 94, 94,104,
+208,160, 65,101, 6,171,218, 99, 84, 75,238,170, 38, 97, 73,204,162, 5,209,221,190,249,246, 23,185, 74,201,226,248,225, 95, 80,
+152,119,163,124, 4,214,250,119,151,104,101, 84, 31, 88, 98,247, 57,148, 78,179,217,140,207, 63,255, 28,209,209,209,136,142,142,
+174, 54, 65, 85,116,135,174, 49,239,246, 6,203, 65,179,117,155,166, 36,137,140, 90,235, 9,173,139, 63, 34, 35, 61, 33,145,154,
+199,234,148,238,255,113, 55,164,166,166,186, 7, 5, 5,225,242,229,203, 12,254,110,143,245,247,177, 82, 42,159,173, 96,176,110,
+ 63,223,129,243, 27, 54,108,104,217,170, 85, 43, 44, 89,178, 4, 0, 94,250,252,143, 63, 70, 70, 27, 75,194,153, 28,176,177,212,
+140,213,152, 78,145,136,140, 90,235, 1,141,174,116, 63, 74,142,143,121, 74,170,201,187,237,230,119, 39, 15,122,149,105,218,214,
+191,122,252,119, 60,217, 63, 16,127,158, 60,143,125,105, 46, 8, 82,101,192,207,144, 13, 41,251, 47,252,103,120, 20,190,252,185,
+228, 38,126,254,116,205,154, 12,195,224,232,164,209,208,169, 85,120,122,195, 14,200,229,114, 28,124,231,101, 40, 20, 10,244, 92,
+ 80, 82, 37,123,225,243,233,144,169,148,136,152, 16,237, 80, 58, 43,214,212,216,218, 92,217,155,171, 26, 34, 88, 85,230, 93,175,
+215, 35, 47, 47, 15,107,215,174,197,171,175,190,138,155, 55,111,226,250,245,235, 72, 72, 72,192,198,141, 27,203,221,227,224,196,
+ 49,154, 54,109, 26,222,125,247, 93,176, 44,139,150, 45, 91, 34, 58, 58, 26, 93,186,116,113,250, 24, 85, 60,238, 21,113, 32,122,
+ 85,165,230,162, 69,139,156,238,176,245, 32,226, 84, 3, 13, 91, 36,203,203,203, 11, 46, 46, 46, 0, 80,238, 6, 91, 83, 53, 97,
+ 85,154,130, 32, 64,163,209, 64,163,209,148, 27, 22, 97,240,224,193, 53, 70,176, 74,217,149,144,144,240,124,139, 22, 45,190,139,
+142,142,118,121,244,209, 71,229,254,254,254,104,215,174, 29, 18, 18, 18,240,251,239,191, 91,151, 46, 93,106, 48, 24, 12,175, 2,
+216, 83, 27,243,108,107,248,109, 63,162,189, 51,136,162,152,122,253,250,117,191, 47,190,248,130, 99, 24, 6, 11, 23, 46, 44, 55,
+ 64,107,197, 60,158, 56,113, 66, 32,132, 92,169, 33,138,145,122,253,250,117,191,249,243,231,151,211,180,125, 42,154, 20, 71, 52,
+171,194,150,231,138,251,192,145,147,167,166,129, 68,101, 50, 25,226,227,227,241,209, 71, 31,129, 97,152,114, 29, 39,254,205,252,
+249,191,204, 85, 93,218,193,243,217,225,189, 91, 49, 96, 97,169, 36,210,203,229,230,151,153,171,161,243, 55,225,183,119, 71, 58,
+114, 44,174, 31, 58,116, 40,120,246,236,217, 28,199,113,152, 55,111, 94,185,178, 84,241,184,239,223,191, 95,212,104, 52, 41,181,
+205,135,213,106,117,164, 23, 85, 85, 39,248,177,197,243, 62,234,251,205,234,109,114,134,177,224,248,161, 95, 80,144, 95,121,215,
+116,165, 92,134,117, 27,182, 10, 50,142, 77,189,207,135,238,155,199, 30,123,108,198,222,189,123,101, 65, 65, 65,181, 22, 9, 4,
+182, 45, 94,188,184,255,168, 81,163,234, 53,111,222,220,214,249, 68, 89,250, 65,233,200,238,187, 28, 52, 73, 91,190,252,226,163,
+151, 86,172,222,166,100, 25, 43,142, 31,254, 5, 5, 21,204,250,237,209,104, 57,214,111,216, 98,149,201,184,248,154,174,193,181,
+233,193,236, 8,109,159,124, 21, 95,239, 88, 9,159, 86,253,241,204,160,110, 56,186,228, 37,140,104,110,132,245,199,231,208,242,
+153,117, 88, 51,189, 36,122,211,230,167,233, 14,221, 43,220,116,127, 15, 88,201,178, 44, 84,106, 13,228,202,191,163, 47, 74,173,
+ 22,156, 19, 17, 91, 91,222,171,139, 84, 57,187, 63, 56,142, 67, 88, 88, 24, 26, 53,106,132,174, 93,187,162,109,219,182,232,213,
+171, 23,206,157, 59,135,115,231,206, 97,194,132, 9,213,153,171, 26,143, 81,223,190,125,209,175, 95,191, 59, 62, 54, 21,143,123,
+ 93,224, 72, 89, 26, 63,126, 60, 0,220, 81, 52,235,129, 54, 88,222,222,222, 80, 42,149,181, 50, 84,149,105, 90, 44,150, 50, 99,
+165,209,104,202, 34, 86, 91,183,110,117,166,128,239, 49, 26,141,145, 31,124,240,193, 68,141, 70,211,203,104, 52, 70, 0,128, 86,
+171,253,203, 96, 48, 28,176, 90,173,139, 0,228,223, 73, 90,237, 13, 70, 37, 81,174,106, 31,241,179,179,179,159,120,241,197, 23,
+247,176, 44,219,176,186, 23, 51,219,153,213,164,172,172,172,254, 53,105,190,240,194, 11,149,106, 86,166,235,136,102, 21,230,176,
+156,169,178,239, 97,232, 80, 33,171, 97, 32, 81,185, 92, 14,157, 78,135,205,155, 55,163,126,253,250, 15,212, 9,118, 60, 38,243,
+243,234,230,247,172,175, 60, 4,192,123,232,252, 77, 41,135,114,173, 33, 67,231,111, 74,254,237,221,145,193, 53, 24,158, 71,230,
+206,157,123,148,231,249, 16, 7,203,109,178,217,108,238,230,108,218, 9, 33,136,143,143,151, 94,127,253,245,156,236,236,236,103,
+106,147,255,195,199,147, 23,116,235,232,239, 53,124, 72,183, 14, 96, 24, 88, 44, 85, 52,234,101, 64, 8, 33, 68,198,177,169,135,
+ 78,164,190,126,159, 95,161,113, 54, 57, 57,121, 86,227,198,141,199, 0,168,234, 78,184,177, 38,145, 36,192,162, 52,155,191,104,
+223,190,253,148,247,222,123,207, 99,208,160, 65, 8, 10, 10,130,187,187,243,111, 11, 58,118, 42,125, 76,231,118, 98,224,211,131,
+187, 61,193, 50, 12, 49, 91,170,111, 28,205,216,246,167,140,139, 63,124, 50,173,117,117,209,121,155, 41,191, 27,209,134, 62,195,
+ 95, 65,159,225,175,148,149,167,125, 63, 63,138,152,244, 63,208,142, 77,135,121, 69, 55, 48,110,182,162, 94,243, 48, 55, 44,203,
+ 98,208,234,205, 80, 40, 20,101,233,124,100,110,249,126, 1,225,111, 58,254, 46,117,251,188,219, 71,176, 42,185, 22, 59,213, 6,
+139,227, 56,228,228,228, 32, 33, 33, 1, 89, 89, 89, 48, 24, 12,136,139,139,131,197, 98, 65, 94, 94, 30, 90,182,108,233,220,211,
+253, 93, 56, 70,247, 83,243, 97, 48, 86,181, 50, 88,132,144,180, 78,157, 58,213,116, 51,118,170,151,145, 76, 38, 51,117,235,214,
+141,169,172,183,129,237,183, 70,163,113,244,241, 57,223,106,181, 70, 91,173,214,104,148, 86,133, 89,173,214, 59,110, 72, 34,138,
+ 98, 70,199,142, 29,185,234, 46,250,146, 36, 85, 59, 98, 92, 78, 78, 78,113, 78, 78, 78,157,190, 58,252,110,104, 86,114,210,136,
+ 99,198,140,169,214, 73,185,184,184, 84,219,184,168,166,129, 68, 13, 6, 67,230,139, 47,190, 40,218, 87, 53,219, 15, 68,250, 64,
+195,144,228, 1,207,190, 22,114, 40,215, 26, 2, 0, 54,147, 5, 66,146,171, 90,229,244,233,211, 89, 0, 26,223,237,164, 93,187,
+118,205,210,169, 83,167,245, 69, 69, 69,227, 1, 24,106,171,115,244, 84,198,244,127,225,145, 57, 11, 96,236,157,138, 88,128, 56,
+ 95,147,105, 92,244,135, 31, 62,253,209,135, 31,134, 75, 64,125,148,142, 81,197, 57, 96,210,236, 57, 17,115,163,206,199, 6, 19,
+ 69, 49,237,145, 71, 30,113,122,157,154,230, 87, 51,146, 56,126, 64, 16,112,218,121,205,187,145, 78,155,102,171, 86,173,208,166,
+ 77,155,178,111, 27,246,211,219,182,109,235,144,102, 84, 84, 20,154, 55,111, 94,229, 8,237, 21,219, 92,221,239,188,219,176, 61,
+250,182,109,187,187,206, 52,239, 52,157,148,234,105, 73, 53,169, 38,213,252,215,106,114,116,127, 82, 77,170, 73, 53,239,161,230,
+ 3, 5, 75,119, 1,133, 66,169,234, 1,147,238, 2, 10,133, 66,169, 29, 76, 53, 46,212,153,158, 59,181,113,178, 23,168, 38,213,
+164,154, 84,147,106, 82, 77,170,249,208,105,214,164, 93,215, 61,135, 31, 72,104,248,148,106, 82, 77,170, 73, 53,169, 38,213,164,
+154, 15, 29,180,138,144, 66,161, 80, 40, 20, 10,165,142,145,209, 93, 64,161, 60,220, 68,223,225,131, 86,244,109, 99,131, 62,220,
+233,164, 80, 40, 20,128, 70,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,229, 33,131,161,187,128, 66,121,184,137,166,109,176, 40, 20, 10,165,206,161, 17, 44, 10,133, 66,161, 80, 40,148, 58,198,214,
+139,208,254,125,125, 52,170, 69,161, 80, 40, 20, 10,229, 94,243, 64,121, 17, 25, 53, 86, 20, 10,133, 66,161, 80,254, 33, 60, 48,
+ 94,132,173,194, 57, 82, 40, 20, 10,133, 66,161,220,107, 30, 24, 47,194, 62,136,174,145, 66,161, 80, 40, 20,202,191,146, 7, 54,
+130, 69,163, 88, 20, 10,133, 66,161, 80,238, 23, 15,140, 23,145, 61,104,142,145, 66,161, 80, 40, 20,202,191,146, 7,202,139,220,
+237, 97, 26,232,155,198,169, 38,213,164,154, 84,147,106, 82, 77,170,249,208, 65,199,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,148,135, 10, 25,221, 5, 20,202,195, 77,244,191,228, 29,125,209,244,
+ 93,130, 20, 10,229, 95, 4,141, 96, 81, 40, 20, 10,133, 66,161,212, 49, 12,170,238, 9,112,193, 9,157,218,244, 38,184, 64, 53,
+169, 38,213,164,154, 84,147,106, 82,205,135, 78,179, 38,237, 11,160,220, 21,227, 69, 53,169, 38,213,164,154, 84,147,106, 82,205,
+135, 79,243,129,130, 86, 17, 82, 42, 34, 67,245,109,243,106,154,127,175, 52, 41, 20, 10,133, 66,249, 71,223, 76, 41, 20, 27, 93,
+ 0, 12, 44,253,189, 29,192,113, 39,231,223, 43,205,251, 66, 84, 84,148, 70,173, 86,247,221,191,127,191, 34, 62, 62, 30, 39, 78,
+156, 32, 63,252,240, 3,111, 50,153,254,136,141,141, 53,210,226,243, 96,208,182,109,219, 39, 24,134,153, 10, 0,132,144,207,206,
+156, 57,179,251, 14,228,152,198,141, 27, 79, 80, 42,149, 3,228,114,185,191, 40,138,140,217,108,206, 48, 26,141,123,210,211,211,
+231,163,118, 13,247, 59,120,121,121,141,141,140,140, 12,191,118,237, 90,106, 74, 74,202, 58, 0,187, 1, 60, 17, 28, 28,252, 98,
+ 88, 88, 88,208,197,139, 23, 47,231,228,228, 44, 7,240,191,251,152, 78, 10,133, 26, 44, 7, 96, 61, 61, 61, 31,215,104, 52, 19,
+245,122,125,148,155,155,219, 69, 65, 16, 22,103,102,102,110,167, 39,222, 3, 85, 22, 6, 18, 66,228, 0,192,113,220,144,142, 29,
+ 59,134, 48, 12, 35, 49, 12, 67, 8, 33,204,201,147, 39,219,138,162,200, 2, 0,195, 48, 3, 75, 47,222, 66,109, 53, 5, 65, 96,
+ 78,159, 62,237,172,230, 93,161, 69,139, 22,179, 9, 33,254,213,238, 32,153,172,253,190,125,251,154,109,217,178, 69, 88,183,110,
+ 93,254,200,145, 35,117, 47,191,252,178,108,205,154, 53, 95, 3,248, 79,197,229,155, 55,111,190,128,101, 89, 47, 71,182, 47, 73,
+ 82, 78, 92, 92,220,127,105, 49,188,255, 48, 12, 51,245,181,185, 7,123, 72, 4,248,110, 90, 79,182,212,188,212,214,172,125,255,
+212, 83, 79, 61,219,180,105, 83,153, 36, 73,224,121, 30,102,179,185, 89,108,108,236,163,187,119,239,110,159,148,148,244,140,147,
+146, 3,167, 77,155,182,114,214,172, 89,222,114,185,156,225,121,190,243,143, 63,254,216,111,236,216,177,103,151, 47, 95,222,102,
+196,136, 17,174,182,233, 31,125,244, 81,255, 57,115,230,188, 3, 96,227,125, 72, 39,133, 66,111,170,213,205,212,233,116, 77,188,
+189,189,223, 45, 44, 44,236,223,190,125,251,130,209,163, 71, 95, 61,119,238, 92, 92,100,100,164,126,245,234,213,159,242, 60,191,
+212,211,211,243,143,194,194,194,249, 89, 89, 89,113, 78,110,187, 9,128,209, 0,250, 3, 8, 4,144, 1, 96, 39,128,149, 0,226,
+107,147, 25,127,127,255, 86, 46, 46, 46, 83, 24,134,233, 92, 92, 92, 28,232,226,226,146, 65, 8, 57, 89, 84, 84, 52,239,198,141,
+ 27,177,181,209, 12, 8, 8,104, 4,224,109,153, 76,214, 93, 20,197,134, 28,199, 37,139,162,120, 68, 20,197, 37,153,153,153,151,
+107,163,249, 72,160,110,144,164,115,155,207,115,154, 32,189, 73, 80,232, 84, 50, 94, 46,153, 82,165,226,252,105,167, 82,139,127,
+249, 39, 20, 12,165, 82,201,174, 91,183,174,141, 82,169, 4, 0, 88, 44, 22, 68, 70, 70,222,209,123,162,228,114, 57, 59,111,222,
+188, 54, 10,133, 2, 0, 96,181, 90,209,187,119,239,127,196,187,167, 24,134, 9,140,137,137,113,183,165,173, 34,162, 40, 98,200,
+144, 33,161, 74,165, 18,203,151, 47, 23,114,114,114,162,190,251,238,187,152,175,191,254,218,235,251,239,191, 31, 94,153,193, 98,
+ 89,214,171, 42, 77, 81, 20, 97,181, 90, 33, 8, 2, 44, 22, 11,122,245,234, 69,175, 70,255, 16, 8, 33, 33, 4,192,206,115, 38,
+ 0,168,127, 39, 90, 26,141, 38, 98,232,208,161,178,236,236,108,200,229,114, 88,173, 86,220,184,113, 3,141, 26, 53,226, 44, 22,
+ 75, 83,103,245,154, 53,107, 54,118,206,156, 57, 62, 59,118,236,176,174, 95,191,222,252,216, 99,143, 41, 94,125,245, 85,183, 30,
+ 61,122,116, 15, 12, 12,100,191,251,238, 59,243,222,189,123,173, 47,188,240,130,106,246,236,217, 62, 59,119,238,124,246,252,249,
+243, 27,239,117, 58, 41, 20, 74, 53, 6, 75,167,211, 29,210,233,116,141,223,120,227,141,248,241,227,199,255,161,211,233, 68, 0,
+184,113,227,134,106,200,144, 33,217,195,134, 13,187,105, 48, 24,184,165, 75,151, 6,127,245,213, 87,123,116, 58, 93,186, 94,175,
+239,232,200,189, 12,192, 68,150,101,223,238,219,183,239, 33,158,231,179, 55,111,222,252,211,240,225,195,187, 73,146,228,178,127,
+255,254,223, 69, 81,252, 6,192, 23, 78, 68,199,184,176,176,176,104, 47, 47,175, 73,203,150, 45, 83, 53,108,216, 16, 90,173, 22,
+ 69, 69, 69,193,151, 47, 95, 14,154, 56,113,226, 96,141, 70,179,216,221,221,253,131,216,216, 88,222,209,123,174,191,191,255,127,
+ 92, 93, 93, 63,249,244,211, 79,213, 45, 90,180, 96,180, 90, 45,146,146,146, 90, 30, 63,126, 60,242,219,111,191,125,149,101,217,
+153,233,233,233, 14,167,179, 39, 32, 51, 55,246,222,237, 26,218,178,215,242,149,223, 50, 94, 46, 90,200, 24, 6,188,213, 42,207,
+ 50, 24,195,222, 26, 55,230,167,206,170, 75,199,138,228, 89,125,226,226, 96,189,199,101, 65, 0,176,157,227,184, 33, 74,165,146,
+ 29, 50,100, 8,246,238,221,203,152, 76, 38, 25, 0,168,213,106, 97,200,144, 33,208,104, 52,176, 88, 44, 18, 74,170,243, 4, 0,
+170,210,245,205,213,105,202,229,114,182, 87,175, 94,134,211,167, 79,231, 26, 12, 6,185, 77,179, 87,175, 94,245, 84, 42,149,150,
+231,121, 71, 53,239,166,169,196,149, 43, 87,110, 51, 66, 55,111,222, 68,110,110, 46,204,102, 51,147,151,151, 7, 81, 20, 97, 54,
+155,179, 69, 81, 4,203,178,182, 50, 93, 41, 10,133, 2, 9, 9, 9,183, 77,183, 90,173, 48, 26,141,224,121, 30,133,133,133, 26,
+181, 90,221,184, 91,183,110,105, 0,182,232,245,250,249,231,206,157, 75,166,151,167,251, 70,202,239,103, 76,193, 0,172, 0,174,
+221,161,113,151, 0,224,200,145, 35,200,202,202, 66,118,118, 54,178,179,179, 17, 20, 20, 4, 66,136,211,209,255,248,248,248, 69,
+109,219,182,101,206,158, 61,187, 13,192,202, 77,155, 54, 13,189,117,235,214,178,201,147, 39,215,155, 55,111,222,173, 41, 83,166,
+140, 3,240,219,166, 77,155, 94,105,213,170,213,160,243,231,207,127,121, 63,210, 73,161, 80,170,105,228, 78, 8,241,111,210,164,
+201,173,133, 11, 23, 54,155, 54,109, 90,125,189, 94,207,149, 70,137, 76, 0, 96, 48, 24,184,169, 83,167,122,207,157, 59,183,153,
+ 74,165,202, 19, 4,193,187, 18,153,202,186, 90,190,237,230,230, 54,248,234,213,171,155,154, 53,107, 86,111,206,156, 57,103, 92,
+ 92, 92,200,151, 95,126, 25,219,168, 81, 35,191,228,228,228,181,110,110,110,189, 1, 76,170, 34,105,183,105,134,134,134,126, 52,
+124,248,240, 73,199,142, 29, 83,181,110,221, 26,174,174,174,224, 56, 14, 30, 30, 30,232,212,169, 19,115,248,240, 97,213,128, 1,
+ 3, 38, 20, 20, 20,204,115, 84, 51, 32, 32, 96, 82,191,126,253, 62, 61,125,250,180,166, 79,159, 62,140, 82,169, 68,126,126, 62,
+148, 74, 37,186,116,233,194, 44,251,122,137,166,101,139,230, 31, 5, 6, 6,206,114, 84,211,220,196,107,207,200,241, 83,123,111,
+223,185,155,241,245,245,197,213, 47,102,225, 72,143, 72, 36,126, 60, 13,126,126,126,216,182, 99, 23, 51,112,212,248,110,110,188,
+239,126, 71, 53,235, 0,123,205,227,145,145,145, 49,113,113,113,232,222,189, 59,126,250,233,167,214,147, 39, 79, 30, 63,121,242,
+228,241, 63,253,244, 83,235,238,221,187, 35, 46, 46, 14,145,145,145, 49, 40,105, 43, 53, 30,192,173,210,207,248,234, 52, 15, 29,
+ 58,132,222,189,123,231,109,218,180,169,209,140, 25, 51,102,207,152, 49, 99,246, 79, 63,253, 20,214,187,119,239,188, 67,135, 14,
+ 57,171,121, 55,242, 94,102,168, 42,126, 8, 33,144, 36, 9, 62, 62, 62, 55,119,236,216, 65, 6, 14, 28,200, 53,104,208, 32, 99,
+200,144, 33,170,147, 39, 79, 18,134, 97,182, 59,147, 78, 66, 8,140, 70, 35,140, 70, 35,174, 93,187,166, 89,188,120,113,183, 73,
+147, 38, 53,249,241,199, 31, 3, 38, 76,152, 48,206,205,205, 45,182,117,235,214, 33,247, 58,239, 84,179, 44,242,120,163,212, 92,
+ 21,179, 44,155, 82, 91,205, 97,195,134,181, 12, 9, 9,241,253,241,162, 39,242, 20,205, 32,202,221, 33, 41, 60, 32,214,239,128,
+ 68, 69, 63,248,251,251,251, 6, 7, 7,119,113, 50,157,123,206,158, 61,219, 31,192,114, 0, 34,128,159,167, 76,153,242, 58,195,
+ 48,191, 76,153, 50,101, 12,128,159, 75,167,175, 58,127,254,252, 32, 0, 7,238, 83, 58,105, 89,162,154,117, 10, 33,164, 3, 33,
+228,201,210, 79, 71, 66, 72,167, 10,255,149, 21,150,123,172,138,239, 39, 43,252,239, 80, 97,189, 14,117,109,176,136,221,199,246,
+ 68,195,127,254,249,231, 39,190,253,246,219,189,153,153,153,126, 97, 97, 97, 79, 14, 29, 58, 52,164,176,176,144, 29, 54,108, 88,
+168,159,159,223,192, 3, 7, 14, 52, 24, 54,108,216,254,225,195,135, 31,103, 24,198,145,118, 51,141, 56,142,123,231,236,217,179,
+ 71, 67, 67, 67,173, 25, 25, 25,174,109,219,182, 45, 2,128,240,240,112, 67,110,110,174,198,213,213, 21, 59,118,236, 56,197, 48,
+204,104, 0,205,106, 18,244,243,243,107,235,229,229, 53,233,147, 79, 62, 81,113, 28, 87,233, 50, 42,149, 10,159,124,242,137,202,
+205,205,237, 13,127,127,255,206, 53,105,250,250,250, 70,184,186,186, 70, 47, 94,188, 88,109,177, 88, 96,181, 90,225,235,235, 11,
+157, 78,135,204,204, 76,164, 95,191,142,155, 73, 73,152,240,218,107, 26, 23,141,230, 29, 63, 63,191, 54, 53,105,118, 11,209, 13,
+209, 5, 52,127,244,173,183, 39,226,210,196,215,176, 55, 64,137, 6,111, 79, 69,235,131, 23, 16, 56,115, 62, 14,132,185, 33,230,
+153,199,241,206, 59,239, 66,225, 19,246, 72,151, 64,151,145,247, 37,164, 41,147, 17,149, 74, 5,147,201, 36, 59,114,228, 72,119,
+ 65, 16,228,130, 32,200, 15, 31, 62,252,232, 31,127,252,209,127,206,156, 57, 79,104, 52,154,113,157, 59,119,254,158, 97,152, 69,
+132, 16, 13, 33, 68, 3, 96,158, 93,228,233, 54, 77,185, 92, 14,163,209, 40, 63,125,250,244, 24, 81, 20,149,162, 40, 42, 79,159,
+ 62,253,230,129, 3, 7, 94, 92,190,124,185,211,154,247, 10,142,227, 32,147,201, 32,151,203,209,166, 77,155,171, 27, 54,108,224,
+253,253,253,101, 43, 86,172,240,244,241,241,113,249,254,251,239,243,243,242,242, 62,119, 70,211, 98,177,192,108, 54,195,104, 52,
+226,200,145, 35, 13,223,120,227, 13,153,197, 98, 17, 71,141, 26,117,139,231,121,243,155,137,186,117,110, 0, 0, 32, 0, 73, 68,
+ 65, 84,111,190,233,166,211,233,222,165,207,127,247, 7, 66,136, 8,160, 24,128,158, 16, 98, 6,128,144,144, 16,149,191,191,127,
+171,144,144, 16,135,203,163, 94,175,255,102,193,130, 5,129,172,202, 3, 71, 45, 3,176,137,204,194, 30,143,175,145, 29, 58, 25,
+190, 65, 77,208,175, 95, 63, 31,134, 97,150,212, 65,146,183, 0, 24, 14,224,215,218,172,124,183,211,217,190,125,251,238,237,218,
+181, 59, 29, 21, 21,149,217,174, 93,187,211,237,219,183,239,126,167, 25,158, 57, 6,143,205,125,139, 77,155, 53, 22,100,238, 91,
+108,218,204, 49,120,140,150,220, 7,227,244,171,232, 69,236,240,102, 24,102, 59,195, 48,219,167, 79,159,222, 11, 64,253, 10,255,
+ 31,177, 95, 14,128,178,178,111,219,199,110,186, 55, 33,228, 73,187,245,188,235,236,126,106,247,187,210,106, 14,111,111,111,203,
+123,239,189,119,214,100, 50, 93,248,254,251,239, 27,143, 31, 63,190,109, 72, 72, 72,194,176, 97,195,126,215,106,181,130,173,141,
+142,131,188, 54, 96,192,128, 29,245,234,213, 99,114,114,114, 20, 22,139, 69,118,227,198, 13,133, 40,138, 12,199,113,196, 96, 48,
+200, 18, 19, 19,229, 86,171, 85,234,220,185,243,214,227,199,143,143, 6,240, 78,117,130, 90,173,246,205, 21, 43, 86,168,171, 50,
+ 87,162, 40, 66,175,215, 67, 16, 4,204,156, 57, 83, 61,105,210,164,137, 0, 78, 84,167, 41,151,203, 39, 44, 92,184, 80,109,171,
+ 2,146, 36, 9,177,177,177,200,185,121, 19,230,162, 66, 88,138, 10, 97, 41,200, 3,171, 47,192,139,253,159, 80, 47,255,117,243,
+127, 1,188, 88,237, 77, 85,165,155,251,253,202,111, 33,138, 34, 50, 54, 87,222, 36,226,214,177,131, 16, 5, 30,179, 63,155,199,
+188,243,218,136, 57, 64,241,166,127, 74,169, 87, 42,149,236, 23, 95,124,209, 76,169, 84,130, 97, 24, 98,177, 88,208,162, 69, 11,
+230, 14, 53,185, 69,139, 22,181, 85, 40, 20,140, 77,179,101,203,150,204, 63,237,140, 87, 40, 20,208,104, 52, 8, 13, 13, 53, 14,
+ 26, 52,232,248,162, 69,139,130, 57,142,211,202,100,178, 93, 5, 5, 5,115, 46, 93,186,228, 84, 53,146,217,108,134,201,100,130,
+201,100, 66, 74, 74, 74,131,198,141, 27, 51,255,249,207,127,196,226,226,226,176, 85,171, 86, 93,217,180,105,147,118,201,146, 37,
+195, 0,188, 77,175,183,247,150, 70,141, 26, 41, 1,184, 7,215,151, 21,203, 57, 20,103, 10,130,111, 64, 64,192, 84, 65, 16,218,
+135,135,135,123, 38, 38, 38,230,249,251,251,159, 96, 89,118, 99, 90, 90, 90,102, 13, 70,141, 17, 4, 1, 99, 58,230, 99, 92,103,
+ 22,130, 32, 32, 63, 63, 31, 41, 41, 41,184,120,241, 34, 78,158,188, 88,171, 52,134,134,134,190,166, 86,171,251, 42,149,202, 80,
+ 81, 20, 89,131,193,144,108, 54,155,247,102,100,100,124, 83,197,141, 9,247, 35,157,118,250,243,135, 14, 29,234,239,238,238,142,
+ 51,103,206,248,159, 59,119,110, 62,128,246,119,116,237,144,179,223,141,122,125, 73, 64, 61, 15, 15, 36,197,109, 11,216,178,243,
+199,239, 0, 41,144,150,224, 7,130,170,238, 1,217,132,144,129,165, 1,160,237,115,230,204, 25, 88, 90,190, 6,218,255,119,160,
+ 60,222,182, 28,195, 48,219, 43,155, 94,151, 6,139, 84,147, 49,168,213,106,113,236,216,177, 9, 91,183,110, 13,109,223,190,253,
+ 95, 85, 53, 6,174,129,174,205,154, 53, 75, 62,117,234, 20,241,246,246,182, 72,146,196,104,181, 90, 81,163,209, 72, 5, 5, 5,
+224,121,158, 36, 39, 39,203, 82, 82, 82, 20, 94, 94, 94, 10, 0, 53,134,234,228,114,121,151,134, 13, 27, 86, 25, 41,208,235,245,
+ 40, 42, 42,130,217,108,134,175,175, 47,195,178,108,167, 26,195,122, 44,219,173, 89,179,102, 76, 94, 94, 30,252,253,253,113,244,
+232, 81,232, 11,242, 97, 46, 42,130,185, 32, 31,214,194, 2,136,133,249,200,191,153,137, 80,191, 64,134, 97,152, 46, 53,105, 10,
+156, 38,196, 71,231,130,196, 89, 83,209, 33, 54, 25,140, 92,129, 83, 45,253, 64,248,146,166, 86, 29,207,103,128, 81, 40,241,215,
+132,151,209,224,249, 55,192,179,170,128,251, 81,178, 5, 65, 96,204,102, 51,212,106,181,208,189,123,247, 35, 28,199, 61,170, 84,
+ 42,217,113,227,198,225,198,141, 27,229, 78,128,113,227,198, 65,163,209,192,108, 54, 11, 0, 38,163,138, 54, 83,130, 32, 48, 60,
+207, 67,163,209,240,237,219,183,255,134,227,184, 55,149, 74, 37,215,180,105,211,172,185,115,231,102,184,184,184,184,164,164,164,
+220, 82, 42,149,105,161,161,161, 29, 53, 26, 77, 72, 77,154,247, 18,149, 74, 5,153, 76, 6,150,101, 81,191,126,253,226,220,220,
+220,147,215,174, 93,123,174, 54, 90,162, 40,194, 98,177,128,231,121,152, 76, 38, 72,146,132,115,231,206, 65,165, 82,201, 69, 81,
+188, 40,138,162, 86, 46,151,131,227, 56, 58, 70,221, 61, 38, 42, 42,234,209, 80, 13,230,143,243, 51,123, 54, 26,232,162,215,170,
+184,226,103, 55,243, 29, 30,123,236,153, 39, 38, 79,158,170,243,242,242, 82, 94,191,126,221,244,229,151, 95, 54,252,237,183,223,
+ 24,148,180, 19,173,146,140,140,140, 95,230,206,157, 91,239,209, 71, 31, 13,147,203,229, 76,126,126, 62,178,179,179,113,243,230,
+ 77,164,164,164,144,164,164,164,171,130, 32,252,228, 76, 26, 91,181,106,181,106,224,192,129,163, 90,180,104, 33, 39,132,128,231,
+121, 24, 12,134,182, 39, 79,158, 28,124,244,232,209,238,215,175, 95,119,186, 92,102,102,102,254,244,217,103,159,185,244,236,217,
+179,153, 92, 46,103,235, 34,157, 21,110,104,254, 58,157, 14,123,247,238,133,155,155, 27,106,234,173,235, 8, 86, 65, 10,168,231,
+ 81, 31,166,203, 11,224,239, 22, 2,171, 32, 5,208, 18,252, 64, 69,177,152, 74, 76,208,255, 8, 33, 79,222,169, 25,186, 91,102,
+170, 86, 17, 44, 27, 55,110,220, 80,233,245,122,153, 36, 73,172,217,108,150, 75,146, 4,185, 92,206, 59,185,189, 22, 67,135, 14,
+ 61,209,161, 67, 7, 67,105, 4, 67,112,119,119, 23, 10, 10, 10, 80,106,176, 36,153, 76,102,210,233,116,166,176,176, 48,192,129,
+ 42, 66,163,209, 24,172,209,104,110,155,110, 48, 24,160,215,235,203, 12,150,193, 96,128,155,155, 27,138,139,139,107, 60,185, 69,
+ 81, 12,213,106,181,200,200,200, 0, 0,232,243,243, 96, 42, 44,132,181,168, 0,214,252, 60,240, 5,249,224, 11,242,192, 26,141,
+240, 8, 12,130, 32, 8, 65, 53,105, 22,155, 69, 37, 7,130,155,219,127,129,239,155,147,171, 92,238,214,145, 3,208, 53,110, 10,
+163,209,122, 63,198, 40,235,114,241,226,197,118,205,155, 55,199,144, 33, 67,240,204, 51,207,156,211,104, 52, 62, 75,150, 44,105,
+145,158,158,126,219,194, 79, 61,245, 20,222,126,251,109, 12, 29, 58,116,237,217,179,103,151, 86,167,217,179,103, 79,244,234,213,
+171,222, 51,207, 60,147,164,211,233, 98, 86,174, 92,217,113,230,204,153, 89, 6,131, 33, 61, 38, 38,166, 85, 90, 90,154, 54, 60,
+ 60,252, 96,100,100, 36,187, 99,199,142,144, 26, 52,239,181,233, 4,207,243,176, 90,173, 48,155,205, 32,132, 56, 28,101, 35,164,
+124, 64,129,231,249,178, 30,132, 38,147, 9, 60,207, 51, 91,182,108,198,182,109,219,216,184,184, 75,129,211,166, 77, 71,126,126,
+ 62, 68, 81,164,151,217,123, 68,187,118,237,250,203,136,180, 98, 68, 3, 94,253,130,175,160,151,177, 68,127,249,219, 15,138,207,
+121,200,204,230, 98,198,245,253, 15, 62,240,188,114,229,138,245,179,207, 62,203, 28, 50,100,136,250,245,215, 95,111,190, 99,199,
+142,238, 65, 65, 65,223,166,166,166,230, 87, 21,248,236,220,185,243, 9, 79, 79,207, 70,235,215,175,207,202,200,200,168,199,243,
+188,214, 98,177, 88, 45, 22,203, 21,171,213,122,212, 98,177,236,189,113,227, 70,140, 51,105,213,233,116,173, 71,142, 28, 41,207,
+203,203,131, 76, 38,131,213,106, 69,118,118, 54,162,162,162,184,125,251,246,181,168, 77,254,227,226,226, 22,228,231,231, 31,220,
+182,109, 91, 95, 23, 23,151,118, 74,165,178,129, 40,138,162,201,100,202, 50,153, 76,103,107,147,206, 10, 55,180,140,216,216, 88,
+127, 87, 87, 87,164,167,167,131, 97,152,140, 59, 61,102, 10, 57,155,154,244,215,214, 32,127,183,134,136,143, 63, 1,133,156, 77,
+165, 35, 6, 61,216, 17, 44,187,182, 82, 3,107, 48, 73,198,105,211,166,189,199, 48,204,246,105,211,166,189, 87, 77, 4, 75,180,
+ 95,206,110,249, 58,123,168,175,246, 38, 94, 84, 84, 36,251,223,255,254, 87, 63, 37, 37, 69,215,160, 65, 3, 67,100,100,100, 62,
+195, 48, 68, 20, 69,246,214,173, 91, 46,105,105,105,106, 79, 79, 79,115, 80, 80, 80,129,131,219,187,252,214, 91,111,245,156, 49,
+ 99, 70,204,227,143, 63,158, 3, 0,121,121,121,200,206,206,182,245,210, 66, 70, 70, 6,123,250,244,233,122,187,118,237,106, 11,
+ 7,122,240,104, 52,154,148,162,162,162,166, 30, 30, 30,101, 55, 52,155,169,178,255,182, 90,173, 40, 42, 42,130,139,139, 75,141,
+ 39, 55,203,178,233,233,233,233,141,141, 70, 3,146, 19, 19, 97, 46, 42,128,181,176, 0,124, 97, 62,248,252,124,136,249,183,192,
+234,139,160,211,104, 80,116, 43, 23, 28,199,221,168, 73,211, 69,197, 89,120, 65, 84,122,247, 27, 12, 48, 85,223,159, 61, 58,117,
+ 3,137,104, 13,141,230, 87,254, 30, 23,106, 25,128,129,182, 49,169, 52, 26, 13, 62,253,244, 83,196,196,196, 72,213, 85, 3, 43,
+149, 74,176, 44, 43, 58,162,169, 82,169, 52, 51,102,204,208,156, 61,123, 86,173, 84, 42,161,211,233,180,103,207,158,109,245,231,
+159,127,178, 6,131,129,107,220,184,241,208,128,128, 0,125, 13,154,119,213, 72, 85, 54, 77,175,215,151,181,155,186,117,235,150,
+ 76,173, 86,135,119,239,222,253,184,197, 98,249, 73, 16,132,213,177,177,177,133, 85, 62,105, 91,111,239, 12, 42, 73, 18, 4, 65,
+128, 32, 8,144,201,100,210,150, 45, 91,241,213,210, 69,248,121,211,175,164,103,207,158,204,142, 29, 59, 32, 73, 82, 26,189,206,
+222, 27, 36, 73,154,127, 96,234,211,106,136,162,222,124,112, 67,241,238, 92, 89,241,183, 23, 14,156,206,229,205,170, 38, 77,194,
+ 34,220, 92,221,217,239,215,125,123, 43, 51,235,234,229,175,190, 74, 11,154, 61,123,182, 71, 88, 88,152,123, 66, 66, 66, 0,128,
+252, 42,140, 80,232,203, 47,191,252,234,173, 91,183,228, 43, 87,174, 92,147,158,158,126, 24,192,213,138, 65, 51,148,180, 51,148,
+ 3,240, 69, 73, 15,218, 61, 0,214, 86, 99, 86, 36,134, 97,112,240,224,193,219,122,251, 73,146, 84,107,135,145,153,153,153,215,
+169, 83,167,214,151, 47, 95,222,146,159,159,191,190,146,235,236,224,200,200,200,103, 79,157, 58,245, 33,128, 43, 78, 70,176,222,
+137,139,139,251, 92,146,164, 16,150,101,147, 9, 33, 83,238,244,152, 89,172,210,235, 91,119,110, 90,105,225,197, 96,165,156, 75,
+177, 88,165, 55,104, 73,126,224,177,181,145,130,189,113,170,196, 24,253, 57,103,206, 28,205,220,185,115, 49,103,206,156,139,149,
+ 69,176,108, 70,107,206,156, 57, 23,109,203,217, 45,127,184,174, 13, 22, 83,201,141, 69, 55,125,250,244,174,109,219,182,205,120,
+244,209, 71, 51, 27, 54,108,104,176,205,211,106,181, 22, 15, 15, 15,139,217,108, 86,101,100,100,120,255,245,215, 95, 13, 37, 73,
+210, 56,176,189,253, 30, 30, 30,245, 78,159, 62, 93,127,227,198,141, 77, 98, 99, 99, 67,158,127,254,249,158,102,179, 25, 22,139,
+ 5,215,174, 93, 11, 89,177, 98,133,164, 80, 40,242, 25,134,249, 31, 74,122,195, 84, 11,207,243,199, 47, 95,190, 28,222,169, 83,
+ 39,134,231,249,114,166,202,254,183, 82,169, 68,122,122, 58,145, 36,233,164, 3,233, 60,113,250,212,169,198, 45,155, 55,135,185,
+ 32, 15,150,194,124, 88, 11,242, 33, 20,228, 67, 42,204, 7,171, 47, 66,253,122,114,104, 52, 46,184,156,145,137,210,180, 86,139,
+ 92, 48, 38,165, 23, 20, 54,109, 28,253, 5, 14,132,185,129,240,214,178,106, 65, 0,101,213,133,143,252,149,141, 35,127, 30,135,
+ 76, 52,167,223,207,146,108,177, 88,164, 97,195,134,157, 98, 89,182,206,222, 55,197,243,188, 52,126,252,248, 50,205,212,212,212,
+ 91,169,169,169,106,163,209,200,234,116, 58,253,253, 62,123,121,158,175,212, 32, 89, 44, 22, 24,141, 70,100,102,102, 42,247,236,
+217,211,253,248,241,227,138, 75,151, 46,225,248,241,227,109,182,108,217, 50,189, 89,179,102,173,227,227,227,111, 56, 98,218, 36,
+ 73,130,237, 62, 72, 8, 1, 33,132, 3,128,173,191,109, 71,191,126,253,152,162,162, 34,108,219,182,173, 78,170, 81, 40, 14, 83,
+ 12, 65,212, 88, 14,109, 40,126, 55, 81, 89,120,209, 32,251, 36, 38, 38,102,247,128, 1, 3,142,248,251,134,185, 1,128, 74,161,
+243,230,136,171,206,219,219, 91, 5, 0,254,254,254,237,120,158, 95,154,158,158,222,173, 50,193,167,158,122,234, 17, 31, 31,159,
+182, 59,119,238, 60,155,158,158,126,164, 18,115,133,166, 77,155,206,188,112,225, 66,127,185, 92,206,216, 93,252, 73, 85, 6,107,
+216,176, 97, 77,149, 74,101,253, 29,151,221, 81,168,104, 12,137,205, 7,225, 84, 16, 61, 90, 35, 89,209, 2,190,190,127,213,215,
+106,181,109,174, 94,189,122,214,201,252, 7,143, 24, 49,226,247, 85,171, 86, 69,244,235,215, 79,121,236,216,177,219, 12, 86, 68,
+ 68,196,176,125,251,246, 13, 31, 55,110, 92,235,245,235,215, 15, 2,144,232,168,120,108,108,236, 49,148,188,177,161,206,248,232,
+ 27,236, 5,196,144,210, 64, 4, 45,193, 15,120,244,170,148,108,187,232, 83, 54, 0,166,194,255,179,165,231,144,133, 16, 98, 91,
+ 54,219, 46,106,101,169, 16,245,170,108, 94, 54,195, 48,117, 22,220,144, 85,243,228,189,231,218,181,107, 29, 70,140, 24,145,109,
+111,174,236,171, 71,116, 58,157,217,205,205, 77,127,234,212, 41,127, 81, 20, 15, 58,176,189,149,251,246,237, 59,176,120,241,226,
+ 13,245,234,213,227, 95,124,241, 69,118,234,212,169, 71,114,115,115, 73,110,110, 46,150, 44, 89,210,163,123,247,238, 71,146,147,
+147,197,152,152,152, 87, 0,244,171, 73,208, 96, 48,124,253,230,155,111, 62,123,228,200, 17,181,197, 98, 65,126,126,254,109,209,
+ 43,158,231,193,113, 28,150, 46, 93,106, 46, 46, 46, 94,228, 64, 36,227,155,175,191,254,122,248,138,175, 22,171,101,188, 21,134,
+252, 60,136,165, 31,206, 84, 12,157,154, 69,227,182,222,200,207, 80, 97,221,206, 99, 70, 65, 16,190,174,209, 96,153,244,147,199,
+141, 25,189,125,207,254, 3,168,223,173, 55,114, 14,236,186, 61, 26,228,237, 11,139,213,138, 79,102, 69, 19,198,152, 63,245, 94,
+ 7,112, 0,108, 47, 29, 77, 29, 0,182,159, 61,123,246,120,155, 54,109,250, 91, 44,150,234,140, 24, 36, 73,226,106,163,169, 82,
+169,210,154, 54,109,186,191, 81,163, 70, 67, 1,160,121,243,230,191,177, 44,219,187, 6,205,187,106,176,102,204,152,129,185,115,
+231, 98,218,180,105,101, 6,201,246, 0, 96, 54,155, 27,238,218,181, 75,121,236,216, 49,178,110,221,186,156,167,159,126,218,227,
+249,231,159,247, 88,191,126,253,127, 0, 76,173, 74,115,202,148, 41, 88,190,124, 57,198,142, 29,123,219,124,142,227,164,244,244,
+ 52,152, 45,102,178,117,235,214, 12,153, 76,230,249,229,151, 95,106, 38, 77,154,196,208,107,237,189, 65, 20,197,247,187, 45,216,
+ 50, 17,208,240,130, 32, 44, 58,127, 62,230, 96,105,212,198,103,193,130, 5, 74, 0,248, 98,222, 23,114, 66,136,220, 54, 48,236,
+199, 31,127,172, 30, 51,102,140, 79, 85,154,191,252,242, 75,222,199, 31,127, 92,255,245,215, 95,239,119,224,192, 1,245,169, 83,
+167,118,161,228, 45, 5, 57,165,142,192, 43, 33, 33,225,152,183,183,183,223,166, 77,155, 26,247,237,219,215,165, 70, 23, 88, 92,
+252,237,178,101,203, 66,231, 31,118,197,142,226,161, 72, 37,207,128,212, 35,168,167, 40, 66,115, 93, 10,122,250,165,250,175, 95,
+191,126, 37,128,118, 78,100,191,197,211, 79, 63,189,121,213,170, 85, 13, 71,143, 30,157,118,236,216,177, 84, 0, 51, 43, 46, 20,
+ 19, 19,147,251,242,203, 47, 39,175, 89,179,166,177, 36, 73,187, 55,108,216,208, 15,192,101, 90,122, 40,247,204,121, 57, 16,200,
+168,205,178,119, 19, 89, 53, 23,157,215,242,242,242, 34,167, 77,155,246,185,191,191,127,112,116,116,244,245,230,205,155, 23,219,
+230,231,230,230,234, 14, 29, 58, 20, 86, 88, 88, 88, 36, 8,194, 40, 0,231, 42,145,105,137,242, 99,101, 36, 75,146,244,121,155,
+ 54,109,158,253,241,199, 31, 15,185,186,186, 22,158, 56,113,194,205,205,205,173,224,210,165, 75, 46, 28,199, 25,174, 94,189,138,
+189,123,247,246, 0,240, 85, 21, 79, 73,229, 52, 51, 51, 51,207, 40,149,202, 47, 38, 77,154, 52,233,195, 15, 63, 84, 75,146, 4,
+163,209,136,162,162, 34,152, 76,166,178,198,201, 27, 55,110, 52,155,205,230, 21, 25, 25, 25, 39, 28,208, 60,206,113,220,242, 69,
+ 95, 46, 26,255,198,179, 35,148, 36, 63, 23, 5,153, 70, 48,166, 98,232,212, 74,180,232, 29,128,226, 92, 6,171, 14,157,182,220,
+178, 88, 55,101,100,100, 28,172, 73,243, 88,170,254,247, 78,202,196,189, 31,207,138,126,108,250,234, 95, 33, 73, 18,254,122,243,
+ 69,228, 29,222, 11,109,243, 86,120,228,175,108, 88, 44, 22, 76,155, 50, 9,156, 33,235,200,201,212,226,159, 29,216,159,117,129,
+189,230,113,252,253,238, 50, 1,192,248,115,231,206,141,138,136,136,192,184,113,227,240,212, 83, 79,149, 91,113,243,230,205, 88,
+182,108, 25,204,102,243, 40, 0,177, 0,150, 58,163,217,176, 97,195,142, 45, 90,180,224,252,253,253, 13,165,102,163,247,197,139,
+ 23, 59, 68, 68, 68,212,164, 89,231,121, 39,132,228, 37, 38, 38,186,205,155, 55,143,177, 90,173,152, 57,115, 38,108,198,210, 22,
+113,122,255,253,247,253, 93, 93, 93, 49,127,254,124, 75, 78, 78, 78,159,220,220,220,125,139, 23, 47,246,218,184,113,227,115,118,
+ 6,203, 94,243,102, 92, 92,156,235,242,229,203, 89, 65, 16,176, 96,193,130,219, 34, 90,239,188,243, 14,172, 86, 30,114,153,220,
+ 98, 54,153, 91,104, 52,154, 43,158,158,158, 26, 73,146,200, 61, 60,238, 15,181,230,249,243,231,247,160,164,106,174, 82,108,237,
+232,140, 70, 35,114,114,114,144,147,147, 3,119,119,247,138, 79,219,229, 52,141, 70,227,217, 41, 83,166,196,124,243,205, 55,253,
+254,252,243,207, 17,135, 15, 31, 30,176,119,239, 94, 83,114,114,178,192,243, 60,241,243,243,147,117,235,214, 77, 61, 96,192, 0,
+ 23,149, 74,197,190,255,254,251, 57,159,126,250,169, 23,128,220,170, 52, 9, 33,156, 36, 73,248,111,247, 66, 76,233, 37,131,217,
+ 92,242, 64,153,145,145,142,139, 23, 47,226,248,241,120, 48, 12,195, 58,185, 63, 23,173, 95,191, 62, 76,169, 84, 50, 27, 54,108,
+ 8,222,176, 97,195,132,154,118,222,218,181,107, 67, 55,108,216,176, 20,192, 99, 40,105,248, 68,203, 18,213,164, 56, 99,176, 74,
+185, 40, 8, 66,191,148,148,148,110,163, 71,143,254, 44, 34, 34,194, 44, 8,130,124,247,238,221,205,114,114,114,148,130, 32, 76,
+129,243,245,149,203, 77, 38, 19,134, 12, 25, 50,165, 81,163, 70,251, 98, 99, 99, 91, 63,249,228,147,187, 55,111,222,220, 77, 16,
+132,171, 23, 46, 92, 24, 5, 96, 81,169,193,114,136,164,164,164,153,123,247,238,101, 78,156, 56,241,238,180,105,211, 84,222,222,
+222,140,135,135, 7,140, 70, 35, 82, 83, 83,201,154, 53,107,204,102,179,249, 43,119,119,247, 15, 28,213,244,246,246,158,122,248,
+244,105,101,194,149,196, 87, 94,233,255,184, 58, 56,188, 41,116, 12,160,191,149,139, 67,135, 50,177,250,228, 89, 83,142,197,250,
+ 3,199,113, 14,119,165, 15,188,146,221,111,207,166, 85, 59, 15,238,223,255,216,236,185,159, 51,254, 47,188, 1,151,144,134,144,
+ 66,155,224,208,193,131,248,244,227,153,132,211,103, 29,230,175,100, 61,126, 31,203,132,205, 1,168, 0,204,147, 36, 73, 86,250,
+ 52,143,183,223,126, 27,246,175,206, 89,182,108, 25,140, 70, 35, 0,200, 24,134,153, 7,224, 59, 84, 61,162,123,101,154, 65,191,
+255,254,123,144,189,102, 68, 68,132,163,154,117, 74, 86, 86,214, 7,175,189,246,218, 92,185, 92,238, 46, 73,210,109,141,211, 1,
+192,197,197, 5,133,133,133, 16, 69, 81,168, 87,175, 94, 60,207,243,144,201,100, 85,158, 71,197,197,197, 31,140, 29, 59,246, 19,
+134, 97,170,140,116,104, 52,154,228,163, 71,143, 54,121,254,249,231,217, 77,155, 54, 93,123,238,185,231, 84,127,254,249,167,136,
+ 90,142,105, 68,185,251, 16, 66, 80, 92, 92, 12, 84, 63, 36, 66,202,143, 63,254, 56, 37, 38, 38, 70, 61,118,236,216,118, 47,188,
+240,130, 91,175, 94,189,116,246, 11, 24,141, 70,105,219,182,109,197,203,151, 47,207, 61,124,248,240,255, 94,125,245,213,161, 0,
+170, 12, 23,103,100,100,252,190,100,201, 18,247,158, 61,123,134,139,162,136,156,156,156,178, 54, 88,105,105,105, 72, 78, 78, 78,
+150, 36,105,171,147,217,121,243,249,231,159,223,177,102,205,154,144,209,163, 71,167,109,220,184,113, 43,128,202,218,212,234,134,
+ 13, 27, 54,120,205,154, 53, 33, 99,198,140, 73, 1, 48, 1,180, 85, 57,133, 82,167, 12,225, 56,238, 79, 0, 67,156,112,184, 85,
+ 17, 2,224, 19,148,212,155, 22,148, 58,225,217, 0, 26,213, 86,211,223,223,191, 85,120,120,248, 15, 77,155, 54,189, 30, 16, 16,
+192, 55,109,218, 52, 57, 60, 60,124, 83,131, 6, 13,162,106,171,233,231,231,215, 53, 40, 40,104,119, 96, 96, 96, 78,112,128, 63,
+ 9, 12, 12,188, 21, 28, 28,188, 55, 32, 32,160,103,109, 53, 59, 5,233, 6,118,106, 26, 16,223, 46,178,137, 57,188, 81, 67, 18,
+213,162,137,185,115,179,160,132,142,193, 46,195,238, 96,127,222,201, 83, 72,101,168, 0, 24, 72, 41, 12,195,240,109,218,180, 89,
+ 30, 21, 21,181, 52, 42, 42,106,105,235,214,173, 87, 48, 12,195,219,230, 3, 48,224,239, 65, 65,239,165,230,221,200,123,165,116,
+235,214,109,237,134, 13, 27,196,217,179,103, 23,116,238,220, 57,119,246,236,217, 5, 27, 54,108, 16,187,117,235,182,182,182,154,
+173, 91,183, 14,233,222,189,251,173,181,107,215, 10,151, 47, 95, 38,107,215,174, 21,186,119,239,126,171,194, 72,238,247, 61,239,
+ 15,163,230,240,225,195, 19,137, 29, 22,139,133,100,103,103,147,132,132, 4,114,228,200, 17,242,248,227,143, 39, 58,160, 41, 3,
+208, 11,192,130,192,192,192, 61, 93,187,118,189,220,189,123,247, 43,141, 26, 53,250, 83,161, 80,172, 7,240, 50, 74,222,119,232,
+135,146, 97, 73,124,171,211,244,243,243,235, 18, 17, 17, 49,187,109,219,182, 91, 59,119,238,124,172, 93,187,118,199,155, 54,109,
+186,189, 97,195,134,115,253,252,252, 30,169,101,222,131, 71,140, 24,113, 81,175,215,139, 61,122,244,216, 86,217, 74, 81, 81, 81,
+107,244,122,189,248,194, 11, 47, 36,160,228, 61,178,180, 44, 81,205,187,161, 73,121, 88, 11,138, 51,163, 56, 63, 32,121, 31, 95,
+106,114, 12, 40,255,218,154,154,230,223,107,205,123,178, 63,155, 55,111,238,249,216, 99,143,189,185,117,235,214,119,175, 94,189,
+250,238,214,173, 91,223,237,219,183,239,155,205,155, 55,247,188,147,116,182,110,221, 58,164, 91,183,110, 95,117,237,218, 53,173,
+ 91,183,110, 95, 85, 48, 87,244, 34,126,159, 52, 7, 13, 26,180,115,196,136, 17,137, 35, 71,142,188, 50,114,228,200,196,225,195,
+135, 39, 14, 29, 58, 52,113,208,160, 65,137,253,250,245, 75,236,213,171,215,206, 7, 40,239,193, 29, 58,116,248,193,213,213,245,
+133,202,102, 42, 20,138,193, 93,186,116,249, 25, 64, 99, 90,150,168, 38, 53, 88,212, 96, 81,205,186,209, 84,161,250,215,213, 84,
+ 54,255,126,104,210,227, 78, 53,169, 38,213,164,154,212, 96,253, 99,144,209, 93, 64,169, 1,243, 29,206,191, 87,154, 20, 10,133,
+ 66,161,252, 99, 96,170,113,161,206,244, 14,168,141,147,189, 64, 53,169, 38,213,164,154, 84,147,106, 82,205,135, 78,179,162,246,
+211, 21,166, 87, 28, 7,114, 5,181,107,117,115, 96,168, 38,213,164,154, 84,147,106, 82, 77,170,249,240,105, 86,198,232,127,171,
+ 1,162, 47,148,165, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,229,159,141, 67,141,220, 21, 10, 69, 36, 33,228,
+ 85,134, 97, 26, 48, 12,115,131, 16,242,157,213,106,189,248,176,237, 44,133, 66, 17,201, 48,204,171,132,144, 6,132,144, 27, 12,
+195,220,215,253, 64, 0,102,102,116,201,104,210, 31, 69,131, 48,213, 15,124, 72,161, 80, 40, 20, 10,229,126, 27,172,144,192,192,
+ 17, 44,199, 44,182,242,162, 39, 47, 8,236,146, 37, 75,216, 65,131, 6, 97,219,182,109,152,240,246,219, 19, 88,142,149, 20, 50,
+ 89, 30,145,132, 9,201,105,153, 63, 58,178,177,161, 67,135,102,241, 60, 95,229,168,214, 28,199,221,220,178,101,139,239,157,102,
+202, 63,234,153, 44,222,106,173,114, 59, 50,153,252,102,230,217,159, 29,218, 78, 96,160,223, 8,142, 97, 23,243,162,228, 41,138,
+ 18,251,213, 87, 95,149,237,135,183,222,122,107,130, 92, 38,147, 20,114, 46, 79, 18,201,132,228,180,180, 31,239,213,129,179, 55,
+ 87, 0, 48, 51, 26, 12,137, 6,168,201,162, 80, 40, 20, 10,229, 31,108,176, 24, 22, 75, 55,124, 51,207, 51,247, 86, 30, 54,110,
+222,141,136,136, 8, 92,186,116, 9, 17, 17, 17,232,214,177, 53,251, 68,151, 54, 44,199,194,123,198, 87,235,150, 2,112,200, 88,
+240, 60,239,243,219,111,191,129, 97, 24,136,162, 8, 65, 16, 32, 8, 2,120,158, 71, 81, 81, 17, 38, 78,156,232, 83, 23,153,226,
+173, 86,159,171,255,251, 21,114,142, 1, 47, 18,240, 2, 1, 47, 72,176,138, 4,133, 6, 1,189,159,124,222,225,237,176, 96,151,
+126,183,120,158,103,126, 65, 1,126,221,177,167,220,126,232,221,181, 3,251,204,128, 71, 89,173, 70,225, 61,122,234,103, 14,239,
+135,186,192,222, 92,149,155, 22, 77, 13, 22,133, 66,161, 80, 40,255, 88,131,101,225, 69, 79,223,122,238, 88,253,221,119,152, 50,
+237, 99, 52,107,214, 12,132, 16, 48, 12,131,247, 62,156,133,133, 31, 79,195,200,254, 61,192, 11,146,103, 53,250,183,117,213,100,
+ 24, 6,215,175, 95,135,209,104, 44,247,137,140,140,116, 52,205, 14,117,255,148,115, 12,126,143, 45,130,149,151, 96, 21, 74, 63,
+188,132, 94, 45, 93,157,210,228, 69,201,211,195, 77,135,149,223, 44,195,148, 89,243,202,237,135,169,239,125,136,175,231,126,128,
+119,198,189, 4, 11, 47,122,214, 38,157, 78, 66, 53,169, 38,213,164,154, 84,147,106, 62,168,154, 15,164,193,234, 9,224,160,205,
+ 3,149,153, 11,139, 9, 45,130,234, 99,217,252, 79, 64,192, 66, 34, 4, 32, 0,145,120, 52,244,210,194,104, 48, 56,189, 65, 73,
+146, 96,181, 90,193,243, 60, 86,172, 88, 1,189, 94, 15, 73,146, 16, 17, 17, 1, 0,136,138,138,178,143,192,164,196,198,198,134,
+212,164,233,221,114, 72, 50, 8,130,237,167,125, 52,239, 91, 28,139,189, 10, 66, 0,149, 70,139,225, 47,140,129, 40, 17, 88,121,
+231,223, 79,106, 50, 24,224,167,147, 99,225,167, 31,130,149, 43,192,130, 1,203, 50, 96, 25, 9,205, 2, 61, 97, 46,121, 57,241,
+ 61,229,163,104,144,138, 81,172,143,162, 65,162,105,153,166, 80, 40, 20,202,191,147, 74,189,200,191,221, 96, 29,172, 44, 51, 22,
+147, 17,129,158, 10, 52,208,185, 67, 16, 68, 92,180,250,161,200, 96,130,213,202, 35,217,106,197,149, 51,153,120,228,145, 71,192,
+243,188,104,181, 90,161, 80, 40, 10,182,108,217, 82,175, 38,131,197,243, 60,172, 86, 43,138,139,139,177,126,253,122,200,100, 50,
+ 72, 82,137,241, 41,121,199,111,201,119,215,174, 93,131, 29,202, 5, 65,240,149, 83,191,192, 85,205, 65,144, 8, 4,129,128, 23,
+ 1, 81, 34, 48, 88, 36, 12,123,237, 3, 8,146, 4, 65,146, 96,113,192, 96,217, 27, 54, 1,192,144,233, 27, 1,232,202,230,187,
+169, 8,166,116,101,161, 80,170,160, 84,112, 48, 27, 13,247,252,192, 49, 0, 33,209,127, 87, 21,210, 70,238, 20, 10,133, 66,249,
+151,115,240, 65, 48, 86, 21, 13,150,189,123, 60,244,183,193, 50, 64,224, 69,240,130, 8,129, 23, 80,160, 55,226,243,207, 63,135,
+ 74,165, 2,195, 48,101,102, 73,146, 36,150,231,121, 12, 24, 48,192,179,166, 13,138,162, 8,171,213, 10,171,213, 10, 66, 8, 56,
+142, 67,167, 78,157,110, 91,238,196,137, 19, 78,101,196, 85,205,161,225, 99,211,111,155,126,242,151, 79, 64, 8,129, 40,150,124,
+ 28, 49, 88, 53, 25,182,182, 61,159,129,217,194,131, 16, 0,164, 36,194,117, 63, 96, 0, 98,107,115, 21, 77, 79, 76, 10,133, 66,
+161, 60, 24,148,243, 34, 15,138,193, 42,231, 30,205, 70, 35,120, 94,128, 32,136,224,249, 18, 99,164,209,104,208,163, 71,143, 18,
+ 31, 98, 23,109,218,189,123, 55,172, 86,107,141, 27,180, 53,106, 47, 53,102, 32,132, 96,227,198,141,144,203,229,101, 31,133, 66,
+225,116, 70, 4,145, 96,250,212,255, 66, 33, 99, 33,151,177,101,223, 34, 33, 32,164,196, 28,137, 18,129,153,119, 44,200, 83,157,
+ 97, 3, 0,139,217, 10, 16, 2, 2, 2, 99,113, 49, 61, 29, 40, 20, 10,133, 66,169, 27, 30,136, 72,150,205, 96, 61,138, 74,170,
+151, 44,198,226,210,232,149, 8, 94, 16,202, 12,212,252,249,243, 33,147,201,160, 84, 42, 33,147,201,202, 12,145, 35, 6,203,100,
+ 50, 33, 44, 44, 12, 22,139, 5, 17, 17, 17, 32,132,224,217,103,159,189,109,185, 83,167, 78, 57,149, 17, 94, 36,152,243,217,130,
+219,166, 31,253,233, 99,180,106,222, 16, 29,155,184,192,100,149, 80,104, 16,238,216,176, 1, 40,137, 96, 1, 32, 4, 48, 22, 27,
+232,233, 64,161, 80, 40, 20,202,157, 81,169, 23,249,183, 27,172, 67,149,185, 69,147,193, 0,129, 23,202, 76,150,197, 98,129, 36,
+ 73,120,251,237,183,111, 19,218,183,111, 31, 44, 22, 75,245, 27,147,201,110,190,241,198, 27,229,134, 72, 32,132,224,151, 95,126,
+129, 74,165, 42, 23,197, 98, 24,231,204, 43, 47, 18, 68,191, 63, 9, 74, 57, 87,206, 16, 73, 18,176,237,247, 63,176,237,247, 63,
+202,150,229, 56,249,205, 59, 49,108, 0, 96,177,148, 70,176, 8, 65,177,190,136,158, 22, 20, 10,133, 66,161,220, 25,149,122,145,
+127,187,193,170, 20,147,177, 24,188, 93, 27, 44,171,213, 10, 65, 16,176, 98,197,138,114,213,121,114,185, 28, 44,203,214, 24,193,
+218,188,121,115,185,193, 61,163,162,162, 8, 33, 4,195,135, 15, 47,171,110,124,229,149, 87, 48,122,244,104,167, 13,150, 32, 18,
+204,156, 61,191, 76,103,192, 99,221, 49,164,127, 79, 72,165, 94, 56,251,226, 22,167, 4,171, 51,108, 0, 96, 49,151,180,193, 34,
+ 0, 12, 69,180,138,144, 66,161, 80, 40, 20,138, 3, 6, 75, 46, 99, 11,174, 36,223,112,247,114, 81, 67,144,204, 16,164,146,158,
+127,162, 40, 98,244,232,191, 95,110,253,220,115,207, 97,212,168, 81, 85, 25,172,150,168, 97,172, 12, 73,146,112,244,232, 81, 48,
+ 12, 3,150,101,203, 62,213, 80,169,102,177, 89,194,177, 31,103, 65, 34, 4, 18, 1, 36, 82,226,167, 44,130, 67,209,198,219, 52,
+107, 50,108, 42,157, 7, 56,150,128, 97,128, 43,105, 89,144,113,108,129,179,121,175, 5, 84,147,106, 82, 77,170, 73, 53,169,230,
+131,170,249,112, 24, 44, 34,146, 9,203,183,159, 88,204,139,146,187,109, 90,139, 22, 45, 96,181, 90,177,107,215,174, 50,227,193,
+113, 92, 89,149,158, 35,109,176, 42,144,210,163, 71,143,234,134, 98, 72,113, 72,133, 65, 74,251, 94, 35,130,171,155,239,108,194,
+106, 50,108,171, 14,255,253, 10, 66, 25,203, 22,128,144, 9,180, 56, 81, 40, 20, 10,133, 66,169,214, 96,165,102,100,172, 3,176,
+206,126, 90,155, 54,109,244,131, 7, 15,214, 8,130, 0,139,197, 2,171,213, 10,139,197, 82,246, 81,169, 84, 78,141,184,233,200,
+ 32,162,142,144,125, 97, 75, 72,157,238, 21, 7, 12, 91,102,102,102, 8, 45, 62, 20, 10,133, 66,161, 80,156, 50, 88,149, 97, 48,
+ 24, 60, 24,134,145,101,100,100,220, 54,239,198,141, 27, 64,201,184,156,255,122,234,220,176, 81, 40, 20, 10,133, 66,161, 6,171,
+ 42, 14, 29, 58, 36, 60, 40, 38,138, 66,161, 80, 40, 20, 10,229,110,193,210, 93, 64,161, 80, 40, 20, 10,133, 82,183, 48, 40,233,
+ 9, 80, 25,206,244, 14,104, 89,139,109, 95,160,154, 84,147,106, 82, 77,170, 73, 53,169,230, 67,167, 89,147,182,253,250,163, 1,
+172,160,118,173,110, 14, 12,213,164,154, 84,147,106, 82, 77,170, 73, 53, 31, 62,205,202, 24,253,111, 53, 64,180,138,208, 25,162,
+ 70,203,233, 78,160, 80, 40, 20, 10,133, 82, 19,178,123,181,161,232,232,104,246, 14,215,151,238,219, 94, 10, 24,214,152,147,225,
+243,214,193, 1,253,207,228, 14,221, 65, 68,102, 42,210,127,189, 66,139, 79,237,104,227, 2, 47,158,145, 15,244,212,169,135, 4,
+187,202, 58, 39,230, 24,254, 52, 88,165,109,132,225,183,196, 21, 33,143,238, 33, 10,133, 82,233,165, 56, 32,192,243,216,177, 99,
+193, 93,187,118, 77, 73, 79, 79,207,115,116, 94, 85,248,134,181, 27,229,170,211,190,105, 50,155, 27,186,187,185,221,188,149,155,
+187, 60,243,218,153, 37,182,249, 13, 27, 54,116,219,176, 97,131,255,115,207, 61,151,113,253,250,245, 66,122, 4, 40,247,212, 96,
+181,111,223,190,161, 36, 73, 47, 1,120,129, 16,114,246,204,153, 51, 79,215, 70,103,223,190,125, 1, 60,207,119, 16, 4, 33, 10,
+ 64,148, 70,171,107, 99, 54,155,110, 50, 32, 47,247,239,223,255,140,179,122, 81, 81, 81,191, 3, 24, 80,217, 60,134, 97,102,198,
+196,196, 68, 59,170,197,201,240,249, 31, 91, 86, 13,201, 52,104,112, 40, 38,249,169,239,190,152, 6, 0, 67,255,137, 7,212,207,
+207, 79, 3,224,101,150,101,251,168, 84,170,112,147,201,148, 4,224, 60,195, 48, 75,211,211,211, 51,106, 41,203, 70,234,228,175,
+105, 53,218,126,126,174,202,168,244,188,194,116,147, 85, 58, 34, 49,214,121,206, 26,162, 70,128,210,167,158,199,161,119,135,117,
+139,104,221,162, 9,164,228,179, 48,229,103, 15,142, 73, 55, 12,254,230,228,205,255, 90,138, 12, 81, 87, 1,139, 35, 90,129,129,
+129,126,162, 40,202, 50, 51, 51, 83,109, 23, 67,179,217,220, 30, 64, 4,128,191, 84, 42,213,233, 59,189, 40,254, 91, 52, 3, 2,
+ 2,252, 37, 73,122,221,215,215,247,201,172,172,172,223, 89,150, 93,117, 7,199,155,242,144, 16,210,233,197, 5, 12,203,120, 57,
+179, 14,145, 72, 78,242,201,117,255,189,151,233, 36,164,100,164,231,128,128,128, 87,130,131,131,155, 16, 66, 18, 8, 33, 95, 86,
+ 56, 7,110,155,199, 48, 76,149,175,242, 8,105,209,101,243, 27, 47, 61,215,123,226,184, 87,116, 90,173, 6, 6,163,169,254,210,
+149,223,127,177,116,229,250, 1, 73,151,142,245, 7, 0,127,127,255,161, 65, 65, 65,161, 22,139,229, 58, 33,228,251,154, 52, 41,
+148, 59, 54, 88,205,155, 55,119, 81, 42,149,195, 89,150,125,185, 85, 84,231,110,131,159,121,153,225, 25, 45, 62,157,244,156,211,
+ 67, 56,196,198,198,170, 50, 51, 51, 63,110,216,172,221,127, 30,237, 59,132,109, 30,209, 12, 94,245, 61, 33,177, 74,172,217,117,
+185,254,193,111, 94, 89, 2,160, 75, 45,146, 57,224,199, 29, 39,145,153, 47,130, 97, 0,134, 1, 88, 6,208,155, 36,188,247,106,
+183,143, 0, 56,102,176,162, 70,203, 35, 26,248,244,191,124, 75,141, 93, 23,120, 0,254,208,122,250,246, 55,120,143,150, 35,118,
+ 5,255, 79, 58,152, 13, 26, 52,136,170, 87,175,222,215,175,188,242,138,103,120,120,184,159, 82,169,212,154, 76,166, 38,201,201,
+201, 13, 23, 46, 92,248,120,131, 6, 13,230,222,184,113,227, 87,103, 52,155,185,171,130, 67, 27,248,254, 56,117,220, 75, 29,195,
+195,130, 32,179, 20,131,152,245, 65,201,215,175,118,153,189,234,215, 55, 24,198,244,236,165, 66, 97,175,163,122,106, 87,197,251,
+239,141,126, 54,162,177, 43,129,229,210, 81,200, 56, 2,181,171, 39, 58, 6,115, 96, 64,154, 71,239,207,120, 15, 69,214,143, 28,
+ 48,146,179, 68, 81,124, 15, 0,211,160, 65,131, 31,229,114,249,169,246,237,219, 55, 27, 57,114, 36,211,170, 85, 43,156, 57,115,
+166,249,182,109,219,158, 22, 4, 33,222, 98,177,156,172, 95,191,254,217,184,184, 56,171,131,229, 91,145,155,155,219, 70,169, 84,
+118,250, 39,107,250,249,249,105, 44, 22,203, 75,129,129,129,163, 31,121,228,145, 86,131, 6, 13, 98,154, 54,109,138,248,248,248,
+118, 59,119,238,252,232,200,145, 35,231,211,210,210, 86, 40,149,202,239, 51, 51, 51, 29, 26, 4,120,120, 31,196,255,188, 15,205,
+106, 59,191, 2, 30, 0,212, 0, 50, 29, 9, 38, 0,208, 2,184,118, 31, 52,239, 70,164, 37,142, 97,152,122,165, 55,100,219,131,
+ 93,185,223,246,223,162, 40, 22,167,164,164, 52,170, 78, 51, 40, 40,168,185, 36, 73,156,253, 52,185,188,234, 86, 11,130, 32, 72,
+105,105,105,151,170,211,100, 88,198,107,197,215, 11,220,101, 44, 32,146,210, 15, 79, 32, 18, 2, 73, 2, 68, 9, 16, 37, 9,130,
+ 72, 32, 4,150,212,198, 0, 0, 32, 0, 73, 68, 65, 84, 17, 9,188, 64, 48,243,163,247,238,231,101,238, 73, 0, 61, 0, 28, 6,
+176,168,154,121, 95, 86, 39,226,221,168,205,139, 47, 61, 59,188,215,123,147,222,212, 17, 66, 64, 8,129, 70,173,194,228,137, 99,
+149, 38,147,165,171, 95,147,246,163, 51, 19, 79,175,100, 24,166, 23,128,246, 0, 78, 3,248,158, 90, 6,202,221, 50, 88, 76,187,
+118,237,122, 16, 66, 94,110,224, 31, 56,124,216,243, 99, 52,161, 77, 90, 66, 47,185,225,122,142,132,216, 3, 27, 0, 96,147, 51,
+ 27,223,189,123,119,123, 66,176,122,220,180, 5,205, 90,183,237,128, 11,233, 2,142,165,138, 40,190, 34, 66,198, 25, 33, 73, 0,
+ 33,196, 92,219,204,165,229, 9, 56, 18,111, 1,199, 2, 44, 11,112, 44, 3,206,217,247,116,199,174,224, 47, 5, 15,221,241,199,
+169,244,167,160,246,133, 33, 47, 29,134,188,172,157, 72,219,252,143, 50, 87,254,254,254,189, 67, 67, 67,191,156, 56,113, 98,131,
+204,204,204,122, 39, 79,158,132, 74,165,130,167,167,167,204,203,203,171,217,180,105,211, 10,102,207,158, 61,217,199,199,231,204,
+205,155, 55,147, 28, 50, 5, 46,138,136,238,173, 34,254,156, 49, 43,218,221, 28,179, 19,249, 63,255, 12,142,149,160,112,209,193,
+ 79,163,197,162, 39, 67,235, 77,219,157,250, 43,107,181, 68, 92, 48,153,210, 29,209, 12,242,169,215,183,113,120, 83,228,111, 95,
+138,196,124, 51,142,103,153, 49,184,103,123, 52,246,212,160,173, 32,162,190, 90,214,187, 38,131, 21, 16, 16,224, 41, 73,210,212,
+164,164, 36, 86,161, 80, 48, 13, 27, 54,124,118,197,138, 21,164,121,243,230,101,111,221,238,210,165, 11,186,116,233,194,232,245,
+250,136, 99,199,142, 69,108,222,188,153, 47, 40, 40,136,201,200,200, 88, 83,117,100, 41, 44,197,108, 54, 5,153,204, 22,211,194,
+133, 11,127,232,220,185,179,164, 84, 42,113, 39,154,165,198,119,189, 86,171,213,206,152, 49, 35,167, 67,135, 14,164, 46, 52, 67,
+ 67, 67,255,232,216,177, 99,175,190,125,251,202,186,118,237, 10,127,127,255,178,121, 94, 94, 94,232,222,189, 59,147,154,154,218,
+250,200,145, 35, 75,255,248,227,143,197,103,206,156, 57,144,148,148,212,215,129, 67,212,244, 14,231,151, 11,254, 2,152, 3, 96,
+ 37,128, 99,213, 61,198, 0,120, 14,192,231,247, 73,179,250,135, 2,181, 58,203,100, 50,249,148,254,190,105, 50,153,124,107,188,
+ 88, 50,140,110,225,194,133, 62, 10,133, 2, 44,203, 66, 20, 69,136,162, 8, 73,146, 64, 8, 41,251,182,189,114,108,214,172, 89,
+ 98, 77,154,146, 36,177, 11, 22, 44,144,107, 52, 26, 0, 0,207,243,229,190,109,216,254,207,154, 53,203,161,107,148, 70,201,225,
+195, 73,163, 59,178,162, 69, 93,237,246, 57,165,233,181,201, 95,158,186, 15,102,213, 51, 32, 32,224, 37, 0,131, 0,216,206,241,
+ 86, 1, 1, 1,251, 43, 44,218,170,244,187, 56, 32, 32,224, 0,128,223, 3, 2, 2, 86, 87, 86, 93,232,238,226, 58,246,221,183,
+ 95,119, 37,132, 96,230,207, 57,152,249, 75, 14, 62, 28, 90, 15,147, 7,104,241,234, 11, 79,187,172, 94,247,211,152,210, 50,102,
+ 35, 1, 37,189,238,105,244,138, 82,247, 6,171,109,219,182, 59,250, 15, 29,213,175,115,143,190, 16, 20, 62,136,191,201, 32,245,
+ 58,129,140, 19,192, 66,194,181,255,109, 33, 44,203, 86,116,248, 85,118,213,220,177, 99,199,127,131, 27,183,153,251, 94,244, 28,
+238, 66,150, 18,171,143, 24, 33,154, 11, 96,204,185,130,226,155,151, 81,116, 35, 14,249,233, 23,206,179, 44, 27,237,168,230,237,
+ 97,101, 64, 34, 4, 12, 97, 0, 9, 37,231, 6, 91,169,195,170, 86,147,136,204,212,152, 63, 86, 63,213,118,200,116, 92, 62,178,
+ 14, 32,236, 84, 7, 54,127, 55, 94,130,121,161,138, 72,198,227, 33, 33, 33,243,198,140, 25, 19,120,238,220, 57, 55,131,193, 80,
+124,234,212,169, 67,153,153,153,190, 94, 94, 94,169, 35, 71,142,124,196,199,199,199,167, 71,143, 30,218,221,187,119,191, 15,224,
+245,154, 52, 35,181,138,200,174, 29, 90, 30,255,100,222,124,151,156, 95, 23,195,114,253, 28,142,103,153,112, 46,219, 72, 2,220,
+ 10,152, 17, 45, 61,225,162,148, 97,116, 39, 31,221,127,182, 37,125, 6, 19,158,119, 36,239, 13, 3,124, 27,241, 70, 35, 76, 70,
+ 43,118, 92, 46, 48, 30,207, 43,240, 97, 93,211,178, 39, 63,213, 94,205,229,100,160,129,171,188, 9,110, 58,183, 63, 25,134,129,
+ 86,171,173,116,158,187,187, 59,186,116,233,130, 70,141, 26,201,159,123,238,185,206, 0,214, 84,165,105,181, 90,253,210,211, 51,
+ 16,222, 52, 92,213,167, 79, 31,134,227, 56, 88, 44,150, 59,210, 4, 0, 23, 23,151, 65, 81, 81, 81,178,181,107,215,230, 39, 37,
+ 37, 93, 28, 54,108, 88,186, 86,171, 45,119, 67,213,106,181, 8, 14, 14,198,248,241,227,229,111,188,241, 70,141,154,190,190,190,
+143,175, 91,183, 14, 12,195,148,221,188, 43, 18, 18, 18,130, 6, 13, 26, 96,192,128, 1,178,167,159,126,250,241,164,164,164, 42,
+247,231,240, 62,136,183,153,167,225,125,170,191,137,148,206, 79,168, 36,146, 85, 49,157,185, 0,150, 3,248, 13,192,240, 42, 12,
+ 81, 87, 0, 63, 3,232, 15, 84,122,228,171,212, 84, 40, 20, 10,171,213,234, 89,137,241,113, 86,179,236, 84,143,137,137, 65,187,
+118,237, 80,241,219,102,132, 24,134,241,113,244,220,228, 56, 14,203,150, 45, 3,203,178, 80, 40, 20,144,203,229, 80, 40, 20,183,
+125,218,182,109,235,240,249, 46,151,203,177,108,217, 50,136,162,200, 38, 37, 37,189, 44,138,226, 16,147,201,228,163,209,104,178,
+ 21, 10,197,246,158, 61,123,126,167, 82,169, 4,103, 52, 89, 14, 96, 69,139,122,239,238,173, 46, 85,173,100, 54,155, 49,112,200,
+ 8,176, 12,123,207,175,117,199,142, 29, 11, 14, 14, 14,110, 90, 26,157, 2,128,195,233,233,233, 61,236,254,219,115, 56, 61, 61,
+221,214, 52, 36, 49, 37, 37, 37, 56, 36, 36, 36,175,162,166,197, 98,109,168,211,185,128, 16,130,153,191,228,192,180, 54, 12,234,
+ 81,215,240,106, 39, 51, 92, 93, 93, 33, 8, 66,179,128,128,128,239, 1,132,151, 70,175, 6, 7, 4, 4, 52, 37,132, 28,104,216,
+176,225,111,118, 85,250,247,236, 58,255,144,104, 86,115, 63, 39, 29, 0,120,219, 77,178, 0,176, 61,173,230,148, 26,224,250, 21,
+166,219, 47,103,251,206,182, 5, 50, 75,215, 35,118,186,217, 12,195,252,175,174, 13, 22,177,115,231, 85,197,120,220,210,140, 30,
+208, 95,247,130,140,149, 32,227, 24,200, 56, 0, 96,144,155, 22, 7, 75,113,238,209,152,152,152,235,142,108,116,215,174, 93, 93,
+ 66,155,119,252, 44,250,147, 47,216,239, 14, 27, 81, 96, 48, 33,231,210, 86,100,158,250, 54, 83, 18,172, 91, 89,150, 61,205,178,
+108,108, 84,235, 86,241,126,126,126, 98,109, 51, 39,145,146, 16,119,153,177,146, 0,166, 54, 15, 32,233,191, 94, 65,216,251,229,
+255,255, 67, 8, 8, 8,232, 31, 22, 22, 54,103,204,152, 49, 33,177,177,177,174, 69, 69, 69,217,123,247,238,141,183, 90,173,103,
+ 88,150, 93,148,145,145,209,115,221,186,117,218, 41, 83,166,244,109,218,180,105,211, 63,254,248,195, 80, 99,228, 74, 43,111,253,
+194,139, 35,142, 15, 25, 61, 65,125,241,151, 37, 80,197,199, 98,197,165, 60,241,116,150,241,125,147, 94,248, 82,163,149,117,205,
+ 55, 9,123,222,237,238,199,250,185,202, 17,228,174,120,244, 92,145, 99, 47,250, 86,202, 85, 50, 34, 83,195, 98, 22, 80,108,145,
+ 44,113, 57, 40,126, 92, 16,173,196,197, 75, 13, 0, 50,142,173,209,244,167,167,167,231,249,249,249,125, 22, 26, 26,250, 1,195,
+ 48,164, 71,143, 30,151,218,181,107, 87, 44, 73, 18,140, 70, 35,172, 86, 43,228,114, 57,140, 70, 35,146,147,147,113,242,228, 73,
+184,187,187, 59,181, 95,243,243,243, 17, 26, 26, 10,173, 86,123,199,154,146, 36, 49, 75,151, 46, 85, 95,188,120, 81,253,219,111,
+191,213,251,239,127,255, 91,208,182,109,219,184,167,158,122, 42,181, 94,189,122,214,179,103,207,226,248,241,227,200,203,203, 67,
+199,142, 29, 29,210,180, 90,173,144,201,100, 48, 26,141, 80,169, 84,144,201,100, 16, 4, 1,146, 36,149,153, 46,189, 94,143, 91,
+183,110, 65, 46,151,215,248, 34,118,155, 89, 26,222, 7,228,167,159,255,188, 89, 82, 55, 84,200,195, 90,192, 67, 40,224,193, 23,
+240,224,243,249,103, 38,206,111,253,243, 62, 56, 19, 7, 62, 81,106,174,126,174,196,100,117,181,155,126,214, 89, 77,171,213,122,
+212,102,124,212,106,181,143, 45,186,160, 82,169,120,179,217,220,203, 73, 77,196,196,196, 32, 42, 42,138, 43,213, 36,132, 16, 91,
+123, 27,167, 47, 26, 12,195,128,227, 56,200,229,114,112, 28,135,168,168, 40, 12, 26, 52, 8, 77,155, 54, 69, 90, 90, 26, 14, 30,
+ 60,136,203,151, 47, 67,161, 80,148,171, 58,172, 9,185, 92, 14,150,101,217,132,132,132,239,250,244,233,211,120,194,132, 9,202,
+224,224, 96,196,199,199, 55, 88,186,116,233,168,125,251,246,245, 28, 58,116,232, 40, 0, 66,117,213,135,229,140, 96,169,105, 50,
+155,205,136,139,139,171,126, 89,167,171, 0,238,156,174, 93,187,166, 16, 66, 18, 81, 82,245,215, 42, 61, 61,189, 71, 64, 64,192,
+ 14, 0, 21, 13, 97,113,122,122,250,128,128,128,128, 2, 0,231, 1, 36, 48, 12,147, 82,153,166,135,187, 91,182, 94, 95,236,235,
+226,162,197,251, 67, 60,160, 30,117, 13,111,247,226,192,243, 60,174, 94,189,142,134,161,129,204,166,213, 91,108, 85,131,237, 79,
+159, 62, 13,148, 84, 21, 38,165,166,166,250,119,234,212,137, 54,120,191, 75, 62,170, 26, 47,226,205, 48,204,118, 59,195, 53,208,
+246,127,218,180,105,239,205,153, 51,231, 34,195, 48,219,237,167,219, 47,103,255, 93,122,142,110, 39,132, 12,156, 62,125,122,228,
+220,185,115,103,219,150,189, 47, 17, 44,142,227,134, 93,216,245,229,137, 38, 86, 18,226, 27,249,100,185,253,144,124,118, 23, 36,
+ 73, 90,227,136,206,241,227,199,213,130,132,239,166,188, 55,139,253,230,128, 17, 89, 55, 50,144,113,232,115, 24,111,198,173,214,
+104, 52,239,246,233, 55,240,142, 11,110, 84, 84, 84,164, 71,253, 6, 48, 91, 73,169,193, 42,111,178, 30, 20,252,252,252, 6,133,
+133,133,205,218,186,117,107,136,209,104,116, 61,118,236, 88,254,158, 61,123, 18,173, 86,235,170, 27, 55,110,172, 47, 93,108,171,
+ 76, 38,251,152, 16, 2,157, 78, 39,227, 56, 78, 83, 93,168, 59,210, 77, 30,245,210, 11, 47, 28,253,239,162,149,234,196, 11,103,
+177,120,211, 14,168,136, 85,188,148,107,121,234,162, 94, 40, 41,180, 6, 97,127, 64,142, 49,157, 16, 4,201, 89, 6,245,180,242,
+ 6,157, 1,245, 9,192, 84, 83,154,189,130, 66, 88, 33, 32, 12, 71, 12,102,232,220, 20, 74, 0, 8, 8,111,193,157, 45, 20,112,
+236,212, 95, 80,171, 61, 21,142,228, 61, 51, 51,115,134,191,191,127,232,158, 61,123, 88,131,193, 80,124,238,220, 57,212,175, 95,
+ 31, 62, 62, 62,112,115,115, 67,124,124, 60,246,238,221,139,132,132, 4, 16, 66,170,139, 18, 84, 74, 86, 86, 22, 10, 11, 11,235,
+ 68, 83, 16, 4, 6, 0, 34, 35, 35, 17, 25, 25,169, 76, 79, 79,247,217,190,125,187,231,236,217,179,111,248,249,249,237, 54, 26,
+255,110, 30, 85,177,186,167,186,136, 2, 0,152, 76, 38,152,205,102, 40, 20, 10,168,213,106, 40, 20, 10, 20, 22, 22, 34, 43, 43,
+ 11, 69, 69, 69, 37, 55, 19, 15,143,178,229, 29, 66,148,128, 19,221, 78,223,238,230, 95,246,169,101, 81, 61, 86,106,162,246, 3,
+176, 29,223, 44, 91, 64, 12,213, 87,245, 85,167, 89,110,127,216, 69,153,228,181,209,180, 69,170, 24,134, 41,119,149, 80,171,213,
+ 55,109,145,171,210, 72, 89,141, 90,182,106, 65,165, 82,137,200,200, 72,188,251,238,187,136,143,143,199,209,163, 71,225,227,227,
+131, 39,158,120, 2, 50,153, 12,169,169,169, 96, 89,214, 33,131,165, 80, 40,192,243, 60, 18, 19, 19, 95,238,221,187,119,216,226,
+197,139,149, 73, 73, 73,136,143,143,135,155,155, 27, 62,254,248, 99,213,212,169, 83, 3,119,239,222,253, 70,155, 54,109,150, 57,
+124,109,103, 74,170,255, 6, 14, 25, 81,137, 17,113,145,175, 93,243,173,210,102,188,216,251, 48,176, 79,122,122,122, 30, 33,100,
+ 1,128,133,165,213,130, 61, 0,184,164,167,167,247,178,187, 9,147,210,106, 65, 0, 56,159,158,158,222, 27, 0,169,170, 65,122,
+230,205,204,229,159, 47,250,102,225,204,247,222, 81, 78, 30,160,197,171,157,204, 16, 69, 17, 28,199, 97,241,242,213,252,229,184,
+ 11,231,218,183,111,191, 29,192,224,211,167, 79,163,125,251,246, 69, 0, 46, 3,184,174, 84, 42,105,231,145,251,233,192, 42,152,
+ 32,155,113,154, 51,103,206,192,202, 76, 85, 37, 15, 63,229,166,207,157, 59,119,182,221,255, 58,237,197, 46,171,224, 28,171,123,
+ 10,247,243,240, 14,168, 55,230,249, 39,176,249,156,237,133,132, 4, 86,179, 1, 55,226, 15, 24, 44, 22,203,207,142,108, 48, 55,
+ 55,247,227, 87,223,157,223,248,116,138, 12,153,121, 6,100,236,155, 69,172,249, 73,195, 7, 13, 26,180,185, 46, 50, 20, 21, 21,
+ 21,233,233,229,127,240,131,207, 86, 98,127,162, 5, 18, 1, 24,130,191,141,213, 3, 50,242,151,191,191,127, 19, 15, 15,143, 47,
+182,108,217,226,163, 84, 42, 93,207,159, 63, 47, 30, 58,116, 40,131,231,249,165, 55,110,220,216,104,183,220, 11, 45, 91,182,228,
+ 93, 92, 92,144,153,153,105,226,121, 94, 95,213,177,110,161, 86, 7, 70,181,138, 56,252,223, 69, 43,213, 38,139, 5, 5, 70, 51,
+188,253,252,196,163,231,227,158,138,211,139,101, 79, 4,205,117,178, 71,218,135, 7, 4,176, 26, 87,192, 80,136,244, 66, 75,134,
+ 35,230, 10, 0, 92, 92, 61,216,192,246,143,162,253,196,175,112, 41,250,125, 2,228,194,195,215,159,237, 53,254, 83,232,218, 13,
+194,178, 9, 47, 75,127, 71,112,107,196, 24, 30, 30,142, 51,103,206,216,202, 22,114,115,115, 17, 22, 22,134,197,139, 23,151, 91,
+208,145,155, 98, 21,229,245,142, 53, 37, 73, 98, 42, 68, 29, 49,110,220, 56,249,206,157, 59, 93,236,205,149, 51,154, 22,139,165,
+204, 80, 16, 66, 96,177, 88, 96,177, 88,224,226,226,130,196,196,196,242,126, 73, 20, 43,173,234,172, 58,193, 5,149,135,187,248,
+220, 59,105,119,120, 12,128,194,206, 4,249, 2,232, 86, 75,115,117,155,241,169, 11, 98, 98, 98, 42,189, 14,218,170, 30, 99, 98,
+ 98, 72,187,118,237,124, 29,213, 35,132, 64,169, 84, 98,240,224,193,248,235,175,191,144,145,145, 1, 87, 87, 87,152,205,102,152,
+205,102, 68, 69, 69, 33, 43, 43,203,225,232,149,157,110,255,183,223,126, 91,125,253,250,117,220,186,117, 11,106,181, 26,130, 32,
+ 64, 20, 69,188,241,198, 27,234,241,227,199,247, 3,224,184,193,226, 24, 60,246,242,103,149,182,173,218,255,237,127,122,170, 84,
+170,178,234, 22,142,253, 71, 93, 64,237, 31, 20,157,218,137,217,215, 47, 44, 91,183,241,183,199, 5,171,181,215,107, 47,141,112,
+213,185,104,113,245, 90, 18,150,173, 90,203,239, 63,114,106,127, 86, 90, 98,127, 0, 76, 64, 64, 64,211,210,200,213,229,244,244,
+244,151,170, 51,109,148, 58,141, 98, 85,100, 52, 74, 59,182, 84,101,156,156, 49,104,246, 17, 46, 27,211,167, 79,143,156, 51,103,
+ 78,157,182, 49,148, 85, 81, 88, 43,154,150,182, 30, 94, 1, 7,166,207, 94,169,251,237, 28,135,188,204, 4,152,110, 38, 32, 40,
+106, 8,178, 18,142,129,136,252,175,113,113,113,197, 53,109,108,247,238,221,225, 65, 77,219, 79,108,211,174, 19, 62,255, 93, 15,
+253,165,141,176,228, 93, 95, 54,112,224,192,186, 51, 87,245,253, 14,190, 55,119,101,189,109, 23,229,200,205, 72, 64,252,150,169,
+ 16,173,183,213,138,237,112, 70,183, 39, 32, 19, 60,173,120,188, 57,131,155,127, 26,144,217, 19, 50, 28,186,191, 47,189,206,200,
+200, 72,244,240,240,248,126,229,202,149, 99, 91,183,110,173,157, 56,113,226,229,194,194,194, 79, 50, 51, 51,127,180, 51, 87,189,
+195,194,194, 38,205,154, 53,171,113,114,114, 50, 14, 31, 62,156,200,113, 92,149,245,203,151, 76,166, 52,246,252,165,165, 71,127,
+ 88, 53,153, 13, 14,199,166, 89, 83,132, 63, 47,196, 13,142,211,139, 59,203,204,149,139, 34,162, 75,100,163,237,111, 78, 24,195,
+138,103,119, 33, 62,249, 38, 50,245,252, 62,135,159, 70,139, 12,188, 92,165,129,174, 65, 40,146,141,146,194,223,223,255,100, 90,
+190,241,255,236,157,119, 84, 20,215,223,198,159,153,237,187,176, 75, 93, 96,169,162, 2, 82, 5, 4,172,216,162,177,196, 22,147,
+ 88,163,198,196,104,138,198,168,137, 53,118,209, 24,141, 53,197,216, 73, 20,219, 27, 19,107,140,138, 88,176, 3,118, 68, 68,250,
+210, 59, 44,108,155,251,254, 1,248, 67, 66, 89, 74, 98,202,124,206,217,179,187, 51,179,207,222,153,185,115,239, 51,223, 91,134,
+ 79,115,184,160,185,124, 36,228, 87, 52,169, 18,103,152, 63,134, 36,107,155, 22, 0,141, 54,145, 53,234,228, 90,160, 89, 29,193,
+250,131, 95,209,106,169,230,106,214, 52, 88,181,205, 84, 93,199,168, 73, 6, 75, 83, 84,247, 57, 80,231,182,198,192,142,234,132,
+ 8, 90, 98,174,170,141, 79,117, 7,116,161, 80,248,220,168, 24, 26,101,170, 47,130,213,208,122,131,107,126,138, 2,195, 48,224,
+241,120,112,113,113,193,213,171, 87, 33,147,201, 96,108,108, 12,137, 68, 2,161, 80, 8,153, 76, 6,129, 64, 0,154,166, 65, 27,
+104, 92,180, 90, 45,212,106,181,141,189,189, 61,158, 60,121, 2,145, 72,244,252, 37, 16, 8,224,230,230,134,146,146,146, 38,153,
+206,166,152, 38,206,191,104,106,234,164,135,145,175,219,184, 6, 77, 56,240,127,199, 63,172,168, 80,123,119,112,107,143, 71,247,
+162,238,100,166,198, 15, 98, 61,206,223,198, 56, 87,243, 3, 42, 71,137,182, 74, 51, 94, 93, 38,107,205,154, 53, 33, 53,163, 96,
+173,109,176,208,144,185,154,187,234, 7,217,161, 40, 26, 5,202, 88, 36,157, 94, 80,172,215,148,229, 51,140,214, 41,255,233,101,
+224,197, 14,185, 13, 85,134,129,221,250, 14,167, 47, 60, 82, 67, 83,156,142,162,251, 7, 18,133, 66,225,188,214, 52, 87,243, 86,
+111, 55,255,249, 14, 23,121,233,143,241,244,228,252, 66,189,166,172,111, 84, 84, 84,147,231,209,122, 31,224,253, 0,104,135,201,
+229, 35,100, 66,122,237,228,145, 82,244,236, 39,134,140, 47,195,242,175,232, 71,165,221,152, 57, 89,145, 56, 6,127,240, 16,133,
+151, 50,162,240,193,131, 7,171,182,111,223, 78,235,116,186,201, 26,141,102,169, 82,169,124, 30, 69, 84, 40, 20,253, 29, 29, 29,
+215,174, 88,177,194, 62, 49, 49, 81,112,237,218,181,188,232,232,104, 70,175,215,175,105, 72,243, 94,145,250,243,143, 63,158,206,
+105,239, 96, 59, 61, 62, 53,117,216,253, 98,253,233,234,117, 94, 18,190, 87, 55, 95,247, 43, 43,150,205,151,106,174, 29, 65,105,
+ 70, 42,182, 94,203, 40, 98,244,218,249, 6, 70,221,204, 47,159, 63,135,249, 83, 38, 49,197,197,197,144, 8,248, 76,106,236, 83,
+206,132,126, 61,245, 95,206,157, 77,103,100,100,160,172,180,148, 99,107,107,107,158,158,158,158,103,136,102, 93,134,162,174,202,
+181, 73, 6,163,238,202,188,217,154,181, 35, 88, 13, 25, 44, 67, 53,107, 54,137, 53,118, 60,244,122,125,211,154, 8,117,245, 24,
+ 44, 77,182,166,133, 89, 54,153,162, 40,199,234,207,173,113, 13,148,151,151, 91,213,136,138, 1, 0,213,220,104,101, 85, 4,171,
+193,245, 77, 49, 89,213, 17,172,248,248,120,200,229,114,232,116, 58, 24, 25, 25, 65, 44, 22, 67, 44, 22, 67,165, 82, 65, 32, 16,
+128,195,225, 52, 41,157, 66,161, 48, 35, 54, 54,214,201,204,204, 12,122,189,254, 5,147,245,236,217, 51,152,152,152,100, 25,218,
+255,170, 50,130, 5,156,221, 51,183,206, 81,132,166, 38, 70, 47, 8,113, 40, 10,127, 35,106,246,211,105, 86, 84, 41, 35,238,198,
+143, 0,126,180,179,179,219,187,111,199,137,128,128,128,128, 19, 45,213,100,249,147,221, 87,149, 49,170,217,151,106,222,188,121,
+205,158, 59,100,222,188,121, 11,234,138,104,181,166,193,162,106,189,255,207, 92, 89,216,134,207, 89,177, 77,182,239, 22,141, 66,
+229, 35,164,159, 93, 84,200,104,202,250,210, 52,173, 76,137,252,225, 48,128,178,168,168,168, 8, 3, 43, 67,255, 14,174,174, 56,
+116, 95,135,242,140, 59,160, 41,178,167, 95,191,126,101, 45,221,137,106,115,245,121,200, 15,230,135,162,185,200,175, 52,129,133,
+ 76, 51,204,213, 88,129,160, 61,143,166,215, 58,248,186,191, 54, 58, 33,185,164, 79, 59,145,233,224,246, 66,112,174, 29,197, 49,
+219, 44,228, 89,158,199, 7, 27,236,218, 71,254, 82,244,107,148,176, 52,207,215,199, 91,118,203,232,222, 9, 45,209,127,158,115,
+ 9,127,121,231,247,248,248,248, 21,214,214,214, 63,103,102,102, 62,239,157,106,103,103, 55,200,209,209, 49,100,249,242,229,109,
+ 82, 82, 82,164, 49, 49, 49, 69,135, 15, 31,126, 70,211,244,242,140,140,140,172,198, 52,239,151,104,103,147,100,229,142, 7,165,
+250,216,231,145, 43, 9,175,227,132, 9,163,175,246, 27,243,142, 40,225,194, 94,152,167, 62,192,198, 27, 89,250,212,194,242,177,
+177, 42,100, 24, 98,174, 4, 2,193,161,205, 71,142, 60,241,246,246,166,202,202,202,160,213,106,145,157,157,141,175,126, 58,116,
+159, 97, 24,152,153,153,225,220,185,115,204, 39,159,124,114,200,214,214,246, 45, 67, 76, 22,195, 48,207, 43,171,250,162, 64, 98,
+177,184,105, 6,163,234, 55, 53, 13, 76, 75, 52,235, 51, 88,181, 35, 91, 77,212,172,188,128,171, 58,183,215, 23,209,227,112, 56,
+ 96, 24,166,206, 72, 95,253, 97,146,130,122, 12, 86, 86, 75,111, 36,156,208,240, 64,154,151,134, 72, 36,202,172, 50, 79, 76,125,
+ 83, 49, 52, 53,130, 5, 0, 2,129, 0,145,145,145, 24, 56,112, 32, 24,134,129, 80, 40,132, 88, 44,134, 72, 36,194,141, 27, 55,
+192,231,243,193,225,112,154,212, 76,200,227,241, 78,109,221,186,117,210,154, 53,107,196, 12,195, 64, 32, 16, 64, 44, 22, 67, 40,
+ 20,226,235,175,191, 86, 9, 4,130,211, 77, 50, 88,104,124, 20, 97, 77, 51,246, 87, 83,107,154,134,218, 83, 49,212,164,246, 20,
+ 14,245, 78,211, 96,107,107,107,110,111,111,255, 30, 33,196,179,106,209, 11,163, 5,107,108, 90, 93,176,184,218,217,217,237,173,
+ 99, 20, 33, 75,235, 71,175, 80, 79, 25,145, 93, 43,122,165,174,241, 61, 27, 0, 85,245, 61,187,134, 1,171,249, 89, 93,199,178,
+220,213,171, 87,135,215,136, 92,101,183,230,206,212, 27,193,242,245,245,117, 55,181,176, 13,159,181, 98,155,108,239,117, 14, 10,
+149, 15,145, 19,254, 69, 33,209,169,106,154,150, 30, 77,252, 63, 63, 43, 43, 11,228, 68,150, 67,155,255, 4, 20, 69, 69,181,116,
+ 7, 2, 3, 3, 93,164, 38,242, 11,115, 86,254, 96,190,255, 54, 23, 5,233,255, 51,129,205,137, 92,113,105,250,171,245,191, 29,
+ 24, 38,204,120, 4,213,157, 11,166,188,188, 84,220,207,210,224, 80,100, 70,241,133, 43,219, 47,211, 30, 36,184,239, 88, 83,227,
+190, 99,205,177,241,131,211,230,153,229, 15,112, 61,238,248,240,144,249,199, 9, 94,210,236,238, 53,205,149, 66,161, 24,106,107,
+107,187,236,196,137, 19, 78, 58,157, 78,122,241,226,197,226,195,135, 15, 63,213,233,116,155, 51, 50, 50, 78, 24, 28, 29, 43,213,
+ 60, 55, 87, 94, 50,158,255,228,137, 19, 47,127,178,225,123,209,131,219, 55,177,118,239, 9, 72,121, 90,253,237,244,242,183, 30,
+148,254,175,249,176,193,227,202,229, 46,223,191,127,191,145,135,135, 7,149,155,155,251,188,194,215,104, 52, 40, 42, 42, 66, 97,
+ 97, 33,212,106, 53,188,189,189,233, 37, 75,150, 24, 45, 94,188,120, 57,128,143, 26,137, 16,100, 45, 91,182,204,234,253,247,223,
+135, 76, 38, 67,110,110, 46,180, 90,237,243,104,147, 80, 40,132,169,169, 41, 10, 10, 10,112,246,236, 89, 16, 66, 26, 52,151,124,
+ 62, 95,105,103,103,235, 32,150, 24,169, 37, 18, 9, 49, 54, 54,110,177,102, 85,101,155, 49,120,240, 96,155,101,203,150, 9,106,
+ 86,210, 26,141,134,106,174, 38, 33,164,236,213, 87, 95,149,108,222,188, 25, 78, 78, 78, 80,171,213, 96, 24,230,121, 4,171,122,
+106,128,228,228,100,172, 90,181, 10,132, 16,195,111,100,180,249, 90,216, 79,148, 67,147,171,133, 38, 87, 11,117,142, 22,154, 44,
+ 45,116,101,127,187, 33, 34,205,233,128,110, 64, 36,204,170,165, 17, 44,138,162, 64, 8, 1,159,207, 71, 74, 74, 10,206,157, 59,
+135,160,160, 32, 72,165, 82,148,150,150,226,234,213,171,200,200,200,104, 86, 4,171,111,223,190,123,206,156, 57, 19,252,241,199,
+ 31, 59, 79,155, 54, 77,236,238,238,142,196,196, 68,108,216,176,161,252,225,195,135,105, 51,102,204,216,222, 20, 61,186,106,234,
+ 26,131, 70, 17,210,127,189, 55,174,103,154,134,193,245,108, 94,115, 10,135,218,211, 52, 60,231,232,209,163,206,118,118,118,238,
+168,236, 95, 5,252,113,180, 96, 77,110,221,186,117, 43, 0,236, 40,194,151, 29,185,186,249, 79, 75, 51,183,254,139,142,254,180,
+243, 27, 11,101,123,174,113,145,159,118, 31,133,151,150,212, 54, 87,134,224,141, 26,115,101,240, 68, 82,111, 29,225, 3, 40,135,
+174,224, 41, 4, 2, 65,116, 51,210,252,130, 38,195, 48,179,187,188,177,208, 60,244, 38, 23,133,233, 15,145,125, 97,113,115,204,
+149, 55,128,123,239, 3, 60, 7, 63,207,215,132,153,143, 81,126, 33, 12, 20,128, 29,209,165,184,154,170,254, 90,163, 86,175,124,
+ 88,164, 46,176, 19,195, 44, 44, 36,107,241,160,215,125, 62,113, 27,125, 22,215,179,191, 3, 36,128,153,156, 59, 40,203, 95, 87,
+179,185,240,133,116,182, 18, 13,106,218,218,218,186, 24, 27, 27,127,117,234,212, 41,185, 64, 32,144, 61,120,240, 64,127,228,200,
+145, 20,189, 94,191,190,102,199,247,166,104,122,138, 68,246, 30,109, 29, 34,102,172,255, 86, 84, 92, 82,138, 82,181, 6,182,142,
+118,250,136,219,143,222,120, 80,170,249,197, 16, 77, 43, 43,171, 62, 35, 71,142,236,216,169, 83, 39,186, 62,115, 85, 84, 84,132,
+146,146, 18,164,166,166, 34, 56, 56,152,118,119,119,247,174,168,168,232,147,149,149, 21, 94, 95, 58,149, 74,229,210,176,176,176,
+238, 7, 15, 30, 28, 50,101,202, 20,233,200,145, 35, 33, 22,139, 81, 90, 90, 10, 7, 7, 7, 48, 12,131, 75,151, 46, 33, 46, 46,
+174, 24,192,113,165, 82,121,165,161,116, 62,123,150,224, 8,128,182,183,183,239, 62,112,224,192, 86,209, 4,128,236,236,236,246,
+ 17, 17, 17,115,135, 15, 31, 62,115,192,128, 1,210, 5, 11, 22,240,157,157,157,161,215,235,169,230,106,230,231,231,155, 68, 69,
+ 69,173,235,209,163,199, 71, 3, 7, 14,228,134,132,132,192,196,196, 4,122,189, 30, 98,177, 24, 69, 69, 69, 88,190,124, 57, 46,
+ 95,190,172, 35,132,124, 83, 88, 88, 56,167, 33,205,154,243, 96,189, 53,227,107,223,134, 50, 97, 3,243, 96,253,229,121,190, 42,
+210, 68,208,180,166,193, 70,211, 89,213,161,253, 15,243, 97, 25,170, 89, 61,245,130, 64, 32, 0,151,203, 69,118,118, 54,206,156,
+ 57,243,194,252, 87, 2,129,224,249, 52, 14,245, 68,176,234, 76,167, 84, 42,101,222,124,243,205,201,167, 78,157,154, 52,123,246,
+236,225,197,197,197, 86, 50,153, 44,219,200,200,232,248,140, 25, 51,118,153,154,154, 54, 52, 69,195, 31, 52, 57, 52, 85,239, 40,
+194, 23,162,166, 28, 65,121, 61,221,181,254,212,243, 94,107,154,134,218, 83, 49,212,164,246, 20, 14,181,167,105,120,174, 57, 98,
+196,136,103,168,156, 60,148,174,122,175, 61, 90,176, 26,215, 91,183,110, 5, 4, 4, 4, 92, 4, 32,198, 31, 71, 17,254,229,121,
+254, 95,174,249,175,162,161, 62, 88,162, 43,183,227, 64, 11,179, 80,124,253,171,230,152,171, 63,160,171, 40,141, 95,113, 32,193,
+ 79,175, 86, 65, 87,148,244,120,224,107,131,179, 90,186, 3,132, 16,163,203, 81,241,224,138,114, 81,112,237,203, 2, 74, 95,209,
+ 55, 42, 42, 42,166, 57, 90, 63, 0,218,113,119, 30, 93,120,122,249,220, 43,182, 0,146,242,212,136,137,205, 59,115, 84,165,154,
+ 93,189, 77,218, 53,228, 3,152,249, 27,247, 94, 7,115,215,194,254, 38,182, 64, 86,178, 22,249,217,186, 83, 47,171, 47, 86, 53,
+233,233,233, 79, 60, 61, 61,247,238,220,185,243, 3,127,127,127,227,233,211,167,199, 21, 22, 22,190,208,241,189,169, 60, 40, 47,
+ 79, 69,124,226,119, 23,118,108,248, 76,228, 30,132, 35, 33,243,245, 23,111,199,142,184, 95,162, 49,184,205, 90, 40, 20,246,254,
+224,131, 15,248,101,101,101,245,154,171,162,162, 34, 20, 23, 23,163,168,168, 8, 49, 49, 49, 24, 57,114,164,240,209,163, 71,189,
+ 1,132, 55, 84,230,167,166,166, 94,106,215,174,221,141,239,190,251,174, 95,104,104,104,255,119,223,125, 87,208,187,119,111, 60,
+120,240, 0, 55,110,220, 80,107, 52,154,223, 69, 34,209,217,167, 79,159, 26,218, 9,235,207,208,212,169, 84,170, 85, 98,177,120,
+243,225,195,135, 87,158, 63,127,254,237, 73,147, 38, 25,233,116, 58,170, 37,154,133,133,133, 51, 45, 45, 45, 23,157, 60,121,114,
+207,153, 51,103, 70,188,253,246,219,244,140, 25, 51,176,101,203, 22, 28, 57,114,132,209,235,245,191,240,120,188,137, 57, 57, 57,
+141, 14, 64,169, 57, 15, 86, 67,243, 92, 53,182,222, 0,254,140,187,208, 22,107,214,142,132, 85,143, 22,172, 54, 85, 77,105, 30,
+172, 73,199,142, 29, 95,152,231,170,186, 67,123,245,139,195,225,128,203,229, 54,169,137,208,203,203, 11, 60, 30,143,241,243,243,
+219, 5, 96, 23,240,226, 35,115,120, 60,222,243, 73, 77, 13,161, 66,199, 96,199,206,189, 55,116, 12,129,158, 33, 32, 12,160, 37,
+ 0,163,103,160,103, 8,244, 12, 83, 57, 45, 26, 1, 84,229,250,191,188, 92,171, 49, 77,195,215,117, 76,197,240,156, 58,166,112,
+168,247,185,129,233,233,233,121,132,144,234,254,168,117,141, 22,172,214,220, 91,181, 92,156,150,150, 54,161, 33, 77, 22,150,166,
+ 24,172, 5, 37,183, 55,105, 1, 88, 80, 20, 53, 63, 42, 42,234, 65, 75,255,140,195,161,231,103, 29,123,103, 51, 1,242, 57, 20,
+230,183,198, 14,232,245,250,133,165, 81,155, 25, 66,136, 41, 69, 81,243,110,223,190,221,162,116, 18,157,238,195,175,182, 95,250,
+ 90,110, 34,232,159, 83, 80,113, 18, 20, 85,231,172,237, 58,144,143,127,252, 50,249, 75, 51, 57,119, 80,126,182,238, 20, 67, 99,
+238,223,225,132, 62,120,240, 32,100,251,246,237,156,239,191,255,126,178, 90,173,126,161,227,123,179, 53, 75, 52,159,127,250,249,
+ 34, 78, 7,103,251,233,177,137,201,195,239,151, 24,214, 44, 88, 3,129,157,157,221,253,178,178, 50, 80, 20,133,138,138,138, 23,
+ 12, 85, 77,131,165,209,104,144,149,149, 5,103,103,103, 80, 20,101, 80, 13, 81,101, 74, 78, 88, 88, 88, 92,220,180,105,211,107,
+ 91,182,108,233,198, 48, 76,164, 70,163, 57,145,155,155, 91,210,156,125,254, 51, 52,171,126,247,137, 78,167, 91,179,101,203,150,
+117, 34,145, 40, 32, 43, 43, 43,162, 37,154, 85,230,233, 13,115,115,115,219,189,123,247, 30,218,185,115,103, 23, 46,151,123,141,
+162,168,183, 10, 11, 11,155, 51, 95,207,227, 22,174,111,140, 35,127, 66,182,111,177,102,205, 62, 87,205,109,102,124,161,124,208,
+233, 74,230,207,159,159, 85,251,153,131, 53,231,188,170,249,174, 86,171,203, 13,208,100,190,248,226,139, 6,111,226,106, 26,173,
+242,242,242, 70,155,116, 9, 67,114, 6,143,250,176,105,101, 36, 67,114, 94, 98, 17,119, 12,192,147,170, 23,105, 96, 93,147,118,
+ 9,149,115,180, 37, 18, 66, 18,107,233,214, 92,206,194,210, 58, 6, 43, 42, 42, 42, 5,192, 59,173,249,103, 3, 7, 14, 60, 7,
+192,189, 53, 53,239,220,185,147, 4,224,237,214,210,219,175, 86,199, 3, 24,242,126,150,154,247, 19,234,143, 72, 85,117,104,127,
+189, 86,179,224,223,130,186, 58,190,183,148,251, 37,218,217, 36, 33,237,133,142,239, 77,168,108,126, 19, 10,133, 84, 81, 81, 17,
+ 52, 26, 13,138,139,139,159,155,171,154, 38, 75,167,211,129,162, 40, 20, 23, 23,195,216,216, 24, 90,173,182, 73,119,138, 85, 38,
+ 37,172, 87,175, 94,135, 35, 34, 34, 90,101, 26,141, 63, 67, 83,165, 82,101,168, 84,170,113,189,122,245,226,182,150,102, 94, 94,
+ 94, 58,128,110,237,218,181, 19, 52, 33, 10, 86,111, 36,171,185,235, 13,224,251, 63, 33,203,255,244,119, 43, 88,147,146,146, 60,
+ 90, 91, 51, 37, 37,229, 97,171,167,243,250,143,179,254, 9, 21, 85,117,212,200,206,206,110,111,114,114,178, 35, 69, 81,201,181,
+ 35, 73, 13,173,107, 72, 19, 0,156,157,157,143,166,164,164,216, 10,133,194,116, 67,150,179,176,252, 29,240,102, 53, 89, 77, 86,
+147,213,100, 53, 89, 77, 86,147,213,108, 38,239,255, 83, 13,208,191,104,218, 56, 22, 22, 22, 22, 22, 22, 22,150,191, 7, 84, 3,
+ 46,180, 41,163, 3,154,227,100,239,177,154,172, 38,171,201,106,178,154,172, 38,171,249,159,211,108, 76,187,230,239,223, 71,229,
+ 76,238, 44,173,112, 98, 88, 77, 86,147,213,100, 53, 89, 77, 86,147,213,252,239,105,214, 5,219, 68,200,194,194,194,194,194,194,
+194,194, 82, 9,151, 61, 4, 44,134, 96,103,103,183,186,115,231,206, 31,222,188,121,115,125, 74, 74,202,242,102,106,216, 90, 88,
+ 88,172, 2,208,141, 16, 34,228,112, 56, 15,115,114,114, 66, 82, 83, 83, 47, 53, 55, 93, 10,133,194, 65, 46,151,175, 2,208,133,
+ 97, 24, 62,143,199,187,159,153,153,185, 50, 61, 61,253, 90,115, 53, 45, 45, 45,141, 20, 10, 69, 0, 33,196,138, 16, 66,243,120,
+188,252,180,180,180,152,236,236,236, 44, 54, 39,176,176,176,176,176,180,216, 96, 45,253, 24, 10,104,192, 93,250, 3, 82,170, 22,
+201, 80, 57,233,154, 59,128, 71,168,124,188, 64, 75, 31, 25,240, 79,209,252,187, 67,155,154,154,190, 42,145, 72, 62, 41, 41, 41,
+241,147,201,100,247,117, 58,221,102,165, 82,121, 28, 64,139, 30,113, 34,151,203,173, 70,140, 24, 49,111,211,166, 77,152, 60,121,
+242,162, 19, 39, 78,108,104,234,188, 77,238,238,238,195,164, 82,233,182, 21, 43, 86,202,131,130,130, 40,145, 72,132,248,248,120,
+187,133, 11, 23,248, 91, 90, 90, 30,138,142,142,254,168,169,233,242,244,244,124, 75, 42,149,110, 14, 9, 9,145, 7, 4, 4, 80,
+ 92, 46, 23,119,239,222,181, 95,182,108, 89,144, 92, 46,223, 27, 19, 19, 51,187,169,154, 94, 94, 94,206,198,198,198,221, 86,174,
+ 92, 41, 10, 10, 10,130, 80, 40,196,195,135, 15,141, 22, 44, 88, 32, 87, 42,149, 79,162,163,163,175, 55, 69,207,255,253,219, 60,
+190, 68,195, 5, 0, 77, 25, 95, 23,245, 67, 39,173,161,203,216,226,137,133,133,133,229, 95,104,176,150, 77,195,114, 74,135, 5,
+160, 65,125, 50, 6, 7,183, 28,164,111,244,237,219,183,195,187,239,190, 75, 85, 61, 58,194, 35, 44, 44,236,141,227,199,143,199,
+ 50, 12,115, 29, 64, 12, 0,141,129,255,203, 7,224, 75,211,116,231,191,185,230,223, 30, 99, 99, 99, 23,185, 92, 62,187,168,168,
+104, 80, 64, 64, 64,209,180,105,211, 18,175, 93,187,150, 16, 24, 24, 88,190,115,231,206, 16,173, 86,251,173,169,169,233,239,197,
+197,197,235,154, 59, 47, 22,143,199,115,167, 40, 10,105,105,105,224,241,120, 60,129, 64,224, 1,192, 96,163, 97,111,111,175,144,
+ 74,165,223, 31, 60,250,155, 85, 81, 5,141, 39,217, 12,128, 50,232,105, 75,172, 88,187,197, 98,221,170, 69, 99, 75, 75, 75, 47,
+ 63,121,242,228,128,161,154, 10,133,194, 65, 42,149,110, 62,127,254,188,149, 80, 40, 4,195, 48, 40, 46, 46,134,149,149, 21, 86,
+175, 94,109,190, 98,197,138,119, 11, 11, 11, 47, 38, 38, 38, 30, 51, 84,211,210,210,210,200,216,216,184, 91,120,120,184, 72, 32,
+ 16, 80, 90,173,150,170,168,168,128,141,141, 13,249,250,235,175,133, 11, 23, 46,116, 43, 40, 40,200, 72, 76, 76, 76, 54,200, 92,
+109,187,205, 43,250, 45,188, 43, 73, 81, 45, 2, 0, 74, 36, 94,217,107,105,226,141,180,187,135,131, 26, 91,230,191,237,246,213,
+168,169,172,201, 98,249,107, 81, 40, 20,221,157,157,157,143, 38, 39, 39, 71,114, 56,156,209, 73, 73, 73, 21,173, 32,107, 15,192,
+ 25,128, 25, 42, 7, 86,229, 1, 72, 4,158,223,184, 55, 25,139,118,189,135, 66, 40,121, 7,132,248,210, 0, 64,211, 49,140,166,
+116,119,110,220,133, 99, 45,210, 20, 25, 77, 6,195,248,210, 32, 12,104,206, 29,162, 43,221,158, 19,123,225, 20,155, 51, 88, 90,
+205, 96, 45,125, 23,102, 20, 48,119,254,180,247,105, 46,135, 67,133,108,251, 97,204,205,200, 99, 68,225,232,251,252,145, 27,193,
+193,193, 8, 14, 14,166,214,174, 93,235,126,254,252,121,247,125,251,246,105, 35, 35, 35,111, 3,216, 83,223,159,133, 76, 23, 39,
+235,180, 42, 7,208,226,242, 54, 93,190,221,215,173, 91, 48, 35, 20, 10,209, 18, 77, 0,248,240, 77,238,239, 21,148, 3,213,123,
+200,226,164,214,210,252,135,152,171, 8,169, 84,218,126, 55,110,175,251, 0, 0, 32, 0, 73, 68, 65, 84,234,212,169, 79, 62,248,
+224,131,139, 70, 70, 70, 4, 0,178,178,178,140, 94,123,237,181,252, 17, 35, 70,228,150,149,149,225,187,239,190,115,216,188,121,
+243,239, 82,169, 52,173,184,184, 56,168, 41,249, 67,161, 80,172,233,215,175,223,172,113,227,198, 65, 42,149, 98,210,164, 73,168,
+168,168,136, 60,127,254,252, 90,165, 82,185, 8, 64,163,207,206, 48, 51, 51, 91,178,108,217, 50,171, 18, 53, 7,139, 66,227,145,
+ 87, 82,233, 27, 36, 2, 26, 31,189, 34,196,132, 9, 19, 77,162,163,163,215, 2, 48,216, 96,201,229,242, 85, 33, 33, 33,242,234,
+115, 93, 82, 82,130,146,146, 18, 20, 23, 23,163,164,164, 4,227,198,141,147, 61,121,242,100, 35, 42,103,119, 54,180,114, 9, 88,
+185,114,165, 72, 32, 16,224,216,177, 99, 29,203,203,203,185, 90,173, 22,132, 16, 93,135, 14, 29, 98, 38, 78,156,200,143,139,139,
+235, 10,192, 32,131,165,200, 0,175, 80,165,250,102,235,151,159,201, 1,224,227,185, 95,125, 3,168, 58, 19, 3,150, 41, 50, 16,
+ 24, 5,176, 6,171, 97, 56, 0, 94,231,241,120, 35,219,183,111, 31,240,228,201,147,104,157, 78,247,127, 0,254, 15, 45, 63,118,
+175,216,218,218,174, 74, 79, 79,223, 10,224,199,255,202, 1,109,215,174,221,207,251,246,237,179, 56,121,242,228,176, 21, 43, 86,
+140, 2,176,183, 5,114, 60, 0, 93,171, 76,213,163, 42, 99,133, 42,163,213, 1, 64, 59, 0, 87,154,114,195,107,225,218,205, 24,
+ 92, 89, 88,215,238,189,122,188,245,198, 8,169,220,220, 4,165, 21,122,196, 37,102, 56,158, 57,249,115,175,199,124,113,164, 78,
+ 83, 56, 38, 55, 46,178,164,169,154,125,250,246,239,209,247,149,126, 82, 19, 19, 83,228, 22,107,241, 52, 49,213, 41,226,247, 95,
+130,105,174,248, 34, 40,237,219, 89,247,126, 47, 99, 47, 57,150,166, 96, 80, 39,119,138,162, 96,100,108, 84,231, 58, 19, 19, 19,
+244,238,221, 27, 33, 33, 33, 60, 0, 93,106,173,126, 97,168,166, 94,175, 86, 44,250,104, 58, 4, 92, 34,124,109,208, 0, 74, 38,
+147,181, 88, 19, 0,172,205,117,253, 58,187,169,122,101,198,204, 24, 31, 19,177,202, 91, 93, 94,240,135, 39,157, 74, 36, 18,184,
+184,184, 96,225,194,133, 6,105,182, 2,127,186, 38, 33,196,214,195,195,163,120,195,134, 13,110,139, 23, 47, 54, 43, 47, 47, 55,
+ 2, 96,239,225,215,221,150,166,105, 7,181, 90, 45, 93,186,116,169,229,151, 95,126,233, 38,151,203, 11, 8, 33,242,166,164, 83,
+161, 80,108, 8, 9, 9,153,189,123,247,110, 42, 48, 48, 16, 82,169, 20, 93,187,118, 69,104,104, 40,189,100,201,146,121, 10,133,
+ 98,141,129,251, 30, 28, 20, 20, 68, 49, 0,242, 75,116, 8, 95,221, 9, 87,190, 10, 68,153,154, 65, 97,113, 9, 84, 42, 21, 68,
+ 34,145,216,194,194,194,184, 9,199,179, 75, 64, 64, 0, 5,224,185,169, 42, 46,174,124,149,148,148, 66,173,214,128,166,105,153,
+147,147,147,176, 9,199,211, 42, 40,168,210,127,150,151,151,115,135, 13, 27,134, 33, 67,134,160,184,184,152, 91, 84, 84, 4,181,
+ 90, 13,154,166,249, 85, 21,123,163,154,106, 9,143, 98, 8, 99,109, 36, 17, 91, 26, 73,196,150, 12, 97,172, 1,192,144,101,106,
+ 9,143,122,201,249, 83, 78,211,244,174,118,237,218, 61,164,105,122, 47, 0,155, 22,106, 6, 2, 8, 17,139,197,103,221,221,221,
+ 83, 36, 18,201,121, 0,107,170, 42,224,230,104, 10, 36, 18,201,249,144,144,144, 67,209,209,209,163,206,157, 59,231,124,247,238,
+221, 55,214,174, 93, 27,102,108,108, 92,253, 96,222,102, 95,155,206,206,206, 59,175, 95,191, 30,216,173, 91,183, 29, 0,132,173,
+116,189,115, 0,248, 85, 25,142,191, 69, 25, 82, 19, 59, 59,187,246,126,126,126,150, 28, 14, 7,193,193,193, 32,132, 4,183, 80,
+179, 27,128, 12, 0, 17, 0,178,171,110,198,244, 0,114, 0, 92,170,186, 81, 9,110,146, 38, 87, 22,246,201,167,159, 15,156, 51,
+253, 61,105, 84,146, 30,219,207, 40,113,240,114, 54,210,138,133,232, 63,124,178, 73,175,193,227, 6,112,249, 38, 97, 77,213,156,
+ 55,111,193,192,247, 38,141,151,222, 75,167,113,232, 74, 14, 46, 63, 42, 66, 25,101,134,222,195,223, 55,243, 8, 26,244, 26, 5,
+254,158,191,195, 57,250, 15,104,254, 7, 34, 88, 59,145,191,108, 26,190, 12,249,238,135, 69, 52, 69, 17,123,215, 1, 15,156, 93,
+186,148, 50, 12, 3,149, 74, 5,141, 70, 3, 30,143, 7,149, 74,133,164,164, 36, 92,191,126, 29, 38, 38, 38, 77,250,227,130,194,
+ 66,216,217, 59, 67, 34,145,180,138,230,148, 55, 71,112,147,149, 74,110,100, 84,120,167, 3,155,246,117,114,104,215,255,145,111,
+239,207,239, 25,155, 56,170, 98, 98, 98,112,245,234, 85,228,231,231,163,186, 2,253, 55, 64, 81,148,118,221,186,117, 81,233,233,
+233,184,116,233,146,223,178,141, 63,181,185, 87,212,142,155, 93, 66,120,114,227, 76, 39,119,241, 99,125,126, 94, 94,194,236,217,
+179,207, 43, 20, 10,245,244,233,211,123, 25,162,107,103,103, 39,162, 40,170,211,128, 1, 3, 62,154, 56,113, 34, 18, 19, 19, 49,
+103,206, 28,117, 76, 76, 76, 65,167, 78,157,204,214,173, 91,199,127,255,253,247, 17, 25, 25, 57, 59, 60, 60,252, 48,128,251,105,
+105,105, 13, 61, 75, 77, 32, 18,137,128,194,202, 27, 85,141,142,160,186, 91, 88, 73, 73, 9,104, 82, 0, 62,159, 79,211, 52, 45,
+ 7, 96,208,157, 39,195, 48,124,129, 64,128,210,210, 82,148,148,148, 32, 45,187, 4, 73,153,165, 40, 46,173,128, 74,165, 69, 69,
+ 57,129, 80,106, 77,107,179,179, 45, 0,164, 25,162, 73, 8,161,171,155, 27,213,106, 53, 84, 42, 21,212,106, 53,212,106,245,243,
+199,249,112, 56, 28,169,157,157,157, 44, 45, 45, 45,191,209,218, 84, 32,214,113,104,126,200,130,149,223, 44, 5, 0, 14,205, 15,
+ 49, 70, 57, 99,200, 50,142, 64,172,123,137, 89, 75, 40,151,203,195, 15, 29, 58,228,225,226,226,130,103,207,158,185,191,245,214,
+ 91,157,149, 74,165, 31,128,166,222,197, 75,104,154,254,114,226,196,137, 31,142, 29, 59,150,114,117,117, 5,151,203,133, 78,167,
+179,143,143,143,239,115,240,224,193,185, 59,119,238,220,174,215,235,103, 27,122,238, 1,208, 2,129,224,192,182,109,219,122,118,
+238,220, 25,123,247,238,197,141, 27, 55,152,192,192, 64,122,194,132, 9,112,114,114,234, 50, 97,194,132, 35, 21, 21, 21, 67, 12,
+137,176,214,129, 83,215,174, 93, 29, 56, 28, 14,186,117,235,198,143,140,140,244, 7, 16,217,210,128,179,189,189,125, 68,239,222,
+189,253,206,158, 61, 27,149,145,145,209,187, 9,251, 11,133, 66, 49,220,218,218,122,173, 84, 42, 53, 51,244, 55, 37, 37, 37,101,
+153,153,153,115,210,211,211, 15, 27,152,255,187,249,248,248, 64,167,211,193,196,196, 4, 54, 54, 54, 61, 40,138,154,109, 98, 98,
+242,122, 81, 81,209,172,180,180,180, 27, 77,216, 95,187,170, 27,248,234,231, 2,182,169,138, 90, 1,149,207,179,124, 6, 32, 1,
+128, 45, 0, 7, 24,208, 92,104,209,174,247,208,110,193,125,122, 4,119,246,166, 87, 31, 78,132,158, 97,192,133, 30, 92, 14,131,
+ 28, 61, 15, 20, 69,193,201, 45,144, 99,125,239, 86, 23,157, 70, 51, 52, 55,238,236, 49, 67, 52, 7, 14, 24, 16,220,193,205,149,
+ 94,127, 52, 25, 5,105,247,244,153,143,206,231, 80, 52,141,182,190,253, 45,157,220,252, 56,237,253, 94,225,101, 38,222,235,163,
+105,223,179, 95,126,252,197,179,172,109, 96,105,142,193, 34, 53,239,172,150,124,143,197, 22,166,104,243,224,222, 29, 58, 37, 67,
+ 93,122,231,206, 29, 88, 88, 88,192,202,202, 10, 50,153, 12,177,177,177, 56,123,246, 44, 30, 63,126, 12, 66, 8,252,252,252,154,
+244,199,153, 25, 25,200,205, 43,110, 85, 77, 71,133, 2,142, 10, 5, 55, 39,191, 0, 87,239,220,245, 56,182,189, 95,135, 76,122,
+234,110,149, 74,245,124, 27,173,246,223,215,234, 98,101,101,165,255,248,227,233,185, 83,190, 73,104, 55,166,175, 29,103,120, 87,
+ 27, 28,141, 84,114,194, 46,112,200,162,119, 59,230,196,199,199, 25,188,211,142,142,142,171,122,246,236,249, 25,151,203,229,189,
+255,126,229,244, 35, 51,102,204,168,184,123,247,174,103,106,106,106, 66, 69, 69, 69,135, 89,179,102,221, 61,114,228, 8,239,189,
+247,222,163,202,203,203,111,240,120, 60, 18, 17, 17,177, 92,169, 84, 46,173,211,104,112, 56,209, 15, 30, 60,104,163, 19,217,194,
+ 82, 74, 99,192,162,168,202, 26, 71, 72,144,147,153,134,251,241, 55, 33,151,203, 77, 44, 45, 45, 31,101,101,101, 85,100,102,102,
+126,146,144,144,176,167,161,116,242,120,188,251,119,239,222,181,183,182,182, 70, 73, 73, 9, 82,178, 74,177,235, 42,133,178, 10,
+ 49, 0, 49, 56,144, 66,106,233, 32,109, 75,202, 98,204,204,204, 52,106,181,122,222,147, 39, 79,126,108, 68, 51,255,225,195,135,
+ 70,118,118,118,224,112, 56,154,131, 7, 15,242,213,106, 53, 8, 33,186,147, 39, 79,142, 46, 40, 40,232,214,174, 93, 59,218,201,
+201,105,157,163,163,163, 74,169, 84, 78, 73, 76, 76,172,247, 65,195,167,103,180,215,244, 90,122,225,219,130,103, 41, 7, 1,192,
+174,179, 71,222,241,165,254,234, 94, 75, 75, 26, 93,118,122, 70,251,151,217, 79,240,157, 5, 11, 22,120,152,155,155, 99,218,180,
+105, 88,182,108, 25, 22, 47, 94,236, 50,109,218,180,247, 1,108,104,130,142,216,198,198,230,230,166, 77,155,220,187,119,239,142,
+147, 39, 79, 98,255,254,253, 72, 72, 72,208, 57, 59, 59,115, 59,119,238,140, 37, 75,150, 96,192,128, 1, 83,166, 79,159,222, 43,
+ 61, 61,221,223, 64,211, 49,121,201,146, 37,195,123,244,232,129, 73,147, 38, 85, 92,184,112, 97, 20,128, 51,191,255,254,123,223,
+136,136,136,195, 63,253,244,147, 56, 36, 36,100,224,172, 89,179, 62, 0,176,181, 25,251, 63,162,103,207,158, 0,128, 30, 61,122,
+ 96,237,218,181, 3, 90,104,176, 4, 22, 22, 22, 39,246,238,221,235,231,230,230,134,183,223,126,219,127,212,168, 81, 39,242,243,
+243,251, 3, 48,232,185,145, 10,133,226,203,109,219,182,181, 23,139,197, 6,255,169, 90,173, 54,159, 58,117,234,154,166, 24, 44,
+111,111,111, 92,184,112, 1,253,250,245,131,151,151, 87,251,169, 83,167,174, 27, 48, 96, 0, 62,253,244,211,203, 58,157,206, 54,
+ 51, 51,211,208, 7, 61, 59, 1,168,126,110,169, 35, 0, 23, 84, 54, 7, 2, 64,231,170,247,103, 85,102,171,131, 33, 6, 11, 34,
+163,119,134, 13, 25, 34,253,191,200, 44,232, 25, 6,238,118, 34,120, 56,202,144,152, 85,142,196,180, 92,240, 40, 13,164, 98, 33,
+124,186,189,102,150,151,153,248, 14, 12,233, 30, 32,148,188, 51, 98,216, 16,227,159,175,102,161, 32,237, 62, 73,186,121,240,188,
+182,188,116, 10, 0, 60,184,248,227,247,214,102,162,254,174,190,157, 56,101,193,195,205, 34,142,126,247, 78, 62,192, 26,172, 63,
+ 31,210,132, 40,239, 63, 47,130, 85, 77,110, 1, 84, 22, 54, 30, 72,201,136,174,252,158,155,139,220,220, 92,180,109,219, 22,155,
+ 55,111,126, 97,219,230, 62,129,254,207,208,180, 52, 51,197,176, 62,189, 56,247, 98,191,227,168, 24, 85,171,104,254,109,115, 34,
+ 33,132,162, 40, 42, 41, 71,107,154, 83,164,229,143,238,227, 64,120, 28, 26, 99,250, 56, 82, 91,143, 37,241,115, 84, 18, 83, 14,
+135, 67, 19, 66, 26,189,147,247,247,247,231,121,123,123,127,182,115,231, 78,158, 82,169,132,169,169, 41,180, 90, 45,162,163,163,
+211,149, 74,101, 2, 0,100,100,100,196,222,184,113, 35, 83,175,215,219,187,187,187, 99,234,212,169,232,208,161, 3, 53,123,246,
+236,185, 7, 14, 28, 88,142, 58, 70, 44,102,102,102,134, 44, 92,184,176,231,170,181,155, 45,198,119,166, 80, 90,166, 70, 73, 73,
+ 9, 18,227,238,131,148,168,177,126,253,215, 16,139,197, 20, 0,126,118,118, 54,127,233,210, 37, 59, 76, 77, 77,135,220,190,125,
+123,100,189, 6, 61, 51,115,229,146, 37, 75,130,214,175, 95,111, 94, 82, 82, 2, 85,121, 57,138, 85, 2, 92,255,186, 50, 66,217,
+121,214, 13,108,253,106, 29,237,237,100,100, 81, 82, 82,130,207, 62,251,108,147, 68, 34,233, 18, 19, 19,243, 97,125,154,105,105,
+105, 49, 11, 22, 44,144,111,217,178, 69,216,161, 67,135,187, 69, 69, 69,200,207,207,167,143, 28, 57,178,194,201,201,201,124,211,
+166,205,148, 68, 34, 1, 0,164,164,164,240, 23, 45, 90,120,192,216,216,248,167,123,247,238, 77,170,239,244, 68, 44,237, 93, 1,
+ 16,165,173,109,219,246,101, 87,233,165,182,182,229,151, 35,150,166,135, 2, 68, 89, 21,135, 36, 54, 54, 54,227,147,247, 10,123,
+ 84, 84, 48, 27, 51, 50,146, 30, 3, 47,247,161,178,150,150,150,211,135, 15, 31,142, 53,107,214,224,216,177, 99,179,204,205,205,
+191, 94,182,108, 25,108,109,109, 63, 78, 79, 79,223, 88, 85, 0, 26,194, 87, 27, 54,108,112,119,119,119,199,196,137, 19,213,103,
+207,158, 93, 0,224, 40,128,164, 75,151, 46, 57,238,217,179,103,232,129, 3, 7,214,108,218,180, 73,180,101,203,150,246,111,188,
+241,198, 70,134, 97,222,109, 76,212,218,218,250,211,177, 99,199, 98,221,186,117,184,112,225,194, 27, 0, 78, 86,173, 58,117,229,
+202,149,161, 33, 33, 33,231, 22, 45, 90,132, 13, 27, 54,204, 76, 77, 77,109,170,193, 50,246,240,240,248, 98,224,192,129,184,116,
+233, 18,130,131,131,209,181,107,215, 89, 87,175, 94,221,140,202,166,173,166, 66, 27, 27, 27, 31,216,189,123,119,112,155, 54,109,
+176,114,229, 74,124,246,217,103,216,185,115,103,240,219,111,191,125,160,180,180,116, 36, 12, 24,229,107,108,108,108, 44, 22,139,
+177,102,205, 26,146,156,156,220,104,244, 84,161, 80,152,125,241,197, 23,148,137, 97,205, 0, 28, 91, 91, 91, 19,107,107,235,158,
+ 54, 54, 54,216,180,105, 19,172,172,172, 48,107,214, 44, 88, 88, 88,160,180,180, 20, 35, 71,142,228, 93,187,118,109, 12,128,205,
+ 6,238,183, 5,128,234,136,151, 71,149,185, 42,174,250,126, 13, 64,143, 42,131,149, 7,192,220,160, 3, 73,136,183,153,169, 12,
+233,119, 51,193,133, 14,238,142, 82,220,138, 47,133, 70, 79, 32, 49, 50, 70,105,113, 1,124,219,203, 81, 84,102, 15,128, 49,104,
+ 18, 76, 62,135,238, 36, 16,138,145, 85, 84,136,140,135,231,114, 53,250,138,169,133,207,174,164, 0,128, 89,219,224,169,247,175,
+159,190, 53,114, 80,176, 85,118,190, 35, 8, 97,130,192,194,210,148,139,191,177, 13, 24,230,143,215,126,205,136, 80, 53, 26, 77,
+203,110,184,255, 12,205,186,248, 51, 52,255, 14, 62,203,206,140, 91,104, 36,162,117,191,223,202,210,107,117,122,252,118, 43, 67,
+ 47, 17, 82, 58, 51,161,186,136, 97, 24,131, 42,196,168,168, 40,237,165, 75,151,246,206,159, 63, 31, 27, 54,108,192,211,167, 79,
+193,227,241,224,230,230,102,109,111,111,175,168, 42,184, 29,188,188,188, 44, 57, 28, 14,226,227,227,177,127,255,126, 44, 93,186,
+148,220,190,125,123,103,125, 21,133, 82,169,140,206,204,204,220,182,122,249,130, 2, 94, 69, 58, 36,250,108,232, 11,158,130,167,
+ 47,196,244, 89,243,241, 44, 71,143,232,103,197,136,126, 86,140, 12,149, 8, 95,172, 92,207,113,113,113, 25,106,103,103, 55,160,
+190,180,166,167,167, 95, 83, 42,149,161,139, 23, 47, 46,204,201,201,121,158,127, 52, 58, 6, 26, 29, 83,187,114,194,234,213,171,
+ 77, 21, 10,197,104, 91, 91,219,222,245,105,102,103,103,103,165,167,167,199,207,159, 63, 95,147,157,157,141,162,162, 34,156, 62,
+125,250,141,182,109,219,154,207,158,191,156,122,150, 67,158,167,179,144, 49,197,186,205,219, 57,237,218,181, 27,167, 80, 40, 26,
+236, 71,100,107,107,215,222,195,163,221,161,107,215,174, 77,106,223,190,253,135,213,198,170,218, 72, 57, 59, 59, 79,187,125,251,
+246,100, 63, 63,207, 67,214,214, 54, 29, 94,114, 94,234, 51,122,244,232, 14, 12,195,224,208,161, 67,119, 1,108,248,249,231,159,
+111, 86, 84, 84, 96,204,152, 49,206, 0, 6, 26,168, 19, 56,110,220,184, 15,131,131,131, 49,115,230, 76,205,217,179,103, 59, 1,
+248, 26,149,163,199, 8,128, 36, 0,155, 35, 34, 34,124,167, 79,159, 94, 17, 20, 20,132, 73,147, 38, 77, 70,253,125,114,170,233,
+ 54,118,236, 88,119,134, 97, 16, 22, 22,118,167,134,185,170,230,252,225,195,135,175,169,213,106,140, 31, 63,190, 45,128,190, 77,
+216,119,190, 80, 40, 60,180, 98,197, 10,211,180,180, 52, 76,152, 48,161, 34, 54, 54, 22, 75,151, 46, 21,155,152,152,156, 4, 96,
+220,212,131, 41, 20, 10,127,248,238,187,239,134,251,248,248,224,131, 15, 62, 80,127,251,237,183, 51, 62,252,240, 67,117,167, 78,
+157,240,205, 55,223, 12, 23, 8, 4, 77,122, 4, 72,102,102,102, 65, 68, 68,132, 69, 99,175,140,140,140, 76, 67,244, 28, 28, 28,
+ 76,189,188,188,238, 6, 6, 6,230,116,236,216,177, 29, 0,220,191,127, 63,251,208,161, 67,196,194,194, 2,167, 79,159,198, 15,
+ 63,252,128,238,221,187, 67, 42,149,142,105, 98, 20,130,212,248, 92,215,250,218,219, 53, 12, 69,145,194, 50, 29,184, 52, 13, 30,
+135, 32, 41,179, 28, 26, 61, 1,159, 71,131,199, 1,184, 52,129,133,148, 7, 30,143, 3, 67,111, 82,104,138, 66,126,169, 22, 92,
+ 14, 5,158,128, 79,209, 58,253,243, 16, 33,205,213,139,133, 34, 33,101,101,194, 7,159, 75,129,162,192,194,210,122, 17, 44, 0,
+208,235,255, 24,248,168, 43, 10,164, 86,171, 91,148,144, 63, 67,179, 46,254, 12,205,151, 73, 81, 81, 17, 55, 34, 34,194,132,199,
+227, 25, 13,241,233,158,251,229,193, 56,203,101,251, 30, 67,192, 1, 53,180, 35,173,188, 16,126,150,202,207,207, 55,115,113,113,
+201, 55, 68, 47, 33, 33, 97, 74,104,104,232, 74,154,166,131,244,122,253,193, 13, 27, 54, 96,235,214,173,146,105,211,166,197,234,
+245,250, 52, 87, 87, 87,135,141, 27, 55, 10, 1, 32, 52, 52, 20,191,253,246,219, 8, 30,143,119, 35, 57, 57, 57,163, 33,221, 59,
+119,238, 44, 42, 40, 40,136, 76, 72, 72,216, 76, 81,148,169, 84, 42, 53,251,249,231,159, 41,101,129, 26,139, 66,159, 62, 31, 89,
+104, 36,228, 96,254,235,114,188,249,230, 91,220, 39, 79,158,124,149,150,150,246, 91,125,154,209,209,209,179, 10, 10, 10, 34,226,
+226,226, 54,240, 45,220, 44, 68,222,239, 75,251,206,175,108,126, 84,152, 11, 65, 87, 21,136,133,133,133,200,201,201,193,228,201,
+147, 77, 87,173, 90, 53, 55, 61, 61,253, 66,125,154, 49, 49, 49,215, 10, 11, 11,149,113,113,113, 93, 8, 33, 2, 19, 19,147,238,
+ 27, 54,108,160,146,242,212,152,183, 39, 30,197,229,149,233,148,138,120, 88, 62,214, 30,147, 38, 77,226, 62,123,246,236, 75,165,
+ 82,217,163,110,115,101,235,226,225,225,113,104,223,190,125, 30, 27, 55,110,204,123,242,228, 73,169, 66,161, 88, 86,115,155,196,
+196,196,138,213,171, 87,231,134,134,134,186, 77,152, 48,225, 80, 84, 84,212,168,230, 78,169,209, 82,100, 50,217,154,169, 83,167,
+226,192,129, 3,200,207,207,223, 88,149,199, 54,236,219,183, 47,108,202,148, 41, 8, 13, 13, 93,147,157,157,125,218,128, 74,113,
+208,152, 49, 99,112,234,212, 41,156, 59,119,238, 11, 0, 15,234,217, 46,238,210,165, 75,115,127,249,229,151, 77, 99,199,142,197,
+174, 93,187, 6,162,178, 3,116,125,244, 31, 48, 96, 0, 78,158, 60,137,220,220,220,111,234,218,160,160,160,224,219, 95,127,253,
+181,203,128, 1, 3,176,122,245,234,254, 0,206, 27,176,235,238, 38, 38, 38,187, 55,109,218, 20,232,227,227,131,113,227,198,149,
+107, 52,154,129,159,125,246,217,177,253,251,247, 75,247,238,221, 27,240,254,251,239, 95,207,202,202,122,175, 42, 2,211,120,229,
+ 77,211, 33,235,215,175,127,183,119,239,222,152, 53,107,150,238,183,223,126, 27, 6,224,204,233,211,167,227, 63,255,252,243, 19,
+235,215,175,231,172, 91,183,238,221, 79, 62,249, 36,155, 97,152, 5, 47,227,124, 83, 20,181,110,253,250,245, 30,158,158,158, 40,
+ 47, 47,199,211,167, 79,145,153,153,185,239,244,233,211,103,238,221,187,183, 54, 35, 35,227,136,181,181,245,148, 89,179,102,217,
+ 7, 6, 6, 6,150,150,150,154, 25,210,255,176, 70,100, 42, 11,192, 67, 84, 14, 44,170, 62,110,157, 81,217, 52, 8, 84,142, 40,
+204, 55, 48,177,119,227,158,165,181, 53, 51,150, 33,159, 17,224, 89, 90, 14,196, 70, 70,160, 9, 13,157, 42, 31, 46, 78, 86, 96,
+ 8, 80,148,147, 6,154,166,238, 26, 34,169,213, 51,183, 19, 83, 50,237, 76,141, 68,112,233, 52,216,226,206,249, 93, 63,202,218,
+118,127,159,203,161, 56, 60,129,241,182,113, 99, 39, 90,106,245, 4, 37,249, 74, 80, 28,250, 6, 88, 88, 90, 59,130, 85,187,221,
+191,118, 20, 72, 44, 22,163,162,162,105,211,165,252, 25,154,134,252,103,107,107,190, 76,180, 90,173,244,195, 15, 63,236,145,154,
+154, 42,115,115,115,139, 31, 28, 40,191,186,115, 70,219,171,157,101, 15,202, 22,190, 70, 93,117, 16,101,222, 20, 10,133,201,249,
+249,249,130,208,208, 80,127,173, 86, 43, 49, 68, 55, 35, 35, 35, 57, 61, 61,253,208,225,195,135,127, 60,126,252, 56, 58,116,232,
+128,139, 23, 47, 74,227,226,226,220,195,195,195,141, 92, 92, 92,112,228,200, 17,252,250,235,175,219,149, 74,229, 47,141,153,171,
+106,146,147,147, 79,199,196,196,180,207,205,205,109,111,106,106,170, 53, 53, 53, 69,237,145,133,165, 21,122, 20, 20, 21,195,212,
+212, 20, 18,137,196,185, 49,205,196,196,196, 99,119,238,220,105, 11,115,247, 96, 78,194,190,194,111, 63,238,128,111, 63,238,128,
+ 21,111,183,131,141,153, 0, 5, 5, 5,200,206,206, 70,118,118, 54, 8, 33,208,235,245, 30, 6,104, 38,199,196,196, 28, 72, 75,
+ 75, 59, 43,151,203, 41, 99, 99, 99, 16, 0,249, 37, 26, 92, 89, 27,136, 43,107, 3,145, 95,162, 65,113, 73, 41,236,236,236, 32,
+149, 74,235,108,142, 48, 51, 51,147, 18, 66,246,236,216,177,195, 93, 42,149,114,166, 76,153, 98,122,245,234,213, 30, 87,175, 94,
+157, 87,235,213,227,227,143, 63, 54,147, 72, 36,156, 93,187,118,185,114, 56,156,221, 78, 78, 78, 38,127,113,118,226, 0,248,104,
+202,148, 41, 1, 34,145, 8, 91,183,110, 77, 0,240, 83,213,186, 67,223,126,251,109, 44, 0,204,152, 49,195, 11,192, 44, 52, 60,
+146, 18,124, 62,191,147,135,135, 7,174, 94,189, 10, 0, 63, 55,242,223,135, 35, 35, 35,225,226,226, 2,145, 72, 20,216,200,182,
+206, 14, 14, 14,136,141,141, 5,128,232,250,188,119,108,108, 44, 28, 28, 28, 64, 81,148,179, 1,251, 62,252,213, 87, 95,189, 27,
+ 30, 30, 30,216,173, 91, 55,188,251,238,187,234,235,215,175, 15, 6,112, 49, 58, 58,186,207,248,241,227, 75, 93, 93, 93, 17, 17,
+ 17,225, 62,126,252,248, 72,154,166, 87, 26,160, 57,121,249,242,229,243, 71,140, 24,129,229,203,151,147,131, 7, 15,142, 3,112,
+166,106,221,111, 97, 97, 97, 19, 86,173, 90, 69, 70,142, 28,137,101,203,150,205, 7,240, 65, 67, 98,101,101,101,133,122,189, 30,
+101,101,101, 6,221, 33, 26,186,125,219,182,109, 7,121,122,122,226,151, 95,126,129, 64, 32,192,239,191,255, 14,154,166, 79,100,
+100,100,156,185,125,251,182, 79,122,122,250, 10,165, 82,121, 56, 62, 62, 30,193,193,193,180, 94,175, 31,105, 96,126,122, 6,192,
+167,234,115, 10, 42,251, 99,117, 3,208, 29, 64, 92, 85, 36, 19,168,124,158,221, 51, 67, 4, 25,117,201,222,115, 39, 15, 23,154,
+ 25,243, 97,105,102, 4,107, 75, 25, 56,218, 82, 64, 93,128,246, 78,214, 8,242,176,193,179, 44, 53, 34,207, 30, 42, 40, 43, 41,
+ 51,104,122, 9,189,166,116,247,185,211,191, 20,154, 27,243,209,166,189, 39,134,142,155,233,231,238,211,249,119,111,255, 30,191,
+ 45, 90, 18,210,241,213, 30, 30,212,131,148,114, 92, 59,119, 52,191,172,184,104, 55,107, 25, 88,154, 27,193,170, 43, 0,154, 53,
+107,214, 44,171,217,179,103, 67, 38,147, 33, 55, 55, 23, 90,173,246,121,180, 73, 40, 20,194,212,212, 20,185,185,185, 8, 11, 11,
+ 67,213,221, 74,253, 37, 56, 71,160, 92,249,205, 22, 7,138, 99,164, 22,138, 37,196, 92,210,114, 77, 0, 80,107,185, 89,223,133,
+ 29, 49, 31,212,179, 43,215, 81,161,248,195,250,230,104,254, 67, 12,214,239, 25, 25, 25, 1, 29, 58,116,200,112,114,114, 82,149,
+151,151,131,168, 84,197, 39,195, 54,182,115, 48,249,224, 41, 77,211, 68, 44, 22, 51,166,166,166,165, 79,159, 62,165,116, 58, 93,
+120, 83,244, 9, 33,211,166, 77,155, 70, 95,186,116,105,220,219,111,191,141, 54,109,218, 32, 58, 58, 26,161,161,161, 56,124,248,
+240, 30, 62,159, 63,163, 57,233, 78, 73, 73, 41,241,240,240,120, 33, 2, 82,123,100,161,182, 34, 27, 12,195, 24,220, 57, 63, 63,
+ 42,244, 49,199,210, 82,235,229,248,191,233, 68,242,243,243,145,157,147,131,236,236,108,228, 84,189, 19, 66, 12, 14, 97, 82, 20,
+ 85,172, 86,171,107,165,243,127,205,143,165,165,165,208, 84,100, 65,175,215,215,169,153,159,159, 95,172, 80, 40,182,108,222,188,
+121,253,138, 21, 43,172, 54,108,216,144,247,232,209,163, 34,154,166,203,107,221,196,136,218,183,111, 47, 93,183,110,157,245,230,
+205,155,243, 24,134,217,146,148,148, 84,248, 23,102,165, 17, 62, 62, 62,123, 6, 13, 26, 36,253,240,195, 15,177,121,243,102, 40,
+149,202,121, 0,170, 71, 50, 50, 57, 57, 57,159,127,243,205, 55,199,231,206,157, 11,141, 70,179,238,228,201,147,203,162,162,162,
+166,213, 48, 97, 47, 32,151,203,237,185, 92, 46,162,162,162,138, 0, 60,109,204,211, 71, 69, 69,101, 82, 20,101,173, 80, 40,218,
+ 37, 36, 36,212,187,161,185,185,121,123,169, 84,138,180,180, 52, 52, 80, 49, 39,166,167,167, 19,129, 64, 64,217,218,218,186, 84,
+109, 91, 47,102,102,102,159,239,216,177,131, 27, 30, 30,142, 37, 75,150,164, 38, 37, 37,141,175, 17, 69,139,186,125,251,118,112,
+159, 62,125,246,207,157, 59,215,237,203, 47,191,164, 98, 99, 99, 63,136,138,138, 90,212,144,166,147,147,211,180,201,147, 39, 99,
+203,150, 45,216,182,109,219, 7, 0, 14,213,218,100,255, 55,223,124, 99,102, 97, 97,177,101,234,212,169,216,189,123,247,248,103,
+207,158,125, 87,159, 94, 90, 90,218,220,209,163, 71, 47,206,203,203, 11, 49,228,132, 26,178,189, 66,161, 24, 22, 16, 16, 96, 77,
+ 8,193,230,205,155, 51,182,108,217, 82, 86, 84, 84,244,147, 82,169, 12,175, 21,137, 59,114,250,244,233, 89, 31,126,248, 33,194,
+195,195,183, 70, 68, 68, 16,165, 82,185,163,145, 36, 40, 81, 57,207,149, 71, 85, 4, 43, 5,127,236,200,238, 86,245,158,106,200,
+ 62,229,198, 93, 56,198,225,137,174,196,220,184,240,170,179, 87, 48,207,202, 76, 10, 59, 23, 75,152, 27,243, 65, 0,220, 75, 82,
+225,218,197, 51,218, 44,101,114,164, 33, 35, 8,171, 53,159,240,197,145, 18, 75,167, 87,219,122,246,224, 58,187,184,162,127,247,
+142,102, 22, 50, 30,212, 90,130,223, 99, 10,113, 53,226,148, 54, 43, 51, 37,156, 29, 65,248,215, 5, 86,255, 75, 17,174, 96, 46,
+151,251,213,231,159,127,190,237,225,195,135,219,226,226,226,182, 69, 69, 69,109, 91,185,114,229,182,165, 75,151,110, 11, 8, 8,
+216, 70,211,244, 87,168,236, 59, 81, 59, 34,230,253, 87,104,246,234, 5,238,184,129, 88,185,124, 26,183, 44,116,165,131, 54,251,
+226, 40, 66,238,127, 64,150, 79, 3,105, 65, 58, 91,202, 95,165,233,197,229,114, 79, 59, 57, 57, 93,219,187,119,239,129,168,168,
+168, 93,230,230,230,233, 43, 87,174,220, 49, 99,198,140, 48, 27, 27,155, 27, 60, 30,239, 44,128,142,205, 77,167,181,181,245, 27,
+111,191,253, 54, 57,117,234, 20,121,243,205, 55,137,173,173,237,224,150,238,123,151, 46, 93, 50,238,221,187, 71, 30,166,148,146,
+ 55, 86,197,144,238,115,110,146,238,115,110,146,129,139,110,144,239,247,159, 33, 75,150, 44, 37,222,222,222,103,155,162,233,235,
+235, 27,151,149,149, 69, 8, 33, 36, 47, 47,143,196,198,198,146, 75,151, 46,145, 35, 71,142,144,109,219,182,145,144,144, 16,166,
+ 99,199,142,123,154,162,217,181,107,215,188, 39, 79,158,144, 7,201,165,100,196,138, 59, 85,233,188, 65,134, 44,185, 77,194, 78,
+ 92, 35,203,151, 47, 39,158,158,158, 7, 27,210, 84, 40, 20, 99,230,204,153,163,204,203,203,211, 6, 6, 6, 70,212, 94,239,239,
+239,127, 52, 39, 39, 71,187,112,225,194, 76, 91, 91,219,137,127,117, 94,178,176,176,184,146,154,154, 74, 18, 18, 18,200,103,159,
+125, 70, 56, 28, 78,157,149, 39, 77,211, 91,103,206,156, 73,158, 62,125, 74,210,211,211,137, 66,161,136,110, 32,157, 67,172,172,
+172,110, 1, 24, 97, 96,122,134, 88, 89, 89,221, 0, 48,178,161,125,119,116,116,124,144,154,154, 74, 60, 61, 61,243, 26, 18,115,
+113,113, 73, 73, 77, 77, 37,174,174,174,105, 6, 28,207,215,172,173,173,111, 3, 88, 5, 64,212,192,205,232,167, 54, 54, 54, 87,
+ 0,124,100,128,230,112, 55, 55,183, 40, 0,211, 27,217,239,247,157,157,157, 99, 0,188,246, 87,159,119, 47, 47,175,171,105,105,
+105,100,251,246,237, 68,161, 80,204,109,232, 71,109,218,180,249,229,216,177, 99, 68,169, 84, 18, 63, 63,191, 40, 3,211,201, 5,
+208, 11,149,253,224,108, 80, 57,241, 40, 15,128, 53,128,222, 0,250,160,242, 9, 28, 6,151, 33, 22,174,221,140,173,189, 7, 29,
+247,124,117,122,222,164,213,225,100,238,158,120,242,197, 79, 9,100,230,230,203, 36,112,200,204, 60,219,142,175, 29,183,112,237,
+102,220, 84, 77,133,207,224, 19, 29, 7,127,154,247,206,234,115,100,193,222,167,100,233,254, 4,242,201,198, 8, 18, 52,108,102,
+174,125,199,161, 63, 91,121,247,151,188,228,114,254,191,162, 89,231, 53,242,111, 55, 90, 2, 0,175, 73,165,210,205, 75,150, 44,
+217,118,253,250,245,109, 67,134, 12,217, 38, 16, 8, 54, 87, 21, 12,130,102,156,128, 86,215, 28, 24, 4,233,228, 97,244,174, 21,
+ 31,112, 53, 71, 55,116,208, 46,159, 6,210, 10,233,252,167,100,232, 30, 60, 30,239,170,143,143, 79,184, 84, 42,205,110,211,166,
+205, 37, 30,143,119, 3, 64,207,150,166,211,218,218,218,242,221,119,223,101,158, 61,123, 70, 38, 78,156, 72, 12,104,190,106, 84,
+211,193,193,161,239,200,145, 35,181, 41, 25, 5,228, 82, 76, 10, 57,126,241, 1,217,119,252, 42,217,182,255, 12,217,248,221, 30,
+210,191,127,255, 10,107,107,107,167,166,104, 58, 58, 58, 14, 28, 54,108, 88, 65, 78, 78, 14,137,141,141, 37, 23, 47, 94,124,110,
+174,190,251,238, 59,210,177, 99,199, 92, 59, 59, 59,219,166,104, 58, 57, 57, 13, 31, 63,126,188, 86,153, 91, 74,174, 63,200, 32,
+191, 95,143, 39, 71,207,223, 33,251,143, 95, 37,123,246,255, 76,122,245,234, 85,110,105,105,105,221,152,166, 66,161, 24, 61,106,
+212,168, 39,110,110,110,223,215, 97, 6,190, 25, 53,106, 84,146,173,173,237,132,151,148,151, 6,218,217,217,197,242,249,252, 19,
+ 0, 38, 52,242,187, 49, 92, 46,247,152,141,141,205, 77, 0,175,191,132, 60, 63,196,202,202,234, 26,128, 97, 6, 24,182,107,245,
+ 24, 60,182, 82,172,204,147, 67,124,125,125, 99,108,108,108,214,163,145, 38, 95, 59, 59, 59,145, 66,161,248,202,207,207,239,170,
+141,141,205,200, 38,166,211,190,234,198,118,120,213, 43, 24,149,115, 95, 53,123,223, 45, 92,251, 13,181,243, 27,118,212,182,227,
+107, 73,182, 29,135, 36,217,251, 15, 63,106,225,218,111,104, 75, 53,237,253,135,255, 98,235, 59, 36,217,222,119,104,162,163,255,
+240,163,150, 29,250, 13, 98,205, 16,107,176,254, 42,140, 1,140,161,105,122, 43,128, 49,104,124, 84,141,247,203,208, 28,216, 11,
+118, 31,190,201, 57, 57,111, 18, 47,187, 21,211,249, 79,201,208,195,185, 92,110,100, 85, 65,214,106,233,116,113,113,217, 49,117,
+234, 84,189,163,163,227,150,214,210,244,240,240, 88, 63,116,232, 80,205, 15, 63,252, 64,126,253,245, 87,178, 99,199, 14,242,217,
+103,159,145,222,189,123, 87,184,185,185, 77,106,142,166,143,143,207,138,190,125,251,230,132,133,133,145, 3, 7, 14,144,173, 91,
+183,146,144,144, 16,198,207,207, 47,203,205,205,109, 72,115, 52,189,189,189,127, 24, 62,124,184,102,239,222,189,228,252,249,243,
+228,192,129, 3,100,209,162, 69,164, 87,175, 94,229,174,174,174,111, 24,170,217,174, 93,187,250, 12, 62,252,253,253,121,108,129,
+203,106,178,154,172, 38,107,176,254,187, 6,171, 26,238,159,112, 2,254, 41,154,255,217,139, 68,161, 80,136, 91, 91,211,214,214,
+182,163,151,151,215,185,206,157, 59,231, 7, 6, 6,102,121,123,123, 31, 81, 40, 20, 14, 45, 76,167,159,191,191,255, 33, 63, 63,
+191, 39,254,254,254,247,125,124,124,190,175,158,102,162, 5,233,236,236,227,227,115, 33, 40, 40,168, 32, 48, 48, 48,211,211,211,
+ 51,172, 86,228,138,205, 75,172, 38,171,201,106,178,154,172,193,106,178, 1,169,205,159,241, 24,143,127,138,230,127, 22,165, 82,
+169,106,109,205,244,244,244, 59,233,233,233,175,180,114, 58,163,149, 74,229, 91,173,156,206,235,233,233,233,189,217, 92,192,194,
+194,194,194, 98, 8, 52,123, 8, 88, 88, 88, 88, 88, 88, 88, 88, 90, 23, 10,245,135,249,154,242,164,236,230,132, 10,239,177,154,
+172, 38,171,201,106,178,154,172, 38,171,249,159,211,172,173, 93,187, 47,107,237,209,191, 63,128,165, 85, 78, 12,171,201,106,178,
+154,172, 38,171,201,106,178,154,255, 61,205,127, 21,108, 19, 33, 11, 11, 11, 11, 11, 11, 11, 11,107,176, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88,131,197,194,194,194,194,194,194,194,194, 26, 44, 22, 22, 22, 22, 22, 22, 22, 22, 22,214, 96,177,176,176,176,176,176,
+176,176,176,176,176,176,176,176,176,176,176,252, 87, 32,236, 33, 96, 97, 97, 97, 97, 97, 97, 97,189, 72,203, 96,155, 8, 89, 88,
+ 88, 88, 88, 88, 88, 88, 88,131,197,194,194,194,194,194,194,194,242,207, 48, 88,108,211, 32, 11, 11, 11, 11, 11, 11,203,203,228,
+ 95,233, 69,122, 85,237, 88, 47,246,252,178,176,176,176,176,176,176,176, 94,132,133,133,133,133,133,133,133,133,133,133,133,133,
+133,133,133,133,133,133,165,249,176, 79, 26,103, 53, 89, 77, 86,147,213,100, 53, 89, 77, 86,243, 63, 7, 59,138,144,133,133,133,
+133,133,133,133,133, 53, 88, 44, 44, 44, 44, 44, 44, 44, 44,172,193, 98, 97, 97, 97, 97, 97, 97, 97, 97, 13, 22, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11,107,176, 88, 88, 88, 88, 88, 88, 88, 88,254, 54, 80,168,127, 36,192,189, 38,232, 52,103, 52,193, 61, 86,147,
+213,100, 53, 89, 77, 86,147,213,100, 53,255,115,154,141,105,223, 3,203,159, 98,188, 88, 77, 86,147,213,100, 53, 89, 77, 86,147,
+213,252,239,105,254,171,224,178,135,128,133,229,159, 13, 57, 4, 14,172, 58, 56,131, 33,182,224, 10,148, 56,127,247, 41,181, 20,
+ 76,139, 53,109, 61,157,160,214, 90, 67, 44,202,198,111,119, 18, 90,170,201,194,194,194,194, 26, 44, 22, 22,150,127, 14, 10,119,
+ 55,232,177, 26, 28, 40, 64, 52,241,232,238,185, 26,120,208,178, 16,187,133,187, 27,180,204, 74,112,105,123,168, 53,143,209,179,
+195, 26, 32,246, 1,123,176, 89, 88, 88, 88, 12,227,165,116,114, 15, 8, 8,184, 29, 16, 16,176,162, 87,175, 94, 66,246, 20,176,
+176, 52, 31,114,215, 91, 2,157,126,144, 90,203,216,157,142, 44,176, 42, 43,215,187,129,175, 27, 76,174,184, 26,183, 72,147, 71,
+189, 90,174,101, 28,127,252,189,204,186,180, 92,231, 1, 26, 45,210,172,198,203,203,203, 52, 48, 48,240,180,175,175,175, 37,123,
+246, 88, 88, 88, 88,131,213,202, 48, 12,227,111,101,101, 53, 75,165, 82, 37,117,234,212,105,216,127,233,128,119,238,220, 57,178,
+ 75,151, 46,153, 93,187,118,205,236,218,181,107, 84, 99,203,255,141, 40, 20, 10, 55,111,111,239, 36, 79, 79,207,199, 53,151,203,
+ 59,190,222,205, 61,120,194, 18, 11,207,225,189,216, 75,211, 64, 74, 25,107,208,156, 62, 15, 18,203, 36, 25, 5, 90,235,219,177,
+101, 82, 16, 78,111,104,160,104,145, 38, 67,250,198,196,171,140,174, 62,149, 91, 95,186, 87, 33, 3,161,251,128, 80, 54, 45, 77,
+174, 64, 32,248,128, 16,210,159,199,227,205,100, 79,222,127, 30,111, 0,195, 0, 4,182,162,230,151, 29, 58,116, 72, 3,240, 9,
+123,120, 89,254, 49, 6,235, 77,103,116, 31,219, 22, 17,163,156, 81, 60,186, 45, 74,198,183,197,229, 55,218,161,217, 21,225,145,
+ 35, 71,196,161,161,161, 86,158,158,158, 97, 65, 65, 65,151, 59,117,234,228,218, 28,157,128,128,128,211, 1, 1, 1,111,213, 94,
+214,169, 83,167,209, 53,151, 5, 6, 6,222, 15, 12, 12, 44, 12, 8, 8,120,106,136,174,191,191,255, 19,127,127,255,210,128,128,
+128, 39, 53,151,119,234,212,105,116, 96, 96,224,233, 90,255,247, 86,237,101,245, 30,112,154,182, 63,118,236,152,213,137, 19, 39,
+172,184, 92,174,117,237,229,199,143, 31,127, 97,121, 51,142,199,148,128,128,128,200, 90,251,242, 94,237,234,112, 30, 91, 0, 0,
+ 32, 0, 73, 68, 65, 84,101, 13,209,169, 83,167, 72,127,127,255,247,106,233, 70, 6, 4, 4, 76,105, 13,115,213,179,103,207,203,
+209,209,209,142, 82,169,212,180,230, 58, 27, 11,211, 1,145,199,191,153, 53,233,173, 87, 63,144,123,140,240, 97, 47,207,134, 33,
+ 15, 61,248,208, 49, 61, 25,134,200, 31, 60, 45,151, 15,126,237, 77,110,204, 19,149, 92,171,211,155,131,226,244, 38, 23,156,132,
+205,210,212,106,131, 25, 66,172,207,197,240,229,189,135,126,204, 9,191,203,149,107,245,122, 11,104,209,171, 57,154, 53,242, 33,
+143,195,225,204,154, 58,117, 42, 77, 81,212,199,237,218,181, 19,252,151,206, 87,144, 55,236,250,118,226,220,240,247, 64,247, 86,
+148,245,146, 72, 36,183, 0,184,253,195, 14,135, 63, 0, 9,128, 95, 1, 88,163,117,186,171,108, 88,190,124,249,231,247,238,221,
+179,109,219,182,237, 50, 0, 28,182,148, 96,249,219, 27,172,209,206, 88,106,109, 99,119,102,225,134,125, 61,119, 68, 36, 24,127,
+123, 44,202,104,214,220,144,238, 54,102,242,147,227,219, 97, 77, 3, 63,189,215,192,157, 44,158, 62,125,138,205,155, 55,139,150,
+ 46, 93,218,205,196,196,228, 78, 80, 80,208, 70, 15, 15, 15,163, 70,146,243,130, 38, 33,164, 59,143,199,219, 17, 20, 20,180,187,
+186,192,166, 40,170,187, 80, 40,252, 33, 40, 40,232,199,234,102,200, 78,157, 58,181,189,113,227,134,140,162, 40,107, 67,210, 25,
+ 20, 20,164,184,125,251,182, 4,168,140, 4,244,234,213, 75, 24, 24, 24, 24,106,103,103,183, 13,168, 44, 32,219,181,107, 39, 8,
+ 10, 10,218,237,224,224,176,157,162,168,238,134,236, 59, 77,211, 48, 53, 53,197,190,125,251,192,225,252,239,250,167, 40, 10,166,
+166,166,248,233,167,159, 64, 81, 84,147,143,167,135,135,135, 81, 64, 64,192, 17,133, 66,177,145, 97,152,174, 0,224,237,237, 45,
+ 9, 12, 12, 60,108,103,103,183,169,122,153, 33,154,132,144,174,124, 62,127, 99, 96, 96,224, 97,111,111,111, 9, 0, 48, 12,211,
+149,203,229,110, 8, 8, 8, 56,210,148,115,228,231,231, 55,213,199,199, 39,221,199,199, 39,221,205,205,109,149,181,181,245,133,
+ 45, 91,182, 88,212,220,247,234,200, 85,102, 86,110,126,228,205,251,177,179,166,190,217,219,209,193,122,188, 73,199,225, 38,134,
+236,123, 11,248,103,107,230, 82, 86,160, 72,191,216, 36,149,168,141, 75,128,145,149,251,155,144,155,114,133, 87, 31,150, 74,193,
+193, 43,224, 73,228,205,211,228,190,114, 63, 65, 37, 54,107, 59, 72, 18,216,165, 39, 40, 35, 87,225,133,232, 82, 25,184,116,243,
+ 52,107,220,167,117,237,218, 85,208,175, 95, 63,216,218,218,114, 76, 76, 76,198,255,235,207, 81, 13,115, 37, 21, 9,174,175, 95,
+254,105,128,173,133,228, 23, 3, 77, 86, 99,233,244,178,178,178, 10,255,230,155,111, 58, 73,165,210,139, 6,154,172,191,195,241,
+244, 7,192, 7,112,173,234,251, 3, 0,193, 45,212,220,176,116,233,210,153,243,231,207, 71,113,113, 49, 38, 77,154, 36, 3,176,
+222, 80, 77, 99, 99, 99, 23, 31, 31,159, 31, 61, 61, 61,147,125,125,125,213,238,238,238,229,110,110,110,137, 94, 94, 94,123,132,
+ 66,161,243,191, 61,127,254,141, 52,235,191,249, 35, 68, 64, 8,233, 67, 8,121,141, 16,242, 10, 33, 36,168,234,115, 96,213,235,
+ 53, 66, 72,191, 90,239,129, 85,191,173, 94,223,185, 30,141,215,106,255,174,198,111,106,127,127,225,179, 33, 6,139,212,122,127,
+206, 91,109,209,205,194,198,238,243, 47,143,222, 20, 51,113, 49,184,253,110, 95,196,126, 50, 2,226, 39, 49,152, 55,125,158, 88,
+ 42, 53,155,254,102, 91,244,105,206, 1,123,252,248, 49,194,194,194, 96,105,105, 73,237,220,185, 83,248,214, 91,111,125, 32,147,
+201, 82, 2, 2, 2,198, 27,170,193,225,112,244,187,119,239, 54, 30, 62,124,248, 24,115,115,243,251,254,254,254,109,105,154,214,
+239,221,187,215,120,244,232,209,111,169,213,234,135,157, 58,117,114,141,138,138,210,223,188,121, 19, 52,109, 88,208,238,246,237,
+219,186, 83,167, 78, 85, 71,116, 92, 9, 33, 15,215,172, 89, 51,230,231,159,127,150,154,152,152, 48,254,254,254,109, 29, 28, 28,
+238,127,249,229,151,227, 15, 31, 62, 44,149,201,100, 6,141,176,162, 40, 10,229,229,229, 16,137, 68, 47, 24, 41,138,162,160, 82,
+169, 32, 20, 10, 13, 78, 99,141,200,128,151,133,133,197,163,213,171, 87, 15, 63,122,244,168, 88, 42,149, 34, 32, 32,192,195,212,
+212, 52,118,237,218,181, 35,126,249,229, 23,177, 84, 42, 53, 88,143,207,231,227,167,159,126,146,140, 27, 55,110,152, 80, 40,124,
+ 20, 16, 16,224,193,231,243,177,127,255,126,201,248,241,227,135, 72, 36,146,135,254,254,254, 94,134,104,105,181,218,197, 55,111,
+222, 84, 92,184,112, 65,225,228,228, 52,227,219,111,191,181,230,241,120, 0, 0,189, 94,255, 66,228,106,252,200,254,157,103, 46,
+254, 38, 92, 85, 94,161, 94, 57,111,114,111,158, 30, 93,216,123,160,122, 10,155, 67,224,128,209,251, 3,104, 31,245, 88,101,233,
+219,115, 60, 23, 89,191, 34,200,195,152, 27, 17, 85, 98, 69, 8,113,130,142, 4,145, 11,189,184, 77,210,228, 16, 95, 80,140,235,
+153,104,202,178, 91,191,241,220,164,164, 36, 56,123,244,230, 28,191, 9,107, 66,136, 51, 24, 4, 52, 69,179, 38, 60, 30,111,201,
+168, 81,163,140, 18, 19, 19,209,173, 91, 55,137, 64, 32, 88,220, 26, 81, 60,114,205,205,137, 68,184,246, 38, 87, 92, 21,205, 77,
+219,159, 29,185,146,137, 4,215,246,255,120,192,214, 39,120, 10,181,237, 83, 39,115,185,148,247, 75, 11, 35, 89, 94, 86, 86, 86,
+231,175, 95,191,110,241,234,171,175, 98,233,210,165,114,153, 76,102,168,201,122,217,145,171,106,115, 37, 70,101,243, 96, 26, 0,
+251, 22,104,110, 90,186,116,233,204, 5, 11, 22,224,218,181,107, 88,187,118, 45, 6, 13, 26, 4, 51, 51,179, 70,203,143,183,223,
+126, 91,210,173, 91,183,219,195,134, 13,139,153, 57,115,230,248,227,199,143, 59,236,222,189,155,255,206, 59,239, 8, 71,141, 26,
+229,244,233,167,159, 78, 28, 60,120,240,189,160,160,160,235,111,190,249,166,168,153,198,128, 34,132, 80,108,169,101,216,225,170,
+207,139, 0,232, 56,127,254,252, 32,138,162,142,207,159, 63, 63, 0,128, 37, 69, 81,199, 1,200, 1,200,171, 62, 11,106,189,203,
+ 9, 33,253,106,172,183,168, 75,163,250, 85,243,119,213,191,169,227, 63,106,127, 54, 40,130,213, 11,192,197,218, 27,112, 9,150,
+ 79,157,181, 66,244,108,207,215, 80,254,184, 1,116, 78, 26, 56, 5, 25,168,184,248, 43,180,151,142, 97, 66,215,174, 98, 49, 69,
+173,108,206,145,148, 74,165,224,243,249,136,139,139,195,195,135, 15, 49,120,240, 96,254,230,205,155, 77,189,188,188,126,232,214,
+173, 91, 76, 64, 64, 64, 71, 67, 12,139,139,139, 11,198,140, 25, 35,248,228,147, 79,218,137, 68,162, 40, 66, 8,207,217,217, 25,
+163, 71,143,230,207,157, 59,183,141, 72, 36,186,201, 48, 12, 95, 34,145, 52, 20, 29,250,131,174, 88, 44, 6, 0,158,171,171,235,
+173,176,176, 48,231,238,221,187,115,207,156, 57,131,162,162, 34,174,155,155, 91,204,254,253,251,219,119,235,214,141,123,249,242,
+101,148,150,150, 18, 67,117, 75, 75, 75, 33, 22,139,255, 96,176, 74, 75, 75,255, 96,188, 26, 35, 32, 32, 96, 74,251,246,237,111,
+134,133,133,217, 7, 7, 7,115,194,195,195, 81, 92, 92, 12, 39, 39,167, 91, 97, 97, 97,246,221,187,119,231, 68, 70, 70,162,184,
+184,216, 96, 77,129, 64, 0,103,103,103,140, 26, 53,138, 55,103,206, 28,123, 30,143,119, 83, 32, 16,192,201,201, 9,163, 70,141,
+226,207,158, 61,219, 94, 32, 16, 92, 55,176,201,144, 3, 0, 58,157, 14,111,189,245,150,145, 88, 44, 70, 74, 74, 10, 24,134, 1,
+195, 84,122, 82,101,118,238,221, 43, 55,239, 61,154, 53,237,173, 94,165, 21, 21, 21,191, 93,184,245,208,211,213,201,158,162, 72,
+ 27,182,188,169, 7, 51, 79, 11,112,208, 63, 41, 93, 45, 20, 24,217, 75,141, 45, 59, 0,121, 23,209,214, 86, 8, 16, 74,116,243,
+ 81,153, 17,104,210, 31,200,177,104,146,166,158,233,159,144,166, 22,106,196,222,198,182,118,142,200,205,205,133,131,179, 59, 42,
+ 32, 23, 68,222, 43, 53, 6,105,162,102, 21,190,190,190,193, 14, 14, 14, 54,109,218,180, 65, 78, 78, 14, 92, 92, 92, 96,108,108,
+108,230,239,239,223,191,217, 37,241, 5, 39, 33, 10,209, 29, 26,106, 61, 40,122, 25, 8,119, 53,184,217,254,228,182, 63,239,111,
+103,174,126, 58, 96,103,161,112, 7,238,189, 11,107,115, 1,118,206,247, 53,151, 75,133,205, 53, 89, 94,214,214,214,231,175, 95,
+191,110, 41, 18,137,112,251,246,109,120,122,122,226,235,175,191,150,155,153,153,253,157, 77, 86, 77,115,101, 14, 64, 5,128, 1,
+ 48,182,153,209, 16, 10,192,214, 21, 43, 86,204, 88,176, 96, 1,174, 94,189, 10, 59, 59, 59,100,101,101, 33, 56, 56, 56, 41, 63,
+ 63,191,193,122,201,211,211,211, 62, 46, 46, 46,237,211, 79, 63,245, 15, 13, 13, 21, 27, 25, 25,161,160,160, 0,219,183,111,199,
+252,249,243, 65, 81, 20, 8, 33,216,181,107,151,100,242,228,201, 65,241,241,241,105, 78, 78, 78, 6,117,223,168, 50, 85, 2, 66,
+136, 4,128, 17, 0, 9, 33, 68, 52,125,250,116, 1, 0, 97,149,185, 20, 1,224,177,133,217, 31,168,211,139, 0,176, 92,179,102,
+ 77, 8, 33,100,200,154, 53,107, 66,106,212,157,199, 27,168,111,107,154, 38, 0, 64,109, 13, 66,200,144,154,239, 53,127, 75, 8,
+ 25, 66, 8, 25, 82,243,247, 13,253, 95, 67, 6,235, 66,213,142,213,182,147, 29,109,218,118, 64,193,239,135, 32,230, 80, 47,188,
+232,132,187,112, 16,113,161, 37,196,171, 57, 71,209,216,216,248,249,139,166,105, 40,149, 74,112, 56, 28, 44, 94,188, 88, 52,125,
+250,116, 31, 62,159,127, 53, 56, 56,120,117, 99,134, 5, 0,110,220,184, 1, 23, 23, 23,106,193,130, 5,178, 94,189, 42,239, 98,
+239,220,185,131,246,237,219, 83,171, 86,173,146, 14, 29, 58,148,146, 72, 36, 6, 71,135,104,154,134, 88, 44, 70,239,222,189,169,
+221,187,119, 27, 11,133, 66,156, 56,113, 2, 57, 57, 57,120,245,213, 87,185,187,119,239, 54, 22,137, 68,136,136,136, 64, 97, 97,
+161,193,186, 20, 69,161,162,162,162, 78,131, 85, 87,100,171, 33,186,118,237,186,211,198,198,102, 99,104,104,168, 80, 44, 22, 35,
+ 60, 60, 28,133,133,133, 24, 51,102,140,238,167,159,126, 18,201,100, 50, 68, 70, 70,162,176,176,176, 89,185,252,198,141, 27,104,
+223,190, 61,181,112,225, 66,113,215,174, 93,181, 0, 16, 29, 29, 13, 87, 87, 87,106,225,194,133, 98,153, 76,182,161,123,247,238,
+ 59, 27,210, 96, 24, 6, 74,165, 18,247,238,221, 67, 66, 66, 2,114,114,114,144,157,157,141,226,226, 98,232,116, 58, 0,128,164,
+184,232,196,214,221,199, 98,140,196, 98, 73,103, 31, 87,199,235, 81, 15,178,140,196, 98,137,171,179,163, 27,176,148,125,156,211,
+ 31,175, 73, 10, 60,181, 43, 8,229,127,237, 65,137,121,240,128,177,124,100,159, 2,136, 22,160,184,232,211,217,158,251,203,229,
+ 82,107, 48,232, 8, 62,220, 9, 1,101,144, 38, 87,227, 2, 80, 1,103,110,235, 44,122, 12,248,128,159,154,154, 10, 62,159, 15,
+161, 80, 8,191,238,111,112,247,135,107,109, 0,248,130,135, 14,134,104,214, 68, 40, 20,126, 49,121,242,100,163,180,180,180,231,
+154,131, 6, 13, 50,146, 72, 36, 75,154,109,174,104, 73, 87,232,200,204,251, 9, 42,167, 85,123,148,238, 79, 83, 84,238, 32,152,
+ 13,173,214,175,165, 38,203,209,209,177,183,171,171,107, 66,155, 54,109,122,180,208, 92, 93, 13,251,233,128,157,185, 77,165,185,
+130,190, 12,224,136, 97, 99,101,134,157, 75,122,155,203,101,226,166,154, 44, 47,107,107,235,115,215,174, 93,179, 20,137, 68,184,
+117,235, 22, 4, 2, 1, 68, 34, 17,124,124,124,176,109,219, 54,185,185,185,249,223,197,100,153, 1, 24, 0,224, 77, 0,111,212,
+ 48, 87,206, 0,250, 2,232, 15,192, 6, 64, 4,128, 24, 3, 53,123,112, 56,156, 19, 29, 59,118, 76,231,114,185, 15, 66, 66, 66,
+ 62,154, 59,119, 46, 54,109,218,132,222,189,123, 63,157, 55,111, 30, 98, 99, 99,117,101,101,101,195, 0, 52, 88, 17,150,148,148,
+252,186,112,225, 66,147,215, 95,127,189,250, 59, 46, 95,190,140,189,123,247,194,200,200,168,166, 89,194,208,161, 67, 49,101,202,
+ 20, 51,181, 90,125,164, 33, 77, 43, 43,171, 87,194,195,195, 93, 1, 8,170, 12, 84,181,193, 50, 58,123,246,172,169, 72, 36, 50,
+ 15, 10, 10,146, 85, 45,151,188,254,250,235, 22, 92, 46,183, 7, 91,170,189, 64,157, 94,164, 62,131, 83,219, 0,213,181,174, 46,
+243,212,236,242,183,129,255,107,200, 96,245,174,202,232,127, 64,147,151, 9, 33,244,144,112, 40,136,185, 84,229, 59,135,130,152,
+ 98,192,205,207, 4,213,204,224,167,177,177, 49,164, 82,233, 31,140,150, 74,165, 66, 73, 73,137, 65, 70,163,186, 47,143,153,153,
+217,243, 74,219,216,184,114, 52,185,185,185, 57, 42, 42, 42, 64, 81, 20,140,140,140, 96,100,100,212,164, 8,150, 72, 84, 25, 17,
+142,140,140,196,149, 43, 87,192,229,114, 97,110,110, 14, 0,184,117,235, 22,238,222,189, 11,129, 64, 0, 11, 11,139, 38,233,106,
+ 52,154, 58,155, 8,213,106,117,147,154, 8,105,154, 70,121,121, 57,185,117,235, 22,238,221,187, 7,161, 80, 8,185, 92, 14,129,
+ 64,128,148,148, 20, 60,122,244, 8, 2,129, 0,114,185,188, 89,231, 71, 38,147,161,160,160, 0, 12,195, 84, 71,243, 32,147,201,
+ 80, 82, 82, 2,154,166, 13, 74, 39,195, 48, 72, 75, 75, 67, 78, 78, 14,146,147,147,145,157,157,253,220,100, 85, 55, 17,178, 52,
+145,203, 94, 38,160,120,175,102, 23,104,133,217, 37, 2, 19,235,246,253,128,156, 83, 0,197, 1,120,102,232,226,223, 22, 73, 25,
+122,163,216,100,181, 8, 90, 12,192,121, 55, 51,131, 52, 57,188,254, 89,133, 90, 97, 98,129, 92,230,225,221, 9, 89, 89, 89, 16,
+ 10,133, 16, 10,133, 8,232,242, 10, 18,210, 25,201,131,103, 42, 9, 8, 94, 53, 72,179, 10, 63, 63,191,118, 98,177,184,171,191,
+191, 63,149,153,153, 9,161, 80, 8,145, 72,132,174, 93,187,130,166,105, 31, 95, 95, 95,247, 38, 21,112,241,237, 4,224, 73,186,
+ 0,100,230,163,103,101,182,191, 68,170,220,134,142,120,195,124,195,193, 44,247, 71,207,202,157,161,214,205, 65,169,166, 83,115,
+ 77,150,147,147, 83, 47, 99, 99,227,227, 95,124,241,133,179, 80, 40, 60,213,166, 77,155,224,102,149,111, 66,206,247, 95,204, 28,
+107,103, 86,109,174,116,165, 0, 71, 12,112, 36,149, 38,203,218, 18, 43, 63,233,103, 46,225,243,254,207, 80, 77,177, 88,188,127,
+235,214,173,242,106,115,197,231,243, 33, 18,137,158,191,252,253,253,177,120,241, 98,185,185,185,249,190,151,156, 75,205, 81,217,
+175,234, 14,128, 35, 0,206,213, 48, 87, 46, 0,254,175, 42,106, 21, 5, 32,201, 64,205,110, 3, 7, 14, 12,127,250,244,233,224,
+152,152, 24, 69, 70, 70,134,251,236,217,179,177,113,227, 70,204,157, 59,119, 31, 33,196,237,208,161, 67,126, 55,110,220,240, 49,
+ 36, 34,150,145,145, 49,110,222,188,121, 57, 57, 57, 57, 0, 0,111,111,111, 20, 20, 20, 96,206,156, 57,152, 57,115,102,117,222,
+ 5, 0,100,101,101, 97,221,186,117,153, 25, 25, 25,147, 26,210,212,235,245, 41, 63,255,252,115, 87,181, 90,237, 88,101, 40,133,
+ 0, 36, 73, 73, 73, 38,165,165,165, 50, 14,135, 35, 53, 50, 50,146, 9,133, 66,163,201,147, 39,243, 31, 60,120,224,161,211,233,
+210,216, 66,237, 5,234,245, 34,117, 69,154,234, 91,214,220,237, 13, 53, 89, 77, 53, 88, 17, 0,122,254,193,192, 80,184,147,124,
+ 51, 2,230,158,254, 47, 70,176,184, 20, 36, 82, 25, 18,210, 82,192, 7,117,191, 25, 9,124,110,170,106,154, 44,165, 82,137,121,
+243,230,149,253,248,227,143,119,213,106,117,215, 75,151, 46,205, 55, 36,130,101,101,101,133,228,228,100,242,213, 87, 95, 21,157,
+ 58,117, 74, 87,189, 44, 37, 37,133, 44, 90,180,168,248,192,129, 3,164, 41, 77,132,213, 17,172,136,136, 8,178,100,201,146,194,
+244,244,116, 98,110,110, 14, 11, 11, 11,156, 61,123, 86, 55,127,254,252,194,248,248,120, 98,110,110, 14,115,115,243, 38, 25, 44,
+157, 78, 7,177, 88,252,130, 65,161, 40, 10, 90,173,246, 15,145,173,134,184,114,229,202,187,133,133,133,159,206,153, 51, 71,245,
+240,225, 67, 34,151,203, 33,151,203,177,103,207, 30,238,196,137, 19, 85,119,238,220,121,190,172, 57, 88, 90, 90,226,241,227,199,
+ 36, 36, 36, 68,117,238,220, 57, 30, 0,200,229,114,196,198,198,146,229,203,151,171, 10, 10, 10, 62,189,114,229,202,187,141, 20,
+ 56, 72, 72, 72, 64, 81, 81, 17,244,122, 61, 42, 42, 42,144,157,157,141,212,212,212,231, 6, 75,101, 36, 27,248,241, 59, 67,125,
+ 75, 85,170,178,235,119,227,146, 59,251,123, 90,149,170, 84,101,113,207,146, 31, 3, 75,217,217,195,255,112,241, 48, 54, 32,164,
+199,229,187, 37,166,253, 95, 27, 45,160,138,110, 0,218, 18,128,103, 6,240, 76,193, 21, 89, 96,208, 43,126,156,221,191, 21,217,
+128, 98,186, 65, 36,108,188,127, 11, 67,172,193, 48,193,103,111,149,155,245, 24, 60, 93,144,151,151, 7,154,166,159, 27, 44,137,
+145, 17, 94, 25,242, 54,189,235,183, 10, 27, 48,164, 59, 56, 28,131,251,204,240,249,252,207,223,121,231, 29,126,126,126,254, 11,
+154, 98,177, 24, 35, 70,140, 16, 74,165,210, 69, 6,239,250, 67, 15, 62, 50,133, 93,192,144,153,177,137, 42,219,159,175,168,220,
+102, 47,222, 37,246,234,216, 25,211,134, 91,137, 87,133,102,121,198,196,151, 57,131,214,207, 66,153, 58,128,108,107,154,201,106,
+211,166, 77,176,145,145,209,137,163, 71,143, 74,250,244,233,131,217,179,103, 27, 9,133,194, 83, 78, 78, 78, 61,155,122,154, 74,
+139,245, 31, 47,223, 16,154,121,231,224, 0, 64, 87, 92,101,174,254,247,202, 42,100,176,120,107,120,161, 86, 79,198, 26,170,169,
+ 82,169, 38,190,247,222,123,185, 71,142, 28,249,131,185, 18,137, 68,120,246,236, 25, 86,173, 90,149,151,151,151, 55,233, 37,231,
+ 82, 63, 0,209, 0,202,171,162, 17, 18, 84,142, 20,236, 10,224, 44, 0, 61,128, 76, 0, 74, 67, 5, 57, 28,206,220,111,191,253,
+150,171, 82,169, 48,101,202, 20,164,164,164, 32, 61, 61, 29, 11, 23, 46,124,198, 48,204,196, 42,205, 24, 0,143, 12,209,211,104,
+ 52,177,249,249,249, 67, 6, 14, 28, 88,144,159,159,143,142, 29, 59, 98,200,144, 33,176,177,177,129,173,173, 45,134, 13, 27, 6,
+ 87, 87, 87,228,230,230, 98,236,216,177,121,217,217,217, 3, 0, 52, 56, 10, 61, 55, 55, 55,254,224,193,131,241, 31,125,244, 81,
+ 96, 74, 74,138, 55, 0,133, 86,171, 53, 87,169, 84, 82,157, 78,103, 44,147,201, 44, 58,117,234, 36,159, 54,109,154,233,205,155,
+ 55, 61, 83, 83, 83, 75,154, 96, 48,255, 43,212,233, 69,154, 11, 69, 81, 39, 90, 18,169,170, 43, 2,102, 40,213, 53, 60, 85,235,
+253,127,153, 16, 88,188,247,240,222,114,129,147, 43, 76,220,125, 33, 17,137, 32, 22, 10, 32, 54, 53, 71, 57,195, 96,199,179,140,
+178, 82, 66, 22, 53, 35,241, 47, 68,174, 24,134,193,182,109,219,202, 87,174, 92, 89,144,145,145, 49,237,210,165, 75,190,183,110,
+221,186, 99,136, 17, 42, 42, 42,194,161, 67,135, 84,187,119,239,126,170, 82,169,252,249,124,190, 86,173, 86, 99,223,190,125,229,
+ 27, 55,110, 76, 44, 43, 43, 11,228,241,120,154,166, 52,191, 85,247,193,226,241,120,218,242,242,114,255,176,176,176,248, 19, 39,
+ 78,168,100, 50, 25,120, 60,158,182,172,172,204, 39, 52, 52, 52, 54, 44, 44, 76, 37,147,201,154,100,220, 24,134,169, 51,130,165,
+215,235, 33, 20, 10,155,212, 7,235,214,173, 91,219, 53, 26, 77,231,125,251,246,165,238,218,181,171, 92, 38,147, 1, 0,180, 90,
+109,224,222,189,123, 83,191,255,254,251,138,166,116,112, 7, 0,181, 90, 13,189, 94,143,208,208,208,138,253,251,247,167,234,116,
+186,192,234,101,187,118,237, 42, 15, 13, 13, 77,213,104, 52,157,111,221,186,181,189, 49, 45,189, 94,175, 47, 40, 40, 0,151,203,
+197,211,167, 79, 43,132, 66, 33, 56, 28, 14,226,226,226,158, 27, 44, 43, 75,115,207,238,129,222,238, 95,127,127, 40,194, 72, 40,
+ 20, 14,232, 29,224,241, 32, 46, 41,149, 16, 42,145, 45,107,234,170, 25, 32, 1, 5,113, 92, 74,133, 84,196,211, 82,200,248, 63,
+128,111, 86,101,176, 42, 95,182,118,246,184,249,168, 76, 10, 10, 2,168,181, 86,141,106,106,137, 17, 40, 72,238, 37, 65,202,229,
+139,169,140,140,140,231,145,166,106, 67,228,220,222, 3, 81,113, 37,198,160,136, 16,149, 67,235, 13, 46,168,140,141,141,185, 74,
+165,242,185,214,115, 77,103,103,142, 86,171, 29, 96,240,190,103,235, 21, 96,152,143, 31, 39,151,219, 30,189,162,114,157,181,120,
+151, 88,204,201, 7, 18, 55,193,203,213, 6,179, 39,249, 10, 22,238,200,246,186,249,160,172, 29, 40, 50, 13, 94, 37, 6,223, 93,
+180,105,211,166,135, 68, 34, 57,117,244,232, 81,137,145,145, 17,158, 62,125,138,142, 29, 59, 98,197,138, 21, 18,137, 68,114,210,
+209,209,177,119, 83, 78,211,245,199, 72, 42, 41,214,119,253,124, 91, 74,198,157,103,250, 74, 99, 69, 87,154,171,236, 66,130,247,
+190, 56, 86,144, 95, 84,254,198,181,123,186,243, 77,144,141, 46, 44, 44,124,245,139, 47,190,200,205,201,201,121,193, 92, 37, 37,
+ 37, 85, 27,129,222, 0,238,191,228, 92,106,132,202,206,235, 29, 0,180, 7,224, 11, 64, 7,160,184,202, 8, 53, 25, 79, 79, 79,
+127, 39, 39, 39,124,247,221,119,216,177, 99, 71,254,215, 95,127, 13, 66, 8, 92, 93, 93,101,205,213,204,202,202,186, 17, 27, 27,
+ 59,192,215,215,247,225,150, 45, 91, 82, 21,255,207,222,119,135, 71, 81,237,239,191, 51,179,189,164,145, 30, 8,129, 64, 72, 72,
+ 8, 37,244,222,164, 74, 23, 5, 20,165, 72, 85, 4, 47,136, 32,160, 72, 7,169,162, 20,165, 55,129, 0, 82,165, 72, 71, 66, 13,
+ 37, 9,164, 64,122,223,180,221,108, 47, 51,231,247, 71, 18,164,164,108,128,251,189,247,231,157,247,121,246,201,206,236,204,155,
+211,230,156,119, 62,159,207, 57,199,219,155, 27, 55,110, 28,198,142, 29, 11,119,119,119,118,221,186,117,169, 29, 59,118,140,122,
+242,228,201, 59,122,189,254,161, 61,205, 61, 47, 47,239,250,214,173, 91,111,117,239,222,221, 97,244,232,209,158, 91,182,108,241,
+122,252,248,113,109,189, 94, 95, 51, 55, 55, 87,113,229,202, 21,201,206,157, 59,189, 98, 98, 98,146,140, 70,227, 45,148, 31,208,
+253,191,138, 10,181, 8, 0, 85,169,208, 49,191,244, 87, 85,197,111,246,222, 91,238,119, 59,174,171, 16, 85,206,184, 57,152,136,
+235, 31,213, 43, 90,177,112,219,230,175, 70, 54,110, 40,171, 83, 55, 24,172,182, 8, 15,179,179,177, 51, 75,173,183, 18,242, 83,
+120, 34, 46,190,174,192, 98, 24, 6,103,206,156, 97,247,238,221,107, 33,132,252,162,209,104,230, 62,122,244, 72,103, 47, 15,199,
+113,204,152, 49, 99,180,133,133,133,135,179,178,178, 38, 62,125,250,212,220,161, 67, 7,230,195, 15, 63,212, 22, 20, 20, 28,163,
+ 40,106,220,221,187,119, 77,237,219,183, 7, 33,246,183, 99,138,162, 32, 18,137, 64, 81, 20,238,220,185,147, 20, 28, 28,220,232,
+198,141, 27, 63,199,197,197,125, 64, 8, 97, 34, 35, 35,211,194,194,194,154, 92,191,126,125,253,227,199,143, 71,112, 28,199,216,
+203, 91,102, 29,123, 94, 72,209, 52,253, 76,212, 81,213,244,185, 70, 70, 70, 70, 7, 7, 7, 7,223,186,117,107,199,248,241,227,
+123, 1,144,223,185,115,231, 81,104,104,104,195, 27, 55,110,236,248,228,147, 79,122,151,190, 65,218, 55,126, 91, 44, 24, 52,104,
+144, 94,173, 86,159, 46, 46, 46, 30, 21, 21, 21,165, 15, 11, 11, 43, 59,119,166,168,168,104, 84, 53,234,104,193,143, 63,254,248,
+109,105, 93,237, 88,179,102,205,167, 51,102,204,112,207,200,200,120, 38,176,114,243, 10, 46,180,123,119, 10,155, 95,164, 54,111,
+ 91, 51,115,168, 76, 42, 17,207, 93,182,237,146,149,121, 54,141,155,199,243, 16,179, 26, 16, 58,115,104, 55, 23,201,186,159,182,
+138, 70, 15,168, 39, 13,109,232, 87, 34,174, 68, 46,184, 29, 83,132,111,127, 56,200, 45,159,228,158, 8, 14,105, 96, 17, 91, 37,
+167, 82,160,129,209,154,251,105, 47,145,100,233, 47,211,252,219,247,251, 74, 18, 28,218,234,153, 16,122, 28,125, 7,107, 22, 79,
+225,150, 79,172,145, 8,142,202,132,205, 62, 43, 1, 0,216,108,182,161,203,150, 45, 59, 61,122,244,104, 69,163, 70,141,158,113,
+ 38, 37, 37, 97,249,242,229, 6,147,201,244,158,125,125, 6, 40, 92, 21, 52, 99, 89,214, 99,207,217,252,128, 47,191,152, 40,151,
+209, 5, 64,226,202, 18,241, 34,116, 66,179, 80, 55,124,251,133,151,112,250,210,227, 33,215,126,246,215,194, 42, 10, 6,144,105,
+ 15,191, 64, 32, 56,185,100,201, 18,185, 76, 38, 67,124,124, 60,100, 50, 25,164, 82, 41,154, 55,111,142,181,107,215,202, 63,251,
+236,179, 63, 58,119,238,172,188,124,249,178,173, 58, 34,171,117, 32,219,118,230,134, 39, 17, 43,166, 58,123, 53, 9,114, 67, 94,
+ 49,240,233,119, 39, 10, 11, 52,134,247,171, 41,174,158,137,172,162,162,162,158,211,166, 77, 59,187,125,251,118,215,224,224, 96,
+164,165,165, 97,248,240,225,249, 42,149,170,235,127,129,184, 2, 0, 29,128,154, 0,226, 80, 18,139,148,128,146,184,164,215,158,
+229, 25, 19, 19, 19,153,146,146,226, 61,118,236, 88,104, 52, 26,151, 97,195,134,225,233,211,167,136,139,139,187,247, 38, 9, 53,
+ 26,141,183,211,211,211, 27,127,249,229,151, 35,103,206,156,217,222,193,193,161, 46, 33,132,104, 52,154, 68,150,101,175, 1,216,
+ 11, 84,107, 31, 78, 2, 32,225,201,147, 39,137, 79,158, 60,241,220,177, 99,135,115,105, 25, 0, 37,129,253,234, 82,235, 29, 31,
+ 35, 81, 61, 75,212,237,255,196,189,255, 39, 24, 90, 23,237, 71,215,163, 46,127,232,143,226, 17,254,208,142,174, 79,217,179,208,
+104,185,187,109,135,133,133, 17,155,205, 70,206,158, 61, 75,250,244,233,163,235,208,161, 67,117, 22, 26,125,129,179, 75,151, 46,
+175, 44, 52,218,165, 75,151,211,173, 90,181,122, 97,161,209,206,157, 59, 71,119,238,220, 89,221,169, 83,167,167,246,164,179, 83,
+167, 78,143,219,183,111,175,235,212,169,211, 11, 3, 73,203,150, 45, 7,118,235,214,237, 5,147, 99,171, 86,173, 6,188,124,174,
+162,188,191,243,206, 59,105,113,113,113, 36, 53, 53,149,244,237,219,247, 89,199,223,189,123,247,180,251,247,239,147,184,184, 56,
+210,187,119,239,204,234,148,231,243,104,209,162,197,184,142, 29, 59, 94,127, 41,205,159,190,124,174, 50,206,142, 29, 59, 94,111,
+217,178,229,167, 47,159,171,198, 66,163, 21,166,211,219,219, 59,176, 89,179,102,185,107,214,172, 33,254,254,254,185,207,255,214,
+168,203,152,121, 69, 26,173,102,198,130,141, 7,202, 89,104,148,223,181,190,172,247,126, 20, 44, 34,127, 5,183, 39, 87,130, 79,
+ 62,222,229,247,104, 84, 79,133,233,238,222,222,132, 60,254,138,220, 56, 56,150,180, 13, 22,179,127,253,236, 27, 71,174, 52,252,
+131, 92, 13,236, 68,254, 40,119, 65,207, 87, 57,175,212,239, 72,174, 52,252, 35,102,135,223,163, 65,157,220,205,123,119,109, 38,
+ 9, 9, 9,228,216,145,189,164, 77,176,188,148, 51,248, 44,185, 18,220,213, 30,206,151,158,249,246,109,219,182,213, 30, 56,112,
+128,196,199,199,147,115,231,206,145,118,237,218,233,155, 53,107,214,213,222,188, 19, 2,138, 92, 14, 25,100,187, 24,116,109,246,
+112,101,209,167,189,164,166,225, 93,197,230,129,109, 69,150,158, 97, 34, 91,251, 96, 1,219,196,159,230,130,125, 65,122, 54,151,
+153,200,149,160,171,228, 90,112, 47,123,211,217,160, 65,131,212, 58,117,234,144,138, 62,129,129,129,170,178, 9, 52,213,173,247,
+214,129,240,123,167,165, 36,235,252, 47, 93, 73,255, 78, 14,249,109, 66, 5,221,222, 66, 91,106,230,230,230,150,183,125,251,118,
+226,233,233,169, 2,208,232,191,168,205,215, 0, 48, 16,127, 79, 99, 87, 2,232, 10,192,255, 13, 56,219,245,236,217,211, 26, 25,
+ 25, 73,158, 62,125, 74, 78,159, 62, 77,218,183,111,111, 67, 73,204,206, 63,246,121,255, 31,227,252, 71,154,227,254, 93, 8, 69,
+ 57,193,134, 97, 97, 97,164, 87,175, 94,134,203,151, 47,107,205,102,243,132,187,119,239, 30,123, 83,206,127, 71, 58,255, 29,156,
+ 93,187,118,189, 78,211,180,127,233, 20,224,204,243,231,207,135,149,138,194,235, 12,195,248,151, 90,247, 50, 47, 92,184, 16,246,
+ 79,203,251,243, 34,139,166,233, 51, 0, 76, 25, 25, 25,207,102, 59,185,135, 12,104, 91,195,197,169,107, 81,145,250, 94, 78,244,
+177, 63,254,137,121,127, 91,156,228,143,122, 98, 56,136, 91,128,197,172,168,167,250,186,115,183,230,213,235,215,179,157,112,199,
+193, 43,220,138,201, 30, 79,218,133, 40,146, 64,113,203,193,154,110, 81, 93, 82, 76,118,115,202,169, 86,128,112,214,253, 39,122,
+191, 25, 27, 10, 3,222,233,255, 41,115, 60,124, 51,247,195,100,215, 39,237, 66,148,169, 0,150,131,211, 71,216,203,249,178,200,
+146, 72, 36,127,140, 24, 49, 66,185,111,223, 62,131,209,104,236,119,239,222,189,139,213,201, 59,185, 30, 84, 27, 54,106, 49, 64,
+124,171, 46, 54, 58, 1, 54,110, 33,213, 45, 54,245,191,161,222, 91, 7,194, 79,225, 32, 57,161, 55,217,166,217,105,185,178, 39,
+157,205, 92, 92, 92,118, 23, 22, 22, 14,179,211,114,245,127,153,119,119,148,172,115, 37, 40, 29,107,162, 81, 69, 12,147, 29,156,
+ 29, 24,134,249,186, 94,189,122, 77,158, 62,125, 26,197,178,236, 15, 40,153,117,246,143, 31, 59,254, 71, 56,121,129,245,166, 21,
+208,161, 67,135,187, 44,203,158, 22,137, 68,139, 47, 95,190,108,226, 27, 31,207,201,115, 86,159,243,121,145,117, 55, 78,231,191,
+116, 79,129,223,191,134,185,164,218, 33,174, 42,231, 44, 21, 89,183, 98,245,117,150,239, 45,246,155, 62, 76,153,106,135,184,178,
+ 43,239, 97, 97, 97,237,165, 82,233, 78,131,193, 48,206, 14,113,245,170,192,122, 20, 44, 66,161,181, 38,108, 76, 40,104, 84,188,
+213, 14, 71,244, 16, 50, 81,200, 66, 14,245,254, 35, 11,223,150,120, 78,158,147, 23, 88,255,215,248,143,172,122,124,237,218,181,
+230,124,209,243,224,241,134,111, 71,125,158,154,201, 31,245,238,192, 65,188,172,121,160,108,202,225,197, 50, 61, 56, 42, 29, 20,
+183,182, 10,113, 85, 21,231, 45,200,173,203, 90, 5,202,166, 29, 89, 44,211, 3,200, 6,193,154, 42,196,149, 93,136,140,140,252,
+ 11,246,187,137, 94, 77, 95,240, 35, 11,128, 36, 66,144,140,239, 43,121, 65,252, 14,132,162,248,224, 97, 30, 60,120,252,143, 9,
+ 44, 30, 60,120,188, 69,145,245, 40,248, 54,242,153, 25, 96,225, 15,137, 45, 5, 69,182,108,170, 79,138,249, 13, 57,111, 34,159,
+154, 10, 14,129, 16,219,158,160,200,252, 70,156,111, 61,223, 37,226,169, 98, 1, 53,159,111, 27, 60,120,240,224, 5, 22, 15, 30,
+ 60,222, 68,108,148, 88,117,210, 75, 63,255,181,156, 60,120,240,224,241, 63,213, 55,163,226,153, 0,213,241,173,190,206,108,130,
+ 40,158,147,231,228, 57,121, 78,158,147,231,228, 57,255,231, 56,171,226,230, 99,187,254, 77,194,139,231,228, 57,121, 78,158,147,
+231,228, 57,121,206,255, 61,206,127, 20,248,141,116,121,240,224,193,131, 7, 15, 30, 60,222, 50,254,163, 49, 88, 50,215, 6,222,
+ 16,208, 77, 40,142, 52, 4, 0, 66, 83,143, 97,227, 30, 24,242,227,179,222,152,220, 35, 84,174, 20, 50,123,181, 86,246, 67,228,
+ 70,233,223, 82,146, 59, 0,240, 67,201,222, 81,215,248,230,195,131, 7, 15, 30, 60,120,240,168,150,192,106,208,118,208, 85,133,
+ 76, 17, 0, 0, 28, 33, 96, 57, 64, 83,152, 27,145,250,240,207,193, 0,224, 29,210,237,136, 88,225,214,150,227, 8, 56, 66, 96,
+227, 8,108, 38, 67, 66,222,163, 83,118,237, 60,175,112, 15, 28,220,237,157,238, 67,250,245,123, 55,168,113,104,227,250, 0,240,
+ 48,234,225,147, 19, 39, 78,198, 94,248,147, 58,172, 83,197, 29,121,147,140, 41,133,194,121, 45, 91,181,238,117,251,246,205, 57,
+ 90,224,155,183, 84, 94, 34,114,173,239, 46,170,195,169,238,124,211,225,193,131, 7, 15, 30, 60,120, 84, 91, 96, 41,100,138,128,
+ 11, 71,183,122, 28,185,154, 6, 0,120,167,185, 23,190, 95,181,125,208,150,135,127,198, 2, 64,219, 78,125, 2,231,126, 57, 10,
+215,163, 85, 32,132,160, 89, 64, 13, 12,250,232, 51,187,254,169,212, 51,184,229,208,161,239,125, 56, 99,198,244, 1, 9, 9, 9,
+201,251,246,237,187, 10, 0, 29, 59,117, 10, 88,178,100,201, 7, 43, 93,106, 72,246,135, 31,202, 48,230, 60,122,173,253,131, 20,
+158,245,220, 26, 6, 5,124,186,247,215, 31, 4,221,250, 14, 31,155,106,213,172,209,229, 60,205,123, 29, 46,113,173, 16,127, 39,
+161,232,123,138,166, 5, 38,109,129, 7, 0,184,248, 54, 59, 33,113,240, 96,165, 82,217, 67,157,193,176, 51,247,209,233, 45,224,
+ 55,236,228,193,131, 7, 15, 30, 60,120, 84, 37,176, 0, 64, 41, 21, 32, 54,169,196, 91,231, 44, 7,198,127,242, 30,114,114,178,
+ 3, 45, 54, 14, 35,135, 13, 70,100,108, 22,226,146, 84, 32, 4, 8,172,101,247, 94,194, 96,192,181, 24, 51,118, 76,231, 51,103,
+207,222,154, 55,119,222, 46,138, 66, 4, 0,108,254,229,215,182,223,126,247,237,184,145,159,140,236, 17, 30, 30, 30, 13,224,181,
+ 4, 22, 45,114, 94,179,124,241,247,202,140, 60,163,241,139,233, 95, 49, 51,190,156,186, 18,192, 39,175, 35,174,130,125,107, 45,
+190,122, 54, 92, 46,151,203,177,101,203, 22, 9,112, 20,243,103,140,145,190,219,175, 31, 88, 48,237,126,248,121, 95,147,179, 98,
+241, 88,189, 94, 63, 56, 63,254,207, 44,190, 73,241,224,193,131, 7, 15, 30, 60, 42, 21, 88, 44, 71,240, 56, 49,187, 68,180, 48,
+ 2,188,219,222, 9, 43, 23,125, 13,131,137,197,253, 68, 53,126,255, 43, 13, 38, 93, 17, 8, 1,218,135,122,148,103,195,121, 97,
+170,229,202, 47,100, 97,140, 88, 56, 44, 34, 78, 81,167,134,139,139, 75,252,173, 93,186,111, 63,202, 9, 22,216, 44,119, 23, 29,
+111,153,168,112, 16,183, 59, 24, 30, 30,210,191, 95, 63,177,163,163,211, 76,145,115,143, 90,156,209, 50, 93,157,114, 89, 93, 17,
+231,203, 80,120,134,116,238,255,110,223,119,189,188, 60,217, 17, 75, 34, 30,255, 52,165,121,237, 6,129, 13,187,196, 89,245,157,
+117, 57,113,151, 43,184, 45,170, 60,113, 85,223,219,115,241,229,211,225,114,163,209,136,196,196, 68,228,231,231,151,252, 72, 81,
+160,105, 6, 53,189,189,177,126,233,116,249,190, 35,141,155,207, 91,186,241, 40,128, 86,248,187, 20,254, 29,211, 76,121, 78,158,
+147,231,228, 57,121, 78,158,243,159,202,249,143, 66,217, 44,194,114,221, 91, 79,210,242, 17,155,152,133,176,134, 53, 81,191,142,
+ 23,110,197, 23, 98,239,133, 52,108, 59,155,140, 11, 15, 84,224,132, 14,200, 46,166,144,144,146,131,184,228,188, 42,125,100,140,
+ 88, 56,108,218, 10,245,140, 16,127, 77,155, 75, 7,166,192, 71, 25, 31,242,245,170,162, 41,140, 88, 56,204,195,203,121,223,140,
+169, 19, 63,114,144,203,196,102,147, 25,117,235,248, 74, 39,141, 27, 51, 90,164, 84,236,179, 55, 51,110,110,193, 10,177, 76,177,
+107,241,183,211,165,171,143,196,167,234,204, 68, 23,126, 61,243,233,140, 89,223,106, 24,161,236, 23, 55,183, 96,133, 61, 60,226,
+ 90, 33,254,126,174,174,139,175,157, 9,151, 91, 44, 38,100,102,102,194,108, 54,195,102,179, 61,187,134, 0, 40, 54,216,144,152,
+101, 64,231, 78,237,153,176,102,141, 26,186, 55,236, 51,129,111, 82, 60,120,240,224,193,131,199,107,225, 31, 21,106, 83,225, 50,
+ 13, 58,131, 46,225,227, 9, 51,114, 3, 28,178,204,131,187, 6, 3, 4, 80,101, 37, 35,230,214, 25,196,223, 61,139, 98, 85, 42,
+ 8, 1,234,212,169, 13,145, 33,209,188,121,211,134, 92,206,102, 76,168,136,111, 64, 15,239, 90, 9, 25, 10,122,197,140,218, 17,
+241,113, 89,110,147,103,108, 71,124, 92,150,219,138, 25,181, 35, 18, 50, 20,180, 92,196,182,251,100,248, 64,106, 96,191,222,248,
+250,235, 25, 24,216,175, 55,102, 76,252,128,146,138,133,109,236,205,140, 81, 44, 93, 54,107,222, 2,135,236, 34,139,249,102,156,
+198,164,148,203, 37,127, 61,214,233, 77, 68,102, 25, 48,108,188,202, 36, 18, 44,176, 71, 92,121, 59, 58, 46,190,254,231, 33, 57,
+ 33, 4,233,233,233,176, 88, 44,176, 90,173,176, 90,173,207,174, 43,210, 90,145,170, 50, 32, 37, 87,143,168,100, 13,250,244,238,
+ 45, 23, 8,197, 31,241,207, 7, 15, 30, 60,120,240,224,193,163, 66,129, 21, 31,241,123,199,200,243,187, 61,243,114,114,212, 10,
+137, 0, 2,154, 70,110,124,167, 94,155, 0, 0, 32, 0, 73, 68, 65, 84,250, 83,236, 92, 53, 21,225, 63, 77, 71, 81, 86, 2, 8,
+ 1,100, 34, 6, 38,109,190, 58,251,126,184,103,126, 37, 51, 8, 41, 88,123,252,188, 59,169,110,114, 22,113,218,123, 90, 43, 4,
+128,189,167,181,194,228, 44,226,244,243,238,164,186, 98,162, 2,199,178,232, 55,240, 61,236,218,177, 5,109,187, 13, 68,248,149,
+ 84,232, 13, 22,187,246, 63,147,120, 52,168,227,225,229,245,222,180,145,221, 29, 90, 5,186, 40, 27,248, 58, 51,140, 80,100, 19,
+ 11, 37,220,241, 59,234,140, 94,253, 6,211,114,133, 99,111,137, 71,131, 58,149,241, 56, 9, 69,223,255,117,246,144,156, 97, 24,
+164,166,166,194, 98,177,192,108, 54,195,100, 50, 61,179, 96,105,244, 86,100,228, 27,144,166,210, 35, 85,165,199,163, 84, 13,196,
+ 10, 23, 88,173, 86,126,225, 53, 30, 60,120,240,224,193,131,135,125, 11,141,102,230, 22,160,134, 3, 3,119,159,186,248,112,234,
+ 74, 0, 0,203,217, 64, 80,178, 60,131, 61, 54, 61, 2,225,185,207, 71,214, 77,172,227, 77,169, 63,234, 35, 55, 0,192, 71,125,
+228,134, 58,222,148,250,243,145,117, 19,245,172,139,133,101, 89, 92,139,206,197,138,253,143, 48,111,251, 3,156,185, 99,127,204,
+184, 64, 40,155,182,124,233, 18,185,128,161,168,232,148, 98,109, 86,129, 77, 43, 18, 9, 45, 66,177,192,170, 53, 83,134,100, 21,
+155,223,251,253,201, 73, 12, 35,156, 92,101, 90, 9, 7, 66, 8, 76, 38, 19,204,102,243,179, 79,153, 5,171, 64,107, 65,102,190,
+ 17,169, 42, 3,210, 74, 63, 57,133, 6, 16,194, 79, 36,228,193,131, 7, 15, 30, 60,120,188, 40,176,202,221,157,158, 3, 16,159,
+172,130, 68,192,161, 86,237,250,127, 95, 65, 0, 66, 0,171,141,179,235, 31, 29, 59,151,149,238, 95, 83, 71,102,174, 76,109, 27,
+218,208,245,193,164, 17,190,143, 67, 27,186, 62,152,185, 50,181,173,127, 77, 29,177,114, 98,150, 16, 2,194, 17, 16, 66, 64, 8,
+192,113,246, 11, 22,138, 98,218, 52,107,232, 39,248,126, 95, 66,202,228, 13,113,143, 41,129,192, 42, 22,139,109,158, 78, 50,170,
+150,155, 76, 80,108,130, 49, 40, 52,204, 74, 1, 97,149,241,168,173,150,239,218,247,122, 95,111,177,216,224,235,235, 11,179,217,
+252,204, 69, 88,102,193, 42,210, 90,144, 81, 96, 68,154,202,128, 84,149, 1, 6, 35,139,135,143,147, 65,209, 12, 31,244,199,131,
+ 7, 15, 30, 60,120,188, 62,202,213, 34,255, 63, 11, 44,234,185,207, 43,240,243,245,196,205,168, 20,212,246,148,192,209,201, 1,
+143,159,164,131,102, 4, 96,104, 10, 54,214,254,114, 32,102,235,254,213, 51,157, 86,166,102,177, 55, 54,236,126,154,144,154,197,
+222, 88, 61,211,105, 37, 49, 91,247, 3, 37,130,141, 35, 4,220,115,127,237,230, 38,156,135,155,147, 68,112,251,137,182,128, 98,
+ 4, 38,145, 80, 96,242,118,149, 80,222,110, 50,129,175,171, 76,172,144, 10,105,111, 79, 79, 14,132,120, 86,198, 99, 78,143, 73,
+204,214,104,230,116,236,249,158, 94, 40, 20,194,223,223,255,153, 5,171, 76, 96,149, 88,176, 12, 72, 85,233,145, 93, 96,132, 76,
+ 66,227,126,196,121, 61,203, 90,119,242,207, 6, 15, 30, 60,120,240,224,241, 90,168, 84,139,252,255,134,170,183,202, 33, 4, 10,
+185, 12, 28, 45,197,181, 59, 79,208, 48,184, 9,182, 31,187,133,250,161,173,145, 85,108, 3,169,198,118,134, 51,126, 52, 68, 2,
+136, 28,208, 67, 94,107,112,159,154, 61, 8,132,231, 54,252,166, 73, 7,128,160, 54, 40, 21, 86, 37,150, 43,142,148, 44, 19, 81,
+141, 90,201, 76,205,213, 41,235,122, 41,240, 40,205,108,114,144, 75,109,206,114,145,192,221, 73,204, 56,202, 4, 2,129,136,166,
+139,138, 84,197, 0,149, 89, 21,151, 57, 61, 38, 49, 21, 33,115, 58,245, 25,190,248,234,233, 3,242,122,245,234,225,254,253,251,
+207, 92,132,122,163, 13, 84,177, 5, 66, 25, 65,131,154, 74, 60,142,188,202,230,231,102,196, 20,198,157,222,194, 63, 31, 60,120,
+240,224,193,131, 7, 15,187,212, 17,199, 17,184,187,185, 64,162,116, 66,162,202, 12, 45,220,161, 54, 80,224, 88,128,181, 85, 42,
+130,202, 13,250, 62,118, 46, 43,253,232,185,188,173,199,206,101,165,191,168,229,254,118, 15, 18, 66, 42,114, 17,134,150,175, 3,
+217, 63, 78,156,187, 86, 48,168,141,135, 51, 45, 20, 26,196, 18,198, 34,147, 10,173,114,137, 0, 30, 78, 34,113, 45, 23,145,228,
+210,201,223,104,138, 35, 23,236,225, 52,167,199, 36, 38,229,230,206,233,214,111,132,222,211,203, 11, 35, 71,142, 68,237,218,181,
+ 1, 0, 53, 20, 52,252, 92,104, 8, 76,217,184,124,108,171,238,241,221,139,119,193,154, 6,227, 69,179, 38,191,203, 58,207,201,
+115,242,156, 60, 39,207,201,115,254,143,194,174,205,158,235,121, 43, 16, 80, 83, 1,163,217, 19, 6, 51, 11,157,201,134, 98,189,
+ 21,106,189, 21,201,217,122,196, 93,122,243,132,144, 82,129, 5, 66,129, 35, 4,160, 74,220,132,196, 78, 67,161, 78,168, 89,185,
+124,201,247,195, 15, 28, 60, 66,190,232,235, 93,235,102,130, 33, 77,194, 8,205,114, 9, 45,112,148,209,108, 82, 98, 82,230,217,
+ 19,191, 53,210, 75,245,163,236, 77,147, 57, 61, 38, 49, 30,152, 19, 20,214,237,123, 16, 8,204, 6,181, 98, 86,251, 16,156, 57,
+125,210, 32,190,118,215, 74, 9,196, 81, 28,107,217, 93,106,185,226, 35,220,121,240,224,193,131, 7, 15, 30,246, 9, 44,189, 65,
+159,208, 99,200,167,165, 27, 62, 19,176,108,137,101,137, 45,115,229,113, 4,172,197,144,240,166, 9, 97, 57,238,214,198,237,251,
+251, 54,109,214,154, 9,241,115,128,166, 40, 15,119,110, 70,216, 8,199, 69,216, 69,144,146, 98,178,121, 72, 63,120,255,189, 65,
+191,141,157,248,133,182, 99,231,174,114, 87, 87, 71, 91, 94,110,190,102,231,150, 3,133, 71, 14,236,105, 68,113,220,199, 72, 73,
+ 49, 85, 39, 93,230,244,152, 68, 51, 80,182,190, 85, 55, 32,164,179, 46,243, 65,127, 29,112,129,111, 62, 60,120,240,224,193,131,
+ 7,143,215, 18, 88, 9, 55,126,239,248,127,145,144,130,130,156,145,187,127, 59,188,104,207,129, 99,237, 77, 22, 75, 77, 14, 76,
+ 26,107,181, 94,150, 20,231,127,107, 47,135, 46, 55, 54, 6,126,126, 45,126,253,105,229,151,191,252,188,186, 59, 56,182, 62, 40,
+ 42,137,226,200, 5,173, 84, 63, 22,153,213, 19, 87,229, 32,143,234,112,170, 39,128, 60,190,233,240,224,193,131, 7, 15, 30, 60,
+ 94, 91, 96,253, 95,161,240,233,173,226, 66,224,139, 55, 38, 74, 73, 49,105,129,165, 40,249,188,109, 68,129,223,127,137, 7, 15,
+ 30, 60,120,240,224, 81, 5,104,190, 8,120,240,224,193,131, 7, 15, 30, 60,222, 46, 40, 84, 60, 19,160, 58,150,154,215,153, 77,
+ 16,197,115,242,156, 60, 39,207,201,115,242,156, 60,231,255, 28,103, 85,220,188,167,232,223, 36,188,120, 78,158,147,231,228, 57,
+121, 78,158,147,231,252,223,227,252, 71,129,119, 17,242,224,193,131, 7,143,255, 57,184, 54,232,175,116,109,208, 95,105,239,245,
+110,193, 67, 61,221,130,135,122,242, 37,199,195, 94, 8,248, 34,120, 43,144,160,100,219, 70,203,127, 42, 1,206,206,117, 29,109,
+ 14,110, 71,104,206,180, 92,147,254,240,220,219,206, 95, 72, 72, 72, 51, 0,136,137,137,185, 7,224, 77,103, 99, 66,238, 17, 56,
+194,197,209,121,130,133, 51,179,122,157,126,163, 46, 39, 62,252,109, 38,216,205, 45, 88, 97,150,200, 86,128, 34,125, 64, 64, 19,
+154, 58,207,104,172,255, 82,171, 31,168, 43,187,207,119,192,146,134, 99,135,190, 59,119,107,248,201, 69,105,199,190,121,252,242,
+239, 46,189,127,116,248, 98,100,247,153, 63,237, 63,177, 60,255,248,215, 90,190,233, 87, 31,190,237, 71, 56,219, 4, 94, 76,214,
+229, 85,249,213,185,175,102, 96,155,104,161, 80,232,110,177, 88,114, 51,227,111,218,245,246, 92, 43,168,109, 36,195,208, 62,172,
+141, 75, 79,143,139,104,193,151,126,213,144,121, 7, 53,163, 88,246,107,194,177, 66, 14,204, 26, 83, 94,194,181, 55,225,243,246,
+246,150, 57, 57, 57,117,114,116,116,244,149,203,229,210,194,194, 66, 67, 97, 97, 97,106, 74, 74,202, 5, 0,182,255, 68, 30,221,
+ 66, 6,206,102,104,124, 87,250,253,251,188,152,163, 75, 43,191,126,192, 34,138,178,206, 46,253,190, 52, 47,230,216,220,255,134,
+186,242, 8, 29,220, 26,132,251,146,166,153,118, 44,177, 45, 81, 69, 29,219, 80,157,251,219,180,105, 51,200,106,181, 74,202,142,
+133, 66,161,233,198,141, 27,191,243, 79,193,127, 72, 96,213, 12, 30,234, 98, 21,144,249, 2,134,126,143, 35,196, 33,251,126,184,
+226,191, 57,131,181, 91,141,188, 67,211,116,173,231,207,113, 28,151,158,122,107,247,219,234,108,107,173,154,214,252,235,156,124,
+131,230,135, 61,143, 23, 86, 36, 62, 60,154, 14,191, 78,209,148, 63, 69, 81,160, 41,128,161, 41, 0,200, 76,187,181,167,188,205,
+167,189, 29, 21,130, 64,141,206, 22, 5,160,202, 65, 72, 90, 35,192, 71,224,226,121,185,203,224, 41,117,239,156,217, 30,204, 90,
+ 44,221,117,185,177, 49,111, 33,111,238,245,235,215,111,201, 48,140,235,148, 41, 83, 68, 0,176,102,205,154, 0,150,101,243,159,
+ 60,121,114, 27,128,234,181,196,149,123,208,200,117, 63,124,191,171, 79,159, 62,200, 84,233,176, 98,205,134, 46,167, 79, 28,120,
+255,173,137, 44,239, 48,153, 77,204, 68,125,246,229,183,181,250,118,109, 41, 40,210, 90,113,234,194,141,145,225,219, 86,116,115,
+ 66,147,198,149,137, 44, 78, 95, 52,215,211,129,244,230,244, 69, 0, 48,226,149,246,175,180,190, 83, 67,142, 62,222, 18,193,253,
+124,224,112,149, 73,105,241,241, 25,161, 72,228, 71, 81,116, 73,189, 51, 20,232,210, 54, 96,179,154, 83,158, 92,219,222,235,191,
+162,163, 14,251, 40,155, 2,229, 74,151,166,143,162, 0,154,166, 33,160, 0, 16,162, 73,140,216,225,250, 22,254,141, 83,104,128,
+115,163,246, 1,186,173,151, 19, 11,148,130, 78,211, 78, 82,132,222,144,122,117,245,125,123,110,150, 74,165, 46,199,143, 31,119,
+239,221,187,183,147, 71,163,129,151,237,185, 71,204,104, 67, 78,156, 56, 38,234,221,187, 87, 53,218,103, 96, 15,208,244,110, 10,
+ 16,114, 28, 89,195,112,228,128, 54, 63,238, 9,170,185,152,176,123,163,129, 11, 64, 33,216,238, 27, 8, 30,169,162,143,126,251,
+154,101,203,200, 60,130, 70,201,164,210, 25, 1,129, 13, 3,147,147,158,198,105, 52,234,213,134,220,184,173,165, 47,127,118,131,
+178,177,211,206, 94,184, 62, 84, 32, 20, 82,189,186,182, 84,152,128, 94,213,229,120, 30,158,158,158,131,214,175, 95, 95,175,109,
+219,182, 0, 0,155,205,230,120,240,224, 65,175,133, 11, 23, 42,226,226,226, 14,191, 14,167,143,143, 79, 77, 39, 39,167,218, 50,
+153,172, 38, 0, 24, 12,134, 12,181, 90,157,154,153,153,153, 81,101,122,154, 14,117, 35,172,117,193,233,195,191, 8, 0,160,215,
+144, 9,139,234,116,158,225, 66, 49, 66, 67,121,215,179, 54,179,194, 84,152,244,229,249,227,219, 41, 0,232, 62, 96,244, 44,183,
+224,161, 63,229, 61, 10,207,249,143, 60,172, 67,135, 50,110,241,150, 65, 20,161,254, 21,214,188,121,155, 33, 3,251, 32,164,190,
+ 15, 6, 13,159, 52, 3, 64,181, 4,150,213,106,149,132,135,135,215,162,105,154,177, 88, 44,198,225,195,135,231,190, 73,210, 2,
+218,127,124, 29, 20,229,107,177,217,126, 77,185, 81,127, 17, 48,159,123, 57,237,222, 73,130, 57,160,232,113,132,227,210,178,239,
+253,214,142, 23, 88,165,112,109,208, 95,105, 21,144,168, 46, 29,219,184,206,158, 52, 88,188,233,192, 85, 28, 3,149,145,117,255,
+ 96,205,255,214, 12,210, 52, 93,235,232,222,245, 30, 50, 9, 3, 0,208, 26, 88, 12, 25, 57,165,234, 7,184,197,135,151, 64, 33,
+168,204,135,202,178, 54,169, 64, 32, 52, 82, 0, 64,149,204, 14,144,201,196, 55,166,183,137, 85,143,238,239,255,241,215, 63, 69,
+238, 0,224, 12, 32,187,220, 78,139,166,107,253,182,109,141, 71, 77, 87, 41, 4, 12, 5,173,193,134,193, 31,255,139, 45, 79,176,
+109,157,211,118,193,200, 62,117,134,121,244, 62, 52,164,168,216,252, 71,101,233, 84,120, 6, 55,148, 59,185,159, 27, 50,126,129,
+143, 1,142,152,187,104,181,199,245,179,225, 87,179, 50, 82, 44,169,233,233,122,155,197, 26,155, 95,144, 53, 93,155, 21, 31,111,
+111, 71,173, 84, 42,235, 41,149,202,166, 77,154, 52,145,206,152, 49, 67,216,165, 75,151,103, 63,142, 31, 63, 94,116,233,210, 37,
+239,149, 43, 87,246,125,240,224,129, 81,171,213,222,215,106,181, 79, 1,176,246,214,137,151,151,251,231,239, 13,234,143,110,239,
+125, 6,150,163, 48,110,242, 52,156,249,227,240, 68, 0,111, 69, 96, 41, 25,250,251,113, 83,190,169,213,185,109,115,193,178,131,
+ 9,112,146,139,208,171,117, 11,129,132,153,233,253,219,182,149,171,161,198,152,242, 44, 87,156,190,104,110,168,155,101,248,128,
+118,254, 56,246,155,101, 56,186,127, 5, 90,238,252,204,146, 85,175,247, 20, 7, 9,155,187,190,166, 51,227, 33, 97,115,215,215,
+235, 61,229,207,167,167,215, 23, 87,150, 22,161, 72,228,183,245,167,197, 13,106, 40, 69, 96, 24, 10, 2,154, 6,195, 80, 48,153,
+ 89,140,156, 52,251,109, 53,115, 70,230,209,160, 47, 13,140, 70,201, 72,184,221,144, 27,127,170, 58,117, 66,209,140,235,193,109,
+ 43, 5, 30, 78, 98, 48, 12, 5,134, 46,249, 36,101, 27,240,197, 87,243,157,222, 84,168,247,105,239,209,242,171, 97, 65,189,218,
+132,214,104,178, 63,130,114,110,211,103,152,107,158, 81, 54,234,183,163,151,134,147,142, 95,222, 36,132,251, 33,253,218,186,179,
+149,145,152, 76,166,156, 94,189,251, 56, 82, 2,133,252,207, 35, 59, 58,149,109, 54,111,101,185,191, 55,135, 39, 64,217, 75, 12,
+ 71,128,241,159,142, 69,175,222,125,244,156,141, 75,175, 70,167,177,251,244,159,215,220,141, 86,130, 85,235,183, 44,208,169,243,
+ 22, 36, 62,118, 77,214,170,243,190, 52,228,198, 31,179, 95,169, 32, 56,238,250,193,193,123, 79, 68, 32, 52, 36, 24, 44, 87,178,
+191,106, 96, 45, 5,246,157,188,129,134, 65, 13, 75, 22,111,230, 8,130,124,149,232,252,238,199,175, 89,188,157, 5, 10, 79,213,
+190, 65,195, 70, 15, 29,252,222,112, 56, 59, 42, 97,182,152, 2, 47,156,253,227,151,141,235, 87,180,215,102,199,142,170,142, 56,
+228, 56, 86,252,247,119,171, 20,128, 16,128,249,117, 43,223,199,199,199,189,101,203,150,207,142,109, 54, 27,234,214,173,139,140,
+140,140,160,106,191, 8,120,120,200,125,124,124,222,157, 62,125,186, 71,215,174, 93,133,238,238,238, 0, 0,149, 74, 85,243,226,
+197,139, 97,171, 86,173,202,205,204,204, 60,153,155,155,171,175, 80, 84,112, 70, 17, 67, 4,140, 68, 34, 43,213,181,160,103, 76,
+249,176,137,187,187,123,185, 47,199,249,249, 5,226,239,190,251,150, 18, 8,132, 37,215, 19, 66, 19,142,173,112,143,145,182,109,
+219, 14,176, 88, 44,210,242,126,203,179,185,247, 53,114,226, 97, 40,221,204, 88,192, 48,133, 89,247, 15,185,219,253, 32, 53, 30,
+208, 83,240,148,108,236, 63,112, 96,157, 65,125,187,192,219,221, 9, 23,110,196, 98,234,156, 85,176,218,216,181,175,213,121, 48,
+140, 32, 55, 55, 55,217,197,197,197,235, 45,140,183,254, 71,247,254,232,113,241,234,157, 89, 63, 73,126,155,100,182,142,178,150,
+109,127,199,114, 4,242,124,145,176,211,192, 30, 14,174, 53, 3,101, 91,126, 90, 38,228, 45, 88,207, 87,132,152, 89,216,161, 93,
+ 75,215,217,211,198,138, 23,110,185,140,136,179, 39, 13, 89,247,195,223,138,184, 82,186, 7,182,165, 24,193, 4,138, 97, 20, 20,
+ 77,137, 57,150, 75,179,153,205,139, 12,249,241, 89,111,202,205,114,192,161,191,170, 41,204, 9, 9,248,229,231, 85, 30,158,206,
+ 18, 24,204, 54,140,249,124, 30, 54,175, 93,224,224,238, 36,134,201,194, 98,251,209,219,121, 77,116,171,201,232,190,254, 31, 47,
+222, 26,125,248,135,221,143, 15, 87,214,137,209, 20, 13, 15, 39, 9, 22,237,139,133,163, 92,136, 26, 74, 49,104,186,124,113, 53,
+186,127, 9,103, 81,177,217, 6, 64, 92, 81,231,166,240,106,212,209,193,205, 39,124,240,167, 11,220,227, 85, 20, 8, 49,227,169,
+147, 4, 67, 70, 78,114,174,239, 37,131, 66,202, 32, 57, 45,171,238, 87, 51,103,182,136, 34,116, 75, 83,118,108,106, 85,217,174,
+ 83,167,206,144,126,253,250,201,167, 79,159, 46,244,245,245,197,238,131,103,252,122, 12,253,162,127, 70,118,190, 47, 71, 0, 79,
+143, 26,105, 99,135,245, 61,126,234,212,169,148,180,180, 52,225,138, 21, 43, 90, 31, 57,114, 36, 36, 59, 59,219,238, 55, 81,150,
+ 16, 24,204, 44, 88,150, 3,203, 81, 80, 21,189,150,199,145,174,248,173,154, 12,236,217,165,149, 96,205,239, 79, 81,172,183, 66,
+ 38, 98,144,144,165, 67,219,182, 45, 5, 7,182, 83, 93,203,187, 99,236,208,119,231,122, 58,144,222, 3,218,249,195,195, 69,142,
+109, 63, 45,198,177,235,137,189,115,138, 41,172, 39,204, 4,111,137,160,135,130,203, 90,223,165, 69,128, 87,247,230,126,184,211,
+ 34,192,235,202,221,199,113,178,247, 87, 77,201,208, 10,255, 44, 60,253, 69,113, 69,245, 94, 67, 41,194,150, 51,201, 80, 72,132,
+ 80, 72, 5, 37, 31,137, 0, 52,253,102, 27,198, 75,189,131,125, 25,142, 29,203, 48,130,177,195, 63,120,223,103,196,240,161,132,
+162, 25, 28, 60,124,124,224,158, 61,187,179,172, 22,243, 22,150,102,182, 26,179, 30,165, 85,169, 5, 40,192,195, 73,140,175,126,
+141,130,131, 92, 8, 71,185, 16, 14, 50, 33,186, 55,117,127,147,116,186, 76, 28, 88,175,239,196,193,117,186, 6,213, 86, 54,184,
+255, 68, 29, 51,118,209,157,181,151,138,186, 78, 91,191, 38,196, 85, 92,104, 18,204,155,241,169, 32, 35, 51,171,235,193,227,151,
+187,177,230, 49,177, 54,139,238, 27,213,131,131, 71,203, 35, 75,143,141, 8,171,217,102,168,212,162,181, 62,188, 31,151, 94,191,
+192, 40, 70, 76,138,166,180, 76,133, 80,150,149,109,105,249,102,165, 39,163, 64,207, 92,203,112,165,187,226,114, 68,181, 92, 81,
+ 6, 11,135,251,137, 90,212, 9, 12,131,151,183, 15,204,125, 63,172,115,235,194,161,163,183, 46, 31, 93,170,207,126,252,141,189,
+ 60,123, 79, 68, 96,225,210,181,241,160,240,168,116, 52, 15,158,254,175, 41, 13, 86,173, 94,255,194,185, 73,159, 77,110,240,186,
+226, 90,238,153,187,231,157, 1,163,134, 54,105,221, 3,241, 79,158, 34, 62,250, 14,186,191,211, 11,125,250, 13,134,217,100,252,
+120,235, 47,235,111,235,114, 98,127,126,165,207,245,106,216,161,113,104,240, 30, 31,111, 31, 95, 66, 74,183, 38, 35, 4, 38,147,
+ 17, 51,191, 28, 7,189,182, 24, 65, 65,161,237,157, 59,246, 52,129, 98,192,113, 4,249,249,121,186,216,199, 49,239, 24,115, 99,
+111,218,155, 64,189, 94,111, 85,169, 84,184,119,239, 30,226,226,226, 16, 29, 29,141,252,252,124, 56, 57, 57,105,117, 58,157,221,
+ 25,117,118,118,118,108,220,184,241,135, 7, 14, 28,144, 58, 57,253,173,249,205,102, 51,228,114, 57, 6, 13, 26, 36,236,208,161,
+ 67,205,209,163, 71,127, 98,177, 88,246, 22, 21, 21,105,202,227, 41,120,120, 50,211, 51,116,224,166,190, 67,199, 79, 2, 0,145,
+ 68,153,184,238,215,195,209,149,253,111,145,212,209,239,157, 65, 99,234,131, 16, 80, 20,181, 46, 63,246, 72,118, 69,215, 90, 44,
+ 22,217,254,253,251,107, 82, 20,245,194,248,186,224,199,253,237, 30,198,103,189,179,113,254,215, 2, 7,133, 4,121,106, 51, 38,
+ 76,154,226,102,183,184, 10, 29, 48,185,101,179,176,159,231,205, 24, 7,133, 92,134,179, 55,158,226,203,217, 75,109, 5,121,185,
+187, 64, 81,107,242, 98,126,127, 83,175,197, 91,217,238,173, 65, 77, 37, 28,122,181,149,142,251,160,139,212,108,101, 81,168,181,
+194,100, 97,193, 17, 2,181,206,138,152,148, 98,184, 57,137,176, 5,255,124, 84, 75, 96, 9,132,226,126, 95,140,234, 43, 94,185,
+247, 38, 34,206,238, 53,100,221, 11,151, 63, 83, 6,205,135, 37,166,223,221,239,255,210, 45, 81,246, 12, 18, 2,138, 89,221,174,
+ 77,139,158,227, 39, 76, 34, 77,130,252, 68, 0,141, 71,241, 73,214,109, 91,183,140,186,120, 77,188, 86,147, 30, 53,247,185,193,
+180, 90,211, 55, 57,142, 75,127,217, 98,197,113,175,188,205, 70,149, 55,224, 56, 43,132,216,116, 50,177,228,205, 24, 4, 78,114,
+ 33,246, 93, 76,135,166, 32, 35,175,137, 97,245, 95, 99,251,122, 12, 88,180, 53,230,232,134,227, 57,119, 1, 68, 3,200,169,136,
+147,162, 1, 1, 67,193, 73, 33,130,147, 92, 8, 39,165, 16, 52, 69, 85, 40,174,230,253,242, 96, 7,128,216,151,196,213, 51, 78,
+185, 71, 96, 35, 7,215,154,191,191, 55,113,137,203,195, 84, 11,104, 26,240,247, 82,192, 69, 41,134,217, 10, 36,171, 44,165,121,
+117,196,228,233,243,221,103,253,107,226,169,156,236,206, 77,128,203,182,202,242,174,215,235,197, 35, 71,142, 20, 90,173, 86,203,
+232,169,139,122,102,229,228, 13, 92,187,228, 43,137,155,155, 43,116, 70, 27,238, 61, 74, 14, 94,250,195, 79,254,127, 92,186,117,
+100,214,196,129,199,122,247,238,237,180,127,255,126,174, 58,245,174,202,201,251,105,251,238,240, 93,107, 86, 46,197,227,228, 2,
+108,251,101, 3, 8,107,219, 84, 69, 85,190,192,185,121,243,102,143, 29, 59,118,208, 55,110,220,200,127, 89,128, 82, 20, 20, 5,
+106, 19,156, 21, 34,200, 37, 2,120, 57, 75,224,234, 32,130, 68, 68,131,166, 95,232, 68,158,113,110, 13, 63,185,136,211, 23,225,
+216,111,150,225,219,126, 90,140, 49,159,207, 65, 84,158,232, 52, 45,119, 94,244,249,176,129, 95,215,144,163, 79, 77,103,218,163,
+123,243, 58, 80, 72, 69,152,253,197, 72,180,188,155,236,145, 94,196,205, 41,208,163,233,252,211,152, 91, 94, 58,105,134,130,128,
+161,225, 32, 19,226,210,201,125,185,250, 98,181,154, 98, 74, 44, 44, 86,179, 37,197,206,102,252, 74,121,202, 61, 2,103, 53,107,
+220,104,241,164,241, 99,233,246,109, 91, 17,154, 22, 32, 79, 99,161, 8, 8,166,125, 62, 17,147, 39,142,243, 74,207,200,249,246,
+231, 13,155,231, 94, 56, 71, 22,234, 84,143,231, 87,198,201, 80, 52,104,154,130, 66, 38,132, 82,250,247,199,104,230, 64, 81, 96,
+106,134, 13, 83,131, 2, 40,138,202, 76,191,243, 91,176, 61,233,244,105,220,231,252,229, 92, 81, 67,253, 41, 99, 68, 66,124,228,
+162, 91, 15, 82,111, 1, 40,240,237,228,252,137,213, 74,160, 53,218,144,148,163,135,205, 76,168, 49,189,253, 80,119, 40, 21,180,
+100, 91,228,174, 63, 30,192,241,185,206,254, 5,206,140, 27,225, 70,215,208,193,195,214,252,184,249,246,202,197,115,152,124,141,
+ 25, 44, 1,100, 98, 6,210,210,143, 76,196,192,168, 83,227,231, 77,191,102,219, 64, 13,193,229,202,219,252,171,157, 6,249,104,
+ 72,223, 78,191, 81,128,152,162, 69,233, 62,126,117,252,186,245, 27, 37,237,222,255, 99,176, 54,203,172,187, 87,201, 69,125,110,
+236,121,123, 56, 67, 67,130, 1, 10,143, 84, 81, 71,135,148, 12,146, 3, 15, 55, 12,106,216,224,229,115, 1, 1,129, 13,236,169,
+247,178,102, 37,115,111, 48, 62,160, 97,227,153,109, 58,116,171,147,153,111,130, 75,205, 0,220,139,188,139, 51, 7,127,142, 52,
+ 20, 23,174, 60,115,226,200,204,133,203,214, 54,237, 55,232, 3, 28,253,253,192,116, 93, 78,236,134,210, 50,125,198, 73, 56,238,
+163, 29, 91, 54,251, 10, 69, 18, 88, 89, 2,171,141,131,149,229, 96,181, 17,100,101,101,162, 88,171,133, 84,230, 0,133, 99, 13,
+ 88,109, 37,150, 66,147,201,170,152,248,113,191,201, 70,224,102,121,233,172,211,234,163, 59,160,169, 90, 37,239,168,165,117,102,
+ 50,234,189,189,189,119, 1,128, 68, 34,129, 68, 34,129,205,102,195,195, 76, 76,243,246,234, 52, 27,164,180,178, 57, 46, 61,251,
+222,111, 45, 42,202,187,175,175,111,255,242,196,149, 86,171,197, 95,183, 31, 56,109,223,127,182,119,114, 90,118, 61,142,245, 48,
+201,188,154,246, 42, 42,186,216,191,162,242,204,137, 58, 58,217,183,243, 84,122,250,164,145, 1,235,126, 13,191,149,112,102, 81,
+165,230,228,186,221,191, 54,207,156, 60,162,197,242,117,219,226, 51,174,172,251,178,170, 58, 18,137, 68, 66,149, 74,245,236,249,
+ 94,176,254, 80,159,212, 28,205, 59, 63, 44,158, 35,186,247, 84,139, 7, 73, 89, 24,213,195,207,238,231,221, 43,100, 80, 80,173,
+218, 53,215,174, 93, 56, 21,113,153, 6,172, 63,116, 11,151, 79,238,186,107, 49, 22,191,171,138, 57,158,251, 58,125,200, 91, 16,
+ 88,175,112,150, 13, 4, 23, 31,228,161,216, 80, 34,172,172, 44,135, 98,131, 13,185, 69, 38,168,117, 86,104,141, 86,140,122,199,
+175,250,234,143,144,150, 0,220, 1,168, 40,138,186,253,252,113,153, 6, 45, 27, 98, 94, 58,206, 43,181, 24,186,150,142, 21,226,
+231,104,205,207, 25, 49,202, 59, 95,118,127, 12,128,224, 82, 78, 22,192, 45,138,162, 10,237, 17, 88,164,204, 92,249, 92, 33,151,
+251,202,202,218,172,181,124,188,189,193,145,244, 23, 46,241,107, 53, 76,255,197,216,247,101, 43, 89,155, 46,235,254, 33,187, 99,
+178,148,238, 13,218,137, 68,226,147, 75,151,173, 32,195,250,119, 22,103,171,173,134,152, 12,163, 74,107, 34, 54, 47,247,250,146,
+101,203,151, 43,151, 44, 91,249,217,145,195, 92,145, 54, 39,230,135,242, 56,188, 91, 12,191, 67, 81,116, 45,250,111,179, 60, 8,
+ 71,210, 51,238,236,107, 1, 0,111, 18,107,165, 51,218,192, 48, 20,132,165, 49, 41,122, 51, 11,125, 81,118,126, 19,253,218,191,
+198,246, 46, 17, 87, 55, 51,188,158, 50,140,202, 2,160, 82, 23, 4, 77, 81,208,232,173,112,148, 9,225,164, 16,193, 89, 46,122,
+222,130, 85,158,184,138,174,140, 83,100,177,164,177, 86,147,145,176, 44,250,182,116,135,135,147, 24,222, 46, 18, 72,197, 2, 88,
+ 89,192, 96,230, 96, 48,179, 72,201,213,163, 88, 47, 65,227,206,195, 3,220,188,111,234,179,147, 90,236,200, 79,185, 51,161, 82,
+ 11, 19,203, 98, 79,248,153,128,140,172,220,129, 71,119,175,150,228,170,173,120,144,172, 69,110,161, 25,132,114,194,236,185,115,
+ 37,243,230,125, 55,248,192,239,231,147,218,181, 8, 76,175,110,185,234, 85,177,187, 15, 30, 10,255,233,221,254,131, 28, 98,110,
+253,129,248,123,231,231,233,114,171, 23,127,229,231,231,199,254,252,243,207,206,155, 54,109, 10, 56,122,244,104,154, 74,165, 74,
+ 44,123,168, 92, 29, 68,153,231, 46, 92,113,237,220,190,147, 32, 45,207, 8, 55, 7, 17,252, 60,229,184,123,253,162,153,166,168,
+211,229,241,149,186, 1, 71,160,251, 87, 56,118, 61,177,119,116,190,228,210,167,227,198, 36,159, 59,121, 43,255,199,221,231, 87,
+212, 84, 90,239, 75,185,220,245,119, 91, 4,120,205,154, 50, 18, 75,127,220,141,203,119, 31,231,234,104,159,197, 89, 38, 91,133,
+147, 10, 24, 26, 16, 10, 40, 56,200,132,208,235,212,234,232,243, 27, 3,223,210,203,209, 39,103,126,223, 77, 23, 20, 91,145,158,
+103,160, 50,243,139, 97,227, 56, 56, 43,196,176,113, 64, 81, 65, 30,181,103,207,110,220,190, 29, 65,131,161, 63, 5, 48,191, 42,
+ 11, 22, 67, 83, 80, 74, 5, 80,202, 74,172, 64, 74,153, 0, 22, 27,135, 6,254,190, 88,187,224, 11, 71,119, 15, 79,244, 28, 50,
+193,238, 4,202, 20, 46, 77,119,110, 92,136, 75, 17,247,187, 92, 76,216,215,210, 35,180,233,143, 66, 86,184, 18,132, 24, 76, 86,
+ 22, 26,117, 33,140,166, 52,180,170,153,135, 26, 10, 22,201, 26,111, 68,101,199, 43,171,234,232,243,163,142,220,163,200,160,185,
+ 7,143, 95, 88,218,171, 71, 23, 68, 39,105, 74,196,149,168, 68, 92, 9, 40, 14,171, 55,109,182, 22,170,139,251,229, 71, 31,205,
+123,141,246,249,103,105,103, 92, 34, 16, 88,173,251,158,245,115,119,142,155,185,162, 87,175,193,159, 80, 81,183, 47,126,163, 7,
+206,219,107, 61,127,245, 28,177,235, 92, 69, 93,137, 71,253, 22,123,183,239,216, 55, 44,164,129, 47,114,138,172,200, 44,180,224,
+234,221, 4, 28,217,252, 77, 81, 81,206,211,143, 96,209,106, 57,202,166, 62,123,230,248,233,207,190,152,137, 70,141,154,214,209,
+164,107, 28, 95,142, 61,228, 24,106,243,199, 99, 39, 14,243,244,240,116,224, 74, 45, 88, 28, 33, 8, 10, 10, 65,223,254, 67,112,
+233,202,117,196, 68, 63, 40, 57,207, 1,132, 16, 20, 21,230,103,219,172,230, 29, 21,182, 35,134,170,181,125,211,106, 15,154, 2,
+ 44, 54, 14,102, 43,135, 89,179,231,153,167,126,187,190, 67,175,246, 77,162, 25,112,154,212,172, 34,231,219,177, 89,141, 41,161,
+163,247,135,227,191, 22, 25, 44, 44, 52,122, 43,206, 31, 92, 87, 97,166,189,253,155,180, 85,214,110, 63,118,252,156, 77, 18, 9,
+ 67, 91, 26, 5,250, 38,118,110,211, 40,173,182,143, 91,241,146,117,123, 90, 93,191, 27,219,119,200,123,131,165,195,234,133, 80,
+ 62,174, 82,135,137,147,167, 52, 97, 3,218,127,156,147,240,215,174, 10, 7, 63,129,164,200,183,150,239, 51, 87,162,123,163,129,
+ 15, 0,188, 60,242,167,168,162,143, 54, 1, 0, 15, 79, 47, 35, 37,148, 20, 87, 67, 16, 16, 0,248,254,199,240,190,233, 42,237,
+208, 31, 22,207, 17,221, 75,212,225,222, 83, 53,196, 34, 6, 38,139,253, 97,109, 44, 69,166,125, 61,101,140,176, 64,103,195,197,
+ 7, 42, 68,221,185, 64,108, 22,205, 40, 66, 9, 70,187, 53, 26,248, 49, 5,212, 37, 64, 18, 77,225, 23, 51,141, 29,234, 7, 71,
+213,175,107,193,114, 15, 30,220,142, 98,208,151, 17,136, 90, 2, 92, 67,155,213,234, 65, 51, 76, 94,206,131, 67,158,213,200, 59,
+244,185,241, 88,177,228, 91,172,221,114, 4,183,226, 10,224,100, 75,195,209,109,139, 49,125,233, 30,232,205,108,101,105,168, 72,
+143,184, 83, 20,117,130, 16,210,143, 16,242, 14, 0,113,217,113, 73, 31, 70,157, 40,253,223, 47, 28,207,154, 53,235,155,165, 75,
+151, 70,151, 93, 91,118,190,236,218,202,206, 63,119,191,235,236,217,179, 67,151, 45, 91,182,164,109,219,182,191, 93,191,126, 61,
+ 17,128, 93, 2,235,249, 76, 84,248,148,123,132, 14,104, 69, 8,199,120,185, 42, 17,224,239, 11,197,251,163,101,167, 40, 74,199,
+ 48, 52,189,125,205,108,105,190, 65, 0, 1,195,216,109,239,149,122, 4,181,150, 41, 21,167,246, 31, 56, 68, 26,212,241, 18, 31,
+186, 81,148,122, 55, 81,255,204,164,171, 81,165,136, 3,106,152,152, 97, 31, 12, 81,156, 62,123,110,154, 22,248,161,252,129,129,
+174,245,227,234,229, 30, 14, 50, 33,104, 10,208, 24,108,152,246,175,175,223,120,244, 34, 32,204,228,127,125, 7,154, 42, 25,124,
+180,234, 2, 44, 94,179, 93, 59,164,214,133,107, 99,123,187, 13, 88,180, 53,230,232,217, 71,178,132,193,131,187,169,147,147,147,
+ 11, 51, 51, 51, 43,119,193, 16, 54,125,232, 39, 83, 69, 52, 93,226, 54,162, 40, 10, 0,155,243, 58,226, 10, 0,138,138,146, 52,
+ 82,177,114,240,238,213, 83,182,212,174, 85,179,134,131, 92, 10,165, 66, 66, 53, 12,170, 47,109,211,186,173,204,175,126, 35,209,
+149, 71, 90,164,170, 12,120,154,161,129,196, 61, 84, 56,172, 75, 15,236, 94,247,117,223,252,148, 59, 85,230,255, 66, 68, 84,255,
+ 13, 43,231, 72,114, 10, 45,120,148, 86,140,236, 2, 19,178, 11,141,200, 46, 52, 65, 41, 21,160, 77,247, 33,146, 99,231,195, 7,
+181,107, 17,248,227,235,148,239,211, 39,137, 71, 82, 50,178, 70, 53,105,214, 10,123,118,110,111,131,154, 53,165,200,200, 48,218,
+123,255,150, 45, 91, 10,194,194,194,220,126,248,225, 7, 93, 80, 80, 80,211,205,155, 55,251,199,197,197, 93,170, 87,175, 94,255,
+141,235, 22, 94,154, 58,103,165,159, 0, 54,167, 54,237,219, 51,114, 49,133, 27, 87,206,154,118,108,217,148,105, 41,210,206,172,
+116,244,146, 59, 47,202, 41,166,224,238,227, 27,165, 16, 90,123, 10,229,150,184,194,221, 95,236, 46, 4, 14,215,235, 61,229,207,
+139,119, 98,227,154,223, 77,246,184,112, 55, 46,183, 64,111, 13,124,122,122,122,165, 29, 46, 67,149, 90,176,228,127, 91, 44, 61,
+154, 12, 77, 32, 20,229, 94, 38,108, 40,148, 88,180,168,146,135, 48, 51, 35,242,128, 29,129,209, 20,225, 56, 32, 46, 93,139, 98,
+131, 13, 70,171, 13,190,110, 10,168,114,210,177,241,199, 29,136,188,115, 27, 61,251, 12,192,207,191,238,193,184,143,223, 55, 86,
+245, 96,210, 52, 5,154,166, 74, 45, 87, 37,226, 74, 41, 21, 0, 20, 80,164,179,226,240,181, 52,212,247,167, 65, 85,195, 91,232,
+160,148, 65, 93,108, 4, 45, 84,226,241,213, 93,242, 63, 46,220,154, 61,127,229,214,175, 52,218,156,212, 39, 49, 17, 8,114,201,
+135,191,143, 25,209, 57, 78,184, 83, 80, 7, 65,245,235,129, 22,221,182,139, 59, 47,186,241,138, 99,244,161,126, 45,155,133,180,
+173,237,225, 4,131,153, 45,181, 98, 9,176, 99,251,118, 36, 39,165,143,205,143, 57, 26,249, 54,148,172, 46, 55, 81, 37,241, 8,
+248,236,225,141,243,137,131, 62,154, 12,175,154,181,155, 22,165,222,179, 51, 60,193, 62, 49,197,217, 39,176,232, 26,117,154,237,
+220,185,251,224, 48,255,218, 94, 56,119, 43, 9,145, 79, 10,225,232,224, 12, 70,225,141,192,206,163,157, 31,158, 94,247,158, 33,
+ 79,187, 83, 40,146,127,218,170, 77,123, 16, 66, 16,251, 56,186, 64,173,118,122,165, 9, 24,178, 98,239, 69,100,197, 58,190, 32,
+138,221, 26, 54,117,112,170,113,207,104, 97,145,145,145,142,191,174, 95, 10, 51,100,197,222,171, 78,121, 73, 68, 52,206,222,205,
+133,197,198,193, 98,229, 16,214,184,161, 81, 40,146,117, 92,190,229,100,155,236,156, 92, 90,174,116,226,156,220,234,137,156,173,
+217,166,251,137,106,145,197,198,161,158,119,229,239,229,242, 26,245,150,124,249,175,169,193, 2,177, 12, 26,157,201,156,149,158,
+225,245,203,190,139,218, 71,177, 49, 53,235,214,169,237,184,112,225,124,145,198, 72,144, 91,100, 66, 94,177,133,250, 96,196, 88,
+159, 93,219,126,254, 8,192,174,106, 36,189,241,111,187, 54, 89,107, 40, 69, 84,177,222, 74, 84, 26, 35, 59,249,179,105,141,223,
+164,237,188, 32,174,158,234,112, 47,177, 8, 18, 17, 3,137,136,129,213,102, 95,136,164, 91,240, 80,133,155,171,226,163,214,205,
+ 2,112,230,174, 10, 2,134,130, 65,167, 49, 75, 37,202,168,134, 13, 27,208,205,154,134,162, 75,135,118,120,146,152, 28,116,230,
+220,133, 53,183,110, 71, 46, 22, 54, 26, 52, 51, 47,250,247,159,171,147,214,148, 12,149, 34,199,230, 59,220,195,203, 45,116,192,
+128,254,146,218, 53, 61, 41, 55, 87,103,176, 16, 97,210,228,207, 61,236,246, 26, 17, 2, 2, 96,217,130,217, 48,153,205,240,112,
+ 22,131, 16, 96,219,250,239, 97, 54,155,225,227, 42,133, 90,103,173, 74,232, 85,168, 71,202, 19, 68, 47, 11,173,178,239,101,215,
+ 45, 93,186,180,223, 75, 2,176, 95, 5,194,240,149,235,202,238, 95,182,108,217,146,231,126,215, 87,199, 69, 72, 85,150, 41,183,
+198,131,218, 75,196,178,179, 63, 47,157, 70, 23,233, 44,144,136,104,212,243,175,139, 41, 95, 76,149,119,111,230, 1, 3, 28,113,
+104,223, 14,141,141,181,158,176,235,205,214, 51,160,133, 66, 38, 63,189,109,231, 62,206,203,195,141,250,229, 79, 85,162, 74, 99,
+123,182,196, 65,220,205, 99,220,157, 51,191,120, 19, 80,167,229, 82, 89,128,201,108,114,169,176,199, 41,173,208,109,103,147,193,
+208, 52,152,183,180,178, 23, 77,211,236,175, 63, 46,132,155, 99, 73,204,213,247,107,119, 23,247,119, 63,125,225,121,113,213,172,
+ 89, 51,117,211,166, 77,139,104,186,234,127,154,118,123,111,121,179, 37, 94, 75, 92,149,193,152,243,240,182, 17, 8, 85, 39,255,
+125,238, 15,132, 9,221,234, 30,156, 62,252,195,143,102,123, 54,234,239,144,148,165,134,152,182,162,101,176, 55, 46,157, 57,204,
+165, 37, 62,154,104, 15,119,110,190,218,215,205,213, 21,145, 79,181,200,204, 55, 34,171,160, 68, 92,101, 23, 24,161, 49,216,208,
+172,174, 7,138,212, 90,223,215, 22,176, 20,249,253,204,233, 51,163,250, 12, 28,134, 41, 95,205,239,179,101,195,170, 7, 90, 15,
+135,143,141,185,143,111,217,115,127,120,120, 56,123,231,206,157,196,188,188,188,150, 51,103,206, 44,174, 91,183,174,215,194,133,
+ 11,199,215,171, 87,207,167,123,215,174,234,219, 23,219,236,156,250,213,252,174,223, 76,221,226, 79,211,116, 14,225,200,177, 76,
+157,245, 59,228, 61, 50, 84, 90, 79,199,190,121,252,221, 83,203,168,238, 29, 93,143,185,202,232, 16, 33,101, 26,129,224,249, 7,
+240,104,190,229,233,233,245,197,178,247, 87, 77,201, 40,226,230, 24,105,175,197, 85,137,171, 18, 11, 22, 5,179,133,131,163, 76,
+ 88, 54,115, 20, 32,240,222,176,126,149,220,221, 73, 2, 1, 67, 65,200,208, 80,235,173,200,215,152,241,213,204,153,246,150, 32,
+199,114, 28,244, 38, 22, 6,179, 13, 20, 40, 20,107,242, 48,251,171, 47, 75, 32,211, 47, 0, 0, 32, 0, 73, 68, 65, 84,209,167,
+255, 16,140,157,248, 47, 20, 25,128, 59,137,197,176, 88,173, 85,202, 34,134, 2,244, 38, 27,198,246,242, 67,126,177, 5, 58,163,
+ 13,102, 11, 7,185, 84, 0,129,128,134, 66, 34,128,131, 76, 8,138, 34, 34, 47, 47,175,241, 0, 32, 20, 10,141,105,105,105,187,
+ 43,118,207, 19,212,241,245,132,193, 66,163,213,176,149,120,167,109, 32,238,157,219, 42,184,114,243,161,255, 87,243,215, 96,242,
+136,182, 8,143,173,143, 26, 30,117,160,148, 75, 97, 37, 52, 0, 98,103, 64,222,124,142,182, 12, 30,177,233,215,109,177, 11,230,
+125, 45, 45,212, 81,144,136, 4,184,112,225, 79, 68,220,188,179, 46, 47,230,232,238,183, 25, 75, 33, 36,180,167,163,147, 35,164,
+ 98, 6, 22,139,201,238,128,111,150, 35, 0, 65,176,123,232,192,195,165,117, 31,204,149,115,206, 14, 11, 22,229,228, 19,186,125,
+211,150, 61, 31,121,123,121,224,200,249, 7,216,185,229, 39,212, 12,237,131,132,187,155,224,219,124, 16,148,254,221, 32,118, 56,
+ 56,158,102, 4,141, 39, 79,157, 61,164,121,139,182,184,126,245, 34,114,179,179, 54, 1,177,118,197,160, 49, 66,234,139,174,239,
+244,131,201,194,162, 99,183,126, 56,125,252,200, 20,148, 78,158,120, 93, 48, 12,205,125, 62,110,184, 48,183,200, 44,204, 85,155,
+144,145,103, 64, 98,182, 14, 71,247,111,181,219,108, 71, 49,116,203,206, 77,107, 9,199,175,184,144,230, 91,203,219, 36, 52, 25,
+100,113, 79,158, 52,252,116,212, 71,194,186, 1, 65,180,170,200, 4,149,218, 12,149,218, 12,157,209,138,250, 62,181,105,147, 77,
+208,182,186,105,245,112,146, 10,127, 62,145, 8, 71,185, 0,237,130, 93, 95, 59, 8,155,227,184,191,197,213,162, 18,203,213,253,
+ 68, 53,164, 34, 6, 98, 33, 3,137,136,134,149, 37,118,142, 69,182,225, 19, 70,125, 32, 51, 91, 9,242, 52,102, 48, 52, 5, 47,
+ 55, 87,137,175,119, 32,182,173,252, 28, 0, 48,238,235, 13,248,116,204, 72, 4, 5, 6, 64,173, 46,150,125, 58,105,234,106, 0,
+118, 9, 44, 66, 8,217,115,244, 74,200,157,168,148,233,159,140,250, 88, 56,108, 64, 39, 58,242,169, 6, 89, 5, 38, 60, 77,208,
+195,108,173,222,106, 52, 54,182,196,231,187,253,192, 9,200, 69, 12, 84,234,146,199,101,209,250, 3, 80,202, 4,200, 46, 52,131,
+227, 42,181,222, 85,170, 71, 42,178, 58, 85, 7,207,139,176,202,206, 83, 20,117, 98,214,172, 89,223, 0, 32,179,102,205,250,166,
+236,120,233,210,165, 6, 0,153,246, 10, 44, 84,228, 22,116,107, 60,168,189, 76, 44, 61,187,107,253, 55,178,243,113, 4,235,206,
+222, 69,223, 54,222, 16, 9, 40, 72,149, 94,184,151, 88,132,243,231,143, 22, 95,141,184,105,164,104,107,149,211,162,100, 94,129,
+ 97,114,137,226,207,159, 54,239,180,121,122,121, 97,223,181,194,204,124,173,205,250,183,123,202, 74,221, 57,243,139,191,141,179,
+246, 54,230, 36,220,174,234,205,155, 35, 68,180,116,227, 49, 16, 66, 0,142, 5, 7, 14,140, 72,162,168,221,234,163, 28, 80, 0,
+203,114, 82, 1, 67, 27,159,249, 65, 74,134,166,244,212, 91,251, 90, 84, 85,195,142,114, 33,246, 95, 78,135,186, 32, 51,175,191,
+251,233,191,202,196,213,233,104, 73, 66,243,230,205,212,173, 91,183, 46,146, 72, 36, 96, 24,230,117,234,248,141,196, 85,197,136,
+180,230, 37, 97,217,161, 67,210, 1,125, 20,161,173,197,148, 16,205, 27,122,227,210,217, 35, 92,196, 31, 91, 7, 27,114,227, 79,
+218,107,226,213, 26,109,200, 44, 48, 32, 35,207,128,172,194, 82, 11, 86,129, 9, 20, 5, 24,205,111,182,124,141, 33, 55,254,248,
+238,221, 91, 55,153,172,152,216,177,231, 32, 76,159,255, 83,192,238, 77, 43,174, 38, 19, 91, 75,189, 42,225,161, 93,111, 92, 41,
+ 41,166, 61,123,246, 68, 22, 23, 23,247, 88,189,122,181, 54, 56, 56, 88, 44,147,201,242, 1, 72,227, 99, 99, 69, 23, 78, 29, 76,
+ 82,101,102, 78,176, 90,173,183,237, 77,151, 95,231, 81, 18,153, 37,114,188,159,188, 93,175,122, 94,114,248,201,117,189, 26, 42,
+239,255,144,223,109,234, 18,213,133,117,185, 89, 38,219,185, 2, 61,154,102,104,133,127,218,213,217, 88,204, 41, 31, 78,152, 5,
+134,166, 96, 49,153, 83,158,185, 35,156, 36,152,191,251, 17, 28,100, 66, 40,101, 66, 56,200, 4,104, 31,236,138,106, 24,136,136,
+213, 70, 96, 48,219, 96, 48,177, 48,152,108,112,171,237,140, 95,119,133, 35, 85,101,192,177,219,121,120,156,172, 65,160,175, 2,
+132, 84,109,119,226, 8,171,251, 96,252, 28, 7,134,166,193, 80,160, 27, 6,212, 65,129,214, 12,145,128,134, 88, 44,134, 92, 42,
+128,163, 92, 8,161, 64,136, 91, 15, 30,192,100, 50,161,117,235,214,210,170, 28, 14, 14, 74, 25, 26,248,251,192, 98,181,225,212,
+149, 24, 44,154, 54, 24, 61, 58,181,192, 87,140, 24,143, 77,205,224, 80,195, 1, 28,197,192, 98,227, 96,178,178, 0,168,202, 4,
+112,187,210,184, 8, 35,128, 27,217,177, 71, 82, 89,102,224,248, 63,206, 94,216,221,191,111, 79, 68,222,143,198,161, 35,199,174,
+230,185,170,103, 60,111,149,192,223,179,224,162, 95,179,185, 82,132,166,167,181,109,223, 5,218,194, 92,228,164, 37,217,221,169,
+135,212,118,192,151,211,166, 52, 8, 10, 10,106,192,114, 4, 28, 71, 16,226,231,128, 9,147, 38, 53,168, 31, 16,216,128, 43,157,
+ 69,216,208,215,161, 82, 30,133,103,208,228,197,171, 55,126,236,235,235,139,211,215, 30, 97,233,156,137,145,114,185,178,110,139,
+ 26, 14,206, 92, 80, 83, 36, 70,157, 67,141, 58, 69,112,244,108, 80,107, 64,143, 81,181,250,188, 59, 8, 15,239,223,197,218, 31,
+ 22, 70,232, 24,217, 18,123,210,170,240,240,119,111, 26,214,234, 67,199, 26,158, 40, 84,107,161,116,241, 64,112,147, 22, 31,198,
+220, 55,125,173,203, 77, 84,189,238,179,206, 17, 2,147,133, 67,129,214,130,116,149, 1, 73, 57,122, 36,101,235,193,113,132, 60,
+239,162,174,188, 63,166, 40,133, 68, 32,168, 97, 77,168,253,224,207, 11,196,207,215,147, 90,177,112, 38, 99, 33, 18,228,170,205,
+ 80,105,204, 80,169, 77, 80,105, 74, 4,150,139, 82, 0,142,112,213,158,157, 81,160,181,192, 65, 38,128,147, 66, 4,150,125,253,
+152,239,249,107,246,181, 75, 87,105,187,255,176,104,142,232, 94,146, 14, 15, 18,213,144,136,232, 18,235, 85,169,192,178,215, 45,
+204, 8,232, 41,239,190,211, 26,105, 42, 35, 4, 12, 13, 1, 67, 35,160, 81, 24,220,228, 28,186, 15,155, 5, 0,232,223,183,100,
+ 25,146,196, 44, 29,142,223,200, 2, 0,145,189,105,205,205,211, 72,143,156,139,156,186,239,215, 21, 98, 35, 43,196,198,147,201,
+ 48,154, 89, 72, 68,165,110,119,113,245,198, 55, 27, 91, 98,193, 74, 83, 89,160, 51,177,208,232, 45, 32, 4,184,149, 80, 12,189,
+137,133, 90,111, 65,155,160, 26, 85, 62,115, 85,140, 79,253,222,200, 67, 85,114,191, 10,127,199,105, 85,105,193, 90,186,116,105,
+244,210,165, 75,203,181,136,217, 35,176,202, 23, 87, 34,233,217,157, 63,126, 35,251, 51,150,224,210,131,124, 12,237, 88, 11,249,
+185,233,216,178, 97, 29, 71, 8, 32,145,138,179, 89, 27,247,135,145,179,205, 84, 63, 56, 81,169,223, 87,238, 22,220, 68, 42,150,
+ 92, 88,186,118,147,197,203,187, 22,119,248, 70, 81,174, 90,207,190, 96, 43,100, 77, 38,154,112, 68,100,204, 73,176,107, 80,164,
+105,202, 50,127,202, 96,112,132,224,187,117, 7,176,116,250,112, 40,165, 2, 57, 69, 81,114,157,209,134,105, 11,183, 98,245,220,
+ 49, 14,114,137,160, 84, 24,176,152, 56,229, 43,251, 68,128,137,133,174, 48, 59,191,177,118,205, 75,226,170,185,186,101,203,150,
+ 69, 46, 46, 46, 80, 40, 20,175, 35,176, 94, 17, 87, 94, 94, 94, 62,114,185,188, 70,153, 53,140, 97, 24,176, 44,171, 75, 72, 72,
+120,173, 69,223, 52, 69,121,191,103, 38, 69,181,110,223,229, 93, 92, 62,251, 59, 23,113,106,203,224,234, 76, 49,119,118,114, 76,
+187, 27,147, 18, 12, 40,145,145,111, 68,118,161, 17, 89, 5, 38, 88,108, 28,252, 60,229, 72, 79, 75,133,179,147, 50,205, 94, 62,
+153,103, 64,111,154, 48, 19, 56, 10,191, 26,114, 98, 79, 1,128, 46, 51,102,210,129,221,155, 30, 70, 71,223, 95,219,111,248, 20,
+113,143,247, 38,137, 54, 47,251,108, 22,128,225,118,119, 14,185,185,250, 99,199,142, 69,248,248,248,244,251,238,187,239, 76, 0,
+196, 38,147, 73, 62,102,204, 24,121, 74, 74,202,151, 0,236, 74, 99,135,209,219,220, 40, 41,233, 45, 34,198, 17,126,114, 93,207,
+110,157,218,162, 93,168, 47,210, 59,181, 5,128, 47, 82,244,202, 64, 83,189, 95,247, 91, 89,252,177,113,199,169,165,227,134,117,
+251,114,183, 96,254,234,172, 19,243, 43,181,136,197, 93,221,214,171,188,174, 67, 88, 26,248,254,188,192,178,177,164, 58, 46, 56,
+ 98,101, 57,232, 77, 54,232, 77, 54,104,141, 86,156,191,151,139,156, 34, 51, 10,117, 22, 24, 77, 44, 8, 0,139,149,148,173, 42,
+ 82,185, 88,141,216,233, 92,246,189,102,216, 48,245,186, 5, 83, 28, 15, 93, 75,135, 66, 82, 18,143,229,164, 16,195, 81, 46, 4,
+ 64,112,233,210, 37,148, 77,143,175,234, 45,254,208,233, 91, 88,189,227, 2, 78,111,157, 9,169,152, 65,211, 65, 11, 48,106, 80,
+107,112, 28,193,147,216,168,156, 6,193,205, 60,105,165, 28, 52,141,178,152,148,202,202,211, 21,192, 49, 0,253, 0,188, 11,128,
+168, 98,142, 22,254,206,230,235, 46,156,220,167,208, 25, 76,182,194,148, 71, 63, 65,151,215,185, 44, 9,165,111,192,151, 0,116,
+122, 93, 99,182,204, 35,112,221,167,147,166, 13,173, 95,191, 30, 14,236,221, 6, 66,168, 67,246,222,188,251,120, 4,214,172,125,
+113,198,224,132, 73,147, 26,108,222,184,241,133,115, 31,143, 25, 95,217, 44, 66,202,217,221,123,102, 80,195, 16,220,136, 78,199,
+138,121,147, 35,141,185,137, 35,204, 74,215, 9, 22, 93,214,191, 66, 66,155,193,203,211, 21,217, 89, 57,232, 58,176, 7,250,244,
+234,133,135,247,239, 98,209,183, 95, 69, 64,111,238, 89,149,213,246,111, 33, 36,156,216,165,215, 32,161,222,100,193,250, 21,223,
+ 98,194,140,197,104,211,181,191, 48,234,222,205,137, 0, 22,216,155,103,179,149, 67,215, 38,238, 48, 91, 89, 88,172, 28,142, 37,
+ 50,130, 87, 45, 5,128,128,161,233,102,245, 74,220,187, 26,131,181,242, 74, 16, 80,217,133,154,226, 58, 63, 45,158,202,232, 76,
+ 44, 84,106, 19,114,139,204, 80,105, 76,200, 83,155, 74,196,149,218,140, 60,181, 9, 2,134, 66,124, 98, 6, 24,134,170,118,252,
+ 93,145,206,130, 86,129, 46, 0, 40,208,175,233, 14,201,179,185,247,185, 31,151,222,125,197,194, 57,162,123,137, 90, 60, 72,210,
+148, 10, 43, 26,226,231, 4, 22,103, 71, 8,150,123,112,255,118, 35,134,244,109,228,168,144, 34, 35,182, 24, 2,154,130,128,161,
+224,232,238, 11, 39,169, 17, 83, 38, 79,128,107, 13, 39,164,230, 25,177,238, 72, 28, 30,196, 36,128, 51, 84, 47,219, 27,246,156,
+ 30,252,241, 71,195, 36,180, 80,138,221,103, 19, 33, 22, 49, 16,192,140,152,155, 87, 76, 57,233, 73,150, 98, 77,145, 66, 32, 16,
+218, 69, 74, 1,196,198,114, 32,132, 96,201,247,179,241,219,142, 13, 56,125, 39, 7, 4, 37, 75, 53,252,117,120, 21,166,205, 90,
+ 4,149,198, 12,128,122,109, 5, 75, 81,212, 73, 66,200,187, 47, 11,161,151, 69,210,115, 22,168,242, 56,110, 63,207, 81,118,125,
+ 69, 2,238,249,152, 44,216,185,216,182,160, 28,165, 72,149,137, 43,169, 88,124,118,199,186,217,178,243,113,120, 38,174, 12,218,
+ 60,236,218,186, 89, 75,192,189,147, 27,125,236,150,189, 5, 34,119,111, 16, 42,145, 75, 46,207, 89,180,206,228, 83,203,223,118,
+234,158, 38,191,216,200,190, 98, 6, 17,201, 21,172,194,201,221, 40, 16, 75, 86, 11, 13,230,111,243,242, 30,233,170,170, 82,142,
+ 16, 28,191,153, 13,112, 37,149,120,224, 74, 70,201, 58, 62, 12, 5,150, 43,241,115,159,139,204,125,118,206,190, 10, 4,246,159,
+141,204,171, 72, 92, 57, 59, 59,195,217,217, 25, 74,165,178,186,109,163, 92,203,149, 92, 46,175,113,230,204, 25,169,163,163, 35,
+ 24,134,129,201,100, 66,143, 30, 61, 94,171,241,201, 61, 2,135,183,233, 54,120,105,135,174,239,226,226,153,195, 92,196,169,237,
+ 67, 12,170,106,172,223, 3,160, 79,167, 38,199, 87,172, 90,239, 63, 99,214, 28,137, 66, 42, 64,161,214, 2,134,166,224,231, 33,
+131,171,146, 65,196,133, 19,198, 17,189,155,217, 45,254,124,107,213,217,181,106,221, 38,215,213,203,191,239,121,239,170,217,179,
+168, 40, 73, 3, 0, 6, 85,252,166,184, 40, 42,182, 86,237,179,151,155,118, 26, 12,143,154, 1,125,147,114, 98,171,149, 95,149,
+ 74,149,123,248,240,225, 71, 33, 33, 33, 45,134, 12, 25, 66,150, 44, 89,226,146,158,158,126,208, 94,113, 5, 0,221,122,181,155,
+166, 16, 90,219,186,202,232,144,122, 94,114,180, 11, 45,241,126, 14,123,183, 3,106,249,214,198,211,108,125,179,124, 3, 39,210,
+ 89,133,245, 54,110,218,118,219,175,134, 96,156, 77,107,136, 1,112,180,218,157, 3, 74, 59, 73,121,169,184,146, 10,160,148, 9,
+193,145,146,223,236,183, 96,113, 48, 91, 56,232,205, 54,232, 77,108,137,216, 50,179,224,184,146, 96,101,138,162, 96,177,178, 85,
+190, 13,150,215, 75, 58,186,184,193,191, 78, 73, 26,159,125,100, 66, 80, 20,224,238,238, 14, 87,215,170,215, 29,229, 56, 14,102,
+139,173,116,208,101,159, 77,234, 48, 91,108, 32,132, 32, 46, 46,126,102,114, 98,242,192,128, 6,245, 59,133, 52,105, 86, 67, 38,
+166, 81,106,157,170,236,173,118, 4, 0, 43,158, 91, 51, 77,200,192,120,228,240, 33, 69,191,254,253, 11, 45,186,188,231, 39, 75,
+ 48, 0,122,151,138, 49, 67,117,171, 73,225, 30, 56,200,197,181,198,226,145,163, 39, 4,118,125,167, 23, 46,157, 63,135, 99,135,
+247,237,212,171,226,206,218, 75, 18, 20, 20,244,202, 44,194,250, 1,129,175,204, 34,172,227,223,160, 66,129,229,228,212,196,177,
+ 73,203, 46,190, 41,121, 22,252,241,199, 41,232,212,217,243,204,102,173, 30, 66,178,229,207,195,191,140, 29, 49,241, 59,199, 54,
+ 45, 91,192,217, 65, 14, 55, 23, 37,238,222,137,192,242, 5,115, 34,160, 55,247,172,186,255, 44, 69,112,176,168,166,204,119,170,
+ 95,189, 70,184,123,243, 26,158,196, 69, 69,223,187, 29,209, 40, 32,180, 53,220,125,252,166,166,184, 49,203,240,232, 81,149, 59,
+ 85, 16,150,164,127, 50,254, 95,165,131, 94,201,185, 54, 77,253,197,175, 54, 66, 10, 54,171,133,221,189,121,121,238,243,179, 8,
+ 43,226, 53, 22, 23,133, 95,189,249,240,171, 1,189, 58, 82,101,174,192, 50, 81,245,242,113, 64, 77, 5,158, 60,124,204, 89,117,
+234, 67,213,171,114,146, 51,105,242, 23,178,146,180,115, 32, 37, 11,171, 85,183,221,192,200,138, 62,220,248,253, 55,212,253,100,
+ 29, 30, 38,105, 74,220,130,165, 2, 75, 34, 98, 32, 46,253, 75,136, 29,250,130,166, 87,124,252,126, 47,228,169,205,224, 8, 41,
+ 93, 75,143,130, 64, 32, 68,138, 6, 72,211,104,161, 42,202, 65, 98, 82, 50,212,217,137,160,105, 6,174, 53, 3,160, 79,181, 47,
+173,197,172, 50,208,202,161,254,251,253, 58, 50,191, 95,207,130, 76, 34, 64,113, 94, 26,174,157, 57, 96, 32, 44,187,201,108, 53,
+255,230, 65,196, 81,143,162,194, 45,118,118, 29, 42,141,206,236, 41, 17, 49, 56,176,253, 39,124, 48,106,210, 51,107, 54, 0,124,
+ 53,103, 33, 40,138, 66,161, 90, 11,128, 82,217, 97,185,122,254, 88,245,156,229,233,149,227,231, 68, 81,121,199, 84,233,177,185,
+ 2, 14,243, 75,162,202,252,210,121,243, 75,124,118, 45,142, 92,161, 5, 75, 72, 51,231,182,175,253, 70, 26,157, 43,193,173,199,
+217, 24,218,177, 22,244,154, 60,108,254,121,141,214,104,181,244,201,139,178, 95, 92,149, 54,148, 94, 31,140,153, 30, 93, 47, 32,
+216,124, 62,170, 56,177, 72,103,173, 48,142,161,245,208,111,162, 35, 79,254,212, 87,109, 77,156,172,240, 14, 97, 57,155,109,133,
+ 65, 21,247,125,249,157, 56, 17,127,183,238, 64,137,184,226, 56,124,189,124, 23, 8,199,150, 46,224,199,130,176, 28, 62,159,183,
+ 1,182,210,239, 44,199,130,178,178,242,170,146,171,148,138,206, 54,214,174,113,122, 89, 92,133,133,133, 21, 57, 59, 59,195,213,
+213, 21, 46, 46, 46, 40, 19, 68,111,234, 22,164,105, 26, 74,165, 18,151, 46, 93,130, 82,169,132, 66,241,122, 11,228, 43, 60,130,
+ 62,104,213,109,208,158,174,253,199,208,127, 30,217,204,222,188,116, 98,168, 81, 21,107,183, 8, 96, 89,150,178, 90,173,232,213,
+165,121,202,189,216,212,211, 11,191,255,190,119,203,110,239, 73,218, 5,121,192, 96,182, 33, 61, 45, 13, 17, 23,143, 25, 3,106,
+187,157,110,215, 34, 48,221,106,181,130,101,217, 42, 7,112,147,201,156, 79, 11,165,174,195,134,127, 40,185,125,235,214, 30,185,
+ 71,224, 62,154,225,238, 19,150,105, 2,194,125,208,164,113, 48, 44, 54, 14, 6,189,166,224,117,242, 29, 29, 29,125,123,213,170,
+ 85, 65, 66,161,176, 86,120,120,120, 94, 97, 97, 97,181,182, 11, 58,119,242,214, 58,129,210, 26, 95,102,193, 74,235,216, 22,195,
+251,117,192,111, 39,175,225,226,149, 8,164,232,149,247,116,102,230,247,244,244, 76, 83,136,139,250,240,160,246,117,153, 67,187,
+ 52,135,162,187,204,124,159, 16,217,185,188,203,243,237,158,224, 65, 81,128,198, 96,125,206,130, 85, 18,223, 68,211,148,221, 22,
+ 44, 10, 72,188,114,253,110,104,243,192, 96,220,123,170,129,170,208, 4,189,185,164,221, 19, 16,184, 58,138, 32, 17, 49, 72, 73,
+ 74, 4, 71, 44, 73,213, 27,103,160,234, 51,116,130,160,244,245, 69, 32, 20, 10,158, 5, 68,200,164, 98,173,135,135,135, 93, 2,
+203,202,178, 24,210,171, 53,218,180,108,130,129, 19, 87, 1, 0,206,239,252, 26, 46, 74, 17,194,195,195,145,246,215,218,221,254,
+109, 39,158,141,122, 24,243, 94,116,228,245, 15,251, 52,151, 53,243, 18,100,137, 42, 81,197, 71, 75, 93,132, 93, 1,244, 40,181,
+ 76, 89, 89, 27,151,218,187,119, 47,142,101,185,231, 99, 34, 92, 0,180, 5, 80, 0,224,110,169, 40,171,228, 5, 48,232, 29,208,
+216, 7,138,146, 42,101,242,148,186,117,235,249,180,108,211,218,105,208,144,247, 33, 22,137,241,231,185, 51,248,113,205,178, 3,
+218,172, 71, 99,170,229, 30,179, 51,160,189, 50,119,145, 90,237,164,139,139,185, 87,152,152, 99,118, 17, 56, 55,128, 80,226, 48,
+129,114,242, 89,199, 72,148,223,213,108, 51,202,241,252,181, 91,136,190,119, 29, 62,110, 50, 36, 62, 73,208, 71,221,143,220,160,
+167,132,223, 35,239,145,222,222,116,202,243,217,247,218,140,236,237, 98,180,176,184,122,225,164,145,179,113,189,111, 92, 62,245,
+196, 55,176,165, 52,180,101,119,151,188,163, 91,134,232,129,223,170,226, 73,190,181,231,149,208, 11,134,188,159,121,234,220, 21,
+165, 79,237, 0, 6, 20, 13,147, 65, 7, 85, 74,148,205,168,201,209,231, 70, 29,245,177, 43, 28,192,150, 49,239,219,101,155, 38,
+ 55,111,218, 72, 65,136,248, 5,139, 85,217,247,252, 98,115, 73,204,172,174, 8, 79, 31, 94, 51,170, 18,212,179, 43,239,235,172,
+242,252,252,130,103, 83,243,101, 90,231, 58,106, 39,181,228,217,176,206, 0, 78,106,231,103,150,138,252,252, 2, 49,203, 90,229,
+246, 60,158,206, 14, 82, 60, 76,202,124, 22,208, 46, 17,209,165,177, 87,127, 91,178,236,124,206,155, 11,196, 10,100,228, 27, 65,
+ 19, 2,142,179,193,102, 53, 67,171,209, 32, 51, 35, 27, 57, 57,185,208, 22,171, 33, 83, 58, 35,180, 89, 11, 56, 56, 56,224,209,
+157,139, 0,168,227,118,137, 65, 78,212,160,101,139, 22,194,232,228, 98, 88,172, 28,132,176,224,234,233,253, 70,155,213,220, 63,
+ 55,234,232, 5,192,142,173, 68,158,119, 15,114,228,207,168,216,148, 70,190,110,222, 84,228,211, 34,236,250,101,125,201,108, 82,
+ 91,137, 53, 51, 58, 85,135,204,124, 29, 50,210, 82, 8, 56,246,207,234, 60, 75, 20, 69,221,174,236,248, 53, 45, 97,111,204,241,
+ 90, 2,203,102,179, 73,107,251,213,193,240, 9, 35,177, 97,195, 70,196, 61, 77,193, 47, 63,175, 45, 17, 87, 15,127,255,203, 78,
+254, 80,148,174,149,161,207,137, 93, 97,116,105,149,126,252,126, 33,109, 48, 19, 91,229,157, 93, 93,116, 28,179,250,140,161,184,
+ 64,204,154,244,130,227,187,199,236, 43,143, 19, 0, 24,154, 50,151,186, 5, 65, 81, 20,202,220,130, 27, 22,140,131, 92,194,128,
+162, 40,232, 77, 54,124,252,229,106,236, 92, 93,242,102,245,233,228,233,250,138,210, 89, 38,132,190,108, 27, 79,141,238,237, 63,
+ 96,209,214,152,163,215,146, 93,159,190,251,110,103,117,179,102,205,138,100, 50, 25, 20, 10, 5, 28, 29, 29,225,232,232, 8,103,
+103,231, 42,243, 94, 10,207,170, 98,174,104,154,134,163,163, 35,100, 50, 89, 69,194,237,101,206, 23,197,149,103,131,247, 91,117,
+ 25,184,175,219,128,177,244,159, 71,126,225,238, 92, 58,254,190, 81, 21,247,187,189,117, 84,106,117,184, 63,100,200,144,198, 19,
+ 38, 76, 16,125, 51,121,200,153, 51,151,238,198, 29, 62,119,168,127, 65, 81,177, 47, 33, 4,206, 78,202,180,161, 61, 26, 31,239,
+216, 50, 40,229,252,249,243,220,190,125,251, 76, 20, 69, 61,172, 42,157,121,121,185,219,207,159,191,176,188, 83,231, 46,248,101,
+199,190,119, 99, 98, 30,189,251, 36, 33, 30,190,126,245, 80,183, 94, 3,232, 41,103,156,191,124, 21,197, 5, 57,219,237, 44,207,
+191,127, 8, 13,173,201, 48, 76,173,162,162, 34,227,188,121,243,130, 88,150, 61, 22, 26, 26,218,130,227,184,172,152,152,152,116,
+123,242, 30,177,251, 99, 21,128, 93,126,157, 71, 29,204,180, 20, 77, 5,176,204,183,118,109, 92,188, 18,129, 27,127,221,220,152,
+ 39,175,253,253,232, 15, 63, 25, 87,199, 85, 56,110, 96,187, 58,140,135,139, 28,123,127, 89,197, 28,189,158,188, 38, 57,223,250,
+235,242,203,243, 23,217, 83, 71,101, 40, 40,182,160,125,136, 43,108, 54, 2,150, 16,208, 20, 5, 7,153,160, 34,129,245, 10,167,
+192, 44, 25, 51,105,226,132, 39,161, 77,154, 77,251,112,212, 4, 81,179,250,181,113, 43,190, 16, 0, 5, 87, 71, 57, 50, 51,179,
+112,245,216,175,182,194,140,199, 27, 25,134, 91, 80,157,242,204,136,220, 31, 80,246,221,203,203,107,252,189,168, 40, 92,186,116,
+ 9,174,174,174, 40, 19, 87, 21,184, 8, 95,224, 44, 44, 44,254,107,225,170, 95,219,143,251,104, 32,250,117,105,132,203,183,159,
+192,108,229, 96,177,113,207,130, 92, 19, 35, 54,137,167, 14,171,103,158, 60, 36, 80,163,183,138,147,191, 75,214, 92,198,139,139,
+200,190,156, 78, 51,128, 51, 0, 90, 3, 24, 8,224,236, 75,123, 12, 82, 40,137,187,106, 4, 32, 2, 64,162, 93,121,167,177,247,
+238,237, 59,174, 22, 27,135,171, 55,239, 7,119,107,223, 12,132, 35,184,125,251, 14,182,108,219, 98,124,248,224,222, 74, 93,142,
+215, 2, 84,188,101, 76,185,229,105,239, 44,194, 10, 4, 86, 41,231,101, 91,118,114,208,198,235,215, 46,207,145,248,180, 64,195,
+190,223, 12,200,184,127,108,128, 87, 72, 47,184,213,111,143,204,251,191, 35,242,175,189,167,238,216,108,179,164, 28,157,162,207,
+139,213,217,251,188,151, 65, 34,149, 79,105, 20,214, 25,105,169,201, 72,138,143,218,105, 44, 72,200, 76,121,194,236,204, 72, 79,
+153, 88, 55,164, 61,174,157,249,237,139, 74, 4, 86,165,109,222, 77,172,222,120,233,218,245,225, 25, 7,143,121, 22,107, 13, 50,
+129,128,214, 75, 24,228,136,244, 79,246,219,157,206, 71,143, 44, 69,245, 28,135,124, 56, 97,238,201, 53,203,231, 9, 61,156, 37,
+200, 46, 52, 66,163,183, 66, 99,176,130,161,128, 0, 31, 37, 12, 58, 13,110,156,218,101, 37,150,130, 33, 64,164,181, 34, 78,183,
+144, 1,139,140,249,137,159,207,157, 59, 27,140,216,209,167,110,183,217,150, 18, 85,254,210, 98,230, 53,128,186,254,179, 97,210,
+100,245,159, 59,119,118, 16, 33,164,187, 91,200,128,226,231,246, 34, 44, 55,239,249,197, 22,124,212,213, 23,102,107,201,250, 97,
+ 44, 91, 18,107,199,149,174,106,142,202,237,202,207, 56, 9, 32, 58,112, 50, 2, 25, 57,133, 48,152,172, 48, 91,108, 48,219, 88,
+208, 52, 3, 23, 23, 23, 4,248,135,193,217,201, 17,185,121,249,184, 29,113, 13, 55,226,238, 37, 18, 96, 81, 94, 13,245, 30,123,
+234,136, 18, 40, 2, 60, 61,220,168,156, 98, 51,164, 18, 6, 55, 46, 93,182, 2,216, 94, 38,174,170, 51,118, 0,128, 90, 95,180,
+122,214,194,117, 35, 54,172,250,206,171, 73, 93, 71,164,229, 25,145,174, 50,160,216,104, 3, 64, 96, 99, 9,204, 70, 53, 98,111,
+159,206,182, 65,191, 26,255,112, 84,108,193, 18, 10, 77,183, 31,196, 73,102,205,255, 1,143, 18, 18,177,101,227,122,157,169,122,
+226,234, 21,108,255,204,255,183,127, 71, 38,202,115, 11,114,132,224,248,141,236,103,219,126,148,185, 10,239, 38, 20, 85, 69, 39,
+252, 97, 74,179,153,101, 66,232,199, 35, 25, 55,254, 31,123,247, 29, 30, 69,185,254, 13,252,187,187,179,125,211,235,166, 27, 82,
+128, 64, 40,161,183,208,133, 32, 45, 8, 10,210,132, 35,130,192, 81,218, 15, 57, 82,130, 98, 59,162, 20, 11,138,116,233, 77,138,
+ 84, 67, 12, 72, 21, 66, 66, 32,164, 39,164,215,205,166,109,159,221,121,255,128,228, 32, 39,101,131,250,158,115,224,254, 92, 87,
+ 46, 72, 50,251,205,204,236, 51,179,247, 60, 83, 30,137,164,204,146,147,147, 83,177,123,247,238,250,162, 71, 32, 16,160,238,122,
+ 41,131,193,208,236, 93, 69,142,118,226,246, 83, 34, 94,120,181,177,226, 74, 32, 16,192, 98,177,212,247, 94,181,244,212,163,220,
+181,245,208,110, 3,198,238, 27, 52,230,111,252,232, 31,191,183,220,252,229,248,248,218,210,148,163, 45, 93,151,106,181,250, 46,
+128,212,181,107,215,118,222,178,101, 75,171,197,139, 23,103,124,255,241,236,141, 15,143,224, 30, 30,203,196,197,197,113,115,230,
+204,209,235,116,186,204,138,138,138, 91,176, 98,144,107, 77,113,242,218,237,223,252,179, 77,110,126,225,244,192,246, 61,224,226,
+223, 29,202,192, 30, 80,213, 24,113, 61, 45, 31, 25,247,162,145,116,229,208,126,109,169,251, 71, 64,138,213,243,219,169, 83, 39,
+ 95, 62,159, 63,138,227,184,214, 10,133,194,159,227, 56, 49,195, 48, 19,120, 60, 94, 42,203,178,247, 66, 66, 66,162,147,146,146,
+172, 30, 51,236, 65,236, 14,189, 95,255,233, 27, 30,104, 20, 3, 50,138, 52, 97, 15, 52,138, 56,141,196,126, 97,233,133, 13,250,
+ 29, 2,175,117, 48,149,223, 61,180,179,242,200,158,205,159, 11, 38,207, 90,100, 78, 84,217,189,205,216,200, 90,212, 91,198,231,
+241, 10, 23, 47, 94,242,175,199, 52,240, 30,158, 24,124,244,200,134, 2,107, 50, 30, 61,211,104,105,194, 61,225, 87,137,239,204,
+254,160, 67,183, 62, 83,250, 15,127,149,111, 35, 82,224,252,209,111,185,204,132,152,131, 12,103,126, 79, 91,154,145,249, 71,183,
+ 47,131,193,240,187,194,202,154,222, 43, 0, 40,117,174, 28,240,211,185, 95,166,159, 60, 19,251,113,196,208,190,206, 95,175,120,
+ 5,255,252,238, 24,108,228, 18,112, 22, 51, 94, 25,232, 51,126,229,223,218,142,242,113,151,122, 29,142,201,187, 56,111, 93,226,
+ 82,141,198,152,130,230,199,189,227, 0, 92, 3, 16, 4, 96,212,163,233, 21, 0,106, 1,212, 60,250,253,143,143,190,183,154,145,
+181, 32,171, 88,135, 99, 71, 14, 33,254,122, 52,146,146,146,171,147,238, 37,125,201, 99,184,117,181,197,169, 42, 32,181,197,235,
+206,220,224, 29,131,104,248,206,194, 38,212, 10,100, 31,197,157,252,108, 64,240,160,191,247,114, 14,236, 3, 71,191,135, 53,101,
+101, 94, 34,114,127, 59,116,172,186, 64, 52, 1,184,107,170,125,202,247,216,211,167, 85,176, 69, 32,198,149, 95, 78,129,179, 88,
+ 54, 1, 0,103,177,108,186,253,235,169,217, 61, 34,102,194,201,205,175,147, 58, 39,174,201, 71,249, 52, 70,198,176,149, 63,237,
+248,232, 96, 86, 86, 22,238,223,191,143,180,180, 52,168, 84, 42,236,217,115,169, 69,207,106, 42,205,184,122,158, 39, 96,134, 77,
+122,253,157, 19,145, 47, 71, 74,125,253, 3,249,109,188,237,224,108,203, 32, 57, 61, 31,233,137,169,150,180,132,139, 58, 78, 91,
+ 50,182, 52,253, 74,163,189, 35, 46, 33,227,221,249,124,211,187,209,199, 31,142, 45, 56,100,204,140, 54,255, 55,111,113, 79, 39,
+103,199, 6,247,227,170,242, 10,113, 84,212,202, 54,117,211, 55, 55, 22, 33, 95, 32,168,158, 53,123,190,130,207,227,215,159, 6,
+228,234, 86, 91,221, 63, 28, 7,240, 0,145,144,105,246, 45,155, 30,217, 23,172,197,130, 26,173, 17, 53, 26, 35,212, 53, 58, 20,
+149,169,113,247, 94, 58,110, 92, 58,141,172,244,180,106,150,101, 99,192,225, 72,169,115,229,254, 6, 30,172,219,120, 15, 43, 4,
+190, 78,142,182,200,170,208, 65, 38, 98, 80,144,147,198, 26, 89,221, 83, 63,100,189, 60,254, 68,161,160,253,232, 23, 95,127,235,
+ 31,103,194,195,251,217,117, 12,235,170,112,177,179,133,136,225, 33, 61,167, 24,119,226,126,171,125,144,114,187,202,108,210, 14,
+ 47,191,123,226, 15,143,210,242, 63, 91, 96, 25,205,236,144, 69,255,248,228,156,217,108,150, 49, 2,129,214,196, 89,134,255,145,
+226,234,175,194,113,150,188,183,222, 94,242,187, 3, 2,147,217, 34,251,219, 91,139,181,143, 31, 32,240, 76,102,121, 93,207, 21,
+199,113, 77,245,106, 8, 74,213,250,234,101,223,196,239,252,116,231,189, 67,120,248, 4,215,188, 63, 58,159, 21, 85,134,120,231,
+161, 7,198, 84,107, 88, 30,128,164, 6, 50,107, 7, 13, 26, 84, 95,108, 61, 58, 93,103,245,254, 82, 44,149,207, 30, 56,106, 6,
+ 63,250,216, 22,203,111, 49,199, 38, 60, 77,113,245,248,219,175,211,233,174,235,116,186,196,247,222,123,175,155,187,187,187,251,
+202,149, 43,165, 85, 85, 85,194,175,191,254, 90, 87, 86, 86, 86, 84, 85, 85,117, 21, 45,187,174,197, 82,145,119,231,245,159, 14,
+155,190,229, 29,218,250,162,163,155,215, 48, 7, 23,159,214, 21,165,121,233, 85,229,121,103,120, 22,156,175, 41, 77,185,218,210,
+ 25,141,143,143,207, 9, 13, 13,253, 81, 32, 16,120,155,205,102, 23, 30,143,103,195,113, 92, 5,203,178, 21, 22,139,165,176, 37,
+197,213,227, 69,150, 79,219,190,123,203,181, 22,177,145, 39,221,251, 32,118,135, 30, 0, 74,206, 47,209, 0, 56,142, 1,255, 23,
+121,236, 74,214,151,119, 43,236,230,151,198,254,243, 68, 75,243, 11,110, 31, 8,250,179,218,191,174,240, 94, 30,128,233,119,110,
+226,243,196,184,171,171,120, 28,132,102,176,107,180, 37,105, 55,255,140,124,161, 80,168,235,218,181,107,131,119, 11, 74, 36,146,
+166,159, 91, 22, 27,203,150, 0, 91,208,191,255,142, 51,209,151,166,159, 62,255,235,199, 61,123,245,117,150, 74, 60,225,231,104,
+196,142, 37, 93,254, 30, 29, 87,122, 99,244,146,139,223,100, 20,232, 18,208,244,245, 87, 13, 73, 3, 80,249,168, 39,107, 51,128,
+ 89,143,182,173,196, 22, 23, 2, 22,188,214,171, 87,247, 61, 60, 30,143,225, 88,203, 63,175, 10, 5,123,117,133, 73,121,248,131,
+195,135,116,244,183,195,172,217,179,131, 3, 2,255,117, 23, 97,251, 23,108, 49,121,250, 27,193,126,173,130,235,127,214,198,167,
+153, 3,170,194, 56,109,141, 91,232,208,228,115,107, 87, 56,167, 95,126, 75,230,228,109, 83, 91,150,173,170,200,190,185, 86, 83,
+226,190,182,129, 17, 26, 90, 36, 43,237,238,186,173,159, 47, 93, 92,152,159,190, 69, 83,154,250,240,172, 67,105,106, 98,210, 45,
+172, 40, 43,202, 91, 92, 94,146,177,246,105,215, 69,109,109,109,193,238,221,187, 29,250,244,233,195,119,119,119, 71,105,105, 41,
+ 98, 98, 98, 44, 22,139, 37,191,165, 89, 37,169,151, 98, 16, 16,224,180,119, 71,229, 63, 25,153,237, 8,214, 12, 79,142,227,192,
+240,121,133, 70,125,229,153, 82, 7,237, 18,220,185,214,100, 59,226, 44,102, 30,199,231,248,117, 99, 11, 90, 44, 22,222,103, 95,
+237,202, 22, 8,197, 13,158, 82, 53,155, 12,114,139,197, 98,245, 88,132,197,130, 7,206,161,166,182,205,223,197,199, 1,137,188,
+251,205, 28,156,114,103,123, 71, 76, 29,198,178,102,211,163,237,163,238,171,132,227,120, 23,192, 51,159, 43,115,170,190,218,146,
+162,234,119, 59,122,163,209, 1,124, 17,108,229, 38,240,193, 67, 85,101,165,196,213, 44, 78, 42,251, 3,109,169,228,238,241,187,
+ 37,253,251,251, 25,126,190, 48, 45,246,210,229, 9,156,197,226,111,230, 0,112,188, 44,131, 81,119,176,196,174,108,231,211,206,
+239,255, 26,222, 95,156,111,213,233,146,255,194, 76, 17, 0, 23, 60,124, 36,126,241,159, 60,159,141,142, 45,248, 71,150,221, 70,
+217,182,175, 68, 42, 95,162,209, 84,111,209,150,164,158,248,147,215,167,189, 68, 34, 9,179,177,177, 17,150,149,149, 93,127,244,
+161,246, 44,190,239,245,250,190,190,205,101,208,176,222,239,156,255,233,198,134, 71,167, 15,235,121,141,255, 66, 58,121, 68,248,
+194, 93, 71, 78,174,107,224, 46,194,255,249,101,255,203, 50,251,247,103,220, 42,236,166,155,205,150, 53,131,130,171, 53, 69,153,
+201,115, 46,221, 41,189, 14,160,250, 15,206,231,164,199,122,176,246,254,183, 44,187,107,251, 49,239,131,135, 16,171, 19, 56, 36,
+149,222, 61,182,178,217,249, 12, 9, 17,201, 75,225,168, 41,115, 41,127,138,194,234, 63,209,150, 4, 29, 58,116,232, 39, 18,137,
+124,205,102,179,220, 96, 48,104,180, 90,109, 86,118,118,246, 21, 52, 62, 32,249, 95, 58,159,110,161, 99,214, 9,133,194,183, 1,
+192,100, 50,109, 40, 73, 60,182,160,169, 23, 54, 49,253, 95,191, 62,199,143, 23,224,208, 33,243, 95,241, 30,121,118,126, 89,109,
+ 50,177,245, 99, 15,137,132, 76,101,254,237,195, 14,255,193,182, 68, 90,248,166, 82, 38,101, 82, 38,101, 62,137, 79,235,147, 50,
+255,147,153, 30, 33, 35,125, 60, 66, 70, 90,253,176,228, 70,166,167,245, 73, 26,197,208, 42, 32,132,252, 7, 88,104, 21,144,255,
+164,194,164,147,185,127,229,244,132,240,154,168, 66, 91,210,245,247, 52,149,108, 34,101, 82, 38,101, 82, 38,101, 82, 38,101, 62,
+119,153,205,101,211,169,199,191,168,240,162, 76,202,164, 76,202,164, 76,202,164,204,231, 47,243,153,194,167, 85, 64, 8, 33,132,
+ 16, 66, 5, 22, 33,132, 16, 66, 8, 21, 88,132, 16, 66, 8, 33, 84, 96, 17, 66, 8, 33,132, 16, 42,176, 8, 33,132, 16, 66, 8,
+ 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132,
+ 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,127, 29, 26,105,156, 50, 41,147, 50, 41,147, 50, 41,147, 50,159, 59,244,
+ 36,119, 66, 8, 33,132, 16, 42,176, 8, 33,132, 16, 66,168,192, 34,132, 16, 66, 8,161, 2,139, 16, 66, 8, 33,132, 80,129, 69,
+ 8, 33,132, 16,242, 95,131,135,198,239, 4, 72,108, 65,206,211,220, 77,144, 72,153,148, 73,153,148, 73,153,148, 73,153,207, 93,
+102,115,217,137, 32,127, 73,225, 69,153,148, 73,153,148, 73,153,148, 73,153,207, 95,230, 51,133, 78, 17, 18, 66, 8, 33,132, 80,
+129, 69, 8, 33,132, 16, 66, 5, 22, 33,132, 16, 66, 8, 21, 88,132, 16, 66, 8, 33,132, 10, 44, 66, 8, 33,132, 16, 66, 8, 33,
+132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16,
+ 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66,200, 95,136, 70, 26,167, 76,202,164, 76,202,164, 76,202,164,204,231, 14, 61,201,157,
+ 16, 66, 8, 33,132, 10, 44, 66, 8, 33,132, 16, 42,176, 8, 33,132, 16, 66,168,192, 34,132, 16, 66, 8, 33, 84, 96, 17, 66, 8,
+ 33,132,252,215,224,161,241, 59, 1, 18, 91,144,243, 52,119, 19, 36, 82, 38,101, 82, 38,101, 82, 38,101, 82,230,115,151,217, 92,
+118, 34,200, 95, 82,120, 81, 38,101, 82, 38,101, 82, 38,101, 82,230,243,151,249, 76,161, 83,132,132, 16, 66, 8, 33, 84, 96, 17,
+ 66, 8, 33,132, 80,129, 69, 8, 33,132, 16, 66, 5, 22, 33,132, 16, 66, 8,161, 2,139, 16, 66, 8, 33,132, 16, 66, 8, 33,132,
+ 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66,
+ 8, 33,132, 16, 66, 8, 33,132, 16,242, 23,162,145,198, 41,147, 50, 41,147, 50, 41,147, 50, 41,243,185, 67, 79,114, 39,132, 16,
+ 66, 8,161, 2,139, 16, 66, 8, 33,132, 10, 44, 66, 8, 33,132, 16, 42,176, 8, 33,132, 16, 66, 8, 21, 88,132, 16, 66, 8, 33,
+255, 53,120,104,252, 78,128,196, 22,228, 60,205,221, 4,137,148, 73,153,148, 73,153,148, 73,153,148,249,220,101, 54,151,157, 8,
+242,151, 20, 94,148, 73,153,148, 73,153,148, 73,153,148,249,252,101, 62, 83,232, 20, 33, 33,132, 16, 66, 8, 21, 88,132,128, 85,
+ 79,218, 0, 0, 32, 0, 73, 68, 65, 84, 16, 66, 8, 33, 84, 96, 17, 66, 8, 33,132, 80,129, 69, 8, 33,132, 16, 66,168,192, 34,
+132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16,
+ 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132, 16, 66, 8, 33,132,252,133,104,164,113,202,164, 76,202,164, 76,202,164,
+ 76,202,124,238,208,147,220, 9, 33,132, 16, 66,168,192, 34,132, 16, 66, 8,161, 2,139, 16, 66, 8, 33,132, 10, 44, 66, 8, 33,
+132, 16, 66, 5, 22, 33,132, 16, 66,200,127, 13, 30, 26,191, 19, 32,177, 5, 57, 79,115, 55, 65, 34,101, 82, 38,101, 82, 38,101,
+ 82, 38,101, 62,119,153,205,101, 39,130,252, 37,133, 23,101, 82, 38,101, 82, 38,101, 82, 38,101, 62,127,153,207, 20, 58, 69, 72,
+ 8, 33,132, 16,242, 39, 99, 26,252, 97,247, 53,197, 44,203,186, 1, 0,195, 48, 37,166, 27,203,149, 77,133,248,120,120, 12, 49,
+ 3,223, 3,128, 0,120, 35,175,176,240,124, 3,153,231, 89,150,117,124,148, 89, 97,186,177,252,197,166, 50,133,221,215,156,123,
+124,122,246,198,242,161, 79, 78,195, 1,124, 97,247, 53,133, 79,204,171,135,181, 11,207, 3, 44,255, 63,230,243,127, 37,243,121,
+ 38,236,177,166,216,100,122,216,142,132, 66,166,196,120,189,233,118, 36,234,177,166,240,241,233, 77,215,151,187, 63, 57,141,184,
+215, 71, 57, 38, 19,235, 1, 0, 18,177,184, 52,200,207,125,125, 83,153, 25,185, 37,239,104,117,122,215, 71,153,133,134,171,255,
+240,253, 95,221, 54,173,229,238,238,222,149,207,231, 47,231,241,120,118,143,253, 56,161,160,160,224, 29,106,149,132,144,103,174,
+192, 98, 89,214,237,214,209, 85,168,213, 3,131,167,174,113,107, 53,118,243,158, 39,167, 49,233, 42,196,154,212, 99,237, 4, 38,
+181,163,131,140,115, 76, 77, 77,229, 3,128,167,167,231,247, 0,124, 27,200,116,188,117,116, 21, 52, 6, 32,124,226,106,199, 78,
+126,126,118, 85, 60,222, 34,153, 76, 54, 72,167,211,181, 7, 0,169, 84,122, 87,171,213, 94,176,227,184,207,159,156,190,177, 5,
+120,124, 94, 7, 77, 89,227,214, 58,242,251,191,155,205,102,177, 62,227, 64,127, 75,245, 3, 70, 96, 54,124, 53,188,176,240,244,
+119,128,217,154, 21,242,248,223,237,255,234, 63,156,125, 60, 60,134,200,228,242,174,114, 27,155,126,102,179, 57,196, 98,177,192,
+ 98,177, 36,105,107,107, 47,177, 38,211, 77,179, 73,227,124,235,199,143, 44, 77,205,231,147,203,210, 5, 96, 74,148,202, 9, 50,
+ 27,155, 1, 2,129,160, 15, 0,152,205,230,203,218,154,154, 95,220,138,138, 14, 90,179,236,214,174,159,167,157,254,121, 99, 50,
+177,110,153,103, 87, 65,111, 2,194, 94,254,216,173,227,107, 59,247, 2,128,161, 36,222,189, 38,245,120, 15, 0, 80, 4,142,188,
+ 46, 81,134, 21, 3, 0,243,160,208, 45,229,228,123,208,155,128,144,145,171,221, 26,202, 52, 24,140, 62,105,167, 86, 64,111, 2,
+254, 22,117,200, 99,201,236,241,114, 0,136,249,241,187,192,115,135, 54,188, 4, 0, 47,142,127,251,167,129, 99,223, 76, 7,128,
+207,190, 61,228,177,251,195,241,208,155,128,208, 49, 31,248, 60,237,182,201,234, 43, 69,234,148,147, 65,166,170, 2, 71, 31, 5,
+163,108,233,182,105, 15,216,215, 0,243,120, 2, 65,223,160,160,160, 46, 0,144,158,158,126,203,194,178,191,218, 0, 95,253,153,
+109, 73, 32, 16,252, 61, 63, 63,127,212,227, 63,243,242,242,162, 6, 73, 8,121, 54, 11, 44, 0,168,213, 3,177,105, 64,255,158,
+ 29, 49,107,242, 75, 54,143,255,238,199,237,159,248,228,223, 61, 23,242,217,190,245,130,214,173, 91, 35, 53, 53,213,170, 63,166,
+ 49, 0,191,164, 2, 18, 93,150,173, 70, 40,204,136, 90,190,220,174,111,223,190,140,167,167, 39, 0,160,164,164,164,231,165, 75,
+151,186,174, 94,189,122,142, 68,151, 85,161, 49,160,250, 23, 43,162,235,230,181,125,235, 23,240,222,252,137,246, 0,176,126,209,
+193,174,167,174,196, 59,101,101,101, 13,254,232,163,143,202,189,174, 94,221,100, 99,177,108, 75, 46, 46,206,181,102, 62,247,159,
+142,147, 5, 25,207,183, 26, 63, 99,198, 17, 95, 95, 95,185,183,183, 55, 79, 42,149, 66, 32, 16,160,166,166,198, 51, 57, 57,121,
+200,237,219,183,181, 23,175, 30, 19,198,199,141,203, 44, 16,134,105,173, 89,118, 17, 91, 38,173, 13, 14,190, 55, 62, 34,194,123,
+228,200,145, 82,127,127,127, 0, 64, 86, 86, 86,240, 79, 63,253, 52,233,212,169, 83, 43, 69,108, 25,171, 49, 64,215,220,178,215,
+101, 2,128, 16,232,237,228,230, 54, 89, 40, 20,134,178, 44,235,245,168,119, 33,223,100, 50, 37,170, 74, 74,118, 63, 57, 61,249,
+119,122, 19,144, 84, 8, 12,233, 23,134, 41,227,134, 40, 0, 96,233,171, 31,246,124,144,149, 38, 50, 24, 12,104,221, 38,164,207,
+ 7, 31,127,113, 22,124, 62,126, 56,242,115,253,244, 77, 22,182, 28, 31,169, 37, 64,194,253, 76,172,250,112, 35, 87,148,112,168,
+ 27, 91,113,111,104,121, 89, 25, 3, 0,206, 46, 46, 19,246,239,221,125, 94,217,113,252,111,233,197,181,245,211, 91,211,222, 27,
+218, 54, 79,237,219,232,153,159,120,161,221, 55,103,183, 8,125,125,125,145,152,152,216,162,109, 19,149,201,182,114, 15,143,164,
+168, 37, 75,148,225,225,225, 80, 40, 20, 16, 10,133, 48,153, 76, 67, 46, 95,190, 60,100,213,170, 85,115,170, 42,147,107,173,221,
+ 54,173,232, 59,252,220,189,117,255,129,145,163, 71,120, 12,234,223, 19,227,134,247,161,134, 72, 8,121,118, 11, 44,134, 97, 74,
+134, 78,251,200,173, 95,143, 80,252, 22,159, 82,153,149, 83, 84, 83,247, 59,245,253,163,193,179, 35, 59,133,110, 62,117, 18, 70,
+163, 17, 87,174, 92,193,205,155, 55,113,229,202, 21,238,243,207, 63,215, 10,128, 55, 26,201,172, 8,159,184,218, 81,162,207,181,
+233,226,156,235,191,127,239, 47, 2,173, 86,139,216,216, 88, 84, 84, 84, 64, 34,145,192,203,203, 11,253,250,245, 99, 98, 98, 98,
+156, 94,157, 52,217,254,197,177, 51, 51,245, 18,159, 26,134, 97, 42,216,198, 22,128, 97, 74, 6, 79, 93,227,214, 46,248, 5,164,
+103, 23, 84,190,247,241,150, 26,139,153, 99,116, 15,242,140, 23, 47, 94, 68,231,206,157,177,127,255,126,231,138,138,138, 21, 59,
+118,236, 88,238,254,229,246, 13,197,121,201,139,208,120, 94, 69,248,196,213,142,173,205,209,190, 7,247,108, 19,197,199,199,139,
+ 54,109,218, 4,149, 74, 5,177, 88, 12,123,123,123, 40,149, 74,180,110,221,154, 55,103,206, 28,249,192,129,169,120,111,209, 12,
+223, 34,199,200,228,198,230,179, 46, 83,100, 40,148, 7, 11,110, 6,126,191,115, 39,191,123,247,238,188,199,167,241,245,245,197,
+128, 1, 3,164,145,145,145,129,115,230,206,183, 12,137,124, 51,221, 40,246,208, 52,151,137,218, 92,153,179,230,170,231,144,137,
+ 19, 79, 68, 69, 69, 57,120,120,120, 64, 46,151, 3, 0, 42, 43, 43,189,179,179,179,123,174, 90,181,106,252,245,132,253, 76,248,
+200,220, 2, 40,124,180, 77,173,207,231,149, 80,200,148,212,245, 68,217, 42,100, 21,185,121,197,181, 15,123,161, 12, 48, 24, 12,
+208,235,245,120,107,206,155,130, 55, 94,238, 30,228,215,239,239,183,179,242,139, 85, 33, 63, 95,115,170,123,173,169,225,204,178,
+118,163, 63,112, 4, 0,126, 85,102,109, 69,246,185,191,189,187, 96,129,151, 82, 57, 27, 34,145, 8, 0,176,125,219, 54,166,188,
+188, 60,226,131, 15, 62, 8,229, 20,131,171,218,141,254, 64,241,232,181, 21,166, 22,110,155, 21, 41, 39, 91,125, 56,111, 88,167,
+239, 63, 62, 9,179,217,140,107,215,174,225,226,197,139,248,226,139, 47,184,211,167, 79, 87,218, 41, 20, 77,110,155,168, 76,182,
+237,235, 81, 20,240,233,167,135,121, 98,177, 24,199,142, 29,195,253,251,247,193,231,243,209,177, 99, 71, 76,153, 50, 5, 67,134,
+ 12, 81,206,154,245, 38, 23, 62,252,213, 12,216,183,169,254, 99,109, 41,138,207, 58,222,249,251,188, 89,175,121,188, 60,102, 24,
+ 54,126,249, 13, 21, 88,132,144,103, 27, 7,240,252,199,110,222,123,240, 22,119,210,127,236,230,189, 28,192,227, 0,158, 4,240,
+ 29, 52,104,144,161,166,166,134,139,143,143,231, 38, 76,152, 80,177,116,201,146,173, 59,183,111,143,210,107, 52,111,117,233,212,
+105, 10,247,240,209, 15, 13,103, 58, 56,216, 5, 4, 4,148,230,230,230,114,167, 79,159,230, 86,175, 94,205,237,217,179,135, 59,
+115,230, 12, 23, 29, 29,205,157, 57,115,134, 59,112,224, 0, 23, 31, 31,207,165,165,165,113,129,129,129,165,254, 14, 14,118, 77,
+100,242, 57,128, 31, 20,249,221,162, 67, 55,205, 81,193,145,223,191,195, 1,252, 64,165,178,205,208,161, 67,205,135, 15, 31,230,
+118,239,222,205,237,220,185,147, 75, 72, 72,224,202,202,202, 56, 47,191,128,210,186,215, 53, 54,159, 28,192, 11, 11, 11, 43, 85,
+171,213,156,175,175, 47, 39, 18,137, 56, 55, 55, 55,174,117,235,214, 92,207,158, 61,185,225,195,135,115,147, 38, 77,226, 86,172,
+ 88,193,169,213,106,206,207,207,175,184,238,117,141,101,246,244,242,146, 6, 6, 6,230,220,185,115,135,107,140, 78,167,227,202,
+202,202,184, 11, 23, 46,112,129,129,129, 57, 61,189,188,164, 77,101, 10,129,176,208,208,208,210,178,178, 50,206, 98,177,112, 26,
+141,134, 43, 47, 47,231,202,203,203,185,138,138, 10,206, 96, 48,112, 22,139,133,179, 88, 44, 92,114,114, 50, 23, 16, 16, 80, 34,
+ 4,194, 26,203,124,206,219, 60,191,161, 47, 47,119,247,225, 74,165, 82,123,248,240, 97, 46, 63, 63,159,219,177, 99, 7,199, 7,
+ 62,124,114,186,134, 50,199,135,140, 23,133,133,205,146, 9, 4,178,151,122,247,238,109,190,114,229, 10,119,235,214, 45,238,221,
+119,223,229, 70,141, 26,197,141, 30, 61,154,139,138,138,226,114,114,114,184,220,220, 92,238,197, 23, 95, 52, 11, 4,178,151,194,
+194,102,201,198,135,140, 23,181,100,219,148, 2, 62, 35, 71,142,212, 26,141, 70, 46, 35, 35,131,107,223,190,125,158, 0,152, 44,
+ 2, 66, 2, 0,113,115,237,211, 14,112,240,240,240, 40,188,122,245, 42,119,248,240, 97,206,207,207,175, 84, 0,188, 46, 1,252,
+ 37,128,191, 0,120,189, 85,171, 86,165, 87,175, 94,229,202,202,202, 56, 95, 95,223, 66, 59,192,225,233,219, 82, 20,223,173,253,
+216,109, 31,124,121,152, 75,206,171,229, 62,248,242, 48,231,222,122, 64, 14,199,113,156,135,135,199,121,106,145,132,144,103,178,
+ 7,171, 49,124,153,108,213,199, 31,127, 44,210,106,181,120,255,253,247, 75,223,154, 61,123,141,139,155,155, 81, 40, 20, 66, 40,
+145, 52, 31, 96,103,247,206,178,101,203, 28, 12, 6, 3,226,226,226,208,165, 75, 23, 72,165, 82, 8,133, 66,136, 68, 34, 48, 12,
+ 3,165, 82,137,178,178, 50,184,187,187, 99,206,156, 57,246, 95,109,220,248, 14,212,234,247,155,138,181,152, 57, 6, 0,204,102,
+179,216,199,211,115, 86,251, 14, 29, 62,159, 51,103, 14, 95,161, 80, 64,175,215, 67,175,215, 35, 57, 57, 25,206,206,206,144,203,
+100, 86, 45, 51,159,207,231,219,216,216, 32, 54, 54, 22,219,182,109, 67,102,102, 38, 10, 10, 10, 96,103,103,135,206,157, 59, 35,
+ 36, 36, 4,125,250,244, 65, 90, 90, 26,120, 60, 94,179, 31, 50,197, 2,193,188, 41, 19, 39,186,133,134, 54,124,103,171, 94,175,
+135, 90,173,134, 90,173,134,187,187, 59, 34, 34, 34,220, 78, 28, 59, 54, 15,192,218,134,166,151, 3, 74,255,224,224, 19, 55,110,
+220,112,225,243,249,136,141,141,133, 70,163,129, 78,167, 3,203,178,224,241,120,144, 74,165,232,213,171, 23,156,157,157, 17, 28,
+ 28,140,163, 71,143,186, 14, 29, 58,244, 39,121,113,113, 24,128, 66,106,254,205,203, 43, 46, 62,215, 5,112,126,237,181,215, 78,
+ 39, 36, 36,132, 79,158, 60, 25,197,197,197,255, 16,188,251,110,133, 25, 88,215,212,107, 15, 38, 29, 98,189, 1,133,147,171,235,
+119,159,124,242, 9,191,168,168, 8, 11, 23, 46, 44, 47,200,205, 93, 38, 5,174, 2,192, 79,199,143,247,218,181,107,215,199,187,
+119,239,118,222,185,115, 39,191, 75,151, 46,155, 75,226, 54,183,187, 5, 84,182,164,114,209, 1,127, 95,191,126,189, 84,167,211,
+ 97,232,208,161, 25,154,172,172,142, 44,160,181,246,245, 53,192,188,168, 37, 75,148, 18,137, 4,139, 23, 47, 46, 43,123,240,160,
+ 61, 11,148, 62, 54, 73,182, 34, 51,243,244,212,169, 83,239, 38, 36, 36,184,172, 91,183, 78,249,114,100,228, 60, 0,107,172,253,
+ 27,255,186,160,157,111,103,182,137, 13, 30, 59, 60,194,189, 77, 43, 55, 28, 62,118, 22, 95,109,222,179, 29,234,244,239,188,188,
+188,230,241,249,252,207,168,229, 17, 66,158,171, 2,203,209,209,177,107, 96, 96, 32,162,163,163,209,182,109,219,163,110,117,197,
+149, 80, 8,179,185,249,107,200,101, 10,197,224,240,240,112,230,202,149, 43,240,247,247,135, 76, 38,171, 47,172,234,138, 44,161,
+ 80, 8,165, 82,137,202,202, 74,244,237,219, 87,184,109,219,182,193, 0,222,111, 46,187, 48, 59,217, 6, 25,219, 94, 91,253,193,
+ 7, 1, 93,187,118,133,209,104,124, 88,136,200,229,208,235,245, 16, 10,133, 48, 26,141,208, 25,184, 42,107,150,213,108, 54,155,
+ 5, 2, 1,124,125,125,177,114,229, 74,232,116,186,250,211, 58, 85, 85, 85, 80,171,213,136,139,139, 67, 86, 86, 22, 44, 22, 11,
+215, 92,158,220,198, 38, 98,244,232,209,226,134,126,103, 48, 24,234,139,171,202,202, 74,232,116, 58,116,234,212, 73,124,225,194,
+133,136,198, 10, 44,158, 84, 58,126,231,206,157,110, 98,177, 24, 58,157, 14,169,169,169, 72, 79, 79, 71,114,114,178, 94,165, 82,
+177, 54, 54, 54, 60, 15, 15, 15, 65,101,101,165,120,234,212,169,188,234,234,106, 0, 64,100,100,164,243,246,173, 91, 95,129,193,
+176,142,154,191,117,110, 1,250, 64,131, 97, 84,247,238,221, 47,252,246,219,111, 93,222,126,251,109, 36, 36, 36,252, 83,190,127,
+255, 69, 13,112,187,201,118, 9,204,249,108,233, 82, 15,133, 66,129, 41, 83,166,168, 52,185,185, 29, 89,160,232,177, 73, 82,156,
+179,178,206, 76,155, 54, 45, 49, 33, 33,193,113,221,186,117,202, 87,198,143,159, 3,224,227,150,204,163,189,189,125,119,165, 82,
+137, 51,103,206, 32, 39, 43,107,105, 75,138, 43, 0,224, 9, 4,125,251,247,239,143, 31,127,252, 17,121, 15, 30, 44,125,162,184,
+ 2, 0,212, 2,165, 76, 70,198,210,237,219,183,111,155, 49, 99, 6,248, 12,211, 23,172,245, 39, 8, 27,186,160,253,173,165,159,
+225,232,153,107,219, 75,238,118,248, 27,240,163, 5,192, 13,106,113,132,144,103, 65,139,158,131,213,170, 85,171, 86, 18,137, 4,
+217,217,217,232,209,163, 71,150, 80, 44,134, 68, 44,134, 68, 38,179,238, 40, 91,167,235,160, 84, 42, 81, 85, 85, 5, 23, 23, 23,
+136, 68, 34,136, 68, 34,136,197, 98,136,197,226,250,239,109,109,109,193,231,243,225,229,229, 5,157, 78,215,161,185, 92,182, 50,
+213,237,236,142,165,115, 79, 29,221, 21, 16, 25, 25, 9, 79, 79, 15,120,121,121, 66,161, 80,128, 97, 24,248,250,250, 34, 48, 48,
+ 16, 91,183,110, 5,207, 46,248,186, 53,243,250,120,209, 36, 16, 8, 96, 54,155, 81, 92, 92,140,228,228,100, 36, 36, 36,224,234,
+213,171,136,139,139, 67, 77, 77,141, 85,203,174,209,104, 58, 55,212,209,245,100,113,165, 86,171, 81, 90, 90,138,244,244,116, 84,
+ 87, 87,135, 53, 90,236, 58, 59,143, 11, 13, 13, 21, 0,128, 84, 42, 69,171, 86,173,240,237,183,223,178,231,207,156,121, 69,246,
+219,111, 14,230, 11, 23,236,247,254,240,195, 43, 51,103,206, 52, 95,191,126, 29, 85, 85, 85, 72, 73, 73,129,171,171, 43, 35,145,
+201, 94,161,166,223, 50,233, 64,173,162,186,122,120,239,222,189, 51, 43, 43, 43,241,217,103,159,241, 25, 91,219,239,222, 4, 4,
+ 77,110, 96, 2, 65,191,129, 3, 7,226,216,177, 99,200,123,240,224,221,242,223, 23, 87, 0,128,114,160, 40, 43, 61,125,233,246,
+237,219, 17, 17, 17, 1,134, 97,250,181,116,254,122,246,236, 25,202,113, 28,238,220,185, 3, 49,112,173,165,175, 15, 10, 10,234,
+ 98, 99, 99,131,251,247,239, 67, 8, 92,108,108, 58, 33,112, 49, 46, 46, 14, 50,153, 12,237,218,181,235,218,178,191, 34,252,220,
+189,117,255,194,183,150,126,134, 35,103, 46, 3, 0,126, 60,113,186,248, 97,113, 21,101,161, 86, 70, 8,121,110, 11, 44, 0,224,
+ 56, 14, 2,129, 0, 34,134,129, 76, 34,129, 88, 34,129, 88, 40,180,254, 72,153,199,131, 68, 34,249,183,162,170,174,208,170,251,
+ 87,161, 80, 88,157,105, 42,252, 53,124,250,180,169, 98, 27, 27, 27,152,205, 44, 24,134,129, 92, 46,135, 82,233,142, 54,109,218,
+ 64,165, 82, 97,212,232,177,186, 7, 42,230,132,208,123,112,194,211,172, 40,150,101, 81, 91, 91,139,138,138, 10,168, 84, 42, 84,
+ 85, 85, 65,167,211,193,138,179,131,245,117, 90, 78, 78, 14,246,237,219,135,242,242,242, 70,139,171,140,140, 12,236,218,181, 11,
+ 89, 89, 89, 16, 8, 4, 86,191, 63,131, 7, 15,198,201,147, 39, 5, 3, 6, 15,222,242,192,207,175,240,129,159, 95,225,128,193,
+131,183, 28, 63,126, 92,224,229,229,133,156,156, 28,196,197,197, 65,165, 82,193, 98,177,208, 53, 88, 79,161, 0,168,208,168, 84,
+ 51,254,241,143,127,112, 54, 54, 54, 88,187,118,109,231,173,192,164,166, 94, 19, 16, 24,216,197,198,198, 6, 73, 73, 73,144, 55,
+ 81,184,200,129,139,183,110,221,130, 76, 38, 67,155,144,144,174, 79,179, 93, 90, 44, 22,152,205,230, 6,159,239,102,205,118, 41,
+ 20, 10,193,231,255, 85,207, 30,142,226,179,142,157,254, 62,111,222,124,143,191,207,127, 11, 23, 98, 31,214,128,130,154,140, 84,
+ 42,174, 8, 33,207,162, 22,157, 34, 76, 79, 79,207,210,233,116, 33,254,254,254,184,123,247,174,127,251, 14, 29, 18,132, 66, 33,
+ 36, 66, 97,211,135,241,143, 72,165,210, 59,197,197,197,125,188,189,189, 97, 50,153,234, 79, 9,214,157, 38,172,251, 30, 0, 36,
+ 18, 9,146,146,146, 32,149, 74,239, 52,187, 16,230, 26,191, 86,173, 90,161,168,168, 24, 18,137, 4,142,142, 14,144,201,100,144,
+ 72,164,248,248,227,143, 45, 91, 54,111,254, 90,210,126,158,122,193,204,165,220,141, 53,223,255, 71, 86,180, 92, 46,191,227,239,
+239,223, 75,161, 80,224,232,209,163,200,202,202,130, 90,173,174,191,110, 74,171,213, 66,175,215, 67, 42,149,162, 93,187,118,112,
+114,114,194,221,187,119, 27, 93,246,138,242,242, 35,137,137,137,189,186,117,235, 86,191,234, 7, 12, 24,192, 27, 48, 96,128,203,
+ 99,189,102, 40, 47, 47, 71,124,124, 60, 98, 99, 99,193,178, 44,238,221,187,103,214,107,181,251,169,233, 63, 29, 29,112, 89,176,
+125,251,182,217,179,103,207,236,211,167, 15, 56, 96, 4,128, 31, 26, 61,130,225,243,121, 12,195,128,199,227, 53, 89,248,240, 0,
+ 11,199,113,117,197, 78,139, 11,224,171, 87,175, 38,154,205,230, 62,173, 91,183,134, 30,232, 14,224,100, 75, 94,159,150,150,118,
+203,100, 50, 13,233,212,169, 19,142, 28, 60, 24, 14, 32,187,193,131, 25, 32, 60, 44, 44, 12, 90,173, 22,247,238,221,187,105,109,
+113,229,214,254,206,150,121,179, 94,123,253,229, 49,195,112,248,216, 89,252,120,226, 76,238, 55,159, 46,241,225, 56,139,145, 90,
+ 21, 33,228,185,239,193,170,172,172,252,237,254,253,251,232,217,179, 39,210, 50, 50, 34,245, 90,173,168,174, 23,139, 47,104,190,
+196,210,214,214, 70,255,250,235,175,108,231,206,157, 81, 83, 83, 83, 95, 84, 61,222,123, 85, 87,112, 41, 20, 10,156, 62,125,218,
+168,173,173,141,110, 46,215,204,154, 45,124, 62, 31, 60, 30, 15,122,189, 30,133,133, 69,208,233,244,248,254,251,239,177,117,243,
+230, 73,121,133,133,239, 64,226,168,253, 43, 86,160,181,159,133, 90,173, 54, 58, 58, 58,218,228,239,239,143,233,211,167, 99,193,
+130, 5, 88,176, 96, 1,222,124,243, 77,188,254,250,235,152, 60,121, 50,198,141, 27,135, 30, 61,122,192,213,213, 21,153,153,153,
+ 38,173, 86,219,232,178,115, 58,221,161,105,211,166,149,232,116, 58,152,205,102,232,245,122,104,181,218,250, 94,182,184,184, 56,
+ 28, 57,114, 4,155, 55,111,198, 79, 63,253,132,218,218, 90, 84, 85, 85,225,214,173, 91,106,129,201,116,128,154,254, 31,218,104,
+ 14,255,250,235,175,112,116,116,132,167,183,119,255, 38, 15, 74,210,210,110,155,205,102,116,236,216, 17,181, 64,163,211,214, 2,
+253, 59,119,238, 12,157, 78,135,164,123,247,226, 90, 58, 79,213,213,213, 55, 50, 51, 51, 49, 96,192, 0,120,120,123,127,238, 14,
+200, 90,242,122, 11,203,254,122,249,242,101, 76,157, 58, 21,126,173, 90,125,170, 0, 92,159,156, 70, 1,184,250, 7, 6,126,250,
+250,235,175,227,220,185,115,176,176,236,175,141,229,185,187,187,119,245,240,240, 56,238,233,233, 25,235, 30,120, 62, 59,114,120,
+207,215, 31,191,160,157, 83,167, 79,240,242,242,218,205,231,243, 23, 83,139, 34,132, 60,247, 5,150, 69,171, 93,189,108,217, 50,
+131, 64, 32,192,220,185,115, 93,191,250,230,155,213, 7, 14, 28,232, 22,127,231,142,210,160,215, 55, 95, 97, 85, 85,173,255,224,
+131, 15,212, 70,163, 17,109,219,182,133, 74,165,130,217,108,134, 64, 32, 0,195, 48, 16, 8, 4,224,243,249,144,203,229, 72, 76,
+ 76,196,254,253,251,171, 80, 85,181,190,217,249,178, 88,238, 28, 61,122, 20, 12,195,112, 82,169,180,190,232,217,184,113, 99,201,
+204,194,194, 35, 0, 32, 16, 8, 12, 0,192, 23,240,172,186, 42,151,207,231, 55,123,225,186, 88, 44,174,187,184,191,249,139,220,
+ 89,118,253,183,223,126, 91,157,154,154, 10,141, 70, 83,127,106,176,166,166, 6,213,213,213,245,223,215, 21,137, 23, 47, 94,172,
+150,179,108,163,203,174, 1,138,178, 82, 83, 71,117,235,214,173, 60, 59, 59, 27, 53, 53, 53, 72, 75, 75,195,213,171, 87,113,242,
+228, 73,196,196,196, 32, 61, 61, 29, 6,131, 1, 14, 14, 14,168,170,170,194,241,227,199,171,244, 53, 53,195, 52, 13, 92, 7, 68,
+254,197,199,195, 99,176,187,155, 91,174,171,139, 75,190,143,135,199,224, 6, 10,141,148,148,148, 20,152,205,102, 4, 4, 4, 56,
+ 53,117, 29,150,153,101,127,189,122,245, 42, 38, 79,158, 12,165,151,215,199,174, 13, 20, 46,174,128,171,135,183,247,199,211,167,
+ 79, 71,116,116, 52,204, 77, 20, 46,141,145, 2, 27,151, 44, 89,162, 21,137, 68,216,191,127,127,128, 93, 80, 80, 50, 3,188, 38,
+ 6,218, 6, 2,162,230, 94,111, 3,124,181, 98,197,138, 34, 0,216,189,123,183,139, 71, 96,224, 93, 6,152, 46, 5, 94,144, 2,
+ 47, 48,192,116,143,192,192,187,251,247,239,119, 97, 89, 22, 11, 22, 44, 40,178, 1,190,106, 44, 79, 32, 16,252,189,160,160, 96,
+ 84,126,126,126,120, 81,218, 21,159,111, 62, 93,130, 11,177,215,240,213,230, 61,219, 75,238,118,248, 91, 73, 73,254,141,130,130,
+130, 41,249,249,249,137,212,226, 8, 33,207,162, 6,187, 95,152,238,107,138, 1,206,173,127,207,142,248, 45, 62,185,210,217,209,
+254, 76,221,239,212,247,143, 6,191, 50,192,175,243,234,213,171,193,227,241,112,255,254,125, 36, 36, 60,188,172,233,179,207, 62,
+211,240, 57, 46,242,177,241,206, 66, 1, 36, 62,202, 60,207,178,172,163, 68,159,107, 19,230,152,217,234,135,157,219, 5,182,182,
+182,168,169,169,129, 64, 32,128, 84, 42,133, 66,161,128, 68, 34, 65, 66, 66, 2,166, 78,159, 97, 78,103, 59,253,235, 65,163,255,
+ 26,239,172, 62,179,238,249, 67,125,156,157,229, 57, 34,209, 34, 87,119,247, 37,243,231,207,151,133,135,135, 67, 44, 22,163,107,
+143,126, 69,178,206, 75, 54,240, 5, 60,182,160,172,114,121,224, 11,158,246,247, 82,179, 1,240, 74, 76, 55,150,123, 60,118,202,
+230,223,230,179,131, 52, 33,224,135,111,222,183,107,223,190, 61, 56,142, 67,101,101, 37,138,139,139, 81, 82, 82, 2,181, 90, 13,
+173, 86, 11,139,197,130,159,127,254, 25, 63, 95,207,168, 42,182,125, 49,163,177,249,252,215,178,103,219,134,200, 82,252, 55,172,
+251, 92,224,232,232,136,226,226, 98,148,149,149,213,159, 42, 52,155,205,168,174,174,198,177, 19, 63,153, 51,204, 29,178,244,146,
+ 23,170,155,203, 68,109,174,204,169,230,178, 87,215, 80,127,238,205, 55,223,180,181,179,179,131,197, 98,129, 74,165, 66, 86, 86,
+ 22, 82, 82, 82,112,233,210, 37, 77, 73,149,137,211,186, 12,205,171,127,208,104, 3,153,127,162,255,185,204,199,159,101,229,233,
+225, 81,248,224,193, 3, 55,179,217, 12, 47, 47, 47, 86,173, 82,125, 34, 6,206,137,128, 2, 30,192, 85, 3, 43,214,109,216, 48,
+ 99,204,152, 49,232,222,189,123,110, 81,113,241, 11, 13,181, 37, 14,224,123, 2,142, 34, 63,191,164,107,215,174,185,166,164,164,
+ 96,218,180,105,165, 5,185,185,139,236,128, 88, 0,168, 2,250,123,250,248,124,190,119,239, 94,215,208,208, 80,116,236,216,177,
+ 84,159,149, 21, 82, 0, 84, 52,210, 62, 27,221, 54, 43, 82, 78,182,154, 27, 25,218,237,173,183,222, 2,203,178,136,141,141,197,
+245,235,215,145,147,147,131,203,151, 47,171,237, 20,138, 87,155,218, 54, 81,153,108, 27, 17, 92, 27,176,123,247, 15, 60,145, 72,
+132,237,219,183, 35, 46,238, 97,103, 90, 88, 88, 24, 94,127,253,117,176, 44,139,201,147,167,112, 63, 37,203,254,245,160,209, 6,
+218,146,151,151, 87,168,197, 98, 89,203,227,241, 68,102,177, 91,183,162,204, 56,169, 71,235,190, 5, 69,169,131,125, 90,120,205,
+ 21,181, 79,202,164,204,231, 39,243,153,210,236, 88,132,107, 54,193,254,247,195,113,188, 81,120,108,251, 39,204,136,151, 70,133,
+ 44,127,111,153,160, 67,135, 14,176, 88, 44,232,222,189, 59,166, 77,155, 38, 15, 9, 9,105,110,188,179,154, 23,199,206,204,124,
+241,197, 23, 29,230,206,157,107,223,191,127,127, 97,221, 80, 57,119,238,220,193,169, 83,167,140,251,246,237,171,202, 23,247, 83,
+ 95, 62,189,181,198,154,241,206, 46,151,151,107, 0,188,223,218,104,220,188,226,189,247,162,218,119,232, 48,243,157,119,222,225,
+219, 40,228,194, 53,203,223,144, 2,192,135, 95,238,179, 31, 51,254, 53,172, 15, 2,250, 79,106,120,236,184,199,231, 51,175,176,
+228,193,107, 51, 38, 4,205,156, 28,105, 25, 59,118,172,220,222,222, 30, 62, 62, 62,112,112,112, 64,102,102, 38,238,220,185,195,
+157, 59,119,174, 38,254,126,142,112,215,129,115, 15,196, 54,110,214,140, 27, 88,253,226,152,105, 89,211,167, 79,119,140,140,140,
+180,109,223,190,189, 80, 40, 20, 66, 34,145,160,172,172, 12,121,121,121,198,152,152,152,154,124, 81,175,138,203,103,118, 84, 91,
+ 57, 22,161, 54,124,226,234,180,232,179, 81,239,196,199,199, 79, 1,208,201,104, 52,122,155,205,102, 30,159,207, 47, 52,155,205,
+ 9,186,154,154,109,108, 88,212,122, 26,139,208, 58,102,179, 89,100, 54,155,161, 86,171,113,254,252,121, 38, 61, 61,125,121,124,
+124,252,242,130,130, 2, 24,141, 70,140, 31, 63, 30, 97, 97, 97,248,229,151, 95, 80, 90, 92,124,162,169,172, 2,160,130,121,240,
+ 96,198,156, 57,115, 78,238,216,177,131,119,231,206, 29,215,109,219,182,253,112,235,214, 45, 0, 64,151, 46, 93, 48, 99,198, 12,
+ 48, 12,131,105,211,166,113, 57, 89, 89, 51, 88,160,162,137,246,217,212,182, 89,122,106,223,198,248,177,227,198,183, 91,181,226,
+ 61, 97,159, 62,125,224,234,234,138,126,253,250,193,104, 52, 58, 88,177,109, 86,135, 15,127, 53,163, 83,167, 78,138,117,235,214,
+ 41,103,204,152,129,121,243,230, 1, 0,180, 90, 45,206,157, 59,135, 5, 11, 22, 20,229, 48, 61,106,111,197,236,111,178,125, 62,
+234,153, 26, 10, 0,158,158,136, 5, 16,206,175,205,206,160, 11,218, 9, 33,207,117,129, 5,252,107,188,179, 75,215, 19,241,248,
+112, 28, 15, 57, 37,153,156, 34, 51,102, 44,248,164,157,192,164,118,148, 49, 6,199,132,248,120,126,102,102,102,147,127,172,110,
+188, 51,189,196,167,198, 92, 88,222,109,227,250,245,239,108,217,178,101,112,221,163, 24,164, 82,233, 29,109,109,109, 52,170,170,
+214,235,253,125, 46,180,116,236,188,148,242,242, 98, 0,179, 3, 45,150, 13,211,103,190,249, 25,207,198,135, 89,182,230,123,157,
+ 64, 32, 48,100,228, 23, 99,125, 16,160,176,226,121,168, 26, 3,112,167,220,141,189,203,245, 79, 94,251,201, 39, 11, 55,125,245,
+ 85, 15,153,141, 77,184,209,104, 12,177, 88, 44, 0,144,164,211,104, 46,178, 70,227,245,124,207, 89, 95,136,109,220, 56,107,199,
+ 13,212, 75,253,171, 21,218, 75,221, 14, 31, 60,248,246,233,211,167,255,109,217,109,129, 13,122, 59,255,104,107,150,253,241,105,
+ 76,192, 21,148,148, 92,105,170,171,146,198, 34,180, 14,159,227,222,112,116,116,252, 97,240,224,193,210, 33, 67,134, 96,196,136,
+ 17,232,221,187, 55, 44, 22, 11, 56,142, 67,117,117, 53, 14, 28, 56,128,127,254,243,159,169,238,192,234,230,242, 88,224, 12,115,
+236,216,232, 46, 93,186,108, 91,183,110,157,243,236,217,179, 33,123,244,104, 19,173, 86,139,152,152, 24, 44, 88,176,160, 60, 59,
+ 35, 99, 6, 11,156,105, 46,175,233,109, 83,154,194, 58,140,201,122,117,222, 39, 65,166,170, 2, 71,103, 57,171,188,155,120,199,
+234,109, 19,246,109,170, 43,227, 14,116,127, 57, 50,114, 30,159, 97,250,214, 61,138,225,222,189,123, 55,235, 6,123, 70,216,235,
+ 63,183,164, 45,113,220,195,103,207,113, 28, 71, 23,180, 19, 66,158,239, 2,139, 97,152,146,186, 94, 30,134, 97, 74, 50,127,156,
+245, 90, 83, 33, 62, 30, 30, 67, 30, 29, 29,163,185,177, 8,235,254,159,169, 86, 87, 63,122, 66,123,131, 15, 17, 21, 62, 49,125,
+ 75,198, 59, 75, 47, 46, 78, 6,240, 18,240, 0, 72,190,244, 48,175,251,154,119, 31, 95,166, 70, 87,200,239,254,174, 72,149, 87,
+ 92,124, 9,192, 37, 0,255,108,112, 62,125, 69,170,230,230,243,201,101,143,127,240,160,234,209,114, 55,188,236,110,205, 47,251,
+147,153,205,190,209,127, 96,125, 62,111, 10, 75, 75,127, 4,160,112, 57,121,210,253,212,201,147,175, 44, 92,184,240,101, 79, 79,
+207, 32, 23, 23, 23, 71, 91, 91, 91,254,181,107,215, 50, 13, 58,221,134, 64, 96, 71, 10,160,177, 38,147, 5, 78, 41, 51, 50,218,
+142, 30, 57,242, 29, 62,195,244, 13, 9, 9, 9, 3,128,164,164,164, 56, 11,203,254,234, 10,172,103, 1,149, 21,239, 99,203,182,
+ 77, 73,203,183,205, 74,160, 18,192, 26,176, 44,144,144,240,135,183, 77,139,197,178,198,203,203,171,154,158,208, 78, 8, 33,127,
+158, 80,202,164,204,103, 40, 83, 0,192,142,214, 39,101, 82, 38,101, 82,230, 95,146,249, 76,225,211, 42, 32,196,106,102, 0, 85,
+180, 26, 8, 33,132, 52,135,215, 68, 21,218,146,187, 3,158,166,146, 77,164, 76,202,164, 76,202,164, 76,202,164,204,231, 46,179,
+185,108,186, 59,241, 47, 42,188, 40,147, 50, 41,147, 50, 41,147, 50, 41,243,249,203,124,166,208, 41, 66, 66, 8,121, 36, 42, 10,
+124,142, 3,143,227,162,248, 28,119, 80,192,113,227, 5, 28,135, 63, 52,118,231,248,241, 13, 63,136,118,254,107,176,165, 53, 78,
+200,179,139,161, 85,240,159,163, 84, 42,125,221,221,221,191,227, 56,142, 87, 82, 82, 50,171,168,168, 40,135,214,202,127, 31, 39,
+ 39,167,193, 0,160, 82,169,162,159,213,101,108,231,143, 72,142,135,182,143,255,140,103, 65,206,189,236,223,143,179,216,238, 5,
+ 76,225,248,191,127,150, 22,143,195,253,123, 89, 56,218,146, 3,187,177,131, 93,215, 2,192,143,209,165,139,241, 20,131, 83, 55,
+199,195,195,163,181,179,179,243, 89,129, 64,192,152,205,230, 57,137,137,137, 39,155, 59,208,124,107, 28,150,177, 69, 46,203, 86,
+204,230, 9, 13,250,207,212,122,157,174,146,207,231,103,137, 68,162, 75,243, 39,115,103,190,220,109,186,219,200,235, 27,157,255,
+246,254,136,224,235,219,141, 10,107,155,153,177,118, 66,247,245,253,103,186, 8, 51,111,222,182,217,116, 52,231, 59,123, 7,247,
+ 81,127,127,181,232,164, 68,102,158,242,207,109,168,161, 45,205, 58, 31, 1, 78, 70,160,131, 72, 34,241, 54,179,172, 59, 0, 8,
+ 24,166,216,164,215,231,138,128,132,101,128,250,191, 36,211,197,196, 48,161, 34,177,216,219,108, 50,185,243, 0, 14, 66, 97,137,
+197, 96,200, 53,179,108, 98, 20, 80,254,180,243, 41,148, 72,124,204, 44,235,206, 3,184, 63,107,217,255,204, 76,210, 76,129, 21,
+ 16, 16,112,147,207,231,123,243,249, 15, 59,185, 30, 31,115,175,238,255, 79,254,107, 54,155,243,146,147,147,187, 90,251,199,253,
+253,253,237,116, 58,221, 43, 60, 30,239, 53, 0,224, 56,110,143, 84, 42, 61,144,149,149,245, 84, 23, 18,251,251,251,219,113, 28,
+183, 88, 38,147, 13,210,233,116,237, 1, 64, 42,149,222,213,106,181, 23,120, 60,222,218,167,204,101, 60, 60, 60, 38, 40, 20,138,
+129, 44,203, 14,228, 56,142,199, 48, 76,140, 70,163,185, 80, 88, 88,120, 16, 64,139,159,120,224,225,225, 33,115,118,118,254,208,
+193,193, 97,210,220,185,115,203,157,156,156,218,172, 94,189,250, 55,103,103,231,189, 42,149,234,189,194,194, 66,237,127, 73,251,
+ 8, 84, 42,149,123,132, 66,161, 32, 55, 55,119, 32, 0,248,248,248,196, 24, 12, 6,115, 73, 73,201,107, 0,210, 91, 18,230,226,
+226,162, 16, 10,133, 61, 21, 10, 69, 87,133, 66, 17,110, 54,155, 67, 44, 22, 11, 44, 22, 75, 82,109,109,237, 69,147,201,116,211,
+100, 50, 93, 43, 43, 43,171,253, 47,218, 70,108, 69, 34,209, 15, 44,203, 2, 64, 48,128,234,103,113, 71,192,241,208,246,222,221,
+164, 54,191, 43,166,218,135,252,251,116,124,248, 54, 50,157,213, 5,214,136,190, 14,195, 71, 69,116,226, 3,128,209,240,219,240,
+ 83,191,170, 79,253,217,197,213,136, 17, 35,174,108,216,176,193, 81,175,215, 99,201,146, 37,123,244,122,253,215,105,105,105,203,
+154,122,157,157,157,253,194,247, 63,250, 74,254,104,127,230,102,177, 88,220, 10, 11,114,131,147,239,223, 25,158,124, 63,241,227,
+249,227,239, 95,213,178,230, 55,183,254,136,251,214,204, 71,200, 11, 24, 57,106, 92,228, 75,239,175,140,194,164, 73,147, 94,184,
+171,210,201,188,238,198,139,107, 57,155, 64, 23, 55,239,209, 75,223,251,148,119,237,202, 47,163, 15,238,219,114,225,255,102,152,
+ 6, 81,145,213, 44,222, 26,134,233,105, 31, 20, 20,254,234,143, 63,194,198,199,135, 97, 36, 18, 62, 0,176,122,189, 79, 77,110,
+174,199,254,209,163,123, 68,165,164,252, 18, 5, 92,255, 79,102,190,207, 48,125,236,131,130,250, 76, 58,117, 10, 54, 30, 30, 12,
+ 95, 36,226, 3,128,197,104,244,174, 42, 40,240,216,255,210, 75,221,163,210,210, 46, 70,177,236, 53, 88, 49,212,218,255,208,178,
+ 19,107, 10, 44, 62,159,239, 29, 23, 23,231,166, 80, 40,240,168,248,129,217,108,134,217,108,198,163, 15,197,250, 7, 47,114, 28,
+ 7,150,101, 49, 96,192, 0,171,142, 94, 61, 60, 60, 6, 1,152, 30, 20, 20,244,242,226,197,139, 69,125,250,244,129,217,108,198,
+133, 11, 23,250,173, 91,183,238, 75,189, 94,127, 4,192,142,194,194,194,104,107,143,110,149, 74,229, 48,129, 64,176,123,249,242,
+229,118,125,251,246,101,234,158, 14, 95, 82, 82,210,243,210,165, 75, 93, 87,175, 94, 61, 71,169, 84, 78, 46, 42, 42, 58,107,237,
+202,241,242,242, 10,149,203,229,135, 34, 34, 34,188,187,118,237, 42,109,221,186, 53, 56,142,195,237,219,183,103, 36, 39, 39, 79,
+ 60,117,234,212, 42,141, 70, 51,190, 5,227,169,241, 2, 3, 3,167,217,218,218,126,184,112,225, 66,167,177, 99,199,138, 19, 19,
+ 19, 43, 2, 2, 2,120, 71,142, 28,113, 61,113,226,196,156,175,191,254,122,130, 92, 46,127, 47, 61, 61,125,167, 53, 27, 94, 80,
+ 80,208, 77, 62,159,239,109, 77, 1,220,194, 34,184,179,191,191,255,129,139, 23, 47,250,103,103,103,155, 35, 35, 35,119, 1,192,
+229,203,151, 59,114, 28,199,235,211,167,207,233,188,188,188, 87, 0,220,182,102,193, 61, 61, 61, 59,218,219,219, 31, 27, 59,118,
+172,147,175,175,175,220,219,219,155, 39,149, 74, 33, 16, 8, 80, 83, 83,227,153,156,156, 60,228,246,237,219,218,203,151, 47,171,
+ 68, 34,209,232,130,130,130,132, 22,180,227,222,110,110,110, 83,132, 66, 97, 40,203,178, 94, 0,192, 48, 76,190,201,100, 74, 44,
+ 41, 41,249, 1,192,149,167,221, 64,220,221,221,191, 92,183,110,157, 75,113,113, 49, 23, 21, 21,245,101,101,101,229,180,103,121,
+135,144,120,251, 26, 46, 93,190,136,111, 55,255, 80,201,113,120,240,111, 5,150, 5,105,237,219,135,184,190,249,198, 20,167,126,
+125,194, 17,218,185,103,179,153, 99, 6, 57,191, 47, 22, 49,206, 26,189,254,122, 89, 30,255,152, 92, 33,138,156, 60,174,107, 6,
+ 0,156,249,249, 78,100,247, 0,199, 95, 93,188, 45, 99,228, 18, 73, 15,131,145, 45, 63,118,161,124,101, 75,138, 41,165, 82,121,
+214,198,198, 70,174, 86,171,139,202,203,137,167, 96,192, 0, 0, 32, 0, 73, 68, 65, 84,203, 55, 69, 68, 68,172, 89,183,110,157,
+ 99, 70, 70, 6,114,115,115, 49,125,250,116,155,252,252,252,185,122,189,254,106,110,110,110,163, 61, 89, 85,213,149,235, 63,140,
+ 90,184,202,214,222, 81, 32,151, 41, 96, 99,107, 7,255, 86,193,232,214,163, 31,134,188, 56, 26, 25,233,201,189, 14,236,222,114,
+123,206,184,188,143,147, 85,248, 32, 54,182,241,125, 83, 59, 63,244, 31,253,242,195,226,106,229,251, 81, 72, 73,190, 95,157,157,
+195,159,255,211, 45,190, 60, 98, 80, 59,137, 65, 95,147,125,237,202, 47,254, 61,123, 15, 0,128,174, 7,247,109,185, 16,245,154,
+105,112,212,158,103,179,128,255, 51,138,171,247,133,194,105,195,214,173,115, 11,155, 51, 71, 84,147,149,101,204,248,246, 91, 77,
+241,197,139,102, 70, 34,225,124,134, 15,231,185, 14, 28, 40,157,147,148, 36,186,252,201, 39,225,194,213,171, 3,222, 51, 26,119,
+255,167, 50, 71,108,220,232,218,121,214, 44, 81, 85, 70,134, 49,229,203, 47,181, 69, 63,255,204,138,164, 82,139,247,136, 17, 2,
+247,161, 67, 37,115,238,222, 21, 93,253,236,179, 62,204,138, 21,173,150,155, 76, 63, 60, 35,203, 78, 90, 80, 96, 65,161, 80, 96,
+223,190,125, 16, 10,133, 16, 10,133, 96, 24,166,209,255,251,249,249, 89, 83, 4,141,115,118,118,254,106,225,194,133,238,163, 70,
+141,130,163,227,239, 71,217, 24, 57,114, 36, 70,140, 24, 33,202,204,204,156,120,240,224,193,137,187,118,237, 42,170,169,169,153,
+ 95, 84, 84,116,164,153, 15,239,129,254,254,254, 71,246,237,219, 39,211,106,181,136,141,141, 69, 69, 69, 5, 36, 18, 9,188,188,
+188,208,175, 95, 63, 38, 38, 38,198,105,226,196,137, 71,248,124,254,200,130,130,130, 24, 43, 62, 88,187, 58, 58, 58,198,110,222,
+188, 89,218,182,109, 91, 94, 90, 90, 26, 58,117,234, 4, 0, 40, 47, 47,199,200,145, 35,165, 99,199,142, 13,156, 59,119,238, 85,
+150,101, 7, 20, 23, 23,223,108,102,217,187,184,187,187,239, 28, 62,124,184,231,187,239,190,107,103, 99, 99,131,236,236,236, 66,
+165, 82, 25, 92, 87, 4,141, 25, 51, 70, 60,116,232, 80,143, 77,155, 54,109, 56,117,234,212,146,210,210,210,105, 69, 69, 69,183,
+154,172, 86,249,124,239, 91,183,110,185,201,229,114, 20, 23, 23, 99,247,238,221,152, 59,119, 46, 24,134, 65, 73, 73, 9, 14, 28,
+ 56,128,249,243,231,131,207,231,163,170,170,202,170, 34, 88, 46,151, 15, 9, 10, 10,218, 26, 29, 29,237,237,224,224, 0, 79, 79,
+ 79,254,138, 21, 43, 66, 3, 2, 2,100, 30, 30, 30,252,130,130, 2, 28, 57,114, 36, 96,202,148, 41,199,114,114,114,102,232,245,
+250,102, 79,157, 57, 59, 59,111,219,181,107,151,111,124,124, 60, 54,109,218, 4,149, 74, 5,177, 88, 12,123,123,123, 40,149, 74,
+180,110,221,154, 55,103,206, 28,249,192,129, 3,229, 81, 81, 81,219, 0,116,182,162,253,118,114,115,115,251,110,224,192,129, 1,
+ 81, 81, 81, 14, 30, 30, 30,144,203,229, 0,128,202,202, 74,239,236,236,236,158,171, 86,173, 26,127,243,230,205,204,146,146,146,
+ 55, 1,196,183,112,251,232,220,174, 93,187,145, 99,199,142, 21, 20, 21, 21, 97,203,150, 45, 35, 43, 43, 43, 59, 91, 91, 84,254,
+ 47,186,116,249, 34, 6, 14,159, 8, 45, 43, 19,158, 56,186,155,171, 62,251,133,179,141,131, 3, 3, 0, 53,106, 53, 59,226,181,
+ 69,150,145,163, 39, 27, 7, 13, 31,163,185,112,102,143,220,154, 2, 75, 44, 98,156,247,111,157,157,123,241, 90,106,200,217, 11,
+217, 67,198,142, 30,194,103, 20,109, 2, 1, 96,209, 59,111,136,127, 60,254,243,215,195, 6,189, 80, 24,222, 51, 56,247,213,153,
+223,250,180,164,184, 10, 8, 8,248,229,236,217,179,238, 98,177, 24, 21, 21, 21,206,219,183,111,255,162,103,207,158,252,244,244,
+116,220,191,127, 31, 89, 89, 89, 80,171,213,232,222,189,187,205,189,123,247, 54, 1,104,180,192,250,230, 48, 62,252,100,169,251,
+ 70, 87, 15, 87,127,147, 65,239,202,234,139,219, 71,159,141,239,120,248,128,166,139,155,210, 59,120,226,228, 89, 88,186,226, 83,
+225,209, 67, 59, 87, 34,230, 28, 98,155,122,138, 63, 15,189,255,241,238, 50, 84,105,244,152,252,218, 27,152, 50,249, 13,103,206,
+ 98,240,224, 44, 58,133, 65, 87,225, 96, 47, 74, 62,185,115,251,129, 72, 0,222,143, 21, 89,209, 84,100, 53,236,125,134,233,241,
+226,231,159,187,117,154, 51, 71, 18,191,122,117,109,217,197,139,218, 86, 35, 70, 84,132,205,158,173, 7,128,234,172, 44, 81,202,
+170, 85,114,215,240,112, 89,159,255,251, 63, 7,147, 70,163,124,255,163,143,186,175, 4,110,180, 52,211,127,210, 36,243,218, 35,
+ 71,186, 93,251,228,147, 1,248,224, 3,193,192,176,176,219, 43,190,253, 54,207,154,204, 53, 12,211, 51,226,235,175,221, 58,188,
+254,186,228,230,178,101,181,234, 27, 55,180,129,145,145,170,110, 11, 22, 24, 32, 16, 64,147,151, 39, 76, 95,189, 90, 97,223,163,
+135,172,215,162, 69, 14,102,131,193, 61,106,213,170, 30, 77,245, 16,189,207, 48, 61,134,175, 95,239,218,105,246,108, 73,252,154,
+ 53,181, 5, 23, 46,232,171, 66, 66,208,249,229,151,203,189,156,157,245, 79,187,236,143,103,150,197,196,252,225,245, 73, 26,218,
+ 13, 52,162,117,235,214,197,201,201,201,110,135, 15, 31,182,170,192,242,244,244, 68,191,126,253, 74, 18, 19, 19,221,155,216, 33,
+230,230,230,230,122,179, 44, 11,177, 88,220,228,140, 85, 87, 87, 35, 33, 33, 1, 19, 39, 78,204, 43, 44, 44,108,116,167,235,232,
+232,104,235,232,232,152, 17, 19, 19,227,114,239,222, 61,220,188,121, 19, 1, 1, 1,112,116,116,132, 80, 40,132,201,100, 66,117,
+117, 53,130,130,130, 32,151,203, 49, 98,196,136, 50,149, 74, 21, 80, 81, 81,209,232, 78,204,207,207, 79, 34, 20, 10, 83, 15, 31,
+ 62,236, 19, 26, 26,138, 27, 55,110,192,199,199, 7, 74,165, 18, 0,144,149,149,133,203,151, 47, 35, 34, 34, 2,137,137,137,152,
+ 61,123,118,174,201,100, 10,126,240,224,129,190,209,211, 5, 33, 33,133, 7, 15, 30,204,107,219,182,173,174,182,182,150, 95, 92,
+ 92, 44,188,120,241, 34, 91, 83, 83, 99,163, 86,171,133,149,149,149, 76,101,101,165,176,182,182, 86,200,231,243, 69,122,189, 94,
+120,237,218, 53,129, 74,165,106,242,193,150,109,218,180, 41,190,127,255,190,219,241,227,199,209,161, 67, 7, 28, 62,124, 24,139,
+ 23, 47,198,229,203,151,225,237,237,141, 67,135, 14, 97,241,226,197,184,127,255, 62, 92, 93, 93, 49,104,208,160, 38,223, 35, 0,
+ 8, 12, 12, 76, 75, 72, 72, 8, 20,139,197, 72, 79, 79, 71, 94, 94, 30,194,195,195, 97,177, 88, 80, 84, 84,132,212,212, 84, 20,
+ 20, 20, 32, 48, 48, 16,175,189,246, 90,122,126,126,126, 80,115, 13, 45, 44, 44,172, 52, 58, 58,218,165, 99,199,142, 40, 42, 42,
+130,131,131, 67,253,151,189,189, 61, 28, 28, 28,208,170, 85, 43, 44, 92,184, 16,157, 58,117, 42,121,240,224,129,123,115,197, 79,
+104,104,232,217, 11, 23, 46,184, 56, 57, 57, 65,167,211, 65,167,211,213, 31, 28,200,229,114, 8,133, 66, 0, 64,106,106, 42, 70,
+142, 28, 89,154,145,145, 49,188, 5,197, 17,223,221,221,253,126,124,124,124,176,173,173, 45,114,115,115,145,152,152,136,153, 51,
+103,166,214,214,214,182,197, 95,112,221,208,127, 82, 72, 43, 44,191,119, 55,169, 77,187,118, 33,149, 83,103,188, 41, 28, 51,106,
+ 76,109,220,245,115, 38,161,254,151,154, 23,251,217, 23, 0, 64,244,181,106, 55,189,176,159,168,107,247, 97,188, 99,199,142, 73,
+119,238,248,142,185,123, 55, 73,217,174,125, 72,114, 82, 38,214, 52,150,253,210, 0,251,169,139,231, 13, 15, 9,239, 19,206, 84,
+213,114,202,173,219,190,239,254, 32, 59,195, 29, 0,252, 94, 8, 40,158, 57,227,141, 27,118, 10, 94,209,197,203, 23,217,181, 95,
+157, 73,250,233,151,202, 93, 86,244, 46, 7,248,248,248, 92,221,190,125,187,139,139,139, 11,236,237,237,161,209,104, 96, 52, 26,
+113,239,222, 61,221,254,253,251, 77,118,118,118,182, 69, 69, 69,168,168,168, 0,195, 48,184,118,237, 90, 78,113,113,113, 67, 71,
+130,245, 55,251, 28, 60, 24,197,244,239,234,235, 40,226,115, 50,177, 57,217,147, 17,112, 98, 30, 28,220,163, 99,175,117,250, 37,
+246,226,228, 17,163, 94,117,237,213,103, 32, 62, 93,179,212,148,149,155,219,249,209,233,194,127,107, 11,109,253, 49,104,236,184,
+200, 9,239,175,140, 66,212,251,171,113,242,196,143,149, 54, 50,190,222,206, 86,104, 31,222,183,143,110,225,252, 87,114, 53,213,
+106,159, 47,214,173,157, 52,116,120,164,119,207,222, 3,112,237,202, 47, 56,184,111,203, 77,145,132, 78, 23, 62, 46, 10,112,116,
+ 8, 8,120,115, 94,106,170,232, 78, 84, 84, 13, 91, 80, 80,209,117,193,130,178,134,166,205, 59,127, 94, 33,246,244,180,115, 30,
+ 61,218,113,157,159, 31, 76, 37, 37,223, 53,116, 13, 81, 67,153, 55, 60, 60, 28,142,198,196, 12,182, 48, 76,255,185,243,230,201,
+134, 12, 25,130,170,170, 42,156, 60,121, 18,123,247,236,209, 43,149,202, 4,135, 27, 55,110, 7, 20, 22, 46,111, 40,243, 35,192,
+201,182,117,235, 89,115,147,146, 68,113,203,151,215, 64,165, 82,133,205,159, 95,110, 54,155,121,179,214,172, 25,145, 81, 88,216,
+191,184,172,204, 15, 0,220, 28, 28,114,219,122,120,196,109,220,181,235,222, 87,109,218,112, 53, 5, 5,223, 69, 53, 48, 6,233,
+147,243,185,255,242,101,247,211,165,165,127,115,116,116,148,149,149,151, 11, 68, 66,161,170, 75,112,240,254, 79,231,207,143,213,
+222,188, 41,126,218,101,239,186, 96, 65, 89,165, 70,195,188,183,113, 99,159,130,242,242, 23,106, 13,134,160,202,154, 26, 37,107,
+ 52,242,109,101,178,242, 23, 2, 3,139,171, 46, 92, 40,242,171,169,121,123,131, 70, 83, 66,173,242, 15,246, 96,241,120, 60,112,
+ 28,103, 85,113, 37, 20, 10,127,119, 26,170, 9, 34,129, 64,128, 27, 55,110,160,164,164, 4, 29, 58,116,128,191,191,255,239, 38,
+200,200,200,192,169, 83,167, 80, 81, 81,129, 46, 93,186, 0,128,168,169, 64, 91, 91,219,119,150, 45, 91,230, 96, 48, 24, 16, 23,
+ 23,135, 46, 93,186, 64, 42,149, 66, 40, 20, 66, 36, 18,129, 97, 24, 40,149, 74,148,149,149,193,221,221, 29,115,230,204,177,223,
+184,113,227, 59, 21, 21, 21,239, 55,150,201,113,220,188,137, 19, 39,186,133,134, 62,188, 11, 53, 55, 55,183,110, 94, 0, 0,110,
+110,110,184,125,251, 54,186,116,233, 2,119,119,119, 68, 68, 68,184, 29, 59,118,108, 30,128,181,141, 46,184, 72,196,111,219,182,
+109, 55, 0, 80, 40, 20,224,243,249, 41,118,118,118,174,238,238,238, 10, 59, 59,187,127, 91,198,237,219,183,171,197, 98,177,201,
+154,149, 90, 84, 84,132,208,208, 80,168,213, 15,183,165,218,218, 90, 4, 5, 5,161,178,178, 18, 0,160,215,235,225,233,233, 89,
+ 95,128, 52,166, 99,199,142, 81,109,219,182,125, 81,161, 80, 72, 24,134, 65,124,124, 60,194,194,194,176,127,255,126,248,249,249,
+ 65, 46,151, 35, 57, 57, 25, 29, 59,118, 68,108,108, 44, 92, 93, 93,209,190,125,123,137,155,155,219, 37,149, 74, 21,243,224,193,
+131,168, 38,122,218,248, 54, 54, 54,136,141,141,197,182,109,219,144,153,153,137,130,130, 2,216,217,217,161,115,231,206, 8, 9,
+ 9, 65,159, 62,125,144,150,150, 6, 94,243,141, 73, 25, 28, 28,124,242,198,141, 27, 46,124, 62, 31,177,177,177,208,104, 52,208,
+233,116, 96, 89, 22, 60, 30, 15, 82,169, 20,189,122,245,130,179,179, 51,130,131,131,113,244,232, 81,215,161, 67,135,158, 42, 46,
+ 46,238, 12,160,168,185,117,234,232,232,248,246,202,149, 43,125,220,221,221, 81, 93, 93, 13,141, 70, 3, 79, 79, 79, 12, 29, 58,
+212,235,212,169, 83,111, 27, 12,134,117,207,212,145,150, 5, 57,237,218,135,128,227,240,224,196,209,221,156,183,171, 52,116, 64,
+ 23,139, 91,202, 61,166,215,181,107,137,237, 1,192, 81,225, 31, 31, 28, 98, 76,137,253,237,124,222,201,227,123,227,205,102,240,
+ 67,218,133,180,225,115,200,111, 42,187, 44,143,127,236,236,133,236, 33, 29, 59,246, 19,108,252, 98,213,152, 89, 51,134, 73,156,
+ 28,251,241,170,242, 14,224,242,173, 59,126, 43, 86,188,235,246,193, 7,159,156, 56,123, 33,219, 92,150,199,255,208,154,249, 13,
+124,193,233,203,195,159, 11, 93,170,171,247, 32, 62,205, 6, 60, 89, 71,248,183, 10, 68, 85, 85, 21, 36, 18,137,116,210,164, 73,
+230,101,203,150,105,108,109,109,229,143,218,114, 9,159,207, 31,214,108,240,253, 36,176, 29,130, 88,161,173,193, 98,225,108,180,
+208, 85,138,238,164,101,160,223,192,136,226,238, 93, 58,175,249,100,237,186,229, 1, 65,109, 92, 39, 77,125, 83,248,249,167,203,
+191, 5,184,126, 13,198,100,225, 2,239,240, 81, 25,128,151,222, 95, 25,133,140,140, 84,199, 89,227,212,171, 25,129,204,179,109,
+135,254,182,223,110, 63, 63, 60,168,117,155, 23,102,205,121,251,167,205,155, 54,188,244,120, 79,214,190, 61,155,143, 1,230,193,
+176,238,218,156,231, 65,199, 41, 39, 79, 66,147,147, 99, 82, 93,186,164, 27,252,213, 87,101, 93,166, 78, 93,103, 52,153, 92,120,
+ 60,222,239, 46,133,224,241,120,128,197,194, 99,214,174,229,115,158,158, 48, 57, 56, 76, 71, 74, 74,235,230, 50, 63, 49,153,198,
+141,237,220,249,165,173,187,119,195,207,207,175, 62,211,222,222, 30,243,230,205,195,156, 57,115, 36, 9, 9, 9, 61, 78,157, 58,
+213, 99,215,215, 95,187,163,180,116,220,147,129, 70,160,195,164,227,199, 81,147,149,101, 84,221,184,161, 27,180, 97, 67,249, 47,
+191,253,230,244,238,215, 95,175,232, 16, 22,230,245, 77, 84,148,196,215,247,225,253, 33, 57, 57, 57, 65, 27,214,175,247, 29, 56,
+116,104,159,165,139, 22,109,191,189,112, 97, 59, 60, 28,146,173,209,249, 44,186,120,209,112, 90,165,250,219,193, 67,135, 28,218,
+180,105, 3,142,227,144,150,150,230,182,109,219,182, 55,251,207,153, 51,101,209,196,137, 43,134,102,102, 86,152,203,203,197, 35,
+191,252, 82,184,111,194,132,246,205,101,214,173, 79, 0,120,121,241,226,119,186,247,238,221, 46, 98,210, 36, 39, 79, 79, 79,158,
+ 76, 38,131,209,104, 68, 81, 81,145, 99,114,114,114, 96,116,101,101,213,185,219,183,127,128, 70, 51,148,154,228, 31, 44,176, 0,
+192,108, 54,183,168,192,178,178,200,170,239,241, 42, 43, 43, 67, 98, 98, 34,252,252,252, 96, 50,153,112,246,236, 89,168,213,106,
+136, 68, 34,136, 68, 34, 24, 12,134,102,179, 20, 10,197,144,240,240,112,230,202,149, 43,240,247,247,135, 76, 38,171, 47,172,234,
+138, 44,161, 80, 8,165, 82,137,202,202, 74,244,237,219, 87,184,109,219,182, 33,104,100, 28, 64, 0,176,177,177, 25, 49,122,244,
+232,250, 46,182,218,218, 90, 8, 4, 15,239,180, 54, 24, 12,168,174,174, 70,121,121, 57, 42, 43, 43,161,211,233,208,169, 83, 39,
+241,133, 11, 23, 70, 52, 85, 96, 61, 78,163,209,212,148,148,148, 56,244,235,215,207,113,199,142, 29,201,189,122,245,250,221, 69,
+195,191,252,242,139, 78,175,215, 51, 98,177,216,170,139,221,119,239,222, 93,191,238, 11, 10, 10,240,221,119,223,193, 98,177,128,
+199,227, 33, 53, 53, 21, 27, 55,110,172,191, 86,174,169,247,168,109,219,182, 17, 63,252,240, 67,215, 93,187,118, 85, 48, 12,131,
+228,228,100,236,217,179, 7, 28,199,193,197,197, 5, 26,141, 6, 37, 37, 37, 88,183,110, 29,140, 70, 35,108,108,108,224,229,229,
+ 37,157, 55,111, 94,223,213,171, 87, 11,155, 42,176,204,102,179, 89, 32, 16,192,215,215, 23, 43, 87,174,132, 78,167,131, 72,244,
+176,174,172,170,170,130, 90,173, 70, 92, 92, 28,178,178,178, 96,177, 88,154,252, 96,145, 74,165,227,119,238,220,233, 38, 22,139,
+161,211,233,144,154,154,138,244,244,116, 36, 39, 39,235, 85, 42, 21,107, 99, 99,195,243,240,240, 16, 84, 86, 86,138,167, 78,157,
+202,171,174,174, 6,199,113,136,140,140,116,222,186,117,235, 43, 6,131, 97,125, 51,171,212, 85,169, 84,254, 99,214,172, 89,210,
+186,245,102,177, 88, 80, 90, 90,138, 9, 19, 38,200, 99, 98, 98,150, 25, 12,134, 61, 0, 74,159,149, 29,193,227,119, 11, 86,159,
+253,194,249,220,185,111, 94, 72,185,199,244, 18,160,188, 71, 88,255,183, 25, 0,184,127,115,123,159,180,164, 27,102, 27, 11, 47,
+227,167, 61,107,175,218, 6,191, 89, 14,224, 88, 83,189,128, 35,250, 58, 12,151, 43, 68,145, 99, 71, 15,225,111,221,246,125,247,
+ 89, 51,134, 73,220, 58,125,207, 3, 0, 71,137, 55,122,155, 22,241,117,134, 90,233,214,109,223,119, 31, 59,122,196,245,172,236,
+ 7,235,156,149, 14, 71, 79,253,170, 62,211, 84, 47,161,135, 11,227,229, 40, 43,131,163,207, 16,248,133, 56, 34, 46, 46, 14,199,
+142, 92, 65, 80,155,110, 48, 24, 12, 48,153, 76,138,145, 35, 71,106, 14, 29, 58,164, 43, 47, 47,175, 54, 26,141,253, 11, 11, 11,
+ 83,154,173,175, 80,102,233,196,183, 24,197,102, 33,171,173, 21,215,206, 95,113,228,149,238,189, 35,186, 56,249,122, 9,157,165,
+236,137, 1,253,195,119,239,221,245,221,194, 69, 75, 63, 64,167,176, 94,189,231,139,126,107,255,229,110,211,157,134,178,146,178,
+113,146,127,244, 40,155,145,146,246,210,131,220,236,188,214, 62, 74, 67,122, 14,103,122,123,217,183, 67,251, 13, 25,223, 49,176,
+ 77, 79,241,221,251, 87,120, 11, 23, 44,220,251,197, 23,159, 77,170, 43,178, 46,198,158,237, 31, 53, 61, 91, 28,181, 3,122,250,
+136, 2, 68, 18,137,183,141,159, 31,147,181, 99,135, 54, 96,212,168, 10, 0, 48,177,172,203,181,235,215,237,229,114, 57, 56,142,
+131,201,100,250,221, 53,194,117,215, 5, 15, 25, 48,192,221,154,204,220,111,190,233, 56,119,238, 92, 20, 21, 21,129,101,217,250,
+222,239,199,246,217,168,170,170,194,184,113,227,176,125,211,166, 6,207,139, 11, 37, 18, 31, 27, 31, 31, 38,107,199, 14,109,224,
+ 75, 47,169, 96, 54,243,150,126,253,245,202, 69, 75,150,248, 79,120,229,149,223, 29, 55,134,132,132,224,155, 77,155,196,123,246,
+236,241,250,100,211,166, 25, 17, 18, 73, 6,244,250, 38,231,179,186,125,123, 56, 38, 38,202,218,180,105, 83, 95, 80, 6, 7, 7,
+227,211, 79, 63,149, 76,158, 60, 89, 60,109,202,148,207,239,182,105,179, 33, 42, 43, 43,205,185,117,107, 59, 70, 34,241,110, 46,
+179,110,125, 2, 64,141,193, 16, 26,245,193, 7,142,215,175, 95, 71, 65, 65, 1, 56,142,171,255, 59, 29, 59,118,228,189,242,202,
+ 43,246, 61,187,118,237, 78, 45,242, 79,234,193,106,168,192,106,172,208,178,182,184,122,242,111,120,120,120,192,104, 52,226,251,
+239,191,175, 47,172,234,143, 8,140,198,102, 51,116, 58, 93, 7,165, 82,137,170,170, 42,180,110,221,186, 62,163,110,190,234,190,
+164, 82, 41,116, 58, 29,188,188,188,160,211,233, 58, 52, 83, 0,117,182,183,183,175,235,205,130,254, 81, 35, 53, 24, 12, 80,171,
+213, 80,171,213, 48, 24, 12,168,168,168, 64, 77, 77, 13,212,106, 53,170,171,171,195,172, 89,102,139,197,130,196,196,196,244, 54,
+109,218,116, 22, 8, 4,176,177,177, 81,212,214,214,162,238,102, 2,149, 74,133,157, 59,119,214, 78,157, 58,213,229,218,181,107,
+ 90,107,214,225,252,249,243, 33,145, 72,160,209,104,176,105,211, 38,204,159, 63, 31, 34,145, 8,213,213,213,216,180,105, 19, 22,
+ 46, 92, 8,134, 97,160,215,235,177,127,255,254,198, 63,100,239,221,203,186,118,237, 90, 88,151, 46, 93, 28,143, 30, 61, 90, 58,
+100,200, 16,215, 97,195,134,213,175, 59,150,101,209,163, 71, 15,180,109,219, 22, 37, 37, 37, 56,125,250,116, 89,112,112,176,203,
+245,235,215, 45, 69, 69, 69, 15,154, 89,238,250,162, 73, 32, 16,192,108, 54,163,184,184, 24,106,181, 26,165,165,165, 40, 40, 40,
+ 64, 94, 94, 30, 24,166,249, 39,135, 56, 59, 59,191, 28, 26, 26, 42,120, 84,108,161, 85,171, 86, 88,180,104, 17,171,213,106, 39,
+ 0, 56,253,104,178,136,189,123,247, 30, 13, 10, 10, 98, 60, 61, 61,145,154,154, 10, 87, 87, 87, 70, 38,147,189,218, 92,129,165,
+ 84, 42,183,159, 56,113,194,169,238, 14,218, 58, 90,173, 22, 44,203, 98,226,196,137, 78, 91,183,110,221,110, 52, 26, 71, 60,139,
+ 59, 5, 27, 7, 7,230,197,126,246, 5,215,174, 37,182, 15,235,255, 54,227,212,122,213,195, 2, 28, 96,226, 46,110, 8,235,215,
+ 35,116, 79,221,117, 89, 77, 25, 59,216,117,237,168,136, 78,252,201,227,186,102, 48,138, 54,129,187,119,110,112,119,114,236,247,
+175, 29, 5,227, 4,133, 20,104,235,103,230, 95, 61,153,225,190,112, 97, 27,195,158,111,255,150,177,251,200,205, 33, 34,113,252,
+160, 31,163, 75, 23, 54,150,125, 55,195,116,188, 82,231, 20, 98, 95,121,132, 7,231, 55, 16, 22, 22, 6, 87, 87, 79,124,179,249,
+ 7,120,189,208, 5, 6,131, 1,118,118,118,242,135,187, 17,227,110,107,138, 43, 0,136,138,138,181,132,135,247, 55, 50,174, 46,
+236,188,121, 95,140, 27, 22, 49, 46,164,255,128,193,220,249,243,103,140,189, 67,140, 5,131,251,247, 44,250, 37, 54, 54,181,168,
+ 40, 63,184,109, 72, 71, 36,223,189, 57,140,227,144,200,227, 53,220,219,116, 55, 19,103,116,188,123, 49,251,151,204,178,104, 13,
+113,178, 53, 95,223,137,120,105,204,180,208,240,190,253, 44,231,127, 62,103, 16, 67,157,100,211,183,119,254,180, 41,175, 30,221,
+127,224,240,139, 49, 63,159, 12,170, 84, 23,159, 92,251, 3, 21, 87,245, 7,103, 44,235,206, 72, 36,252,226,152, 24,182,211,204,
+153,245,235, 69, 46,151,227,216,177, 99, 16,139,197, 16,137, 68, 16,139,197,245, 95, 34,145, 8, 74,165, 18, 60,142,227,183, 36,
+179,176,176, 16, 69, 69, 69,176,183,183,135,171,171, 43,138,138,138,112,249,242,101,164,166,166,130, 97, 24, 68, 68, 68,128,223,
+200,231,230, 19,153,134,191,189,255,254,240,246, 29, 59,122, 62, 89, 92,213,125,182,169, 84, 42,244,239,223,159,119,254,252,121,
+215,139, 25, 25, 99,160,215,255,208, 84,102,135,209,163,203, 75,162,163, 27,252,219,237,218,181,227, 29, 61,118, 76, 50,105,226,
+196, 5,159,110,222,188,126,197,231,159, 23,129,101,149, 45, 89,118, 30,143,199,231,241,120,240,241,241,129, 74,165, 66, 77, 77,
+ 77, 93,135, 3, 28, 29, 29, 97, 50,153, 96,177, 88,132,212, 34,173,199,111,174, 24,120,178,144,106,236,139,207,231, 63, 85,145,
+213, 20,107, 10,172,186, 34, 67, 34,145,252,110,227,170,251,122,124,227,171, 43, 98,172, 32,168,170,170,194,145, 35, 71,160, 82,
+169, 80, 93, 93,253,187,226,170,174,231, 42, 51, 51, 19,123,247,238, 69,126,126, 62, 4, 2,129, 85, 15,109,205,204,204,188,233,
+239,239,223,185,174, 71,108,224,192,129,222,151, 46, 93, 42,168, 43,230,150, 47, 95, 94,214,179,103, 79,151, 39, 63,220,155,156,
+ 89,129, 0,151, 47, 95,134, 70,163, 1,199,113, 16,137, 68, 72, 78, 78, 6,203,178,224, 56, 14, 12,195,160,180,180,180,217, 30,
+172,196,196,196,215,103,204,152,177,126,230,204,153, 49, 75,151, 46, 61, 63,104,208,160, 92, 30,143, 7,147,201, 4, 59, 59, 59,
+ 40,149, 74,164,164,164, 64,171,213,226,157,119,222,201,217,181,107,215,207,155, 54,109,138,217,178,101,203,250,188,188,188, 25,
+ 45,121,111, 89,150, 69,109,109, 45, 42, 42, 42,160, 82,169, 80, 85, 85, 5,157, 78,247, 84,109,104,240,224,193, 56,121,242,164,
+ 96,240,224,193, 91,253,252,252,138,252,252,252,138, 6, 15, 30,188,245,248,241,227, 2, 47, 47, 47,228,230,230, 34, 46, 46, 14,
+ 42,149, 10, 22,139,133,215, 76,239,234,192, 41, 83,166,244,245,245,245,229, 25,141, 70,232,245,122, 24, 12, 6, 24,141, 70,152,
+205,102,228,228,228,160, 93,187,118,124, 95, 95,223, 94, 0, 6,210, 46,164,101,170,242, 14,128, 43,249, 10,156,106, 31, 44, 37,
+ 95,163, 86,247,116, 57, 21, 21, 21, 31,190,245, 81,101,137,185, 50, 6,247,110, 29, 65,181,150,129,119,208, 64,188, 57,115, 34,
+126,187, 30,131,242,242,114, 36, 37, 37, 33, 60, 60, 92,196,227,241, 90,212, 54,247,237, 59,105,158, 52,241,255, 94, 25, 60,108,
+ 92,215,193, 67, 70,152,207,159,143,214,223,184,122,230,102,144,191, 93, 9,199,170,139,237,237,228,183,210, 82,146, 16,220,166,
+ 29, 76,172, 37, 28,136,106,178, 77,101,100,192,240, 83,145,135,249,149,249,137, 83,134,141,154,222,105,240,144, 97,166,179,103,
+ 78,152, 47,157, 59, 20, 55,108,224, 11,177, 31,127,182,199, 71,101,106,221, 94,106,167, 60,213,171,179,188,223,236,177,190,179,
+168,165, 52,208,235, 36,149, 90,240,104,191,201,227,241, 96,177, 88,126, 87, 84, 61,249,101,205,103,210,227,153,117, 56,142,131,
+ 90,173, 70,106,106, 42, 62,251,236, 51,220,190,125, 27,102,179,185,190, 39,171,209,207,161, 71,167,116, 69, 82,169, 5, 0, 50,
+ 10, 11,251,207,157, 59, 87,210, 80,113, 85, 94, 94,142,178,178, 50,228,231,231, 35, 34, 34, 66, 84,229,228,212,185,185,249,244,
+114,115,211,203,165,210,226,148,148,148,127,155,223,234,234,106, 72, 36, 18,124,245,245,215,162,147,137,137,243, 47, 93,190,236,
+208,146,245, 89,151,195,227,241,224,230,230,134,192,192, 64,132,133,133,161, 67,135, 14,144, 74,165,184,123,247, 46,190,251,238,
+ 59, 8,120, 60,150, 90,226,159,208,131,213, 88,129,213,208,255, 25,134, 65, 75, 10, 2,107, 89,115,138, 80, 42,149,222, 41, 46,
+ 46,238,227,237,237, 13,147,201, 84,223,123, 85,119,154,176,238,123, 0,144, 72, 36, 72, 74, 74,130, 84, 42,189,211, 84,166, 92,
+ 46,191, 35, 16, 8,122,117,235,214, 13, 71,143, 30, 69, 76, 76, 12, 50, 51, 51,161,213,106,161,211,233,160,213,106,113,247,238,
+ 93, 88, 44, 22,132,134,134,194,222,222, 30,114,185,252, 78,115,243, 90, 91, 91, 91,200, 48, 76, 27,153, 76,246,175, 83, 29, 30,
+ 30, 40, 43, 43,179,152, 76, 38,236,220,185,179, 74,169, 84, 42,100, 50,153,213,235,147,199,227,161,164,164, 4, 62, 62, 62,168,
+170,122,248,152,175,234,234,106,184,185,185,193,104, 52,194, 98,177, 64,175,215,195,198,198,166,190,203,183,169, 14,193,180,180,
+180, 69,143,125,223,109,194,132, 9,123,247,239,223,223,234,231,159,127,198,245,235,215,225,226,226,130,143, 62,250, 40, 51, 59,
+ 59,123, 18,128,223, 74, 74,254,255, 95,239, 88, 94, 94,126, 56, 49, 49,177, 87,183,110,221,234,247, 14, 3, 6, 12,224, 13, 24,
+ 48,192,229,241, 46,253,242,242,114,196,199,199, 35, 54, 54, 22, 38,147, 9, 73, 73, 73,102,173, 86,187,175,169,125,142,151,151,
+215,142, 21, 43, 86,216,176, 44, 11,129, 64, 0,161, 80, 8,150,101, 33,145, 72,234,123,106,115,114,114, 16, 25, 25,105,191, 97,
+195,134,237,122,189, 62, 16,128,241, 89,218, 41,212,168,213,108,244,181,106, 55, 71,133,127,252,253,155,219,251,180,125,180,159,
+184,127,115, 27, 43, 85,248, 92,191, 30,175,181,237, 33, 85, 55,187,163,253, 49,186,116,177,209,240,219,240, 51, 63,223,137, 92,
+244,206, 27, 98,191, 23, 2,138, 47,223,186,227,215,219,180,136,175,144, 2,181, 58, 64, 85, 9,220,127, 32,176,248,189, 16, 80,
+252,219,173,100,241,231,235,183, 4,104,106, 13,117,167, 8, 27,149,159,159,175,187,196,113, 99, 23,125, 33,143,157, 56, 89, 32,
+ 22, 75,157, 80,173, 74,131,159,159, 23, 94, 25,219, 7, 95,125,127, 14,246, 14,142,112,119,119, 7,143,199, 83,180, 96,241,121,
+ 87,163,227,102, 78,157,241,102,207,161, 47,142, 48,159, 61,119, 10,209,103,143, 92,223,177,126,217, 17, 35, 83,173,224,155,107,
+100, 62,222,202,132,172,204,148,215,194, 7,188, 8,169, 76,254,255,216,187,238,240, 40,170,183,123,102,182,167,247,186, 36,144,
+132,144,132, 36,148, 16, 64,233, 85, 32,128, 20, 65, 84, 16, 16, 21, 80, 64,177, 80, 68, 1, 65, 4,233,216,144, 14,210, 5, 1,
+233, 61, 64, 32,210, 75, 26, 33,189,236,166,183,221,108,223,153,185,223, 31, 36,252, 2,134,100, 19,208,207, 50,231,121,246,201,
+238,100,230,204,189,115,239,204, 61,243,190,239,125,111,115, 32,164,214, 81,188,101, 51,188, 9, 26,190,224,144,253,235,246,249,
+178, 55,223,122,183, 83,191, 1, 47, 51, 39,143, 31,196,201,195, 63,255, 62,111,106,179, 99,233,119,118,138, 99,175,229,202,134,
+142,152, 92,118,228,108,162,241,149, 5,126,201,222, 45,218,234,128,116,126,116,170,126,129, 20, 10, 11, 24,131,193,167, 73,191,
+126, 2,109, 86,150,200,214,195,131,169,126, 73,171,249, 82,253,164, 5,139,166,105,128,166, 57, 75, 56, 45, 45,139, 78,167, 3,
+247,148,220,135, 84, 53,231,128, 1, 2,109,110,174,168,176,164,164, 89,179,102,205, 30,219,199,108, 54,163,164,164,228,209,167,
+188,188, 28, 50,153, 12,165,102,179,135, 37,229,236,214,186,245,182,149, 43, 86,124,178,126,195,134, 71,174, 30,181, 90, 13,149,
+ 74,133,138,138, 10,208, 52,141, 25, 51,103, 74,103, 46, 88,240,254, 32,161,112, 58, 24,198,226,235, 89,253,178, 78,211, 52,132,
+ 66, 33,178,178,178, 30,125,178,179,179, 33,147,201, 64, 40,138,227,123,228,115, 16, 88,213, 65,238,245,137,171,234,239, 2,129,
+192, 50,115,111,213,155,192,243,178, 96,105, 52,154, 51, 49, 49, 49, 29,251,245,235, 39,140,141,141,133,151,151,215, 31,220,132,
+ 66,161, 16, 20, 69,193,218,218, 26,199,143, 31, 55,105, 52,154, 51,245,220, 68,103,207,158, 61, 27,249,209, 71, 31,137,198,141,
+ 27,135,248,248,120, 76,154, 52, 9,101,101,101, 80,169, 84, 40, 41, 41,129, 78,167, 67,199,142, 29, 33,147,201,144,146,146, 98,
+214,233,116,245,165, 42, 32,133,133,133,149,110,110,110, 94, 79,254, 99,196,136, 17, 30, 63,254,248,163, 54, 41, 41,201,220,185,
+115,103,123, 0, 13, 18,172,187,118,237,122,212,102,247,239,223,199,218,181,107, 31,197, 33,220,188,121, 19,203,151, 47, 7,203,
+178,150, 8,172, 39,113,189,184,184,152, 49,153, 76, 8, 12, 12,132, 92, 46,135, 78,167,195,154, 53,107, 24, 0,215,255,140, 14,
+105,137, 5, 75,175,215,239, 27, 59,118,236,204,219,183,111,123,137,197,226,106,211, 53, 56,142,131,201,100, 66,102,102, 38, 18,
+ 19, 19,145,146,146,130,226,226, 98, 16, 66, 96, 52, 26,113,243,230,205,114,179,217,188,247,105,188,110,110,110,159,111,218,180,
+201,211,202,202,234, 15,137,117,171, 31, 58,213,174, 87,119,119,119,244,232,209,195,253,220,185,115,159,155, 76,166,185,255,244,
+ 7, 65,117,134,118,194, 33, 37,234,141,143,185,201,147, 38,136, 91,180, 52, 37,167, 36, 94, 99,111, 93, 92, 19, 1, 0, 50, 27,
+159,171, 45,130,219, 37, 92,138,179,229, 6,190, 57,163,109,136, 63, 4, 20, 65, 48, 69, 80,252,100,198,247,234,119,180, 99, 49,
+229,199, 58, 4, 56,197, 28,252,237,204, 15,179, 62,126,231,218, 23, 95,204,114,215, 27, 53,178,144,166, 44, 13, 60, 20, 87,177,
+241, 54,250,133, 11,223,185,182,100,197, 54, 46, 59,213, 52,253, 90, 90,249, 83,103,248,214, 20, 45, 52,173,148,121, 6, 76, 87,
+250,181,232,213,236,238,239,235, 40, 87,123, 1,236, 90, 14,194,128,254, 47,225,244,217, 24,100,229,233, 80,245, 2, 80,103,218,
+131,150, 77, 49,166,154,147,162, 33, 27, 51,254,221,110, 3, 6,188, 76,142, 29,253,141, 57,248,203,207, 49,187,118, 47,223, 75,
+139,197, 66, 19,103,111,164, 4,250,114, 86,224, 24,175,169, 40, 5, 0,136,132, 98,251, 58,252, 3,190, 9,241, 73,193,161,161,
+ 33,158, 99,198, 79,116,136, 26, 48,132, 28, 59,118,144,219,187, 99,219,249,189,223,182,218,193,153, 85,226,188, 76,173,180, 66,
+109,174, 32, 2,137, 99,165,154,211, 22,232,155,235,189,127, 31, 97, 2,246,241,163, 83,245, 56, 96, 48,228, 86,230,228,120, 57,
+119,239, 46, 77,153, 63,223,218,163, 99, 71, 61, 69, 81,245, 10, 44,129, 64, 0,242,148, 56,190, 39, 57, 27, 34,176, 8, 69,213,
+ 58,249,136, 53, 24,114, 42,179,178,188, 92,187,119,151,165,206,157,107, 93,155,213,190,164,164, 4,165,165,165,143, 9,172,170,
+103,141, 69,229, 92,246,225,135,191,183, 31, 55,174, 52, 54, 54,214,227,197, 23, 95,164, 84, 42,213, 35,113, 85,253,221,205,205,
+141,242,109,214,204,238,140, 66, 17, 80, 91, 12, 86,109,215,211,146,186,211, 52,253,212,235,201,227, 25, 44, 88,150, 10, 44, 11,
+ 6, 71,179,217,108,134,187,187, 59,138,139,139,193,113,220, 83, 27,210,202,202,170,218, 7, 92,231, 76, 58,181, 90,189,122,225,
+194,133, 83,122,246,236,233, 26, 18, 18,130,162,162, 34,184,187,187, 67, 32, 16, 60, 42, 87, 53, 95, 92, 92, 28,246,236,217,163,
+ 82,171,213,171,235,169,247,170,159,126,250,233,253,168,168, 40,103, 55, 55, 55, 56, 57, 57,225,238,221,187,112,116,116,132, 90,
+173,198,253,251,247, 97,103,103, 7,138,162, 96, 48, 24,112,241,226, 69, 53,199,113,171,234,185, 49,201,229,203,151, 77,214,214,
+214,119, 75, 74, 74, 4,197,197,197,130,170,244, 12,162,138,138, 10,209,137, 19, 39, 92, 29, 28, 28,180,231,206,157, 43,242,245,
+245, 21,100,100,100, 8,140, 70, 99,189, 42,139,162, 40,124,248,225,135, 16,139,197, 48, 24, 12, 88,189,122, 53, 62,254,248, 99,
+ 8,133, 66, 24,141, 70, 44, 93,186, 20,115,230,204,121, 36,152, 15, 31, 62,220,160, 14, 82, 29, 64,106, 50,153, 96, 50,153, 96,
+ 54,155,255,212, 14,105,161,139, 48,255,193,131, 7,131,218,183,111,127,234,224,193,131, 46,246,246,246, 80, 42,149, 40, 42, 42,
+ 66, 65, 65, 1, 10, 11, 11,161, 86,171, 97, 48, 24,224,232,232,136,172,172, 44,156, 58,117, 74, 85, 89, 89,249, 18,234,152, 65,
+ 40, 16, 8,198,118,235,214, 77,248,100, 25,104,154,126,212,159, 68, 34, 17, 36, 18, 9, 20, 10, 5,186,117,235, 38,185,112,225,
+194, 88, 0,255,120,129, 85,157,161, 61, 44,172,165,219,160,151, 71,155, 34, 59,244,171,188,112,253,116,174, 45, 71,165,117,237,
+ 24,190, 19, 0,174,222,209,217, 93,138,179,229,218,180,235, 67, 13, 28,164,107,187,117,243,122, 73, 66,124,130, 95,104,120,104,
+157, 25,253, 93,155,112, 67,250,245,106,150,103,111, 67, 9, 23, 46, 92,114,120,211,230, 13, 29, 98,143,252, 47, 77,195,194,133,
+ 15,211, 52,244,235,213,140, 73,184,159, 60, 4,105,248,217, 82,209, 50,104, 80,191, 91,155,182,236,129, 34,229,176,247,170, 79,
+172, 36, 40, 41, 4,172,219,161, 91,164, 11,110,108, 76,196,157, 59,119,242, 57,142,171,219,149, 75,195, 55, 46, 46, 33, 56, 44,
+ 60,212,243,205,241,239, 58, 68, 69, 13,193,177, 99,135,176,125,203,250, 11, 47, 58, 70,108,202,186, 94, 44,144, 7, 59,137,173,
+ 29, 37, 98,161, 88, 38, 20, 11,197,197, 38,243, 67,235,186, 80, 44,178, 7, 70,214, 57,232, 76,154, 56,218,161, 87,223, 33, 56,
+ 90,197,249, 69,219, 17, 27,253,132, 45,169,142,159, 44,155,236,215,212,175,169, 70, 91,160,162,105,137, 73,111,224,236,150,109,
+204, 92,153,150, 58, 54, 13,192, 10,240,179, 8,171,113,119,123, 84, 84,135,105,169,169, 98,183, 46, 93,172,148,231,207, 91, 63,
+233, 34,172, 77, 96, 9,133, 66,128,166, 25, 75, 56,169,211,167,105, 0, 16,139,197, 79,125,177, 23,139,197,208,106,181, 96, 40,
+170,214, 29,196,192,221,237,131, 6,117,156,150,154, 42,114,238,217,211,218,237,246,237,236,140,140,140,160,136,136, 8,176, 44,
+251,152,229,170,250,163,215,235, 97, 52, 26, 33,147, 74,227, 44, 41,103,193,197,139,250, 57,227,199,207,125,255,189,247,190,221,
+179,119,175,204,222,222, 30, 42,149, 10,106,181,250,209,199, 96, 48, 32,178,125,123,209,207,247,239,143, 65, 89,217, 60, 75,174,
+167, 71,207,158,218,250,158,201, 85,130,149,119, 17, 54, 0,116,125, 22,172,103, 76,211, 16,254, 4,231,156, 1, 3, 6,232,211,
+211,211,225,227,227,243, 72,164,212, 60,167,189,189, 61, 28, 29, 29,145,144,144,128, 77,155, 54,233, 40,138,154, 83, 23,103, 89,
+ 89,153, 90,175,215,143,122,237,181,215,116, 34,145, 8,193,193,193,143,220, 58,132,144, 71,177, 87,113,113,113, 24, 59,118,172,
+ 86,175,215,143,170, 37, 7,214, 99,156, 89, 89, 89, 21, 26,141,230,141,209,163, 71,107,147,146,146,208,181,107, 87,220,190,125,
+ 27, 26,141, 6,149,149,149,200,200,200, 64,104,104, 40, 76, 38, 19,246,237,219,167,213,104, 52,111,100,101,101, 85,212,197,169,
+ 86,171, 7,127,243,205, 55,130, 99,199,142,249,121,123,123,135,181,111,223, 62,164, 87,175, 94,205,135, 13, 27,214, 52, 42, 42,
+202,171, 69,139, 22,250,126,253,250,185, 13, 24, 48,192, 77, 32, 16,136, 82, 83, 83,243, 8, 33, 3,234,226,172, 41, 0,146,147,
+147, 97, 50,153,254, 16,115, 85, 61,155,144,101, 89,139,218,168, 54,145, 93, 45,172,170,133,150, 5,150,176,240, 90,202, 88,239,
+ 65, 18,137,164,218,194, 73, 44,224,188,157,152,152,216,183, 83,167, 78,183,198,142, 29, 35,244,127, 68, 0, 0, 32, 0, 73, 68,
+ 65, 84,171,206,206,206,134, 88, 44,134, 92, 46, 71,211,166, 77, 97, 99, 99,131,210,210, 82,236,219,183, 79,123,252,248,241, 56,
+149, 74,213, 3,127,204,129, 21,254, 68, 25, 51,106,123,184, 10, 4,130, 63, 8,172,234,149, 2,104,154,206,104,200,245,108, 36,
+254, 50,206,137,239,140,113, 30, 56,120,136,221,161, 67,135,100,107,215,110, 76,232,218,245,221,109,182, 94,239,159,176,245,122,
+255, 68,199, 23,223,222,249,221, 79, 91, 30, 28,248,237, 55,171,129, 3,135, 57, 76,126,119,140, 55, 40, 74, 88, 31,167,181, 84,
+218,177,219, 11, 45,202, 47, 94,190,200, 44, 89,177,141,237,220, 53,234,234,183,223,253,180,247,219,239,126,218,219,185,107,212,
+213, 37, 43,182,177, 23, 47, 95,100,186,189,208,162,220, 90, 42,237,104, 73, 57, 39, 77, 28,237, 48, 48,106, 8,142, 28, 57,192,
+236,218,182,122,233,161,104, 99,247, 17, 51,245, 5, 89, 15,206, 18,228, 47,130,187, 36, 6,217,217,217, 21, 12,195,244,172, 37,
+192,189, 86,206,201,239,142,174, 41,174, 46, 38,100, 96,195,250, 91,183,216, 31,199,207, 55,239, 60,121, 64,119,228,194, 45,213,
+133, 27,217,101, 69, 15, 42,210, 52,106,149,145,227, 56, 16,142, 21,124,249, 37,168,186,218,168,115,231, 30, 56,119,122, 39,182,
+109, 94, 87,193,113,208,143,220,183,143, 29,249,227,124,210,180,105,179,166, 59,118,236,164, 6, 13, 30,234, 64, 8,184,193, 67,
+135, 56,238,218,177,139,242,247,247,111, 22, 16, 0,241, 63,189, 47, 61, 47,206,249, 64,153, 42, 43,235,194,245, 53,107,140, 30,
+163, 70, 57, 75, 60, 60,236,193,113, 84,125, 49, 88,181, 88,176,158,202,233,225,236,172, 56,121,242, 36,130,131,131, 33,151,203,
+ 31,243,200,136, 68, 34,248,250,250,194,205,205, 13,167, 78,157, 2, 1,110,212,198, 57, 27, 40, 47, 79, 75,139,190,186,108,153,
+193, 99,196, 8,167,182,254,254, 55,190, 93,179,198,200,178,236, 35,171, 85,205,191,101,101,101, 96, 89, 22,231,207,157, 51, 86,
+234,116,155,234, 42,231,205,239,191, 55, 84,215,189,163, 94,175, 25, 26, 25,185,120,204,152, 49,166,140,140, 12,176, 44,139,154,
+150,172,194,194, 66,216,217,217, 65,167,215, 55,113,119,119,183,182,132,179,240,216, 49, 91,212,243, 92, 23, 8, 4, 79,186, 8,
+255,140,118,255,239, 88,176, 24,134,129,143,143,207, 99,121, 70,170, 3, 7,171, 45, 67, 22, 90,174, 0, 0, 74,165,242,103,134,
+ 97, 78,142, 25, 51,102,110,219,182,109, 39, 77,159, 62, 93,224,239,239,143,138,138, 10, 56, 57, 57,193,205,205, 13,153,153,153,
+216,191,127, 63, 91, 94, 94,254, 19,203,178, 11, 10, 11, 11,139, 44,224, 61, 15, 96,208, 75, 47,189,180,231,253,247,223,119,232,
+222,189,187,168,122, 0,188,119,239, 30,142, 29, 59,102,218,189,123,183, 74,175,215,143,178, 36,139, 59, 0,228,231,231,159, 2,
+240,202,184,113,227,118, 12, 27, 54,204, 78,175,215,139,210,211,211, 97, 52, 26,193, 48, 12, 74, 75, 75, 77,209,209,209,149, 90,
+173,118,116,213,190,245,241,221,204,207,207, 15, 53,153, 76, 99,111,221,186,181,232,149, 87, 94,113,233,212,169,147,152, 97, 24,
+196,196,196, 20, 69, 68, 68,184,171, 84, 42,211,229,203,151, 75,244,122,253, 28,165, 82,105,209, 82, 57, 20, 69, 65,165, 82,193,
+213,213, 21,122,189, 30, 28,199,193,104, 52,194,206,206,238,209,242, 70,132,144,135, 55, 71,195, 93,132, 96, 24, 70, 96, 54,155,
+241,218,107,175,129,227, 56,172, 94,189, 26, 12,195, 8, 26,202, 99,107,107,123, 35, 62, 62,126, 80, 88, 88,216,163,242,208, 52,
+ 13,154,166, 33,149, 74,225,234,234, 10, 23, 23, 23,156, 57,115, 6, 52, 77,223,176,144,246, 78,113,113,113,187,147, 39, 79,118,
+186,115,231,206,155, 0,218,152, 76,166, 38, 44,203, 82, 52, 77,231,177, 44,123,183,178,178,114, 19, 44, 92, 42,167,176,176,112,
+209,216,177, 99, 35,118,237,218,101, 43, 20, 10, 31, 93, 47,154,166, 33, 22,139,225,234,234, 10,153, 76,134,230,205,155, 67,167,
+211,225,243,207, 63, 87,105,181,218, 69,255,166, 7, 66,215,206,221,112,238,196, 78,235,109, 91,183,171, 89, 22,116, 85, 42,134,
+ 71, 8,241,135, 96,235,230,245, 18,153, 80,239,212,181,115, 55,139, 92, 43, 70, 19, 83, 50,106,194, 79, 62, 85, 75,229, 44,202,
+200,204, 90,181,243,167,183,211, 0, 96,197,234,141, 1,217,169,166,233, 9,247,147,135,172,221, 24,221,209,104, 98, 44, 90, 0,
+247,127,162,101, 71, 5, 8,244, 74,165,242, 42, 69,201,253,186,190,101,154, 19,220,140,122,185,160,132, 83, 80, 20, 53, 85,169,
+ 84,166, 89, 90,247, 78,157,186, 35,250,244, 46,108,219,178,163,130,226,160,175,190,255,246, 1,100,223,252, 11, 4,184, 80,189,
+171,102,242, 43,248,114,206,140, 73, 31,171,212, 21, 43,215,254, 88,183,219,164,117,155, 23,208,186,205, 11,152, 50,245, 51,135,
+208,176, 16, 95, 0,216,183, 15,108,152, 95,194,225,185, 11,230,191,188, 96,238,124,168,180, 6, 84, 47,171,115, 63, 41,225,104,
+ 90, 58,140,252,240,244, 63,204,101,152,171,248,244,211, 22,250,138, 10,183, 46, 51,103,186, 10,151, 45,163,171, 95,160,159,180,
+ 96, 61,178, 94, 53,128,243,196,217,179, 71, 63,253,228, 19,197,242,101,203,250, 45,249,230, 27,171,150, 45, 91, 34, 63, 63, 31,
+ 33, 33, 33,144,203,229,136,137,137,193,169,227,199, 53,149, 58,221, 28, 79, 79,207,181,121,121,121,181,114,206, 7,174, 10,231,
+204,105,110,212,104, 60,150,111,222,252,160, 87,159, 62, 5,155, 54,109,106,210,191,127,127, 90,171,213,162,162,162, 2, 21, 21,
+ 21, 48, 24, 12, 16,139,197, 80, 42, 20, 92,174, 66,113, 55, 59, 59,123, 83,157,229,252,232,163, 22,218,210, 82,183, 46, 51,103,
+186,154, 75, 74,100, 31,103,102,230,210, 91,183,126, 51,105,226,196, 79,166,127,244,145,180, 73,147, 38,148,193, 96,120, 36,180,
+204,102, 51,172,172,172,204, 12,195,184, 0,208, 90,194, 41, 59,122,148, 41, 41, 41,129,179,179,243,163,180, 75, 52, 77, 67, 38,
+147,193,201,201, 9,149,149,149, 32,132,240, 9,112, 27,226,145,121,218, 63,130,131,131,111, 8,133,194, 38, 53, 77,132,181,173,
+109, 87,243, 59,195, 48,185,241,241,241,145, 79, 40,220, 90, 77,159,114,185, 60,128,227,184,175, 59,117,234,244,202, 59,239,188,
+ 67, 93,184,112, 1,103,207,158, 37, 10,133, 98, 31, 77,211,115, 20, 10, 69, 90, 29,111, 54,181,114, 58, 57, 57,217,217,217,217,
+125,104, 99, 99,211,167, 58, 21,131, 76, 38,187,167,209,104,206,168,213,234,213,117,100,111,127, 42,167,159,159,159, 61,199,113,
+ 31,216,216,216,244, 45, 46, 46,110, 11, 0,174,174,174,183, 53, 26,205,105,154,166,215,212,177,128,244, 83, 57,189,188,188,172,
+108,109,109, 23, 57, 59, 59,191,241,206, 59,239,184, 92,184,112, 33,239,246,237,219, 98,149, 74,181,147, 97,152,186, 22,123,254,
+ 3,103,203,150, 45, 31, 91,139,240,121,182, 17, 0,180,110,221,250,200,224,193,131, 7,190,241,198, 27, 48,155,205,248,233,167,
+159,112,234,212,169,163,169,169,169,131,234,121,251,124,140,211,195,195,195, 85, 46,151, 71,143, 30, 61,186,233,208,161, 67,173,
+ 29, 28, 28, 32, 16, 8,160,209,104,144,150,150,134,123,247,238,145, 83,167, 78, 85, 38, 36, 36,228,234,116,186, 30, 5, 5, 5,
+197,150, 94,207,103,124, 75,126,140, 83, 40, 20,118,247,241,241,217, 61,111,222, 60,187,190,125,251, 90,185,184,184, 64, 40, 20,
+130, 97, 24, 20, 20, 20, 32, 46, 46, 14,199,142, 29,211,252,242,203, 47,154,146,146,146,215, 80, 99,212,253, 43,203,249,188, 57,
+171, 51,185, 63,214,183, 66, 91, 38, 36,101, 96,241, 99,219,252,240, 81, 66,124, 66,171,154,150,171, 26,153,220, 45, 42,103, 84,
+ 23,199,168, 87,134,182,239, 3, 0,251, 15, 94, 63, 83,207, 98,207, 79,150,243,139,132,248,164, 39, 22,155, 14,185,159,152,142,
+133,141,174,187, 31,230,198,197, 37, 60,198, 25, 30, 30,122, 63, 49,227,233,217,233,159, 52,244,214,122,111, 86,199,139, 61,190,
+103,118, 98,230,255, 92,160, 45,155, 97,208,144, 87,134, 13,252,108,214,108,124,189,100, 49, 14,237, 63,112, 52, 49,243,209,114,
+ 62,255,200,190,244, 39,114, 82, 95, 9,133, 47, 88,123,121,117,219,229,234, 58,251,228,233,211,182,213,241,181,213, 49,146, 79,
+ 78,184,138,136,136, 40,188,115,231,142,135, 37,156,131,190,251,206,164,183,179,147, 46,249,233,167,238, 90,163,177,251,199, 31,
+127, 44,188,113,227, 6,118,239,220,201,232,114,114,118,228,179,236, 7, 79,241,126,252,161,238, 95,137, 68, 29,101, 46, 46, 61,
+ 90,204,158, 45, 93,178,103,207, 56,121,147, 38, 30,131, 6, 15, 22, 11,133, 66,104, 52, 26, 40,149, 74, 92,142,137,209,103,101,
+103,199,233,245,250, 97,185,185,185,121,150,214,125,208,119,223,153, 28, 3, 2, 96,235,225,193, 93,186,124,217,113,230,188,121,
+147, 60,188,188, 28,186,116,237, 42,178,182,182, 70, 89, 89, 25,178,179,179,113,233,210,165,194,180,180, 52,111, 0,172, 37,156,
+191,221,187,215,250,220,213,171, 35, 62,253,244, 83, 73, 72, 72, 8,236,236,236,160, 82,169,144,152,152,136,203,151, 47, 27,246,
+236,217, 83,161,209,104, 38,229,230,230,254,246, 39,182,251,127, 67, 96,253, 85, 55,158,135,135, 71, 36, 77,211, 95, 84,185,163,
+ 22,214,183,166,223,191,233,161,227,233,233,233,235,228,228,180, 94,167,211, 17,131,193, 48, 49, 63, 63, 63,251,111, 88, 78, 97,
+100,100,228,143,133,133,133,157, 8, 33,112,112,112,184, 18, 31, 31,255, 30,234,246,197, 63,141, 83,224,233,233,217,201,198,198,
+166,163,141,141, 77,119,147,201,212,178, 42, 14, 47, 81,171,213, 94, 48,155,205, 87,243,243,243,175, 84, 61, 16,254, 63,235, 46,
+ 0,208,215,219,219,251,109,142,227, 2,105,154,118,172,114,149,150, 19, 66, 82,202,202,202, 54, 2, 56,253, 55, 40,231,115,227,
+ 12,245,195, 48, 66, 33,228,177,135, 3,135,236, 39,131,215,171,131,225, 31,219,143, 32, 41, 33, 3, 7, 26, 80, 78,122,104,111,
+183,229,192,195,153,134,168, 59,112,246,113, 49,100,129,104,105,176,192,106,138,177,181,114,102, 97,187,133,124,220,179,180, 81,
+104, 83,116, 7,133, 78, 28,133,171, 73, 25, 56,247,111,124,214, 61, 79,206,175, 1,231, 95,130,130,174,208, 66,161, 39, 69, 81,
+ 52, 0, 80, 52,205,113, 0, 11,154,102,106,186, 5,159,120,161,172,147,211, 4,180, 18, 75,165, 77, 88,134,241, 40, 17,139,237,
+ 46,219,216,180, 51, 0,149,158, 44,251,197,217,210,210,251, 13, 45,231,124,192, 9, 64,168, 80, 42,245,189,108,109, 61,184,212,
+201,169, 93, 25,195,120, 0,224,164, 82,105,124,165, 86,187, 41, 39, 39,103, 99, 45,158,138,122,203, 41,146, 74,125, 88,134,241,
+160, 0, 66, 11,133,133, 39,165, 82,159, 34, 55,183, 55,181, 58, 93, 83,169, 84,106, 6,160, 50,153, 76,163,115,114,114,206, 54,
+132, 51, 91, 32, 8,189,107,103,215,149,181,183,119, 49, 1, 54, 38,142, 51,153,204,230, 28,131,193,112, 79, 32, 16,172, 84, 40,
+ 20,169,127,114,187,243,104,224, 77,194,115,242,156, 60, 39,207,201,115,242,156, 60,231,159,204,233,238,238,110,237,233,233,233,
+ 91,245,146,248, 79,172,251,191, 10, 66,254, 18,240,224,193,131, 7, 15, 30,255,124, 20, 22, 22,106, 81, 75,204, 21,143,255, 31,
+212, 53,251,165, 33,166,191,198, 40,217, 56,158,147,231,228, 57,121, 78,158,147,231,228, 57,255,115,156,245,113,243,174,199, 63,
+ 73,120,241,156, 60, 39,207,201,115,242,156, 60, 39,207,249,223,227,252, 87,129,230, 47,193, 83,225, 81,245,121,222,251,242,248,
+119,247,133, 39, 33,175,250, 52,100,127, 47,254,146,243,224,193,131,199, 63, 27,255, 31, 49, 88,213, 3, 85,193,115,218,239,121,
+ 31, 11, 0,139, 41, 10, 51, 0,128, 16, 44, 5, 48,251, 89,246, 37, 79, 89,209,253, 73,132,133,133,185, 82, 20,213,219,193,193,
+161,149, 90,173,142, 35,132,156,190,119,239, 94, 9,101,225,250, 79, 62, 62, 62,126, 50,153,108, 28, 69, 81, 45,171,206,155,168,
+215,235,183,230,228,228,100, 60,135,118,163, 0,188, 43,149, 74, 95,117,116,116, 12, 44, 43, 43, 75, 49, 26,141,191, 0, 88,135,
+ 70,100,156,246,242,242, 10, 2, 48,150,227, 56, 33, 77,211,187,242,242,242,238, 88,122,172,123,216,144,189, 4,104, 1,128,230,
+ 40,110, 4, 77,232,125, 0, 56, 10,120, 80, 24,127,232,213,231,220, 95, 27,210, 23, 30,127,123,161,233, 37,132,112,159, 2, 0,
+ 69,209,203, 88,150,253,172,174,253, 5, 2,193, 10,194,113, 31,128, 2,161, 40,122, 25,199,113,179,248, 71, 20, 15, 30, 60,120,
+252, 7, 32,151,203, 7,120,121,121,237,240,242,242,218, 33,151,203, 7, 88,112, 72,120, 45,131, 21, 75, 81, 96,129,199,243,235,
+ 52, 96,191,250,204,146, 53,143, 93,110, 97,213,106,114,122, 80, 20, 88, 82, 5,138, 2,231,238,238,190,222,219,219,123,245,147,
+ 31,119,119,247,245, 20, 5,174,198,190,108, 13,113, 23, 94, 83, 96,213,247,137,136,136,112,121,235,173,183,214, 40, 20,138,117,
+ 38,147,105,125,118,118,246,186,145, 35, 71,174, 9, 14, 14,246,180,164,238,254,254,254, 67,135, 12,125, 37,250, 98,236,141,251,
+201, 41, 89,202,132,251,105,153, 39,207, 92,186,218,111, 64,212, 25,127,127,255,161, 13,104, 35, 10,192, 68,161, 80,120,222,214,
+214, 54, 87, 40, 20,158, 7, 48, 89, 32, 16,252,182,120,241,226,204,248,248,248,130,152,152,152,242,232,232,104,197,132, 9, 19,
+ 82, 40,138, 58,140, 63, 90, 66,195,235,179,226,120,121,121, 45,200,201,201,185,145,151,151,119,179, 73,147, 38, 63, 60,193, 81,
+155,213,231, 17,167, 91,216,144,187,133, 21, 38, 82, 88, 97, 34,110, 97, 67, 72,141,239,119, 27,216,165,235,235, 75,127,232, 11,
+ 54, 54, 54,193, 79, 8,121,143,167,112,254,225, 88,103,103,103,111, 66, 8,221,188,121,243, 14,114,185,252,123,185, 92,254,125,
+243,230,205, 59, 16, 66,104,103,103,103,111,153, 84, 90,111, 95,122,142,224, 57,121, 78,158,147,231,252,187,113,254,119, 45, 88,
+132,144, 55, 83, 82, 82,172, 57,142, 67,112,112,240, 24, 0,199, 27, 98, 85,162, 40,204,224,184,135,214, 28,154,166,102,246,236,
+217, 43,194,202,202,234,177,140,197, 58,157, 78,114,254,252,185,222, 28, 71,168,170,253,102, 16,130, 53, 22, 90,163, 60, 40, 10,
+ 51,140, 70, 3, 45, 18, 73, 32, 16,208, 31,135,135,183,138, 44, 46, 46, 62,203,178,236, 79,181, 36,175,172,223,108, 67, 81,216,
+180,105, 83, 75, 15, 15,143, 63,172,161, 82, 80, 80, 32, 30, 60,120, 80,131,248,222,108,213, 74,166, 79, 75,235, 74,139, 68,190,
+ 38,179,217, 21, 0, 68, 34, 81,137,204,214,214,231,243, 57,115,172,109,108,108,184,146,146, 18,168, 84, 42,106,202,148, 41,178,
+ 41, 83,166,244, 5,176,173, 46,206, 38, 77,154,248,135,183,110, 59,109,235,150, 45, 29, 43, 74, 75,245, 27, 87,174,189,101, 16,
+ 74,181, 77, 91, 6,137,191,152,247,149,195,130,185,179, 39,154, 76,166,184,220,220,220,244,250,140, 46, 0, 14,124,248,225,135,
+ 97,131, 6, 13,146,168,213,106,153, 86,171,109,182, 99,199,142,207,219,183,111,111, 27, 17, 17, 33,217,189,123, 55, 85, 94, 94,
+ 14, 66,136,117, 72, 72, 8, 25, 57,114,164,126,239,222,189, 83, 0,124,219, 16, 11, 16,203,178,162,234, 76,233, 12,195, 72,170,
+250,162,201, 18,139, 17, 5, 60, 8,235, 50, 18,160, 16, 24, 31,243,139, 44,172,235, 72, 61, 8, 82, 40,224, 65,213,139,192, 59,
+ 28,199,249, 61,197,170,148,161, 80, 40, 54, 52,230,102, 25, 56,112, 16, 0,172,191,121,243,230,197,162,162,162, 38, 28,199,142,
+182,212,178, 69, 81, 20, 37, 20, 10,199, 2, 88,162,211,233, 38,156, 61,123,182, 45, 0,244,238,221, 91, 12,224, 6, 33,164, 19,
+254,252,188,116, 60,120,240,224,193,227,111, 42,176,196, 0,112,241,226, 69, 16, 66, 36,141, 56, 31, 85, 83,184,124,240,193, 7,
+240,242,122, 60,220, 36, 47, 47, 15,209,209,231,159,165, 78,143, 13, 82,139, 22, 45,114, 40, 41, 41,121,121,211,166, 77,253, 0,
+124, 94, 80, 80, 16, 93,207,241, 5,132, 96, 41, 77, 83, 51, 41,138,130, 68, 34,205,152, 56,113,226,141,170,250, 7, 28, 62,124,
+216,122,240,224,193, 90,138,162,210, 0, 64, 34,145,186, 11, 4,180, 31, 33,164,122,160,125,170, 16,124,197,214, 54,152, 16, 50,
+120,210,138, 21,108,187,168, 40,161,189,187,187, 0, 52,141,162,236,108,151,245, 63,252,208,233,254,169, 83, 82,207,144,144,108,
+163, 68, 82,158,156,156, 12, 47, 47, 47,136,197,226,122,223, 18,172,173,173, 39,124, 56,253, 19,183,138,210, 50,157, 89,173, 54,
+217,114, 44, 99, 47, 19, 81,170,162,146,242,140, 28,123,237,132,201,211,132,115,103,125, 52, 1,192,103,245, 80, 77,153, 62,125,
+122,203, 14, 29, 58,200,247,236,217, 67, 85, 84, 84, 64, 40, 20,218,182,109,219, 22,145,145,145,236,217,179,103, 41,127,127,127,
+132,135,135, 35, 38, 38, 6,151, 47, 95,166, 34, 34, 34,172, 15, 28, 56, 48,198,108, 54,127, 91,159,168, 22, 8,232, 89, 35, 70,
+140, 28, 96,109,109,109,214,233,116,120,231,157,119,160,209,104,208,178,101,203,214, 61,122,244,136, 53, 24, 12,162, 67,135, 14,
+134,179, 44,135,186,196,117,181, 27,176,202, 98,213, 10, 4, 41, 69,241,135, 90, 87,255,159,227, 56,191,251,247,239,135,150,151,
+151,131,227,184, 71,107, 50, 2, 64,183,110,221, 26,210,151, 10, 8,193,210,193,131, 7,205, 4, 40,244,234,213,171,100,218,180,
+105,108, 98, 98, 98,143,225,195,135,189,240,224, 65, 74, 93, 47, 1, 5, 20, 69, 47,163,105,106, 6, 69, 81,212,184,113,227, 11,
+108,109,109,135,249,248,248,220,167, 40, 74, 40, 22,139,171,239, 3, 65,203,150, 45,221,194,195,195, 39, 59, 57, 57, 21, 10,104,
+218,157,128, 16,138,162,151, 17,194, 21,240,143, 40, 30, 60,120,240,248, 15, 8, 44,138,162,138,111,223,190,237,165,215,235, 65,
+ 81,148, 37,214,160,184, 39, 6,156, 31,105,154,122,143,162, 40,132,135,183, 74, 95,189,122,117,109,235,109, 25,195,195, 91,165,
+ 11, 4,180, 63, 33, 4, 20, 69,175,125, 98,160,137,171,111, 64,148, 72,164, 51, 0,192,203,203,187,224,200,145, 35,230, 17, 35,
+ 70, 96,217,178,101,146, 89,179,102,125, 69,211,244,168,188,188,188,220, 58,202, 9, 0,179,221,220,220,157, 55,109,218,212,114,
+226,196,137, 55,148, 74,229,135, 0,224,237,237,189, 26, 64, 43,138,162,210,106,108,195,186,117,235, 34, 39, 76,152,144, 88, 88,
+ 88, 56,251,105,156,175,216,217, 5,186,120,123, 15, 93, 30, 19, 67,132, 12, 67, 85,220,184, 81,158,155,159,111, 50,178, 44,125,
+ 60, 61,189,227,168,241,227,197, 30, 94, 94,228,208,186,117, 77,181, 34, 17, 97,101,178,138,248,248,120, 98, 50,153,238,213, 87,
+119,138,162, 66,156, 28,157,108, 54,174, 88,123,195, 77, 42,160, 92,125,188, 41,177,189,163,144,182,181,147, 18,129, 64,215,212,
+199,219,142,162,168,144,250,218, 72, 44, 22,143,233,215,175,159,245,238,221,187,169,240,240,112, 56, 58, 58,226,226,197,139,184,
+125,251, 54,202,202,202,104,134, 97,208,190,125,123, 44, 93,186, 20, 62, 62, 62,168,168,168, 64,102,102,166,171, 88, 44,118, 51,
+155,205, 79,187,158,143, 9,222, 25, 51,102,192,221,221, 29, 44,203, 34, 47, 47, 15,149,149,149,176,177,177,129,131,131, 3,148,
+ 74, 37, 14, 29, 58,104, 73, 95,178, 8, 47,190,248,162, 22, 64,230,147, 22,172,134,112,202,229,242, 83,133,133, 69, 93,123,246,
+236,137,242,242,114,211,188,121,243,208,182,109, 91,180,104, 17, 84,111, 57, 89,150,253,204,213,213,117,179,139,139,203,138,105,
+211,166,121,186,184,184,192, 96, 48,204, 41, 41, 41,193,140, 25, 51, 0, 0,145,145,145,173, 8, 33, 71, 39, 76,152, 0, 63, 63,
+ 63, 69,105,105,105,246,253,251,247, 39, 22, 22, 22,198,213, 88,226,232,207,152,178,204,115,242,156, 60, 39,207,249,119,227,252,
+ 87, 10, 44, 82, 99, 32, 36,120,138,171,130, 16, 82, 38,151,203,189,172,172,172, 64, 8, 41,107,232,201, 56,142,155,226,226,226,
+ 82, 56,123,246,236, 46, 65, 65, 65,198, 41, 83,166,196,101,102,102,206,169,185, 79,179,102,205, 22,125,255,253,247, 72, 78, 78,
+206, 92,188,120,113, 76, 73, 73,201,194, 6,158,102, 22, 33, 88, 13, 0, 74,165,178,248,240,225,195, 29, 46, 92,184, 48,107,245,
+234,213, 94, 83,166, 76,145, 76,155, 54,109,178, 5,150, 28, 8,133, 66, 93,109,110,193,218,224,225,225, 97, 18, 10,133, 79, 91,
+ 63, 16, 19,219,181,147, 18,142, 27,250,205,197,139, 28,151,155,171, 63,182,101, 11,150, 93,190, 60,201,193,213,213,215,205,205,
+141,248, 53,105, 82,100,197, 48, 5,170,162, 34, 58,162, 95, 63,209,201,109,219,154, 74,253,252, 18,246,237,219, 87,201,113,220,
+ 41, 11,138, 80,105, 52,155, 13, 54, 62,222,230,193, 67,250,181,186,119,237,118,178,149,179, 51,221,170,125,219,208,164,148,204,
+155, 20, 96, 4,234, 95, 60,214,193,193, 33,168,184,184, 24, 42,149, 10,110,110,110, 88,179,102, 13, 60, 60, 60,160,213,106, 17,
+ 31, 31, 79,154, 52,105, 66, 93,186,116, 9,222,222,222, 40, 42, 42,130,209,104,132, 86,171, 45, 52, 26,141, 79,171,123, 1, 77,
+ 11, 54,210, 52,245, 14, 69, 81, 8, 12,108, 81,240,237,183,223,154, 9, 33, 8, 9, 9,193,176, 97,195,112,241,226, 69,196,199,
+199, 87, 91,153,204,126,126,254, 5, 52, 77,185, 63,236,110,117, 91, 4,235,233,107, 0,144,153,151,151, 55,187, 49,199,203,229,
+114, 25,203,178,147, 2, 3, 3, 7,189,254,250,235, 38,177, 88, 12,173, 86, 91,125, 45, 76,253,251,247, 47, 25, 60,120,144,203,
+209,163, 71,235, 44,103,113,113,113, 90,203,150, 45,223,249,228,147, 79,182,175, 93,187,214,241,179,207, 62,123,180, 8, 55,203,
+178,224, 56,238,145,149,237,192,129, 3,200,200,200,248,186,176,176,144,127,112,241,224,193,227,191, 8,139,180,200, 63,209,130,
+245,151, 84, 70, 32, 16,172, 59,117,234, 84,219,110,221,186, 9,123,247,238, 29,126,226,196,137,112,133, 66, 17, 87, 53,168,133,
+247,238,221, 59,220,221,221, 29,107,214,172,209, 10, 4,130,117,141, 60,205,163,193, 46, 47, 47, 47,150,162,168, 47,126,253,245,
+215, 77, 19, 39, 78,132,135,135, 71, 91,165, 82,249,151, 94,228,178,228,228,206,227, 22, 44,224,100,128,224,232,246,237,228,171,
+152,152,111,246,254,242,139, 56, 32, 32, 0,132, 16,100,102,102,218,255,180,105,147,243,168,190,125,227,243, 53, 26, 42, 53, 63,
+159, 77, 56,114,132, 46,161,233,239,210,210,210,138,107, 46,214, 92, 27, 76, 38,211,245,236,172,172,160,206, 93, 59,123, 93,188,
+145,112,107,248,208, 65, 61,105, 33, 77,103,100,229, 93,119,115,113,182,185,124, 37, 70,101, 50,153,174,215, 87, 78,141, 70,147,
+193, 48,140, 51, 33,196, 45, 58, 58, 26,174,174,174, 40, 43, 43,131,217,108,134,201,100, 50,106,181, 90, 89, 82, 82, 18, 12, 6,
+ 3, 12, 6, 3,236,237,237,113,239,222,189, 2,134, 97,206, 61,141,147,101,217,119, 1, 44, 32,132, 32, 57, 57, 89, 81,229,250,
+108,225,232,232,184,147, 97, 24, 40,149, 74, 68, 71, 71,143,206,203,203, 75,174,169,111,170,254, 42, 26,125,151, 18,210,232,246,
+114,115,115, 11, 23,139,197,179,167, 78,157,234, 17, 22, 22, 6,189, 94, 15, 0,176,181,181,133, 86,171,133,189,189, 61, 58,117,
+234,148,184,112,225, 66, 19, 33, 24, 7, 32,191, 46,190,196,196,196,162,160,160,160,169, 19, 39, 78,252, 50, 40, 40,200,159, 16,
+130,192,192, 64,244,235,215, 15,199,142, 29,195,131, 7, 15,160,209,104,216,107,215,174,237,206,201,201, 57,194, 63, 99,121,240,
+224,193,139,172,127,143, 5, 11, 85, 21, 34,127,246, 9, 11, 11, 11,139,146,146,146, 78,220,188,121,115,208,171,175,190,138,232,
+232,232,113, 0, 62, 2, 0,169, 84, 58,238,213, 87, 95,197,205,155, 55,145,148,148,116,162,176,176,176,232,121,156,147,162, 40,
+173,209,248,208,128, 35,147,201,172, 26, 56, 80, 7, 84,185, 6, 65, 8, 9,120,218,182,122,172, 97,190, 47, 14, 27, 70, 87,222,
+190, 93,190,224,228,201, 15,119,253,250,171,216,199,199, 7,106,181, 26, 2,129, 0,246,246,246, 84,191,168, 40,167,141,187,118,
+121,250,216,217, 93,158, 60,126,252,253,175, 79,159,214, 94,174,168,176, 40,189,130, 94,175,223,180,104,225, 23, 61,183,239,216,
+ 27, 18, 28, 18,232,116,236,212,249, 91, 46, 46,246, 86,126,126, 1,210,138,242,114,195,247,171,151, 9, 53, 26,205,230,250,120,
+116, 58,221,129,179,103,207, 14,245,241,241,113,139,139,139,131,209,104, 4,203,178,232,211,167, 15, 8, 33, 82, 0,156, 80, 40,
+ 68, 98, 98, 34, 76, 38, 83,225,131, 7, 15, 20,169,169,169, 82, 0, 75,234,161,126, 76, 40,209, 52, 61,106,208,160, 65, 96, 24,
+ 6,253,250,245,195,193,131, 7, 95, 5,240,229,211,246,127, 6, 11, 86, 51, 47, 47,175,197, 85,231,180, 40,184,221,211,211,179,
+ 75,243,230,205,191, 92,190,124, 41,229,225,225, 5,150,101, 96, 54,155, 80, 84, 84, 2,181, 90,141,208,208, 80,248,250,250, 98,
+201,146, 37, 0,112,176, 62,113, 85,141,228,228,228, 20, 0,175,141, 31, 63, 94,124,241,226,197, 72,189, 94,191,170,111,223,190,
+184,117,235, 22,238,220,185,243,134,187,187,123,161,143,143, 15, 35,151,203,223,161, 40,202, 94, 38,147,237,122, 30,215,129, 7,
+ 15, 30, 60,254, 97,248, 75,180,200, 95, 45,176,234,172,152,187,187,187,117, 89, 73,225, 7,126,126,126, 50, 0,144,138, 5,189,
+ 92, 92, 92,190, 46, 41, 41,169,108,232, 73,181, 90,237,222, 29, 59,118,188,180,114,229, 74,113, 84, 84, 84,243, 95,127,253,181,
+ 3, 0, 68, 69, 69, 53,183,179,179,195,142, 29, 59, 76, 90,173,118,239,243,170, 36,199,113,253,218,183,111,143,210,210, 82,100,
+102,102,222,104,200,177,135, 15, 31,182, 6,208,170,190,109,117,193,104, 54,187,217,123,121, 9, 11, 46, 94, 52,233, 24,198, 55,
+ 40, 40, 8,106,181, 26, 18,137, 4, 6,131, 1, 25, 25, 25, 16,139,197,212,131,244,116,215, 89, 31,125,116,201, 42, 40,200,182,
+122,134,161, 37,200,203,203,211, 1,152,246,213,162,175,118, 46, 95,182,204,189,180,164, 44, 89, 44,177,210, 91, 91, 73,157,103,
+126,178,144, 20, 20, 20,124, 92,181, 70, 85,125, 88,178,115,231,206,254, 47,189,244,210, 93, 31, 31, 31,247,226,226, 98, 79,149,
+ 74, 69, 74, 75, 75,169,170,190, 65, 1,192,221,187,119,145,149,149,197,176, 44,123, 9,192, 2, 88,224,126,124,100,154,146,203,
+157, 58,116,232,208,223,197,197,229,145, 43, 50, 34, 34,162, 63,128,239, 20, 10, 69,217,243,236,220,167, 78,157,178,230, 56, 46,
+ 20, 0,250,247,239,111,169, 24,127,115,212,168, 81,148,149,149, 13, 24,134,129, 84, 42,134, 84, 42,133,173,173, 61,156,157,157,
+145,149,149,133, 94,189,122,113,233,233,233,135,172,173,173,183, 52,180, 76,231,207,159,127,185, 67,135, 14, 31, 77,158, 60, 25,
+102,179, 25, 67,135, 14,133, 66,161, 88,158,145,145,177,199,211,211,115,244,156, 57,115, 92, 93, 92, 92, 48, 99,198, 12, 43, 0,
+243,249,103, 45, 15, 30, 60,120,145,245,239, 16, 88, 79, 27, 20,219, 59, 57, 57, 77, 41, 44, 44,148, 85,187, 94, 40,138,146,181,
+105,222,124,157, 88, 44,254, 49, 47, 47,239,114, 67, 78, 90, 94, 94,174, 74, 79, 79, 63, 20, 27, 27, 59,114,248,240,225, 56,125,
+250,244, 88, 0, 24, 62,124, 56, 98, 99, 99,145,158,158,126,168,188,188, 92,245, 60, 42,232,237,237,253, 74,143, 30, 61,198,118,
+232,208, 1,135, 15, 31, 6,203,178,231, 26,114,124,205, 25,131,181,205, 34,172,222,102, 9,151,228, 97,158, 35,176, 44, 11,129,
+ 64, 0,189, 94,143,188,188, 60,220,191,127, 31,246,246,246, 40, 43, 45,165,236,157,157, 77, 6,131,129,109,104, 61,243,242,242,
+114,111,223,248, 61, 85,167,215,139,156, 92,156,181,118, 54, 18,162, 82,171,233,187,119,111,229, 21, 22, 22,102, 90,170, 5, 9,
+ 33,221, 79,158, 60, 57, 87, 32, 16,188, 42,151,203, 49,114,228, 72,170,119,239,222,144, 72, 36,208,233,116, 40, 47, 47,175,190,
+142,254, 0,224,234,234,234, 97,109,109,189,159,166,233,130,140,140,140, 9,245,157,128,101,217,225, 67,134, 12, 17,154,205,102,
+ 44, 92,184, 16,243,231,207,199,128, 1, 3,132,215,175, 95, 31, 14, 96,195,243,234,216,132, 16,188,244,210, 75,143,130,220,159,
+ 8,110,175, 21,221,187,119, 23,166,167,167, 7,200,229,114,100,102,102,194,218,218, 26, 30, 30, 30,112,116,116,132,171,171, 43,
+ 86,174, 92,137, 85,171, 86,221, 17, 8, 4,107,243,242,242, 82, 27, 90, 38, 95, 95,223,119,198,140, 25,243,206,200,145, 35,161,
+ 86,171, 17, 27, 27,139,206,157, 59, 99,241,226,197,158, 49, 49, 49,211,219,183,111, 15,161, 80,136, 11, 23, 46,128,101,217, 28,
+254, 25,203,131, 7, 15, 30,255,124,129, 69, 61,161, 28, 1, 0,142,142,142,246, 50,153,108, 98, 84, 84, 84,151,161, 67,135,162,
+ 95,191,126,143, 29,188,102,205, 26,219,232,232,232,153,223,126,251,109,119, 0,107,149, 74,101,105, 3,172, 74, 7,118,238,220,
+ 25,245,226,139, 47, 90,247,236,217, 51, 0, 0,164, 82,169,113,231,206,157, 90,142,227, 14, 52,162, 46,143,101,111,151,203,229,
+237, 5, 2,193,184, 1, 3, 6,180,127,235,173,183, 16, 31, 31,143, 29, 59,118, 36, 6, 5, 5,157, 46, 40,176, 60,110,250,137,
+ 25,131,181,205, 34, 92, 93,159, 53, 75, 34, 18, 21,169,242,242, 92,132, 94, 94, 18, 27,137, 36,231,250,245,235, 1,205,155, 55,
+167,210,211,211,145,156,156, 12,147,201,132,219,183,111, 19, 26,200, 21,216,219,211, 89,119,239, 82, 98,145,168,193, 57,187,172,
+196, 92,187,207,103,188, 27,168,215,235, 66, 43, 42, 42, 24,161, 80, 40,148,138,216,244, 6,210, 24,124,124,124,134,176, 44,235,
+106, 52, 26,205, 30, 30, 30,162, 51,103,206, 64, 34,145,224,225,236,207,112, 72, 36, 18,163, 92, 46, 87, 3,128,173,173, 45,189,
+120,241, 98,209,244,233,211,227,235, 35,142,136,136, 16, 73, 36,146, 81, 65, 65, 65,184,114,229, 10, 18, 18, 18,210,174, 92,185,
+ 18,208,174, 93, 59,248,248,248,140,242,242,242,218,122,235,214, 45,243,243, 18, 88,104, 96,144,251,133, 11, 23, 56,111,111,111,
+ 80, 20, 5,129, 64, 0,173, 86,139,244,244,116,116,234,212, 9,155, 55,111,198,234,213,171,127,206,207,207,223,210,152,242,140,
+ 31, 63, 94,220,186,117,235, 55, 71,142, 28,137,180,180, 52, 44, 89,178,164, 36, 63, 63,255,252,201,147, 39,135, 79,158, 60, 89,
+208,185,115,103, 20, 23, 23, 99,235,214,173,204,173, 91,183,182, 68, 69, 69,109, 95,191,126, 61,255,132,226,193,131,199,127,205,
+114, 85,219,247,127,151, 5,203,219,219,123,160, 76, 38,123,123,212,168, 81,130,224,224, 96, 20, 20, 20,192,206, 70,106,164, 40,
+ 74, 2, 0,118, 54, 50,163,217,108,198,228,201,147,209,182,109,219, 14, 51,103,206,108,207,178,236,207, 5, 5, 5,251, 45, 57,
+113, 97, 97,161,150,166,233,125,239,189,247,222,146,219,183,111,249, 3,192,181,107,215,210,149, 74,229, 44, 11,221, 89, 53, 81,
+157,156,146,146,201,172,238, 6, 6, 6,150, 68, 70, 70, 58, 13, 27, 54, 12,174,174,174,184,117,235, 22, 22, 47, 94, 28,175,215,
+235,167, 92,184,112,129,249,171, 47, 50,195, 48,217, 87,143, 28,113,122,105,244,104,167,133,163, 70,125,255,214,248,241, 75,191,
+ 94,188, 88, 44,151,203, 41,123,123,123,220,185,115,135,108,220,176,193,180,103,217,178,239, 5, 86, 86,226,139, 7, 15, 74, 88,
+179, 57,165, 33,231,144,203,229,221,219,119,236, 16,190,124,229,183,208,105, 43,113, 45,246, 8,202, 74,139,177,110,195,175,173,
+228,114,121,119,133, 66,113,161, 1,229, 13,216,183,111,223, 67,113, 40,145, 96,193,130, 5,240,246,246,134,189,189, 61, 42, 43,
+ 43,241,238,187,239, 74, 62,248,224, 3, 0, 64, 66, 66, 2,108,109,109, 45,181,178,245,156, 56,113,162,189,217,108,198,241,227,
+199, 13, 44,203, 78, 59,125,250,244,129, 54,109,218, 72,187,117,235,102,191,125,251,246, 94, 0, 78,254, 63,222, 15, 28, 33, 36,
+251,212,169, 83,190, 35, 71,142,132, 88, 44, 70, 89, 89, 25,236,236,236,176,124,249,114, 98, 50,153,246, 55,150, 88,161, 80, 72,
+ 92, 93, 93, 37, 44,203, 98,223,190,125, 80,169, 84, 19,114,115,115,243,155, 55,111,126, 96,230,204,153, 31, 7, 6, 6,250,165,
+164,164,100,177, 44,187, 76,161, 80,100, 0, 0, 47,176,120,240,224,193,227, 95, 40,176, 0,188,113,226,196, 9, 1,199,113, 88,
+191,126, 61,110,222,188, 73,108,237,157, 63,180,115,160,182,217,219,219,179,229,229,229,111, 44, 93,186,116,232,220,185,115,169,
+174, 93,187, 34, 54, 54,150,242,247,247, 31, 14,160,230, 32, 20,142, 58,114,101, 84, 84, 84, 92, 47, 40,200,247,175,145,181,221,
+ 95, 42,149,213, 55,219,237, 73,206, 39,147, 89,182, 89,180,104, 81,156,187,187,187, 57, 46, 46, 14,107,215,174,229,110,222,188,
+121, 20,192,242,194,194, 66,157,133,156,207, 3,143, 56,157,130,130, 46,111,158, 61, 59,226,197,151, 95, 38,189, 94,125,149, 91,
+ 33,145,124,242,197,188,121,211, 74, 85, 42, 31,142,227,224,226,224,144,253,243,162, 69, 43, 59,119,237,170,187,247,251,239, 54,
+ 49,191,253,102,229,209,172,217,165,134,148, 83,161, 80, 92,136,142,190,132,173, 27, 86,194,100, 50, 32, 79,145, 5, 0, 40, 46,
+169, 64, 61,226,234, 15,156, 52, 77,151,143, 27, 55,206,218,104, 52, 82,163, 70,141, 18, 21, 22, 22,162,121,243,230, 0, 0,149,
+ 74,133,163, 71,143, 34, 36,228, 97, 90,173,123,247,238, 61,250, 94, 95, 57,173,173,173, 95,237,210,165, 11, 50, 51, 51, 17, 31,
+ 31,127,172,176,176,176, 40, 33, 33,225, 88, 86, 86,214,240,200,200, 72, 28, 56,112, 96,100, 29, 2,171, 65,109, 84,157, 88,180,
+129,125, 9, 12,195,204, 60,112,224,192,196,216,216,216,238, 31,125,244, 17,213,187,119,111, 0,128, 70,163, 97, 45,140, 55,124,
+106, 57,171,221,195, 28,199,193,199,199, 71, 3, 0,169,169,169, 25, 0,222,111, 44,231,243,232,159, 60, 39,207,201,115,242,156,
+127, 19,206,255,140,192, 98, 56,142, 67,116,116, 52,126,253,245, 87,214,104, 52,206,206,207,207,191, 95, 53,152, 3,192,150,219,
+183,111, 95, 26, 62,124,248,138,228,228,100, 65, 66, 66, 2, 8, 33, 13,138, 29,210,235,245,230, 39, 51, 16,232,245,250,103,118,
+ 17,109,222,188, 25,249,249,249,198,172,172,172,223, 76, 38,211,142,146,146,146,188,198,114, 61,143, 89,132,235,110,222, 52,188,
+ 98,103,119,112, 86,207,158,195, 23,158, 56, 33, 27, 48,126,188,177, 71,255,254, 95,195,104, 52,138, 68, 34, 14, 86, 86, 2,129,
+149,149, 56,225,247,223,109,150, 79,154,228, 66,209,244,161, 31, 18, 18,116, 13,181, 96,245,232,209, 21,227,222,158, 14,157,174,
+ 18,191, 95, 57,130,242,210, 98,196, 94, 79,134,193,132, 6, 89,176,132, 66,161,175,217,108,150, 50, 12,163, 32,132,224,205, 55,
+223, 4,203,178,208,235,245, 80,171,213, 40, 45, 45,213, 79,157, 58,149,174, 18, 77,120,233,165,151, 44,202,234, 31, 16, 16,224,
+ 43, 20, 10,113,242,228, 73, 8, 4,130,253, 15, 5,177, 96,255,217,179,103,135,143, 26, 53, 10,114,185, 60, 40, 45, 45,173,222,
+224,198, 71,139, 61, 83, 8, 4, 0, 80, 8,116, 11, 27,114,183,122,177,103,154,166, 51,218,182,109,107, 81,220,213,147, 40, 42,
+ 42, 42,196,195,192,253, 95,102,204,152, 49,185, 67,135, 14,225, 95,126,249, 37, 0, 8,158,217, 60,198,113, 96, 24,230,153, 82,
+ 72,240,224,193,131, 7,143,127,184,192,162, 40,106,119,207,158, 61, 95, 35,132, 8,104,154,222, 81, 45,174,106, 34, 55, 55, 55,
+ 93, 46,151,175,247,243,243,123,189,202,242,177,171,129,231, 47, 32, 4,223,208, 52, 85,115,237,185,130, 70,112, 44,173,226,160,
+132, 66,209,142,171, 87,175,126,166, 84, 42,243, 1,176,207,122,129,158,199, 44, 66, 0,216,175, 86,167,188, 98,107,123,104,114,
+155, 54,131,135, 78,155, 70, 34,251,246,117,240,108,214,140, 97,204,102, 54,237,238, 93, 42,230,192, 1,113,204,111,191, 89, 9,
+ 40,234,240,126,141,230,126, 67,203,169, 80, 40, 46,156, 59,127,225,212,136,225, 81, 47, 5,248,121, 3, 0,210, 50,148, 40, 46,
+173, 56,213, 16,113, 5, 0, 89, 89, 89, 6, 0, 6, 79, 79,207,225,123,247,238,221, 71, 81, 20, 85,115,185, 25, 0, 6,161, 80,
+216, 2, 0,212,106,117,211, 3, 7, 14,236, 20, 10,133,185,245,241, 38, 36, 36,236,158, 55,111,222,232,244,244,244,223, 20, 10,
+ 69,106, 85,185, 83, 47, 93,186,180, 86,169, 84,142,206,202,202,218, 14, 11,102,142, 16,160, 69,124,204, 47,173, 0, 32,172,203,
+ 72,196, 15, 89,161,117, 0, 0, 32, 0, 73, 68, 65, 84,199,252, 34, 3,208, 42,172,203,200,234,107,241,204,193,242, 85,121,185,
+ 62,184,118,237,218,139,253,250,245, 27, 71, 8, 41,124, 22, 62,153, 76,102, 54, 24, 12, 12,203,178, 66,147,201, 68,100, 50,153,
+153,127,252,240,224,193,131,199,191, 23,127,118, 16,153,165, 38,196,199, 2,212, 27,201,217, 16,142,122, 57,189,188,188,166, 80,
+ 20, 21, 96, 41, 1, 33, 36, 45, 47, 47,239,251,218, 56, 9,121,232,190, 4,158,190,216, 51, 49,155,179,100, 1, 1,151,126,190,
+119, 79, 95,139,216,229, 26,114, 61, 3, 3, 3, 73, 74, 74,138,165,237, 91, 39,167, 92, 46,151, 9,133,194, 39, 45, 84,134, 42,
+ 17, 86,179, 31, 9, 0, 48, 13,108,247, 70,181,209, 35, 11, 22, 64,115, 20, 55,130, 38,244, 62, 0, 92,181, 5,235, 79,232,159,
+141, 42,103,205,118, 7,128,128,128,128,247, 66, 66, 66, 70,223,189,123,119,111, 78, 78,206,154,122,111,206, 6,182,251,159,116,
+111,242,156, 60, 39,207,201,115,254, 85,156,245,141,179,237, 1,184, 85,253,172,206,147,233,246,196,119, 35,128,154, 99, 86,245,
+239, 34,138,162,174,215,224,120,180,221,130, 99, 1,160, 24,192, 93,138,162,140,248,155, 32,156,231,228, 57,121,206,255,161,123,
+247,238, 66,254,122,242,156, 60, 39,207,201,115, 54, 92, 92, 17, 66, 6,226,161,151,131, 16, 66, 6, 86,255,126,242,123,245, 62,
+ 53,127, 87,253,197,147,251, 89,114, 44, 0, 50,107,214,172,217,132,144,158, 13, 41, 51, 13, 30, 60,120,252,101,248,255,152,197,
+202,131, 7, 15, 30,255, 2,184, 81, 20,117,132, 16, 50,136, 16, 50,136,162,168, 35,117,136,177, 65, 53,255,214,133,218,120,170,
+207, 81,243,247,146, 37, 75,190, 6,208,160,149, 96,132,117,168,208,134,152,254,194, 27,241,191, 56,158,147,231,228, 57,121, 78,
+158,147,231,228, 57,255,115,156,207,235,248,103, 70,109, 98,173, 90,200,213,252, 61,107,214,172,207,208,128, 85, 75,254, 10,240,
+230, 83,158,147,231,228, 57,121, 78,158,147,231,228, 57,159, 85, 8, 61,213,165, 87,151,187,240,201,239,150,184, 8,235,218,183,
+ 33,101, 22,130, 7, 15, 30, 60,120,240,224,193,227,239,141,162,154,214,166, 42, 11, 19, 59,107,214,172,207,170,183, 85, 89,153,
+ 12, 0,164, 79, 30,252,196,113,117,162, 33,251,242, 2,171, 17,104,211,156, 94,232,235,235, 30, 89,117,145, 65,170, 82, 20,112,
+ 85, 89, 4, 72,117, 50, 35,194,129,112, 4,202,188,242,155,247,210,241,197, 83,148,119,189,177,110, 93,187,122, 58, 11,116,149,
+171, 88,142,237, 12, 0, 20,232,139, 34,145,227, 71,103,175, 41,202,107,204, 38,171, 19, 33, 1,104, 41, 19,226, 83,142, 67,107,
+138, 2, 40, 10,119,245, 12,150, 37,165, 33,241, 57, 92, 18, 42,204, 31,239, 74,164,214,163, 28, 28,157, 2,203, 74,138, 31,152,
+ 76,134, 95, 18, 50,176, 14,141, 88,148, 51, 56, 0,109,193, 98, 38,203, 65, 36,164,177, 42, 41, 19, 49,124,175,227,193,131,199,
+ 95,100, 13,121,166,248,227,218,158,201,132, 16,234, 25, 57,249, 4,121,117, 95,159,235, 85,129,238,213,162,167, 8,192,189,197,
+139, 23,151, 45, 94,188,184,230,182, 59, 0,218, 84,237, 87, 84,139, 80, 50, 86,253, 54,214,178,143,209,146,125,255, 20,129, 21,
+218, 4,147, 65, 48, 31, 20, 8,128, 47, 19,114,177,182, 65,199, 55, 71, 31,153, 80,176, 17, 4, 2,189,153,253,152,176,184, 88,
+235,133, 20,160,155, 76, 36, 88, 1, 10,156,158, 97, 39, 36,164,226,140,165,231, 8, 11, 68,127, 33, 69,111,231, 56, 34, 98, 57,
+178, 13, 28,142,216,154,113,249,119, 5,244, 13, 41,171,175,175,123,228,193, 51,121, 47,157,223, 61, 13, 29,219, 6,130,112,102,
+128, 48,176, 14,249, 20,103,127,126, 19, 29, 91,249, 62,220,198,153, 97, 27,177, 2, 3,186, 56,144,123,233,141, 91,159,186,107,
+ 87, 79,103, 43,142,187,187,118,211,118, 79,223,192, 23, 41,194, 25,144,114,251,248, 27, 31,204,152,211,179,119, 7,121,107, 0,
+245,174,241,216, 58, 16,111,251,250, 6,127, 58,125,206, 74,218,219,187,137, 45,199, 24,153,188,156,132,118,223,173,156,183, 95,
+ 76,103,173,184,155,130,141,150,246,227, 80, 63, 76, 20,138, 36, 35,173,172,109, 2,181, 90,117, 10,107, 54,255, 66, 11,132,253,
+151, 45, 93,221,182,123,207, 1,182,156, 33,159, 54, 51, 84,232,158,189,187,154,126,255,227,218,168,184, 52,246,101, 0, 92,131,
+ 42,205,226,195,123,135,222, 29, 33, 18, 10,168,144,129, 27,108, 0,166, 95,131, 57, 0,132,249, 33,140,212,159, 9, 29, 20,240,
+ 67,124, 6,226, 27,211, 62, 33,126,216, 68, 1, 65, 0,246, 81, 4,187, 19, 50, 81,200, 63,238,120,240,248,119, 65, 46,151,159,
+ 87, 40, 20, 61,159, 51,103, 71,133, 66,113,149,191,186,207, 79,100,213,178,249, 90, 45,219,174,255, 29,202,219, 80, 11,214, 87,
+241, 41, 57, 78,224, 76, 8, 11, 10, 88, 8, 52, 76, 96,201,132,130,109,215,239, 22,120,130,152,176, 97,229,123,123,140,102,128,
+ 97, 76, 96, 25, 51, 88,198,252,240, 59,107, 6,199,232, 49,111, 85, 52,192,168, 17,217,182,197, 54,128,245,178,244, 28, 34,208,
+219,111, 94, 62,229, 76, 49, 21,216,179,117,241,212, 44,101,229,212, 51,215,148,197,161, 34,221,236,132, 76,108,105,200, 32,126,
+126,247, 7,216,177,255, 88,238,154, 13,123,147, 56, 16, 56,217, 74,131,199, 12,143,247,249,121,255,249,156,213,155,245, 73,132,
+ 35,112,180,147, 6,143,125, 57,197,247, 89, 26, 65,160,171, 92,245,227,134, 45,158,190, 77,155, 82,230,140,175, 0,179, 1, 62,
+190, 81,130, 57,211,223,246,250,114,233, 15, 43, 1,140,173,211, 26,228,143,208,102, 1, 45, 63,222,182,231,138,175,166,178,208,
+120,238,232,103,169, 20, 33,102, 87,215, 16,241,130,175,150, 91,125, 62,123,250, 71, 70, 54,247,234,253,116, 36,212, 83, 20,186,
+165, 31, 14,125,253,245,178,214,189,251, 14,182,101,141, 69, 2,125,165, 58,104,227,150, 77,243, 67,194, 58, 88,119,137,104, 34,
+ 46,186, 60,137,210,170, 75, 97, 34, 86,210, 94,145,189,237,181, 99, 94, 53,111,250,121,215,148,132,116,124,219, 32,125,197,252,
+ 47,215,136,137,129, 12,128, 8,141, 8, 32, 36,192,251,183, 99,207, 79,100,202,174, 3,156,169, 74,244,154, 0,206, 12, 82,227,
+239, 11,175,111, 1,128, 73,141,105, 31,154,194, 75,103,206, 92,247, 42, 40,200,107,191,106,213,215,179, 9,117,253, 56, 40,108,
+ 79, 76,199,133,198,136, 66, 30, 60,120,252, 61,225,237,237,205, 42,149, 74,193,243,228,148,203,229, 81, 10,133,226,216,179,112,
+120,121,121,125, 10,224,237,170,159, 27,243,242,242,150, 61,107,185, 34, 35, 35,155, 16, 66, 60,171,132, 75,254,141, 27, 55,114,
+249, 30,240,255, 43,176,100, 32, 28,112,121, 40, 64, 53,108,186, 98,213, 96, 40, 3, 37, 0,204,149, 24, 50,168, 15, 92, 93,188,
+ 0, 86, 3,176, 58,128,209, 2,236,195, 79,113, 81, 22,192,104,128,162,227, 96, 8,145, 54,184, 86,230, 10,160,240, 23,188,244,
+162, 47, 28,237,100,248,224,181, 80,215,245, 7,147, 55,110, 60,120,191, 79, 66, 58, 70, 89, 84, 86, 66,208, 49, 34, 16,107, 54,
+104,146, 14, 71, 23,245, 3,128,168,238, 46, 39, 58,182,106,234,179,122,179, 62,233,216,197,178,254, 0,208,191,179,253,241, 14,
+225,158,190,220, 51, 44,127,194,114,108, 23,223,230, 17, 20,147,189, 20, 52, 93,134,202,202, 98,228,164,109,133,171, 71, 63,154,
+225,184,110,245, 29,111, 37,196,172, 15, 62, 93, 34,212, 84, 22, 24, 9, 83,200,121,216, 22,139, 69,160, 4,156,230,146, 81,151,
+ 95, 94,249,225,251, 99,152,143,103,125, 61, 11,192,232,186,120, 66,253, 49,101,197,210,213,173, 58,119, 8,118,207,143,249,128,
+170,172, 40,128,153, 88, 73, 95,238,222, 25, 78, 77, 67,185,130,219, 43, 40,169, 87, 31, 56,249, 5, 32,247,222, 14,100,221,253,
+149,234,218, 97,184,116,219, 78,241, 24,192, 84,171,192, 10,244, 68,151,126, 47,117,216, 19,208,212,219,139, 16, 14, 28,199,129,
+ 16, 14,122, 35,139,217,223,167, 66,163, 99, 48,168,207, 11,157, 93, 28, 4, 6, 26, 0, 33, 28,114,148, 37,218,115, 87,146,122,
+167, 41, 81,239,155, 31, 5,252,208,230,197,158, 93,238, 94,139, 13, 49, 41,143,160,253,176,197, 73, 20,254,231,110, 36, 64,151,
+ 91,103,183,132, 0, 91, 26,253,210, 68, 8,216,236,223,151,160, 73,196,187,130,117, 91, 78,184, 85,148, 40,198,254,186,247,199,
+ 17, 63,174, 95,183, 35, 41,189,113,162,141, 7, 15, 30,127, 63, 40,149,202,231, 46,178,174, 92,185,162,124, 22,145, 21, 25, 25,
+217, 77,169, 84, 46, 85, 42,149,213, 34,112,105,135, 14, 29,230, 86,143, 83, 79,160,130, 16, 50,250,198,141, 27, 23,235,226,156,
+ 62,125,186,247,229,203,151,253,110,220,184, 1, 0,104,223,190,189, 95,100,100,164, 95,109,251, 90, 91, 91,179,109,218,180,201,
+ 92,181,106,149,146,239, 33,127,174,192, 74,202,191,244, 97,132,177, 84, 11, 0, 73, 22,236,255,216, 84, 75,189,153, 93,178,117,
+245,216, 37, 97, 65, 78, 80,169,141, 56,125, 41,179,202,130,197,128,101,205,143,254,246,123,209, 21,157,152, 73,248,118,247,125,
+ 48, 44,183,184, 46,206, 39, 97,226,184,215,219,118,123,117, 47, 71,136,196,218,154,174,104,238,227,226,254,241,152, 54,244, 7,
+175,133, 65,167,103, 94,221,121, 60,245, 92, 98, 38, 54, 88,196,201, 49,181, 8,175, 90,182,113,108,189,117,127, 26,218, 4, 91,
+117, 28, 54,160,171, 61,204,165, 96, 53, 25, 48,178, 28,242,242, 52, 72, 87,138,225,192, 21, 88,196,201,113,104,237,233,233,101,
+125,229,212,204, 12,119,187, 50,177,139, 21, 43, 22, 83, 28,161,205, 68, 96, 52, 38,233,157,188,251,136, 56, 14,173,235,107, 35,
+ 43, 43,187, 55,187,246, 28,232,144,125,246,109,202,202,103, 0,220,253,155, 32,227,230, 86, 20,198, 29, 65, 73, 97, 22,229, 64,
+202, 96,221, 34, 0, 3,134,191,134,165, 83, 34,161, 82, 85,130, 42, 74,115,144, 72,164,142,128,169, 86, 78, 66, 99,244,138,111,
+ 22,121, 9,133,244,195,235, 73, 24,128,152, 1, 98,134,186,210, 0,163,209, 8,153,152,192, 70, 70,128, 42, 55, 44,203, 26,173,
+ 91,247,158,245, 30,192, 94,173,175,238,241, 25,136, 15,245, 67, 12, 8, 19, 66, 88, 29, 40, 32, 38, 33,227,127,162, 39,204, 15,
+ 97,237,122,143,127,159, 2,126,104, 76, 27,133, 55,195,160,200, 16, 91, 27, 43, 38, 9,185,209, 83,145,202,202,136, 71,171,183,
+241,218,232, 41,214,235, 54,174, 31, 12,144,201,120, 60, 6,237,207,152, 94,204,115,242,156,255, 72, 78,123,123,123,255,102,205,
+154,205, 53,155,205,221,196, 98,177,135,201,100, 2,199,113,249, 18,137,228, 82,102,102,230, 2,149, 74,149,254,119,171,251,241,
+227,199, 27, 34,178,234,229, 20,137, 68, 56,118,236, 88, 74, 3, 68,214, 99,156, 52, 77,111,223,183,111, 31,246,238,221, 11, 0,
+ 56,127,254, 60, 90,180,104, 97, 83,219,129, 57, 57, 57, 54,175,188,242,202,118, 0, 62,117,113, 62,120,240,192,127,209,162, 69,
+216,183,111, 31, 0,224,231,159,127, 70, 80, 80, 80,173,133,185,115,231,142,224,243,207, 63,247, 7,160,252, 11,218,232, 95, 43,
+176, 8,234, 95, 90, 37,205,211, 78, 20, 1,179, 25, 0,210, 26,122,178,196, 52,124,179,102,211,137,254,103,127,253,161,155, 76,
+ 66, 99,254,170,143,115,138,138,212, 47, 8, 5, 15,221, 44, 12, 11,218,201, 81, 18,187,120,106, 27,223,178, 10, 61,126,187,160,
+184,152,144,142, 6,153, 66, 19,210,112, 26,224, 28,171,108, 67,208,168, 10,131,198,206, 57,189,123,247, 55,253, 91, 79, 31,221,
+ 26,135,162, 51,167, 3, 76,189,107,213, 17,142, 3, 33,204,163,160,246,170,141, 85, 46,167,255,109,227, 8, 1,136, 25,164,129,
+113,222, 95,126, 57, 82,120,104,247,129,254, 54, 82,225,119,147,222,153,104,111, 46, 73, 64, 69, 57,139,252, 98, 13,178,138, 28,
+193, 90, 53, 71,114,252, 85, 86, 64,211,245,198,159, 81, 52, 84,196,172,177,115,178,178,162, 67, 59,188,231, 85, 17,247,153, 74,
+ 42, 48, 11, 28,219, 46,178, 43,184,183, 34,155, 49, 20, 86, 82,244,227, 10,168,214,135,161,131, 67, 11,131, 58, 83, 80, 81, 94,
+ 2,199, 86,161, 24,240,242, 96,204,159,208, 18,106,181, 6, 69, 37, 87, 72, 96, 83, 7, 74,127,107, 39,230,188, 25,130,146,226,
+ 60, 24,205, 0,173,210,151,234,141,250,202,167, 91, 2,177,238,195,143,103,188,222,180,137,155, 77,245,100, 1,194,177,104, 19,
+ 30,128,190, 61, 59,226,116,236, 21, 92,191,149, 12,142,112, 85,147, 9, 88,228, 22,150, 23,232, 77,236,214, 6, 89, 71, 57,230,
+161, 37,180, 22, 1,134, 70,184, 6,195,195, 97,205,106,240, 69,251,150,118, 19,102,190,217,212,206, 78, 66, 65,111,197, 66,175,
+ 55, 67,157,244, 61, 92,154,180,130,181, 76, 70, 69, 68,232,132,183,110,129, 95, 87,144, 7,143, 26, 24, 49, 98,132,172,160,160,
+ 32,218,199,199, 39,180, 79,159, 62,214,221,186,117,131, 70,163,193,201,147, 39,161,213,106,155,250,248,248, 52, 61,117,234,212,
+240,172,172,172, 4, 31, 31,159, 30,251,246,237,211, 55,244, 28,213, 65,229,207, 59, 56, 92, 34,145, 32, 54, 54,246,185, 90,178,
+ 36, 18, 9,174, 93,187,150,210, 24, 75,150, 70,163, 17,123,122,122,194,197,197, 5, 44,203, 66,163,209,224,224,193,131, 80,169,
+ 84,224, 56, 14, 86, 86, 86, 88,113,188, 2,250,251,251,176,241,187, 69,168,168,168, 16,215,199, 89, 92, 92, 76, 5, 7, 7,195,
+ 96, 48,128, 97, 24,232,245,122,156, 57,115,230,209,111,161, 80,136,133,251, 10, 96, 72,222,141,109,235, 86,160,184,184,152,250,
+ 11,187,143, 37, 90,228, 31, 37,176,170, 43,244,167, 87,140,101,153,217,235,183,238,142,157, 61,117, 20,166,188,217,219,103,193,
+183, 7,250, 36,166, 99, 27, 0,180,244,199,216, 49, 81,129,190,142, 54, 34,124,249,211, 13, 0,100,246,179,158, 47, 62, 11,201,
+161, 1,220,244, 3,209, 89,209,159, 77,136, 64,128,143,125,139, 50, 83,169, 36, 45,205,130,120, 31,206, 12, 39, 91,105,112, 84,
+119,151, 19, 32, 28, 28,109,165, 33, 32, 44, 28,237,164,193,253, 59,219, 31,231, 8,129,163,141, 56,132,112,150, 39,231,238, 16,
+ 46,125,199, 74, 68,191, 99, 99,231,232,251,225,164, 49, 86, 3, 7,190, 98,101, 35, 33, 40, 73, 56, 6, 21, 9,131,209,198, 6,
+ 68, 91,142,244, 7,113,236,241, 11, 55, 20, 82, 23,175, 79,128,140,186,139,201,226,162, 50, 39,113, 88,179,192, 62,142, 69, 55,
+230, 20,250,247,222,233, 71,131,165, 53,177,195, 11,109,236, 66,197, 49,119,226, 24,142,197,149,250,202,166, 86,169, 50,205, 38,
+120,233,205, 34,187,212,107, 91, 48,107, 76, 24,202,203,138,160, 55, 48, 40,215, 48, 38, 47, 87,147, 84, 95,118, 15, 6, 35, 3,
+131,137, 64,100,237,141, 83,177,113,197, 28, 99, 62,254, 84, 69,158,135,219,105, 59,110,219,214,220, 22,224,133, 54, 51,157,172,
+110,131,213, 33, 43, 91,137,109,251, 99, 35,210,242,112,251,217,110, 73, 6,132,249,223, 51,186, 58,248,189, 49,193,237, 33, 77,
+209, 65,204,136,190,251,114,214,192,208, 30, 97,172,148,210,231,129, 2, 96, 45, 19,194, 32, 99,225, 32, 11, 0, 49,169,137, 86,
+175, 47,143,143, 3,159,153,157, 7,143, 26, 8, 14, 14,246, 84, 40, 20,241, 31,127,252,177,243,176, 97,195, 30,137,129,173, 91,
+183, 98,245,234,213,152, 63,127, 62,204,102, 51,214,175, 95,111,189,127,255,254, 14, 63,252,240, 67,174,175,175,111, 88,118,118,
+118,190,133,162, 74, 92, 53,118, 61,140, 42, 32,132,253,242,203, 47,201,252,249,243, 81,189, 13, 0, 11,212,255, 82,249, 52, 49,
+ 36,145, 72,144,148,148,244, 92, 68,150, 72, 36,130, 88, 44,134, 68, 34,193,253,251,247, 27, 44,178, 24,134, 17,228,230,230, 66,
+165, 82,161,239,224,193, 88,189,100, 9,186,117,235,134, 62,125,250,128, 16,130,179,103,207,162,147, 83, 50,156, 7,119, 71, 98,
+ 98, 34,204,102,179, 69,158,169,220,220, 92,148,148,148,160,255,224,193,216,240,227,143,104,215,174, 29,130,131,131, 1, 0,209,
+209,209,232, 45,207,132,109,112, 31, 36, 39, 39,255,149,221,231, 47,211, 34,127,181, 5,235, 47, 65,124, 26,126,231, 14, 92, 56,
+242,218,192,246,131, 6,247, 10,197,134,221,231, 22, 65,170,218, 13, 0, 46, 82,233, 87,111, 14, 12, 64, 66, 90, 25,206, 94, 83,
+ 30, 73,204,192,239,207,227,156, 28, 11, 87, 23, 71,107,128,150, 64,107,100, 25,123,251,250, 3,147, 57, 16, 88,183,156,133, 49,
+195, 18,125, 58,182,242,241, 33,132,169,154, 49,184, 18, 99, 95, 78,241,109, 31,230,225,251,208,229,101,134,125,167,157, 0,103,
+ 83,111, 57,186,182,149,157,250,100,218,212, 23, 7, 14,126,205, 74,108,237, 2, 78,151, 3,115,233, 93,148,164,159,135,193,170,
+ 45,138,114, 51,176,251,208,111, 21, 73,233, 5, 42,129,128, 62, 45,116,240,152,113,230, 76,122, 37, 69,213,221,207,244, 2, 44,
+158, 63,119,246,192,221, 59,118, 57, 88,121,119,197,131, 67, 81,229, 18,129, 89,234, 46, 15,130,142,177, 99,151,111, 62,226,168,
+ 1,150,212, 87, 62,173, 70,245,235,153,179, 39, 70, 5,122,117,177,203,136, 59, 2,173,214, 8,131, 25, 8,111,215, 19, 44, 71,
+ 36, 20, 77,113,246, 2, 1, 85, 80, 80, 10,202,204, 21, 92,186,149,145, 23,115, 61, 77, 96,160,235,231,126,172,211,137, 5,211,
+ 6,247,105, 3,176, 58,188,220, 55, 28,171, 54,159,157, 10,176,227,159,237,182, 52,131,176, 58, 16,160, 75,168, 31,126,226,128,
+ 46, 55,143,175, 10,137, 28, 48, 29, 13,177, 96,133,249, 97, 64,104,144,247,150, 85,139,102, 59, 59,187,251, 8,192,234, 64, 49,
+ 42,194,149,254, 14,161,230, 1,236,155, 12, 4,235,208, 25,235,126, 92, 94,201,113,100, 55, 26,145,162,130, 7,143,127, 51,244,
+122,253,175, 75,150, 44,113, 30, 52,232,225,108,247,202,202, 74, 92,185,114, 5, 27, 55,110,132,141,141, 77, 77,177,132,168,168,
+ 40, 16, 66,156,231,205,155,247, 43,128, 23,159,198,217,169, 83,167,193, 43, 87,174,204, 6,240, 0, 15,115, 28,137,241,112,129,
+121,114,230,204, 25, 26, 0, 58,116,232,192, 94,187,118,141, 3, 64, 70,143, 30, 45, 58,116,232, 80, 11,141, 70,115,161,177, 2,
+ 75, 34,145, 64,161, 80, 60,179,200, 18,137, 68,143,248,196, 98, 49, 20, 10, 69,131, 68, 22,195, 48,194,163, 71,143,226,214,173,
+ 91,248, 50, 34, 2, 31,120,121,193,197,197, 5, 23, 46, 92, 0, 33, 4, 54, 54, 54, 40, 45, 45,197,238,221,187,209,179,103, 79,
+ 48, 12, 35,182,132,247,224,193,131,184,121,243, 38, 22, 70, 70, 98,170,141, 13, 28, 29, 29, 17, 29, 29, 13, 0,144, 74,165, 80,
+ 40, 20, 56,115,230, 12,122,244,232,193,119,234, 63, 91, 96,117, 7,132,165, 20, 60,205, 38, 29, 8, 67, 0, 10,222, 45, 91, 66,
+156,152,216,240,183, 4, 26,152,179,102,243,145,129,171,102,191, 76,189, 59, 34,194,123,193, 15,231, 39, 3,192,132, 87,131,228,
+214, 82, 33,214,236, 78, 32, 52, 48,231,121, 84,176,101, 75,136, 41, 3, 38,247,237, 28, 12,101,177, 17,105,217, 21,231, 18, 51,
+ 44,115,233,156,221, 54, 6, 63,255, 26,157,179,122,203,227, 51, 6,183, 28,188,153,189, 98,155, 62,137,128,192,209, 74, 20, 50,
+254,229, 78,245,206, 34,236, 16, 46,125,103,230,244,233, 47, 14,121, 99,134,149, 57,247, 0, 12,153, 71, 1, 86, 11,173,134,130,
+138, 9, 68, 94,118, 46,190, 92,181, 43,199, 96,166, 95,191,145,160,111,144,176,124,240, 0,149, 66,127,213,176, 37,223,204, 61,
+253,245,151,243,108,165,138,179, 42,145, 16, 26,218,165,155,232,171,185,107,133,234, 10,227, 43,105,217, 80,215,199, 99,160,177,
+228,155, 21,223, 14,124,123,204,176,164, 32,159, 30, 46,108,126,154,139,182,162,162,112,231,241,155,158, 85,111, 19, 20, 0,164,
+102,148,160,168, 84,195,176,140,249,130,157, 9, 11, 18, 20,150,207,254,243,119,135,219,160, 94, 97,111,184, 57, 74,160,211,148,
+193,221, 73,140,126, 93,154,191, 97,214, 39,207, 76, 47,108, 88,142,145,199,244, 85,149,139, 48,118, 99,175, 16,112,166, 16,194,
+153, 97,204,218,222,152,215,167,233,211, 71, 53,117,112,182, 49,210, 20,171, 1, 68, 78,128,196,141,162,173,252, 32,176,242, 69,
+102,202, 13,102,250,123,163, 74, 50, 51,243, 55,185, 18, 44,227, 31, 33, 60,120, 60,142,172,172,172, 55, 63,251,236,179,152,142,
+ 29, 59,122,184,186,186, 34, 60, 60, 28,135, 15, 31,198, 39,159,124,242,104,159,182,109,219, 2, 0, 74, 74, 74,240,205, 55,223,
+228, 43,149,202, 55,235,124, 49,143,143, 79,218,190,125,123,151,214,173, 91, 27,197, 98,113, 89,181,200,202,202,202, 18,106, 52,
+ 26,202,104, 52, 18, 27, 27, 27, 78, 42,149,154, 71,142, 28,105,186,118,237, 90, 11,141, 70,147,245, 44, 22,172,200,200,200,123,
+229,229,229, 21, 20, 69, 61,115, 10,135,106,113, 21, 18, 18,226,102, 52, 26, 89, 0,165,141, 73,225,192, 48, 12, 34, 35, 35,113,
+230,226, 13, 28,191,120, 15,149, 69,105, 24,253, 74, 63,132,132,132,224,228,201,147,141,110,179,200,200, 72,156, 57, 19,131,232,
+ 27,247, 81,144,149,128, 49,175, 13, 69,112,112, 48,206,156, 57,195,119,232,231, 32,176,234, 52,201,133,248,162, 13,109, 47,249,
+121,206,203,205, 67,133,225,243, 65, 9,173,112, 96,203,225,206,179,191,254, 41, 73, 80,145, 61, 58,206,130,217, 94,143,221, 44,
+ 25,136, 39,184,191,235, 78, 66,200, 27, 47,119,243,193,134, 95,172,191, 0,128, 87,251,250,227, 90, 66, 17,174,198, 21,238, 74,
+104,100,206,162,154, 8,119,135, 53,107,192,174,111,102, 12,233,209,180,137, 39, 54,238,141, 1, 69,240,171, 69, 3, 45, 33,164,
+ 99,107, 95,172,222,242,228,140, 65, 47,223, 21,219,244, 73,167,174,168, 7, 0, 64,223, 23,172,143,183,111,233,236, 75, 72,221,
+211, 8,101, 34,250,221, 1, 47,191,105,197, 20,156, 4, 87,250, 11, 68, 18, 49,116, 26, 22,121,133, 6,232,172,173,112,238,210,
+ 5, 93,165,150,153,126, 55,133,105,148,213, 46, 49, 29,105, 98,225,173,108,141, 78,231,101,235,220, 92, 67, 83, 32,149, 70, 17,
+185,153,160,208, 36,100,227,190, 37, 28,105,105, 48,190, 32,103,186,174,219,246,203, 92,145, 72,242,170, 64, 0,202,221,209,198,
+237,167, 53, 11, 97,103,103, 11,194,168, 65, 12,197, 24, 54,225,235,162,184, 20,179, 63, 0,180,104, 1,219,174,173, 69,219,132,
+ 52,149,123,254,182,233,243,250,206, 65, 9, 48,105,244,203,109, 68,156, 89,131,105,243,246, 96,221, 87, 47, 99,204,224,150,162,
+163,231,146, 39, 1, 88,208,120, 51,229, 67, 23,225,139,239, 94, 76,162,128, 24, 2,116,185,113,228,171, 16, 52,192,243, 24, 17,
+ 1, 17, 91, 73,181,108, 41, 55,138,216,220,221,160,100,114, 34,112,237, 1,216,180,160,136,109, 56,190, 95, 51,183,114,195,198,
+141,167, 56, 10, 95,222,207,172, 55,229, 5, 15, 30,255, 85,164, 41,149,202,254, 81, 81, 81,103, 79,158, 60,233, 28, 30,254,112,
+ 69,149,155, 55,111, 2,192, 35, 87, 84, 65, 65, 1, 94,127,253,245,226,188,188,188,254,168, 39,166, 87,173, 86,167, 31, 56,112,
+192, 67,167,211,181,255,252,243,207, 11,154, 53,107,166, 54,155,205, 68,173, 86,131, 97, 24,226,230,230, 38,106,215,174, 29, 21,
+ 22, 22,166, 59,123,246,172, 75, 78, 78,142, 26, 64,102, 99, 10,255,246,219,111, 99,255,254,253, 0,128,231,145, 23, 75, 44, 22,
+ 35, 42, 42, 74,126,229,202, 21, 69, 21,103,163,243, 98, 17, 66,112,247,238, 93, 92, 74, 97, 33,177,113, 66,102,146, 10,103,126,
+ 59,132,209,239, 78, 4,195, 52, 62, 90,225,206,157, 59,216,125,230, 14, 60,228,205, 81, 97,184,139,131, 7, 15, 98,242,228,201,
+207,196,217, 72,252,107,220,131, 79, 90,176,254, 80,161,128, 0, 72,164, 70,204,235,219, 65, 62, 99,100,239,230, 2, 70,171, 4,
+199,113, 16, 0,112,181,163,177,121,195, 58,255, 95, 14, 28,139,253,238,219, 31,190,133,145,155, 19, 87, 8,109, 3,204, 88,243,
+ 86,110,189,252,234,246,133,221,133,147, 71,132, 56, 3,128, 88, 68, 99,205,174,120, 6, 52,230, 61, 75,165, 94,144, 67, 86, 41,
+198,187,238,238, 14, 95,204,126,111,160,115,143,142, 65,184, 16, 27,135,111,119,196, 94,148, 56,225,103, 75,111, 59,194, 49,143,
+ 5,180, 63,220, 86,139,241,139,212,223, 9, 89,142,120, 74,172, 93,161,207, 60, 6,161, 68, 10,134, 49,161,168, 64,139,140,124,
+ 14, 50,111, 17,174,221,205,210, 13,125, 99,216,209,103,233,152, 54,214, 50,239,121, 95, 45,111,162,211,169, 25, 85,121, 49, 35,
+ 20,199, 10,173,173,164,249, 15, 87, 14,176, 12,191, 43,160,239,214, 70,212, 14,132, 19, 72, 5, 68, 59,123,250, 56, 27, 69,242,
+ 73, 4,186, 41, 65,129,192,202,123, 32,236,108, 4,226, 46,173, 69,217, 0, 96, 99,109, 45,249,102,193, 39, 14, 31,206,252,242,
+146, 37,214,196, 32,119,207, 15,195, 3,157,113,225,106, 34, 46, 94,207,138,191,248,123,114, 88,207, 14,222, 8,242,119,252, 64,
+226, 88,190,164, 49, 22,209,135,109,240,208, 69, 88, 61,139, 48,204, 15, 97,237, 7,125,254,180,217,131,181,194,239, 22,184,100,
+127, 2,138, 18,128,128, 2,244, 10, 48, 57,219, 33,240,159, 74,126, 61,244,149,110,227,134,141, 11, 19, 51,121,171, 21, 15, 30,
+245,161,162,162,226,110, 82, 82, 82,191, 54,109,218,108,157, 54,109,154,221, 27,111,188,225,253,246,219,111,211, 0, 80, 80, 80,
+192,173, 94,189, 90,249,221,119,223, 85, 20, 23, 23,143, 55,155,205,247, 44,185,195,243,242,242,174,108,222,188,185, 40, 38, 38,
+ 38,236,133, 23, 94,176,110,223,190, 61,231,238,238, 46,214,106,181,108, 78, 78,142, 46, 54, 54,150, 77, 73, 73,113, 40, 47, 47,
+ 79, 1,144,138, 70,184,239,189,189,189, 65,211,244, 2, 31, 31,159,185, 10,133,162,213,243,136,193, 10, 12, 12,244, 6,144, 34,
+151,203, 3, 27,234, 30,252,195,128, 45, 20,162,172,172, 12,234,220, 84,104, 75,138, 17, 44,208,162,173,179, 43,236,236,236,158,
+ 73, 12, 85, 84, 84, 64,104, 40, 64,218,221, 44,148,231,103, 34,180,105, 36,108,108,108, 96, 48, 24,254, 63,186, 15,245,111,185,
+ 15,158,234, 34, 12,109,130,201, 86,192,234,113, 35,253,197,254, 77,155,192, 88,116, 19,183, 83, 43,241,249,166, 14, 9, 2,177,
+157, 97,202,216,190,237,122,246,113, 67,247, 30, 29,168,102, 77, 29, 63, 88,178,100,237,251,161,146,226, 79, 18,114,176,198,146,
+ 19, 39,164, 33,157,227, 10, 55,158,191,174,152,212,196, 77, 7, 2,130,243, 55,242,112, 47,181,108, 99, 82, 6,210, 27, 82,137,
+208,230,232, 35,164,232, 61,132, 37, 50, 7, 59, 27,117,104, 72, 19,215, 62, 93, 90,211,253,123,182,135, 88, 8,196, 92,189,131,
+233, 95,253,250, 59, 39, 33, 3, 45,158,241, 69,184, 63, 8,167,135, 51, 6,153,199,102, 12, 18, 66, 8, 56, 6,132,212, 29,214,
+ 37,160,169,124, 77,193, 13, 79,137, 93, 40, 76, 37,231, 80, 80, 80,137,248, 52, 19, 42,225,131,178,220, 92, 16,194,102,207,155,
+247, 75,163,239, 16, 87, 87, 87,119,255, 22, 65,205,191,219,176, 15, 38, 67, 5,210, 18,182,160, 82,149,143,175, 22,255,214, 92,
+ 46,119,233,174, 80, 40, 46, 88,222,187,169,160,179,231,118,185,131, 0, 2,161, 20, 71,215,239, 69,177,208, 10,174, 14, 98,112,
+250, 66,188,251,206,104,135,168,129,163, 29, 0, 32, 59,245, 14,124,157, 45,211,213,166,114, 12,127,117,124,176, 35, 88, 45,126,
+ 62,120, 71, 79, 83,232,255,243,111,241,169, 61,219, 57,202, 94,237,219,212,105,193,186,242, 87, 0,236,106,148,190,226,216,199,
+102, 17, 54,102,246,224, 62,128, 13, 33, 72,221,117,166,200,118,100, 84,132,149, 88, 72, 81, 68,175, 0, 71,137,169, 53, 63,108,
+ 86, 75, 40,172,231,135, 78, 30, 60, 44,131, 78,167,187,169,211,233, 90,125,250,233,167,175,127,246,217,103,221,108,108,108,252,
+ 1, 64,163,209,164,155,205,230,139, 85,247, 58,219,144,219, 28, 64, 74,106,106,106,122,106,106,170,199,207, 63,255,236, 8, 64,
+ 86,245, 63, 61,128,114, 0, 5, 13,228,124, 12,213, 98,202,219,219,123,238,243,186, 14,213, 98, 74, 46,151, 7, 54,230,120,129,
+ 64,192,210,244,195,149,125,164, 82, 41, 46, 93,186,132, 1, 93,186,226,206,153, 44,132,120,248,160,231,232,113, 56,120,254, 60,
+ 4, 2, 65,245,254, 13, 26, 71,132, 66, 33, 98, 98, 98, 48, 98, 80, 15, 28, 60,120, 16, 1,145,109, 48,117,234, 84,156, 56,113,
+ 2, 66, 33,191,154,222,159, 34,176, 64,176,224,244,158,175,197,224,204,216,183,115, 41, 78, 95,215, 26,239, 43, 48, 39, 56, 23,
+171,247, 65,205, 21, 22,239,159,116, 52, 58,109,217, 91,227, 7, 89,247,234,222, 23,189,186,245, 20,134,181,233,254, 5,240,152,
+192, 10, 71, 29,185, 50, 88, 51, 22,174,223,159, 52,113,207,177,100, 10,140, 26,163, 94,110, 79, 88, 51, 22,214, 83,230, 63,112,
+ 58, 88,219,238,137,185, 20,235, 4,182, 18,249, 25,231,101,158, 30,254, 0, 49,227,193,131,100,124,191,249, 32, 23, 29,123,127,
+187, 81,128,105,105,137,208, 88,202,249, 80, 81, 49,112,176,149,252, 97,198,160,163,149, 40,164,239, 11,214,199, 9, 33,196,206,
+ 90, 20, 66,106,183, 96, 61,198,169, 55,115,235,183,111,219,176,124,194,132,183,109, 74, 12, 10, 36,231,196, 67, 47,144, 67, 96,
+221, 28,241, 55, 78,234,116,102,110,131, 5,237,245,212,235, 89, 92, 92, 92,120,243, 70, 41,246,108, 93, 12,179,217,128,194,188,
+135, 26, 53,175, 64, 5,123,123,121,172, 66,161,176,152,211,196,112, 21,195,135,189, 43,182,146,193,106,244,171, 3, 37,169, 74,
+ 3, 34,130,237, 30,118, 11, 83, 49,146,162, 47,161,167,251,195, 96,200,212, 36, 1,124, 95,240,182,168,156,118,118,226,105, 3,
+186,202,145,158,149,143, 75, 55, 21,219,210,149, 80,178, 36,111, 91,106,118,249,164, 33, 61,125,177,106,123,194, 84,192,188,171,
+ 33,117, 15,243, 67, 24, 7,116, 1, 49,131, 48,122, 16,160, 75,152, 31,194, 44,156, 57,248, 7, 78, 33,141, 55, 86,238,201,252,
+124, 95,116,209,144, 25,111,119,181,239,252,226, 0, 9, 56, 51, 81,107, 13,230,196, 12,168,158,165,141,158, 1, 60, 39,207,249,
+ 79,229,100, 1,108, 55,155,205,219,203,203,203,159, 39,167, 18,127,204,203,244, 76,117,175,233, 14, 84, 42,149, 2,111,111,111,
+214,130, 32,247,250, 56,175,214, 20, 90, 85,214,171,250,172, 88, 79,114, 42, 59,118,236,232, 60,120,240, 96, 48, 12,131,148,148,
+ 20,100,101,101, 97,240, 91,227,225,228,228,132,171, 9, 9, 72, 73, 73,193,220,185,115,193, 48, 12,174, 93,187,150, 91, 31,167,
+ 72, 36, 50,181,105,211, 70, 60,116,232, 80, 48, 12,131,180,180, 52,100,102,102, 98,234,212,169,112,112,112, 64, 66, 66, 2,210,
+210,210, 48,119,238, 92, 24, 12, 6,164,167,167,155,254,162,190,244, 31, 17, 88, 20, 88,112,102, 84, 92,159,135,159,142,192,100,
+ 98, 16,146,144,139,140,234,192,147,132, 92,172, 21,144,187,135,239,198, 39,165,223,188,218, 75, 2,213, 61, 52,244,205,225, 65,
+ 46,242,236,172,213,106, 48,106,123, 20, 29, 71,134, 66, 93,249, 32, 23,121,141,176, 94, 80, 96,255,143,189,243, 14,143,162,106,
+219,248, 61, 51, 91,179,233,125,119,211, 12, 33, 9, 9, 53, 33,180, 36, 72,135,208, 68, 4, 4, 68, 16, 84,148, 34, 42,168,116,
+ 1, 1, 1, 17, 68,170,128,136, 40, 34, 32, 85,164,133,222, 33, 36, 4, 8, 33,161,132,132,148, 77,239, 91,103,119,102,190, 63,
+146,205, 27, 48,101, 19,248,240,149,119,126,215,181,215,102,119, 38,247,158,153, 51, 51,231, 62,207,105, 26,160,228, 58,246, 31,
+ 58, 3,137,244, 6, 98,226,238, 50,151, 98,147,119,146, 28, 22, 38,166,226, 94,195, 53, 57,216,180, 93,133,119, 94,123, 80, 49,
+ 98,144, 51,130, 99, 77,176,143,216,129,177,175,133,123,183, 11,114,240, 6,107, 4,199, 25,225,216,227, 52, 48, 71, 90,167,222,
+181,219,250,205,157, 67,164, 67,202, 74,243, 59,244,234,214,213,218, 53,240, 77,148,220,187,131,132,184,104,237,245, 91,201,151,
+175,221,214,111,126,150,140,244,240,240,120,181, 71,143,102, 24,254,206, 76,208,250, 98, 60, 76,248, 9,101,165,217, 56,127,209,
+ 6,119, 31,151,118, 2, 96,113, 4,235,114,130,169, 5, 80,132,136,150,194,199,118, 98,131,124,244,208, 1,144, 8,116, 96,141,
+101, 32,232,124, 60, 40,164, 75,134,204,203, 96, 0, 64, 38, 37, 4,214,130, 18, 59,139, 34,141,126,206, 1, 50,145, 17,191, 28,
+ 72, 0, 75, 84, 44,179,196, 18,216,240,203,159, 15, 62, 92, 56, 57, 20,205,253, 28,219,220,184,159,107,110,131,183,180, 74, 59,
+233,250,193, 5, 65,186,132,185,224, 88, 35, 46, 44,119, 12,234,252,121,209, 36, 52,114, 89,156,219, 15,145, 9,224, 67, 48,154,
+141, 31, 47, 62, 58, 55,172,229,157,200,105, 31, 14,178, 3,193, 47,140,206,195,195,243,226,209,104, 52, 31, 76,159, 62,125, 35,
+ 69, 81,174, 0, 8,142,227,160,215,235, 5, 63,254,248,163,208,100, 50,145, 20, 69, 49, 82,169,212, 20, 27, 27,107,100, 89, 54,
+143,166,233, 15,234,211, 52, 24, 12, 15,214,174, 93,219,212,104, 52, 86,141, 56,212,235,245,248,245,215, 95,161,215,235, 33,145,
+ 72, 96, 99, 99,131,135, 15, 31,130, 32, 8,154, 97,152, 7,124, 78, 60, 79,131, 5, 44,136,120, 99,222, 60,112, 32, 64, 96,254,
+157,140,191, 79,198,116, 43, 19, 89,205, 61,233, 79, 91,132,116,153, 87,105,202, 22, 52, 52, 1, 58,134, 25,218,174,109,224,239,
+ 0,160,103,153,183, 27,115, 16,165, 58,237,155, 33,237, 59,237,100, 57, 78, 96, 98,184, 31, 73, 18,123,116, 64,226,195, 71,245,
+143,156,171,141, 44, 85,113,108,223, 72,123,206,188, 4, 78, 85,179, 96,229,116, 12, 28,199,113, 85,205,130,115,164,200, 47,208,
+215,219,155,250,252, 13, 93,239,246, 45, 37,239, 31, 59, 27, 55,158, 97, 57, 57, 69, 18,217, 58, 35,187,233, 89,205, 85,101,237,
+232,236,137, 19,153,199,111, 70,186,247,118,169,156,102, 53,191, 24,200, 47,193,241,204,204,242,179,141,209, 44,210, 26, 7,205,
+ 90,126,224,160, 88, 64, 9, 0, 14, 44, 91,113,188, 58,154, 41,172, 48, 97, 64, 43,127, 40, 63,255,209,244, 59, 69, 17,105,245,
+233, 93,189,165,250,110,248,231, 39, 62, 75,184, 95,244, 99,106,102, 69,205, 39, 53, 19,183,119, 29,123, 52,247, 65,122,217,103,
+183,239, 23,125,139, 6,246,155, 32,128,117,237, 94,155,247,183,239,158,245,124,222,125,140,120, 0,131,193,101,244, 26, 62, 97,
+205, 52,130, 0,191, 76, 4, 15,207,255, 16,230, 40, 22, 73,146, 95, 61, 47, 77,115, 20, 11,192,253, 6,164,227, 42,128, 86,207,
+243,216,226,226,226, 10, 0, 20,240,185,252,239,166, 37,175, 9,112, 28, 71, 62,203,171,161,233,244,247,247,231, 26, 96, 84,248,
+ 60,226, 53,121, 77, 94,147,127, 38, 63,227, 51,153,227, 56,226, 89, 94,124, 30,189,124,240,205, 30, 47, 0,130, 32,216, 23,249,
+123,247,239,223, 39,248,179,206,195,195,195,243,226,158,201,207,123,201, 30,158,127, 63, 36,127, 10,120,120,120,120,120,120,120,
+120,158,179,233, 70,237, 97,190,134,140, 14,104, 76,168,240, 54,175,201,107,242,154,188, 38,175,201,107,242,154,255,115,154,245,
+105,243,163, 19,255,159,140, 23,175,201,107,242,154,188, 38,175,201,107,242,154,255,123,154, 47, 21,124, 19, 33, 15, 15, 15, 15,
+ 15, 15, 15, 15,111,176,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, 30,222, 96,241,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,188,236,152,151, 86,233,194,159, 10,
+ 30, 30, 30, 30, 30, 30, 30,222,139, 60,191,131,170,254,206,195,195,195,195,195,195,195,195,123, 17,222, 53,242,240,240,240,240,
+240,240,240, 94,228,191,211, 53,242,240,240,240,240,240,240,240,240, 94,228, 25,225, 71, 17,242,240,240,240,240,240,240,240,240,
+240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240, 60, 71,248,149,198,121, 77, 94,147,215,228, 53,121, 77,
+ 94,147,215,252,159,131,239,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, 6,139,135,135,135,135,135,135,135,135,135, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60,255, 53, 16,168,125,
+ 36,192,237, 6,232, 52,102, 52,193,109, 94,147,215,228, 53,121, 77, 94,147,215,228, 53,255,231, 52,235,211,190, 13,158,255, 23,
+227,197,107,242,154,188, 38,175,201,107,242,154,188,230,255,158,230, 75, 5,223, 68,200,195,195,195,195,195,195,195,243,156, 17,
+252,195,230,206,108,240, 88,252,103, 21,237,255, 54, 77, 30, 30,158,231, 64,231, 54,152, 46, 22, 9,199,233,104,227,178,139,241,
+248,169, 75, 40,156, 77, 44,150, 74, 69,130,206,122,131,189, 50,127,110, 0, 0, 32, 0, 73, 68, 65, 84,233,155, 11, 55,241, 99,
+ 3, 37,137,167, 62,243,247,250, 51,210,171, 87,175,241, 0,230,113, 28,199,177, 44, 59,251,212,169, 83,219,158,199,179, 94, 46,
+151,143, 0, 32, 3, 0,146, 36, 75,178,178,178,118, 91,242,143, 93,186,116, 17,148,151,151,167, 2,240,168,252,234, 94, 92, 92,
+ 92, 96,125,219,120, 26, 78, 76, 76, 12,231,227,227,131, 86,173, 90, 37,101,103,103,175, 1,176,129, 63, 43,255, 69, 6, 43,208,
+ 85,218,241, 21, 47,215,254, 71, 99, 31,207,174,239,134,243,240,240, 88,234,234,234, 58, 65,163,209,232, 0,112, 36, 73,114, 4,
+ 65,192,252, 2, 0,134, 97,242,146,146,146, 44, 13, 67, 62, 55,205,128,128,128,235, 36, 73,122,154,255, 7, 0,234,251,155,101,
+217,140,196,196,196,176,250, 18, 41,151,203,251,144, 36, 57,163,190,253, 88,150, 93,154,157,157,125,172,174,125, 90,182,108, 25,
+103,109,109,237, 78,146, 36, 81,219, 62, 28,247,159, 50,199,100, 50,113, 26,141, 38,231,206,157, 59,161, 13,205, 91,165, 82, 57,
+155,227,184, 80, 0, 63,171, 84,170,195, 0,152,103,185, 86,148, 74,229, 16,142,227,230, 84,158,195, 69, 89, 89, 89,123, 26,242,
+255,254,254,254,215, 69, 34,145, 39, 69, 81,196,211,121, 82,211,103,150,101, 57,131,193,144,145,156,156, 28,198,223,246, 47,158,
+ 78,109,208,177,169,175,226,203,201,111,117,195,103, 75,119, 78,142,104,105,202, 23,137, 69, 27,134, 68, 54,117,104,238,231,128,
+175, 54, 94,158, 2,176, 13, 49, 88,132,151,151, 87,136,187,187,187,175, 86,171, 53, 95,139, 28, 69, 81, 79,236, 68,211, 52,157,
+148,148,116,152,207, 1, 11, 11, 4,129,224,203, 63,255,252, 83,193,178, 44,250,245,235, 55, 31,192,243, 48, 88,132, 68, 34,177,
+122,244,232, 17,140, 70, 35,233,227,227, 99,211,192, 50,202, 37, 54, 54, 22, 52, 77, 27, 58,117,234,228, 83,125,155, 88, 44,118,
+185,116,233, 18, 0, 24,218,182,109,235,211,216, 4, 6, 7, 7, 91, 91, 91, 89, 77,165, 8,162, 39,195,113, 65, 0, 64, 17,196,
+ 93,134,227, 78,168,181,218,149,137,137,137,234,151, 61,239,163,163,163, 49,126,252,120,220,186,117,171,217,225,195,135,215,207,
+158, 61,123,146, 74,165,234, 6, 32,143,191, 51,254, 97,131,213, 84,110,221,204,213,209,225,208,178,197, 11,112,180,247, 59,117,
+ 25, 44, 82,161, 80, 44,235,220,185,243,184,237,219,183, 91,239,219,183,207,218,215,215, 23, 34,145, 8, 20, 69,129,162, 40,144,
+ 36, 9,138,162, 48,104,208, 32,194, 82,115, 85, 93,243,228,201,147,214,129,129,129, 85,133, 44,199,113, 85, 38,171, 95,191,126,
+245,106,146, 36,233, 25, 23, 23,231, 38,149, 74,171,254,159,101,217, 39, 94, 28,199, 85,189, 24,134, 65,231,206,157, 45, 75, 40,
+ 73,206, 72, 76, 76,124, 85,173, 86, 63,161, 97,254, 13,243,223,175,190,250, 42, 0, 28,171, 71, 75,121,241,252, 73, 55,130, 78,
+ 1, 76,133,224, 40, 39, 64,220, 4, 32, 37, 53,238, 95, 88, 88,136,110,221,186, 81,141,201, 95, 87, 87,215,209,103,206,156,241,
+127,244,232,209,235, 95,127,253,117,193,229,203,151,215, 3,216,162, 82,169,210, 27,163,199,113,220,162,148,148,148, 0,142,227,
+224,231,231,183, 16, 64,131, 12, 22, 69, 81,158,209,209,209,110, 98,177,184, 42,159,107,123,103, 24, 6, 52, 77, 35, 42, 42,202,
+196,223,242,255,208,131,134,192,194,225,175,245,130,214, 72,194,104, 52,185, 42, 92,109,127,157, 50,186,139, 16,156, 1,219, 14,
+198,193,104, 98,127,106,168,185,234,219,183,175,207,134, 13, 27, 4,137,137,137,130,224,224, 96, 48, 12, 83,245, 98, 89,182, 65,
+247, 37, 79,149,193, 34, 72,146, 68,102,102, 38,108,108,108,236,187,118,237,154,197, 48,204,172,243,231,207,111,251,127,248,185,
+ 39, 34, 91, 4, 65,168, 85, 42,213,142, 23,125,204,109,218,180,233, 44, 21, 10,119, 46,152,247,169, 91, 80,139,150,164,179,171,
+ 51, 30, 60,200,128, 88,192, 69, 60, 72,186,215, 97,225,146,239, 63,108,211,166,205,240,248,248,248,243, 47, 91,126,123, 15,222,
+188,158, 53,209, 19, 0, 96, 99, 12, 0,108, 66, 89, 89, 25,222,123,239, 61, 28, 56,112, 32,184, 99,199,142, 75, 25,134, 25,199,
+223, 25,255,160,193,242, 83, 74, 61,108, 68,210,227, 27,127, 88, 67, 24,203,114, 28,235,185,161, 22,117,238,220,249,237,237,219,
+183, 59, 18, 4,129,147, 31,189, 11, 7, 90, 7,229,151,223,192,209,197, 21,134, 25,227, 97,203,152,208,234, 84,124, 67,110,210,
+ 39, 52,147,146,146, 80, 88, 88, 8, 87, 87, 87,200,100, 50, 72, 36, 18,136, 68, 34,136,197, 98,203,158,222, 4, 1,169, 84,138,
+232,232,104, 8, 4,130,170, 23, 69, 81, 53,126,118,119,119,183,248, 92,177, 44,187, 52, 40, 40,168,117,114,114,178, 93, 81, 81,
+ 17, 58,117,234, 84, 74, 16,196,205,106,198,163,245,205,155, 55,237, 44, 46,105,232, 20,148, 63,254, 1, 92,209, 30,192,225, 13,
+ 48,118,195,161, 67,147, 39, 10, 25,179, 41,100,152,198, 7,157,242,242,242,232,115,231,206, 33, 36, 36, 4, 59,119,238,116, 46,
+ 42, 42,250,242,231,159,127,158,179,106,213,170,217, 42,149,106,105, 35, 36,157, 0, 32, 41, 41, 9, 0, 28, 27,147, 38,177, 88,
+140, 43, 87,174,128,227,184, 42, 83, 78,146, 36, 72,146,196,159,247, 93,160, 54,144,208,228,220,198,148,129, 62,240,245,245,253,
+ 91, 84,139,231,197, 16,217, 26,253,218,182,110,217,209,199,203, 27,103, 46, 93,131, 72, 44,116,152, 56,102, 0,108,109, 4, 88,
+190,229, 47,246,113, 70,225,228, 11, 55, 45,142,148, 16, 10,133,162,117,239,222,189,189, 54,108,216, 32, 2,128,219,183,111, 67,
+165, 82,193,205,205, 13, 82,169, 20, 66,161, 16, 20, 69, 65, 36, 18,241, 39,191, 1,132,134,134,182,104,209,162,133, 53,195, 48,
+208,104, 52,248,225,135, 31,236,165, 82,169,253,128, 1, 3, 44,142,100,213,210,108, 23,164,215,235,181, 10,133, 66, 6,128, 37,
+ 73,178,252,233,200, 22, 0, 40, 20, 10,235, 26, 36, 77, 0,242,219,182,109,235, 1, 64, 12,224, 94,245,109, 6,131,161,182,109,
+150, 30,115, 68,104,235,102,135, 23, 46,154,103,157,157,115, 15,246,118,217, 96,141,185, 88,191,126, 61,172,172,236, 48,127,254,
+ 44,193,254,176,182,242, 79, 62,157,121, 72, 32, 16, 68, 93,191,126,253,242,203,148,231,172,137,158,208, 38, 44,188,234,243,182,
+232,213,208,219,135, 34,115,254,124,172, 90,181, 10, 1, 1, 1,237,239,222,189,203,223, 28,255,148,193,106,225,101,231,192,177,
+220,241, 31, 55,172, 20,131, 86, 59, 38,197, 92,172,190,185,250, 80, 75, 2, 0,233,238,238, 62,113,199,142, 29,118,230,194, 46,
+144, 96,224, 0, 26,175, 52,111, 14,153,189, 3,114, 76, 52, 56, 35, 13,177, 72, 84, 91,129, 88,175, 38, 73,146, 16, 10,133, 79,
+188,196, 98, 49,170, 71, 59,234,208,172, 94,155, 3, 69, 81,136,142,142,134,209,104,196,208,161, 67,107, 52, 91,181, 80,163,102,
+118,118,246, 49,165, 82,121,147,227,184, 87, 89,150, 5, 65, 16, 55,179,178,178,186,152,183,203,229,242, 62,109,218,180,153,193,
+178,236,210,250, 52, 57,142, 3, 76, 5,224, 10,119,192,182, 83, 62, 74, 47,187,128,176,238, 9, 6, 62,184,125, 63, 27, 39,175,
+167, 34,191,176, 28,109, 3,221,208,187,147, 31, 88,150,181, 56,157,213, 81, 40, 20, 1,193,193,193, 65, 70,163, 17,231,206,157,
+ 3,195, 48,104,213,170, 21,198,142, 29, 75,174, 94,189,122, 44,128,165, 13,213, 4, 16, 31, 27, 27,219, 51, 59, 59, 27, 0,110,
+ 89,176,255,237,154,140,240, 47,191,252, 2,157, 78,247,183,157, 29,187,124,141,207,222,240,193,216,143,182,225,155,228,221, 88,
+183,110,221, 19,205,165, 13, 72,103, 67,225, 53,255,150, 81, 24, 59,108,240,235,160, 68,214, 72,122,144,129, 46, 29, 67,225,230,
+230,134,155,137, 15,240, 56,179, 48,135, 32,240, 78,159,112,241, 82,173,214, 48,231,124, 60,182,212,167,169, 80, 40,154,108,218,
+180, 73, 88,253, 59,145, 72, 84, 21, 5,175, 30, 13,127,186,201,144,207,163,154, 53, 67, 67, 67, 91,244,234,213,235,252,188,121,
+243,108, 31, 63,126,140,139, 23, 47,194,199,199, 7, 90,173,182,166,251,166, 46,205,154,154,237,216,236,236,236,223, 26,147,206,
+179,103,207,154, 0,120,214,180, 67, 93,219, 44, 57,246,150, 45, 91,202, 68, 2,193,174,175, 22,206,181,142,141, 61,140,240,136,
+ 40, 88,217,250,195, 68,103,160,160,176, 28, 69,247,179,176,100,201, 74,204,153, 51, 19, 95, 47, 94,104, 59, 98,212,216,157, 29,
+ 59,118, 12,184,114,229,138,238,101,201,119, 82, 32,218, 16,127,253,210, 4, 0, 40, 77,220,139,143, 71,134,163,172,236, 62, 62,
+252,112, 46, 50, 51, 51,113,239,222,189,216, 23,156,206,151,214, 96,113,248,123,167,209, 58,241,240,128,148, 49, 26, 15,173,255,
+110,169,189,173,141,204,245,250,241,253, 72, 75,203,174,243,127, 52, 26,141,225,192,129, 3, 56, 62,105, 28, 2, 8, 19, 28,191,
+ 92, 14, 55,165, 18, 37,227, 6,161,220, 72,163,233,145,107,144,216,216, 64,108,109, 99,113,196, 65,163,209, 24, 78,159, 62,141,
+132,132, 4, 8, 4, 2,216,216,216,192,218,218, 26, 18,137,164,202, 88,153, 31,192,150,106,114, 28, 7,129, 64,128,219,183,111,
+ 35, 45, 45, 13, 14, 14, 14,184,120,241, 34,122,246,236,249,132,185,162, 40,234,137, 62, 94,150, 98,110, 90,172,201,128,161,158,
+166,193, 39, 16,186, 0, 78,111,163,236,138, 18,112, 28, 5, 35,103, 15,150, 99,113,227,126, 1, 62, 24,213, 31, 0, 48,113,206,
+ 15,232,217,193,183,170, 9,178, 33, 40,149,202, 15, 90,181,106,181,114,194,132, 9,164,181,181, 53,244,122, 61,244,122, 61,146,
+146,146,224,236,236, 12,153, 76,214,168, 48, 1,199,113,143,148, 74, 37,164, 82, 41, 56,142,123,212, 24, 13,130, 32,176,107,215,
+174, 26,183,189,179,242, 14, 4, 21,221,179,176, 97,195, 6,152, 76, 38,112, 28,199,135,176,254, 9, 56,120,184,203, 61, 65,114,
+ 70,100,229,228, 99, 80,191,222, 16,136,108,144,154,145,143, 54,205,253, 20,111, 13,140, 80, 80,132, 9, 95, 44,219, 49, 17, 96,
+183, 88,112,191, 51,137,137,137,194,248,248,120, 80, 20, 5, 59, 59, 59,200,100, 50,136, 68, 34, 72, 36,146, 42, 99,197, 71,176,
+234,166,119,239,222,147, 89,150,157,197,178,108, 81,187,118,237,148, 11, 22, 44,176,207,200,200,192,237,219,183,177, 99,199,142,
+124,142,227, 76,149,157,221,231, 63,235,111, 89, 16,217, 2, 65, 16, 13,238,231, 20, 28, 28, 44, 50,209,197, 31,219, 91, 49,175,
+ 9, 72, 59, 31, 83,105,249,163, 82, 35,121, 32, 57, 35,107,117,101,244,171, 86, 36, 66,225,228, 85,203,103,185,187, 56,211,232,
+211,231, 53, 60,124, 84,132,153, 51,135,162,180, 84,135,237,191,172, 0, 32, 6,109,162, 16,218, 62, 10, 10,133, 23, 34,195, 35,
+ 21,231, 46,156,155, 8, 96,197,203,114, 13, 60,222,247,254, 68, 0, 11,189,189,189,207,254,176,100,137,127,143, 30, 61, 0, 0,
+ 39, 79,158,196, 79, 35, 71, 98, 62, 48,218, 22, 80,125, 12,204,124,161, 79,140, 6,122,145,255,118,131,101, 62,160,134, 28, 24,
+ 33, 53,217,238, 94, 48,107,178,175,119, 19, 63,249,213,191,118, 33, 37, 37, 19, 57, 57, 69,117,157, 52,150, 32, 8,182, 73,147,
+ 38,176, 51,234, 96,207, 25,224,166, 80,194,214,201, 25, 69,198,202,200,149,181, 53,196,214, 54,150, 62, 28,171, 52,155, 55,111,
+142,156,156, 28,136, 68, 34,216,216,216,192,214,214,182,202, 96,153,205,149,165, 15, 92,130, 32,192,178, 44, 4, 2, 1,110,222,
+188,137,200,200, 72,120,121,121, 97,231,206,157,232,211,167,207,223,162, 88,141,105,122, 50,247,185,170, 30,185, 34, 73,114,134,
+ 37,157,219,159, 64,220, 20, 38,219, 55, 65,202,122,128,230,236,160,231, 20,149, 77,130, 28,254,186,150,131,228,180,252, 39,154,
+ 11, 45, 55,207, 30, 74,169, 84,186,109,230,204,153,221,195,194,194, 64,211, 52, 0, 64, 38,147, 65,175,215, 67, 40, 20,130,166,
+105,104,181,218,204,127,226,194, 53,159,243,227,199,143,131, 32,136, 42,163,107,110, 42, 84,171,210, 49,118,202,118,136, 5,192,
+205,155, 55, 17, 20, 20,196,151,168,255, 16, 86, 82,169,179, 88,106, 15,214,164,131, 64, 40,132,183,215, 43, 96, 25, 61,138, 74,
+ 53,120,231,205,129,136,187,117, 7,135, 79, 95, 53, 25,141,236,106, 75, 53, 3, 3, 3,145,155,155, 11,138,162, 96,107,107, 11,
+107,107,107, 52,107,214, 12,233,233,233, 79, 68,177,120,106,135, 36,201,217,135, 15, 31,118,167, 40, 74,110, 50,153,144,158,158,
+142,155, 55,111, 98,205,154, 53, 57,106,181,186,107, 92, 92, 92,114, 35,100,107,107,182,171,169,179,122, 99, 34, 91,213, 43,127,
+254,118, 18,195,137,229,203, 38,121,182,106,211,142,144, 82, 54, 37,154, 7,185,145,215,174, 94,142,152,179,229,143,201,105,197,
+154, 30,185,185,185,181, 86,222, 40,146,236,217,172, 69, 75,146,101, 51, 64,137,130,240,221,202,207, 80, 88,164, 70,121,153, 22,
+128, 24, 6,163, 0,122, 61,129,110,221,123, 96,231,174, 3,104, 23,214,142,162, 72,178,247,203,100,176, 0,128,162,168,165,251,
+247,239,247,151, 74,165, 88,188,120, 49,108,109,109,113,101,225, 66,252, 36, 18,193, 10,192, 6,154,158,129, 23,103,176, 26,227,
+ 69,254, 21, 17,172, 6,225,233,233,185,162, 99, 68,135, 87,155, 52,111, 39,189,122,116, 47,238,223, 75, 67,126,126, 9, 56, 64,
+ 91,215,201, 35, 8,130, 19, 10,133,112,251,226, 43,120,183,106, 5,205,248, 33, 40, 50,210,240,251,235, 10, 36, 54, 54,184,219,
+ 43, 20,156,193,128,206,137, 57,150, 26, 23,142, 32, 8, 14, 0, 92, 92, 92, 32, 18,137, 32,149, 74, 33,149, 74,171,250, 94, 85,
+127, 89,106,134, 88,150, 69,105,105, 41, 30, 61,122,132,241,227,199, 67, 38,147,129, 32, 8,228,228,228,192,199,199, 7, 20, 69,
+ 33, 51, 51, 19,167, 78,157, 66,147, 38, 77, 32, 22,139, 27,116, 49, 84,235,212,222, 90,169, 84,158,229, 56,174,245,245,235,215,
+237,194,194,194,208,160, 8, 22, 33,130, 30, 62, 96,224, 9,150,251, 79, 95, 43,163,233,201,202,155,217,100, 89,130,187,187,123,
+112, 80, 80,208,229, 53,107, 86,219,186,185,185,131,101, 25, 24,141, 70,148,148,148, 66,163,209,192,219,219, 27,214,214,214,220,
+242,229,203, 9,134, 97,254,177,161,188,102, 67,101,142, 32,154,251, 95,145, 36,137, 41,175,121,163,168,200, 22, 20, 85,241,217,
+210, 99,231,121,254, 88, 91,219, 58, 9, 68,214, 96, 73, 1,236,237, 29, 33, 16, 91,131, 53, 9,192,176,128,173,189, 11, 46,197,
+ 37,225,242,173,178, 15,114, 11, 96,201,208,125, 78, 32, 16,112, 20, 69,193,205,205,173,202, 76, 9,133, 66,243,181,139,210,210,
+ 82, 80, 20, 85,245, 29, 79,221, 21,201,212,212, 84,168,213,106, 92,185,114, 5,187,118,237,202,123,218, 92,245,234,213,107,130,
+ 76, 38,155,163,211,233, 22, 31, 59,118,108,125, 93,154,141,104,182,107, 76,228, 43, 48, 52, 52, 84, 40,228,138, 14, 31,217,187,
+210,211,142,137, 35,144,250, 62,144, 92,154,104,115,205, 45,188, 71,251, 1, 68,243,175, 62,241, 25, 52,119,229,145,220, 92, 4,
+163,150, 17,207, 28,208, 82,106, 37, 5, 56, 2, 23, 47, 28,173,104, 22, 44, 44, 67,185, 90, 7, 61, 77, 65,111, 32,160,163, 9,
+244,232, 25,133, 77, 91,126,135, 42,183, 8, 28,208,234,101,187, 14, 2, 2, 2,218,122,120,120,224,147, 79, 62,129,110,199, 14,
+148, 3, 24, 0, 96,127,101,165,218, 22,152,198,223, 45, 47,208, 96,121,120,120, 76,110,221,186,245,123,155,127,222,110,179,108,
+238, 23,165, 69,137,183, 40,131,150,182,214, 27,141,134, 7,170,130,213,245,152,161,138, 90,167,131, 35,100,118,246,208, 63, 21,
+185,226, 12, 6,176,180, 1, 34,203, 31,142, 28, 65, 16,224, 56, 14, 86, 86, 86, 16,139,197, 53, 70,174, 26, 18,193, 2,128,226,
+226, 98,236,218,181, 11,237,219,183,135, 76, 38, 3, 69, 81,104,221,186, 53, 18, 19, 19,225,231,231, 7, 0,216,191,127, 63,222,
+120,227, 13,220,191,127, 31,193,193,193, 54, 49, 49, 49, 13, 50, 88, 12,195,224,248,241,227,118, 28,199,189,202,113, 28,242,242,
+ 26, 55, 26,150, 97, 24,168,213,106, 28, 63,126, 28, 89, 89, 89,144,203,229, 40, 41,177,133,157,146,173, 50,139,230,151,133, 15,
+222, 47,222,125,247, 93, 91, 27, 27, 27, 48,140, 9, 66,161,176,202,184, 10,133, 34, 36, 37, 37, 97,228,200,145, 37,169,169,169,
+159, 55,114,212, 15, 33, 16, 16,238, 37, 37, 69, 40, 43, 45, 6, 69,193, 11, 0,133, 70, 76,253, 64,146,100,213,187,249, 69, 16,
+ 4, 68, 66, 10,114,119,215,170,142,239,149,209, 59,190,137,240, 5,250, 42, 0,195, 1,188, 93, 84,102, 16, 20,150,105, 1,147,
+ 1,143, 82, 31,161, 88, 77,131, 51, 25,241, 56, 67, 5,181,158, 69, 65, 97, 25,218,180,237,179,230,244,233,211,179,105,154,158,
+ 5,224,144, 37,215,124, 76, 76, 12,206,157, 59,135, 11, 23, 46,192,220, 81, 26, 0,236,236,236, 16, 29, 29,141,110,221,186,241,
+185, 80, 7, 52, 77, 47,238,221,187,247, 44,185, 92, 46, 93,177, 98,133,189,183,183, 55, 8,130, 40,125, 58,114, 21, 22, 22, 54,
+123,198,140, 25,138,161, 67,135, 78, 1,176,190,145, 63, 87, 87,103,245, 58,203,168,154,166, 98,200,205,205,158,176,113,219, 88,
+ 87,107,225,163, 44,164,126, 87,105,190, 40, 64, 83, 10,156,222, 14,209,171, 95,165,142,234, 62,209, 45,171,108,245,187,153,217,
+153,155,106,121,208,177, 73,201,105, 88,183,110, 21,230,204,153,136, 29,219, 87,129,229, 68, 40, 83, 27,225,174, 12,129,193,200,
+130, 32,133,232, 20,222, 25, 23, 46, 93, 5, 24, 26, 83,198, 95,126,233,230, 90,187,119,239,222,181,180,180,180,160,185,115,231,
+ 98,171,135, 7,108,109,109, 49,117,222,188,203, 12,195,132,243,119,201,243, 49, 88, 22,135,228, 60, 60, 60, 6, 43, 20,138,101,
+219,183,111,183,202,202,202,130, 50,160,133,221,159,127,236,210,187,217,136,180,170,194,162, 49,241, 89,234,122,135,219,147, 36,
+ 9,211,194,169, 40, 48, 25,224,251,231, 37, 72,108,108,144,220, 39, 12,156,193,128,240,216, 84, 72,108,108, 32,144, 90, 53,248,
+ 96,106,138, 88, 85,127,153, 11,227,250, 48, 24, 12, 14, 61,123,246, 68,143, 30, 61, 48,100,200,144,170,166,192,144,144, 16,252,
+254,251,239, 24, 60,120, 48,226,227,227,161, 84, 42,209,172, 89, 51, 52,107,214, 12,167, 79,159,110, 88, 28,180, 50,130,213,167,
+ 79,159, 82,130, 32,110,114, 28,215,250,218,181,107,118, 13,213, 48, 27,168,227,199,143,163,127,255,254,240,243,243, 67, 92, 92,
+ 28,162,191, 90, 14,129,141, 11, 64,186,129, 99,185,170,200,150, 37,125,176, 68, 34, 81,100,147, 38, 77,144,157,157, 3,137, 68,
+ 2, 71, 71, 7, 88, 89, 89, 65, 34,145, 98,201,146, 37,236,166, 77,155,214, 18, 4,241,149, 74,165, 42,108,132, 57,111,234,226,
+226,242,203,152,209,163, 58, 56, 59,187,192,221, 93,129, 25,211,103, 70,237,248,125,103,194,227,199,143, 71,100,101,101,221,178,
+ 84,139, 32, 8, 24, 12, 6, 80, 20,133,253,201,174, 80, 27, 8,148,102,196,226,227,215,124,170,204,150,185,169,215, 60,253, 5,
+207,139,129,162,168,173, 83,167, 78,237, 58,108,216, 48, 66, 68, 26, 13,209,199,182, 9, 24,198, 68,124, 54,235, 71,230,204,249,
+179, 36,195,152,136, 33, 35,167,177,135, 79,221, 34, 63,152,178,156, 9,233,216, 31,183,111,223,150, 15, 24, 48, 96,145,209,104,
+180,200, 96,153,243,184,150,223,231,155, 8,235,225,228,201,147,107, 1,172,237,213,171, 87,182, 76, 38, 67,121,121,249,223,250,
+ 41, 6, 7, 7, 91,167,164,164,136,196, 98, 49,218,182,109,235,202,178,108, 50, 65, 16, 43,142, 31, 63,190,185, 33,191, 85, 75,
+100,171,209,211, 52,216, 58, 49, 3, 91,181,107,102,155,100, 61,215,214, 74,168,187,241, 74,178,212,142, 0, 80,162,149, 63,188,
+152, 49,162,156,204,165,218,180,234,222, 28,182, 66,217,107, 0,106, 52, 88, 4,112, 83, 93, 86,214, 91,163, 53,225,236,153,120,
+ 12, 29,234, 13, 29, 77, 66,171, 35, 65, 27, 57,144,148, 8, 4, 37,194,152,113,239,193, 96, 98, 81,172, 82,129, 0,226, 95,182,
+235,128, 97,152, 25,131, 6, 13,106,183,120,241,226,224,169, 83,167, 2, 0,148, 74,101,167,217,179,103,223,249, 7,230,193,122,
+105,154, 7,159,142, 96,213,121, 96, 93,186,116,217,108, 52, 26, 95, 47, 44, 44,116,124,239,189,247,232,252,252,124,236,219,183,
+ 15, 63,253,244,147, 70,109,164,174, 23, 23,152, 70,167,168,212, 25,150, 20,138, 36, 73, 66,100, 52,130, 51,253, 39,114,197,234,
+245, 85,145, 44,161,149,172, 97, 57, 82, 25,193,170,201, 84,153, 35, 89, 13,121,216, 74, 36,146,226, 11, 23, 46,184,101,100,100,
+ 60,209,161,221,215,215, 23, 0,112,237,218, 53, 92,185,114, 5, 35, 70,140,128, 64, 32,128, 72, 36,194,205,155, 55,203, 26,146,
+102,179,225, 49,143, 34,148,203,229,125, 58,116,232, 80,219,232,193,122,181, 30, 63,126, 12, 63, 63, 63,232,245,122, 56, 56, 56,
+160, 64,245, 8,143, 31,165, 64,163, 79, 70, 19,185, 20,185,185,185,144, 72, 36,150,222,112,140,185,224,210,235,245, 80,169,178,
+161, 84, 42,241,235,175,219,177,121,243,230, 17, 42,149,106,119, 99,174, 53,133, 66, 49,173, 95,191,126,139, 94,127,253,117,129,
+ 70, 93, 14,142,173, 48, 60, 34,177, 8,223,127,255,125,179, 83,167, 78,221, 88,179,102,205,215, 82,169,116,209,195,135, 15, 13,
+245,229, 57, 0,108,221,186, 21, 0, 32,235, 56, 15, 51,134,189,130,183, 39,110,195,138, 21,123,159, 56, 86,138,162,176, 96,193,
+ 2,190, 68,125,129,116,236,216, 49,100,214,172, 89, 66,115,159, 56,165,247, 98, 19, 77,211, 44, 0, 4,181,126,245, 63,145,202,
+ 62,192,253,251,247,177, 98,197, 10,168,213,106, 8, 4, 2,145,209,104,180,232, 55,122,246,236,137, 62,125,250, 84, 53, 19,186,
+184,184,128,166,105,152, 76, 38,222, 92, 53, 48,146,213,191,127,255, 89, 44,203,114, 44,203,206, 53,127, 31, 26, 26,106,229,230,
+230,118,113,213,170, 85,206, 38,147, 9,211,166, 77,115,200,207,207,119,152, 52,105,210, 76, 0,155,107, 41, 39, 26, 50,187,186,
+ 69,211, 52,212,212,167,139, 32,136, 38,214,214,246,200, 67, 54,138, 93,140, 33,197,206,166,194,227,170, 15,110,122,165,183, 9,
+178, 98,140,126,100,169, 1,246, 86,118, 0,203, 5,212,250,156, 99,217,227,137, 9,119,122,120,122,248, 81, 7,254, 60,131,254,
+ 3, 7, 67,103, 32,160,163, 73, 16,148, 16, 4, 37, 66,187, 14,225,240,245, 11, 4,203, 2,119,226, 99,105, 35,203, 30,121,153,
+242,190,250, 60, 88,211,190, 63,137,217, 11,191,195,168, 33,125, 48,118,236,216,127,114, 30,172,151,182, 15, 86,109,230,234, 29,
+ 71, 71,199,145,227,198,141,179,186,118,237, 26, 22, 46, 92, 40,136,142,142,166, 99, 98, 98, 76, 12,195, 76,203,202,202,218,216,
+144, 31, 37, 73, 18, 77,182,255, 5,165, 92,142,123, 81,237,158,136, 92,157,109,237, 9, 86,175, 71,175,148,146, 6, 31,140,185,
+ 41,203,108,172,204,230,170,142,169, 20,234,170,129,215, 56,239,213,135, 31,126,136,205,155, 55, 35, 60, 60, 28,254,254,254, 16,
+ 8, 4, 85,205, 82,141,137, 96,153,105,240,232,193,167,106,243,222,222,222,184,117,235, 22,236,237,237,241,203, 47,191,192,203,
+211, 3,163,123,251,194, 96, 48,192,104, 52, 66,173, 86,155, 35, 88,245, 38,148,101,217,132,125,251,246,249, 13, 27, 54,140, 19,
+ 8, 4,132, 94,175, 7, 0,172, 94,189, 58,183,161, 51,174, 87,214,134,134, 72, 36,146, 45, 35, 70,140,176,109,214,172, 25,114,
+114,114,112,245,234,101,204,156, 57,227,170, 80, 40,208, 69,245,237,215, 53, 56,184, 5, 38, 78,156, 72,134,132,132,204,153, 57,
+115,230, 52, 79, 79,207,177, 25, 25, 25,187,234, 51, 89,191,255,254, 59, 0,224,221,239,239,194, 96,168, 40,152, 55,108,216, 0,
+185, 92,254,196,190, 15, 30, 60,224, 71, 17,190, 64, 76, 38, 19, 71,146, 36,145,158,158, 78,203,100, 50,194,201,201, 73, 32,145,
+ 72,160,215,235,171,140,214,253,251,247,113,232,208, 33,100,100,100,192,201,201,137,180,183,183,135,201,100, 42,178,244,154,175,
+ 62, 90,208,108,168,120,115,213,112,206,158, 61,187, 22,192, 90,243,231, 30, 61,122,140, 39, 8, 98,186,209,104,180,219,188,121,
+179,131,157,157, 29,113,232,208, 33,195, 15, 63,252, 80, 78, 81, 84, 17,128,229,117,149, 41,207,107,118,245, 58, 34, 95, 96, 76,
+184, 87, 84,158,226, 35,180, 81,176,241, 58,226,210, 39,233, 51,130,138,200, 0,119,162, 69, 11,211,208,220,132,139,163,141, 15,
+195,243,114,114, 9,134,227,106,157,196,169,168,164,100,253,150,159,119,126,188,111,207, 54,111,169,157, 12,163,222,158,140,227,
+ 39,206, 67, 44,145,225,234,245, 27, 48,208, 12, 82, 31,103, 98,196, 91,163,160,112,115, 6,165,201, 82,233, 13,134,141, 47, 83,
+222, 63, 49, 15, 86, 88, 56, 46,238, 93,142,223,147,189,145,185,112,225, 63, 61, 15,214, 75, 23,193,170,145,246,237,219,219, 22,
+ 23, 23,127,255,233,167,159, 90,169,213,106,228,231,231,163,160,160, 0, 87,175, 94,141, 54, 26,141, 31,215, 53, 74, 3, 21,171,
+109,223,126,186, 80,164, 40, 10, 78,174,110,144,216,216,130, 51, 24,170, 34, 87, 34,153, 53, 88,189, 30, 44,109, 0,106,111,206,
+169, 81,147, 32,136,191, 69,173, 26, 96,174,158,208, 52, 71,196,106,154, 84,212,203,203, 11, 95,127,253,245,223,166,105,176, 36,
+157, 64,197,104, 65,142,227, 90,155, 35, 79, 28,199,181,150,203,229,125, 44, 28, 57, 88,163, 38,203,178,232,210,165, 11,162,163,
+163,113,235,214, 45,144, 36,137,190,125,251,130, 32, 8,216,219,219, 67, 32, 16, 84,153, 57,243,128,128,186, 52, 25,134,121,251,
+167,159,126,250,236,200,145, 35, 95,124,244,209, 71, 86,175,190,250,170,185,159, 87, 30, 42,214,120,108, 80, 58, 89,150,157,127,
+243,230, 77, 91,147,201,132,197,139, 23,227,250,245,235,234, 7, 15, 30,124,170, 82,169,182, 0,224,138,138,203, 70, 61,124,248,
+104,221,151, 95,126,105,219,189,123,119, 92,187,118, 77,234,229,229,245, 37,128, 93,245, 29,251,213,171, 87, 65, 81, 20, 76,133,
+105,152, 56, 99, 39,108,100, 66, 36, 37, 37,161,160,160,160,234, 90,171,163, 41,169, 70,205,103,132,215, 4, 16, 19, 19,243,199,
+218,181,107, 63, 28, 51,102,140,136,227, 56, 38, 45, 45,205, 8,128,144,203,229, 84, 76, 76, 12,123,240,224, 65,104,181, 90,120,
+122,122,146, 30, 30, 30, 68,116,116, 52,155,152,152,120,149,227,184, 89,150,166,179,186,185, 18, 10,133,208,106,181,150,154, 43,
+ 62,143,234,102,222,222,189,123, 21, 58,157, 14, 98,177, 24,187,119,239,166,183,109,219,118,167,180,180,180,115, 92, 92,156,182,
+ 49,154,141,152,166,161, 78,205,178, 34,242, 80,244,241, 59,173,141,221,126, 36, 62,202, 46,136,172,170,184, 18,132,203,110,247,
+150, 46,210,246,109, 50,109,206,125, 75,150,115,154,131,181,105, 62,124,248,208, 96, 27, 18,242,198,212,207,230,158, 94, 56,127,
+158,237,210,111,150,225,118,255,161, 40, 46,209, 64,111, 96, 64,155, 88,204,159,255, 21,220,156, 28,224, 40,162,203,139,181,196,
+ 27,137,137,137,244,203,148,239,207, 56, 15,214,255, 71, 58, 95, 42,234,117, 31, 26,141,102, 97, 96, 96,160, 56, 49, 49, 17, 15,
+ 30, 60, 64,114,114, 50, 24,134,185,159,153,153, 57,160,177, 63, 74,146, 36,236,237,237, 33, 22,139,209,233, 86, 38,196, 34, 17,
+196,214, 21,203, 83,245, 74, 41, 1, 56, 14,164, 88,210, 96,205,167,231,188,122,150, 81, 68, 12,195, 84,205,208, 94,125, 61,195,
+167, 71,171, 53, 52,114, 69,146,228,140,203,151, 47,219,165,165,165,129,227, 56,236,221,187,215,110,200,144, 33, 51, 26, 19,189,
+226, 56, 14, 5, 5, 5, 96, 89, 22, 66,161, 16,221,187,119, 71,104,104, 40,202,203,203,193, 48, 76, 85,243,165, 72, 36,106,208,
+ 40,194,220,220, 92, 13,128, 5, 70,163,113,227,156, 57,115, 22,180,108,217,242,189, 79, 62,249,132, 68, 35, 7, 69, 16, 4, 97,
+ 50,153, 76,216,189,123, 55,246,236,217, 83,198,113, 92,160, 74,165,202,174, 22,189,219,126,229,202,149,232,193,131, 7,223,127,
+248,240,161, 93, 73, 73, 9, 80,207, 28, 54,149,215, 38,252,253,253,193, 48, 12,150, 77,244, 68, 89, 89, 43, 48, 12, 3,147,201,
+ 4,153, 76,246,196, 18, 68,252, 44,238, 47,184,102,204,178, 51,103,207,158,125,244,235,175,191,158, 49,101,202,148, 14, 99,198,
+140, 17,138, 68, 34, 54, 51, 51,211,180, 99,199, 14, 34, 32, 32,128, 20, 10,133,196,241,227,199,217,107,215,174, 93, 49,153, 76,
+203, 0, 52,104, 41,146,234,230,138,239,115,245, 92,217, 53,108,216,176, 49, 67,135, 14,181, 10, 9, 9,145,252,244,211, 79,197,
+106,181,186, 54,115,245,183,224,101,109,211, 52, 60,167, 9, 72, 1, 0, 42,149,106,227, 87,243,206, 77, 28,229, 63, 50,224, 61,
+231, 87,112, 66,157,139, 34, 33, 69,218, 57,144, 8,241,161,160, 41,126,232,118,226,218,222,100,149, 74,181,181, 46,157, 27, 55,
+110,196,145, 36,217,229,237,119,222,221, 55,110,204, 56,229, 23,159,124, 44, 60, 20,125, 26,140, 81,143,243, 39, 79,194,197,134,
+100,104,117, 78, 86,137,145, 28, 20, 23, 23,247,210,245,191,170,156, 7,107, 34,128, 17,243,230,205,219, 49,113,226, 68,176, 44,
+139, 51,103,206, 96,221,244,233,152,207, 48,163,109, 1,205,199, 21,251,240, 60, 47,131,213,174, 93,187, 87,212,106,245, 47, 6,
+131, 33,132,101, 89,241,217,179,103,161,211,233,144,152,152,168,101, 89,246,143,103,248,205,180,190,125,251,146, 79,175, 23, 87,
+139,201,177,180,115, 93, 90,207,158, 61,159,155, 38,203,178, 25,213,215, 48,171, 77,183,250,103,147,201,148, 97, 73, 66, 89,150,
+ 93,218,169, 83,167,191,125,215,200, 66, 44,165, 71,143, 30,244,211,166,171,166,191,171, 29,127,134,165,250,249,249,249, 57, 0,
+ 62, 96, 89,118,213,216,177, 99,231, 1,184,223, 72,131,181, 40, 56, 56,120, 78,197,159,196,194,172,172,172,236, 26, 76, 93,158,
+ 82,169,124,207,203,203,171,106, 1,232,250,142,189, 87,175, 94,116,125,139, 60, 87,143, 92,177, 44,155,193,223,242, 47,148,243,
+ 26,141,230,252,146, 37, 75, 58,175, 91,183,110,230,135, 31,126,216,126,248,240,225,130, 46, 93,186,224,240,225,195,204,153, 51,
+103,174,106,181,218,165, 13, 53, 86, 4, 65,148, 63,125, 15,213, 81, 9,209,241,217,208, 48, 78,158, 60, 57, 53, 60, 60,124,222,
+174, 93,187, 82,125,124,124, 36, 4, 65,152, 44, 52, 87,207,125,154,134,186,140, 28, 85,174, 27,184,125,228,135,135, 66, 62,122,
+215,167, 79,120, 91,169,103, 83,133, 60, 41,173, 0,233, 55,163,181, 15,207,174,123,196,233, 10, 6,194,130,136,123,108,108,108,
+188,159,159, 95,224,198,159, 54,191, 43,162,168, 94, 44,199,133,126, 62,105, 52, 72,130,136,163, 25, 38,186,180,172,108, 75,125,
+125, 66,255,237, 72, 68,162,209,147, 38, 77,194,175,191,254,138,125,171, 86,161, 79, 70, 6,126, 23,137, 96, 37, 18, 97, 3, 77,
+ 79, 0,111,176, 26, 69,173, 78, 36, 48, 48,240,247,194,194,194,161,165,165,165, 38,147,201,196, 16, 4, 97, 34, 8, 66,203,178,
+236, 87, 44,203,254,128,138, 78,104,245,193,135,226,121, 77, 94,147,215, 52,211,217,206,206,238, 19,150,101, 81, 94, 94,190,202,
+ 66, 99,197,159,207,127, 72,179, 91,183,110, 43, 73,146,236,192, 48,204,207,103,206,156,217,244, 44,154, 13,236,252,222,144,116,
+ 10,228,114,249, 56,206,209,102, 0,140, 2,127,142,166,146, 40,186,240, 80,101,228,138,229,243,221, 50,205,164,164, 36,206,201,
+201, 9,133,133,133,216,211,172,217, 19,219,108,129, 13,181, 68,176, 94,104, 19, 33,199,113,237, 0,184,154,235,255, 0,146, 0,
+180, 5, 96, 5, 64, 15,160, 28,128, 75,181,127, 41,168,220,102,222,126,142, 32, 8, 35, 94, 34, 90,242,154,188, 38,175,201,107,
+242,154,188, 38,175,201,107, 62,163,193,234,143,138,192, 14, 55, 99,198,140,153, 28,199, 69,205,152, 49, 99,102,181,207, 85,219,
+ 43,118,231,250, 63,181,189, 29, 94, 50,248,139,143,215,228, 53,121, 77, 94,147,215,228, 53,121,205,231, 98,176,234,122,175,237,
+239,106,239, 47, 20,162,142,147,116,251,255,249, 68,223,230, 53,121, 77, 94,147,215,228, 53,121, 77, 94,243,127, 78,179, 62,237,
+219, 53, 25, 44,130, 32, 14,113, 28, 55,160,250,123,181,237, 3, 0,192,188,205,252,119,245,237, 4, 65,252,133,151, 8,222,221,
+243,154,188, 38,175,201,107,242,154,188, 38,175,249, 76,252, 27, 35, 88,181,142, 34,228,118,239,166, 50,131, 97, 39,182,146,137,
+ 0,192,160,213,208, 30,137, 40, 37,134, 13, 99,192,195,195,195,195,195,195,195,243,130, 33, 8,226,208,140, 25, 51,102,253, 27,
+210, 42,168,205, 92,229,135,201, 92, 4,250,162, 64,198, 68, 7, 1,128,128,228,238,230,135, 57, 38,115,187,119,231, 63,111,147,
+ 21, 21, 21, 53,139,227, 56,119,161, 80,248,151, 92, 46, 63,179,105,211, 38, 35,127, 25,189,120, 56,142,171,119,177,198,182,109,
+219, 58,234,245,250,229, 44,203,118,175, 92,231,239,140, 72, 36,250,236,198,141, 27,133, 4, 65,212, 58, 36,218,219,219,123,135,
+159,159, 95, 32, 87, 1, 0, 60, 49, 47,151,249, 59,243,246,199,143, 31,223,203,200,200,120,203,210,180,123,121,121,249, 74,165,
+210,119, 8,130, 8,174,212, 73,212,233,116, 63,167,167,167, 63,250, 95,203, 71,133, 66, 97,197,113,220,235, 66,161,112,140,147,
+147, 83,251,188,188,188,249, 89, 89, 89,223, 61,195, 51, 98,154,131,131,195, 8, 7, 7,135, 38,133,133,133, 15, 75, 75, 75,119,
+ 1, 88, 1,160,222,251,244,171, 73,202,142,175,246,235, 50,247,220,225,179, 11,191, 92,151,117,229,233,237,243,167, 41,156,187,
+247,136,152,123,228,175, 75, 95, 45, 89,151,213,208,181, 45,201,202, 23, 80, 49, 98,204,220,193,245,191, 53, 95, 66, 0, 76,103,
+ 24, 70, 72,146,228,119,217,217,217, 23,254,219,175,165,102,205,154,125, 33, 22,139, 39,144, 36,249, 48, 39, 39,103,156, 74,165,
+122, 94, 83,157,144, 62, 62, 62,182,105,105,105,101,176,108,242, 98, 30, 0, 29, 59,118,204,161,105,218,173,174,125, 68, 34, 81,
+238,149, 43, 87,220, 95,194,195,207, 55, 55,253, 1,200, 5, 64, 85,126, 54, 84,190,231, 84,251, 46,167,150,237,255,188,193,202,
+ 12,134,157, 64, 95, 20, 88,144,115,103,120,158,234,198,155, 0,224,170, 8,217,229,236,222,124,103,102,176,152,150, 55, 27,108,
+ 35,148, 9,214, 83,148, 48, 68,103,208,187, 8, 5,194,124,218,100,188, 65, 26,184,137,217, 73,251, 30, 91,242,195, 3, 6, 12,
+ 8, 4, 96, 31, 26, 26, 26,115,254,252,249,246,223,125,247,157, 98,207,158, 61,173, 99, 99, 99, 71, 14, 28, 56,240, 79,142,227,
+142, 29, 58,116, 72,219,160,163,233,210, 69,224, 86,236, 52,154, 18, 8, 6, 2,104,205,113, 0, 8,234, 38,107,164,255,202,117,
+ 44,248, 25, 21,115,180, 52,238,194, 14,117, 10, 36, 88,250,115, 33,197,117, 54, 50,196,121,142, 20, 45,191, 18, 87,152,108,185,
+ 1, 80,244, 20, 11,136, 31, 1,192, 96,226,222, 75, 79, 87,157,120,150,253,106,121,128,247, 2,176,157, 32, 8, 33,128, 13, 12,
+195,236,207,201,201,137,135, 5,147,118, 90, 66,243,230,205, 93, 9,130,184,185,114,229, 74,231, 14, 29, 58, 80, 44,203,226,212,
+169, 83,111,205,153, 51,167, 79,139, 22, 45, 90, 86, 94,244, 53,226,231,231, 23,120,242,228,201, 54, 71,143, 30, 69,120,120, 56,
+ 88,150, 5,203,178,112,112,112,192,193,131, 7,209,161, 67,135,170,239,220,221,221,209,165, 75, 23,100,100, 88,246, 44,111,210,
+164,201,235, 45, 90,182,153,242,233,231,211,221,221,156, 93,108, 77,140,137,206,204, 84, 41, 87,125,183,172,163, 80, 40, 92,159,
+146,146,178,191, 49, 21, 37, 79, 79,207,225, 66,161,112, 0,128,224,202,239, 18,141, 70,227,161,140,140,140,157,150, 22,228,173,
+ 91,183, 62, 71,146,228, 43, 13,249, 97,134, 97, 30,223,186,117, 43,178, 49,121,164, 84, 42,135, 41,149,202,159, 58,118,236, 40,
+ 11, 9, 9,129, 72, 36,194, 55,223,124, 51,205, 2,131, 37, 0, 48, 77, 38,147, 13,183,182,182,246, 43, 47, 47,127,160,213,106,
+247,136,197,226,158,223,127,255,189, 87, 68, 68,132,109, 78, 78, 14, 65, 81,148,251,159,127,254, 57,122,205,154, 53,125, 76, 38,
+ 83,143,250,174,173,162,135,236, 92,137, 48,168,115,209,131,211,115, 1,244,125,122,187, 73, 39, 29, 67, 9,189, 6, 80, 92, 92,
+122,165,105,179,184,128,246,244,244,252,222,221,221,125,172, 86,171,213, 17, 4,193, 85,190,204,181, 92, 0,128,193, 96, 40, 74,
+ 78, 78,110, 86,151,208, 43, 29, 29,175, 83, 36, 85,235,220, 77, 12,203,100,164, 94, 41, 10,123, 14, 21,166,190,165,130, 0, 0,
+ 32, 0, 73, 68, 65, 84,152, 79,226,227,227,135, 10, 4, 2,162, 77,155, 54,214, 0,250, 88,106, 46, 20, 10, 69, 32, 65, 16,179,
+ 57,142,139, 81,169, 84,235, 1, 48, 74,165,178, 27,199,113, 95, 84, 30,239, 55, 89, 89, 89,167, 43,175,129,245,254,254,254,175,
+221,191,127,127, 67, 86, 86,214,162,198,166,215,223,223,127,226,228,201,147,231, 77,152, 48,193,170,160,160,192,167,119,239,222,
+191,169, 84,170,206,207,114, 14, 66, 67, 67,133,217,217,217,211, 92, 93, 93, 63,106,215,174,157,226,206,157, 59,217,105,105,105,
+171,229,114,249,138,184,184,184,122, 13,123,171, 86,173,148, 2,129, 96, 44,128,209,149, 5,232,239, 0,126,190,113,227,198,195,
+255, 5,131, 69,211,180,219,137, 69,115, 65, 80, 20,164,157,123,130,101, 89,228, 47,159, 7, 83, 97, 62, 92, 22,173,134,201,100,
+ 66,207,158, 61,221, 94,210,200,213,181,127, 91,154,107, 52, 88, 98, 43,153,136, 49,209, 65,121,170, 27,111,182,143, 90,109, 15,
+ 0,215,142, 78,121,211,217,163,197,109,177, 64,150, 44,177,147,238,125, 99, 96,207,144,161, 3,186, 16,158, 10, 55,100,168,114,
+221,183,252,126, 44,234,208,177,211,123, 81, 49, 47, 69,189,148,150,150, 46,246,241,241,113, 61,121,242,100,170, 88, 44,182,146,
+ 74,165,196,176, 97,195,172, 70,142, 28,217,252,212,169, 83,126, 71,143, 30, 29,250,218,107,175, 29, 21,137, 68,127,253,241,199,
+ 31,245,174, 79,230,214,242,245,230,100,153,228,143, 65,175,247,125,165,127, 47, 55,177,143,220, 21, 44, 43, 69, 82, 10,237, 29,
+125, 62, 46,234,240,209,227,159, 51,193,175, 15,203, 75,220,127,203,210,147,211,162,133,157,131, 21,201, 77,181, 18,115, 35,186,
+134,251,251, 14,236, 27, 78, 52,105,218, 4,201,137,201,126,167,207,198,140,149, 80,119, 30,105, 13,196,239, 90,150, 88,153,144,
+ 80, 90, 92,151,150, 88, 64,108,189,153,112, 95,201, 48, 12,190, 89,246,117, 52,203,145, 85,179,171,155, 95,230, 89,200,191,253,
+246, 91,232,245,122,180, 11,105,177, 21,255,153, 55,198, 18,126,187,115,231,142,179, 70,163,193,209,163, 71,103,170, 84,170,153,
+199,142, 29, 83,165,167,167,127,174, 82,169,126,127, 14,181,251,181, 27, 54,108,112,110,223,190, 61, 69,211, 21,243,155, 70, 68,
+ 68, 80,179,102,205,114, 90,178,100,201, 42, 0, 35,234, 40, 92,184,163, 71,143,226,151, 95,126,201, 95,182,108, 89, 6, 0,184,
+184,184,120,188,245,214, 91,174,219,183,111,207, 91,185,114,101, 6,199,113,112,118,118,246, 28, 62,124,184, 43,199, 89,150, 84,
+ 79, 79,207, 38, 45, 91,135, 76,249,121,235,214, 14, 37,133,133,186, 31, 87,110,136,211, 11, 36, 26,159,224, 64,209,220,121,139,
+236,191,250,114,230, 7, 52, 77,223,206,200,200, 72,177,244, 32,229,114,185,183, 68, 34,217, 59,107,214,172,150,145,145,145, 66,
+ 55, 55, 55,228,228,228, 32, 41, 41,169,229,197,139, 23, 95,223,191,127,255, 52,189, 94,255, 70,118,118,118,189,149, 9,142,227,
+ 2, 14,124,243,181,155,196,217, 5,172,209, 8,199, 86, 33, 85,219,178, 78, 29, 3,107, 52,130, 53, 26,225,213,255,245,170, 72,
+ 94,183,110,221, 26, 53, 37,185,135,135,135, 50, 32, 32,224,215, 25, 51,102,136,244,122, 61,110,220,184,129,203,151, 47,179,185,
+185,185,245, 77,100, 43, 32, 8,226,248,188,121,243, 60, 35, 35, 35,109,243,243,243,193, 48,140,203,254,253,251, 39,134,134,134,
+218,121,122,122,138,183,109,219,102, 94, 33,192,201,207,207,207,105,228,200,145,134, 95,126,249,101, 26,128,101,181, 69,174,138,
+ 31,176,115, 85,148, 95, 84,179,176,119,144, 45, 56, 22,245,105,111, 28,113,240, 35,171, 34, 89, 81,126,126,182, 37,153, 86,211,
+109,236, 90, 58,149,100, 70, 79,143,242,243,219,124,244,225, 67, 75, 22, 77, 39, 61, 60, 60,190,239,215,175,223, 91, 27, 54,108,
+144, 37, 38, 38,202,130,131,131,193,178, 44, 76, 38, 19, 24,134, 49,175,187,137,234, 19, 6,215, 6, 69, 82,158, 23,247, 38,184,
+ 89, 89, 89, 85,221,135,230,119,181, 90,141, 62, 99, 58, 62,151,135, 45,203,178, 98,243,117,109, 50,153,164, 0,132, 0, 44,157,
+192,114,193,165, 75,151,134, 29, 57,114,100,212,162, 69,139, 2, 84, 42,213,100,150,101,231, 38, 38, 38,118, 1,128,224,224, 96,
+ 49,128,211, 10,133, 98,220,135, 31,126, 56, 97,210,164, 73, 24, 51,102,204,220,172,172,172,197,141,189,239,197, 98,241,151, 31,
+126,248,161,149,209,104,132,149,149, 21,104,154,110,250, 44,199, 31, 28, 28, 44, 42, 44, 44,220,179, 96,193,130, 1,131, 6, 13,
+ 50, 47,225, 37, 63,119,238,220,146,207, 62,251, 44, 60, 52, 52,116,112,109, 38, 43, 52, 52, 52, 4,192, 87,190,190,190,125,198,
+140, 25, 67, 69, 68, 68,160,188,188, 28,199,143, 31,159,189,119,239,222,217,161,161,161,151, 0,204,141,139,139, 59,243,178,155,
+ 44,202,198, 22, 73,111,116,131, 95, 98, 1, 0, 32,123,125,197,210,144,118, 95,126,203,135,248,254, 13, 6,171, 62, 52, 26, 77,
+232,204, 41,163, 65,146, 21,181, 68,255, 38,222, 88, 50,107, 60,113,224,208,177,208,122,194,155, 43, 25,134, 9,112,114,114,250,
+188,160,160, 64,186,106,213, 42,105,102,102,102,208,158, 61,123,184,248,248,120,136, 68, 34,216,219,219,163,123,247,238,146,168,
+168,168,166,151, 46, 93,242,222,187,119,239,160,126,253,250,253,124,248,240,225, 63,107,211,117,110, 57, 48,192,197,213,245,236,
+183,139,222,119,106,217,196, 15, 6,163, 17, 25,185,153,224, 32,134,220,205, 26,163, 94,111, 35,138, 8, 19,249,175, 88,119,242,
+ 12, 65,190,246,106,110,194,193,132,250,142, 49, 50, 84,118,173, 91,167, 87,218,190,214, 39,156,244, 15,110, 14,145, 68,246,159,
+ 90, 84,104, 40, 90,133,134, 18,227,199,151, 53,137,143,139,159,115,244,228,213, 89,246, 34, 83,236,133, 56, 77,251,218, 75, 90,
+ 72,204,107,167,189, 49,228, 77, 4, 6, 6, 62,241, 48, 55,255,157,154,154, 10,130, 32,144,159,159, 15,150,131,184, 17,121,131,
+ 43, 87,174,160, 77,155, 54,232,221,187, 55, 70,140, 24,161,216,191,127,255,111,107,215,174,237,146,153,153, 57,254, 89, 46, 22,
+134, 97, 34, 66, 67, 67, 41,154,166, 65, 81, 20, 10, 10, 10,144,146,146, 2, 63, 63, 63,138, 97,152,174,245, 24, 13,132,135,135,
+ 99,217,178,101, 25,231,206,157, 11, 5,128,206,157, 59,199,117,232,208,193,117,229,202,149, 25, 23, 46, 92,104, 11, 0,225,225,
+225,177, 97, 97, 97,174,150,166, 73, 38,147,189,251,201,167,159,185,150, 20, 22,105,141,101,101,180, 13,203,152,236,164, 66,162,
+ 52,175,160,248, 81,186,157,230,221, 9, 83, 4, 95,206,152,250, 46, 0,139,218,236,229,114,185,119, 80, 80,208,181,205,155, 55,
+187, 57, 59, 59,163,184,184, 24, 5, 5, 5,184,118,237, 26, 88,150, 69, 84, 84,148, 36,180,117,235,208, 21, 43, 87, 94, 6,208,
+201, 18,147, 37,113,118,193,158, 46, 21,183,198,176,135, 5, 85, 17,150,163, 35, 6, 86,237, 51, 50,173, 98,113,115,169, 84,218,
+232,101,125, 56,142,235, 20, 17, 17, 33, 2,128,105,211,166,149,170,213,234, 37, 4, 65,252,166, 82,169, 50,235,249,215,105,115,
+230,204,241,104,210,164,137,207,111,191,253,134,242,242,114, 0,112,107,210,164, 9, 2, 2, 2,152,179,103,207, 34, 48, 48, 16,
+182,182,182, 56,123,246, 44,174, 92,185,130,144,144, 16, 91,145, 72,244, 38, 77,211, 53, 26,172, 87,251,117,153, 43, 17, 6,117,
+110, 22,246, 14,108,236, 20,216,188, 99, 39,146,174,255,220, 89,111,188, 59,119, 38,206,190, 77,113,146,119,114, 31, 91,207,240,
+ 13,235,234,236,223, 98, 16, 94,105,123,195, 69,207,156, 75,153,211,171,201, 82,129, 84,183,109,254, 10, 85, 65,109,230, 74, 46,
+151, 47,239,219,183,239,176, 13, 27, 54, 56, 0,192,173, 91,183,144,157,157, 13, 87, 87, 87, 72,165, 82, 8,133, 66, 8, 4,130,
+ 6, 45,149,101,101,101, 5,149, 74, 5,115,197,129, 97, 24,148,149,149, 85, 45, 26, 62,127, 62,200,249,243, 45,139, 54,201,229,
+242,200,208,208,208,237,158,158,158, 94,213,191,215,235,245, 24, 63,126, 60,212,106, 53, 66, 66, 66, 34,220,221,221,245, 4, 65,
+128,101, 89,228,228,228,148,223,186,117,171, 87, 86, 86,214,213, 90,106,239,218,236,236,108, 76,152, 48, 1,143, 31, 63,158,244,
+235,175,191,166, 17, 4, 33, 21,139,197,230,237, 98,133, 66, 17, 24, 24, 24,248,253,251,239,191,143,212,212, 84, 36, 39, 39, 95,
+123,150, 74,149, 68, 34, 81, 51, 12,227,102, 50,153,160,213,106, 17, 21, 21, 37,101, 89, 54, 71, 40, 20,222, 45, 46, 46, 30,149,
+145,145,161,178,180,156, 81, 40, 20,114,181, 90,189, 97,202,148, 41,253,186,116,233,130,187,119,239,226,232,209,163,120,237,181,
+215,208,181,107, 87,204,158, 61,187,255,220,185,115,167, 1,168,173, 50,240,199,158, 61,123,124, 61, 61, 61,171,150, 68,178,179,
+179,195,187,239,190,139,209,163, 71,227,240,225,195,225, 95,127,253,245,158, 46, 93,186,184,157,125,134,150,138,127, 3,146,176,
+112,248, 37, 22,224, 97,176,115, 69,235, 64,165,209, 50,127,134, 71, 40,239,108,254,155, 13,150, 65,171,161, 5, 36,119,215, 85,
+ 17,178,235,218,209, 41, 85, 77,132, 48,113,119, 13,180,134,174, 8,155,115, 40,213,152, 96, 37, 33,145,170, 42,195,237,135,249,
+ 53, 73,221,126,170,240,255,116,245,234,213,248,230,155,111,250,106,181,218,242,148,148, 20, 85,121,121,185,122,212,168, 81,132,
+ 80, 40,196,197,139, 23,241,232,209, 35,180,106,213, 10, 14, 14, 14,136,140,140, 20,245,238,221,219,107,220,184,113,111, 3,248,
+179, 38, 77, 12, 29, 74,137,210,136,131,203, 23, 13,119, 34,168,100, 36, 63, 46, 70, 83,207,246,112,182,247, 66,102, 94, 57, 98,
+239, 28, 70,242,131,191,208,212,211, 27,227,223,106,234,240,221, 15,121,135, 16, 58,190, 41,226,158,232,231,245,183, 33,161, 82,
+ 17,211,110,254,234,120, 48,234, 7,224,140,143,193,209,217,127, 47,220, 29,188, 16,212,198, 29, 50,177, 43,121, 43,241,187,118,
+117, 29,187,222,196,125,177,120,225,130, 45,173, 67,218,162,164,164, 4,107,214,172,169, 50, 86, 28,199, 85,213,184, 59,118,236,
+ 8,163,209,136, 45, 91,182,192,200, 86,132,255,235, 74,231, 83,140,236,208,161,195, 78,142,227,196, 86, 86, 86,217,109,218,180,
+241,153, 60,121,178, 96,248,240,225,208,106,181,239,111,222,188,249, 88,118,118,246,190, 6,106, 86, 52,163,188,242, 74,100,215,
+174, 93,173, 40,138, 2, 77,211, 40, 41, 41, 65, 70, 70, 6, 82, 82, 82,224,226,226, 2,252,167, 47, 76,173,154, 79,175,133,200,
+113, 28,103, 62,254,234, 70,204,124, 94, 44, 73, 39, 65, 16, 65,142, 14,142,214, 63,174,216,112,221, 85, 66, 17, 46, 94, 74, 66,
+100,231, 32, 32,109,108, 37, 28, 69,105,125,188,148,182, 4, 65, 4,213,114, 88, 79,107, 18, 18,137,100,239,214,173, 91,221,132,
+ 66, 33, 24,134,129,171,171, 43, 82, 82, 82, 80, 92, 92,140,178,178, 50,164,220, 77,132,175,167, 39, 62, 30,255,158, 98,193,183,
+ 43,247, 2, 8,123,170, 16,251,251, 98,220, 70,227,211,105,174, 45, 4, 14, 11,211, 89, 91,132,228, 81, 86, 86, 22,100, 50, 25,
+130,131,131,109, 98, 98, 98,206,103,101,101,101,214,167, 41,149, 74,223,140,136,136,176,221,177, 99, 7,218,182,109, 11,123,123,
+123,156, 62,125, 26,183,110,221, 2, 77,211,100, 89, 89, 25,108,108,108,176,116,233, 82,120,123,123,163,164,164, 4,105,105,105,
+206, 66,161,208,197,108, 72,158,214, 60,119,248,236,194,162,135,167,231,102, 83,199,162, 54,239,216,137,247, 71, 14,135,220,244,
+240,188, 99, 83,114, 97,223,254,225, 95, 82, 66,175, 1,214,182, 45, 29, 3, 90, 14,130, 72,108,131,201, 95,124,133,228,219, 7,
+ 29, 53,101,183, 38, 49,198,116,175,249, 43,118,127, 92,195,177, 19, 0, 72,165, 82,249,222,198,141, 27,109,171, 28, 23, 73, 66,
+ 40, 20, 62, 97,172,204,139,177,215,114, 78,111,215, 80,121, 0, 77,211,160,105, 26, 44,203, 34, 47, 47, 15,101,101,101,112,116,
+116,172,216, 97, 30,128,121, 32, 64,212,106, 88,110, 87, 75,207,168,157, 59,119,122,201,100,178,191,237,148,158,158,142,146,146,
+ 18, 88, 91, 91,195,193,193, 1, 70,163, 17, 38,147, 9,122,189,222,166,107,215,174, 19, 1, 92,173, 73,147,162,168,169, 19, 38,
+ 76,136, 56,116,232,144,223,162, 69,139, 64,211,244,242,188,188, 60,188,255,254,251, 96, 89, 22,145,145,145, 29, 57,142, 75,154,
+ 50,101, 74, 69,184,107,193, 2, 99,121,121,249,135,141,189,150,220,220,220,154,183,110,221,218,241,196,137, 19,136,140,140,132,
+ 94,175,199,196,137, 19,237,222,123,239, 61,187, 75,151, 46,185,174, 90,181,106, 91, 70, 70, 70,207,186, 52, 67, 67, 67,133, 57,
+ 57, 57,211,187,118,237, 58,173,103,207,158,246,249,249,249,144, 72, 36,216,181,107, 23,126,252,241,199, 35, 52, 77,207,217,179,
+103,207,226, 77,155, 54, 69, 13, 26, 52, 8,155, 54,109,154,162, 82,169,190, 65, 69,179,233,211,154, 74, 47, 47, 47,220,188,121,
+ 19,142,142,142,112,113,113, 65, 73, 73, 9,174, 92,185,130,107,215,174, 33, 40, 40, 8, 4, 65, 56, 86,150,105,166,103,185,143,
+ 26,200, 11,215,172, 90, 99,181,218,181, 11, 0, 76,221,110,218,162, 89,241,149, 74,229, 32, 7, 7,135, 73, 28,199, 9,138,138,
+138, 54,202,100,178, 63,234, 88, 38,136, 95,232,217, 66,131,101,206,151,174, 0,206,122, 36,162, 52, 63,204, 49,217,217,189,249,
+ 78,103,143, 22, 21, 39,209,196,221,165, 36,142,201,238,215, 53,165, 0, 64, 27, 57, 92,186, 91,132,155,247,115,112,243, 94, 54,
+108,164,245,215,186,157,157,157, 17, 30, 30,142, 3, 7, 14, 32, 61, 61,221,102,233,210,165, 1, 52, 77,211, 3, 7, 14,204,122,
+229,149, 87,138, 34, 35, 35, 33, 20, 10,113,245,234, 85,148,150,150,130,162, 40,136,197, 98,176, 44, 91,107,164,205,237, 30,243,
+206,152,241,161,126, 46, 14, 36,254,188,120, 12, 29,131, 6, 67, 38, 17, 34,175, 72, 11,146, 32,240,224,209, 9, 48,140, 53,226,
+239, 62, 70,167,150,214,232,220,193,222,179,252,100,225,248,124, 96,157, 37, 39,136,206, 60, 3,241, 43,111, 0,210, 22,224, 12,
+ 15,192, 26, 50,193, 9,221,160,214, 72,145,159,154,134,187, 87,254, 0,103,210,212,171,147,145,161,250,105,203,214,109,145,103,
+ 70,191,243, 14,203,178, 88,182,108,217,153,251,247,239,119,171,190,143,159,159,223,233,217,179,103,119, 45, 42, 42,194,177, 99,
+199,126,174,111,161,210,167, 81,169, 84, 39, 0, 56, 85, 51,180,222,113,113,113, 59,126,253,245,215, 78,111,191,253, 54,118,239,
+222,253,121, 13, 6,171, 78,166, 76,153, 34, 60,112,224, 64, 31, 43, 43,171, 53,115,231,206,181, 49, 24, 12, 80,169, 84,200,206,
+206,174,138,182, 37, 36, 36, 48, 2,129,224, 82, 61,133,127,141,139, 77, 63,109,176,170,125,103,105,205,187,220, 96, 52,234,173,
+189,148,198,129,131,250,180,186,117,237, 70,178,149,147, 19,217,170, 93, 72,243,187,247, 83, 99,137,138, 38, 24,139,154, 97, 60,
+ 61, 61,135,207,155, 55,175,149,157,157, 29, 88,150,133,189,189, 61,242,242,242,170, 12,165,161,172, 20,116,105, 9,110,166,165,
+ 32,178,107,119,244,238,212, 49,248, 47,163,113,120, 70, 70,198,239,117,233, 58,181, 14,173,138, 92,237,246,115,174,250,126, 68,
+106,113,149, 1, 56,220,222, 31, 18, 27,107,180,252,100,102,163,111,230,236,236,236,184, 19, 39, 78, 28,142,138,138,234, 55,126,
+252,120, 50, 59, 59,251,168,201,100,138,200,205,205,189, 83,215,255,217,216,216, 52,205,207,207, 71, 89, 89, 25,236,237,237,177,
+106,213, 42,184,185,185, 65,163,209, 32, 38, 38,134,243,244,244, 36, 78,159, 62, 13, 15, 15, 15, 20, 20, 20,128,166,105,104, 52,
+154,108,131,193, 80,107, 31,201,202,102,192,190,159,246,194,145,164,235, 63,119,246, 64, 74,204,208,207, 59,223,139,191,150,156,
+126,234,228,197,133, 38,157, 52,189, 56, 35,122,122,147,118,241, 46,147, 62, 95,128,181,203,231, 33,233,234,217, 66,119,239,178,
+117, 12,161,255,185,158, 40,173, 46, 49, 49,209, 54, 62, 62, 30, 36, 73,194,206,206, 14,214,214,214, 85, 11,155,155,205,149, 64,
+ 96,121,128,222, 92,193, 49,155,171,188,188, 60, 60, 72, 75,198,158, 83,219, 96, 52, 25, 93,182,118,176,203,246, 19,137,110,150,
+180,200,159, 85,144,128,184,122, 10,192,141, 35, 70,140, 24,238,225,225, 97, 91,253,251, 54,109,218,224,173,183,222,194,209,163,
+ 71,113,253,250,245, 39, 42, 88,121,121,121, 42,134, 97,106, 61,238,244,244,244, 98,150,101,163,222,123,239,189,216,125,251,246,
+217,125,251,237,183, 85, 93, 10,204,205,162,230,247, 29, 59,118, 32, 54, 54,118,110, 78, 78,206,221,198, 92, 71,238,238,238, 65,
+ 3, 6, 12, 56,183,110,221, 58,135,156,156, 28,228,231,231, 67,173, 86, 67, 40, 20,194,100, 50,193,223,223,159, 96, 24,198,183,
+190,230, 64,154,166, 15,158, 58,117,170, 79, 64, 64, 0, 0,192,104, 52,226,226,197,139, 24, 63,126,124,129, 76, 38,123, 51, 45,
+ 45, 77,173, 80, 40,102, 31, 58,116, 40,170, 77,155, 54,104,213,170,149, 60, 55, 55,215, 54, 45,173, 50,156, 91,195,179,130, 97,
+152,170,252,217,178,101, 75,213, 54,157,174, 98,201, 73,131,193, 64,132,133,133,249, 94,191,126,253,165, 29,220,146,246,235,102,
+164,206,250, 8, 62,231,147, 0, 0,177,205, 43,186, 92,249,156, 77,172,216, 97,244,232, 6,233, 41, 20, 10,103,142,227,222,111,
+222,188,249, 39, 81, 81, 81,174, 10,133, 2,206,206,206,184,117,235, 86,196,177, 99,199,214,232,245,250, 31, 24,134,249,193,146,
+104,253,115,224, 9, 47,242, 50, 69,176,136,202,131, 35,136, 97,195, 24,110,247,238,252,204, 96, 49, 45, 22,200,146, 1,192, 64,
+107,104,247,235,154, 82, 98,216, 48,198,181,197, 32,112,224,192,176,149,209, 6,142, 3, 99,225, 56, 16,221,221, 33, 96,139, 15,
+194,205,113, 16, 54,109,218,135,220,220, 92,209,170, 85,171, 94,217,183,111,159,231,168, 81,163, 30,251,251,251,151,116,239,222,
+ 29,219,182,109,131, 92, 46,135,193, 96, 0,203,178,181,186, 55, 91, 39,102,104,135, 86,254, 84,114,218, 45,132, 5, 12,129,175,
+ 34, 18, 15, 50, 75, 80, 84,166, 71, 65,137, 22,129,129,159, 35,167, 80,131, 82,181, 14,183,146,126,131,167,162, 9, 73, 9, 31,
+ 68,193, 66,131,165,127,176, 29,250,148,157, 16, 41,186, 65,220,100, 56,132, 46,157,144,158,116, 6, 55, 78,172, 68,198,189, 11,
+224, 88, 6,238, 94, 65,150, 54,225,204, 95,189,122,245,168, 37, 75,150, 8, 62,250,232,163,174, 75,151, 46,237,154,149,149,117,
+ 6, 0,148, 74,101,215,119,222,121,167,171,173,173, 45, 22, 47, 94,108,228, 56,110,254,179,102,110,118,118,246, 99,165, 82, 57,
+233,196,137, 19,241,227,198,141, 67, 80, 80, 80,104,114,114, 50, 9, 11, 58,214,250,251,251,143, 23,139,197, 99, 77, 38, 83,192,
+200,145, 35,201,247,223,127,223,198,205,205, 13,169,169,169,208,235,245, 32, 73, 18, 34,145, 8, 9, 9, 9,236,193,131, 7, 75,
+ 68, 34,209, 20, 11, 34, 44,112,113,113,241,136,140,140,140, 5, 0, 39, 39, 39, 79,150,101,225,236,236,236,217,169, 83,167, 88,
+ 0,112,116,116,244,168,201,136,213,106,128,105, 58,230,113, 90, 90, 96, 68,231, 8,197,185,235,119,226,222,120,125, 64, 55, 82,
+ 64,146,143,210, 84, 49,174,206, 78,214, 23, 47, 93, 40,165,105, 58,198, 18, 45,161, 80, 56, 32, 50, 50, 82, 80, 84, 84, 4,165,
+ 82,137,188,188, 60,100,102,102,194,104, 52, 66, 87, 82, 4,186,180, 20,116, 73, 49, 56, 77, 57, 30,198, 92, 69,176,151,135,228,
+120, 69, 39,248,223,235,171,113,214, 20,161, 34, 8,162,234, 59,137,173, 13,172,108,109,171,154, 63, 26,240,112, 28,100,103,103,
+ 55,189,172,172,236,112, 86, 86,214, 34,131,193, 48,121,201,146, 37,237,190,250,234, 43,151,233,211,167,219, 77,159, 62,125,183,
+ 84, 42, 13, 73, 75, 75,211,215,234, 80,203,203, 31, 24,141, 70,103, 0,238, 39, 79,158,132,171,171, 43, 74, 75, 75, 97, 52, 26,
+161,213,106, 13,142,142,142,210,130,130, 2,232,116, 58, 24, 12, 6,216,217,217, 33, 54, 54,182,208,100, 50,253, 89, 95,250, 28,
+154,146, 11,245,198,187,115,157,154, 91,103, 50,156,115,151, 50, 45, 91, 52,127,133,106, 33,128, 21, 81,126,126,155, 13,236,217,
+148,228,219, 7, 28, 83, 98, 78, 23,102,221,211,248,253,120, 56,165,172,158,135, 47, 75, 16, 4,215,172, 89, 51,228,229,229,129,
+162, 40, 88, 91, 91,195,198,198, 6, 65, 65, 65, 72, 79, 79,111,180,193,170,110,174, 78, 92, 62,132,252,114, 21, 54, 47,223, 1,
+ 15,185, 23, 9,192, 53, 51, 59,189,215,184,105,195, 58, 60,182,123,180,228,209,197,226,165,117, 84,116,110,168, 84, 42,187, 39,
+194, 47, 74,101, 55, 71, 71,199, 83, 52, 77, 35, 53, 53, 21,199,143, 31,239,154,153,153,217,160, 2, 36, 51, 51,243, 33,199,113,
+ 81,175,191,254,250,182, 86,173, 90, 53,229, 56, 14, 65, 65, 65, 24, 52,104, 16,246,236,217,131, 59,119,238,160,180,180,148, 61,
+127,254,252, 86,149, 74,213,168, 14, 57,114,185,188, 89,191,126,253, 46,172, 93,187,214, 49, 63, 63, 31, 58,157, 14,229,229,229,
+248,227,143, 63, 16, 17, 17, 1,169, 84,138,213,171, 87,151,154, 76,166,181,117,153, 43,142,227, 14,236,219,183,175,143,159,159,
+ 31,238,222,189,139,243,231,207,195,213,213, 21, 86, 86, 86, 24, 56,112,160,243,206,157, 59, 39, 7, 7, 7,175, 84,171,213, 11,
+251,245,235, 7,134, 97,112,253,250,117, 85,229,168,194, 90,243,168,214,114, 69,167, 3,199,113, 48, 26,141,171, 72,146,124, 51,
+ 52, 52,180,119, 92, 92,220, 53,188, 36,120,120,120,180, 16, 10,133, 31, 3, 64, 94, 94, 30,138, 89,192,166,176, 98,208,109, 73,
+229,227,178,176,176,176,234, 89,227,239,239,255,151, 86,171,157,149,153,153, 89,107,148, 73,169, 84,182,150,201,100,159,116,235,
+214,109, 84,255,254,253, 41,154,166,113,232,208, 33,172, 93,187, 22, 81, 81, 81,240,247,247,199,231,159,127,110,175,215,235,103,
+ 28, 61,122,116,250,185,115,231,142,150,149,149,205,172, 75,243, 57, 81,229, 69, 94, 38,131,197, 85,186,198,138, 35,172,152,138,
+161,168,178, 70,227,226,228,228,180,150, 97,152,110,129,129,129, 48,113, 57, 72,125,112, 15,101, 69, 44,140, 6, 61, 88,150, 3,
+199, 90,118, 46,216,226,131,176,123,149, 67,233, 57, 2, 52, 77,195,205,205, 13, 75,151, 46, 69, 73, 73,137, 96,220,184,113,190,
+ 11, 22, 44,184,161,211,233,160, 86,171,161,213,106,161,213,106,235, 52, 88, 34,169,190,149,143,123, 0,202,180,237, 33, 19,139,
+ 81, 80,170, 71, 81,153, 30,249,197, 58,236, 61, 48, 18,122,173, 6, 38,131, 1, 12,109,130,141,251, 96,248, 59,117, 3,112,223,
+162, 9,210,170,130, 40,172, 9,116,102, 52,232,204,104,200,218,204,198,129,213,111, 63,177,159,201,100, 89,147,127,118,118,246,
+227,253,251,247,175, 31, 59,118,236,148,215, 95,127, 29, 63,252,240,195, 55, 89, 89, 89, 97,149, 81,132,111, 6, 15, 30,140,132,
+132, 4,156, 59,119,110,195,243,170, 45,112, 28,231,236,228,228, 4,146, 36,161,209,104,244,245,153,171, 63,254,248,131, 88,176,
+ 96,193,209,129, 3, 7,118,154, 60,121,178, 76, 46,151,131,227, 56, 24, 12, 6,100,100,100,128, 36, 73, 20, 23, 23, 99,203,150,
+ 45,234,235,215,175,115, 98,177,248,146, 80, 40,252, 32, 33, 33, 33,171,190,190, 67,142,142,142, 24, 57,114,164,107,251,246,237,
+ 93,171,143, 24,124,243,205, 55, 93,195,194,194,170,190,243,244,244,180,248,248,116, 58,221,150,197, 11,231,118,251,117,251,174,
+160,102, 65,254,142,135,143,159,142,115,118,182,179,242,245,245,147,148, 20, 23,235,215,174, 90, 46, 80,171,213, 63, 89, 40, 23,
+236,226,226,130,236,236,108,220,191,127, 31,122,189,190,162, 9, 71, 83, 14, 67,113, 49,232,146, 34, 64,167,133,152, 97,160,207,
+207,129,175,159, 47,240,159, 17,134,117, 63, 49,170,153,169,167,155, 4, 9,130,128,149,189, 29,196,214,214,160,132, 2,139,251,
+ 96,201,229,242,182, 33, 33, 33,187, 54,109,218, 36,154, 58,117,106,135,171, 87,175,174, 77, 75, 75, 75, 19, 8, 4, 61,150, 47,
+ 95,126,109,209,162, 69,146, 81,163, 70, 53,219,184,113,227, 24, 0, 27,235, 56,135,187, 14, 31, 62,252,150,183,183,183,251,237,
+219,183,161,211,233,192,178, 44,250,246,237, 11, 0, 82,243,126, 73, 73, 73, 90,173, 86,155,147,144,144, 80,150,150,150, 70,195,
+130, 81,127, 95,174,203,186,242,105,222,185, 55, 20, 10,229,101,177,196,167, 9,169,137, 29,252,233, 80,143,111,191,251, 35, 83,
+119,244,225,195,178, 57,189,154, 44,213,148,221,158,228,232,169, 94,183,254, 80,138, 37, 29,220,171, 70, 11,186,184,184, 84, 53,
+ 9,138, 68, 34,115,244, 5, 37, 37, 37,245, 53, 17,214, 88,120,151,148,148,160,164,164, 4,247, 30,221, 69, 94,153, 10,209,191,
+ 95, 6,195, 48, 85,209, 17,165,187, 39, 78,252,126,205,182,235,208,118,179, 74, 91, 21,159, 46,188,133, 24, 75,175, 83,146, 36,
+ 63, 25, 50,100, 8,104,154,198,160, 65,131,176, 99,199,142, 79, 26, 83, 67,207,202,202,186,146,149,149, 21,112,255,254,125, 59,
+163,209,248,218,192,129, 3,127,238,215,175, 31, 46, 95,190,140,147, 39, 79,118, 53, 24, 12,201, 12,195,104, 21, 10,197, 18,142,
+227,220, 8,130, 88,162, 82,169,234, 28,237, 28, 16, 16, 48,202,214,214,118,177,149,149, 85, 89,211,166, 77,149,230,200,149, 90,
+173,134,201,100, 66, 70, 70, 6,142, 28, 57,162, 58,124,248,176,138,227, 56, 89,121,121,249,188,244,244,244, 63,106,107, 22, 44,
+ 47, 47,223,127,240,224,193, 40, 63, 63, 63,156, 61,123, 22,203,150, 45, 67,211,166, 77,177,117,235, 86,132,135,135,195,215,215,
+ 23, 78, 78, 78, 31,151,150,150,118, 90,182,108, 89,191,208,208, 80,236,219,183, 15,185,185,185,107,234,122, 62,213,245,156,213,
+106,181,224, 56, 14,221,187,119, 31, 63,117,234, 84, 12, 28, 56,240,120,219,182,109,219,199,198,198,222,251,183, 23,210, 10,133,
+ 98,105,247,238,221,167,183,110,221, 26,219,183,111,135, 62, 44, 18,214, 91,255,196,237, 1, 17,224, 0, 40,183, 30,168,104,175,
+123,173, 98, 64,135,111,143,161,152, 62,125,122,191,193,131, 7,123, 3,104, 81,139,230,183,163, 70,141,154,246,246,219,111, 35,
+ 46, 46, 14, 27, 55,110,196,141, 27, 55,170,202, 60,163,209,136,196,196, 68, 36, 38, 38, 66,161, 80, 96,192,128, 1,196, 7, 31,
+124,208,183,111,223,190,174,168,232, 22,241,255, 29,197,234,250, 50, 53, 17,214,234, 26,221,221,221, 93, 28, 29, 29, 19,214,174,
+ 93,235,220,161, 67, 7,202,100, 50,225,228,169, 83,248,236,163,113,136, 26, 48, 9, 58,189, 24, 38, 29, 1, 70,100, 99,217, 47,
+218, 13, 64,233, 57, 2,172, 77, 63, 24, 12, 6,140,223, 33,130, 3,145,131, 85,239,184, 3, 0,161,213,106,161,215,235,161,213,
+106,161, 86,171,161, 86,171,193, 48, 76,173, 79,201,178, 98,107,154, 54,178,200,204, 77, 67,134,234, 54,236,109,188,193,145, 94,
+200, 41,212,128,128, 27,140,186, 36,176,149, 55,166, 94,155, 1,181,254,217, 76, 49, 83,150, 82, 67,100,198,242, 62,149, 12,195,
+ 44, 94,190,124,249,248,181,107,215, 74, 38, 77,154,212,118,209,162, 69,175, 1,192,251,239,191,223, 86, 42,149, 98,221,186,117,
+122,134, 97, 22, 63,167,252,165, 72,146,252,228,213, 87, 95, 69,105,105, 41, 18, 18, 18, 14,213,247, 15,179,103,207,158, 56,100,
+200,144, 78, 11, 22, 44,144,233,116, 58,104, 52, 21,205,159, 37, 37, 37, 80,171,213,200,201,201,193,180,105,211,138,104,154,158,
+240,232,209,163, 61, 13, 48,122, 56,120,240, 32,126,253,245,215, 39, 70, 12,190,249,230,155,174, 59,118,236,200, 93,189,122,117,
+ 38,199,113,156,147,147,147,231,208,161, 67,221, 44,109, 33, 84,169, 84, 90, 0, 83, 22, 45, 94,244,219,183,203,151,187, 21, 22,
+ 20, 37,139,196, 86, 58,153,149,196,105,250,103, 11,185,156,156,156,105,185,185,185, 26, 75,211, 89, 84, 84,132,148,148, 20, 88,
+ 89, 89, 65, 36, 18,129,209,148,131, 85,171,161, 47, 42, 0,105,208, 67,194, 48,112,146, 73,224,229,238, 14,111, 55,203,250,226,
+171, 78, 31,199,145,225, 3,158,104, 22, 36, 8, 2, 71,195,155, 65,108, 99, 13,169,141, 13, 34,247,159,175,168, 48,136, 68,192,
+170, 77,150, 52,227,184, 40, 20,138,131,107,214,172, 17,229,231,231, 35, 33, 33, 33, 62, 45, 45,173,196,209,209,209,214,104, 52,
+178,247,238,221, 59,145,148,148, 52,192,215,215, 23, 28,199,213, 55,250,107,197,222,189,123,123, 69, 68, 68,152,124,125,125,173,
+243,242,242,188,139,138,138, 8,149,234,201, 62,204, 49, 49, 49,210,199,143, 31,107, 88,150,221, 87,105,174,234,189,240, 63, 29,
+234, 33,189, 20,135, 41, 93, 92,124, 91,219,187,182, 70,190,241, 70,235, 43,241,217, 83, 62, 29,234,177,250,187, 63, 50,117, 12,
+161,255,153, 49,166,123, 9,164,186,109, 13,105, 66,224, 56, 14, 49, 49, 49, 56,127,254, 60,206,159, 63,143,212,212,212,170, 29,
+236,237,237, 17, 29, 29,141,110,221,186, 89,124,163,104, 52, 26, 40, 20, 10, 56, 56, 56, 96,223,153, 95,240,227,183, 59,170, 58,
+186,155,201,207,207,135, 76, 38,195,226,207, 86,218,140,251, 98,232,194, 66,228,247,182, 68,219,211,211,179, 73, 68, 68, 68,127,
+119,119,119, 20, 21, 21,193,213,213, 21,237,218,181, 27, 72,211,180,111,110,110,110,163,154,178, 12, 6,195,196,110,221,186, 45,
+154, 54,109, 26,140, 70, 35,134, 15, 31,142,148,148,148, 93, 15, 31, 62, 92,229,227,227, 51,101,210,164, 73,238, 46, 46, 46,152,
+ 56,113,162, 53,128, 55,106,211,105,214,172,217,167, 95,124,241,197,215,163, 71,143,150, 24,141, 70,156, 60,121,178, 42, 74,109,
+ 50,153,144,150,150,134,121,243,230,169, 74, 75, 75,187,100,102,102, 62,176,160, 18, 57,109,255,254,253,125, 3, 3, 3,113,244,
+232, 81, 76,152, 48,225, 47, 27, 27,155, 22,253,251,247,247,182,182,182, 70,124,124, 60,104,154,134, 66,161,112,159, 49, 99,198,
+128, 62,125,250,224,196,137, 19, 88,184,112,225, 33,185, 92,190,226,233,107,238,105, 19, 44, 16, 8, 96,124,170, 79, 35, 69, 81,
+184,113,227, 6,186,119,239,142,233,211,167, 3, 0, 78,156, 56, 97,215,187,119,239,219, 93,186,116,177, 59,123,246,172,254,223,
+ 92, 72, 91, 91, 91,143,221,186,117, 43,238,223,191,143, 11, 23, 46,160,160,160, 0, 6,131, 1, 37,108,197,205, 32,169,140, 92,
+113, 30, 62, 8,159, 54, 11, 35, 6,188, 1,149, 74, 5,146, 36, 93,234,168,240,141,154, 53,107, 22,142, 28, 57,130,165, 75,151,
+162,180,180,180,198,253,172,172,172,208,174, 93, 59,132,132,132, 32, 37, 37, 5, 0, 92, 94,192, 33,191,148, 17,172,218,162, 14,
+171,214,175, 95,239, 28, 17, 17, 65,169,213,106,176, 44,139, 78, 29, 59, 98,204, 59, 99,112,108,223, 31, 80, 52,233, 6, 74,103,
+ 5,147,173,204, 50,131,225,245, 51, 10, 11, 11, 33,145, 72, 32,173,236, 80,122, 51,163, 42,188, 11,157, 78, 87,101,174,204,239,
+117, 97, 50,136, 99, 19, 31, 50, 94,165,229, 55,112, 53,246, 87, 24, 13, 6,248, 6,204,132,222,228, 2,107,183,119,161,165, 15,
+130, 46,174, 24,185, 43,182,235,138,156,156,124, 0,132, 69, 33,206,154, 10,121, 86,251,247,206,238, 44, 99,185,193,202,205,205,
+205, 59,127,254,252,138, 27, 55,110,204,238,219,183, 47,126,252,241,199,165, 28,199,161, 95,191,126,136,137,137, 65,124,124,252,
+138,220,220,220,188,231,145,183,114,185,124,203,186,117,235,250,185,187,187, 99,239,222,189,224, 56,174, 94, 67, 36, 22,139,223,
+159, 50,101,138,204, 28,197, 16,139,197,208,106,181,200,206,206, 6, 77,211,216,183,111,159,222, 96, 48, 76, 77, 77, 77,221,211,
+144,196,112, 28,199,181,111,223, 30, 43, 87,174,204,184,120,241, 98, 91, 0,232,212,169, 83,108, 88, 88,152,235,234,213,171, 51,
+175, 94,189,218, 22, 0,218,183,111,127, 61, 36, 36,164, 65,243,184,168, 84,170,140, 27,215,175, 60,208,234,116, 66, 71,103, 39,
+141,173,181,152, 43, 45, 43, 35,111,222,140, 83,229,230,230,166, 54, 64, 42, 49, 33, 33,161,101,102,102, 38,210,210,210,192,104,
+202, 65,234,245, 32,244, 90,244,232,212, 17, 86,224, 32, 1, 11, 17,107,132,144, 18,160,172,172, 28, 0, 18,235,141,218, 86, 43,
+ 16,204,230,138, 32, 8, 72,109,108, 32,182,181,129,196,198,230,137,136,150, 37,230,210,202,202,234,183,141, 27, 55, 42, 20, 10,
+ 5,190,251,238, 59, 40, 20,138, 32,185, 92,174,177,181,181,181,114,113,113, 65, 96, 96, 32,194,194,194,112,250,244,105, 16, 4,
+ 81, 95,193,104,226, 56,174,247,133, 11, 23,166, 93,186,116,105,152, 82,169, 36, 70,143, 30,141,168,168, 40, 72, 36, 18,104,181,
+ 90, 20, 21, 21,225,175,191,254, 34, 88,150, 13,173, 52,120, 62, 18,137,100, 7, 65, 16, 25,169,169,169,111, 62, 45,184, 97, 81,
+ 43,101,153,150, 29, 71,170,173,222,232,210,199,183, 85,247, 62, 61,209, 36,160, 7,186,247, 73, 7,128,165, 46,194, 71,195,151,
+205,114,216,231,104, 71,108,189,180,255,196,151,145,125,187,205,153, 79,159, 89, 56,127, 77, 81,189, 81, 44,130, 32,170, 10, 91,
+146, 36,107,140, 82, 81, 20, 5,146, 36, 45,123, 38,177, 76, 70,212, 59,157,170, 62, 27, 77,180,139,135,220,139, 52, 71,174, 0,
+160,180,180, 20,143, 31, 63,134,209,104,132,179,179, 51,140, 70,186,117, 3, 42, 85, 83,134, 15, 31, 78,232,116, 58, 76,155, 54,
+ 13,203,151, 47,199,160, 65,131,136,171, 87,175, 78, 1,240, 73, 67,111,108,165, 82,185,124,226,196,137,211,198,142, 29,139,226,
+226, 98,156, 58,117, 10,221,186,117,195,250,245,235, 93, 79,157, 58,245,117,120,120, 56, 40,138, 66,116,116, 52,104,154, 78,170,
+231,126,255,104,244,232,209,146,244,244,116,136, 68, 34,132,133,133, 33, 35, 35, 3,106,181, 26,185,185,185,248,234,171,175,178,
+ 75, 74, 74,186,102,101,101, 61,176, 32,105,164,159,159,223,199,254,254,254, 56,121,242, 36, 38, 78,156,120,196,218,218,250,141,
+162,162,162, 15,244,122,253,234, 1, 3, 6, 32, 60, 60, 28, 73, 73, 73, 24, 56,112, 32,218,181,107,135, 83,167, 78, 97,250,244,
+233,127,201,100,178, 33,245,204,131,117,239,204,153, 51, 45,195,194,194,160, 86,171, 81, 86, 86, 6,161, 80, 8, 7, 7, 7, 36,
+ 38, 38, 34, 32, 32, 0,211,167, 79,199,202,149, 43, 49,117,234, 84,182,119,239,222, 38,154,166, 69,230, 81,150,255,102,212,106,
+ 53,167, 82,169, 96,103,103,135,221,187,119,227,214,137,255, 99,239,187,195,163,168,254,175,207,204,236,206,150,236,166,144,190,
+ 73,168,161, 38, 1, 66, 66,232, 18, 66, 17, 69, 4, 81,145, 34, 69, 4, 20, 41, 74, 83,154, 18,106, 16,164,131, 52,165, 41, 32,
+ 4, 16,233, 69, 8, 29, 66, 42,164, 16, 90, 72,217,221, 52, 82, 73,182,206,206,188,127, 36, 27,147,144,178, 65,120,191,234,111,
+206,243,236,179, 59,101,207,220, 50,229,204,185,247,126,238, 89,156,154,250, 41, 36, 11, 86,129,227, 56,164, 47,157,131,222, 95,
+ 47, 64,151,152,199, 80,171,213,216,179,103, 15, 72,146, 68,149, 1, 40, 47, 60,219, 10, 10, 10,208,161, 67, 7,220,185,115, 7,
+123,246,236,193,218,181,107,203,221, 90,161, 80,136, 94,189,122,161, 95,191,126,120,240,224, 1,182,109,219, 6, 27, 27, 27,240,
+120, 57,129, 69, 84,249,174,224,206,176,189, 3, 2, 2,168,231,207,159, 67,171,213, 34, 51, 51, 19,201,201,201,144, 74,165, 80,
+102,165,162, 83,243,231,200, 32,244,136,139, 78, 50, 17,148, 48,186, 46, 27,222, 96, 48, 64,175,215, 35, 54, 54,182,116,232,123,
+203,144,242,206,207,101,125, 62,160,213,106, 17, 22, 22,198, 73,165, 82,200,100, 50,162,182,182,119,150,209,157,190,116, 61,102,
+192,168, 33,189, 69,231,195,126,130, 81,199,224,185,206, 14,197, 90, 61,138, 52, 66,232,197,253, 65, 16, 87, 65, 82, 98,116,235,
+208, 28, 23,175, 61,208,154,140,134, 51,150,169, 2, 19, 40,251,246, 48,229,198, 86, 16, 88,149,223,176,104,177, 28, 38,166,126,
+163,130, 37, 18,201,170,213,171, 87, 79,253,249,231,159,173, 63,251,236,179, 86,230,135,197,230,205,155,139, 36, 18,201,170,191,
+ 91,167, 10,133, 98, 84,211,166, 77, 23, 47, 92,184,208,189, 67,135, 14,136,140,140, 68, 72, 72,200,201,140,140,140, 99, 22,188,
+ 25,123, 56, 56, 56,224,249,243,231, 16,137, 68, 48,153, 76,200,202,202, 66,106,106, 42,196, 98, 49,194,195,195,245,141, 27, 55,
+ 62,242, 50, 9,179,164, 67,123,197, 17,149,245,129,148,102,253, 23,124, 61,177,133, 86,171,241, 46, 42, 42, 98, 4, 2,129, 64,
+ 44, 52, 61,169, 15,135, 7,243, 62,169, 0, 0, 32, 0, 73, 68, 65, 84,209,104, 60,113,245,234,213,247,122,244,232, 33, 78,138,
+141,134,161,160, 0,198,194,124,208, 38, 6,246,254, 29, 64,234,181, 32,244, 70,184,123,113,208,228,203,112, 61,234,177,209,104,
+ 52,214,233, 10,154, 5, 22, 73, 81,149,251, 93,217, 88, 67, 36, 47, 21, 88, 21,215, 19,117,180,107, 57, 59, 59, 91,245,236,217,
+179,143,159,159, 31, 56,142,195,170, 85,171,160,215,235, 69, 70,163, 17, 70,163, 17, 6,131, 1, 69, 69, 69, 56,124,248, 48,246,
+238,221,123,221,214,214,118,151, 74,165,170, 43,153,140,187,187,251, 20,150,101,157, 25,134, 49, 56, 57, 57,209, 7, 15, 30,132,
+ 68, 34, 1, 73,146,232,208,161, 3, 36, 18,137, 78,161, 80, 24, 0,192,201,201,201,184,122,245,106,193,248,241,227,233,234,200,
+124, 59,181,154,101,226, 28, 2, 69,226,198, 77,109,157,218,163, 89,203, 62, 0,128,126, 3,199,161, 89,139,134, 40,200,142,109,
+166,215,165, 12,161,136,103, 13,126,185,169, 76,120,195,170,237, 39,207,210,195,146, 0,252,108,233,185,212,167, 79, 31,188,249,
+230,155,229,205,129,206,206,206,208,235,245, 96, 24,198, 98,113, 5, 0,230, 32,162,193,193, 32,177, 16,216,213,217, 58, 3, 64,
+185, 61, 89, 80, 80,128,180,180, 52,164,164,164,148,223,167, 88,206,178,183,107,133, 66, 33,109,214,172,217, 88, 31, 31, 31, 92,
+188,120, 17,177,177,177,202,203,151, 47,187,119,234,212, 9, 30, 30, 30,159,112, 28, 55,175,204,133,181, 8,142,142,142,178,206,
+157, 59, 79,253,228,147, 79,112,255,254,125,124,243,205, 55,207, 50, 50, 50,142,158, 56,113, 98,252,244,233,211,201,192,192, 64,
+100,101,101, 97,235,214,173,166,240,240,240, 31, 26, 52,104,176, 56, 35, 35,163,182,114,124,162, 82,169,154,104,181, 90, 60,123,
+246, 12,230,144, 12,103,206,156,193,217,179,103, 51,243,243,243,123,169,213,234,135,150,164,173,113,227,198,214,254,254,254, 46,
+ 73, 73, 73, 56,112,224, 0, 12, 6,195,130,148,148, 20,131,141,141,205,175,155, 55,111, 94,232,233,233,105,223,179,103, 79,116,
+235,214, 13, 28,199,225,248,241,227, 8, 14, 14, 62, 41,149, 74,223, 79, 72, 72, 48,212, 65, 63,100,201,146, 37, 75, 28, 29, 29,
+ 63, 26, 57,114, 36,233,239,239,143,136,136, 8,152, 76, 38,244,233,211,167, 92, 92,157, 57,115,102,223,153, 51,103, 62, 4, 64,
+203,229,114,201,191,221,189, 50, 67,171,213, 34, 41, 41, 9, 46, 46, 46,104,209,169, 43,190,185,151,140,171, 55,110,130,227, 56,
+244,136, 75,198,243,231,197,216,181,107, 23, 34, 35, 35, 65, 81, 20, 60, 61, 61,235,228, 52, 24, 12,120,248,240, 33,178,179,179,
+ 49,120,240, 96,124,252,241,199, 88,185,114, 37, 12, 6, 3,230,207,159,143,220,220, 92,108,223,190, 29, 15, 31, 62,132, 64, 32,
+128, 92, 46,255,255,145,213, 26,181,200,127,210,193, 2, 74,219,190, 89,150,133, 74,165,194,157, 59,119,144,156,156, 12,153, 76,
+ 6, 13,195,178, 27,111,197,176, 36, 33, 84,154, 56, 92,227, 24,124, 93,151, 18, 55, 26,141,132, 64, 32,192,141, 27, 55,240,232,
+209, 35,216,180,224,202,221, 43,163,209, 8,157, 78,135,146,146, 18, 8,133,194,231, 55,111,222,124, 26, 17, 17,209, 76, 32, 16,
+212, 56, 10, 44,171, 37,181,251,252,133, 63,103,249,119,240,110,213, 55, 48, 24, 39, 78,124,135,252,194, 66, 20,235, 4,120,174,
+ 49,160, 88,203,193,205,186, 57, 58,183,247, 67,246, 51, 61, 30,196, 69,166,231,208,246,117,182,193, 24, 77,100,193,190, 77,159,
+217, 14,250,240, 11, 72, 92,123, 66,159,124, 16,172, 38,179, 92, 96,209, 18,107,216, 56, 54, 66,225,115, 13,174, 39, 60,129,209,
+ 68, 22, 88, 90,232,201,201,201,133, 58,157,110,217,245,235,215,191, 55,143,252,185,114,229, 10, 30, 63,126,188, 76,173, 86, 23,
+214,167, 2, 21, 10, 69, 95, 0,251, 1, 72,156,157,157, 51, 3, 2, 2, 20,111,190,249,166, 36, 48, 48, 16, 20, 69, 33, 42, 42,
+ 10,159,125,246,217, 57,185, 92,254, 62, 44,136,137, 35, 18,137, 50, 11, 10, 10,108,197, 98, 49,140, 70, 35, 50, 50, 50,112,255,
+254,125,104, 52, 26,100,102,102,130, 32, 8, 85, 88, 88,152,166,190, 39,154,121,132, 86,213,135,100,117,226,185,158,163, 8,225,
+238,238, 30, 24,208,185, 83,219, 31,214,108,128,166,228, 57,194,111,158, 64, 94,110, 14,182,237, 56,210,206,221,221, 61,208,210,
+206,196,233,233,233,191, 29, 57,114,100,166,175,143,143,159,103,195,134,184,155,146, 12,154, 53, 65,100, 50,129,210,107, 65,154,
+116,240,104,203,129, 36,229,200,204, 40,194,150,115, 23,239,149, 69,117,175, 61,125,111, 15,194,136,148, 2, 16, 4,129,115,111,
+120, 67, 34,151,131,150,203,208,237,112, 88,185,168,122,186, 98, 54,104,153, 28, 13, 2,234, 14,140,153,149,149, 85,114,253,250,
+245,136,196,196,196,128,214,173, 91, 99,209,162, 69, 72, 75, 75, 3,199,113,200,202,202,210,102,103,103, 43,159, 61,123,246,148,
+ 32,136,163, 42,149,106, 7, 44,140, 22,206,178,172,243,241,227,199, 1,128, 6,128, 63,255,252, 19,110,110,110,176,181,181, 69,
+ 97, 97, 33, 70,143, 30, 45,254,246,219,111, 1, 0, 81, 81, 81, 66,137, 68, 82, 35, 87, 92,244,253,213,121,133, 92, 30, 89, 28,
+249,126, 14, 19,221,174,119,255,116,244, 27,248, 9,206,159,216,133,139,103, 47,192, 81,152,252,196, 36,125,126, 58,251, 73, 78,
+145,186,184,229, 86,239,142,227, 41,213,243,179,219,190, 24,148, 36,240, 80,176,135,230,110,169, 61,112, 47,199,113,160, 40,234,
+133, 14,237,245, 21, 87, 21, 17, 28, 12, 22, 11, 65, 52, 19, 10,162,149, 25,105,253,221, 92, 60,202, 95, 46, 82, 83, 83,145,150,
+150,134, 22, 45, 90, 32, 57,229, 49, 68, 34, 58,218,194,243,126,228,192,129, 3,173,245,122, 61,126,255,253,119,134, 32,136,129,
+199,143, 31,143,240,245,245, 21, 4, 5, 5, 89,239,218,181,107, 36,128, 29,245,105, 49,146,203,229,180,209,104,196,238,221,187,
+161, 84, 42, 3, 51, 51, 51, 19, 56,142,219,250,249,231,159,255,232,229,229,213, 34, 33, 33,225,129, 70,163,249, 66,173, 86,199,
+214,214,228, 6, 0,249,249,249, 99,222,122,235,173, 67, 44,203, 54,238,222,189,187,108,196,136, 17, 54, 28,199,193,203,203, 11,
+167, 78,157, 82,169,213,106,139,251, 48,165,164,164, 20, 93,189,122, 53,211,219,219,219, 69,161, 80,128,166,233, 21,174,174,174,
+ 75, 41,138,250,225,221,119,223,181, 63,120,240, 32, 66, 67, 67, 33,147,201,240,228,201, 19, 85, 98, 98,226, 58, 87, 87,215,245,
+150, 68,112,143,138,138,122, 2, 96, 68, 64, 64, 64,240,218,181,107, 23,144, 36, 57,234,220,185,115,229,177,206,204,226,170,105,
+211,166, 99, 66, 67, 67, 63,254,143, 25, 33, 70,189, 94, 15, 7, 7, 7,100,103,103, 35, 43, 43, 11,141, 26, 53, 66,215,174, 93,
+ 97, 52, 26,113,236,196, 73, 92,189,122, 21, 28,199,193,209,209, 17, 54, 54, 54,136,137,137, 1,128,218, 70, 15, 27, 13, 6, 3,
+236,237,237,145,159,159,143,152,152, 24, 56, 59, 59, 99,198,140, 25,208,235,245, 56,120,240, 32,162,163,163, 65,146, 36,156,156,
+156, 96,109,109,141,232,232,232,186, 56,121,212, 87, 96, 81, 20,117,233,210,165, 75, 31,182,111,223, 94,240,224,193, 3, 60,120,
+ 80,122,189,105, 52, 26, 70, 64, 33, 52,235,238,177, 17,181,252,189, 45, 42,196,202, 16,137, 68, 91, 62,252,240,195, 47,198,141,
+ 27,135,201,147, 39,131, 36, 73,252, 28,165, 67,106, 42, 11,131,193,128,204,204, 76,220,189,123,151, 11, 8, 8, 32, 88,150, 53,
+244,234,213,107, 66,100,100,100, 39,138,162, 10,107,226, 68,104,168,137,105,251,238,224,205, 91,118,220, 24, 59,118,172,253,160,
+193,155, 17, 21, 31,135,252,226,210, 86, 38, 55, 71, 25, 58,183,158,141,172,103, 58,156, 61,125, 34,143,101,180, 31, 32,238, 55,
+ 99,109,233, 4,128,236, 18,141,243,214, 61, 71, 86, 29, 56,124,116,194,196, 49, 35, 36,189,122,141,129,176,232, 46, 76,207, 34,
+225,214,178, 59, 8,202, 10,183, 99,162, 16,251, 48, 77, 91,162,165,118, 20, 26, 52,179,235,226,172,228,165,147,228,198,237, 91,
+ 54, 44, 63,115, 62,140, 50, 24, 12, 24,240, 86, 31, 19, 73,146, 27,235,168,142, 23, 56,173,172,172, 14,196,196,196,216,235,116,
+ 58,164,167,167, 55,107,213,170, 21, 56,142, 67, 74, 74, 10,214,173, 91,199,156, 58,117,106,179, 68, 34,249,166,150, 55,196, 74,
+156, 70,163,113,255,238,221,187,231, 78,153, 50, 69,146,149,149,133,196,196, 68, 20, 23, 23,195, 96, 48, 32, 50, 50, 82,107, 52,
+ 26, 15, 88,112, 94,189,144, 78,179,192,178,183,183,119,239,220,185,179,121, 20,161, 59,203,178,104,208,160,129, 71, 64, 64, 64,
+ 4, 0,216,218,218,214, 52,138,176,198,242, 84, 42,149,151,195,194,174, 98,247,142, 53, 48, 24,116, 80, 43, 75,157,134,156,103,
+ 5,168, 67, 92, 85,229,228,180, 90,237,251,107,215,173,187, 53,105,204, 40,215, 55,122,247, 65, 90,108, 12,244,185,217, 32, 77,
+ 12,132,156, 0, 37, 89, 82,100,102, 62,199,242, 83, 23,178, 52, 90,109,117,162,181,218,116,150, 55, 11,218, 88, 67, 44,151, 67,
+ 84,230, 90,153,183,137,228,214, 16,202,228,160,104,186,186, 38,175, 23, 56, 75, 74, 74, 62,152, 56,113, 98,236,169, 83,167, 26,
+140, 24, 49, 2,131, 6, 13,138,202,207,207, 15,202,203,203, 43,178,240,218,127,129,147, 36,201,172, 1, 3, 6, 56,235,245,122,
+102,216,176, 97,130,156,156, 28,152,135,216, 23, 21, 21,225,244,233,211,104,221,186,116,214,153,184,184, 56,120,123,123,215,200,
+ 57,225,155,123, 74, 0, 75,166,127,232,254,195,173,152,140,105, 0, 86, 52,107,225,129,139,103, 47,224,234,197, 27,115,186,180,
+101, 55,188, 51,178,211, 98, 73,239,143,102,123,251,143,167,228, 54, 10,236, 57,114,152,138,143,252,105,153,182,248,158, 39,182,
+ 28,153, 93, 83, 58, 9,130, 0,199,113,149,196,149, 64, 32, 64, 73, 73,137,165,226,170,230,107,147, 0, 87,232,147,183, 96,236,
+140,161, 93,255, 60,112,219, 90, 38,147,149,247,249,105,222,188, 57, 4, 66, 1,126, 62,186,177, 56, 63, 63,231, 91, 75, 56,101,
+ 50,217,148,160,160, 32, 60,126,252, 24,177,177,177,135,213,106,117, 44,199,113,135,159, 60,121, 50,172, 83,167, 78,248,237,183,
+223,166,212, 34,176,170,229, 52, 71,172, 47,115,123,115, 1, 64,173, 86,199, 0,232,242,232,209,163,122,229,189, 44, 88,104,247,
+178,114, 77, 27, 50,100,136, 13,195, 48, 40, 19,207, 14,245, 60,151, 88,181, 90,189, 62, 60, 60, 60,164, 67,135, 14, 24, 62,124,
+120,191,136,136,136,126,190,190,190,240,244,244, 68, 94, 94, 30,194,194,194,126, 97, 89,246,115,181, 90,173, 5,192,213, 34, 0,
+171,205,251,157, 59,119, 30, 2, 24,237,231,231,247,145, 64, 32,128,141,141, 13,165, 84, 42,169,115,231,206, 1,192,196,208,208,
+ 80,211, 75,213,251,203,227,181,115, 18, 4, 49,127,204,152, 49, 91, 63,251,236, 51, 73,167, 78,157, 80, 80, 80, 80, 46,250, 79,
+157, 58,133,178,145,216,112,112,112,192,195,135, 15,113,244,232, 81,125, 65, 65,193, 58,154,166, 87,212,198, 57,122,244,232, 74,
+156,102,241,118,226,196, 9,152, 7,145, 56, 56, 56,224,193,131, 7, 56,114,228,136,182,160,160, 96,141, 94,175, 95,249,154,243,
+254,127, 75, 96,229,230,230,126, 57,119,238,220,160, 79, 63,253,212, 65,163,209, 80,142,142,142, 80,169, 84,204,217,179,103,115,
+139,138,138,190,172,207,193,110,222,188, 57,249,157,119,222, 89,183,115,231,206,237,219,183,111, 15, 28, 62,124, 56, 70, 15, 24,
+128, 47,186,202,160,211,233, 64, 16, 4,206,158, 61,123,255,210,165, 75,205,104,154,214, 5, 7, 7,179, 0,110,213,197,251,236,
+222,241, 7, 84,219,247, 2, 55,108,252, 49,212,175, 99,151,198, 77,154, 54, 17,119,111,104, 11,131,209,132,204,172,103,184,124,
+ 35, 94,247, 32, 62, 38,141, 53,232,135,102, 39,212, 29,197, 29, 0, 18, 18, 96, 0,138,190,244,242,178, 94,180,114,203,190, 45,
+123, 15, 29, 30, 50, 97,248,251, 2,255,118, 65, 72,206, 56,134, 43, 17,151,152,188, 34,238,104,145,158,154,148,144, 80,148, 87,
+223,130, 87, 42,149, 90,137,144, 43,208,106,181,246,201,201,201,200, 84,171, 10,149, 74,149,246,101,154,221,116, 58, 29, 30, 63,
+126,140, 11, 23, 46, 32, 42, 42, 10,215,175, 95, 55,156, 59,119,110, 39, 73,146,203,106, 9, 52, 89,253,149,221,182,237,247, 63,
+253,244,211,135, 38,147,201,179, 87,175, 94, 18,123,123,123,228,228,228, 32, 60, 60, 92, 31, 29, 29,253,184,109,219,182, 43, 95,
+246,100,115,117,117,197,208,161, 67,157,253,253,253,157,205, 35, 6, 27, 54,108,136, 15, 62,248,192,217,215,215,183,124, 93,163,
+ 70,141, 80,159, 80, 13,238,238,238,129,189,122,189,129,177,227,167, 67,163,121,142, 91, 55, 78, 32, 63, 55, 7, 55,239, 36, 65,
+103, 64, 96,125,134,195,151,141,222,236,178,116,221,134, 35,111,117, 14,240,106,229,230, 42,118,104,218, 4, 50, 39, 87,228, 62,
+123,134, 91, 49,143,140,155,206, 95,190,167,209,106,223,183,116,164, 39,203,178,229,163,220,188,167,205, 1, 73,146,229,179, 32,
+152,183,219,116,236, 1, 82, 32,132,137, 3, 12, 6, 67,157,238,157, 90,173, 78, 39, 8,226,131,169, 83,167,254,185,123,247,110,
+178, 87,175, 94, 29,254,248,227,143,191, 53,105,174, 82,169,244, 40,115, 69, 11,109,108,108, 4,159,124,242, 9,140, 70, 35, 74,
+ 74, 74, 80, 88, 88,136,103,207,158,233,190,250,234, 43, 49, 0,208, 52,109,124,235,173,183,234,188,127,172, 13, 85,106,167,127,
+232,190,193, 81,152, 60,172, 32, 59,182,153,163, 48,249, 73,151,182,236,134,181,161, 74,173,179, 93,201, 82,101,118, 88,146,234,
+249,217,109,123,142, 28,166,198, 12,249,192,164,144, 63,152,227,216, 16,135, 44,186,121, 85, 17, 88, 47,235, 92,189,112, 63,137,
+ 67, 84,186,236,113, 72,208,208, 78,243,150,206, 92, 45,119,116,114, 4,195, 48,120,146,250, 24, 59,143,108, 42, 46,210,229, 45,
+203, 77, 64,132, 37, 92,205,154, 53,107, 74, 81, 20,142, 29, 59, 6, 0,230,208, 6,155, 78,159, 62, 61,108,228,200,145,104,212,
+168,145, 55,203,178,226,218,194,104, 84,231,222, 25,141,198,122, 55,163,215,217, 54, 67, 16,143, 99, 98, 98,220,221,221,221,137,
+ 3, 7, 14, 60, 55, 24, 12,193, 47,113,141,175, 62,121,242,228, 27, 28,199,189,229,231,231,135,198,141, 27, 3, 0,226,227,227,
+113,245,234,213,253, 74,165,114, 44, 94,205,228,206, 28, 65, 16, 40, 44, 44, 52,199, 53, 49,200,229,242,255,228,164,209, 42,149,
+106, 47,195, 48,103,131,131,131,191,107,222,188,249,231, 19, 39, 78,164, 90,181,106,133,130,130, 2,216,216,216, 64,161, 80, 64,
+169, 84, 98,239,222,189,166,172,172,172,157, 36, 73, 46, 82,171,213,170,151,229,108,208,160, 1, 20, 10, 5,210,211,211,205,156,
+219,141, 70,227,226,156,156,156, 76,240,168,223, 53,101,201, 78,101, 97, 26,214,155, 76,166, 32,179,171,149,155,155,251,101,102,
+105,143,241,151, 82,247,239,188,243, 78,243,156,156,156,237, 6,131, 33,112,208,160, 65, 24, 62,124, 56,222,125,247, 93, 12, 31,
+ 62,156, 50,187, 86,127,252,241, 71, 98,189,222, 24,202, 38,123, 38, 41,122, 32,199,113,237, 1, 16, 4, 73, 90, 50,217,115,157,
+ 74,188,131,151,181,167, 84,204,238,144,138,216, 30, 26, 61,121, 77,163, 35, 39, 68, 39, 20, 61,254, 59,111, 54,101, 19, 59,255,
+ 10, 0, 58, 35, 55, 42, 61, 93,125,190,190,229, 89,214, 68,120,128, 32, 8,138,227,184,141, 28,199, 29, 80, 40, 20,143, 45,177,
+221,171,114,114, 28, 71, 2,165,193, 69, 47, 92,184,240, 29, 65, 16,163,116, 58,157,147, 88, 44,206,230, 56,238,151,190,125,251,
+ 46,222,176, 97,131,177,150, 27, 52, 91, 83, 58, 61, 60, 60,246,185,185,185,181, 44, 59, 78,165, 62, 87,230,111,243,250,178,120,
+ 68,143,148, 74,229, 72, 75,203,211,179,153,251, 89,207,166,238,111,122, 54,117, 3, 0, 60, 78, 86,225,113,178,242,220,227, 39,
+202,254, 47, 89, 71,229,147, 61, 19,101,161, 24, 56,203, 38,123,174,196,233,237,237, 29, 65, 81,148, 71,125, 46, 74,150,101, 85,
+113,113,113,126,150,164, 83,161, 80,140,104,216,176,225, 10,149, 74,117, 36, 61, 61,125,250,171,120,243, 86, 40, 20,221, 72,146,
+ 60,197,178,172,180,170,195,101, 22, 97, 53,116,114,175,145,243,251,121, 62,223,118, 15,124, 99,200,245,203, 87,143,126,179, 60,
+110, 73,197,109,147,223,107, 48,110,228,228, 47, 87,238,219,188,254,235,205,191,231,237,172, 43,157,237,218,181, 11, 3,208,210,
+236,102,213, 6,147,201,164,138,139,139,235,248, 50,174,131,125, 59, 4,216,201, 28,151,232, 13, 6, 95,146, 0, 39,164,233,152,
+252,252,156,111,107, 16, 87,213,114,186,187,187,175,104,209,162,197,151,143, 30, 61,218,159,158,158,254,105,133, 50,254,161, 73,
+147, 38,147,211,210,210, 54,165,167,167,207,182,180,142,154, 54,109,106,227,235,235,155,183,104,209, 34,114,225,194,133, 8, 15,
+ 15,183, 87, 42,149,121,175,162,222, 27, 53,106,228, 42,145, 72,246,176, 44,235,105, 50,153, 54, 63,121,242,100,245,203,112,122,
+121,121,209,249,249,249, 95, 54,108,216,112,134,139,139,139, 75,102,102,102, 74,106,106,106, 72, 70, 70,198, 79,245, 16, 87,117,
+214,145,159,159,159, 14, 40,157, 78,204,194,254, 86,255, 74, 7,171,202,249,228,201,178,236, 50, 95, 95,223, 15,199,141, 27, 71,
+ 36, 36, 36,224,252,249,243,120,250,244,233,209,178,254,124, 15, 94, 5,231,217,179,103,185,148,148,148, 67, 36, 73, 46, 80, 42,
+149,143,255, 63,230,157, 71, 61, 79,148, 90,241,206, 59,239, 52,239,212,169, 83, 88,187,118,237,216,118,237,218, 21,189, 10,206,
+215,145,206,191, 52,156,163,236, 85,115,190,142,116,190, 12, 39,199,113,228,223,249,252, 19,242,222,162, 69, 11, 14,150,207,191,
+246,175,171,163,127, 43,231,150,165,237,220,110, 95,248,104,237,142,239,219,190, 48,121,121,240,212, 6,214,127, 30,123,127,101,
+240,212, 6,214,255,209,242, 36, 95,242, 5,183,109,245, 47,102, 13,183,190,247,222,123,166,134, 13, 27,110,255,135,231,157,104,
+220,184,177,152,191,142, 94, 61,167,139,139, 75, 71,133, 66,113, 92,161, 80, 28,119,119,119,239,244,138, 57,127,119,117,117,245,
+251, 31,229,157,199,235, 56,249,222,125,247, 93,231,247,222,123,207,158,191,240,120, 78,158,147,231,228, 57,107,231, 84, 40, 20,
+ 82,190, 60,121,206,255, 32,231,127, 10,130,127, 74, 66,142, 31, 63,158,197, 87, 7, 15, 30, 60,120,212,141,250,132,118,224,193,
+131,199,255, 6, 68, 45, 42,180, 62,109,171, 47,163,100,239,241,156, 60, 39,207,201,115,242,156, 60, 39,207,249,127,142,179, 46,
+110,190,111,215,107, 18, 94, 60, 39,207,201,115,242,156, 60, 39,207,201,115,254,223,227,252, 79,129,228,139,128,199,235,198,134,
+241,112,223, 48, 30,238,175,107,127, 30, 60,120,240,224,193,227,159, 6,193,127, 45, 67,254,254,254,222, 28,199,141, 36, 8,226,
+ 67, 0,224, 56, 46,148, 32,136,125,145,145,145, 22, 69,160,149, 72, 36, 25, 90,173,214,185,236,119,150, 86,171, 85, 84,216, 76,
+ 84,248, 0,165,163,213, 42,126,170, 69,211,166, 77, 51,116, 58,157, 37,243,235, 69, 19, 4, 17,197,178,108,164, 92, 46,191,246,
+240,225,195, 36, 75,243,221,183,111,223,207,101, 50,217,183, 26,141,102,229,185,115,231,214,255,127, 40,234,206, 13,221, 92,119,
+ 25, 25, 3,155,145,149, 59, 31, 64,181,211,240,108, 30,135, 16,130,195,236,178,223,171, 38,239,196,220,218, 72,235,187,127, 45,
+232, 40, 20, 10,167,184,184,184,188,157,158,158, 30, 1,224,107,240, 81,136,121,240,224,193,131,199, 63, 81, 96,117,241,179,111,
+ 69,176,134,217, 66,138,123,195,104, 34,174,114, 36,189,234, 86, 84,110,210,223, 73,128, 66,161,104, 72, 16, 68, 47,142,227,188,
+ 72,146,188,203,178,236, 57,181, 90,253,172, 62, 28,126,126,126, 13, 1, 12, 7, 48,162,115,231,206,109, 39, 77,154,132, 22, 45,
+ 90, 64,171,213, 34, 60, 60,124,206,175,191,254, 58,135,227,184,123, 40,157, 82,230, 64, 84, 84, 84, 90, 77, 92, 90,173,214,217,
+ 28,155,137, 32, 8,231, 15, 63,252, 48,188,194, 36,188,132,121,114, 89,142,227,110, 1,184, 73, 16,196,141,223,126,251, 45,189,
+149,147,164, 75,147,134, 78,239,156,137, 76,157, 95,149, 83,167,211, 57, 71, 31, 63, 10,142, 49,225,185, 50, 21,205,223, 31, 94,
+190,237,252,251,125,192, 21, 23, 66, 40,166,163,131,254,184, 17, 5, 32, 50, 53, 53, 53,170,113,227,198, 73,181,113, 86, 69,135,
+ 14, 29, 22, 7, 7, 7, 59, 14, 26, 52,104, 10,128, 26, 5, 86,125, 56,107,129,184, 75,199,246,151,142, 31, 62, 32, 1, 65,226,
+189, 33, 31,238,191, 30,121,111, 52,128, 74, 19, 64,111, 30, 11, 23,130,192,236, 73, 95, 77,162, 0,224,199,117, 91,190, 94,251,
+ 49, 54, 76,255, 21, 25,110,110,110, 65, 28,199,125, 93, 86,206, 43, 85, 42,213,165,205, 99,225, 2,224,155, 73, 95, 77, 34, 0,
+ 96,203,186, 45,179, 55,143,197,250,201,187, 81,223, 0,119, 95,140, 29, 59,118,195,178,101,203,168,178, 32,124,111,121,123,123,
+183, 42, 44, 44,244, 6,192,119, 14,230,193,131, 7, 15, 30,255,123,129,229,227, 99, 99, 39, 37,185, 25, 82, 17, 55,188, 87,183,
+ 22, 77,223,125,187, 27,209,172,121, 51, 36, 37, 36,121, 94,186,124,231, 19, 49, 21,159,172,209, 19, 7, 52, 44,177, 38, 46,174,
+246,249,195, 22,140,135,145, 97, 74,143, 41, 16,192,180,231,156,199,209,160,160,160,166,227,198,141,131,159,159, 31, 34, 34, 34,
+130, 14, 29, 58,244,229,201,147, 39,239, 24,141,198, 83, 98,177, 56,172,174, 8,199,126,126,126, 43,220,221,221,191,158, 57,115,
+ 38,209,177, 99, 71,136,197,127,133, 93,145,203,229,232,211,167, 15,250,244,233,131,140,140,140,182, 97, 97, 97,109,247,237,219,
+ 23,226,231,231,183, 50, 42, 42,106,142, 37, 5,244,237,183,223,250, 87,179,250, 44, 65, 16,143, 72,146,140,244,242,242, 74,111,
+238, 42,107,237,104,111,119,226,251,101,139,112,230,205,177, 53, 10,151,223,251,119, 3,128, 74, 2,203,144,147, 9,137,181, 60,
+154,150, 74,163, 0, 68, 2,136,106,220,184,113,180,165,156, 0, 16, 24, 24, 40,190,127,255, 62,193,113, 28, 58,117,234,100, 79,
+ 16, 68, 18, 73,146,235,207,156, 57,179,165,226,126,245,225,172,203,189, 10,158, 61,153,206,121, 28,141,196, 27,231, 48,216,223,
+ 93, 18, 21,119,127,169, 86,111, 60, 92,219,159, 8,130, 36,119, 71, 56,206, 1,178,190,100, 89,246,219,132,132,132, 64, 0,240,
+242,242, 18, 1,184,180, 39,188,193,128,177,221, 10,254,206, 36,159, 52, 69, 81,155,119,238,220, 57,126,244,232,209, 72, 73, 73,
+193,181,107,215, 32,151,203,177,120,241,226, 38, 51,103,206, 12, 97, 24,230, 75,254,178,231,193,131, 7, 15, 30,255, 83,129,213,
+195,207, 42, 60,168,107, 19,255, 65,253,187,145, 45,188,188, 65,139,173,202,183,181,243,243, 67, 59, 63, 63, 98,226,196,162,102,
+ 49, 81, 49, 11,206,252,121,123,158, 45,205, 68, 94,139, 42,169, 49,232, 25,195, 64, 16,178,108, 31, 0, 96,207,142,145, 84, 82,
+ 82, 82, 83,169, 84, 90, 81, 40, 32, 48, 48,144, 12, 9, 9,233,124,233,210,165,206, 7, 14, 28, 48, 24,141,198,117, 42,149,170,
+182,169, 51,190, 62,116,232, 16, 65, 81, 20, 40,138,170,113, 39, 87, 87, 87,244,235,215, 15,174,174,174,196,236,217,179,191, 6,
+ 80,173,192,146, 72, 36, 89, 4, 65, 56, 3, 64,131, 6, 13, 76,193,193,193, 49, 92, 25, 0,128,101,217, 91, 20, 69,221, 36, 8,
+226,214,209,163, 71,149,158,110, 18,119, 57, 45, 62,183,125,235, 70, 24, 11, 51,107,140,227, 85,162, 74, 55,171,140, 74,235, 69,
+ 50,171,104,145, 76, 22, 37,146,203, 35, 1, 68, 17, 4, 17,109, 41,167, 89, 92, 73,165,210, 43, 91,183,110,109, 0, 0, 83,167,
+ 78,181, 43, 41, 41,177,155, 48, 97,194, 28, 0,229, 2,171, 62,156,181,192,238,141,174, 29,159,126,240,238, 91, 54,126,157,123,
+224, 86,232,143,200,207, 47, 70,113, 81, 9, 88,150,125, 97,230,223,201,187,145,185,121, 28, 86,253,184,118,203, 55, 4, 73, 18,
+190,253,191, 70,127,123,110, 90,206, 47,191,196, 1, 16,138, 68,162,178, 34, 33, 4,238,238,238,110,214,110,173, 86,181,232,209,
+ 26, 91,214,111, 6,199,178, 28,128, 85,245,112,175,156,173,173,173,143,157, 59,119,174,115, 64, 64, 0,110,221,186,133,199,143,
+ 31, 99,242,228,201,250,201,147, 39,211, 99,198,140, 33,102,204,152, 49,117,229,202,149,161, 0,174,243,151, 62, 15, 30, 60,120,
+240,248,159, 9, 44, 9,109, 10, 8,222, 16, 3, 83,241, 35,112,198, 84,112,134,140, 23,246,177,178,107,136, 54,190, 46,176, 18,
+ 57,145,119, 19,214, 6, 84,217, 92,235, 80, 75,179,184, 10, 93,237,230,163, 41, 86,211, 0, 32,149, 41, 12, 31,204, 80,198, 5,
+ 4, 4,192,201,201,137,190,113,227,198, 12,160,210,220,100, 85, 57, 9,125,108, 4, 18,223,237,142,230,137,185,176,178,178,130,
+249,193,109, 70, 82, 82, 18,174, 92,185,130,148,148, 20,120,122,122, 2, 47, 70, 80, 46,231,212,106,181,174,253,251,247, 15, 91,
+185,114,101,207, 21, 43, 86,220,221,191,127,127, 47, 0, 37,213,186,123, 13,109,236, 88,134, 59,183, 99,203, 90, 33,244,197,246,
+247,239, 92,175, 49,239, 77,223,253, 0,147,242, 75,155, 30, 15,122,187, 65, 98, 35,135, 88,110, 29,221,239,236,157,114,231,138,
+ 32,136,104, 75, 57,131,130,130, 62, 17, 8, 4,243, 13, 6,131,237,182,109,219,236,236,236,236,200, 99,199,142, 25,182,110,221,
+ 90, 68,211,180,158, 32,136,229, 47,147,206,218, 32,164,168, 37, 63, 4,207,182,177, 34, 25, 68,157,250, 5,233, 41,169,136,125,
+168, 52,254,118, 53,222,164, 55,154,198, 85,199, 57,121, 39,230,206,120, 79,180, 43, 66,237,121,124,224,194,201, 45,151, 14,114,
+129,193, 96,216,145,157,157,141, 9, 19, 38,128,101, 89,244,232,209,163, 59,199,113,202,105,211,166,193,211,211, 19, 59,254,120,
+ 80, 34, 40,188,221,107,223,197,162, 8, 11,211,217,182,113,227,198,231, 46, 93,186,228,226,238,238,142,176,176, 48,100,100,100,
+ 64,161, 80, 96,242,228,201,162, 21, 43, 86,236, 41, 44, 44, 28,186,108,217, 50,201,189,123,247, 14,156, 61,123,182, 33, 74,251,
+204,189,142,161,192, 60, 39,207,201,115,242,156, 60,231, 43, 6,199,113, 1, 0,156, 0,100, 19, 4,113,167,226,114,217, 46, 78,
+101,223, 85,151,115,202,158,249, 21, 39, 47,207, 41,123, 6, 56, 1, 48, 1, 8, 39, 8, 34,239, 85,167,217, 44,176, 2, 1,132,
+ 1, 88, 4, 32,184,234, 78, 6,101, 24, 68, 77,222, 7, 36, 62,224,244,143,192,234,149,224,132,206, 40, 46,145, 32,231,105, 10,
+ 18,111,133,130, 99, 74,234, 62,152, 0,204,198,117, 35, 5,214, 86, 0, 45,118, 50, 20, 21, 21, 65, 38,147, 65, 83,172,166,199,
+ 76, 40,119,182,232, 75,151, 46, 33, 50, 50, 18,110,110,110,117,138, 64, 0,224,244,165,173,136,122,189, 30,122,189, 30, 25, 3,
+ 58, 65,214,165, 39,242, 70, 77,198,133, 11, 23,144,157,157, 13,154,166, 65,211, 52, 24,134,169, 51,157,100,217, 76,188,102,211,
+170,186,125,220,221, 33, 49, 25,141, 39, 54,174, 89,110, 99, 35,183,114,137, 56,247, 59, 82, 82, 50, 44, 42,116,145,204, 10, 34,
+169, 85,180, 72, 38,173, 36,174,234,195, 73, 81,212,226,195,135, 15,187,235,116, 58,208, 52,141,208,208, 80,195,238,221,187,227,
+138,139,139,223,136,138,138,210,188,138,116, 86,133,131,147,211,201,247, 63,254,108,242,210, 79,251, 65, 83,172,197,209,171,241,
+248,243,110,242, 32, 0,215, 0, 20,215,244,191, 53,191,235, 31,186,185, 21,244,153, 48, 97, 66,244,145, 35, 71, 28,127,248,225,
+ 7,152, 76, 38, 48, 12, 3,134, 97,202,127,155, 76, 38,236,223,191, 31,215,110,199, 79, 83,171,139, 34, 44, 76,150, 91,211,166,
+ 77, 47,220,190,125,219,201,202,202, 10,231,207,159, 71,126,126, 62,190,248,226,139,114,231, 42, 63, 63,127,248,150, 45, 91, 62,
+120,250,244,233, 15, 87,175, 94,125, 6,128, 2,192,128, 7, 15, 30, 60,120,252,147, 80,155, 22,113, 34, 8,226, 4,199,113, 3,
+ 57,142,235, 11, 64,100, 94, 6, 0,130, 32, 78,148, 61,183, 43, 45,207,153, 51,103, 94, 72, 72, 72,156,121,217,188,207,220,185,
+115,125, 86,172, 88,177,188,107,215,174, 7,110,220,184,241, 4,192,107, 19, 88, 97,168,101, 94, 44,221,163, 95,161,123,242, 27,
+104, 69, 16, 68,205,134, 65,232,216, 21,105,247,195, 16,125, 97, 13,210, 31, 92, 3,199,154,224,210,176, 77,157, 7, 91,250, 19,
+132, 10,133, 34, 82,165, 82, 33, 42, 42, 10,143, 30, 61,130, 68,242, 66,203, 18,254,252,243, 79, 0,128,139,139,139,101,130, 37,
+160, 59, 26,198,168,145,230, 91, 58,224,175, 97,140, 26, 0,176,124,238, 92,136, 68, 34,208, 52, 93,190,175,201,100,170,147,143,
+ 40,235,213, 94,214, 44, 88,221,232, 64, 66,194, 88, 31, 90, 56,103, 74,227,166,158, 45,220,110,159, 60,136, 39, 79,148,200,204,
+180,172,126,196,114, 89,180,216, 90, 22, 37,146,254,213, 44,248, 18,156, 7,135, 14, 29,250,201,144, 33, 67,164, 93,186,116, 17,
+255,252,243,207,249, 85,197,213,223, 77,103, 69,184,186,186,246,127,231,157,119, 78, 78,156, 56, 17,131,223,234,139,145, 61,188,
+184,244,172, 2, 13,128,243,101,111, 0,181, 66,165, 82, 41, 1,244,123,255,253,247,127,245,241,241,241,226, 56, 14,109,218,180,
+193,224,193,131,113,248,240, 97,196,199,199,163,168,168,200,112,245,234,213,117,106,181,122,167,133,201,178,106,208,160,193,153,
+139, 23, 47, 58, 89, 89, 89,225,220,185,115, 40, 41, 41,121,193,185, 90,190,124,185, 36, 57, 57,121,211,217,179,103,155,160, 52,
+ 52, 9, 47,174,120,240,224,193,227,159,135, 90,181,136, 89, 56,113, 28, 55,176,162, 96,170, 42,180,204,191,205,251,133,132,132,
+ 12,172, 40,190, 0, 96,197,138, 21,203, 43, 44,151,188,142,204,152, 5, 86,175, 50, 33,209, 11,192,229, 42,182, 92,233, 15,150,
+129, 65,121, 30, 6,229,121, 88,249,206,199,177, 13,163, 42, 17, 89,226, 12, 85, 7,173, 86, 11,161,200,193,176,103,199, 72, 26,
+ 0, 76,156,204,240,194,177,235,182, 14, 45, 62,158, 37,233, 36, 8,130,172,192,251,130,120,240,240,240, 88,221,181,123,231, 30,
+ 45,218,117,178,186,125,230, 8, 30, 62, 72, 65, 78, 78, 1,192, 65, 91, 19,231,249, 97,111,163,248,113, 18,164, 54, 54,209,253,
+ 47,198, 84,114,174, 94,134,243,194,133, 11,179,186,116,233,242,109,104,104,168,202,211,211, 83, 44, 16, 8, 12, 85,196,213, 75,
+165,179, 34, 20, 10, 69,119,129, 64,112,142, 36, 73,105, 80, 80, 16,166, 77,155,134,245,235,215, 51,172, 80, 50,112,203,153,136,
+161,207,117,134,249,150,136,171, 10, 34, 43, 86,165, 82,121, 39, 37, 37,137, 25,134, 9,122,247,221,119, 79, 13, 24, 48, 0, 55,
+111,222,196,133, 11, 23, 90, 26, 12, 6,117,217,113, 23, 3,112, 33, 73,114,101, 45, 51,185,147, 52, 77, 31,184,112,225,130,143,
+155,155, 27,206,159, 63,143,146,146,146,114,231,106,236,216,177,149,156,171, 27, 55,110, 60,227,197, 21, 15, 30, 60,120,252,163,
+ 81,163, 22,169,232, 62, 85, 39,178, 44, 65, 5,241,165,153, 51,103,206, 60,130, 32, 78,148, 57, 92, 26, 0,170,215, 37,176, 46,
+151,169, 70, 14,117,207,240, 14, 83,209,147, 23,214,177,236,203, 63,183, 90,246, 61, 27, 39,149, 74,177,101,203, 22, 88, 89, 89,
+213, 91, 56, 21,159, 58,130,180,201, 31,151, 59, 87,102, 39, 11,253,199,188,172,192, 50, 59, 88,183, 80,165,137,208,221,221,125,
+ 74,187,118,237, 62,221,190,251, 87,235, 21,223,126, 93, 80,152, 24, 39,208,150,232,100, 58, 35, 99,120,148,153, 83, 99,120, 4,
+166, 48, 31, 98,153, 44, 90,104, 37,125, 65, 92,189, 44,231,173, 91,183,180,189,123,247,222,181,124,249,242, 46, 44,203,238,126,
+ 21,233,172, 40,174, 28, 28, 28,206,110,218,180, 73, 42,149, 74,161,211,233,176,114,229, 74,252,249,231,159, 3, 51, 50, 50,206,
+ 2, 56,251,178,245,109, 48, 24,198,247,237,219,119,237,172, 89,179, 96, 52, 26, 49,108,216, 48, 60,125,250,244,220,195,135, 15,
+215,123,120,120,204,250,226,139, 47,220, 28, 29, 29, 49,105,210, 36, 26,192,216, 26,104,190,223,183,111,223, 64, 95, 95, 95, 92,
+190,124, 25, 5, 5, 5, 80, 40, 20,152, 50,101,138, 40, 36, 36,100, 79, 81, 81,209,208,144,144, 16,222,185,226,193,131, 7,143,
+127, 15, 44,210, 34, 21,157,168,250,160,194,255,132, 33, 33, 33,113, 33, 33, 33,149, 28,174,215, 37,176,184, 10,234,177, 78,119,
+136,213,188,216,135,135, 53, 49,245,201,164, 69,251, 89,210,156, 7,252,213, 7,171, 26,161,244,194,114, 61,250, 96,157,229, 56,
+238, 70, 69,129,229,238,238,254,158,171,171,235,247,251,246,237,147,170, 84, 42,120,180,106,107,123,242,240,111, 58, 23,153, 88,
+155,158,155, 59, 38, 86, 85, 28, 90, 19, 39,171, 45,142,150,200,228, 81, 18, 43,121, 85,113,245,210,156, 0,112,241,226,197,153,
+ 85,215,253, 93, 78,133, 66,209,221,209,209,241,236,166, 77,155,172, 84, 42, 21,104,154,134, 92, 46,199,197,139, 23, 81, 38,174,
+ 94, 26,238,238,238,193,147, 39, 79, 94, 56,118,236, 88,228,229,229,225,194,133, 11, 8, 10, 10,194,166, 77,155, 26, 95,188,120,
+113,109,183,110,221, 64, 81, 20,206,159, 63, 15,163,209,248,160, 6,154, 33, 19, 39, 78,156,245,193, 7, 31, 32, 60, 60, 28,106,
+181, 26,147, 38, 77,210, 79,153, 50,165,188,207,213,143, 63,254,248, 65,114,114, 50,239, 92,241,224,193,131,199,191, 7, 53,106,
+145, 42,207,242,147, 28,199,189, 83,213,213,170, 42,190,204, 14, 85,197,229,170,251,151,109,215,190,142,204,152, 5, 86,205,174,
+ 21,103, 2,101,223, 30,166,220,216, 10, 2, 75, 93,105, 23, 90, 44,135,201, 2,225,178, 96, 60,140, 78,118,106,193,222,197, 36,
+132, 34, 7, 67,203,190,103,227,106,218, 87, 46,151,131,101, 89,139,116, 24, 61,224, 3,170,121,255,247,240,184,157, 43, 56,163,
+161,220,201,194,188,121,149,196, 21, 77,211,208,235,245, 64,221,205, 90,225, 4, 65, 60,165, 40,234, 38, 0, 46, 48, 48,112,135,
+209,104,124, 47, 47, 47,175,193,132, 9, 19, 12, 57, 57, 57, 56,122,244, 40,118,237,218,165,121,110, 16, 68,228, 61, 51,142,122,
+162, 46, 78,175,133, 47,250,157,203,113,149,156,171, 87,192,249, 2, 94, 5,167, 66,161,232,238,236,236, 92, 46,174,196, 98, 49,
+228,114, 57,148, 74, 37, 4, 2,193,223, 10,210,217,184,113, 99,177,191,191,255, 55, 99,198,140, 65, 98, 98, 34,230,204,153,163,
+ 86,169, 84, 71,142, 29, 59, 54,105,198,140, 25,130,192,192, 64,100,101,101, 97,235,214,173,198,240,240,240,229, 25, 25, 25,171,
+170, 61,105, 5,130,241, 75,150, 44,225, 84, 42, 21,241,248,241,227, 74,206, 85, 97, 97,225,208,144,144, 16,201,147, 39, 79,120,
+231,138, 7, 15, 30, 60,254, 93,168,173, 5, 45,167, 76, 60,101, 86,179, 76, 85, 16, 86, 85,151,179,170, 44, 3,128,190,202,246,
+152,215, 41,176,170,133,209, 68, 22,236,219,244,153,237,160, 15,191,128,196,181, 39,244,201, 7,193,106, 50,203, 5, 22, 45,177,
+134,141, 99, 35, 20, 62,215,224,122,194, 19, 24, 77,100, 65,109,124, 12, 3,193,212,175,254, 26, 45,104,103,103,135,130,130,130,
+ 74,142,150,149,149, 21,220,220,220, 80, 88, 88,136,208,208, 80,112, 28,119,189, 14, 55,108,201,152, 49, 99,190,251,226,139, 47,
+200,230, 35,198,225,249,173,171, 47,184, 86, 18,137, 4, 82,169, 20, 74,165, 18,247,239,223,103, 57,142, 91, 82,135, 58,190, 77,
+146,100,244,111,191,253,150, 30, 24, 24, 56,182, 65,131, 6, 35,198,141, 27, 39, 13, 15, 15,199,146, 37, 75, 4,231,207,159, 55,
+220,185,115,135, 49,153, 76, 51, 85, 42,213,214, 58,207, 24,130,168, 42,174,254, 54,103, 53,226,234,111,115, 42, 20,138,110,110,
+110,110,103,215,175, 95,111,149,145,145, 1,177, 88, 12,107,107,107,164,166,166, 98,201,146, 37,197, 12,195,188,245, 55,207, 55,
+177, 76, 38, 19, 27,141, 70,236,222,189, 27, 74,165,178,107, 70, 70, 70, 42,203,178, 91, 63,255,252,243, 13, 94, 94, 94,109,238,
+223,191,255,224,249,243,231,147, 51, 51, 51, 19,107, 34,177,179,179,235,234,228,228, 68,220,188,121, 19,147, 38, 77,210, 79,157,
+ 58,181,188,207, 21,239, 92,241,224,193,131,199,127, 80,121, 17, 68,120,109,203,255, 68,212, 58,217,115,118,137,198,121,235,158,
+ 35, 27,134,125,212, 71,123,246,226, 69,160,241, 24, 8,221,251, 3,148, 4,110, 45,187,195,169, 73, 23,196, 60,204,192,209,171,
+113,218, 36,165,126, 67,118,137,166,234,124,123,181,206,182, 93, 80, 80, 35, 29,184,229, 0, 0, 32, 0, 73, 68, 65, 84,128, 38,
+ 77,154,224,209,197, 1, 62,119, 14,181,241,243,179,223,232,215, 16,171,125, 46, 94,188,136,213,171, 87, 63, 79, 74, 74, 90,211,
+178,101,203, 89,181,113, 70, 71, 71, 47, 74, 75, 75,235, 48,119,238,220, 51,243,211, 11,145,183,120, 51, 10,191, 26,131,140, 62,
+237, 96,101,101, 5, 71, 71, 71, 20, 23, 23,227,202,149, 43,136,137,137, 57,163,213,106, 59, 68, 71, 71, 47,170,141,147,227,184,
+ 91, 94, 94, 94,143, 59,117,234,100, 93, 80, 80,176,126,204,152, 49,210,226,226, 98,228,228,228,224,217,179,103,184,125,251,246,
+121,189, 94,239, 83,135,104, 41,231,100, 89,182, 92, 92,189, 42,206,138,120, 85,156, 50,153,108,246,209,163, 71,173, 72,146,132,
+ 88, 44,134,173,173, 45,210,210,210,176,120,241,226, 98,141, 70,243,150, 90,173,182, 52, 64,103,141,245,206,178, 44, 24,134, 1,
+199,113, 16,137, 68,133, 0,144,153,153,153,248,228,201,147, 62,199,143, 31, 87, 60,122,244,168, 87, 13,226,170,156, 51, 39, 39,
+ 39,236,233,211,167,144,201,100,152, 58,117,170,104,249,242,229,123,215,175, 95,175, 13, 9, 9,161,251,246,237,187,233,236,217,
+179,173, 53, 26, 77, 79, 11,196,213,255,229, 89,235,121, 78,158,147,231,228, 57,255,105,156,255, 41,212,234, 96, 37, 36,192, 0,
+ 20,125,233,229,101,189,104,229,150,125, 91,246, 30, 58, 60,100,194,240,247, 5,254,237,130,144,156,113, 12, 87, 34, 46, 49,121,
+ 69,220,209, 34, 61, 53, 41, 33,161,168,206,177,255, 2, 1,152,185,243, 71, 10, 0, 64, 40, 4, 51,111,224,192, 48, 31, 31,159,
+ 30,131,124,179,232, 73, 83, 75,157,173, 45, 27, 71,210, 97, 97, 97,135,196, 98,241,182,228,228,228, 66,165, 82, 89,103, 38, 98,
+ 98, 98,238, 2,120,155,162,168,158,179,102,205,250,126, 64, 83,143, 78, 67,186,246,130, 80, 40,196,157, 59,119,144,155,155, 27,
+ 78,146,228, 55,209,209,209, 87, 44, 41,148, 63,254,248, 35, 29, 0, 74, 74, 74,150,180,108,217, 82,148,144,144,128, 71,143, 30,
+ 33, 41, 41, 9, 38,147,233,161, 82,169,172, 87,135, 56,137, 68,114,155, 32,136,184, 87,201, 89, 17,175,138, 83,163,209, 44, 95,
+186,116,233,155,139, 22, 45, 18, 91, 91, 91, 35, 58, 58, 26,139, 22, 45, 42,214,106,181,245, 17, 87,181,130,227, 56, 24,141,198,
+122,141,252,172, 6,223,248,250,250,182, 94,186,116,105,203,178,190, 92,188,115,197,131, 7, 15, 30, 60,254, 61, 2,235, 47,161,
+ 85,148, 7,224,163, 14, 94,214,158,203, 55,255,186, 67, 42, 98,123,104,244,228, 53,141,142,156, 16,157, 80,244,216,210,131, 45,
+253, 9,194,202,107,212,176,179,179,147,165,185,226,185,121, 77, 90, 38,160, 86,171, 87,190, 76,102, 34, 34, 34,174, 0,232,204,
+113,220,144, 83, 4, 49, 15,120, 2,142,227,150, 71, 71, 71, 31,173, 15, 79, 64, 64, 64,147,226,226,226,189, 58,157,174, 3,203,
+178,162,203,151, 47, 67,171,213, 34, 33, 33, 65,195,178,108,104,125,211,149,156,156, 28,247,170, 57, 95, 71, 58,149, 74,229,157,
+ 19, 39, 78,244, 37, 8,226,194, 55,223,124, 35, 94,188,120,241, 43, 21, 87,246,246,246, 37, 25, 25, 25,207,180, 90,173, 67,102,
+102,166,222,222,222,190, 36, 37, 37,229,101,168, 30, 22, 22, 22,182,155, 62,125,250,226, 89,179,102,205,254,254,251,239,105,190,
+207, 21, 15, 30, 60,120,240,248,215, 35, 48,208, 81,102,225,174, 22, 89,136, 11,198,195, 56,103, 44,184, 57, 99,193, 45, 24, 15,
+227,171,224,172, 39, 42,113,182,106,213,234,128,163,163, 35, 67,211,180,142, 36,201, 18,138,162, 10, 5, 2, 65, 6, 73,146,147,
+ 96, 65, 24,139,127, 51, 39, 0,184,184,184,116,244,246,246, 62,160, 80, 40,186,189,138,242,172, 8, 87, 87,215, 55, 61, 60, 60,
+ 14,186,185,185,245,122, 69,156, 1,111,189,245,214, 83,169, 84,122,195,210, 23,134,255,159,231, 18,207,201,115,242,156, 60, 39,
+207,201, 3,252,137,194,115,254, 75, 57,137,151, 16, 87,124,121,242,156, 60, 39,207,201,115,242, 2,235,181,129,228,139,128,199,
+127, 0, 28,248,102, 65, 30, 60,120,240,224,241, 15, 2, 81,139, 10,173,207, 76,217, 47,163,100,239,241,156, 60, 39,207,201,115,
+242,156, 60, 39,207,249,127,142,179, 46,238,123,224,241, 90,132, 23,207,201,115,242,156, 60, 39,207,201,115,242,156,255,247, 56,
+255, 83,224,155, 8,121,240,224,193,131, 7, 15, 30, 60, 94, 49,234,221, 49, 56, 32, 32,160, 5, 0,220,185,115,231,225,107, 76,
+215, 20,133, 66, 49,161,125,251,246, 94, 52, 77,147, 5, 5, 5,139, 46, 95,190,188,168,186, 29,219,183,111, 31,241,230,155,111,
+122, 94,186,116, 73, 15,252, 53,255,160,249,219,100, 50,165, 71, 70, 70,118,228,171,250,127, 3, 87, 87,215,179, 18,137,164,113,
+105,128, 81, 14, 12,107,130,137,229, 96, 50,177, 48,154, 56, 24,244,218, 20,125, 73, 97,255,151,226,246, 29,210,200,100, 98, 67,
+ 56,112, 91, 8,142,152,196, 17,220, 22,130, 35, 62,231, 72, 98, 11,193,114,159, 65,192,252, 0, 70, 48, 75,192, 10,231,171, 19,
+ 66,211,254, 11,229, 25, 28, 28, 76,254,205,255, 87, 59,255, 84,135, 14, 29, 78, 72, 36,146,230, 53,253,175,164,164, 68, 29, 27,
+ 27, 27,244, 95, 62, 87, 93, 92, 92,122,146, 36,185, 17,128, 79,149, 77,137, 0,190, 84,171,213,127,254,211,210,236,228,228,116,
+133,162,168,150,197, 37, 37,197,207,139,138, 60,229,114,249, 99,169,149, 76,102, 98, 76, 15,158, 61,203,238,201,223,129,120,240,
+248, 7, 11, 44, 63, 63,191, 86, 0, 2, 9,130, 8,228, 56,174,103,203,150, 45, 93, 74, 74, 74, 96, 50,153, 50, 9,130,184,194,
+113,220,101, 0,151,163,162,162,146, 94, 69,130, 72,146, 92,181,118,237,218,153, 83,167, 78, 45, 23, 73,247,238,221, 67,187,118,
+237,170,221,159,162, 40,143, 21, 43, 86,216,166,166,166,130,166,105,136, 68,162,242, 15, 69, 81,232,210,165, 75,189,142,223,160,
+ 65, 3,107,103,103,231, 69, 4, 65, 12, 37, 73,146,170,107,127,150,101, 77, 28,199, 29,202,202,202, 90,152,151,151, 87, 84,159,
+ 99,117,244,111,103, 4,136, 26,142,193,153, 34, 34,239, 10,107,251,127,171, 86,173, 34, 4, 2,129, 71, 69, 65,105, 70,197,229,
+138,191, 77, 38, 83,122,124,124,124, 71, 75,203, 66, 98,101, 53,155, 32, 5,125,193,177,109, 74,201,200, 68,142,101, 46,104, 75,
+ 74, 86, 89,146, 95,177, 88,220, 56, 50, 42,170,101,252,253, 39,240,108,214, 8,122, 3, 3,157,222,136, 99, 23,238,192,215,171,
+ 41, 6, 13,232,247,210,231, 10,195, 18,193,243,167,140,234,189,124,227,254,128,121, 83, 71,200,151,111,220,223,113,222,212, 17,
+214,203, 55,237,239, 56,127,218, 72,235,165, 27,247,117,156, 63,109,164,237,178,141,251,244, 0,198,191,204, 49,198,181,109, 84,
+ 76,154, 24,113,181,117, 79, 9,116, 59,239,165,202,254, 23, 23,238,242,229,203, 91, 25, 12,134,132,177,195, 58, 46,105,211,194,
+ 57,171,186,125, 10, 10,178,156, 31, 37, 70,124, 11, 33,237,229,213,105, 94,173,215, 39, 77,211,205,174, 92,185,210,210, 28,105,
+223,100, 50,193,100, 50,129, 97, 24,232,245,122,124,240,193, 7,130, 87,145,110,127,127,255,113, 28,199, 45, 43, 61, 45,137,165,
+145,145,145,155,254, 6,157, 92, 32, 16, 76, 23,137, 68,129, 12,195,120, 1,128, 80, 40, 76,208,233,116,151, 25,134, 89, 11,252,
+ 21, 95,207,194,123,207,186,240,240,112,111,107,107,107, 24, 12,134,242,137,225, 41,138,106,211,185,115,231,205, 0, 90, 90,202,
+229,238,238, 30, 65, 16,132, 71,125,142,207,113, 92,186, 82,169,172,215,203, 32, 69, 81, 45,159,166,170,156,155, 52,114,195,243,
+162, 34, 88, 89,201,100,119,238, 37, 59,251,251, 52,225,159,110, 60,120,252, 83, 5,150,159,159,223, 41, 0,129,109,218,180,145,
+246,235,215, 15,126,126,126,104,220,184, 49, 36, 18, 9, 0, 32, 55, 55,215, 37, 62, 62,254,163,232,232,232,143,110,222,188, 9,
+ 0, 26, 0,215,162,162,162,170,117, 35,250, 12,236, 49, 85, 34, 23,175, 7,128,108,229, 51,117,250,227,172,141,106,181,122, 21,
+128,138,111,212,158,163, 71,143,158, 49,109,218, 52,156, 56,113, 2,251,247,239,135, 78,167, 67, 65, 65,205, 83, 28,154, 76,166,
+244,209,163, 71, 11,146,146,146,152,154, 28,172,250, 20,136,179,179,243,162, 97,195,134,125,229,237,237, 93, 62,173,139,209,104,
+ 44,255,206,203,203,195,140, 25, 51,204, 55, 68,176, 44,139,139, 23, 47, 78,253,250,235,175,145,151,151, 55,189, 58,206,190, 61,
+ 61, 35, 4, 4,225,193,254, 37,202,210, 47, 92,125,210, 17, 32,168, 59, 17, 49, 68,149,155, 44, 0,160, 83, 64,135, 58,197,157,
+ 64, 32,240,136,138,138,114,166,105,218,162,188,177, 44, 11, 63, 63, 63,139,246,117,115,115, 11,162, 4,244,254, 33,195, 63,109,
+208,193,207, 79,232,225,166,128,145, 97,240, 36, 57,181, 83, 76,116,100,135,115,199,127,155, 32,145, 72, 70,168, 84,170, 75,181,
+241, 24, 77, 44, 98,226, 30,226,252,181, 40,188, 75, 75, 80,162,213,163,168, 68,143,189,127, 92, 71,122, 86,193, 75,159,184,157,
+ 58,117,114,207,102,244,157,167,141,127, 79,246,195,143,123,100,211,198,191,135,213, 91,246,150,127, 79,253,116, 48, 86,253,184,
+ 71, 62,237,211,193,216,184,117, 87,215,166,157, 58,185,135,135,135,215, 56, 45, 64, 77,117, 68,154, 24,241,142,120, 37, 5, 0,
+217, 91,183,194,144,153, 9,183,133, 11, 1, 0, 19,125, 60,196,245, 73,179,143,143, 79,185, 32,174, 85, 56, 50, 76,122, 92, 92,
+ 92,199,186,196, 21,195, 48,156, 64, 32,248,246,234,233, 69,161,221, 58,181,170, 84,152, 73, 15,146,108,131,191, 91,248,225,193,
+ 51, 69,220, 71,111, 89, 39, 36,132, 47,175, 85,100,177, 44, 75,234,116, 58, 60,120,240,160,218, 40,251, 36, 73,154, 94,166,158,
+ 2, 3, 3,197,197,197,197,251,228,114,121,251,226,226,226,113, 44,203,126, 23, 22, 22,230, 66,146, 36,250,246,237,251,157,191,
+191,127,178, 88, 44,254, 81,171,213, 70,203,229,242, 17,151, 47, 95,214, 89, 72,221,211,218,218,122,239,239,191,255,222,192,207,
+207,143,204,201,201, 65,211,166, 77,145,155,155,219,233,202,149, 43,254,159,126,250,233,167, 69, 69, 69,163, 1, 92,169, 71,114,
+ 91,203,100, 50,110,204,152, 49,132,201,244, 87,118,127,254,249,103,248, 55,207,108,222,175,131,164, 68,107,224, 10,174,198, 74,
+ 62,231, 72,238, 90, 74, 74,205, 55, 38,130, 32, 60, 22,237,248,210, 89, 36, 18,193,104, 52,150,127, 56, 22, 0, 7,112, 44,192,
+177, 28, 56, 14, 0, 71,128, 53,177, 88, 61,119,199, 75, 95, 15, 86, 50,153,149,139,139,107,166,212,202,202,138,227,159,107, 60,
+120,252,227, 29,172,183,195,194,194,192, 48, 12,172,173,173, 65, 81,149,159,247,246,246,246,232,217,179, 39, 58,119,238,140,190,
+125,251,226,254,253,251,210,239,191,255,190, 70, 59, 98,228,204,129,104,216,210,197, 44, 34, 20, 87, 79, 68,133,252,180,232,176,
+163, 90,173,174, 56,215,224,184,137, 19, 39, 18,207,158, 61,195,208,161, 67,175,232,116,186,193, 0, 10,107,203, 64,108,108,108,
+199,216,216,216, 87, 86, 32, 4, 65, 12, 85, 40, 20, 56,112,224, 0,244,122,253, 11,219,109,108,108, 16, 23, 23, 87,241, 13, 18,
+ 29, 58,116,160, 8,130, 24, 10,160, 90,129, 69, 18,132,199,233,176,135,229,243, 52, 14, 27,212,129,238,215,211, 51,243,185,214,
+200, 1, 32,230,207,159, 95, 46,174, 56,142,195,226,197,139, 45, 78, 47, 77,211, 72, 76, 76, 4, 69, 81,120,220,163, 21, 0,160,
+109, 84, 26, 40,138, 66, 76,123, 55, 0, 64,215, 7,121, 16, 8, 4,144,203,229,150,138,171, 94, 46, 10,143,223,231, 46, 12,177,
+214, 26, 57,156,188, 24,142, 84,213,121,112, 28, 7,133,179, 61,186,249,251, 9,189,218,181,119,222,185,121,213,239, 0, 6,171,
+ 84,170,176,154,197,130, 9, 94,173,154, 97,247,239, 87,176,236,199, 80, 60, 43,212,162,168,164,180, 92,251,118,245,198,207,171,
+ 95,174,158, 40,138, 90,213,166, 89,179,134,187, 15,158, 69,183, 46,157,176,251,224, 25,116,237,210, 9,187, 15,149, 46,239, 57,
+116, 22,111,116,237,140, 61,135,206,162,173, 87,203, 70,207,158, 22,172, 2, 48,188, 70,247,162,106, 29, 13, 46,173, 35, 65,190,
+137, 48,215,205,211, 73,147, 74,203,167, 76, 96,213,251, 98, 43, 19,196, 22,184,198,117, 58, 87, 12,195, 32, 43, 43,139,200,207,
+207,231,236,236,236, 62,172, 40,178,204,226,234,183,211,133,208, 36,109, 36,126,253,245, 50,251,241,199,129, 9, 9,225,203,189,
+ 80,218,220,245, 2, 12, 6, 67,242,155,111,190,201, 1,128, 94,175,119, 23,137, 68,116, 21, 1,230,214,173, 91,183, 23, 4, 90,
+ 93, 77,135,197,197,197,251, 14, 29, 58, 52,196,197,197, 5,131, 7, 15, 62,231,237,237, 45,178,178,178,194,233,211,167,225,225,
+225,225,104, 99, 99,115, 42, 36, 36, 4,107,214,172,105,116,238,220,185,253, 0,134, 88, 80,148,125,131,130,130, 14,156, 56,113,
+ 66, 66,211, 52, 52, 26, 13,226,226,226, 96,107,107, 11,145, 72,132,193,131, 7, 83,221,186,117,115, 8, 10, 10, 58,156,148,148,
+ 52, 2,192, 5, 75,235, 72,163,209,112,115,231,206,133,149,149, 21,100, 50, 89,249, 71, 42, 50, 17, 91,130,155, 73,191, 90,145,
+ 33,157,255,245,199, 43,182,239, 60,126,137,101,185,239,210,210, 10,243,107,226,242,160,218, 97,206,172, 57,102,129, 10,145, 72,
+ 84,201,101, 55,255,166,105, 26, 29, 58,116,168, 51,109,109,218,180,217, 74, 81,148, 83,197,117,121,121,121,212,183, 11,230, 49,
+119,227,238,203,140, 12,100, 90,189, 17, 75, 23,127,199, 80, 36, 69,249,248,248, 28,229, 56, 46, 59, 62, 62,254,115,254, 81,199,
+131,199, 63, 75, 96, 65, 46,151,227,206,157, 59, 32, 8, 2,214,214,214,176,177,177,129,173,173, 45, 10, 11, 11, 17, 31, 31,143,
+196,196, 68, 36, 39, 39,131, 36, 73,120,122,122, 2, 47, 70, 15, 47, 31,106,185,111,245, 9, 72,228, 98, 16, 4, 16,208,175, 61,
+ 58,246,246,197,189,219,143,191,188,115, 14, 59,212,106,245, 3, 0,130,182,109,219,126,218,165, 75, 23,172, 89,179, 6, 58,157,
+110,109, 13,226,234,133,225,155,159,189, 39,184, 74, 11,200,134, 6,134, 77,219,246, 59,243,134,175,175,111,132,159,159, 95,211,
+187,119,239, 26,205,110, 86,213,102,178, 42,253,178, 42,113,230,228,228,128,101, 89,139, 93,161,252,252,106,239,177,247,170,186,
+ 82,102, 44, 13, 89, 99, 87, 84,144,133, 37, 43,127,129,209,104,196,204,153, 51,193,178, 44, 88,150,133,201,100, 66, 94, 94, 94,
+105,100,167, 58,242,110,206, 19, 69, 81,149, 4,112, 93,203,181,113, 58, 58, 58,202, 72, 74,184,127,214,252, 37,214,177, 73,233,
+ 56,113, 49, 28, 28,199,225,216,246,239, 0, 0,131, 39, 46,134, 82,157,141,110,254,109, 48,246,179,233,214,235, 66,230,239,119,
+116,116,108,158,147,147, 83, 92, 29,167,145, 97, 17,122,230, 38,212,207,158, 99,244,144,222,208,233,141,200,202, 84, 99,215,143,
+ 63,224,139, 79,142,160,129, 92,234, 42,117,106,150, 84,177,140,172,173,173, 41,173, 86,123,229,193,131, 7,227,107, 74,167,209,
+104,124,123,238, 87, 19,176,110, 71, 40,124, 60, 93,112,226,252, 45, 4,180,109,140, 83, 23,195,209,181, 93, 83,156,185, 28,129,
+110,190,158,184,116,243, 30,190,252,252, 99,204,254,242,202,219,245,170,163,229,107,236,138, 10,179,112,114,249, 30,100,109,218,
+132,148,169, 83, 17, 80,118, 78,220, 33, 73,208,238,238,128, 77,221,229, 89, 29, 18, 19, 19,161,211,189,104,212,136,197, 98,180,
+105,211,166, 86, 78,179,115,149,153,153, 73,100,102,102, 66, 38,147, 17, 9,113,247, 76, 94, 62,109, 63, 52,229, 30,220, 1, 0,
+165,206, 85, 33, 74,238,111,128,230,193, 70,208,249,119,201,237,139, 63,211, 79,252,110, 91, 66,133,107,244, 94,149, 23,149,242,
+242,233,220,185,115,226,181,107,215, 90, 87,112,129,193, 48, 12,205, 48, 76, 75,115,179, 33,195, 48,208,233,116, 24, 49, 98, 4,
+ 85, 91,222,165, 82,105,123, 23, 23, 23,220,190,125, 27,193,193,193, 34, 31, 31, 31, 60,120,240, 0, 36, 73, 98,220,184,113,240,
+246,246, 70,118,118, 54, 2, 2, 2,112,245,234,213, 14, 22,148,167,181, 76, 38,219,121,252,248,113, 9, 73,146, 40, 42, 42, 2,
+203,178,232,222,189, 59, 8,130,192,221,187,119,177, 96,193, 2, 28, 57,114, 4,191,255,254,187,212,223,223,127,103, 73, 73,137,
+ 23,128, 34, 11,234,136,211,233,116,156, 68, 34,129, 68, 34,129, 88, 44,134, 88, 44, 6, 77,211,208,232, 41,124,182, 48, 89, 39,
+ 20,203,217,246,237, 60,155,127, 49,113, 8,185,100,197,174,139, 0,142,213,196,169,226,226, 96,239, 67,224,220,174, 8, 12,158,
+212, 19,180, 80, 4, 90, 72, 67, 68,139, 32, 44,251, 77, 11,105,136,132, 98, 80,142,218, 58,207, 37,161, 80,232, 24, 21, 21,101,
+ 87,241, 90,102, 24, 38, 97,234,212,169,158, 67, 6, 13,116, 57,120,228, 4, 53,106,216, 96,147,171,139,115, 78, 90, 90,202, 67,
+ 0,118,254,254,254, 92,125,207,207,151, 0,207,201,115,190,118,112, 28, 23, 0,160,226, 11,134, 30,128,200,252,216, 46,187,183,
+ 57, 84, 89, 15, 0,217,101,223, 78, 53, 44,231, 0,136, 7,224, 85,182,206, 4, 32,156, 32,136,188,191,155,102,179,192,170,120,
+ 17, 18,213,100, 12,133,133,133, 40, 44, 44, 68, 90, 90, 26,182,108,217, 2,161, 80, 8,129, 64, 0,129, 64, 0,146, 36,203,251,
+ 43,212,132, 63, 79, 92,219, 8, 96,163,159,159,159,240,167,155,161,167,230,239,254,178, 79,231,126,254, 84,196,249,187, 31, 2,
+ 88, 10,224,237, 49, 99,198, 56, 2,192,158, 61,123,114, 0,156,182,216,197, 17,144, 13, 55,172,255,165,209,180, 47, 71,153, 5,
+133,199,142, 29, 59, 26,164,167,167, 87,122, 75,164,105,186,206,126, 89, 28,199, 29,122,248,240,225, 87, 10,133,162,252, 65, 82,
+177,153,144, 97, 24, 72, 36,146,114, 49,164,211,233,176,111,223, 62,134,227,184, 67,181,112, 34, 41,238, 79, 60,136,187, 4,147,
+137,173, 36,166,180, 90, 45,130,131,131,203,221, 43, 0,152, 84,230,148, 88,138,218,156, 43,138,162,112,205,179, 84, 9, 12,200,
+230, 94,232,171, 85, 21, 66,145,100,230,128,247, 63,182,103, 56,170, 92, 92,149,230,161, 84, 92,136,132, 2, 72,197, 66, 60,120,
+156,134,166,238,254,232,243,214,123, 13, 46,156, 58, 60, 19, 64,181,131, 16,140, 38, 22, 3,122,249,227,199, 3,151, 80,248, 92,
+139,194,252, 92,228,164, 37, 34, 33, 54, 28, 34,145, 8,183,110,221,178,182,181,181,179,110,214,172, 41, 76, 38, 22,215,110, 69,
+192,202, 74,138, 3,251,127,109,170, 51, 24,145,250, 52,121,124, 13,194, 86,208,173,163, 23, 10,115, 82, 33, 16, 8,208,205,175,
+ 57, 4, 2, 1,186,251,183, 4, 69, 81,232, 17,208, 26, 20, 69, 33,176,179, 55,154, 55,111, 14,150,101, 5,117, 92,188, 72,186,
+247, 39,146,226, 47,129, 99, 89,152,216,210,230, 95, 14,128, 65,173,126, 49, 95, 25, 25,224,108,156, 95,230, 38,129,111,190,249,
+ 38, 95,165, 82, 25,170,113, 14,233, 35, 71,142,216,213, 54, 17, 54, 77,211, 94, 2,129, 32, 33, 55, 55,151,181,178,178, 34, 77,
+ 38,134,245,242,105, 75, 93, 61,189,168,124,238,201,224,197,139, 66, 63,122,203,230,195, 95,118, 29,231,104,167,238, 4, 65,137,
+153, 9,223,109, 19, 65, 72,123, 1, 6, 75, 94, 26, 72,157, 78,135,251,247,239,215, 57, 41, 55,199,113,181,158, 80,197,197,197,
+ 99, 7, 15, 30,124,238,243,207, 63,151,152, 95, 94, 4, 2, 65,185,232,127,244,232, 17, 72,146,196,246,237,219,161,211,233,234,
+ 60,241, 5, 2,193, 87,135, 15, 31,182, 21,137, 68,229,226,138,227, 56, 80, 20,133,196,196, 68,172, 94,189, 26, 99,198,140, 65,
+106,106, 42, 20, 10, 5,102,206,156, 41, 95,177, 98,197, 87, 6,131,193, 18, 91, 56, 86,175,215,119,148, 74,165, 16,139,197, 48,
+ 11, 45, 0,136,124,228,114, 47, 57, 57,185, 93,163, 70, 50,215,166,222,119,255,232,213,163,189,175,131,131, 93,215, 39, 41, 5,
+199,106,124, 65,125,222, 8, 69, 73, 2, 4, 6, 6,226,242,229, 43, 24, 56,112, 32, 76, 52, 13, 86, 36, 2, 43, 18,129,163,105,
+ 64, 36, 2, 33, 18,129,179,178,178,232,244,161, 40, 10, 25, 25, 25,149,214, 77,156, 56, 49,229,227,143, 63,118, 6, 56,168, 84,
+ 74,110,250, 87,211,148, 57, 57, 57,156,139,139, 11,111, 33,240,248,183,161, 54, 45,226, 68, 16,196,137, 10,247,158,129,230,229,
+ 57,115,230,204, 11, 9, 9,137, 35, 8,226, 68,197,245,230,253,202, 12,137, 19,213, 45,151,253,215, 97,238,220,185,109, 87,172,
+ 88,177,188,107,215,174, 7,110,220,184,241, 4,192, 43, 19, 88, 68, 89,198, 44,154,191,174,186,135,116, 93, 2,203,140,168,168,
+ 40,163,155,155,219, 79,137, 17, 79,250,180,238,216, 18, 82,153,184, 31,128,141, 98,177,120,250,232,209,163,113,235,214, 45,220,
+187,119,239,103,212, 35, 50,183,129, 97,211,166,125, 57, 10, 6,134, 77, 51, 59, 84, 51,103,206,164,175, 93,187,102,168,201,193,
+170,137, 43, 43, 43,107, 97,120,120, 56,106,235,228,254,209, 71, 31, 85,124, 24,149,119,114,175,241,140, 97, 57, 24, 12, 70, 20,
+ 23,107, 74,133, 85,217,195,219,100, 50,161,184,184, 24,195,134, 13, 43, 23, 93, 44,203, 34, 43, 43,235,165, 42,147, 36,201,250,
+ 56, 87,213,115, 80, 84,255,246,190,126,194,139, 55, 98, 43, 61, 92,223,251,108, 41, 68,116,169,184,146, 74,104, 72,197, 66,164,
+169, 50,209,198,203,135,190,124,254, 68,255, 26, 5, 22, 99,194,198, 95,207, 3, 4,129,208, 19, 23,209,177,169, 21, 22, 45,248,
+ 6, 67,135, 14,133, 72, 36,193,225,195,135,176,106,243,110, 76,106,220, 24, 28,128,206, 29, 59, 96,229,214, 3, 88,178,120, 49,
+121,232, 96,104,143,186,210, 43, 20, 10, 65, 81, 84,249, 67,187,234, 55, 69, 81,117,138,132,242, 58, 50, 26, 81, 82,172,129,137,
+101,193,178, 28, 56,150, 5, 56, 14,238,203,150,193,125,217, 50,220, 33, 75, 7,240,121, 23, 23, 67,163,209, 0,189,218,215, 91,
+ 92,233,245,122,168, 84, 42, 67,108,108,108,117, 79,191, 76,189, 94, 95,107,122,231,205,155,151,180,124,249,114, 47,123,123,251,
+132,216,216, 24, 99,251,246,190,194,170,125,176, 90,181,108, 85, 16,188,120, 81,232,168, 79,222,253,112,235,130,225,204,231, 11,
+247, 10,204, 29,221, 67,207, 4,215,125, 61, 25, 12,201,125,251,246,181,168, 43,143, 70,163,201,168,105,155,185, 67,123,171, 86,
+173,196,189,123,247,198,149, 43, 87,176,108,217, 50,150, 97,152, 28, 0,232,214,173,155,211,146, 37, 75,136,248,248,120,216,217,
+217, 33, 43, 43,107,183,191,191,255,146,218, 58,190,139, 68,162, 94, 1, 1, 1,164, 78,167, 43,127, 41, 33, 73, 18,137,137,137,
+ 88,177, 98, 5, 70,140, 24,129, 86,173, 90,149, 95, 91, 65, 65, 65,194, 13, 27, 54,244,178, 68, 96,145, 36,249,101,159, 62,125,
+126, 64,233, 40,194,138, 55,185, 4, 0,179, 1, 32, 53,245, 89, 70,100,100, 82, 92,159, 64,191,142,205,155,186, 43,194, 35,159,
+214,200,247, 76,248, 8, 10, 63, 41,104, 33,141, 49, 95, 15,194,137, 19, 39, 48, 57,248,227, 50, 39,171,212,193, 18, 10,105,208,
+ 66, 17, 68, 78, 47, 55, 17, 65,217,125,132,176,177,177, 5, 0,216,218,218,154,239,113, 4, 0,142, 36, 73,190, 75, 22,143,127,
+ 19,234,212, 34,102,129, 84, 85,104,133,132,132, 12,172,186,174,162,152,170,238,119,197,255,174, 88,177, 98,121, 5,238,146, 87,
+145, 25,193,171, 42, 21,163,177,246, 57,154,131,130,130,166, 90, 91, 91,175, 55, 47, 63,189,174,196,211,235, 74,120,181,246,233,
+238,231,219, 49,127,196,136, 17,112,112,112,192,236,217,179, 57, 0, 59,235,115,236,109,191, 51,111, 84, 92,142,137,137,233, 24,
+ 19, 19,243, 82,249,200,203,203, 43, 42,235,172, 62,253, 21, 90,155, 48, 26,140, 40, 46,209,194, 96, 48,192,104, 52,129, 97, 76,
+240,247,182,198,222,109,223, 64,175, 55,192,104, 42, 93, 87,234,148,153, 32,166,117,232,217,217,195, 8,130,212, 92,185,149,106,
+ 83, 27,191, 79,100, 42, 40,138, 66,172,175,123,181,206, 85, 63,149,193, 98,161,197,177,166,214, 46, 46,206, 72, 61,115,187,244,
+ 45,220, 74,130,179,123,150, 64,102, 85,250, 38,255,246,152,121,165, 34, 75, 76,195, 96,208,195,217,165, 9, 24,147,177,117, 77,
+124,140,209,160,111,223,210, 29,118,214, 82,196,220,185,137,233, 83,198, 99,220,184, 79, 65, 75,172,113,249,242, 37,164,170,178,
+240, 40, 61, 15, 83, 22,254, 8,163,209, 4, 3, 99,130,145, 97,177,110,215, 9, 24, 76,117, 43, 35,154,166, 49,115,230, 76,105,
+ 77,219, 15, 28, 56,160,177, 72, 96,113,101, 34,184, 68, 3,157, 86, 7,189,161,180, 46, 76,205,132, 88,186,224, 99, 24,141, 70,
+104,134,119,133,193,104,132,233,203, 33, 48, 24, 12, 72,179, 18,144,221,253, 21, 70, 16,164,230,122,132,210,198, 82,129, 85, 83,
+122, 56,142,171,182,233,176, 38,145,213,190,189,111,194,152, 97, 29, 67,174,223,184,147,125,253,198,157, 23,246,107,214,170,227,
+227,207,151, 30,152,107,201, 40,194, 74, 54, 78,133,230,194,191,121,222,127, 23, 22, 22,230, 34,151,203,145,148,148, 4,138,162,
+ 64, 16,196,179,168,168, 40, 23, 0,120,231,157,119,114,132, 66,161, 3, 69, 81,248,234,171,175, 64, 81,148,211,228,201,147,191,
+ 5, 80,163,192, 98, 24,198,203,218,218, 26, 69, 69, 69,229,229, 40, 18,137, 48,103,206, 28,140, 26, 53,170, 92, 92,137, 68, 34,
+236,222,189, 27,254,254,254,208,235,245, 94,150,164, 87,169, 84,222, 1,240,134, 5,162,166,180, 95, 30,203,214,122, 98,201,139,
+ 27, 66,155, 44,130,137,166,113,224,216, 49,140, 26, 53, 10, 34,145,184,220,185, 2, 77,131, 16,137, 64,210, 52, 76,148,184,222,
+229,203,178, 44, 10, 11, 11,169,221,187,119, 55,243,241,241, 33, 56, 0,109,218,120, 19, 39, 78,158,108, 36,151,203,159,216,219,
+219, 27,192,131,199,127, 77,129, 85, 16, 72,175,130,107,206,156, 57,243, 0,112,115,230,204,153,103, 94, 14, 9, 9,209, 0, 80,
+253, 99, 4, 86, 93, 14,214,154, 53,107,106, 12,181, 96,126,184,108,216,176, 1,123,247,238, 93, 3,224,113,125,142, 61,113,176,
+224,182,149,148, 86,148,104, 12,234,237,199,152,206,237,219,183,143,232,218,181,107,179,136,136,136, 26, 29,172,154, 98, 99,189,
+142, 48, 13, 28,199, 65,111, 48,162,164, 68, 3,173, 94,143, 25,223,108,182,168,238, 13,250, 34,193, 59,111,245,148,214,229, 36,
+ 90,210, 7,171,174,166,193,202, 98,153,129, 89, 3, 60, 47,209, 34,104,196, 28,220,249,163, 84, 27,155,197,149, 84, 44,132, 68,
+ 36, 4, 73, 0, 68, 45,198,167, 81, 83, 56,232,235,169,227,175,110,249,121,175,199,123, 61, 39, 96,218,180,105, 16,136,172,208,
+192,193, 9,140,137, 67, 35, 55,103, 60, 74,207,195,225, 77,223,148,121,195, 28,122,142, 12,198,154, 5, 19,176, 42,184,238,183,
+122,138,162,176,105,211, 38, 77, 85,215,170,162,147,101,169, 8, 54,187,140, 26,157, 30,179,230,254,104,121, 29,245,127, 67,106,
+105,217, 86, 55,112,194, 82, 1, 86, 85,100, 1,160,128,154, 27,253,196, 14,128, 87,247, 1, 11,254,151, 55, 67,150,101,113,242,
+228,201, 23,220,213,170,117,104,169,219,202,178, 44, 82, 82, 82,112,239,222, 61,116,237,218, 21, 5, 5, 5, 16, 0,152,121,247,
+ 46,188, 71,143,134,174,172,235,130, 72, 36,194,196,137, 19, 95,215, 59,118,169,192, 34,106,175,168, 98,171,116,184,180, 21, 99,
+231,138,163,152,186,120, 12,156,218, 72,176,122,238,246,242,237,171,126, 10, 46,235,135, 37,130, 68, 94,255,100, 20, 22, 22, 10,
+126, 88,189,186,125,231, 78, 93,164,163,198,140, 35,245, 12,139,165,223,175,167, 14,238,223,227,176,103,207, 47, 82,137, 68,146,
+192, 63,142,121,252,215,240,170,196, 85, 85, 7, 43, 36, 36, 36, 46, 36, 36,228, 5, 55,236,181, 10, 44,138,162, 80,113,200,114,
+117, 15,121, 75,250, 96,205,152, 49, 3,214,214,214,213,110, 51, 24, 12, 92,108,108,108,188, 90,173,222, 81,219,219,107, 77, 16,
+ 9, 73,151, 53, 63,236,242,152,246,229, 40, 22, 40, 29,173,181,121,243,102, 59,115, 31,172,138,253,176,234,234,131,229,236,236,
+188,104,229,202,149,211,222,126,251,109,146, 36,201, 74, 15, 63,115, 88,134,138, 31,163,209,136,227,199,143, 79, 11, 9, 9,169,
+ 49, 76, 3,199,149, 54, 63, 21,151,104,160,213,149, 62, 96, 31,221, 11,181,244, 12,168,219,113, 40,115,174,186, 36,229, 86,235,
+ 92,157,113, 41,125,112, 13,200,174,155,139, 32,169,164,228,148,180, 78,174,142,118,200, 43,120, 14,113, 89,179,160, 25,102,113,
+ 37, 21,211,104, 96, 43, 71,238,179, 44, 8,133,194,218,220,145,148, 44,117,202, 27,195,134, 12, 56, 71, 82, 2, 73,197, 13, 66,
+169,141,213,249,235,119, 27,100,230,149,128,173,144, 79,150,227, 48,117,137,101, 38,166, 80, 40,196,228,201,147,107, 20, 56,199,
+142, 29,211,212, 95, 96,233,234, 87, 71,245,112, 50,235,114,176, 44, 21, 88, 85, 97, 30, 93, 72,211,180, 87,153,248,178, 24,237,
+219,183, 63,109,101,101,213,212,210,253, 45, 13, 58, 74, 16,196,226,222,189,123, 47,243,240,240,112,254,252,243,207, 9,129, 64,
+128,142, 29, 59, 58,246,237,219,183, 0, 0, 90,183,110,109,109,190,199,172, 91,183, 14, 9, 9, 9,217, 4, 65, 44,169,245, 90,
+ 23,137, 18,109,109,109, 59,246,238,221, 27, 5, 5, 5, 72, 77, 77,133, 92, 46,135,247,234,213,184,251,197, 23,240,221,186, 21,
+100,239,222,165, 2, 83, 44,198,221,187,119, 33, 22,139, 19,181,218,106, 59,145,195,205,205,173, 51,199,113, 43, 1,116,199, 95,
+205, 18, 28,128,235, 4, 65,124,173, 82,169,110,191,240, 39,146, 32, 75, 95,212,106,175, 40, 81,129, 11,116,105, 98,140, 29, 59,
+ 22, 52, 45, 2, 68, 34,204,154, 53,171,194,253, 72, 4,170,172, 63, 22,107, 18, 89,242,182,205, 85, 17,235,132, 88, 36, 18,143,
+249,228, 83,242,235, 89,211, 89, 35,195,176, 2,129,144,156, 57,127, 57,249,224,254, 61,113,113,113, 49, 73,212,231,205,138, 7,
+143,127,137,131, 85, 81,104, 85,112,161,106, 66,118,197,126, 89, 53, 9,180,138,125,178, 0,232, 94, 69, 90, 5,149,222,203, 42,
+227, 65, 76, 76, 76, 75, 31, 31, 31,164,166,166,214, 52, 82,174,116, 8,179, 84,138,135, 15, 31, 2,192,131,154, 14,116,233,210,
+165,141, 0, 54,154,151, 21, 10, 69,215, 94, 67,123, 93,247,237,237,135,208,181, 7, 11,212,106,181, 47,254,138,137, 69,184,185,
+185,141, 18,138, 4, 31, 53,111,219, 40,208,196,178, 43, 47, 29,191,190,168, 38,238,170,125,176, 24,134,121,233, 62, 88, 4, 65,
+ 12,125,251,237,183,201,248,248,120, 12, 27, 54, 12,191,252,242, 75,141,133, 55,106,212, 40, 28, 56,112, 0,253,251,247, 39, 87,
+172, 88, 81, 99,152, 6,142, 3,140, 6, 6,197, 37, 90,104,181,186,215,118,226,253, 93,231, 10, 0, 56,150,185,112, 55, 58,178,
+ 67, 59,255,174,194,228,180, 12, 72, 68,194, 74, 2,203, 74, 76, 67, 34, 46, 93,231,234,212, 0,225, 55, 46, 27, 24,198, 88,215,
+ 48,248, 20,131,246,249, 11, 65, 26, 57,130, 74,234,215,189, 93,131,106, 29,207,185, 99,208,238,183, 53, 22, 9,172,159,127,254,
+ 89, 83,147,123,101,105, 25,112, 28,202,155, 8, 75, 52,175,182,142,156,157,157,157,156,157,157,183,216,217,217, 73,204,125,135,
+170,219,110,107,107, 43,169,205,225,170, 75, 92,149,197,197, 74, 88,190,124,121,189, 68,150, 72, 36,106,122,253,250,245,150,230,
+126,129,181,125,235,245,122,124,244,209, 71, 22,217,130,145,145,145, 59, 59,116,232,240,200,201,201,233,124,183,110,221,196,241,
+241,241, 88,186,116, 41, 33, 20, 10,109,204,215,101, 81, 81, 17, 4, 2, 1,242,242,242, 64, 16,196,216,200,200,200, 51,181,113,
+234,116,186,176,176,176,176, 14,131, 6, 13,162, 18, 18, 18, 32, 16, 8,192,178, 44,116, 93,186,192,119,235, 86,220,155, 62, 29,
+ 61,147,147,161, 51, 26, 33,145, 72,112,230,204, 25, 67, 73, 73, 73, 88, 45,121,223,126,243,230, 77, 31,137, 68, 2,131,193, 0,
+150,101, 65,146, 36, 65, 81, 84, 15, 31, 31,159, 13, 0, 2, 42,238,223,164,137,147,115, 71,223, 86,173, 77, 44,107, 82,170,178,
+179,107,117, 43,173,179,225,228, 37, 46,239,111, 69, 11,105,208,130, 82, 97,101,118,174,104, 33, 13,154, 22, 65, 44,178,168, 9,
+159,171,122,238,152,251, 94,201,100, 86,108,139, 22, 45,226, 31, 60,124,228, 13,128,180,181,181,179,184, 95, 44, 15, 30,255, 52,
+ 13, 85,155, 80,170,120,137, 85, 88,206, 6, 64,148, 45,103, 87, 16, 82,217, 4, 65,220,225, 56, 46,160,202,190,230,237,250, 42,
+223,230,237, 49,175, 34, 35,181,221, 40, 7,140, 31, 63,126,235,155,111,190,217,103,230,204,153,144,203,229, 80,171,213,229, 23,
+173, 72, 36, 66,195,134, 13,161,209,104,112,229,202, 21,228,231,231, 95, 4,240,153,165, 7, 86,171,213,183, 30, 70, 63,120,214,
+ 99, 80,103, 7,175,206,173,237,210,147,210,187,168,213,234, 27, 0, 8,119,119,247,159,134, 79,127,251,147,160,247, 59,129, 22,
+ 9,145,246, 48, 3,151,142, 95,175,145,171,106, 31,172,191, 19, 27,139, 36, 73,138, 32, 8, 12, 27, 54,204,162,253,135, 15, 31,
+142,203,151, 47,163,182,230,196,210, 38, 66, 3, 74,138, 53, 40,121,133, 2,139, 32, 8,152, 76,166,114,231,202,252,233,167, 50,
+128, 36,201,114, 97,241,118, 22,107, 49,167,182,164,100,213,213, 11,199, 38,182,246,110,239,212,213,175, 21, 30, 60, 73,195,170,
+121,127, 53,181,204,154, 52, 28,187, 15, 28,135,155,171, 3,116,154,231, 56,123,234,120, 65, 97, 97,225,170,151,205,195,238,163,
+151, 1, 0,111,140,172, 60, 70, 96,216, 87,235, 44, 59,129, 5, 2,140, 27, 55,174, 70, 7,235,252,249,243,154,138, 78,100, 93,
+117, 84, 92,172, 69,137, 70,243,202,234, 72,161, 80,248, 6, 4, 4,156,223,182,109,155,131,163,163, 35, 84, 42, 85, 37,129,165,
+ 80, 40,124, 59,118,236,120,126,219,182,109, 14, 78, 78, 78, 72, 77, 77,181, 56, 68, 72, 21,113,133,236,236,108, 34, 47, 47,143,
+109,208,160, 65,189, 68, 22, 73,146,208,233,116, 72, 72, 72,176,244, 26,177, 56,232,104,211,166, 77,127, 89,191,126,189,248,233,
+211,167, 48, 26,141,136,143,143,127, 97, 16, 2, 69, 81,152, 51,103, 14,230,207,159,191, 5, 64,227,218,248, 24,134, 89, 59,122,
+244,232,241, 74,165,178,129,139,139, 11,212,106, 53,104,154, 6,199,113, 32,130,130,240,198,147, 39, 48,152, 76,144, 74,165,184,
+127,255, 62,118,236,216, 81,108, 48, 24,214, 86,199,229,233,233, 41, 2,208,146,166,105,124,252,241,199,149,182,237,217,179, 7,
+ 93,189,242, 58,218,117,162,159,155, 56, 90,247, 28, 94,167, 73,146, 36, 58,250,181,106,213,163,107,187,182,113,241,201,143, 84,
+ 89,185,215,107, 21,255, 5, 14, 48,168,196, 0, 77,255,213,223,170,172,207, 21, 37, 18,149,143, 40,228, 68, 34,176, 34,203,130,
+ 5, 87, 20, 77, 4, 65,192,193,193, 65,183,110,237, 42,177, 76, 38, 51, 1,128,181, 92,102, 58,184,103, 51, 28,236,237,117,220,
+203, 88,161, 60,120,252,115,157,171, 59,255,139,255,190, 22,129, 21, 21, 21,245, 4, 64, 95, 0, 35,175, 92,185,178,102,198,140,
+ 25, 78, 61,122,244, 64,110,110, 46, 26, 55,110, 12,133, 66,129,136,136, 8,196,196,196,228,112, 28, 55, 51, 50, 50,178, 58,171,
+167, 45,106,137, 57,163,122,172, 62,100, 40, 41,249,194,183, 71,107, 92, 14,189, 26,226,234,234,250,153, 64, 32,248,114,204,220,
+ 65,159,244,122, 47, 0, 73, 81,201,184,117,238, 46,212,169, 57,181,114, 90,210, 7,171,226,119, 53,125,176,202, 57, 89,150, 53,
+233,245,122,252,246,219,111, 22,137,172,253,251,247, 67,171,213,130,101, 89, 83, 77,121, 55,177, 38,194,218,198, 9,238,141,188,
+ 96,208, 23,131,101, 45,127,179,228,234, 40, 79,134, 97,176,104,209, 34,204,158, 61, 27, 75,150, 44,169, 85,136,108,222, 92,109,
+223,175, 74,156,121,121,121, 69, 98,177,120,212,129,159,215,135,142,156, 48,205,218,163,155, 47,118, 30, 60, 5,163,193, 8,137,
+ 88,128, 6, 54,114,180,104,234, 14,189,182, 4, 63,110, 92, 83,168,213,106, 70, 85,211,247,172,182,122,175,132,177, 67, 2,241,
+253,142, 63,112,117,223, 95, 6,229, 27, 35, 23,226,215, 31,166,194,207,111, 87,173,156, 38,147, 9, 66,161, 16,251,246,237,211,
+212, 52,154,144,162, 40,212, 34,176, 42,213,145,141,141, 19, 60,154,120, 67,175,125,254,202,234,200,193,193, 97,246, 79, 63,253,
+228,160,209,104,144,152,152,136,196,196, 68, 16, 4,145, 80,117,123,113,113, 49,238,221,187,103, 22, 57, 9,150,150,167,217,185,
+202,206,206, 38,212,106, 53,172,172,172,200,216,216, 88,109,251,246,237, 19, 80,214, 71,171,174,188,235,116,186,167,125,236, 87,
+186, 77, 0, 0, 32, 0, 73, 68, 65, 84,250,244,169,201, 49,114, 23,139,197,149,166,108, 50, 7, 29,173,166,169,240,133,116,166,
+165,165, 69,175, 95,191,190, 81,171, 86,173,176,125,251,118,157,181,181,181,104,198,140, 25,160, 40,138, 88,183,110, 29,151,155,
+155,107,152, 51,103,142,232,218,181,107, 40, 46, 46,142,182,224, 30, 82,164,213,106, 39,118,235,214,109,239,233,211,167,165, 45,
+ 91,182, 44,159,233, 97,247,238,221,152, 50,101, 10,164, 82, 41,146,146,146, 48,120,240,224,146,146,146,146,137,168, 28, 3,171,
+156,147, 97, 24, 66, 40, 20,114, 44,203, 98,193,130, 5,149, 2,139, 90, 89, 89, 65, 42, 50, 97,219, 98, 79,217,244,239, 51,100,
+211,190, 24, 61,186,244, 60, 97, 77,113,241,201,143,182,237,252,227, 18, 42, 71,137,127, 33,239,172,109, 1, 28, 91,150, 58, 88,
+ 66,115,204, 43, 90, 92,105,244, 96,105, 28,172,210,184, 88,117,229,189,106, 87, 12,123,123,123,198,223,223, 47, 94,163,209, 80,
+102, 45,229,232,232,120,175,108, 95,174, 97,195,134,250, 23, 79, 79,203,175,205,122,128,231,228, 57,121,212,211,193, 2, 0, 68,
+ 71, 71,239,243,241,241, 57,189, 98,197,138, 21, 71,143, 30,157, 48,109,218, 52,194,198,198, 6,135, 14, 29,226,114,115,115,119,
+137, 68,162,217,183,110,221,122,169,120, 17, 28,199,237,190,118,252,214,164, 17,211,223, 37,166,253, 48,182,123,116,216,189,132,
+246,221, 91,162, 93,183,150,136,184, 24,143,205,243, 14,252,194, 24,153,239, 50, 50, 50, 82,107,227,177,164, 15,150,249, 35, 16,
+ 8,234,140,131,117,244,232,209,105, 3, 6, 12, 32,195,195,195, 95,232,115, 85,177, 31,214,249,243,231, 97, 48, 24,112,232,208,
+ 33,182,182, 56, 88, 44,112,108,237, 15,223,141,249,121,207, 73, 17, 73, 24,112,243,202, 97, 20,228,101,212, 90, 54, 52, 45,196,
+175,251,143, 25, 4, 2,234,126, 45,105, 77,137,140,140,116,248,254,251,239, 41,146, 36,177,121,243,230, 74,206, 85, 85,220,189,
+123,151, 53, 26,141,117,214,149, 90,173, 62,207,178,236,240,173,107, 23,239, 14,234, 63,200,174, 77, 27, 31,129,179,115, 35, 8,
+ 72, 18,249,185,217,184,115,235, 26,115,230,228,239,249,122,189,126,172, 90,173, 62,255,119, 78,192,144,109,191, 87,187,254,131,
+105,107,234,114, 81, 24,163,209, 40,144,201,100, 96, 24,166, 90,113,213,167, 79, 31,233,245,235,215, 53, 6,131, 1, 20, 69,213,
+170,152, 74,235,104,225,152,159,247,190,218, 58, 50,153, 76, 94,121,121,121, 40, 46, 46, 70, 68, 68, 4,183,121,243,230,236,252,
+252,252,121, 21,183,231,230,230,162,168,168, 8,119,238,220,225,182,111,223,158, 93, 88, 88, 56,207,210,242, 51,199,197,202,203,
+203, 99,173,172,172, 72,163,209,104,108,223,190,189,132,166,105, 47, 75, 57, 98, 98, 98,222,170,105, 91,183,110,221, 30, 92,191,
+126,189, 69,197,185, 9, 25,134,161,117, 58, 93,203,193,131, 7,215,121,255,144, 74,165, 35, 14, 31, 62,188, 79, 34,145,180,211,
+106,181,227,179,178,178,118, 3,104, 68, 81, 20, 30, 62,124,152,195, 48,204,208, 5, 11, 22,252, 92, 92, 92,124, 87, 46,151,143,
+180, 48,201,255,143,189,239, 14,143,162,218,223,127,103,102,123, 73,111,187, 73, 72, 32, 13,210, 8, 9, 1, 2,132, 42,157, 32,
+ 40, 32,136, 74, 81, 81, 80,138,128, 20,175,210, 53, 8, 40,136, 10, 2, 34,196, 6,132,166,180, 32, 72, 9, 37,148, 20, 74, 42,
+144, 0,105,155,108,122,219,190, 51,243,251,131, 36, 23, 48,101, 19,245,119,239,247, 58,239,243,236,179, 59, 59, 51,239,156, 57,
+115,230,204, 59,239, 57,231,115,226,178,178,178,166, 4, 6, 6,126,183,114,229, 74,217,192,129, 3,249,174,174,174,232,222,189,
+ 59,178,178,178,112,252,248,113,227,214,173, 91, 53, 26,141,102, 6,128,211, 45,188,116,176, 0, 8,179,217,252,212, 28,166, 66,
+161, 16,124, 62, 31, 26, 61,137, 55, 63,204,214, 50,224,107, 63,217,240,195,113,150, 5, 81,168, 42, 45, 45, 42,174,188,198, 51,
+153,226, 31,169,106, 91,156,235,137, 46,149,162,163,117,112,227,203, 29, 65, 16, 32, 25, 18,132,145, 0, 69, 83,160, 76, 20, 8,
+ 30,239,177,187,101,217,116, 87,172,217,108, 70, 84, 84, 20,142, 29, 59,134,113,227,198,177,104,161,175,200,177, 99,199, 96,137,
+123,203,129, 3,135,255,144,192, 2,128,212,212,212, 74, 0,111, 17, 4, 17, 51,103,206,156, 99, 12,195,240, 25,134, 25,125,243,
+230,205,139,127,230,224, 69, 69, 69, 73, 87,142, 39,126,224,228,102, 27, 61, 98, 74, 95, 4,245,240, 4,109,166,113,249, 68, 10,
+118,127,114,100,111,126, 94,254,116, 60, 61, 87, 97,147,176,164, 15,214,179, 14, 86,115, 92,106,181,122,197,218,181,107,241,241,
+199, 31,183,121, 20, 97,115,219, 36, 36, 22,190, 21,209,157,113, 31,255,124,223,225, 36, 65,176,250, 22,250,217, 16, 4,216,134,
+158, 22, 60, 30,149, 25,127, 45, 63,164,133,252,123,110,246,236,217,191,147, 36,233,249,132, 21,138, 22, 30,246,170,178,178,178,
+ 97,150, 92,155,226,226,226,147,110,110,110,157, 47,196,253,186,236,210,153,147, 3,105,218,232, 67,128,128, 64, 32,184,111,162,
+205,231, 77, 6, 67,116, 65, 65,193,159, 14,196,182,236,173,113,120, 84, 88, 10, 30,143,122, 28,123,170, 62,160,233,193, 45, 11,
+ 16, 22,246, 99,179,251,137, 68,162,147,223,125,247, 93,212,107,175,189, 70,240,120,188,198,102,183,134,243, 39, 73, 18, 87,175,
+ 94,213, 26, 12, 6,236,222,189,155,149, 72, 36, 45, 6,174,253,187,174, 81,109,109,237,140,177, 99,199,238, 1, 32, 2,112,175,
+170,170,234,109,149, 74,149,255,228,250,113,227,198,237, 1, 32, 34, 8,226, 15,235, 91, 67, 67,200, 6, 59, 59,187,244,122,231,
+ 74,220,158,142,238, 45,148,111,170,185,230, 67, 75,154, 10,235,231, 22,124,177, 97,185,123,247,238,171,103,205,154,245,228,100,
+207,241, 0,188,219,145,180,211, 90,173, 54,232,195, 15, 63,156, 39,145, 72, 6,105,181, 90,127, 0,144, 74,165, 25, 26,141,230,
+156,209,104,252, 2, 64,101, 75, 4,217,217,217,134, 78,157, 58,101,153,205,230, 96,103,103,231,198,209,135, 66,225, 99, 55,233,
+106,134,125, 98, 97, 97, 97,143,199,227, 52,175,181,245,229, 49,191, 37, 71,185,185,125, 90, 90,111, 48, 24, 74,174, 92,185, 98,
+127,230,204, 25,138,166,105,196,197,197, 53,190,244, 53,213, 26,152,157,157, 13,131,193,160,227, 30,115, 28, 56,252,103,240,119,
+143, 48,177,200, 66, 84, 42,149,147,196, 50,209,108,207,206,202,144,194, 28,117, 90, 77,165,230, 71,149, 74,181, 29,143, 67,214,
+115,246,233,255, 40,167, 64, 98,117,138,160, 4,158,205, 62,112,104,227, 35,163,182,102,120, 83,156, 61,123,246,116, 19, 8, 4,
+ 27,244,122,253,200,150,162,180, 83, 20,101,150, 72, 36, 39,117, 58,221,251, 77, 76,246,252,127, 46, 63, 87,174, 92,217,164, 37,
+ 97,233, 40,194,149, 43, 87, 50,109, 73,103, 72, 72,200, 57,169, 84,170,108,106,157, 70,163,201,189,117,235,214,176,255,146,252,
+124,114, 4,160,197,156,237, 26, 69,248, 31,186,143,220,220,220,196,214,214,214, 27, 72,146, 84, 90, 40,142, 13,106,181,122, 65,
+ 89, 89, 89, 17, 87, 47,113,156,224,154, 8,255,231, 16,204,113,114,156, 28, 39,199,201,113,114,156, 28, 39,199,249, 79, 3,215,
+ 64,207,129, 3, 7, 14, 28, 56,112,224,240, 23,131,104, 65,133,182,197,250,107,143,146,189,195,113,114,156, 28, 39,199,201,113,
+114,156, 28,231, 63,142,179, 53,110,174,233,241,111, 18, 94, 28, 39,199,201,113,114,156, 28, 39,199,201,113,254,243, 56,255,167,
+192, 53, 17,114,224,192,129, 3, 7, 14, 28, 56,252,167, 4,150,204,197, 63,192,209, 51,100,143,157,123,215, 91,118,238, 93,111,
+ 57,122,134,236,145,185,248, 7,252, 19, 51, 77,169, 84, 74, 20, 10,197,148, 14, 29, 58,156,238,214,173, 91,181,171,171,235,123,
+ 92, 81,106, 59, 6, 0,188, 73,192, 59,175, 1,185,175, 1,185,147,128,119, 6,252,133, 19,144,255,183, 96,245, 59,174, 17,241,
+ 39,167,156, 92,253,142,107,147, 1,216, 86, 46, 84, 58, 92,138,155,248,197,178,119, 92,237,255,162, 67, 90, 57, 59, 59,239,112,
+113,113,121,232,236,236,252,200,217,217,249, 59, 0, 54, 92,137,227,192,129, 3,135,255,127,176,232, 97,102,231, 17,252,134,143,
+151,207,251,171, 87, 44, 35,220, 20, 78, 82,147,153, 54, 62,120,152, 31,184, 98,237,186, 3,133, 66,222,231, 21,185,119,190,109,
+199,177, 9,119,119,247, 73,124, 62, 63, 10, 64,131, 80, 75, 55,153, 76,199,242,243,243,247,193,178,225,214,232,218,181,235, 37,
+138,162, 60,218,114, 96,134, 97, 30,222,186,117,171,127,123, 50,204,213,213,117,162,171,171,235,119, 17, 17, 17,210,208,208, 80,
+ 8, 4, 2,172, 95,191,126, 97, 97, 97,225, 38,203,149,197, 0,158,115,165,253,107, 20,143, 55, 6, 64, 8,203, 2, 32,168, 91,
+140,201,120, 92,109, 87,182, 7, 23, 46, 88, 20, 70, 92,161, 80,124, 64, 16,196,180,250,188,250, 86,165, 82,109,248, 59, 10,137,
+ 82,169,236, 64, 16,196, 32,150,101,253, 73,146,188,205, 48,204,111, 42,149,170,236,207,242,186, 0,111,245,137,140,252, 98,234,
+194,133,148, 54, 62, 30, 95,124,247,221,102, 84, 87, 3,192,215,109, 45, 75,189,122,133, 78,176,178, 66, 20, 1,132,129, 0, 65,
+130, 77, 41,175, 36, 79,220,184,145,188, 15, 22,196, 82,107, 14, 97, 97, 97,199, 1,140,170, 95, 60,145,156,156, 60,186,173, 28,
+ 21,217,204, 71, 34,190,127,191,138,251,231, 62, 2, 48,242,217,245,102,157,120, 42,197,239, 16, 69,177,201,121, 0, 62,251,147,
+217, 42,117,114,114,186,117,228,200, 17,247, 94,189,122,241, 0, 32, 49, 49,241,181,168,168,168,193, 37, 37, 37,193, 0,170,255,
+ 19, 21, 77, 68, 68,132,157,217,108,142,161, 8, 34,130, 97, 24, 91, 0, 32, 73,178,146,102,217,171, 60, 30,111,106,123,131, 21,
+115,224,192,129,195,255, 89,129, 37,115,238, 18,232,231,227,187, 48,238,112, 76,135,202,242, 74,221,215, 27,246, 36,107,121, 66,
+ 77,167, 64, 63,193,150,207, 63,181,125,119,254,162,249, 70,189,233, 90,157, 58, 51,205,210,131, 42, 20, 10, 15,145, 72,116,232,
+131, 15, 62, 8,142,140,140,228, 59, 59, 59,163,184,184, 24,153,153,153,193,151, 47, 95, 30,119,228,200,145,133,122,189,254,197,
+214, 34,184, 3,128, 76, 40,240,218,247,233, 39, 10,161,173, 29, 88,218, 12,219,160,110, 0, 0,150, 97,160, 58,127, 26,140,201,
+ 4,150,161,225, 62,226,249,199,255,179, 44,122,246,236, 41,104, 79,102,185,185,185,185,250,249,249,253,176,116,233, 82,129, 94,
+175, 71, 74, 74, 10, 18, 18, 18, 24,181, 90,189,206, 82, 14,231,224,113,129,100,141,232,192,216,113, 35, 59,142, 30,234, 44,244,
+ 84, 56,129, 97,196,200,204, 49,122,156,190,152, 60,226, 68,220,111,239,211, 1,227, 38,150,164, 31,185,221, 18, 79, 80, 80, 80,
+ 68, 69, 69,197,199, 5, 5, 5, 13,194,111,125,207,158, 61,151, 63,185,205,179,193, 7, 25,134, 1,143,199, 43,214,104, 52,147,
+ 82, 83, 83,147,155,226,253,240, 13,152,204,230,199,229,130,199, 3, 29,243,155,251,225, 65,131, 6,117,154, 49, 99, 6,194,194,
+194,144,152,152, 56, 40, 54, 54,118,222,241,227,199,111,152, 76,166, 19, 34,145,232,252,163, 71,143,218, 53,193,162, 0, 88, 60,
+117,225, 66, 74,254,240, 33,228, 41, 41,120,165,186,154,247, 41,176,184, 45, 2, 43, 44, 44,204,203,193, 14, 7,198,189, 56, 32,
+ 64,161, 8, 20,240,249,142, 96, 89, 22, 38, 83,121,231,146,146,244, 9, 54, 54, 88, 90, 85, 69,141,191,113,227,198, 61, 75,248,
+194,195,195, 93, 24,134,249,134,101, 89, 1, 65, 16,115, 0,140,138,139,139, 3, 77,211, 24, 61,122,244,168,176,176, 48, 47,150,
+101,191,148,203,229,172, 86,171,125, 61, 49, 49,177,184, 37,231,170,242, 62,243,145,138,242, 30,209, 37,124, 26,138,120,167, 70,
+188, 55, 12, 39,109,189,201, 53,203,191, 46,188, 10, 0, 35,188,189,173,170, 10, 36, 75,228,214,193,246, 85, 5,167,151,140,240,
+246,222, 25,151,157, 93,211,222, 27,218,213,213,117, 67, 76, 76, 76,135,136,136,136,198, 32,185,161,161,161,212,250,245,235,221,
+ 22, 44, 88,176,185,162,162, 98,186,133,162,186,179,131,131,195, 41,134, 97,244,105,105,105,157, 27,254,119, 10,121,161,143,131,
+149,236,185,146,138,154,248,178,180, 95, 46, 88,194,213,189,123,247, 25, 4, 77,239,248,252,195,119,169,128,144, 16, 72, 29,157,
+ 97, 44, 44, 68,157,217,100,127,245,102,234,232, 79, 55,237, 40,233,222,189,251,204,164,164,164,239,184, 42,153, 3, 7, 14,255,
+ 24,129, 37, 18, 9,151,174,248,215, 18,162,162,172, 82,107,172,169, 54, 74, 89,131,217, 90, 42, 38,170,213, 37,149, 15,172,165,
+154, 5,243,231,138,151, 44,253,215,210, 58,224, 21, 75,197,149,191,191,255,245,157, 59,119, 58,219,219,219,163,170,170, 10,101,
+101,101,184,126,253, 58, 88,150,197,200,145, 35, 69,221,186,118, 13,251,124,211,166, 4, 0,189, 91, 19, 89, 60, 62,143,224,203,
+100, 56, 56, 32, 12,164, 64,128,241, 25,170,199,226,194,100, 68,220,228, 49, 0, 0, 74, 40,196, 75,119,213, 0, 0,177, 88,220,
+238,204, 98, 89,182,119,223,190,125, 5, 0,176,112,225,194,234,186,186,186,104,130, 32,126, 82,169, 84, 5,150,236,239, 16, 60,
+198,207,209,201,233,194,198,181,111,218, 7,123,121,195, 96, 50, 33, 95, 93, 0, 22, 66, 40,156,101,120,101, 92, 55, 65,223,112,
+129,239,103, 95,255,126,158, 32,159,239,175, 78,253, 53,181, 89, 97, 41,147,197,108,222,188, 25,251,247,239, 7, 0,156, 59,119,
+ 14,126,126,126,178,214,210,144,153,153,233, 61,109,218,180,189, 0,124,155, 90,111, 54,131, 23,253,241, 79, 0,128,152,157, 83,
+168,172,172,172, 78, 18,137,228, 9,243,109, 0, 6, 12, 24, 64, 70, 71, 71,247, 58,119,238, 92,175,189,123,247, 26, 77, 38,211,
+230,194,194,194,216,246,228,169, 54, 62, 30,242,148, 20, 32, 62,190,205,251,118,235,214,205, 35, 32,192, 33,225,179,141,203,157,
+142, 30, 75,197,198,141,223,225,254,253,251, 0, 0,111,111,111, 76,121,121, 34,255,167, 31,191, 9, 90,186,116,229, 21,154, 14,
+139, 76, 78, 78,110, 53,186, 57,195, 48,223, 68, 71, 71, 63, 47,151,203,177,116,233,210, 44, 47, 47, 47, 88, 91, 91, 99,251,246,
+237,176,179,179,131,201,100,202, 90,191,126, 61,175,176,176, 16, 91,182,108,217,245,132,187,245, 7,244, 31, 53,224, 35, 17,223,
+191, 95,151,240,105,144, 91, 43,177,243,231,125,200, 76,220,211, 79,111,202,248,104, 25, 46,188, 74,177,162,105,234, 92,217,210,
+ 78,225, 3, 29,124,131,198,162, 99,247, 20, 71, 61, 29,159,243,225, 80,175,117, 60,177, 46,102,229,103, 77,184,132, 19, 98,169,
+224,234, 27,246,119, 78,203,202,128,198,160,161, 68,253, 7, 12,139, 49, 3, 6, 12,160, 26, 4,246,195,135, 15, 97, 48, 24, 16,
+ 24, 24, 72, 26, 12,134, 65,150,138,171,254,253,251, 95,250,225,135, 31, 28,250,245,235, 87,242,212,253,235, 96, 59,252,194,161,
+205,115, 63,254,226, 71,255,239, 89,162,178,181, 23,129,238,221,187,207,232,218,217,251,219,205,235, 87, 16, 84, 93, 62,120,182,
+101, 0, 83, 6,213,222, 93,128,212, 30,163,223, 94,128, 30,189,122, 81,115,231,127,240, 45, 17, 30,206, 38, 38, 38,238,230,170,
+101, 14, 28, 56,252, 35, 4, 22,195, 50, 33, 78, 78,246,226, 45, 27,246, 36, 42,197, 36,161,112,119, 37,132,214,182, 60,200,101,
+ 34,146,226,107,189,189,221, 5, 12,203, 52, 55, 85,200,179, 67, 45, 9,145, 72,116,104,247,238,221,206,124, 62, 31, 12,195,192,
+201,201, 9, 57, 57, 57,168,168,168, 64,109,109, 45,238,167,167,163, 99, 7,119,204,157,249,166,114,205,198,207, 14, 1, 8,199,
+211,205,133, 79,113,178, 12, 11,198,252,116,139, 26, 65, 16, 77,182, 47,182, 48,141,140, 69, 67, 66, 25,134,121, 80, 88, 88, 8,
+169, 84,138,128,128, 0,249,141, 27, 55, 46, 22, 22, 22, 22, 88,196, 57, 97, 2, 37,120, 68,252,186, 97,237, 36,123,130,202, 66,
+ 86,110, 37,124,220,123,194,193,166, 3, 10, 74,106,145,148,118, 2, 89,247,143,195,199,221, 3, 51,167,248,216,110,250,166,228,
+ 24,194,102,250, 32,121,135,169, 41,206,154,154, 26,185,135,135, 7,220,220,220,192, 48, 12,104,154, 70,106,106,106,227,239,134,
+249, 18, 27,126,111,254,233, 50,236,168, 82, 76,122, 97, 20,202,203,203,229,150,158,123,131,184, 58,240,153,107,144,182, 78, 37,
+ 0, 0,137, 76,105, 28,191,160, 32,181, 71,143, 30,112,114,114, 18, 92,185,114,101, 1,128,216,182,230,167, 17, 88,255,197,238,
+221, 91, 94,169,170, 34, 1,224, 91,130, 96,140,143,163,106, 91, 84,150,156, 28,137,195,155, 54,125,228, 68,176,105,176,183,249,
+ 20,215,175, 63,130,209,248,248,202,151,149,169, 49,231,157,106,240,120, 86,248,236,179, 21, 14, 47, 77,154,117, 16,143, 71,189,
+ 48, 45,165,147,101, 89, 65, 70, 70, 6,130,130,130,176,119,239, 94, 30, 69, 81,184,118,237, 26, 36, 18, 9,166, 77,155,134,224,
+224, 96,158, 68, 34,193,197,139, 23, 81, 93, 93, 77,180,148,206,248, 19, 23,214, 84,100,159,251,168,136, 58, 53, 98,231,207,251,
+240,230,203,147,160, 48,103, 95,180,243, 33,215,140, 28,221,103, 57,197,239, 16, 37,179, 10,182,243, 11, 30, 11,129, 80,142,119,
+ 23,175, 70,214,157, 95,237, 52, 53,183,223,161, 77,121, 29, 86,126, 22, 59,239, 15,233, 60, 48,145,158,186, 59,190,251, 25,143,
+100,207, 59, 41, 51,175,169,146,119,220,250,247,161, 3,120, 32,181,182, 13,226,234,222,189,123,184,127,255, 62, 40,138,130, 86,
+171,125,106,162,224, 39, 57, 67, 67, 67,223,162,105,122, 57, 0, 24, 12,134, 61, 18,137,100,198,151, 95,126,233, 64, 81,255,158,
+ 41,170,193,185, 42, 86,151, 85, 92,185,145,154,185,224,173, 9, 3,227,175,222,201, 51,242,199,230, 86,221,250,165,170,169,252,
+140,136,136,176, 35, 25,102,199, 23, 27, 87, 17,116,246,239, 16, 5, 12, 4, 79,238, 7,218, 84, 0, 93, 69, 45,180, 57, 69, 48,
+110,255, 10,222,111,207,199,134,245, 31, 19, 47,191,250,250, 14,111,111,239, 67,217, 79, 59,120,127,199,112,109,142,147,227,228,
+ 56,255, 59, 57,255, 89, 2,139, 32,200,106,163,209,196,183,238,224,102, 26,255, 98,255,174,201,215,238,100,201,237,109,200,110,
+ 61,187, 6,222,201,202, 79,130,153, 54, 18, 4,105, 81,191, 14,119,119,247, 73, 43, 86,172,232,106,109,109, 13,134, 97, 96, 99,
+ 99,131,146,146, 18, 24,141, 70, 84, 87, 87, 67, 95, 91, 3, 99, 77, 53,110,230, 62, 68,228,192,129, 24,218,187,119,192, 9,147,
+105, 82,126,126,254,222,230, 56,105,146, 98, 29,194,122, 98, 98,118, 25, 24,163, 1,177,222, 14,141,174,213,228,135,149, 32, 8,
+ 2,180, 65,143, 19, 61,125, 33,146,203, 16,242,254,138,118,103, 86, 81, 81, 81,242,153, 51,103, 78,142, 24, 49, 98,228,204,153,
+ 51,201,162,162,162, 56,179,217,220, 87,173, 86,183,218, 60,234,124,151,158, 54,117,102,152,183,163, 45,137,163,151, 79, 33,194,
+255, 5, 72, 69,124,148, 84,104, 65, 18, 4,238, 63, 56, 3,154,150,225,102, 70, 46,122, 7,203,208,175,151,141,123,237,239,229,
+ 51, 75,155,111, 46, 35, 42, 42, 42,160, 86,171, 97, 50,153, 96, 54,155, 49, 97,226, 68,196,236,217,131,186,186, 58,232,116, 58,
+ 24, 12, 6, 48,204, 99, 61, 81, 84, 82,139,235, 55,227, 16,222,181,115,131,227,209,116,129,224,193,252,229,230, 41, 60, 43, 41,
+ 32, 16, 57, 25,107,106,106, 32,147,201,160,173, 83, 9,166,190,217,232,108, 9,206,157, 59,135,164,164, 36,184,186,186, 90, 84,
+142,154,194,125, 96,199, 3,154,254,112,228,225,195,206,151, 15, 31,102,174, 30, 61,154, 47,170,169,217,110,201,190,189,122,133,
+ 78,120,247,221,209, 1, 18,177, 4,249,185,155,225,239, 47,192,194,247, 28, 16,253,105, 41, 0, 96,238,187,238, 8, 15,119, 64,
+117,229, 1, 56, 58,127,128,133, 11,198,249,212,214,178,175, 37, 36,164,236,105,185,188, 19,115,126,252,241,199,172, 97,195,134,
+241,146,147,147, 33, 18,137, 32,145, 72, 32, 22,139, 33,145, 72, 80, 84, 84, 4,131,193,128,216,216, 88,115,125, 19, 98,179,168,
+111, 6, 28,249,222, 80,156,204, 76,220,211,207,141,204,185, 57,110, 65,159, 7,201,215,110,214,158,253,253,242, 26,179, 78,156,
+ 87,153,127,122,137, 87,143,155,142,239,188,191, 10, 95,109, 88,129,204,107, 23,202, 93, 60,106,190,166, 9,125,147,233, 28, 48,
+ 96, 37,207,221, 93, 97,154, 61, 99,188,205, 49,229,149, 55,143,241, 80, 90, 92,126,123, 35,178,175,107, 69,126, 65,175,118,246,
+ 34, 12,103,207,158,149,244,239,223, 31, 90,173,246,241,189, 64, 81,248,241,199, 31, 25,179,217,124,174, 41, 78,147,201,180, 60,
+ 41, 41, 73,169,209,104,240,242,203, 47,207, 93,185,114,165,140,207,231, 63,190,191,104,250, 41,231,106,237,166,239, 79,205, 95,
+254,245,185, 83,123, 63,117, 93,187,116,198,192, 87,222,253,248, 28,128,184,166,221, 80,115,204,166, 79,151, 81, 34, 91, 35,136,
+ 30,195, 96, 84,107,241,232,219,153, 48, 84,105,209,121,205,106, 0, 2, 24,140, 20,142,141,155, 8,202,222, 21,111,244,239,203,
+219,126,225, 82, 12,128,113, 92,213,204,129, 3,135,103, 94,126,123, 0,112,170, 95, 44,173,127,142, 57, 0,104,112,217,157, 0,
+ 24, 0, 8,159,216,237,217,229, 39,183,125,118,249,201,223,165,245,198,142, 19, 30, 79,217,119,157, 32,136, 54,247, 19,109, 24,
+ 69,248,164,225,195, 62,227,218,196,223,207,126,168, 29, 56, 32, 92,121,238,250,221,228, 17, 47, 12,237,217,127,112,175,136,226,
+178,234,108,133,147,181,236,202,181,171, 34,134, 97, 44,106,223,225,243,249, 81,145,145,145,188,138,138, 10, 72,165, 82,148,148,
+148,160,160,160, 0, 70,163, 17,218,170, 74,232, 43, 43,160,173, 40,135,169,166, 18,247,111, 92, 67, 23, 15, 55, 81,125, 39,120,
+139,240,172, 67,213, 48,131, 61, 65,146, 16, 91, 91, 65, 98,109, 13,138,106, 91,100, 10,165, 82, 57,182, 75,151, 46, 87, 93, 93,
+ 93, 63,172,127,195,127, 39, 58, 58,186,148,101, 89, 44, 89,178,196,218,218,218, 58,214,211,211, 83,212, 26,143,149, 61, 61,161,
+ 87, 87, 95, 42,235,209,109,132,251,141, 71, 39,101,127,220, 47,168, 66, 73,149, 14, 69,229,117,232,220,249,125, 56,185,190, 9,
+ 27,197,219,184,157,153, 7,165,162, 19, 73,241, 5, 35, 90, 17,124, 79, 45,255,252,211, 79,208,104, 52,240,245,245,197,228,201,
+147,177,120,241, 98, 76,154, 52, 9,174,174,174,232,231,203,195,140, 87, 39, 64,173, 86,183,152,206,181,223,130,191,238, 39,101,
+242,212, 21,108,178,239,115, 39, 83,239,223,191,143,172,172, 63,182,172,253,254,251,239,168,170,170,106,124, 0, 91, 2,103,103,
+231,101, 10,133,226,150, 66,161, 72, 85, 40, 20, 39,138, 93, 93, 51, 76,222,222, 46,125,199,141, 35, 2, 95,122,137,202,147,201,
+136, 7, 29, 58,200, 45,225,178,182,198,232,240,240, 72, 97,101,197,119,141,166,212,140,233, 78,184,116, 33, 8,151, 47,118,199,
+156,119,189, 65, 18, 98, 16,164, 0,154,186,223, 17, 24, 20, 44,176,178, 98, 91, 44, 75,245, 29,218,179,131,130,130,120,179,102,
+205,130, 72, 36, 66, 76, 76, 12,182,109,219,134,207, 63,255, 28, 89, 89, 89,240,244,244,132, 82,169,132,139,139, 11, 15, 64,118,
+253, 62, 45,194,214,135, 92,163, 55,101, 92,180,243,147,101, 19,164,115, 31,189, 89, 60,126,229,103,170,178,181, 91,115, 62,123,
+144,169,245,206,184,118,161, 44,235,206, 47, 76,206,141,115,165,133,119,107,189,215,110,205,249, 44,250,235,194,242,166,184, 46,
+ 92, 88, 65, 31, 57,113,193, 88, 87,171,225,141, 29,249,156,246,237,233,147, 59,219, 75,187,252, 8,183, 97,161, 29, 59, 40, 95,
+ 93,241,201, 22,195, 27,179,230, 27,191,221,245, 29, 91, 83, 83,131,234,234,106,124,241,197, 23,230,163, 71,143, 22,208, 52, 61,
+191,153, 36, 82,245,130, 8, 19, 39, 78,148, 73, 36, 18,228,229,229, 53,186,160, 0,160, 42, 41,187,125,249,198,157,140, 5,111,
+ 79, 28, 80,167,215,235, 79,157, 79, 76, 15,244,243,116, 39, 8,182, 99,115,231, 77, 17, 68, 68, 80, 72, 8, 88,182, 18, 36,207,
+ 3,249,223,111,132,182,168, 28,154,146,114,144,124, 25, 76, 16,195,200, 10, 33, 14,233,137, 71, 73, 41,112,145, 91,131, 71, 16,
+125,185, 71, 9, 7, 14,255, 92, 29,213,156, 22, 1,224, 68, 16,196, 49,130, 32,142, 45, 91,182,108, 16, 0, 7,130, 32,142,213,
+139, 32,167,250,223,194,134,109,154, 89,118,122,146,231,153,125,159,252,237,184,108,217,178,193, 4, 65, 28,235,211,167,207,171,
+245, 66,174,205,104, 85,109, 80, 58, 67,244,178, 15, 87,144,214,114,161, 85, 96, 64, 39,187,163,191,197, 39, 95,190,154,146,110,
+ 37, 21,139,106,235,234,132,159,127,185,205,131,208,104, 45,237,228, 29,224,232,232, 8,163,209,136,123,247,238, 33, 63, 63, 31,
+ 70,163, 17,102, 77, 29,244,149,149,208, 85, 84,128,209,212, 66, 64, 51,208,150,150,192, 78, 44, 4,254, 61,194,176, 37,101,219,
+ 40,166,154, 18, 92, 4, 65, 64,108,109, 5,161,149, 28, 36,143,178, 56,115, 20, 10, 69,247,208,208,208,253,103,207,158,237, 21,
+ 25, 25,185,198,211,211,211,166,184,184,248, 81,113,113,241,115, 27, 54,108,208, 59, 57, 57,225,149, 87, 94,233, 98, 50,153,166,
+182,198, 37, 16,235,187,122,186,248,193,195,101, 44, 92, 29, 34, 80, 86,173, 71, 73,165, 22, 69,101, 26,236, 59, 56, 25,167, 79,
+ 78, 70,202,197, 87,113,239,218, 12,148,213, 89, 67,108, 63, 8, 0,219, 98, 32,183,171, 87,175,226,155,111,190,105,252,124,245,
+213, 87, 40, 47, 47, 71, 80, 80, 16,242,242,242, 16, 23, 23,135,162,162, 34, 56, 57, 57, 33, 37, 37, 5,219,183,111,199,181,107,
+215,218, 92, 72,116, 58, 29,248, 66, 7, 99,204,206, 41,136,217, 57, 5, 52, 43, 51, 62,153,247, 22, 23, 54,146,156,166, 26, 55,
+174,171,202,214, 54, 48, 36, 36,100,228, 75, 47,189,228,221,171, 87,175,198,245, 62, 62, 62, 30, 60, 30,175, 72,169, 84,126,171,
+ 84, 42, 67, 91, 36, 99,216, 48, 59,251, 0, 24,244, 25,245,215,152, 7,130, 16, 97,240,208,116,244,237,151, 4,163, 73, 8,130,
+ 20,129, 36,196, 48,155,203, 96,109,229, 2,150, 37, 90, 11,140, 55, 42, 46, 46, 14,223,124,243, 13,114,114,114, 26,155, 71,163,
+162,162,230,188,252,242,203,135,104,154,198,177, 99,199,112,228,200, 17,120,121,121, 33, 52, 52, 20, 70,163,113, 84,107,231,189,
+252,235,194,171, 63,125,126,114, 50,223,108, 27, 42, 20,121,122,145, 53,210,177,179, 7, 56,202, 0, 32, 46, 59,187,198,197,163,
+102,157,166,230, 78,174,157,123,221,167,173,119,112, 39,216,196,172,212,107,123, 15,254, 86, 85, 92, 90,198, 15,235, 22,172,253,
+120,213,251,130,142,157,124,215,175, 88, 50,219,165,160, 90, 92, 53,116,238,201,140, 67,113,215,107, 95,155, 49,211,252,250,204,
+119,117,167,126,251,253, 48,195, 48, 33,104,102, 4, 33,195, 48, 80,169, 84,184,115,231, 14,114,114,114, 80, 90, 90,138,146,146,
+ 18,212,212,212, 52, 54, 43, 74,107,170,143,127,181,251,232, 77,153, 68, 34,237,213,213,207,227, 90,114,154, 90, 38,145, 72,253,
+ 58,121,116, 6,154,158,128,154, 97, 24,219,199,121, 72,160,230, 78, 60,116,229, 53,208, 86,214, 66, 91, 94, 11,189,145,130, 78,
+ 79, 66,103, 36,225,216,111, 24,106,235,180,208,149, 87,130, 97, 89, 59,238, 25,195,129, 3,135, 22,158,247, 81,235,214,173,251,
+164,165,245, 79,124, 27,158, 89, 6, 65, 16,199, 88,150,141, 98, 89, 54,170, 94, 76, 53,232,132, 99, 79,242,172, 91,183,238, 19,
+150,101,163,174, 92,185,242, 51, 0, 77,123,210,218,106,211, 78, 89,217,221, 90, 43, 34,224,197,249, 75,150,159,248,113,231, 22,
+231,242,242,138, 44,129, 88,162, 19,139,133,246,139,151,172,178,173,211, 84,189, 88, 87, 97,249,168,167,138,138,138,198,135,151,
+ 64, 32, 0,173,169, 3,173,213, 64, 87, 81, 6,194,168,135,128,166, 97, 47,149,194,195,213, 5, 29, 93, 20,173,242, 81, 12, 77,
+ 20,158, 62,129, 83,175,190,240, 84,179, 32, 99, 52, 32,174, 79, 23, 8,229, 50, 72,108,237, 16,121,228,226, 99,161, 35, 16, 0,
+ 43, 62,109,149,215,197,197,197, 81,169, 84,254,250,229,151, 95, 10, 74, 75, 75,145,154,154,122,243,209,163, 71, 85,118,118,118,
+ 86, 38,147,137,185,123,247,238,153,204,204,204,168, 78,157, 58,129,101, 89,159,214,248,106, 42,101, 70,163,137, 65,129,250, 17,
+242, 85,119, 96, 35,247, 0, 75,118, 64,113,185, 6, 4,156, 97,210,101, 54,246, 37,211,107,243, 81,167, 39, 44,202, 79,163,209,
+ 8,147,201, 4,147,201, 4,131,193,128,215, 94,123, 13, 87, 18, 18,240,211,145,243,200,203,203,131,151, 66,138,201,147, 38,162,
+ 91,183,110, 72, 76, 76,108,119,161,246, 27,114, 42, 85, 34,145, 96,219,182,109,144, 74,165,104,171,192, 82, 40, 20,159,249,251,
+251,251,102,214,213, 33, 45, 35, 3, 61, 39, 78, 4, 0, 92,186,116,169,113, 27,173, 86,139, 41, 83,166, 8,115,114,114, 94,207,
+200,200,120,157,101,217,207,139,138,138, 22, 54,199,121,252,120, 2,222,126, 59, 13, 37, 37,143,157,221,125, 63, 7, 54,174,123,
+144, 99,196,136,209,143, 91,174,108,109,109,241,217,103,150, 5, 29,166,105, 26,219,183,111,135, 68, 34,105, 20, 88, 2,129,160,
+239,130, 5, 11, 94,108,106,251,192,192,192, 86, 57,223,155,224, 38,190,116,147,125,199,198,183, 83,176,141, 83, 8, 74,205, 41,
+ 93,147, 11,138,230,188, 55,193,109,243,166, 3, 5, 58,154,208,239,161, 77,121, 29,120, 98, 93,140, 37,105,204,142,251,210, 80,
+222,105,102, 76,145,186,234, 95,239,206,124,197,193,214,206,165,246,219, 47,163,109, 73,146,196,209, 36, 67, 69,144,183,131,221,
+216,136, 47,106,223,126,239,163,100,131,249,209, 28,228, 29,203, 68, 11, 97, 79, 24,134, 65, 65, 65, 1, 74, 75, 75,145,155,155,
+139,146,146, 18, 16, 4,129,146,146,146, 54, 57,148, 77, 57,202,134,252, 2, 20, 29,222, 5,197,148, 87,208,121,245,106, 48, 12,
+ 31, 90,141, 25, 7,250, 61,135,234, 42, 45, 12, 12, 1,219,238,125, 48,244,216, 69,144,140, 25, 72,184,194, 61, 65, 56,112,224,
+208, 82,189,114,108,233,210,165, 31, 88,184,237, 25,150,101, 45, 10,173,243,172,224, 90,186,116,233, 7, 13,199,138,142,142,214,
+ 2, 40,252,203, 5, 22, 0,212,148,166,103,167,165,241, 84,181, 26,173,216,206,222, 78, 99, 37, 23,178, 85,149, 85, 84,198,189,
+ 44, 93, 93,209,253,204, 54, 28, 47, 61, 53, 53, 53,184,160,160, 0,185,143, 30,193,164,169, 3, 97,208, 3, 58, 45,134,244,235,
+ 11, 49, 0, 49, 1, 8, 24, 35, 40, 74,136,218,218,106, 0, 72,111,141,148, 49,153,158,170,212, 27,155, 5,173,172, 32,148,203,
+ 32,178,182,122,202,209,178, 4, 18,137,228,167,237,219,183, 43,149, 74, 37, 54,109,218, 4,165, 82,233,175, 80, 40, 52, 86, 86,
+ 86, 18, 71, 71, 71,116,238,220, 25,225,225,225, 56,119,238, 28, 8,130,184,223, 26,159,217, 32, 76, 74,207,166, 59, 84,215,166,
+224, 90,210, 15, 48, 25, 12,232,228,183, 12,122,179, 35,100,206,175, 67,107,252, 21,198,202,243, 0, 0,161,245, 64, 20, 23,151,
+ 2, 32,238,180,230,220, 61,187,124,235,214, 45,236, 57,124, 9, 30, 1, 3, 81, 84, 30,135, 59,119, 18,225, 98,247, 27,252, 2,
+131, 96, 50,153,218,242,150, 96,177, 32,177,176,160, 79, 89,182,108, 25,170, 36, 18, 96,244,104, 8,178,179, 97, 52, 26, 17, 17,
+ 17,129, 30, 61,122, 0, 0, 34, 34, 34, 64, 81, 20,124,125,125, 97,111,111,143, 67,135, 14, 77, 1,208,164,192, 98, 9, 34,133,
+161,203,252,189,189,189, 27, 5, 86,204,247, 37, 72, 78, 28, 2, 2, 66,108,249,234,223,151,196,195,195, 3, 69, 69, 57, 32, 8,
+182,181, 78,153, 39, 70,143, 30, 61,202,206,206, 14,211,167, 79,135, 68, 34,193, 11, 47,188, 0,173, 86,251, 82,253, 27, 13,150,
+ 45, 91, 6, 0, 88,177, 98, 5, 86,174, 92, 9,141, 70,211,108,136,138,109,107,187,186,214,104,153, 25,164, 70,242,194, 32,199,
+ 78, 33,131,135, 15,129,151,223,115, 24, 60, 60, 15, 0, 62,113,228, 63,152,248,233, 7,182,135,237,172,137,221, 87,142,156, 89,
+ 30, 57,114,208,135, 43,141,231,215,172,252,178,162,213, 23,150,202, 7, 59,106, 50,248, 99, 54,111,249,198,188,105,197, 7, 11,
+ 68,143, 74,141,229,133, 21, 76,173, 76,196,179,242,113,129,124,206,226, 53, 57,133,133,247, 22, 33,239,183, 44, 75,174, 97, 78,
+ 78, 14,244,122, 61,104,154,134, 94,175, 71,109,109, 45,242,243,243, 27,175,175, 86,102, 61,226,221,233, 99,186,213,105,181,154,
+107,183,239,230,126, 56,247,149,222,117, 90,173,230,238,131,220, 44, 96, 11,211,204, 53,175,212,212,212,218, 27,106, 76,168,188,
+153, 5,199,193,158, 48,152, 9,232,205, 20,202, 75,107, 96,164, 1, 19,201,135,251,132,215, 96, 38,120,168, 46, 41, 2,217,142,
+126, 14, 28, 56,112,248,103, 57, 88, 4, 65, 28,139,142,142,142,250,187,184, 1, 32, 58, 58, 58, 53, 58, 58,250, 79, 29,171, 65,
+ 96, 13,124,226, 13,119, 96, 83,117,165,135,109,149,219, 39, 31,188,232,106, 50, 25,252,107,107,107,105, 30, 79,200,235, 96,163,
+ 45, 42,207,181,252, 96, 38,147,233,216,197,139, 23,199,245,235,215, 79,116,247,246, 77,232,171,170,160,175,170,132,128, 49,195,
+ 94, 28, 14,210,100, 0, 97,208,195,173, 11, 3,109,181, 24, 9, 55, 50, 77, 38,147,233, 88,139, 25, 2,150,101,204,143,133, 3,
+ 73, 82, 79, 53, 21,138,172,228, 16,202,229, 16,201,173,154,108, 66,108, 14,206,206,206,210,254,253,251, 63, 23, 22, 22, 6,150,
+101,177, 97,195, 6, 24, 12, 6, 97,131, 83,100, 52, 26, 81, 83, 83,131,131, 7, 15,226,251,239,191,191,108, 99, 99,179,187,176,
+176,101,113,203,152,245, 39,207, 93,190, 57,234,213, 23, 6, 11, 79,159,255, 22, 38,189, 25,181,122, 91,212,233, 12,168,209,242,
+ 97, 16, 13, 7, 65, 92, 4, 73,137,208, 39,212, 7,103, 47,221,213,209, 38, 99, 92, 91,196, 16, 65, 16,208,235,245, 80,171, 75,
+ 80, 94,115, 14,168, 41,128,163,177, 6,181, 15,238, 35,244,181,169, 48, 24, 12,173,114,125,248, 6, 76, 78,182, 42,222,247,171,
+ 73,240,133, 14, 70,191, 33,167,154, 13, 21, 33,151,203, 27,251,232, 88,130,234,234,106,252,240,195, 15,136,136,136,192,128, 1,
+ 3, 80, 80, 80,128,236,236,108,140, 26,245,239, 86,182,155, 55,111, 34, 57, 57, 25, 62, 62, 62,173,112,177, 39,202,203,239, 77,
+ 28, 59,118,172,224,234,213,171, 96, 89, 22,126,126, 54,176,182,146,131, 32, 69, 8, 8,112, 2,144, 9,130, 32, 48,112,224, 64,
+ 24,141,133,230,186, 58,156,104,137, 51, 57, 57,121,116, 88, 88,152,151,201,100,202, 10, 14, 14,230, 21, 21, 21, 97,194,132, 9,
+216,183,111, 95,195, 27, 13,150, 46, 93,250,212, 62,181,181,181,186,230,248,186,245,236,188,136,102, 29, 6, 8, 69,158, 94, 54,
+ 78, 33,240,242,123, 14, 0, 48, 52,106, 6,188,124, 59,160,170,228,150,151, 65,255,232, 5,138, 40,179,251,241,106, 65, 90, 63,
+105,240,244,210,188,243,119, 1, 88, 18,184,151,213,222, 61, 90,156,203,183,222,127,224,151, 99,111,141, 25,243, 60,207, 68, 51,
+230, 96, 15,158,205,190, 67,199,213, 5,143,114,191, 64,238,111,169, 79,221, 42,205, 11, 44,186,178,178, 18,114,185, 28,217,217,
+217,250, 49, 99,198,136,180, 90, 45,238,222,189,219, 40,176,156, 29,237, 3,251,246, 8,246, 95,187,233,251, 83, 50,145, 72, 52,
+124, 96,120, 64,218,221, 71,249, 44, 75, 60,108,150,151,101,175,222, 77, 79, 31,237,228,232, 1,213,249, 43,144, 69,142,132, 94,
+ 79, 64,103,100, 96,160, 1, 51, 37,128, 77,183,158,144,120, 7,128, 97,129,244,219, 55, 97,102,217,203,220, 35,132, 3,135,127,
+ 44, 90,211, 34, 32, 8,226, 88,239,222,189,247, 62,233, 50, 53,252, 6,160, 7,208, 82,159,232,146, 39, 69, 84, 67,179, 97,115,
+199,121,134,183,221, 2,235, 2, 90, 24, 89,230,232,232,232, 28,208, 37,200,123,231,174,111, 97,212, 87, 33, 59,109, 55,234,106,
+138,241,209, 39, 9, 62,110,110,110, 3, 10, 10, 10, 46, 88,114,176,252,252,252,125,135, 14, 29, 90,216, 45, 40, 40,172,163,187,
+ 59,110, 61,124, 0, 1, 75, 67, 64,211, 32,141,122,240,104, 3,220, 3, 25,144,164, 12, 69, 69, 53,216, 30,247,251,157,250,168,
+238,205,191,125, 19, 20, 58,140, 25,143,151,135,142, 6,107, 50,226,183,126,129, 16,203,229, 16,217,218,162,207,193,243,143, 67,
+ 54,152, 77,120,184,238,125, 8,100,114,216, 71, 12,108, 53,157,106,181, 90,115,249,242,229,196,140,140,140, 30, 93,186,116,193,
+170, 85,171,144,151,151, 7,150,101,161,182,100, 14,165, 0, 0, 32, 0, 73, 68, 65, 84, 86,171,117, 37, 37, 37, 5,101,101,101,
+ 15, 9,130, 56, 92, 88, 88,184, 19, 22, 68, 10, 87,251, 81,123, 78,159,249,125, 81,247,208,192,206, 67, 6,172,196,177, 99,203,
+ 81, 89, 93,141, 58, 61, 15,181, 90, 35,234,116, 44, 92,173,124,208, 43, 36, 12, 37,101, 6,220, 77, 77,202, 47, 21,216,239,104,
+163,117,138,155, 55,111,194,211,158, 64, 90, 86, 50, 28,117,229,232, 98, 43, 71, 88,100, 63,228,228,228, 88,228, 76,153,205,224,
+205,153,255,239,209,130,182,182,182,168,170,170,122,106, 63,169, 84, 10, 87, 87, 87, 84, 87, 87,227,192,129, 3, 96, 45,123, 40,
+154, 12, 6, 3,252,253,253,113,227,198, 13,156, 57,115, 6,131, 7, 15, 70,255,254,253,113,254,252,121, 36, 38, 38, 34, 57, 57,
+ 25, 4, 65,192,193,193,161,193,109,107,214,114,187,126,253,102,172, 92, 78, 44,155, 62,125, 86,240, 43,175,188,130,131, 7,247,
+ 98,198,244, 46, 32, 72, 17, 8, 66,132,231,199,248, 99,245,154, 68,244,234, 53, 16,142,142, 2,156, 57,147,154,195,227,217,124,
+111,129, 88,253,114,253,250,245, 60,177, 88, 12,131,193,128,218,218, 90,148,149, 61, 14, 71,213,148,131,165,213,106,155, 13,172,
+150,154,146,249, 89, 69, 53, 91, 65,106,146, 94, 40, 53,165,132, 12, 30,158,143,161, 81,211,113,250,216,110,156, 61,117, 6,142,
+252, 7, 57,180,164,246,100, 73, 78,105, 77, 97,173,223,246,192,240, 55, 40, 85,221,169,111,102, 63,159, 69,185, 43,153,216,101,
+219,170, 43, 91, 75,111,121,218, 15,191,254,202,226,249,200,136,158, 62, 93, 61, 92,133,229,101,106, 28,250,229,100,170,241,193,
+193, 99,245, 21,149, 37, 86,228,234, 45, 91,182, 44, 7, 0,134, 97,246,108,218,180,233,141, 69,139, 22, 57, 21, 20, 20, 52, 10,
+ 44,117,105,249,217, 62,163,231,208,101,149, 85,134,239, 54, 45,158, 32, 17,139,132, 31,174,251,238,188,137,194,213,102, 43, 23,
+ 30,111,234, 7, 91,127, 44, 57, 16,187,155,114, 18, 11,112,105,201, 10,100,255,126, 14, 70, 66,128,225,191, 93,131,193, 72,163,
+ 90, 93,134,179,211,103,195, 78,105,143, 19,101,119,233,170,154,234,169,220, 51,134, 3,135,127, 44, 90,210, 34, 37, 79, 8,162,
+114, 0, 15,163,163,163, 75,159,112,151, 74, 0,220, 4,208,173,126,187,146,103,246, 43, 33, 8,226, 6,203,178, 61,158,224, 41,
+121, 66,104, 61,249,219,240,204, 54, 55,255,140,192,106, 17,165,165,165,234,235,137,119,112,249,244, 54,152, 77,122, 84,213,219,
+ 86,133,197, 58, 88, 91, 91, 39, 52, 68, 19,111, 2,193,120, 58, 86, 6,171,211,233, 94,220,180,121,243,213,183,166,190,170,232,
+255,220,115,120,116,251, 22,244,229,165,160,104, 26, 20,193, 71,109,169, 24,197, 69,213,136,254,245,164, 90,171,211,189,216,196,
+ 3,226, 89,206,198, 78,238, 44, 65, 64,108, 99, 13,145, 76, 6,145,141,245,191, 29, 43,130,128, 80,110, 5,190, 76, 14, 74, 32,
+180, 36,157,208,104, 52,227,103,206,156,121,235,196,137, 19,118, 47,191,252, 50,158,127,254,249,228,202,202,202, 65, 21, 21, 21,
+150,246, 55,123,154,243,192, 1,218, 28, 60,102,236,215,219,118, 94,153, 54,109,154,253,243, 99,191, 70,114, 90, 42, 42,235,156,
+ 1, 0,174,142, 50,244,234,242, 62,212,101,122,156, 58,121,172,130, 49,235,198, 35,117,159,169, 57, 78,150,101, 89, 71, 71,199,
+167, 92, 57,138,162,112,254,252,121,204,155, 55, 15,142, 86,231, 81,243, 48, 27, 93,251, 13,192,208, 87,166, 98,198,140, 25,160,
+ 40, 10, 14, 14, 14,207,186, 25,127, 56,247, 39, 81, 85, 85,133,142, 29, 59,226,183,157, 93,130, 12, 58,181, 32,204, 30, 32, 96,
+ 99, 60,125,118, 84,106,124,124,124, 45,128,157,126,126,126,177,207,140,104,252, 3, 39, 65, 16,255,250,228,147, 79,182,245,237,
+219, 87, 34,151,203,225,231,231,135,203,151, 47,227,242,229,203,184,120,241,113,255, 56, 7, 7, 7,216,219,219,163,178,178, 18,
+121,121,121, 90,130, 32,254,213, 2, 39, 83, 93, 77,141, 59,125,250,240,181, 49, 99, 94,116, 28, 49,162, 55, 20,138, 26,152,205,
+165, 32, 72, 1, 68, 98,103,236,220,185, 14,234,226,114, 92, 73, 72, 40,175,173,229,141, 79, 74,250,195, 20, 68, 77,165,211, 24,
+ 23, 23, 7,177, 88,140,131, 7, 15,154, 93, 92, 92,120,182,182,182,205, 58, 88, 58,157, 78,212, 28,231,155, 75,238, 20, 0, 88,
+243,222, 4,183,141, 87, 82,139,199, 1,248,201,203,215, 29,103, 79,157,193,197,179, 87,150, 70, 4, 51, 91, 70, 79,233,185, 90,
+ 60,248,165,247, 3,187,191, 65,201,173,149,136, 57,116,144, 74, 75,250,246, 99, 93,221, 29,111,108, 59,244,126, 43,215,136, 5,
+128, 90,117,241,178,232,207,191,218, 19,189,106,185,100,195, 23, 91, 11,181,165, 69, 31,212,139,126,182, 5,247,170,145, 51, 39,
+ 39,103, 59,128,237, 79, 56,205, 63,172, 91,183, 46,254,213, 87, 95,117,106,112, 40, 75,210,126, 77, 40, 1, 18,130, 6,206,248,
+168, 79,143,160, 46, 31,127,241,227,169,220,188,226, 31,171,210, 27, 99, 96,253, 33,157, 87,175, 94,173,232,222,189,251,204,247,
+151,172,252,118,213,234, 21,132,255,252,165,200,186,124, 3,122,173, 17, 70,150,130, 9, 4,146,214,126, 14, 43, 39,107, 92, 98,
+203, 89, 61, 69,190,153,253,199, 78,254, 45,150,207,118,130,227,228, 56, 57,206,255, 78,206,150, 12,132, 27, 77,252,221,212, 76,
+ 26, 55, 90,218,175, 25,158,191, 5, 22, 9, 44, 55, 55,183,254, 67,159,139, 64,223,161,179, 96,212, 87, 34, 59,245, 59,212,214,
+ 20,195, 77, 33, 66,118,110,117,239,122,213,105, 17,234, 35,179, 71,124,188,121,203,161,225, 61,123, 4,248,185, 41, 69,182, 29,
+ 61, 33,115,118, 65,105, 73, 9,174, 37,101,153,182,158, 58,123, 71,171,211, 89, 52, 85, 14,195, 48, 44,203,178, 16, 8, 4, 96,
+ 41, 10,129,115,150,128, 36,201,103, 70, 11, 18,176, 14,143, 4,201,227,195,100, 97,159, 33,149, 74,149, 79, 16,196,248, 57,115,
+230,252,190,103,207, 30,114,224,192,129,161,191,254,250, 43,243,103, 50,187,236,206,209,187, 84,240,184, 1, 91,190,220,122, 32,
+ 44, 60,194,179, 99,167,142,162,190, 29,108, 96, 52,209, 40, 86,151,225,194,149, 52,253,221,180,155,121,140,209, 48,177, 36,189,
+249, 40,238,245, 15,193, 92, 87, 87, 87,151,149, 43, 87,194,108, 54,131,166,105,152,205,102,148,150,150, 34, 57, 57, 25,221, 35,
+122,195,255,245, 55, 80, 94, 94,142, 93,187,118,193,221,221, 29,163, 70,141, 66, 77, 77, 13,226,227,227,115,155,119, 29, 96, 94,
+246,175, 41, 60, 0,224,243, 97,254, 32, 42,234,124, 80, 80, 80,228,243,221,212,130, 89,115, 30, 59, 91,159,174,155, 34, 56,127,
+254,124,172, 72, 36,218,254,224,193,131,234, 22, 4, 54,188,189,189,133, 58,157, 46,148,101, 89, 94,117,117,245,102,189, 94, 63,
+109,193,130, 5,202,245,235,215, 35, 36, 36, 4,165,165,165,176,183,183,135, 82,169, 68,109,109, 45,114,114,114,104,163,209,248,
+ 13, 77,211,171,213,106,117, 73, 75,121,144,152,152,248,128,166, 67,123, 23, 23,109, 59, 52,235,237, 97,126, 38, 83,184,208,218,
+166, 31, 88,214,140,202,138, 60, 16,236, 45,227,225, 35,191,223,175,172,164, 94, 76, 74, 74,186,107,201, 53, 34, 73,242,237,163,
+ 71,143,162, 97,170,156,194,194,194,108,146, 36,155,117,176, 44,193,166, 3, 5, 58, 0, 63, 79, 24,174,156, 95, 85,114,171,179,
+ 35,255, 65, 78, 68, 48,179,101,211,129, 2,157,179,173,102,109, 65,201,249,172,194,218, 83,219, 99, 14, 29,164,166,190, 48,158,
+ 86,202,239, 46,117,236, 0, 75, 34,227,179, 33, 33, 33, 30, 36, 89,222, 73, 93,150,153, 56,227,205,183, 94,178, 17,104, 79,132,
+184,149,250,154, 93, 2,197,105,105,105, 15,219,224, 98, 61, 89,246,179, 0,244,255,236,179,207, 78, 61,107,141,171, 75,203,207,
+246,142,122,151,173,172,172, 74, 41, 73,255,245,118,107, 92, 13,211,223,188,246,234,140, 29,111,190, 62,147, 10,158,187, 24,249,
+231,126, 7,204, 38,168, 46, 94,128,212,138,198,177,210,135,180,134, 34,103, 38, 37, 37,113, 81,220, 57,112,224,240, 63, 3,139,
+123,125,123,123,185,157,242,238,228, 54,204,187,147, 43, 0, 32,251, 65, 33,178, 31, 20,252,150,157, 83, 48,188,157, 10,183,113,
+178,103,162, 62, 20, 3,107,217,100,207, 79,113, 6, 5, 5, 37,147, 36,233,218,150,147,166,105, 58, 63, 45, 45, 45,220,146,116,
+ 42,149,202,151, 59,116,232,176,174,176,176,240, 80,126,126,254,123,127,137,186,175,159,236,153,164, 4, 81, 44,203,134, 0, 32,
+ 8,146,180,100,178,231, 70, 78, 87, 87,215,174, 18,137,100, 59,143,199,243,104,184,142, 13,205,120, 70,163,145,170,170,170, 18,
+ 27, 12, 6, 10, 0, 33, 16, 8,204,114,185, 92,199,231,243,205, 52, 77,231,154, 76,166,183, 10, 11, 11,111, 91,250, 22, 18, 16,
+ 16, 32,139, 10, 79,175,109,152, 66,103,217,191,166, 96,221,158, 22,203, 78, 35,231,221,187,119, 59,219,217,217, 77, 34, 8, 98,
+ 2,203,178, 93,106,106,106,244,203,151, 47, 79,185,112,225, 66,181,135,135,199,136,126,253,250, 17,183,110,221,194,195,135, 15,
+217,218,218,218, 3, 36, 73,254,171,160,160, 32,187,141,101,137,236,211, 39,116,178,149, 28,163, 25, 22,221, 0,150, 32, 8,226,
+118,109, 45,113, 66,169,236,244,227,129, 3, 7,232,246,190,129,133,133,133, 29,175,173,173, 29,117,247,238,221,230,222,170,158,
+189,143,154,229,220,240, 65,240,191,122, 15,136, 28,127,249,194,197,195, 75, 62, 73, 93,243,228,186,119,198,217,205,152,242,206,
+188,245, 63,125,253,197,226,175,143, 84,124,103, 73, 58,195,194,194,188, 0, 76,102, 89, 54,136, 32, 8, 63,134,129,152, 32,216,
+114,130, 32,210, 24,134,185,201, 48,204,209,219,183,111, 23,254, 55,188,209, 62, 57,217, 51, 65,211,182, 52, 65, 88, 58,217, 51,
+231, 16,112,156, 28, 39,231, 96,253,159,132,197, 17,184,179,115, 10,134,103,231, 20,192,215,215,151,189,119,239, 94,155,196, 89,
+115,111,223,245, 17,218,247,254, 25,146,212,212,212,176,191, 51,131, 84, 42,213,207, 42,149,234,231,191,148,244,194, 5,179, 26,
+248, 14,143, 63,237, 66,189, 64,234,101,201,182, 26,141, 6,149,149,149,237, 78,110,122,122,122,221,184,136,127, 59, 91, 60, 30,
+204,150,238, 59,108,216,176, 71, 70,163,241, 12,128,124, 0,182, 0,202, 77, 38, 83, 92,105,105,105, 49, 77,211,225,143, 30, 61,
+250,168,222,137, 92, 83, 92, 92,220,222, 56, 18,204,149, 43, 41, 63, 1,248,233,143,171,146,255,212,165, 74, 78, 78, 30,173, 84,
+ 42,147, 29, 28, 28,124,116, 58,157, 80,167,211,241, 89,150,109, 44,251, 18,137,164,164, 33, 98,122,107,176,177, 70, 12, 69,148,
+ 57,216, 89, 19,127,112,106, 28,221,112, 80, 91,119,167,179,163, 27, 14,182, 33,109, 57,221,186,117,251,129, 36,201, 78, 12,195,
+184, 0,176,102, 89,148,178, 44, 91, 74,211,116,254,157, 59,119, 10,255, 91, 42,154,122, 1, 21, 5, 14, 28, 56,112,224,240,151,
+ 41, 92,142,147,227,228, 56, 57, 78,142,147,227,228, 56, 57,206,127, 20, 72, 46, 11, 56,112,224,192,129, 3, 7, 14, 28,254, 90,
+ 16, 45,168,208,182,180,173,182, 71,201,222,225, 56, 57, 78,142,147,227,228, 56, 57, 78,142,243, 31,199,217, 26, 55,215,183,235,
+111, 18, 94, 28, 39,199,201,113,114,156, 28, 39,199,201,113,254,243, 56,255,167,192, 53, 17,114,224,192,129, 3, 7, 14, 28, 56,
+252,197,104,118, 20,161,151,151,123, 32, 73, 51,125, 89,150,164, 88,146, 53, 17,213,218,125,217,207, 4,217,236,208,161,131, 45,
+159,196, 24,130,101,101, 4,193,208, 12, 69, 94,206,201,201, 79,179,228,192, 1, 1, 1, 2, 0,211,248,124,126,164,209,104, 84,
+242,249,124,149, 78,167,187,196,231,243,247,164,167,167, 27,255,155, 50,169,111,223,190,147, 15, 28, 56, 96, 27, 21, 21,165, 55,
+ 26,141,102,129, 64,192,219,187,119,175,104,250,244,233,149,151, 47, 95,110,215, 40,200,208,208,208, 65,159,126,250,169,215,115,
+207, 61,135,200,200,200,186,145, 35, 71, 10,194,195,195, 5, 75,150, 44,201, 73, 73, 73, 57,215, 22, 46,103,103,231, 64, 30,143,
+247, 61, 65, 16, 20,203,178,175, 61, 17,130,225,239,192,203, 0, 38, 2, 80, 2, 40, 2,176, 31, 64,123, 71, 89,142, 0, 48, 6,
+ 64, 72,253,242, 45, 0, 71, 1,196,253,137,244,141, 0, 48,134, 32,136,110, 0,192,178,236,205,191,144, 51,164,158,243, 47, 75,
+231,159, 61,247,176,176,176,229, 66,161,240, 77, 0, 48, 24, 12,223,201,229,242,232,166,182,187,112,225,130, 1,205,132, 62, 9,
+232, 4, 54,237,168, 63, 0, 32,112, 76, 6, 0,160,181,229,244, 7,237, 27, 69,204,166,249,179, 77,241, 18,129, 25,237, 30,149,
+172, 84, 42,103,143, 26, 53,106, 73, 92, 92,220,199, 5, 5, 5, 59,192,129, 3, 7, 14,255,173, 2,203,203,203, 61,112,194,184,
+ 23, 63,121,251,173, 89, 4, 69,145, 72,207,200,224,189, 51,247,189, 97,254, 46, 46,110, 50,157, 46,128, 5, 24,173, 68,114, 71,
+171,213, 20,108,251,250, 75,171, 46,157, 59,211, 52,205,224,155,237,219, 70, 30, 56,114,232,131,214, 68,150,147,147,147, 23,159,
+207,223, 60,119,238, 92,231, 97,195,134,145, 46, 46, 46,200,207,207,183, 62,124,248,176,239,174, 93,187,162,156,156,156,230,151,
+148,148,228,180,231,132, 20, 10, 69, 63,165, 29, 70, 72, 68,236, 32, 84, 19,208,154,137,115, 42, 3, 27, 87, 84, 84,116,177,189,
+153,100, 48, 24,230,104, 52,154,136,192,192, 64,102,219,182,109,196,204,153, 51, 89,130, 32, 72,173, 86,187, 27,237, 12, 51, 33,
+145, 72,190,126,238,185,231,252, 34, 35, 35,179, 47, 95,190, 60, 26,192,241,137, 19, 39,122, 75, 36,146,187, 0,186,180,133,139,
+162,168,221,105,105,105,221,180, 90, 45,194,195,195,119, 1,232,254, 55,149,151, 93,118,118,118,166,173, 91,183,110, 15, 13, 13,
+245,169,168,168,168,123,235,173,183,134,220,190,125,123, 48,128,215,219,192, 35, 3,176, 69, 42,149, 82,243,231,207, 63,249,194,
+ 11, 47,220,148,201,100,242,204,204, 76,254,188,121,243, 94,203,205,205,157, 0, 96, 46,128,186,182,114, 58, 56, 56, 72,214,174,
+ 93,155,212,167, 79, 31,181, 88, 44,150,228,228,228, 16,243,231,207,159,153,153,153,249,103, 56, 5,171, 87,175,190, 60,112,224,
+192,108,145, 72, 36,205,205,205,165, 22, 45, 90, 52, 35, 41, 41,169,221,156,182,182,182,194,229,203,151, 39, 12, 24, 48,224,161,
+ 88, 44,150,101,103,103,147, 11, 22, 44,120,227,222,189,123, 22,115,246,239,223,127,178, 86,171, 93, 21, 31, 31, 15, 0,232,221,
+187,247,114,131,193,240,225, 31, 68, 13,203, 34, 50, 50, 82, 71,146,228,155,241,241,241, 77,150,215, 61,137,239, 79, 6,128, 69,
+ 31, 53, 44, 63,254,110,106,121, 90,248,134,189, 68, 96, 70,155, 10, 78, 64,167,199,226,110,219,197,119, 95, 5,128,119, 22, 61,
+254,127,219,197,134,245,179,217,182,136, 54, 87, 87,215,183,122,246,236,185,236,218,181,107, 49,225,225,225,243,118,236,216,193,
+143,138,138, 90,203, 48,140,207,136, 17, 35, 38, 36, 36, 36,108,200,204,204,252,154,171,226, 57,112,224,240, 95, 37,176, 72,154,
+233,251,246, 91,179,136, 73, 47, 79, 46, 82, 21,171, 25,185,149,205,203,251, 99, 99,165,157, 59,119, 38,117, 91,182,192, 92, 90,
+ 10,122,225,194, 62, 23, 46, 92, 48,189, 59,127,161, 86,175,211,236, 86,186, 56, 75,247,253,188, 87,113,232,224,129,190, 0,210,
+ 90,114,174,248,124,254,230,131, 7, 15, 42,188,188,188, 96, 48, 24, 80, 82, 82, 2,163,209,136, 23, 94,120,129,138,136,136, 80,
+204,152, 49, 99,179,163,163,227,139,109,113,178, 28, 29, 29, 93,186,120,240, 79, 76,153, 56,188,243,160,254,225, 18,133, 91, 39,
+ 32,159, 65, 65,246,221, 30,191, 95, 77,154, 27,123,250,124, 86,102,149,113, 84,105,105,105,113, 91, 51,169,172,172,108,201, 91,
+111,189,117, 32, 36, 36,196, 73, 36, 18,193,197,197,133,120,227,141, 55,138, 85, 42,213,234,246,102,124, 67,116,112,146, 36,233,
+103,190,219, 67,231,110, 99, 99, 3,107,107,107, 0,112,251, 51, 5, 98,194,132, 9, 84,110,110,238,155, 12,195, 4, 60,249,191,
+ 74,165,242, 54,155,205,165, 15, 30, 60,236,166, 51, 24,123,205, 94,180,106,237,164, 49,131,172, 19, 18, 18,200,209,163, 71,243,
+207,159, 63,255,114, 27,156,172, 45, 93,186,116,185,189,126,253,122, 67,250,221,156,224,223,206, 39,144,206,246, 50,198,171, 99,
+ 71,121,106,106,170, 32, 58, 58,186, 36, 58, 58,122, 11,128, 25,109, 72,250,150,161, 67,135,230, 45, 91,182,140, 74,207,186,239,
+125, 49, 33, 5,214,114, 33,237,225,238, 42, 78, 72, 72,224,109,219,182, 13, 31,124,240, 65,155, 57, 7, 13, 26,116,119,205,154,
+ 53,108,145,186,220, 55,231,129, 10, 86,114,161,217,193,193, 65,114,254,252,121, 98,207,158, 61,134,121,243,230,109, 97, 24,166,
+ 77,156,125,250,244,185,191, 98,197, 10, 34,227, 94,142,239,165,132, 20,200,101, 2,115, 71, 15,119,241,245,235,215,137, 47,191,
+252,210,180,124,249,114,139,210,201,178,236, 55, 27, 54,108,192, 47,191,252, 2, 0,248,249,231,159,225,237,237,253, 84, 1,210,
+234,116, 32, 8, 2, 15, 31, 60,144,190,253,246,219,223, 52,245, 66,144,118,212, 31,123, 18,129,105,211,166, 21, 89,116, 6,233,
+ 27,218,236, 90, 53, 8,171, 89,179,102,229, 55,179,217,171, 95,111,180, 92,100,245,237,219,119,201,190,125,251, 28, 99, 99, 99,
+ 23, 29, 62,124, 24, 0, 32,149, 74,165, 95,125,245,213,236,177, 99,199,226,245,215, 95, 95,194, 9, 44, 14, 28, 56,252,215, 9,
+ 44,150, 37, 41,138, 34,161, 46, 46, 53, 13, 29, 50,108,198, 87, 91,183,138,132, 66, 33, 12, 6, 3,234,206,158, 5,171,215,195,
+ 70, 34,193,168, 81,163,248,193,193,193,214, 51,103,204,120, 67, 93, 92,180,157,162, 72, 5,203,146, 84, 43,199,156, 54,119,238,
+ 92,103, 47, 47,175,167, 38, 16,166,105, 26,197,197,197,176,178,178,194, 75, 47,189,228,248,195, 15, 63, 76, 3, 96,145,221,239,
+236,236,220,209,175,147,227,149,216,111, 23, 41,156,109, 9,160,228, 32,240,232, 46,240,147, 24,126,206,158,240, 27,220, 95, 50,
+166, 87,112,183,201,235,247,164,144, 36,217, 71,173, 86, 63,108, 75, 38, 61,124,248,240,146,193, 96,120, 83,167,211, 29, 1, 64,
+ 94,190,124,153,205,205,205,125,187,184,184,248, 81,123, 51,158,166,105, 84, 86, 86,130, 97, 24, 10, 64,227, 55,109,225, 84, 62,
+127, 7, 38, 76,152, 64,229,229,229,189, 21, 16, 16,224,187,115,231, 78,168,213,106,136,197, 98, 48, 12,131,222,189,123,123, 12,
+ 25, 50,228,126, 73,121,149,157,217, 76, 27,243, 31, 61, 8, 95,183, 33,165,164, 91, 96,151, 75,177,177,177,161,142,142,142, 47,
+ 89, 40,176, 70, 88, 89, 89,241, 62,254,248, 99,173,194,221,123,146,210,195,143,127,229,198,237, 44,129, 84,200,150, 85,213,212,
+164,164,164,100,173, 90,181,170,255,137, 19, 39,212,119,238,220, 25, 1,203,154,204, 70, 56, 56, 56, 72,150, 46, 93, 74,216, 56,
+184, 14,141,236,239,193, 79,186,149,118, 95, 40, 21, 50,145,145,145, 99,174, 92,185,178,107,193,130, 5,161,199,143, 31,175, 78,
+ 72, 72,176,152,211,222,222,158,191,122,245,106,218,197,213,115,172, 71, 39, 95,190,155,194, 49, 16, 0, 50,179,238,125, 91, 92,
+ 92,124,255,237,183,223,238,117,242,228,201,154,184,184, 56,139, 57,109,108,108, 4,203,151, 47,103, 3,130, 67,103, 4,133,116,
+ 39,143,254, 22,159, 32,145, 9,233,234, 58,109,109, 90, 90,218,253,197,139, 23,247, 60,126,252,120,205,141, 27, 55, 90,229,212,
+104, 52, 86,238,238,238, 80, 40, 20, 96,180, 90, 84, 87, 87,227,208,161, 67,168,169,169, 1, 77,211,144, 72, 36,248, 34,174, 28,
+186,123, 71,177,125,243,106,104,181, 90,171,191,162,156, 52, 52,239,181, 69, 92,181, 32,172,240,132,240,122,117, 86,191,175,216,
+150,154, 11, 27,156,171, 75,151, 46,229,199,198,198, 58,251,248,248, 96,224,192,199, 19,184,207,152, 49, 3, 67,134, 12,193, 47,
+191,252,130,223,126,251, 45,119,220,184,113, 57, 73, 73, 73, 27,242,243,243,191,225,170,122, 14, 28, 56,252,255, 70,147,118, 9,
+ 75, 16,117,169,233,233,124,185,173,237,171, 95,109,221, 42,226,243,249,120,248,240, 33,210,210,210,160, 57,123, 22,218, 43, 87,
+160, 86,171, 81, 83, 83, 3, 39, 39, 39, 68,111,216, 32, 19, 72,100, 51,238,222,187, 71,177, 36,251,228, 4,197,127, 24,106, 41,
+ 20, 10, 35, 71,141, 26, 69, 62, 41,174,158, 68, 81, 81, 17,134, 13, 27,198,227,241,120,145,205,164,249, 89, 78,194,213,137, 56,
+186,127,199,124,133, 51,239, 54,112,111, 30, 80,121, 17, 48, 87, 2,218, 90,224,193,109,224,240,103,112, 47,191, 71,252, 52,119,
+162,139,155, 68,112, 20,127,140, 66,223,226,144, 80, 55, 55, 55,111, 31, 31,159,157,227,199,143, 39, 1, 32, 50, 50,146,240,241,
+241,217,238,230,230,230,221,194,110, 45,114,234,116,186,171, 21, 21, 21,196,232,209,163, 29,250,244,233,115,122,244,232,209, 14,
+ 0, 8,157, 78,119,181,189,156,245,112, 24, 52,104, 80,153,151,151,215,207,158,158,158, 34, 11,182,111,228,204,205,205,125,211,
+223,223,223,119,231,206,157, 20, 69, 81,216,177, 99, 7,246,239,223,143,248,248,120,148,148,148, 72, 23, 44, 88, 96,251,235,217,
+228, 51,167, 47,222, 60, 54,127,214, 91,204,208,238,161, 74, 81,105, 81,153,131,131,195, 72, 0, 10, 11,211, 57,102,206,156, 57,
+ 39,146,211, 30, 40, 8, 74, 36, 18, 8, 4, 98,133,139,163,179,210,217,165,163,210,217,165,179,149, 84,106, 87, 87, 87,151,123,
+228,200, 17, 22,143,251, 40, 89,196,185,106,213,170,235,105,119,115,157, 89, 82, 32, 20, 8,248, 2, 71, 59, 91,251, 9,207, 15,
+ 27, 3, 0, 82,145, 72, 90, 87, 87,167,250,225,135, 31,218,196,185, 98,197,138,139, 5,197,149, 10, 30, 95, 32, 18,139, 68,141,
+179,132,219,219,217,184,201,101, 50,169,193, 96,200,219,185,115,167,185, 45,156, 31,126,248,225,229,244,123,185, 46, 36, 73, 81,
+ 36, 73,240,156, 28,236, 28, 29, 28, 28,148, 14,118,246,110, 18,161, 80, 86, 91, 91,155,255,243,207, 63,211,150,114, 22, 23, 23,
+ 35, 35, 35, 3, 29,122,244,192,153, 51,103,208,161, 67, 7, 76,156, 56, 17,147, 38, 77,130, 68, 34, 65, 79,219,251,120, 97, 68,
+ 31,220,191,127,191,217,235,110,137, 96,114,117,117,189,208,150,178, 4, 60,110, 22,108, 73, 92, 61,203,217,204,118,119,158,117,
+174, 14, 29, 58,228,184,105,211,166,208,247,222,123, 47,251,208,161, 67, 8, 9, 9, 65,122,122, 58,220,220,220,176,119,239, 94,
+188,251,238,187,217, 43, 87,174, 12,221,191,127,191, 75,112,112,240,210,118,222, 71,109, 5,199,201,113,114,156, 28, 90, 23, 88,
+ 38, 6, 71,231,204, 91,160,137,137,137,145, 10,133, 66, 60,122,244, 8, 69, 69, 69, 56,124,240, 32, 61,165,107,215,154,215, 66,
+ 67,171, 15, 31, 60,200, 26,141, 70,176, 44, 11, 95, 95, 95,140, 26, 53, 74,242,198,204, 89,106,162, 90,187,175,197, 55, 90,150,
+117,118,114,114,106,156, 52,247, 41,107,107,218, 52,152,205,102, 88, 89, 89,129, 32, 8,103, 75, 78, 64,169, 84, 78,156,177,232,
+185, 14,214,158,214,197,108,209,238,114,128, 4,120, 86, 0,207, 26,144, 90, 3, 18, 43, 64, 36,131, 62,241, 74, 57, 75, 68, 62,
+ 28, 30,246,146,155, 82,169,156,216,150, 76,114,116,116,252, 48, 54, 54,214,233,246,237,219,108, 77, 77, 13,212,106, 53,187,120,
+241, 98, 39, 71, 71,199, 15,219,155,241,133,133,133,107,103,204,152, 81, 52,126,252,120,219,152,152, 24,143,241,227,199,219,206,
+152, 49,163,168,176,176,112,237,159,185,160,124, 62,159, 58,123,246,172,253,162, 69,139, 38,155, 76,166,196,193,131, 7,151,133,
+134,134, 38,186,184,184,120,182,182, 47,195, 48, 1, 13,226, 10, 0, 40,138,130, 80, 40,132, 88, 44,134,141,141, 77,101, 78, 78,
+142,185,163,131,128, 71,215, 85,104, 60,109,132,226,200,110,129,174,206,238, 30, 47,214,213,213, 37, 1, 80, 89,152,196,144, 17,
+ 35, 70,240,140, 16, 97,246,235, 67, 58,191, 61, 53,210,119,251,198,215, 7,109,249,248,181,222,159,175,122,117,192,218,101, 83,
+ 38, 19,140,217,228,233,233,233,221,208, 81,189, 53, 16, 4,209,173, 95,191,126, 18, 51, 37, 34,175,165,220,205,206,188,151,167,
+ 30, 51, 60, 50,162,241,128, 97, 97,147, 28, 28, 28, 70,121,121,121, 13, 36, 8, 98,184,165,233, 28, 56,112,160,136, 47,145,145,
+ 30,174,142, 93,236,109,229, 62, 13, 43,156,156,156,134,187, 40, 20,175, 19, 44, 93,167, 84, 42,221, 69, 34, 81, 55, 75, 57, 7,
+ 15, 30, 44, 50, 83, 34, 82,225,100,235,236,236, 96,235, 48,110, 68,255,200,193,145, 61,250,244,233,221,115,104, 88,143, 30,211,
+ 64,155, 52,158,158,158,110,150,158,251,145, 35, 71,240,229,151, 95,162,111, 96, 32, 60, 61, 61,225,228,228,132,179,103,207,226,
+236,217,179,144,201,100,168,172,172,196, 55,223,124,131,184,184,184, 63, 93, 89, 52, 8,162,134,142,233,127, 5,158, 21, 89,173,
+137,189, 75,151, 46, 29,138,141,141,133,143,143, 15,166, 79,159,238,189,123,247,238,236,236,236,108,200,229,114,220,188,121, 19,
+239,191,255,126,246,202,149, 43,189,167, 77,155,134, 61,123,246,224,230,205,155, 49, 92, 53,207,129, 3,135,255, 4, 26,154, 8,
+217,122, 87,135, 5, 64,228,229,229, 85,250,251,251,187,249,248,248,144, 6,131, 1, 85, 85, 85, 56,117,242, 36,189,119,255,254,
+227, 6,131, 97, 46, 73,146,130, 61,223,127,255,141,179,139,203,160, 9, 19, 39, 18, 38,147, 9,207, 61,247,156,240,236,217,179,
+ 14,183,243,242,106, 90, 58, 32, 69, 81,141,238,209,236,217,179,177,121,243,102, 0,192,212,169, 83,255, 45,240, 76,166,134, 73,
+116, 91,133,212,134,142, 26, 48, 36,200, 42, 79,246,165,149,174, 79,117,141, 87,150,219, 21,121,141,172, 39,120, 98, 30,164,114,
+ 48,102,152,239,214, 70, 36,101, 63,234, 20, 32, 62,161,238,212,183, 75, 79,236, 79, 56, 28,133,199,163,223, 44,130, 68, 34,233,
+ 41,147,201,144,158,158, 94, 30, 30, 30, 94,105,109,109,109,227,231,231,231, 40,145, 72,122,182, 55,227,213,106,245, 3, 30,143,
+ 55,224,197, 23, 95,124,135, 36,201, 33, 12,195,156, 41, 43, 43,251, 90,173, 86, 63,176,240,193, 52,139,101,217, 21, 0, 14, 52,
+252,103, 52, 26, 65,146, 36, 88,150,197,152, 49, 99,176,110,221,186,192, 51,103,206, 32, 62, 62,222,126,202,148, 41, 87,149, 74,
+101, 37, 65, 16,175, 23, 22, 22, 54,235,146,149,149,149, 97,219,182,109,160, 40, 10,182,182,182,176,178,178,130, 88, 44,198,192,
+129, 3,139,215,175, 95,239, 23, 27, 27,107, 42,243, 85,179,194,218,170, 58, 7,137,159, 43,233,232,228,245,206,204,183,174, 1,
+136,181,244,220,229,114,185,149, 21,165,173,165, 88, 29,181,105,203,118,158,148, 71, 66,198, 23, 64, 76,214, 18,203,150,175, 97,
+197, 4, 37, 69, 27,230,201, 4, 0,129, 64, 32,181, 17,194, 32,144,242,105,185, 84, 72,252, 21, 55,135, 68, 34,145,201, 5, 48,
+ 52,183, 94, 72,242,132, 0,196, 4, 65,104, 44,229, 20,139,197,114,107, 33,171,111,110,189, 21, 95, 32, 32, 8, 66,140,102, 58,
+185, 79,120, 14,108,236,230,199, 2,167,251,191,111, 25,208, 52,141, 30, 61,122, 96,255, 47,103,112,234, 98, 42,202,243,211,240,
+234,196,145,232,216,177, 35, 24,134,105, 49, 77, 13,125,176, 44,120, 41,128,171,171,235,133,194,211, 54,173,110,107,105,211,224,
+147,156,129, 99, 50, 90, 28,157,232,230,230, 54, 51, 36, 36,100,234,225,195,135, 49,104,208, 32, 68, 69, 69,161, 75,151, 46,222,
+ 83,166, 76, 1, 0,244,239,223, 31,209,209,209,222,147, 39, 79,198,145, 35, 71,112,226,196, 9,132,135,135,207, 75, 76, 76, 84,
+171, 84,170,173, 92,117,207,129,195,127, 61,158,210, 34,255, 43, 2,235, 15, 16, 25,141, 93,116,219,182, 65,115,230, 12,132,167,
+ 79,227,120,183,110,181,102,179,121,161, 74,165,202, 3, 0,103,103,231,249,177, 7, 14, 92, 30,118,238,156,181, 33, 61, 29, 29,
+238,220, 1,175,115,231, 80, 75, 15, 28, 29, 29,221, 40, 10, 0, 32, 38, 38, 6,213,213,213,168,170,170,130,217,108,241, 92,194,
+224,243,137,190,206,142, 30, 80,225, 46, 24, 30,207,234, 65,160,161,143, 76,107, 93,208,225,129, 99,109, 21,191, 27,145,165,238,
+102,165,171, 49,245, 34, 5, 6, 24, 42,117,112,117,112, 3,143,228,245,109, 75, 38, 53, 56, 58, 18,137,164, 60, 41, 41,233,249,
+126,253,250,253, 10,192,177,225,255, 63,225, 98,221, 43, 44, 44,156,215, 46,235,145, 36, 87,156, 63,127,222, 57, 54, 54,246,221,
+175,190,250,138, 5, 0,131,193,208,216, 73,222, 96, 48,128,199,227,129, 97, 24,200,100, 50,240,120, 60,151,195,135, 15,187,140,
+ 29, 59,246,107, 0,205, 94, 39,169, 84, 10, 23, 23, 23,240,249,124,216,216,216,160,174,186, 66,182,237,147, 15, 7, 74,237, 92,
+236,231,205, 91, 72, 78,155, 54, 45,245,171,175,190,114,119,245,241, 13,202,200,200,200,125,121,250,140,203,123,247,238,173,133,
+229, 29,220,111,101,103,103, 11,131, 2,124,197,199, 15,212, 50, 82, 30, 11,105,233,199,144, 74,148, 16, 10,221, 33, 21,137, 32,
+ 16, 10, 29, 85, 69, 69,197, 44,203,222,183,232,142,100,217,155, 57, 57, 57, 84, 39, 15,133,176, 70, 99,174,145, 82,180,213,189,
+228, 91, 89,190, 97, 33,157, 1, 64,151,126,235,188,168,147,143, 80, 85, 81, 37,114,117,117, 77,107, 67, 58, 5, 46, 46, 46,194,
+212,244,123, 59, 29,237,173, 61, 92, 92,156,135, 2,128, 73,171, 73, 37, 12,186, 66,138,199, 83,150, 87, 84,148,232,116,186,123,
+150,114,102,101,101,241,124, 58,186,139, 14, 29, 59,253,157,179,181,188,131,163, 68,228, 98, 45, 19,200,133, 52, 93, 39,100,232,
+ 66,129, 72,164, 40, 44, 42, 42,101, 89, 54,171, 57,146,134, 14,227,192,174, 31,234,207,191,193,221,193,149,108, 22,118, 78,174,
+ 40,203,203,196,217,163, 71, 48,117,246,187, 22,221, 79, 27,215, 76,223,187,113,205,244,102,195, 51, 60, 35,136,254,124,205,147,
+ 30,112,225, 89, 78,149,170,229, 10,117,196,136, 17,255,218,177, 99,135,180,145, 34, 61, 29,145,145,143,123, 18,172, 90,181, 10,
+195,135, 15,135,159,159, 31,210,210,210,224,233,233,137, 67,135, 14,129,162, 40,254,204,153, 51,151,236,220,185,147, 19, 88, 28,
+ 56,112,248,255,138,102,135,172, 49, 44,203,208, 21, 21, 96, 13,134, 6,135,128,101, 89, 86,250,111, 97,195,151,218,218,218, 18,
+124, 55, 55, 16, 98,241,227, 63, 9,226, 79,247,208,230,241,120,109, 18, 88, 52, 13, 10,132, 9, 44, 88, 0, 36, 8,144,208, 72,
+132, 88,233, 18, 69, 44, 83, 46,161, 74,164,118, 4, 65,145, 32, 72, 2, 32, 0,214,196,128,102,233,182, 42, 35,182,182,182, 22,
+122,189,222,206,199,199,231,184, 78,167,179,171,127,176,177,255,169, 11, 71,211,116, 54, 73,146,120,237,181,215,208,160,244, 13,
+ 6, 3,178,178,178,160,211,233, 96, 48, 24,144,150,150,134,234,234,106, 24, 12, 6, 36, 38, 38,194,211,211, 19, 60, 30, 79,217,
+ 18,175,217,108,134,147,147, 19,148, 74, 37,244,117,213,178,131, 59, 54,143, 94,191,106,153,227,203, 62, 44,185,107,203,103, 76,
+231,206,157, 43,131,130,130, 28, 37, 18, 73, 69, 72, 72, 72,217,222,189,123, 15,163,109, 33, 26,142, 46, 91,182,172,215,192,129,
+ 3,253,108,173, 36, 38,153, 24,144, 82,117, 16,178, 90,240,205,197,240,243,242,101, 8,169,180,203,228,201,147,245,120, 28, 23,
+202, 34,206, 5, 11, 22,248, 4, 7, 7, 43,237,172, 69,117, 18, 1, 81, 36,166,104, 85,101,218,173,171, 0, 32,178,181,215, 66,
+ 36, 9,158, 58,117,170,182, 45,156,139, 23, 47, 14,232,212,169,147, 66,192, 99, 53, 4,109, 46,108, 92,163,215, 21, 83,124,129,
+ 6, 2, 65,216,188,121,243,140,109,225, 92,180,104,145,127,183,110,221, 92,156,108,196,117, 18, 62, 10, 37, 20, 93,200, 55,232,
+243, 4,102, 67,177,216,206, 78, 3,137, 52,244,213, 87, 95, 53, 52,199,217,224, 94, 61,235, 12,241,120, 60, 20, 22, 22,162,252,
+193, 21,148, 63,184,141,206,100, 13,122,185, 56, 65, 46,151,183,122, 63, 17,129, 25, 68,250, 3, 16,233, 15, 64, 16,129, 25, 68,
+ 83,203,207,138, 44,165, 82,217, 98,217,111,177,169, 47, 61,224, 66,123, 56, 79,156, 56,241,233,216,177, 99, 77,147, 38, 77,194,
+233,211,167, 65, 16, 4, 46, 93,186,132,130,130, 2, 12, 31, 62, 28, 44,203, 34, 37, 37, 5, 70,163, 17,233,233,233,152, 48, 97,
+ 2,162,162,162, 52,113,113,113, 31,115, 85, 61, 7, 14, 28,254, 83, 2,107, 96,189, 37, 55,176, 97,133, 73, 36, 74,101,230,204,
+129,205, 47,191,128,127,247, 46, 38,188,248,162,181, 72, 36,218,162, 80, 40,186, 43,149,202,190, 18,137,228,235, 5, 11, 22, 88,
+ 57, 68, 71,195, 53, 62, 30,170,211,167, 97,226,243,111,180,229,224, 90,173,182,193,141,129,161, 94,200,217,218,218,130, 97, 24,
+ 88,170, 93, 88, 26, 9,170,146,187, 16,162, 35, 88,160,230,100,205,224,132,151,179, 87,187,156,169,233,220,249,110, 53,223,103,
+189,115, 47,199,157,157,250,220,208, 18,252, 90,129,181, 16,133,133,133, 96,193, 36,180, 37,157, 58,157,174,170,174,174,142,240,
+241,241,113, 76, 74, 74,242,241,245,245,117, 0, 64,232,245,250,235,127, 38,243,149, 74,101,239,208,208,208,253, 97, 97, 97, 57,
+161,161,161,251,149, 74,101,239, 54,236,190, 43, 57, 57, 25, 20, 69, 97,230,204,153,168,169,169,129,193, 96, 64, 94, 94, 30,114,
+115,115, 97, 48, 24,144,154,154,138,140,140, 12, 24, 12, 6,164,164,164, 64,175,215, 91, 34,220, 96,101,101,133,202, 50,181,108,
+223,182,207, 70,127,188,234, 35, 73,213,189, 36,228, 23, 22,131,161,181,133, 31,125,244, 81,182,143,143,207, 37,131,193,224, 79,
+211,244, 40, 0,251,218, 88,222, 82,186,116,233, 50,112,227,198,141,125, 87,127,250,189,208, 70, 94, 13,145,173, 61,132,118, 82,
+ 8, 61,195, 49,245,253,207,121,219,183,111,189,117,233,210,165, 18, 88, 54, 50,143, 4,144,210,163, 71,143,190, 69, 69, 69, 3,
+194,194,194,194,221, 58,117,146,201, 20,202, 10,145,194,181,148,209,235,174, 66,225,214, 63, 38, 38,230,250,185,115,231, 84,109,
+225,244,244,244,236,191,117,235,214, 94, 29, 59,118,236, 37,181,182,150,235,106,106,126, 48,107, 52,177,148, 92, 46,132, 68, 54,
+ 44, 46, 46,238,210,222,189,123,139,218,194, 25, 16, 16,208, 47, 58, 58,186, 71,247,238,221,123,185,123,123,203, 37,206,138, 50,
+153,171,187, 90,226, 23, 40,128,194,125, 72, 76, 76,204,149,243,231,207, 91,154, 78,144, 36, 9, 30,143, 7,185, 92,142, 11, 23,
+ 46, 32,170, 95, 23, 40,201,114,132,116, 84, 98,228,244,215,241,219,111,191,129,207,231,227,207,186,173, 77,184,175,173, 10,162,
+182,138,175,214, 56, 85, 42,213,214,196,196,196, 47, 94,122,233, 37, 12, 25, 50, 4, 55,111,222,196,226,197,139,179,207,159, 63,
+ 15, 0,184,121,243, 38,214,174, 93,155,157,144,144,128,233,211,167, 35, 50, 50, 18, 41, 41, 41, 49, 92,240, 81, 14, 28,254,207,
+224, 15, 90,228,255, 50, 26,154, 8, 47, 60,249,237,109,103,103,165,211,105,242, 47, 92,184, 96, 28, 53,106,148, 64, 34,145, 96,
+226,164, 73,100, 7, 15,143,126, 23, 98, 98,206,202,164, 82, 98,210,178,101,242,224,224,224,198, 74,254,215, 95,127,213, 86, 85,
+ 85,150,117,232,208,193, 54, 47, 47,175,210,146,131,151,150,150, 66,161, 80,128,162, 40,212,213,213,129,162, 40,200,229,114,104,
+ 52, 26,139,251, 96,213, 85,147,167, 47, 93, 72, 29, 50,104,226,236,154, 97,217, 70,153,153,117,232,109, 69,178,160, 97,130, 78,
+195,194,204,176,188,107,172,109,143,179,126, 81, 21,107,125, 75, 51,243,207,108,117,210,178,134,211,109,201,164,138,138,138, 15,
+103,207,158,189, 47, 40, 40,200,209,202,202, 10, 46, 46, 46,228,155,111,190, 89,146,151,151,183,166,189, 25, 31, 16, 16, 48,217,
+223,223,127, 75,108,108,172,125, 78, 78, 14, 0,116, 90,182,108,217,160,140,140,140,185,233,233,233,150, 4, 47,221,191,113,227,
+198, 45,131, 7, 15,150, 69, 68, 68, 52, 10, 44,163,209,216,248,253,236,239,134,230,216,150,192, 48, 12,196, 98, 49, 98,191,221,
+ 60,236,227, 85, 31, 73,202,210, 19,112,235,210,105,196, 61,208,107, 54,124,183,231,170,184,193,173,108,235,249, 58, 73,187, 90,
+217, 90,237, 31, 52,116,132,235,184,169,179,201, 85,171, 86,177,191,159,138,101,191,251,106, 14,188,253,191, 0, 65,144,200,200,
+188,137, 89,147,250,179,169,183, 83,123, 0,112,111, 43,231,167,159,126, 90,151,145,145, 81,181,127,255,126,113,135, 14, 29,124,
+ 72,146, 20, 21, 21, 23,151, 77,158, 60,249,230,229,203,151,203, 25,134,153,211,174,116,224, 23, 88,155, 0, 0, 32, 0, 73, 68,
+ 65, 84,254,254,123, 93, 76, 76,140,212,201,201,201,159, 36, 73, 81, 85, 85, 85,233,236,217,179,147, 99, 99, 99,107, 24,134,153,
+219, 30,206,200,200,200,218,125,251,246, 73, 61, 60, 60,186,144, 36, 41, 42, 44, 42, 42,157, 52,105, 82, 74, 66, 66, 66, 53, 30,
+ 7, 26,109, 18, 19,231,103, 96,224, 11,143,127, 75, 36,146,178,128,128, 0,135, 81,163, 70,129,166,105,228,228,228,224,246,237,
+219, 24, 49,229, 21,216,219,219,227,220,157, 59, 80,169, 84,248,224,131, 15,160,213,106,113,239,222, 61,213, 95, 89,121,212, 55,
+237,177, 42,149,234, 15, 55,107,218, 81,255,198, 32,162, 79,137, 43, 47,226, 66, 75,253,172, 90,226, 4,128, 97,195,134, 77, 31,
+ 59,118, 44,126,249,229, 23, 44, 94,188, 56,123,229,202,149,222,147, 38, 77, 66, 90, 90, 26, 66, 67, 67,177,112,225, 66,239,141,
+ 27, 55,102,179, 44,235,221,167, 79, 31,184,187,187, 63,175, 82,169,222,231,158, 91, 28, 56,252,159,192,133,103,190,255, 39, 4,
+ 22,240, 68,135, 50,214, 90, 50,105,199,214,175,109,222,157,191,176, 46, 48, 48,208,206,197,197, 5, 36, 73, 98,196,200,145, 68,
+239, 83,167,172,248, 74, 37, 28,186,118, 5,203,178, 96, 24, 6, 23,227,227,113,246,236,217,186, 31,190,219,229, 54,227,141, 55,
+198, 0,104,118,228, 78, 67,179, 26, 65, 16, 40, 41, 41,105, 20, 88, 98,177, 24,133,133,133, 80, 40, 20, 16, 8, 4,160, 40,138,
+ 7,128, 2,208, 98,179,163, 66,161,248, 62,122,109,218,210,188,144, 69, 94,145, 82,146, 56, 89, 87, 4, 18, 4,204, 44, 3, 82,
+203,130, 97, 88,232, 77, 64,144, 27,101,119, 70, 15,219,235,169,167,115, 20, 10,197,247, 42,149,229,207,154,156,156,156,115, 90,
+173,246,237,186,186,186, 3, 0,200,171, 87,175, 50, 15, 30, 60,120,199,210, 14,233, 77, 65, 34,145,188, 31, 27, 27,107,191,102,
+205,154,138,179,103,207, 86, 13, 30, 60,216, 38, 58, 58,218, 97,242,228,201,239,195,130,232,240, 42,149, 74, 11, 32,166,184,184,
+248,157, 30, 61,122,160,188,188, 28, 6,131, 1,201,201,201,240,245,245, 69, 98, 98, 34,186,116,233,130,235,215,175,195,223,223,
+ 31, 52, 77, 67,167,211,129,182, 32,208, 86, 97,222, 35,185, 84, 95, 97, 93,120,237, 4, 50,111, 37,226, 68,182, 94,179,225,187,
+125, 39,186,134,134,215, 89, 42,124,159, 68,103,103,105,144,139,163,195,169,207, 55,174,179, 42,184,118, 18,251,183,127,206,254,
+126,236, 88,119,145, 53, 94,235, 61,244,221,137, 38, 35, 58, 48, 44, 4,145,145,125, 48,166,123, 42,193,215,163,226,108, 82,203,
+145,204,155,226, 60,240,253,207, 97, 58, 32,200,203,203,107, 12, 69, 81, 78, 0,140, 52, 77,167,193,194, 41,104,154, 75,167, 14,
+ 8, 82, 42,149, 99,196, 98,177, 27, 65, 16, 90,173, 86,123,247,175,224,244,246,246, 30, 67, 81,148, 43, 0, 13, 77,211, 89,104,
+227, 84, 57, 67,134, 12,217,176,107,215,174, 5,122,189,222,225, 9,183,149, 56,121,242, 36, 12, 6, 3,132, 66, 33, 43,147,201,
+144,151,151,199, 2, 80,177, 44,251,246, 95, 85,113,140, 31, 63, 30, 87,175, 94, 93, 5, 96, 69, 75,219,149,151,151,243,236,237,
+237,205, 79, 10,175,230,162,192, 91,194,121,237,218,181, 79,223,124,243,205,247,227,226,226,242, 87,174, 92, 25, 58,109,218, 52,
+ 28, 57,114, 4, 30, 30, 30,200,204,204,196,130, 5, 11, 64, 16,132,247,198,141, 27, 83,246,238,221,171, 44, 42, 42,250,140,123,
+102,113,224,240,127, 10,196,255,202,137, 52,217, 7,139, 96, 8,190,159,175, 47,109,208,212,238,126, 99,250,116, 77,106,106, 42,
+104,154,134,217,108,134,238,250,117,212,157, 58, 5,179,217, 12,150,101,113,237,234, 85,204,157, 51,167, 86,167,169,253,182, 83,
+167,142, 44,193,178,178, 39,168,254, 48,219,182,161,161, 45, 16,143,155, 8,181, 90, 45,248,124, 62,228,114, 57, 74, 74, 74, 32,
+ 20, 10, 33,145, 72,208,173, 91, 55,210,221,221, 61,170,137,228, 61,197,153,156,156,108, 66,181,126,194, 47, 83,231, 21,185,107,
+204,236, 76,219, 78,232,192,151, 60,238,111, 5,192,201,138,196,144, 64, 30,236,121,165,236,237, 61, 47,171, 8,115,213,132,228,
+228,100, 83, 75,156,207, 66,169, 84,118, 14, 10, 10,250,186, 33, 14, 86,191,126,253,200,224,224,224, 47,149, 74,101,231, 22,118,
+107,145, 83, 44, 22,139, 0,224,244,233,211,229,241,241,241, 35, 79,159, 62, 93, 14,128,109,248,223, 18, 78,146, 36,119,108,223,
+190, 29, 82,169, 20,102,179, 25, 6,131, 1,122,189, 30, 6,131,225, 15, 31, 71, 71, 71,156, 57,115, 6, 12,195, 28,111, 45,157,
+ 1,193, 33,181, 85, 60,219,226, 61,191,254,142,147, 15,141,181,237, 16, 87,141,156,129, 10, 89, 23, 55,167,199, 2,163, 44, 61,
+ 1,247,110, 39,226,196,241,163, 41, 58,160,160,178, 26,159, 84, 86, 35,164, 78, 7,187,158, 1, 40, 61,117, 96, 41,177,240, 21,
+ 16, 32,154,156, 51,207, 34,206,122,129, 50,139,166,233,158, 52, 77,247, 4, 48,171, 5,209,210, 38, 78,157, 78,215, 75,171,213,
+254,165,156,109, 77,103, 67, 31, 44, 0,248,232,163,143,174,199,199,199,191,116,253,250,245,193, 13,159, 59,119,238, 12,202,201,
+201, 25, 84, 80, 80, 48, 40,231,168,136,186,115,231, 14, 47, 49, 49,145,159,152,152,232,145,148,148, 20,103,105,249,108, 14, 79,
+118,112, 87,169, 84, 43,159,113,154, 26, 57,137,192, 12,226,235,141,179,127,136,141,141, 85,252, 85,156, 0,144,153,153,249,245,
+174, 93,187, 60,187,117,235,230,222, 16,138,225,219,111,191, 5,240, 56,146,253,231,159,127,142,222,189,123,195,221,221,221, 57,
+ 41, 41,201,171,176,176,112,123, 91,239,205,118,130,227,228, 56, 57, 78, 14, 22, 8, 44,130,161,105,154,129,179,139,179, 85,137,
+ 90,253,213,236,217,179,202, 86,175, 94,173,251,127,237, 93,121, 92, 84,213,251,126,238,157,125,103, 21, 24, 65, 81, 65, 4,113,
+ 65, 92, 48,181, 12,197,157,178, 92, 75,203,221,220,181,197,204,212,159,184,164,169,165,102,230,146, 90,238, 75,102,101,185,100,
+148, 95,200, 21, 17,220, 80,217, 20, 20, 24,246, 29,134, 89,238,242,251, 3,102, 26, 8, 97, 6, 53,177,238,243,249,220,207,157,
+ 59,119,230,153,115,206,189,115,206,115,223,247, 61,239,137,136,136,128,254,206, 29, 84,196,196, 32, 60, 60, 28,115,231,206, 45,
+127,103,218, 52, 77, 69,121,233, 70, 55, 87, 23,103,154,102, 64, 16, 76,157, 22, 18,146, 36,147, 19, 18, 18, 0, 0, 58,157, 14,
+ 95,126,249,165,209, 96, 48, 64,165, 82,129,101, 89,236,216,177,131, 1,128,190,125,251,202, 5, 2,129, 85, 75,144,100,100,100,
+ 92, 47,126,152,209,255,251, 55,166, 39,223, 62,244,115,113,135, 60, 61, 70, 73,212,120,173, 3,139, 86,146, 84, 60,184,248, 77,
+209,197,109,195,146,203, 11, 30, 14,200,200,200,184,110,107, 35,185,185,185,253,223,129, 3, 7, 92,174, 94,189,202,234,116, 58,
+164,167,167,179,243,231,207,119,113,115,115,251,191,199, 81,233,133,133,133, 32, 73,146,169,106, 23,198, 86,245,158,158,158,126,
+243,232,209,163, 63,157, 61,123, 22, 30, 30, 30,160,105,218, 44,176, 44,247,124, 62, 31, 4, 65, 96,219,182,109,133, 4, 65, 44,
+172,143, 87, 36, 18, 97,251,145,147,167, 62,216,122,236,200,145,240,168, 99, 13,181, 92, 1,128, 76,169, 90,241,249,186, 79,237,
+ 76,174,198, 3, 87, 51,138, 9,154,173,221, 85,103, 72,175,188, 71,106, 23, 88, 13,227,124, 26,229,124,134,156,207, 18,149, 51,
+253, 52, 68,211,166, 77,241,253,247,223,219, 28,131,229,223,138,248, 91,112,123, 67, 57,111,222,188,249,233,168, 81,163,178,194,
+194,194,182, 84, 84, 84,148, 85, 61,188, 25, 62,255,252,243,207,102,205,154,149,149,158,158,206, 89,174, 56,112,224,240, 76, 81,
+107,154, 6,134, 71,158,223,182,125,235,160,195, 7, 15,185,241,120,164,219,189,123,247,175,188, 61,105, 82,122,100,100,164,163,
+160,117,235,110, 36, 73, 50,250,143, 62,186, 88, 90, 92,148,191,247,219,111, 60, 91,182,108, 17, 80,181,216, 51,203,240,200,243,
+117,253, 96,126,126,254,238,121,243,230,117,219,179,103,143,112,221,186,117,101,233,233,233,103, 46, 95,190, 60,104,203,150, 45,
+146, 29, 59,118,148, 23, 21, 21, 29, 63,121,242,228,208,224,224, 96, 74,175,215, 91,157, 95, 40, 59, 59, 59, 14,217,217,126,228,
+250, 29, 99,226,183,239,235,207,242,200, 30,168, 16,130, 96,233, 11, 36, 85,122, 38, 59, 35,227, 0, 0,170, 33,141, 36,145, 72,
+ 2,164, 82, 41, 18, 19, 19, 11,186,117,235,166, 23,137, 68,130, 22, 45, 90, 56, 73, 36,146,128,134, 54, 60,203,178,108, 65, 65,
+ 1, 88,150,229, 3, 32,104,154,230, 3, 0, 83, 95,210,162, 26, 16, 10,133,111, 76,156, 56,241,167, 45, 91,182,244,239,219,183,
+ 47,188,188,188, 96, 52, 26,225,235,235, 11,189, 94, 15, 31, 31, 31, 84, 84, 84,224,139, 47,190, 64,105,105,233,123, 25, 25, 25,
+ 5,117,241, 49, 12, 3,177, 88, 12,145, 72, 4,223,182,237,203, 37, 18, 9, 26, 42,174, 0, 64, 46, 66,171,135,151, 78, 32,241,
+198, 85, 28,142,209, 20,150, 25,152,129,241, 57,229,183,106,126,174, 92,143,178,224,129,211, 43,133,183, 17,165, 79,130,243,105,
+148,243, 89,115, 90,198, 96, 89,243,217, 39,133, 71,197, 68,213,133,219,247, 65, 76,127,113, 51,139,219,155,107,205,113,213, 16,
+ 78, 19,210,210,210,182,153,150,192, 33, 73, 50,105,206,156, 57,243,211,211,211, 55,104, 52,154, 45, 26,141,102, 41,215,181,115,
+224,192,161, 81, 10,172,123,247,210,226,142,254,120,236,227, 99,223, 31,237,201,178, 36,143, 37,136, 50,128,252, 57, 46, 46,174,
+ 90,240,186,151,131,131,114,226,148,137,163, 9,134, 16, 16, 4, 67, 51, 60,242,252,189,123,105,113,245, 88,155,110,244,233,211,
+103,115,112,112,240, 36,154,166,215, 38, 38, 38,158, 33, 73, 50,118,224,192,129, 31, 80, 20,245, 89,114,114,242, 25, 95, 95,223,
+223, 14, 31, 62,252, 33, 77,211,182, 90,136,168,140,140,140, 61,168, 35, 6,172,129, 88, 14,192, 78, 44, 22, 23, 93,189,122,245,
+ 80,207,158, 61,223, 32, 8,194, 14, 64, 81, 67, 9,117, 58,221,156,146,146, 18,231,209,163, 71, 27, 1,248,190,254,250,235, 11,
+ 19, 18, 18, 4,101,101,101,201,182,240,164,166,166,234, 60, 61, 61,135,206,152, 49, 99,167, 80, 40,236,139,191,146,180,153,132,
+ 28, 88,150, 5, 77,211,199,171,218,230,145, 16, 8, 4,165, 67,134, 12, 81, 88, 97,225, 42,181,182,124,153,185, 37,115, 86,238,
+ 62,185, 90,103,100, 24,138, 97,167,197,103,151,215, 58,234, 95,137, 67,187, 39,205,105, 11,158, 23, 78, 0,152,254,226,230,125,
+184,189,217, 44,160, 76,110,195,154,199, 79, 11, 85, 22, 39, 22,192,178,250, 62, 91,215,186,130, 13,229,172,137,244,244,244,175,
+185,153,130, 28, 56,112,248,175,129,243, 79,115,156, 28, 39,199,201,113,114,156, 28, 39,199,249,159, 3,201, 53, 1, 7, 14, 28,
+ 56,112,224,192,129,195,147, 5, 81,135, 10,181,101,165,236,134, 40,217,155, 28, 39,199,201,113,114,156, 28, 39,199,201,113,254,
+231, 56,235,227,190, 9, 14, 79, 69,120,113,156, 28, 39,199,201,113,114,156, 28, 39,199,249,223,227,252, 87,129,115, 17,114,224,
+192,129, 3, 7, 14, 28, 56,112, 2,171, 81,224,109, 84, 38,133,188, 9,224,215,170,227,134, 66, 10,224, 35, 11,190, 83, 0, 62,
+ 4, 32,230,154,185, 81,131,199, 53, 1,135,134, 66,173, 86,183,105,219,182,237,213,122,146, 21,115,224,192,225, 57, 6,255, 81,
+ 39,188,188,188, 46,144, 36,217,138, 36, 43, 53,152,101, 46, 36,211,235,154,123,150,101,239,221,190,125,187,199,163, 56, 91,182,
+108,105,230, 36, 73, 18, 4, 65,128, 36, 73, 24,141, 70, 37,143,199, 43,169,141,147,166,233,180,248,248,248, 46,141,168,205,246,
+ 57, 56, 56, 24,183,108,217,242, 85, 96, 96, 96,235,252,252,252,178,169, 83,167, 14,184,121,243,102, 8,128,183,108,228,106, 79,
+ 16,196,222,174, 93,187, 30,155, 53,107,214,119,254,254,254,202,178,178, 50,241,225,195,135,221,182,109,219,246, 39, 77,211, 19,
+ 1,196,113,183,105,227,129,155,155, 91, 32, 65, 16,155, 21, 10, 69,151,210,210,210, 43, 0,102,106, 52,154,107, 92,203,252,163,
+152, 44, 18,137, 6,250,248,248,116,211,233,116, 5,247,238,221,139,170, 74,233,146,249,132,248,237, 0,252,159, 88, 44, 14,242,
+246,246,110,150,144,144,240,208, 96, 48, 92, 70,101,186,150,162,199, 37, 87,171,213,109,130,130,130,206,173, 90,181,202,105,225,
+194,133,231,162,162,162,122,105, 52,154,120,238,178,114,120, 22,104,214,172,153,125, 89, 89,217, 78,146, 36, 3, 37, 18,137,155,
+ 82,169,132, 66,161,200, 20,139,197,177, 50,153,108,210,201,147, 39, 11,185, 86,122,194, 2,139,199,227,121, 68, 69, 69,185, 40,
+149, 74,208, 52, 13,134, 97,192, 48,140,121,253,193,170, 37, 5, 77,194, 10, 52, 77, 35, 56, 56,184,206,213,132,249,124,126,179,
+171, 87,175,186, 40, 20,127,165, 90, 50, 24, 12,232,216,177, 35, 19, 19, 19,227, 82,115, 33, 97,189, 94,143,206,157, 59,179,141,
+168,189,198, 58, 57, 57,233, 83, 83, 31,188, 80,161, 51,244,152, 49,127,197,255,141,126,181,183,221,197,139, 23,201, 87, 94,121,
+ 69,112,246,236,217,183, 1,236,181,146, 75, 74, 16,196,174,197,139, 23,127,202, 23,202, 92,142,158,188,192,255,114,251,129,135,
+237,219,182, 36,230,205,158, 33,155, 51,103, 78,148,159,159,223, 55, 52, 77,191, 8, 64,199,221,170,141,227,255, 34, 16, 8,126,
+ 90,189,122,181,123,166, 70,131,245, 27, 54,116, 7,176, 5, 64,119,174,105,254, 49,124,180,108,217,178,213, 99,198,140, 1, 69,
+ 81,208,106,181, 77,147,146,146,218, 45, 94,188,248,245,164,164,164,110, 0,146, 31,147,191,137,143,143,207,157,121,243,230, 57,
+118,235,214, 13, 36, 73,162,176,176,176,233,185,115,231,186,239,218,181,235,237, 7, 15, 30,248, 1,200,121,156, 31,112,112,112,
+216,255,217,103,159, 57,137,197, 98,124,251,237,183, 78,163, 70,141,250, 19,192,139,143, 33,178, 72, 39, 39,167, 57, 0,130, 25,
+134, 17, 3,184, 92, 80, 80,176, 18,128,129,187, 93, 56,212, 5, 39, 39,167,201, 89, 89, 89, 95,201,100, 50,161,189,189, 61,164,
+ 82, 41,132, 66, 33, 68, 34, 81,115, 7, 7,135,230, 10,133, 98,240, 27,111,188, 49,243,208,161, 67, 59,185,214,122,130, 2,139,
+ 36, 73, 72,165, 82, 28, 62,124, 24, 60, 30, 15, 66,161, 16, 2,129, 0, 2,129,160,218,107,211,113,179,102,205,234,253, 49,147,
+ 85,234,248,241,227,176,179,179,131, 74,165, 66,219,182,109, 65, 16, 4,196, 98, 49,194,195,195,171,241,118,233,210,229,177,178,
+136, 55, 4, 35,250, 86, 38,233,172, 45,121, 99,232,204, 52,188, 50,102,213,240,114,157,241, 37,150, 37,180,153, 5,198,252,229,
+235,190,138,235,212,174, 45,113,228,200,145,206,206,206,206,111,218, 32,176,230,118,235,214,237, 56, 5,145,235,196,241, 19,198,
+ 79, 32, 9,106,216,132,247,151,157,139, 73, 42,216,233, 31,120, 32, 39, 39,109,218,151, 95,126, 25, 63, 99,198,140, 57, 0,214,
+ 90, 91,254, 46, 93,186, 60, 96, 24,166, 89,149, 72,206,149, 74,165,234,136,136, 8,170, 17,220,107, 77, 1,172, 3, 96, 4,176,
+ 6,128,101,210,205, 54, 66,161,112,173,193, 96,200, 71,229, 66,191, 15, 27,227,159,197,221,221,221,239,173,183,222,114,206,203,
+201,193,250, 13, 27,204, 77, 14, 43, 22, 37,127,210, 8, 12, 12,108, 37,145, 72,214, 1, 8,212,233,116,238, 0, 32,149, 74,211,
+ 89,150,253, 65,171,213, 46,138,137,137,209, 54,244,129, 22, 64, 59, 60,122,201, 38,118,237,218,181,241, 31,126,248,225,189,103,
+192,217,194,213,213,117,213,200,145, 35,113,226,196, 9,156, 60,121,210, 40,145, 72,248,227,199,143, 39,102,206,156,233, 48,111,
+222,188,193, 0,190,120,204,166, 29,188,108,217, 50,199,182,109,219,226,232,209,163,184,118,237,154,182, 77,155, 54,210,222,189,
+123,131,199,227, 57, 46, 90,180,104, 16,128,221,143,243, 3, 5, 5, 5, 43, 87,172, 88,177,103,243,230,205,202,228,228,100, 44,
+ 91,182,204,121,214,172, 89, 17, 0,122,219, 32,178,196, 0,230, 0, 8,230,241,120, 47,142, 31, 63,158,154, 61,123,182,128, 36,
+ 73,227,198,141, 27,155,236,220,185,115,180, 64, 32, 8,204,203,203, 43, 5, 7,212, 49,206, 25, 24,134, 17, 0,144, 0,208,213,
+119,252,111,170,187,163,163,227,244,252,252,252, 45, 77,155, 54, 69,147, 38, 77,204, 99, 45,195, 48, 40, 43, 43,131, 86,171, 69,
+171, 86,173,132,109,219,182,221, 49,115,230, 76,193, 87, 95,125,181,149,187, 99,108, 23, 88,189, 1, 68, 88,188,215, 27, 64, 4,
+ 65, 16, 96, 24, 6, 2,129, 0, 60, 30, 15,124, 62,223, 44,124, 44, 95,155,182, 71, 8,161,155, 53,110,102,162,164,164,196, 44,
+174,236,236,236,204,150, 48,163,209,248, 55, 78,154,166, 65,146, 36, 91, 23,231, 19,130,153,243,187,141,126,216, 29, 61,255,141,
+221,209,149,199,131,198, 84,238,119, 71, 3,225,151,167,173, 91,187,181,103,179,185, 43,191, 93,157,151, 87,152,237,239,209,132,
+122,115, 76,111, 79, 81,110, 86,174, 83,203,150,161, 0,178,109, 40,103,175,105,211,166, 29, 61,122, 54, 81, 46, 22,139, 68, 60,
+ 18,188, 54, 94,173, 4,238,170,214,142, 77, 6,116, 19,165, 36, 39,255,249,246,219,111, 79,155, 49, 99,134,147,133,192,170,183,
+238, 44,203,170,207,156, 57, 3, 62,159,143,144,144, 16,135,170,107, 76, 89, 83,247,167,209,158, 22, 88,156,149,149,245, 70, 69,
+ 69, 5,186,116,233,242,106, 94, 94, 94, 48,128, 88, 0, 29,134, 14, 29,250,231,119,223,125,167,140,137,137, 65,247,238,221,165,
+ 0, 70, 61,195,114,254, 13,106,181,250, 12,128,126, 4, 65, 64, 95, 81,161, 95,247,121,181,101,238,162,107,136,171,167, 94,206,
+128,128, 0, 63,137, 68,114,225,243,207, 63, 87,249,251,251, 19, 2,129, 0, 20, 69, 33, 33, 33,161,217,190,125,251,222,185,114,
+229,202,160,192,192, 64,255, 90, 22, 53,183,166,238,237,254,252,243,207, 50, 47, 47,175, 90, 5, 99,121,121, 57,207,203,203,235,
+229, 71,136,161,167,205,153,150,149,149,245, 90,191,126,253,166,101,102,102,222,161, 40,106, 1,128,246,206,206,206, 49,195,135,
+ 15,135, 84, 42, 13,214,106,181, 95, 60,206,117,119,113,113, 25,218,163, 71, 15,108,222,188, 25,107,214,172, 9, 1,240,251, 47,
+191,252,210,183,184,184, 56,252,213, 87, 95,133,189,189,253,107,133,133,133,187, 31,227, 94,106,211,173, 91,183, 29,239,189,247,
+158,242,151, 95,126,129,143,143, 15,138,139,139, 49,113,226, 68,151, 77,155, 54,253, 15,192,203, 22, 34,235, 81,156,254, 98,177,
+120,247,193,131, 7, 21, 94, 94, 94, 94, 66,161,144,244,242,242, 66,126,126, 62, 42, 42, 42,196, 43, 87,174,236, 32,145, 72,174,
+125,241,197, 23,187, 1, 12,123,198,255,163, 34, 0, 42, 0,246,176,205,189,122,179, 14, 62,115,124,170, 64, 32,128, 88, 44,134,
+ 68, 34,129, 68, 34,193,189,123,247,190,231,241,120, 19, 8,130, 48, 90,195, 73,252, 53,112, 5, 0,136,170,239, 24, 0,211, 8,
+250, 37, 15,130, 32, 54, 2, 8, 70,101, 28,117,132,139,139,203,220,172,172,172, 84,107, 57,213,106,181, 83, 94, 94,222, 23, 77,
+155, 54,133,139,139, 11,170, 30,200,209,165, 75, 23, 84, 84, 84,224,214,173, 91, 96, 24, 6, 73, 73, 73, 80,169, 84,232,208,161,
+195, 23, 97, 97, 97, 71,195,194,194,242,158, 98,221,107,213, 34,207,187,192,250, 95,213,147,165,169, 50,166, 99,208, 52,109, 22,
+ 88, 53,197, 79, 77,193, 69, 16, 4, 88,150, 37,234,177, 96,145,122,189,222, 44,174, 84, 42,149, 89,156, 81, 20, 85,171,192,106,
+ 40,236,237,237,127, 45, 44, 44,220, 0,224, 76, 67,190, 63,126,252,248,191,197,115,124,244,209, 71, 15,115,114,114,232,161,189,
+218,136,247,238, 61,145,247,118,232,203,110,254,222, 30,190,114, 39,151,128,242,242,242, 43, 0, 4,182, 24, 68,252,253,253,149,
+ 91, 15, 70,100,143,153,179,110,185,135,171,130,238,234,227,170,242,118,148,139,156, 36,124,202,158,165, 10,101, 50, 89, 59, 0,
+121,182,150,221,206,206, 14,199,143, 31,111,108,247,154,131, 86,171, 69, 65, 65, 1,182,109,219,166,154, 54,109,218,217,188,188,
+188,185, 67,135, 14,221,124,244,232, 81,121, 97, 97, 33, 12, 6, 3, 0,104, 27,225,255,100,133,131,131,195, 75,193,193,193,162,
+ 67, 71,142,136, 88,150, 45, 67,229,114, 68,165, 44,203,206,250,167, 11, 35,145, 72, 62, 88,185,114,165,202,223,223,159,200,205,
+205, 5,203,178, 32, 73, 18,206,206,206,152, 63,127,190,100,209,162, 69,238,241,241,241, 31,163, 1,203,206, 0, 32, 30, 37,132,
+ 0, 64, 38,147,209,176,125,114, 76,173,156, 20, 69, 17, 61,123,246,156,159,155,155,219, 65,171,213,126, 98, 5, 15, 5,224,120,
+ 90, 90,154,229,205,125,237,206,157, 59, 90, 62,159, 47,109,217,178,101, 80, 92,220,227,133, 44,182,105,211,230, 5,129, 64,128,
+203,151, 47,235, 44, 58,247,136,235,215,175,235,134, 13, 27, 38,110,214,172,217, 11,133,133,214,133,164,168,213,234, 54,222,222,
+222,191, 57, 59, 59, 75, 77, 75, 86, 57, 57, 57, 9,214,174, 93,171, 76, 75, 75, 3, 69, 81, 88,184,112, 33, 66, 67, 67,225,224,
+224,128, 9, 19, 38,184,238,216,177, 99, 63,128,206,117, 89,174,196, 98,241,238,196,196, 68, 95,181, 90, 45,189,116,233, 18, 58,
+118,236,136,220,220, 92,100,102,102,162,180,180, 20,153,153,153,152, 52,105,146,203,250,245,235,213,141,232, 63, 84,200,231,243,
+ 33,151,203,237,139,138,138, 30, 39,142, 77, 12, 64, 4, 0,124, 62,223, 44,174,196, 98, 49,196,226,255,196,188, 32,119,130, 32,
+226, 4, 2,129, 88, 46,151, 11, 73,146,132, 92, 46, 31,224,225,225,113, 43, 36, 36,164,253,190,125,251, 82,172, 33,169,168,168,
+216, 43,149, 74, 5, 77,154, 52, 1, 0,244,239,223, 31,227,199,143, 71, 78, 78, 14,147,145,145, 1, 95, 95, 95, 50, 34, 34, 2,
+ 89, 89, 89,184,118,237, 26,186,118,237, 42,112,116,116,220, 11, 96,208, 83,172,219, 35,181,200,243, 44,176,106, 86,206, 12,134,
+ 97,170,137,171,218, 44, 87,150, 22,172,250,220,121, 4, 65,128,166,105,184,185,185, 65, 38,147, 65, 38,147,153,207,153,196,156,
+229,198,178,108,131, 93,132,173, 91,183,238, 35,147,201, 94, 60,123,246,236,171, 0,194,173,253,222,200,121,119,204, 86,171,154,
+ 8, 8, 8,184,176,112,225,194,129,127,252,241, 71,193, 11, 29, 91, 49,226,140,135,121, 50, 7,231,142, 68, 19,151,144, 25, 83,
+166, 94, 4,112,208,134, 34,102, 84, 84, 84,136, 91,184,145,218,140,162, 98,125, 43,149,157,125, 43, 59,133,172,133,179,157,147,
+131, 68, 68,202, 93, 93,154, 26,141,198, 66, 0, 25,245, 17, 89,186, 5,197, 98,177,158, 32, 8,190,189,189, 61,236,236,236, 12,
+ 5, 5, 5, 21,129,129,129, 16,137, 68,185, 66,161,208,106,119, 97,215,174, 93,179,104,154,118,169,235, 51, 66,161, 48,251,210,
+165, 75,174, 86,214,119, 81, 64, 64, 64,239, 45, 91,182, 52,241,241,241,193,182,109,219, 84, 71,143, 30,221,189,127,255,126, 20,
+ 22, 22,226,254,253,251,152, 56,113, 98, 49, 42,221,136,141,205,148,126,110,196,136, 17,216,185,115, 39, 91,245, 16, 33, 39, 8,
+162,163,157,157,221,221,219,183,111,255,227,113, 46, 36, 73, 14,240,245,245, 37,138,138,138,192,178, 44,120, 60, 94,181,109,254,
+252,249,210, 73,147, 38, 45,238,222,189,251,124,129, 64, 80, 76, 81,212,161,210,210,210, 79,110,221,186,213,168,130, 85, 95,124,
+241,197,119, 31, 62,124, 24,234,233,233,249,243, 99,208,176, 20, 69,233, 89,150,149,242,120, 60,193,227,150,137, 32, 8, 94, 85,
+127, 84, 97, 97,249,165,170,142,197,176, 97,246,168,163,163,227,254,125,251,246,121,120,120,120,192,104, 52,194,104, 52,162,172,
+172, 12, 17, 17, 17,208,233,116,230, 69,217, 63,253,244,211,138,153, 51,103, 74,142, 28, 57,146,173,213,106,199,214, 67, 59,231,
+187,239,190, 83,170,213,106,169, 86,171, 69,114,114, 50, 58,119,238,140,146,146, 18,148,149,149,161,188,188, 28, 6,131, 1, 69,
+ 69, 69,246, 52, 77,235, 27,203,181,230,241,120, 16,139,197, 16, 8, 4,133,205,154, 53, 3, 73,146,146,212,212,212,134,184,220,
+ 84, 0,138,249,124,190,200, 82, 88, 73, 36, 18,220,188,121,243,112, 29,214,171,218,111, 30,203, 96, 98, 43,142,159, 53, 8,130,
+216, 40, 16, 8,196, 78, 78, 78, 66,211,123, 6,131, 65,232,224,224, 0, 79, 79,207,205, 0, 6, 91,201,211,201,201,201, 9, 4,
+ 65, 64, 40, 20, 98,202,148, 41,136,138,138,250, 33, 45, 45,237,237,236,236,108,148,150,150,238, 85,169, 84,175,103,103,103,131,
+166,105,164,164,164, 32, 32, 32,160,211, 63, 84,205,231, 94, 88,213, 20, 88,189,107,236, 77, 22,169,122, 45, 87,245,184, 8,171,
+193, 96, 48, 40, 66, 67, 67, 25,147, 24, 51,205, 34, 4, 64,208, 52, 13,161, 80, 88,141,179, 74, 96, 53,232, 6, 23,139,197, 24,
+ 60,120,176, 68, 38,147,253,248,203, 47,191,188, 10,224,143,134, 54,210,241,163, 7, 92,215, 46, 93,184,212,177,105, 75,239,143,
+ 63,254,152, 63,104,208,160,240, 67,135, 14,117,117,238,213,103, 96,228,239,135, 93,183, 45, 56,254,243,225,195,135, 75, 96,125,
+252, 21, 0,156,255,225,135, 31,212, 31,204,158, 33,236,221,187,247,247,227, 58,188,199, 87,139, 24,165,163, 88,200,147,241,248,
+164,184, 89,139,129,191, 71, 68,106, 0, 68, 90,209, 73,168,195,195,195, 97,111,111, 15, 0, 34,189, 94, 15,123,123,123,108,219,
+182, 77,162, 82,169,160, 82,169,208,163, 71, 15, 7,161, 80, 88,159,187,208, 82,240,186,252,239,127,255,131, 66,161, 64, 89, 89,
+ 25,116, 58, 29, 40,138, 2,203,178,230, 39,199,151, 95,126,217,197,134,250, 38, 23, 23, 23,191, 52, 99,198,140,200, 45, 91,182,
+ 52,241,246,246,198,242,229,203,145,151,151,135, 7, 15, 30, 96,236,216,177,197,247,238,221, 11, 70,245,216,172,103,142,246,237,
+219,179,231,206,157,195,169, 83,167,240,202, 43,175, 16,199,143, 31, 55,208, 52, 45,204,200,200,184,145,145,145,241, 76,202, 68,
+ 81,148, 82, 36, 18,193,104, 52,130,207,231,155, 93,248, 38,129,229,238,238,142,223,126,251,141, 95, 94, 94,206,207,203,203,147,
+237,218,181,107,118,116,116,180, 26,192,155,207,178, 45,183,110,221,234, 57,101,202,148, 7,124, 62,159, 29, 56,112,224, 91,169,
+169,169,175,169,213,234,223,207,158, 61,251, 57, 0,155,211, 21,180,107,215, 46,154,199,227,121, 24,141, 70,225,143, 63,254,104,
+164,105, 90,216,190,125,251, 44,147,181,200, 52, 54, 82, 20,149,150,144,144,208,197, 26, 62,173, 86, 43,252,250,235,175,141, 21,
+ 21, 21,194, 14, 29, 58,152,185, 12, 6,131,240,167,159,126, 50, 26,141, 70, 97,155, 54,109,162,173,153,217,156,159,159, 63,118,
+222,188,121,127, 30, 62,124,216,153,199,227, 33, 53, 53, 21,249,249,249,176,183,183,199,190,125,251,208,162, 69, 11,132,135,135,
+231,211, 52, 61,121,231,206,157,139,181, 90,237, 88, 43, 98,176, 94, 14, 10, 10,242, 44, 44, 44,132,157,157, 29, 74, 75, 75, 17,
+ 29, 29, 13,127,127,127,100,100,100,128, 36, 73,216,219,219, 99,235,214,173,229, 4, 65,228, 55,134,255, 16, 73,146,102, 33,100,
+ 33,136, 42,130,130,130,112,254,252,249, 3, 54,138, 34,189,169,255,177,116, 13,138,197, 98,240,120, 60,155, 93, 30, 12,195, 8,
+ 1,116, 50, 13,232,245, 29, 55, 2,244,150,203,229,194,154,111, 22, 20, 20, 8,125,125,125, 95,180, 97,124,116,146, 74,165,149,
+132,189,123, 35, 59, 59,155,246,242,242, 26, 61,122,244,104, 35, 0, 76,157, 58,117,116, 78, 78, 78,133,209,104,228,241,249,124,
+228,228,228,160, 85,171, 86, 78,255, 68,253,106,106,145,231, 93, 96, 17,168,116,119, 88,238,205, 22,172,250, 44, 87,166,115, 38,
+161, 84,207, 31,173,240,234,213,171,114,185, 92,110,126,207,104, 52,162, 83,167, 78, 12,195, 48, 68,205,223,122, 28, 11,150, 88,
+ 44,134,189,189, 61,222,124,243, 77, 89,122,122,250,238,107,215,174,121, 88,243,189,202, 24,172,234,226,106,251,154,229,155,191,
+ 92,187,210, 41,233,212,183,216,185,233, 51, 90, 46, 87,196, 4, 4, 4,188, 84, 84, 84,164,179,151,235,144,153,135,163, 0,246,
+219,210,231, 0, 56,124,241,226,197,216,254,253,251, 95,188,127,255,190, 67,106, 98,226, 57,149,190,180, 84,209,172, 37, 37,116,
+113, 29,170, 53, 24,249, 35, 70,140,112, 5,176,201,138,167, 17, 48, 12,131, 19, 39, 78, 64,169, 84, 66,165, 82,193,222,222, 30,
+ 38,113,213, 80,220,187,119, 15,105,105,105,144,203,229,144,203,229, 80, 40, 20, 80, 40, 20, 16,137, 68,213,172,143, 54, 32,190,
+184,184,120,238,177, 99,199, 14,173, 94,189, 26, 5, 5, 5, 40, 43, 43,195,210,165, 75,145,156,156, 60, 15,149, 49, 89,141, 6,
+ 29, 58,116, 96, 47, 92,184,128,115,231,206,161,172,172, 12,155, 55,111,134, 90,173,238, 3, 96,201,179, 44, 23,195, 48, 66, 83,
+170, 19,146, 36,255,102,193, 50,137, 45,169, 84, 10,103,103,103, 44, 92,184, 80, 56,116,232,208,208,103, 89,230,181,107,215,182,
+222,184,113,227,174, 61,123,246,156, 26, 59,118,236,145,155, 55,111, 78,176,179,179,187,241,199, 31,127,172, 20,139,197, 76,131,
+ 58, 47, 62,223, 35, 54, 54,214, 82,228, 11,104,154,150,209, 52, 13,138,162, 96, 52, 26, 81, 94, 94,142,144,144, 16,171,249,162,
+162,162,100, 0,176,100,201, 18, 1, 0, 25,195, 48,176,228,211,106,181,130,190,125,251, 90,213,151,104, 52,154,248,203,151, 47,
+191, 56,122,244,232, 11,135, 14, 29,114,240,244,244, 68, 90, 90, 26, 50, 50, 50,224,237,237,141, 77,155, 54,149,177, 44,219,179,
+ 74, 84,253,100,101,181,155, 58, 56, 56, 8, 30, 60,120, 0,138,162, 16, 24, 24,136,173, 91,183, 98,212,168, 81,104,215,174, 29,
+ 74, 74, 74, 16, 23, 23,135,221,187,119, 59, 8,133,194,225,141, 65, 92,153, 68, 80,109, 91, 3, 31, 48, 84, 18,137,164, 88, 34,
+145,136, 76, 66,235,202,149, 43, 54, 91,175, 44, 16,107,227,241, 51,131,169, 15, 54, 26,171, 87, 83, 46,151,195,199,199,199,106,
+ 30,185, 92, 78,152,198, 88,163,209, 8,141, 70, 67,223,188,121,211, 44, 80,213,106, 53,125,233,210, 37, 90,167,211,241,148, 74,
+ 37, 0,192,222,222,254,105,139,204, 71,106,145,231,221,130, 21, 89, 99,111,182, 96,153, 4, 79, 93, 65,238,124, 62,223, 90,129,
+ 5, 30,143,135,211,167, 79, 67,161, 80, 64,169, 84,194,207,207,207,100,133,169,213, 42,214, 80,129, 37, 18,137, 96,103,103,135,
+ 51,103,206, 84, 92,187,118,109, 74, 67, 45, 87,219,215, 44,223,252,233, 39,203,156,242,110, 95, 68, 90,134, 6,121, 89,134,232,
+243, 55, 83,126, 69,101,130, 81,224,118,219, 8,194,255,142,213,226,202,207, 89, 26,160,114, 80,253, 20,220,111,160,251,107,227,
+102,144, 51,103,206,124, 97,252,248,241,249,111,189,245,214, 28,169, 84,218,142,162,168,130,240,136,136,148,145, 35, 71, 58, 21,
+ 21, 21,141,135, 21, 49, 73, 60, 30, 79,211,191,127,255,102, 0,160, 84, 42,245,223,124,243,141,200,222,222, 30, 99,198,140,169,
+200,204,204,148, 84,181, 71,129,181,214,171,170,193, 38,123,242,228,201, 46,245,180,113,182,141, 77,218, 41, 52, 52,116,199,225,
+195,135,145,151,151,135,178,178, 50, 8,133, 66,172, 91,183, 14, 15, 30, 60,248, 34, 62, 62,254,102, 99,233,204, 58,118,236,200,
+ 94,186,116, 9, 55,110,220,128, 78,167,195,148, 41, 83, 0,128,208,104, 52, 0,208,255, 89,123, 10,210,211,211,177,111,223, 62,
+208, 52,141,177, 99,199,162, 69,139, 22,102,129,149,153,153,137,111,190,249, 6, 52, 77, 99,242,228,201,104,222,188, 57,140, 70,
+163,164,119,239,222,252,103, 53,163,244,189,247,222, 75,250,225,135, 31, 78, 61,124,248,112,208,154, 53,107,122, 19, 4,193,204,
+159, 63,255, 83,149, 74,245, 88,179, 47, 11,138, 74,112, 55, 49, 21, 20, 69,213,186, 53,113,118,180,153, 47, 33,249, 1, 40,138,
+ 54,115,208,244, 95,124, 78,142,182,241,105, 52,154,242,188,188,188,178,201,147, 39,219,239,216,177,131,240,241,241,193,253,251,
+247, 33, 16, 8,160, 84, 42,203,239,222,189,107,107,106,134,244,252,252,124, 31, 30,143, 39, 76, 76, 76,132,167,167, 39,186,117,
+235,134, 85,171, 86, 33, 39, 39, 7, 20, 69,193,197,197,133, 49, 26,141, 49, 6,131, 33,242, 89,255,143,106, 90,174, 76, 91,149,
+229,138, 4,240, 51,254, 30, 56, 94,175, 21,203,210,130,213, 80,235,213, 83, 20,149, 79,109,102,162,143,143, 79,132, 74,165, 10,
+189,115,231, 78, 53, 43,214,155,111,190,105,240,246,246,254,211, 90, 30,149, 74, 85, 32, 18,137,156, 42, 42, 42,112,241,226, 69,
+248,249,249, 9,139,138,138, 86,163, 50,233, 53,126,250,233,167,213, 89, 89, 89, 66,119,119,119, 0,128,175,175, 47,138,138,138,
+ 10,254,129,230,251,155, 22,249, 55, 8,172, 90,205,114, 53, 93,132,117,137, 44, 83, 66,210,250, 44, 45, 90,173,214,108, 17,145,
+203,229, 96, 24,166,154, 59,178,166,192,170,101, 22,161,213,127,236,179,103,207, 86,108,223,190,125,132, 89, 12, 89, 1,203, 24,
+172,175,215,175, 92,107, 18, 87,215,207,253,134,159,238, 20,229,206, 95,181,126, 99, 67, 27,187,173,179,172,163,171,171,211,255,
+214,175,251, 84,149,126,249, 20,142,108, 95,207, 94,143,138,234, 58, 61, 42,106,248,244,233,211, 29, 81, 25,111,149, 14,224, 28,
+ 42,167,155, 91, 21,240,125,249,242,229,230,166,215, 93,187,118, 53,170, 84, 42, 40, 20, 10,228,228,228, 8, 21, 10,133, 36, 34,
+ 34,194,230, 88,135,168,168, 40,215, 39,124,175,181,121,229,149, 87, 34,191,255,254,123,121, 97, 97, 33, 82, 82, 82,240,225,135,
+ 31,226,171,175,190,130, 74,165,194,137, 19, 39,148,161,161,161,255,187,123,247,110, 15, 60,227,228,170, 1, 1, 1,108, 84, 84,
+ 20, 82, 82, 82, 64, 81, 20, 94,123,237,181,122, 31, 30,254, 97, 11, 22, 59,111,222, 60,236,216,177, 3, 36, 73, 98,220,184,113,
+ 40, 46, 46, 54,159,119,116,116,172,237, 28, 15,245,207, 40,125,122, 29, 13,159,207, 70, 68, 68,172,233,221,187, 55, 30, 62,124,
+ 56,168,115,231,206, 95, 78,152, 48, 33,253,113,121, 29,236,148, 8,240,247,130, 78,167,131, 78,167, 67,211,166, 77, 81, 82, 82,
+130,164,164, 36,232,116, 58,184,186,216,219,204,215,169, 93,107,232,245,122,232,116, 58,184,184,184,160,172,172, 12,247,239,223,
+135, 78,167, 67,147, 38, 14,182,208, 53, 27, 48, 96,192,217, 3, 7, 14, 56,237,223,191, 95, 63,108,216, 48,209,242,229,203, 9,
+149, 74,133,172,172, 44, 52, 48,188, 39,226,220,185,115,158, 33, 33, 33,190,113,113,113,136,140,140,132, 94,175, 71,167, 78,157,
+144,144,144,128, 23, 94,120, 1,197,197,197,151,175, 92,185,210, 40,102,185,212, 20, 86,209,209,209,135,133, 66, 33, 11,160,161,
+214, 38, 0, 64, 90, 90,154,184,125,251,246, 58,177, 88, 44,186,112,225,194,129,199,176, 94, 61,249,167,159,199,159,153,248, 72,
+180,110,221,122,158,135,135, 71, 72, 96, 96, 32,226,226,226,132, 98,177, 24,111,189,245,150, 97,240,224,193, 6, 62,159,111,245,
+132, 27,137, 68,114, 91,169, 84,190,164,211,233,160,215,235, 17, 30, 30, 14, 71, 71,199, 15, 67, 67, 67,231,106, 52, 26,100,100,
+100,136,196, 98,177,217, 74, 30, 28, 28,140,252,252,252,219,255, 64,243,213,170, 69,158,119,129, 85,171, 24,178,180, 96,213,229,
+ 30,180, 86, 96,145, 36, 9,189, 94, 15,153, 76,102, 22, 88,150,153,226, 27,194,249, 72,155,111,108,236,133,228,228,228,207, 1,
+156,108,200,247,191,219,191, 71,109,199,148, 55,203,184,124, 18,119,175, 71,227,135,184,194,220,249,171,214,207,126,117,196,152,
+172,154,130,204,170, 39,143, 38,178,246,174, 46,149,226, 42,239,246, 69, 36,222,136,198,201,203,105, 87,245, 64, 2,128, 79,158,
+228, 69, 53,249,214, 27, 19,196, 98,241, 60,211,108,193,228,228,100,140, 29, 59,182, 48, 37, 37,101,198,107,175,189,246,213,175,
+191,254,234,224,224,224,128, 51,103,206, 40,155, 53,107,182, 26,192,179,116,103,177, 87,175, 94, 69, 94, 94,229,228,205,158, 61,
+123, 54, 42,113, 5, 0, 87,175, 94, 21,134,134,134,254, 14,160,207,237,219,183,193, 48,204,133,152,152,152,158,166,243,117,157,
+179, 70,191,149,148,148, 8,148, 74,101,173,131,149, 80, 40, 20, 54,192,226, 96,230, 60,127,254,252,167,159,127,254,249, 15,239,
+191,255,126,226, 99,114,214,106,193, 10, 13, 13, 69,133,206,136,180,172, 34, 80, 20,133,114,125,214, 99, 89,176, 66, 67, 67,161,
+173,208,227,129, 38, 31, 20, 69,161,180,194,106, 67,137,172, 95,191,126,191, 30, 58,116,200,237,194,133, 11,208,235,245, 76,116,
+116,244, 3,215, 14,207, 0, 0, 32, 0, 73, 68, 65, 84,253,169, 83,167,170, 38, 77,154,228, 84, 89,229, 6, 97,211,155,111,190,
+ 57,226,252,249,243,249,190,190,190,142, 87,174, 92, 65,118,118, 54,140, 70, 35,250,244,233, 3,177, 88,156,186,122,245,106, 33,
+172, 8, 45,248, 39, 5,214,237,219,183, 77,194,106,220,147, 18, 66, 38, 11,214,127, 9, 7, 14, 28, 72,255,230,155,111,252,213,
+106,245,198,183,222,122, 43,184,105,211,166,164, 72, 36,138,224,243,249,115, 9,130, 72,181,161,237, 38, 56, 56, 56, 36,241,120,
+ 60, 94,122,122, 58, 18, 19, 19,193,227,241,192,178,172, 72,171,213,194,213,213, 21, 60, 30,207,100, 29,131,135,135, 7,157,144,
+144, 48, 1, 28,158,140,192, 50, 97,197,138, 21,216,190,125, 59,222,121,231,157, 58, 63, 87,149, 22,160,230, 64,212, 30, 22,185,
+ 50, 76,179, 8,195,194,194,170,125,207,228, 10,156, 49, 99, 70,181, 47,255,248,227,143,181,185, 8,171,113, 62, 10,201,201,201,
+182, 40, 96, 51,167, 41, 6,107,228,216,113,154,205,159, 46,189,177,251,248,239, 29, 52, 90, 86, 51,127,213,250,247,106,138, 43,
+107, 57,253, 92,229,109,213,206,142, 17,159,175,251,212,206,100, 13, 59, 20,147, 89, 4,138,125,199,198,235, 85,111,221, 5, 2,
+129,166, 71,143, 30,205, 0,171,221,130, 86,181,231,227,150, 83,167,211,225,210,165, 75, 0,128,137, 19, 39, 22,166,164,164,188,
+ 4,224, 86, 74, 74,202,237,129, 3, 7, 70,156, 62,125,218,161,234,137, 62,239, 89,150, 19,168,156,209,202,231,243, 77, 49, 13,
+196,147,190, 70, 79,162,156, 26,141,230,157,105,211,166,109,215,233,116,252,178,178,178,119,172, 61, 87, 95, 57,191,251,238,187,
+ 68, 31, 31,159,222,120,116, 42, 6, 6,192,197,199,225,220,184,113, 35, 0,248, 62, 14,231,163, 44, 88,135, 15, 31, 6, 77,211,
+240,112,181,131, 78,167,131,101,188,167, 53,156, 53, 45, 88, 71,142, 28, 1,195, 48,104,174,118,132, 78,167,171, 43,246,176, 26,
+167,147,147,211,250, 61,123,246,120,220,190,125, 27,233,233,233,216,176, 97, 67,106, 78, 78,206, 96, 62,159, 47,254,242,203, 47,
+255, 55,100,200, 16, 87,138,162,116, 13,184,151,116, 6,131, 97, 66,143, 30, 61,246,174, 92,185,242,158,159,159, 95,179, 30, 61,
+122, 56,228,231,231,103,199,198,198,166,108,223,190, 93, 65, 81,212, 4, 60,218,245,244,143,253,143, 0, 32, 35, 35,227, 56, 42,
+211,215,216, 42,172,234, 45,103, 84, 84,212,145, 42,238,147, 86,114,255, 35,117,127, 2, 51, 19,235, 44,231,196,137, 19,211,240,
+247,252,102, 54,149,243,183,223,126, 75, 25, 61,122,244,138,246,237,219,135, 41, 20, 10,196,199,199,155,211, 34,153, 30,208, 9,
+130,192,200,145, 35, 49,125,250,116,156, 57,115,102,197,200,145, 35, 83,254,129,246,252,111, 8, 44,154,166, 31,166,164,164,168,
+247,236,217,195, 35, 8, 2,251,246,237, 67,205,192, 90,211, 30, 0, 46, 93,186, 68,177, 44,155, 84,215,143,209, 52,253, 48, 58,
+ 58,218,245,219,111,191, 21, 72,165, 82,136,197, 98,100,100,100,128, 97, 24, 38, 43, 43,139, 60,112,224, 64,181, 96,221,139, 23,
+ 47, 82, 6,131,225,193,179,106,156, 63,227, 82,231,158, 62,241,131,243, 11,221, 95, 42, 84, 57, 58,214, 42, 84,190,219,232, 7,
+194,191,110, 43,150, 92,169,250,244,243,117,159,218,155,196,213,225,152,204,194, 10, 29, 29,124, 39, 87,123,253, 73,151,249,194,
+133, 11,205, 27,233,189,182,180,119,239,222, 12, 0,103, 0,139, 81,105,185, 3,128, 91,247,239,223,239,238,227,227,243, 62, 42,
+ 23,190, 94,250, 44,173, 87, 12,195, 88, 90, 78, 27,109,144,101, 76, 76,204, 61, 0,125,109, 61, 87, 31, 70,142, 28,153,140,199,
+ 95,110,230,169,115,154,144, 95, 88,140,164,251,233, 85, 75,121,209,160, 83, 51, 45,226,167,140,200, 47,182, 45,141, 92, 65, 81,
+ 9,146,238,167,129, 97,216, 74, 62, 58,221, 28,228, 78, 81, 20,114, 11,235,247,218,243,249,252, 94, 97, 97, 97,131, 73,146, 36,
+ 47, 93,186,164, 91,183,110,221,195,156,156,156,161, 0, 30, 84,197,240,189,252,227,143, 63,238,183, 34, 37,131, 37, 39, 65, 81,
+148,105, 96,142, 51, 26,141, 47, 44, 88,176, 96, 14,128, 94, 0,154, 3,120,128,202,208,130, 77,104, 68, 25,199, 9,130, 24,247,
+ 60,114, 63, 14,158,151,153,137,135, 15, 31, 94, 54,125,250,116,126, 80, 80,208,199, 93,187,118, 37,239,223,191,143,236,236,108,
+243,195,229,128, 1, 3,224,233,233,201,156, 60,121,114,213,176, 97,195,150,129,195,147, 19, 88,185,185,185, 3,198,141, 27,247,
+ 27, 73,146, 45, 31,181,184,179,165,117,137, 97,152,148,172,172,172, 58,147,144,229,230,230, 14, 88,186,116,233,111,124, 62,191,
+165,197, 98,206,186,188,188,188, 25, 35, 71,142,220, 34, 16, 8,196,150,214, 46,134, 97, 82, 53, 26,205, 63, 26, 80, 92, 51, 15,
+214,192, 33,175,231, 62, 46,167, 92, 4,175,135,151, 78, 32,241,198, 85, 28,142,201, 44, 40,209,211, 47, 39,228,150,255,215,148,
+127, 54,128, 25,143, 56,151, 8,224,157, 70, 80, 70,162, 42,230,143,224,186,134,198, 15,138,162,210, 66,250,188,140,154,105, 25,
+106, 30,211, 52,157,102, 45, 95,223,224,222,143,228, 49,189,174,143,143,199,227,189, 31, 20, 20,196,123,255,253,247,179, 78,157,
+ 58,245,123, 65, 65,193,123, 0,202, 45, 44,140,241,168, 59,153,104,109,156,206, 20, 69, 89,174,129,168, 67,229, 10, 15,107,185,
+ 59,161, 81,226,185,152,153,184,117,235,214, 37,243,231,207,223,221,180,105,211,125,189,122,245,242,245,246,246, 86, 41,149, 74,
+ 20, 23, 23,151,228,231,231,223, 61,113,226,196,216,241,227,199,223,227, 46,103,227, 68,251,231,141,115, 68, 95,176,108,156, 31,
+203,198,249,177, 35,250,130,181,230,184, 62,206, 54,174,242,222,221,154,171,174,118,104,170,188,226,235, 34,247,255, 47,181, 39,
+199,201,113,254, 7, 57,155,139, 68,162,159,248,124,126,175, 39,200,233, 44, 18,137,154,112,215,136,227,124,154,156, 35, 70,140,
+224,141, 24, 49,130,247, 12,203,249, 72,176, 44,219,149,101,217, 33, 85,123,211,235, 16,211,123,141, 81, 0,241,193,161, 26,142,
+254, 14,162,166,203,175,190,227,250, 16,159, 85, 22, 97,235, 19, 43, 7, 14, 28,158, 91, 60,208,235,245, 67,159, 48,103,174, 94,
+175,231, 90,150,195,211, 29,255,142, 30,165, 27,113,241,154, 16, 4,241, 11,203,178,161, 0, 96,122,109,249, 94, 99, 3,201,221,
+ 82, 28, 56,112,224,192,129, 3, 7, 14, 79, 22, 4, 30,109,230,179, 37, 70,168, 33,166,194,155, 28, 39,199,201,113,114,156, 28,
+ 39,199,201,113,254,231, 56,235,227,254,219,247, 89,150, 29, 82,151, 5,139, 32,136, 19,255, 53, 1,199,249,188, 57, 78,142,147,
+227,228, 56, 57, 78,142,147,227,124, 44,176, 44, 59,164,114,199, 14,177,124,109,177,111,116,224, 98,176, 56,112,224,192,129, 3,
+ 7, 14,141, 29,218,143, 62,250,232, 99,130, 32,126, 1,128,143, 62,250,232,227,198, 94, 96, 78, 96,113,224,192,129,131, 5,212,
+106,245, 43, 0,150,161, 50,132, 98,181, 70,163, 57,194,181, 10,135,127, 19,156,157,157,229, 78, 78, 78,191,147, 36,233, 9, 84,
+ 79,185, 84,219,250,191, 12,195,104,242,243,243,251,103,101,101,229,254,147,156, 53,112, 97,245,234,213,229,171, 87,175, 54, 5,
+180,231, 0, 32,170, 92,134, 57,255, 10,129,181,160, 95,139, 23,155,186,187, 31, 40,204,203,139,209,149,151, 76, 90,253, 71, 70,
+126, 3,127,219, 73, 36, 18,141,150,203,229, 33, 44,203,122,241,120,188, 59, 69, 69, 69,225, 70,163,241, 16,128, 82,238, 47,192,
+225, 89, 35, 32, 32,160,131, 72, 36,250,144, 32,136,238, 20, 69,121, 8, 4,130, 12, 0,151,117, 58,221,186,216,216,216, 24,174,
+133,254, 53, 32,213,106,245, 23,246,246,246, 65,133,133,133, 99, 1,124, 28, 31, 31,223,145, 36, 73,248,251,251,127,172, 86,171,
+147,148, 74,229,206,146,146,146, 11, 26,141,102, 46, 26,184,172, 15,135,198, 5, 47, 47,175,104,146, 36, 61, 44,151,107,171, 41,
+ 8,106,238, 89,150,189,119,251,246,237, 30,143,226,116,119,119,247, 82,169, 84, 91, 0,116,173, 77, 84, 88,162, 42,191,218,149,
+226,226,226, 25,233,233,233,181, 38,226,117,112,112, 80,186,184,184, 44, 35, 8, 98, 36, 73,146,245,166, 79, 96, 24,134,102, 89,
+246,187,236,236,236,165, 5, 5, 5, 37,143, 28,124,157,156,194, 35, 35, 35,187, 58, 59, 59,215,155,243,143,162, 40,164,165,165,
+ 53, 9, 13, 13,141,204,202,202,242,251, 39, 57, 45, 65, 16,132, 30,149,107, 55, 62, 55,176, 89, 96, 17, 52,222,154, 52,101,156,
+123,225,195,120,247, 61,135, 78,183,249,184, 63,255,229, 85,103, 30,100,218,194, 33,145, 72, 70,123,123,123,111,218,180,105,147,
+ 83,203,150, 45, 9,169, 84, 10,141, 70,227,119,237,218,181,215,195,194,194,150,166,165,165, 77,160, 40,234,183,199,172,155,189,
+163,130,255, 97,126, 41,181,144,235, 74, 56,216,130, 17, 35, 70,240, 30, 62,124, 24,166, 82,169, 62, 88,176, 96,129,184, 85,171,
+ 86, 80, 40, 20,200,206,206,110,158,144,144,208,108,203,150, 45,175,188,240,194, 11, 95, 10,133,194, 69, 17, 17, 17, 20,215, 98,
+207, 55,212,106,245, 23,145,145,145,179,154, 54,109,138,158, 61,123, 94,232,212,169,147, 74, 38,147,225,212,169, 83,240,242,242,
+106,103,103,103,119,121,219,182,109,130,101,203,150, 5, 28, 59,118, 12, 26,141,102, 54,215,106,255, 2, 85, 77,146, 30, 49, 49,
+ 49, 46, 50,153, 12, 52, 77, 87,173, 6,192,128,101, 89,243,222, 82, 12,209, 52,141,224,224, 96, 67, 61, 99,219, 87, 55,110,220,
+ 8, 49,173,112, 98, 33,164,106, 69, 70, 70, 70, 72,112,112,240, 87, 0,106, 77,168,237,226,226,178,108,212,168, 81,243,218,181,
+107,103, 94,106,142, 97, 24,243, 62, 55, 55, 23, 51,103,206, 52,255, 6,195, 48,136,140,140,156,243,238,187,239,162,160,160,224,
+221, 58,234,238,233,236,236, 76,212,183, 4, 94, 88, 88, 24,194,194,194,176,105,211, 38,130,207,231,219,215,211,158, 79,156,243,
+121,135,237, 2, 11,236,201,147, 71,143, 76, 10,237,237, 75,140, 31, 26,232,179,255,120,244,197, 5,125, 91,190,180,230,247,251,
+ 15,173, 20, 87,115,166, 77,155,246,233,242,229,203, 37,119,239,222, 69, 92, 92, 28, 40,138,130, 66,161, 64,135, 14, 29,200,147,
+ 39, 79,170,231,204,153,115,244,207, 63,255,156,104, 48, 24,142, 53,180, 98,110, 14,188,117,114, 41,111, 76,169,150,189,108,160,
+233,227,141,177,241,187,117,235,118,198,104, 52,174,137,141,141, 61,251,188,220, 48,129,129,129, 61,133, 66,225, 82,145, 72, 52,
+240,223, 42, 46, 82, 83, 83,151,190,248,226,139, 31,132,133,133,137,239,223,191,143,248,248,120,104, 52, 26,180,108,217, 18, 45,
+ 91,182, 36, 54,109,218, 36,249,242,203, 47,103, 95,187,118,141, 4, 48,223,150, 62,221,205,205,109,114,223,190,125,135, 59, 59,
+ 59,219,165,167,167, 23,157, 63,127,254, 39,141, 70,243, 53,234, 95, 51,242,145,156,206,206,206,227, 67, 67, 67,135, 59, 58, 58,
+ 58,106, 52,154,252,223,127,255,253,167,236,236,236,157,143,105,105, 81, 3,232, 8,192,169,234, 88,211,162, 69,139, 91, 41, 41,
+ 41,217, 79,144, 51,163, 69,139, 22,113, 13,225,116,118,118,150,243,249,252, 35, 4, 65, 52,173,195, 66,144, 65, 81,212,168,220,
+220,220,178,186,184, 84, 42, 85,119,181, 90,141,203,151, 47, 99,241,226,197,142,193,193,193, 72, 72, 72, 0, 73,146,248,224,131,
+ 15, 8,127,127,127, 65,102,102, 38,186,116,233,130,240,240,240, 30, 85,203,221,112,176, 14,223, 1,176, 7,240, 38, 0, 75, 87,
+144, 51,128, 31, 81,185,194,195,176,103, 85, 56,169, 84,138,131, 7, 15, 66, 32, 16, 64, 40, 20,162,160,160, 0,238,238,238, 16,
+ 10,133, 16, 8, 4,230, 77, 40, 20,162, 89,179,102,245,242, 49, 12,211,141,199,227,161,180,180, 20, 52, 77,155,151, 89, 42, 42,
+ 42, 2,203,178, 16,137, 68,230,247, 77,231, 24,134,233, 86,135,213,102,100,211,166, 77,113,232,208, 33,212,150, 7, 77,165, 82,
+225,230,205,191, 38,220,241,120, 60, 4, 4, 4,144, 4, 65,140, 4,240,110, 29,188, 44, 0, 76,153, 50,165,218,242,116, 53, 55,
+211,218,193, 44,203, 90, 46, 33,246,143,113,254,171, 5,214, 71,125, 90,206,104, 23, 24,176, 78, 36, 18, 72, 25,218, 8,134, 50,
+130, 49,234,193, 48, 20,238,165,106,224,229, 34,194,196, 65,222,158,123,207, 36,220, 92,216,175,117,208,234,223, 18,227,107, 80,
+212,156,106,217,162, 93,187,118,203, 86,174, 92, 41,249,253,247,223,113,247,238, 93,172, 90,181, 10, 0, 32,151,203,113,234,212,
+ 41,208, 52,141,245,235,215, 43, 7, 14, 28,184, 37, 35, 35, 35, 2, 64,126, 61,156,181,193,179,117, 43,245,208, 99,159,189, 36,
+110,247,250,209,141,153,249,244, 9, 0,117, 37, 80,123, 26,203,214,212,203, 73, 81, 84, 63,129, 64,208,163, 83,167, 78,175, 88,
+ 41,178,158, 73, 57, 45,197,149, 64, 32, 56,109, 48, 24,100, 34,145,136, 95,135, 40,120,166,229,124, 28,206,128,128,128, 14, 42,
+149,234,131,165, 75,151,138, 47, 93,186,132,130,130, 2,100,103,103, 99,238,220,185,216,186,117, 43,218,181,107, 7,185, 92,142,
+217,179,103, 75,102,206,156, 57,163, 75,151, 46,223, 69, 71, 71, 71, 91, 81, 78,178,119,239,222, 7,247,237,219,215,146,162, 40,
+ 18, 0,140, 70,163, 67,106,106,234,184,133, 11, 23,246,142,137,137,121,179, 1,237, 73,246,232,209, 99,223,254,253,251,189, 69,
+ 34, 17, 89,213, 89, 55,121,251,237,183, 39, 45, 90,180, 40,248,234,213,171, 99,234,184,239,235,106,207, 78, 50,153,172,237,140,
+ 25, 51,114,135, 14, 29,154, 14, 0, 87,175, 94, 37, 98, 99, 99,123,142, 27, 55, 46, 37, 44, 44, 44,182, 1,156,157,101, 50,153,
+239,172, 89,179,114, 6, 15, 30,156, 33, 20, 10,153, 75,151, 46,241,110,222,188,217,107,242,228,201,201,139, 22, 45,186,110, 11,
+167, 64, 32, 56,124,236,216,177,222,238,238,238, 52, 80,185,154, 2, 65, 16, 44, 65, 16, 44, 73,146, 44, 73,146, 72, 78, 78,110,
+ 49, 98,196,136, 3, 0, 94,173,139,179,176,176,112, 92,175, 94,189, 34, 23, 47, 94,236, 8, 0,145,145,145,224,243,249,230, 1,
+225,238,221,187,208,233,116,216,180,105,147,161,164,164,100,242,191,237,158,127,202,156,205, 0,116, 3,240, 7,128, 62, 85, 34,
+203, 25,192, 89, 0,254, 0,206, 63,171,114,146, 36, 9,154,166,205, 34,234,183,223,126,195,214,173, 91,113,232,208, 33,184,187,
+187, 87, 19, 88, 2,129, 0,143,112,249,221,172, 33, 50, 76,125, 59,104,154, 70, 84, 84, 20,118,238,220, 9, 23, 23, 23, 56, 59,
+ 57,193,185, 73, 19, 4, 5, 5,193,100, 53,163,105,186, 54,222,106,156,185,185,185, 96, 24,235,158,149, 88,150, 69,113,113,177,
+213,237, 89,151, 16,178,220,108,185, 70,143,201,249,223, 17, 88,106, 55,231, 69, 35,134,247,147,130,166, 0, 67, 25, 96, 40, 7,
+107, 40, 7,171, 47, 3, 33,146,130, 53, 86, 64,206,203,195, 59,125, 93, 85, 71, 47,102,221, 94, 16,220,124,200,154,179, 15, 78,
+215,241,164,184,100,251,246,237,118, 55,110,220, 64,124,124, 60, 54,108,216,128,229,203,151,155,159, 28, 94,125,245, 85, 92,184,
+112, 1,122,189, 30,139, 23, 47,118, 92,176, 96,193,172,146,146, 18,155, 23,153,116,115,226,111, 61,178,119,147,163,163, 52, 23,
+ 19,135, 94,113,250,234, 72,202,140,162, 50,227,151,141,241, 2, 44, 88,176, 64,182,118,237,218,159,109, 16, 89,207,204,114, 37,
+ 22,139, 79, 47, 89,178, 68,190,100,201, 18,250, 9,113,182,227,243,249,135,141, 70,227,251,177,177,177,191, 54,128,162,121,215,
+174, 93, 87,197,199,199,159, 46, 41, 41,217, 95,243,164, 80, 40,124,181,115,231,206, 99, 47, 94,188,248, 49,128, 36,107, 8,197,
+ 98,241,156, 15, 62,248, 64,146,150,150,134,194,194, 66,136,197,226,106,157,155, 88, 44, 6, 73,146, 16,137, 68,120,251,237,183,
+ 37,187,118,237,122, 15,192, 27,245,222,147,110,110,147,247,238,221,219,210, 96, 48,144,101,101,101, 16, 10,133, 16, 10,133,232,
+208,161, 3,111,254,252,249,205,230,205,155, 55, 45, 43, 43,107,179, 45,149,119,112,112, 24,183,111,223, 62,111,145, 72, 68,106,
+ 52, 26,244,236,217, 19,151, 47, 95, 70, 80, 80, 16,111,254,252,249,205,103,207,158, 61, 53, 39, 39,103,171,173, 86, 38,153, 76,
+214, 46, 50, 50,242, 97,211,166,127, 25,135, 90,182,108,201, 14, 26, 52, 40, 63, 62, 62,222,247,234,213,171,121,157, 59,119,126,
+104, 3,167,187, 76, 38,243,251,245,215, 95, 53,203,151, 47,239,187,117,235,214,161, 85, 22,220,227,171, 86,173,250, 61, 47, 47,
+207,255,242,229,203,121, 65, 65, 65,233, 54,112, 58,185,185,185, 81, 51,102,204, 80,214, 60,177,116,233, 82, 44, 91,182, 12,187,
+119,239,206, 3,224, 82,103,101,171, 2,218,219,181,107,167,234,211,167, 15, 34, 35, 35, 49,123,246,108,157,209,104, 76, 0,128,
+144,144,144, 54, 97, 97, 97,162,152,152, 24, 56, 56, 56, 8, 52, 26,205, 55,106,181,154, 11,124,183, 30, 67, 1,252, 15, 64,187,
+ 42,145, 53, 10,192, 81, 0,109, 1,196, 3, 24,241, 44, 11,103, 18, 88,233,233,233,216,181,107, 23, 86,173, 90, 5, 31, 31, 31,
+ 24, 12, 6,240,249,124,179,184,226,243,249, 32, 8, 2, 44,203, 18,214,242, 94,185,114, 5,123,247,238,197,226, 69,139,160, 84,
+ 86,222,166, 6,131, 1,249, 5, 5,144, 72, 36,102, 17, 86,143, 96,250, 46, 49, 49,113,158,187,187,187,217, 77,105,233, 34, 4,
+ 0,133, 66, 1,134, 97, 64, 81, 20,116, 58, 29,118,236,216, 65,177, 44,251, 93, 61,214, 38,179, 24,122,247,221,119,161,211,253,
+181, 62,120,199,142, 29, 43,173, 33, 45, 90, 32, 32, 32,192,124,108,178, 80, 89,195,185,179,103, 7,104, 45, 62,237, 27,246, 25,
+ 0,192,195,195, 3,190,190,190, 80,171,213, 86,113,254, 91, 4,150,105,129,219,106, 11,221,102,102,102,175,217,189,237,155,207,
+ 68, 2, 82, 16,210,195, 23, 14, 98, 10,132,204, 17,194,222, 31,129,176,247,172,252, 98,126, 50,244,191,126,132, 81, 1,185,228,
+ 94, 29,239,199,176,129, 94, 77,194, 78, 39,215, 26, 92, 71,146,100,247,230,205,155, 35, 50, 50, 18, 45, 91,182,196,146, 37, 75,
+224,231,231, 7,153, 76,134,172,172, 44,148,149,149, 65, 46,151,131,166,105, 4, 6, 6,242,148, 74,101,112, 3, 4, 86,224,224,
+ 62,157,187,241, 85,126,232, 57,240, 5,156,217,210, 91,190,251,151,140,133, 69,101,198,111, 96,177,224,106, 99,193,107,175,189,
+134,172,172, 44,217,190,125,251, 26, 44,178,186,117,235,118,134,162,168,126, 86,152,195,207,158, 59,119,174, 79, 67,197,213,174,
+ 93,187,228,246,246,246,168, 47,120,211, 6,113,117,110,220,184,113,170,125,251,246,253,208,169, 83,167,215,109, 20, 89,205, 71,
+141, 26,117, 98,231,206,157,126, 67,134, 12, 81, 68, 70, 70,254, 77, 96,181,107,215,238,181, 51,103,206,188, 62,125,250,244,118,
+251,247,239,127, 5,149,139, 74,215,103,230,238,209,170, 85, 43, 60,120,240, 0, 89, 89, 89,208,233,116,200,202,202, 2, 0,164,
+165,165,193,195,195, 3, 14, 14, 14,240,240,240, 64,155, 54,109, 8,146, 36,131,172, 41,108,112,112,240, 80, 0,100,114,114, 50,
+114,114,114, 96,103,103, 7,185, 92, 14,119,119,119,244,233,211,135,239,237,237, 61,216, 86,129, 53,104,208,160,225, 50,153,140,
+ 76, 77, 77, 69, 74, 74, 10,116, 58, 29, 18, 18, 18, 96,103,103,135,144,144, 16,129,183,183,119,104, 3, 4, 86,251,169, 83,167,
+102, 91,138, 43, 19,228,114, 57,225,235,235,155,111,111,111,223, 5,128, 45, 2,171,253,236,217,179,179, 86,175, 94,253, 82,120,
+120,248, 2,211,155,225,225,225, 31, 2,192,230,205,155, 35, 29, 29, 29,187, 0,176, 69, 96,129,101, 89,102,210,164, 73,137, 34,
+145, 8,166,205, 36, 92, 63,251,236, 51,144, 36,105,103, 5,205,199,241,241,241, 29, 21, 10, 5,226,227,227,193,227,241, 64, 16,
+ 68,162, 70,163,233, 8, 0, 46, 46, 46, 73, 21, 21, 21, 94, 21, 21, 21, 24, 49, 98, 4, 49,100,200,144, 14, 27, 54,108, 88, 4,
+160,177, 8,172,174, 0,214, 3,208, 3, 88, 4,224,114, 35,235,226,178, 0,188,108, 33,178, 98, 1,136,171,196,213,203, 85,231,
+159, 9, 8,130, 0,195, 48,224,243,249,248,236,179,207, 96, 48, 24,176,127,255,126, 28, 61,122, 20, 36, 73,130, 32, 8, 16, 4,
+ 1,149, 74,133, 47,190,248,194,124,108, 13, 40,138,194,183,223,126,139,143, 22, 44, 48,139,171,170,135, 62,184,185,186,194,201,
+217, 25,201,201,201,245, 10,172,236,236,236,165, 81, 81, 81,168, 43,200,125,216,176,191, 60,172,150, 65,238,214,148,147,199,227,
+ 65,167,211,161, 95,191,191,134,143, 89,179,102,153, 95, 23, 20, 20,152,254, 19, 32,172,172, 60,143,199,131,150, 5, 94,147,252,
+245,222,224,247,223,175,102,145,171,131,179, 86, 45,242,175,180, 96,137,122,165,110,190,127,129, 12, 24, 25,250,194,120, 71,149,
+ 20, 76, 73, 6,132,125,195,112, 35, 95,134,141,219, 42,199,194,121, 35, 2,209,190,223, 74,232,190,233,143, 62, 45,244,162,111,
+ 98,164,243, 1, 44,169,141,207,217,217,217,153,162, 40,144, 36, 9,185, 92, 14, 71, 71, 71, 72,165, 82,228,230,230, 98,206,156,
+ 57, 56,125,250, 52,244,122, 61,132, 66, 33, 90,181,106, 5,131,193,224,101,179,245,202,129,191,115,195,103,171,236,243,146, 15,
+224,234,221, 66,200,236, 60,176,104,106, 23,135,176, 45,209, 75,115, 10,202, 63,108,140, 23,193,223,223, 31,115,231,206,149,125,
+249,229,151, 13, 18, 89, 20, 69,173,224,243,249, 61,223,127,255,125,233,136, 17,127,127, 32,140,139,139,195,180,105,211,180,229,
+229,229,159, 52, 68, 92,137, 68,162,211, 59,119,238,148,219,217,217,225,193,131, 7, 79, 76, 92,109,218,180, 73,229,229,229, 5,
+129, 64, 32,249,246,219,111,109, 17, 89,109,134, 13, 27,118,114,231,206,157,158, 83,167, 78, 77,139,140,140, 76, 65,229,180,250,
+106,136,137,137, 41, 24, 63,126,124,234,238,221,187,189, 25,134,249,245,224,193,131,161, 0,110,215,211,150,205,101, 50, 25,114,
+115,115, 49,111,222,188,106, 1,170, 38,119, 54, 0,196,199,199,195,195,195, 3, 21, 21, 21,238,214,212,217,209,209,209,129,101,
+ 89, 76,153, 50, 5, 15, 31,254,165, 77,220,221,221,241,240,225, 67, 80, 20,229,104,107, 59, 58, 56, 56, 56, 26,141, 70,244,238,
+221, 27, 21, 21, 21, 0,128, 81,163, 70, 65, 32, 16, 32, 59, 59, 27, 6,131,193,169, 1,151,199,121,200,144, 33, 25,143, 58, 41,
+151,203,141, 14, 14, 14, 45,108,228,116, 10, 13, 13, 77,223,190,125,123, 77, 87, 29,162,162,162, 94,181,179,179, 11,119,116,116,
+244,109, 64, 89, 25,177, 88, 12,177, 88, 12,129, 64, 0,145, 72, 4,177, 88, 12,145, 72, 4,129, 64, 0, 30,143,103,149, 95,133,
+ 97, 24,156, 56,113, 2, 36, 73, 86,115, 93, 44, 94,188,248, 29,153, 76,230, 26, 17, 17, 97,126, 0, 44, 45, 45, 69,235,214,173,
+ 91,181,106,213,234, 90,102,102,102,202,237,219,183, 95,127,198,221,199, 58, 0,166, 89,109, 91, 1, 4, 52,194, 46, 46, 11,192,
+ 72, 0,209, 85,226, 74, 15, 96,248,179, 20, 87,150,215,158,207,231,155,255,231, 18,137, 4,129,129,129,102, 49, 69, 16, 4,202,
+203,203,205, 46, 66,107, 45, 88, 69, 69, 69, 80,171,213, 80, 42,149,104,237,227,131,196,132, 4, 0, 48,191, 22,137, 68,102, 33,
+ 86, 23, 10, 10, 10, 74,170,130,213,223,125,194,226,146, 5, 0, 62,191,238, 48,108,181, 90, 13,134, 97, 76,194,146,125, 18,156,
+206,206,206, 40, 45, 45,181,138,243,223, 34,176,254,166, 24,195,194, 64,234, 46,180,220, 53,114,112,183,241,109, 61,228,208,229,
+ 38, 67,164,112, 2, 97,223, 2, 27,183,253,138,219, 41,149,161, 81, 27,143,198, 96,247,194, 1, 32,100,142, 80,107,239, 66, 41,
+ 17,191,254, 40,129,149,151,151, 87,106, 48, 24, 28,165, 82, 41,248,124, 62,132, 66, 33,114,115,115,241,127,255,247,127, 56,114,
+228, 8, 90,180,104, 1,138,162, 32, 18,137,144,147,147, 3,161, 80,104,211,236, 68, 30, 15, 67,102,140,239,215, 82,238,228,131,
+188,152,229,149,111,170, 2, 49,117, 20, 79,244,249,222, 91,227,114, 10,202, 63, 71,101, 80,101,163,130, 66,161, 64, 64, 64, 0,
+198,140, 25, 35,219,191,127,255, 30, 0, 30,182,124, 63, 38, 38,230,124, 96, 96, 96,255,245,235,215,159,209,104, 52,210, 78,157,
+ 58, 65,161, 80, 64,161, 80, 32, 57, 57, 25,203,151, 47,175,208,233,116,161, 13,177,142,241,249,252,111, 39, 77,154, 36, 87,169,
+ 84, 72, 78, 78,134,163,163,227, 99,213, 53, 48, 48,176,157, 64, 32, 56,183,105,211, 38,149,183,183, 55,238,220,185,131,206,157,
+ 59,195,205,205, 77,178,122,245,106,107, 69,214, 87, 7, 14, 28,104, 33, 18,137,136,131, 7, 15, 54, 63,120,240,224,156,250,126,
+119,239,222,189, 45, 14, 30, 60,184, 9, 64, 8,234, 8,254, 22, 10,133,105, 57, 57, 57,222,205,154, 53,195,174, 93,187, 64,146,
+ 36, 50, 50, 50,176,104,209, 34,172, 94,189, 26, 65, 65, 65, 80, 42,149,104,214,172, 25, 18, 19, 19, 33,145, 72,172,138,120, 78,
+ 79, 79,207, 7,224,114,250,244,105,228,228,252,149,178,197,211,211, 19,249,249,249,208,233,116,121,182,182,101,122,122,122, 30,
+ 0,215,107,215,174, 33, 37, 37, 5, 3, 7, 14,196,143, 63,254,136, 46, 93,186,128,166,105, 24,141,198,188, 6, 92, 34,154,199,
+227,177,117,116,162, 4, 0, 7, 27, 57,169,186, 56,171,250, 29, 91, 57,193,178, 44,251, 40,113, 37, 18,137, 80,207,111,154,117,
+179,159,159,223,178, 86,173, 90,181, 93,180,104,145,128,207,231,163, 87,175, 94,109,134, 15, 31,158, 74,146,164,211, 71, 31,125,
+ 36,171,205, 24, 12,160, 99,219,182,109,229,141,160,251,176,180,210, 53,214, 73, 39, 46, 85, 22, 63, 17, 0, 67,213,254, 16,254,
+138,201,122,166, 22, 44,161, 80,136,176,176, 48, 76,159, 62, 29,174,174,174, 88,176, 96, 1,248,124,190,121, 51, 89,101, 76, 86,
+ 45, 43,239, 77,184,186,184,212,253, 71,171, 10,114,175,231, 33,234,169,164,105, 48,137, 33,107, 98,161, 44,172, 77, 86,137,182,
+199,228,252,215, 88,175, 44, 5, 86, 53,179,156, 89, 92, 13,236, 60,222,207, 67,138,216,152,155,104,239,102, 4, 43, 16,212,113,
+183, 24, 65, 8,229,176,151,242, 61,234,184, 0, 49, 41, 41, 41,158,246,246,246, 48, 24, 12, 16,137, 68,104,223,190, 61, 46, 94,
+188, 8,157, 78, 7,189, 94, 15,177, 88, 12,161, 80,136, 91,183,110,193, 96, 48, 68,218,162,175,156, 85,188, 77, 31,126,188, 92,
+137,244, 93,176, 87,138, 16,220,221, 27,144,183, 5,175,236, 46,214, 47, 14,117,124,103,209,143, 27,179,114,139,223,104,108, 23,
+ 65,161, 80, 32, 53, 53, 21, 7, 15, 30, 44,215,233,116,227, 26,194, 97, 18, 89, 71,142, 28, 57, 99,111,111, 47, 13, 10, 10, 66,
+ 66, 66, 2, 62,249,228,147, 10,157, 78, 55,164,161,241, 93, 20, 69, 77,216,177, 99,199,105,138,162,228, 38,113,241,184,150,171,
+ 57,115,230, 40, 91,183,110,141,164,164, 36,216,217,217, 65,169, 84,162,101,203,150, 80,171,213,146, 57,115,230, 88, 35,178,102,
+142, 25, 51,230,228,238,221,187, 61,167, 78,157,154,118,232,208,161,227, 0,138,106,107,218, 97,195,134,189,186,123,247,110,207,
+119,222,121,231, 1,128, 57,168,103,102, 29,195, 48, 23,146,146,146,188,252,252,252,136, 54,109,218, 64, 36, 18,193,221,189,210,
+ 72,213,177, 99, 71,248,249,249, 65, 40, 20, 2, 0,146,146,146, 0, 43,243,178,252,249,231,159, 63,197,199,199, 79,238,210,165,
+ 11,207,205,205,173,218,236,164,213,171, 87, 27, 82, 83, 83,109, 94, 71,235,143, 63,254,248,241,230,205,155, 83,122,245,234,197,
+119,112,112,128, 88, 44, 70,251,246,237,161, 86,171,241,201, 39,159, 24,238,223,191,223,144,181,185, 30, 92,187,118, 77,226,227,
+227, 67, 63,226, 94, 85, 54,192,242,144,118,245,234, 85, 97,247,238,221,143,159, 58,117,170,157,229,137,110,221,186, 29, 87, 40,
+ 20,118, 0, 26, 50, 53,143,177,116, 13, 90,186, 10, 69, 34, 17,248,124,126,189, 22, 44,141, 70,243,179,171,171,235, 61, 87, 87,
+215,243, 61,122,244,176,139,142,142,198,146, 37, 75,132, 58,157,174,121,120,120,184,121, 32,174,109, 0, 45, 43, 43,147, 52,130,
+238, 99, 30,128, 13, 0,100, 0, 22, 52,194, 49,198, 21,149, 1,237,190,168,116, 11,142,170, 18, 91,166,152,172,103, 42,178, 24,
+134,129, 64, 32,128,175,175, 47,222,125,247, 93,172, 89,179, 6, 51,102,204, 64,235,214,173,205,215,222, 20,131, 85, 53,227,205,
+170,129, 95, 40, 20,194,213,205, 13, 70,163,209,108,189, 2,128,196,132, 4,240,249,124, 48, 12, 3,157, 78, 87,175,139,208,197,
+197,101,217,218,181,107,231, 12, 26, 52,136,180,156,113,199,178,172, 57,157,132,229,102, 52, 26,241,243,207, 63,207, 89,189,122,
+117,157,105, 26, 44,133, 78,199,142, 29,171,185, 5, 55,111,222,108,217,103, 35, 36, 36,196,166,217,126, 60, 30, 15,190, 97,159,
+ 85,115, 11,158,108,242, 87,179, 53,123,123, 42, 90,127,178,233, 81,156,255, 42, 23, 97,173, 53, 52, 92,244, 92, 57, 98, 64,192,
+120, 63,119, 49,174,197,220,194, 47, 81,154,187,185,185,133, 96,178,110,130,201,185,131,121, 35, 2,209,182,133, 35,218,182,112,
+196,188, 17,129, 96,178,111,129, 45, 72, 6, 43,113, 64,118, 25,241, 72,247, 66,126,126,254,186, 21, 43, 86, 20, 56, 56, 56, 64,
+ 34,145, 64, 36, 18, 33, 45, 45, 13,254,254,254,230,227,170, 39, 79, 44, 89,178, 36, 39, 39, 39,103,155,181, 21,145, 75,201,169,
+107, 22,189,225, 42, 20, 43,129,252, 72,168, 84, 10,236,218,246, 25,160,203, 0, 72, 17, 94, 9, 9,224,169, 93,237,251, 0,104,
+211,216, 46,194,131, 7, 15, 16, 22, 22, 86,174,213,106, 31, 43,208, 61, 38, 38,230,188,193, 96,232,191,109,219, 54,237, 47,191,
+252,242,216,226,202,196,105, 52, 26, 7,238,217,179,167,236,193,131, 7, 80, 40, 20, 13,174,167, 80, 40,252,136,162, 40,213,134,
+ 13, 27,152,126,253,250,209, 51,103,206,164, 39, 76,152, 64, 15, 27, 54,140, 14, 9, 9,161,167, 77,155, 70,235,116, 58,177, 76,
+ 38, 91, 91, 15, 85,252,177, 99,199,130, 39, 79,158,124,231,235,175,191,246,120,233,165,151, 90, 0, 88, 90,115, 11, 12, 12,116,
+216,189,123,183,231,244,233,211,147, 14, 30, 60, 56, 0,245,184, 7, 1, 64,167,211,109,222,186,117,107, 5, 73,146, 80, 40, 20,
+ 16,137, 68,104,210,164,137, 89, 8,155, 6,114,131,193,128, 45, 91,182,104,181, 90,237, 70,107,234,158,151,151,183,107,254,252,
+249,247,207,156, 57, 99, 52,205,242,201,200,200,192, 39,159,124, 98,216,182,109, 91,122, 97, 97,225,215,182,182,103,113,113,241,
+183, 31,126,248, 97,202,137, 19, 39,140, 36, 73,162,160,160, 0,246,246,246,248,228,147, 79, 12, 95,127,253,117,122, 73, 73,137,
+205,156, 47,188,240, 66, 82,122,122,186, 82,167,211,253,205,250, 35, 16, 8, 8,137, 68, 98,154, 17,102, 53,186,116,233,146,148,
+146,146,162, 90,185,114,101, 68, 72, 72,200, 26,165, 82,153,160, 84, 42, 19, 66, 66, 66,214,110,217,178,229,108, 21,103,184,205,
+157, 23, 73,154, 5,150,201, 85,104,178, 98, 85, 89,178,172,114, 17,250,249,249, 29,216,187,119,175, 93, 66, 66, 2,138,139,139,
+ 17, 27, 27,139,152,152, 24,179, 43,215, 52,152, 89,110, 0, 80, 94, 94, 46,109, 4,221,199,255, 80,153,250,194,187, 74,200, 52,
+ 54, 28,181, 16, 87, 47,163,114,230,217,203, 85,199,237, 0,252,244, 44, 45, 88, 44,203,154, 31,118,222,120,227, 13,132,135,135,
+163,117,235,214,102, 81,101, 57,139,208, 22,145, 65,211, 52,218,183,111, 15,157, 94, 95, 77,160,243,249,124, 52,105,210, 4, 73,
+ 73, 73,160, 40,170, 94, 11, 22, 65, 16, 35, 7, 13, 26, 68,198,197,197,193,207,207, 15, 49, 49, 49,136,137,137, 65,108,108, 44,
+174, 93,187,134, 27, 55,110,224,214,173, 91,184,125,251, 54, 58,119,238,140,212,212, 84, 12, 24, 48,192,148,166,161, 78, 35,155,
+ 45,214, 38, 43,173,119, 79,131,243, 95, 97,193, 34, 44,247,174, 14,242, 9,109,213,124, 92,187,118, 27,199,175,230,239, 38, 8,
+242, 88,204,125,221, 47, 3, 90,149,192,112,228, 77,180, 31,185, 15,187, 23, 14,168,124, 2,200,190, 5,195,119,111,129,144, 57,
+ 35,177, 88, 14,173,190,176,174,167,230,168,232,232,232,195,123,247,238,157, 52,126,252,120, 17,195, 48,144, 74,165,120,239,189,
+247,204, 57, 66,120, 60, 30,102,204,152, 81,154,157,157,189, 1, 86,206,252, 2, 32,181,147, 11, 22,143,157,178, 68,130,135,219,
+ 1, 82,136, 92,116, 66,199,151, 38, 33, 59,229, 34, 80,118, 27, 32,132,216,246,233,100,231, 87, 39,124,254,117,102, 78,225,139,
+141,229, 2,220,185,115, 7, 75,151, 46,125,108,113, 85,211,146,117,252,248,241, 61, 58,157,110,202, 19,228, 28,184,102,205,154,
+211, 46, 46, 46, 13,118,139,184,187,187,191,157,155,155, 59,201, 26,195,153, 53,186,244,200,145, 35, 67, 82, 82, 82, 86,197,199,
+199,215, 58,115,245,214,173, 91, 63,246,239,223, 95,102,203, 44,194,216,216,216,152,160,160,160,173, 27, 54,108,152, 49,119,238,
+ 92,137, 84, 42,133, 74,165, 66,124,124, 60,154, 55,111, 14, 0,208,106,181, 88,184,112,161,214,104, 52,238,142,142,142,190,104,
+237,195,242,205,155, 55,199, 78,155, 54,109,114,155, 54,109, 94,101, 24,198, 73,175,215,231,165,166,166,158,168, 18, 66, 13,113,
+239, 48,113,113,113, 99,166, 79,159, 62,222,199,199,103,184,193, 96,112,162, 40, 42,239,225,195,135,199,139,139,139,119, 53,132,
+243,226,197,139, 57, 19, 38, 76, 72,206,204,204,244, 87,171,213, 69,118,118,118,122,189, 94,207, 83, 40, 20, 74,145, 72,212, 25,
+192, 69,130, 32,110,219,194, 25, 29, 29,157, 53,113,226,196, 20,157, 78,215,102,199,142, 29,145,114,185,252,119,130, 32, 8,161,
+ 80,232, 32,151,203,131, 1, 68, 16, 4,145,104,107, 89, 73,146,100, 44, 5,149,165, 21, 75, 40, 20,130, 32, 8,171, 4, 86, 82,
+ 82,210,249, 21, 43, 86,116,104,213,170, 21,182,109,219,150,175, 80, 40,148,195,135, 15,231, 23, 21, 21, 17,117, 89,176,180, 90,
+173, 4, 28,234,125,182,168,178,242, 14,181,176,124,154, 2,223,143, 2, 40,124,150,133, 99, 89,182,154,144,106,222,188,121, 53,
+ 81,101,121,206, 22,129, 69, 81, 20,132, 66, 33,248,124, 62,220,212,106,179,152, 99, 89, 22, 9,137,137, 40, 40, 40, 48,167,105,
+168,231, 30,231, 17, 4,129,209,163, 71, 91,245,187,111,188,241, 6, 34, 34, 34, 80,159, 59,209,114,198, 95,139, 22, 45,234, 21,
+ 67, 85,101,177,122, 22,161,135,135, 71, 67, 57,137, 26,251,127,133,192,170,134,140,252,242,149, 59,127,136, 93,152, 81, 76, 29,
+ 19,247, 72,125, 55, 44, 12,236,194,190, 45,206,120,200, 69,253,219,146,233,208,125,221, 11,132,170,114,176, 97, 75, 51, 64,200,
+221, 80, 32,104,142,159, 99, 50, 51, 73, 1,175, 78,235, 67, 97, 97,225,188, 47,190,248,130,119,250,244,233,145,171, 86,173,178,
+247,245,245,197,216,177, 99,161,215,235,113,227,198, 13, 76,155, 54, 45, 63, 39, 39,103,123, 97, 97,225, 26,107, 43,225,172,226,
+255,223,198,143,251, 59,145, 76, 41, 80,124, 21,224,219,193,217, 81,137,235,209,145, 64, 81, 52, 64, 10, 1, 82,132, 46,157,252,
+208,177,157,183, 95,230, 31, 87,122, 1, 56,215, 24, 46,192, 59,239,188,243,196,196,149,165, 32, 2,208,234, 73,150,211, 36,178,
+222,127,255,253,211, 12,195,200, 26,244, 40,123,244, 40,141,186,243,145,217,108,252,187,114,229,202,152, 71,157, 52, 24, 12,199,
+ 47, 94,188,104,115,146, 89,163,209,184, 48, 46, 46, 14,179,102,205,154,254,214, 91,111, 73,125,125,125,225,233,233,137,132,132,
+ 4,196,199,199, 99,235,214,173, 21, 12,195,236, 42, 44, 44,252,192, 70,106,186,184,184,120,123, 84, 84,212,246, 39,216, 6, 76,
+ 81, 81,209, 55, 81, 81, 81,223, 60, 41,194, 41, 83,166,220, 76, 72, 72,200,119,119,119, 15,226,241,120, 29, 80,153, 40, 82, 3,
+224,155,134, 8, 33, 0,152, 62,125,250,181,164,164,164, 92, 55, 55,183, 32,161, 80,232, 93,197,153, 14, 96, 87, 3, 57,243,174,
+ 95,191,238,221,173, 91, 55,134,199,227,177, 2,129,128,173, 26, 12, 89, 62,159,207, 18, 4,193,254,250,235,175, 18, 88, 17,115,
+153,150,150, 54,103,247,238,221,172, 66,161, 8, 42, 45, 45, 29, 11, 96,143, 86,171,237, 86, 88, 88,104, 30,132,107, 67, 69, 69,
+133,152,211, 79,245,226,181, 71,188,159, 5,160, 87, 99, 40,224,138, 21, 43,176,125,251,118,212,151,129,252,248,241,227,245, 14,
+252,166,123,197, 20, 95,165,215,235, 17, 23, 23, 7,130, 32,204,199,150, 73, 70,105,154,174, 51,211, 59,195, 48,180, 94,175,199,
+225,195,135,173, 18, 89, 7, 15, 30, 68, 69, 69, 5, 24,190,144,179, 28, 0, 0, 2,246, 73, 68, 65, 84,134,177,170,159,173, 74,
+ 76,138,130,130, 2,115,234,132,192,192, 64,203, 62,212,230,246,228,241,120,240,245,245, 69,110,110, 46,156,157,157, 1, 84,186,
+ 5,205,226,179,172,236, 63,115,243, 91,173, 18,195,122,123,218, 85,240,201, 31, 2,220,153,151,187,120,138,225,108, 47, 1, 79,
+ 32, 70,113, 5,129,184,140, 10,156,187, 93,252,144,166,216,208, 85,127,164, 88,155, 32,174,187, 90,173,254,152,166,233,118, 36,
+ 73,202, 88,150, 45,229,241,120,177, 25, 25, 25,203, 0,220,178,165, 18,118, 10, 50,209, 65,206,179, 19,136, 68, 44, 77, 49, 0,
+ 72,128, 36, 1,130, 4,192,171,218, 87, 30,107,181, 6, 33,205, 16,199,178,115,243, 38, 63,235,198,127,241,197, 23,207,148,149,
+149, 61,119,153,220,165, 82,233, 82, 30,143, 55,240,223,190, 76, 76,151, 46, 93,186, 72,165,210,143, 25,134,233, 90, 81, 81,225,
+ 38,149, 74,179, 8,130,136, 46, 41, 41,249,244,218,181,107,151,184,177,243,217,225, 73,102,114,175, 9, 83,110, 44,103,103,103,
+159,235,215,175, 75, 44, 45, 88,150,131, 97,213,251, 4,119, 53,158, 79,248,249,249, 93, 62,112,224, 64,151,230,205,155,147,166,
+128,107,146, 36,205,155,201,141,101,178,182, 92,186,116,137,154, 57,115,230,197,235,215,175,191,244, 40, 78,111,111,239, 51,225,
+225,225,253, 44, 45, 84, 38, 33, 85,243, 53, 77,211, 40, 47, 47,199,210,165, 75,127, 75, 74, 74,170,117,169, 28, 95, 95,223, 13,
+139, 23, 47,158, 51,120,240, 96,146, 36,201,191,197, 92,213,140,195, 50, 24, 12, 56,118,236, 24,243,237,183,223,110,186,123,247,
+238, 35, 99,176, 2, 2, 2, 30,198,198,198,122,152, 82, 38,212,220,106,206,168, 5,128,238,221,187,107,162,162,162,154,254,147,
+156,255, 25,129,101,250,252,130, 62,158,163, 8,144, 35, 73,130,105, 15,130, 16, 49, 44,226, 9,224,140, 72,162,223, 18,246,139,
+ 70, 91,227,243,237,241,228, 51,242,114,156, 28,231,179,224, 36, 97,221,210, 51, 92,123,254, 75, 56,189,189,189, 19, 19, 19, 19,
+189, 31,217, 25, 86, 23, 88, 92,123, 62,103,156,206,206,206,242, 38, 77,154,252, 78,146,164,231,163, 22,119,182, 20,215, 12,195,
+164,100,101,101,245,205,206,206, 46,127, 20,167,187,187,187,151, 68, 34,249,138, 97,152,110,214, 44,246, 76,146,100, 84, 69, 69,
+197,204, 26,139, 61,155, 57,159,224, 44,194,106,229,244,247,247, 79,138,138,138,242,146, 74,165,213,226, 10,107,214,217,132,251,
+247,239, 99,248,240,225,169,215,175, 95,111,241,148, 57,255, 85,176,117, 45, 66,118,205, 31,169,135, 1, 28,230,158,127, 56,252,
+199,192,112, 77,240,223,130, 86,171, 45,104,210,164, 73,105, 69, 69,133, 64,167,211, 9, 40,138,170, 54,192, 73,165,210, 28,173,
+ 86,203, 53,212,115,138,220,220,220,178,220,220,220,160, 39,201, 89, 37,148,250, 63, 41,190,167,149, 7,171,160,160, 32,180,107,
+215,174,191,242,249,124,113, 77,241, 83,155, 24,162,105,186, 34, 47, 47,111,224, 63,205,249, 95, 19, 88, 28, 56,112,224,240,159,
+ 64, 70, 70, 70, 80, 61, 2,140,107, 36, 14,207, 37, 52, 26, 77,188, 70,163,241,108,236,156,207, 59, 72,174, 9, 56,112,224,192,
+129, 3, 7, 14, 28, 56,129,197,129, 3, 7, 14, 28, 56,112,224,192, 9, 44, 14, 28, 56,112,224,192,129, 3, 7, 78, 96,113,224,
+192,129, 3, 7, 14, 28, 56,112,104, 48,254, 31,162, 69, 35,218,144, 32, 45,122, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/gpencil/Makefile b/source/blender/editors/gpencil/Makefile
index f4c1cd246f4..9bc5f491a83 100644
--- a/source/blender/editors/gpencil/Makefile
+++ b/source/blender/editors/gpencil/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index bad86c170ab..c0c1cbc7ac6 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1,5 +1,5 @@
/**
- * $Id: gpencil.c 19758 2009-04-16 13:10:08Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index 014201648c9..3318d869378 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -1,5 +1,5 @@
/**
- * $Id: BIF_gl.h 10455 2007-04-04 13:18:41Z campbellbarton $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -31,30 +31,11 @@
#ifndef BIF_GL_H
#define BIF_GL_H
- /* Although not really a great idea to copy these defines
- * from Windows' winnt.h, this lets us use GL without including
- * windows.h everywhere (or BLI_winstuff.h) which is a good thing.
- */
-#ifdef WIN32
-#ifndef APIENTRY
-#define APIENTRY __stdcall
-#endif
-
-#ifndef CALLBACK
-#define CALLBACK __stdcall
-#endif
-
-#ifndef WINGDIAPI
-#define WINGDIAPI __declspec(dllimport)
-#endif
-#endif
-
#include "GL/glew.h"
/*
* these should be phased out. cpack should be replaced in
- * code with calls to glColor3ub, lrectwrite probably should
- * change to a function. - zr
+ * code with calls to glColor3ub. - zr
*/
/*
*
@@ -67,11 +48,5 @@
#define glMultMatrixf(x) glMultMatrixf( (float *)(x))
#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x))
-#define lrectwrite(a, b, c, d, rect) {glRasterPos2i(a, b);glDrawPixels((c)-(a)+1, (d)-(b)+1, GL_RGBA, GL_UNSIGNED_BYTE, rect);}
-
-/* glStippleDefines, defined in glutil.c */
-extern GLubyte stipple_halftone[128];
-extern GLubyte stipple_quarttone[128];
-
#endif /* #ifdef BIF_GL_H */
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 5c611365a7e..f5769610f50 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -45,6 +45,9 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1);
void fdrawXORellipse(float xofs, float yofs, float hw, float hh);
void fdrawXORcirc(float xofs, float yofs, float rad);
+/* glStipple defines */
+extern unsigned char stipple_halftone[128];
+extern unsigned char stipple_quarttone[128];
/**
* Draw a lined (non-looping) arc with the given
@@ -202,7 +205,6 @@ int is_a_really_crappy_intel_card(void);
void set_inverted_drawing(int enable);
void setlinestyle(int nr);
-
/* own working polygon offset */
void bglPolygonOffset(float viewdist, float dist);
diff --git a/source/blender/editors/include/BIF_transform.h b/source/blender/editors/include/BIF_transform.h
deleted file mode 100644
index e02202eb8e0..00000000000
--- a/source/blender/editors/include/BIF_transform.h
+++ /dev/null
@@ -1,165 +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 *****
- */
-
-#ifndef BIF_TRANSFORM_H
-#define BIF_TRANSFORM_H
-
-/* ******************* Registration Function ********************** */
-
-struct wmWindowManager;
-struct ListBase;
-struct wmEvent;
-struct bContext;
-struct Object;
-struct uiLayout;
-
-void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
-void transform_operatortypes(void);
-
-/* ******************** Macros & Prototypes *********************** */
-
-/* MODE AND NUMINPUT FLAGS */
-enum {
- TFM_INIT = -1,
- TFM_DUMMY,
- TFM_TRANSLATION,
- TFM_ROTATION,
- TFM_RESIZE,
- TFM_TOSPHERE,
- TFM_SHEAR,
- TFM_WARP,
- TFM_SHRINKFATTEN,
- TFM_TILT,
- TFM_TRACKBALL,
- TFM_PUSHPULL,
- TFM_CREASE,
- TFM_MIRROR,
- TFM_BONESIZE,
- TFM_BONE_ENVELOPE,
- TFM_CURVE_SHRINKFATTEN,
- TFM_BONE_ROLL,
- TFM_TIME_TRANSLATE,
- TFM_TIME_SLIDE,
- TFM_TIME_SCALE,
- TFM_TIME_EXTEND,
- TFM_BAKE_TIME,
- TFM_BEVEL,
- TFM_BWEIGHT,
- TFM_ALIGN
-} TfmMode;
-
-/* TRANSFORM CONTEXTS */
-#define CTX_NONE 0
-#define CTX_TEXTURE 1
-#define CTX_EDGE 2
-#define CTX_NO_PET 4
-#define CTX_TWEAK 8
-#define CTX_NO_MIRROR 16
-#define CTX_AUTOCONFIRM 32
-#define CTX_BMESH 64
-#define CTX_NDOF 128
-
-/* Standalone call to get the transformation center corresponding to the current situation
- * returns 1 if successful, 0 otherwise (usually means there's no selection)
- * (if 0 is returns, *vec is unmodified)
- * */
-int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
-
-struct TransInfo;
-struct ScrArea;
-struct Base;
-struct Scene;
-struct Object;
-
-void BIF_setSingleAxisConstraint(float vec[3], char *text);
-void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
-void BIF_setLocalAxisConstraint(char axis, char *text);
-void BIF_setLocalLockConstraint(char axis, char *text);
-
-int BIF_snappingSupported(struct Object *obedit);
-
-struct TransformOrientation;
-struct bContext;
-
-void BIF_clearTransformOrientation(struct bContext *C);
-void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
-void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set);
-int BIF_menuselectTransformOrientation(void);
-void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
-void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
-
-void BIF_menuTransformOrientation(struct bContext *C, struct uiLayout *layout, void *arg);
-char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */
-int BIF_countTransformOrientation(const struct bContext *C);
-
-void BIF_getPropCenter(float *center);
-
-void BIF_TransformSetUndo(char *str);
-
-void BIF_selectOrientation(void);
-
-/* view3d manipulators */
-void initManipulator(int mode);
-void ManipulatorTransform();
-
-//int BIF_do_manipulator(struct ScrArea *sa);
-//void BIF_draw_manipulator(struct ScrArea *sa);
-
-/* Snapping */
-
-
-typedef struct DepthPeel
-{
- struct DepthPeel *next, *prev;
-
- float depth;
- float p[3];
- float no[3];
- struct Object *ob;
- int flag;
-} DepthPeel;
-
-struct ListBase;
-
-typedef enum SnapMode
-{
- SNAP_ALL = 0,
- SNAP_NOT_SELECTED = 1,
- SNAP_NOT_OBEDIT = 2
-} SnapMode;
-
-#define SNAP_MIN_DISTANCE 30
-
-int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, short mval[2]);
-int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, short mval[2]);
-int snapObjectsTransform(struct TransInfo *t, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
-int snapObjectsContext(struct bContext *C, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
-
-#endif
-
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index efc0a0b9a57..cc18c81fe51 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -41,7 +41,7 @@ struct gla2DDrawInfo;
struct Object;
struct bActionGroup;
struct FCurve;
-struct IpoCurve; // xxx
+struct FModifier;
/* ************************************************ */
/* ANIMATION CHANNEL FILTERING */
@@ -75,8 +75,9 @@ typedef enum eAnimCont_Types {
ANIMCONT_SHAPEKEY, /* shapekey (Key) */
ANIMCONT_GPENCIL, /* grease pencil (screen) */
ANIMCONT_DOPESHEET, /* dopesheet (bDopesheet) */
- ANIMCONT_FCURVES, /* animation F-Curves (bDopesheet) */ // XXX
+ ANIMCONT_FCURVES, /* animation F-Curves (bDopesheet) */
ANIMCONT_DRIVERS, /* drivers (bDopesheet) */
+ ANIMCONT_NLA, /* nla (bDopesheet) */
} eAnimCont_Types;
/* --------------- Channels -------------------- */
@@ -92,10 +93,10 @@ typedef struct bAnimListElem {
int flag; /* copy of elem's flags for quick access */
int index; /* copy of adrcode where applicable */
- void *key_data; /* motion data - ipo or ipo-curve */
+ void *key_data; /* motion data - mostly F-Curves, but can be other types too */
short datatype; /* type of motion data to expect */
- struct ID *id; /* ID block that channel is attached to (may be used */
+ struct ID *id; /* ID block that channel is attached to (may be used */
void *owner; /* group or channel which acts as this channel's owner */
short ownertype; /* type of owner */
@@ -106,6 +107,7 @@ typedef struct bAnimListElem {
// XXX was ACTTYPE_*
typedef enum eAnim_ChannelType {
ANIMTYPE_NONE= 0,
+ ANIMTYPE_ANIMDATA,
ANIMTYPE_SPECIALDATA,
ANIMTYPE_SCENE,
@@ -128,6 +130,9 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_GPDATABLOCK,
ANIMTYPE_GPLAYER,
+
+ ANIMTYPE_NLATRACK,
+ ANIMTYPE_NLAACTION,
} eAnim_ChannelType;
/* types of keyframe data in bAnimListElem */
@@ -135,8 +140,8 @@ typedef enum eAnim_KeyType {
ALE_NONE = 0, /* no keyframe data */
ALE_FCURVE, /* F-Curve */
ALE_GPFRAME, /* Grease Pencil Frames */
+ ALE_NLASTRIP, /* NLA Strips */
- // XXX the following are for summaries... should these be kept?
ALE_SCE, /* Scene summary */
ALE_OB, /* Object summary */
ALE_ACT, /* Action summary */
@@ -156,7 +161,9 @@ typedef enum eAnimFilter_Flags {
ANIMFILTER_CHANNELS = (1<<5), /* make list for interface drawing */
ANIMFILTER_ACTGROUPED = (1<<6), /* belongs to the active actiongroup */
ANIMFILTER_CURVEVISIBLE = (1<<7), /* F-Curve is visible for editing/viewing in Graph Editor */
- ANIMFILTER_ACTIVE = (1<<8), /* channel should be 'active' */ // FIXME: this is only relevant for F-Curves for now
+ ANIMFILTER_ACTIVE = (1<<8), /* channel should be 'active' */
+ ANIMFILTER_ANIMDATA = (1<<9), /* only return the underlying AnimData blocks (not the tracks, etc.) data comes from */
+ ANIMFILTER_NLATRACKS = (1<<10), /* only include NLA-tracks */
} eAnimFilter_Flags;
@@ -202,6 +209,10 @@ typedef enum eAnimFilter_Flags {
#define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED)==0)
#define SEL_GPL(gpl) ((gpl->flag & GP_LAYER_ACTIVE) || (gpl->flag & GP_LAYER_SELECT))
+/* NLA only */
+#define SEL_NLT(nlt) (nlt->flag & NLATRACK_SELECTED)
+#define EDITABLE_NLT(nlt) ((nlt->flag & NLATRACK_PROTECTED)==0)
+
/* -------------- Channel Defines -------------- */
/* channel heights */
@@ -217,6 +228,22 @@ typedef enum eAnimFilter_Flags {
/* channel toggle-buttons */
#define ACHANNEL_BUTTON_WIDTH 16
+
+/* -------------- NLA Channel Defines -------------- */
+
+/* NLA channel heights */
+#define NLACHANNEL_FIRST -16
+#define NLACHANNEL_HEIGHT 24
+#define NLACHANNEL_HEIGHT_HALF 12
+#define NLACHANNEL_SKIP 2
+#define NLACHANNEL_STEP (NLACHANNEL_HEIGHT + NLACHANNEL_SKIP)
+
+/* channel widths */
+#define NLACHANNEL_NAMEWIDTH 200
+
+/* channel toggle-buttons */
+#define NLACHANNEL_BUTTON_WIDTH 16
+
/* ---------------- API -------------------- */
/* Obtain list of filtered Animation channels to operate on.
@@ -245,7 +272,7 @@ short ANIM_animdata_context_getdata(bAnimContext *ac);
void ANIM_deselect_anim_channels(void *data, short datatype, short test, short sel);
/* Set the 'active' channel of type channel_type, in the given action */
-void ANIM_set_active_channel(void *data, short datatype, int filter, void *channel_data, short channel_type);
+void ANIM_set_active_channel(bAnimContext *ac, void *data, short datatype, int filter, void *channel_data, short channel_type);
/* --------------- Settings and/or Defines -------------- */
@@ -283,6 +310,14 @@ void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag);
void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d);
/* ************************************************* */
+/* F-MODIFIER TOOLS */
+
+struct uiLayout;
+
+/* draw a given F-Modifier for some layout/UI-Block */
+void ANIM_uiTemplate_fmodifier_draw(struct uiLayout *layout, struct ID *id, ListBase *modifiers, struct FModifier *fcm);
+
+/* ************************************************* */
/* ASSORTED TOOLS */
/* ------------ Animation F-Curves <-> Icons/Names Mapping ------------ */
@@ -299,19 +334,44 @@ void ipo_rainbow(int cur, int tot, float *out);
/* ------------- NLA-Mapping ----------------------- */
/* anim_draw.c */
-/* Obtain the Object providing NLA-scaling for the given channel if applicable */
-struct Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale);
+/* Obtain the AnimData block providing NLA-scaling for the given channel if applicable */
+struct AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale);
-/* Set/clear temporary mapping of coordinates from 'local-action' time to 'global-nla-scaled' time */
-void ANIM_nla_mapping_draw(struct gla2DDrawInfo *di, struct Object *ob, short restore);
+/* Set/clear temporary mapping of coordinates from 'local-action' time to 'global-nla-mapped' time */
+void ANIM_nla_mapping_draw(struct gla2DDrawInfo *di, struct AnimData *adt, short restore);
-/* Apply/Unapply NLA mapping to all keyframes in the nominated IPO block */
-void ANIM_nla_mapping_apply_fcurve(struct Object *ob, struct FCurve *fcu, short restore, short only_keys);
+/* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve */
+void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt, struct FCurve *fcu, short restore, short only_keys);
-/* ------------- xxx macros ----------------------- */
+/* ------------- Utility macros ----------------------- */
+/* 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
+ * - smode - 0=clear, 1=set, 2=toggle
+ * - sflag - bitflag to set
+ */
+#define ACHANNEL_SET_FLAG(channel, smode, sflag) \
+ { \
+ if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^= (sflag); \
+ else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \
+ else (channel)->flag &= ~(sflag); \
+ }
+
+/* set/clear/toggle macro, where the flag is negative
+ * - channel - channel with a 'flag' member that we're setting
+ * - smode - 0=clear, 1=set, 2=toggle
+ * - sflag - bitflag to set
+ */
+#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
+ { \
+ if (smode == ACHANNEL_SETFLAG_TOGGLE) (channel)->flag ^= (sflag); \
+ else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \
+ else (channel)->flag |= (sflag); \
+ }
+
/* --------- anim_deps.c, animation updates -------- */
@@ -324,18 +384,6 @@ void ED_anim_object_flush_update(const struct bContext *C, struct Object *ob);
void ANIM_action_to_pose_sync(struct Object *ob);
void ANIM_pose_to_action_sync(struct Object *ob, struct ScrArea *sa);
-
-/* what types of animation data was changed (for sending notifiers from animation tools) */
-enum {
- ANIM_CHANGED_BOTH= 0,
- ANIM_CHANGED_KEYFRAMES_VALUES,
- ANIM_CHANGED_KEYFRAMES_SELECT,
- ANIM_CHANGED_CHANNELS
-} eAnimData_Changed;
-
-/* Send notifiers on behalf of animation editing tools, based on various context info */
-void ANIM_animdata_send_notifiers(struct bContext *C, bAnimContext *ac, short data_changed);
-
/* ************************************************* */
/* OPERATORS */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 0f2ac6e3027..a9823bd9ff1 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -34,6 +34,7 @@ struct Base;
struct Bone;
struct bArmature;
struct bPoseChannel;
+struct wmOperator;
struct wmWindowManager;
struct ListBase;
struct View3D;
@@ -100,9 +101,11 @@ void ED_armature_edit_remake(struct Object *obedit);
int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer,
short hits, short extend);
void mouse_armature(struct bContext *C, short mval[2], int extend);
+int join_armature_exec(struct bContext *C, struct wmOperator *op);
struct Bone *get_indexed_bone (struct Object *ob, int index);
float ED_rollBoneToVector(EditBone *bone, float new_up_axis[3]);
EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, EditBone *ebo); // XXX this is needed for populating the context iterators
+void ED_armature_sync_selection(struct ListBase *edbo);
void add_primitive_bone(struct Scene *scene, struct View3D *v3d, struct RegionView3D *rv3d);
@@ -127,22 +130,22 @@ void ED_pose_deselectall(struct Object *ob, int test, int doundo);
int ED_operator_sketch_mode_active_stroke(struct bContext *C);
int ED_operator_sketch_full_mode(struct bContext *C);
-int ED_operator_sketch_mode(struct bContext *C);
+int ED_operator_sketch_mode(const struct bContext *C);
void BIF_freeSketch(struct bContext *C);
void BIF_convertSketch(struct bContext *C);
void BIF_deleteSketch(struct bContext *C);
void BIF_selectAllSketch(struct bContext *C, int mode); /* -1: deselect, 0: select, 1: toggle */
-void BIF_makeListTemplates(struct bContext *C);
-char *BIF_listTemplates(struct bContext *C);
-int BIF_currentTemplate(struct bContext *C);
+void BIF_makeListTemplates(const struct bContext *C);
+char *BIF_listTemplates(const struct bContext *C);
+int BIF_currentTemplate(const struct bContext *C);
void BIF_freeTemplates(struct bContext *C);
void BIF_setTemplate(struct bContext *C, int index);
-int BIF_nbJointsTemplate(struct bContext *C);
-char * BIF_nameBoneTemplate(struct bContext *C);
+int BIF_nbJointsTemplate(const struct bContext *C);
+char * BIF_nameBoneTemplate(const struct bContext *C);
-void BDR_drawSketch(struct bContext *vc);
+void BDR_drawSketch(const struct bContext *vc);
int BDR_drawSketchNames(struct ViewContext *vc);
#endif /* ED_ARMATURE_H */
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index c619ee80f70..4149c6a9cca 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -30,10 +30,12 @@
struct Base;
struct bContext;
+struct Nurb;
struct Object;
struct Scene;
struct Text;
struct View3D;
+struct wmOperator;
struct wmWindowManager;
/* curve_ops.c */
@@ -52,6 +54,10 @@ void mouse_nurb (struct bContext *C, short mval[2], int extend);
struct Nurb *add_nurbs_primitive(struct bContext *C, int type, int newname);
+int isNurbsel (struct Nurb *nu);;
+
+int join_curve_exec (struct bContext *C, struct wmOperator *op);
+
/* editfont.h */
void undo_push_font (struct bContext *C, char *name);
void make_editText (struct Object *obedit);
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index 34aefa91225..1b8524eea33 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -29,34 +29,8 @@
#define ED_FILES_H
struct SpaceFile;
-
-#define FILE_SHORTDISPLAY 1
-#define FILE_LONGDISPLAY 2
-#define FILE_IMGDISPLAY 3
-
-typedef struct FileSelectParams {
- char title[24]; /* title, also used for the text of the execute button */
- char dir[240]; /* directory */
- char file[80]; /* file */
-
- short flag; /* settings for filter, hiding files and display mode */
- short sort; /* sort order */
- short display; /* display mode flag */
- short filter; /* filter when (flags & FILE_FILTER) is true */
-
- /* XXX - temporary, better move to filelist */
- short active_bookmark;
- int active_file;
- int selstate;
-
- /* XXX --- still unused -- */
- short f_fp; /* show font preview */
- char fp_str[8]; /* string to use for font preview */
-
- char *pupmenu; /* allows menu for save options - result stored in menup */
- short menu; /* currently selected option in pupmenu */
- /* XXX --- end unused -- */
-} FileSelectParams;
+struct ARegion;
+struct FileSelectParams;
#define FILE_LAYOUT_HOR 1
#define FILE_LAYOUT_VER 2
@@ -93,9 +67,9 @@ typedef struct FileLayout
float column_widths[MAX_FILE_COLUMN];
} FileLayout;
-FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile);
+struct FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile);
-short ED_fileselect_set_params(struct SpaceFile *sfile, const char *title, const char *path,
+short ED_fileselect_set_params(struct SpaceFile *sfile, const char *title, const char *dir, const char *path,
short flag, short display, short filter, short sort);
void ED_fileselect_reset_params(struct SpaceFile *sfile);
diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h
index bda879173c3..2859ec897bf 100644
--- a/source/blender/editors/include/ED_fluidsim.h
+++ b/source/blender/editors/include/ED_fluidsim.h
@@ -1,7 +1,7 @@
/**
* BKE_fluidsim.h
*
- * $Id: LBM_fluidsim.h 17433 2008-11-12 21:16:53Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -46,6 +46,8 @@ void fluidsimSettingsFree(struct FluidsimSettings* sb);
/* duplicate internal data */
struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb);
+/* memory estimate */
+void fluidsimEstimateMemory(struct Object *ob, struct FluidsimSettings *fs, char *value);
#endif /* ED_FLUIDSIM_H */
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index 81420ac95e5..63adcf39c12 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -1,5 +1,5 @@
/**
- * $Id: BDR_drawaction.h 17579 2008-11-26 11:01:56Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -30,15 +30,17 @@
#ifndef ED_KEYFRAMES_DRAW_H
#define ED_KEYFRAMES_DRAW_H
+struct AnimData;
struct BezTriple;
struct FCurve;
-struct gla2DDrawInfo;
+struct bDopeSheet;
struct bAction;
struct bActionGroup;
struct Object;
struct ListBase;
struct bGPDlayer;
struct Scene;
+struct View2D;
/* ****************************** Base Structs ****************************** */
@@ -66,33 +68,38 @@ typedef struct ActKeyBlock {
} ActKeyBlock;
-/* Inclusion-Range Limiting Struct (optional) */
-typedef struct ActKeysInc {
- struct bDopeSheet *ads; /* dopesheet data (for dopesheet mode) */
- struct Object *ob; /* owner object for NLA-scaling info (if Object channels, is just Object) */
- short actmode; /* mode of the Action Editor (-1 is for NLA) */
-
- float start, end; /* frames (global-time) to only consider keys between */ // XXX not used anymore!
-} ActKeysInc;
+/* *********************** Keyframe Drawing ****************************** */
+
+/* options for keyframe shape drawing */
+typedef enum eKeyframeShapeDrawOpts {
+ /* only the border */
+ KEYFRAME_SHAPE_FRAME = 0,
+ /* only the inside filling */
+ KEYFRAME_SHAPE_INSIDE,
+ /* the whole thing */
+ KEYFRAME_SHAPE_BOTH
+} eKeyframeShapeDrawOpts;
+
+/* draw simple diamond-shape keyframe (with OpenGL) */
+void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short mode);
/* ******************************* Methods ****************************** */
/* Channel Drawing */
-void draw_fcurve_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct FCurve *fcu, float ypos);
-void draw_agroup_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bActionGroup *agrp, float ypos);
-void draw_action_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bAction *act, float ypos);
-void draw_object_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Object *ob, float ypos);
-void draw_scene_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Scene *sce, float ypos);
-void draw_gpl_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bGPDlayer *gpl, float ypos);
+void draw_fcurve_channel(struct View2D *v2d, struct AnimData *adt, struct FCurve *fcu, float ypos);
+void draw_agroup_channel(struct View2D *v2d, struct AnimData *adt, struct bActionGroup *agrp, float ypos);
+void draw_action_channel(struct View2D *v2d, struct AnimData *adt, struct bAction *act, float ypos);
+void draw_object_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Object *ob, float ypos);
+void draw_scene_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Scene *sce, float ypos);
+void draw_gpl_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPDlayer *gpl, float ypos);
/* Keydata Generation */
-void fcurve_to_keylist(struct FCurve *fcu, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void agroup_to_keylist(struct bActionGroup *agrp, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void action_to_keylist(struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void action_nlascaled_to_keylist(struct Object *ob, struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void ob_to_keylist(struct Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void scene_to_keylist(struct Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
-void gpl_to_keylist(struct bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc *aki);
+void fcurve_to_keylist(struct AnimData *adt, struct FCurve *fcu, ListBase *keys, ListBase *blocks);
+void agroup_to_keylist(struct AnimData *adt, struct bActionGroup *agrp, ListBase *keys, ListBase *blocks);
+void action_to_keylist(struct AnimData *adt, struct bAction *act, ListBase *keys, ListBase *blocks);
+void ob_to_keylist(struct bDopeSheet *ads, struct Object *ob, ListBase *keys, ListBase *blocks);
+void scene_to_keylist(struct bDopeSheet *ads, struct Scene *sce, ListBase *keys, ListBase *blocks);
+void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, ListBase *keys, ListBase *blocks);
#endif /* ED_KEYFRAMES_DRAW_H */
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index fbb469f8d43..3b3d0157362 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -1,5 +1,5 @@
/**
- * $Id: BIF_keyframing.h 17216 2008-10-29 11:20:02Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -30,6 +30,7 @@
struct ListBase;
struct ID;
+struct Scene;
struct KeyingSet;
@@ -43,6 +44,9 @@ struct bConstraint;
struct bContext;
struct wmOperatorType;
+struct PointerRNA;
+struct PropertyRNA;
+
/* ************ Keyframing Management **************** */
/* Get (or add relevant data to be able to do so) the Active Action for the given
@@ -71,6 +75,16 @@ void insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag);
/* -------- */
+/* Secondary Keyframing API calls:
+ * Use this to insert a keyframe using the current value being keyframed, in the
+ * nominated F-Curve (no creation of animation data performed). Returns success.
+ */
+short insert_keyframe_direct(struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, short flag);
+
+
+
+/* -------- */
+
/* Main Keyframing API calls:
* Use this to create any necessary animation data, and then insert a keyframe
* using the current value being keyframed, in the relevant place. Returns success.
@@ -155,7 +169,7 @@ void ANIM_OT_keyingset_add_destination(struct wmOperatorType *ot);
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block
*/
-short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, short flag);
+short ANIM_add_driver (struct ID *id, const char rna_path[], int array_index, short flag, int type);
/* Main Driver Management API calls:
* Remove the driver for the specified property on the given ID block (if available)
@@ -178,14 +192,22 @@ void ANIM_OT_remove_driver_button(struct wmOperatorType *ot);
/* Auto-Keying macros for use by various tools */
/* check if auto-keyframing is enabled (per scene takes presidence) */
-#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON))
+#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON))
/* check the mode for auto-keyframing (per scene takes presidence) */
-#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode))
+#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->toolsettings->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode))
/* check if a flag is set for auto-keyframing (as userprefs only!) */
#define IS_AUTOKEY_FLAG(flag) (U.autokey_flag & AUTOKEY_FLAG_##flag)
+/* auto-keyframing feature - checks for whether anything should be done for the current frame */
+int autokeyframe_cfra_can_key(struct Scene *scene, struct ID *id);
+
/* ************ Keyframe Checking ******************** */
+/* Lesser Keyframe Checking API call:
+ * - Used for the buttons to check for keyframes...
+ */
+short fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter);
+
/* Main Keyframe Checking API call:
* Checks whether a keyframe exists for the given ID-block one the given frame.
* - It is recommended to call this method over the other keyframe-checkers directly,
diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h
index 048bbbd7463..4b7a2954206 100644
--- a/source/blender/editors/include/ED_markers.h
+++ b/source/blender/editors/include/ED_markers.h
@@ -54,7 +54,7 @@ void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
/* Operators ------------------------------ */
/* called in screen_ops.c:ED_operatortypes_screen() */
-void ED_marker_operatortypes(void);
+void ED_operatortypes_marker(void);
/* called in screen_ops.c:ED_keymap_screen() */
void ED_marker_keymap(struct wmWindowManager *wm);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 97852fb980c..dd29f270680 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -73,6 +73,8 @@ struct BMFace;
#define B_JOINTRIA_VCOL 0X400
#define B_JOINTRIA_SHARP 0X800
#define B_JOINTRIA_MAT 0X1000
+#define B_FRACTAL 0x2000
+#define B_SPHERE 0x4000
/* bmeshutils.c */
@@ -92,6 +94,7 @@ void EDBM_selectmode_flush(struct BMEditMesh *em);
int EDBM_get_actSelection(struct BMEditMesh *em, struct BMEditSelection *ese);
void EDBM_editselection_center(struct BMEditMesh *em, float *center, struct BMEditSelection *ese);
void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese);
+void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese);
void EDBM_selectmode_set(struct BMEditMesh *em);
void EDBM_convertsel(struct BMEditMesh *em, short oldmode, short selectmode);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index bfa819632c9..f7dcc7fd1a0 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -35,7 +35,6 @@ struct bContext;
struct Base;
struct View3D;
struct bConstraint;
-struct bConstraintChannel;
struct KeyBlock;
struct Lattice;
struct Mesh;
@@ -63,6 +62,7 @@ struct Base *ED_object_add_duplicate(struct Scene *scene, struct Base *base, int
#define EM_FREEDATA 1
#define EM_FREEUNDO 2
#define EM_WAITCURSOR 4
+#define EM_DO_UNDO 8
void ED_object_exit_editmode(struct bContext *C, int flag);
void ED_object_enter_editmode(struct bContext *C, int flag);
@@ -77,15 +77,11 @@ void add_constraint_to_object(struct bConstraint *con, struct Object *ob);
struct ListBase *get_active_constraints(struct Object *ob);
struct bConstraint *get_active_constraint(struct Object *ob);
-struct bConstraintChannel *get_active_constraint_channel(struct Scene *scene, struct Object *ob);
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);
-int ED_object_constraint_delete(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
-int ED_object_constraint_move_down(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
-int ED_object_constraint_move_up(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
/* editlattice.c */
void mouse_lattice(struct bContext *C, short mval[2], int extend);
@@ -102,7 +98,8 @@ void key_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb)
void curve_to_key(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb);
/* object_modifier.c */
-int ED_object_modifier_delete(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
+int ED_object_modifier_add(struct ReportList *reports, struct Scene *scene, struct Object *ob, int type);
+int ED_object_modifier_remove(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md);
int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
int ED_object_modifier_convert(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md);
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 0e5d7302837..43cb5053f48 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -1,5 +1,5 @@
/*
- * $Id: ED_editparticle.h $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesdna/DNA_radio_types.h b/source/blender/editors/include/ED_physics.h
index 4219bf59b93..b04bfb992dc 100644
--- a/source/blender/makesdna/DNA_radio_types.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -1,9 +1,5 @@
-/**
- * radio_types.h dec 2000 Nzc
- *
- * All type defs for the Blender core.
- *
- * $Id$
+/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -21,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) 2001-2002 by NaN Holding BV.
+ * The Original Code is Copyright (C) 2007 by Janne Karhu.
* All rights reserved.
*
* The Original Code is: all of this file.
@@ -29,34 +25,16 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
- *
*/
-#ifndef DNA_RADIO_TYPES_H
-#define DNA_RADIO_TYPES_H
-
-typedef struct Radio {
- short hemires, maxiter;
- short drawtype, flag; /* bit 0 and 1: show limits */
- short subshootp, subshoote, nodelim, maxsublamp;
- short pama, pami, elma, elmi; /* patch and elem limits */
- int maxnode;
- float convergence;
- float radfac, gamma; /* for display */
-
-} Radio;
-
-
-/* **************** RADIOSITY ********************* */
+#ifndef ED_PHYSICS_H
+#define ED_PHYSICS_H
-/* draw type */
-#define RAD_WIREFRAME 0
-#define RAD_SOLID 1
-#define RAD_GOURAUD 2
+/* operators */
-/* flag */
-#define RAD_SHOWLIMITS 1
-#define RAD_SHOWZ 2
+void ED_operatortypes_pointcache(void);
+void ED_operatortypes_fluid(void);
+//void ED_keymap_pointcache(struct wmWindowManager *wm);
-#endif
+#endif /* ED_PHYSICS_H */
diff --git a/source/blender/editors/include/ED_previewrender.h b/source/blender/editors/include/ED_previewrender.h
index c74cb0f9958..10067510e53 100644
--- a/source/blender/editors/include/ED_previewrender.h
+++ b/source/blender/editors/include/ED_previewrender.h
@@ -29,17 +29,14 @@
struct View3D;
struct SpaceButs;
struct RenderInfo;
+struct Scene;
struct Image;
-struct ScrArea;
-struct uiBlock;
struct Render;
struct bContext;
struct ID;
#define PREVIEW_RENDERSIZE 140
-typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha);
-
/* stores rendered preview - is also used for icons */
typedef struct RenderInfo {
int pr_rectx;
@@ -74,6 +71,7 @@ void ED_preview_init_dbase(void);
void ED_preview_free_dbase(void);
void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, int sizex, int sizey);
+void ED_preview_iconrender(struct Scene *scene, struct ID *id, int *rect, int sizex, int sizey);
void ED_preview_draw(const struct bContext *C, void *idp, rcti *rect);
diff --git a/source/blender/editors/include/BIF_retopo.h b/source/blender/editors/include/ED_retopo.h
index cc2fda56b07..3d0b5f57661 100644
--- a/source/blender/editors/include/BIF_retopo.h
+++ b/source/blender/editors/include/ED_retopo.h
@@ -27,8 +27,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef BIF_RETOPO_H
-#define BIF_RETOPO_H
+#ifndef ED_RETOPO_H
+#define ED_RETOPO_H
#include "DNA_vec_types.h"
@@ -108,3 +108,4 @@ void retopo_matrix_update(struct View3D *v3d);
void retopo_free_view_data(struct View3D *v3d);
#endif
+
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index c2beb34e7b5..3449458168e 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -118,6 +118,8 @@ int ED_operator_node_active(struct bContext *C);
int ED_operator_ipo_active(struct bContext *C);
int ED_operator_sequencer_active(struct bContext *C);
int ED_operator_image_active(struct bContext *C);
+int ED_operator_nla_active(struct bContext *C);
+int ED_operator_logic_active(struct bContext *C);
int ED_operator_object_active(struct bContext *C);
int ED_operator_editmesh(struct bContext *C);
@@ -126,6 +128,7 @@ int ED_operator_editcurve(struct bContext *C);
int ED_operator_editsurf(struct bContext *C);
int ED_operator_editsurfcurve(struct bContext *C);
int ED_operator_editfont(struct bContext *C);
+int ED_operator_editlattice(struct bContext *C);
int ED_operator_uvedit(struct bContext *C);
int ED_operator_uvmap(struct bContext *C);
int ED_operator_posemode(struct bContext *C);
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index 37f2f4f051d..3ea5dfba65c 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -33,6 +33,7 @@
typedef struct ScreenAnimData {
ARegion *ar; /* do not read from this, only for comparing if region exists */
int redraws;
+ int reverse;
} ScreenAnimData;
diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h
index 08d2894ddf7..f2b46369d13 100644
--- a/source/blender/editors/include/ED_space_api.h
+++ b/source/blender/editors/include/ED_space_api.h
@@ -50,6 +50,7 @@ void ED_spacetype_nla(void);
void ED_spacetype_script(void);
void ED_spacetype_text(void);
void ED_spacetype_sequencer(void);
+void ED_spacetype_logic(void);
/* calls for instancing and freeing spacetype static data
called in WM_init_exit */
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 1d47d8ad190..5719aa63234 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -1,12 +1,12 @@
/**
- * $Id:
+ * $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.
+ * 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
@@ -17,17 +17,155 @@
* 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.
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
- *
- * Contributor(s): Blender Foundation
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
+
#ifndef ED_TRANSFORM_H
#define ED_TRANSFORM_H
+/* ******************* Registration Function ********************** */
+
+struct wmWindowManager;
+struct wmOperatorType;
+struct ListBase;
+struct wmEvent;
+struct bContext;
+struct Object;
+struct uiLayout;
+struct EnumPropertyItem;
+
+void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
+void transform_operatortypes(void);
+
+/* ******************** Macros & Prototypes *********************** */
+
+/* MODE AND NUMINPUT FLAGS */
+enum {
+ TFM_INIT = -1,
+ TFM_DUMMY,
+ TFM_TRANSLATION,
+ TFM_ROTATION,
+ TFM_RESIZE,
+ TFM_TOSPHERE,
+ TFM_SHEAR,
+ TFM_WARP,
+ TFM_SHRINKFATTEN,
+ TFM_TILT,
+ TFM_TRACKBALL,
+ TFM_PUSHPULL,
+ TFM_CREASE,
+ TFM_MIRROR,
+ TFM_BONESIZE,
+ TFM_BONE_ENVELOPE,
+ TFM_CURVE_SHRINKFATTEN,
+ TFM_BONE_ROLL,
+ TFM_TIME_TRANSLATE,
+ TFM_TIME_SLIDE,
+ TFM_TIME_SCALE,
+ TFM_TIME_EXTEND,
+ TFM_BAKE_TIME,
+ TFM_BEVEL,
+ TFM_BWEIGHT,
+ TFM_ALIGN
+} TfmMode;
+
+/* TRANSFORM CONTEXTS */
+#define CTX_NONE 0
+#define CTX_TEXTURE 1
+#define CTX_EDGE 2
+#define CTX_NO_PET 4
+#define CTX_TWEAK 8
+#define CTX_NO_MIRROR 16
+#define CTX_AUTOCONFIRM 32
+#define CTX_BMESH 64
+#define CTX_NDOF 128
+
+/* Standalone call to get the transformation center corresponding to the current situation
+ * returns 1 if successful, 0 otherwise (usually means there's no selection)
+ * (if 0 is returns, *vec is unmodified)
+ * */
+int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
+
+struct TransInfo;
+struct ScrArea;
+struct Base;
+struct Scene;
+struct Object;
+
+void BIF_setSingleAxisConstraint(float vec[3], char *text);
+void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
+void BIF_setLocalAxisConstraint(char axis, char *text);
+void BIF_setLocalLockConstraint(char axis, char *text);
+
+int BIF_snappingSupported(struct Object *obedit);
+
+struct TransformOrientation;
+struct bContext;
+
+void BIF_clearTransformOrientation(struct bContext *C);
+void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set);
+int BIF_menuselectTransformOrientation(void);
+void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
+
+struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C);
+char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */
+int BIF_countTransformOrientation(const struct bContext *C);
+
+void BIF_TransformSetUndo(char *str);
+
+void BIF_selectOrientation(void);
+
+/* to be able to add operator properties to other operators */
+
+void Properties_Proportional(struct wmOperatorType *ot);
+void Properties_Snapping(struct wmOperatorType *ot, short align);
+void Properties_Constraints(struct wmOperatorType *ot);
+
+/* view3d manipulators */
+void initManipulator(int mode);
+void ManipulatorTransform();
+
+int BIF_do_manipulator(struct bContext *C, struct wmEvent *event, struct wmOperator *op);
+void BIF_draw_manipulator(const struct bContext *C);
+
+/* Snapping */
+
+
+typedef struct DepthPeel
+{
+ struct DepthPeel *next, *prev;
+
+ float depth;
+ float p[3];
+ float no[3];
+ struct Object *ob;
+ int flag;
+} DepthPeel;
+
+struct ListBase;
+
+typedef enum SnapMode
+{
+ SNAP_ALL = 0,
+ SNAP_NOT_SELECTED = 1,
+ SNAP_NOT_OBEDIT = 2
+} SnapMode;
+
+#define SNAP_MIN_DISTANCE 30
+
+int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, short mval[2]);
+int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, short mval[2]);
+int snapObjectsTransform(struct TransInfo *t, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
+int snapObjectsContext(struct bContext *C, short mval[2], int *dist, float *loc, float *no, SnapMode mode);
-#endif /* ED_TRANSFORM_H */
+#endif
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 640d16be43f..6360bf49f1a 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -39,7 +39,6 @@ struct Nurb;
struct BezTriple;
struct BMVert;
struct BMEdge;
-struct BMEditMesh;
struct BMFace;
struct ImBuf;
struct Scene;
@@ -133,6 +132,8 @@ int lasso_inside_edge(short mcords[][2], short moves, int x0, int y0, int x1, in
/* modes */
void ED_view3d_exit_paint_modes(struct bContext *C);
+/* get 3d region from context, also if mouse is in header or toolbar */
+struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
#endif /* ED_VIEW3D_H */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
new file mode 100644
index 00000000000..f9e427ac006
--- /dev/null
+++ b/source/blender/editors/include/UI_icons.h
@@ -0,0 +1,884 @@
+/**
+ * $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): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/* Note: this is included twice with different #defines for DEF_ICON
+ once from UI_resources.h for the internal icon enum and once fro interface_api.c for
+ definition of the RNA enum for he icons */
+
+DEF_ICON(ICON_BLENDER)
+DEF_ICON(ICON_QUESTION)
+DEF_ICON(ICON_ERROR)
+DEF_ICON(ICON_BLANK1) // XXX this is used lots, it's not actually 'blank'
+DEF_ICON(ICON_TRIA_RIGHT)
+DEF_ICON(ICON_TRIA_DOWN)
+DEF_ICON(ICON_TRIA_LEFT)
+DEF_ICON(ICON_TRIA_UP)
+DEF_ICON(ICON_ARROW_LEFTRIGHT)
+DEF_ICON(ICON_PLUS)
+DEF_ICON(ICON_DISCLOSURE_TRI_DOWN)
+DEF_ICON(ICON_DISCLOSURE_TRI_RIGHT)
+DEF_ICON(ICON_RADIOBUT_OFF)
+DEF_ICON(ICON_RADIOBUT_ON)
+DEF_ICON(ICON_MENU_PANEL)
+DEF_ICON(ICON_PYTHON)
+DEF_ICON(ICON_BLANK003)
+DEF_ICON(ICON_DOT)
+DEF_ICON(ICON_BLANK004)
+DEF_ICON(ICON_X)
+DEF_ICON(ICON_BLANK005)
+DEF_ICON(ICON_GO_LEFT)
+DEF_ICON(ICON_BLANK006)
+DEF_ICON(ICON_BLANK007)
+DEF_ICON(ICON_BLANK008)
+DEF_ICON(ICON_BLANK008b)
+
+ /* ui */
+DEF_ICON(ICON_FULLSCREEN)
+DEF_ICON(ICON_SPLITSCREEN)
+DEF_ICON(ICON_RIGHTARROW_THIN)
+DEF_ICON(ICON_BORDERMOVE)
+DEF_ICON(ICON_VIEWZOOM)
+DEF_ICON(ICON_ZOOMIN)
+DEF_ICON(ICON_ZOOMOUT)
+DEF_ICON(ICON_PANEL_CLOSE)
+DEF_ICON(ICON_BLANK009)
+DEF_ICON(ICON_EYEDROPPER)
+DEF_ICON(ICON_BLANK010)
+DEF_ICON(ICON_AUTO)
+DEF_ICON(ICON_CHECKBOX_DEHLT)
+DEF_ICON(ICON_CHECKBOX_HLT)
+DEF_ICON(ICON_UNLOCKED)
+DEF_ICON(ICON_LOCKED)
+DEF_ICON(ICON_UNPINNED)
+DEF_ICON(ICON_PINNED)
+DEF_ICON(ICON_BLANK015)
+DEF_ICON(ICON_RIGHTARROW)
+DEF_ICON(ICON_DOWNARROW_HLT)
+DEF_ICON(ICON_DOTSUP)
+DEF_ICON(ICON_DOTSDOWN)
+DEF_ICON(ICON_LINK)
+DEF_ICON(ICON_INLINK)
+DEF_ICON(ICON_BLANK012b)
+
+ /* various ui */
+DEF_ICON(ICON_HELP)
+DEF_ICON(ICON_GHOSTDRAW)
+DEF_ICON(ICON_COLOR)
+DEF_ICON(ICON_LINKED)
+DEF_ICON(ICON_UNLINKED)
+DEF_ICON(ICON_HAND)
+DEF_ICON(ICON_ZOOM_ALL)
+DEF_ICON(ICON_ZOOM_SELECTED)
+DEF_ICON(ICON_ZOOM_PREVIOUS)
+DEF_ICON(ICON_ZOOM_IN)
+DEF_ICON(ICON_ZOOM_OUT)
+DEF_ICON(ICON_RENDER_REGION)
+DEF_ICON(ICON_BORDER_RECT)
+DEF_ICON(ICON_BORDER_LASSO)
+DEF_ICON(ICON_FREEZE)
+DEF_ICON(ICON_BLANK031)
+DEF_ICON(ICON_BLANK032)
+DEF_ICON(ICON_BLANK033)
+DEF_ICON(ICON_BLANK034)
+DEF_ICON(ICON_BLANK035)
+DEF_ICON(ICON_BLANK036)
+DEF_ICON(ICON_BLANK037)
+DEF_ICON(ICON_BLANK038)
+DEF_ICON(ICON_BLANK039)
+DEF_ICON(ICON_BLANK040)
+DEF_ICON(ICON_BLANK040b)
+
+ /* BUTTONS */
+DEF_ICON(ICON_LAMP)
+DEF_ICON(ICON_MATERIAL)
+DEF_ICON(ICON_TEXTURE)
+DEF_ICON(ICON_ANIM)
+DEF_ICON(ICON_WORLD)
+DEF_ICON(ICON_SCENE)
+DEF_ICON(ICON_EDIT)
+DEF_ICON(ICON_GAME)
+DEF_ICON(ICON_RADIO)
+DEF_ICON(ICON_SCRIPT)
+DEF_ICON(ICON_PARTICLES)
+DEF_ICON(ICON_PHYSICS)
+DEF_ICON(ICON_SPEAKER)
+DEF_ICON(ICON_BLANK041)
+DEF_ICON(ICON_BLANK042)
+DEF_ICON(ICON_BLANK043)
+DEF_ICON(ICON_BLANK044)
+DEF_ICON(ICON_BLANK045)
+DEF_ICON(ICON_BLANK046)
+DEF_ICON(ICON_BLANK047)
+DEF_ICON(ICON_BLANK048)
+DEF_ICON(ICON_BLANK049)
+DEF_ICON(ICON_BLANK050)
+DEF_ICON(ICON_BLANK051)
+DEF_ICON(ICON_BLANK052)
+DEF_ICON(ICON_BLANK052b)
+
+ /* EDITORS */
+DEF_ICON(ICON_VIEW3D)
+DEF_ICON(ICON_IPO)
+DEF_ICON(ICON_OOPS)
+DEF_ICON(ICON_BUTS)
+DEF_ICON(ICON_FILESEL)
+DEF_ICON(ICON_IMAGE_COL)
+DEF_ICON(ICON_INFO)
+DEF_ICON(ICON_SEQUENCE)
+DEF_ICON(ICON_TEXT)
+DEF_ICON(ICON_IMASEL)
+DEF_ICON(ICON_SOUND)
+DEF_ICON(ICON_ACTION)
+DEF_ICON(ICON_NLA)
+DEF_ICON(ICON_SCRIPTWIN)
+DEF_ICON(ICON_TIME)
+DEF_ICON(ICON_NODE)
+DEF_ICON(ICON_BLANK053)
+DEF_ICON(ICON_BLANK054)
+DEF_ICON(ICON_BLANK055)
+DEF_ICON(ICON_BLANK056)
+DEF_ICON(ICON_BLANK057)
+DEF_ICON(ICON_BLANK058)
+DEF_ICON(ICON_BLANK059)
+DEF_ICON(ICON_BLANK060)
+DEF_ICON(ICON_BLANK061)
+DEF_ICON(ICON_BLANK061b)
+
+ /* MODES */
+DEF_ICON(ICON_OBJECT_DATAMODE) // XXX fix this up
+DEF_ICON(ICON_EDITMODE_HLT)
+DEF_ICON(ICON_FACESEL_HLT)
+DEF_ICON(ICON_VPAINT_HLT)
+DEF_ICON(ICON_TPAINT_HLT)
+DEF_ICON(ICON_WPAINT_HLT)
+DEF_ICON(ICON_SCULPTMODE_HLT)
+DEF_ICON(ICON_POSE_HLT)
+DEF_ICON(ICON_PARTICLEMODE)
+DEF_ICON(ICON_BLANK062)
+DEF_ICON(ICON_BLANK063)
+DEF_ICON(ICON_BLANK064)
+DEF_ICON(ICON_BLANK065)
+DEF_ICON(ICON_BLANK066)
+DEF_ICON(ICON_BLANK067)
+DEF_ICON(ICON_BLANK068)
+DEF_ICON(ICON_BLANK069)
+DEF_ICON(ICON_BLANK070)
+DEF_ICON(ICON_BLANK071)
+DEF_ICON(ICON_BLANK072)
+DEF_ICON(ICON_BLANK073)
+DEF_ICON(ICON_BLANK074)
+DEF_ICON(ICON_BLANK075)
+DEF_ICON(ICON_BLANK076)
+DEF_ICON(ICON_BLANK077)
+DEF_ICON(ICON_BLANK077b)
+
+ /* DATA */
+DEF_ICON(ICON_SCENE_DATA)
+DEF_ICON(ICON_RENDERLAYERS)
+DEF_ICON(ICON_WORLD_DATA)
+DEF_ICON(ICON_OBJECT_DATA)
+DEF_ICON(ICON_MESH_DATA)
+DEF_ICON(ICON_CURVE_DATA)
+DEF_ICON(ICON_META_DATA)
+DEF_ICON(ICON_LATTICE_DATA)
+DEF_ICON(ICON_LAMP_DATA)
+DEF_ICON(ICON_MATERIAL_DATA)
+DEF_ICON(ICON_TEXTURE_DATA)
+DEF_ICON(ICON_ANIM_DATA)
+DEF_ICON(ICON_CAMERA_DATA)
+DEF_ICON(ICON_PARTICLE_DATA)
+DEF_ICON(ICON_LIBRARY_DATA_DIRECT)
+DEF_ICON(ICON_GROUP)
+DEF_ICON(ICON_ARMATURE_DATA)
+DEF_ICON(ICON_POSE_DATA)
+DEF_ICON(ICON_BONE_DATA)
+DEF_ICON(ICON_CONSTRAINT)
+DEF_ICON(ICON_SHAPEKEY_DATA)
+DEF_ICON(ICON_BLANK079a)
+DEF_ICON(ICON_BLANK079)
+DEF_ICON(ICON_PACKAGE)
+DEF_ICON(ICON_UGLYPACKAGE)
+DEF_ICON(ICON_BLANK079b)
+
+ /* DATA */
+DEF_ICON(ICON_BRUSH_DATA)
+DEF_ICON(ICON_IMAGE_DATA)
+DEF_ICON(ICON_FILE)
+DEF_ICON(ICON_FCURVE)
+DEF_ICON(ICON_FONT_DATA)
+DEF_ICON(ICON_RENDER_RESULT)
+DEF_ICON(ICON_SURFACE_DATA)
+DEF_ICON(ICON_EMPTY_DATA)
+DEF_ICON(ICON_SETTINGS)
+DEF_ICON(ICON_BLANK080D)
+DEF_ICON(ICON_BLANK080E)
+DEF_ICON(ICON_BLANK080F)
+DEF_ICON(ICON_BLANK080)
+DEF_ICON(ICON_STRANDS)
+DEF_ICON(ICON_LIBRARY_DATA_INDIRECT)
+DEF_ICON(ICON_BLANK082)
+DEF_ICON(ICON_BLANK083)
+DEF_ICON(ICON_BLANK084)
+DEF_ICON(ICON_GROUP_BONE)
+DEF_ICON(ICON_GROUP_VERTEX)
+DEF_ICON(ICON_GROUP_VCOL)
+DEF_ICON(ICON_GROUP_UVS)
+DEF_ICON(ICON_BLANK089)
+DEF_ICON(ICON_BLANK090)
+DEF_ICON(ICON_RNA)
+DEF_ICON(ICON_BLANK090b)
+
+ /* available */
+DEF_ICON(ICON_BLANK092)
+DEF_ICON(ICON_BLANK093)
+DEF_ICON(ICON_BLANK094)
+DEF_ICON(ICON_BLANK095)
+DEF_ICON(ICON_BLANK096)
+DEF_ICON(ICON_BLANK097)
+DEF_ICON(ICON_BLANK098)
+DEF_ICON(ICON_BLANK099)
+DEF_ICON(ICON_BLANK100)
+DEF_ICON(ICON_BLANK101)
+DEF_ICON(ICON_BLANK102)
+DEF_ICON(ICON_BLANK103)
+DEF_ICON(ICON_BLANK104)
+DEF_ICON(ICON_BLANK105)
+DEF_ICON(ICON_BLANK106)
+DEF_ICON(ICON_BLANK107)
+DEF_ICON(ICON_BLANK108)
+DEF_ICON(ICON_BLANK109)
+DEF_ICON(ICON_BLANK110)
+DEF_ICON(ICON_BLANK111)
+DEF_ICON(ICON_BLANK112)
+DEF_ICON(ICON_BLANK113)
+DEF_ICON(ICON_BLANK114)
+DEF_ICON(ICON_BLANK115)
+DEF_ICON(ICON_BLANK116)
+DEF_ICON(ICON_BLANK116b)
+
+ /* OUTLINER */
+DEF_ICON(ICON_OUTLINER_OB_EMPTY)
+DEF_ICON(ICON_OUTLINER_OB_MESH)
+DEF_ICON(ICON_OUTLINER_OB_CURVE)
+DEF_ICON(ICON_OUTLINER_OB_LATTICE)
+DEF_ICON(ICON_OUTLINER_OB_META)
+DEF_ICON(ICON_OUTLINER_OB_LAMP)
+DEF_ICON(ICON_OUTLINER_OB_CAMERA)
+DEF_ICON(ICON_OUTLINER_OB_ARMATURE)
+DEF_ICON(ICON_OUTLINER_OB_FONT)
+DEF_ICON(ICON_OUTLINER_OB_SURFACE)
+DEF_ICON(ICON_BLANK119)
+DEF_ICON(ICON_BLANK120)
+DEF_ICON(ICON_BLANK121)
+DEF_ICON(ICON_BLANK122)
+DEF_ICON(ICON_BLANK123)
+DEF_ICON(ICON_BLANK124)
+DEF_ICON(ICON_BLANK125)
+DEF_ICON(ICON_BLANK126)
+DEF_ICON(ICON_BLANK127)
+DEF_ICON(ICON_RESTRICT_VIEW_OFF)
+DEF_ICON(ICON_RESTRICT_VIEW_ON)
+DEF_ICON(ICON_RESTRICT_SELECT_OFF)
+DEF_ICON(ICON_RESTRICT_SELECT_ON)
+DEF_ICON(ICON_RESTRICT_RENDER_OFF)
+DEF_ICON(ICON_RESTRICT_RENDER_ON)
+DEF_ICON(ICON_BLANK127b)
+
+ /* OUTLINER */
+DEF_ICON(ICON_OUTLINER_DATA_EMPTY)
+DEF_ICON(ICON_OUTLINER_DATA_MESH)
+DEF_ICON(ICON_OUTLINER_DATA_CURVE)
+DEF_ICON(ICON_OUTLINER_DATA_LATTICE)
+DEF_ICON(ICON_OUTLINER_DATA_META)
+DEF_ICON(ICON_OUTLINER_DATA_LAMP)
+DEF_ICON(ICON_OUTLINER_DATA_CAMERA)
+DEF_ICON(ICON_OUTLINER_DATA_ARMATURE)
+DEF_ICON(ICON_OUTLINER_DATA_FONT)
+DEF_ICON(ICON_OUTLINER_DATA_SURFACE)
+DEF_ICON(ICON_OUTLINER_DATA_POSE)
+DEF_ICON(ICON_BLANK129)
+DEF_ICON(ICON_BLANK130)
+DEF_ICON(ICON_BLANK131)
+DEF_ICON(ICON_BLANK132)
+DEF_ICON(ICON_BLANK133)
+DEF_ICON(ICON_BLANK134)
+DEF_ICON(ICON_BLANK135)
+DEF_ICON(ICON_BLANK136)
+DEF_ICON(ICON_BLANK137)
+DEF_ICON(ICON_BLANK138)
+DEF_ICON(ICON_BLANK139)
+DEF_ICON(ICON_BLANK140)
+DEF_ICON(ICON_BLANK141)
+DEF_ICON(ICON_BLANK142)
+DEF_ICON(ICON_BLANK142b)
+
+ /* PRIMITIVES */
+DEF_ICON(ICON_MESH_PLANE)
+DEF_ICON(ICON_MESH_CUBE)
+DEF_ICON(ICON_MESH_CIRCLE)
+DEF_ICON(ICON_MESH_UVSPHERE)
+DEF_ICON(ICON_MESH_ICOSPHERE)
+DEF_ICON(ICON_MESH_GRID)
+DEF_ICON(ICON_MESH_MONKEY)
+DEF_ICON(ICON_MESH_TUBE)
+DEF_ICON(ICON_MESH_DONUT)
+DEF_ICON(ICON_MESH_CONE)
+DEF_ICON(ICON_BLANK610)
+DEF_ICON(ICON_BLANK611)
+DEF_ICON(ICON_LAMP_POINT)
+DEF_ICON(ICON_LAMP_SUN)
+DEF_ICON(ICON_LAMP_SPOT)
+DEF_ICON(ICON_LAMP_HEMI)
+DEF_ICON(ICON_LAMP_AREA)
+DEF_ICON(ICON_BLANK617)
+DEF_ICON(ICON_BLANK618)
+DEF_ICON(ICON_BLANK619)
+DEF_ICON(ICON_META_PLANE)
+DEF_ICON(ICON_META_CUBE)
+DEF_ICON(ICON_META_BALL)
+DEF_ICON(ICON_META_ELLIPSOID)
+DEF_ICON(ICON_META_TUBE)
+DEF_ICON(ICON_BLANK625)
+
+ /* PRIMITIVES */
+DEF_ICON(ICON_SURFACE_NCURVE)
+DEF_ICON(ICON_SURFACE_NCIRCLE)
+DEF_ICON(ICON_SURFACE_NSURFACE)
+DEF_ICON(ICON_SURFACE_NTUBE)
+DEF_ICON(ICON_SURFACE_NSPHERE)
+DEF_ICON(ICON_SURFACE_NDONUT)
+DEF_ICON(ICON_BLANK636)
+DEF_ICON(ICON_BLANK637)
+DEF_ICON(ICON_BLANK638)
+DEF_ICON(ICON_CURVE_BEZCURVE)
+DEF_ICON(ICON_CURVE_BEZCIRCLE)
+DEF_ICON(ICON_CURVE_NCURVE)
+DEF_ICON(ICON_CURVE_NCIRCLE)
+DEF_ICON(ICON_CURVE_PATH)
+DEF_ICON(ICON_BLANK644)
+DEF_ICON(ICON_BLANK645)
+DEF_ICON(ICON_BLANK646)
+DEF_ICON(ICON_BLANK647)
+DEF_ICON(ICON_BLANK648)
+DEF_ICON(ICON_BLANK649)
+DEF_ICON(ICON_BLANK650)
+DEF_ICON(ICON_BLANK651)
+DEF_ICON(ICON_BLANK652)
+DEF_ICON(ICON_BLANK653)
+DEF_ICON(ICON_BLANK654)
+DEF_ICON(ICON_BLANK655)
+
+ /* EMPTY */
+DEF_ICON(ICON_BLANK660)
+DEF_ICON(ICON_BLANK661)
+DEF_ICON(ICON_BLANK662)
+DEF_ICON(ICON_BLANK663)
+DEF_ICON(ICON_BLANK664)
+DEF_ICON(ICON_BLANK665)
+DEF_ICON(ICON_BLANK666)
+DEF_ICON(ICON_BLANK667)
+DEF_ICON(ICON_BLANK668)
+DEF_ICON(ICON_BLANK669)
+DEF_ICON(ICON_BLANK670)
+DEF_ICON(ICON_BLANK671)
+DEF_ICON(ICON_BLANK672)
+DEF_ICON(ICON_BLANK673)
+DEF_ICON(ICON_BLANK674)
+DEF_ICON(ICON_BLANK675)
+DEF_ICON(ICON_BLANK676)
+DEF_ICON(ICON_BLANK677)
+DEF_ICON(ICON_BLANK678)
+DEF_ICON(ICON_BLANK679)
+DEF_ICON(ICON_BLANK680)
+DEF_ICON(ICON_BLANK681)
+DEF_ICON(ICON_BLANK682)
+DEF_ICON(ICON_BLANK683)
+DEF_ICON(ICON_BLANK684)
+DEF_ICON(ICON_BLANK685)
+
+ /* EMPTY */
+DEF_ICON(ICON_BLANK690)
+DEF_ICON(ICON_BLANK691)
+DEF_ICON(ICON_BLANK692)
+DEF_ICON(ICON_BLANK693)
+DEF_ICON(ICON_BLANK694)
+DEF_ICON(ICON_BLANK695)
+DEF_ICON(ICON_BLANK696)
+DEF_ICON(ICON_BLANK697)
+DEF_ICON(ICON_BLANK698)
+DEF_ICON(ICON_BLANK699)
+DEF_ICON(ICON_BLANK700)
+DEF_ICON(ICON_BLANK701)
+DEF_ICON(ICON_BLANK702)
+DEF_ICON(ICON_BLANK703)
+DEF_ICON(ICON_BLANK704)
+DEF_ICON(ICON_BLANK705)
+DEF_ICON(ICON_BLANK706)
+DEF_ICON(ICON_BLANK707)
+DEF_ICON(ICON_BLANK708)
+DEF_ICON(ICON_BLANK709)
+DEF_ICON(ICON_BLANK710)
+DEF_ICON(ICON_BLANK711)
+DEF_ICON(ICON_BLANK712)
+DEF_ICON(ICON_BLANK713)
+DEF_ICON(ICON_BLANK714)
+DEF_ICON(ICON_BLANK715)
+
+ /* EMPTY */
+DEF_ICON(ICON_BLANK720)
+DEF_ICON(ICON_BLANK721)
+DEF_ICON(ICON_BLANK722)
+DEF_ICON(ICON_BLANK733)
+DEF_ICON(ICON_BLANK734)
+DEF_ICON(ICON_BLANK735)
+DEF_ICON(ICON_BLANK736)
+DEF_ICON(ICON_BLANK737)
+DEF_ICON(ICON_BLANK738)
+DEF_ICON(ICON_BLANK739)
+DEF_ICON(ICON_BLANK740)
+DEF_ICON(ICON_BLANK741)
+DEF_ICON(ICON_BLANK742)
+DEF_ICON(ICON_BLANK743)
+DEF_ICON(ICON_BLANK744)
+DEF_ICON(ICON_BLANK745)
+DEF_ICON(ICON_BLANK746)
+DEF_ICON(ICON_BLANK747)
+DEF_ICON(ICON_BLANK748)
+DEF_ICON(ICON_BLANK749)
+DEF_ICON(ICON_BLANK750)
+DEF_ICON(ICON_BLANK751)
+DEF_ICON(ICON_BLANK752)
+DEF_ICON(ICON_BLANK753)
+DEF_ICON(ICON_BLANK754)
+DEF_ICON(ICON_BLANK755)
+
+ /* EMPTY */
+DEF_ICON(ICON_BLANK760)
+DEF_ICON(ICON_BLANK761)
+DEF_ICON(ICON_BLANK762)
+DEF_ICON(ICON_BLANK763)
+DEF_ICON(ICON_BLANK764)
+DEF_ICON(ICON_BLANK765)
+DEF_ICON(ICON_BLANK766)
+DEF_ICON(ICON_BLANK767)
+DEF_ICON(ICON_BLANK768)
+DEF_ICON(ICON_BLANK769)
+DEF_ICON(ICON_BLANK770)
+DEF_ICON(ICON_BLANK771)
+DEF_ICON(ICON_BLANK772)
+DEF_ICON(ICON_BLANK773)
+DEF_ICON(ICON_BLANK774)
+DEF_ICON(ICON_BLANK775)
+DEF_ICON(ICON_BLANK776)
+DEF_ICON(ICON_BLANK777)
+DEF_ICON(ICON_BLANK778)
+DEF_ICON(ICON_BLANK779)
+DEF_ICON(ICON_BLANK780)
+DEF_ICON(ICON_BLANK781)
+DEF_ICON(ICON_BLANK782)
+DEF_ICON(ICON_BLANK783)
+DEF_ICON(ICON_BLANK784)
+DEF_ICON(ICON_BLANK785)
+
+ /* MODIFIERS */
+DEF_ICON(ICON_MODIFIER)
+DEF_ICON(ICON_MOD_WAVE)
+DEF_ICON(ICON_MOD_BUILD)
+DEF_ICON(ICON_MOD_DECIM)
+DEF_ICON(ICON_MOD_MIRROR)
+DEF_ICON(ICON_MOD_SOFT)
+DEF_ICON(ICON_MOD_SUBSURF)
+DEF_ICON(ICON_HOOK)
+DEF_ICON(ICON_MOD_PHYSICS)
+DEF_ICON(ICON_MOD_PARTICLES)
+DEF_ICON(ICON_MOD_BOOLEAN)
+DEF_ICON(ICON_MOD_EDGESPLIT)
+DEF_ICON(ICON_MOD_ARRAY)
+DEF_ICON(ICON_MOD_UVPROJECT)
+DEF_ICON(ICON_MOD_DISPLACE)
+DEF_ICON(ICON_MOD_CURVE)
+DEF_ICON(ICON_MOD_LATTICE)
+DEF_ICON(ICON_BLANK143)
+DEF_ICON(ICON_MOD_ARMATURE)
+DEF_ICON(ICON_MOD_SHRINKWRAP)
+DEF_ICON(ICON_MOD_CAST)
+DEF_ICON(ICON_MOD_MESHDEFORM)
+DEF_ICON(ICON_MOD_BEVEL)
+DEF_ICON(ICON_MOD_SMOOTH)
+DEF_ICON(ICON_MOD_SIMPLEDEFORM)
+DEF_ICON(ICON_MOD_MASK)
+
+ /* MODIFIERS */
+DEF_ICON(ICON_MOD_CLOTH)
+DEF_ICON(ICON_MOD_EXPLODE)
+DEF_ICON(ICON_MOD_FLUIDSIM)
+DEF_ICON(ICON_MOD_MULTIRES)
+DEF_ICON(ICON_BLANK157)
+DEF_ICON(ICON_BLANK158)
+DEF_ICON(ICON_BLANK159)
+DEF_ICON(ICON_BLANK160)
+DEF_ICON(ICON_BLANK161)
+DEF_ICON(ICON_BLANK162)
+DEF_ICON(ICON_BLANK163)
+DEF_ICON(ICON_BLANK164)
+DEF_ICON(ICON_BLANK165)
+DEF_ICON(ICON_BLANK166)
+DEF_ICON(ICON_BLANK167)
+DEF_ICON(ICON_BLANK168)
+DEF_ICON(ICON_BLANK169)
+DEF_ICON(ICON_BLANK170)
+DEF_ICON(ICON_BLANK171)
+DEF_ICON(ICON_BLANK172)
+DEF_ICON(ICON_BLANK173)
+DEF_ICON(ICON_BLANK174)
+DEF_ICON(ICON_BLANK175)
+DEF_ICON(ICON_BLANK176)
+DEF_ICON(ICON_BLANK177)
+DEF_ICON(ICON_BLANK177b)
+
+ /* ANIMATION */
+DEF_ICON(ICON_REC)
+DEF_ICON(ICON_PLAY)
+DEF_ICON(ICON_FF)
+DEF_ICON(ICON_REW)
+DEF_ICON(ICON_PAUSE)
+DEF_ICON(ICON_PREV_KEYFRAME)
+DEF_ICON(ICON_NEXT_KEYFRAME)
+DEF_ICON(ICON_PLAY_AUDIO)
+DEF_ICON(ICON_BLANK178)
+DEF_ICON(ICON_BLANK179)
+DEF_ICON(ICON_BLANK180)
+DEF_ICON(ICON_PMARKER_ACT)
+DEF_ICON(ICON_PMARKER_SEL)
+DEF_ICON(ICON_PMARKER)
+DEF_ICON(ICON_MARKER_HLT)
+DEF_ICON(ICON_MARKER)
+DEF_ICON(ICON_SPACE2) // XXX
+DEF_ICON(ICON_SPACE3) // XXX
+DEF_ICON(ICON_BLANK181)
+DEF_ICON(ICON_KEY_DEHLT)
+DEF_ICON(ICON_KEY_HLT)
+DEF_ICON(ICON_MUTE_IPO_OFF)
+DEF_ICON(ICON_MUTE_IPO_ON)
+DEF_ICON(ICON_BLANK182)
+DEF_ICON(ICON_BLANK183)
+DEF_ICON(ICON_BLANK183b)
+
+ /* available */
+DEF_ICON(ICON_BLANK184)
+DEF_ICON(ICON_BLANK185)
+DEF_ICON(ICON_BLANK186)
+DEF_ICON(ICON_BLANK187)
+DEF_ICON(ICON_BLANK188)
+DEF_ICON(ICON_BLANK189)
+DEF_ICON(ICON_BLANK190)
+DEF_ICON(ICON_BLANK191)
+DEF_ICON(ICON_BLANK192)
+DEF_ICON(ICON_BLANK193)
+DEF_ICON(ICON_BLANK194)
+DEF_ICON(ICON_BLANK195)
+DEF_ICON(ICON_BLANK196)
+DEF_ICON(ICON_BLANK197)
+DEF_ICON(ICON_BLANK198)
+DEF_ICON(ICON_BLANK199)
+DEF_ICON(ICON_BLANK200)
+DEF_ICON(ICON_BLANK201)
+DEF_ICON(ICON_BLANK202)
+DEF_ICON(ICON_BLANK203)
+DEF_ICON(ICON_BLANK204)
+DEF_ICON(ICON_BLANK205)
+DEF_ICON(ICON_BLANK206)
+DEF_ICON(ICON_BLANK207)
+DEF_ICON(ICON_BLANK208)
+DEF_ICON(ICON_BLANK208b)
+
+ /* EDITING */
+DEF_ICON(ICON_VERTEXSEL)
+DEF_ICON(ICON_EDGESEL)
+DEF_ICON(ICON_FACESEL)
+DEF_ICON(ICON_LINKEDSEL)
+DEF_ICON(ICON_BLANK210)
+DEF_ICON(ICON_ROTATE)
+DEF_ICON(ICON_CURSOR)
+DEF_ICON(ICON_ROTATECOLLECTION)
+DEF_ICON(ICON_ROTATECENTER)
+DEF_ICON(ICON_ROTACTIVE)
+DEF_ICON(ICON_ALIGN)
+DEF_ICON(ICON_BLANK211)
+DEF_ICON(ICON_SMOOTHCURVE)
+DEF_ICON(ICON_SPHERECURVE)
+DEF_ICON(ICON_ROOTCURVE)
+DEF_ICON(ICON_SHARPCURVE)
+DEF_ICON(ICON_LINCURVE)
+DEF_ICON(ICON_NOCURVE)
+DEF_ICON(ICON_RNDCURVE)
+DEF_ICON(ICON_PROP_OFF)
+DEF_ICON(ICON_PROP_ON)
+DEF_ICON(ICON_PROP_CON)
+DEF_ICON(ICON_BLANK212)
+DEF_ICON(ICON_BLANK213)
+DEF_ICON(ICON_BLANK214)
+DEF_ICON(ICON_BLANK214b)
+
+ /* EDITING */
+DEF_ICON(ICON_MAN_TRANS)
+DEF_ICON(ICON_MAN_ROT)
+DEF_ICON(ICON_MAN_SCALE)
+DEF_ICON(ICON_MANIPUL)
+DEF_ICON(ICON_BLANK215)
+DEF_ICON(ICON_SNAP_GEAR)
+DEF_ICON(ICON_SNAP_GEO)
+DEF_ICON(ICON_SNAP_NORMAL)
+DEF_ICON(ICON_SNAP_VERTEX)
+DEF_ICON(ICON_SNAP_EDGE)
+DEF_ICON(ICON_SNAP_FACE)
+DEF_ICON(ICON_SNAP_VOLUME)
+DEF_ICON(ICON_UVS_FACE)
+DEF_ICON(ICON_STICKY_UVS_LOC)
+DEF_ICON(ICON_STICKY_UVS_DISABLE)
+DEF_ICON(ICON_STICKY_UVS_VERT)
+DEF_ICON(ICON_CLIPUV_DEHLT)
+DEF_ICON(ICON_CLIPUV_HLT)
+DEF_ICON(ICON_SNAP_PEEL_OBJECT)
+DEF_ICON(ICON_BLANK221)
+DEF_ICON(ICON_GRID)
+DEF_ICON(ICON_GEARS)
+DEF_ICON(ICON_BLANK224)
+DEF_ICON(ICON_BLANK225)
+DEF_ICON(ICON_BLANK226)
+DEF_ICON(ICON_BLANK226b)
+
+ /* EDITING */
+DEF_ICON(ICON_PASTEDOWN)
+DEF_ICON(ICON_COPYDOWN)
+DEF_ICON(ICON_PASTEFLIPUP)
+DEF_ICON(ICON_PASTEFLIPDOWN)
+DEF_ICON(ICON_BLANK227)
+DEF_ICON(ICON_BLANK228)
+DEF_ICON(ICON_BLANK229)
+DEF_ICON(ICON_BLANK230)
+DEF_ICON(ICON_BLANK231)
+DEF_ICON(ICON_BLANK232)
+DEF_ICON(ICON_BLANK233)
+DEF_ICON(ICON_BLANK234)
+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)
+DEF_ICON(ICON_BLANK242)
+DEF_ICON(ICON_BLANK243)
+DEF_ICON(ICON_BLANK244)
+DEF_ICON(ICON_BLANK245)
+DEF_ICON(ICON_BLANK246)
+DEF_ICON(ICON_BLANK247)
+DEF_ICON(ICON_BLANK247b)
+
+ /* 3D VIEW */
+DEF_ICON(ICON_BBOX)
+DEF_ICON(ICON_WIRE)
+DEF_ICON(ICON_SOLID)
+DEF_ICON(ICON_SMOOTH)
+DEF_ICON(ICON_POTATO)
+DEF_ICON(ICON_BLANK248)
+DEF_ICON(ICON_ORTHO)
+DEF_ICON(ICON_BLANK249)
+DEF_ICON(ICON_CAMERA)
+DEF_ICON(ICON_LOCKVIEW_OFF)
+DEF_ICON(ICON_LOCKVIEW_ON)
+DEF_ICON(ICON_BLANK250)
+DEF_ICON(ICON_AXIS_SIDE)
+DEF_ICON(ICON_AXIS_FRONT)
+DEF_ICON(ICON_AXIS_TOP)
+DEF_ICON(ICON_NDOF_DOM)
+DEF_ICON(ICON_NDOF_TURN)
+DEF_ICON(ICON_NDOF_FLY)
+DEF_ICON(ICON_NDOF_TRANS)
+DEF_ICON(ICON_LAYER_USED)
+DEF_ICON(ICON_LAYER_ACTIVE)
+DEF_ICON(ICON_BLANK254)
+DEF_ICON(ICON_BLANK255)
+DEF_ICON(ICON_BLANK256)
+DEF_ICON(ICON_BLANK257)
+DEF_ICON(ICON_BLANK257b)
+
+ /* available */
+DEF_ICON(ICON_BLANK258)
+DEF_ICON(ICON_BLANK259)
+DEF_ICON(ICON_BLANK260)
+DEF_ICON(ICON_BLANK261)
+DEF_ICON(ICON_BLANK262)
+DEF_ICON(ICON_BLANK263)
+DEF_ICON(ICON_BLANK264)
+DEF_ICON(ICON_BLANK265)
+DEF_ICON(ICON_BLANK266)
+DEF_ICON(ICON_BLANK267)
+DEF_ICON(ICON_BLANK268)
+DEF_ICON(ICON_BLANK269)
+DEF_ICON(ICON_BLANK270)
+DEF_ICON(ICON_BLANK271)
+DEF_ICON(ICON_BLANK272)
+DEF_ICON(ICON_BLANK273)
+DEF_ICON(ICON_BLANK274)
+DEF_ICON(ICON_BLANK275)
+DEF_ICON(ICON_BLANK276)
+DEF_ICON(ICON_BLANK277)
+DEF_ICON(ICON_BLANK278)
+DEF_ICON(ICON_BLANK279)
+DEF_ICON(ICON_BLANK280)
+DEF_ICON(ICON_BLANK281)
+DEF_ICON(ICON_BLANK282)
+DEF_ICON(ICON_BLANK282b)
+
+ /* FILE SELECT */
+DEF_ICON(ICON_SORTALPHA)
+DEF_ICON(ICON_SORTBYEXT)
+DEF_ICON(ICON_SORTTIME)
+DEF_ICON(ICON_SORTSIZE)
+DEF_ICON(ICON_LONGDISPLAY)
+DEF_ICON(ICON_SHORTDISPLAY)
+DEF_ICON(ICON_GHOST)
+DEF_ICON(ICON_IMGDISPLAY)
+DEF_ICON(ICON_BLANK284)
+DEF_ICON(ICON_BLANK285)
+DEF_ICON(ICON_BOOKMARKS)
+DEF_ICON(ICON_FONTPREVIEW)
+DEF_ICON(ICON_FILTER)
+DEF_ICON(ICON_NEWFOLDER)
+DEF_ICON(ICON_BLANK285F)
+DEF_ICON(ICON_FILE_PARENT)
+DEF_ICON(ICON_FILE_REFRESH)
+DEF_ICON(ICON_FILE_FOLDER)
+DEF_ICON(ICON_FILE_BLANK)
+DEF_ICON(ICON_FILE_BLEND)
+DEF_ICON(ICON_FILE_IMAGE)
+DEF_ICON(ICON_FILE_MOVIE)
+DEF_ICON(ICON_FILE_SCRIPT)
+DEF_ICON(ICON_FILE_SOUND)
+DEF_ICON(ICON_FILE_FONT)
+DEF_ICON(ICON_BLANK291b)
+
+ /* available */
+DEF_ICON(ICON_BLANK292)
+DEF_ICON(ICON_BLANK293)
+DEF_ICON(ICON_BLANK294)
+DEF_ICON(ICON_BLANK295)
+DEF_ICON(ICON_BLANK296)
+DEF_ICON(ICON_BLANK297)
+DEF_ICON(ICON_BLANK298)
+DEF_ICON(ICON_BLANK299)
+DEF_ICON(ICON_BLANK300)
+DEF_ICON(ICON_BLANK301)
+DEF_ICON(ICON_BLANK302)
+DEF_ICON(ICON_BLANK303)
+DEF_ICON(ICON_BLANK304)
+DEF_ICON(ICON_BLANK305)
+DEF_ICON(ICON_BLANK306)
+DEF_ICON(ICON_BLANK307)
+DEF_ICON(ICON_BLANK308)
+DEF_ICON(ICON_BLANK309)
+DEF_ICON(ICON_BLANK310)
+DEF_ICON(ICON_BLANK311)
+DEF_ICON(ICON_BLANK312)
+DEF_ICON(ICON_BLANK313)
+DEF_ICON(ICON_BLANK314)
+DEF_ICON(ICON_BLANK315)
+DEF_ICON(ICON_BLANK316)
+DEF_ICON(ICON_DISK_DRIVE)
+
+ /* SHADING / TEXT */
+DEF_ICON(ICON_MATPLANE)
+DEF_ICON(ICON_MATSPHERE)
+DEF_ICON(ICON_MATCUBE)
+DEF_ICON(ICON_MONKEY)
+DEF_ICON(ICON_HAIR)
+DEF_ICON(ICON_RING)
+DEF_ICON(ICON_BLANK317)
+DEF_ICON(ICON_BLANK318)
+DEF_ICON(ICON_BLANK319)
+DEF_ICON(ICON_BLANK320)
+DEF_ICON(ICON_BLANK321)
+DEF_ICON(ICON_BLANK322)
+DEF_ICON(ICON_WORDWRAP_OFF)
+DEF_ICON(ICON_WORDWRAP_ON)
+DEF_ICON(ICON_SYNTAX_OFF)
+DEF_ICON(ICON_SYNTAX_ON)
+DEF_ICON(ICON_LINENUMBERS_OFF)
+DEF_ICON(ICON_LINENUMBERS_ON)
+DEF_ICON(ICON_SCRIPTPLUGINS) // XXX CREATE NEW
+DEF_ICON(ICON_BLANK323)
+DEF_ICON(ICON_BLANK324)
+DEF_ICON(ICON_BLANK325)
+DEF_ICON(ICON_BLANK326)
+DEF_ICON(ICON_BLANK327)
+DEF_ICON(ICON_BLANK328)
+DEF_ICON(ICON_BLANK328b)
+
+ /* SEQUENCE / IMAGE EDITOR */
+DEF_ICON(ICON_SEQ_SEQUENCER)
+DEF_ICON(ICON_SEQ_PREVIEW)
+DEF_ICON(ICON_SEQ_LUMA_WAVEFORM)
+DEF_ICON(ICON_SEQ_CHROMA_SCOPE)
+DEF_ICON(ICON_SEQ_HISTOGRAM)
+DEF_ICON(ICON_BLANK330)
+DEF_ICON(ICON_BLANK331)
+DEF_ICON(ICON_BLANK332)
+DEF_ICON(ICON_BLANK333)
+DEF_ICON(ICON_IMAGE_RGB) // XXX CHANGE TO STRAIGHT ALPHA, Z ETC
+DEF_ICON(ICON_IMAGE_RGB_ALPHA)
+DEF_ICON(ICON_IMAGE_ALPHA)
+DEF_ICON(ICON_IMAGE_ZDEPTH)
+DEF_ICON(ICON_IMAGEFILE)
+DEF_ICON(ICON_BLANK336)
+DEF_ICON(ICON_BLANK337)
+DEF_ICON(ICON_BLANK338)
+DEF_ICON(ICON_BLANK339)
+DEF_ICON(ICON_BLANK340)
+DEF_ICON(ICON_BLANK341)
+DEF_ICON(ICON_BLANK342)
+DEF_ICON(ICON_BLANK343)
+DEF_ICON(ICON_BLANK344)
+DEF_ICON(ICON_BLANK345)
+DEF_ICON(ICON_BLANK346)
+DEF_ICON(ICON_BLANK346b)
+
+ /* vector icons */
+
+DEF_ICON(VICON_VIEW3D)
+DEF_ICON(VICON_EDIT)
+DEF_ICON(VICON_EDITMODE_DEHLT)
+DEF_ICON(VICON_EDITMODE_HLT)
+DEF_ICON(VICON_DISCLOSURE_TRI_RIGHT)
+DEF_ICON(VICON_DISCLOSURE_TRI_DOWN)
+DEF_ICON(VICON_MOVE_UP)
+DEF_ICON(VICON_MOVE_DOWN)
+DEF_ICON(VICON_X)
+DEF_ICON(VICON_SMALL_TRI_RIGHT)
+
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 0604a5e27e1..66089272737 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -51,8 +51,12 @@ struct rcti;
struct rctf;
struct uiStyle;
struct uiFontStyle;
+struct uiWidgetColors;
struct ColorBand;
struct CurveMapping;
+struct Image;
+struct ImageUser;
+struct uiWidgetColors;
typedef struct uiBut uiBut;
typedef struct uiBlock uiBlock;
@@ -91,11 +95,13 @@ typedef struct uiLayout uiLayout;
#define UI_BLOCK_MOVEMOUSE_QUIT 128
#define UI_BLOCK_KEEP_OPEN 256
#define UI_BLOCK_POPUP 512
+#define UI_BLOCK_OUT_1 1024
/* uiPopupBlockHandle->menuretval */
#define UI_RETURN_CANCEL 1 /* cancel all menus cascading */
#define UI_RETURN_OK 2 /* choice made */
#define UI_RETURN_OUT 4 /* left the menu */
+#define UI_RETURN_UPDATE 8 /* update the button that opened */
/* block->flag bits 12-15 are identical to but->flag bits */
@@ -194,6 +200,7 @@ typedef struct uiLayout uiLayout;
#define OPTIONN (39<<9)
#define SEARCH_MENU (40<<9)
#define BUT_EXTRA (41<<9)
+#define HSVCIRCLE (42<<9)
#define BUTTYPE (63<<9)
/* Drawing
@@ -209,6 +216,11 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad);
void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, short direction);
void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy);
+/* state for scrolldrawing */
+#define UI_SCROLL_PRESSED 1
+#define UI_SCROLL_ARROWS 2
+void uiWidgetScrollDraw(struct uiWidgetColors *wcol, struct rcti *rect, struct rcti *slider, int state);
+
/* Menu Callbacks */
typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1);
@@ -412,7 +424,7 @@ void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *
void uiBlockColorbandButtons(struct uiBlock *block, struct ColorBand *coba, struct rctf *butr, int event);
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2);
-void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr);
+void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr, int columns);
/* Links
*
@@ -449,9 +461,9 @@ typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, char *str,
typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
/* use inside searchfunc to add items */
-int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin);
+int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid);
/* bfunc gets search item *poin as arg2, or if NULL the old string */
-void uiButSetSearchFunc (uiBut *but, uiButSearchFunc sfunc, void *arg1, uiButHandleFunc bfunc);
+void uiButSetSearchFunc (uiBut *but, uiButSearchFunc sfunc, void *arg1, uiButHandleFunc bfunc, void *active);
/* height in pixels, it's using hardcoded values still */
int uiSearchBoxhHeight(void);
@@ -488,7 +500,7 @@ void autocomplete_end(AutoComplete *autocpl, char *autoname);
void uiBeginPanels(const struct bContext *C, struct ARegion *ar);
void uiEndPanels(const struct bContext *C, struct ARegion *ar);
-struct Panel *uiBeginPanel(struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open);
+struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open);
void uiEndPanel(uiBlock *block, int width, int height);
/* Handlers
@@ -532,13 +544,6 @@ void UI_init(void);
void UI_init_userdef(void);
void UI_exit(void);
-/* XXX hide this */
-
-uiBut *uiDefMenuButO(uiBlock *block, char *opname, char *name);
-uiBut *uiDefMenuSep(uiBlock *block);
-uiBut *uiDefMenuSub(uiBlock *block, uiBlockCreateFunc func, char *name);
-uiBut *uiDefMenuTogR(uiBlock *block, struct PointerRNA *ptr, char *propname, char *propvalue, char *name);
-
/* Layout
*
* More automated layout of buttons. Has three levels:
@@ -606,12 +611,18 @@ uiBlock *uiLayoutFreeBlock(uiLayout *layout);
/* templates */
void uiTemplateHeader(uiLayout *layout, struct bContext *C);
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);
void uiTemplateColorRamp(uiLayout *layout, struct ColorBand *coba, int expand);
void uiTemplateCurveMapping(uiLayout *layout, struct CurveMapping *cumap, int type);
+void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname);
+void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
+ListBase uiTemplateList(uiLayout *layout, struct PointerRNA *ptr, char *propname, struct PointerRNA *activeptr, char *activeprop, int rows, int columns, int compact);
+void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
+void uiTemplateOperatorSearch(uiLayout *layout);
+void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
/* items */
void uiItemO(uiLayout *layout, char *name, int icon, char *opname);
@@ -627,7 +638,9 @@ void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, struct ID
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);
+void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname);
void uiItemL(uiLayout *layout, char *name, int icon); /* label */
void uiItemM(uiLayout *layout, struct bContext *C, char *name, int icon, char *menuname); /* menu */
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 6fa0eb90c5f..1ae3634c73b 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -1,5 +1,5 @@
/**
- * $Id: UI_resources.h 13057 2007-12-30 12:08:28Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -35,864 +35,16 @@
/* elubie: TODO: move the typedef for icons to UI_interface_icons.h */
/* and add/replace include of UI_resources.h by UI_interface_icons.h */
+#define DEF_ICON(name) name,
typedef enum {
#define BIFICONID_FIRST (ICON_BLENDER)
/* ui */
- ICON_BLENDER,
- ICON_QUESTION,
- ICON_ERROR,
- ICON_BLANK1, // XXX this is used lots, it's not actually 'blank'
- ICON_TRIA_RIGHT,
- ICON_TRIA_DOWN,
- ICON_TRIA_LEFT,
- ICON_TRIA_UP,
- ICON_ARROW_LEFTRIGHT,
- ICON_PLUS,
- ICON_DISCLOSURE_TRI_DOWN,
- ICON_DISCLOSURE_TRI_RIGHT,
- ICON_RADIOBUT_OFF,
- ICON_RADIOBUT_ON,
- ICON_MENU_PANEL,
- ICON_PYTHON,
- ICON_BLANK003,
- ICON_DOT,
- ICON_BLANK004,
- ICON_X,
- ICON_BLANK005,
- ICON_GO_LEFT,
- ICON_BLANK006,
- ICON_BLANK007,
- ICON_BLANK008,
- ICON_BLANK008b,
-
- /* ui */
- ICON_FULLSCREEN,
- ICON_SPLITSCREEN,
- ICON_RIGHTARROW_THIN,
- ICON_BORDERMOVE,
- ICON_VIEWZOOM,
- ICON_ZOOMIN,
- ICON_ZOOMOUT,
- ICON_PANEL_CLOSE,
- ICON_BLANK009,
- ICON_EYEDROPPER,
- ICON_BLANK010,
- ICON_AUTO,
- ICON_CHECKBOX_DEHLT,
- ICON_CHECKBOX_HLT,
- ICON_UNLOCKED,
- ICON_LOCKED,
- ICON_PINNED,
- ICON_UNPINNED,
- ICON_BLANK015,
- ICON_RIGHTARROW,
- ICON_DOWNARROW_HLT,
- ICON_DOTSUP,
- ICON_DOTSDOWN,
- ICON_LINK,
- ICON_INLINK,
- ICON_BLANK012b,
-
- /* various ui */
- ICON_HELP,
- ICON_GHOSTDRAW,
- ICON_COLOR,
- ICON_LINKED,
- ICON_UNLINKED,
- ICON_HAND,
- ICON_ZOOM_ALL,
- ICON_ZOOM_SELECTED,
- ICON_ZOOM_PREVIOUS,
- ICON_ZOOM_IN,
- ICON_ZOOM_OUT,
- ICON_RENDER_REGION,
- ICON_BORDER_RECT,
- ICON_BORDER_LASSO,
- ICON_FREEZE,
- ICON_BLANK031,
- ICON_BLANK032,
- ICON_BLANK033,
- ICON_BLANK034,
- ICON_BLANK035,
- ICON_BLANK036,
- ICON_BLANK037,
- ICON_BLANK038,
- ICON_BLANK039,
- ICON_BLANK040,
- ICON_BLANK040b,
-
- /* BUTTONS */
- ICON_LAMP,
- ICON_MATERIAL,
- ICON_TEXTURE,
- ICON_ANIM,
- ICON_WORLD,
- ICON_SCENE,
- ICON_EDIT,
- ICON_GAME,
- ICON_RADIO,
- ICON_SCRIPT,
- ICON_PARTICLES,
- ICON_PHYSICS,
- ICON_SPEAKER,
- ICON_BLANK041,
- ICON_BLANK042,
- ICON_BLANK043,
- ICON_BLANK044,
- ICON_BLANK045,
- ICON_BLANK046,
- ICON_BLANK047,
- ICON_BLANK048,
- ICON_BLANK049,
- ICON_BLANK050,
- ICON_BLANK051,
- ICON_BLANK052,
- ICON_BLANK052b,
-
- /* EDITORS */
- ICON_VIEW3D,
- ICON_IPO,
- ICON_OOPS,
- ICON_BUTS,
- ICON_FILESEL,
- ICON_IMAGE_COL,
- ICON_INFO,
- ICON_SEQUENCE,
- ICON_TEXT,
- ICON_IMASEL,
- ICON_SOUND,
- ICON_ACTION,
- ICON_NLA,
- ICON_SCRIPTWIN,
- ICON_TIME,
- ICON_NODE,
- ICON_BLANK053,
- ICON_BLANK054,
- ICON_BLANK055,
- ICON_BLANK056,
- ICON_BLANK057,
- ICON_BLANK058,
- ICON_BLANK059,
- ICON_BLANK060,
- ICON_BLANK061,
- ICON_BLANK061b,
-
- /* MODES */
- ICON_OBJECT_DATAMODE, // XXX fix this up
- ICON_EDITMODE_HLT,
- ICON_FACESEL_HLT,
- ICON_VPAINT_HLT,
- ICON_TPAINT_HLT,
- ICON_WPAINT_HLT,
- ICON_SCULPTMODE_HLT,
- ICON_POSE_HLT,
- ICON_PARTICLEMODE,
- ICON_BLANK062,
- ICON_BLANK063,
- ICON_BLANK064,
- ICON_BLANK065,
- ICON_BLANK066,
- ICON_BLANK067,
- ICON_BLANK068,
- ICON_BLANK069,
- ICON_BLANK070,
- ICON_BLANK071,
- ICON_BLANK072,
- ICON_BLANK073,
- ICON_BLANK074,
- ICON_BLANK075,
- ICON_BLANK076,
- ICON_BLANK077,
- ICON_BLANK077b,
-
- /* DATA */
- ICON_SCENE_DATA,
- ICON_RENDERLAYERS,
- ICON_WORLD_DATA,
- ICON_OBJECT_DATA,
- ICON_MESH_DATA,
- ICON_CURVE_DATA,
- ICON_META_DATA,
- ICON_LATTICE_DATA,
- ICON_LAMP_DATA,
- ICON_MATERIAL_DATA,
- ICON_TEXTURE_DATA,
- ICON_ANIM_DATA,
- ICON_CAMERA_DATA,
- ICON_PARTICLE_DATA,
- ICON_LIBRARY_DATA_DIRECT,
- ICON_GROUP,
- ICON_ARMATURE_DATA,
- ICON_POSE_DATA,
- ICON_BONE_DATA,
- ICON_CONSTRAINT,
- ICON_SHAPEKEY_DATA,
- ICON_BLANK079a,
- ICON_BLANK079,
- ICON_PACKAGE,
- ICON_UGLYPACKAGE,
- ICON_BLANK079b,
-
- /* DATA */
- ICON_BRUSH_DATA,
- ICON_IMAGE_DATA,
- ICON_FILE,
- ICON_FCURVE,
- ICON_FONT_DATA,
- ICON_RENDER_RESULT,
- ICON_SURFACE_DATA,
- ICON_EMPTY_DATA,
- ICON_SETTINGS,
- ICON_BLANK080D,
- ICON_BLANK080E,
- ICON_BLANK080F,
- ICON_BLANK080,
- ICON_STRANDS,
- ICON_LIBRARY_DATA_INDIRECT,
- ICON_BLANK082,
- ICON_BLANK083,
- ICON_BLANK084,
- ICON_GROUP_BONE,
- ICON_GROUP_VERTEX,
- ICON_GROUP_VCOL,
- ICON_GROUP_UVS,
- ICON_BLANK089,
- ICON_BLANK090,
- ICON_RNA,
- ICON_BLANK090b,
-
- /* available */
- ICON_BLANK092,
- ICON_BLANK093,
- ICON_BLANK094,
- ICON_BLANK095,
- ICON_BLANK096,
- ICON_BLANK097,
- ICON_BLANK098,
- ICON_BLANK099,
- ICON_BLANK100,
- ICON_BLANK101,
- ICON_BLANK102,
- ICON_BLANK103,
- ICON_BLANK104,
- ICON_BLANK105,
- ICON_BLANK106,
- ICON_BLANK107,
- ICON_BLANK108,
- ICON_BLANK109,
- ICON_BLANK110,
- ICON_BLANK111,
- ICON_BLANK112,
- ICON_BLANK113,
- ICON_BLANK114,
- ICON_BLANK115,
- ICON_BLANK116,
- ICON_BLANK116b,
-
- /* OUTLINER */
- ICON_OUTLINER_OB_EMPTY,
- ICON_OUTLINER_OB_MESH,
- ICON_OUTLINER_OB_CURVE,
- ICON_OUTLINER_OB_LATTICE,
- ICON_OUTLINER_OB_META,
- ICON_OUTLINER_OB_LAMP,
- ICON_OUTLINER_OB_CAMERA,
- ICON_OUTLINER_OB_ARMATURE,
- ICON_OUTLINER_OB_FONT,
- ICON_OUTLINER_OB_SURFACE,
- ICON_BLANK119,
- ICON_BLANK120,
- ICON_BLANK121,
- ICON_BLANK122,
- ICON_BLANK123,
- ICON_BLANK124,
- ICON_BLANK125,
- ICON_BLANK126,
- ICON_BLANK127,
- ICON_RESTRICT_VIEW_OFF,
- ICON_RESTRICT_VIEW_ON,
- ICON_RESTRICT_SELECT_OFF,
- ICON_RESTRICT_SELECT_ON,
- ICON_RESTRICT_RENDER_OFF,
- ICON_RESTRICT_RENDER_ON,
- ICON_BLANK127b,
-
- /* OUTLINER */
- ICON_OUTLINER_DATA_EMPTY,
- ICON_OUTLINER_DATA_MESH,
- ICON_OUTLINER_DATA_CURVE,
- ICON_OUTLINER_DATA_LATTICE,
- ICON_OUTLINER_DATA_META,
- ICON_OUTLINER_DATA_LAMP,
- ICON_OUTLINER_DATA_CAMERA,
- ICON_OUTLINER_DATA_ARMATURE,
- ICON_OUTLINER_DATA_FONT,
- ICON_OUTLINER_DATA_SURFACE,
- ICON_OUTLINER_DATA_POSE,
- ICON_BLANK129,
- ICON_BLANK130,
- ICON_BLANK131,
- ICON_BLANK132,
- ICON_BLANK133,
- ICON_BLANK134,
- ICON_BLANK135,
- ICON_BLANK136,
- ICON_BLANK137,
- ICON_BLANK138,
- ICON_BLANK139,
- ICON_BLANK140,
- ICON_BLANK141,
- ICON_BLANK142,
- ICON_BLANK142b,
-
- /* PRIMITIVES */
- ICON_MESH_PLANE,
- ICON_MESH_CUBE,
- ICON_MESH_CIRCLE,
- ICON_MESH_UVSPHERE,
- ICON_MESH_ICOSPHERE,
- ICON_MESH_GRID,
- ICON_MESH_MONKEY,
- ICON_MESH_TUBE,
- ICON_MESH_DONUT,
- ICON_MESH_CONE,
- ICON_BLANK610,
- ICON_BLANK611,
- ICON_LAMP_POINT,
- ICON_LAMP_SUN,
- ICON_LAMP_SPOT,
- ICON_LAMP_HEMI,
- ICON_LAMP_AREA,
- ICON_BLANK617,
- ICON_BLANK618,
- ICON_BLANK619,
- ICON_META_PLANE,
- ICON_META_CUBE,
- ICON_META_BALL,
- ICON_META_ELLIPSOID,
- ICON_META_TUBE,
- ICON_BLANK625,
-
- /* PRIMITIVES */
- ICON_SURFACE_NCURVE,
- ICON_SURFACE_NCIRCLE,
- ICON_SURFACE_NSURFACE,
- ICON_SURFACE_NTUBE,
- ICON_SURFACE_NSPHERE,
- ICON_SURFACE_NDONUT,
- ICON_BLANK636,
- ICON_BLANK637,
- ICON_BLANK638,
- ICON_CURVE_BEZCURVE,
- ICON_CURVE_BEZCIRCLE,
- ICON_CURVE_NCURVE,
- ICON_CURVE_NCIRCLE,
- ICON_CURVE_PATH,
- ICON_BLANK644,
- ICON_BLANK645,
- ICON_BLANK646,
- ICON_BLANK647,
- ICON_BLANK648,
- ICON_BLANK649,
- ICON_BLANK650,
- ICON_BLANK651,
- ICON_BLANK652,
- ICON_BLANK653,
- ICON_BLANK654,
- ICON_BLANK655,
-
- /* EMPTY */
- ICON_BLANK660,
- ICON_BLANK661,
- ICON_BLANK662,
- ICON_BLANK663,
- ICON_BLANK664,
- ICON_BLANK665,
- ICON_BLANK666,
- ICON_BLANK667,
- ICON_BLANK668,
- ICON_BLANK669,
- ICON_BLANK670,
- ICON_BLANK671,
- ICON_BLANK672,
- ICON_BLANK673,
- ICON_BLANK674,
- ICON_BLANK675,
- ICON_BLANK676,
- ICON_BLANK677,
- ICON_BLANK678,
- ICON_BLANK679,
- ICON_BLANK680,
- ICON_BLANK681,
- ICON_BLANK682,
- ICON_BLANK683,
- ICON_BLANK684,
- ICON_BLANK685,
-
- /* EMPTY */
- ICON_BLANK690,
- ICON_BLANK691,
- ICON_BLANK692,
- ICON_BLANK693,
- ICON_BLANK694,
- ICON_BLANK695,
- ICON_BLANK696,
- ICON_BLANK697,
- ICON_BLANK698,
- ICON_BLANK699,
- ICON_BLANK700,
- ICON_BLANK701,
- ICON_BLANK702,
- ICON_BLANK703,
- ICON_BLANK704,
- ICON_BLANK705,
- ICON_BLANK706,
- ICON_BLANK707,
- ICON_BLANK708,
- ICON_BLANK709,
- ICON_BLANK710,
- ICON_BLANK711,
- ICON_BLANK712,
- ICON_BLANK713,
- ICON_BLANK714,
- ICON_BLANK715,
-
- /* EMPTY */
- ICON_BLANK720,
- ICON_BLANK721,
- ICON_BLANK722,
- ICON_BLANK733,
- ICON_BLANK734,
- ICON_BLANK735,
- ICON_BLANK736,
- ICON_BLANK737,
- ICON_BLANK738,
- ICON_BLANK739,
- ICON_BLANK740,
- ICON_BLANK741,
- ICON_BLANK742,
- ICON_BLANK743,
- ICON_BLANK744,
- ICON_BLANK745,
- ICON_BLANK746,
- ICON_BLANK747,
- ICON_BLANK748,
- ICON_BLANK749,
- ICON_BLANK750,
- ICON_BLANK751,
- ICON_BLANK752,
- ICON_BLANK753,
- ICON_BLANK754,
- ICON_BLANK755,
-
- /* EMPTY */
- ICON_BLANK760,
- ICON_BLANK761,
- ICON_BLANK762,
- ICON_BLANK763,
- ICON_BLANK764,
- ICON_BLANK765,
- ICON_BLANK766,
- ICON_BLANK767,
- ICON_BLANK768,
- ICON_BLANK769,
- ICON_BLANK770,
- ICON_BLANK771,
- ICON_BLANK772,
- ICON_BLANK773,
- ICON_BLANK774,
- ICON_BLANK775,
- ICON_BLANK776,
- ICON_BLANK777,
- ICON_BLANK778,
- ICON_BLANK779,
- ICON_BLANK780,
- ICON_BLANK781,
- ICON_BLANK782,
- ICON_BLANK783,
- ICON_BLANK784,
- ICON_BLANK785,
-
- /* MODIFIERS */
- ICON_MODIFIER,
- ICON_MOD_WAVE,
- ICON_MOD_BUILD,
- ICON_MOD_DECIM,
- ICON_MOD_MIRROR,
- ICON_MOD_SOFT,
- ICON_MOD_SUBSURF,
- ICON_HOOK,
- ICON_MOD_PHYSICS,
- ICON_MOD_PARTICLES,
- ICON_MOD_BOOLEAN,
- ICON_MOD_EDGESPLIT,
- ICON_MOD_ARRAY,
- ICON_MOD_UVPROJECT,
- ICON_MOD_DISPLACE,
- ICON_MOD_CURVE,
- ICON_MOD_LATTICE,
- ICON_BLANK143,
- ICON_MOD_ARMATURE,
- ICON_MOD_SHRINKWRAP,
- ICON_MOD_CAST,
- ICON_MOD_MESHDEFORM,
- ICON_MOD_BEVEL,
- ICON_MOD_SMOOTH,
- ICON_MOD_SIMPLEDEFORM,
- ICON_MOD_MASK,
-
- /* MODIFIERS */
- ICON_MOD_CLOTH,
- ICON_MOD_EXPLODE,
- ICON_MOD_FLUIDSIM,
- ICON_MOD_MULTIRES,
- ICON_BLANK157,
- ICON_BLANK158,
- ICON_BLANK159,
- ICON_BLANK160,
- ICON_BLANK161,
- ICON_BLANK162,
- ICON_BLANK163,
- ICON_BLANK164,
- ICON_BLANK165,
- ICON_BLANK166,
- ICON_BLANK167,
- ICON_BLANK168,
- ICON_BLANK169,
- ICON_BLANK170,
- ICON_BLANK171,
- ICON_BLANK172,
- ICON_BLANK173,
- ICON_BLANK174,
- ICON_BLANK175,
- ICON_BLANK176,
- ICON_BLANK177,
- ICON_BLANK177b,
-
- /* ANIMATION */
- ICON_REC,
- ICON_PLAY,
- ICON_FF,
- ICON_REW,
- ICON_PAUSE,
- ICON_PREV_KEYFRAME,
- ICON_NEXT_KEYFRAME,
- ICON_PLAY_AUDIO,
- ICON_BLANK178,
- ICON_BLANK179,
- ICON_BLANK180,
- ICON_PMARKER_ACT,
- ICON_PMARKER_SEL,
- ICON_PMARKER,
- ICON_MARKER_HLT,
- ICON_MARKER,
- ICON_SPACE2, // XXX
- ICON_SPACE3, // XXX
- ICON_BLANK181,
- ICON_KEY_DEHLT,
- ICON_KEY_HLT,
- ICON_MUTE_IPO_OFF,
- ICON_MUTE_IPO_ON,
- ICON_BLANK182,
- ICON_BLANK183,
- ICON_BLANK183b,
-
- /* available */
- ICON_BLANK184,
- ICON_BLANK185,
- ICON_BLANK186,
- ICON_BLANK187,
- ICON_BLANK188,
- ICON_BLANK189,
- ICON_BLANK190,
- ICON_BLANK191,
- ICON_BLANK192,
- ICON_BLANK193,
- ICON_BLANK194,
- ICON_BLANK195,
- ICON_BLANK196,
- ICON_BLANK197,
- ICON_BLANK198,
- ICON_BLANK199,
- ICON_BLANK200,
- ICON_BLANK201,
- ICON_BLANK202,
- ICON_BLANK203,
- ICON_BLANK204,
- ICON_BLANK205,
- ICON_BLANK206,
- ICON_BLANK207,
- ICON_BLANK208,
- ICON_BLANK208b,
-
- /* EDITING */
- ICON_VERTEXSEL,
- ICON_EDGESEL,
- ICON_FACESEL,
- ICON_LINKEDSEL,
- ICON_BLANK210,
- ICON_ROTATE,
- ICON_CURSOR,
- ICON_ROTATECOLLECTION,
- ICON_ROTATECENTER,
- ICON_ROTACTIVE,
- ICON_ALIGN,
- ICON_BLANK211,
- ICON_SMOOTHCURVE,
- ICON_SPHERECURVE,
- ICON_ROOTCURVE,
- ICON_SHARPCURVE,
- ICON_LINCURVE,
- ICON_NOCURVE,
- ICON_RNDCURVE,
- ICON_PROP_OFF,
- ICON_PROP_ON,
- ICON_PROP_CON,
- ICON_BLANK212,
- ICON_BLANK213,
- ICON_BLANK214,
- ICON_BLANK214b,
-
- /* EDITING */
- ICON_MAN_TRANS,
- ICON_MAN_ROT,
- ICON_MAN_SCALE,
- ICON_MANIPUL,
- ICON_BLANK215,
- ICON_SNAP_GEAR,
- ICON_SNAP_GEO,
- ICON_SNAP_NORMAL,
- ICON_SNAP_VERTEX,
- ICON_SNAP_EDGE,
- ICON_SNAP_FACE,
- ICON_SNAP_VOLUME,
- ICON_STICKY_UVS_LOC,
- ICON_STICKY_UVS_DISABLE,
- ICON_STICKY_UVS_VERT,
- ICON_CLIPUV_DEHLT,
- ICON_CLIPUV_HLT,
- ICON_BLANK219,
- ICON_SNAP_PEEL_OBJECT,
- ICON_BLANK221,
- ICON_GRID,
- ICON_GEARS,
- ICON_BLANK224,
- ICON_BLANK225,
- ICON_BLANK226,
- ICON_BLANK226b,
-
- /* EDITING */
- ICON_PASTEDOWN,
- ICON_COPYDOWN,
- ICON_PASTEFLIPUP,
- ICON_PASTEFLIPDOWN,
- ICON_BLANK227,
- ICON_BLANK228,
- ICON_BLANK229,
- ICON_BLANK230,
- ICON_BLANK231,
- ICON_BLANK232,
- ICON_BLANK233,
- ICON_BLANK234,
- ICON_BLANK235,
- ICON_BLANK236,
- ICON_BLANK237,
- ICON_BLANK238,
- ICON_BLANK239,
- ICON_BLANK240,
- ICON_BLANK241,
- ICON_BLANK242,
- ICON_BLANK243,
- ICON_BLANK244,
- ICON_BLANK245,
- ICON_BLANK246,
- ICON_BLANK247,
- ICON_BLANK247b,
-
- /* 3D VIEW */
- ICON_BBOX,
- ICON_WIRE,
- ICON_SOLID,
- ICON_SMOOTH,
- ICON_POTATO,
- ICON_BLANK248,
- ICON_ORTHO,
- ICON_BLANK249,
- ICON_CAMERA,
- ICON_LOCKVIEW_OFF,
- ICON_LOCKVIEW_ON,
- ICON_BLANK250,
- ICON_AXIS_SIDE,
- ICON_AXIS_FRONT,
- ICON_AXIS_TOP,
- ICON_NDOF_DOM,
- ICON_NDOF_TURN,
- ICON_NDOF_FLY,
- ICON_NDOF_TRANS,
- ICON_LAYER_USED,
- ICON_LAYER_ACTIVE,
- ICON_BLANK254,
- ICON_BLANK255,
- ICON_BLANK256,
- ICON_BLANK257,
- ICON_BLANK257b,
-
- /* available */
- ICON_BLANK258,
- ICON_BLANK259,
- ICON_BLANK260,
- ICON_BLANK261,
- ICON_BLANK262,
- ICON_BLANK263,
- ICON_BLANK264,
- ICON_BLANK265,
- ICON_BLANK266,
- ICON_BLANK267,
- ICON_BLANK268,
- ICON_BLANK269,
- ICON_BLANK270,
- ICON_BLANK271,
- ICON_BLANK272,
- ICON_BLANK273,
- ICON_BLANK274,
- ICON_BLANK275,
- ICON_BLANK276,
- ICON_BLANK277,
- ICON_BLANK278,
- ICON_BLANK279,
- ICON_BLANK280,
- ICON_BLANK281,
- ICON_BLANK282,
- ICON_BLANK282b,
-
- /* FILE SELECT */
- ICON_SORTALPHA,
- ICON_SORTBYEXT,
- ICON_SORTTIME,
- ICON_SORTSIZE,
- ICON_LONGDISPLAY,
- ICON_SHORTDISPLAY,
- ICON_GHOST,
- ICON_IMGDISPLAY,
- ICON_BLANK284,
- ICON_BLANK285,
- ICON_BOOKMARKS,
- ICON_FONTPREVIEW,
- ICON_FILTER,
- ICON_NEWFOLDER,
- ICON_BLANK285F,
- ICON_FILE_PARENT,
- ICON_FILE_REFRESH,
- ICON_FILE_FOLDER,
- ICON_FILE_BLANK,
- ICON_FILE_BLEND,
- ICON_FILE_IMAGE,
- ICON_FILE_MOVIE,
- ICON_FILE_SCRIPT,
- ICON_FILE_SOUND,
- ICON_FILE_FONT,
- ICON_BLANK291b,
-
- /* available */
- ICON_BLANK292,
- ICON_BLANK293,
- ICON_BLANK294,
- ICON_BLANK295,
- ICON_BLANK296,
- ICON_BLANK297,
- ICON_BLANK298,
- ICON_BLANK299,
- ICON_BLANK300,
- ICON_BLANK301,
- ICON_BLANK302,
- ICON_BLANK303,
- ICON_BLANK304,
- ICON_BLANK305,
- ICON_BLANK306,
- ICON_BLANK307,
- ICON_BLANK308,
- ICON_BLANK309,
- ICON_BLANK310,
- ICON_BLANK311,
- ICON_BLANK312,
- ICON_BLANK313,
- ICON_BLANK314,
- ICON_BLANK315,
- ICON_BLANK316,
- ICON_DISK_DRIVE,
-
- /* SHADING / TEXT */
- ICON_MATPLANE,
- ICON_MATSPHERE,
- ICON_MATCUBE,
- ICON_MONKEY,
- ICON_HAIR,
- ICON_RING,
- ICON_BLANK317,
- ICON_BLANK318,
- ICON_BLANK319,
- ICON_BLANK320,
- ICON_BLANK321,
- ICON_BLANK322,
- ICON_WORDWRAP_OFF,
- ICON_WORDWRAP_ON,
- ICON_SYNTAX_OFF,
- ICON_SYNTAX_ON,
- ICON_LINENUMBERS_OFF,
- ICON_LINENUMBERS_ON,
- ICON_SCRIPTPLUGINS, // XXX CREATE NEW
- ICON_BLANK323,
- ICON_BLANK324,
- ICON_BLANK325,
- ICON_BLANK326,
- ICON_BLANK327,
- ICON_BLANK328,
- ICON_BLANK328b,
-
- /* SEQUENCE / IMAGE EDITOR */
- ICON_SEQ_SEQUENCER,
- ICON_SEQ_PREVIEW,
- ICON_SEQ_LUMA_WAVEFORM,
- ICON_SEQ_CHROMA_SCOPE,
- ICON_SEQ_HISTOGRAM,
- ICON_BLANK330,
- ICON_BLANK331,
- ICON_BLANK332,
- ICON_BLANK333,
- ICON_IMAGE_RGB, // XXX CHANGE TO STRAIGHT ALPHA, Z ETC
- ICON_IMAGE_RGB_ALPHA,
- ICON_IMAGE_ALPHA,
- ICON_IMAGE_ZDEPTH,
- ICON_IMAGEFILE,
- ICON_BLANK336,
- ICON_BLANK337,
- ICON_BLANK338,
- ICON_BLANK339,
- ICON_BLANK340,
- ICON_BLANK341,
- ICON_BLANK342,
- ICON_BLANK343,
- ICON_BLANK344,
- ICON_BLANK345,
- ICON_BLANK346,
- ICON_BLANK346b,
-
- /* vector icons */
-
- VICON_VIEW3D,
- VICON_EDIT,
- VICON_EDITMODE_DEHLT,
- VICON_EDITMODE_HLT,
- VICON_DISCLOSURE_TRI_RIGHT,
- VICON_DISCLOSURE_TRI_DOWN,
- VICON_MOVE_UP,
- VICON_MOVE_DOWN,
- VICON_X
-
-#define BIFICONID_LAST (VICON_X)
+#include "UI_icons.h"
+ BIFICONID_LAST
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
} BIFIconID;
+#undef DEF_ICON
typedef enum {
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 4813b695795..e3fbd906cf6 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -52,6 +52,8 @@ enum {
V2D_COMMONVIEW_STANDARD,
/* listview (i.e. Outliner) */
V2D_COMMONVIEW_LIST,
+ /* stackview (this is basically a list where new items are added at the top) */
+ V2D_COMMONVIEW_STACK,
/* headers (this is basically the same as listview, but no y-panning) */
V2D_COMMONVIEW_HEADER,
/* ui region containing panels */
@@ -97,12 +99,12 @@ enum {
/* ------ Defines for Scrollers ----- */
-/* scroller thickness */
-#define V2D_SCROLL_HEIGHT 16
-#define V2D_SCROLL_WIDTH 16
+/* scroller area */
+#define V2D_SCROLL_HEIGHT 17
+#define V2D_SCROLL_WIDTH 17
-/* half the size (in pixels) of scroller 'handles' */
-#define V2D_SCROLLER_HANDLE_SIZE 5
+/* scroller 'handles' hotspot radius for mouse */
+#define V2D_SCROLLER_HANDLE_SIZE 12
/* ------ Define for UI_view2d_sync ----- */
diff --git a/source/blender/editors/interface/Makefile b/source/blender/editors/interface/Makefile
index dfc8187de49..a3d0692f1e1 100644
--- a/source/blender/editors/interface/Makefile
+++ b/source/blender/editors/interface/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 79e32d4a5f1..9ded2ec9eb8 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1,5 +1,5 @@
/**
- * $Id: interface.c 16882 2008-10-02 12:29:45Z ton $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -80,7 +80,6 @@
*/
static void ui_free_but(const bContext *C, uiBut *but);
-static void ui_rna_ID_autocomplete(bContext *C, char *str, void *arg_but);
/* ************* translation ************** */
@@ -398,18 +397,21 @@ void uiMenuPopupBoundsBlock(uiBlock *block, int addval, int mx, int my)
static void ui_draw_linkline(uiBut *but, uiLinkLine *line)
{
- float vec1[2], vec2[2];
+ rcti rect;
if(line->from==NULL || line->to==NULL) return;
- vec1[0]= (line->from->x1+line->from->x2)/2.0;
- vec1[1]= (line->from->y1+line->from->y2)/2.0;
- vec2[0]= (line->to->x1+line->to->x2)/2.0;
- vec2[1]= (line->to->y1+line->to->y2)/2.0;
+ rect.xmin= (line->from->x1+line->from->x2)/2.0;
+ rect.ymin= (line->from->y1+line->from->y2)/2.0;
+ rect.xmax= (line->to->x1+line->to->x2)/2.0;
+ rect.ymax= (line->to->y1+line->to->y2)/2.0;
- if(line->flag & UI_SELECT) glColor3ub(100,100,100);
- else glColor3ub(0,0,0);
- fdrawline(vec1[0], vec1[1], vec2[0], vec2[1]);
+ if(line->flag & UI_SELECT)
+ glColor3ub(100,100,100);
+ else
+ glColor3ub(0,0,0);
+
+ ui_draw_link_bezier(&rect);
}
static void ui_draw_links(uiBlock *block)
@@ -475,6 +477,8 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
but->selend= oldbut->selend;
but->softmin= oldbut->softmin;
but->softmax= oldbut->softmax;
+ but->linkto[0]= oldbut->linkto[0];
+ but->linkto[1]= oldbut->linkto[1];
found= 1;
oldbut->active= NULL;
@@ -666,7 +670,8 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
/* widgets */
for(but= block->buttons.first; but; but= but->next) {
ui_but_to_pixelrect(&rect, ar, block, but);
- ui_draw_but(C, ar, &style, but, &rect);
+ if(!(but->flag & UI_HIDDEN))
+ ui_draw_but(C, ar, &style, but, &rect);
}
/* restore matrix */
@@ -733,8 +738,13 @@ static void ui_is_but_sel(uiBut *but)
/* XXX 2.50 no links supported yet */
-#if 0
-static uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
+static int uibut_contains_pt(uiBut *but, short *mval)
+{
+ return 0;
+
+}
+
+uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
{
uiBut *bt;
@@ -745,7 +755,7 @@ static uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
if (bt) {
if (but->type==LINK && bt->type==INLINK) {
- if( but->link->tocode == (int)bt->min ) {
+ if( but->link->tocode == (int)bt->hardmin ) {
return bt;
}
}
@@ -759,21 +769,6 @@ static uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
return NULL;
}
-static int ui_is_a_link(uiBut *from, uiBut *to)
-{
- uiLinkLine *line;
- uiLink *link;
-
- link= from->link;
- if(link) {
- line= link->lines.first;
- while(line) {
- if(line->from==from && line->to==to) return 1;
- line= line->next;
- }
- }
- return 0;
-}
static uiBut *ui_find_inlink(uiBlock *block, void *poin)
{
@@ -839,98 +834,6 @@ void uiComposeLinks(uiBlock *block)
}
}
-static void ui_add_link(uiBut *from, uiBut *to)
-{
- /* in 'from' we have to add a link to 'to' */
- uiLink *link;
- void **oldppoin;
- int a;
-
- if(ui_is_a_link(from, to)) {
- printf("already exists\n");
- return;
- }
-
- link= from->link;
-
- /* are there more pointers allowed? */
- if(link->ppoin) {
- oldppoin= *(link->ppoin);
-
- (*(link->totlink))++;
- *(link->ppoin)= MEM_callocN( *(link->totlink)*sizeof(void *), "new link");
-
- for(a=0; a< (*(link->totlink))-1; a++) {
- (*(link->ppoin))[a]= oldppoin[a];
- }
- (*(link->ppoin))[a]= to->poin;
-
- if(oldppoin) MEM_freeN(oldppoin);
- }
- else {
- *(link->poin)= to->poin;
- }
-
-}
-
-static int ui_do_but_LINK(uiBlock *block, uiBut *but)
-{
- /*
- * This button only visualizes, the dobutton mode
- * can add a new link, but then the whole system
- * should be redrawn/initialized.
- *
- */
- uiBut *bt=0, *bto=NULL;
- short sval[2], mval[2], mvalo[2], first= 1;
-
- uiGetMouse(curarea->win, sval);
- mvalo[0]= sval[0];
- mvalo[1]= sval[1];
-
- while (get_mbut() & L_MOUSE) {
- uiGetMouse(curarea->win, mval);
-
- if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1] || first) {
- /* clear completely, because of drawbuttons */
- bt= ui_get_valid_link_button(block, but, mval);
- if(bt) {
- bt->flag |= UI_ACTIVE;
- ui_draw_but(ar, bt);
- }
- if(bto && bto!=bt) {
- bto->flag &= ~UI_ACTIVE;
- ui_draw_but(ar, bto);
- }
- bto= bt;
-
- if (!first) {
- glutil_draw_front_xor_line(sval[0], sval[1], mvalo[0], mvalo[1]);
- }
- glutil_draw_front_xor_line(sval[0], sval[1], mval[0], mval[1]);
-
- mvalo[0]= mval[0];
- mvalo[1]= mval[1];
-
- first= 0;
- }
- else UI_wait_for_statechange();
- }
-
- if (!first) {
- glutil_draw_front_xor_line(sval[0], sval[1], mvalo[0], mvalo[1]);
- }
-
- if(bt) {
- if(but->type==LINK) ui_add_link(but, bt);
- else ui_add_link(bt, but);
-
- scrarea_queue_winredraw(curarea);
- }
-
- return 0;
-}
-#endif
/* ************************************************ */
@@ -1378,17 +1281,13 @@ void ui_get_but_string(uiBut *but, char *str, int maxlen)
else if(type == PROP_POINTER) {
/* RNA pointer */
PointerRNA ptr= RNA_property_pointer_get(&but->rnapoin, but->rnaprop);
- PropertyRNA *nameprop;
-
- if(ptr.data && (nameprop = RNA_struct_name_property(ptr.type)))
- buf= RNA_property_string_get_alloc(&ptr, nameprop, str, maxlen);
- else
- BLI_strncpy(str, "", maxlen);
+ buf= RNA_struct_name_get_alloc(&ptr, str, maxlen);
}
- else
- BLI_strncpy(str, "", maxlen);
- if(buf && buf != str) {
+ if(!buf) {
+ BLI_strncpy(str, "", maxlen);
+ }
+ else if(buf && buf != str) {
/* string was too long, we have to truncate */
BLI_strncpy(str, buf, maxlen);
MEM_freeN(buf);
@@ -1413,8 +1312,10 @@ void ui_get_but_string(uiBut *but, char *str, int maxlen)
BLI_strncpy(str, but->poin, maxlen);
return;
}
+ else if(ui_but_anim_expression_get(but, str, maxlen))
+ ; /* driver expression */
else {
- /* number */
+ /* number editing */
double value;
value= ui_get_but_val(but);
@@ -1434,72 +1335,6 @@ void ui_get_but_string(uiBut *but, char *str, int maxlen)
}
}
-static void ui_rna_ID_collection(bContext *C, uiBut *but, PointerRNA *ptr, PropertyRNA **prop)
-{
- CollectionPropertyIterator iter;
- PropertyRNA *iterprop, *iprop;
- StructRNA *srna;
-
- /* look for collection property in Main */
- RNA_pointer_create(NULL, &RNA_Main, CTX_data_main(C), ptr);
-
- iterprop= RNA_struct_iterator_property(ptr->type);
- RNA_property_collection_begin(ptr, iterprop, &iter);
- *prop= NULL;
-
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- iprop= iter.ptr.data;
-
- /* if it's a collection and has same pointer type, we've got it */
- if(RNA_property_type(iprop) == PROP_COLLECTION) {
- srna= RNA_property_pointer_type(ptr, iprop);
-
- if(RNA_property_pointer_type(ptr, but->rnaprop) == srna) {
- *prop= iprop;
- break;
- }
- }
- }
-
- RNA_property_collection_end(&iter);
-}
-
-/* autocomplete callback for RNA pointers */
-static void ui_rna_ID_autocomplete(bContext *C, char *str, void *arg_but)
-{
- uiBut *but= arg_but;
- AutoComplete *autocpl;
- CollectionPropertyIterator iter;
- PointerRNA ptr;
- PropertyRNA *prop, *nameprop;
- char *name;
-
- if(str[0]==0) return;
-
- /* get the collection */
- ui_rna_ID_collection(C, but, &ptr, &prop);
- if(prop==NULL) return;
-
- autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but));
- RNA_property_collection_begin(&ptr, prop, &iter);
-
- /* loop over items in collection */
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- if(iter.ptr.data && (nameprop = RNA_struct_name_property(iter.ptr.type))) {
- name= RNA_property_string_get_alloc(&iter.ptr, nameprop, NULL, 0);
-
- if(name) {
- /* test item name */
- autocomplete_do_name(autocpl, name);
- MEM_freeN(name);
- }
- }
- }
-
- RNA_property_collection_end(&iter);
- autocomplete_end(autocpl, str);
-}
-
int ui_set_but_string(bContext *C, uiBut *but, const char *str)
{
if(but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
@@ -1518,21 +1353,21 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
PointerRNA ptr, rptr;
PropertyRNA *prop;
- /* XXX only ID pointers at the moment, needs to support
- * custom collection too for bones, vertex groups, .. */
- ui_rna_ID_collection(C, but, &ptr, &prop);
-
if(str == NULL || str[0] == '\0') {
- memset(&rptr, 0, sizeof(rptr));
- RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+ RNA_property_pointer_set(&but->rnapoin, but->rnaprop, PointerRNA_NULL);
return 1;
}
- else if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) {
- RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+ else {
+ ptr= but->rnasearchpoin;
+ prop= but->rnasearchprop;
+
+ if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr))
+ RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+
return 1;
}
- else
- return 0;
+
+ return 0;
}
}
}
@@ -1551,7 +1386,12 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
BLI_strncpy(but->poin, str, but->hardmax);
return 1;
}
+ else if(ui_but_anim_expression_set(but, str)) {
+ /* driver expression */
+ return 1;
+ }
else {
+ /* number editing */
double value;
/* XXX 2.50 missing python api */
@@ -1782,6 +1622,7 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor
block= MEM_callocN(sizeof(uiBlock), "uiBlock");
block->active= 1;
block->dt= dt;
+ block->evil_C= (void*)C; // XXX
BLI_strncpy(block->name, name, sizeof(block->name));
if(region)
@@ -1859,18 +1700,24 @@ void ui_check_but(uiBut *but)
case ICONTOG:
case ICONTOGN:
- if(but->flag & UI_SELECT) but->iconadd= 1;
- else but->iconadd= 0;
+ if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ if(but->flag & UI_SELECT) but->iconadd= 1;
+ else but->iconadd= 0;
+ }
break;
case ICONROW:
- value= ui_get_but_val(but);
- but->iconadd= (int)value- (int)(but->hardmin);
+ if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ value= ui_get_but_val(but);
+ but->iconadd= (int)value- (int)(but->hardmin);
+ }
break;
case ICONTEXTROW:
- value= ui_get_but_val(but);
- but->iconadd= (int)value- (int)(but->hardmin);
+ if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ value= ui_get_but_val(but);
+ but->iconadd= (int)value- (int)(but->hardmin);
+ }
break;
}
@@ -2232,19 +2079,16 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
}
}
- if(but->type==HSVCUBE) { /* hsv buttons temp storage */
+ if(ELEM(but->type, HSVCUBE, HSVCIRCLE)) { /* hsv buttons temp storage */
float rgb[3];
ui_get_but_vectorf(but, rgb);
rgb_to_hsv(rgb[0], rgb[1], rgb[2], but->hsv, but->hsv+1, but->hsv+2);
}
- if((block->flag & UI_BLOCK_LOOP) || ELEM6(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM)) {
- but->flag |= UI_TEXT_LEFT;
- }
-
- if(but->type==BUT_TOGDUAL) {
+ if((block->flag & UI_BLOCK_LOOP) || ELEM7(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU))
+ but->flag |= (UI_TEXT_LEFT|UI_ICON_LEFT);
+ else if(but->type==BUT_TOGDUAL)
but->flag |= UI_ICON_LEFT;
- }
but->flag |= (block->flag & UI_BUT_ALIGN);
@@ -2267,7 +2111,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
uiBut *but;
PropertyRNA *prop;
PropertyType proptype;
- int freestr= 0;
+ int freestr= 0, icon= 0;
prop= RNA_struct_find_property(ptr, propname);
@@ -2277,51 +2121,74 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
/* use rna values if parameters are not specified */
if(!str) {
if(type == MENU && proptype == PROP_ENUM) {
- const EnumPropertyItem *item;
+ EnumPropertyItem *item;
DynStr *dynstr;
- int i, totitem;
+ int i, totitem, value, free;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ value= RNA_property_enum_get(ptr, prop);
dynstr= BLI_dynstr_new();
BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop));
- for(i=0; i<totitem; i++)
- BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value);
+ for(i=0; i<totitem; i++) {
+ 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
+ BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value);
+
+ if(value == item[i].value)
+ icon= item[i].icon;
+ }
str= BLI_dynstr_get_cstring(dynstr);
BLI_dynstr_free(dynstr);
+ if(free)
+ MEM_freeN(item);
+
freestr= 1;
}
else if(type == ROW && proptype == PROP_ENUM) {
- const EnumPropertyItem *item;
- int i, totitem;
+ EnumPropertyItem *item;
+ int i, totitem, free;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
- for(i=0; i<totitem; i++)
- if(item[i].value == (int)max)
+ RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ for(i=0; i<totitem; i++) {
+ if(item[i].identifier[0] && item[i].value == (int)max) {
str= (char*)item[i].name;
+ icon= item[i].icon;
+ }
+ }
if(!str)
str= (char*)RNA_property_ui_name(prop);
+ if(free)
+ MEM_freeN(item);
}
- else
+ else {
str= (char*)RNA_property_ui_name(prop);
+ icon= RNA_property_ui_icon(prop);
+ }
}
if(!tip) {
if(type == ROW && proptype == PROP_ENUM) {
- const EnumPropertyItem *item;
- int i, totitem;
+ EnumPropertyItem *item;
+ int i, totitem, free;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++) {
- if(item[i].value == (int)max) {
+ if(item[i].identifier[0] && item[i].value == (int)max) {
if(item[i].description[0])
tip= (char*)item[i].description;
break;
}
}
+
+ if(free)
+ MEM_freeN(item);
}
}
@@ -2335,7 +2202,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
RNA_property_int_range(ptr, prop, &hardmin, &hardmax);
RNA_property_int_ui_range(ptr, prop, &softmin, &softmax, &step);
- if(min == max) {
+ if(type != ROW && min == max) {
min= hardmin;
max= hardmax;
}
@@ -2350,7 +2217,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
RNA_property_float_range(ptr, prop, &hardmin, &hardmax);
RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision);
- if(min == max) {
+ if(type != ROW && min == max) {
min= hardmin;
max= hardmax;
}
@@ -2381,9 +2248,12 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
but->rnaindex= index;
else
but->rnaindex= 0;
+ }
- if(type == IDPOIN)
- uiButSetCompleteFunc(but, ui_rna_ID_autocomplete, but);
+ if(icon) {
+ but->icon= (BIFIconID)icon;
+ but->flag |= UI_HAS_ICON;
+ but->flag|= UI_ICON_LEFT;
}
if (!prop || !RNA_property_editable(&but->rnapoin, prop)) {
@@ -2403,7 +2273,7 @@ uiBut *ui_def_but_operator(uiBlock *block, int type, char *opname, int opcontext
uiBut *but;
wmOperatorType *ot;
- ot= WM_operatortype_find(opname);
+ ot= WM_operatortype_find(opname, 0);
if(!str) {
if(ot) str= ot->name;
@@ -2493,7 +2363,11 @@ void autocomplete_do_name(AutoComplete *autocpl, const char *name)
else {
/* remove from truncate what is not in bone->name */
for(a=0; a<autocpl->maxlen-1; a++) {
- if(truncate[a]!=name[a])
+ if(name[a] == 0) {
+ truncate[a]= 0;
+ break;
+ }
+ else if(truncate[a]!=name[a])
truncate[a]= 0;
}
}
@@ -2653,8 +2527,10 @@ uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, short x1, s
but= ui_def_but_rna(block, type, retval, "", x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip);
if(but) {
- but->icon= (BIFIconID) icon;
- but->flag|= UI_HAS_ICON;
+ if(icon) {
+ but->icon= (BIFIconID) icon;
+ but->flag|= UI_HAS_ICON;
+ }
ui_check_but(but);
}
@@ -2736,8 +2612,10 @@ uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, char *s
but= ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip);
if(but) {
- but->icon= (BIFIconID) icon;
- but->flag|= UI_HAS_ICON;
+ if(icon) {
+ but->icon= (BIFIconID) icon;
+ but->flag|= UI_HAS_ICON;
+ }
but->flag|= UI_ICON_LEFT;
ui_check_but(but);
}
@@ -2759,80 +2637,6 @@ uiBut *uiDefIconTextButO(uiBlock *block, int type, char *opname, int opcontext,
return but;
}
-static int ui_menu_y(uiBlock *block)
-{
- uiBut *but= block->buttons.last;
-
- if(but) return but->y1;
- else return 0;
-}
-
-uiBut *uiDefMenuButO(uiBlock *block, char *opname, char *name)
-{
- int y= ui_menu_y(block) - MENU_ITEM_HEIGHT;
- return uiDefIconTextButO(block, BUT, opname, WM_OP_INVOKE_REGION_WIN, ICON_BLANK1, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, NULL);
-}
-
-uiBut *uiDefMenuSep(uiBlock *block)
-{
- int y= ui_menu_y(block) - MENU_SEP_HEIGHT;
- return uiDefBut(block, SEPR, 0, "", 0, y, MENU_WIDTH, MENU_SEP_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
-}
-
-uiBut *uiDefMenuSub(uiBlock *block, uiBlockCreateFunc func, char *name)
-{
- int y= ui_menu_y(block) - MENU_ITEM_HEIGHT;
- return uiDefIconTextBlockBut(block, func, NULL, ICON_BLANK1, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, "");
-}
-
-uiBut *uiDefMenuTogR(uiBlock *block, PointerRNA *ptr, char *propname, char *propvalue, char *name)
-{
- uiBut *but;
- PropertyRNA *prop;
- PropertyType type;
- const EnumPropertyItem *item;
- int a, value, totitem, icon= ICON_CHECKBOX_DEHLT;
- int y= ui_menu_y(block) - MENU_ITEM_HEIGHT;
-
- prop= RNA_struct_find_property(ptr, propname);
- if(prop) {
- type= RNA_property_type(prop);
-
- if(type == PROP_BOOLEAN) {
- if(RNA_property_boolean_get(ptr, prop))
- icon= ICON_CHECKBOX_HLT;
-
- return uiDefIconTextButR(block, TOG, 0, icon, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, ptr, propname, 0, 0, 0, 0, 0, NULL);
- }
- else if(type == PROP_ENUM) {
- RNA_property_enum_items(ptr, prop, &item, &totitem);
-
- value= 0;
- for(a=0; a<totitem; a++) {
- if(propvalue && strcmp(propvalue, item[a].identifier) == 0) {
- value= item[a].value;
- if(!name)
- name= (char*)item[a].name;
-
- if(RNA_property_enum_get(ptr, prop) == value)
- icon= ICON_CHECKBOX_HLT;
- break;
- }
- }
-
- if(a != totitem)
- return uiDefIconTextButR(block, ROW, 0, icon, name, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT-1, ptr, propname, 0, 0, value, 0, 0, NULL);
- }
- }
-
- /* not found */
- uiBlockSetButLock(block, 1, "");
- but= uiDefIconTextBut(block, BUT, 0, ICON_BLANK1, propname, 0, y, MENU_WIDTH, MENU_ITEM_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
- uiBlockClearButLock(block);
-
- return but;
-}
-
/* END Button containing both string label and icon */
void uiSetButLink(uiBut *but, void **poin, void ***ppoin, short *tot, int from, int to)
@@ -2874,8 +2678,8 @@ void uiBlockFlipOrder(uiBlock *block)
uiBut *but, *next;
float centy, miny=10000, maxy= -10000;
-// if(U.uiflag & USER_PLAINMENUS)
-// return;
+ if(U.uiflag & USER_MENUFIXEDORDER)
+ return;
for(but= block->buttons.first; but; but= but->next) {
if(but->flag & UI_BUT_ALIGN) return;
@@ -3113,15 +2917,15 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle
}
/* arg is user value, searchfunc and handlefunc both get it as arg */
-void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandleFunc bfunc)
+/* if active set, button opens with this item visible and selected */
+void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandleFunc bfunc, void *active)
{
but->search_func= sfunc;
but->search_arg= arg;
- uiButSetFunc(but, bfunc, arg, NULL);
+ uiButSetFunc(but, bfunc, arg, active);
}
-
/* Program Init/Exit */
void UI_init(void)
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 4a26db29160..4a2ef50a31b 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -10,6 +10,7 @@
#include "DNA_screen_types.h"
#include "BLI_listbase.h"
+#include "BLI_string.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
@@ -18,6 +19,8 @@
#include "RNA_access.h"
#include "RNA_types.h"
+#include "ED_keyframing.h"
+
#include "UI_interface.h"
#include "WM_api.h"
@@ -25,46 +28,135 @@
#include "interface_intern.h"
-void ui_but_anim_flag(uiBut *but, float cfra)
+static FCurve *ui_but_get_fcurve(uiBut *but, bAction **action, int *driven)
{
- but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN);
+ FCurve *fcu= NULL;
+
+ *driven= 0;
- if(but->rnaprop && but->rnapoin.id.data) {
+ /* there must be some RNA-pointer + property combo for this button */
+ if(but->rnaprop && but->rnapoin.id.data &&
+ RNA_property_animateable(&but->rnapoin, but->rnaprop))
+ {
AnimData *adt= BKE_animdata_from_id(but->rnapoin.id.data);
- FCurve *fcu;
char *path;
-
- if (adt) {
- if ((adt->action && adt->action->curves.first) || (adt->drivers.first)) {
+
+ if(adt) {
+ if((adt->action && adt->action->curves.first) || (adt->drivers.first)) {
/* XXX this function call can become a performance bottleneck */
path= RNA_path_from_ID_to_property(&but->rnapoin, but->rnaprop);
-
- if (path) {
+
+ if(path) {
/* animation takes priority over drivers */
- if (adt->action && adt->action->curves.first) {
+ if(adt->action && adt->action->curves.first)
fcu= list_find_fcurve(&adt->action->curves, path, but->rnaindex);
-
- if (fcu) {
- but->flag |= UI_BUT_ANIMATED;
-
- if (on_keyframe_fcurve(fcu, cfra))
- but->flag |= UI_BUT_ANIMATED_KEY;
- }
- }
/* if not animated, check if driven */
- if ((but->flag & UI_BUT_ANIMATED)==0 && (adt->drivers.first)) {
+ if(!fcu && (adt->drivers.first)) {
fcu= list_find_fcurve(&adt->drivers, path, but->rnaindex);
- if (fcu)
- but->flag |= UI_BUT_DRIVEN;
+ if(fcu)
+ *driven= 1;
}
-
+
+ if(fcu && action)
+ *action= adt->action;
+
MEM_freeN(path);
}
}
}
}
+
+ return fcu;
+}
+
+void ui_but_anim_flag(uiBut *but, float cfra)
+{
+ FCurve *fcu;
+ int driven;
+
+ but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN);
+
+ fcu= ui_but_get_fcurve(but, NULL, &driven);
+
+ if(fcu) {
+ if(!driven) {
+ but->flag |= UI_BUT_ANIMATED;
+
+ if(fcurve_frame_has_keyframe(fcu, cfra, 0))
+ but->flag |= UI_BUT_ANIMATED_KEY;
+ }
+ else {
+ but->flag |= UI_BUT_DRIVEN;
+ }
+ }
+}
+
+int ui_but_anim_expression_get(uiBut *but, char *str, int maxlen)
+{
+ FCurve *fcu;
+ ChannelDriver *driver;
+ int driven;
+
+ fcu= ui_but_get_fcurve(but, NULL, &driven);
+
+ if(fcu && driven) {
+ driver= fcu->driver;
+
+ if(driver && driver->type == DRIVER_TYPE_PYTHON) {
+ BLI_strncpy(str, driver->expression, maxlen);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+int ui_but_anim_expression_set(uiBut *but, const char *str)
+{
+ FCurve *fcu;
+ ChannelDriver *driver;
+ int driven;
+
+ fcu= ui_but_get_fcurve(but, NULL, &driven);
+
+ if(fcu && driven) {
+ driver= fcu->driver;
+
+ if(driver && driver->type == DRIVER_TYPE_PYTHON) {
+ BLI_strncpy(driver->expression, str, sizeof(driver->expression));
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+void ui_but_anim_autokey(uiBut *but, Scene *scene, float cfra)
+{
+ ID *id;
+ bAction *action;
+ FCurve *fcu;
+ int driven;
+
+ fcu= ui_but_get_fcurve(but, &action, &driven);
+
+ if(fcu && !driven) {
+ id= but->rnapoin.id.data;
+
+ if(autokeyframe_cfra_can_key(scene, id)) {
+ short flag = 0;
+
+ if (IS_AUTOKEY_FLAG(INSERTNEEDED))
+ flag |= INSERTKEY_NEEDED;
+ if (IS_AUTOKEY_FLAG(AUTOMATKEY))
+ flag |= INSERTKEY_MATRIX;
+
+ fcu->flag &= ~FCURVE_SELECTED;
+ insert_keyframe(id, action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ }
+ }
}
void uiAnimContextProperty(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index)
@@ -111,7 +203,6 @@ void ui_but_anim_remove_driver(bContext *C)
WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
}
-// TODO: refine the logic for adding/removing drivers...
void ui_but_anim_menu(bContext *C, uiBut *but)
{
uiPopupMenu *pup;
@@ -136,6 +227,7 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
uiItemBooleanO(layout, "Delete Keyframe", 0, "ANIM_OT_delete_keyframe_button", "all", 0);
}
}
+ else if(but->flag & UI_BUT_DRIVEN);
else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
if(length) {
uiItemBooleanO(layout, "Insert Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1);
@@ -149,17 +241,18 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
uiItemS(layout);
if(length) {
- uiItemBooleanO(layout, "Remove Driver", 0, "ANIM_OT_remove_driver_button", "all", 1);
- uiItemBooleanO(layout, "Remove Single Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
+ uiItemBooleanO(layout, "Delete Drivers", 0, "ANIM_OT_remove_driver_button", "all", 1);
+ uiItemBooleanO(layout, "Delete Single Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
}
else
- uiItemBooleanO(layout, "Remove Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
+ uiItemBooleanO(layout, "Delete Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
}
+ else if(but->flag & UI_BUT_ANIMATED_KEY);
else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
uiItemS(layout);
if(length) {
- uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 1);
+ uiItemBooleanO(layout, "Add Drivers", 0, "ANIM_OT_add_driver_button", "all", 1);
uiItemBooleanO(layout, "Add Single Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
}
else
diff --git a/source/blender/editors/interface/interface_api.c b/source/blender/editors/interface/interface_api.c
deleted file mode 100644
index 60bfe4e79ad..00000000000
--- a/source/blender/editors/interface/interface_api.c
+++ /dev/null
@@ -1,234 +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): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "UI_interface.h"
-
-static void api_ui_item_common(FunctionRNA *func)
-{
- RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item.");
- RNA_def_int(func, "icon", 0, 0, INT_MAX, "", "Override automatic icon of the item.", 0, INT_MAX);
-}
-
-static void api_ui_item_op_common(FunctionRNA *func)
-{
- PropertyRNA *parm;
-
- api_ui_item_common(func);
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-}
-
-void RNA_api_ui_layout(StructRNA *srna)
-{
- FunctionRNA *func;
- PropertyRNA *parm;
-
- static EnumPropertyItem curve_type_items[] = {
- {0, "NONE", "None", ""},
- {'v', "VECTOR", "Vector", ""},
- {'c', "COLOR", "Color", ""},
- {0, NULL, NULL, NULL}};
-
- /* simple layout specifiers */
- func= RNA_def_function(srna, "row", "uiLayoutRow");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
-
- func= RNA_def_function(srna, "column", "uiLayoutColumn");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
-
- func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
- parm= RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
-
- /* box layout */
- func= RNA_def_function(srna, "box", "uiLayoutBox");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
-
- /* split layout */
- func= RNA_def_function(srna, "split", "uiLayoutSplit");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
- RNA_def_float(func, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
-
- /* items */
- func= RNA_def_function(srna, "itemR", "uiItemR");
- api_ui_item_common(func);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
- RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
- RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
-
- func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_menu_enumR", "uiItemMenuEnumR");
- api_ui_item_common(func);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- /*func= RNA_def_function(srna, "item_enumR", "uiItemEnumR");
- api_ui_item_common(func);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
- RNA_def_property_flag(parm, PROP_REQUIRED);*/
-
- func= RNA_def_function(srna, "itemO", "uiItemO");
- api_ui_item_op_common(func);
-
- func= RNA_def_function(srna, "item_enumO", "uiItemEnumO_string");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "items_enumO", "uiItemsEnumO");
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_menu_enumO", "uiItemMenuEnumO");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_booleanO", "uiItemBooleanO");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_intO", "uiItemIntO");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", "Value of the property to call the operator with.", INT_MIN, INT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_floatO", "uiItemFloatO");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", "Value of the property to call the operator with.", -FLT_MAX, FLT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "item_stringO", "uiItemStringO");
- api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "itemL", "uiItemL");
- api_ui_item_common(func);
-
- func= RNA_def_function(srna, "itemM", "uiItemM");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- api_ui_item_common(func);
- parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "itemS", "uiItemS");
-
- /* context */
- func= RNA_def_function(srna, "set_context_pointer", "uiLayoutSetContextPointer");
- parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- /* templates */
- func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "template_ID", "uiTemplateID");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of pointer property in data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- 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 new ID block.");
- RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
-
- func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Modifier data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Constraint data.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
- parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
- parm= RNA_def_pointer(func, "curvemap", "CurveMapping", "", "Curve mapping pointer.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display.");
-
- func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
- parm= RNA_def_pointer(func, "ramp", "ColorRamp", "", "Color ramp pointer.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
-}
-
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 6d6d4ab9299..8400fee0c55 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1,5 +1,5 @@
/**
- * $Id: interface_draw.c 15733 2008-07-24 09:23:13Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 74559b36c60..0fbfeffba0d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -32,6 +32,7 @@
#include "DNA_color_types.h"
#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
#include "DNA_userdef_types.h"
@@ -49,6 +50,7 @@
#include "BKE_utildefines.h"
#include "ED_screen.h"
+#include "ED_util.h"
#include "UI_interface.h"
@@ -112,6 +114,9 @@ typedef struct uiHandleButtonData {
/* tooltip */
ARegion *tooltip;
wmTimer *tooltiptimer;
+
+ /* auto open */
+ int used_mouse;
wmTimer *autoopentimer;
/* text selection/editing */
@@ -163,13 +168,19 @@ typedef struct uiAfterFunc {
PropertyRNA *rnaprop;
bContextStore *context;
+
+ char undostr[512];
+
+ int autokey;
} uiAfterFunc;
+static int ui_mouse_inside_button(ARegion *ar, uiBut *but, int x, int y);
static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState state);
static int ui_handler_region_menu(bContext *C, wmEvent *event, void *userdata);
static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata);
static void ui_handler_remove_popup(bContext *C, void *userdata);
static void ui_handle_button_activate(bContext *C, ARegion *ar, uiBut *but, uiButtonActivateType type);
+static void button_timers_tooltip_remove(bContext *C, uiBut *but);
/* ******************** menu navigation helpers ************** */
@@ -267,6 +278,32 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
}
}
+static void ui_apply_autokey_undo(bContext *C, uiBut *but)
+{
+ Scene *scene= CTX_data_scene(C);
+ uiAfterFunc *after;
+ char *str= NULL;
+
+ if ELEM5(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX);
+ else {
+ /* define which string to use for undo */
+ if ELEM(but->type, LINK, INLINK) str= "Add button link";
+ else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr;
+ else if(but->drawstr[0]) str= but->drawstr;
+ else str= but->tip;
+ }
+
+ /* delayed, after all other funcs run, popups are closed, etc */
+ if(str) {
+ after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc");
+ BLI_strncpy(after->undostr, str, sizeof(after->undostr));
+ BLI_addtail(&UIAfterFuncs, after);
+ }
+
+ /* try autokey */
+ ui_but_anim_autokey(but, scene, scene->r.cfra);
+}
+
static void ui_apply_but_funcs_after(bContext *C)
{
uiAfterFunc *afterf, after;
@@ -283,16 +320,6 @@ static void ui_apply_but_funcs_after(bContext *C)
if(after.context)
CTX_store_set(C, after.context);
- if(after.func)
- after.func(C, after.func_arg1, after.func_arg2);
- if(after.funcN)
- after.funcN(C, after.func_argN, after.func_arg2);
-
- if(after.handle_func)
- after.handle_func(C, after.handle_func_arg, after.retval);
- if(after.butm_func)
- after.butm_func(C, after.butm_func_arg, after.a2);
-
if(after.optype)
WM_operator_name_call(C, after.optype->idname, after.opcontext, after.opptr);
if(after.opptr) {
@@ -307,6 +334,19 @@ static void ui_apply_but_funcs_after(bContext *C)
CTX_store_set(C, NULL);
CTX_store_free(after.context);
}
+
+ if(after.func)
+ after.func(C, after.func_arg1, after.func_arg2);
+ if(after.funcN)
+ after.funcN(C, after.func_argN, after.func_arg2);
+
+ if(after.handle_func)
+ after.handle_func(C, after.handle_func_arg, after.retval);
+ if(after.butm_func)
+ after.butm_func(C, after.butm_func_arg, after.a2);
+
+ if(after.undostr[0])
+ ED_undo_push(C, after.undostr);
}
}
@@ -403,7 +443,15 @@ static void ui_apply_but_TOG(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
{
+ uiBut *bt;
+
ui_set_but_val(but, but->hardmax);
+
+ /* states of other row buttons */
+ for(bt= block->buttons.first; bt; bt= bt->next)
+ if(bt!=but && bt->poin==but->poin && bt->type==ROW)
+ ui_check_but(bt);
+
ui_apply_but_func(C, but);
data->retval= but->retval;
@@ -525,6 +573,149 @@ static void ui_apply_but_CHARTAB(bContext *C, uiBut *but, uiHandleButtonData *da
}
#endif
+
+static void ui_delete_active_linkline(uiBlock *block)
+{
+ uiBut *but;
+ uiLink *link;
+ uiLinkLine *line, *nline;
+ int a, b;
+
+ but= block->buttons.first;
+ while(but) {
+ if(but->type==LINK && but->link) {
+ line= but->link->lines.first;
+ while(line) {
+
+ nline= line->next;
+
+ if(line->flag & UI_SELECT) {
+ BLI_remlink(&but->link->lines, line);
+
+ link= line->from->link;
+
+ /* are there more pointers allowed? */
+ if(link->ppoin) {
+
+ if(*(link->totlink)==1) {
+ *(link->totlink)= 0;
+ MEM_freeN(*(link->ppoin));
+ *(link->ppoin)= NULL;
+ }
+ else {
+ b= 0;
+ for(a=0; a< (*(link->totlink)); a++) {
+
+ if( (*(link->ppoin))[a] != line->to->poin ) {
+ (*(link->ppoin))[b]= (*(link->ppoin))[a];
+ b++;
+ }
+ }
+ (*(link->totlink))--;
+ }
+ }
+ else {
+ *(link->poin)= NULL;
+ }
+
+ MEM_freeN(line);
+ }
+ line= nline;
+ }
+ }
+ but= but->next;
+ }
+}
+
+
+static uiLinkLine *ui_is_a_link(uiBut *from, uiBut *to)
+{
+ uiLinkLine *line;
+ uiLink *link;
+
+ link= from->link;
+ if(link) {
+ line= link->lines.first;
+ while(line) {
+ if(line->from==from && line->to==to) return line;
+ line= line->next;
+ }
+ }
+ return NULL;
+}
+
+static void ui_add_link(uiBut *from, uiBut *to)
+{
+ /* in 'from' we have to add a link to 'to' */
+ uiLink *link;
+ uiLinkLine *line;
+ void **oldppoin;
+ int a;
+
+ if( (line= ui_is_a_link(from, to)) ) {
+ line->flag |= UI_SELECT;
+ ui_delete_active_linkline(from->block);
+ printf("already exists, means deletion now\n");
+ return;
+ }
+
+ if (from->type==LINK && to->type==INLINK) {
+ if( from->link->tocode != (int)to->hardmin ) {
+ printf("cannot link\n");
+ return;
+ }
+ }
+ else if(from->type==INLINK && to->type==LINK) {
+ if( to->link->tocode == (int)from->hardmin ) {
+ printf("cannot link\n");
+ return;
+ }
+ }
+
+ link= from->link;
+
+ /* are there more pointers allowed? */
+ if(link->ppoin) {
+ oldppoin= *(link->ppoin);
+
+ (*(link->totlink))++;
+ *(link->ppoin)= MEM_callocN( *(link->totlink)*sizeof(void *), "new link");
+
+ for(a=0; a< (*(link->totlink))-1; a++) {
+ (*(link->ppoin))[a]= oldppoin[a];
+ }
+ (*(link->ppoin))[a]= to->poin;
+
+ if(oldppoin) MEM_freeN(oldppoin);
+ }
+ else {
+ *(link->poin)= to->poin;
+ }
+
+}
+
+
+static void ui_apply_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data)
+{
+ ARegion *ar= CTX_wm_region(C);
+ uiBut *bt;
+
+ for(bt= but->block->buttons.first; bt; bt= bt->next) {
+ if( ui_mouse_inside_button(ar, bt, but->linkto[0]+ar->winrct.xmin, but->linkto[1]+ar->winrct.ymin) )
+ break;
+ }
+ if(bt && bt!=but) {
+
+ if(but->type==LINK) ui_add_link(but, bt);
+ else ui_add_link(bt, but);
+
+ ui_apply_but_func(C, but);
+ data->retval= but->retval;
+ }
+ data->applied= 1;
+}
+
+
static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, int interactive)
{
char *editstr;
@@ -594,11 +785,8 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
ui_apply_but_ROW(C, block, but, data);
break;
case SCROLL:
- break;
case NUM:
case NUMABS:
- ui_apply_but_NUM(C, but, data);
- break;
case SLI:
case NUMSLI:
ui_apply_but_NUM(C, but, data);
@@ -621,6 +809,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
break;
case BUT_NORMAL:
case HSVCUBE:
+ case HSVCIRCLE:
ui_apply_but_VEC(C, but, data);
break;
case BUT_COLORBAND:
@@ -639,6 +828,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
#endif
case LINK:
case INLINK:
+ ui_apply_but_LINK(C, but, data);
break;
default:
break;
@@ -1072,8 +1262,14 @@ static int ui_textedit_autocomplete(bContext *C, uiBut *but, uiHandleButtonData
int changed= 1;
str= data->str;
- but->autocomplete_func(C, str, but->autofunc_arg);
+
+ if(data->searchbox)
+ ui_searchbox_autocomplete(C, data->searchbox, but, data->str);
+ else
+ but->autocomplete_func(C, str, but->autofunc_arg);
+
but->pos= strlen(str);
+ but->selsta= but->selend= but->pos;
return changed;
}
@@ -1164,7 +1360,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
but->editstr= data->str;
but->pos= strlen(data->str);
but->selsta= 0;
- but->selend= strlen(but->drawstr) - strlen(but->str);
+ but->selend= strlen(data->str);
/* optional searchbox */
if(but->type==SEARCH_MENU) {
@@ -1200,14 +1396,14 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
return;
for(but= actbut->next; but; but= but->next) {
- if(ELEM5(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI)) {
+ if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
for(but= block->buttons.first; but!=actbut; but= but->next) {
- if(ELEM5(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI)) {
+ if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
@@ -1224,14 +1420,14 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
return;
for(but= actbut->prev; but; but= but->prev) {
- if(ELEM5(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI)) {
+ if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
for(but= block->buttons.last; but!=actbut; but= but->prev) {
- if(ELEM5(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI)) {
+ if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
@@ -1242,7 +1438,7 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- int mx, my, changed= 0, inbox=0, retval= WM_UI_HANDLER_CONTINUE;
+ int mx, my, changed= 0, inbox=0, update= 0, retval= WM_UI_HANDLER_CONTINUE;
switch(event->type) {
case WHEELUPMOUSE:
@@ -1263,7 +1459,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
/* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */
if(data->searchbox)
- inbox= BLI_in_rcti(&data->searchbox->winrct, event->x, event->y);
+ inbox= ui_searchbox_inside(data->searchbox, event->x, event->y);
if(event->val==KM_PRESS) {
mx= event->x;
@@ -1355,8 +1551,9 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
case TABKEY:
/* there is a key conflict here, we can't tab with autocomplete */
- if(but->autocomplete_func) {
+ if(but->autocomplete_func || data->searchbox) {
changed= ui_textedit_autocomplete(C, but, data);
+ update= 1; /* do live update for tab key */
retval= WM_UI_HANDLER_BREAK;
}
/* the hotkey here is not well defined, was G.qual so we check all */
@@ -1379,7 +1576,8 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
if(changed) {
- if(data->interactive) ui_apply_button(C, block, but, data, 1);
+ /* never update while typing for now */
+ if(update && data->interactive) ui_apply_button(C, block, but, data, 1);
else ui_check_but(but);
if(data->searchbox)
@@ -1431,7 +1629,7 @@ static void ui_numedit_begin(uiBut *but, uiHandleButtonData *data)
data->coba= (ColorBand*)but->poin;
but->editcoba= data->coba;
}
- else if(ELEM(but->type, BUT_NORMAL, HSVCUBE)) {
+ else if(ELEM3(but->type, BUT_NORMAL, HSVCUBE, HSVCIRCLE)) {
ui_get_but_vectorf(but, data->origvec);
VECCOPY(data->vec, data->origvec);
but->editvec= data->vec;
@@ -1772,7 +1970,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
click= 1;
}
else if(event->val==KM_PRESS) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->shift) {
+ if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
@@ -1906,6 +2104,11 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i
if(but->type==NUMSLI) deler= ((but->x2-but->x1) - 5.0*but->aspect);
else if(but->type==HSVSLI) deler= ((but->x2-but->x1)/2 - 5.0*but->aspect);
+ else if(but->type==SCROLL) {
+ int horizontal= (but->x2 - but->x1 > but->y2 - but->y1);
+ float size= (horizontal)? (but->x2-but->x1): -(but->y2-but->y1);
+ deler= size*(but->softmax - but->softmin)/(but->softmax - but->softmin + but->a1);
+ }
else deler= (but->x2-but->x1- 5.0*but->aspect);
f= (float)(mx-data->dragstartx)/deler + data->dragfstart;
@@ -1983,7 +2186,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
click= 2;
}
else if(event->val==KM_PRESS) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->shift) {
+ if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
@@ -2025,7 +2228,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
if(click) {
- if (event->ctrl || click==2) {
+ if (click==2) {
/* nudge slider to the left or right */
float f, tempf, softmin, softmax, softrange;
int temp;
@@ -2076,6 +2279,54 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
return retval;
}
+static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event)
+{
+ int mx, my, click= 0;
+ int retval= WM_UI_HANDLER_CONTINUE;
+ int horizontal= (but->x2 - but->x1 > but->y2 - but->y1);
+
+ mx= event->x;
+ my= event->y;
+ ui_window_to_block(data->region, block, &mx, &my);
+
+ if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if(event->val==KM_PRESS) {
+ if(event->type == LEFTMOUSE) {
+ if(horizontal) {
+ data->dragstartx= mx;
+ data->draglastx= mx;
+ }
+ else {
+ data->dragstartx= my;
+ data->draglastx= my;
+ }
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
+ retval= WM_UI_HANDLER_BREAK;
+ }
+ else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
+ click= 1;
+ }
+ }
+ else if(data->state == BUTTON_STATE_NUM_EDITING) {
+ if(event->type == ESCKEY) {
+ data->cancel= 1;
+ data->escapecancel= 1;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ else if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ else if(event->type == MOUSEMOVE) {
+ if(ui_numedit_but_SLI(but, data, 0, 0, (horizontal)? mx: my))
+ ui_numedit_apply(C, block, but, data);
+ }
+
+ retval= WM_UI_HANDLER_BREAK;
+ }
+
+ return retval;
+}
+
static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
@@ -2099,6 +2350,25 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm
return WM_UI_HANDLER_BREAK;
}
}
+ else if(but->type==COL) {
+ if( ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) {
+ float col[3];
+
+ ui_get_but_vectorf(but, col);
+ rgb_to_hsv(col[0], col[1], col[2], but->hsv, but->hsv+1, but->hsv+2);
+
+ if(event->type==WHEELDOWNMOUSE)
+ but->hsv[2]= CLAMPIS(but->hsv[2]-0.05f, 0.0f, 1.0f);
+ else
+ but->hsv[2]= CLAMPIS(but->hsv[2]+0.05f, 0.0f, 1.0f);
+
+ hsv_to_rgb(but->hsv[0], but->hsv[1], but->hsv[2], data->vec, data->vec+1, data->vec+2);
+
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ ui_apply_button(C, but->block, but, data, 1);
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
}
return WM_UI_HANDLER_CONTINUE;
@@ -2222,8 +2492,11 @@ static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
but->hsv[2]= x;
but->hsv[1]= y;
}
- else
+ else if(but->a1==3) {
but->hsv[0]= x;
+ }
+ else
+ but->hsv[2]= y;
ui_set_but_hsv(but); // converts to rgb
@@ -2275,6 +2548,79 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
return WM_UI_HANDLER_CONTINUE;
}
+static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx, int my)
+{
+ rcti rect;
+ int changed= 1;
+
+ rect.xmin= but->x1; rect.xmax= but->x2;
+ rect.ymin= but->y1; rect.ymax= but->y2;
+
+ ui_hsvcircle_vals_from_pos(but->hsv, but->hsv+1, &rect, (float)mx, (float)my);
+
+ ui_set_but_hsv(but); // converts to rgb
+
+ // update button values and strings
+ // XXX ui_update_block_buts_hsv(but->block, but->hsv);
+
+ data->draglastx= mx;
+ data->draglasty= my;
+
+ return changed;
+}
+
+
+static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event)
+{
+ int mx, my;
+
+ mx= event->x;
+ my= event->y;
+ ui_window_to_block(data->region, block, &mx, &my);
+
+ if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ data->dragstartx= mx;
+ data->dragstarty= my;
+ data->draglastx= mx;
+ data->draglasty= my;
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
+
+ /* also do drag the first time */
+ if(ui_numedit_but_HSVCIRCLE(but, data, mx, my))
+ ui_numedit_apply(C, block, but, data);
+
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
+ else if(data->state == BUTTON_STATE_NUM_EDITING) {
+ /* XXX hardcoded keymap check.... */
+ if(event->type == WHEELDOWNMOUSE) {
+ but->hsv[2]= CLAMPIS(but->hsv[2]-0.05f, 0.0f, 1.0f);
+ ui_set_but_hsv(but); // converts to rgb
+ ui_numedit_apply(C, block, but, data);
+ }
+ else if(event->type == WHEELUPMOUSE) {
+ but->hsv[2]= CLAMPIS(but->hsv[2]+0.05f, 0.0f, 1.0f);
+ ui_set_but_hsv(but); // converts to rgb
+ ui_numedit_apply(C, block, but, data);
+ }
+ else if(event->type == MOUSEMOVE) {
+ if(mx!=data->draglastx || my!=data->draglasty) {
+ if(ui_numedit_but_HSVCIRCLE(but, data, mx, my))
+ ui_numedit_apply(C, block, but, data);
+ }
+ }
+ else if(event->type==LEFTMOUSE && event->val!=KM_PRESS)
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+
+ return WM_UI_HANDLER_BREAK;
+ }
+
+ return WM_UI_HANDLER_CONTINUE;
+}
+
+
static int verg_colorband(const void *a1, const void *a2)
{
const CBData *x1=a1, *x2=a2;
@@ -2709,6 +3055,38 @@ static int ui_do_but_CHARTAB(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
}
#endif
+
+static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
+{
+ ARegion *ar= CTX_wm_region(C);
+
+ but->linkto[0]= event->x-ar->winrct.xmin;
+ but->linkto[1]= event->y-ar->winrct.ymin;
+
+ if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if(event->type == LEFTMOUSE && event->val==KM_PRESS) {
+ button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE);
+ return WM_UI_HANDLER_BREAK;
+ }
+ else if(event->type == LEFTMOUSE && but->block->handle) {
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
+ else if(data->state == BUTTON_STATE_WAIT_RELEASE) {
+
+ if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if(!(but->flag & UI_SELECT))
+ data->cancel= 1;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
+
+ return WM_UI_HANDLER_CONTINUE;
+}
+
+
static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
{
uiHandleButtonData *data;
@@ -2750,6 +3128,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
}
/* handle menu */
else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) {
+ button_timers_tooltip_remove(C, but);
ui_but_anim_menu(C, but);
return WM_UI_HANDLER_BREAK;
}
@@ -2791,13 +3170,9 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
case OPTIONN:
retval= ui_do_but_TOG(C, but, data, event);
break;
-#if 0
case SCROLL:
- /* DrawBut(b, 1); */
- /* do_scrollbut(b); */
- /* DrawBut(b,0); */
+ retval= ui_do_but_SCROLL(C, block, but, data, event);
break;
-#endif
case NUM:
case NUMABS:
retval= ui_do_but_NUM(C, block, but, data, event);
@@ -2846,18 +3221,19 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
case HSVCUBE:
retval= ui_do_but_HSVCUBE(C, block, but, data, event);
break;
+ case HSVCIRCLE:
+ retval= ui_do_but_HSVCIRCLE(C, block, but, data, event);
+ break;
#ifdef INTERNATIONAL
case CHARTAB:
retval= ui_do_but_CHARTAB(C, block, but, data, event);
break;
#endif
- /* XXX 2.50 links not implemented yet */
-#if 0
+
case LINK:
case INLINK:
- retval= retval= ui_do_but_LINK(block, but);
+ retval= ui_do_but_LINK(C, but, data, event);
break;
-#endif
}
return retval;
@@ -2957,7 +3333,8 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
for(but=block->buttons.first; but; but= but->next) {
if(ELEM3(but->type, LABEL, ROUNDBOX, SEPR))
continue;
-
+ if(but->flag & UI_HIDDEN)
+ continue;
if(ui_but_contains_pt(but, mx, my))
/* give precedence to already activated buttons */
if(!butover || (!butover->active && but->active))
@@ -2977,6 +3354,27 @@ static int button_modal_state(uiHandleButtonState state)
BUTTON_STATE_TEXT_SELECTING, BUTTON_STATE_MENU_OPEN);
}
+static void button_timers_tooltip_remove(bContext *C, uiBut *but)
+{
+ uiHandleButtonData *data;
+
+ data= but->active;
+
+ if(data->tooltiptimer) {
+ WM_event_remove_window_timer(data->window, data->tooltiptimer);
+ data->tooltiptimer= NULL;
+ }
+ if(data->tooltip) {
+ ui_tooltip_free(C, data->tooltip);
+ data->tooltip= NULL;
+ }
+
+ if(data->autoopentimer) {
+ WM_event_remove_window_timer(data->window, data->autoopentimer);
+ data->autoopentimer= NULL;
+ }
+}
+
static void button_tooltip_timer_reset(uiBut *but)
{
uiHandleButtonData *data;
@@ -3009,7 +3407,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
/* automatic open pulldown block timer */
if(ELEM3(but->type, BLOCK, PULLDOWN, ICONTEXTROW)) {
- if(!data->autoopentimer) {
+ if(data->used_mouse && !data->autoopentimer) {
int time;
if(but->block->auto_open==2) time= 1; // test for toolbox
@@ -3024,20 +3422,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
}
else {
but->flag |= UI_SELECT;
-
- if(data->tooltiptimer) {
- WM_event_remove_window_timer(data->window, data->tooltiptimer);
- data->tooltiptimer= NULL;
- }
- if(data->tooltip) {
- ui_tooltip_free(C, data->tooltip);
- data->tooltip= NULL;
- }
-
- if(data->autoopentimer) {
- WM_event_remove_window_timer(data->window, data->autoopentimer);
- data->autoopentimer= NULL;
- }
+ button_timers_tooltip_remove(C, but);
}
/* text editing */
@@ -3112,6 +3497,9 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
if(but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
but->block->auto_open= 0;
+ if(type == BUTTON_ACTIVATE_OVER) {
+ data->used_mouse= 1;
+ }
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
if(type == BUTTON_ACTIVATE_OPEN) {
@@ -3161,6 +3549,10 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
}
}
+ /* autokey & undo push */
+ if(!data->cancel)
+ ui_apply_autokey_undo(C, but);
+
/* disable tooltips until mousemove */
ui_blocks_set_tooltips(data->region, 0);
@@ -3321,21 +3713,29 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
else if(data->state == BUTTON_STATE_WAIT_RELEASE) {
switch(event->type) {
case MOUSEMOVE:
- /* deselect the button when moving the mouse away */
- if(ui_mouse_inside_button(ar, but, event->x, event->y)) {
- if(!(but->flag & UI_SELECT)) {
- but->flag |= UI_SELECT;
- data->cancel= 0;
- ED_region_tag_redraw(data->region);
- }
+
+ if(ELEM(but->type,LINK, INLINK)) {
+ but->flag |= UI_SELECT;
+ ui_do_button(C, block, but, event);
+ ED_region_tag_redraw(data->region);
}
else {
- if(but->flag & UI_SELECT) {
- but->flag &= ~UI_SELECT;
- data->cancel= 1;
- ED_region_tag_redraw(data->region);
+ /* deselect the button when moving the mouse away */
+ if(ui_mouse_inside_button(ar, but, event->x, event->y)) {
+ if(!(but->flag & UI_SELECT)) {
+ but->flag |= UI_SELECT;
+ data->cancel= 0;
+ ED_region_tag_redraw(data->region);
+ }
}
- }
+ else {
+ if(but->flag & UI_SELECT) {
+ but->flag &= ~UI_SELECT;
+ data->cancel= 1;
+ ED_region_tag_redraw(data->region);
+ }
+ }
+ }
break;
default:
/* otherwise catch mouse release event */
@@ -3361,7 +3761,8 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
uiBut *bt= ui_but_find_mouse_over(ar, event->x, event->y);
if(bt && bt->active != data) {
- data->cancel= 1;
+ if(but->type != COL) /* exception */
+ data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
break;
@@ -3390,7 +3791,7 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
return retval;
}
-static void ui_handle_button_closed_submenu(bContext *C, wmEvent *event, uiBut *but)
+static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *but)
{
uiHandleButtonData *data;
uiPopupBlockHandle *menu;
@@ -3399,12 +3800,19 @@ static void ui_handle_button_closed_submenu(bContext *C, wmEvent *event, uiBut *
menu= data->menu;
/* copy over return values from the closing menu */
- if(menu->menuretval == UI_RETURN_OK) {
+ if(menu->menuretval == UI_RETURN_OK || menu->menuretval == UI_RETURN_UPDATE) {
if(but->type == COL)
VECCOPY(data->vec, menu->retvec)
else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
data->value= menu->retvalue;
}
+
+ if(menu->menuretval == UI_RETURN_UPDATE) {
+ if(data->interactive) ui_apply_button(C, but->block, but, data, 1);
+ else ui_check_but(but);
+
+ menu->menuretval= 0;
+ }
/* now change button state or exit, which will close the submenu */
if(ELEM(menu->menuretval, UI_RETURN_OK, UI_RETURN_CANCEL)) {
@@ -3414,12 +3822,18 @@ static void ui_handle_button_closed_submenu(bContext *C, wmEvent *event, uiBut *
button_activate_exit(C, data, but, 1);
}
else if(menu->menuretval == UI_RETURN_OUT) {
- if(ui_mouse_inside_button(data->region, but, event->x, event->y)) {
+ if(event->type==MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) {
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
}
else {
- data->cancel= 1;
- button_activate_exit(C, data, but, 1);
+ if(event->type != MOUSEMOVE) {
+ but->active->used_mouse= 0;
+ button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
+ }
+ else {
+ data->cancel= 1;
+ button_activate_exit(C, data, but, 1);
+ }
}
}
}
@@ -3536,8 +3950,10 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
if(event->type == MOUSEMOVE)
ui_mouse_motion_towards_init(menu, mx, my, 0);
+ /* first block own event func */
+ if(block->block_event_func && block->block_event_func(C, block, event));
/* events not for active search menu button */
- if(but==NULL || but->type!=SEARCH_MENU) {
+ else if(but==NULL || but->type!=SEARCH_MENU) {
switch(event->type) {
/* closing sublevels of pulldowns */
case LEFTARROWKEY:
@@ -3702,8 +4118,12 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
}
/* strict check, and include the parent rect */
- if(!menu->dotowards && !saferct)
- menu->menuretval= (block->flag & UI_BLOCK_KEEP_OPEN)? UI_RETURN_OK: UI_RETURN_OUT;
+ if(!menu->dotowards && !saferct) {
+ if(block->flag & UI_BLOCK_OUT_1)
+ menu->menuretval= UI_RETURN_OK;
+ else
+ menu->menuretval= (block->flag & UI_BLOCK_KEEP_OPEN)? UI_RETURN_OK: UI_RETURN_OUT;
+ }
else if(menu->dotowards && event->type==MOUSEMOVE)
retval= WM_UI_HANDLER_BREAK;
}
@@ -3715,7 +4135,7 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
* buttons inside this region. disabled inside check .. not sure
* anymore why it was there? but i meant enter enter didn't work
* for example when mouse was not over submenu */
- if((/*inside &&*/ !menu->menuretval && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
+ if((/*inside &&*/ (!menu->menuretval || menu->menuretval == UI_RETURN_UPDATE) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
but= ui_but_find_activated(ar);
if(but) {
@@ -3745,14 +4165,14 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
return retval;
}
-static int ui_handle_menu_closed_submenu(bContext *C, wmEvent *event, uiPopupBlockHandle *menu)
+static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlockHandle *menu)
{
ARegion *ar;
uiBut *but;
uiBlock *block;
uiHandleButtonData *data;
uiPopupBlockHandle *submenu;
- int mx, my;
+ int mx, my, update;
ar= menu->region;
block= ar->uiblocks.first;
@@ -3771,9 +4191,16 @@ static int ui_handle_menu_closed_submenu(bContext *C, wmEvent *event, uiPopupBlo
}
}
+ update= (submenu->menuretval == UI_RETURN_UPDATE);
+ if(update)
+ menu->menuretval = UI_RETURN_UPDATE;
+
/* now let activated button in this menu exit, which
* will actually close the submenu too */
- ui_handle_button_closed_submenu(C, event, but);
+ ui_handle_button_return_submenu(C, event, but);
+
+ if(update)
+ submenu->menuretval = 0;
}
/* for cases where close does not cascade, allow the user to
@@ -3807,7 +4234,7 @@ static int ui_handle_menus_recursive(bContext *C, wmEvent *event, uiPopupBlockHa
/* now handle events for our own menu */
if(retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
if(submenu && submenu->menuretval)
- retval= ui_handle_menu_closed_submenu(C, event, menu);
+ retval= ui_handle_menu_return_submenu(C, event, menu);
else
retval= ui_handle_menu_event(C, event, menu, (submenu == NULL));
}
@@ -3900,7 +4327,7 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *userdata)
/* handle events for the activated button */
if(retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
if(data->menu->menuretval)
- ui_handle_button_closed_submenu(C, event, but);
+ ui_handle_button_return_submenu(C, event, but);
else
ui_handle_button_event(C, event, but);
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index df069069a33..549164c23a1 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -41,28 +41,30 @@
#include "BLI_blenlib.h"
#include "BLI_storage_types.h"
+#include "DNA_material_types.h"
#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
-
-#include "BKE_utildefines.h"
#include "BKE_image.h"
#include "BKE_icons.h"
+#include "BKE_utildefines.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "UI_interface.h"
-#include "UI_interface_icons.h"
-// XXX #include "BIF_previewrender.h"
-// XXX #include "BIF_screen.h"
+#include "ED_datafiles.h"
+#include "ED_previewrender.h"
+#include "UI_interface.h"
+#include "UI_interface_icons.h"
#include "UI_resources.h" /* elubie: should be removed once the enum for the ICONS is in BIF_preview_icons.h */
+
#include "interface_intern.h"
-#include "ED_datafiles.h"
+
#define ICON_IMAGE_W 600
#define ICON_IMAGE_H 640
@@ -340,6 +342,28 @@ static void vicon_disclosure_tri_right_draw(int x, int y, int w, int h, float al
viconutil_draw_lineloop_smooth(pts, 3);
}
+static void vicon_small_tri_right_draw(int x, int y, int w, int h, float alpha)
+{
+ GLint pts[3][2];
+ int cx = x+w/2-4;
+ int cy = y+w/2;
+ int d = w/5, d2 = w/7;
+
+ viconutil_set_point(pts[0], cx-d2, cy+d);
+ viconutil_set_point(pts[1], cx-d2, cy-d);
+ viconutil_set_point(pts[2], cx+d2, cy);
+
+ glColor4f(0.2f, 0.2f, 0.2f, alpha);
+
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_TRIANGLES);
+ glVertex2iv(pts[0]);
+ glVertex2iv(pts[1]);
+ glVertex2iv(pts[2]);
+ glEnd();
+ glShadeModel(GL_FLAT);
+}
+
static void vicon_disclosure_tri_down_draw(int x, int y, int w, int h, float alpha)
{
GLint pts[3][2];
@@ -448,6 +472,7 @@ static void init_internal_icons()
def_internal_vicon(VICON_MOVE_UP, vicon_move_up_draw);
def_internal_vicon(VICON_MOVE_DOWN, vicon_move_down_draw);
def_internal_vicon(VICON_X, vicon_x_draw);
+ def_internal_vicon(VICON_SMALL_TRI_RIGHT, vicon_small_tri_right_draw);
IMB_freeImBuf(bbuf);
}
@@ -650,7 +675,6 @@ void UI_icons_init(int first_dyn_id)
init_internal_icons();
}
-#if 0
static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned int *rect)
{
struct ImBuf *ima;
@@ -727,21 +751,28 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel)
}
/* create single icon from jpg, png etc. */
-static void icon_from_image(Image *img, int miplevel)
+static void icon_from_image(Scene *scene, Image *img, int miplevel)
{
+ ImBuf *ibuf= NULL;
+ ImageUser iuser;
+ PreviewImage *pi;
unsigned int pr_size;
short image_loaded = 0;
- struct ImBuf* ibuf=NULL;
- PreviewImage* pi;
/* img->ok is zero when Image cannot load */
if (img==NULL || img->ok==0)
return;
+ /* setup dummy image user */
+ memset(&iuser, 0, sizeof(ImageUser));
+ iuser.ok= iuser.framenr= 1;
+ iuser.scene= scene;
+
/* elubie: this needs to be changed: here image is always loaded if not
already there. Very expensive for large images. Need to find a way to
only get existing ibuf */
- ibuf = BKE_image_get_ibuf(img, NULL);
+
+ ibuf = BKE_image_get_ibuf(img, &iuser);
if(ibuf==NULL || ibuf->rect==NULL) {
return;
}
@@ -771,18 +802,14 @@ static void set_alpha(char* cp, int sizex, int sizey, char alpha)
}
}
}
-#endif
/* only called when icon has changed */
/* only call with valid pointer from UI_icon_draw */
-static void icon_set_image(ID *id, DrawInfo *di, PreviewImage* prv_img, int miplevel)
+static void icon_set_image(Scene *scene, ID *id, PreviewImage* prv_img, int miplevel)
{
-#if 0 // XXX - preview renders have to be redesigned - possibly low level op (elubie)
RenderInfo ri;
unsigned int pr_size = 0;
- if (!di) return;
-
if (!prv_img) {
printf("No preview image for this ID: %s\n", id->name);
return;
@@ -791,20 +818,19 @@ static void icon_set_image(ID *id, DrawInfo *di, PreviewImage* prv_img, int mipl
/* no drawing (see last parameter doDraw, just calculate preview image
- hopefully small enough to be fast */
if (GS(id->name) == ID_IM)
- icon_from_image((struct Image*)id, miplevel);
+ icon_from_image(scene, (struct Image*)id, miplevel);
else {
/* create the preview rect */
icon_create_mipmap(prv_img, miplevel);
ri.curtile= 0;
ri.tottile= 0;
- ri.rect = NULL;
ri.pr_rectx = prv_img->w[miplevel];
ri.pr_recty = prv_img->h[miplevel];
-
pr_size = ri.pr_rectx*ri.pr_recty*sizeof(unsigned int);
+ ri.rect = MEM_callocN(pr_size, "pr icon rect");
- BIF_previewrender(id, &ri, NULL, PR_ICON_RENDER);
+ ED_preview_iconrender(scene, id, ri.rect, ri.pr_rectx, ri.pr_recty);
/* world is rendered with alpha=0, so it wasn't displayed
this could be render option for sky to, for later */
@@ -818,15 +844,11 @@ static void icon_set_image(ID *id, DrawInfo *di, PreviewImage* prv_img, int mipl
}
}
- if (ri.rect) {
- memcpy(prv_img->rect[miplevel], ri.rect, pr_size);
+ memcpy(prv_img->rect[miplevel], ri.rect, pr_size);
- /* and clean up */
- MEM_freeN(ri.rect);
- ri.rect = 0;
- }
+ /* and clean up */
+ MEM_freeN(ri.rect);
}
-#endif
}
static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect)
@@ -912,14 +934,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl
PreviewImage* pi = BKE_previewimg_get((ID*)icon->obj);
if (pi) {
- if (!nocreate && (pi->changed[miplevel] ||!pi->rect[miplevel])) /* changed only ever set by dynamic icons */
- {
- // XXX waitcursor(1);
- /* create the preview rect if necessary */
- icon_set_image((ID*)icon->obj, icon->drawinfo, pi, miplevel);
- pi->changed[miplevel] = 0;
- // XXX waitcursor(0);
- }
+ /* no create icon on this level in code */
if (!pi->rect[miplevel]) return; /* something has gone wrong! */
@@ -928,6 +943,43 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, int mipl
}
}
+void ui_id_icon_render(Scene *scene, ID *id)
+{
+ PreviewImage *pi = BKE_previewimg_get(id);
+
+ if (pi) {
+ if ((pi->changed[0] ||!pi->rect[0])) /* changed only ever set by dynamic icons */
+ {
+ /* create the preview rect if necessary */
+ icon_set_image(scene, id, pi, 0);
+ pi->changed[0] = 0;
+ }
+ }
+}
+
+int ui_id_icon_get(Scene *scene, ID *id)
+{
+ int iconid= 0;
+
+ /* icon */
+ switch(GS(id->name))
+ {
+ case ID_MA: /* fall through */
+ case ID_TE: /* fall through */
+ case ID_IM: /* fall through */
+ case ID_WO: /* fall through */
+ case ID_LA: /* fall through */
+ iconid= BKE_icon_getid(id);
+ /* checks if not exists, or changed */
+ ui_id_icon_render(scene, id);
+ break;
+ default:
+ break;
+ }
+
+ return iconid;
+}
+
static void icon_draw_mipmap(float x, float y, int icon_id, float aspect, int miplevel, int nocreate)
{
int draw_size = preview_size(miplevel);
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 18423434eef..5760a28cb5c 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -1,5 +1,5 @@
/**
- * $Id: interface.h 14444 2008-04-16 22:40:48Z hos $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -44,12 +44,17 @@ struct uiStyle;
struct uiWidgetColors;
struct uiLayout;
struct bContextStore;
+struct Scene;
+struct ID;
/* ****************** general defines ************** */
/* visual types for drawing */
/* for time being separated from functional types */
typedef enum {
+ /* default */
+ UI_WTYPE_REGULAR,
+
/* standard set */
UI_WTYPE_LABEL,
UI_WTYPE_TOGGLE,
@@ -78,7 +83,8 @@ typedef enum {
UI_WTYPE_SWATCH,
UI_WTYPE_RGB_PICKER,
UI_WTYPE_NORMAL,
- UI_WTYPE_BOX
+ UI_WTYPE_BOX,
+ UI_WTYPE_SCROLL
} uiWidgetTypeEnum;
@@ -98,7 +104,7 @@ typedef enum {
#define UI_ACTIVE 4
#define UI_HAS_ICON 8
#define UI_TEXTINPUT 16
-
+#define UI_HIDDEN 32
/* warn: rest of uiBut->flag in UI_interface.h */
/* internal panel drawing defines */
@@ -181,6 +187,7 @@ struct uiBut {
void *search_arg;
uiLink *link;
+ short linkto[2];
char *tip, *lockstr;
@@ -204,6 +211,9 @@ struct uiBut {
struct PropertyRNA *rnaprop;
int rnaindex;
+ struct PointerRNA rnasearchpoin;
+ struct PropertyRNA *rnasearchprop;
+
/* Operator data */
struct wmOperatorType *optype;
int opcontext;
@@ -254,6 +264,9 @@ struct uiBlock {
uiBlockHandleFunc handle_func;
void *handle_func_arg;
+ /* custom extra handling */
+ int (*block_event_func)(const struct bContext *C, struct uiBlock *, struct wmEvent *);
+
/* extra draw function for custom blocks */
void (*drawextra)(const struct bContext *C, void *idv, rcti *rect);
@@ -277,6 +290,8 @@ struct uiBlock {
int tooltipdisabled; // to avoid tooltip after click
int active; // to keep blocks while drawing and free them afterwards
+
+ void *evil_C; // XXX hack for dynamic operator enums
};
typedef struct uiSafetyRct {
@@ -306,6 +321,8 @@ extern void ui_set_but_hsv(uiBut *but);
extern void ui_get_but_vectorf(uiBut *but, float *vec);
extern void ui_set_but_vectorf(uiBut *but, float *vec);
+extern void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float mx, float my);
+
extern void ui_get_but_string(uiBut *but, char *str, int maxlen);
extern int ui_set_but_string(struct bContext *C, uiBut *but, const char *str);
extern int ui_get_but_string_max_length(uiBut *but);
@@ -357,7 +374,9 @@ void ui_tooltip_free(struct bContext *C, struct ARegion *ar);
/* 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);
void ui_searchbox_update(struct bContext *C, struct ARegion *ar, uiBut *but, int reset);
+void ui_searchbox_autocomplete(struct bContext *C, struct ARegion *ar, uiBut *but, char *str);
void ui_searchbox_event(struct bContext *C, struct ARegion *ar, uiBut *but, struct wmEvent *event);
void ui_searchbox_apply(uiBut *but, struct ARegion *ar);
void ui_searchbox_free(struct bContext *C, struct ARegion *ar);
@@ -402,17 +421,22 @@ extern int ui_button_is_active(struct ARegion *ar);
void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3);
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect);
+void ui_draw_link_bezier(rcti *rect);
extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect);
/* theme color init */
struct ThemeUI;
void ui_widget_color_init(struct ThemeUI *tui);
-void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, char *name, int state);
+void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, char *name, int iconid, int state);
/* interface_style.c */
void uiStyleInit(void);
+/* interface_icons.c */
+void ui_id_icon_render(struct Scene *scene, struct ID *id);
+int ui_id_icon_get(struct Scene *scene, struct ID *id);
+
/* resources.c */
void init_userdef_do_versions(void);
void ui_theme_init_userdef(void);
@@ -420,8 +444,9 @@ void ui_resources_init(void);
void ui_resources_free(void);
/* interface_layout.c */
-void ui_layout_add_but(struct uiLayout *layout, uiBut *but);
+void ui_layout_add_but(uiLayout *layout, uiBut *but);
int ui_but_can_align(uiBut *but);
+void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop);
/* interface_anim.c */
void ui_but_anim_flag(uiBut *but, float cfra);
@@ -430,6 +455,9 @@ 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_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);
+void ui_but_anim_autokey(uiBut *but, struct Scene *scene, float cfra);
#endif
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 723e48e5970..284da29f0d2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -427,35 +427,57 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
uiBlockSetCurLayout(block, layout);
}
-static void ui_item_enum_row(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int x, int y, int w, int h)
+static void ui_item_enum_row(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, char *uiname, int x, int y, int w, int h)
{
- const EnumPropertyItem *item;
- int a, totitem, itemw;
- const char *propname;
+ EnumPropertyItem *item;
+ const char *identifier;
+ char *name;
+ int a, totitem, itemw, icon, value, free;
- propname= RNA_property_identifier(prop);
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ identifier= RNA_property_identifier(prop);
+ RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
uiBlockSetCurLayout(block, ui_item_local_sublayout(layout, layout, 1));
for(a=0; a<totitem; a++) {
- itemw= ui_text_icon_width(block->curlayout, (char*)item[a].name, 0);
- uiDefButR(block, ROW, 0, NULL, 0, 0, itemw, h, ptr, propname, -1, 0, item[a].value, -1, -1, NULL);
+ if(!item[a].identifier[0])
+ continue;
+
+ name= (!uiname || uiname[0])? (char*)item[a].name: "";
+ icon= item[a].icon;
+ value= item[a].value;
+ itemw= ui_text_icon_width(block->curlayout, name, icon);
+
+ if(icon && strcmp(name, "") != 0)
+ uiDefIconTextButR(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, identifier, -1, 0, value, -1, -1, NULL);
+ else if(icon)
+ uiDefIconButR(block, ROW, 0, icon, 0, 0, itemw, h, ptr, identifier, -1, 0, value, -1, -1, NULL);
+ else
+ uiDefButR(block, ROW, 0, name, 0, 0, itemw, h, ptr, identifier, -1, 0, value, -1, -1, NULL);
}
uiBlockSetCurLayout(block, layout);
+
+ if(free)
+ MEM_freeN(item);
}
/* create label + button for RNA property */
-static void ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int x, int y, int w, int h)
+static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int x, int y, int w, int h)
{
uiLayout *sub;
+ uiBut *but;
PropertySubType subtype;
+ int labelw;
sub= uiLayoutRow(layout, 0);
uiBlockSetCurLayout(block, sub);
if(strcmp(name, "") != 0) {
- w= w/2;
- uiDefBut(block, LABEL, 0, name, x, y, w, h, NULL, 0.0, 0.0, 0, 0, "");
+ /* XXX UI_GetStringWidth is not accurate
+ labelw= UI_GetStringWidth(name);
+ CLAMP(labelw, w/4, 3*w/4);*/
+ labelw= w/2;
+ uiDefBut(block, LABEL, 0, name, x, y, labelw, h, NULL, 0.0, 0.0, 0, 0, "");
+ w= w-labelw;
}
subtype= RNA_property_subtype(prop);
@@ -463,12 +485,13 @@ static void ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, int
if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) {
uiBlockSetCurLayout(block, uiLayoutRow(sub, 1));
uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h);
- uiDefIconBut(block, BUT, 0, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "DUMMY file select button"); /* XXX */
+ but= uiDefIconBut(block, BUT, 0, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "DUMMY file select button"); /* XXX */
}
else
- uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w, h);
+ but= uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w, h);
uiBlockSetCurLayout(block, layout);
+ return but;
}
/********************* Button Items *************************/
@@ -497,7 +520,7 @@ static void ui_item_disabled(uiLayout *layout, char *name)
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);
+ wmOperatorType *ot= WM_operatortype_find(idname, 0);
uiBut *but;
int w;
@@ -530,9 +553,9 @@ void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDPropert
}
}
-static char *ui_menu_enumpropname(char *opname, char *propname, int retval)
+static char *ui_menu_enumpropname(uiLayout *layout, char *opname, char *propname, int retval)
{
- wmOperatorType *ot= WM_operatortype_find(opname);
+ wmOperatorType *ot= WM_operatortype_find(opname, 0);
PointerRNA ptr;
PropertyRNA *prop;
@@ -543,15 +566,18 @@ static char *ui_menu_enumpropname(char *opname, char *propname, int retval)
prop= RNA_struct_find_property(&ptr, propname);
if(prop) {
- const EnumPropertyItem *item;
- int totitem, i;
-
- RNA_property_enum_items(&ptr, prop, &item, &totitem);
-
- for (i=0; i<totitem; i++) {
- if(item[i].value==retval)
- return (char*)item[i].name;
+ EnumPropertyItem *item;
+ int totitem, free;
+ const char *name;
+
+ RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, &totitem, &free);
+ if(RNA_enum_name(item, retval, &name)) {
+ if(free) MEM_freeN(item);
+ return (char*)name;
}
+
+ if(free)
+ MEM_freeN(item);
}
return "";
@@ -565,14 +591,14 @@ void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *pro
RNA_enum_set(&ptr, propname, value);
if(!name)
- name= ui_menu_enumpropname(opname, propname, value);
+ name= ui_menu_enumpropname(layout, opname, propname, value);
uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemsEnumO(uiLayout *layout, char *opname, char *propname)
{
- wmOperatorType *ot= WM_operatortype_find(opname);
+ wmOperatorType *ot= WM_operatortype_find(opname, 0);
PointerRNA ptr;
PropertyRNA *prop;
@@ -585,13 +611,19 @@ void uiItemsEnumO(uiLayout *layout, char *opname, char *propname)
prop= RNA_struct_find_property(&ptr, propname);
if(prop && RNA_property_type(prop) == PROP_ENUM) {
- const EnumPropertyItem *item;
- int totitem, i;
+ EnumPropertyItem *item;
+ int totitem, i, free;
- RNA_property_enum_items(&ptr, prop, &item, &totitem);
+ RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++)
- uiItemEnumO(layout, NULL, 0, opname, propname, item[i].value);
+ 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);
}
}
@@ -602,19 +634,22 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch
/* for getting the enum */
PropertyRNA *prop;
- const EnumPropertyItem *item;
- int totitem;
- int value;
+ EnumPropertyItem *item;
+ int value, free;
WM_operator_properties_create(&ptr, opname);
/* enum lookup */
if((prop= RNA_struct_find_property(&ptr, propname))) {
- RNA_property_enum_items(&ptr, prop, &item, &totitem);
+ RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free);
if(RNA_enum_value_from_id(item, value_str, &value)==0) {
+ if(free) MEM_freeN(item);
printf("uiItemEnumO_string: %s.%s, enum %s not found.\n", RNA_struct_identifier(ptr.type), propname, value_str);
return;
}
+
+ if(free)
+ MEM_freeN(item);
}
else {
printf("uiItemEnumO_string: %s.%s not found.\n", RNA_struct_identifier(ptr.type), propname);
@@ -625,7 +660,7 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch
/* same as uiItemEnumO */
if(!name)
- name= ui_menu_enumpropname(opname, propname, value);
+ name= ui_menu_enumpropname(layout, opname, propname, value);
uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
@@ -683,14 +718,17 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA
PropertySubType subtype;
int len, w, h;
- w= ui_text_icon_width(layout, name, icon);
- h= UI_UNIT_Y;
-
/* arbitrary extended width by type */
type= RNA_property_type(prop);
subtype= RNA_property_subtype(prop);
len= RNA_property_array_length(prop);
+ if(ELEM(type, PROP_STRING, PROP_POINTER) && strcmp(name, "") == 0)
+ name= "non-empty";
+
+ w= ui_text_icon_width(layout, name, icon);
+ h= UI_UNIT_Y;
+
/* increase height for arrays */
if(index == RNA_NO_INDEX && len > 0) {
if(strcmp(name, "") == 0 && icon == 0)
@@ -706,6 +744,8 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA
else if(ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
if(type == PROP_BOOLEAN && strcmp(name, "") != 0)
w += UI_UNIT_X;
+ else if(type == PROP_ENUM)
+ w += UI_UNIT_X/2;
}
*r_w= w;
@@ -732,10 +772,14 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
/* set name and icon */
if(!name)
name= (char*)RNA_property_ui_name(prop);
+ if(!icon)
+ icon= RNA_property_ui_icon(prop);
- if(ELEM5(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_ENUM, PROP_POINTER))
+ if(ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER))
+ name= ui_item_name_add_colon(name, namestr);
+ else if(type == PROP_BOOLEAN && len)
name= ui_item_name_add_colon(name, namestr);
- if(type == PROP_BOOLEAN && len)
+ else if(type == PROP_ENUM && index != RNA_ENUM_VALUE)
name= ui_item_name_add_colon(name, namestr);
if(layout->root->type == UI_LAYOUT_MENU) {
@@ -764,10 +808,12 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
}
/* expanded enum */
else if(type == PROP_ENUM && expand)
- ui_item_enum_row(layout, block, ptr, prop, 0, 0, w, h);
+ ui_item_enum_row(layout, block, ptr, prop, name, 0, 0, w, h);
/* property with separate label */
- else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER)
- ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h);
+ else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
+ but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h);
+ ui_but_add_search(but, ptr, prop, NULL, NULL);
+ }
/* single button */
else {
but= uiDefAutoButR(block, ptr, prop, index, (char*)name, icon, 0, 0, w, h);
@@ -807,15 +853,52 @@ void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr,
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if(!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
- printf("uiItemEnumR: property not found: %s\n", propname);
+ printf("uiItemEnumR: enum property not found: %s\n", propname);
return;
}
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)
+{
+ PropertyRNA *prop;
+ EnumPropertyItem *item;
+ int ivalue, a, free;
+
+ if(!ptr->data || !propname)
+ return;
+
+ prop= RNA_struct_find_property(ptr, propname);
+
+ if(!prop || RNA_property_type(prop) != PROP_ENUM) {
+ ui_item_disabled(layout, propname);
+ printf("uiItemEnumR: enum property not found: %s\n", propname);
+ return;
+ }
+
+ RNA_property_enum_items(layout->root->block->evil_C, ptr, prop, &item, NULL, &free);
+
+ if(!RNA_enum_value_from_id(item, value, &ivalue)) {
+ if(free) MEM_freeN(item);
+ ui_item_disabled(layout, propname);
+ printf("uiItemEnumR: enum property value not found: %s\n", value);
+ return;
+ }
+
+ 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, 0, 0);
+ break;
+ }
+ }
+
+ if(free)
+ MEM_freeN(item);
+}
+
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname)
{
PropertyRNA *prop;
@@ -828,16 +911,158 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname)
}
if(RNA_property_type(prop) == PROP_ENUM) {
- const EnumPropertyItem *item;
- int totitem, i;
+ EnumPropertyItem *item;
+ int totitem, i, free;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(layout->root->block->evil_C, ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++)
- uiItemEnumR(layout, (char*)item[i].name, 0, ptr, propname, item[i].value);
+ 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);
+ }
+}
+
+/* Pointer RNA button with search */
+
+static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, uiSearchItems *items)
+{
+ Scene *scene= CTX_data_scene(C);
+ uiBut *but= arg_but;
+ char *name;
+ int i, iconid;
+
+ i = 0;
+ RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) {
+ iconid= 0;
+ if(RNA_struct_is_ID(itemptr.type))
+ iconid= ui_id_icon_get(scene, itemptr.data);
+
+ name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
+
+ if(name) {
+ if(BLI_strcasestr(name, str)) {
+ if(!uiSearchItemAdd(items, name, SET_INT_IN_POINTER(i), iconid)) {
+ MEM_freeN(name);
+ break;
+ }
+ }
+
+ MEM_freeN(name);
+ }
+
+ i++;
+ }
+ RNA_PROP_END;
+}
+
+static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA **prop)
+{
+ StructRNA *srna;
+
+ /* look for collection property in Main */
+ RNA_main_pointer_create(G.main, ptr);
+
+ *prop= NULL;
+
+ RNA_STRUCT_BEGIN(ptr, iprop) {
+ /* if it's a collection and has same pointer type, we've got it */
+ if(RNA_property_type(iprop) == PROP_COLLECTION) {
+ srna= RNA_property_pointer_type(ptr, iprop);
+
+ if(ptype == srna) {
+ *prop= iprop;
+ break;
+ }
+ }
+ }
+ RNA_STRUCT_END;
+}
+
+void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop)
+{
+ StructRNA *ptype;
+ PointerRNA sptr;
+
+ /* for ID's we do automatic lookup */
+ if(!searchprop) {
+ if(RNA_property_type(prop) == PROP_POINTER) {
+ ptype= RNA_property_pointer_type(ptr, prop);
+ search_id_collection(ptype, &sptr, &searchprop);
+ searchptr= &sptr;
+ }
+ }
+
+ /* turn button into search button */
+ if(searchprop) {
+ but->type= SEARCH_MENU;
+ but->hardmax= MAX2(but->hardmax, 256);
+ but->rnasearchpoin= *searchptr;
+ but->rnasearchprop= searchprop;
+ but->flag |= UI_ICON_LEFT|UI_TEXT_LEFT;
+
+ uiButSetSearchFunc(but, rna_search_cb, but, NULL, NULL);
}
}
+void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname)
+{
+ PropertyRNA *prop, *searchprop;
+ PropertyType type;
+ uiBut *but;
+ uiBlock *block;
+ StructRNA *icontype;
+ int w, h;
+
+ /* validate arguments */
+ if(!ptr->data || !searchptr->data)
+ return;
+
+ prop= RNA_struct_find_property(ptr, propname);
+
+ if(!prop) {
+ printf("uiItemPointerR: property not found: %s\n", propname);
+ return;
+ }
+
+ type= RNA_property_type(prop);
+ if(!ELEM(type, PROP_POINTER, PROP_STRING)) {
+ printf("uiItemPointerR: property %s must be a pointer or string.\n", propname);
+ return;
+ }
+
+ searchprop= RNA_struct_find_property(searchptr, searchpropname);
+
+ if(!searchprop || RNA_property_type(searchprop) != PROP_COLLECTION) {
+ printf("uiItemPointerR: search collection property not found: %s\n", searchpropname);
+ return;
+ }
+
+ /* get icon & name */
+ if(!icon) {
+ if(type == PROP_POINTER)
+ icontype= RNA_property_pointer_type(ptr, prop);
+ else
+ icontype= RNA_property_pointer_type(searchptr, searchprop);
+
+ icon= RNA_struct_ui_icon(icontype);
+ }
+ if(!name)
+ name= (char*)RNA_property_ui_name(prop);
+
+ /* create button */
+ block= uiLayoutGetBlock(layout);
+
+ 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);
+}
+
/* menu item */
static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
{
@@ -858,7 +1083,7 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun
uiBlockSetCurLayout(block, layout);
if(layout->root->type == UI_LAYOUT_HEADER)
- uiBlockSetEmboss(block, UI_EMBOSSP);
+ uiBlockSetEmboss(block, UI_EMBOSS);
if(!name)
name= "";
@@ -869,7 +1094,7 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun
h= UI_UNIT_Y;
if(layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */
- w -= 3;
+ w -= 10;
if(icon)
but= uiDefIconTextMenuBut(block, func, arg, icon, (char*)name, 0, 0, w, h, "");
@@ -902,9 +1127,11 @@ void uiItemM(uiLayout *layout, bContext *C, char *name, int icon, char *menuname
if(layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL);
- break;
+ return;
}
}
+
+ printf("uiItemM: not found %s\n", menuname);
}
/* label item */
@@ -991,7 +1218,7 @@ static void menu_item_enum_opname_menu(bContext *C, uiLayout *layout, void *arg)
void uiItemMenuEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname)
{
- wmOperatorType *ot= WM_operatortype_find(opname);
+ wmOperatorType *ot= WM_operatortype_find(opname, 0);
MenuItemLevel *lvl;
if(!ot || !ot->srna) {
@@ -1068,7 +1295,7 @@ static void ui_litem_estimate_row(uiLayout *litem)
static int ui_litem_min_width(int itemw)
{
- return MIN2(UI_UNIT_X, itemw);
+ return MIN2(2*UI_UNIT_X, itemw);
}
static void ui_litem_layout_row(uiLayout *litem)
@@ -1255,7 +1482,6 @@ static void ui_litem_layout_box(uiLayout *litem)
h= litem->h;
litem->x += style->boxspace;
- litem->y -= style->boxspace;
if(w != 0) litem->w -= 2*style->boxspace;
if(h != 0) litem->h -= 2*style->boxspace;
@@ -1336,6 +1562,7 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
}
}
+ litem->w= x;
litem->h= litem->y - miny;
}
@@ -1441,9 +1668,9 @@ static void ui_litem_layout_free(uiLayout *litem)
totw -= minx;
toth -= miny;
- if(litem->w && totw > litem->w)
+ if(litem->w && totw > 0)
scalex= (float)litem->w/(float)totw;
- if(litem->h && toth > litem->h)
+ if(litem->h && toth > 0)
scaley= (float)litem->h/(float)toth;
x= litem->x;
@@ -1454,15 +1681,15 @@ static void ui_litem_layout_free(uiLayout *litem)
ui_item_size(item, &itemw, &itemh);
if(scalex != 1.0f) {
- newx= itemx*scalex;
- itemw= (itemx + itemw)*scalex - newx;
- itemx= newx;
+ newx= (itemx - minx)*scalex;
+ itemw= (itemx - minx + itemw)*scalex - newx;
+ itemx= minx + newx;
}
if(scaley != 1.0f) {
- newy= itemy*scaley;
- itemh= (itemy + itemh)*scaley - newy;
- itemy= newy;
+ newy= (itemy - miny)*scaley;
+ itemh= (itemy - miny + itemh)*scaley - newy;
+ itemy= miny + newy;
}
ui_item_position(item, x+itemx-minx, y+itemy-miny, itemw, itemh);
@@ -1484,6 +1711,7 @@ static void ui_litem_layout_split(uiLayout *litem)
{
uiLayoutItemSplt *split= (uiLayoutItemSplt*)litem;
uiItem *item;
+ float percentage;
int itemh, x, y, w, tot=0, colw=0;
x= litem->x;
@@ -1495,8 +1723,10 @@ static void ui_litem_layout_split(uiLayout *litem)
if(tot == 0)
return;
+ percentage= (split->percentage == 0.0f)? 1.0f/(float)tot: split->percentage;
+
w= (litem->w - (tot-1)*litem->space);
- colw= w*split->percentage;
+ colw= w*percentage;
colw= MAX2(colw, 0);
for(item=litem->items.first; item; item=item->next) {
@@ -1506,7 +1736,7 @@ static void ui_litem_layout_split(uiLayout *litem)
x += colw;
if(item->next) {
- colw= (w - (w*split->percentage))/(tot-1);
+ colw= (w - (int)(w*percentage))/(tot-1);
colw= MAX2(colw, 0);
x += litem->space;
@@ -1637,7 +1867,7 @@ uiLayout *uiLayoutSplit(uiLayout *layout, float percentage)
split->litem.enabled= 1;
split->litem.context= layout->context;
split->litem.space= layout->root->style->columnspace;
- split->percentage= (percentage == 0.0f)? 0.5f: percentage;
+ split->percentage= percentage;
BLI_addtail(&layout->items, split);
uiBlockSetCurLayout(layout->root->block, &split->litem);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 278f7c026b1..a3c456c0a93 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -69,6 +69,8 @@
#define PNL_ACTIVE 2
#define PNL_WAS_ACTIVE 4
#define PNL_ANIM_ALIGN 8
+#define PNL_NEW_ADDED 16
+#define PNL_FIRST 32
typedef enum uiHandlePanelState {
PANEL_STATE_DRAG,
@@ -102,7 +104,9 @@ static int panel_aligned(ScrArea *sa, ARegion *ar)
SpaceButs *sbuts= sa->spacedata.first;
return sbuts->align;
}
- else if(ar->regiontype==RGN_TYPE_UI)
+ else if(sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
+ return BUT_VERTICAL;
+ else if(ELEM3(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS))
return BUT_VERTICAL;
return 0;
@@ -124,6 +128,8 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
}
else if(ar->regiontype==RGN_TYPE_UI)
return 1;
+ else if(sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
+ return 1;
/* in case panel is added or disappears */
for(pa=ar->panels.first; pa; pa=pa->next) {
@@ -157,18 +163,20 @@ static void ui_panel_copy_offset(Panel *pa, Panel *papar)
pa->ofsy= papar->ofsy + papar->sizey-pa->sizey;
}
-Panel *uiBeginPanel(ARegion *ar, uiBlock *block, PanelType *pt, int *open)
+Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int *open)
{
uiStyle *style= U.uistyles.first;
Panel *pa, *patab, *palast, *panext;
- char *panelname= pt->label;
- char *tabname= pt->label;
+ char *drawname= pt->label;
+ char *idname= pt->idname;
+ char *tabname= pt->idname;
char *hookname= NULL;
int newpanel;
+ int align= panel_aligned(sa, ar);
/* check if Panel exists, then use that one */
for(pa=ar->panels.first; pa; pa=pa->next)
- if(strncmp(pa->panelname, panelname, UI_MAX_NAME_STR)==0)
+ if(strncmp(pa->panelname, idname, UI_MAX_NAME_STR)==0)
if(strncmp(pa->tabname, tabname, UI_MAX_NAME_STR)==0)
break;
@@ -181,13 +189,21 @@ Panel *uiBeginPanel(ARegion *ar, uiBlock *block, PanelType *pt, int *open)
/* new panel */
pa= MEM_callocN(sizeof(Panel), "new panel");
pa->type= pt;
- BLI_strncpy(pa->panelname, panelname, UI_MAX_NAME_STR);
+ BLI_strncpy(pa->panelname, idname, UI_MAX_NAME_STR);
BLI_strncpy(pa->tabname, tabname, UI_MAX_NAME_STR);
+
+ if(pt->flag & PNL_DEFAULT_CLOSED) {
+ if(align == BUT_VERTICAL)
+ pa->flag |= PNL_CLOSEDY;
+ else
+ pa->flag |= PNL_CLOSEDX;
+ }
pa->ofsx= 0;
pa->ofsy= style->panelouter;
pa->sizex= 0;
pa->sizey= 0;
+ pa->runtime_flag |= PNL_NEW_ADDED;
BLI_addtail(&ar->panels, pa);
@@ -207,6 +223,8 @@ Panel *uiBeginPanel(ARegion *ar, uiBlock *block, PanelType *pt, int *open)
}
}
+ BLI_strncpy(pa->drawname, drawname, UI_MAX_NAME_STR);
+
/* if a new panel is added, we insert it right after the panel
* that was last added. this way new panels are inserted in the
* right place between versions */
@@ -235,7 +253,6 @@ Panel *uiBeginPanel(ARegion *ar, uiBlock *block, PanelType *pt, int *open)
if(pa->flag & PNL_CLOSED) return pa;
*open= 1;
- pa->drawname[0]= 0; /* otherwise closes panels show wrong title */
return pa;
}
@@ -244,13 +261,20 @@ void uiEndPanel(uiBlock *block, int width, int height)
{
Panel *pa= block->panel;
- if(pa->sizex != width || pa->sizey != height) {
- pa->runtime_flag |= PNL_ANIM_ALIGN;
- pa->ofsy += pa->sizey-height;
+ if(pa->runtime_flag & PNL_NEW_ADDED) {
+ pa->runtime_flag &= ~PNL_NEW_ADDED;
+ pa->sizex= width;
+ pa->sizey= height;
}
+ else if(!(width == 0 || height == 0)) {
+ if(pa->sizex != width || pa->sizey != height) {
+ pa->runtime_flag |= PNL_ANIM_ALIGN;
+ pa->ofsy += pa->sizey-height;
+ }
- pa->sizex= width;
- pa->sizey= height;
+ pa->sizex= width;
+ pa->sizey= height;
+ }
}
#if 0
@@ -509,12 +533,13 @@ static void rectf_scale(rctf *rect, float scale)
/* panel integrated in buttonswindow, tool/property lists etc */
void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect)
{
- Panel *panel= block->panel, *prev;
+ Panel *panel= block->panel;
rcti headrect;
rctf itemrect;
int ofsx;
if(panel->paneltab) return;
+ if(panel->type && (panel->type->flag & PNL_NO_HEADER)) return;
/* calculate header rect */
/* + 0.001f to prevent flicker due to float inaccuracy */
@@ -522,14 +547,7 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
headrect.ymin= headrect.ymax;
headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
- /* divider only when there's a previous panel */
- prev= panel->prev;
- while(prev) {
- if(prev->runtime_flag & PNL_ACTIVE) break;
- prev= prev->prev;
- }
-
- if(panel->sortorder != 0) {
+ if(!(panel->runtime_flag & PNL_FIRST)) {
float minx= rect->xmin+5.0f/block->aspect;
float maxx= rect->xmax-5.0f/block->aspect;
float y= headrect.ymax;
@@ -627,6 +645,22 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
/************************** panel alignment *************************/
+static int get_panel_header(Panel *pa)
+{
+ if(pa->type && (pa->type->flag & PNL_NO_HEADER))
+ return 0;
+
+ return PNL_HEADER;
+}
+
+static int get_panel_size_y(uiStyle *style, Panel *pa)
+{
+ if(pa->type && (pa->type->flag & PNL_NO_HEADER))
+ return pa->sizey;
+
+ return PNL_HEADER + pa->sizey + style->panelouter;
+}
+
/* this function is needed because uiBlock and Panel itself dont
change sizey or location when closed */
static int get_panel_real_ofsy(Panel *pa)
@@ -639,8 +673,8 @@ static int get_panel_real_ofsy(Panel *pa)
static int get_panel_real_ofsx(Panel *pa)
{
- if(pa->flag & PNL_CLOSEDX) return pa->ofsx+PNL_HEADER;
- else if(pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx+PNL_HEADER;
+ if(pa->flag & PNL_CLOSEDX) return pa->ofsx+get_panel_header(pa);
+ else if(pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx+get_panel_header(pa);
else return pa->ofsx+pa->sizex;
}
@@ -745,18 +779,18 @@ int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
/* no smart other default start loc! this keeps switching f5/f6/etc compatible */
ps= panelsort;
ps->pa->ofsx= 0;
- ps->pa->ofsy= -ps->pa->sizey-PNL_HEADER-style->panelouter;
+ ps->pa->ofsy= -get_panel_size_y(style, ps->pa);
for(a=0; a<tot-1; a++, ps++) {
psnext= ps+1;
if(align==BUT_VERTICAL) {
psnext->pa->ofsx= ps->pa->ofsx;
- psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - psnext->pa->sizey-PNL_HEADER-style->panelouter;
+ psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(style, psnext->pa);
}
else {
psnext->pa->ofsx= get_panel_real_ofsx(ps->pa);
- psnext->pa->ofsy= ps->pa->ofsy + ps->pa->sizey - psnext->pa->sizey;
+ psnext->pa->ofsy= ps->pa->ofsy + get_panel_size_y(style, ps->pa) - get_panel_size_y(style, psnext->pa);
}
}
@@ -829,7 +863,7 @@ void uiEndPanels(const bContext *C, ARegion *ar)
{
ScrArea *sa= CTX_wm_area(C);
uiBlock *block;
- Panel *panot, *panew, *patest, *pa;
+ Panel *panot, *panew, *patest, *pa, *firstpa;
/* offset contents */
for(block= ar->uiblocks.first; block; block= block->next)
@@ -869,6 +903,16 @@ void uiEndPanels(const bContext *C, ARegion *ar)
uiAlignPanelStep(sa, ar, 1.0, 0);
}
+ /* tag first panel */
+ firstpa= NULL;
+ for(block= ar->uiblocks.first; block; block=block->next)
+ if(block->active && block->panel)
+ if(!firstpa || block->panel->sortorder < firstpa->sortorder)
+ firstpa= block->panel;
+
+ if(firstpa)
+ firstpa->runtime_flag |= PNL_FIRST;
+
/* draw panels, selected on top */
for(block= ar->uiblocks.first; block; block=block->next) {
if(block->active && block->panel && !(block->panel->flag & PNL_SELECT)) {
@@ -1173,6 +1217,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
{
ARegion *ar= CTX_wm_region(C);
uiBlock *block;
+ Panel *pa;
int retval, mx, my, inside_header= 0, inside_scale= 0, inside;
retval= WM_UI_HANDLER_CONTINUE;
@@ -1188,22 +1233,27 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
/* check if inside boundbox */
inside= 0;
+ pa= block->panel;
- if(block->panel && block->panel->paneltab==NULL)
- if(block->minx <= mx && block->maxx >= mx)
- if(block->miny <= my && block->maxy+PNL_HEADER >= my)
- inside= 1;
+ if(!pa || pa->paneltab!=NULL)
+ continue;
+ if(pa->type && pa->type->flag & PNL_NO_HEADER)
+ continue;
+
+ if(block->minx <= mx && block->maxx >= mx)
+ if(block->miny <= my && block->maxy+PNL_HEADER >= my)
+ inside= 1;
if(inside) {
/* clicked at panel header? */
- if(block->panel->flag & PNL_CLOSEDX) {
+ if(pa->flag & PNL_CLOSEDX) {
if(block->minx <= mx && block->minx+PNL_HEADER >= mx)
inside_header= 1;
}
else if((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) {
inside_header= 1;
}
- else if(block->panel->control & UI_PNL_SCALE) {
+ else if(pa->control & UI_PNL_SCALE) {
if(block->maxx-PNL_HEADER <= mx)
if(block->miny+PNL_HEADER >= my)
inside_scale= 1;
@@ -1215,8 +1265,8 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
ui_handle_panel_header(C, block, mx, my);
break;
}
- else if(inside_scale && !(block->panel->flag & PNL_CLOSED)) {
- panel_activate_state(C, block->panel, PANEL_STATE_DRAG_SCALE);
+ else if(inside_scale && !(pa->flag & PNL_CLOSED)) {
+ panel_activate_state(C, pa, PANEL_STATE_DRAG_SCALE);
break;
}
}
@@ -1231,7 +1281,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
int zoom=0;
/* if panel is closed, only zoom if mouse is over the header */
- if (block->panel->flag & (PNL_CLOSEDX|PNL_CLOSEDY)) {
+ if (pa->flag & (PNL_CLOSEDX|PNL_CLOSEDY)) {
if (inside_header)
zoom=1;
}
@@ -1244,7 +1294,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
SpaceLink *sl= sa->spacedata.first;
if(sa->spacetype!=SPACE_BUTS) {
- if(!(block->panel->control & UI_PNL_SCALE)) {
+ if(!(pa->control & UI_PNL_SCALE)) {
if(event->type==PADPLUSKEY) sl->blockscale+= 0.1;
else sl->blockscale-= 0.1;
CLAMP(sl->blockscale, 0.6, 1.0);
@@ -1265,6 +1315,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
/**************** window level modal panel interaction **************/
+/* note, this is modal handler and should not swallow events for animation */
static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata)
{
Panel *panel= userdata;
@@ -1280,8 +1331,6 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata)
panel_activate_state(C, panel, PANEL_STATE_ANIMATION);
else
panel_activate_state(C, panel, PANEL_STATE_EXIT);
-
- return WM_UI_HANDLER_BREAK;
}
else if(event->type == MOUSEMOVE) {
if(data->state == PANEL_STATE_WAIT_UNTAB)
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index f4b606dac72..c1129db8ebe 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -40,6 +40,7 @@
#include "BLI_dynstr.h"
#include "BKE_context.h"
+#include "BKE_icons.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_texture.h"
@@ -181,7 +182,7 @@ MenuData *decompose_menu_string(char *str)
*s= '\0';
s++;
}
- } else if (c=='|' || c=='\0') {
+ } else if (c=='|' || c == '\n' || c=='\0') {
if (nitem) {
*s= '\0';
@@ -293,19 +294,33 @@ void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
typedef struct uiTooltipData {
rcti bbox;
uiFontStyle fstyle;
- char *tip;
+ char lines[5][512];
+ int totline;
+ int toth, spaceh, lineh;
} uiTooltipData;
static void ui_tooltip_region_draw(const bContext *C, ARegion *ar)
{
uiTooltipData *data= ar->regiondata;
+ rcti bbox= data->bbox;
+ int a;
ui_draw_menu_back(U.uistyles.first, NULL, &data->bbox);
/* draw text */
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
uiStyleFontSet(&data->fstyle);
- uiStyleFontDraw(&data->fstyle, &data->bbox, data->tip);
+
+ bbox.ymax= bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth);
+ bbox.ymin= bbox.ymax - data->lineh;
+
+ for(a=0; a<data->totline; a++) {
+ if(a == 0) glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ else glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
+
+ uiStyleFontDraw(&data->fstyle, &bbox, data->lines[a]);
+ bbox.ymin -= data->lineh + data->spaceh;
+ bbox.ymax -= data->lineh + data->spaceh;
+ }
}
static void ui_tooltip_region_free(ARegion *ar)
@@ -313,7 +328,6 @@ static void ui_tooltip_region_free(ARegion *ar)
uiTooltipData *data;
data= ar->regiondata;
- MEM_freeN(data->tip);
MEM_freeN(data);
ar->regiondata= NULL;
}
@@ -324,9 +338,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
static ARegionType type;
ARegion *ar;
uiTooltipData *data;
+ IDProperty *prop;
+ char buf[512];
float fonth, fontw, aspect= but->block->aspect;
float x1f, x2f, y1f, y2f;
- int x1, x2, y1, y2, winx, winy, ofsx, ofsy;
+ int x1, x2, y1, y2, winx, winy, ofsx, ofsy, w, h, a;
if(!but->tip || strlen(but->tip)==0)
return NULL;
@@ -341,18 +357,66 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* create tooltip data */
data= MEM_callocN(sizeof(uiTooltipData), "uiTooltipData");
- data->tip= BLI_strdup(but->tip);
+
+ BLI_strncpy(data->lines[0], but->tip, sizeof(data->lines[0]));
+ data->totline= 1;
+
+ if(but->optype && !(but->block->flag & UI_BLOCK_LOOP)) {
+ /* operator keymap (not menus, they already have it) */
+ prop= (but->opptr)? but->opptr->data: NULL;
+
+ if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) {
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Shortcut: %s", buf);
+ data->totline++;
+ }
+ }
+
+ if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ /* full string */
+ ui_get_but_string(but, buf, sizeof(buf));
+ if(buf[0]) {
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Value: %s", buf);
+ data->totline++;
+ }
+ }
+
+ if(but->rnaprop) {
+ if(but->flag & UI_BUT_DRIVEN) {
+ if(ui_but_anim_expression_get(but, buf, sizeof(buf))) {
+ /* expression */
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Expression: %s", buf);
+ data->totline++;
+ }
+ }
+
+ /* rna info */
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
+ data->totline++;
+ }
/* set font, get bb */
data->fstyle= style->widget; /* copy struct */
data->fstyle.align= UI_STYLE_TEXT_CENTER;
ui_fontscale(&data->fstyle.points, aspect);
uiStyleFontSet(&data->fstyle);
- fontw= aspect * BLF_width(data->tip);
- fonth= aspect * BLF_height(data->tip);
+
+ h= BLF_height(data->lines[0]);
+
+ for(a=0, fontw=0, fonth=0; a<data->totline; a++) {
+ w= BLF_width(data->lines[a]);
+ fontw= MAX2(fontw, w);
+ fonth += (a == 0)? h: h+5;
+ }
+
+ fontw *= aspect;
+ fonth *= aspect;
ar->regiondata= data;
+ data->toth= fonth;
+ data->lineh= h*aspect;
+ data->spaceh= 5*aspect;
+
/* compute position */
ofsx= (but->block->panel)? but->block->panel->ofsx: 0;
ofsy= (but->block->panel)? but->block->panel->ofsy: 0;
@@ -433,7 +497,10 @@ struct uiSearchItems {
char **names;
void **pointers;
-
+ int *icons;
+
+ AutoComplete *autocpl;
+ void *active;
};
typedef struct uiSearchboxData {
@@ -448,8 +515,21 @@ typedef struct uiSearchboxData {
/* exported for use by search callbacks */
/* returns zero if nothing to add */
-int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin)
+int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid)
{
+ /* hijack for autocomplete */
+ if(items->autocpl) {
+ autocomplete_do_name(items->autocpl, name);
+ return 1;
+ }
+
+ /* hijack for finding active item */
+ if(items->active) {
+ if(poin==items->active)
+ items->offset_i= items->totitem;
+ items->totitem++;
+ return 1;
+ }
if(items->totitem>=items->maxitem) {
items->more= 1;
@@ -464,6 +544,7 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin)
BLI_strncpy(items->names[items->totitem], name, items->maxstrlen);
items->pointers[items->totitem]= poin;
+ items->icons[items->totitem]= iconid;
items->totitem++;
@@ -520,6 +601,14 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr)
}
+/* x and y in screencoords */
+int ui_searchbox_inside(ARegion *ar, int x, int y)
+{
+ uiSearchboxData *data= ar->regiondata;
+
+ return(BLI_in_rcti(&data->bbox, x-ar->winrct.xmin, y-ar->winrct.ymin));
+}
+
/* string validated to be of correct length (but->hardmax) */
void ui_searchbox_apply(uiBut *but, ARegion *ar)
{
@@ -580,20 +669,52 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
/* reset vars */
data->items.totitem= 0;
data->items.more= 0;
- if(reset==0)
+ if(reset==0) {
data->items.offset_i= data->items.offset;
+ }
else {
data->items.offset_i= data->items.offset= 0;
data->active= 0;
+
+ /* handle active */
+ if(but->search_func && but->func_arg2) {
+ data->items.active= but->func_arg2;
+ but->search_func(C, but->search_arg, but->editstr, &data->items);
+ data->items.active= NULL;
+
+ /* found active item, calculate real offset by centering it */
+ if(data->items.totitem) {
+ /* first case, begin of list */
+ if(data->items.offset_i < data->items.maxitem) {
+ data->active= data->items.offset_i+1;
+ data->items.offset_i= 0;
+ }
+ else {
+ /* second case, end of list */
+ if(data->items.totitem - data->items.offset_i <= data->items.maxitem) {
+ data->active= 1 + data->items.offset_i - data->items.totitem + data->items.maxitem;
+ data->items.offset_i= data->items.totitem - data->items.maxitem;
+ }
+ else {
+ /* center active item */
+ data->items.offset_i -= data->items.maxitem/2;
+ data->active= 1 + data->items.maxitem/2;
+ }
+ }
+ }
+ data->items.offset= data->items.offset_i;
+ data->items.totitem= 0;
+ }
}
/* callback */
if(but->search_func)
but->search_func(C, but->search_arg, but->editstr, &data->items);
- if(reset) {
+ /* handle case where editstr is equal to one of items */
+ if(reset && data->active==0) {
int a;
- /* handle case where editstr is equal to one of items */
+
for(a=0; a<data->items.totitem; a++) {
char *cpoin= strchr(data->items.names[a], '|');
@@ -612,6 +733,18 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
ED_region_tag_redraw(ar);
}
+void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
+{
+ uiSearchboxData *data= ar->regiondata;
+
+ data->items.autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but));
+
+ but->search_func(C, but->search_arg, but->editstr, &data->items);
+
+ autocomplete_end(data->items.autocpl, str);
+ data->items.autocpl= NULL;
+}
+
static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
{
uiSearchboxData *data= ar->regiondata;
@@ -631,18 +764,21 @@ static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
for(a=0; a<data->items.totitem; a++) {
ui_searchbox_butrect(&rect, data, a);
- ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], (a+1)==data->active?UI_ACTIVE:0);
+ /* widget itself */
+ ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a+1)==data->active?UI_ACTIVE:0);
}
/* indicate more */
if(data->items.more) {
+ ui_searchbox_butrect(&rect, data, data->items.maxitem-1);
glEnable(GL_BLEND);
- UI_icon_draw((data->bbox.xmax-data->bbox.xmin)/2, 8, ICON_TRIA_DOWN);
+ UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymin-9, ICON_TRIA_DOWN);
glDisable(GL_BLEND);
}
if(data->items.offset) {
+ ui_searchbox_butrect(&rect, data, 0);
glEnable(GL_BLEND);
- UI_icon_draw((data->bbox.xmax-data->bbox.xmin)/2, data->bbox.ymax-13, ICON_TRIA_UP);
+ UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymax-7, ICON_TRIA_UP);
glDisable(GL_BLEND);
}
}
@@ -658,6 +794,7 @@ static void ui_searchbox_region_free(ARegion *ar)
MEM_freeN(data->items.names[a]);
MEM_freeN(data->items.names);
MEM_freeN(data->items.pointers);
+ MEM_freeN(data->items.icons);
MEM_freeN(data);
ar->regiondata= NULL;
@@ -671,7 +808,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
uiSearchboxData *data;
float aspect= but->block->aspect;
float x1f, x2f, y1f, y2f;
- int x1, x2, y1, y2, winx, winy;
+ int x1, x2, y1, y2, winx, winy, ofsx, ofsy;
/* create area region */
ar= ui_add_temporary_region(CTX_wm_screen(C));
@@ -699,72 +836,89 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* compute position */
- x1f= but->x1 - 5; /* align text with button */
- x2f= but->x2 + 5; /* symmetrical */
if(but->block->flag & UI_BLOCK_LOOP) {
+ /* this case is search menu inside other menu */
+ /* we copy region size */
+
+ ar->winrct= butregion->winrct;
+
+ /* widget rect, in region coords */
+ data->bbox.xmin= MENU_SHADOW_SIDE;
+ data->bbox.xmax= (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE;
+ data->bbox.ymin= MENU_SHADOW_BOTTOM;
+ data->bbox.ymax= (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM;
+
/* check if button is lower half */
if( but->y2 < (but->block->minx+but->block->maxx)/2 ) {
- y1f= but->y2;
- y2f= y1f + uiSearchBoxhHeight();
+ data->bbox.ymin += (but->y2-but->y1);
}
else {
- y2f= but->y1;
- y1f= y2f - uiSearchBoxhHeight();
+ data->bbox.ymax -= (but->y2-but->y1);
}
}
else {
+ x1f= but->x1 - 5; /* align text with button */
+ x2f= but->x2 + 5; /* symmetrical */
y2f= but->y1;
y1f= y2f - uiSearchBoxhHeight();
- }
-
- /* minimal width */
- if(x2f - x1f < 150) x2f= x1f+150; // XXX arbitrary
-
- /* copy to int, gets projected if possible too */
- x1= x1f; y1= y1f; x2= x2f; y2= y2f;
+
+ ofsx= (but->block->panel)? but->block->panel->ofsx: 0;
+ ofsy= (but->block->panel)? but->block->panel->ofsy: 0;
+
+ x1f += ofsx;
+ x2f += ofsx;
+ y1f += ofsy;
+ y2f += ofsy;
- if(butregion) {
- if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
- UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1);
- UI_view2d_to_region_no_clip(&butregion->v2d, x2f, y2f, &x2, &y2);
+ /* minimal width */
+ if(x2f - x1f < 150) x2f= x1f+150; // XXX arbitrary
+
+ /* copy to int, gets projected if possible too */
+ x1= x1f; y1= y1f; x2= x2f; y2= y2f;
+
+ if(butregion) {
+ if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
+ UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1);
+ UI_view2d_to_region_no_clip(&butregion->v2d, x2f, y2f, &x2, &y2);
+ }
+
+ x1 += butregion->winrct.xmin;
+ x2 += butregion->winrct.xmin;
+ y1 += butregion->winrct.ymin;
+ y2 += butregion->winrct.ymin;
}
- x1 += butregion->winrct.xmin;
- x2 += butregion->winrct.xmin;
- y1 += butregion->winrct.ymin;
- y2 += butregion->winrct.ymin;
- }
-
- wm_window_get_size(CTX_wm_window(C), &winx, &winy);
-
- if(x2 > winx) {
- /* super size */
- if(x2 > winx + x1) {
- x2= winx;
- x1= 0;
+ wm_window_get_size(CTX_wm_window(C), &winx, &winy);
+
+ if(x2 > winx) {
+ /* super size */
+ if(x2 > winx + x1) {
+ x2= winx;
+ x1= 0;
+ }
+ else {
+ x1 -= x2-winx;
+ x2= winx;
+ }
}
- else {
- x1 -= x2-winx;
- x2= winx;
+ if(y1 < 0) {
+ y1 += 36;
+ y2 += 36;
}
- }
- if(y1 < 0) {
- y1 += 36;
- y2 += 36;
+
+ /* widget rect, in region coords */
+ data->bbox.xmin= MENU_SHADOW_SIDE;
+ data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
+ data->bbox.ymin= MENU_SHADOW_BOTTOM;
+ data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
+
+ /* region bigger for shadow */
+ ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
+ ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
+ ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
+ ar->winrct.ymax= y2;
}
- /* widget rect, in region coords */
- data->bbox.xmin= MENU_SHADOW_SIDE;
- data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
- data->bbox.ymin= MENU_SHADOW_BOTTOM;
- data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
-
- /* region bigger for shadow */
- ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
- ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
- ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
- ar->winrct.ymax= y2;
-
/* adds subwindow */
ED_region_init(C, ar);
@@ -777,6 +931,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
data->items.totitem= 0;
data->items.names= MEM_callocN(SEARCH_ITEMS*sizeof(void *), "search names");
data->items.pointers= MEM_callocN(SEARCH_ITEMS*sizeof(void *), "search pointers");
+ data->items.icons= MEM_callocN(SEARCH_ITEMS*sizeof(int), "search icons");
for(x1=0; x1<SEARCH_ITEMS; x1++)
data->items.names[x1]= MEM_callocN(but->hardmax+1, "search pointers");
@@ -1368,14 +1523,14 @@ static void update_picker_hex(uiBlock *block, float *rgb)
// this updates button strings, is hackish... but button pointers are on stack of caller function
for(bt= block->buttons.first; bt; bt= bt->next) {
- if(strcmp(bt->str, "Hex: ")==0) {
+ if(strcmp(bt->str, "Hex: ")==0)
strcpy(bt->poin, col);
- ui_check_but(bt);
- break;
- }
+
+ ui_check_but(bt);
}
}
+/* also used by small picker, be careful with name checks below... */
void ui_update_block_buts_hsv(uiBlock *block, float *hsv)
{
uiBut *bt;
@@ -1389,7 +1544,7 @@ void ui_update_block_buts_hsv(uiBlock *block, float *hsv)
update_picker_hex(block, rgb);
for(bt= block->buttons.first; bt; bt= bt->next) {
- if(bt->type==HSVCUBE) {
+ if(ELEM(bt->type, HSVCUBE, HSVCIRCLE)) {
VECCOPY(bt->hsv, hsv);
ui_set_but_hsv(bt);
}
@@ -1413,6 +1568,8 @@ void ui_update_block_buts_hsv(uiBlock *block, float *hsv)
ui_set_but_val(bt, hsv[2]);
}
}
+
+ ui_check_but(bt);
}
}
@@ -1454,6 +1611,8 @@ static void ui_update_block_buts_hex(uiBlock *block, char *hexcol)
ui_set_but_val(bt, v);
}
}
+
+ ui_check_but(bt);
}
}
@@ -1463,6 +1622,7 @@ static void do_palette_cb(bContext *C, void *bt1, void *col1)
{
wmWindow *win= CTX_wm_window(C);
uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
float *col= (float *)col1;
float *fp, hsv[3];
@@ -1478,6 +1638,18 @@ static void do_palette_cb(bContext *C, void *bt1, void *col1)
rgb_to_hsv(col[0], col[1], col[2], hsv, hsv+1, hsv+2);
ui_update_block_buts_hsv(but1->block, hsv);
update_picker_hex(but1->block, col);
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
+}
+
+static void do_hsv_cb(bContext *C, void *bt1, void *unused)
+{
+ uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
}
/* bt1 is num but, hsv1 is pointer to original color in hsv space*/
@@ -1485,6 +1657,7 @@ static void do_palette_cb(bContext *C, void *bt1, void *col1)
static void do_palette1_cb(bContext *C, void *bt1, void *hsv1)
{
uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
float *hsv= (float *)hsv1;
float *fp= NULL;
@@ -1497,6 +1670,9 @@ static void do_palette1_cb(bContext *C, void *bt1, void *hsv1)
rgb_to_hsv(fp[0], fp[1], fp[2], hsv, hsv+1, hsv+2);
}
ui_update_block_buts_hsv(but1->block, hsv);
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
}
/* bt1 is num but, col1 is pointer to original color */
@@ -1504,6 +1680,7 @@ static void do_palette1_cb(bContext *C, void *bt1, void *hsv1)
static void do_palette2_cb(bContext *C, void *bt1, void *col1)
{
uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
float *rgb= (float *)col1;
float *fp= NULL;
@@ -1516,14 +1693,21 @@ static void do_palette2_cb(bContext *C, void *bt1, void *col1)
hsv_to_rgb(fp[0], fp[1], fp[2], rgb, rgb+1, rgb+2);
}
ui_update_block_buts_hsv(but1->block, fp);
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
}
static void do_palette_hex_cb(bContext *C, void *bt1, void *hexcl)
{
uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
char *hexcol= (char *)hexcl;
ui_update_block_buts_hex(but1->block, hexcol);
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
}
/* used for both 3d view and image window */
@@ -1606,8 +1790,10 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch
// the cube intersection
bt= uiDefButF(block, HSVCUBE, retval, "", 0,DPICK+BPICK,FPICK,FPICK, col, 0.0, 0.0, 2, 0, "");
+ uiButSetFunc(bt, do_hsv_cb, bt, NULL);
bt= uiDefButF(block, HSVCUBE, retval, "", 0,0,FPICK,BPICK, col, 0.0, 0.0, 3, 0, "");
+ uiButSetFunc(bt, do_hsv_cb, bt, NULL);
// palette
@@ -1657,22 +1843,206 @@ void uiBlockPickerButtons(uiBlock *block, float *col, float *hsv, float *old, ch
uiBlockEndAlign(block);
}
+/* bt1 is num but, hsv1 is pointer to original color in hsv space*/
+/* callback to handle changes */
+static void do_picker_small_cb(bContext *C, void *bt1, void *hsv1)
+{
+ uiBut *but1= (uiBut *)bt1;
+ uiPopupBlockHandle *popup= but1->block->handle;
+ float *hsv= (float *)hsv1;
+ float *fp= NULL;
+
+ fp= (float *)but1->poin;
+ rgb_to_hsv(fp[0], fp[1], fp[2], hsv, hsv+1, hsv+2);
+
+ ui_update_block_buts_hsv(but1->block, hsv);
+
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
+}
+
+/* picker sizes S hsize, F full size, D spacer, B button/pallette height */
+#define SPICK1 150.0
+#define DPICK1 6.0
+
+/* only the color, a HS circle and V slider */
+static void uiBlockPickerSmall(uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval)
+{
+ uiBut *bt;
+
+ VECCOPY(old, col); // old color stored there, for palette_cb to work
+
+ /* HS circle */
+ bt= uiDefButF(block, HSVCIRCLE, retval, "", 0, 0,SPICK1,SPICK1, col, 0.0, 0.0, 0, 0, "");
+ uiButSetFunc(bt, do_picker_small_cb, bt, hsv);
+
+ /* value */
+ bt= uiDefButF(block, HSVCUBE, retval, "", SPICK1+DPICK1,0,14,SPICK1, col, 0.0, 0.0, 4, 0, "");
+ uiButSetFunc(bt, do_picker_small_cb, bt, hsv);
+}
+
+
+static void picker_new_hide_reveal(uiBlock *block, short colormode)
+{
+ uiBut *bt;
+
+ /* tag buttons */
+ for(bt= block->buttons.first; bt; bt= bt->next) {
+
+ if(bt->type==NUMSLI || bt->type==TEX) {
+ if( bt->str[1]=='e') {
+ if(colormode==2) bt->flag &= ~UI_HIDDEN;
+ else bt->flag |= UI_HIDDEN;
+ }
+ else if( ELEM3(bt->str[0], 'R', 'G', 'B')) {
+ if(colormode==0) bt->flag &= ~UI_HIDDEN;
+ else bt->flag |= UI_HIDDEN;
+ }
+ else if( ELEM3(bt->str[0], 'H', 'S', 'V')) {
+ if(colormode==1) bt->flag &= ~UI_HIDDEN;
+ else bt->flag |= UI_HIDDEN;
+ }
+ }
+ }
+}
+
+static void do_picker_new_mode_cb(bContext *C, void *bt1, void *colv)
+{
+ uiBut *bt= bt1;
+ short colormode= ui_get_but_val(bt);
+
+ picker_new_hide_reveal(bt->block, colormode);
+}
+
+
+/* a HS circle, V slider, rgb/hsv/hex sliders */
+static void uiBlockPickerNew(uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval)
+{
+ static short colormode= 0; /* temp? 0=rgb, 1=hsv, 2=hex */
+ uiBut *bt;
+ int width;
+
+ VECCOPY(old, col); // old color stored there, for palette_cb to work
+
+ /* HS circle */
+ bt= uiDefButF(block, HSVCIRCLE, retval, "", 0, 0,SPICK1,SPICK1, col, 0.0, 0.0, 0, 0, "");
+ uiButSetFunc(bt, do_picker_small_cb, bt, hsv);
+
+ /* value */
+ bt= uiDefButF(block, HSVCUBE, retval, "", SPICK1+DPICK1,0,14,SPICK1, col, 0.0, 0.0, 4, 0, "");
+ uiButSetFunc(bt, do_picker_small_cb, bt, hsv);
+
+ /* mode */
+ width= (SPICK1+DPICK1+14)/3;
+ uiBlockBeginAlign(block);
+ bt= uiDefButS(block, ROW, retval, "RGB", 0, -30, width, 19, &colormode, 0.0, 0.0, 0, 0, "");
+ uiButSetFunc(bt, do_picker_new_mode_cb, bt, col);
+ bt= uiDefButS(block, ROW, retval, "HSV", width, -30, width, 19, &colormode, 0.0, 1.0, 0, 0, "");
+ uiButSetFunc(bt, do_picker_new_mode_cb, bt, hsv);
+ bt= uiDefButS(block, ROW, retval, "Hex", 2*width, -30, width, 19, &colormode, 0.0, 2.0, 0, 0, "");
+ uiButSetFunc(bt, do_picker_new_mode_cb, bt, hexcol);
+ uiBlockEndAlign(block);
+
+ /* sliders or hex */
+ width= (SPICK1+DPICK1+14);
+ rgb_to_hsv(col[0], col[1], col[2], hsv, hsv+1, hsv+2);
+ sprintf(hexcol, "%02X%02X%02X", (unsigned int)(col[0]*255.0), (unsigned int)(col[1]*255.0), (unsigned int)(col[2]*255.0));
+
+ uiBlockBeginAlign(block);
+ bt= uiDefButF(block, NUMSLI, 0, "R ", 0, -60, width, 19, col, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette1_cb, bt, hsv);
+ bt= uiDefButF(block, NUMSLI, 0, "G ", 0, -80, width, 19, col+1, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette1_cb, bt, hsv);
+ bt= uiDefButF(block, NUMSLI, 0, "B ", 0, -100, width, 19, col+2, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette1_cb, bt, hsv);
+ uiBlockEndAlign(block);
+
+ uiBlockBeginAlign(block);
+ bt= uiDefButF(block, NUMSLI, 0, "H ", 0, -60, width, 19, hsv, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette2_cb, bt, col);
+ bt= uiDefButF(block, NUMSLI, 0, "S ", 0, -80, width, 19, hsv+1, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette2_cb, bt, col);
+ bt= uiDefButF(block, NUMSLI, 0, "V ", 0, -100, width, 19, hsv+2, 0.0, 1.0, 10, 3, "");
+ uiButSetFunc(bt, do_palette2_cb, bt, col);
+ uiBlockEndAlign(block);
+
+ bt= uiDefBut(block, TEX, 0, "Hex: ", 0, -80, width, 19, hexcol, 0, 8, 0, 0, "Hex triplet for color (#RRGGBB)");
+ uiButSetFunc(bt, do_palette_hex_cb, bt, hexcol);
+
+ picker_new_hide_reveal(block, colormode);
+}
+
+
+static int ui_picker_small_wheel(const bContext *C, uiBlock *block, wmEvent *event)
+{
+ float add= 0.0f;
+
+ if(event->type==WHEELUPMOUSE)
+ add= 0.05f;
+ else if(event->type==WHEELDOWNMOUSE)
+ add= -0.05f;
+
+ if(add!=0.0f) {
+ uiBut *but;
+
+ for(but= block->buttons.first; but; but= but->next) {
+ if(but->type==HSVCUBE && but->active==NULL) {
+ uiPopupBlockHandle *popup= block->handle;
+ float col[3];
+
+ ui_get_but_vectorf(but, col);
+
+ rgb_to_hsv(col[0], col[1], col[2], but->hsv, but->hsv+1, but->hsv+2);
+ but->hsv[2]= CLAMPIS(but->hsv[2]+add, 0.0f, 1.0f);
+ hsv_to_rgb(but->hsv[0], but->hsv[1], but->hsv[2], col, col+1, col+2);
+
+ ui_set_but_vectorf(but, col);
+
+ ui_update_block_buts_hsv(block, but->hsv);
+ if(popup)
+ popup->menuretval= UI_RETURN_UPDATE;
+
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_but)
{
+ wmWindow *win= CTX_wm_window(C); // XXX temp, needs to become keymap to detect type?
uiBut *but= arg_but;
uiBlock *block;
static float hsvcol[3], oldcol[3];
static char hexcol[128];
block= uiBeginBlock(C, handle->region, "colorpicker", UI_EMBOSS);
- block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN;
VECCOPY(handle->retvec, but->editvec);
- uiBlockPickerButtons(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0);
-
+ if(win->eventstate->shift) {
+ uiBlockPickerButtons(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN;
+ uiBoundsBlock(block, 3);
+ }
+ else if(win->eventstate->alt) {
+ uiBlockPickerSmall(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_OUT_1;
+ uiBoundsBlock(block, 10);
+
+ block->block_event_func= ui_picker_small_wheel;
+ }
+ else {
+ uiBlockPickerNew(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN;
+ uiBoundsBlock(block, 10);
+
+ block->block_event_func= ui_picker_small_wheel;
+ }
+
+
/* and lets go */
block->direction= UI_TOP;
- uiBoundsBlock(block, 3);
return block;
}
@@ -1822,6 +2192,9 @@ uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *ar
md= decompose_menu_string(info->instr);
rows= md->nitems;
+ if(rows<1)
+ rows= 1;
+
columns= 1;
/* size and location, title slightly bigger for bold */
@@ -2131,40 +2504,6 @@ typedef struct uiMenuInfo {
/************************ Menu Definitions to uiBlocks ***********************/
-const char *ui_menu_enumpropname(char *opname, const char *propname, int retval)
-{
- wmOperatorType *ot= WM_operatortype_find(opname);
- PointerRNA ptr;
- PropertyRNA *prop;
-
- if(!ot || !ot->srna)
- return "";
-
- RNA_pointer_create(NULL, ot->srna, NULL, &ptr);
- prop= RNA_struct_find_property(&ptr, propname);
-
- if(prop) {
- const EnumPropertyItem *item;
- int totitem, i;
-
- RNA_property_enum_items(&ptr, prop, &item, &totitem);
-
- for (i=0; i<totitem; i++) {
- if(item[i].value==retval)
- return item[i].name;
- }
- }
-
- return "";
-}
-
-typedef struct MenuItemLevel {
- int opcontext;
- char *opname;
- char *propname;
- PointerRNA rnapoin;
-} MenuItemLevel;
-
static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info)
{
uiBlock *block;
@@ -2335,7 +2674,6 @@ static uiPopupBlockHandle *ui_pup_menu(bContext *C, int maxrow, uiMenuHandleFunc
return menu;
}
-
static void operator_name_cb(bContext *C, void *arg, int retval)
{
const char *opname= arg;
@@ -2456,6 +2794,8 @@ void uiPupMenuReports(bContext *C, ReportList *reports)
BLI_dynstr_appendf(ds, "Error %%i%d%%t|%s", ICON_ERROR, report->message);
else if(report->type >= RPT_WARNING)
BLI_dynstr_appendf(ds, "Warning %%i%d%%t|%s", ICON_ERROR, report->message);
+ else if(report->type >= RPT_INFO)
+ BLI_dynstr_appendf(ds, "Info %%t|%s", report->message);
}
str= BLI_dynstr_get_cstring(ds);
@@ -2474,7 +2814,7 @@ void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, char *opname, i
handle= ui_popup_block_create(C, NULL, NULL, func, NULL, arg);
handle->popup= 1;
- handle->optype= (opname)? WM_operatortype_find(opname): NULL;
+ handle->optype= (opname)? WM_operatortype_find(opname, 0): NULL;
handle->opcontext= opcontext;
UI_add_popup_handlers(C, &window->handlers, handle);
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 62a4c01bc6c..57f35f71927 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -89,8 +89,11 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
BLI_addtail(styles, style);
BLI_strncpy(style->name, name, MAX_STYLE_NAME);
+ style->panelzoom= 1.0;
+
style->paneltitle.uifont_id= UIFONT_DEFAULT;
style->paneltitle.points= 13;
+ style->paneltitle.kerning= 0;
style->paneltitle.shadow= 5;
style->paneltitle.shadx= 2;
style->paneltitle.shady= -2;
@@ -99,6 +102,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->grouplabel.uifont_id= UIFONT_DEFAULT;
style->grouplabel.points= 12;
+ style->grouplabel.kerning= 0;
style->grouplabel.shadow= 3;
style->grouplabel.shadx= 1;
style->grouplabel.shady= -1;
@@ -106,6 +110,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.uifont_id= UIFONT_DEFAULT;
style->widgetlabel.points= 11;
+ style->widgetlabel.kerning= 0;
style->widgetlabel.shadow= 3;
style->widgetlabel.shadx= 1;
style->widgetlabel.shady= -1;
@@ -114,6 +119,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widget.uifont_id= UIFONT_DEFAULT;
style->widget.points= 11;
+ style->widget.kerning= 0;
style->widget.shadowalpha= 0.25f;
style->columnspace= 5;
@@ -141,22 +147,6 @@ static uiFont *uifont_to_blfont(int id)
/* *************** draw ************************ */
-static void ui_font_shadow_draw(uiFontStyle *fs, int x, int y, char *str)
-{
- float color[4];
-
- glGetFloatv(GL_CURRENT_COLOR, color);
-
- glColor4f(fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha);
-
- BLF_blur(fs->shadow);
- BLF_position(x+fs->shadx, y+fs->shady, 0.0f);
- BLF_draw(str);
- BLF_blur(0);
-
- glColor4fv(color);
-}
-
void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str)
{
float height;
@@ -175,14 +165,23 @@ void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str)
/* clip is very strict, so we give it some space */
BLF_clipping(rect->xmin-1, rect->ymin-4, rect->xmax+1, rect->ymax+4);
BLF_enable(BLF_CLIPPING);
-
- if(fs->shadow)
- ui_font_shadow_draw(fs, rect->xmin+xofs, rect->ymin+yofs, str);
-
BLF_position(rect->xmin+xofs, rect->ymin+yofs, 0.0f);
- BLF_draw(str);
+ if (fs->shadow) {
+ BLF_enable(BLF_SHADOW);
+ BLF_shadow(fs->shadow, fs->shadowcolor, fs->shadowcolor, fs->shadowcolor, fs->shadowalpha);
+ BLF_shadow_offset(fs->shadx, fs->shady);
+ }
+
+ if (fs->kerning == 1)
+ BLF_enable(BLF_KERNING_DEFAULT);
+
+ BLF_draw(str);
BLF_disable(BLF_CLIPPING);
+ if (fs->shadow)
+ BLF_disable(BLF_SHADOW);
+ if (fs->kerning == 1)
+ BLF_disable(BLF_KERNING_DEFAULT);
}
/* ************** helpers ************************ */
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 020d442bfe6..8f25459a682 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -27,9 +27,14 @@
#include "MEM_guardedalloc.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+
#include "BLI_string.h"
#include "BKE_context.h"
+#include "BKE_icons.h"
+#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_utildefines.h"
@@ -43,6 +48,7 @@
#include "UI_interface.h"
#include "UI_resources.h"
+#include "interface_intern.h"
void ui_template_fix_linking()
{
@@ -58,61 +64,113 @@ void uiTemplateHeader(uiLayout *layout, bContext *C)
ED_area_header_standardbuttons(C, block, 0);
}
-/******************* Header ID Template ************************/
+/********************** Search Callbacks *************************/
typedef struct TemplateID {
PointerRNA ptr;
PropertyRNA *prop;
- int flag;
- short browse;
+ ListBase *idlb;
+} TemplateID;
+
+/* Search browse menu, assign */
+static void id_search_call_cb(struct bContext *C, void *arg_template, void *item)
+{
+ TemplateID *template= (TemplateID*)arg_template;
+
+ /* ID */
+ if(item) {
+ PointerRNA idptr;
+
+ RNA_id_pointer_create(item, &idptr);
+ RNA_property_pointer_set(&template->ptr, template->prop, idptr);
+ RNA_property_update(C, &template->ptr, template->prop);
+ }
+}
- char newop[256];
- char openop[256];
- char unlinkop[256];
+/* ID Search browse menu, do the search */
+static void id_search_cb(const struct bContext *C, void *arg_template, char *str, uiSearchItems *items)
+{
+ TemplateID *template= (TemplateID*)arg_template;
+ Scene *scene= CTX_data_scene(C);
+ ListBase *lb= template->idlb;
+ ID *id;
+ int iconid;
+
+ /* ID listbase */
+ for(id= lb->first; id; id= id->next) {
+ iconid= ui_id_icon_get(scene, id);
+
+ if(BLI_strcasestr(id->name+2, str))
+ if(!uiSearchItemAdd(items, id->name+2, id, iconid))
+ break;
+ }
+}
+
+/* ID Search browse menu, open */
+static uiBlock *search_menu(bContext *C, ARegion *ar, void *arg_litem)
+{
+ static char search[256];
+ static TemplateID template;
+ PointerRNA idptr;
+ wmEvent event;
+ wmWindow *win= CTX_wm_window(C);
+ uiBlock *block;
+ uiBut *but;
- short idtype;
-} TemplateID;
+ /* clear initial search string, then all items show */
+ search[0]= 0;
+ /* arg_litem is malloced, can be freed by parent button */
+ template= *((TemplateID*)arg_litem);
+
+ /* get active id for showing first item */
+ idptr= RNA_property_pointer_get(&template.ptr, template.prop);
+
+ block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
+
+ /* fake button, it holds space for search items */
+ uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
+
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, 150, 19, "");
+ uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
+
+ uiBoundsBlock(block, 6);
+ uiBlockSetDirection(block, UI_DOWN);
+ uiEndBlock(C, block);
+
+ event= *(win->eventstate); /* XXX huh huh? make api call */
+ event.type= EVT_BUT_OPEN;
+ event.val= KM_PRESS;
+ event.customdata= but;
+ event.customdatafree= FALSE;
+ wm_event_add(win, &event);
+
+ return block;
+}
+
+/************************ ID Template ***************************/
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 *idtest, *id= idptr.data;
- ListBase *lb= wich_libbase(CTX_data_main(C), template->idtype);
- int nr, event= GET_INT_FROM_POINTER(arg_event);
+ ID *id= idptr.data;
+ int event= GET_INT_FROM_POINTER(arg_event);
- if(event == UI_ID_BROWSE && template->browse == 32767)
- event= UI_ID_ADD_NEW;
- else if(event == UI_ID_BROWSE && template->browse == 32766)
- event= UI_ID_OPEN;
-
switch(event) {
- case UI_ID_BROWSE: {
- if(template->browse== -2) {
- /* XXX implement or find a replacement
- * activate_databrowse((ID *)G.buts->lockpoin, GS(id->name), 0, B_MESHBROWSE, &template->browse, do_global_buttons); */
- return;
- }
- if(template->browse < 0)
- return;
-
- for(idtest=lb->first, nr=1; idtest; idtest=idtest->next, nr++) {
- if(nr==template->browse) {
- if(id == idtest)
- return;
-
- id= idtest;
- RNA_id_pointer_create(id, &idptr);
- RNA_property_pointer_set(&template->ptr, template->prop, idptr);
- RNA_property_update(C, &template->ptr, template->prop);
- /* XXX */
-
- break;
- }
+ case UI_ID_BROWSE:
+ case UI_ID_PIN:
+ printf("warning, id event %d shouldnt come here\n", event);
+ break;
+ case UI_ID_OPEN:
+ case UI_ID_ADD_NEW:
+ if(template->idlb->last) {
+ RNA_id_pointer_create(template->idlb->last, &idptr);
+ RNA_property_pointer_set(&template->ptr, template->prop, idptr);
+ RNA_property_update(C, &template->ptr, template->prop);
}
break;
- }
case UI_ID_DELETE:
memset(&idptr, 0, sizeof(idptr));
RNA_property_pointer_set(&template->ptr, template->prop, idptr);
@@ -125,14 +183,6 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
}
else return;
break;
- case UI_ID_PIN:
- break;
- case UI_ID_ADD_NEW:
- WM_operator_name_call(C, template->newop, WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case UI_ID_OPEN:
- WM_operator_name_call(C, template->openop, WM_OP_INVOKE_REGION_WIN, NULL);
- break;
#if 0
case UI_ID_ALONE:
if(!id || id->us < 1)
@@ -148,41 +198,27 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
}
}
-static void template_header_ID(bContext *C, uiBlock *block, TemplateID *template, StructRNA *type)
+static void template_ID(bContext *C, uiBlock *block, TemplateID *template, StructRNA *type, int flag, char *newop, char *unlinkop)
{
uiBut *but;
- TemplateID *duptemplate;
PointerRNA idptr;
ListBase *lb;
idptr= RNA_property_pointer_get(&template->ptr, template->prop);
- lb= wich_libbase(CTX_data_main(C), template->idtype);
-
- if(idptr.type)
- type= idptr.type;
- if(type)
- uiDefIconBut(block, LABEL, 0, RNA_struct_ui_icon(type), 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ lb= template->idlb;
uiBlockBeginAlign(block);
- if(template->flag & UI_ID_BROWSE) {
- char *extrastr, *str;
-
- if((template->flag & UI_ID_ADD_NEW) && (template->flag & UI_ID_OPEN))
- extrastr= "OPEN NEW %x 32766 |ADD NEW %x 32767";
- else if(template->flag & UI_ID_ADD_NEW)
- extrastr= "ADD NEW %x 32767";
- else if(template->flag & UI_ID_OPEN)
- extrastr= "OPEN NEW %x 32766";
- else
- extrastr= NULL;
- duptemplate= MEM_dupallocN(template);
- IDnames_to_pupstring(&str, NULL, extrastr, lb, idptr.data, &duptemplate->browse);
+ if(idptr.type)
+ type= idptr.type;
- but= uiDefButS(block, MENU, 0, str, 0, 0, UI_UNIT_X, UI_UNIT_Y, &duptemplate->browse, 0, 0, 0, 0, "Browse existing choices, or add new");
- uiButSetNFunc(but, template_id_cb, duptemplate, SET_INT_IN_POINTER(UI_ID_BROWSE));
-
- MEM_freeN(str);
+ if(flag & UI_ID_BROWSE) {
+ but= uiDefBlockButN(block, search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, "Browse ID data");
+ if(type) {
+ but->icon= RNA_struct_ui_icon(type);
+ but->flag|= UI_HAS_ICON;
+ but->flag|= UI_ICON_LEFT;
+ }
}
/* text button with name */
@@ -193,27 +229,42 @@ static void template_header_ID(bContext *C, uiBlock *block, TemplateID *template
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));
-
- /* delete button */
- if(template->flag & UI_ID_DELETE) {
- if(template->unlinkop[0]) {
- but= uiDefIconButO(block, BUT, template->unlinkop, WM_OP_EXEC_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
- }
- else {
- 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(flag & UI_ID_ADD_NEW) {
+ int w= idptr.data?UI_UNIT_X:UI_UNIT_X*6;
+
+ if(newop) {
+ but= uiDefIconTextButO(block, BUT, newop, WM_OP_EXEC_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, "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));
+ }
+ }
+
+ /* delete button */
+ if(idptr.data && (flag & UI_ID_DELETE)) {
+ if(unlinkop) {
+ but= uiDefIconButO(block, BUT, unlinkop, WM_OP_EXEC_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
+ }
+ else {
+ 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));
}
}
+
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;
PropertyRNA *prop;
StructRNA *type;
+ int flag;
if(!ptr->data)
return;
@@ -228,26 +279,19 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
template= MEM_callocN(sizeof(TemplateID), "TemplateID");
template->ptr= *ptr;
template->prop= prop;
- template->flag= UI_ID_BROWSE|UI_ID_RENAME|UI_ID_DELETE;
- if(newop) {
- template->flag |= UI_ID_ADD_NEW;
- BLI_strncpy(template->newop, newop, sizeof(template->newop));
- }
- if(openop) {
- template->flag |= UI_ID_OPEN;
- BLI_strncpy(template->openop, openop, sizeof(template->openop));
- }
- if(unlinkop)
- BLI_strncpy(template->unlinkop, unlinkop, sizeof(template->unlinkop));
+ flag= UI_ID_BROWSE|UI_ID_RENAME|UI_ID_DELETE;
+
+ if(newop)
+ flag |= UI_ID_ADD_NEW;
type= RNA_property_pointer_type(ptr, prop);
- template->idtype = RNA_type_to_ID_code(type);
+ template->idlb= wich_libbase(CTX_data_main(C), RNA_type_to_ID_code(type));
- if(template->idtype) {
+ if(template->idlb) {
uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(layout);
- template_header_ID(C, block, template, type);
+ template_ID(C, block, template, type, flag, newop, unlinkop);
}
MEM_freeN(template);
@@ -280,125 +324,6 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
#include "ED_object.h"
-static void modifiers_del(bContext *C, void *ob_v, void *md_v)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ob_v;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_delete(&reports, ob_v, md_v)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- ED_undo_push(C, "Delete modifier");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
-static void modifiers_moveUp(bContext *C, void *ob_v, void *md_v)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ob_v;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_move_up(&reports, ob_v, md_v)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- ED_undo_push(C, "Move modifier");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
-static void modifiers_moveDown(bContext *C, void *ob_v, void *md_v)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ob_v;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_move_down(&reports, ob_v, md_v)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- ED_undo_push(C, "Move modifier");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
-static void modifiers_convertParticles(bContext *C, void *obv, void *mdv)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= obv;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_convert(&reports, scene, obv, mdv)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- ED_undo_push(C, "Convert particles to mesh object(s).");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
-static void modifiers_applyModifier(bContext *C, void *obv, void *mdv)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= obv;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_apply(&reports, scene, obv, mdv)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- ED_undo_push(C, "Apply modifier");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
-static void modifiers_copyModifier(bContext *C, void *ob_v, void *md_v)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ob_v;
- ReportList reports;
-
- BKE_reports_init(&reports, RPT_STORE);
-
- if(ED_object_modifier_copy(&reports, ob_v, md_v)) {
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- ED_undo_push(C, "Copy modifier");
- }
- else
- uiPupMenuReports(C, &reports);
-
- BKE_reports_clear(&reports);
-}
-
static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
{
Scene *scene= CTX_data_scene(C);
@@ -441,15 +366,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
static int modifier_can_delete(ModifierData *md)
{
- // deletion over the deflection panel
// fluid particle modifier can't be deleted here
-
- if(md->type==eModifierType_Fluidsim)
- return 0;
- if(md->type==eModifierType_Collision)
- return 0;
- if(md->type==eModifierType_Surface)
- return 0;
if(md->type == eModifierType_ParticleSystem)
if(((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
return 0;
@@ -463,12 +380,12 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
PointerRNA ptr;
uiBut *but;
uiBlock *block;
- uiLayout *column, *row, *subrow, *result= NULL;
- int isVirtual = md->mode&eModifierMode_Virtual;
+ uiLayout *column, *row, *result= NULL;
+ int isVirtual = md->mode & eModifierMode_Virtual;
// XXX short color = md->error?TH_REDALERT:TH_BUT_NEUTRAL;
- short width = 295, buttonWidth = width-120-10;
char str[128];
+ /* create RNA pointer */
RNA_pointer_create(&ob->id, &RNA_Modifier, md, &ptr);
column= uiLayoutColumn(layout, 1);
@@ -479,52 +396,57 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
/* roundbox 4 free variables: corner-rounding, nop, roundbox type, shade */
row= uiLayoutRow(uiLayoutBox(column), 0);
- block= uiLayoutGetBlock(row);
+ uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND);
- subrow= uiLayoutRow(row, 0);
- uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_LEFT);
+ block= uiLayoutGetBlock(row);
//uiDefBut(block, ROUNDBOX, 0, "", x-10, y-4, width, 25, NULL, 7.0, 0.0,
- // (!isVirtual && (md->mode&eModifierMode_Expanded))?3:15, 20, "");
+ // (!isVirtual && (md->mode & eModifierMode_Expanded))?3:15, 20, "");
/* XXX uiBlockSetCol(block, TH_AUTO); */
/* open/close icon */
- if (!isVirtual) {
+ if(!isVirtual) {
uiBlockSetEmboss(block, UI_EMBOSSN);
uiDefIconButBitI(block, ICONTOG, eModifierMode_Expanded, 0, ICON_TRIA_RIGHT, 0, 0, UI_UNIT_X, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Modifier");
}
-
+
+ /* modifier-type icon */
+ uiItemL(row, "", RNA_struct_ui_icon(ptr.type));
+
uiBlockSetEmboss(block, UI_EMBOSS);
- if (isVirtual) {
+ if(isVirtual) {
+ /* virtual modifier */
sprintf(str, "%s parent deform", md->name);
uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
but = uiDefBut(block, BUT, 0, "Make Real", 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Convert virtual modifier to a real modifier");
uiButSetFunc(but, modifiers_convertToReal, ob, md);
- } else {
+ }
+ else {
+ /* real modifier */
uiBlockBeginAlign(block);
- uiDefBut(block, TEX, 0, "", 0, 0, buttonWidth-60, UI_UNIT_Y, md->name, 0.0, sizeof(md->name)-1, 0.0, 0.0, "Modifier name");
+ 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)) {
- uiDefIconButBitI(block, TOG, eModifierMode_Render, 0, ICON_SCENE, 0, 0, 19, UI_UNIT_Y,&md->mode, 0, 0, 1, 0, "Enable modifier during rendering");
- but= uiDefIconButBitI(block, TOG, eModifierMode_Realtime, 0, ICON_VIEW3D, 0, 0, 19, UI_UNIT_Y,&md->mode, 0, 0, 1, 0, "Enable modifier during interactive display");
- if (mti->flags&eModifierTypeFlag_SupportsEditmode) {
- uiDefIconButBitI(block, TOG, eModifierMode_Editmode, 0, ICON_EDITMODE_HLT, 0, 0, 19, UI_UNIT_Y,&md->mode, 0, 0, 1, 0, "Enable modifier during Editmode (only if enabled for display)");
- }
+ 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, 0, 0);
+ uiItemR(row, "", ICON_VIEW3D, &ptr, "realtime", 0, 0, 0);
+
+ if(mti->flags & eModifierTypeFlag_SupportsEditmode)
+ uiItemR(row, "", ICON_VIEW3D, &ptr, "editmode", 0, 0, 0);
}
uiBlockEndAlign(block);
/* XXX uiBlockSetEmboss(block, UI_EMBOSSR); */
- if (ob->type==OB_MESH && modifier_couldBeCage(md) && index<=lastCageIndex) {
+ if(ob->type==OB_MESH && modifier_couldBeCage(md) && index<=lastCageIndex) {
int icon; //, color;
- if (index==cageIndex) {
+ if(index==cageIndex) {
// XXX color = TH_BUT_SETTING;
icon = VICON_EDITMODE_HLT;
- } else if (index<cageIndex) {
+ } else if(index<cageIndex) {
// XXX color = TH_BUT_NEUTRAL;
icon = VICON_EDITMODE_DEHLT;
} else {
@@ -538,67 +460,55 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
}
}
- subrow= uiLayoutRow(row, 0);
- uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_RIGHT);
-
+ /* up/down/delete */
if(!isVirtual) {
/* XXX uiBlockSetCol(block, TH_BUT_ACTION); */
-
- but = uiDefIconBut(block, BUT, 0, VICON_MOVE_UP, 0, 0, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Move modifier up in stack");
- uiButSetFunc(but, modifiers_moveUp, ob, md);
-
- but = uiDefIconBut(block, BUT, 0, VICON_MOVE_DOWN, 0, 0, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Move modifier down in stack");
- uiButSetFunc(but, modifiers_moveDown, ob, md);
+ uiItemO(row, "", VICON_MOVE_UP, "OBJECT_OT_modifier_move_up");
+ uiItemO(row, "", VICON_MOVE_DOWN, "OBJECT_OT_modifier_move_down");
uiBlockSetEmboss(block, UI_EMBOSSN);
-
- if(modifier_can_delete(md)) {
- but = uiDefIconBut(block, BUT, 0, VICON_X, 0, 0, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Delete modifier");
- uiButSetFunc(but, modifiers_del, ob, md);
- }
+
+ if(modifier_can_delete(md))
+ uiItemO(row, "", VICON_X, "OBJECT_OT_modifier_remove");
+
/* XXX uiBlockSetCol(block, TH_AUTO); */
}
uiBlockSetEmboss(block, UI_EMBOSS);
- if(!isVirtual && (md->mode&eModifierMode_Expanded)) {
+ if(!isVirtual && (md->mode & eModifierMode_Expanded)) {
+ /* apply/convert/copy */
uiLayout *box;
box= uiLayoutBox(column);
row= uiLayoutRow(box, 1);
- if (!isVirtual && (md->type!=eModifierType_Collision) && (md->type!=eModifierType_Surface)) {
- uiBlockSetButLock(block, object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); /* only here obdata, the rest of modifiers is ob level */
+ if(!isVirtual && (md->type!=eModifierType_Collision) && (md->type!=eModifierType_Surface)) {
+ /* only here obdata, the rest of modifiers is ob level */
+ uiBlockSetButLock(block, object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
- if (md->type==eModifierType_ParticleSystem) {
+ if(md->type==eModifierType_ParticleSystem) {
ParticleSystem *psys= ((ParticleSystemModifierData *)md)->psys;
- if(!(G.f & G_PARTICLEEDIT)) {
- if(ELEM3(psys->part->draw_as, PART_DRAW_PATH, PART_DRAW_GR, PART_DRAW_OB) && psys->pathcache) {
- but = uiDefBut(block, BUT, 0, "Convert", 0,0,60,19, 0, 0, 0, 0, 0, "Convert the current particles to a mesh object");
- uiButSetFunc(but, modifiers_convertParticles, ob, md);
- }
- }
- }
- else{
- but = uiDefBut(block, BUT, 0, "Apply", 0,0,60,19, 0, 0, 0, 0, 0, "Apply the current modifier and remove from the stack");
- uiButSetFunc(but, modifiers_applyModifier, ob, md);
+ if(!(G.f & G_PARTICLEEDIT))
+ if(ELEM3(psys->part->ren_as, PART_DRAW_PATH, PART_DRAW_GR, PART_DRAW_OB) && psys->pathcache)
+ uiItemO(row, "Convert", 0, "OBJECT_OT_modifier_convert");
}
+ else
+ uiItemO(row, "Apply", 0, "OBJECT_OT_modifier_apply");
uiBlockClearButLock(block);
uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
- if (md->type!=eModifierType_Fluidsim && md->type!=eModifierType_Softbody && md->type!=eModifierType_ParticleSystem && (md->type!=eModifierType_Cloth)) {
- but = uiDefBut(block, BUT, 0, "Copy", 0,0,60,19, 0, 0, 0, 0, 0, "Duplicate the current modifier at the same position in the stack");
- uiButSetFunc(but, modifiers_copyModifier, ob, md);
- }
+ if(!ELEM4(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth))
+ uiItemO(row, "Copy", 0, "OBJECT_OT_modifier_copy");
}
result= uiLayoutColumn(box, 0);
block= uiLayoutFreeBlock(box);
}
- if (md->error) {
+ if(md->error) {
row = uiLayoutRow(uiLayoutBox(column), 0);
/* XXX uiBlockSetCol(block, color); */
@@ -640,7 +550,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, PointerRNA *ptr)
for(i=0; vmd; i++, vmd=vmd->next) {
if(md == vmd)
return draw_modifier(layout, ob, md, i, cageIndex, lastCageIndex);
- else if(vmd->mode&eModifierMode_Virtual)
+ else if(vmd->mode & eModifierMode_Virtual)
i--;
}
@@ -706,12 +616,6 @@ static void constraint_active_func(bContext *C, void *ob_v, void *con_v)
ED_object_constraint_set_active(ob_v, con_v);
}
-static void del_constraint_func (bContext *C, void *ob_v, void *con_v)
-{
- if(ED_object_constraint_delete(NULL, ob_v, con_v))
- ED_undo_push(C, "Delete Constraint");
-}
-
static void verify_constraint_name_func (bContext *C, void *con_v, void *name_v)
{
Object *ob= CTX_data_active_object(C);
@@ -729,18 +633,6 @@ static void verify_constraint_name_func (bContext *C, void *con_v, void *name_v)
// XXX allqueue(REDRAWACTION, 0);
}
-static void constraint_moveUp(bContext *C, void *ob_v, void *con_v)
-{
- if(ED_object_constraint_move_up(NULL, ob_v, con_v))
- ED_undo_push(C, "Move Constraint");
-}
-
-static void constraint_moveDown(bContext *C, void *ob_v, void *con_v)
-{
- if(ED_object_constraint_move_down(NULL, ob_v, con_v))
- ED_undo_push(C, "Move Constraint");
-}
-
/* some commonly used macros in the constraints drawing code */
#define is_armature_target(target) (target && target->type==OB_ARMATURE)
#define is_armature_owner(ob) ((ob->type == OB_ARMATURE) && (ob->flag & OB_POSEMODE))
@@ -847,7 +739,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
box= uiLayoutBox(col);
row= uiLayoutRow(box, 0);
- block= uiLayoutFreeBlock(box);
+ block= uiLayoutGetBlock(box);
subrow= uiLayoutRow(row, 0);
uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_LEFT);
@@ -862,27 +754,19 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, B_CONSTRAINT_TEST, ICON_TRIA_RIGHT, xco-10, yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Constraint");
/* name */
- if ((con->flag & CONSTRAINT_EXPAND) && (proxy_protected==0)) {
- /* XXX if (con->flag & CONSTRAINT_DISABLE)
- uiBlockSetCol(block, TH_REDALERT);*/
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
-
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ /* XXX if (con->flag & CONSTRAINT_DISABLE)
+ uiBlockSetCol(block, TH_REDALERT);*/
+
+ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
+
+ if(proxy_protected == 0) {
but = uiDefBut(block, TEX, B_CONSTRAINT_TEST, "", xco+120, yco, 85, 18, con->name, 0.0, 29.0, 0.0, 0.0, "Constraint name");
uiButSetFunc(but, verify_constraint_name_func, con, NULL);
- }
- else {
- uiBlockSetEmboss(block, UI_EMBOSSN);
-
- /* XXX if (con->flag & CONSTRAINT_DISABLE)
- uiBlockSetCol(block, TH_REDALERT);*/
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, con->name, xco+120, yco-1, 135, 19, NULL, 0.0, 0.0, 0.0, 0.0, "");
}
+ else
+ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, con->name, xco+120, yco-1, 135, 19, NULL, 0.0, 0.0, 0.0, 0.0, "");
// XXX uiBlockSetCol(block, TH_AUTO);
@@ -926,25 +810,18 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiBlockBeginAlign(block);
uiBlockSetEmboss(block, UI_EMBOSS);
- if (show_upbut) {
- but = uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_UP, xco+width-50, yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint up in constraint stack");
- uiButSetFunc(but, constraint_moveUp, ob, con);
- }
+ if (show_upbut)
+ uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_up", WM_OP_INVOKE_DEFAULT, VICON_MOVE_UP, xco+width-50, yco, 16, 18, "Move constraint up in constraint stack");
- if (show_downbut) {
- but = uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_DOWN, xco+width-50+18, yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint down in constraint stack");
- uiButSetFunc(but, constraint_moveDown, ob, con);
- }
+ if (show_downbut)
+ uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_down", WM_OP_INVOKE_DEFAULT, VICON_MOVE_DOWN, xco+width-50+18, yco, 16, 18, "Move constraint down in constraint stack");
uiBlockEndAlign(block);
}
/* Close 'button' - emboss calls here disable drawing of 'button' behind X */
uiBlockSetEmboss(block, UI_EMBOSSN);
-
- but = uiDefIconBut(block, BUT, B_CONSTRAINT_CHANGETARGET, ICON_X, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Delete constraint");
- uiButSetFunc(but, del_constraint_func, ob, con);
-
+ uiDefIconButO(block, BUT, "CONSTRAINT_OT_delete", WM_OP_INVOKE_DEFAULT, ICON_X, xco+262, yco, 19, 19, "Delete constraint");
uiBlockSetEmboss(block, UI_EMBOSS);
}
@@ -1042,19 +919,6 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
}
break;
#endif /* DISABLE_PYTHON */
- /*case CONSTRAINT_TYPE_CHILDOF:
- {
- // Inverse options
- uiBlockBeginAlign(block);
- but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Set Offset", xco, yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Calculate current Parent-Inverse Matrix (i.e. restore offset from parent)");
- // XXX uiButSetFunc(but, childof_const_setinv, con, NULL);
-
- but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Clear Offset", xco+((width/2)+10), yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Clear Parent-Inverse Matrix (i.e. clear offset from parent)");
- // XXX uiButSetFunc(but, childof_const_clearinv, con, NULL);
- uiBlockEndAlign(block);
- }
- break;
- */
/*case CONSTRAINT_TYPE_RIGIDBODYJOINT:
{
@@ -1310,7 +1174,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id)
uiBlock *block;
Material *ma;
- if(!id || !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
+ if(id && !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
printf("uiTemplatePreview: expected ID of type material, texture, lamp or world.\n");
return;
}
@@ -1377,3 +1241,315 @@ void uiTemplateCurveMapping(uiLayout *layout, CurveMapping *cumap, int type)
}
}
+/********************* Layer Buttons Template ************************/
+
+// TODO:
+// - option for showing extra info like whether layer has contents?
+// - for now, grouping of layers is determined by dividing up the length of
+// the array of layer bitflags
+
+void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, char *propname)
+{
+ uiLayout *uRow, *uSplit, *uCol;
+ PropertyRNA *prop;
+ int groups, cols, layers;
+ int group, col, layer, row;
+
+ if (!ptr->data)
+ return;
+
+ prop= RNA_struct_find_property(ptr, propname);
+ if (!prop) {
+ printf("uiTemplateLayer: layers property not found: %s\n", propname);
+ return;
+ }
+
+ /* the number of layers determines the way we group them
+ * - we want 2 rows only (for now)
+ * - the number of columns (cols) is the total number of buttons per row
+ * 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(prop);
+ cols= (layers / 2) + (layers % 2);
+ groups= ((cols / 2) < 5) ? (1) : (cols / 2);
+
+ /* layers are laid out going across rows, with the columns being divided into groups */
+ uSplit= uiLayoutSplit(layout, (1.0f/(float)groups));
+
+ for (group= 0; group < groups; group++) {
+ uCol= uiLayoutColumn(uSplit, 1);
+
+ for (row= 0; row < 2; row++) {
+ uRow= uiLayoutRow(uCol, 1);
+ layer= groups*cols*row + cols*group;
+
+ /* 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, 0, 0, 1);
+ }
+ }
+ }
+}
+
+
+/************************* List Template **************************/
+
+ListBase uiTemplateList(uiLayout *layout, PointerRNA *ptr, char *propname, PointerRNA *activeptr, char *activepropname, int rows, int columns, int compact)
+{
+ CollectionPointerLink *link;
+ PropertyRNA *prop= NULL, *activeprop;
+ PropertyType type, activetype;
+ uiLayout *box, *row, *col;
+ uiBlock *block;
+ uiBut *but;
+ Panel *pa;
+ ListBase lb;
+ char *name, str[32];
+ int i= 0, activei= 0, len, items, found, min, max;
+
+ lb.first= lb.last= NULL;
+
+ /* validate arguments */
+ block= uiLayoutGetBlock(layout);
+ pa= block->panel;
+
+ if(!pa) {
+ printf("uiTemplateList: only works inside a panel.\n");
+ return lb;
+ }
+
+ if(!activeptr->data)
+ return lb;
+
+ if(ptr->data) {
+ prop= RNA_struct_find_property(ptr, propname);
+ if(!prop) {
+ printf("uiTemplateList: property not found: %s\n", propname);
+ return lb;
+ }
+ }
+
+ activeprop= RNA_struct_find_property(activeptr, activepropname);
+ if(!activeprop) {
+ printf("uiTemplateList: property not found: %s\n", activepropname);
+ return lb;
+ }
+
+ if(prop) {
+ type= RNA_property_type(prop);
+ if(type != PROP_COLLECTION) {
+ printf("uiTemplateList: expected collection property.\n");
+ return lb;
+ }
+ }
+
+ activetype= RNA_property_type(activeprop);
+ if(activetype != PROP_INT) {
+ printf("uiTemplateList: expected integer property.\n");
+ return lb;
+ }
+
+ /* get active data */
+ activei= RNA_property_int_get(activeptr, activeprop);
+
+ if(compact) {
+ /* compact layout */
+ found= 0;
+
+ row= uiLayoutRow(layout, 1);
+
+ if(ptr->data && prop) {
+ /* create list items */
+ RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ found= (activei == i);
+
+ if(found) {
+ /* create button */
+ name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
+ if(name) {
+ uiItemL(row, name, RNA_struct_ui_icon(itemptr.type));
+ MEM_freeN(name);
+ }
+
+ /* add to list to return */
+ link= MEM_callocN(sizeof(CollectionPointerLink), "uiTemplateList return");
+ link->ptr= itemptr;
+ BLI_addtail(&lb, link);
+ }
+
+ i++;
+ }
+ RNA_PROP_END;
+ }
+
+ /* if not found, add in dummy button */
+ if(i == 0)
+ uiItemL(row, "", 0);
+
+ /* next/prev button */
+ sprintf(str, "%d :", i);
+ but= uiDefIconTextButR(block, NUM, 0, 0, str, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activepropname, 0, 0, 0, 0, 0, "");
+ if(i == 0)
+ uiButSetFlag(but, UI_BUT_DISABLED);
+ }
+ else {
+ /* default rows/columns */
+ if(rows == 0)
+ rows= 5;
+ if(columns == 0)
+ columns= 1;
+
+ /* layout */
+ box= uiLayoutBox(layout);
+ row= uiLayoutRow(box, 0);
+ col = uiLayoutColumn(row, 1);
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ /* init numbers */
+ RNA_property_int_range(activeptr, activeprop, &min, &max);
+
+ len= max - min + 1;
+ items= rows*columns;
+
+ pa->list_scroll= MIN2(pa->list_scroll, len-items);
+ pa->list_scroll= MAX2(pa->list_scroll, 0);
+
+ if(ptr->data && prop) {
+ /* create list items */
+ RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ if(i >= pa->list_scroll && i<pa->list_scroll+items) {
+ name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
+
+ if(name) {
+ /* create button */
+ but= uiDefIconTextButR(block, ROW, 0, RNA_struct_ui_icon(itemptr.type), name, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activepropname, 0, 0, i, 0, 0, "");
+ uiButSetFlag(but, UI_ICON_LEFT|UI_TEXT_LEFT);
+
+ MEM_freeN(name);
+ }
+
+ /* add to list to return */
+ link= MEM_callocN(sizeof(CollectionPointerLink), "uiTemplateList return");
+ link->ptr= itemptr;
+ BLI_addtail(&lb, link);
+ }
+
+ i++;
+ }
+ RNA_PROP_END;
+ }
+
+ /* add dummy buttons to fill space */
+ while(i < pa->list_scroll+items) {
+ if(i >= pa->list_scroll)
+ uiItemL(col, "", 0);
+ i++;
+ }
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ /* add scrollbar */
+ if(len > items) {
+ col= uiLayoutColumn(row, 0);
+ uiDefButI(block, SCROLL, 0, "", 0,0,UI_UNIT_X*0.75,UI_UNIT_Y*items, &pa->list_scroll, 0, len-items, items, 0, "");
+ }
+ }
+
+ /* return items in list */
+ return lb;
+}
+
+/************************* Operator Search Template **************************/
+
+static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
+{
+ wmOperatorType *ot= arg2;
+
+ if(ot)
+ WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
+}
+
+static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items)
+{
+ wmOperatorType *ot = WM_operatortype_first();
+
+ for(; ot; ot= ot->next) {
+
+ if(BLI_strcasestr(ot->name, str)) {
+ if(ot->poll==NULL || ot->poll((bContext *)C)) {
+ char name[256];
+ int len= strlen(ot->name);
+
+ /* display name for menu, can hold hotkey */
+ BLI_strncpy(name, ot->name, 256);
+
+ /* check for hotkey */
+ if(len < 256-6) {
+ if(WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, &name[len+1], 256-len-1))
+ name[len]= '|';
+ }
+
+ if(0==uiSearchItemAdd(items, name, ot, 0))
+ break;
+ }
+ }
+ }
+}
+
+void uiTemplateOperatorSearch(uiLayout *layout)
+{
+ uiBlock *block;
+ uiBut *but;
+ static char search[256]= "";
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetCurLayout(block, layout);
+
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, "");
+ uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL);
+}
+
+/************************* Running Jobs Template **************************/
+
+#define B_STOPRENDER 1
+#define B_STOPCAST 2
+#define B_STOPANIM 3
+
+static void do_running_jobs(bContext *C, void *arg, int event)
+{
+ switch(event) {
+ case B_STOPRENDER:
+ G.afbreek= 1;
+ break;
+ case B_STOPCAST:
+ WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C));
+ break;
+ case B_STOPANIM:
+ ED_screen_animation_timer(C, 0, 0);
+ break;
+ }
+}
+
+void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
+{
+ bScreen *screen= CTX_wm_screen(C);
+ Scene *scene= CTX_data_scene(C);
+ wmWindowManager *wm= CTX_wm_manager(C);
+ uiBlock *block;
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetCurLayout(block, layout);
+
+ uiBlockSetHandleFunc(block, do_running_jobs, NULL);
+
+ if(WM_jobs_test(wm, scene))
+ uiDefIconTextBut(block, BUT, B_STOPRENDER, ICON_REC, "Render", 0,0,75,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop rendering");
+ if(WM_jobs_test(wm, screen))
+ uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_REC, "Capture", 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast");
+ if(screen->animtimer)
+ uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_REC, "Anim Player", 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback");
+}
+
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index e08aeb1b371..eb79848d7d2 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -43,6 +43,7 @@
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
+#include "BKE_icons.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_texture.h"
@@ -110,7 +111,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
case PROP_STRING:
- but= uiDefButR(block, TEX, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ if(icon && name && strcmp(name, "") == 0)
+ but= uiDefIconButR(block, TEX, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ else if(icon)
+ but= uiDefIconTextButR(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ else
+ but= uiDefButR(block, TEX, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
case PROP_POINTER: {
PointerRNA pptr;
@@ -120,6 +126,8 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
if(!pptr.type)
pptr.type= RNA_property_pointer_type(ptr, prop);
icon= RNA_struct_ui_icon(pptr.type);
+ if(icon == ICON_DOT)
+ icon= 0;
but= uiDefIconTextButR(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
@@ -139,70 +147,41 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
return but;
}
-void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr)
+void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int columns)
{
- CollectionPropertyIterator iter;
- PropertyRNA *iterprop, *prop;
- uiLayout *split;
+ uiLayout *split, *col;
char *name;
uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
- iterprop= RNA_struct_iterator_property(ptr->type);
- RNA_property_collection_begin(ptr, iterprop, &iter);
-
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- prop= iter.ptr.data;
-
+ RNA_STRUCT_BEGIN(ptr, prop) {
if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
continue;
- split = uiLayoutSplit(layout, 0.5f);
-
name= (char*)RNA_property_ui_name(prop);
- uiItemL(uiLayoutColumn(split, 0), name, 0);
- uiItemFullR(uiLayoutColumn(split, 0), "", 0, ptr, prop, -1, 0, 0, 0, 0);
- }
+ if(columns == 1) {
+ col= uiLayoutColumn(layout, 1);
+ uiItemL(col, name, 0);
+ }
+ else if(columns == 2) {
+ split = uiLayoutSplit(layout, 0.5f);
- RNA_property_collection_end(&iter);
-}
+ uiItemL(uiLayoutColumn(split, 0), name, 0);
+ col= uiLayoutColumn(split, 0);
+ }
-/* temp call, single collumn, test for toolbar only */
-void uiDefAutoButsRNA_single(const bContext *C, uiLayout *layout, PointerRNA *ptr)
-{
- CollectionPropertyIterator iter;
- PropertyRNA *iterprop, *prop;
- uiLayout *col;
- char *name;
-
- uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
-
- iterprop= RNA_struct_iterator_property(ptr->type);
- RNA_property_collection_begin(ptr, iterprop, &iter);
-
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- prop= iter.ptr.data;
-
- if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
- continue;
-
- name= (char*)RNA_property_ui_name(prop);
- col= uiLayoutColumn(layout, 1);
- uiItemL(col, name, 0);
-
/* temp hack to show normal button for spin/screw */
if(strcmp(name, "Axis")==0) {
- uiDefButR(uiLayoutGetBlock(layout), BUT_NORMAL, 0, name, 0, 0, 100, 100, ptr, "axis", -1, 0, 0, -1, -1, NULL);
+ 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, 0, 0);
}
-
- RNA_property_collection_end(&iter);
+ RNA_STRUCT_END;
}
-
/***************************** ID Utilities *******************************/
+/* note, C code version, will be replaced with version in interface_templates.c */
typedef struct uiIDPoinParams {
uiIDPoinFunc func;
@@ -303,9 +282,25 @@ static void id_search_cb(const struct bContext *C, void *arg_params, char *str,
ID *id;
for(id= params->lb->first; id; id= id->next) {
+ int iconid= 0;
+
+
+ /* icon */
+ switch(GS(id->name))
+ {
+ case ID_MA: /* fall through */
+ case ID_TE: /* fall through */
+ case ID_IM: /* fall through */
+ case ID_WO: /* fall through */
+ case ID_LA: /* fall through */
+ iconid= BKE_icon_getid(id);
+ break;
+ default:
+ break;
+ }
if(BLI_strcasestr(id->name+2, str)) {
- if(0==uiSearchItemAdd(items, id->name+2, id))
+ if(0==uiSearchItemAdd(items, id->name+2, id, iconid))
break;
}
}
@@ -332,7 +327,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_params)
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, 150, 19, "");
- uiButSetSearchFunc(but, id_search_cb, &params, id_search_call_cb);
+ uiButSetSearchFunc(but, id_search_cb, &params, id_search_call_cb, NULL);
uiBoundsBlock(block, 6);
uiBlockSetDirection(block, UI_DOWN);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index ab8569bf47e..8f40b2e4bfd 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -40,6 +40,7 @@
#include "BLI_rect.h"
#include "BKE_context.h"
+#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
@@ -84,15 +85,6 @@ typedef struct uiWidgetTrias {
} uiWidgetTrias;
-typedef struct uiWidgetStateColors {
- char inner_anim[4];
- char inner_anim_sel[4];
- char inner_key[4];
- char inner_key_sel[4];
- char inner_driven[4];
- char inner_driven_sel[4];
-} uiWidgetStateColors;
-
typedef struct uiWidgetBase {
int totvert, halfwayvert;
@@ -101,6 +93,7 @@ typedef struct uiWidgetBase {
float inner_uv[64][2];
short inner, outline, emboss; /* set on/off */
+ short shadedir;
uiWidgetTrias tria1;
uiWidgetTrias tria2;
@@ -114,6 +107,7 @@ typedef struct uiWidgetType {
/* pointer to theme color definition */
uiWidgetColors *wcol_theme;
+ uiWidgetStateColors *wcol_state;
/* converted colors for state */
uiWidgetColors wcol;
@@ -198,6 +192,7 @@ static void widget_init(uiWidgetBase *wtb)
wtb->inner= 1;
wtb->outline= 1;
wtb->emboss= 1;
+ wtb->shadedir= 1;
}
/* helper call, makes shadow rect, with 'sun' above menu, so only shadow to left/right/bottom */
@@ -290,13 +285,15 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
float maxyi= maxy - 1.0f;
float facxi= 1.0f/(maxxi-minxi); /* for uv */
float facyi= 1.0f/(maxyi-minyi);
- int a, tot= 0;
+ int a, tot= 0, minsize;
- if(2.0f*rad > rect->ymax-rect->ymin)
- rad= 0.5f*(rect->ymax-rect->ymin);
+ minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin);
+
+ if(2.0f*rad > minsize)
+ rad= 0.5f*minsize;
- if(2.0f*(radi+1.0f) > rect->ymax-rect->ymin)
- radi= 0.5f*(rect->ymax-rect->ymin) - 1.0f;
+ if(2.0f*(radi+1.0f) > minsize)
+ radi= 0.5f*minsize - 1.0f;
/* mult */
for(a=0; a<9; a++) {
@@ -430,22 +427,33 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, flo
/* based on button rect, return scaled array of triangles */
static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, char where)
{
- float centx, centy, size;
- int a;
+ float centx, centy, sizex, sizey, minsize;
+ int a, i1=0, i2=1;
+
+ minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin);
/* center position and size */
- centx= (float)rect->xmin + 0.5f*(rect->ymax-rect->ymin);
- centy= (float)rect->ymin + 0.5f*(rect->ymax-rect->ymin);
- size= -0.5f*triasize*(rect->ymax-rect->ymin);
+ centx= (float)rect->xmin + 0.5f*minsize;
+ centy= (float)rect->ymin + 0.5f*minsize;
+ sizex= sizey= -0.5f*triasize*minsize;
if(where=='r') {
- centx= (float)rect->xmax - 0.5f*(rect->ymax-rect->ymin);
- size= -size;
+ centx= (float)rect->xmax - 0.5f*minsize;
+ sizex= -sizex;
+ }
+ else if(where=='t') {
+ centy= (float)rect->ymax - 0.5f*minsize;
+ sizey= -sizey;
+ i2=0; i1= 1;
+ }
+ else if(where=='b') {
+ sizex= -sizex;
+ i2=0; i1= 1;
}
for(a=0; a<19; a++) {
- tria->vec[a][0]= size*num_tria_vert[a][0] + centx;
- tria->vec[a][1]= size*num_tria_vert[a][1] + centy;
+ tria->vec[a][0]= sizex*num_tria_vert[a][i1] + centx;
+ tria->vec[a][1]= sizey*num_tria_vert[a][i2] + centy;
}
tria->tot= 19;
@@ -522,7 +530,7 @@ static void shadecolors4(char *coltop, char *coldown, char *color, short shadeto
coldown[0]= CLAMPIS(color[0]+shadedown, 0, 255);
coldown[1]= CLAMPIS(color[1]+shadedown, 0, 255);
coldown[2]= CLAMPIS(color[2]+shadedown, 0, 255);
- coldown[3]= color[3];
+ coldown[3]= color[3];
}
static void round_box_shade_col4(char *col1, char *col2, float fac)
@@ -582,7 +590,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
glShadeModel(GL_SMOOTH);
glBegin(GL_POLYGON);
for(a=0; a<wtb->totvert; a++) {
- round_box_shade_col4(col1, col2, wtb->inner_uv[a][1]);
+ round_box_shade_col4(col1, col2, wtb->inner_uv[a][wtb->shadedir]);
glVertex2fv(wtb->inner_v[a]);
}
glEnd();
@@ -874,9 +882,9 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
and offset the text label to accomodate it */
if (but->flag & UI_HAS_ICON) {
- widget_draw_icon(but, but->icon, 0, rect);
+ widget_draw_icon(but, but->icon+but->iconadd, 0, rect);
- rect->xmin += UI_icon_get_width(but->icon);
+ rect->xmin += UI_icon_get_width(but->icon+but->iconadd);
if(but->editstr || (but->flag & UI_TEXT_LEFT))
rect->xmin += 5;
@@ -902,6 +910,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
char inner_key_sel[4];
char inner_driven[4];
char inner_driven_sel[4];
+ float blend;
*/
@@ -909,9 +918,10 @@ static struct uiWidgetStateColors wcol_state= {
{115, 190, 76, 255},
{90, 166, 51, 255},
{240, 235, 100, 255},
- {148, 204, 76, 255},
+ {215, 211, 75, 255},
{180, 0, 255, 255},
- {153, 0, 230, 255}
+ {153, 0, 230, 255},
+ 0.5f, 0.0f
};
/* uiWidgetColors
@@ -1025,7 +1035,7 @@ static struct uiWidgetColors wcol_menu_back= {
{0, 0, 0, 255},
{25, 25, 25, 230},
{45, 45, 45, 230},
- {255, 255, 255, 255},
+ {100, 100, 100, 255},
{255, 255, 255, 255},
{255, 255, 255, 255},
@@ -1087,16 +1097,56 @@ static struct uiWidgetColors wcol_box= {
0, 0
};
+static struct uiWidgetColors wcol_toggle= {
+ {25, 25, 25, 255},
+ {153, 153, 153, 255},
+ {100, 100, 100, 255},
+ {25, 25, 25, 255},
+
+ {0, 0, 0, 255},
+ {255, 255, 255, 255},
+
+ 0,
+ 0, 0
+};
+
+static struct uiWidgetColors wcol_scroll= {
+ {50, 50, 50, 180},
+ {80, 80, 80, 180},
+ {100, 100, 100, 180},
+ {180, 180, 180, 255},
+
+ {0, 0, 0, 255},
+ {255, 255, 255, 255},
+
+ 1,
+ 10, -20
+};
+
+/* free wcol struct to play with */
+static struct uiWidgetColors wcol_tmp= {
+ {0, 0, 0, 255},
+ {128, 128, 128, 255},
+ {100, 100, 100, 255},
+ {25, 25, 25, 255},
+
+ {0, 0, 0, 255},
+ {255, 255, 255, 255},
+
+ 0,
+ 0, 0
+};
+
/* called for theme init (new theme) and versions */
void ui_widget_color_init(ThemeUI *tui)
{
-
tui->wcol_regular= wcol_regular;
tui->wcol_tool= wcol_tool;
- tui->wcol_radio= wcol_radio;
tui->wcol_text= wcol_text;
+ tui->wcol_radio= wcol_radio;
tui->wcol_option= wcol_option;
+ tui->wcol_toggle= wcol_toggle;
tui->wcol_num= wcol_num;
tui->wcol_numslider= wcol_numslider;
tui->wcol_menu= wcol_menu;
@@ -1104,26 +1154,38 @@ void ui_widget_color_init(ThemeUI *tui)
tui->wcol_menu_back= wcol_menu_back;
tui->wcol_menu_item= wcol_menu_item;
tui->wcol_box= wcol_box;
-
- tui->iconfile[0]= 0;
+ tui->wcol_scroll= wcol_scroll;
+
+ tui->wcol_state= wcol_state;
}
/* ************ button callbacks, state ***************** */
+static void widget_state_blend(char *cp, char *cpstate, float fac)
+{
+ if(fac != 0.0f) {
+ cp[0]= (int)((1.0f-fac)*cp[0] + fac*cpstate[0]);
+ cp[1]= (int)((1.0f-fac)*cp[1] + fac*cpstate[1]);
+ cp[2]= (int)((1.0f-fac)*cp[2] + fac*cpstate[2]);
+ }
+}
+
/* copy colors from theme, and set changes in it based on state */
static void widget_state(uiWidgetType *wt, int state)
{
+ uiWidgetStateColors *wcol_state= wt->wcol_state;
+
wt->wcol= *(wt->wcol_theme);
if(state & UI_SELECT) {
+ QUATCOPY(wt->wcol.inner, wt->wcol.inner_sel)
+
if(state & UI_BUT_ANIMATED_KEY)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_key_sel)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_key_sel, wcol_state->blend);
else if(state & UI_BUT_ANIMATED)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_anim_sel)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_anim_sel, wcol_state->blend);
else if(state & UI_BUT_DRIVEN)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_driven_sel)
- else
- QUATCOPY(wt->wcol.inner, wt->wcol.inner_sel)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_driven_sel, wcol_state->blend);
VECCOPY(wt->wcol.text, wt->wcol.text_sel);
@@ -1134,11 +1196,11 @@ static void widget_state(uiWidgetType *wt, int state)
}
else {
if(state & UI_BUT_ANIMATED_KEY)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_key)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_key, wcol_state->blend);
else if(state & UI_BUT_ANIMATED)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_anim)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_anim, wcol_state->blend);
else if(state & UI_BUT_DRIVEN)
- QUATCOPY(wt->wcol.inner, wcol_state.inner_driven)
+ widget_state_blend(wt->wcol.inner, wcol_state->inner_driven, wcol_state->blend);
if(state & UI_ACTIVE) { /* mouse over? */
wt->wcol.inner[0]= wt->wcol.inner[0]>=240? 255 : wt->wcol.inner[0]+15;
@@ -1161,6 +1223,10 @@ static void widget_state_label(uiWidgetType *wt, int state)
}
+static void widget_state_nothing(uiWidgetType *wt, int state)
+{
+ wt->wcol= *(wt->wcol_theme);
+}
/* special case, button that calls pulldown */
static void widget_state_pulldown(uiWidgetType *wt, int state)
@@ -1262,9 +1328,28 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir
glDisable(GL_BLEND);
}
-/* ************ custom buttons, old stuff ************** */
-static void ui_hsvcircle_to_val(float *valrad, float *valdist, rcti *rect, float mx, float my)
+static void ui_hsv_cursor(float x, float y)
+{
+
+ glPushMatrix();
+ glTranslatef(x, y, 0.0f);
+
+ glColor3f(1.0f, 1.0f, 1.0f);
+ glutil_draw_filled_arc(0.0f, M_PI*2.0, 3.0f, 8);
+
+ glEnable(GL_BLEND);
+ glEnable(GL_LINE_SMOOTH );
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glutil_draw_lined_arc(0.0f, M_PI*2.0, 3.0f, 12);
+ glDisable(GL_BLEND);
+ glDisable(GL_LINE_SMOOTH );
+
+ glPopMatrix();
+
+}
+
+void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float mx, float my)
{
/* duplication of code... well, simple is better now */
float centx= (float)(rect->xmin + rect->xmax)/2;
@@ -1319,7 +1404,7 @@ void ui_draw_but_HSVCIRCLE(uiBut *but, rcti *rect)
float si= sin(ang);
float co= cos(ang);
- ui_hsvcircle_to_val(hsv, hsv+1, rect, centx + co*radius, centy + si*radius);
+ ui_hsvcircle_vals_from_pos(hsv, hsv+1, rect, centx + co*radius, centy + si*radius);
hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2);
glColor3fv(col);
glVertex2f( centx + co*radius, centy + si*radius);
@@ -1327,8 +1412,27 @@ void ui_draw_but_HSVCIRCLE(uiBut *but, rcti *rect)
glEnd();
glShadeModel(GL_FLAT);
+
+ /* fully rounded outline */
+ glPushMatrix();
+ glTranslatef(centx, centy, 0.0f);
+ glEnable(GL_BLEND);
+ glEnable(GL_LINE_SMOOTH );
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glutil_draw_lined_arc(0.0f, M_PI*2.0, radius, tot);
+ glDisable(GL_BLEND);
+ glDisable(GL_LINE_SMOOTH );
+ glPopMatrix();
+
+ /* cursor */
+ ang= 2.0f*M_PI*but->hsv[0] + 0.5f*M_PI;
+ radius= but->hsv[1]*radius;
+ ui_hsv_cursor(centx + cos(-ang)*radius, centy + sin(-ang)*radius);
+
}
+/* ************ custom buttons, old stuff ************** */
+
/* draws in resolution of 20x4 colors */
static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect)
{
@@ -1366,7 +1470,7 @@ static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect)
hsv_to_rgb(h, 1.0, 0.0, &col1[3][0], &col1[3][1], &col1[3][2]);
x= v; y= s;
}
- else { // only hue slider
+ else if(but->a1==3) { // only hue slider
hsv_to_rgb(0.0, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
VECCOPY(col1[1], col1[0]);
VECCOPY(col1[2], col1[0]);
@@ -1400,7 +1504,7 @@ static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect)
hsv_to_rgb(h, 0.666, dx, &col1[2][0], &col1[2][1], &col1[2][2]);
hsv_to_rgb(h, 1.0, dx, &col1[3][0], &col1[3][1], &col1[3][2]);
}
- else { // only H
+ else if(but->a1==3) { // only H
hsv_to_rgb(dx, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
VECCOPY(col1[1], col1[0]);
VECCOPY(col1[2], col1[0]);
@@ -1438,13 +1542,42 @@ static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect)
CLAMP(x, rect->xmin+3.0, rect->xmax-3.0);
CLAMP(y, rect->ymin+3.0, rect->ymax-3.0);
- fdrawXORcirc(x, y, 3.1);
+ ui_hsv_cursor(x, y);
/* outline */
glColor3ub(0, 0, 0);
fdrawbox((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
}
+/* vertical 'value' slider, using new widget code */
+static void ui_draw_but_HSV_v(uiBut *but, rcti *rect)
+{
+ uiWidgetBase wtb;
+ float rad= 0.5f*(rect->xmax - rect->xmin);
+ float x, y;
+
+ widget_init(&wtb);
+
+ /* fully rounded */
+ round_box_edges(&wtb, 15, rect, rad);
+
+ /* setup temp colors */
+ wcol_tmp.outline[0]= wcol_tmp.outline[1]= wcol_tmp.outline[2]= 0;
+ wcol_tmp.inner[0]= wcol_tmp.inner[1]= wcol_tmp.inner[2]= 128;
+ wcol_tmp.shadetop= 127;
+ wcol_tmp.shadedown= -128;
+ wcol_tmp.shaded= 1;
+
+ widgetbase_draw(&wtb, &wcol_tmp);
+
+ /* cursor */
+ x= rect->xmin + 0.5f*(rect->xmax-rect->xmin);
+ y= rect->ymin + but->hsv[2]*(rect->ymax-rect->ymin);
+ CLAMP(y, rect->ymin+3.0, rect->ymax-3.0);
+
+ ui_hsv_cursor(x, y);
+
+}
/* ************ button callbacks, draw ***************** */
@@ -1460,7 +1593,7 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round
/* decoration */
if(!(state & UI_TEXTINPUT)) {
- widget_num_tria(&wtb.tria1, rect, 0.6f, 0);
+ widget_num_tria(&wtb.tria1, rect, 0.6f, 'l');
widget_num_tria(&wtb.tria2, rect, 0.6f, 'r');
}
widgetbase_draw(&wtb, wcol);
@@ -1471,6 +1604,178 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round
}
+
+static int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol)
+{
+ float dist, vec[4][2];
+
+ vec[0][0]= rect->xmin;
+ vec[0][1]= rect->ymin;
+ vec[3][0]= rect->xmax;
+ vec[3][1]= rect->ymax;
+
+ dist= 0.5f*ABS(vec[0][0] - vec[3][0]);
+
+ vec[1][0]= vec[0][0]+dist;
+ vec[1][1]= vec[0][1];
+
+ vec[2][0]= vec[3][0]-dist;
+ vec[2][1]= vec[3][1];
+
+ forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, 2);
+ forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, 2);
+
+ return 1;
+}
+
+#define LINK_RESOL 24
+void ui_draw_link_bezier(rcti *rect)
+{
+ float coord_array[LINK_RESOL+1][2];
+
+ if(ui_link_bezier_points(rect, coord_array, LINK_RESOL)) {
+ float dist;
+ int i;
+
+ /* we can reuse the dist variable here to increment the GL curve eval amount*/
+ dist = 1.0f/(float)LINK_RESOL;
+
+ glEnable(GL_BLEND);
+ glEnable(GL_LINE_SMOOTH);
+
+ glBegin(GL_LINE_STRIP);
+ for(i=0; i<=LINK_RESOL; i++) {
+ glVertex2fv(coord_array[i]);
+ }
+ glEnd();
+
+ glDisable(GL_BLEND);
+ glDisable(GL_LINE_SMOOTH);
+
+ }
+}
+
+/* function in use for buttons and for view2d sliders */
+void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int state)
+{
+ uiWidgetBase wtb;
+ float rad;
+ int horizontal;
+
+ widget_init(&wtb);
+
+ /* determine horizontal/vertical */
+ horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin);
+
+ if(horizontal)
+ rad= 0.5f*(rect->ymax - rect->ymin);
+ else
+ rad= 0.5f*(rect->xmax - rect->xmin);
+
+ wtb.shadedir= (horizontal)? 1: 0;
+
+ /* draw back part, colors swapped and shading inverted */
+ if(horizontal)
+ SWAP(short, wcol->shadetop, wcol->shadedown);
+
+ round_box_edges(&wtb, 15, rect, rad);
+ widgetbase_draw(&wtb, wcol);
+
+ /* slider */
+ if(slider->xmax-slider->xmin<2 || slider->ymax-slider->ymin<2);
+ else {
+
+ SWAP(short, wcol->shadetop, wcol->shadedown);
+
+ QUATCOPY(wcol->inner, wcol->item);
+
+ if(wcol->shadetop>wcol->shadedown)
+ wcol->shadetop+= 20; /* XXX violates themes... */
+ else wcol->shadedown+= 20;
+
+ if(state & UI_SCROLL_PRESSED)
+ SWAP(short, wcol->shadetop, wcol->shadedown);
+
+ /* draw */
+ wtb.emboss= 0; /* only emboss once */
+
+ round_box_edges(&wtb, 15, slider, rad);
+
+ if(state & UI_SCROLL_ARROWS) {
+ if(wcol->item[0] > 48) wcol->item[0]-= 48;
+ if(wcol->item[1] > 48) wcol->item[1]-= 48;
+ if(wcol->item[2] > 48) wcol->item[2]-= 48;
+ wcol->item[3]= 255;
+
+ if(horizontal) {
+ widget_num_tria(&wtb.tria1, slider, 0.6f, 'l');
+ widget_num_tria(&wtb.tria2, slider, 0.6f, 'r');
+ }
+ else {
+ widget_num_tria(&wtb.tria1, slider, 0.6f, 'b');
+ widget_num_tria(&wtb.tria2, slider, 0.6f, 't');
+ }
+ }
+ widgetbase_draw(&wtb, wcol);
+ }
+}
+
+static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
+{
+ rcti rect1;
+ double value;
+ float fac, size;
+ int horizontal;
+
+ /* calculate slider part */
+ value= ui_get_but_val(but);
+
+ size= (but->softmax + but->a1 - but->softmin);
+ size= MAX2(size, 2);
+
+ /* position */
+ rect1= *rect;
+
+ /* determine horizontal/vertical */
+ horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin);
+
+ if(horizontal) {
+ fac= (rect->xmax - rect->xmin)/(size);
+ rect1.xmin= rect1.xmin + ceil(fac*(value - but->softmin));
+ rect1.xmax= rect1.xmin + ceil(fac*(but->a1 - but->softmin));
+ }
+ else {
+ fac= (rect->ymax - rect->ymin)/(size);
+ rect1.ymax= rect1.ymax - ceil(fac*(value - but->softmin));
+ rect1.ymin= rect1.ymax - ceil(fac*(but->a1 - but->softmin));
+ }
+
+ if(state & UI_SELECT)
+ state= UI_SCROLL_PRESSED;
+ else
+ state= 0;
+ uiWidgetScrollDraw(wcol, rect, &rect1, state);
+
+}
+
+static void widget_link(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
+{
+
+ if(but->flag & UI_SELECT) {
+ rcti rectlink;
+
+ UI_ThemeColor(TH_TEXT_HI);
+
+ rectlink.xmin= (rect->xmin+rect->xmax)/2;
+ rectlink.ymin= (rect->ymin+rect->ymax)/2;
+ rectlink.xmax= but->linkto[0];
+ rectlink.ymax= but->linkto[1];
+
+ ui_draw_link_bezier(&rectlink);
+ }
+}
+
+
static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
{
uiWidgetBase wtb, wtb1;
@@ -1726,7 +2031,9 @@ static void widget_disabled(rcti *rect)
/* can't use theme TH_BACK or TH_PANEL... undefined */
glGetFloatv(GL_COLOR_CLEAR_VALUE, col);
glColor4f(col[0], col[1], col[2], 0.5f);
- glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ /* need -1 and +1 to make it work right for aligned buttons,
+ * but problem may be somewhere else? */
+ glRectf(rect->xmin-1, rect->ymin, rect->xmax, rect->ymax+1);
glDisable(GL_BLEND);
}
@@ -1738,18 +2045,23 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
/* defaults */
wt.wcol_theme= &btheme->tui.wcol_regular;
+ wt.wcol_state= &btheme->tui.wcol_state;
wt.state= widget_state;
wt.draw= widget_but;
wt.custom= NULL;
wt.text= widget_draw_text_icon;
switch(type) {
+ case UI_WTYPE_REGULAR:
+ break;
+
case UI_WTYPE_LABEL:
wt.draw= NULL;
wt.state= widget_state_label;
break;
case UI_WTYPE_TOGGLE:
+ wt.wcol_theme= &btheme->tui.wcol_toggle;
break;
case UI_WTYPE_OPTION:
@@ -1762,7 +2074,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
wt.wcol_theme= &btheme->tui.wcol_radio;
wt.draw= widget_radiobut;
break;
-
+
case UI_WTYPE_NUMBER:
wt.wcol_theme= &btheme->tui.wcol_num;
wt.draw= widget_numbut;
@@ -1843,6 +2155,12 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_NORMAL:
break;
+
+ case UI_WTYPE_SCROLL:
+ wt.wcol_theme= &btheme->tui.wcol_scroll;
+ wt.state= widget_state_nothing;
+ wt.custom= widget_scroll;
+ break;
}
return &wt;
@@ -1930,35 +2248,44 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
fstyle= &style->widgetlabel;
}
break;
+
case SEPR:
break;
+
case BUT:
wt= widget_type(UI_WTYPE_EXEC);
break;
+
case NUM:
wt= widget_type(UI_WTYPE_NUMBER);
break;
+
case NUMSLI:
case HSVSLI:
wt= widget_type(UI_WTYPE_SLIDER);
break;
+
case ROW:
wt= widget_type(UI_WTYPE_RADIO);
break;
+
case TEX:
wt= widget_type(UI_WTYPE_NAME);
break;
+
case SEARCH_MENU:
wt= widget_type(UI_WTYPE_NAME);
if(but->block->flag & UI_BLOCK_LOOP)
wt->wcol_theme= &btheme->tui.wcol_menu_back;
break;
+
case TOGBUT:
case TOG:
case TOGN:
case TOG3:
wt= widget_type(UI_WTYPE_TOGGLE);
break;
+
case OPTION:
case OPTIONN:
if (!(but->flag & UI_HAS_ICON)) {
@@ -1968,6 +2295,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
else
wt= widget_type(UI_WTYPE_TOGGLE);
break;
+
case MENU:
case BLOCK:
case ICONTEXTROW:
@@ -1989,27 +2317,47 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case ROUNDBOX:
wt= widget_type(UI_WTYPE_BOX);
break;
+
+ case LINK:
+ case INLINK:
+ wt= widget_type(UI_WTYPE_ICON);
+ wt->custom= widget_link;
+
+ break;
case BUT_EXTRA:
widget_draw_extra_mask(C, but, widget_type(UI_WTYPE_BOX), rect);
break;
- // XXX four old button types
case HSVCUBE:
- ui_draw_but_HSVCUBE(but, rect);
+ if(but->a1==4) // vertical V slider, uses new widget draw now
+ ui_draw_but_HSV_v(but, rect);
+ else // other HSV pickers...
+ ui_draw_but_HSVCUBE(but, rect);
break;
+
+ case HSVCIRCLE:
+ ui_draw_but_HSVCIRCLE(but, rect);
+ break;
+
case BUT_COLORBAND:
ui_draw_but_COLORBAND(but, &tui->wcol_regular, rect);
break;
+
case BUT_NORMAL:
ui_draw_but_NORMAL(but, &tui->wcol_regular, rect);
break;
+
case BUT_CURVE:
ui_draw_but_CURVE(ar, but, &tui->wcol_regular, rect);
break;
-
+
+ case SCROLL:
+ wt= widget_type(UI_WTYPE_SCROLL);
+ break;
+
default:
- wt= widget_type(UI_WTYPE_TOGGLE);
+ wt= widget_type(UI_WTYPE_REGULAR);
}
}
@@ -2018,6 +2366,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
int roundboxalign, state;
roundboxalign= widget_roundbox_set(but, rect);
+
state= but->flag;
if(but->editstr) state |= UI_TEXTINPUT;
@@ -2065,7 +2414,7 @@ void ui_draw_search_back(uiStyle *style, uiBlock *block, rcti *rect)
/* helper call to draw a menu item without button */
/* state: UI_ACTIVE or 0 */
-void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int state)
+void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int iconid, int state)
{
uiWidgetType *wt= widget_type(UI_WTYPE_MENU_ITEM);
rcti _rect= *rect;
@@ -2079,6 +2428,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int state)
/* text location offset */
rect->xmin+=5;
+ if(iconid) rect->xmin+= ICON_HEIGHT;
/* cut string in 2 parts? */
cpoin= strchr(name, '|');
@@ -2101,5 +2451,12 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int state)
/* restore rect, was messed with */
*rect= _rect;
+ if(iconid) {
+ int xs= rect->xmin+4;
+ int ys= 1 + (rect->ymin+rect->ymax- ICON_HEIGHT)/2;
+ glEnable(GL_BLEND);
+ UI_icon_draw_aspect_blended(xs, ys, iconid, 1.2f, 0); /* XXX scale weak get from fstyle? */
+ glDisable(GL_BLEND);
+ }
}
diff --git a/source/blender/editors/interface/keyval.c b/source/blender/editors/interface/keyval.c
deleted file mode 100644
index f2172ac8cf0..00000000000
--- a/source/blender/editors/interface/keyval.c
+++ /dev/null
@@ -1,540 +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 *****
- */
-
-#include "stdio.h"
-#include "ctype.h"
-#include "string.h"
-
-#include "BKE_global.h"
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-
-#include "WM_types.h"
-
-char *key_event_to_string(unsigned short event)
-{
-
- switch(event) {
- case AKEY:
- return "A";
- break;
- case BKEY:
- return "B";
- break;
- case CKEY:
- return "C";
- break;
- case DKEY:
- return "D";
- break;
- case EKEY:
- return "E";
- break;
- case FKEY:
- return "F";
- break;
- case GKEY:
- return "G";
- break;
- case HKEY:
- return "H";
- break;
- case IKEY:
- return "I";
- break;
- case JKEY:
- return "J";
- break;
- case KKEY:
- return "K";
- break;
- case LKEY:
- return "L";
- break;
- case MKEY:
- return "M";
- break;
- case NKEY:
- return "N";
- break;
- case OKEY:
- return "O";
- break;
- case PKEY:
- return "P";
- break;
- case QKEY:
- return "Q";
- break;
- case RKEY:
- return "R";
- break;
- case SKEY:
- return "S";
- break;
- case TKEY:
- return "T";
- break;
- case UKEY:
- return "U";
- break;
- case VKEY:
- return "V";
- break;
- case WKEY:
- return "W";
- break;
- case XKEY:
- return "X";
- break;
- case YKEY:
- return "Y";
- break;
- case ZKEY:
- return "Z";
- break;
-
- case ZEROKEY:
- return "Zero";
- break;
- case ONEKEY:
- return "One";
- break;
- case TWOKEY:
- return "Two";
- break;
- case THREEKEY:
- return "Three";
- break;
- case FOURKEY:
- return "Four";
- break;
- case FIVEKEY:
- return "Five";
- break;
- case SIXKEY:
- return "Six";
- break;
- case SEVENKEY:
- return "Seven";
- break;
- case EIGHTKEY:
- return "Eight";
- break;
- case NINEKEY:
- return "Nine";
- break;
-
- case LEFTCTRLKEY:
- return "Leftctrl";
- break;
- case LEFTALTKEY:
- return "Leftalt";
- break;
- case RIGHTALTKEY:
- return "Rightalt";
- break;
- case RIGHTCTRLKEY:
- return "Rightctrl";
- break;
- case RIGHTSHIFTKEY:
- return "Rightshift";
- break;
- case LEFTSHIFTKEY:
- return "Leftshift";
- break;
-
- case ESCKEY:
- return "Esc";
- break;
- case TABKEY:
- return "Tab";
- break;
- case RETKEY:
- return "Ret";
- break;
- case SPACEKEY:
- return "Space";
- break;
- case LINEFEEDKEY:
- return "Linefeed";
- break;
- case BACKSPACEKEY:
- return "Backspace";
- break;
- case DELKEY:
- return "Del";
- break;
- case SEMICOLONKEY:
- return "Semicolon";
- break;
- case PERIODKEY:
- return "Period";
- break;
- case COMMAKEY:
- return "Comma";
- break;
- case QUOTEKEY:
- return "Quote";
- break;
- case ACCENTGRAVEKEY:
- return "Accentgrave";
- break;
- case MINUSKEY:
- return "Minus";
- break;
- case SLASHKEY:
- return "Slash";
- break;
- case BACKSLASHKEY:
- return "Backslash";
- break;
- case EQUALKEY:
- return "Equal";
- break;
- case LEFTBRACKETKEY:
- return "Leftbracket";
- break;
- case RIGHTBRACKETKEY:
- return "Rightbracket";
- break;
-
- case LEFTARROWKEY:
- return "Leftarrow";
- break;
- case DOWNARROWKEY:
- return "Downarrow";
- break;
- case RIGHTARROWKEY:
- return "Rightarrow";
- break;
- case UPARROWKEY:
- return "Uparrow";
- break;
-
- case PAD2:
- return "Pad2";
- break;
- case PAD4:
- return "Pad4";
- break;
- case PAD6:
- return "Pad6";
- break;
- case PAD8:
- return "Pad8";
- break;
- case PAD1:
- return "Pad1";
- break;
- case PAD3:
- return "Pad3";
- break;
- case PAD5:
- return "Pad5";
- break;
- case PAD7:
- return "Pad7";
- break;
- case PAD9:
- return "Pad9";
- break;
-
- case PADPERIOD:
- return "Padperiod";
- break;
- case PADSLASHKEY:
- return "Padslash";
- break;
- case PADASTERKEY:
- return "Padaster";
- break;
-
- case PAD0:
- return "Pad0";
- break;
- case PADMINUS:
- return "Padminus";
- break;
- case PADENTER:
- return "Padenter";
- break;
- case PADPLUSKEY:
- return "Padplus";
- break;
-
- case F1KEY:
- return "F1";
- break;
- case F2KEY:
- return "F2";
- break;
- case F3KEY:
- return "F3";
- break;
- case F4KEY:
- return "F4";
- break;
- case F5KEY:
- return "F5";
- break;
- case F6KEY:
- return "F6";
- break;
- case F7KEY:
- return "F7";
- break;
- case F8KEY:
- return "F8";
- break;
- case F9KEY:
- return "F9";
- break;
- case F10KEY:
- return "F10";
- break;
- case F11KEY:
- return "F11";
- break;
- case F12KEY:
- return "F12";
- break;
-
- case PAUSEKEY:
- return "Pause";
- break;
- case INSERTKEY:
- return "Insert";
- break;
- case HOMEKEY:
- return "Home";
- break;
- case PAGEUPKEY:
- return "Pageup";
- break;
- case PAGEDOWNKEY:
- return "Pagedown";
- break;
- case ENDKEY:
- return "End";
- break;
- }
-
- return "";
-}
-
-/*
- * Decodes key combination strings [qual1+[qual2+[...]]]keyname
- * The '+'s may be replaced by '-' or ' ' characters to support different
- * formats. No additional whitespace is allowed. The keyname may be an internal
- * name, like "RETKEY", or a more common name, like "Return". Decoding is case-
- * insensitive.
- *
- * Example strings: "Ctrl+L", "ALT-ESC", "Shift A"
- *
- * Returns 1 if successful.
- */
-int decode_key_string(char *str, unsigned short *key, unsigned short *qual)
-{
- int i, prev, len, invalid=0;
-
- len= strlen(str);
- *key= *qual= 0;
-
- /* Convert to upper case */
- for (i=0; i<len; i++) {
- str[i]= toupper(str[i]);
- }
-
- /* Handle modifiers */
- for (prev=i=0; i<len; i++) {
- if (str[i]==' ' || str[i]=='+' || str[i]=='-') {
-// XXX if (!strncmp(str+prev, "CTRL", i-prev)) *qual |= LR_CTRLKEY;
-// else if (!strncmp(str+prev, "ALT", i-prev)) *qual |= LR_ALTKEY;
-// else if (!strncmp(str+prev, "SHIFT", i-prev)) *qual |= LR_SHIFTKEY;
-// else if (!strncmp(str+prev, "COMMAND", i-prev)) *qual |= LR_COMMANDKEY;
- prev=i+1;
- }
- }
-
- /* Compare last part against key names */
- if ((len-prev==1) || ((len-prev==4) && !strncmp(str+prev, "KEY", 3))) {
-
- if (str[prev]>='A' && str[prev]<='Z') {
- *key= str[prev]-'A'+AKEY;
- } else if (str[prev]>='0' && str[prev]<='9') {
- *key= str[prev]-'0'+ZEROKEY;
- } else {
- invalid= 1;
- }
-
- } else if (!strncmp(str+prev, "ZEROKEY", len-prev) || !strncmp(str+prev, "ZERO", len-prev)) {
- *key= ZEROKEY;
- } else if (!strncmp(str+prev, "ONEKEY", len-prev) || !strncmp(str+prev, "ONE", len-prev)) {
- *key= ONEKEY;
- } else if (!strncmp(str+prev, "TWOKEY", len-prev) || !strncmp(str+prev, "TWO", len-prev)) {
- *key= TWOKEY;
- } else if (!strncmp(str+prev, "THREEKEY", len-prev) || !strncmp(str+prev, "THREE", len-prev)) {
- *key= THREEKEY;
- } else if (!strncmp(str+prev, "FOURKEY", len-prev) || !strncmp(str+prev, "FOUR", len-prev)) {
- *key= FOURKEY;
- } else if (!strncmp(str+prev, "FIVEKEY", len-prev) || !strncmp(str+prev, "FIVE", len-prev)) {
- *key= FIVEKEY;
- } else if (!strncmp(str+prev, "SIZEKEY", len-prev) || !strncmp(str+prev, "SIX", len-prev)) {
- *key= SIXKEY;
- } else if (!strncmp(str+prev, "SEVENKEY", len-prev) || !strncmp(str+prev, "SEVEN", len-prev)) {
- *key= SEVENKEY;
- } else if (!strncmp(str+prev, "EIGHTKEY", len-prev) || !strncmp(str+prev, "EIGHT", len-prev)) {
- *key= EIGHTKEY;
- } else if (!strncmp(str+prev, "NINEKEY", len-prev) || !strncmp(str+prev, "NINE", len-prev)) {
- *key= NINEKEY;
-
- } else if (!strncmp(str+prev, "ESCKEY", len-prev) || !strncmp(str+prev, "ESC", len-prev)) {
- *key= ESCKEY;
- } else if (!strncmp(str+prev, "TABKEY", len-prev) || !strncmp(str+prev, "TAB", len-prev)) {
- *key= TABKEY;
- } else if (!strncmp(str+prev, "RETKEY", len-prev) || !strncmp(str+prev, "RETURN", len-prev) || !strncmp(str+prev, "ENTER", len-prev)) {
- *key= RETKEY;
- } else if (!strncmp(str+prev, "SPACEKEY", len-prev) || !strncmp(str+prev, "SPACE", len-prev)) {
- *key= SPACEKEY;
- } else if (!strncmp(str+prev, "LINEFEEDKEY", len-prev) || !strncmp(str+prev, "LINEFEED", len-prev)) {
- *key= LINEFEEDKEY;
- } else if (!strncmp(str+prev, "BACKSPACEKEY", len-prev) || !strncmp(str+prev, "BACKSPACE", len-prev)) {
- *key= BACKSPACEKEY;
- } else if (!strncmp(str+prev, "DELKEY", len-prev) || !strncmp(str+prev, "DELETE", len-prev)) {
- *key= DELKEY;
-
- } else if (!strncmp(str+prev, "SEMICOLONKEY", len-prev) || !strncmp(str+prev, "SEMICOLON", len-prev)) {
- *key= SEMICOLONKEY;
- } else if (!strncmp(str+prev, "PERIODKEY", len-prev) || !strncmp(str+prev, "PERIOD", len-prev)) {
- *key= PERIODKEY;
- } else if (!strncmp(str+prev, "COMMAKEY", len-prev) || !strncmp(str+prev, "COMMA", len-prev)) {
- *key= COMMAKEY;
- } else if (!strncmp(str+prev, "QUOTEKEY", len-prev) || !strncmp(str+prev, "QUOTE", len-prev)) {
- *key= QUOTEKEY;
- } else if (!strncmp(str+prev, "ACCENTGRAVEKEY", len-prev) || !strncmp(str+prev, "ACCENTGRAVE", len-prev)) {
- *key= ACCENTGRAVEKEY;
- } else if (!strncmp(str+prev, "MINUSKEY", len-prev) || !strncmp(str+prev, "MINUS", len-prev)) {
- *key= MINUSKEY;
- } else if (!strncmp(str+prev, "SLASHKEY", len-prev) || !strncmp(str+prev, "SLASH", len-prev)) {
- *key= SLASHKEY;
- } else if (!strncmp(str+prev, "BACKSLASHKEY", len-prev) || !strncmp(str+prev, "BACKSLASH", len-prev)) {
- *key= BACKSLASHKEY;
- } else if (!strncmp(str+prev, "EQUALKEY", len-prev) || !strncmp(str+prev, "EQUAL", len-prev)) {
- *key= EQUALKEY;
- } else if (!strncmp(str+prev, "LEFTBRACKETKEY", len-prev) || !strncmp(str+prev, "LEFTBRACKET", len-prev)) {
- *key= LEFTBRACKETKEY;
- } else if (!strncmp(str+prev, "RIGHTBRACKETKEY", len-prev) || !strncmp(str+prev, "RIGHTBRACKET", len-prev)) {
- *key= RIGHTBRACKETKEY;
- } else if (!strncmp(str+prev, "DELKEY", len-prev) || !strncmp(str+prev, "DELETE", len-prev)) {
- *key= DELKEY;
-
- } else if (!strncmp(str+prev, "LEFTARROWKEY", len-prev) || !strncmp(str+prev, "LEFTARROW", len-prev)) {
- *key= LEFTARROWKEY;
- } else if (!strncmp(str+prev, "DOWNARROWKEY", len-prev) || !strncmp(str+prev, "DOWNARROW", len-prev)) {
- *key= DOWNARROWKEY;
- } else if (!strncmp(str+prev, "RIGHTARROWKEY", len-prev) || !strncmp(str+prev, "RIGHTARROW", len-prev)) {
- *key= RIGHTARROWKEY;
- } else if (!strncmp(str+prev, "UPARROWKEY", len-prev) || !strncmp(str+prev, "UPARROW", len-prev)) {
- *key= UPARROWKEY;
-
- } else if (!strncmp(str+prev, "PAD", 3)) {
-
- if (len-prev<=4) {
-
- if (str[prev]>='0' && str[prev]<='9') {
- *key= str[prev]-'0'+ZEROKEY;
- } else {
- invalid= 1;
- }
-
- } else if (!strncmp(str+prev+3, "PERIODKEY", len-prev-3) || !strncmp(str+prev+3, "PERIOD", len-prev-3)) {
- *key= PADPERIOD;
- } else if (!strncmp(str+prev+3, "SLASHKEY", len-prev-3) || !strncmp(str+prev+3, "SLASH", len-prev-3)) {
- *key= PADSLASHKEY;
- } else if (!strncmp(str+prev+3, "ASTERKEY", len-prev-3) || !strncmp(str+prev+3, "ASTERISK", len-prev-3)) {
- *key= PADASTERKEY;
- } else if (!strncmp(str+prev+3, "MINUSKEY", len-prev-3) || !strncmp(str+prev+3, "MINUS", len-prev-3)) {
- *key= PADMINUS;
- } else if (!strncmp(str+prev+3, "ENTERKEY", len-prev-3) || !strncmp(str+prev+3, "ENTER", len-prev-3)) {
- *key= PADENTER;
- } else if (!strncmp(str+prev+3, "PLUSKEY", len-prev-3) || !strncmp(str+prev+3, "PLUS", len-prev-3)) {
- *key= PADPLUSKEY;
- } else {
- invalid= 1;
- }
-
- } else if (!strncmp(str+prev, "F1KEY", len-prev) || !strncmp(str+prev, "F1", len-prev)) {
- *key= F1KEY;
- } else if (!strncmp(str+prev, "F2KEY", len-prev) || !strncmp(str+prev, "F2", len-prev)) {
- *key= F2KEY;
- } else if (!strncmp(str+prev, "F3KEY", len-prev) || !strncmp(str+prev, "F3", len-prev)) {
- *key= F3KEY;
- } else if (!strncmp(str+prev, "F4KEY", len-prev) || !strncmp(str+prev, "F4", len-prev)) {
- *key= F4KEY;
- } else if (!strncmp(str+prev, "F5KEY", len-prev) || !strncmp(str+prev, "F5", len-prev)) {
- *key= F5KEY;
- } else if (!strncmp(str+prev, "F6KEY", len-prev) || !strncmp(str+prev, "F6", len-prev)) {
- *key= F6KEY;
- } else if (!strncmp(str+prev, "F7KEY", len-prev) || !strncmp(str+prev, "F7", len-prev)) {
- *key= F7KEY;
- } else if (!strncmp(str+prev, "F8KEY", len-prev) || !strncmp(str+prev, "F8", len-prev)) {
- *key= F8KEY;
- } else if (!strncmp(str+prev, "F9KEY", len-prev) || !strncmp(str+prev, "F9", len-prev)) {
- *key= F9KEY;
- } else if (!strncmp(str+prev, "F10KEY", len-prev) || !strncmp(str+prev, "F10", len-prev)) {
- *key= F10KEY;
- } else if (!strncmp(str+prev, "F11KEY", len-prev) || !strncmp(str+prev, "F11", len-prev)) {
- *key= F11KEY;
- } else if (!strncmp(str+prev, "F12KEY", len-prev) || !strncmp(str+prev, "F12", len-prev)) {
- *key= F12KEY;
-
- } else if (!strncmp(str+prev, "PAUSEKEY", len-prev) || !strncmp(str+prev, "PAUSE", len-prev)) {
- *key= PAUSEKEY;
- } else if (!strncmp(str+prev, "INSERTKEY", len-prev) || !strncmp(str+prev, "INSERT", len-prev)) {
- *key= INSERTKEY;
- } else if (!strncmp(str+prev, "HOMEKEY", len-prev) || !strncmp(str+prev, "HOME", len-prev)) {
- *key= HOMEKEY;
- } else if (!strncmp(str+prev, "PAGEUPKEY", len-prev) || !strncmp(str+prev, "PAGEUP", len-prev)) {
- *key= PAGEUPKEY;
- } else if (!strncmp(str+prev, "PAGEDOWNKEY", len-prev) || !strncmp(str+prev, "PAGEDOWN", len-prev)) {
- *key= PAGEDOWNKEY;
- } else if (!strncmp(str+prev, "ENDKEY", len-prev) || !strncmp(str+prev, "END", len-prev)) {
- *key= ENDKEY;
-
- } else {
- invalid= 1;
- }
-
- if (!invalid && *key) {
- return 1;
- }
-
- return 0;
-}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 1cb58c986d0..2798f7a473f 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1,5 +1,5 @@
/**
- * $Id: resources.c 12755 2007-12-02 05:50:38Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -75,7 +75,7 @@ static int theme_regionid= RGN_TYPE_WINDOW;
void ui_resources_init(void)
{
- UI_icons_init(BIFICONID_LAST+1);
+ UI_icons_init(BIFICONID_LAST);
}
void ui_resources_free(void)
@@ -156,6 +156,9 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case SPACE_NODE:
ts= &btheme->tnode;
break;
+ case SPACE_LOGIC:
+ ts= &btheme->tlogic;
+ break;
default:
ts= &btheme->tv3d;
break;
@@ -398,6 +401,7 @@ static void ui_theme_init_new(bTheme *btheme)
ui_theme_init_new_do(&btheme->toops);
ui_theme_init_new_do(&btheme->ttime);
ui_theme_init_new_do(&btheme->tnode);
+ ui_theme_init_new_do(&btheme->tlogic);
}
@@ -501,7 +505,10 @@ void ui_theme_init_userdef(void)
btheme->tact= btheme->tipo;
SETCOL(btheme->tact.strip, 12, 10, 10, 128);
SETCOL(btheme->tact.strip_select, 255, 140, 0, 255);
-
+
+ /* space nla */
+ btheme->tnla= btheme->tact;
+
/* space file */
/* to have something initialized */
btheme->tfile= btheme->tv3d;
@@ -518,20 +525,6 @@ void ui_theme_init_userdef(void)
SETCOL(btheme->tfile.scene, 250, 250, 250, 255);
-
-
- /* space nla */
- btheme->tnla= btheme->tv3d;
- SETCOL(btheme->tnla.back, 116, 116, 116, 255);
- SETCOL(btheme->tnla.text, 0, 0, 0, 255);
- SETCOL(btheme->tnla.text_hi, 255, 255, 255, 255);
- SETCOL(btheme->tnla.grid, 94, 94, 94, 255);
- SETCOL(btheme->tnla.shade1, 172, 172, 172, 255); // sliders
- SETCOL(btheme->tnla.shade2, 84, 44, 31, 100); // bar
- SETCOL(btheme->tnla.hilite, 17, 27, 60, 100); // bar
- SETCOL(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255);
- SETCOL(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255);
-
/* space seq */
btheme->tseq= btheme->tv3d;
SETCOL(btheme->tseq.back, 116, 116, 116, 255);
@@ -608,6 +601,10 @@ void ui_theme_init_userdef(void)
SETCOL(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */
SETCOL(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */
+ /* space logic */
+ btheme->tlogic= btheme->tv3d;
+ SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
+
}
@@ -1078,19 +1075,6 @@ void init_userdef_do_versions(void)
SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
}
}
- if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 11)) {
- bTheme *btheme;
- for (btheme= U.themes.first; btheme; btheme= btheme->next) {
- /* these should all use the same color */
- SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
- }
- }
if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 13)) {
bTheme *btheme;
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
@@ -1213,6 +1197,13 @@ void init_userdef_do_versions(void)
/* Graph Editor - Group Channel color */
SETCOL(btheme->tipo.group, 79, 101, 73, 255);
SETCOL(btheme->tipo.group_active, 135, 177, 125, 255);
+
+ /* Nla Editor - (Object) Channel color */
+ SETCOL(btheme->tnla.ds_channel, 82, 96, 110, 255);
+ SETCOL(btheme->tnla.ds_subchannel, 124, 137, 150, 255);
+ /* NLA Editor - New Strip colors */
+ SETCOL(btheme->tnla.strip, 12, 10, 10, 128);
+ SETCOL(btheme->tnla.strip_select, 255, 140, 0, 255);
}
/* adjust grease-pencil distances */
@@ -1233,6 +1224,13 @@ void init_userdef_do_versions(void)
if(btheme->tui.wcol_num.outline[3]==0)
ui_widget_color_init(&btheme->tui);
+
+ /* Logic editor theme, check for alpha==0 is safe, then color was never set */
+ if(btheme->tlogic.syntaxn[3]==0) {
+ /* re-uses syntax color storage */
+ btheme->tlogic= btheme->tv3d;
+ SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
+ }
}
}
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 4621be6eda0..6df7b1c8e28 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -34,6 +34,7 @@
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_view2d_types.h"
#include "BLI_blenlib.h"
@@ -154,7 +155,8 @@ static void view2d_masks(View2D *v2d)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
{
short tot_changed= 0;
-
+ uiStyle *style= U.uistyles.first;
+
/* initialise data if there is a need for such */
if ((v2d->flag & V2D_IS_INITIALISED) == 0) {
/* set initialised flag so that View2D doesn't get reinitialised next time again */
@@ -207,6 +209,23 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
}
break;
+ /* 'stack view' - practically the same as list/channel view, except is located in the pos y half instead.
+ * zoom, aspect ratio, and alignment restrictions are set here */
+ case V2D_COMMONVIEW_STACK:
+ {
+ /* zoom + aspect ratio are locked */
+ v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
+ v2d->minzoom= v2d->maxzoom= 1.0f;
+
+ /* tot rect has strictly regulated placement, and must only occur in +/+ quadrant */
+ v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
+ v2d->keeptot = V2D_KEEPTOT_STRICT;
+ tot_changed= 1;
+
+ /* scroller settings are currently not set here... that is left for regions... */
+ }
+ break;
+
/* 'header' regions - zoom, aspect ratio, alignment, and panning restrictions are set here */
case V2D_COMMONVIEW_HEADER:
{
@@ -245,14 +264,21 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
v2d->tot.xmin= 0.0f;
v2d->tot.xmax= winx;
-
+
v2d->tot.ymax= 0.0f;
v2d->tot.ymin= -winy;
+
+ v2d->cur.xmin= 0.0f;
+ v2d->cur.xmax= winx*style->panelzoom;
- v2d->cur= v2d->tot;
+ v2d->cur.ymax= 0.0f;
+ v2d->cur.ymin= -winy*style->panelzoom;
+
+ v2d->cur.ymax= 0.0f;
+ v2d->cur.ymin= -winy*style->panelzoom;
}
break;
-
+
/* other view types are completely defined using their own settings already */
default:
/* we don't do anything here, as settings should be fine, but just make sure that rect */
@@ -316,6 +342,12 @@ void UI_view2d_curRect_validate(View2D *v2d)
if (v2d->keepzoom & V2D_LOCKZOOM_Y)
height= winy;
+ /* values used to divide, so make it safe */
+ if(width<1) width= 1;
+ if(height<1) height= 1;
+ if(winx<1) winx= 1;
+ if(winy<1) winy= 1;
+
/* keepzoom (V2D_KEEPZOOM set), indicates that zoom level on each axis must not exceed limits
* NOTE: in general, it is not expected that the lock-zoom will be used in conjunction with this
*/
@@ -895,7 +927,14 @@ void UI_view2d_view_orthoSpecial(const bContext *C, View2D *v2d, short xaxis)
/* Restore view matrices after drawing */
void UI_view2d_view_restore(const bContext *C)
{
- ED_region_pixelspace(CTX_wm_region(C));
+ ARegion *ar= CTX_wm_region(C);
+ int width= ar->winrct.xmax-ar->winrct.xmin+1;
+ int height= ar->winrct.ymax-ar->winrct.ymin+1;
+
+ wmOrtho2(0.0f, (float)width, 0.0f, (float)height);
+ wmLoadIdentity();
+
+ // ED_region_pixelspace(CTX_wm_region(C));
}
/* *********************************************************************** */
@@ -1192,12 +1231,15 @@ void UI_view2d_grid_free(View2DGrid *grid)
* WARNING: the start of this struct must not change, as view2d_ops.c uses this too.
* For now, we don't need to have a separate (internal) header for structs like this...
*/
-struct View2DScrollers {
+struct View2DScrollers {
/* focus bubbles */
int vert_min, vert_max; /* vertical scrollbar */
int hor_min, hor_max; /* horizontal scrollbar */
- /* scales */
+ rcti hor, vert; /* exact size of slider backdrop */
+ int horfull, vertfull; /* set if sliders are full, we don't draw them */
+
+ /* scales */
View2DGrid *grid; /* grid for coordinate drawing */
short xunits, xclamp; /* units and clamping options for x-axis */
short yunits, yclamp; /* units and clamping options for y-axis */
@@ -1208,14 +1250,33 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
{
View2DScrollers *scrollers;
rcti vert, hor;
- float fac, totsize, scrollsize;
+ float fac1, fac2, totsize, scrollsize;
int scroll= view2d_scroll_mapped(v2d->scroll);
+ /* scrollers is allocated here... */
+ scrollers= MEM_callocN(sizeof(View2DScrollers), "View2DScrollers");
+
vert= v2d->vert;
hor= v2d->hor;
- /* scrollers is allocated here... */
- scrollers= MEM_callocN(sizeof(View2DScrollers), "View2DScrollers");
+ /* slider rects smaller than region */
+ hor.xmin+=4;
+ hor.xmax-=4;
+ if (scroll & V2D_SCROLL_BOTTOM)
+ hor.ymin+=4;
+ else
+ hor.ymax-=4;
+
+ if (scroll & V2D_SCROLL_LEFT)
+ vert.xmin+=4;
+ else
+ vert.xmax-=4;
+ vert.ymin+=4;
+ vert.ymax-=4;
+
+ /* store in scrollers, used for drawing */
+ scrollers->vert= vert;
+ scrollers->hor= hor;
/* scroller 'buttons':
* - These should always remain within the visible region of the scrollbar
@@ -1228,14 +1289,25 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
totsize= v2d->tot.xmax - v2d->tot.xmin;
scrollsize= (float)(hor.xmax - hor.xmin);
- fac= (v2d->cur.xmin - v2d->tot.xmin) / totsize;
- scrollers->hor_min= (int)(hor.xmin + (fac * scrollsize));
+ fac1= (v2d->cur.xmin - v2d->tot.xmin) / totsize;
+ if(fac1<=0.0f)
+ scrollers->hor_min= hor.xmin;
+ else
+ scrollers->hor_min= (int)(hor.xmin + (fac1 * scrollsize));
- fac= (v2d->cur.xmax - v2d->tot.xmin) / totsize;
- scrollers->hor_max= (int)(hor.xmin + (fac * scrollsize));
+ fac2= (v2d->cur.xmax - v2d->tot.xmin) / totsize;
+ if(fac2>=1.0f)
+ scrollers->hor_max= hor.xmax;
+ else
+ scrollers->hor_max= (int)(hor.xmin + (fac2 * scrollsize));
if (scrollers->hor_min > scrollers->hor_max)
scrollers->hor_min= scrollers->hor_max;
+
+ /* check whether sliders can disappear */
+ if(v2d->keeptot)
+ if(fac1 <= 0.0f && fac2 >= 1.0f)
+ scrollers->horfull= 1;
}
/* vertical scrollers */
@@ -1244,14 +1316,25 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
totsize= v2d->tot.ymax - v2d->tot.ymin;
scrollsize= (float)(vert.ymax - vert.ymin);
- fac= (v2d->cur.ymin- v2d->tot.ymin) / totsize;
- scrollers->vert_min= (int)(vert.ymin + (fac * scrollsize));
+ fac1= (v2d->cur.ymin- v2d->tot.ymin) / totsize;
+ if(fac1<=0.0f)
+ scrollers->vert_min= vert.ymin;
+ else
+ scrollers->vert_min= (int)(vert.ymin + (fac1 * scrollsize));
- fac= (v2d->cur.ymax - v2d->tot.ymin) / totsize;
- scrollers->vert_max= (int)(vert.ymin + (fac * scrollsize));
+ fac2= (v2d->cur.ymax - v2d->tot.ymin) / totsize;
+ if(fac2>=1.0f)
+ scrollers->vert_max= vert.ymax;
+ else
+ scrollers->vert_max= (int)(vert.ymin + (fac2 * scrollsize));
if (scrollers->vert_min > scrollers->vert_max)
scrollers->vert_min= scrollers->vert_max;
+
+ /* check whether sliders can disappear */
+ if(v2d->keeptot)
+ if(fac1 <= 0.0f && fac2 >= 1.0f)
+ scrollers->vertfull= 1;
}
/* grid markings on scrollbars */
@@ -1281,7 +1364,7 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f
* rotation values (hence 'degrees') are divided by 10 to
* be able to show the curves at the same time
*/
- if ELEM(unit, V2D_UNIT_DEGREES, V2D_UNIT_TIME) {
+ if (ELEM(unit, V2D_UNIT_DEGREES, V2D_UNIT_TIME)) {
power += 1;
val *= 10;
}
@@ -1387,81 +1470,31 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f
void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *vs)
{
Scene *scene= CTX_data_scene(C);
- const short darker= -50, dark= -10, light= 20, lighter= 50;
- rcti vert, hor, corner;
+ rcti vert, hor;
int scroll= view2d_scroll_mapped(v2d->scroll);
/* make copies of rects for less typing */
- vert= v2d->vert;
- hor= v2d->hor;
+ vert= vs->vert;
+ hor= vs->hor;
/* horizontal scrollbar */
if (scroll & V2D_SCROLL_HORIZONTAL) {
- /* scroller backdrop */
- UI_ThemeColorShade(TH_SHADE1, light);
- glRecti(hor.xmin, hor.ymin, hor.xmax, hor.ymax);
-
- /* scroller 'button'
- * - if view is zoomable in x, draw handles too
- * - handles are drawn darker
- * - no slider when view is > total for non-zoomable views
- * (otherwise, zoomable ones tend to flicker)
- */
- if ( (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) ||
- ((v2d->tot.xmax - v2d->tot.xmin) > (v2d->cur.xmax - v2d->cur.xmin)) )
- {
- if (v2d->keepzoom & V2D_LOCKZOOM_X) {
- /* draw base bar as rounded shape */
- UI_ThemeColorShade(TH_SHADE1, dark);
- uiSetRoundBox(15);
-
- /* check that box is large enough for round drawing */
- if ((vs->hor_max - vs->hor_min) < (V2D_SCROLLCAP_RAD * 2)) {
- /* Rounded box still gets drawn at the minimum size limit
- * This doesn't represent extreme scaling well, but looks nicer...
- */
- float mid= 0.5f * (vs->hor_max + vs->hor_min);
-
- gl_round_box_shade(GL_POLYGON,
- mid-V2D_SCROLLCAP_RAD, (float)hor.ymin+2,
- mid+V2D_SCROLLCAP_RAD, (float)hor.ymax-2,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
- }
- else {
- /* draw rounded box as per normal */
- gl_round_box_shade(GL_POLYGON,
- (float)vs->hor_min, (float)hor.ymin+2,
- (float)vs->hor_max, (float)hor.ymax-2,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
- }
- }
- else {
- /* base bar drawn as shaded rect */
- UI_ThemeColorShade(TH_SHADE1, dark);
- uiSetRoundBox(0);
- gl_round_box_shade(GL_POLYGON,
- (float)vs->hor_min, (float)hor.ymin+2,
- (float)vs->hor_max, (float)hor.ymax-2,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
-
- /* 'minimum' handle */
- uiSetRoundBox(9);
- UI_ThemeColorShade(TH_SHADE1, darker);
-
- gl_round_box_shade(GL_POLYGON,
- (float)vs->hor_min-V2D_SCROLLER_HANDLE_SIZE, (float)hor.ymin+2,
- (float)vs->hor_min+V2D_SCROLLER_HANDLE_SIZE, (float)hor.ymax-2,
- V2D_SCROLLCAP_RAD, V2D_SCROLLCAP_SHADE, -V2D_SCROLLCAP_SHADE);
-
- /* maximum handle */
- uiSetRoundBox(6);
- UI_ThemeColorShade(TH_SHADE1, darker);
-
- gl_round_box_shade(GL_POLYGON,
- (float)vs->hor_max-V2D_SCROLLER_HANDLE_SIZE, (float)hor.ymin+2,
- (float)vs->hor_max+V2D_SCROLLER_HANDLE_SIZE, (float)hor.ymax-2,
- V2D_SCROLLCAP_RAD, V2D_SCROLLCAP_SHADE, -V2D_SCROLLCAP_SHADE);
- }
+
+ if(vs->horfull==0) {
+ bTheme *btheme= U.themes.first;
+ uiWidgetColors wcol= btheme->tui.wcol_scroll;
+ rcti slider;
+ int state;
+
+ slider.xmin= vs->hor_min;
+ slider.xmax= vs->hor_max;
+ slider.ymin= hor.ymin;
+ slider.ymax= hor.ymax;
+
+ state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0;
+ if (!(v2d->keepzoom & V2D_LOCKZOOM_X))
+ state |= UI_SCROLL_ARROWS;
+ uiWidgetScrollDraw(&wcol, &hor, &slider, state);
}
/* scale indicators */
@@ -1496,19 +1529,26 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* draw numbers in the appropriate range */
if (dfac > 0.0f) {
- for (; fac < hor.xmax; fac+=dfac, val+=grid->dx) {
+ float h= 2.0f+(float)(hor.ymin);
+
+ for (; fac < hor.xmax-10; fac+=dfac, val+=grid->dx) {
+
+ /* make prints look nicer for scrollers */
+ if(fac < hor.xmin+10)
+ continue;
+
switch (vs->xunits) {
case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/
- scroll_printstr(vs, scene, fac, 3.0f+(float)(hor.ymin), val, grid->powerx, V2D_UNIT_FRAMES, 'h');
+ scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h');
break;
case V2D_UNIT_FRAMESCALE: /* frames (not always as whole numbers) */
- scroll_printstr(vs, scene, fac, 3.0f+(float)(hor.ymin), val, grid->powerx, V2D_UNIT_FRAMESCALE, 'h');
+ scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMESCALE, 'h');
break;
case V2D_UNIT_SECONDS: /* seconds */
fac2= val/(float)FPS;
- scroll_printstr(vs, scene, fac, 3.0f+(float)(hor.ymin), fac2, grid->powerx, V2D_UNIT_SECONDS, 'h');
+ scroll_printstr(vs, scene, fac, h, fac2, grid->powerx, V2D_UNIT_SECONDS, 'h');
break;
case V2D_UNIT_SECONDSSEQ: /* seconds with special calculations (only used for sequencer only) */
@@ -1519,96 +1559,41 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
time= (float)floor(fac2);
fac2= fac2-time;
- scroll_printstr(vs, scene, fac, 3.0f+(float)(hor.ymin), time+(float)FPS*fac2/100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h');
+ scroll_printstr(vs, scene, fac, h, time+(float)FPS*fac2/100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h');
}
break;
case V2D_UNIT_DEGREES: /* Graph Editor for rotation Drivers */
/* HACK: although we're drawing horizontal, we make this draw as 'vertical', just to get degree signs */
- scroll_printstr(vs, scene, fac, 3.0f+(float)(hor.ymin), val, grid->powerx, V2D_UNIT_DEGREES, 'v');
+ scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_DEGREES, 'v');
break;
}
}
}
}
-
- /* decoration outer bevel line */
- UI_ThemeColorShade(TH_SHADE1, lighter);
- if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O))
- sdrawline(hor.xmin, hor.ymax, hor.xmax, hor.ymax);
- else if (scroll & V2D_SCROLL_TOP)
- sdrawline(hor.xmin, hor.ymin, hor.xmax, hor.ymin);
}
/* vertical scrollbar */
if (scroll & V2D_SCROLL_VERTICAL) {
- /* scroller backdrop */
- UI_ThemeColorShade(TH_SHADE1, light);
- glRecti(vert.xmin, vert.ymin, vert.xmax, vert.ymax);
-
- /* scroller 'button'
- * - if view is zoomable in y, draw handles too
- * - handles are drawn darker
- * - no slider when view is > total for non-zoomable views
- * (otherwise, zoomable ones tend to flicker)
- */
- if ( (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) ||
- ((v2d->tot.ymax - v2d->tot.ymin) > (v2d->cur.ymax - v2d->cur.ymin)) )
- {
- if (v2d->keepzoom & V2D_LOCKZOOM_Y) {
- /* draw base bar as rounded shape */
- UI_ThemeColorShade(TH_SHADE1, dark);
- uiSetRoundBox(15);
-
- /* check that box is large enough for round drawing */
- if ((vs->vert_max - vs->vert_min) < (V2D_SCROLLCAP_RAD * 2)) {
- /* Rounded box still gets drawn at the minimum size limit
- * This doesn't represent extreme scaling well, but looks nicer...
- */
- float mid= 0.5f * (vs->vert_max + vs->vert_min);
-
- gl_round_box_vertical_shade(GL_POLYGON,
- (float)vert.xmin+2, mid-V2D_SCROLLCAP_RAD,
- (float)vert.xmax-2, mid+V2D_SCROLLCAP_RAD,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
- }
- else {
- /* draw rounded box as per normal */
- gl_round_box_vertical_shade(GL_POLYGON,
- (float)vert.xmin+2, (float)vs->vert_min,
- (float)vert.xmax-2, (float)vs->vert_max,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
- }
- }
- else {
- /* base bar drawn as shaded rect */
- UI_ThemeColorShade(TH_SHADE1, dark);
- uiSetRoundBox(0);
- gl_round_box_vertical_shade(GL_POLYGON,
- (float)vert.xmin+2, (float)vs->vert_min,
- (float)vert.xmax-2, (float)vs->vert_max,
- V2D_SCROLLCAP_RAD, V2D_SCROLLBAR_SHADE, -V2D_SCROLLBAR_SHADE);
-
- /* 'minimum' handle */
- UI_ThemeColorShade(TH_SHADE1, darker);
- uiSetRoundBox(12);
-
- gl_round_box_vertical_shade(GL_POLYGON,
- (float)vert.xmin+2, (float)vs->vert_min-V2D_SCROLLER_HANDLE_SIZE,
- (float)vert.xmax-2, (float)vs->vert_min+V2D_SCROLLER_HANDLE_SIZE,
- V2D_SCROLLCAP_RAD, V2D_SCROLLCAP_SHADE, -V2D_SCROLLCAP_SHADE);
-
- /* maximum handle */
- UI_ThemeColorShade(TH_SHADE1, darker);
- uiSetRoundBox(3);
-
- gl_round_box_vertical_shade(GL_POLYGON,
- (float)vert.xmin+2, (float)vs->vert_max-V2D_SCROLLER_HANDLE_SIZE,
- (float)vert.xmax-2, (float)vs->vert_max+V2D_SCROLLER_HANDLE_SIZE,
- V2D_SCROLLCAP_RAD, V2D_SCROLLCAP_SHADE, -V2D_SCROLLCAP_SHADE);
- }
+
+ if(vs->vertfull==0) {
+ bTheme *btheme= U.themes.first;
+ uiWidgetColors wcol= btheme->tui.wcol_scroll;
+ rcti slider;
+ int state;
+
+ slider.xmin= vert.xmin;
+ slider.xmax= vert.xmax;
+ slider.ymin= vs->vert_min;
+ slider.ymax= vs->vert_max;
+
+ state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0;
+ if (!(v2d->keepzoom & V2D_LOCKZOOM_Y))
+ state |= UI_SCROLL_ARROWS;
+ uiWidgetScrollDraw(&wcol, &vert, &slider, state);
}
+
/* scale indiators */
// XXX will need to update the font drawing when the new stuff comes in
if ((scroll & V2D_SCROLL_SCALE_VERTICAL) && (vs->grid)) {
@@ -1638,42 +1623,23 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* draw vertical steps */
if (dfac > 0.0f) {
- for (; fac < vert.ymax; fac+= dfac, val += grid->dy) {
- scroll_printstr(vs, scene, (float)(vert.xmax)-14.0f, fac, val, grid->powery, vs->yunits, 'v');
+
+ BLF_default_rotation(90.0f);
+
+ for (; fac < vert.ymax-10; fac+= dfac, val += grid->dy) {
+
+ /* make prints look nicer for scrollers */
+ if(fac < vert.ymin+10)
+ continue;
+
+ scroll_printstr(vs, scene, (float)(vert.xmax)-2.0f, fac, val, grid->powery, vs->yunits, 'v');
}
+
+ BLF_default_rotation(0.0f);
}
}
-
- /* decoration outer bevel line */
- UI_ThemeColorShade(TH_SHADE1, lighter);
- if (scroll & V2D_SCROLL_RIGHT)
- sdrawline(vert.xmin, vert.ymin, vert.xmin, vert.ymax);
- else if (scroll & V2D_SCROLL_LEFT)
- sdrawline(vert.xmax, vert.ymin, vert.xmax, vert.ymax);
}
- /* draw a 'sunken square' to cover up any overlapping corners resulting from intersection of overflowing scroller data */
- if ((scroll & V2D_SCROLL_VERTICAL) && (scroll & V2D_SCROLL_HORIZONTAL)) {
- /* set bounds (these should be right) */
- corner.xmin= vert.xmin;
- corner.xmax= vert.xmax;
- corner.ymin= hor.ymin;
- corner.ymax= hor.ymax;
-
- /* firstly, draw using background color to cover up any overlapping junk */
- UI_ThemeColor(TH_SHADE1);
- glRecti(corner.xmin, corner.ymin, corner.xmax, corner.ymax);
-
- /* now, draw suggestive highlighting... */
- /* first, dark lines on top to suggest scrollers overlap box */
- UI_ThemeColorShade(TH_SHADE1, darker);
- sdrawline(corner.xmin, corner.ymin, corner.xmin, corner.ymax);
- sdrawline(corner.xmin, corner.ymax, corner.xmax, corner.ymax);
- /* now, light lines on bottom to show box is sunken in */
- UI_ThemeColorShade(TH_SHADE1, lighter);
- sdrawline(corner.xmax, corner.ymin, corner.xmax, corner.ymax);
- sdrawline(corner.xmin, corner.ymin, corner.xmax, corner.ymin);
- }
}
/* free temporary memory used for drawing scrollers */
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index bd1c734b870..14872f05f8a 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -257,7 +257,7 @@ void VIEW2D_OT_pan(wmOperatorType *ot)
ot->modal= view_pan_modal;
/* operator is repeatable */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -832,7 +832,7 @@ void VIEW2D_OT_zoom(wmOperatorType *ot)
ot->modal= view_zoomdrag_modal;
/* operator is repeatable */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
/* rna - must keep these in sync with the other operators */
RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX);
@@ -1010,15 +1010,7 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_
if (in_view == 0) {
- /* handles are only activated if the mouse is within the relative quater lengths of the scroller */
- int qLen = (sc_max + sc_min) / 4;
-
- if (mouse >= (sc_max - qLen))
- return SCROLLHANDLE_MAX;
- else if (mouse <= qLen)
- return SCROLLHANDLE_MIN;
- else
- return SCROLLHANDLE_BAR;
+ return SCROLLHANDLE_BAR;
}
/* check if mouse is in or past either handle */
@@ -1095,15 +1087,23 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event,
vsm->zone= mouse_in_scroller_handle(y, v2d->vert.ymin, v2d->vert.ymax, scrollers->vert_min, scrollers->vert_max);
}
}
+
UI_view2d_scrollers_free(scrollers);
+ ED_region_tag_redraw(ar);
}
/* cleanup temp customdata */
static void scroller_activate_exit(bContext *C, wmOperator *op)
{
if (op->customdata) {
+ v2dScrollerMove *vsm= op->customdata;
+
+ vsm->v2d->scroll_ui &= ~(V2D_SCROLL_H_ACTIVE|V2D_SCROLL_V_ACTIVE);
+
MEM_freeN(op->customdata);
- op->customdata= NULL;
+ op->customdata= NULL;
+
+ ED_region_tag_redraw(CTX_wm_region(C));
}
}
@@ -1120,14 +1120,14 @@ static void scroller_activate_apply(bContext *C, wmOperator *op)
/* type of movement */
switch (vsm->zone) {
case SCROLLHANDLE_MIN:
+ case SCROLLHANDLE_MAX:
+
/* only expand view on axis if zoom is allowed */
if ((vsm->scroller == 'h') && !(v2d->keepzoom & V2D_LOCKZOOM_X))
v2d->cur.xmin -= temp;
if ((vsm->scroller == 'v') && !(v2d->keepzoom & V2D_LOCKZOOM_Y))
v2d->cur.ymin -= temp;
- break;
- case SCROLLHANDLE_MAX:
/* only expand view on axis if zoom is allowed */
if ((vsm->scroller == 'h') && !(v2d->keepzoom & V2D_LOCKZOOM_X))
v2d->cur.xmax += temp;
@@ -1240,6 +1240,11 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
+ if(vsm->scroller=='h')
+ v2d->scroll_ui |= V2D_SCROLL_H_ACTIVE;
+ else
+ v2d->scroll_ui |= V2D_SCROLL_V_ACTIVE;
+
/* still ok, so can add */
WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
return OPERATOR_RUNNING_MODAL;
@@ -1256,6 +1261,9 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
/* identifiers */
ot->name= "Scroller Activate";
ot->idname= "VIEW2D_OT_scroller_activate";
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke= scroller_activate_invoke;
@@ -1268,6 +1276,7 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
static int reset_exec(bContext *C, wmOperator *op)
{
+ uiStyle *style= U.uistyles.first;
ARegion *ar= CTX_wm_region(C);
View2D *v2d= &ar->v2d;
int winx, winy;
@@ -1278,26 +1287,26 @@ static int reset_exec(bContext *C, wmOperator *op)
v2d->cur.xmax= v2d->cur.xmin + winx;
v2d->cur.ymax= v2d->cur.ymin + winy;
-
+
/* align */
if(v2d->align) {
/* posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
v2d->cur.xmax= 0.0f;
- v2d->cur.xmin= v2d->winx;
+ v2d->cur.xmin= v2d->winx*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
- v2d->cur.xmax= v2d->cur.xmax - v2d->cur.xmin;
+ v2d->cur.xmax= (v2d->cur.xmax - v2d->cur.xmin)*style->panelzoom;
v2d->cur.xmin= 0.0f;
}
/* - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= -v2d->winy;
+ v2d->cur.ymin= -v2d->winy*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
- v2d->cur.ymax= v2d->cur.ymax - v2d->cur.ymin;
+ v2d->cur.ymax= (v2d->cur.ymax - v2d->cur.ymin)*style->panelzoom;
v2d->cur.ymin= 0.0f;
}
}
diff --git a/source/blender/editors/mesh/Makefile b/source/blender/editors/mesh/Makefile
index 650771519cd..8ae40e1b957 100644
--- a/source/blender/editors/mesh/Makefile
+++ b/source/blender/editors/mesh/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/mesh/bmesh_select.c b/source/blender/editors/mesh/bmesh_select.c
index f9e6e09cfe0..c4f2a294d0b 100644
--- a/source/blender/editors/mesh/bmesh_select.c
+++ b/source/blender/editors/mesh/bmesh_select.c
@@ -659,13 +659,13 @@ FACES GROUP
*/
static EnumPropertyItem prop_simface_types[] = {
- {1, "MATERIAL", "Material", ""},
- {2, "IMAGE", "Image", ""},
- {3, "AREA", "Area", ""},
- {4, "PERIMETER", "Perimeter", ""},
- {5, "NORMAL", "Normal", ""},
- {6, "COPLANAR", "Co-planar", ""},
- {0, NULL, NULL, NULL}
+ {1, "MATERIAL", 0, "Material", ""},
+ {2, "IMAGE", 0, "Image", ""},
+ {3, "AREA", 0, "Area", ""},
+ {4, "PERIMETER", 0, "Perimeter", ""},
+ {5, "NORMAL", 0, "Normal", ""},
+ {6, "COPLANAR", 0, "Co-planar", ""},
+ {0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index b3be20b35aa..103bcbcebce 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -81,7 +81,7 @@
#include "ED_view3d.h"
#include "ED_util.h"
#include "ED_screen.h"
-#include "BIF_transform.h"
+#include "ED_transform.h"
#include "UI_interface.h"
@@ -96,6 +96,50 @@ static void add_normal_aligned(float *nor, float *add)
VecAddf(nor, nor, add);
}
+
+static int subdivide_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit= CTX_data_edit_object(C);
+ BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
+ int cuts= RNA_int_get(op->ptr,"number_cuts");
+ float smooth= 0.292f*RNA_float_get(op->ptr, "smoothness");
+ float fractal= RNA_float_get(op->ptr, "fractal")/100;
+ int flag= 0;
+
+ if(smooth != 0.0f)
+ flag |= B_SMOOTH;
+ if(fractal != 0.0f)
+ flag |= B_FRACTAL;
+
+ BM_esubdivideflag(obedit, em->bm, BM_SELECT, smooth, fractal, scene->toolsettings->editbutflag|flag, cuts, 0);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_subdivide(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Subdivide";
+ ot->idname= "MESH_OT_subdivide";
+
+ /* api callbacks */
+ ot->exec= subdivide_exec;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_int(ot->srna, "number_cuts", 1, 1, 10, "Number of Cuts", "", 1, INT_MAX);
+ RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor.", 0.0f, 1000.0f);
+ RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, 1000.0f, "Smoothness", "Smoothness factor.", 0.0f, FLT_MAX);
+}
+
+#if 0
static int subdivide_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
@@ -259,10 +303,10 @@ static int subdivs_exec(bContext *C, wmOperator *op)
void MESH_OT_subdivs(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
- {0, "SIMPLE", "Simple", ""},
- {1, "MULTI", "Multi", ""},
- {2, "FRACTAL", "Fractal", ""},
- {3, "SMOOTH", "Smooth", ""},
+ {0, "SIMPLE", 0, "Simple", ""},
+ {1, "MULTI", 0, "Multi", ""},
+ {2, "FRACTAL", 0, "Fractal", ""},
+ {3, "SMOOTH", 0, "Smooth", ""},
{0, NULL, NULL}};
/* identifiers */
@@ -286,6 +330,7 @@ void MESH_OT_subdivs(wmOperatorType *ot)
RNA_def_float(ot->srna, "random_factor", 5.0, 0.0f, FLT_MAX, "Random Factor", "", 0.0f, 1000.0f);
RNA_def_float(ot->srna, "smoothness", 1.0f, 0.0f, 1000.0f, "Smoothness", "", 0.0f, FLT_MAX);
}
+#endif
/* individual face extrude */
/* will use vertex normals for extrusion directions, so *nor is unaffected */
@@ -664,12 +709,14 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
}
/* generic extern called extruder */
-void EDBM_Extrude_Mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
+int EDBM_Extrude_Mesh(Object *obedit, BMEditMesh *em, wmOperator *op, float *norin)
{
Scene *scene= NULL; // XXX CTX!
- float nor[3]= {0.0, 0.0, 0.0};
short nr, transmode= 0;
+ float stacknor[3] = {0.0f, 0.0f, 0.0f};
+ float *nor = norin ? norin : stacknor;
+ nor[0] = nor[1] = nor[2] = 0.0f;
if(em->selectmode & SCE_SELECT_VERTEX) {
if(em->bm->totvertsel==0) nr= 0;
else if(em->bm->totvertsel==1) nr= 4;
@@ -700,7 +747,7 @@ void EDBM_Extrude_Mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2");
}
- if(nr<1) return;
+ if(nr<1) return 'g';
if(nr==1 && em->selectmode & SCE_SELECT_VERTEX)
transmode= EDBM_Extrude_vert(obedit, em, SELECT, nor);
@@ -739,23 +786,33 @@ void EDBM_Extrude_Mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
// Transform();
}
}
-
+
+ return transmode;
}
-// XXX should be a menu item
static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh;
+ int constraint_axis[3] = {0, 0, 1};
+ int tmode;
- EDBM_Extrude_Mesh(obedit,em, op);
-
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+ tmode = EDBM_Extrude_Mesh(obedit, em, op, NULL);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
- return OPERATOR_FINISHED;
+
+ RNA_enum_set(op->ptr, "proportional", 0);
+ RNA_boolean_set(op->ptr, "mirror", 0);
+
+ if (tmode == 'n') {
+ RNA_enum_set(op->ptr, "constraint_orientation", V3D_MANIP_NORMAL);
+ RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
+ }
+ WM_operator_name_call(C, "TFM_OT_translation", WM_OP_INVOKE_REGION_WIN, op->ptr);
+
+ return OPERATOR_FINISHED;
}
/* extrude without transform */
@@ -764,7 +821,7 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh;
- EDBM_Extrude_Mesh(obedit, em, op);
+ EDBM_Extrude_Mesh(obedit, em, op, NULL);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
@@ -775,7 +832,7 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op)
void MESH_OT_extrude(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Extrude Mesh";
+ ot->name= "Extrude";
ot->idname= "MESH_OT_extrude";
/* api callbacks */
@@ -787,7 +844,9 @@ void MESH_OT_extrude(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+ Properties_Proportional(ot);
+ Properties_Constraints(ot);
+ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
/* ******************** (de)select all operator **************** */
@@ -815,7 +874,7 @@ static int toggle_select_all_exec(bContext *C, wmOperator *op)
void MESH_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
+ ot->name= "Select/Deselect All";
ot->idname= "MESH_OT_select_all_toggle";
/* api callbacks */
@@ -985,6 +1044,7 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event, Scene *scene)
}
}
else if(event==4) {
+ //Edges and Faces
if (!EDBM_CallOpf(bem, op, "del geom=%hef context=%i", BM_SELECT, DEL_EDGESFACES))
return OPERATOR_CANCELLED;
}
@@ -1012,14 +1072,14 @@ static int delete_mesh(Object *obedit, wmOperator *op, int event, Scene *scene)
/* Note, these values must match delete_mesh() event values */
static EnumPropertyItem prop_mesh_delete_types[] = {
- {7, "DISSOLVE", "Dissolve", ""},
- {10,"VERT", "Vertices", ""},
- {1, "EDGE", "Edges", ""},
- {2, "FACE", "Faces", ""},
- {11, "EDGE_LOOP", "Edge Loop", ""},
- {4, "EDGE_FACE","Edges & Faces", ""},
- {5, "ONLY_FACE","Only Faces", ""},
- {0, NULL, NULL, NULL}
+ {7, "DISSOLVE", 0, "Dissolve", ""},
+ {10,"VERT", 0, "Vertices", ""},
+ {1, "EDGE", 0, "Edges", ""},
+ {2, "FACE", 0, "Faces", ""},
+ {11, "EDGE_LOOP", 0, "Edge Loop", ""},
+ {4, "EDGE_FACE", 0, "Edges & Faces", ""},
+ {5, "ONLY_FACE", 0, "Only Faces", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int delete_mesh_exec(bContext *C, wmOperator *op)
@@ -1091,10 +1151,10 @@ void MESH_OT_edge_face_add(wmOperatorType *ot)
}
static EnumPropertyItem prop_mesh_edit_types[] = {
- {1, "VERT", "Vertices", ""},
- {2, "EDGE", "Edges", ""},
- {3, "FACE", "Faces", ""},
- {0, NULL, NULL, NULL}
+ {1, "VERT", 0, "Vertices", ""},
+ {2, "EDGE", 0, "Edges", ""},
+ {3, "FACE", 0, "Faces", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int mesh_selection_type_exec(bContext *C, wmOperator *op)
@@ -1117,7 +1177,7 @@ static int mesh_selection_type_exec(bContext *C, wmOperator *op)
}
EDBM_selectmode_set(em);
- CTX_data_scene(C)->selectmode = em->selectmode;
+ CTX_data_scene(C)->toolsettings->selectmode = em->selectmode;
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
@@ -1143,3 +1203,119 @@ void MESH_OT_selection_type(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", prop_mesh_edit_types, 0, "Type", "Set the mesh selection type");
RNA_def_boolean(ot->srna, "inclusive", 0, "Inclusive", "Selects geometry around selected geometry, occording to selection mode");
}
+
+/* ************************* SEAMS AND EDGES **************** */
+
+static int editbmesh_mark_seam(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit= CTX_data_edit_object(C);
+ Mesh *me= ((Mesh *)obedit->data);
+ BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
+ BMesh *bm = em->bm;
+ BMEdge *eed;
+ BMIter iter;
+ int clear = RNA_boolean_get(op->ptr, "clear");
+
+ /* auto-enable seams drawing */
+ if(clear==0) {
+ me->drawflag |= ME_DRAWSEAMS;
+ }
+
+ if(clear) {
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+ if (BM_TestHFlag(eed, BM_HIDDEN) == 0 &&
+ BM_TestHFlag(eed, BM_SELECT) != 0)
+ {
+ BM_ClearHFlag(eed, BM_SEAM);
+ }
+ }
+ }
+ else {
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+ if (BM_TestHFlag(eed, BM_HIDDEN) == 0 &&
+ BM_TestHFlag(eed, BM_SELECT) != 0)
+ {
+ BM_SetHFlag(eed, BM_SEAM);
+ }
+ }
+ }
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_mark_seam(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Mark Seam";
+ ot->idname= "MESH_OT_mark_seam";
+
+ /* api callbacks */
+ ot->exec= editbmesh_mark_seam;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
+}
+
+static int editbmesh_mark_sharp(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Object *obedit= CTX_data_edit_object(C);
+ Mesh *me= ((Mesh *)obedit->data);
+ BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
+ BMesh *bm = em->bm;
+ BMEdge *eed;
+ BMIter iter;
+ int clear = RNA_boolean_get(op->ptr, "clear");
+
+ /* auto-enable sharp edge drawing */
+ if(clear == 0) {
+ me->drawflag |= ME_DRAWSHARP;
+ }
+
+ if(!clear) {
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+ if (BM_TestHFlag(eed, BM_HIDDEN) == 0 &&
+ BM_TestHFlag(eed, BM_SELECT) != 0)
+ {
+ BM_SetHFlag(eed, BM_SHARP);
+ }
+ }
+ } else {
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+ if (BM_TestHFlag(eed, BM_HIDDEN) == 0 &&
+ BM_TestHFlag(eed, BM_SELECT) != 0)
+ {
+ BM_ClearHFlag(eed, BM_SHARP);
+ }
+ }
+ }
+
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_mark_sharp(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Mark Sharp";
+ ot->idname= "MESH_OT_mark_sharp";
+
+ /* api callbacks */
+ ot->exec= editbmesh_mark_sharp;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
+}
diff --git a/source/blender/editors/mesh/bmeshutils.c b/source/blender/editors/mesh/bmeshutils.c
index c90fc95fa51..e3ec1c16ce3 100644
--- a/source/blender/editors/mesh/bmeshutils.c
+++ b/source/blender/editors/mesh/bmeshutils.c
@@ -81,7 +81,6 @@
#include "ED_view3d.h"
#include "ED_util.h"
#include "ED_screen.h"
-#include "BIF_transform.h"
#include "UI_interface.h"
@@ -249,7 +248,7 @@ void EDBM_MakeEditBMesh(Scene *scene, Object *ob)
}
me->edit_btmesh = BMEdit_Create(bm);
- me->edit_btmesh->selectmode = scene->selectmode;
+ me->edit_btmesh->selectmode = scene->toolsettings->selectmode;
}
void EDBM_LoadEditBMesh(Scene *scene, Object *ob)
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 5cf0a0b1de6..49872eae897 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -76,12 +76,12 @@
#include "LBM_fluidsim.h"
-#include "BIF_retopo.h"
#include "ED_mesh.h"
#include "ED_object.h"
-#include "ED_util.h"
+#include "ED_retopo.h"
#include "ED_screen.h"
+#include "ED_util.h"
#include "ED_view3d.h"
#include "RNA_access.h"
@@ -798,7 +798,7 @@ EditMesh *make_editMesh(Scene *scene, Object *ob)
em= MEM_callocN(sizeof(EditMesh), "editmesh");
- em->selectmode= scene->selectmode; // warning needs to be synced
+ em->selectmode= scene->toolsettings->selectmode; // warning needs to be synced
em->act_face = NULL;
em->totvert= tot= me->totvert;
em->totedge= me->totedge;
@@ -1078,7 +1078,7 @@ void load_editMesh(Scene *scene, Object *ob, EditMesh *em)
else
VECCOPY(mvert->co, eve->co);
- mvert->mat_nr= 255; /* what was this for, halos? */
+ mvert->mat_nr= 32767; /* what was this for, halos? */
/* vertex normal */
VECCOPY(nor, eve->no);
@@ -1164,14 +1164,14 @@ void load_editMesh(Scene *scene, Object *ob, EditMesh *em)
/* mat_nr in vertex */
if(me->totcol>1) {
mvert= me->mvert+mface->v1;
- if(mvert->mat_nr == (char)255) mvert->mat_nr= mface->mat_nr;
+ if(mvert->mat_nr == (char)32767) mvert->mat_nr= mface->mat_nr;
mvert= me->mvert+mface->v2;
- if(mvert->mat_nr == (char)255) mvert->mat_nr= mface->mat_nr;
+ if(mvert->mat_nr == (char)32767) mvert->mat_nr= mface->mat_nr;
mvert= me->mvert+mface->v3;
- if(mvert->mat_nr == (char)255) mvert->mat_nr= mface->mat_nr;
+ if(mvert->mat_nr == (char)32767) mvert->mat_nr= mface->mat_nr;
if(mface->v4) {
mvert= me->mvert+mface->v4;
- if(mvert->mat_nr == (char)255) mvert->mat_nr= mface->mat_nr;
+ if(mvert->mat_nr == (char)32767) mvert->mat_nr= mface->mat_nr;
}
}
@@ -1380,10 +1380,10 @@ void remake_editMesh(Scene *scene, Object *ob)
/* *************** Operator: separate parts *************/
static EnumPropertyItem prop_separate_types[] = {
- {0, "SELECTED", "Selection", ""},
- {1, "MATERIAL", "By Material", ""},
- {2, "LOOSE", "By loose parts", ""},
- {0, NULL, NULL, NULL}
+ {0, "SELECTED", 0, "Selection", ""},
+ {1, "MATERIAL", 0, "By Material", ""},
+ {2, "LOOSE", 0, "By loose parts", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* return 1: success */
@@ -1502,7 +1502,7 @@ static int mesh_separate_material(Scene *scene, Base *editbase)
/* clear selection, we're going to use that to select material group */
EM_clear_flag_all(em, SELECT);
/* select the material */
- editmesh_select_by_material(em, curr_mat);
+ EM_select_by_material(em, curr_mat);
/* and now separate */
if(0==mesh_separate_selected(scene, editbase)) {
BKE_mesh_end_editmesh(me, em);
@@ -1552,13 +1552,13 @@ static int mesh_separate_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Base *base= CTX_data_active_base(C);
- int retval= 0;
+ int retval= 0, type= RNA_enum_get(op->ptr, "type");
- if(RNA_enum_is_equal(op->ptr, "type", "SELECTED"))
+ if(type == 0)
retval= mesh_separate_selected(scene, base);
- else if(RNA_enum_is_equal(op->ptr, "type", "MATERIAL"))
+ else if(type == 1)
retval= mesh_separate_material (scene, base);
- else if(RNA_enum_is_equal(op->ptr, "type", "LOOSE"))
+ else if(type == 2)
retval= mesh_separate_loose(scene, base);
if(retval) {
@@ -1571,7 +1571,7 @@ static int mesh_separate_exec(bContext *C, wmOperator *op)
void MESH_OT_separate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mesh Separate";
+ ot->name= "Separate";
ot->idname= "MESH_OT_separate";
/* api callbacks */
@@ -1615,8 +1615,8 @@ typedef struct EditEdgeC
typedef struct EditFaceC
{
int v1, v2, v3, v4;
- unsigned char mat_nr, flag, f, h, fgonf;
- short pad1;
+ unsigned char flag, f, h, fgonf, pad1;
+ short mat_nr;
} EditFaceC;
typedef struct EditSelectionC{
@@ -1653,26 +1653,35 @@ void EM_init_index_arrays(EditMesh *em, int forVert, int forEdge, int forFace)
if (forVert) {
em->totvert= BLI_countlist(&em->verts);
- g_em_vert_array = MEM_mallocN(sizeof(*g_em_vert_array)*em->totvert, "em_v_arr");
- for (i=0,eve=em->verts.first; eve; i++,eve=eve->next)
- g_em_vert_array[i] = eve;
+ if(em->totvert) {
+ g_em_vert_array = MEM_mallocN(sizeof(*g_em_vert_array)*em->totvert, "em_v_arr");
+
+ for (i=0,eve=em->verts.first; eve; i++,eve=eve->next)
+ g_em_vert_array[i] = eve;
+ }
}
if (forEdge) {
em->totedge= BLI_countlist(&em->edges);
- g_em_edge_array = MEM_mallocN(sizeof(*g_em_edge_array)*em->totedge, "em_e_arr");
- for (i=0,eed=em->edges.first; eed; i++,eed=eed->next)
- g_em_edge_array[i] = eed;
+ if(em->totedge) {
+ g_em_edge_array = MEM_mallocN(sizeof(*g_em_edge_array)*em->totedge, "em_e_arr");
+
+ for (i=0,eed=em->edges.first; eed; i++,eed=eed->next)
+ g_em_edge_array[i] = eed;
+ }
}
if (forFace) {
em->totface= BLI_countlist(&em->faces);
- g_em_face_array = MEM_mallocN(sizeof(*g_em_face_array)*em->totface, "em_f_arr");
- for (i=0,efa=em->faces.first; efa; i++,efa=efa->next)
- g_em_face_array[i] = efa;
+ if(em->totface) {
+ g_em_face_array = MEM_mallocN(sizeof(*g_em_face_array)*em->totface, "em_f_arr");
+
+ for (i=0,efa=em->faces.first; efa; i++,efa=efa->next)
+ g_em_face_array[i] = efa;
+ }
}
}
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 405d2a19d41..4b891843f5e 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -62,15 +62,15 @@
#include "BKE_report.h"
#include "BKE_tessmesh.h"
-#include "BIF_retopo.h"
-
#include "WM_api.h"
#include "WM_types.h"
#include "ED_mesh.h"
+#include "ED_retopo.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_util.h"
#include "ED_view3d.h"
-#include "ED_screen.h"
#include "bmesh.h"
@@ -1001,7 +1001,9 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se
}
dia*=200;
- for(a=1; a<subdiv; a++) esubdivideflag(obedit, em, 2, dia, 0,1,0);
+
+ for(a=1; a<subdiv; a++) esubdivideflag(obedit, em, 2, dia, 0.0, 0, 1, 0);
+
/* and now do imat */
eve= em->verts.first;
while(eve) {
@@ -1173,7 +1175,7 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
Object *obedit= CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
View3D *v3d =CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ RegionView3D *rv3d= ED_view3d_context_rv3d(C);
float *curs, mat[3][3], vmat[3][3], cmat[3][3], imat[3][3];
Mat4One(primmat);
@@ -1192,9 +1194,9 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
/* center */
curs= give_cursor(scene, v3d);
VECCOPY(primmat[3], curs);
+ VECSUB(primmat[3], primmat[3], obedit->obmat[3]);
Mat3Inv(imat, mat);
Mat3MulVecfl(imat, primmat[3]);
- VECSUB(primmat[3], primmat[3], obedit->obmat[3]);
if(v3d) return v3d->grid;
return 1.0f;
@@ -1204,6 +1206,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];
@@ -1213,6 +1216,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1234,6 +1238,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];
@@ -1243,6 +1248,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1264,6 +1270,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];
@@ -1273,6 +1280,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1299,6 +1307,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];
@@ -1308,6 +1317,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1334,6 +1344,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];
@@ -1343,6 +1354,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1369,6 +1381,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];
@@ -1378,6 +1391,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1406,6 +1420,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];
@@ -1415,6 +1430,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1441,6 +1457,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];
@@ -1448,6 +1465,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1469,6 +1487,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];
@@ -1478,6 +1497,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1504,6 +1524,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];
@@ -1513,6 +1534,7 @@ 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_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -1536,3 +1558,49 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, "Size", "", 0.001f, 100.00);
}
+/****************** add duplicate operator ***************/
+
+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);
+
+ adduplicateflag(em, SELECT);
+
+ BKE_mesh_end_editmesh(ob->data, em);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ WM_cursor_wait(1);
+ mesh_duplicate_exec(C, op);
+ WM_cursor_wait(0);
+
+ 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 MESH_OT_duplicate(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Duplicate";
+ ot->idname= "MESH_OT_duplicate";
+
+ /* api callbacks */
+ ot->invoke= mesh_duplicate_invoke;
+ ot->exec= mesh_duplicate_exec;
+
+ ot->poll= ED_operator_editmesh;
+
+ /* to give to transform */
+ RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+}
+
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index 120606d9fb0..d9e0cc0f339 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -51,11 +51,13 @@ editmesh_lib: generic (no UI, no menus) operations/evaluators for editmesh data
#include "BLI_editVert.h"
#include "BKE_customdata.h"
+#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_utildefines.h"
#include "ED_mesh.h"
+#include "ED_screen.h"
#include "ED_view3d.h"
#include "mesh_intern.h"
@@ -2413,3 +2415,10 @@ void EM_free_uv_vert_map(UvVertMap *vmap)
}
}
+/* poll call for mesh operators requiring a view3d context */
+int EM_view3d_poll(bContext *C)
+{
+ if(ED_operator_editmesh(C) && ED_operator_view3d_active(C))
+ return 1;
+ return 0;
+}
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 7f1d56aee73..9b5de48a644 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -372,9 +372,9 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
fac= 1.0f;
// XXX if(fbutton(&fac, 0.0f, 5.0f, 10, 10, "Smooth:")==0) return;
fac= 0.292f*fac;
- esubdivideflag(obedit, em, SELECT,fac,B_SMOOTH,numcuts,SUBDIV_SELECT_LOOPCUT);
+ esubdivideflag(obedit, em, SELECT,fac,0,B_SMOOTH,numcuts,SUBDIV_SELECT_LOOPCUT);
} else {
- esubdivideflag(obedit, em, SELECT,0,0,numcuts,SUBDIV_SELECT_LOOPCUT);
+ esubdivideflag(obedit, em, SELECT,0,0,0,numcuts,SUBDIV_SELECT_LOOPCUT);
}
/* if this was a single cut, enter edgeslide mode */
if(numcuts == 1 && hasHidden == 0){
@@ -462,10 +462,10 @@ typedef struct CutCurve {
#define KNIFE_MULTICUT 3
static EnumPropertyItem knife_items[]= {
- {KNIFE_EXACT, "EXACT", "Exact", ""},
- {KNIFE_MIDPOINT, "MIDPOINTS", "Midpoints", ""},
- {KNIFE_MULTICUT, "MULTICUT", "Multicut", ""},
- {0, NULL, NULL}
+ {KNIFE_EXACT, "EXACT", 0, "Exact", ""},
+ {KNIFE_MIDPOINT, "MIDPOINTS", 0, "Midpoints", ""},
+ {KNIFE_MULTICUT, "MULTICUT", 0, "Multicut", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* seg_intersect() Determines if and where a mouse trail intersects an EditEdge */
@@ -784,6 +784,7 @@ static float bm_seg_intersect(BMEdge *e, CutCurve *c, int len, char mode,
static int knife_cut_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
BMEditMesh *em= (((Mesh *)obedit->data))->edit_btmesh;
BMesh *bm = em->bm;
@@ -837,7 +838,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
isect= bm_seg_intersect(be, curve, len, mode, gh, &isected);
if (isect != 0.0f) {
- if (mode != KNIFE_MULTICUT) {
+ if (mode != KNIFE_MULTICUT && mode != KNIFE_MIDPOINT) {
BMO_Insert_MapFloat(bm, &bmop,
"edgepercents",
be, isect);
@@ -868,6 +869,10 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
BLI_ghash_free(gh, NULL, (GHashValFreeFP)WMEM_freeN);
+
+ 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 23f8d5364d6..aa7a5e6b292 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -331,26 +331,25 @@ int EM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads)
/* **************** SIMILAR "group" SELECTS. FACE, EDGE AND VERTEX ************** */
-/* selects new faces/edges/verts based on the
- existing selection
-
-FACES GROUP
- mode 1: same material
- mode 2: same image
- mode 3: same area
- mode 4: same perimeter
- mode 5: same normal
- mode 6: same co-planer
-*/
+/* selects new faces/edges/verts based on the existing selection */
+
+/* FACES GROUP */
+
+#define SIMFACE_MATERIAL 201
+#define SIMFACE_IMAGE 202
+#define SIMFACE_AREA 203
+#define SIMFACE_PERIMETER 204
+#define SIMFACE_NORMAL 205
+#define SIMFACE_COPLANAR 206
static EnumPropertyItem prop_simface_types[] = {
- {1, "MATERIAL", "Material", ""},
- {2, "IMAGE", "Image", ""},
- {3, "AREA", "Area", ""},
- {4, "PERIMETER", "Perimeter", ""},
- {5, "NORMAL", "Normal", ""},
- {6, "COPLANAR", "Co-planar", ""},
- {0, NULL, NULL, NULL}
+ {SIMFACE_MATERIAL, "MATERIAL", 0, "Material", ""},
+ {SIMFACE_IMAGE, "IMAGE", 0, "Image", ""},
+ {SIMFACE_AREA, "AREA", 0, "Area", ""},
+ {SIMFACE_PERIMETER, "PERIMETER", 0, "Perimeter", ""},
+ {SIMFACE_NORMAL, "NORMAL", 0, "Normal", ""},
+ {SIMFACE_COPLANAR, "COPLANAR", 0, "Co-planar", ""},
+ {0, NULL, 0, NULL, NULL}
};
@@ -384,12 +383,11 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
if (!ok || !deselcount) /* no data selected OR no more data to select */
return 0;
- /*if mode is 3 then record face areas, 4 record perimeter */
- if (mode==3) {
+ if (mode==SIMFACE_AREA) {
for(efa= em->faces.first; efa; efa= efa->next) {
efa->tmp.fp= EM_face_area(efa);
}
- } else if (mode==4) {
+ } else if (mode==SIMFACE_PERIMETER) {
for(efa= em->faces.first; efa; efa= efa->next) {
efa->tmp.fp= EM_face_perimeter(efa);
}
@@ -397,7 +395,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
for(base_efa= em->faces.first; base_efa; base_efa= base_efa->next) {
if (base_efa->f1) { /* This was one of the faces originaly selected */
- if (mode==1) { /* same material */
+ if (mode==SIMFACE_MATERIAL) { /* same material */
for(efa= em->faces.first; efa; efa= efa->next) {
if (
!(efa->f & SELECT) &&
@@ -411,7 +409,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==2) { /* same image */
+ } else if (mode==SIMFACE_IMAGE) { /* same image */
MTFace *tf, *base_tf;
base_tf = (MTFace*)CustomData_em_get(&em->fdata, base_efa->data,
@@ -434,7 +432,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
}
}
}
- } else if (mode==3 || mode==4) { /* same area OR same perimeter, both use the same temp var */
+ } else if (mode==SIMFACE_AREA || mode==SIMFACE_PERIMETER) { /* same area OR same perimeter, both use the same temp var */
for(efa= em->faces.first; efa; efa= efa->next) {
if (
(!(efa->f & SELECT) && !efa->h) &&
@@ -447,7 +445,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==5) { /* same normal */
+ } else if (mode==SIMFACE_NORMAL) {
float angle;
for(efa= em->faces.first; efa; efa= efa->next) {
if (!(efa->f & SELECT) && !efa->h) {
@@ -461,7 +459,7 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode)
}
}
}
- } else if (mode==6) { /* same planer */
+ } else if (mode==SIMFACE_COPLANAR) { /* same planer */
float angle, base_dot, dot;
base_dot= Inpf(base_efa->cent, base_efa->n);
for(efa= em->faces.first; efa; efa= efa->next) {
@@ -506,46 +504,27 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void MESH_OT_faces_select_similar(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Similar Face Select";
- ot->idname= "MESH_OT_faces_select_similar";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= similar_face_select_exec;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", prop_simface_types, 0, "Type", "");
-}
-
/* ***************************************************** */
-/*
-EDGE GROUP
- mode 1: same length
- mode 2: same direction
- mode 3: same number of face users
- mode 4: similar face angles.
- mode 5: similar crease
- mode 6: similar seam
- mode 7: similar sharp
-*/
+/* EDGE GROUP */
+
+#define SIMEDGE_LENGTH 101
+#define SIMEDGE_DIR 102
+#define SIMEDGE_FACE 103
+#define SIMEDGE_FACE_ANGLE 104
+#define SIMEDGE_CREASE 105
+#define SIMEDGE_SEAM 106
+#define SIMEDGE_SHARP 107
static EnumPropertyItem prop_simedge_types[] = {
- {1, "LENGTH", "Length", ""},
- {2, "DIR", "Direction", ""},
- {3, "FACE", "Amount of Vertices in Face", ""},
- {4, "FACE_ANGLE", "Face Angles", ""},
- {5, "CREASE", "Crease", ""},
- {6, "SEAM", "Seam", ""},
- {7, "SHARP", "Sharpness", ""},
- {0, NULL, NULL, NULL}
+ {SIMEDGE_LENGTH, "LENGTH", 0, "Length", ""},
+ {SIMEDGE_DIR, "DIR", 0, "Direction", ""},
+ {SIMEDGE_FACE, "FACE", 0, "Amount of Vertices in Face", ""},
+ {SIMEDGE_FACE_ANGLE, "FACE_ANGLE", 0, "Face Angles", ""},
+ {SIMEDGE_CREASE, "CREASE", 0, "Crease", ""},
+ {SIMEDGE_SEAM, "SEAM", 0, "Seam", ""},
+ {SIMEDGE_SHARP, "SHARP", 0, "Sharpness", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
@@ -572,19 +551,19 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
/* set all eed->tmp.l to 0 we use it later.
for counting face users*/
eed->tmp.l=0;
- eed->f2=0; /* only for mode 4, edge animations */
+ eed->f2=0; /* only for mode SIMEDGE_FACE_ANGLE, edge animations */
}
}
if (!ok || !deselcount) /* no data selected OR no more data to select*/
return 0;
- if (mode==1) { /*store length*/
+ if (mode==SIMEDGE_LENGTH) { /*store length*/
for(eed= em->edges.first; eed; eed= eed->next) {
if (!eed->h) /* dont calc data for hidden edges*/
eed->tmp.fp= VecLenf(eed->v1->co, eed->v2->co);
}
- } else if (mode==3) { /*store face users*/
+ } else if (mode==SIMEDGE_FACE) { /*store face users*/
EditFace *efa;
/* cound how many faces each edge uses use tmp->l */
for(efa= em->faces.first; efa; efa= efa->next) {
@@ -593,7 +572,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
efa->e3->tmp.l++;
if (efa->e4) efa->e4->tmp.l++;
}
- } else if (mode==4) { /*store edge angles */
+ } else if (mode==SIMEDGE_FACE_ANGLE) { /*store edge angles */
EditFace *efa;
int j;
/* cound how many faces each edge uses use tmp.l */
@@ -635,7 +614,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
for(base_eed= em->edges.first; base_eed; base_eed= base_eed->next) {
if (base_eed->f1) {
- if (mode==1) { /* same length */
+ if (mode==SIMEDGE_LENGTH) { /* same length */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -649,7 +628,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==2) { /* same direction */
+ } else if (mode==SIMEDGE_DIR) { /* same direction */
float base_dir[3], dir[3], angle;
VecSubf(base_dir, base_eed->v1->co, base_eed->v2->co);
for(eed= em->edges.first; eed; eed= eed->next) {
@@ -669,7 +648,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
}
}
}
- } else if (mode==3) { /* face users */
+ } else if (mode==SIMEDGE_FACE) { /* face users */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -683,7 +662,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==4 && base_eed->f2==2) { /* edge angles, f2==2 means the edge has an angle. */
+ } else if (mode==SIMEDGE_FACE_ANGLE && base_eed->f2==2) { /* edge angles, f2==2 means the edge has an angle. */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -698,7 +677,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==5) { /* edge crease */
+ } else if (mode==SIMEDGE_CREASE) { /* edge crease */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -712,7 +691,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==6) { /* edge seam */
+ } else if (mode==SIMEDGE_SEAM) { /* edge seam */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -726,7 +705,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
return selcount;
}
}
- } else if (mode==7) { /* edge sharp */
+ } else if (mode==SIMEDGE_SHARP) { /* edge sharp */
for(eed= em->edges.first; eed; eed= eed->next) {
if (
!(eed->f & SELECT) &&
@@ -767,24 +746,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void MESH_OT_edges_select_similar(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Similar Edge Select";
- ot->idname= "MESH_OT_edges_select_similar";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= similar_edge_select_exec;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", prop_simedge_types, 0, "Type", "");
-}
-
/* ********************************* */
/*
@@ -793,11 +754,16 @@ VERT GROUP
mode 2: same number of face users
mode 3: same vertex groups
*/
+
+#define SIMVERT_NORMAL 0
+#define SIMVERT_FACE 1
+#define SIMVERT_VGROUP 2
+
static EnumPropertyItem prop_simvertex_types[] = {
- {0, "NORMAL", "Normal", ""},
- {1, "FACE", "Amount of Vertices in Face", ""},
- {2, "VGROUP", "Vertex Groups", ""},
- {0, NULL, NULL, NULL}
+ {SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""},
+ {SIMVERT_FACE, "FACE", 0, "Amount of Vertices in Face", ""},
+ {SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""},
+ {0, NULL, 0, NULL, NULL}
};
@@ -813,6 +779,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
/*count how many visible selected edges there are,
so we can return when there are none left */
unsigned int deselcount=0;
+ int mode= RNA_enum_get(op->ptr, "type");
short ok=0;
float thresh= scene->toolsettings->select_thresh;
@@ -837,7 +804,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
return 0;
}
- if(RNA_enum_is_equal(op->ptr, "type", "FACE")) {
+ if(mode == SIMVERT_FACE) {
/* store face users */
EditFace *efa;
@@ -854,7 +821,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
for(base_eve= em->verts.first; base_eve; base_eve= base_eve->next) {
if (base_eve->f1) {
- if(RNA_enum_is_equal(op->ptr, "type", "NORMAL")) {
+ if(mode == SIMVERT_NORMAL) {
float angle;
for(eve= em->verts.first; eve; eve= eve->next) {
if (!(eve->f & SELECT) && !eve->h) {
@@ -871,7 +838,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
}
}
}
- else if(RNA_enum_is_equal(op->ptr, "type", "FACE")) {
+ else if(mode == SIMVERT_FACE) {
for(eve= em->verts.first; eve; eve= eve->next) {
if (
!(eve->f & SELECT) &&
@@ -888,7 +855,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
}
}
}
- else if(RNA_enum_is_equal(op->ptr, "type", "VGROUP")) {
+ else if(mode == SIMVERT_VGROUP) {
MDeformVert *dvert, *base_dvert;
short i, j; /* weight index */
@@ -937,22 +904,75 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void MESH_OT_vertices_select_similar(wmOperatorType *ot)
+static int select_similar_exec(bContext *C, wmOperator *op)
+{
+ int type= RNA_enum_get(op->ptr, "type");
+
+ if(type < 100)
+ return similar_vert_select_exec(C, op);
+ else if(type < 200)
+ return similar_edge_select_exec(C, op);
+ else
+ return similar_face_select_exec(C, op);
+}
+
+static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ Object *obedit;
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ if(C==NULL) {
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, prop_simvertex_types);
+ RNA_enum_items_add(&item, &totitem, prop_simedge_types);
+ RNA_enum_items_add(&item, &totitem, prop_simface_types);
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
+ }
+
+ obedit= CTX_data_edit_object(C);
+
+ if(obedit && obedit->type == OB_MESH) {
+ EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
+
+ if(em->selectmode & SCE_SELECT_VERTEX)
+ RNA_enum_items_add(&item, &totitem, prop_simvertex_types);
+ else if(em->selectmode & SCE_SELECT_EDGE)
+ RNA_enum_items_add(&item, &totitem, prop_simedge_types);
+ else if(em->selectmode & SCE_SELECT_FACE)
+ RNA_enum_items_add(&item, &totitem, prop_simface_types);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
+ return NULL;
+}
+
+void MESH_OT_select_similar(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Similar Vertex Select";
- ot->idname= "MESH_OT_vertices_select_similar";
+ ot->name= "Select Similar";
+ ot->idname= "MESH_OT_select_similar";
/* api callbacks */
ot->invoke= WM_menu_invoke;
- ot->exec= similar_vert_select_exec;
+ ot->exec= select_similar_exec;
ot->poll= ED_operator_editmesh;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", prop_simvertex_types, 0, "Type", "");
+ prop= RNA_def_enum(ot->srna, "type", prop_simvertex_types, 0, "Type", "");
+ RNA_def_enum_funcs(prop, select_similar_type_itemf);
}
/* ******************************************* */
@@ -1111,7 +1131,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 2: /* copy image */
if (!tf_act) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1132,7 +1152,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
case 3: /* copy UV's */
if (!tf_act) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1145,7 +1165,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 4: /* mode's */
if (!tf_act) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1158,7 +1178,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 5: /* copy transp's */
if (!tf_act) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1172,7 +1192,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
case 6: /* copy vcols's */
if (!mcol_act) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no color layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers.");
return;
} else {
/* guess the 4th color if needs be */
@@ -2222,20 +2242,24 @@ void MESH_OT_reveal(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void select_faces_by_numverts(EditMesh *em, wmOperator *op, int numverts)
+int select_by_number_vertices_exec(bContext *C, wmOperator *op)
{
+ Object *obedit= CTX_data_edit_object(C);
+ EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditFace *efa;
+ int numverts= RNA_enum_get(op->ptr, "type");
/* Selects trias/qiads or isolated verts, and edges that do not have 2 neighboring
* faces
*/
/* for loose vertices/edges, we first select all, loop below will deselect */
- if(numverts==5)
+ if(numverts==5) {
EM_set_flag_all(em, SELECT);
+ }
else if(em->selectmode!=SCE_SELECT_FACE) {
BKE_report(op->reports, RPT_ERROR, "Only works in face selection mode");
- return;
+ return OPERATOR_CANCELLED;
}
for(efa= em->faces.first; efa; efa= efa->next) {
@@ -2247,8 +2271,32 @@ void select_faces_by_numverts(EditMesh *em, wmOperator *op, int numverts)
}
}
-// if (EM_texFaceCheck())
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_select_by_number_vertices(wmOperatorType *ot)
+{
+ static const EnumPropertyItem type_items[]= {
+ {3, "TRIANGLES", 0, "Triangles", NULL},
+ {4, "QUADS", 0, "Triangles", NULL},
+ {5, "OTHER", 0, "Other", NULL},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* identifiers */
+ ot->name= "Select by Number of Vertices";
+ ot->idname= "MESH_OT_select_by_number_vertices";
+ /* api callbacks */
+ ot->exec= select_by_number_vertices_exec;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* props */
+ RNA_def_enum(ot->srna, "type", type_items, 3, "Type", "Type of elements to select.");
}
static int select_sharp_edges_exec(bContext *C, wmOperator *op)
@@ -2671,7 +2719,7 @@ void EM_select_swap(EditMesh *em) /* exported for UV */
}
-static int select_invert_mesh_exec(bContext *C, wmOperator *op)
+static int select_inverse_mesh_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
@@ -2684,14 +2732,14 @@ static int select_invert_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void MESH_OT_select_invert(wmOperatorType *ot)
+void MESH_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Invert";
- ot->idname= "MESH_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "MESH_OT_select_inverse";
/* api callbacks */
- ot->exec= select_invert_mesh_exec;
+ ot->exec= select_inverse_mesh_exec;
ot->poll= ED_operator_editmesh;
/* flags */
@@ -2938,6 +2986,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
/* api callbacks */
ot->exec= mesh_select_random_exec;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_editmesh;
/* flags */
@@ -2947,7 +2996,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f);
}
-void editmesh_select_by_material(EditMesh *em, int index)
+void EM_select_by_material(EditMesh *em, int index)
{
EditFace *efa;
@@ -2960,7 +3009,7 @@ void editmesh_select_by_material(EditMesh *em, int index)
EM_selectmode_flush(em);
}
-void editmesh_deselect_by_material(EditMesh *em, int index)
+void EM_deselect_by_material(EditMesh *em, int index)
{
EditFace *efa;
@@ -2994,276 +3043,10 @@ static void mesh_selection_type(Scene *scene, 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 */
- scene->selectmode= em->selectmode;
+ scene->toolsettings->selectmode= em->selectmode;
// if (EM_texFaceCheck())
}
}
-/* ************************* SEAMS AND EDGES **************** */
-
-static int editmesh_mark_seam(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
-
- EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
- Mesh *me= ((Mesh *)obedit->data);
- EditEdge *eed;
- int clear = RNA_boolean_get(op->ptr, "clear");
-
- /* auto-enable seams drawing */
- if(clear==0) {
- me->drawflag |= ME_DRAWSEAMS;
- }
-
- if(clear) {
- eed= em->edges.first;
- while(eed) {
- if((eed->h==0) && (eed->f & SELECT)) {
- eed->seam = 0;
- }
- eed= eed->next;
- }
- }
- else {
- eed= em->edges.first;
- while(eed) {
- if((eed->h==0) && (eed->f & SELECT)) {
- eed->seam = 1;
- }
- eed= eed->next;
- }
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
-
- BKE_mesh_end_editmesh(obedit->data, em);
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_mark_seam(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Mark seam";
- ot->idname= "MESH_OT_mark_seam";
-
- /* api callbacks */
- ot->exec= editmesh_mark_seam;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
-}
-
-static int editmesh_mark_sharp(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
-
- EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
- Mesh *me= ((Mesh *)obedit->data);
- int set = RNA_boolean_get(op->ptr, "set");
- EditEdge *eed;
-
- /* auto-enable sharp edge drawing */
- if(set) {
- me->drawflag |= ME_DRAWSHARP;
- }
-
- if(set) {
- eed= em->edges.first;
- while(eed) {
- if(!eed->h && (eed->f & SELECT)) eed->sharp = 1;
- eed = eed->next;
- }
- } else {
- eed= em->edges.first;
- while(eed) {
- if(!eed->h && (eed->f & SELECT)) eed->sharp = 0;
- eed = eed->next;
- }
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
-
- BKE_mesh_end_editmesh(obedit->data, em);
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_mark_sharp(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Mark sharp";
- ot->idname= "MESH_OT_mark_sharp";
-
- /* api callbacks */
- ot->exec= editmesh_mark_sharp;
- ot->poll= ED_operator_editmesh;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "set", 0, "Set", "");
-}
-
-void BME_Menu() {
- short ret;
- ret= pupmenu("BME modeller%t|Select Edges of Vert%x1");
-
- switch(ret)
- {
- case 1:
- //BME_edges_of_vert();
- break;
- }
-}
-
-
-
-void Vertex_Menu(EditMesh *em)
-{
- short ret;
- ret= pupmenu("Vertex Specials%t|Remove Doubles%x1|Merge%x2|Smooth %x3|Select Vertex Path%x4|Blend From Shape%x5|Propagate To All Shapes%x6");
-
- switch(ret)
- {
- case 1:
-// XXX notice("Removed %d Vertices", removedoublesflag(1, 0, scene->toolsettings->doublimit));
- break;
- case 2:
-// XXX mergemenu(em);
- break;
- case 3:
-// XXX vertexsmooth(em);
- break;
- case 4:
-// XXX pathselect(em);
- break;
- case 5:
-// XXX shape_copy_select_from(em);
- break;
- case 6:
-// XXX shape_propagate(em);
- break;
- }
- /* some items crashed because this is in the original W menu but not here. should really manage this better */
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-}
-
-
-void Edge_Menu(EditMesh *em)
-{
- short ret;
-
- ret= pupmenu("Edge Specials%t|Mark Seam %x1|Clear Seam %x2|Rotate Edge CW%x3|Rotate Edge CCW%x4|Loopcut%x6|Edge Slide%x5|Edge Loop Select%x7|Edge Ring Select%x8|Loop to Region%x9|Region to Loop%x10|Mark Sharp%x11|Clear Sharp%x12");
-
- switch(ret)
- {
- case 1:
- //editmesh_mark_seam(em, 0);
- break;
- case 2:
- //editmesh_mark_seam(em, 1);
- break;
- case 3:
-// edge_rotate_selected(em, 2);
- break;
- case 4:
-// edge_rotate_selected(em, 1);
- break;
- case 5:
-// EdgeSlide(em, 0,0.0);
- break;
- case 6:
-// CutEdgeloop(em, 1);
- break;
- case 7:
-// loop_multiselect(em, 0);
- break;
- case 8:
-// loop_multiselect(em, 1);
- break;
- case 9:
-// loop_to_region(em);
- break;
- case 10:
-// region_to_loop(em);
- break;
- case 11:
-// editmesh_mark_sharp(em, 1);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 12:
-// editmesh_mark_sharp(em, 0);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- }
- /* some items crashed because this is in the original W menu but not here. should really manage this better */
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-}
-
-void Face_Menu(EditMesh *em)
-{
- short ret;
- ret= pupmenu(
- "Face Specials%t|Flip Normals%x1|Bevel%x2|Shade Smooth%x3|Shade Flat%x4|"
- "Triangulate (Ctrl T)%x5|Quads from Triangles (Alt J)%x6|Flip Triangle Edges (Ctrl Shift F)%x7|%l|"
- "Face Mode Set%x8|Face Mode Clear%x9|%l|"
- "UV Rotate (Shift - CCW)%x10|UV Mirror (Shift - Switch Axis)%x11|"
- "Color Rotate (Shift - CCW)%x12|Color Mirror (Shift - Switch Axis)%x13");
-
- switch(ret)
- {
- case 1:
-// flip_editnormals(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 2:
-// bevel_menu(em);
- break;
- case 3:
-// mesh_set_smooth_faces(em, 1);
- break;
- case 4:
-// mesh_set_smooth_faces(em, 0);
- break;
-
- case 5: /* Quads to Tris */
-// convert_to_triface(em, 0);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 6: /* Tris to Quads */
-// join_triangles(em);
- break;
- case 7: /* Flip triangle edges */
-// edge_flip(em);
- break;
- case 8:
-// mesh_set_face_flags(em, 1);
- break;
- case 9:
-// mesh_set_face_flags(em, 0);
- break;
-
- /* uv texface options */
- case 10:
-// mesh_rotate_uvs(em);
- break;
- case 11:
-// mesh_mirror_uvs(em);
- break;
- case 12:
-// mesh_rotate_colors(em);
- break;
- case 13:
-// mesh_mirror_colors(em);
- break;
- }
- /* some items crashed because this is in the original W menu but not here. should really manage this better */
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-}
-
/* **************** NORMALS ************** */
@@ -3481,6 +3264,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));
@@ -3490,9 +3274,11 @@ static int righthandfaces_exec(bContext *C, wmOperator *op)
// XXX need other args
righthandfaces(em, RNA_boolean_get(op->ptr, "inside"));
+ BKE_mesh_end_editmesh(obedit->data, em);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
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;
}
@@ -3693,16 +3479,13 @@ static int smooth_vertex(bContext *C, wmOperator *op)
#if 0 //BMESH_TODO
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
- Mesh *me= obedit->data;
- EditMesh *em= (EditMesh *)me;
-
+ EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditVert *eve, *eve_mir = NULL;
EditEdge *eed;
float *adror, *adr, fac;
float fvec[3];
int teller=0;
- ModifierData *md= obedit->modifiers.first;
-
+ ModifierData *md;
if(em==NULL) {
BKE_mesh_end_editmesh(obedit->data, em);
@@ -3736,8 +3519,8 @@ static int smooth_vertex(bContext *C, wmOperator *op)
/* if there is a mirror modifier with clipping, flag the verts that
* are within tolerance of the plane(s) of reflection
*/
- for (; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
+ for(md=obedit->modifiers.first; md; md=md->next) {
+ if(md->type==eModifierType_Mirror) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -3828,11 +3611,11 @@ static int smooth_vertex(bContext *C, wmOperator *op)
recalc_editnormals(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ BKE_mesh_end_editmesh(obedit->data, em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_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);
#endif
return OPERATOR_FINISHED;
}
@@ -3962,9 +3745,11 @@ static int vertices_to_sphere_exec(bContext *C, wmOperator *op)
vertices_to_sphere(scene, v3d, obedit, em, RNA_float_get(op->ptr,"percent"));
+ BKE_mesh_end_editmesh(obedit->data, em);
+
+ 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;
}
@@ -4005,8 +3790,9 @@ void flipface(EditMesh *em, EditFace *efa)
}
-static int flip_editnormals(bContext *C, wmOperator *op)
+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;
@@ -4023,19 +3809,24 @@ static int flip_editnormals(bContext *C, wmOperator *op)
recalc_editnormals(em);
BKE_mesh_end_editmesh(obedit->data, em);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
-void MESH_OT_flip_editnormals(wmOperatorType *ot)
+void MESH_OT_flip_normals(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Flip Normals";
- ot->idname= "MESH_OT_flip_editnormals";
+ ot->idname= "MESH_OT_flip_normals";
/* api callbacks */
- ot->exec= flip_editnormals;
+ ot->exec= flip_normals;
ot->poll= ED_operator_editmesh;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 8b817b4b333..50ac7894120 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1,4 +1,4 @@
- /* $Id:
+ /* $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -85,10 +85,10 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
#include "WM_types.h"
#include "ED_mesh.h"
-#include "ED_view3d.h"
-#include "ED_util.h"
#include "ED_screen.h"
-#include "BIF_transform.h"
+#include "ED_transform.h"
+#include "ED_util.h"
+#include "ED_view3d.h"
#include "UI_interface.h"
@@ -136,7 +136,7 @@ struct facesort {
static int vergface(const void *v1, const void *v2)
{
const struct facesort *x1=v1, *x2=v2;
-
+
if( x1->x > x2->x ) return 1;
else if( x1->x < x2->x) return -1;
return 0;
@@ -149,7 +149,7 @@ void convert_to_triface(EditMesh *em, int direction)
{
EditFace *efa, *efan, *next;
float fac;
-
+
efa= em->faces.last;
while(efa) {
next= efa->prev;
@@ -170,17 +170,17 @@ void convert_to_triface(EditMesh *em, int direction)
efan= EM_face_from_faces(em, efa, NULL, 1, 2, 3, -1);
if(efa->f & SELECT) EM_select_face(efan, 1);
}
-
+
BLI_remlink(&em->faces, efa);
free_editface(em, efa);
}
}
efa= next;
}
-
+
EM_fgon_flags(em); // redo flags and indices for fgons
-
+
}
int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /* return amount */
@@ -191,7 +191,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
Used for "Auto Weld" mode. warning.
limit - Quick manhattan distance between verts.
*/
-
+
/* all verts with (flag & 'flag') are being evaluated */
EditVert *eve, *v1, *nextve;
EditEdge *eed, *e1, *nexted;
@@ -199,8 +199,8 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
xvertsort *sortblock, *sb, *sb1;
struct facesort *vlsortblock, *vsb, *vsb1;
int a, b, test, amount;
-
-
+
+
/* flag 128 is cleared, count */
/* Normal non weld operation */
@@ -226,9 +226,9 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
}
qsort(sortblock, amount, sizeof(xvertsort), vergxco);
-
+
/* test for doubles */
- sb= sortblock;
+ sb= sortblock;
if (automerge) {
for(a=0; a<amount; a++, sb++) {
eve= sb->v1;
@@ -236,12 +236,12 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
sb1= sb+1;
for(b=a+1; b<amount && (eve->f & 128)==0; b++, sb1++) {
if(sb1->x - sb->x > limit) break;
-
+
/* when automarge, only allow unselected->selected */
v1= sb1->v1;
if( (v1->f & 128)==0 ) {
if ((eve->f & flag)==0 && (v1->f & flag)==1) {
- if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
+ if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
(float)fabs(v1->co[1]-eve->co[1])<=limit &&
(float)fabs(v1->co[2]-eve->co[2])<=limit)
{ /* unique bit */
@@ -249,7 +249,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
eve->tmp.v = v1;
}
} else if( (eve->f & flag)==1 && (v1->f & flag)==0 ) {
- if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
+ if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
(float)fabs(v1->co[1]-eve->co[1])<=limit &&
(float)fabs(v1->co[2]-eve->co[2])<=limit)
{ /* unique bit */
@@ -270,10 +270,10 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
/* first test: simpel dist */
if(sb1->x - sb->x > limit) break;
v1= sb1->v1;
-
+
/* second test: is vertex allowed */
if( (v1->f & 128)==0 ) {
- if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
+ if( (float)fabs(v1->co[0]-eve->co[0])<=limit &&
(float)fabs(v1->co[1]-eve->co[1])<=limit &&
(float)fabs(v1->co[2]-eve->co[2])<=limit)
{
@@ -286,12 +286,12 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
}
}
MEM_freeN(sortblock);
-
+
if (!automerge)
for(eve = em->verts.first; eve; eve=eve->next)
if((eve->f & flag) && (eve->f & 128))
EM_data_interp_from_verts(em, eve, eve->tmp.v, eve->tmp.v, 0.5f);
-
+
/* test edges and insert again */
eed= em->edges.first;
while(eed) {
@@ -330,7 +330,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
else if(efa->v2->f & 128) efa->f1= 1;
else if(efa->v3->f & 128) efa->f1= 1;
else if(efa->v4 && (efa->v4->f & 128)) efa->f1= 1;
-
+
if(efa->f1==1) amount++;
efa= efa->next;
}
@@ -340,12 +340,12 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
while(efa) {
nextvl= efa->next;
if(efa->f1==1) {
-
+
if(efa->v1->f & 128) efa->v1= efa->v1->tmp.v;
if(efa->v2->f & 128) efa->v2= efa->v2->tmp.v;
if(efa->v3->f & 128) efa->v3= efa->v3->tmp.v;
if(efa->v4 && (efa->v4->f & 128)) efa->v4= efa->v4->tmp.v;
-
+
test= 0;
if(efa->v1==efa->v2) test+=1;
if(efa->v2==efa->v3) test+=2;
@@ -353,7 +353,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
if(efa->v4==efa->v1) test+=8;
if(efa->v3==efa->v4) test+=16;
if(efa->v2==efa->v4) test+=32;
-
+
if(test) {
if(efa->v4) {
if(test==1 || test==2) {
@@ -381,7 +381,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
amount--;
}
}
-
+
if(test==0) {
/* set edge pointers */
efa->e1= findedgelist(em, efa->v1, efa->v2);
@@ -426,9 +426,9 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
}
efa= efa->next;
}
-
+
qsort(vlsortblock, amount, sizeof(struct facesort), vergface);
-
+
vsb= vlsortblock;
for(a=0; a<amount; a++) {
efa= vsb->efa;
@@ -436,24 +436,24 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
vsb1= vsb+1;
for(b=a+1; b<amount; b++) {
-
+
/* first test: same pointer? */
if(vsb->x != vsb1->x) break;
-
+
/* second test: is test permitted? */
efa= vsb1->efa;
if( (efa->f1 & 128)==0 ) {
if( compareface(efa, vsb->efa)) efa->f1 |= 128;
-
+
}
vsb1++;
}
}
vsb++;
}
-
+
MEM_freeN(vlsortblock);
-
+
/* remove double faces */
efa= (struct EditFace *)em->faces.first;
while(efa) {
@@ -465,7 +465,7 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
efa= nextvl;
}
}
-
+
/* remove double vertices */
a= 0;
eve= (struct EditVert *)em->verts.first;
@@ -498,11 +498,12 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
sprintf(msg, "Removed %d vertices", cnt);
BKE_report(op->reports, RPT_INFO, msg);
}
-
+
+ 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;
+ return OPERATOR_FINISHED;
}
void MESH_OT_remove_doubles(wmOperatorType *ot)
@@ -510,11 +511,11 @@ void MESH_OT_remove_doubles(wmOperatorType *ot)
/* identifiers */
ot->name= "Remove Doubles";
ot->idname= "MESH_OT_remove_doubles";
-
+
/* api callbacks */
ot->exec= removedoublesflag_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -537,18 +538,18 @@ void xsortvert_flag(bContext *C, int flag)
xvertsort *sortblock;
ListBase tbase;
int i, amount;
-
+
em_setup_viewcontext(C, &vc);
-
+
amount = BLI_countlist(&vc.em->verts);
sortblock = MEM_callocN(sizeof(xvertsort)*amount,"xsort");
for (i=0,eve= vc.em->verts.first; eve; i++,eve=eve->next)
if(eve->f & flag)
sortblock[i].v1 = eve;
-
+
mesh_foreachScreenVert(&vc, xsortvert_flag__doSetX, sortblock, 0);
qsort(sortblock, amount, sizeof(xvertsort), vergxco);
-
+
/* make temporal listbase */
tbase.first= tbase.last= 0;
for (i=0; i<amount; i++) {
@@ -559,9 +560,9 @@ void xsortvert_flag(bContext *C, int flag)
BLI_addtail(&tbase, eve);
}
}
-
+
addlisttolist(&vc.em->verts, &tbase);
-
+
MEM_freeN(sortblock);
#endif
}
@@ -574,7 +575,7 @@ void hashvert_flag(EditMesh *em, int flag)
struct xvertsort *sortblock, *sb, onth, *newsort;
ListBase tbase;
int amount, a, b;
-
+
/* count */
eve= em->verts.first;
amount= 0;
@@ -583,7 +584,7 @@ void hashvert_flag(EditMesh *em, int flag)
eve= eve->next;
}
if(amount==0) return;
-
+
/* allocate memory */
sb= sortblock= (struct xvertsort *)MEM_mallocN(sizeof(struct xvertsort)*amount,"sortremovedoub");
eve= em->verts.first;
@@ -596,7 +597,7 @@ void hashvert_flag(EditMesh *em, int flag)
}
BLI_srand(1);
-
+
sb= sortblock;
for(a=0; a<amount; a++, sb++) {
b= (int)(amount*BLI_drand());
@@ -617,9 +618,9 @@ void hashvert_flag(EditMesh *em, int flag)
BLI_addtail(&tbase, eve);
sb++;
}
-
+
addlisttolist(&em->verts, &tbase);
-
+
MEM_freeN(sortblock);
}
@@ -635,11 +636,11 @@ void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op)
if(em->totvertsel==0) nr= 0;
else if(em->totvertsel==1) nr= 4;
else if(em->totedgesel==0) nr= 4;
- else if(em->totfacesel==0)
+ else if(em->totfacesel==0)
nr= 3; // pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4");
else if(em->totfacesel==1)
nr= 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4");
- else
+ else
nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4");
}
else if(em->selectmode & SCE_SELECT_EDGE) {
@@ -660,27 +661,27 @@ void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op)
else
nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2");
}
-
+
if(nr<1) return;
if(nr==1) transmode= extrudeflag(obedit, em, SELECT, nor);
else if(nr==4) transmode= extrudeflag_verts_indiv(em, SELECT, nor);
else if(nr==3) transmode= extrudeflag_edges_indiv(em, SELECT, nor);
else transmode= extrudeflag_face_indiv(em, SELECT, nor);
-
+
if(transmode==0) {
BKE_report(op->reports, RPT_ERROR, "Not a valid selection for extrude");
}
else {
EM_fgon_flags(em);
-
- /* We need to force immediate calculation here because
+
+ /* We need to force immediate calculation here because
* transform may use derived objects (which are now stale).
*
* This shouldn't be necessary, derived queries should be
* automatically building this data if invalid. Or something.
*/
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
object_handle_update(scene, obedit);
/* individual faces? */
@@ -704,61 +705,67 @@ void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op)
#if 0
//need to see if this really had new stuff I should merge over
-<<<<<<< .working
-=======
// XXX should be a menu item
static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
extrude_mesh(obedit,em, op);
-
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
BKE_mesh_end_editmesh(obedit->data, em);
- return OPERATOR_FINISHED;
+
+ 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);
+ WM_operator_name_call(C, "TFM_OT_translation", WM_OP_INVOKE_REGION_WIN, op->ptr);
+
+ return OPERATOR_FINISHED;
}
/* extrude without transform */
static int mesh_extrude_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
-
+
extrude_mesh(obedit,em, op);
-
+
+ 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;
+ return OPERATOR_FINISHED;
}
void MESH_OT_extrude(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Extrude Mesh";
+ ot->name= "Extrude";
ot->idname= "MESH_OT_extrude";
-
+
/* api callbacks */
ot->invoke= mesh_extrude_invoke;
ot->exec= mesh_extrude_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+ Properties_Proportional(ot);
+ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
#endif
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);
@@ -772,9 +779,9 @@ static int split_mesh(bContext *C, wmOperator *op)
WM_cursor_wait(0);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
}
@@ -782,13 +789,13 @@ static int split_mesh(bContext *C, wmOperator *op)
void MESH_OT_split(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Split Mesh";
+ ot->name= "Split";
ot->idname= "MESH_OT_split";
-
+
/* api callbacks */
ot->exec= split_mesh;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -798,13 +805,14 @@ void MESH_OT_split(wmOperatorType *ot)
//needs changes ported over to new extrude code too
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);
- RegionView3D *rv3d = CTX_wm_region_view3d(C);
-
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
+
int steps = RNA_int_get(op->ptr,"steps");
-
+
float offs = RNA_float_get(op->ptr,"offset");
float dvec[3], tmat[3][3], bmat[3][3], nor[3]= {0.0, 0.0, 0.0};
@@ -828,14 +836,14 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op)
extrudeflag(obedit, em, SELECT, nor);
translateflag(em, SELECT, dvec);
}
-
+
recalc_editnormals(em);
-
+
EM_fgon_flags(em);
-
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
}
@@ -845,14 +853,14 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
/* identifiers */
ot->name= "Extrude Repeat Mesh";
ot->idname= "MESH_OT_extrude_repeat";
-
+
/* api callbacks */
ot->exec= extrude_repeat_mesh;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/* props */
RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, FLT_MAX);
RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, INT_MAX);
@@ -874,7 +882,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
short a, ok= 1;
RNA_float_get_array(op->ptr, "center", cent);
-
+
/* imat and center and size */
Mat3CpyMat4(bmat, obedit->obmat);
Mat3Inv(imat,bmat);
@@ -901,14 +909,14 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
Mat3MulMat3(tmat,cmat,bmat);
Mat3MulMat3(bmat,imat,tmat);
- if(dupli==0)
- if(scene->toolsettings->editbutflag & B_KEEPORIG)
+ if(dupli==0)
+ if(scene->toolsettings->editbutflag & B_KEEPORIG)
adduplicateflag(em, 1);
for(a=0; a<steps; a++) {
if(dupli==0) ok= extrudeflag(obedit, em, SELECT, nor);
else adduplicateflag(em, SELECT);
-
+
if(ok==0)
break;
@@ -938,23 +946,26 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
-
+
BKE_mesh_end_editmesh(obedit->data, em);
return ok;
}
static int spin_mesh_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
int ok;
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
+
ok= spin_mesh(C, op, NULL, RNA_int_get(op->ptr,"steps"), RNA_float_get(op->ptr,"degrees"), RNA_boolean_get(op->ptr,"dupli"));
if(ok==0) {
BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected");
return OPERATOR_CANCELLED;
}
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
@@ -963,11 +974,11 @@ static int spin_mesh_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
-
+ RegionView3D *rv3d= ED_view3d_context_rv3d(C);
+
RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[2]);
-
+
return spin_mesh_exec(C, op);
}
@@ -976,20 +987,20 @@ void MESH_OT_spin(wmOperatorType *ot)
/* identifiers */
ot->name= "Spin";
ot->idname= "MESH_OT_spin";
-
+
/* api callbacks */
ot->invoke= spin_mesh_invoke;
ot->exec= spin_mesh_exec;
- ot->poll= ED_operator_editmesh;
-
+ ot->poll= EM_view3d_poll;
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/* props */
RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, INT_MAX);
RNA_def_boolean(ot->srna, "dupli", 0, "Dupli", "Make Duplicates");
RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, "Degrees", "Degrees", -360.0f, 360.0f);
-
+
RNA_def_float_vector(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX);
RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX);
@@ -997,6 +1008,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;
@@ -1006,7 +1018,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
turns= RNA_int_get(op->ptr, "turns");
steps= RNA_int_get(op->ptr, "steps");
-
+
/* clear flags */
for(eve= em->verts.first; eve; eve= eve->next)
eve->f1= 0;
@@ -1050,10 +1062,12 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
dvec[1]= -dvec[1];
dvec[2]= -dvec[2];
}
-
+
if(spin_mesh(C, op, dvec, turns*steps, 360.0f*turns, 0)) {
+ 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);
+
+ BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
}
else {
@@ -1061,8 +1075,6 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
- BKE_mesh_end_editmesh(obedit->data, em);
}
/* get center and axis, in global coords */
@@ -1070,11 +1082,11 @@ static int screw_mesh_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
-
+ RegionView3D *rv3d= ED_view3d_context_rv3d(C);
+
RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[1]);
-
+
return screw_mesh_exec(C, op);
}
@@ -1083,15 +1095,15 @@ void MESH_OT_screw(wmOperatorType *ot)
/* identifiers */
ot->name= "Screw";
ot->idname= "MESH_OT_screw";
-
+
/* api callbacks */
ot->invoke= screw_mesh_invoke;
ot->exec= screw_mesh_exec;
- ot->poll= ED_operator_editmesh;
-
+ ot->poll= EM_view3d_poll;
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/*props */
RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256);
RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, "Turns", "Turns", 0, 256);
@@ -1103,7 +1115,7 @@ void MESH_OT_screw(wmOperatorType *ot)
static void erase_edges(EditMesh *em, ListBase *l)
{
EditEdge *ed, *nexted;
-
+
ed = (EditEdge *) l->first;
while(ed) {
nexted= ed->next;
@@ -1129,7 +1141,7 @@ static void erase_faces(EditMesh *em, ListBase *l)
}
f = nextf;
}
-}
+}
static void erase_vertices(EditMesh *em, ListBase *l)
{
@@ -1159,75 +1171,76 @@ static void erase_vertices(EditMesh *em, ListBase *l)
#define DOUBLEOPFILL 16
/* calculates offset for co, based on fractal, sphere or smooth settings */
-static void alter_co(float *co, EditEdge *edge, float rad, int beauty, float perc)
+static void alter_co(float *co, EditEdge *edge, float smooth, float fractal, int beauty, float perc)
{
float vec1[3], fac;
-
+
if(beauty & B_SMOOTH) {
/* we calculate an offset vector vec1[], to be added to *co */
float len, fac, nor[3], nor1[3], nor2[3];
-
+
VecSubf(nor, edge->v1->co, edge->v2->co);
len= 0.5f*Normalize(nor);
-
+
VECCOPY(nor1, edge->v1->no);
VECCOPY(nor2, edge->v2->no);
-
+
/* cosine angle */
fac= nor[0]*nor1[0] + nor[1]*nor1[1] + nor[2]*nor1[2] ;
-
+
vec1[0]= fac*nor1[0];
vec1[1]= fac*nor1[1];
vec1[2]= fac*nor1[2];
-
+
/* cosine angle */
fac= -nor[0]*nor2[0] - nor[1]*nor2[1] - nor[2]*nor2[2] ;
-
+
vec1[0]+= fac*nor2[0];
vec1[1]+= fac*nor2[1];
vec1[2]+= fac*nor2[2];
-
- vec1[0]*= rad*len;
- vec1[1]*= rad*len;
- vec1[2]*= rad*len;
-
+
+ /* falloff for multi subdivide */
+ smooth *= sqrt(fabs(1.0f - 2.0f*fabs(0.5f-perc)));
+
+ vec1[0]*= smooth*len;
+ vec1[1]*= smooth*len;
+ vec1[2]*= smooth*len;
+
co[0] += vec1[0];
co[1] += vec1[1];
co[2] += vec1[2];
}
- else {
- if(rad > 0.0) { /* subdivide sphere */
- Normalize(co);
- co[0]*= rad;
- co[1]*= rad;
- co[2]*= rad;
- }
- else if(rad< 0.0) { /* fractal subdivide */
- fac= rad* VecLenf(edge->v1->co, edge->v2->co);
- vec1[0]= fac*(float)(0.5-BLI_drand());
- vec1[1]= fac*(float)(0.5-BLI_drand());
- vec1[2]= fac*(float)(0.5-BLI_drand());
- VecAddf(co, co, vec1);
- }
-
+ /*else if(beauty & B_SPHERE) { // subdivide sphere
+ Normalize(co);
+ co[0]*= smooth;
+ co[1]*= smooth;
+ co[2]*= smooth;
}
+
+ if(beauty & B_FRACTAL) {
+ fac= fractal*VecLenf(edge->v1->co, edge->v2->co);
+ vec1[0]= fac*(float)(0.5-BLI_drand());
+ vec1[1]= fac*(float)(0.5-BLI_drand());
+ vec1[2]= fac*(float)(0.5-BLI_drand());
+ VecAddf(co, co, vec1);
+ }*/
}
/* assumes in the edge is the correct interpolated vertices already */
-/* percent defines the interpolation, rad and beauty are for special options */
+/* percent defines the interpolation, smooth, fractal and beauty are for special options */
/* results in new vertex with correct coordinate, vertex normal and weight group info */
-static EditVert *subdivide_edge_addvert(EditMesh *em, EditEdge *edge, float rad, int beauty, float percent)
+static EditVert *subdivide_edge_addvert(EditMesh *em, EditEdge *edge, float smooth, float fractal, int beauty, float percent)
{
EditVert *ev;
float co[3];
-
+
co[0] = (edge->v2->co[0]-edge->v1->co[0])*percent + edge->v1->co[0];
co[1] = (edge->v2->co[1]-edge->v1->co[1])*percent + edge->v1->co[1];
- co[2] = (edge->v2->co[2]-edge->v1->co[2])*percent + edge->v1->co[2];
-
+ co[2] = (edge->v2->co[2]-edge->v1->co[2])*percent + edge->v1->co[2];
+
/* offset for smooth or sphere or fractal */
- alter_co(co, edge, rad, beauty, percent);
-
+ alter_co(co, edge, smooth, fractal, beauty, percent);
+
/* clip if needed by mirror modifier */
if (edge->v1->f2) {
if ( edge->v1->f2 & edge->v2->f2 & 1) {
@@ -1240,18 +1253,18 @@ static EditVert *subdivide_edge_addvert(EditMesh *em, EditEdge *edge, float rad,
co[2]= 0.0f;
}
}
-
+
ev = addvertlist(em, co, NULL);
-
+
/* vert data (vgroups, ..) */
EM_data_interp_from_verts(em, edge->v1, edge->v2, ev, percent);
-
+
/* normal */
ev->no[0] = (edge->v2->no[0]-edge->v1->no[0])*percent + edge->v1->no[0];
ev->no[1] = (edge->v2->no[1]-edge->v1->no[1])*percent + edge->v1->no[1];
ev->no[2] = (edge->v2->no[2]-edge->v1->no[2])*percent + edge->v1->no[2];
Normalize(ev->no);
-
+
return ev;
}
@@ -1259,11 +1272,11 @@ static void flipvertarray(EditVert** arr, short size)
{
EditVert *hold;
int i;
-
+
for(i=0; i<size/2; i++) {
hold = arr[i];
arr[i] = arr[size-i-1];
- arr[size-i-1] = hold;
+ arr[size-i-1] = hold;
}
}
@@ -1276,15 +1289,15 @@ static void facecopy(EditMesh *em, EditFace *source, EditFace *target)
CustomData_em_copy_data(&em->fdata, &em->fdata, source->data, &target->data);
target->mat_nr = source->mat_nr;
- target->flag = source->flag;
+ target->flag = source->flag;
target->h = source->h;
-
+
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v1->co, w[0]);
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v2->co, w[1]);
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v3->co, w[2]);
if (target->v4)
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v4->co, w[3]);
-
+
CustomData_em_interp(&em->fdata, &source->data, NULL, (float*)w, 1, target->data);
}
@@ -1293,17 +1306,17 @@ static void fill_quad_single(EditMesh *em, EditFace *efa, struct GHash *gh, int
EditEdge *cedge=NULL;
EditVert *v[4], **verts;
EditFace *hold;
- short start=0, end, left, right, vertsize,i;
-
+ short start=0, end, left, right, vertsize,i;
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT) { cedge = efa->e1; start = 0;}
- else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
- else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
- else if(efa->e4->f & SELECT) { cedge = efa->e4; start = 3;}
+ else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
+ else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
+ else if(efa->e4->f & SELECT) { cedge = efa->e4; start = 3;}
// Point verts to the array of new verts for cedge
verts = BLI_ghash_lookup(gh, cedge);
@@ -1317,30 +1330,30 @@ static void fill_quad_single(EditMesh *em, EditFace *efa, struct GHash *gh, int
if(verts[0] != v[start]) {flipvertarray(verts,numcuts+2);}
end = (start+1)%4;
left = (start+2)%4;
- right = (start+3)%4;
-
+ right = (start+3)%4;
+
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
|---*---*---|
| |
- | |
| |
- -------------
+ | |
+ -------------
left right
where start,end,left, right are indexes of EditFace->v1, etc (stored in v)
and 0,1,2... are the indexes of the new verts stored in verts
We will fill this case like this or this depending on even or odd cuts
-
+
|---*---*---| |---*---|
| / \ | | / \ |
- | / \ | | / \ |
+ | / \ | | / \ |
|/ \| |/ \|
- ------------- ---------
+ ------------- ---------
*/
// Make center face
@@ -1349,7 +1362,7 @@ static void fill_quad_single(EditMesh *em, EditFace *efa, struct GHash *gh, int
hold->e2->f2 |= EDGEINNER;
hold->e4->f2 |= EDGEINNER;
}else{
- hold = addfacelist(em, verts[(vertsize-1)/2],v[left],v[right],NULL, NULL,NULL);
+ hold = addfacelist(em, verts[(vertsize-1)/2],v[left],v[right],NULL, NULL,NULL);
hold->e1->f2 |= EDGEINNER;
hold->e3->f2 |= EDGEINNER;
}
@@ -1357,21 +1370,21 @@ static void fill_quad_single(EditMesh *em, EditFace *efa, struct GHash *gh, int
// Make side faces
for(i=0;i<(vertsize-1)/2;i++) {
- hold = addfacelist(em, verts[i],verts[i+1],v[right],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[i],verts[i+1],v[right],NULL,NULL,NULL);
facecopy(em, efa,hold);
if(i+1 != (vertsize-1)/2) {
if(seltype == SUBDIV_SELECT_INNER) {
hold->e2->f2 |= EDGEINNER;
}
}
- hold = addfacelist(em, verts[vertsize-2-i],verts[vertsize-1-i],v[left],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[vertsize-2-i],verts[vertsize-1-i],v[left],NULL,NULL,NULL);
facecopy(em, efa,hold);
if(i+1 != (vertsize-1)/2) {
if(seltype == SUBDIV_SELECT_INNER) {
hold->e3->f2 |= EDGEINNER;
}
}
- }
+ }
}
static void fill_tri_single(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, int seltype)
@@ -1379,15 +1392,15 @@ static void fill_tri_single(EditMesh *em, EditFace *efa, struct GHash *gh, int n
EditEdge *cedge=NULL;
EditVert *v[3], **verts;
EditFace *hold;
- short start=0, end, op, vertsize,i;
-
+ short start=0, end, op, vertsize,i;
+
v[0] = efa->v1;
v[1] = efa->v2;
- v[2] = efa->v3;
+ v[2] = efa->v3;
if(efa->e1->f & SELECT) { cedge = efa->e1; start = 0;}
- else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
- else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
+ else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
+ else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
// Point verts to the array of new verts for cedge
verts = BLI_ghash_lookup(gh, cedge);
@@ -1401,30 +1414,30 @@ static void fill_tri_single(EditMesh *em, EditFace *efa, struct GHash *gh, int n
if(verts[0] != v[start]) {flipvertarray(verts,numcuts+2);}
end = (start+1)%3;
op = (start+2)%3;
-
+
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
|---*---*---|
\ |
- \ |
+ \ |
\ |
\ |
\ |
\ |
|op
-
+
where start,end,op are indexes of EditFace->v1, etc (stored in v)
and 0,1,2... are the indexes of the new verts stored in verts
We will fill this case like this or this depending on even or odd cuts
-
- 3 2 1 0
+
+ 3 2 1 0
|---*---*---|
\ \ \ |
- \ \ \ |
+ \ \ \ |
\ \ \ |
\ \ \|
\ \\|
@@ -1434,14 +1447,14 @@ static void fill_tri_single(EditMesh *em, EditFace *efa, struct GHash *gh, int n
// Make side faces
for(i=0;i<(vertsize-1);i++) {
- hold = addfacelist(em, verts[i],verts[i+1],v[op],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[i],verts[i+1],v[op],NULL,NULL,NULL);
if(i+1 != vertsize-1) {
if(seltype == SUBDIV_SELECT_INNER) {
hold->e2->f2 |= EDGEINNER;
}
}
facecopy(em, efa,hold);
- }
+ }
}
static void fill_quad_double_op(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1450,11 +1463,11 @@ static void fill_quad_double_op(EditMesh *em, EditFace *efa, struct GHash *gh, i
EditVert *v[4], **verts[2];
EditFace *hold;
short start=0, end, left, right, vertsize,i;
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT) { cedge[0] = efa->e1; cedge[1] = efa->e3; start = 0;}
else if(efa->e2->f & SELECT) { cedge[0] = efa->e2; cedge[1] = efa->e4; start = 1;}
@@ -1472,39 +1485,39 @@ static void fill_quad_double_op(EditMesh *em, EditFace *efa, struct GHash *gh, i
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
end = (start+1)%4;
left = (start+2)%4;
- right = (start+3)%4;
- if(verts[1][0] != v[left]) {flipvertarray(verts[1],numcuts+2);}
+ right = (start+3)%4;
+ if(verts[1][0] != v[left]) {flipvertarray(verts[1],numcuts+2);}
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
|---*---*---|
| |
- | |
| |
- |---*---*---|
+ | |
+ |---*---*---|
0 1 2 3
left right
We will fill this case like this or this depending on even or odd cuts
-
+
|---*---*---|
| | | |
- | | | |
| | | |
- |---*---*---|
+ | | | |
+ |---*---*---|
*/
-
+
// Make side faces
for(i=0;i<vertsize-1;i++) {
- hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-2-i],verts[1][vertsize-1-i],NULL,NULL);
+ hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-2-i],verts[1][vertsize-1-i],NULL,NULL);
if(i < vertsize-2) {
hold->e2->f2 |= EDGEINNER;
hold->e2->f2 |= DOUBLEOPFILL;
}
facecopy(em, efa,hold);
- }
+ }
}
static void fill_quad_double_adj_path(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1514,11 +1527,11 @@ static void fill_quad_double_adj_path(EditMesh *em, EditFace *efa, struct GHash
EditFace *hold;
short start=0, start2=0, vertsize,i;
int ctrl= 0; // XXX
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT && efa->e2->f & SELECT) {cedge[0] = efa->e1; cedge[1] = efa->e2; start = 0; start2 = 1;}
if(efa->e2->f & SELECT && efa->e3->f & SELECT) {cedge[0] = efa->e2; cedge[1] = efa->e3; start = 1; start2 = 2;}
@@ -1536,53 +1549,53 @@ static void fill_quad_double_adj_path(EditMesh *em, EditFace *efa, struct GHash
// the array to the correct direction
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
start2 0|---*---*---|
| |
1* |
| |
- 2* |
+ 2* |
| |
- end2 3|-----------|
+ end2 3|-----------|
We will fill this case like this or this depending on even or odd cuts
|---*---*---|
| / / / |
* / / |
| / / |
- * / |
+ * / |
| / |
- |-----------|
+ |-----------|
*/
// Make outside tris
- hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
/* when ctrl is depressed, only want verts on the cutline selected */
if (ctrl)
hold->e3->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
hold = addfacelist(em, verts[0][0],verts[1][vertsize-1],v[(start2+2)%4],NULL,NULL,NULL);
/* when ctrl is depressed, only want verts on the cutline selected */
if (ctrl)
- hold->e1->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ hold->e1->f2 |= EDGEINNER;
+ facecopy(em, efa,hold);
//if(scene->toolsettings->editbutflag & B_AUTOFGON) {
// hold->e1->h |= EM_FGON;
- //}
+ //}
// Make side faces
for(i=0;i<numcuts;i++) {
- hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-1-(i+1)],verts[1][vertsize-1-i],NULL,NULL);
+ hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-1-(i+1)],verts[1][vertsize-1-i],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
facecopy(em, efa,hold);
}
//EM_fgon_flags(em);
-
+
}
static void fill_quad_double_adj_fan(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1591,18 +1604,18 @@ static void fill_quad_double_adj_fan(EditMesh *em, EditFace *efa, struct GHash *
EditVert *v[4], *op=NULL, **verts[2];
EditFace *hold;
short start=0, start2=0, vertsize,i;
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT && efa->e2->f & SELECT) {cedge[0] = efa->e1; cedge[1] = efa->e2; start = 0; start2 = 1; op = efa->v4;}
if(efa->e2->f & SELECT && efa->e3->f & SELECT) {cedge[0] = efa->e2; cedge[1] = efa->e3; start = 1; start2 = 2; op = efa->v1;}
if(efa->e3->f & SELECT && efa->e4->f & SELECT) {cedge[0] = efa->e3; cedge[1] = efa->e4; start = 2; start2 = 3; op = efa->v2;}
if(efa->e4->f & SELECT && efa->e1->f & SELECT) {cedge[0] = efa->e4; cedge[1] = efa->e1; start = 3; start2 = 0; op = efa->v3;}
-
+
// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
verts[0] = BLI_ghash_lookup(gh, cedge[0]);
verts[1] = BLI_ghash_lookup(gh, cedge[1]);
@@ -1614,39 +1627,39 @@ static void fill_quad_double_adj_fan(EditMesh *em, EditFace *efa, struct GHash *
// the array to the correct direction
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
start2 0|---*---*---|
| |
1* |
| |
- 2* |
+ 2* |
| |
- end2 3|-----------|op
+ end2 3|-----------|op
We will fill this case like this or this (warning horrible ascii art follows)
|---*---*---|
| \ \ \ |
*---\ \ \ |
| \ \ \ \|
- *---- \ \ \ |
+ *---- \ \ \ |
| --- \\\|
- |-----------|
+ |-----------|
*/
for(i=0;i<=numcuts;i++) {
- hold = addfacelist(em, op,verts[1][numcuts-i],verts[1][numcuts-i+1],NULL,NULL,NULL);
+ hold = addfacelist(em, op,verts[1][numcuts-i],verts[1][numcuts-i+1],NULL,NULL,NULL);
hold->e1->f2 |= EDGEINNER;
facecopy(em, efa,hold);
- hold = addfacelist(em, op,verts[0][i],verts[0][i+1],NULL,NULL,NULL);
+ hold = addfacelist(em, op,verts[0][i],verts[0][i+1],NULL,NULL,NULL);
hold->e3->f2 |= EDGEINNER;
facecopy(em, efa,hold);
- }
+ }
}
static void fill_quad_double_adj_inner(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1656,18 +1669,18 @@ static void fill_quad_double_adj_inner(EditMesh *em, EditFace *efa, struct GHash
EditFace *hold;
short start=0, start2=0, vertsize,i;
float co[3];
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT && efa->e2->f & SELECT) {cedge[0] = efa->e1; cedge[1] = efa->e2; start = 0; start2 = 1; op = efa->v4;}
if(efa->e2->f & SELECT && efa->e3->f & SELECT) {cedge[0] = efa->e2; cedge[1] = efa->e3; start = 1; start2 = 2; op = efa->v1;}
if(efa->e3->f & SELECT && efa->e4->f & SELECT) {cedge[0] = efa->e3; cedge[1] = efa->e4; start = 2; start2 = 3; op = efa->v2;}
if(efa->e4->f & SELECT && efa->e1->f & SELECT) {cedge[0] = efa->e4; cedge[1] = efa->e1; start = 3; start2 = 0; op = efa->v3;}
-
+
// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
verts[0] = BLI_ghash_lookup(gh, cedge[0]);
verts[1] = BLI_ghash_lookup(gh, cedge[1]);
@@ -1679,19 +1692,19 @@ static void fill_quad_double_adj_inner(EditMesh *em, EditFace *efa, struct GHash
// the array to the correct direction
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
start2 0|---*---*---|
| |
1* |
| |
- 2* |
+ 2* |
| |
- end2 3|-----------|op
+ end2 3|-----------|op
We will fill this case like this or this (warning horrible ascii art follows)
|---*-----*---|
@@ -1699,14 +1712,14 @@ static void fill_quad_double_adj_inner(EditMesh *em, EditFace *efa, struct GHash
* \ / |
| * |
| / \ |
- * \ |
+ * \ |
| \ |
- |-------------|
+ |-------------|
*/
// Add Inner Vert(s)
inner = MEM_mallocN(sizeof(EditVert*)*numcuts,"New inner verts");
-
+
for(i=0;i<numcuts;i++) {
co[0] = (verts[0][numcuts-i]->co[0] + verts[1][i+1]->co[0] ) / 2 ;
co[1] = (verts[0][numcuts-i]->co[1] + verts[1][i+1]->co[1] ) / 2 ;
@@ -1716,45 +1729,45 @@ static void fill_quad_double_adj_inner(EditMesh *em, EditFace *efa, struct GHash
EM_data_interp_from_verts(em, verts[0][numcuts-i], verts[1][i+1], inner[i], 0.5f);
}
-
+
// Add Corner Quad
- hold = addfacelist(em, verts[0][numcuts+1],verts[1][1],inner[0],verts[0][numcuts],NULL,NULL);
+ hold = addfacelist(em, verts[0][numcuts+1],verts[1][1],inner[0],verts[0][numcuts],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
hold->e3->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
// Add Bottom Quads
- hold = addfacelist(em, verts[0][0],verts[0][1],inner[numcuts-1],op,NULL,NULL);
+ hold = addfacelist(em, verts[0][0],verts[0][1],inner[numcuts-1],op,NULL,NULL);
hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
- hold = addfacelist(em, op,inner[numcuts-1],verts[1][numcuts],verts[1][numcuts+1],NULL,NULL);
+ hold = addfacelist(em, op,inner[numcuts-1],verts[1][numcuts],verts[1][numcuts+1],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
-
+ facecopy(em, efa,hold);
+
//if(scene->toolsettings->editbutflag & B_AUTOFGON) {
// hold->e1->h |= EM_FGON;
- //}
+ //}
// Add Fill Quads (if # cuts > 1)
for(i=0;i<numcuts-1;i++) {
- hold = addfacelist(em, inner[i],verts[1][i+1],verts[1][i+2],inner[i+1],NULL,NULL);
+ hold = addfacelist(em, inner[i],verts[1][i+1],verts[1][i+2],inner[i+1],NULL,NULL);
hold->e1->f2 |= EDGEINNER;
hold->e3->f2 |= EDGEINNER;
facecopy(em, efa,hold);
- hold = addfacelist(em, inner[i],inner[i+1],verts[0][numcuts-1-i],verts[0][numcuts-i],NULL,NULL);
+ hold = addfacelist(em, inner[i],inner[i+1],verts[0][numcuts-1-i],verts[0][numcuts-i],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
hold->e4->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
-
+ facecopy(em, efa,hold);
+
//if(scene->toolsettings->editbutflag & B_AUTOFGON) {
// hold->e1->h |= EM_FGON;
- //}
- }
-
+ //}
+ }
+
//EM_fgon_flags(em);
-
- MEM_freeN(inner);
+
+ MEM_freeN(inner);
}
static void fill_tri_double(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1763,7 +1776,7 @@ static void fill_tri_double(EditMesh *em, EditFace *efa, struct GHash *gh, int n
EditVert *v[3], **verts[2];
EditFace *hold;
short start=0, start2=0, vertsize,i;
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
@@ -1783,41 +1796,41 @@ static void fill_tri_double(EditMesh *em, EditFace *efa, struct GHash *gh, int n
// the array to the correct direction
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
/*
We should have something like this now
- end start
- 3 2 1 0
+ end start
+ 3 2 1 0
start2 0|---*---*---|
- | /
- 1* /
- | /
- 2* /
- | /
- end2 3|
+ | /
+ 1* /
+ | /
+ 2* /
+ | /
+ end2 3|
We will fill this case like this or this depending on even or odd cuts
|---*---*---|
- | / / /
- * / /
- | / /
- * /
- | /
+ | / / /
+ * / /
+ | / /
+ * /
+ | /
|
*/
// Make outside tri
- hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
hold->e3->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
// Make side faces
for(i=0;i<numcuts;i++) {
- hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-1-(i+1)],verts[1][vertsize-1-i],NULL,NULL);
+ hold = addfacelist(em, verts[0][i],verts[0][i+1],verts[1][vertsize-1-(i+1)],verts[1][vertsize-1-i],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
facecopy(em, efa,hold);
- }
+ }
}
static void fill_quad_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts)
@@ -1826,133 +1839,133 @@ static void fill_quad_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int
EditVert *v[4], **verts[3];
EditFace *hold;
short start=0, start2=0, start3=0, vertsize, i, repeats;
-
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
-
+ v[3] = efa->v4;
+
if(!(efa->e1->f & SELECT)) {
- cedge[0] = efa->e2;
- cedge[1] = efa->e3;
+ cedge[0] = efa->e2;
+ cedge[1] = efa->e3;
cedge[2] = efa->e4;
- start = 1;start2 = 2;start3 = 3;
+ start = 1;start2 = 2;start3 = 3;
}
if(!(efa->e2->f & SELECT)) {
- cedge[0] = efa->e3;
- cedge[1] = efa->e4;
+ cedge[0] = efa->e3;
+ cedge[1] = efa->e4;
cedge[2] = efa->e1;
- start = 2;start2 = 3;start3 = 0;
+ start = 2;start2 = 3;start3 = 0;
}
if(!(efa->e3->f & SELECT)) {
- cedge[0] = efa->e4;
- cedge[1] = efa->e1;
+ cedge[0] = efa->e4;
+ cedge[1] = efa->e1;
cedge[2] = efa->e2;
- start = 3;start2 = 0;start3 = 1;
+ start = 3;start2 = 0;start3 = 1;
}
if(!(efa->e4->f & SELECT)) {
- cedge[0] = efa->e1;
- cedge[1] = efa->e2;
+ cedge[0] = efa->e1;
+ cedge[1] = efa->e2;
cedge[2] = efa->e3;
- start = 0;start2 = 1;start3 = 2;
- }
+ start = 0;start2 = 1;start3 = 2;
+ }
// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
verts[0] = BLI_ghash_lookup(gh, cedge[0]);
verts[1] = BLI_ghash_lookup(gh, cedge[1]);
verts[2] = BLI_ghash_lookup(gh, cedge[2]);
//This is the index size of the verts array
vertsize = numcuts+2;
-
+
// Is the original v1 the same as the first vert on the selected edge?
// if not, the edge is running the opposite direction in this face so flip
// the array to the correct direction
-
+
if(verts[0][0] != v[start]) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
- if(verts[2][0] != v[start3]) {flipvertarray(verts[2],numcuts+2);}
+ if(verts[1][0] != v[start2]) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[2][0] != v[start3]) {flipvertarray(verts[2],numcuts+2);}
/*
We should have something like this now
-
- start2
- 3 2 1 0
- start3 0|---*---*---|3
+
+ start2
+ 3 2 1 0
+ start3 0|---*---*---|3
| |
1* *2
| |
- 2* *1
+ 2* *1
| |
- 3|-----------|0 start
-
- We will fill this case like this or this depending on even or odd cuts
+ 3|-----------|0 start
+
+ We will fill this case like this or this depending on even or odd cuts
there are a couple of differences. For odd cuts, there is a tri in the
middle as well as 1 quad at the bottom (not including the extra quads
- for odd cuts > 1
-
+ for odd cuts > 1
+
For even cuts, there is a quad in the middle and 2 quads on the bottom
-
+
they are numbered here for clarity
-
+
1 outer tris and bottom quads
2 inner tri or quad
3 repeating quads
-
+
|---*---*---*---|
|1/ / \ \ 1|
|/ 3 / \ 3 \|
* / 2 \ *
| / \ |
- |/ \ |
+ |/ \ |
*---------------*
| 3 |
- | |
+ | |
*---------------*
| |
- | 1 |
+ | 1 |
| |
|---------------|
-
+
|---*---*---*---*---|
- | 1/ / \ \ 1|
- | / / \ \ |
+ | 1/ / \ \ 1|
+ | / / \ \ |
|/ 3 / \ 3 \|
* / \ *
- | / \ |
- | / 2 \ |
+ | / \ |
+ | / 2 \ |
|/ \|
*-------------------*
| |
| 3 |
- | |
+ | |
*-------------------*
| |
| 1 |
- | |
+ | |
*-------------------*
| |
| 1 |
- | |
+ | |
|-------------------|
-
+
*/
// Make outside tris
- hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
+ hold = addfacelist(em, verts[0][vertsize-2],verts[0][vertsize-1],verts[1][1],NULL,NULL,NULL);
hold->e3->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
- hold = addfacelist(em, verts[1][vertsize-2],verts[1][vertsize-1],verts[2][1],NULL,NULL,NULL);
+ facecopy(em, efa,hold);
+ hold = addfacelist(em, verts[1][vertsize-2],verts[1][vertsize-1],verts[2][1],NULL,NULL,NULL);
hold->e3->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
// Make bottom quad
- hold = addfacelist(em, verts[0][0],verts[0][1],verts[2][vertsize-2],verts[2][vertsize-1],NULL,NULL);
+ hold = addfacelist(em, verts[0][0],verts[0][1],verts[2][vertsize-2],verts[2][vertsize-1],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
//If it is even cuts, add the 2nd lower quad
if(numcuts % 2 == 0) {
- hold = addfacelist(em, verts[0][1],verts[0][2],verts[2][vertsize-3],verts[2][vertsize-2],NULL,NULL);
+ hold = addfacelist(em, verts[0][1],verts[0][2],verts[2][vertsize-3],verts[2][vertsize-2],NULL,NULL);
hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
// Also Make inner quad
- hold = addfacelist(em, verts[1][numcuts/2],verts[1][(numcuts/2)+1],verts[2][numcuts/2],verts[0][(numcuts/2)+1],NULL,NULL);
+ hold = addfacelist(em, verts[1][numcuts/2],verts[1][(numcuts/2)+1],verts[2][numcuts/2],verts[0][(numcuts/2)+1],NULL,NULL);
hold->e3->f2 |= EDGEINNER;
//if(scene->toolsettings->editbutflag & B_AUTOFGON) {
// hold->e3->h |= EM_FGON;
@@ -1960,47 +1973,47 @@ static void fill_quad_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int
facecopy(em, efa,hold);
repeats = (numcuts / 2) -1;
} else {
- // Make inner tri
- hold = addfacelist(em, verts[1][(numcuts/2)+1],verts[2][(numcuts/2)+1],verts[0][(numcuts/2)+1],NULL,NULL,NULL);
+ // Make inner tri
+ hold = addfacelist(em, verts[1][(numcuts/2)+1],verts[2][(numcuts/2)+1],verts[0][(numcuts/2)+1],NULL,NULL,NULL);
hold->e2->f2 |= EDGEINNER;
//if(scene->toolsettings->editbutflag & B_AUTOFGON) {
// hold->e2->h |= EM_FGON;
//}
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
repeats = ((numcuts+1) / 2)-1;
}
-
+
// cuts for 1 and 2 do not have the repeating quads
if(numcuts < 3) {repeats = 0;}
for(i=0;i<repeats;i++) {
//Make side repeating Quads
- hold = addfacelist(em, verts[1][i+1],verts[1][i+2],verts[0][vertsize-i-3],verts[0][vertsize-i-2],NULL,NULL);
- hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
- hold = addfacelist(em, verts[1][vertsize-i-3],verts[1][vertsize-i-2],verts[2][i+1],verts[2][i+2],NULL,NULL);
+ hold = addfacelist(em, verts[1][i+1],verts[1][i+2],verts[0][vertsize-i-3],verts[0][vertsize-i-2],NULL,NULL);
+ hold->e2->f2 |= EDGEINNER;
+ facecopy(em, efa,hold);
+ hold = addfacelist(em, verts[1][vertsize-i-3],verts[1][vertsize-i-2],verts[2][i+1],verts[2][i+2],NULL,NULL);
hold->e4->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
+ facecopy(em, efa,hold);
}
- // Do repeating bottom quads
+ // Do repeating bottom quads
for(i=0;i<repeats;i++) {
- if(numcuts % 2 == 1) {
- hold = addfacelist(em, verts[0][1+i],verts[0][2+i],verts[2][vertsize-3-i],verts[2][vertsize-2-i],NULL,NULL);
+ if(numcuts % 2 == 1) {
+ hold = addfacelist(em, verts[0][1+i],verts[0][2+i],verts[2][vertsize-3-i],verts[2][vertsize-2-i],NULL,NULL);
} else {
- hold = addfacelist(em, verts[0][2+i],verts[0][3+i],verts[2][vertsize-4-i],verts[2][vertsize-3-i],NULL,NULL);
+ hold = addfacelist(em, verts[0][2+i],verts[0][3+i],verts[2][vertsize-4-i],verts[2][vertsize-3-i],NULL,NULL);
}
hold->e2->f2 |= EDGEINNER;
- facecopy(em, efa,hold);
- }
+ facecopy(em, efa,hold);
+ }
//EM_fgon_flags(em);
}
-static void fill_quad_quadruple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float rad, int beauty)
+static void fill_quad_quadruple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float smooth, float fractal, int beauty)
{
EditVert **verts[4], ***innerverts;
- EditFace *hold;
+ EditFace *hold;
EditEdge temp;
short vertsize, i, j;
-
+
// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
verts[0] = BLI_ghash_lookup(gh, efa->e1);
verts[1] = BLI_ghash_lookup(gh, efa->e2);
@@ -2015,87 +2028,87 @@ static void fill_quad_quadruple(EditMesh *em, EditFace *efa, struct GHash *gh, i
// the array to the correct direction
if(verts[0][0] != efa->v1) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != efa->v2) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[1][0] != efa->v2) {flipvertarray(verts[1],numcuts+2);}
if(verts[2][0] == efa->v3) {flipvertarray(verts[2],numcuts+2);}
- if(verts[3][0] == efa->v4) {flipvertarray(verts[3],numcuts+2);}
+ if(verts[3][0] == efa->v4) {flipvertarray(verts[3],numcuts+2);}
/*
We should have something like this now
1
-
- 3 2 1 0
- 0|---*---*---|0
+
+ 3 2 1 0
+ 0|---*---*---|0
| |
1* *1
2 | | 4
- 2* *2
+ 2* *2
| |
- 3|---*---*---|3
+ 3|---*---*---|3
3 2 1 0
3
// we will fill a 2 dim array of editvert*s to make filling easier
// the innervert order is shown
- 0 0---1---2---3
+ 0 0---1---2---3
| | | |
- 1 0---1---2---3
+ 1 0---1---2---3
| | | |
- 2 0---1---2---3
+ 2 0---1---2---3
| | | |
- 3 0---1---2---3
-
+ 3 0---1---2---3
+
*/
- innerverts = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"quad-quad subdiv inner verts outer array");
+ innerverts = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"quad-quad subdiv inner verts outer array");
for(i=0;i<numcuts+2;i++) {
innerverts[i] = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"quad-quad subdiv inner verts inner array");
- }
-
+ }
+
// first row is e1 last row is e3
for(i=0;i<numcuts+2;i++) {
innerverts[0][i] = verts[0][(numcuts+1)-i];
innerverts[numcuts+1][i] = verts[2][(numcuts+1)-i];
}
-
+
for(i=1;i<=numcuts;i++) {
/* we create a fake edge for the next loop */
temp.v2 = innerverts[i][0] = verts[1][i];
temp.v1 = innerverts[i][numcuts+1] = verts[3][i];
-
- for(j=1;j<=numcuts;j++) {
+
+ for(j=1;j<=numcuts;j++) {
float percent= (float)j/(float)(numcuts+1);
- innerverts[i][(numcuts+1)-j]= subdivide_edge_addvert(em, &temp, rad, beauty, percent);
- }
- }
+ innerverts[i][(numcuts+1)-j]= subdivide_edge_addvert(em, &temp, smooth, fractal, beauty, percent);
+ }
+ }
// Fill with faces
for(i=0;i<numcuts+1;i++) {
for(j=0;j<numcuts+1;j++) {
- hold = addfacelist(em, innerverts[i][j+1],innerverts[i][j],innerverts[i+1][j],innerverts[i+1][j+1],NULL,NULL);
- hold->e1->f2 = EDGENEW;
- hold->e2->f2 = EDGENEW;
- hold->e3->f2 = EDGENEW;
- hold->e4->f2 = EDGENEW;
-
+ hold = addfacelist(em, innerverts[i][j+1],innerverts[i][j],innerverts[i+1][j],innerverts[i+1][j+1],NULL,NULL);
+ hold->e1->f2 = EDGENEW;
+ hold->e2->f2 = EDGENEW;
+ hold->e3->f2 = EDGENEW;
+ hold->e4->f2 = EDGENEW;
+
if(i != 0) { hold->e1->f2 |= EDGEINNER; }
if(j != 0) { hold->e2->f2 |= EDGEINNER; }
if(i != numcuts) { hold->e3->f2 |= EDGEINNER; }
if(j != numcuts) { hold->e4->f2 |= EDGEINNER; }
-
- facecopy(em, efa,hold);
- }
+
+ facecopy(em, efa,hold);
+ }
}
// Clean up our dynamic multi-dim array
for(i=0;i<numcuts+2;i++) {
- MEM_freeN(innerverts[i]);
- }
+ MEM_freeN(innerverts[i]);
+ }
MEM_freeN(innerverts);
}
-static void fill_tri_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float rad, int beauty)
+static void fill_tri_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int numcuts, float smooth, float fractal, int beauty)
{
EditVert **verts[3], ***innerverts;
short vertsize, i, j;
- EditFace *hold;
+ EditFace *hold;
EditEdge temp;
// Point verts[0] and [1] to the array of new verts for cedge[0] and cedge[1]
@@ -2111,20 +2124,20 @@ static void fill_tri_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int n
// the array to the correct direction
if(verts[0][0] != efa->v1) {flipvertarray(verts[0],numcuts+2);}
- if(verts[1][0] != efa->v2) {flipvertarray(verts[1],numcuts+2);}
- if(verts[2][0] != efa->v3) {flipvertarray(verts[2],numcuts+2);}
+ if(verts[1][0] != efa->v2) {flipvertarray(verts[1],numcuts+2);}
+ if(verts[2][0] != efa->v3) {flipvertarray(verts[2],numcuts+2);}
/*
We should have something like this now
3
-
- 3 2 1 0
- 0|---*---*---|3
- | /
- 1 1* *2
- | /
- 2* *1 2
- | /
- 3|/
+
+ 3 2 1 0
+ 0|---*---*---|3
+ | /
+ 1 1* *2
+ | /
+ 2* *1 2
+ | /
+ 3|/
0
we will fill a 2 dim array of editvert*s to make filling easier
@@ -2132,68 +2145,68 @@ static void fill_tri_triple(EditMesh *em, EditFace *efa, struct GHash *gh, int n
3
0 0---1---2---3---4
- | / | / |/ | /
- 1 0---1----2---3
- 1 | / | / | /
+ | / | / |/ | /
+ 1 0---1----2---3
+ 1 | / | / | /
2 0----1---2 2
- | / | /
- |/ |/
- 3 0---1
+ | / | /
+ |/ |/
+ 3 0---1
| /
|/
- 4 0
-
+ 4 0
+
*/
-
- innerverts = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"tri-tri subdiv inner verts outer array");
+
+ innerverts = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"tri-tri subdiv inner verts outer array");
for(i=0;i<numcuts+2;i++) {
innerverts[i] = MEM_mallocN(sizeof(EditVert*)*((numcuts+2)-i),"tri-tri subdiv inner verts inner array");
}
//top row is e3 backwards
for(i=0;i<numcuts+2;i++) {
innerverts[0][i] = verts[2][(numcuts+1)-i];
- }
-
+ }
+
for(i=1;i<=numcuts+1;i++) {
//fake edge, first vert is from e1, last is from e2
temp.v1= innerverts[i][0] = verts[0][i];
temp.v2= innerverts[i][(numcuts+1)-i] = verts[1][(numcuts+1)-i];
-
+
for(j=1;j<(numcuts+1)-i;j++) {
float percent= (float)j/(float)((numcuts+1)-i);
- innerverts[i][((numcuts+1)-i)-j]= subdivide_edge_addvert(em, &temp, rad, beauty, 1-percent);
+ innerverts[i][((numcuts+1)-i)-j]= subdivide_edge_addvert(em, &temp, smooth, fractal, beauty, 1-percent);
}
}
// Now fill the verts with happy little tris :)
for(i=0;i<=numcuts+1;i++) {
- for(j=0;j<(numcuts+1)-i;j++) {
+ for(j=0;j<(numcuts+1)-i;j++) {
//We always do the first tri
- hold = addfacelist(em, innerverts[i][j+1],innerverts[i][j],innerverts[i+1][j],NULL,NULL,NULL);
- hold->e1->f2 |= EDGENEW;
- hold->e2->f2 |= EDGENEW;
- hold->e3->f2 |= EDGENEW;
+ hold = addfacelist(em, innerverts[i][j+1],innerverts[i][j],innerverts[i+1][j],NULL,NULL,NULL);
+ hold->e1->f2 |= EDGENEW;
+ hold->e2->f2 |= EDGENEW;
+ hold->e3->f2 |= EDGENEW;
if(i != 0) { hold->e1->f2 |= EDGEINNER; }
if(j != 0) { hold->e2->f2 |= EDGEINNER; }
if(j+1 != (numcuts+1)-i) {hold->e3->f2 |= EDGEINNER;}
-
- facecopy(em, efa,hold);
- //if there are more to come, we do the 2nd
+
+ facecopy(em, efa,hold);
+ //if there are more to come, we do the 2nd
if(j+1 <= numcuts-i) {
- hold = addfacelist(em, innerverts[i+1][j],innerverts[i+1][j+1],innerverts[i][j+1],NULL,NULL,NULL);
- facecopy(em, efa,hold);
- hold->e1->f2 |= EDGENEW;
- hold->e2->f2 |= EDGENEW;
- hold->e3->f2 |= EDGENEW;
+ hold = addfacelist(em, innerverts[i+1][j],innerverts[i+1][j+1],innerverts[i][j+1],NULL,NULL,NULL);
+ facecopy(em, efa,hold);
+ hold->e1->f2 |= EDGENEW;
+ hold->e2->f2 |= EDGENEW;
+ hold->e3->f2 |= EDGENEW;
}
- }
+ }
}
// Clean up our dynamic multi-dim array
for(i=0;i<numcuts+2;i++) {
- MEM_freeN(innerverts[i]);
- }
+ MEM_freeN(innerverts[i]);
+ }
MEM_freeN(innerverts);
}
@@ -2211,7 +2224,7 @@ static void fill_quad_doublevert(EditMesh *em, EditFace *efa, int v1, int v2)
| \ | | / |
--------X X--------
*/
-
+
if(v1 == 1 && v2 == 3){
hold= addfacelist(em, efa->v1, efa->v2, efa->v3, 0, efa, NULL);
hold->e1->f2 |= EDGENEW;
@@ -2219,7 +2232,7 @@ static void fill_quad_doublevert(EditMesh *em, EditFace *efa, int v1, int v2)
hold->e3->f2 |= EDGENEW;
hold->e3->f2 |= EDGEINNER;
facecopy(em, efa, hold);
-
+
hold= addfacelist(em, efa->v1, efa->v3, efa->v4, 0, efa, NULL);
hold->e1->f2 |= EDGENEW;
hold->e2->f2 |= EDGENEW;
@@ -2234,7 +2247,7 @@ static void fill_quad_doublevert(EditMesh *em, EditFace *efa, int v1, int v2)
hold->e3->f2 |= EDGENEW;
hold->e2->f2 |= EDGEINNER;
facecopy(em, efa, hold);
-
+
hold= addfacelist(em, efa->v2, efa->v3, efa->v4, 0, efa, NULL);
hold->e1->f2 |= EDGENEW;
hold->e2->f2 |= EDGENEW;
@@ -2249,17 +2262,17 @@ static void fill_quad_singlevert(EditMesh *em, EditFace *efa, struct GHash *gh)
EditEdge *cedge=NULL;
EditVert *v[4], **verts;
EditFace *hold;
- short start=0, end, left, right, vertsize;
-
+ short start=0, end, left, right, vertsize;
+
v[0] = efa->v1;
v[1] = efa->v2;
v[2] = efa->v3;
- v[3] = efa->v4;
+ v[3] = efa->v4;
if(efa->e1->f & SELECT) { cedge = efa->e1; start = 0;}
- else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
- else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
- else if(efa->e4->f & SELECT) { cedge = efa->e4; start = 3;}
+ else if(efa->e2->f & SELECT) { cedge = efa->e2; start = 1;}
+ else if(efa->e3->f & SELECT) { cedge = efa->e3; start = 2;}
+ else if(efa->e4->f & SELECT) { cedge = efa->e4; start = 3;}
// Point verts to the array of new verts for cedge
verts = BLI_ghash_lookup(gh, cedge);
@@ -2273,25 +2286,25 @@ static void fill_quad_singlevert(EditMesh *em, EditFace *efa, struct GHash *gh)
if(verts[0] != v[start]) {flipvertarray(verts,3);}
end = (start+1)%4;
left = (start+2)%4;
- right = (start+3)%4;
+ right = (start+3)%4;
/*
We should have something like this now
- end start
- 2 1 0
+ end start
+ 2 1 0
|-----*-----|
| |
- | |
| |
- -------------
+ | |
+ -------------
left right
where start,end,left, right are indexes of EditFace->v1, etc (stored in v)
and 0,1,2 are the indexes of the new verts stored in verts. We fill like
this, depending on whether its vertex 'left' or vertex 'right' thats
been knifed through...
-
+
|---*---| |---*---|
| / | | \ |
| / | | \ |
@@ -2307,7 +2320,7 @@ static void fill_quad_singlevert(EditMesh *em, EditFace *efa, struct GHash *gh)
hold->e3->f2 |= EDGENEW;
hold->e3->f2 |= EDGEINNER;
facecopy(em, efa, hold);
-
+
//quad is composed of cutvert, left, right and start
hold = addfacelist(em, verts[1],v[left],v[right],v[start], NULL, NULL);
hold->e1->f2 |= EDGENEW;
@@ -2334,30 +2347,30 @@ static void fill_quad_singlevert(EditMesh *em, EditFace *efa, struct GHash *gh)
hold->e4->f2 |= EDGEINNER;
facecopy(em, efa, hold);
}
-
-}
-// This function takes an example edge, the current point to create and
+}
+
+// This function takes an example edge, the current point to create and
// the total # of points to create, then creates the point and return the
// editvert pointer to it.
-static EditVert *subdivideedgenum(EditMesh *em, EditEdge *edge, int curpoint, int totpoint, float rad, int beauty)
+static EditVert *subdivideedgenum(EditMesh *em, EditEdge *edge, int curpoint, int totpoint, float smooth, float fractal, int beauty)
{
EditVert *ev;
float percent;
-
+
if (beauty & (B_PERCENTSUBD) && totpoint == 1)
//percent=(float)(edge->tmp.l)/32768.0f;
percent= edge->tmp.fp;
else
percent= (float)curpoint/(float)(totpoint+1);
- ev= subdivide_edge_addvert(em, edge, rad, beauty, percent);
+ ev= subdivide_edge_addvert(em, edge, smooth, fractal, beauty, percent);
ev->f = edge->v1->f;
-
+
return ev;
}
-void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beauty, int numcuts, int seltype)
+void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float fractal, int beauty, int numcuts, int seltype)
{
EditFace *ef;
EditEdge *eed, *cedge, *sort[4];
@@ -2367,7 +2380,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
int i, j, edgecount, touchcount, facetype,hold;
ModifierData *md= obedit->modifiers.first;
int ctrl= 0; // XXX
-
+
//Set faces f1 to 0 cause we need it later
for(ef=em->faces.first;ef;ef = ef->next) ef->f1 = 0;
for(eve=em->verts.first; eve; eve=eve->next) {
@@ -2378,8 +2391,8 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
for (; md; md=md->next) {
if (md->type==eModifierType_Mirror) {
- MirrorModifierData *mmd = (MirrorModifierData*) md;
-
+ MirrorModifierData *mmd = (MirrorModifierData*) md;
+
if(mmd->flag & MOD_MIR_CLIPPING) {
for (eve= em->verts.first; eve; eve= eve->next) {
eve->f2= 0;
@@ -2401,23 +2414,23 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
}
}
}
-
+
//Flush vertex flags upward to the edges
for(eed = em->edges.first;eed;eed = eed->next) {
//if(eed->f & flag && eed->v1->f == eed->v2->f) {
- // eed->f |= eed->v1->f;
+ // eed->f |= eed->v1->f;
// }
- eed->f2 = 0;
+ eed->f2 = 0;
if(eed->f & flag) {
eed->f2 |= EDGEOLD;
}
}
-
+
// We store an array of verts for each edge that is subdivided,
// we put this array as a value in a ghash which is keyed by the EditEdge*
// Now for beauty subdivide deselect edges based on length
- if(beauty & B_BEAUTY) {
+ if(beauty & B_BEAUTY) {
for(ef = em->faces.first;ef;ef = ef->next) {
if(!ef->v4) {
continue;
@@ -2426,12 +2439,12 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
VECCOPY(v1mat, ef->v1->co);
VECCOPY(v2mat, ef->v2->co);
VECCOPY(v3mat, ef->v3->co);
- VECCOPY(v4mat, ef->v4->co);
+ VECCOPY(v4mat, ef->v4->co);
Mat4Mul3Vecfl(obedit->obmat, v1mat);
- Mat4Mul3Vecfl(obedit->obmat, v2mat);
+ Mat4Mul3Vecfl(obedit->obmat, v2mat);
Mat4Mul3Vecfl(obedit->obmat, v3mat);
Mat4Mul3Vecfl(obedit->obmat, v4mat);
-
+
length[0] = VecLenf(v1mat, v2mat);
length[1] = VecLenf(v2mat, v3mat);
length[2] = VecLenf(v3mat, v4mat);
@@ -2440,20 +2453,20 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
sort[1] = ef->e2;
sort[2] = ef->e3;
sort[3] = ef->e4;
-
-
+
+
// Beauty Short Edges
if(beauty & B_BEAUTY_SHORT) {
for(j=0;j<2;j++) {
hold = -1;
for(i=0;i<4;i++) {
if(length[i] < 0) {
- continue;
- } else if(hold == -1) {
- hold = i;
+ continue;
+ } else if(hold == -1) {
+ hold = i;
} else {
if(length[hold] < length[i]) {
- hold = i;
+ hold = i;
}
}
}
@@ -2464,19 +2477,19 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
}
}
}
-
+
// Beauty Long Edges
else {
for(j=0;j<2;j++) {
hold = -1;
for(i=0;i<4;i++) {
if(length[i] < 0) {
- continue;
- } else if(hold == -1) {
- hold = i;
+ continue;
+ } else if(hold == -1) {
+ hold = i;
} else {
if(length[hold] > length[i]) {
- hold = i;
+ hold = i;
}
}
}
@@ -2491,18 +2504,18 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
}
}
- gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+ gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
// If we are knifing, We only need the selected edges that were cut, so deselect if it was not cut
- if(beauty & B_KNIFE) {
- for(eed= em->edges.first;eed;eed=eed->next) {
+ if(beauty & B_KNIFE) {
+ for(eed= em->edges.first;eed;eed=eed->next) {
if( eed->tmp.fp == 0 ) {
EM_select_edge(eed,0);
}
}
- }
+ }
// So for each edge, if it is selected, we allocate an array of size cuts+2
- // so we can have a place for the v1, the new verts and v2
+ // so we can have a place for the v1, the new verts and v2
for(eed=em->edges.first;eed;eed = eed->next) {
if(eed->f & flag) {
templist = MEM_mallocN(sizeof(EditVert*)*(numcuts+2),"vertlist");
@@ -2510,7 +2523,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
for(i=0;i<numcuts;i++) {
// This function creates the new vert and returns it back
// to the array
- templist[i+1] = subdivideedgenum(em, eed, i+1, numcuts, rad, beauty);
+ templist[i+1] = subdivideedgenum(em, eed, i+1, numcuts, smooth, fractal, beauty);
//while we are here, we can copy edge info from the original edge
cedge = addedgelist(em, templist[i],templist[i+1],eed);
// Also set the edge f2 to EDGENEW so that we can use this info later
@@ -2520,9 +2533,9 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
//Do the last edge too
cedge = addedgelist(em, templist[i],templist[i+1],eed);
cedge->f2 = EDGENEW;
- // Now that the edge is subdivided, we can put its verts in the ghash
- BLI_ghash_insert(gh, eed, templist);
- }
+ // Now that the edge is subdivided, we can put its verts in the ghash
+ BLI_ghash_insert(gh, eed, templist);
+ }
}
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
@@ -2537,7 +2550,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
if(ef->v4) {
facetype = 4;
if(ef->e4->f & flag) {edgecount++;}
- }
+ }
if(facetype == 4) {
switch(edgecount) {
case 0:
@@ -2549,9 +2562,9 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
if(ef->v3->f1) touchcount++;
if(ef->v4->f1) touchcount++;
if(touchcount == 2){
- if(ef->v1->f1 && ef->v3->f1){
+ if(ef->v1->f1 && ef->v3->f1){
ef->f1 = SELECT;
- fill_quad_doublevert(em, ef, 1, 3);
+ fill_quad_doublevert(em, ef, 1, 3);
}
else if(ef->v2->f1 && ef->v4->f1){
ef->f1 = SELECT;
@@ -2559,9 +2572,9 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
}
}
}
- break;
-
- case 1:
+ break;
+
+ case 1:
if(beauty & B_KNIFE && numcuts == 1){
/*Test for when knifing through an edge and one vert*/
touchcount = 0;
@@ -2569,14 +2582,14 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
if(ef->v2->f1) touchcount++;
if(ef->v3->f1) touchcount++;
if(ef->v4->f1) touchcount++;
-
+
if(touchcount == 1){
if( (ef->e1->f & flag && ( !ef->e1->v1->f1 && !ef->e1->v2->f1 )) ||
(ef->e2->f & flag && ( !ef->e2->v1->f1 && !ef->e2->v2->f1 )) ||
(ef->e3->f & flag && ( !ef->e3->v1->f1 && !ef->e3->v2->f1 )) ||
(ef->e4->f & flag && ( !ef->e4->v1->f1 && !ef->e4->v2->f1 )) ){
-
- ef->f1 = SELECT;
+
+ ef->f1 = SELECT;
fill_quad_singlevert(em, ef, gh);
}
else{
@@ -2584,64 +2597,64 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
fill_quad_single(em, ef, gh, numcuts, seltype);
}
}
- else{
- ef->f1 = SELECT;
+ else{
+ ef->f1 = SELECT;
fill_quad_single(em, ef, gh, numcuts, seltype);
}
}
- else{
+ else{
ef->f1 = SELECT;
fill_quad_single(em, ef, gh, numcuts, seltype);
}
- break;
+ break;
case 2: ef->f1 = SELECT;
// if there are 2, we check if edge 1 and 3 are either both on or off that way
// we can tell if the selected pair is Adjacent or Opposite of each other
- if((ef->e1->f & flag && ef->e3->f & flag) ||
+ if((ef->e1->f & flag && ef->e3->f & flag) ||
(ef->e2->f & flag && ef->e4->f & flag)) {
- fill_quad_double_op(em, ef, gh, numcuts);
+ fill_quad_double_op(em, ef, gh, numcuts);
}else{
switch(0) { // XXX scene->toolsettings->cornertype) {
case 0: fill_quad_double_adj_path(em, ef, gh, numcuts); break;
case 1: fill_quad_double_adj_inner(em, ef, gh, numcuts); break;
case 2: fill_quad_double_adj_fan(em, ef, gh, numcuts); break;
}
-
+
}
- break;
+ break;
case 3: ef->f1 = SELECT;
- fill_quad_triple(em, ef, gh, numcuts);
- break;
+ fill_quad_triple(em, ef, gh, numcuts);
+ break;
case 4: ef->f1 = SELECT;
- fill_quad_quadruple(em, ef, gh, numcuts, rad, beauty);
- break;
+ fill_quad_quadruple(em, ef, gh, numcuts, smooth, fractal, beauty);
+ break;
}
} else {
switch(edgecount) {
case 0: break;
case 1: ef->f1 = SELECT;
fill_tri_single(em, ef, gh, numcuts, seltype);
- break;
+ break;
case 2: ef->f1 = SELECT;
fill_tri_double(em, ef, gh, numcuts);
- break;
+ break;
case 3: ef->f1 = SELECT;
- fill_tri_triple(em, ef, gh, numcuts, rad, beauty);
- break;
- }
- }
+ fill_tri_triple(em, ef, gh, numcuts, smooth, fractal, beauty);
+ break;
+ }
+ }
}
-
+
// Delete Old Edges and Faces
for(eed = em->edges.first;eed;eed = eed->next) {
if(BLI_ghash_haskey(gh,eed)) {
- eed->f1 = SELECT;
+ eed->f1 = SELECT;
} else {
- eed->f1 = 0;
+ eed->f1 = 0;
}
- }
- free_tagged_edges_faces(em, em->edges.first, em->faces.first);
-
+ }
+ free_tagged_edges_faces(em, em->edges.first, em->faces.first);
+
if(seltype == SUBDIV_SELECT_ORIG && !ctrl) {
/* bugfix: vertex could get flagged as "not-selected"
// solution: clear flags before, not at the same time as setting SELECT flag -dg
@@ -2649,7 +2662,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
for(eed = em->edges.first;eed;eed = eed->next) {
if(!(eed->f2 & EDGENEW || eed->f2 & EDGEOLD)) {
eed->f &= !flag;
- EM_select_edge(eed,0);
+ EM_select_edge(eed,0);
}
}
for(eed = em->edges.first;eed;eed = eed->next) {
@@ -2662,14 +2675,14 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
for(eed = em->edges.first;eed;eed = eed->next) {
if(eed->f2 & EDGEINNER) {
eed->f |= flag;
- EM_select_edge(eed,1);
+ EM_select_edge(eed,1);
if(eed->v1->f & EDGEINNER) eed->v1->f |= SELECT;
if(eed->v2->f & EDGEINNER) eed->v2->f |= SELECT;
}else{
eed->f &= !flag;
- EM_select_edge(eed,0);
+ EM_select_edge(eed,0);
}
- }
+ }
} else if(seltype == SUBDIV_SELECT_LOOPCUT){
for(eed = em->edges.first;eed;eed = eed->next) {
if(eed->f2 & DOUBLEOPFILL){
@@ -2680,16 +2693,16 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
EM_select_edge(eed,0);
}
}
- }
+ }
if(em->selectmode & SCE_SELECT_VERTEX) {
for(eed = em->edges.first;eed;eed = eed->next) {
if(eed->f & SELECT) {
eed->v1->f |= SELECT;
eed->v2->f |= SELECT;
}
- }
+ }
}
-
+
//fix hide flags for edges. First pass, hide edges of hidden faces
for(ef=em->faces.first; ef; ef=ef->next){
if(ef->h){
@@ -2708,27 +2721,26 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beaut
if(ef->e4) ef->e4->h &= ~1;
}
}
-
- // Free the ghash and call MEM_freeN on all the value entries to return
+
+ // Free the ghash and call MEM_freeN on all the value entries to return
// that memory
- BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN);
-
+ BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN);
+
EM_selectmode_flush(em);
for(ef=em->faces.first;ef;ef = ef->next) {
if(ef->e4) {
if( (ef->e1->f & SELECT && ef->e2->f & SELECT) &&
(ef->e3->f & SELECT && ef->e4->f & SELECT) ) {
- ef->f |= SELECT;
- }
+ ef->f |= SELECT;
+ }
} else {
if( (ef->e1->f & SELECT && ef->e2->f & SELECT) && ef->e3->f & SELECT) {
- ef->f |= SELECT;
+ ef->f |= SELECT;
}
}
}
-
+
recalc_editnormals(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
static int count_selected_edges(EditEdge *ed)
@@ -2766,15 +2778,15 @@ static int collect_quadedges(EVPTuple *efaa, EditEdge *eed, EditFace *efa)
i++;
}
else eed->tmp.p = NULL;
-
+
eed= eed->next;
}
-
-
+
+
/* find edges pointing to 2 faces by procedure:
-
+
- run through faces and their edges, increase
- face counter e->f1 for each face
+ face counter e->f1 for each face
*/
while(efa) {
@@ -2819,20 +2831,20 @@ static int collect_quadedges(EVPTuple *efaa, EditEdge *eed, EditFace *efa)
}
-/* returns vertices of two adjacent triangles forming a quad
+/* returns vertices of two adjacent triangles forming a quad
- can be righthand or lefthand
4-----3
|\ |
| \ 2 | <- efa1
- | \ |
- efa-> | 1 \ |
- | \|
+ | \ |
+ efa-> | 1 \ |
+ | \|
1-----2
*/
#define VTEST(face, num, other) \
- (face->v##num != other->v1 && face->v##num != other->v2 && face->v##num != other->v3)
+ (face->v##num != other->v1 && face->v##num != other->v2 && face->v##num != other->v3)
static void givequadverts(EditFace *efa, EditFace *efa1, EditVert **v1, EditVert **v2, EditVert **v3, EditVert **v4, int *vindex)
{
@@ -2854,7 +2866,7 @@ static void givequadverts(EditFace *efa, EditFace *efa1, EditVert **v1, EditVert
vindex[0]= 2;
vindex[1]= 0;
}
-
+
if VTEST(efa1, 1, efa) {
*v3= efa1->v1;
*v4= efa1->v2;
@@ -2911,65 +2923,65 @@ static void free_tagged_edges_faces(EditMesh *em, EditEdge *eed, EditFace *efa)
free_editedge(em, eed);
}
eed= nexted;
- }
-}
+ }
+}
/* ******************** BEGIN TRIANGLE TO QUAD ************************************* */
static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4, float limit)
{
-
+
/*gives a 'weight' to a pair of triangles that join an edge to decide how good a join they would make*/
/*Note: this is more complicated than it needs to be and should be cleaned up...*/
float measure = 0.0, noA1[3], noA2[3], noB1[3], noB2[3], normalADiff, normalBDiff,
edgeVec1[3], edgeVec2[3], edgeVec3[3], edgeVec4[3], diff,
minarea, maxarea, areaA, areaB;
-
+
/*First Test: Normal difference*/
CalcNormFloat(v1->co, v2->co, v3->co, noA1);
CalcNormFloat(v1->co, v3->co, v4->co, noA2);
-
+
if(noA1[0] == noA2[0] && noA1[1] == noA2[1] && noA1[2] == noA2[2]) normalADiff = 0.0;
else normalADiff = VecAngle2(noA1, noA2);
//if(!normalADiff) normalADiff = 179;
CalcNormFloat(v2->co, v3->co, v4->co, noB1);
CalcNormFloat(v4->co, v1->co, v2->co, noB2);
-
+
if(noB1[0] == noB2[0] && noB1[1] == noB2[1] && noB1[2] == noB2[2]) normalBDiff = 0.0;
else normalBDiff = VecAngle2(noB1, noB2);
//if(!normalBDiff) normalBDiff = 179;
-
+
measure += (normalADiff/360) + (normalBDiff/360);
if(measure > limit) return measure;
-
+
/*Second test: Colinearity*/
VecSubf(edgeVec1, v1->co, v2->co);
VecSubf(edgeVec2, v2->co, v3->co);
VecSubf(edgeVec3, v3->co, v4->co);
VecSubf(edgeVec4, v4->co, v1->co);
-
+
diff = 0.0;
-
+
diff = (
fabs(VecAngle2(edgeVec1, edgeVec2) - 90) +
- fabs(VecAngle2(edgeVec2, edgeVec3) - 90) +
- fabs(VecAngle2(edgeVec3, edgeVec4) - 90) +
+ fabs(VecAngle2(edgeVec2, edgeVec3) - 90) +
+ fabs(VecAngle2(edgeVec3, edgeVec4) - 90) +
fabs(VecAngle2(edgeVec4, edgeVec1) - 90)) / 360;
if(!diff) return 0.0;
-
+
measure += diff;
if(measure > limit) return measure;
/*Third test: Concavity*/
areaA = AreaT3Dfl(v1->co, v2->co, v3->co) + AreaT3Dfl(v1->co, v3->co, v4->co);
areaB = AreaT3Dfl(v2->co, v3->co, v4->co) + AreaT3Dfl(v4->co, v1->co, v2->co);
-
+
if(areaA <= areaB) minarea = areaA;
else minarea = areaB;
-
+
if(areaA >= areaB) maxarea = areaA;
else maxarea = areaB;
-
+
if(!maxarea) measure += 1;
else measure += (1 - (minarea / maxarea));
@@ -2978,38 +2990,38 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert
#define T2QUV_LIMIT 0.005
#define T2QCOL_LIMIT 3
-static int compareFaceAttribs(EditMesh *em, EditFace *f1, EditFace *f2, EditEdge *eed)
+static int compareFaceAttribs(EditMesh *em, EditFace *f1, EditFace *f2, EditEdge *eed)
{
- /*Test to see if the per-face attributes for the joining edge match within limit*/
+ /*Test to see if the per-face attributes for the joining edge match within limit*/
MTFace *tf1, *tf2;
unsigned int *col1, *col2;
short i,attrok=0, flag = 0, /* XXX scene->toolsettings->editbutflag,*/ fe1[2], fe2[2];
-
+
tf1 = CustomData_em_get(&em->fdata, f1->data, CD_MTFACE);
tf2 = CustomData_em_get(&em->fdata, f2->data, CD_MTFACE);
col1 = CustomData_em_get(&em->fdata, f1->data, CD_MCOL);
col2 = CustomData_em_get(&em->fdata, f2->data, CD_MCOL);
-
+
/*store indices for faceedges*/
f1->v1->f1 = 0;
f1->v2->f1 = 1;
f1->v3->f1 = 2;
-
+
fe1[0] = eed->v1->f1;
fe1[1] = eed->v2->f1;
-
+
f2->v1->f1 = 0;
f2->v2->f1 = 1;
f2->v3->f1 = 2;
-
+
fe2[0] = eed->v1->f1;
fe2[1] = eed->v2->f1;
-
+
/*compare faceedges for each face attribute. Additional per face attributes can be added later*/
/*do UVs*/
if(flag & B_JOINTRIA_UV){
-
+
if(tf1 == NULL || tf2 == NULL) attrok |= B_JOINTRIA_UV;
else if(tf1->tpage != tf2->tpage); /*do nothing*/
else{
@@ -3019,7 +3031,7 @@ static int compareFaceAttribs(EditMesh *em, EditFace *f1, EditFace *f2, EditEdge
}
}
}
-
+
/*do VCOLs*/
if(flag & B_JOINTRIA_VCOL){
if(!col1 || !col2) attrok |= B_JOINTRIA_VCOL;
@@ -3028,7 +3040,7 @@ static int compareFaceAttribs(EditMesh *em, EditFace *f1, EditFace *f2, EditEdge
for(i = 0; i < 2; i++){
f1vcol = (char *)&(col1[fe1[i]]);
f2vcol = (char *)&(col2[fe2[i]]);
-
+
/*compare f1vcol with f2vcol*/
if( f1vcol[1] + T2QCOL_LIMIT > f2vcol[1] && f1vcol[1] - T2QCOL_LIMIT < f2vcol[1] &&
f1vcol[2] + T2QCOL_LIMIT > f2vcol[2] && f1vcol[2] - T2QCOL_LIMIT < f2vcol[2] &&
@@ -3036,18 +3048,18 @@ static int compareFaceAttribs(EditMesh *em, EditFace *f1, EditFace *f2, EditEdge
}
}
}
-
+
if( ((attrok & B_JOINTRIA_UV) == (flag & B_JOINTRIA_UV)) && ((attrok & B_JOINTRIA_VCOL) == (flag & B_JOINTRIA_VCOL)) ) return 1;
return 0;
-}
-
+}
+
static int fplcmp(const void *v1, const void *v2)
{
const EditEdge *e1= *((EditEdge**)v1), *e2=*((EditEdge**)v2);
-
+
if( e1->crease > e2->crease) return 1;
else if( e1->crease < e2->crease) return -1;
-
+
return 0;
}
@@ -3066,21 +3078,21 @@ void join_triangles(EditMesh *em)
float measure; /*Used to set tolerance*/
float limit = 0.0f; // XXX scene->toolsettings->jointrilimit;
int i, ok, totedge=0, totseledge=0, complexedges, vindex[4];
-
+
/*if we take a long time on very dense meshes we want waitcursor to display*/
waitcursor(1);
-
+
totseledge = count_selected_edges(em->edges.first);
if(totseledge==0) return;
-
+
/*abusing crease value to store weights for edge pairs. Nasty*/
for(eed=em->edges.first; eed; eed=eed->next) totedge++;
- if(totedge) creases = MEM_callocN(sizeof(float) * totedge, "Join Triangles Crease Array");
+ if(totedge) creases = MEM_callocN(sizeof(float) * totedge, "Join Triangles Crease Array");
for(eed=em->edges.first, i = 0; eed; eed=eed->next, i++){
- creases[i] = eed->crease;
+ creases[i] = eed->crease;
eed->crease = 0.0;
}
-
+
/*clear temp flags*/
for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = eve->f2 = 0;
for(eed=em->edges.first; eed; eed=eed->next) eed->f2 = eed->f1 = 0;
@@ -3090,11 +3102,11 @@ void join_triangles(EditMesh *em)
efaar= (EVPTuple *) MEM_callocN(totseledge * sizeof(EVPTuple), "Tri2Quad");
ok = collect_quadedges(efaar, em->edges.first, em->faces.first);
complexedges = 0;
-
+
if(ok){
-
-
- /*clear tmp.l flag and store number of faces that are selected and coincident to current face here.*/
+
+
+ /*clear tmp.l flag and store number of faces that are selected and coincident to current face here.*/
for(eed=em->edges.first; eed; eed=eed->next){
/* eed->f2 is 2 only if this edge is part of exactly two
triangles, and both are selected, and it has EVPTuple assigned */
@@ -3104,7 +3116,7 @@ void join_triangles(EditMesh *em)
efaa[1]->tmp.l++;
}
}
-
+
for(eed=em->edges.first; eed; eed=eed->next){
if(eed->f2 == 2){
efaa= (EVPtr *) eed->tmp.p;
@@ -3117,30 +3129,30 @@ void join_triangles(EditMesh *em)
efaa[0]->f1 = 1; //mark for join
efaa[1]->f1 = 1; //mark for join
}
- else{
-
+ else{
+
/* The face pair is part of a 'complex' island, so the rules for dealing with it are more involved.
Depending on what options the user has chosen, this face pair can be 'thrown out' based upon the following criteria:
-
+
1: the two faces do not share the same material
2: the edge joining the two faces is marked as sharp.
3: the two faces UV's do not make a good match
4: the two faces Vertex colors do not make a good match
-
+
If the face pair passes all the applicable tests, it is then given a 'weight' with the measure_facepair() function.
This measures things like concavity, colinearity ect. If this weight is below the threshold set by the user
the edge joining them is marked as being 'complex' and will be compared against other possible pairs which contain one of the
same faces in the current pair later.
-
+
This technique is based upon an algorithm that Campbell Barton developed for his Tri2Quad script that was previously part of
the python scripts bundled with Blender releases.
*/
-
+
// XXX if(scene->toolsettings->editbutflag & B_JOINTRIA_SHARP && eed->sharp); /*do nothing*/
// else if(scene->toolsettings->editbutflag & B_JOINTRIA_MAT && efaa[0]->mat_nr != efaa[1]->mat_nr); /*do nothing*/
// else if(((scene->toolsettings->editbutflag & B_JOINTRIA_UV) || (scene->toolsettings->editbutflag & B_JOINTRIA_VCOL)) &&
compareFaceAttribs(em, efaa[0], efaa[1], eed); // XXX == 0); /*do nothing*/
-// else{
+// else{
measure = measure_facepair(v1, v2, v3, v4, limit);
if(measure < limit){
complexedges++;
@@ -3152,7 +3164,7 @@ void join_triangles(EditMesh *em)
}
}
}
-
+
/*Quicksort the complex edges according to their weighting*/
if(complexedges){
edsortblock = edb = MEM_callocN(sizeof(EditEdge*) * complexedges, "Face Pairs quicksort Array");
@@ -3164,7 +3176,7 @@ void join_triangles(EditMesh *em)
}
qsort(edsortblock, complexedges, sizeof(EditEdge*), fplcmp);
/*now go through and mark the edges who get the highest weighting*/
- for(edb=edsortblock, i=0; i < complexedges; edb++, i++){
+ for(edb=edsortblock, i=0; i < complexedges; edb++, i++){
efaa = (EVPtr *)((*edb)->tmp.p); /*suspect!*/
if( !efaa[0]->f1 && !efaa[1]->f1){
efaa[0]->f1 = 1; //mark for join
@@ -3173,8 +3185,8 @@ void join_triangles(EditMesh *em)
}
}
}
-
- /*finally go through all edges marked for join (simple and complex) and create new faces*/
+
+ /*finally go through all edges marked for join (simple and complex) and create new faces*/
for(eed=em->edges.first; eed; eed=eed->next){
if(eed->f1 & T2QJOIN){
efaa= (EVPtr *)eed->tmp.p;
@@ -3194,10 +3206,10 @@ void join_triangles(EditMesh *em)
}
}
}
-
+
/*free data and cleanup*/
if(creases){
- for(eed=em->edges.first, i = 0; eed; eed=eed->next, i++) eed->crease = creases[i];
+ for(eed=em->edges.first, i = 0; eed; eed=eed->next, i++) eed->crease = creases[i];
MEM_freeN(creases);
}
for(eed=em->edges.first; eed; eed=eed->next){
@@ -3207,9 +3219,8 @@ void join_triangles(EditMesh *em)
free_tagged_edges_faces(em, em->edges.first, em->faces.first);
if(efaar) MEM_freeN(efaar);
if(edsortblock) MEM_freeN(edsortblock);
-
+
EM_selectmode_flush(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
/* ******************** END TRIANGLE TO QUAD ************************************* */
@@ -3226,7 +3237,7 @@ void edge_flip(EditMesh *em)
EVPTuple *efaar;
EVPtr *efaa;
int totedge, ok, vindex[4];
-
+
/* - all selected edges with two faces
* - find the faces: store them in edges (using datablock)
* - per edge: - test convex
@@ -3234,7 +3245,7 @@ void edge_flip(EditMesh *em)
- if true: remedge, addedge, all edges at the edge get new face pointers
*/
- EM_selectmode_flush(em); // makes sure in selectmode 'face' the edges of selected faces are selected too
+ EM_selectmode_flush(em); // makes sure in selectmode 'face' the edges of selected faces are selected too
totedge = count_selected_edges(em->edges.first);
if(totedge==0) return;
@@ -3243,15 +3254,15 @@ void edge_flip(EditMesh *em)
efaar= (EVPTuple *) MEM_callocN(totedge * sizeof(EVPTuple), "edgeflip");
ok = collect_quadedges(efaar, em->edges.first, em->faces.first);
-
+
eed= em->edges.first;
while(eed) {
nexted= eed->next;
-
+
if(eed->f2==2) { /* points to 2 faces */
-
+
efaa= (EVPtr *) eed->tmp.p;
-
+
/* don't do it if flagged */
ok= 1;
@@ -3259,7 +3270,7 @@ void edge_flip(EditMesh *em)
if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0;
efa= efaa[1];
if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0;
-
+
if(ok) {
/* test convex */
givequadverts(efaa[0], efaa[1], &v1, &v2, &v3, &v4, vindex);
@@ -3268,8 +3279,8 @@ void edge_flip(EditMesh *em)
4-----3 4-----3
|\ | | /|
| \ 1 | | 1 / |
- | \ | -> | / |
- | 0 \ | | / 0 |
+ | \ | -> | / |
+ | 0 \ | | / 0 |
| \| |/ |
1-----2 1-----2
*/
@@ -3277,7 +3288,7 @@ void edge_flip(EditMesh *em)
if (v1 && v2 && v3) {
if( convex(v1->co, v2->co, v3->co, v4->co) ) {
if(exist_face(em, v1, v2, v3, v4)==0) {
- /* outch this may break seams */
+ /* outch this may break seams */
w= EM_face_from_faces(em, efaa[0], efaa[1], vindex[0],
vindex[1], 4+vindex[2], -1);
@@ -3292,8 +3303,8 @@ void edge_flip(EditMesh *em)
/* tag as to-be-removed */
FACE_MARKCLEAR(efaa[1]);
FACE_MARKCLEAR(efaa[0]);
- eed->f1 = 1;
-
+ eed->f1 = 1;
+
} /* endif test convex */
}
}
@@ -3303,21 +3314,34 @@ void edge_flip(EditMesh *em)
/* clear tagged edges and faces: */
free_tagged_edges_faces(em, em->edges.first, em->faces.first);
-
- MEM_freeN(efaar);
-
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ MEM_freeN(efaar);
}
-static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
+#define DIRECTION_CW 1
+#define DIRECTION_CCW 2
+
+static const EnumPropertyItem direction_items[]= {
+ {DIRECTION_CW, "CW", 0, "Clockwise", ""},
+ {DIRECTION_CCW, "CCW", 0, "Counter Clockwise", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+#define AXIS_X 1
+#define AXIS_Y 2
+
+static const EnumPropertyItem axis_items[]= {
+ {AXIS_X, "X", 0, "X", ""},
+ {AXIS_Y, "Y", 0, "Y", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed, int dir)
{
EditVert **verts[2];
EditFace *face[2], *efa, *newFace[2];
EditEdge **edges[2], **hiddenedges, *srchedge;
int facecount, p1, p2, p3, p4, fac1, fac2, i, j;
int numhidden, numshared, p[2][4];
-
+
/* check to make sure that the edge is only part of 2 faces */
facecount = 0;
for(efa = em->faces.first;efa;efa = efa->next) {
@@ -3332,7 +3356,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
}
}
}
-
+
if(facecount < 2)
return;
@@ -3342,7 +3366,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
if(face[1]->e4) fac2= 4;
else fac2= 3;
-
+
/* make a handy array for verts and edges */
verts[0]= &face[0]->v1;
edges[0]= &face[0]->e1;
@@ -3358,7 +3382,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
if(numshared > 1)
return;
-
+
/* we want to construct an array of vertex indicis in both faces, starting at
the last vertex of the edge being rotated.
- first we find the two vertices that lie on the rotating edge
@@ -3372,12 +3396,12 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
if(eed->v1 == verts[1][i]) p3 = i;
if(eed->v2 == verts[1][i]) p4 = i;
}
-
+
if((p1+1)%fac1 == p2)
SWAP(int, p1, p2);
if((p3+1)%fac2 == p4)
SWAP(int, p3, p4);
-
+
for (i = 0; i < 4; i++) {
p[0][i]= (p1 + i)%fac1;
p[1][i]= (p3 + i)%fac2;
@@ -3392,7 +3416,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
hiddenedges = MEM_mallocN(sizeof(EditVert*)*numhidden+1, "RotateEdgeHiddenVerts");
if(!hiddenedges) {
BKE_report(op->reports, RPT_ERROR, "Memory allocation failed");
- return;
+ return;
}
numhidden = 0;
@@ -3408,50 +3432,50 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][1], p[1][2], 4+p[0][1], -1);
}
else if(fac1 == 4 && fac2 == 3) {
- if(dir == 1) {
+ if(dir == DIRECTION_CW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][1], p[0][2], p[0][3], 4+p[1][1]);
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][1], p[1][2], 4+p[0][1], -1);
- } else if (dir == 2) {
+ } else if (dir == DIRECTION_CCW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][2], 4+p[1][1], p[0][0], p[0][1]);
newFace[1]= EM_face_from_faces(em, face[1], face[0], 4+p[0][2], p[1][0], p[1][1], -1);
-
+
verts[0][p[0][2]]->f |= SELECT;
- verts[1][p[1][1]]->f |= SELECT;
+ verts[1][p[1][1]]->f |= SELECT;
}
}
else if(fac1 == 3 && fac2 == 4) {
- if(dir == 1) {
+ if(dir == DIRECTION_CW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][1], p[0][2], 4+p[1][1], -1);
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][1], p[1][2], p[1][3], 4+p[0][1]);
- } else if (dir == 2) {
+ } else if (dir == DIRECTION_CCW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][0], p[0][1], 4+p[1][2], -1);
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][1], p[1][2], 4+p[0][1], 4+p[0][2]);
-
+
verts[0][p[0][1]]->f |= SELECT;
- verts[1][p[1][2]]->f |= SELECT;
+ verts[1][p[1][2]]->f |= SELECT;
}
-
+
}
else if(fac1 == 4 && fac2 == 4) {
- if(dir == 1) {
+ if(dir == DIRECTION_CW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][1], p[0][2], p[0][3], 4+p[1][1]);
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][1], p[1][2], p[1][3], 4+p[0][1]);
- } else if (dir == 2) {
+ } else if (dir == DIRECTION_CCW) {
newFace[0]= EM_face_from_faces(em, face[0], face[1], p[0][2], p[0][3], 4+p[1][1], 4+p[1][2]);
newFace[1]= EM_face_from_faces(em, face[1], face[0], p[1][2], p[1][3], 4+p[0][1], 4+p[0][2]);
-
+
verts[0][p[0][2]]->f |= SELECT;
- verts[1][p[1][2]]->f |= SELECT;
+ verts[1][p[1][2]]->f |= SELECT;
}
- }
+ }
else
return; /* This should never happen */
- if(dir == 1 || (fac1 == 3 && fac2 == 3)) {
+ if(dir == DIRECTION_CW || (fac1 == 3 && fac2 == 3)) {
verts[0][p[0][1]]->f |= SELECT;
verts[1][p[1][1]]->f |= SELECT;
}
-
+
/* copy old edge's flags to new center edge*/
for(srchedge=em->edges.first;srchedge;srchedge=srchedge->next) {
if((srchedge->v1->f & SELECT) && (srchedge->v2->f & SELECT)) {
@@ -3463,46 +3487,46 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir)
srchedge->bweight = eed->bweight;
}
}
-
+
/* resetting hidden flag */
for(numhidden--; numhidden>=0; numhidden--)
hiddenedges[numhidden]->h= 1;
-
+
/* check for orhphan edges */
for(srchedge=em->edges.first; srchedge; srchedge=srchedge->next)
- srchedge->f1= -1;
-
+ srchedge->f1= -1;
+
/* cleanup */
MEM_freeN(hiddenedges);
-
+
/* get rid of the old edge and faces*/
remedge(em, eed);
- free_editedge(em, eed);
+ free_editedge(em, eed);
BLI_remlink(&em->faces, face[0]);
- free_editface(em, face[0]);
+ free_editface(em, face[0]);
BLI_remlink(&em->faces, face[1]);
- free_editface(em, face[1]);
+ free_editface(em, face[1]);
}
// XXX ton please check
/* 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);
-
- int dir = RNA_int_get(op->ptr,"dir"); // dir == 2 when clockwise and ==1 for counter CW.
EditEdge *eed;
EditFace *efa;
+ int dir = RNA_int_get(op->ptr, "direction"); // dir == 2 when clockwise and ==1 for counter CW.
short edgeCount = 0;
-
+
/*clear new flag for new edges, count selected edges */
for(eed= em->edges.first; eed; eed= eed->next) {
eed->f1= 0;
eed->f2 &= ~2;
- if(eed->f & SELECT) edgeCount++;
+ if(eed->f & SELECT) edgeCount++;
}
-
+
if(edgeCount>1) {
/* more selected edges, check faces */
for(efa= em->faces.first; efa; efa= efa->next) {
@@ -3525,7 +3549,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
}
}
}
- else
+ else
{
BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces");
BKE_mesh_end_editmesh(obedit->data, em);
@@ -3541,24 +3565,21 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
}
}
}
- else
- {
+ else {
BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
/* flush selected vertices (again) to edges/faces */
EM_select_flush(em);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
- return OPERATOR_FINISHED;
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
}
void MESH_OT_edge_rotate(wmOperatorType *ot)
@@ -3566,16 +3587,16 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
/* identifiers */
ot->name= "Rotate Selected Edge";
ot->idname= "MESH_OT_edge_rotate";
-
+
/* api callbacks */
ot->exec= edge_rotate_selected;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/* props */
- RNA_def_int(ot->srna, "dir", 1, 1, 2, "Direction", "Clockwise and Counter Clockwise", 1, 2);
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "direction", "direction to rotate edge around.");
}
@@ -3583,7 +3604,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
/* XXX old bevel not ported yet */
-void bevel_menu(EditMesh *em)
+void bevel_menu(EditMesh *em)
{
BME_Mesh *bm;
BME_TransData_Head *td;
@@ -3638,7 +3659,7 @@ returns 0 if they do not, or if the function is passed the same edge 2 times
short sharesFace(EditMesh *em, EditEdge* e1, EditEdge* e2)
{
EditFace *search=NULL;
-
+
search = em->faces.first;
if (e1 == e2){
return 0 ;
@@ -3689,38 +3710,38 @@ useless:
float shiftlabda= 0.0f,len = 0.0f;
int i = 0,j, numsel, numadded=0, timesthrough = 0, vertsel=0, prop=1, cancel = 0,flip=0;
int wasshift = 0;
-
+
/* UV correction vars */
GHash **uvarray= NULL;
int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
int uvlay_idx;
- SlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL;
+ SlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL;
float uv_tmp[2];
LinkNode *fuv_link;
-
+
short event, draw=1;
short mval[2], mvalo[2];
- char str[128];
+ char str[128];
float labda = 0.0f;
-
+
// initNumInput(&num);
-
+
// view3d_get_object_project_mat(curarea, obedit, projectMat);
-
- mvalo[0] = -1; mvalo[1] = -1;
- numsel =0;
-
+
+ mvalo[0] = -1; mvalo[1] = -1;
+ numsel =0;
+
// Get number of selected edges and clear some flags
for(eed=em->edges.first;eed;eed=eed->next) {
eed->f1 = 0;
- eed->f2 = 0;
+ eed->f2 = 0;
if(eed->f & SELECT) numsel++;
}
-
+
for(ev=em->verts.first;ev;ev=ev->next) {
- ev->f1 = 0;
- }
-
+ ev->f1 = 0;
+ }
+
//Make sure each edge only has 2 faces
// make sure loop doesn't cross face
for(efa=em->faces.first;efa;efa=efa->next) {
@@ -3730,7 +3751,7 @@ useless:
efa->e1->f1++;
if(efa->e1->f1 > 2) {
BKE_report(op->reports, RPT_ERROR, "3+ face edge");
- return 0;
+ return 0;
}
}
if(efa->e2->f & SELECT) {
@@ -3738,7 +3759,7 @@ useless:
efa->e2->f1++;
if(efa->e2->f1 > 2) {
BKE_report(op->reports, RPT_ERROR, "3+ face edge");
- return 0;
+ return 0;
}
}
if(efa->e3->f & SELECT) {
@@ -3746,7 +3767,7 @@ useless:
efa->e3->f1++;
if(efa->e3->f1 > 2) {
BKE_report(op->reports, RPT_ERROR, "3+ face edge");
- return 0;
+ return 0;
}
}
if(efa->e4 && efa->e4->f & SELECT) {
@@ -3754,26 +3775,26 @@ useless:
efa->e4->f1++;
if(efa->e4->f1 > 2) {
BKE_report(op->reports, RPT_ERROR, "3+ face edge");
- return 0;
+ return 0;
}
- }
- // Make sure loop is not 2 edges of same face
+ }
+ // Make sure loop is not 2 edges of same face
if(ct > 1) {
BKE_report(op->reports, RPT_ERROR, "Loop crosses itself");
- return 0;
+ return 0;
}
- }
+ }
// Get # of selected verts
- for(ev=em->verts.first;ev;ev=ev->next) {
+ for(ev=em->verts.first;ev;ev=ev->next) {
if(ev->f & SELECT) vertsel++;
- }
-
+ }
+
// Test for multiple segments
if(vertsel > numsel+1) {
BKE_report(op->reports, RPT_ERROR, "Please choose a single edge loop");
- return 0;
- }
-
+ return 0;
+ }
+
// Get the edgeloop in order - mark f1 with SELECT once added
for(eed=em->edges.first;eed;eed=eed->next) {
if((eed->f & SELECT) && !(eed->f1 & SELECT)) {
@@ -3782,35 +3803,35 @@ useless:
BLI_linklist_prepend(&edgelist,eed);
numadded++;
first = eed;
- last = eed;
+ last = eed;
eed->f1 = SELECT;
- } else {
+ } else {
if(editedge_getSharedVert(eed, last)) {
BLI_linklist_append(&edgelist,eed);
eed->f1 = SELECT;
numadded++;
- last = eed;
+ last = eed;
} else if(editedge_getSharedVert(eed, first)) {
BLI_linklist_prepend(&edgelist,eed);
eed->f1 = SELECT;
numadded++;
- first = eed;
- }
+ first = eed;
+ }
}
- }
+ }
if(eed->next == NULL && numadded != numsel) {
- eed=em->edges.first;
+ eed=em->edges.first;
timesthrough++;
}
-
+
// It looks like there was an unexpected case - Hopefully should not happen
if(timesthrough >= numsel*2) {
- BLI_linklist_free(edgelist,NULL);
+ BLI_linklist_free(edgelist,NULL);
BKE_report(op->reports, RPT_ERROR, "Could not order loop");
- return 0;
+ return 0;
}
}
-
+
// Put the verts in order in a linklist
look = edgelist;
while(look) {
@@ -3821,33 +3842,33 @@ useless:
//This is the first entry takes care of extra vert
if(eed->v1 != temp->v1 && eed->v1 != temp->v2) {
- BLI_linklist_append(&vertlist,eed->v1);
- eed->v1->f1 = 1;
+ BLI_linklist_append(&vertlist,eed->v1);
+ eed->v1->f1 = 1;
} else {
- BLI_linklist_append(&vertlist,eed->v2);
- eed->v2->f1 = 1;
- }
+ BLI_linklist_append(&vertlist,eed->v2);
+ eed->v2->f1 = 1;
+ }
} else {
//This is the case that we only have 1 edge
- BLI_linklist_append(&vertlist,eed->v1);
- eed->v1->f1 = 1;
+ BLI_linklist_append(&vertlist,eed->v1);
+ eed->v1->f1 = 1;
}
- }
+ }
// for all the entries
if(eed->v1->f1 != 1) {
- BLI_linklist_append(&vertlist,eed->v1);
- eed->v1->f1 = 1;
+ BLI_linklist_append(&vertlist,eed->v1);
+ eed->v1->f1 = 1;
} else if(eed->v2->f1 != 1) {
- BLI_linklist_append(&vertlist,eed->v2);
- eed->v2->f1 = 1;
- }
- look = look->next;
- }
-
+ BLI_linklist_append(&vertlist,eed->v2);
+ eed->v2->f1 = 1;
+ }
+ look = look->next;
+ }
+
// populate the SlideVerts
-
- vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
- look = vertlist;
+
+ vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+ look = vertlist;
while(look) {
i=0;
j=0;
@@ -3863,14 +3884,14 @@ useless:
tempsv->origvert.no[2] = ev->no[2];
// i is total edges that vert is on
// j is total selected edges that vert is on
-
+
for(eed=em->edges.first;eed;eed=eed->next) {
if(eed->v1 == ev || eed->v2 == ev) {
- i++;
+ i++;
if(eed->f & SELECT) {
- j++;
+ j++;
}
- }
+ }
}
// If the vert is in the middle of an edge loop, it touches 2 selected edges and 2 unselected edges
if(i == 4 && j == 2) {
@@ -3880,11 +3901,11 @@ useless:
if(!tempsv->up) {
tempsv->up = eed;
} else if (!(tempsv->down)) {
- tempsv->down = eed;
+ tempsv->down = eed;
}
}
- }
- }
+ }
+ }
}
// If it is on the end of the loop, it touches 1 selected and as least 2 more unselected
if(i >= 3 && j == 1) {
@@ -3896,63 +3917,63 @@ useless:
if(!tempsv->up) {
tempsv->up = efa->e1;
} else if (!(tempsv->down)) {
- tempsv->down = efa->e1;
- }
+ tempsv->down = efa->e1;
+ }
}
if(editedge_containsVert(efa->e2, ev) && efa->e2 != eed) {
if(!tempsv->up) {
tempsv->up = efa->e2;
} else if (!(tempsv->down)) {
- tempsv->down = efa->e2;
- }
- }
+ tempsv->down = efa->e2;
+ }
+ }
if(editedge_containsVert(efa->e3, ev) && efa->e3 != eed) {
if(!tempsv->up) {
tempsv->up = efa->e3;
} else if (!(tempsv->down)) {
- tempsv->down = efa->e3;
- }
- }
+ tempsv->down = efa->e3;
+ }
+ }
if(efa->e4) {
if(editedge_containsVert(efa->e4, ev) && efa->e4 != eed) {
if(!tempsv->up) {
tempsv->up = efa->e4;
} else if (!(tempsv->down)) {
- tempsv->down = efa->e4;
- }
+ tempsv->down = efa->e4;
+ }
}
- }
-
+ }
+
}
}
- }
- }
- }
+ }
+ }
+ }
if(i > 4 && j == 2) {
BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN);
- BLI_linklist_free(vertlist,NULL);
- BLI_linklist_free(edgelist,NULL);
- return 0;
+ BLI_linklist_free(vertlist,NULL);
+ BLI_linklist_free(edgelist,NULL);
+ return 0;
}
BLI_ghash_insert(vertgh,ev,tempsv);
-
- look = look->next;
- }
-
+
+ look = look->next;
+ }
+
// make sure the UPs nad DOWNs are 'faceloops'
// Also find the nearest slidevert to the cursor
// XXX getmouseco_areawin(mval);
- look = vertlist;
+ look = vertlist;
nearest = NULL;
- vertdist = -1;
- while(look) {
+ vertdist = -1;
+ while(look) {
tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
-
+
if(!tempsv->up || !tempsv->down) {
BKE_report(op->reports, RPT_ERROR, "Missing rails");
BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN);
- BLI_linklist_free(vertlist,NULL);
- BLI_linklist_free(edgelist,NULL);
+ BLI_linklist_free(vertlist,NULL);
+ BLI_linklist_free(edgelist,NULL);
return 0;
}
@@ -3983,39 +4004,39 @@ useless:
EditEdge *swap;
swap = sv->up;
sv->up = sv->down;
- sv->down = swap;
+ sv->down = swap;
}
// view3d_project_float(curarea, tempsv->origvert.co, co, projectMat);
-
+
tempdist = sqrt(pow(co[0] - mval[0],2)+pow(co[1] - mval[1],2));
if(vertdist < 0) {
vertdist = tempdist;
- nearest = (EditVert*)look->link;
+ nearest = (EditVert*)look->link;
} else if ( tempdist < vertdist ) {
vertdist = tempdist;
- nearest = (EditVert*)look->link;
- }
+ nearest = (EditVert*)look->link;
+ }
}
- }
-
-
-
- look = look->next;
- }
-
-
+ }
+
+
+
+ look = look->next;
+ }
+
+
if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) {
int maxnum = 0;
uvarray = MEM_callocN( uvlay_tot * sizeof(GHash *), "SlideUVs Array");
suv_last = slideuvs = MEM_callocN( uvlay_tot * (numadded+1) * sizeof(SlideUv), "SlideUVs"); /* uvLayers * verts */
suv = NULL;
-
+
for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
-
- uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
-
+
+ uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+
for(ev=em->verts.first;ev;ev=ev->next) {
ev->tmp.l = 0;
}
@@ -4023,25 +4044,25 @@ useless:
while(look) {
float *uv_new;
tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
-
+
ev = look->link;
suv = NULL;
for(efa = em->faces.first;efa;efa=efa->next) {
if (ev->tmp.l != -1) { /* test for self, in this case its invalid */
int k=-1; /* face corner */
-
+
/* Is this vert in the faces corner? */
if (efa->v1==ev) k=0;
else if (efa->v2==ev) k=1;
else if (efa->v3==ev) k=2;
else if (efa->v4 && efa->v4==ev) k=3;
-
+
if (k != -1) {
MTFace *tf = CustomData_em_get_n(&em->fdata, efa->data, CD_MTFACE, uvlay_idx);
EditVert *ev_up, *ev_down;
-
+
uv_new = tf->uv[k];
-
+
if (ev->tmp.l) {
if (fabs(suv->origuv[0]-uv_new[0]) > 0.0001 || fabs(suv->origuv[1]-uv_new[1])) {
ev->tmp.l = -1; /* Tag as invalid */
@@ -4059,14 +4080,14 @@ useless:
suv->uv_up = suv->uv_down = NULL;
suv->origuv[0] = uv_new[0];
suv->origuv[1] = uv_new[1];
-
+
BLI_linklist_prepend(&suv->fuv_list, uv_new);
BLI_ghash_insert(uvarray[uvlay_idx],ev,suv);
-
+
suv_last++; /* advance to next slide UV */
maxnum++;
}
-
+
/* Now get the uvs along the up or down edge if we can */
if (suv) {
if (!suv->uv_up) {
@@ -4083,7 +4104,7 @@ useless:
else if (efa->v3==ev_down) suv->uv_down = tf->uv[2];
else if (efa->v4 && efa->v4==ev_down) suv->uv_down = tf->uv[3];
}
-
+
/* Copy the pointers to the face UV's */
BLI_linklist_prepend(&suv->fuv_list, uv_new);
}
@@ -4094,32 +4115,32 @@ useless:
}
} /* end uv layer loop */
} /* end uvlay_tot */
-
-
-
+
+
+
// we should have enough info now to slide
- len = 0.0f;
-
+ len = 0.0f;
+
percp = -1;
while(draw) {
- /* For the % calculation */
- short mval[2];
+ /* For the % calculation */
+ short mval[2];
float rc[2];
float v2[2], v3[2];
EditVert *centerVert, *upVert, *downVert;
-
-// XXX getmouseco_areawin(mval);
-
+
+// XXX getmouseco_areawin(mval);
+
if (!immediate && (mval[0] == mvalo[0] && mval[1] == mvalo[1])) {
PIL_sleep_ms(10);
} else {
char *p = str;
int ctrl= 0, shift= 0; // XXX
-
+
mvalo[0] = mval[0];
mvalo[1] = mval[1];
-
+
tempsv = BLI_ghash_lookup(vertgh,nearest);
@@ -4130,31 +4151,31 @@ useless:
// view3d_project_float(curarea, upVert->co, v2, projectMat);
// view3d_project_float(curarea, downVert->co, v3, projectMat);
- /* Determine the % on which the loop should be cut */
+ /* Determine the % on which the loop should be cut */
- rc[0]= v3[0]-v2[0];
- rc[1]= v3[1]-v2[1];
+ rc[0]= v3[0]-v2[0];
+ rc[1]= v3[1]-v2[1];
len= rc[0]*rc[0]+ rc[1]*rc[1];
if (len==0) {len = 0.0001;}
if (shift) {
wasshift = 0;
- labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len;
+ labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len;
}
else {
if (wasshift==0) {
wasshift = 1;
shiftlabda = labda;
- }
- labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len / 10.0 + shiftlabda;
+ }
+ labda= ( rc[0]*((mval[0]-v2[0])) + rc[1]*((mval[1]-v2[1])) )/len / 10.0 + shiftlabda;
}
-
- if(labda<=0.0) labda=0.0;
- else if(labda>=1.0)labda=1.0;
- perc=((1-labda)*2)-1;
-
+ if(labda<=0.0) labda=0.0;
+ else if(labda>=1.0)labda=1.0;
+
+ perc=((1-labda)*2)-1;
+
if(shift == 0 && ctrl==0) {
perc *= 100;
perc = floor(perc);
@@ -4162,20 +4183,20 @@ useless:
} else if (ctrl) {
perc *= 10;
perc = floor(perc);
- perc /= 10;
- }
-
+ perc /= 10;
+ }
+
if(prop == 0) {
len = VecLenf(upVert->co,downVert->co)*((perc+1)/2);
if(flip == 1) {
len = VecLenf(upVert->co,downVert->co) - len;
- }
+ }
}
-
+
if (0) // XXX hasNumInput(&num))
{
// XXX applyNumInput(&num, &perc);
-
+
if (prop)
{
perc = MIN2(perc, 1);
@@ -4190,19 +4211,19 @@ useless:
//Adjust Edgeloop
if(immediate) {
- perc = imperc;
+ perc = imperc;
}
percp = perc;
if(prop) {
- look = vertlist;
- while(look) {
+ look = vertlist;
+ while(look) {
EditVert *tempev;
ev = look->link;
tempsv = BLI_ghash_lookup(vertgh,ev);
-
+
tempev = editedge_getOtherVert((perc>=0)?tempsv->up:tempsv->down, ev);
VecLerpf(ev->co, tempsv->origvert.co, tempev->co, fabs(perc));
-
+
if (0) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
@@ -4216,14 +4237,14 @@ useless:
}
}
}
-
- look = look->next;
+
+ look = look->next;
}
}
else {
- //Non prop code
- look = vertlist;
- while(look) {
+ //Non prop code
+ look = vertlist;
+ while(look) {
float newlen;
ev = look->link;
tempsv = BLI_ghash_lookup(vertgh,ev);
@@ -4231,7 +4252,7 @@ useless:
if(newlen > 1.0) {newlen = 1.0;}
if(newlen < 0.0) {newlen = 0.0;}
if(flip == 0) {
- VecLerpf(ev->co, editedge_getOtherVert(tempsv->down,ev)->co, editedge_getOtherVert(tempsv->up,ev)->co, fabs(newlen));
+ VecLerpf(ev->co, editedge_getOtherVert(tempsv->down,ev)->co, editedge_getOtherVert(tempsv->up,ev)->co, fabs(newlen));
if (0) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
/* dont do anything if no UVs */
for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
@@ -4247,8 +4268,8 @@ useless:
}
}
} else{
- VecLerpf(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen));
-
+ VecLerpf(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen));
+
if (0) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
/* dont do anything if no UVs */
for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
@@ -4264,23 +4285,23 @@ useless:
}
}
}
- look = look->next;
+ look = look->next;
}
}
-
+
// Highlight the Control Edges
-// scrarea_do_windraw(curarea);
-// persp(PERSP_VIEW);
-// glPushMatrix();
+// scrarea_do_windraw(curarea);
+// persp(PERSP_VIEW);
+// glPushMatrix();
// mymultmatrix(obedit->obmat);
- glColor3ub(0, 255, 0);
+ glColor3ub(0, 255, 0);
glBegin(GL_LINES);
glVertex3fv(upVert->co);
glVertex3fv(downVert->co);
- glEnd();
-
+ glEnd();
+
if(prop == 0) {
// draw start edge for non-prop
glPointSize(5);
@@ -4289,24 +4310,24 @@ useless:
if(flip) {
glVertex3fv(upVert->co);
} else {
- glVertex3fv(downVert->co);
+ glVertex3fv(downVert->co);
}
- glEnd();
+ glEnd();
}
-
-
- glPopMatrix();
+
+
+ glPopMatrix();
if(prop) {
p += sprintf(str, "(P)ercentage: ");
} else {
p += sprintf(str, "Non (P)rop Length: ");
}
-
+
if (0) // XXX hasNumInput(&num))
{
char num_str[20];
-
+
// XX outputNumInput(&num, num_str);
p += sprintf(p, "%s", num_str);
}
@@ -4321,20 +4342,20 @@ useless:
p += sprintf(p, "%f", len);
}
}
-
-
+
+
if (prop == 0) {
p += sprintf(p, ", Press (F) to flip control side");
}
// headerprint(str);
-// screen_swapbuffers();
+// screen_swapbuffers();
}
if(!immediate) {
while(qtest()) {
- short val=0;
- event= extern_qread(&val); // extern_qread stores important events for the mainloop to handle
-
+ short val=0;
+ event= extern_qread(&val); // extern_qread stores important events for the mainloop to handle
+
/* val==0 on key-release event */
if (val) {
if(ELEM(event, ESCKEY, RIGHTMOUSE)) {
@@ -4346,7 +4367,7 @@ useless:
} else if(ELEM3(event, PADENTER, LEFTMOUSE, RETKEY)) {
draw = 0; // End looping now
} else if(event==MIDDLEMOUSE) {
- perc = 0;
+ perc = 0;
immediate = 1;
} else if(event==PKEY) {
// XXX initNumInput(&num); /* reset num input */
@@ -4357,61 +4378,61 @@ useless:
else {
prop = 1;
}
- mvalo[0] = -1;
+ mvalo[0] = -1;
} else if(event==FKEY) {
- (flip == 1) ? (flip = 0):(flip = 1);
- mvalo[0] = -1;
+ (flip == 1) ? (flip = 0):(flip = 1);
+ mvalo[0] = -1;
} else if(ELEM(event, RIGHTARROWKEY, WHEELUPMOUSE)) { // Scroll through Control Edges
- look = vertlist;
- while(look) {
+ look = vertlist;
+ while(look) {
if(nearest == (EditVert*)look->link) {
if(look->next == NULL) {
- nearest = (EditVert*)vertlist->link;
+ nearest = (EditVert*)vertlist->link;
} else {
nearest = (EditVert*)look->next->link;
- }
+ }
mvalo[0] = -1;
- break;
+ break;
}
- look = look->next;
- }
+ look = look->next;
+ }
} else if(ELEM(event, LEFTARROWKEY, WHEELDOWNMOUSE)) { // Scroll through Control Edges
- look = vertlist;
- while(look) {
+ look = vertlist;
+ while(look) {
if(look->next) {
if(look->next->link == nearest) {
nearest = (EditVert*)look->link;
mvalo[0] = -1;
break;
- }
+ }
} else {
if((EditVert*)vertlist->link == nearest) {
nearest = look->link;
mvalo[0] = -1;
- break;
- }
- }
- look = look->next;
- }
+ break;
+ }
+ }
+ look = look->next;
+ }
}
-
+
// XXX if (handleNumInput(&num, event))
{
mvalo[0] = -1; /* NEED A BETTER WAY TO TRIGGER REDRAW */
}
}
-
- }
+
+ }
} else {
draw = 0;
}
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
-
-
+
+
if(me->drawflag & ME_DRAW_EDGELEN) {
look = vertlist;
- while(look) {
+ while(look) {
tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
if(tempsv != NULL) {
tempsv->up->f &= !SELECT;
@@ -4420,26 +4441,26 @@ useless:
look = look->next;
}
}
-
+
// force_draw(0);
-
+
if(!immediate)
EM_automerge(0);
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-// scrarea_queue_winredraw(curarea);
-
- //BLI_ghash_free(edgesgh, freeGHash, NULL);
+// scrarea_queue_winredraw(curarea);
+
+ //BLI_ghash_free(edgesgh, freeGHash, NULL);
BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN);
- BLI_linklist_free(vertlist,NULL);
- BLI_linklist_free(edgelist,NULL);
-
+ BLI_linklist_free(vertlist,NULL);
+ BLI_linklist_free(edgelist,NULL);
+
if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) {
for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
BLI_ghash_free(uvarray[uvlay_idx], NULL, NULL);
}
MEM_freeN(uvarray);
MEM_freeN(slideuvs);
-
+
suv = suv_last-1;
while (suv >= slideuvs) {
if (suv->fuv_list) {
@@ -4457,21 +4478,21 @@ useless:
#endif // END OF XXX
}
-int EdgeLoopDelete(EditMesh *em, wmOperator *op)
+int EdgeLoopDelete(EditMesh *em, wmOperator *op)
{
-
+
/* temporal flag setting so we keep UVs when deleting edge loops,
* this is a bit of a hack but it works how you would want in almost all cases */
- // short uvcalc_flag_orig = 0; // XXX scene->toolsettings->uvcalc_flag;
+ // short uvcalc_flag_orig = 0; // XXX scene->toolsettings->uvcalc_flag;
// scene->toolsettings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;
-
+
if(!EdgeSlide(em, op, 1, 1)) {
return 0;
}
-
+
/* restore uvcalc flag */
// scene->toolsettings->uvcalc_flag = uvcalc_flag_orig;
-
+
EM_select_more(em);
removedoublesflag(em, 1,0, 0.001);
EM_select_flush(em);
@@ -4486,20 +4507,19 @@ void mesh_set_face_flags(EditMesh *em, short mode)
{
EditFace *efa;
MTFace *tface;
- short m_tex=0, m_tiles=0, m_shared=0,
+ short m_tex=0, m_shared=0,
m_light=0, m_invis=0, m_collision=0,
m_twoside=0, m_obcolor=0, m_halo=0,
m_billboard=0, m_shadow=0, m_text=0,
m_sort=0;
short flag = 0, change = 0;
-
+
// XXX if (!EM_texFaceCheck()) {
// error("not a mesh with uv/image layers");
// return;
// }
-
+
add_numbut(0, TOG|SHO, "Texture", 0, 0, &m_tex, NULL);
- add_numbut(1, TOG|SHO, "Tiles", 0, 0, &m_tiles, NULL);
add_numbut(2, TOG|SHO, "Light", 0, 0, &m_light, NULL);
add_numbut(3, TOG|SHO, "Invisible", 0, 0, &m_invis, NULL);
add_numbut(4, TOG|SHO, "Collision", 0, 0, &m_collision, NULL);
@@ -4511,17 +4531,16 @@ void mesh_set_face_flags(EditMesh *em, short mode)
add_numbut(10, TOG|SHO, "Shadow", 0, 0, &m_shadow, NULL);
add_numbut(11, TOG|SHO, "Text", 0, 0, &m_text, NULL);
add_numbut(12, TOG|SHO, "Sort", 0, 0, &m_sort, NULL);
-
+
if (!do_clever_numbuts((mode ? "Set Flags" : "Clear Flags"), 13, REDRAW))
return;
-
+
/* these 2 cant both be on */
if (mode) /* are we seeting*/
if (m_halo)
m_billboard = 0;
-
+
if (m_tex) flag |= TF_TEX;
- if (m_tiles) flag |= TF_TILES;
if (m_shared) flag |= TF_SHAREDCOL;
if (m_light) flag |= TF_LIGHT;
if (m_invis) flag |= TF_INVISIBLE;
@@ -4533,10 +4552,10 @@ void mesh_set_face_flags(EditMesh *em, short mode)
if (m_shadow) flag |= TF_SHADOW;
if (m_text) flag |= TF_BMFONT;
if (m_sort) flag |= TF_ALPHASORT;
-
+
if (flag==0)
return;
-
+
efa= em->faces.first;
while(efa) {
if(efa->f & SELECT) {
@@ -4547,41 +4566,22 @@ void mesh_set_face_flags(EditMesh *em, short mode)
}
efa= efa->next;
}
-
-}
-#endif
-
-void mesh_set_smooth_faces(EditMesh *em, short event)
-{
- EditFace *efa;
- if(em==NULL) return;
-
- efa= em->faces.first;
- while(efa) {
- if(efa->f & SELECT) {
- if(event==1) efa->flag |= ME_SMOOTH;
- else if(event==0) efa->flag &= ~ME_SMOOTH;
- }
- efa= efa->next;
- }
-
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-
}
+#endif
-/* ********************** mesh rip ********************** */
+/********************** Rip Operator *************************/
/* helper to find edge for edge_rip */
static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, short *mval)
{
float vec1[3], vec2[3], mvalf[2];
-
+
view3d_project_float(ar, co1, vec1, mat);
view3d_project_float(ar, co2, vec2, mat);
mvalf[0]= (float)mval[0];
mvalf[1]= (float)mval[1];
-
+
return PdistVL2Dfl(mvalf, vec1, vec2);
}
@@ -4593,22 +4593,23 @@ static void mesh_rip_setface(EditMesh *em, EditFace *sefa)
if(sefa->v2->tmp.v) sefa->v2= sefa->v2->tmp.v;
if(sefa->v3->tmp.v) sefa->v3= sefa->v3->tmp.v;
if(sefa->v4 && sefa->v4->tmp.v) sefa->v4= sefa->v4->tmp.v;
-
+
sefa->e1= addedgelist(em, sefa->v1, sefa->v2, sefa->e1);
sefa->e2= addedgelist(em, sefa->v2, sefa->v3, sefa->e2);
if(sefa->v4) {
sefa->e3= addedgelist(em, sefa->v3, sefa->v4, sefa->e3);
sefa->e4= addedgelist(em, sefa->v4, sefa->v1, sefa->e4);
}
- else
+ else
sefa->e3= addedgelist(em, sefa->v3, sefa->v1, sefa->e3);
-
+
}
/* based on mouse cursor position, it defines how is being ripped */
static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
#if 0 //BMESH_TODO
+ Scene *scene= CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
RegionView3D *rv3d= ar->regiondata;
Object *obedit= CTX_data_edit_object(C);
@@ -4617,32 +4618,26 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
EditEdge *eed, *seed= NULL;
EditFace *efa, *sefa= NULL;
float projectMat[4][4], vec[3], dist, mindist;
- short doit= 1, *mval= event->mval; // XXX ,propmode,prop;
-
-
-// XXX propmode = scene->prop_mode;
-// scene->prop_mode = 0;
-// prop = scene->proportional;
-// scene->proportional = 0;
-
+ short doit= 1, *mval= event->mval;
+
/* select flush... vertices are important */
EM_selectmode_set(em);
-
+
view3d_get_object_project_mat(rv3d, obedit, projectMat);
/* find best face, exclude triangles and break on face select or faces with 2 edges select */
mindist= 1000000.0f;
for(efa= em->faces.first; efa; efa=efa->next) {
- if( efa->f & 1)
+ if( efa->f & 1)
break;
if(efa->v4 && faceselectedOR(efa, SELECT) ) {
int totsel=0;
-
+
if(efa->e1->f & SELECT) totsel++;
if(efa->e2->f & SELECT) totsel++;
if(efa->e3->f & SELECT) totsel++;
if(efa->e4->f & SELECT) totsel++;
-
+
if(totsel>1)
break;
view3d_project_float(ar, efa->cent, vec, projectMat);
@@ -4653,7 +4648,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
}
-
+
if(efa) {
BKE_report(op->reports, RPT_ERROR, "Can't perform ripping with faces selected this way");
BKE_mesh_end_editmesh(obedit->data, em);
@@ -4664,7 +4659,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
+
/* duplicate vertices, new vertices get selected */
for(eve = em->verts.last; eve; eve= eve->prev) {
@@ -4675,20 +4670,20 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
eve->tmp.v->f |= SELECT;
}
}
-
+
/* find the best candidate edge */
/* or one of sefa edges is selected... */
if(sefa->e1->f & SELECT) seed= sefa->e2;
if(sefa->e2->f & SELECT) seed= sefa->e1;
if(sefa->e3->f & SELECT) seed= sefa->e2;
if(sefa->e4 && sefa->e4->f & SELECT) seed= sefa->e3;
-
+
/* or we do the distance trick */
if(seed==NULL) {
mindist= 1000000.0f;
if(sefa->e1->v1->tmp.v || sefa->e1->v2->tmp.v) {
- dist = mesh_rip_edgedist(ar, projectMat,
- sefa->e1->v1->co,
+ dist = mesh_rip_edgedist(ar, projectMat,
+ sefa->e1->v1->co,
sefa->e1->v2->co, mval);
if(dist<mindist) {
seed= sefa->e1;
@@ -4697,7 +4692,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
if(sefa->e2->v1->tmp.v || sefa->e2->v2->tmp.v) {
dist = mesh_rip_edgedist(ar, projectMat,
- sefa->e2->v1->co,
+ sefa->e2->v1->co,
sefa->e2->v2->co, mval);
if(dist<mindist) {
seed= sefa->e2;
@@ -4705,8 +4700,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
if(sefa->e3->v1->tmp.v || sefa->e3->v2->tmp.v) {
- dist= mesh_rip_edgedist(ar, projectMat,
- sefa->e3->v1->co,
+ dist= mesh_rip_edgedist(ar, projectMat,
+ sefa->e3->v1->co,
sefa->e3->v2->co, mval);
if(dist<mindist) {
seed= sefa->e3;
@@ -4714,8 +4709,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
if(sefa->e4 && (sefa->e4->v1->tmp.v || sefa->e4->v2->tmp.v)) {
- dist= mesh_rip_edgedist(ar, projectMat,
- sefa->e4->v1->co,
+ dist= mesh_rip_edgedist(ar, projectMat,
+ sefa->e4->v1->co,
sefa->e4->v2->co, mval);
if(dist<mindist) {
seed= sefa->e4;
@@ -4723,13 +4718,13 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
}
-
+
if(seed==NULL) { // never happens?
BKE_report(op->reports, RPT_ERROR, "No proper edge found to start");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
+
faceloop_select(em, seed, 2); // tmp abuse for finding all edges that need duplicated, returns OK faces with f1
/* duplicate edges in the loop, with at least 1 vertex selected, needed for selection flip */
@@ -4737,8 +4732,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
eed->tmp.v = NULL;
if((eed->v1->tmp.v) || (eed->v2->tmp.v)) {
EditEdge *newed;
-
- newed= addedgelist(em, eed->v1->tmp.v?eed->v1->tmp.v:eed->v1,
+
+ newed= addedgelist(em, eed->v1->tmp.v?eed->v1->tmp.v:eed->v1,
eed->v2->tmp.v?eed->v2->tmp.v:eed->v2, eed);
if(eed->f & SELECT) {
EM_select_edge(eed, 0);
@@ -4754,16 +4749,16 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* put new vertices & edges && flag in best face */
mesh_rip_setface(em, sefa);
-
+
/* starting with neighbours of best face, we loop over the seam */
sefa->f1= 2;
doit= 1;
while(doit) {
doit= 0;
-
+
for(efa= em->faces.first; efa; efa=efa->next) {
/* new vert in face */
- if (efa->v1->tmp.v || efa->v2->tmp.v ||
+ if (efa->v1->tmp.v || efa->v2->tmp.v ||
efa->v3->tmp.v || (efa->v4 && efa->v4->tmp.v)) {
/* face is tagged with loop */
if(efa->f1==1) {
@@ -4772,9 +4767,9 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
doit= 1;
}
}
- }
+ }
}
-
+
/* remove loose edges, that were part of a ripped face */
for(eve = em->verts.first; eve; eve= eve->next) eve->f1= 0;
for(eed = em->edges.last; eed; eed= eed->prev) eed->f1= 0;
@@ -4784,11 +4779,11 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
efa->e3->f1= 1;
if(efa->e4) efa->e4->f1= 1;
}
-
+
for(eed = em->edges.last; eed; eed= seed) {
seed= eed->prev;
if(eed->f1==0) {
- if(eed->v1->tmp.v || eed->v2->tmp.v ||
+ if(eed->v1->tmp.v || eed->v2->tmp.v ||
(eed->v1->f & SELECT) || (eed->v2->f & SELECT)) {
remedge(em, eed);
free_editedge(em, eed);
@@ -4800,7 +4795,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
eed->v2->f1= 1;
}
}
-
+
/* and remove loose selected vertices, that got duplicated accidentally */
for(eve = em->verts.first; eve; eve= nextve) {
nextve= eve->next;
@@ -4809,15 +4804,17 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
free_editvert(em, eve);
}
}
-
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
-// scene->prop_mode = propmode;
-// XXX scene->proportional = prop;
+ 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);
+
+ RNA_enum_set(op->ptr, "proportional", 0);
+ RNA_boolean_set(op->ptr, "mirror", 0);
+ WM_operator_name_call(C, "TFM_OT_translation", WM_OP_INVOKE_REGION_WIN, op->ptr);
#endif
+
return OPERATOR_FINISHED;
}
@@ -4826,20 +4823,21 @@ void MESH_OT_rip(wmOperatorType *ot)
/* identifiers */
ot->name= "Rip";
ot->idname= "MESH_OT_rip";
-
+
/* api callbacks */
ot->invoke= mesh_rip_invoke;
- ot->poll= ED_operator_editmesh; // XXX + v3d!
-
+ ot->poll= EM_view3d_poll;
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/* to give to transform */
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+ Properties_Proportional(ot);
+ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
-/* ************************************** */
+/************************ Shape Operators *************************/
void shape_propagate(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
{
@@ -4848,39 +4846,39 @@ void shape_propagate(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
Key* ky = NULL;
KeyBlock* kb = NULL;
Base* base=NULL;
-
-
+
+
if(me->key){
ky = me->key;
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Key");
+ BKE_report(op->reports, RPT_ERROR, "Object Has No Key");
return;
- }
+ }
if(ky->block.first){
for(ev = em->verts.first; ev ; ev = ev->next){
if(ev->f & SELECT){
for(kb=ky->block.first;kb;kb = kb->next){
- float *data;
- data = kb->data;
- VECCOPY(data+(ev->keyindex*3),ev->co);
+ float *data;
+ data = kb->data;
+ VECCOPY(data+(ev->keyindex*3),ev->co);
}
- }
- }
+ }
+ }
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes");
- return;
+ BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes");
+ return;
}
-
+
//TAG Mesh Objects that share this data
for(base = scene->base.first; base; base = base->next){
if(base->object && base->object->data == me){
base->object->recalc = OB_RECALC_DATA;
}
- }
+ }
DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- return;
+ return;
}
void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock)
@@ -4891,10 +4889,10 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock
float perc = 0;
char str[64];
float *data, *odata;
-
+
data = fromBlock->data;
odata = thisBlock->data;
-
+
// XXX getmouseco_areawin(mval);
curval[0] = mval[0] + 1; curval[1] = mval[1] + 1;
@@ -4903,55 +4901,55 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock
// XXX getmouseco_areawin(mval);
if (mval[0] != curval[0] || mval[1] != curval[1])
{
-
+
if(mval[0] > curval[0])
perc += 0.1;
else if(mval[0] < curval[0])
perc -= 0.1;
-
+
if(perc < 0) perc = 0;
if(perc > 1) perc = 1;
-
+
curval[0] = mval[0];
curval[1] = mval[1];
if(fullcopy == 1){
- perc = 1;
+ perc = 1;
}
for(ev = em->verts.first; ev ; ev = ev->next){
if(ev->f & SELECT){
VecLerpf(ev->co,odata+(ev->keyindex*3),data+(ev->keyindex*3),perc);
- }
- }
+ }
+ }
sprintf(str,"Blending at %d%c MMB to Copy at 100%c",(int)(perc*100),'%','%');
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
// headerprint(str);
-// force_draw(0);
+// force_draw(0);
if(fullcopy == 1){
- break;
+ break;
}
} else {
- PIL_sleep_ms(10);
+ PIL_sleep_ms(10);
}
while(qtest()) {
- short val=0;
- event= extern_qread(&val);
+ short val=0;
+ event= extern_qread(&val);
if(val){
if(ELEM3(event, PADENTER, LEFTMOUSE, RETKEY)){
finished = 1;
}
else if (event == MIDDLEMOUSE){
- fullcopy = 1;
+ fullcopy = 1;
}
else if (ELEM3(event,ESCKEY,RIGHTMOUSE,RIGHTMOUSE)){
canceled = 1;
finished = 1;
}
- }
+ }
}
}
if(!canceled);
@@ -4959,7 +4957,7 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock
for(ev = em->verts.first; ev ; ev = ev->next){
if(ev->f & SELECT){
VECCOPY(ev->co, odata+(ev->keyindex*3));
- }
+ }
}
return;
#endif
@@ -4972,66 +4970,68 @@ void shape_copy_select_from(Object *obedit, EditMesh *em, wmOperator *op)
Mesh* me = (Mesh*)obedit->data;
EditVert *ev = NULL;
int totverts = 0,curshape = obedit->shapenr;
-
+
Key* ky = NULL;
KeyBlock *kb = NULL,*thisBlock = NULL;
int maxlen=32, nr=0, a=0;
char *menu;
-
+
if(me->key){
ky = me->key;
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Key");
+ BKE_report(op->reports, RPT_ERROR, "Object Has No Key");
return;
}
-
+
if(ky->block.first){
for(kb=ky->block.first;kb;kb = kb->next){
maxlen += 40; // Size of a block name
if(a == curshape-1){
- thisBlock = kb;
+ thisBlock = kb;
}
-
+
a++;
}
a=0;
menu = MEM_callocN(maxlen, "Copy Shape Menu Text");
strcpy(menu, "Copy Vert Positions from Shape %t|");
for(kb=ky->block.first;kb;kb = kb->next){
- if(a != curshape-1){
+ if(a != curshape-1){
sprintf(menu,"%s %s %cx%d|",menu,kb->name,'%',a);
}
a++;
}
// XXX nr = pupmenu_col(menu, 20);
- MEM_freeN(menu);
+ MEM_freeN(menu);
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes");
- return;
+ BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes");
+ return;
}
-
+
a = 0;
-
+
for(kb=ky->block.first;kb;kb = kb->next){
if(a == nr){
-
+
for(ev = em->verts.first;ev;ev = ev->next){
totverts++;
}
-
+
if(me->totvert != totverts){
BKE_report(op->reports, RPT_ERROR, "Shape Has had Verts Added/Removed, please cycle editmode before copying");
- return;
+ return;
}
- shape_copy_from_lerp(em, thisBlock,kb);
-
+ shape_copy_from_lerp(em, thisBlock,kb);
+
return;
}
a++;
- }
+ }
return;
}
+/************************ Merge Operator *************************/
+
/* Collection Routines|Currently used by the improved merge code*/
/* buildEdge_collection() creates a list of lists*/
/* these lists are filled with edges that are topologically connected.*/
@@ -5055,17 +5055,17 @@ static void build_edgecollection(EditMesh *em, ListBase *allcollections)
EditEdge *eed;
Collection *edgecollection, *newcollection;
CollectedEdge *newedge;
-
+
int currtag = 1;
short ebalanced = 0;
short collectionfound = 0;
-
- for (eed=em->edges.first; eed; eed = eed->next){
+
+ for (eed=em->edges.first; eed; eed = eed->next){
eed->tmp.l = 0;
eed->v1->tmp.l = 0;
eed->v2->tmp.l = 0;
}
-
+
/*1st pass*/
for(eed=em->edges.first; eed; eed=eed->next){
if(eed->f&SELECT){
@@ -5074,26 +5074,26 @@ static void build_edgecollection(EditMesh *em, ListBase *allcollections)
currtag +=1;
}
}
-
+
/*2nd pass - Brute force. Loop through selected faces until there are no 'unbalanced' edges left (those with both vertices 'tmp.l' tag matching */
while(ebalanced == 0){
ebalanced = 1;
for(eed=em->edges.first; eed; eed = eed->next){
if(eed->f&SELECT){
if(eed->v1->tmp.l != eed->v2->tmp.l) /*unbalanced*/{
- if(eed->v1->tmp.l > eed->v2->tmp.l && eed->v2->tmp.l !=0) eed->v1->tmp.l = eed->v2->tmp.l;
- else if(eed->v1 != 0) eed->v2->tmp.l = eed->v1->tmp.l;
+ if(eed->v1->tmp.l > eed->v2->tmp.l && eed->v2->tmp.l !=0) eed->v1->tmp.l = eed->v2->tmp.l;
+ else if(eed->v1 != 0) eed->v2->tmp.l = eed->v1->tmp.l;
ebalanced = 0;
}
}
}
}
-
+
/*3rd pass, set all the edge flags (unnessecary?)*/
for(eed=em->edges.first; eed; eed = eed->next){
if(eed->f&SELECT) eed->tmp.l = eed->v1->tmp.l;
}
-
+
for(eed=em->edges.first; eed; eed=eed->next){
if(eed->f&SELECT){
if(allcollections->first){
@@ -5113,28 +5113,28 @@ static void build_edgecollection(EditMesh *em, ListBase *allcollections)
newcollection->index = eed->tmp.l;
newcollection->collectionbase.first = 0;
newcollection->collectionbase.last = 0;
-
+
newedge = MEM_mallocN(sizeof(CollectedEdge), "collected edge");
newedge->eed = eed;
-
+
BLI_addtail(&(newcollection->collectionbase), newedge);
BLI_addtail(allcollections, newcollection);
}
}
-
+
}
}
static void freecollections(ListBase *allcollections)
{
struct Collection *curcollection;
-
+
for(curcollection = allcollections->first; curcollection; curcollection = curcollection->next)
BLI_freelistN(&(curcollection->collectionbase));
BLI_freelistN(allcollections);
}
-/*Begin UV Edge Collapse Code
+/*Begin UV Edge Collapse Code
Like Edge subdivide, Edge Collapse should handle UV's intelligently, but since UV's are a per-face attribute, normal edge collapse will fail
in areas such as the boundries of 'UV islands'. So for each edge collection we need to build a set of 'welded' UV vertices and edges for it.
The welded UV edges can then be sorted and collapsed.
@@ -5164,7 +5164,7 @@ typedef struct wUVEdge{
typedef struct wUVEdgeCollect{ /*used for grouping*/
struct wUVEdgeCollect *next, *prev;
wUVEdge *uved;
- int id;
+ int id;
} wUVEdgeCollect;
static void append_weldedUV(EditMesh *em, EditFace *efa, EditVert *eve, int tfindex, ListBase *uvverts)
@@ -5173,9 +5173,9 @@ static void append_weldedUV(EditMesh *em, EditFace *efa, EditVert *eve, int tfin
wUVNode *newnode;
int found;
MTFace *tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
-
+
found = 0;
-
+
for(curwvert=uvverts->first; curwvert; curwvert=curwvert->next){
if(curwvert->eve == eve && curwvert->u == tf->uv[tfindex][0] && curwvert->v == tf->uv[tfindex][1]){
newnode = MEM_callocN(sizeof(wUVNode), "Welded UV Vert Node");
@@ -5186,20 +5186,20 @@ static void append_weldedUV(EditMesh *em, EditFace *efa, EditVert *eve, int tfin
break;
}
}
-
+
if(!found){
newnode = MEM_callocN(sizeof(wUVNode), "Welded UV Vert Node");
newnode->u = &(tf->uv[tfindex][0]);
newnode->v = &(tf->uv[tfindex][1]);
-
+
newwvert = MEM_callocN(sizeof(wUV), "Welded UV Vert");
newwvert->u = *(newnode->u);
newwvert->v = *(newnode->v);
newwvert->eve = eve;
-
+
BLI_addtail(&(newwvert->nodes), newnode);
BLI_addtail(uvverts, newwvert);
-
+
}
}
@@ -5219,14 +5219,14 @@ static void append_weldedUVEdge(EditMesh *em, EditFace *efa, EditEdge *eed, List
wUVEdge *curwedge, *newwedge;
int v1tfindex, v2tfindex, found;
MTFace *tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
-
+
found = 0;
-
+
if(eed->v1 == efa->v1) v1tfindex = 0;
else if(eed->v1 == efa->v2) v1tfindex = 1;
else if(eed->v1 == efa->v3) v1tfindex = 2;
else /* if(eed->v1 == efa->v4) */ v1tfindex = 3;
-
+
if(eed->v2 == efa->v1) v2tfindex = 0;
else if(eed->v2 == efa->v2) v2tfindex = 1;
else if(eed->v2 == efa->v3) v2tfindex = 2;
@@ -5238,7 +5238,7 @@ static void append_weldedUVEdge(EditMesh *em, EditFace *efa, EditEdge *eed, List
break; //do nothing, we don't need another welded uv edge
}
}
-
+
if(!found){
newwedge = MEM_callocN(sizeof(wUVEdge), "Welded UV Edge");
newwedge->v1uv[0] = tf->uv[v1tfindex][0];
@@ -5246,7 +5246,7 @@ static void append_weldedUVEdge(EditMesh *em, EditFace *efa, EditEdge *eed, List
newwedge->v2uv[0] = tf->uv[v2tfindex][0];
newwedge->v2uv[1] = tf->uv[v2tfindex][1];
newwedge->eed = eed;
-
+
BLI_addtail(uvedges, newwedge);
}
}
@@ -5256,15 +5256,15 @@ static void build_weldedUVEdges(EditMesh *em, ListBase *uvedges, ListBase *uvver
wUV *curwvert;
wUVEdge *curwedge;
EditFace *efa;
-
+
for(efa=em->faces.first; efa; efa=efa->next){
if(efa->e1->f1) append_weldedUVEdge(em, efa, efa->e1, uvedges);
if(efa->e2->f1) append_weldedUVEdge(em, efa, efa->e2, uvedges);
if(efa->e3->f1) append_weldedUVEdge(em, efa, efa->e3, uvedges);
if(efa->e4 && efa->e4->f1) append_weldedUVEdge(em, efa, efa->e4, uvedges);
}
-
-
+
+
//link vertices: for each uvedge, search uvverts to populate v1 and v2 pointers
for(curwedge=uvedges->first; curwedge; curwedge=curwedge->next){
for(curwvert=uvverts->first; curwvert; curwvert=curwvert->next){
@@ -5301,20 +5301,20 @@ static void collapse_edgeuvs(EditMesh *em)
if (!EM_texFaceCheck(em))
return;
-
+
uvverts.first = uvverts.last = uvedges.first = uvedges.last = allcollections.first = allcollections.last = NULL;
-
+
build_weldedUVs(em, &uvverts);
build_weldedUVEdges(em, &uvedges, &uvverts);
-
+
curtag = 0;
-
+
for(curwedge=uvedges.first; curwedge; curwedge=curwedge->next){
curwedge->v1->f = curtag;
curwedge->v2->f = curtag;
curtag +=1;
}
-
+
balanced = 0;
while(!balanced){
balanced = 1;
@@ -5326,10 +5326,10 @@ static void collapse_edgeuvs(EditMesh *em)
}
}
}
-
+
for(curwedge=uvedges.first; curwedge; curwedge=curwedge->next) curwedge->f = curwedge->v1->f;
-
-
+
+
for(curwedge=uvedges.first; curwedge; curwedge=curwedge->next){
if(allcollections.first){
for(wuvecollection = allcollections.first; wuvecollection; wuvecollection=wuvecollection->next){
@@ -5340,7 +5340,7 @@ static void collapse_edgeuvs(EditMesh *em)
collectionfound = 1;
break;
}
-
+
else collectionfound = 0;
}
}
@@ -5349,32 +5349,32 @@ static void collapse_edgeuvs(EditMesh *em)
newcollection->index = curwedge->f;
newcollection->collectionbase.first = 0;
newcollection->collectionbase.last = 0;
-
+
newcollectedwuve = MEM_callocN(sizeof(wUVEdgeCollect), "Collected Welded UV Edge");
newcollectedwuve->uved = curwedge;
-
+
BLI_addtail(&(newcollection->collectionbase), newcollectedwuve);
BLI_addtail(&allcollections, newcollection);
}
}
-
+
for(wuvecollection=allcollections.first; wuvecollection; wuvecollection=wuvecollection->next){
-
+
vcount = avg[0] = avg[1] = 0;
-
+
for(collectedwuve= wuvecollection->collectionbase.first; collectedwuve; collectedwuve = collectedwuve->next){
avg[0] += collectedwuve->uved->v1uv[0];
avg[1] += collectedwuve->uved->v1uv[1];
-
+
avg[0] += collectedwuve->uved->v2uv[0];
avg[1] += collectedwuve->uved->v2uv[1];
-
+
vcount +=2;
-
+
}
-
+
avg[0] /= vcount; avg[1] /= vcount;
-
+
for(collectedwuve= wuvecollection->collectionbase.first; collectedwuve; collectedwuve = collectedwuve->next){
for(curwnode=collectedwuve->uved->v1->nodes.first; curwnode; curwnode=curwnode->next){
*(curwnode->u) = avg[0];
@@ -5386,7 +5386,7 @@ static void collapse_edgeuvs(EditMesh *em)
}
}
}
-
+
free_weldedUVs(&uvverts);
BLI_freelistN(&uvedges);
freecollections(&allcollections);
@@ -5403,11 +5403,11 @@ static void collapseuvs(EditMesh *em, EditVert *mergevert)
if (!EM_texFaceCheck(em))
return;
-
+
uvcount = 0;
uvav[0] = 0;
uvav[1] = 0;
-
+
for(efa = em->faces.first; efa; efa=efa->next){
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -5417,7 +5417,7 @@ static void collapseuvs(EditMesh *em, EditVert *mergevert)
uvcount += 1;
}
if(efa->v2->f1 && ELEM(mergevert, NULL, efa->v2)){
- uvav[0] += tf->uv[1][0];
+ uvav[0] += tf->uv[1][0];
uvav[1] += tf->uv[1][1];
uvcount += 1;
}
@@ -5432,11 +5432,11 @@ static void collapseuvs(EditMesh *em, EditVert *mergevert)
uvcount += 1;
}
}
-
+
if(uvcount > 0) {
- uvav[0] /= uvcount;
+ uvav[0] /= uvcount;
uvav[1] /= uvcount;
-
+
for(efa = em->faces.first; efa; efa=efa->next){
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -5445,7 +5445,7 @@ static void collapseuvs(EditMesh *em, EditVert *mergevert)
tf->uv[0][1] = uvav[1];
}
if(efa->v2->f1){
- tf->uv[1][0] = uvav[0];
+ tf->uv[1][0] = uvav[0];
tf->uv[1][1] = uvav[1];
}
if(efa->v3->f1){
@@ -5464,49 +5464,49 @@ int collapseEdges(EditMesh *em)
{
EditVert *eve;
EditEdge *eed;
-
+
ListBase allcollections;
CollectedEdge *curredge;
Collection *edgecollection;
-
+
int totedges, groupcount, mergecount,vcount;
float avgcount[3];
-
+
allcollections.first = 0;
allcollections.last = 0;
-
+
mergecount = 0;
-
+
build_edgecollection(em, &allcollections);
groupcount = BLI_countlist(&allcollections);
-
-
+
+
for(edgecollection = allcollections.first; edgecollection; edgecollection = edgecollection->next){
totedges = BLI_countlist(&(edgecollection->collectionbase));
mergecount += totedges;
avgcount[0] = 0; avgcount[1] = 0; avgcount[2] = 0;
-
+
vcount = 0;
-
+
for(curredge = edgecollection->collectionbase.first; curredge; curredge = curredge->next){
avgcount[0] += ((EditEdge*)curredge->eed)->v1->co[0];
avgcount[1] += ((EditEdge*)curredge->eed)->v1->co[1];
avgcount[2] += ((EditEdge*)curredge->eed)->v1->co[2];
-
+
avgcount[0] += ((EditEdge*)curredge->eed)->v2->co[0];
avgcount[1] += ((EditEdge*)curredge->eed)->v2->co[1];
avgcount[2] += ((EditEdge*)curredge->eed)->v2->co[2];
-
+
vcount +=2;
}
-
+
avgcount[0] /= vcount; avgcount[1] /=vcount; avgcount[2] /= vcount;
-
+
for(curredge = edgecollection->collectionbase.first; curredge; curredge = curredge->next){
VECCOPY(((EditEdge*)curredge->eed)->v1->co,avgcount);
VECCOPY(((EditEdge*)curredge->eed)->v2->co,avgcount);
}
-
+
if (EM_texFaceCheck(em)) {
/*uv collapse*/
for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = 0;
@@ -5518,14 +5518,10 @@ int collapseEdges(EditMesh *em)
}
collapse_edgeuvs(em);
}
-
+
}
freecollections(&allcollections);
removedoublesflag(em, 1, 0, MERGELIMIT);
- /*get rid of this!*/
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-
-// if (EM_texFaceCheck())
return mergecount;
}
@@ -5534,43 +5530,44 @@ int merge_firstlast(EditMesh *em, int first, int uvmerge)
{
EditVert *eve,*mergevert;
EditSelection *ese;
-
+
/* do sanity check in mergemenu in edit.c ?*/
- if(first == 0){
+ if(first == 0){
ese = em->selected.last;
mergevert= (EditVert*)ese->data;
}
- else{
+ else{
ese = em->selected.first;
mergevert = (EditVert*)ese->data;
}
-
+
if(mergevert->f&SELECT){
for (eve=em->verts.first; eve; eve=eve->next){
if (eve->f&SELECT)
VECCOPY(eve->co,mergevert->co);
}
}
-
+
if(uvmerge && CustomData_has_layer(&em->fdata, CD_MTFACE)){
-
+
for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = 0;
for(eve=em->verts.first; eve; eve=eve->next){
if(eve->f&SELECT) eve->f1 = 1;
}
collapseuvs(em, mergevert);
}
-
+
return removedoublesflag(em, 1, 0, MERGELIMIT);
}
int merge_target(EditMesh *em, int target, int uvmerge)
{
EditVert *eve;
-
+
+ // XXX not working
if(target) snap_sel_to_curs();
else snap_to_center();
-
+
if(uvmerge && CustomData_has_layer(&em->fdata, CD_MTFACE)){
for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = 0;
for(eve=em->verts.first; eve; eve=eve->next){
@@ -5578,28 +5575,145 @@ int merge_target(EditMesh *em, int target, int uvmerge)
}
collapseuvs(em, NULL);
}
-
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return removedoublesflag(em, 1, 0, MERGELIMIT);
-
}
#undef MERGELIMIT
-typedef struct PathNode{
+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");
+
+ switch(RNA_enum_get(op->ptr, "type")) {
+ case 3:
+ count = merge_target(em, 0, uvs);
+ break;
+ case 4:
+ count = merge_target(em, 1, uvs);
+ break;
+ case 1:
+ count = merge_firstlast(em, 0, uvs);
+ break;
+ case 6:
+ count = merge_firstlast(em, 1, uvs);
+ break;
+ case 2:
+ count = collapseEdges(em);
+ break;
+ }
+
+ if(!count)
+ return OPERATOR_CANCELLED;
+
+ BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices.", count);
+
+ BKE_mesh_end_editmesh(obedit->data, em);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+static EnumPropertyItem merge_type_items[]= {
+ {6, "FIRST", 0, "At First", ""},
+ {1, "LAST", 0, "At Last", ""},
+ {3, "CENTER", 0, "At Center", ""},
+ {4, "CURSOR", 0, "At Cursor", ""},
+ {5, "COLLAPSE", 0, "Collapse", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ Object *obedit;
+
+ if(C==NULL) {
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, merge_type_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+ return item;
+ }
+
+ obedit= CTX_data_edit_object(C);
+ if(obedit && obedit->type == OB_MESH) {
+ EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
+
+ if(em->selectmode & SCE_SELECT_VERTEX) {
+ if(em->selected.first && em->selected.last &&
+ ((EditSelection*)em->selected.first)->type == EDITVERT && ((EditSelection*)em->selected.last)->type == EDITVERT) {
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[0]);
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[1]);
+ }
+ else if(em->selected.first && ((EditSelection*)em->selected.first)->type == EDITVERT)
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[1]);
+ else if(em->selected.last && ((EditSelection*)em->selected.last)->type == EDITVERT)
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[0]);
+ }
+
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[2]);
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[3]);
+ RNA_enum_item_add(&item, &totitem, &merge_type_items[4]);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
+ return NULL;
+}
+
+void MESH_OT_merge(wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name= "Merge";
+ ot->idname= "MESH_OT_merge";
+
+ /* api callbacks */
+ ot->exec= merge_exec;
+ ot->invoke= WM_menu_invoke;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use.");
+ RNA_def_enum_funcs(prop, merge_type_itemf);
+ RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge.");
+}
+
+/************************ Vertex Path Operator *************************/
+
+typedef struct PathNode {
int u;
int visited;
ListBase edges;
} PathNode;
-typedef struct PathEdge{
+typedef struct PathEdge {
struct PathEdge *next, *prev;
int v;
float w;
} PathEdge;
-void pathselect(EditMesh *em, wmOperator *op)
+#define PATH_SELECT_EDGE_LENGTH 0
+#define PATH_SELECT_TOPOLOGICAL 1
+
+int select_vertex_path_exec(bContext *C, wmOperator *op)
{
+ Object *obedit= CTX_data_edit_object(C);
+ EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditVert *eve, *s, *t;
EditEdge *eed;
EditSelection *ese;
@@ -5611,30 +5725,30 @@ void pathselect(EditMesh *em, wmOperator *op)
short physical;
float *cost;
Heap *heap; /*binary heap for sorting pointers to PathNodes based upon a 'cost'*/
-
+
s = t = NULL;
-
+
ese = ((EditSelection*)em->selected.last);
if(ese && ese->type == EDITVERT && ese->prev && ese->prev->type == EDITVERT){
physical= pupmenu("Distance Method? %t|Edge Length%x1|Topological%x0");
-
+
t = (EditVert*)ese->data;
s = (EditVert*)ese->prev->data;
-
+
/*need to find out if t is actually reachable by s....*/
- for(eve=em->verts.first; eve; eve=eve->next){
+ for(eve=em->verts.first; eve; eve=eve->next){
eve->f1 = 0;
}
-
+
s->f1 = 1;
-
+
unbalanced = 1;
totnodes = 1;
while(unbalanced){
unbalanced = 0;
for(eed=em->edges.first; eed; eed=eed->next){
if(!eed->h){
- if(eed->v1->f1 && !eed->v2->f1){
+ if(eed->v1->f1 && !eed->v2->f1){
eed->v2->f1 = 1;
totnodes++;
unbalanced = 1;
@@ -5647,10 +5761,8 @@ void pathselect(EditMesh *em, wmOperator *op)
}
}
}
-
-
-
- if(s->f1 && t->f1){ /*t can be reached by s*/
+
+ if(s->f1 && t->f1){ /* t can be reached by s */
Q = MEM_callocN(sizeof(PathNode)*totnodes, "Path Select Nodes");
totnodes = 0;
for(eve=em->verts.first; eve; eve=eve->next){
@@ -5664,12 +5776,12 @@ void pathselect(EditMesh *em, wmOperator *op)
}
else eve->tmp.p = NULL;
}
-
+
for(eed=em->edges.first; eed; eed=eed->next){
if(!eed->h){
if(eed->v1->f1){
currpn = ((PathNode*)eed->v1->tmp.p);
-
+
newpe = MEM_mallocN(sizeof(PathEdge), "Path Edge");
newpe->v = ((PathNode*)eed->v2->tmp.p)->u;
if(physical){
@@ -5679,9 +5791,9 @@ void pathselect(EditMesh *em, wmOperator *op)
newpe->next = 0;
newpe->prev = 0;
BLI_addtail(&(currpn->edges), newpe);
- }
+ }
if(eed->v2->f1){
- currpn = ((PathNode*)eed->v2->tmp.p);
+ currpn = ((PathNode*)eed->v2->tmp.p);
newpe = MEM_mallocN(sizeof(PathEdge), "Path Edge");
newpe->v = ((PathNode*)eed->v1->tmp.p)->u;
if(physical){
@@ -5694,28 +5806,28 @@ void pathselect(EditMesh *em, wmOperator *op)
}
}
}
-
+
heap = BLI_heap_new();
cost = MEM_callocN(sizeof(float)*totnodes, "Path Select Costs");
previous = MEM_callocN(sizeof(int)*totnodes, "PathNode indices");
-
+
for(v=0; v < totnodes; v++){
cost[v] = 1000000;
previous[v] = -1; /*array of indices*/
}
-
+
pnindex = ((PathNode*)s->tmp.p)->u;
cost[pnindex] = 0;
BLI_heap_insert(heap, 0.0f, SET_INT_IN_POINTER(pnindex));
-
+
while( !BLI_heap_empty(heap) ){
-
+
pnindex = GET_INT_FROM_POINTER(BLI_heap_popmin(heap));
currpn = &(Q[pnindex]);
-
+
if(currpn == (PathNode*)t->tmp.p) /*target has been reached....*/
break;
-
+
for(currpe=currpn->edges.first; currpe; currpe=currpe->next){
if(!Q[currpe->v].visited){
if( cost[currpe->v] > (cost[currpn->u ] + currpe->w) ){
@@ -5727,7 +5839,7 @@ void pathselect(EditMesh *em, wmOperator *op)
}
}
}
-
+
pathvert = ((PathNode*)t->tmp.p)->u;
while(pathvert != -1){
for(eve=em->verts.first; eve; eve=eve->next){
@@ -5737,61 +5849,90 @@ void pathselect(EditMesh *em, wmOperator *op)
}
pathvert = previous[pathvert];
}
-
+
for(v=0; v < totnodes; v++) BLI_freelistN(&(Q[v].edges));
MEM_freeN(Q);
MEM_freeN(cost);
MEM_freeN(previous);
BLI_heap_free(heap, NULL);
EM_select_flush(em);
- // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-
-// if (EM_texFaceCheck())
}
}
- else{
+ else {
+ BKE_mesh_end_editmesh(obedit->data, em);
BKE_report(op->reports, RPT_ERROR, "Path Selection requires that exactly two vertices be selected");
- return;
+ return OPERATOR_CANCELLED;
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ BKE_mesh_end_editmesh(obedit->data, em);
+
+ return OPERATOR_FINISHED;
}
+void MESH_OT_select_vertex_path(wmOperatorType *ot)
+{
+ static const EnumPropertyItem type_items[] = {
+ {PATH_SELECT_EDGE_LENGTH, "EDGE_LENGTH", 0, "Edge Length", NULL},
+ {PATH_SELECT_TOPOLOGICAL, "TOPOLOGICAL", 0, "Topological", NULL},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* identifiers */
+ ot->name= "Select Vertex Path";
+ ot->idname= "MESH_OT_select_vertex_path";
+
+ /* api callbacks */
+ ot->exec= select_vertex_path_exec;
+ ot->invoke= WM_menu_invoke;
+ ot->poll= ED_operator_editmesh;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance.");
+}
+
+/********************** Region/Loop Operators *************************/
+
static int region_to_loop(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditEdge *eed;
EditFace *efa;
-
- if(em->totfacesel){
- for(eed=em->edges.first; eed; eed=eed->next) eed->f1 = 0;
-
- for(efa=em->faces.first; efa; efa=efa->next){
- if(efa->f&SELECT){
- efa->e1->f1++;
- efa->e2->f1++;
- efa->e3->f1++;
- if(efa->e4)
- efa->e4->f1++;
- }
- }
-
- EM_clear_flag_all(em, SELECT);
-
- for(eed=em->edges.first; eed; eed=eed->next){
- if(eed->f1 == 1) EM_select_edge(eed, 1);
+ int selected= 0;
+
+ for(eed=em->edges.first; eed; eed=eed->next) eed->f1 = 0;
+
+ for(efa=em->faces.first; efa; efa=efa->next){
+ if(efa->f&SELECT){
+ efa->e1->f1++;
+ efa->e2->f1++;
+ efa->e3->f1++;
+ if(efa->e4)
+ efa->e4->f1++;
+
+ selected= 1;
}
-
- em->selectmode = SCE_SELECT_EDGE;
- EM_selectmode_set(em);
- // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ }
+
+ if(!selected)
+ return OPERATOR_CANCELLED;
-// if (EM_texFaceCheck())
+ EM_clear_flag_all(em, SELECT);
+ for(eed=em->edges.first; eed; eed=eed->next){
+ if(eed->f1 == 1) EM_select_edge(eed, 1);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
+
+ em->selectmode = SCE_SELECT_EDGE;
+ EM_selectmode_set(em);
+
BKE_mesh_end_editmesh(obedit->data, em);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
@@ -5800,11 +5941,11 @@ void MESH_OT_region_to_loop(wmOperatorType *ot)
/* identifiers */
ot->name= "Region to Loop";
ot->idname= "MESH_OT_region_to_loop";
-
+
/* api callbacks */
ot->exec= region_to_loop;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -5814,7 +5955,7 @@ static int validate_loop(EditMesh *em, Collection *edgecollection)
EditEdge *eed;
EditFace *efa;
CollectedEdge *curredge;
-
+
/*1st test*/
for(curredge = (CollectedEdge*)edgecollection->collectionbase.first; curredge; curredge=curredge->next){
curredge->eed->v1->f1 = 0;
@@ -5828,7 +5969,7 @@ static int validate_loop(EditMesh *em, Collection *edgecollection)
if(curredge->eed->v1->f1 > 2) return(0); else
if(curredge->eed->v2->f1 > 2) return(0);
}
-
+
/*2nd test*/
for(eed = em->edges.first; eed; eed=eed->next) eed->f1 = 0;
for(efa=em->faces.first; efa; efa=efa->next){
@@ -5844,20 +5985,20 @@ static int validate_loop(EditMesh *em, Collection *edgecollection)
}
static int loop_bisect(EditMesh *em, Collection *edgecollection){
-
+
EditFace *efa, *sf1, *sf2;
EditEdge *eed, *sed;
CollectedEdge *curredge;
int totsf1, totsf2, unbalanced,balancededges;
-
+
for(eed=em->edges.first; eed; eed=eed->next) eed->f1 = eed->f2 = 0;
- for(efa=em->faces.first; efa; efa=efa->next) efa->f1 = 0;
-
+ for(efa=em->faces.first; efa; efa=efa->next) efa->f1 = 0;
+
for(curredge = (CollectedEdge*)edgecollection->collectionbase.first; curredge; curredge=curredge->next) curredge->eed->f1 = 1;
-
+
sf1 = sf2 = NULL;
sed = ((CollectedEdge*)edgecollection->collectionbase.first)->eed;
-
+
for(efa=em->faces.first; efa; efa=efa->next){
if(sf2) break;
else if(sf1){
@@ -5867,24 +6008,24 @@ static int loop_bisect(EditMesh *em, Collection *edgecollection){
if(efa->e1 == sed || efa->e2 == sed || efa->e3 == sed || ( (efa->e4) ? efa->e4 == sed : 0) ) sf1 = efa;
}
}
-
+
if(sf1==NULL || sf2==NULL)
return(-1);
-
+
if(!(sf1->e1->f1)) sf1->e1->f2 = 1;
if(!(sf1->e2->f1)) sf1->e2->f2 = 1;
if(!(sf1->e3->f1)) sf1->e3->f2 = 1;
if(sf1->e4 && !(sf1->e4->f1)) sf1->e4->f2 = 1;
sf1->f1 = 1;
totsf1 = 1;
-
+
if(!(sf2->e1->f1)) sf2->e1->f2 = 2;
if(!(sf2->e2->f1)) sf2->e2->f2 = 2;
if(!(sf2->e3->f1)) sf2->e3->f2 = 2;
if(sf2->e4 && !(sf2->e4->f1)) sf2->e4->f2 = 2;
sf2->f1 = 2;
totsf2 = 1;
-
+
/*do sf1*/
unbalanced = 1;
while(unbalanced){
@@ -5906,7 +6047,7 @@ static int loop_bisect(EditMesh *em, Collection *edgecollection){
}
}
}
-
+
/*do sf2*/
unbalanced = 1;
while(unbalanced){
@@ -5928,7 +6069,7 @@ static int loop_bisect(EditMesh *em, Collection *edgecollection){
}
}
}
-
+
if(totsf1 < totsf2) return(1);
else return(2);
}
@@ -5943,9 +6084,9 @@ static int loop_to_region(bContext *C, wmOperator *op)
ListBase allcollections={NULL,NULL};
Collection *edgecollection;
int testflag;
-
+
build_edgecollection(em, &allcollections);
-
+
for(edgecollection = (Collection *)allcollections.first; edgecollection; edgecollection=edgecollection->next){
if(validate_loop(em, edgecollection)){
testflag = loop_bisect(em, edgecollection);
@@ -5957,18 +6098,16 @@ static int loop_to_region(bContext *C, wmOperator *op)
}
}
}
-
+
for(efa=em->faces.first; efa; efa=efa->next){ /*fix this*/
if(efa->f&SELECT) EM_select_face(efa,1);
}
-
- freecollections(&allcollections);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-// if (EM_texFaceCheck())
+ freecollections(&allcollections);
+ BKE_mesh_end_editmesh(obedit->data, em);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
- BKE_mesh_end_editmesh(obedit->data, em);
+
return OPERATOR_FINISHED;
}
@@ -5977,72 +6116,72 @@ void MESH_OT_loop_to_region(wmOperatorType *ot)
/* identifiers */
ot->name= "Loop to Region";
ot->idname= "MESH_OT_loop_to_region";
-
+
/* api callbacks */
ot->exec= loop_to_region;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/********************** UV/Color Operators *************************/
// XXX please check if these functions do what you want them to
/* texface and vertex color editmode tools for the face menu */
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);
EditFace *efa;
- short change = 0, ccw;
+ short change = 0;
MTFace *tf;
float u1, v1;
- int shift = 0; // XXX
+ int dir= RNA_enum_get(op->ptr, "direction");
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
- ccw = (shift);
-
+
for(efa=em->faces.first; efa; efa=efa->next) {
if (efa->f & SELECT) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
u1= tf->uv[0][0];
v1= tf->uv[0][1];
-
- if (ccw) {
+
+ if (dir == DIRECTION_CCW) {
if(efa->v4) {
tf->uv[0][0]= tf->uv[3][0];
tf->uv[0][1]= tf->uv[3][1];
-
+
tf->uv[3][0]= tf->uv[2][0];
tf->uv[3][1]= tf->uv[2][1];
} else {
tf->uv[0][0]= tf->uv[2][0];
tf->uv[0][1]= tf->uv[2][1];
}
-
+
tf->uv[2][0]= tf->uv[1][0];
tf->uv[2][1]= tf->uv[1][1];
-
+
tf->uv[1][0]= u1;
tf->uv[1][1]= v1;
- } else {
+ } else {
tf->uv[0][0]= tf->uv[1][0];
tf->uv[0][1]= tf->uv[1][1];
-
+
tf->uv[1][0]= tf->uv[2][0];
tf->uv[1][1]= tf->uv[2][1];
-
+
if(efa->v4) {
tf->uv[2][0]= tf->uv[3][0];
tf->uv[2][1]= tf->uv[3][1];
-
+
tf->uv[3][0]= u1;
tf->uv[3][1]= v1;
}
@@ -6054,46 +6193,47 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
change = 1;
}
}
-
- if (change) {
-// 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);
+
+ if(!change)
+ return OPERATOR_CANCELLED;
+
+ 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);
EditFace *efa;
- short change = 0, altaxis;
+ short change = 0;
MTFace *tf;
float u1, v1;
- int shift= 0; // XXX
-
+ int axis= RNA_enum_get(op->ptr, "axis");
+
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
- altaxis = (shift);
-
+
for(efa=em->faces.first; efa; efa=efa->next) {
if (efa->f & SELECT) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if (altaxis) {
+ if (axis == AXIS_Y) {
u1= tf->uv[1][0];
v1= tf->uv[1][1];
if(efa->v4) {
-
+
tf->uv[1][0]= tf->uv[2][0];
tf->uv[1][1]= tf->uv[2][1];
-
+
tf->uv[2][0]= u1;
tf->uv[2][1]= v1;
@@ -6102,7 +6242,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
tf->uv[3][0]= tf->uv[0][0];
tf->uv[3][1]= tf->uv[0][1];
-
+
tf->uv[0][0]= u1;
tf->uv[0][1]= v1;
}
@@ -6112,15 +6252,15 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
tf->uv[2][0]= u1;
tf->uv[2][1]= v1;
}
-
+
} else {
u1= tf->uv[0][0];
v1= tf->uv[0][1];
if(efa->v4) {
-
+
tf->uv[0][0]= tf->uv[1][0];
tf->uv[0][1]= tf->uv[1][1];
-
+
tf->uv[1][0]= u1;
tf->uv[1][1]= v1;
@@ -6129,7 +6269,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
tf->uv[3][0]= tf->uv[2][0];
tf->uv[3][1]= tf->uv[2][1];
-
+
tf->uv[2][0]= u1;
tf->uv[2][1]= v1;
}
@@ -6143,40 +6283,41 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
change = 1;
}
}
-
- if (change) {
-// 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);
+
+ if(!change)
+ return OPERATOR_CANCELLED;
+
+ 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);
EditFace *efa;
- short change = 0, ccw;
+ short change = 0;
MCol tmpcol, *mcol;
- int shift= 0; // XXX
-
+ int dir= RNA_enum_get(op->ptr, "direction");
+
if (!EM_vertColorCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "mesh has no color layers");
+ BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
- ccw = (shift);
-
+
for(efa=em->faces.first; efa; efa=efa->next) {
if (efa->f & SELECT) {
mcol = CustomData_em_get(&em->fdata, efa->data, CD_MCOL);
tmpcol= mcol[0];
-
- if (ccw) {
+
+ if (dir == DIRECTION_CCW) {
if(efa->v4) {
mcol[0]= mcol[3];
mcol[3]= mcol[2];
@@ -6188,7 +6329,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
} else {
mcol[0]= mcol[1];
mcol[1]= mcol[2];
-
+
if(efa->v4) {
mcol[2]= mcol[3];
mcol[3]= tmpcol;
@@ -6199,43 +6340,44 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
change = 1;
}
}
-
- if (change) {
-// 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);
+
+ if(!change)
+ return OPERATOR_CANCELLED;
+
+ 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_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);
EditFace *efa;
- short change = 0, altaxis;
+ short change = 0;
MCol tmpcol, *mcol;
- int shift= 0; // XXX
-
+ int axis= RNA_enum_get(op->ptr, "axis");
+
if (!EM_vertColorCheck(em)) {
BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
-
- altaxis = (shift);
-
+
for(efa=em->faces.first; efa; efa=efa->next) {
if (efa->f & SELECT) {
mcol = CustomData_em_get(&em->fdata, efa->data, CD_MCOL);
- if (altaxis) {
+ if (axis == AXIS_Y) {
tmpcol= mcol[1];
mcol[1]= mcol[2];
mcol[2]= tmpcol;
-
+
if(efa->v4) {
tmpcol= mcol[0];
mcol[0]= mcol[3];
@@ -6245,7 +6387,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
tmpcol= mcol[0];
mcol[0]= mcol[1];
mcol[1]= tmpcol;
-
+
if(efa->v4) {
tmpcol= mcol[2];
mcol[2]= mcol[3];
@@ -6255,13 +6397,15 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
change = 1;
}
}
-
- if (change) {
-// 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);
+
+ if(!change)
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
@@ -6270,13 +6414,16 @@ void MESH_OT_uvs_rotate(wmOperatorType *ot)
/* identifiers */
ot->name= "Rotate UVs";
ot->idname= "MESH_OT_uvs_rotate";
-
+
/* api callbacks */
ot->exec= mesh_rotate_uvs;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* props */
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate UVs around.");
}
void MESH_OT_uvs_mirror(wmOperatorType *ot)
@@ -6284,13 +6431,16 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot)
/* identifiers */
ot->name= "Mirror UVs";
ot->idname= "MESH_OT_uvs_mirror";
-
+
/* api callbacks */
ot->exec= mesh_mirror_uvs;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* props */
+ RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
}
void MESH_OT_colors_rotate(wmOperatorType *ot)
@@ -6298,13 +6448,16 @@ void MESH_OT_colors_rotate(wmOperatorType *ot)
/* identifiers */
ot->name= "Rotate Colors";
ot->idname= "MESH_OT_colors_rotate";
-
+
/* api callbacks */
ot->exec= mesh_rotate_colors;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* props */
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around.");
}
void MESH_OT_colors_mirror(wmOperatorType *ot)
@@ -6312,16 +6465,17 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
/* identifiers */
ot->name= "Mirror Colors";
ot->idname= "MESH_OT_colors_mirror";
-
+
/* api callbacks */
ot->exec= mesh_mirror_colors;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-/* ************************************* */
+ /* props */
+ RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
+}
/* note; the EM_selectmode_set() calls here illustrate how badly constructed it all is... from before the
edge/face flags, with very mixed results.... */
@@ -6336,39 +6490,39 @@ static void beauty_fill(EditMesh *em)
EVPtr *efaa;
float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2;
int totedge, ok, notbeauty=8, onedone, vindex[4];
-
+
/* - all selected edges with two faces
* - find the faces: store them in edges (using datablock)
* - per edge: - test convex
* - test edge: flip?
* - if true: remedge, addedge, all edges at the edge get new face pointers
*/
-
- EM_selectmode_set(em); // makes sure in selectmode 'face' the edges of selected faces are selected too
-
+
+ EM_selectmode_set(em); // makes sure in selectmode 'face' the edges of selected faces are selected too
+
totedge = count_selected_edges(em->edges.first);
if(totedge==0) return;
-
+
/* temp block with face pointers */
efaar= (EVPTuple *) MEM_callocN(totedge * sizeof(EVPTuple), "beautyfill");
-
+
while (notbeauty) {
notbeauty--;
-
+
ok = collect_quadedges(efaar, em->edges.first, em->faces.first);
-
+
/* there we go */
onedone= 0;
-
+
eed= em->edges.first;
while(eed) {
nexted= eed->next;
-
+
/* f2 is set in collect_quadedges() */
if(eed->f2==2 && eed->h==0) {
-
+
efaa = (EVPtr *) eed->tmp.p;
-
+
/* none of the faces should be treated before, nor be part of fgon */
ok= 1;
efa= efaa[0];
@@ -6377,13 +6531,13 @@ static void beauty_fill(EditMesh *em)
efa= efaa[1];
if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0;
if(efa->fgonf) ok= 0;
-
+
if(ok) {
/* test convex */
givequadverts(efaa[0], efaa[1], &v1, &v2, &v3, &v4, vindex);
if(v1 && v2 && v3 && v4) {
if( convex(v1->co, v2->co, v3->co, v4->co) ) {
-
+
/* test edges */
if( (v1) > (v3) ) {
dia1.v1= v3;
@@ -6393,7 +6547,7 @@ static void beauty_fill(EditMesh *em)
dia1.v1= v1;
dia1.v2= v3;
}
-
+
if( (v2) > (v4) ) {
dia2.v1= v4;
dia2.v2= v2;
@@ -6402,28 +6556,28 @@ static void beauty_fill(EditMesh *em)
dia2.v1= v2;
dia2.v2= v4;
}
-
+
/* testing rule:
* the area divided by the total edge lengths
*/
-
+
len1= VecLenf(v1->co, v2->co);
len2= VecLenf(v2->co, v3->co);
len3= VecLenf(v3->co, v4->co);
len4= VecLenf(v4->co, v1->co);
len5= VecLenf(v1->co, v3->co);
len6= VecLenf(v2->co, v4->co);
-
+
opp1= AreaT3Dfl(v1->co, v2->co, v3->co);
opp2= AreaT3Dfl(v1->co, v3->co, v4->co);
-
+
fac1= opp1/(len1+len2+len5) + opp2/(len3+len4+len5);
-
+
opp1= AreaT3Dfl(v2->co, v3->co, v4->co);
opp2= AreaT3Dfl(v2->co, v4->co, v1->co);
-
+
fac2= opp1/(len2+len3+len6) + opp2/(len4+len1+len6);
-
+
ok= 0;
if(fac1 > fac2) {
if(dia2.v1==eed->v1 && dia2.v2==eed->v2) {
@@ -6432,16 +6586,16 @@ static void beauty_fill(EditMesh *em)
efa->f1= 1;
efa= efaa[1];
efa->f1= 1;
-
+
w= EM_face_from_faces(em, efaa[0], efaa[1],
vindex[0], vindex[1], 4+vindex[2], -1);
w->f |= SELECT;
-
-
+
+
w= EM_face_from_faces(em, efaa[0], efaa[1],
vindex[0], 4+vindex[2], 4+vindex[3], -1);
w->f |= SELECT;
-
+
onedone= 1;
}
}
@@ -6452,39 +6606,39 @@ static void beauty_fill(EditMesh *em)
efa->f1= 1;
efa= efaa[1];
efa->f1= 1;
-
-
+
+
w= EM_face_from_faces(em, efaa[0], efaa[1],
vindex[1], 4+vindex[2], 4+vindex[3], -1);
w->f |= SELECT;
-
-
+
+
w= EM_face_from_faces(em, efaa[0], efaa[1],
vindex[0], 4+vindex[1], 4+vindex[3], -1);
w->f |= SELECT;
-
+
onedone= 1;
}
}
}
}
}
-
+
}
eed= nexted;
}
-
+
free_tagged_edges_faces(em, em->edges.first, em->faces.first);
-
+
if(onedone==0) break;
-
+
EM_selectmode_set(em); // new edges/faces were added
}
-
+
MEM_freeN(efaar);
-
+
EM_select_flush(em);
-
+
}
/* Got this from scanfill.c. You will need to juggle around the
@@ -6495,10 +6649,10 @@ static void fill_mesh(EditMesh *em)
EditEdge *eed,*e1,*nexted;
EditFace *efa,*nextvl, *efan;
short ok;
-
+
if(em==NULL) return;
waitcursor(1);
-
+
/* copy all selected vertices */
eve= em->verts.first;
while(eve) {
@@ -6515,7 +6669,7 @@ static void fill_mesh(EditMesh *em)
while(eed) {
if( (eed->v1->f & SELECT) && (eed->v2->f & SELECT) ) {
e1= BLI_addfilledge(eed->v1->tmp.v, eed->v2->tmp.v);
- e1->v1->xs++;
+ e1->v1->xs++;
e1->v2->xs++;
}
eed= eed->next;
@@ -6533,7 +6687,7 @@ static void fill_mesh(EditMesh *em)
efa->v3->tmp.v->xs--;
if(efa->v4) efa->v4->tmp.v->xs--;
ok= 1;
-
+
}
efa= nextvl;
}
@@ -6552,7 +6706,7 @@ static void fill_mesh(EditMesh *em)
efa= fillfacebase.first;
while(efa) {
/* normals default pointing up */
- efan= addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v,
+ efan= addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v,
efa->v1->tmp.v, 0, NULL, NULL);
if(efan) EM_select_face(efan, 1);
efa= efa->next;
@@ -6567,46 +6721,50 @@ 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);
-
+
fill_mesh(em);
- 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);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
-
+
}
void MESH_OT_fill(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Fill Mesh";
+ ot->name= "Fill";
ot->idname= "MESH_OT_fill";
-
+
/* api callbacks */
ot->exec= fill_mesh_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
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);
-
+
beauty_fill(em);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
+
BKE_mesh_end_editmesh(obedit->data, em);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
@@ -6615,26 +6773,30 @@ void MESH_OT_beauty_fill(wmOperatorType *ot)
/* identifiers */
ot->name= "Beauty Fill";
ot->idname= "MESH_OT_beauty_fill";
-
+
/* api callbacks */
ot->exec= beauty_fill_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/********************** Quad/Tri Operators *************************/
+
static int quads_convert_to_tris_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
-
+
//convert_to_triface(em,0);
if (!EDBM_CallOpf(em, op, "triangulate faces=%hf", BM_SELECT))
return OPERATOR_CANCELLED;
-
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
+
return OPERATOR_FINISHED;
}
@@ -6643,24 +6805,26 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
/* identifiers */
ot->name= "Quads to Tris";
ot->idname= "MESH_OT_quads_convert_to_tris";
-
+
/* api callbacks */
ot->exec= quads_convert_to_tris_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
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_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;
}
@@ -6670,24 +6834,26 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
/* identifiers */
ot->name= "Tris to Quads";
ot->idname= "MESH_OT_tris_convert_to_quads";
-
+
/* api callbacks */
ot->exec= tris_convert_to_quads_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
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_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;
}
@@ -6697,65 +6863,86 @@ void MESH_OT_edge_flip(wmOperatorType *ot)
/* identifiers */
ot->name= "Edge Flip";
ot->idname= "MESH_OT_edge_flip";
-
+
/* api callbacks */
ot->exec= edge_flip_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/********************** Smooth/Solid Operators *************************/
+
+void mesh_set_smooth_faces(EditMesh *em, short smooth)
+{
+ EditFace *efa;
+
+ if(em==NULL) return;
+
+ for(efa= em->faces.first; efa; efa=efa->next) {
+ if(efa->f & SELECT) {
+ if(smooth) efa->flag |= ME_SMOOTH;
+ else efa->flag &= ~ME_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);
-
- mesh_set_smooth_faces(em,1);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
+
+ mesh_set_smooth_faces(em, 1);
+
BKE_mesh_end_editmesh(obedit->data, em);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
return OPERATOR_FINISHED;
}
void MESH_OT_faces_shade_smooth(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth Face Shading";
+ ot->name= "Shade Smooth";
ot->idname= "MESH_OT_faces_shade_smooth";
-
+
/* api callbacks */
ot->exec= mesh_faces_shade_smooth_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int mesh_faces_shade_solid_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);
-
+
+ mesh_set_smooth_faces(em, 0);
+
+ 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;
}
void MESH_OT_faces_shade_solid(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flat Face Shading";
+ ot->name= "Shade Flat";
ot->idname= "MESH_OT_faces_shade_solid";
-
+
/* api callbacks */
ot->exec= mesh_faces_shade_solid_exec;
ot->poll= ED_operator_editmesh;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index c256f9427f6..7f974a532d8 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -132,8 +132,10 @@ void MESH_OT_primitive_grid_add(struct wmOperatorType *ot);
void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);
void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot);
void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
-void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
+
void MESH_OT_edge_face_add(struct wmOperatorType *ot);
+void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
+void MESH_OT_duplicate(struct wmOperatorType *ot);
void MESH_OT_fgon_make(struct wmOperatorType *ot);
void MESH_OT_fgon_clear(struct wmOperatorType *ot);
@@ -185,6 +187,7 @@ extern int convex(float *v1, float *v2, float *v3, float *v4);
extern struct EditFace *EM_face_from_faces(EditMesh *em, struct EditFace *efa1,
struct EditFace *efa2, int i1, int i2, int i3, int i4);
+extern int EM_view3d_poll(struct bContext *C);
/* ******************* editmesh_loop.c */
@@ -199,19 +202,18 @@ void MESH_OT_select_all_toggle(struct wmOperatorType *ot);
void MESH_OT_bmesh_test(struct wmOperatorType *ot);
void MESH_OT_select_more(struct wmOperatorType *ot);
void MESH_OT_select_less(struct wmOperatorType *ot);
-void MESH_OT_select_invert(struct wmOperatorType *ot);
+void MESH_OT_select_inverse(struct wmOperatorType *ot);
void MESH_OT_select_non_manifold(struct wmOperatorType *ot);
void MESH_OT_select_linked(struct wmOperatorType *ot);
void MESH_OT_select_linked_pick(struct wmOperatorType *ot);
void MESH_OT_hide(struct wmOperatorType *ot);
void MESH_OT_reveal(struct wmOperatorType *ot);
+void MESH_OT_select_by_number_vertices(struct wmOperatorType *ot);
void MESH_OT_normals_make_consistent(struct wmOperatorType *ot);
void MESH_OT_faces_select_linked_flat(struct wmOperatorType *ot);
void MESH_OT_edges_select_sharp(struct wmOperatorType *ot);
void MESH_OT_select_shortest_path(struct wmOperatorType *ot);
-void MESH_OT_vertices_select_similar(struct wmOperatorType *ot);
-void MESH_OT_edges_select_similar(struct wmOperatorType *ot);
-void MESH_OT_faces_select_similar(struct wmOperatorType *ot);
+void MESH_OT_select_similar(struct wmOperatorType *ot);
void MESH_OT_select_random(struct wmOperatorType *ot);
void MESH_OT_vertices_transform_to_sphere(struct wmOperatorType *ot);
void MESH_OT_selection_type(struct wmOperatorType *ot);
@@ -219,7 +221,7 @@ void MESH_OT_loop_multi_select(struct wmOperatorType *ot);
void MESH_OT_mark_seam(struct wmOperatorType *ot);
void MESH_OT_mark_sharp(struct wmOperatorType *ot);
void MESH_OT_vertices_smooth(struct wmOperatorType *ot);
-void MESH_OT_flip_editnormals(struct wmOperatorType *ot);
+void MESH_OT_flip_normals(struct wmOperatorType *ot);
extern EditEdge *findnearestedge(struct ViewContext *vc, int *dist);
extern void EM_automerge(int update);
@@ -250,14 +252,11 @@ extern EditVert *findnearestvert(struct ViewContext *vc, int *dist, short sel, s
void join_triangles(EditMesh *em);
int removedoublesflag(EditMesh *em, short flag, short automerge, float limit); /* return amount */
-void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beauty, int numcuts, int seltype);
+void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float fractal, int beauty, int numcuts, int seltype);
int EdgeSlide(EditMesh *em, struct wmOperator *op, short immediate, float imperc);
+void MESH_OT_merge(struct wmOperatorType *ot);
void MESH_OT_subdivide(struct wmOperatorType *ot);
-void MESH_OT_subdivs(struct wmOperatorType *ot);
-void MESH_OT_subdivide_multi(struct wmOperatorType *ot);
-void MESH_OT_subdivide_multi_fractal(struct wmOperatorType *ot);
-void MESH_OT_subdivide_smooth(struct wmOperatorType *ot);
void MESH_OT_remove_doubles(struct wmOperatorType *ot);
void MESH_OT_extrude(struct wmOperatorType *ot);
void MESH_OT_spin(struct wmOperatorType *ot);
@@ -273,6 +272,7 @@ void MESH_OT_faces_shade_solid(struct wmOperatorType *ot);
void MESH_OT_split(struct wmOperatorType *ot);
void MESH_OT_extrude_repeat(struct wmOperatorType *ot);
void MESH_OT_edge_rotate(struct wmOperatorType *ot);
+void MESH_OT_select_vertex_path(struct wmOperatorType *ot);
void MESH_OT_loop_to_region(struct wmOperatorType *ot);
void MESH_OT_region_to_loop(struct wmOperatorType *ot);
@@ -284,5 +284,14 @@ void MESH_OT_colors_mirror(struct wmOperatorType *ot);
void MESH_OT_delete(struct wmOperatorType *ot);
void MESH_OT_rip(struct wmOperatorType *ot);
+/* ******************* mesh_layers.c */
+
+void MESH_OT_uv_texture_add(struct wmOperatorType *ot);
+void MESH_OT_uv_texture_remove(struct wmOperatorType *ot);
+void MESH_OT_vertex_color_add(struct wmOperatorType *ot);
+void MESH_OT_vertex_color_remove(struct wmOperatorType *ot);
+void MESH_OT_sticky_add(struct wmOperatorType *ot);
+void MESH_OT_sticky_remove(struct wmOperatorType *ot);
+
#endif // MESH_INTERN_H
diff --git a/source/blender/editors/mesh/mesh_layers.c b/source/blender/editors/mesh/mesh_layers.c
new file mode 100644
index 00000000000..bad2fa99434
--- /dev/null
+++ b/source/blender/editors/mesh/mesh_layers.c
@@ -0,0 +1,434 @@
+/**
+ * $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): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+#include <math.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_customdata_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "BKE_context.h"
+#include "BKE_customdata.h"
+#include "BKE_depsgraph.h"
+#include "BKE_displist.h"
+#include "BKE_global.h"
+#include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
+
+#include "BLI_editVert.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_mesh.h"
+#include "ED_view3d.h"
+
+#include "mesh_intern.h"
+#include "bmesh.h"
+
+static void delete_customdata_layer(Mesh *me, CustomDataLayer *layer)
+{
+ CustomData *data= (me->edit_btmesh)? &me->edit_btmesh->bm->pdata: &me->pdata;
+ void *actlayerdata, *rndlayerdata, *clonelayerdata, *masklayerdata, *layerdata=layer->data;
+ int type= layer->type;
+ int index= CustomData_get_layer_index(data, type);
+ int i, actindex, rndindex, cloneindex, maskindex;
+
+ /* ok, deleting a non-active layer needs to preserve the active layer indices.
+ to do this, we store a pointer to the .data member of both layer and the active layer,
+ (to detect if we're deleting the active layer or not), then use the active
+ layer data pointer to find where the active layer has ended up.
+
+ this is necassary because the deletion functions only support deleting the active
+ layer. */
+ actlayerdata = data->layers[CustomData_get_active_layer_index(data, type)].data;
+ rndlayerdata = data->layers[CustomData_get_render_layer_index(data, type)].data;
+ clonelayerdata = data->layers[CustomData_get_clone_layer_index(data, type)].data;
+ masklayerdata = data->layers[CustomData_get_mask_layer_index(data, type)].data;
+ CustomData_set_layer_active(data, type, layer - &data->layers[index]);
+
+ if(me->edit_btmesh) {
+ BM_free_data_layer(me->edit_btmesh->bm, data, type);
+ }
+ else {
+ CustomData_free_layer_active(data, type, me->totface);
+ mesh_update_customdata_pointers(me);
+ }
+
+ if(!CustomData_has_layer(data, type))
+ if(type == CD_MLOOPCOL && (G.f & G_VERTEXPAINT))
+ G.f &= ~G_VERTEXPAINT; /* get out of vertexpaint mode */
+
+ /* reconstruct active layer */
+ if (actlayerdata != layerdata) {
+ /* find index */
+ actindex = CustomData_get_layer_index(data, type);
+ for (i=actindex; i<data->totlayer; i++) {
+ if (data->layers[i].data == actlayerdata) {
+ actindex = i - actindex;
+ break;
+ }
+ }
+
+ /* set index */
+ CustomData_set_layer_active(data, type, actindex);
+ }
+
+ if (rndlayerdata != layerdata) {
+ /* find index */
+ rndindex = CustomData_get_layer_index(data, type);
+ for (i=rndindex; i<data->totlayer; i++) {
+ if (data->layers[i].data == rndlayerdata) {
+ rndindex = i - rndindex;
+ break;
+ }
+ }
+
+ /* set index */
+ CustomData_set_layer_render(data, type, rndindex);
+ }
+
+ if (clonelayerdata != layerdata) {
+ /* find index */
+ cloneindex = CustomData_get_layer_index(data, type);
+ for (i=cloneindex; i<data->totlayer; i++) {
+ if (data->layers[i].data == clonelayerdata) {
+ cloneindex = i - cloneindex;
+ break;
+ }
+ }
+
+ /* set index */
+ CustomData_set_layer_clone(data, type, cloneindex);
+ }
+
+ if (masklayerdata != layerdata) {
+ /* find index */
+ maskindex = CustomData_get_layer_index(data, type);
+ for (i=maskindex; i<data->totlayer; i++) {
+ if (data->layers[i].data == masklayerdata) {
+ maskindex = i - maskindex;
+ break;
+ }
+ }
+
+ /* set index */
+ CustomData_set_layer_mask(data, type, maskindex);
+ }
+}
+
+/*********************** UV texture operators ************************/
+
+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;
+ BMEditMesh *em;
+ int layernum;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(scene->obedit == ob) {
+ em= me->edit_btmesh;
+
+ layernum= CustomData_number_of_layers(&em->bm->pdata, CD_MTEXPOLY);
+ if(layernum >= MAX_MTFACE)
+ return OPERATOR_CANCELLED;
+
+ BM_add_data_layer(em->bm, &em->bm->pdata, CD_MTEXPOLY);
+ BM_add_data_layer(em->bm, &em->bm->ldata, CD_MLOOPUV);
+ CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum);
+ }
+ else if(ob) {
+ layernum= CustomData_number_of_layers(&me->pdata, CD_MTEXPOLY);
+ if(layernum >= MAX_MTFACE)
+ return OPERATOR_CANCELLED;
+
+ if (me->mtpoly) {
+ CustomData_add_layer(&me->pdata, CD_MTEXPOLY, CD_DUPLICATE, me->mtpoly, me->totpoly);
+ CustomData_add_layer(&me->ldata, CD_MLOOPUV, CD_DUPLICATE, me->mloopuv, me->totloop);
+ } else {
+ CustomData_add_layer(&me->pdata, CD_MTEXPOLY, CD_DEFAULT, NULL, me->totpoly);
+ CustomData_add_layer(&me->ldata, CD_MLOOPUV, CD_DEFAULT, NULL, me->totloop);
+ }
+
+ CustomData_set_layer_active(&me->pdata, CD_MTEXPOLY, layernum);
+ mesh_update_customdata_pointers(me);
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_uv_texture_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add UV Texture";
+ ot->idname= "MESH_OT_uv_texture_add";
+
+ /* api callbacks */
+ ot->exec= uv_texture_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+ CustomDataLayer *cdl, *cdl2;
+ int index;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+ index= CustomData_get_active_layer_index(&me->pdata, CD_MTEXPOLY);
+ cdl= (index == -1)? NULL: &me->pdata.layers[index];
+
+ index= CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV);
+ cdl2= (index == -1)? NULL: &me->ldata.layers[index];
+
+ if(!cdl)
+ return OPERATOR_CANCELLED;
+
+ delete_customdata_layer(me, cdl);
+ delete_customdata_layer(me, cdl2);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_uv_texture_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove UV Texture";
+ ot->idname= "MESH_OT_uv_texture_remove";
+
+ /* api callbacks */
+ ot->exec= uv_texture_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/*********************** vertex color operators ************************/
+
+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;
+ BMEditMesh *em;
+ MLoopCol *mcol;
+ int layernum;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(scene->obedit == ob) {
+ em= me->edit_btmesh;
+
+ layernum= CustomData_number_of_layers(&em->bm->ldata, CD_MLOOPCOL);
+ if(layernum >= MAX_MCOL)
+ return OPERATOR_CANCELLED;
+
+ BM_add_data_layer(em->bm, &em->bm->ldata, CD_MLOOPCOL);
+ CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum);
+ }
+ else {
+ layernum= CustomData_number_of_layers(&me->ldata, CD_MLOOPCOL);
+ if(layernum >= MAX_MCOL)
+ return OPERATOR_CANCELLED;
+
+ mcol= me->mloopcol;
+
+ if(me->mloopcol)
+ CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DUPLICATE, me->mloopcol, me->totloop);
+ else
+ CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop);
+
+ CustomData_set_layer_active(&me->ldata, CD_MLOOPCOL, layernum);
+ mesh_update_customdata_pointers(me);
+
+ if(!mcol)
+ shadeMeshMCol(scene, ob, me);
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_vertex_color_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Vertex Color";
+ ot->idname= "MESH_OT_vertex_color_add";
+
+ /* api callbacks */
+ ot->exec= vertex_color_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+ CustomDataLayer *cdl;
+ int index;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+ index= CustomData_get_active_layer_index(&me->ldata, CD_MLOOPCOL);
+ cdl= (index == -1)? NULL: &me->ldata.layers[index];
+
+ if(!cdl)
+ return OPERATOR_CANCELLED;
+
+ delete_customdata_layer(me, cdl);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_vertex_color_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Vertex Color";
+ ot->idname= "MESH_OT_vertex_color_remove";
+
+ /* api callbacks */
+ ot->exec= vertex_color_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/*********************** sticky operators ************************/
+
+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;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(me->msticky)
+ return OPERATOR_CANCELLED;
+
+ // XXX RE_make_sticky();
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_sticky_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Sticky";
+ ot->idname= "MESH_OT_sticky_add";
+
+ /* api callbacks */
+ ot->exec= sticky_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(!me->msticky)
+ return OPERATOR_CANCELLED;
+
+ CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert);
+ me->msticky= NULL;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_sticky_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Sticky";
+ ot->idname= "MESH_OT_sticky_remove";
+
+ /* api callbacks */
+ ot->exec= sticky_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 81a52618947..cfe8dd4352d 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -47,7 +47,6 @@
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_utildefines.h"
-#include "BKE_mesh.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -55,64 +54,186 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_screen.h"
#include "ED_mesh.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_view3d.h"
-#include "BIF_transform.h"
+#include "UI_interface.h"
#include "mesh_intern.h"
+/******************************** menus *************************************/
-static int mesh_add_duplicate_exec(bContext *C, wmOperator *op)
+static int vertex_specials_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Object *ob= CTX_data_edit_object(C);
- EditMesh *em= BKE_mesh_get_editmesh(ob->data);
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, "Vertex Specials", 0);
+ layout= uiPupMenuLayout(pup);
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
- adduplicateflag(em, SELECT);
+ uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles");
+ uiItemO(layout, "Merge...", 0, "MESH_OT_merge");
+ uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth");
+ uiItemO(layout, "Select Vertex Path", 0, "MESH_OT_select_vertex_path");
+ //uiItemO(layout, "Blend From Shape", 0, "MESH_OT_blend_from_shape");
+ //uiItemO(layout, "Propagate to All Shapes", 0, "MESH_OT_shape_propagate_to_all");
+
+ uiPupMenuEnd(C, pup);
- BKE_mesh_end_editmesh(ob->data, em);
- return OPERATOR_FINISHED;
+ return OPERATOR_CANCELLED;
}
-static int mesh_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static void MESH_OT_vertex_specials(wmOperatorType *ot)
{
- WM_cursor_wait(1);
- mesh_add_duplicate_exec(C, op);
- WM_cursor_wait(0);
+ /* identifiers */
+ ot->name= "Vertex Specials";
+ ot->idname= "MESH_OT_vertex_specials";
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+ /* api callbacks */
+ ot->invoke= vertex_specials_invoke;
+ ot->poll= ED_operator_editmesh;
+}
+
+static int edge_specials_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, "Edge Specials", 0);
+ layout= uiPupMenuLayout(pup);
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
+
+ uiItemO(layout, "Mark Seam", 0, "MESH_OT_mark_seam");
+ uiItemBooleanO(layout, "Clear Seam", 0, "MESH_OT_mark_seam", "clear", 1);
+ uiItemEnumO(layout, "Rotate Edge CW", 0, "MESH_OT_edge_rotate", "direction", 1);
+ uiItemEnumO(layout, "Rotate Edge CCW", 0, "MESH_OT_edge_rotate", "direction", 2);
+ //uiItemO(layout, "Loopcut", 0, "MESH_OT_loop_cut"); // CutEdgeloop(em, 1);
+ //uiItemO(layout, "Edge Slide", 0, "MESH_OT_edge_slide"); // EdgeSlide(em, 0,0.0);
+ uiItemO(layout, "Edge Loop", 0, "MESH_OT_loop_multi_select");
+ uiItemBooleanO(layout, "Edge Ring", 0, "MESH_OT_loop_multi_select", "ring", 1);
+ uiItemO(layout, NULL, 0, "MESH_OT_loop_to_region");
+ uiItemO(layout, NULL, 0, "MESH_OT_region_to_loop");
+ uiItemO(layout, "Mark Sharp", 0, "MESH_OT_mark_sharp");
+ uiItemBooleanO(layout, "Clear Sharp", 0, "MESH_OT_mark_sharp", "clear", 1);
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+static void MESH_OT_edge_specials(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Edge Specials";
+ ot->idname= "MESH_OT_edge_specials";
- return OPERATOR_FINISHED;
+ /* api callbacks */
+ ot->invoke= edge_specials_invoke;
+ ot->poll= ED_operator_editmesh;
}
-static void MESH_OT_duplicate_add(wmOperatorType *ot)
+static int face_specials_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, "Face Specials", 0);
+ layout= uiPupMenuLayout(pup);
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_flip_normals");
+ // uiItemO(layout, "Bevel", 0, "MESH_OT_bevel"); // bevelmenu(em)
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_smooth");
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_solid");
+ uiItemO(layout, NULL, 0, "MESH_OT_quads_convert_to_tris");
+ uiItemO(layout, NULL, 0, "MESH_OT_tris_convert_to_quads");
+ uiItemO(layout, NULL, 0, "MESH_OT_edge_flip");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_fill");
+ uiItemO(layout, NULL, 0, "MESH_OT_beauty_fill");
+
+ uiItemS(layout);
+
+ // uiItemO(layout, NULL, 0, "MESH_OT_face_mode"); // mesh_set_face_flags(em, 1);
+ // uiItemBooleanO(layout, NULL, 0, "MESH_OT_face_mode", "clear", 1); // mesh_set_face_flags(em, 0);
+ //
+ // uiItemS(layout);
+
+ uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_uvs_rotate", "direction");
+ uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_uvs_mirror", "axis");
+ uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_colors_rotate", "direction");
+ uiItemMenuEnumO(layout, NULL, 0, "MESH_OT_colors_mirror", "axis");
+
+ uiPupMenuEnd(C, pup);
+ return OPERATOR_CANCELLED;
+}
+
+static void MESH_OT_face_specials(wmOperatorType *ot)
+{
/* identifiers */
- ot->name= "Add Duplicate";
- ot->idname= "MESH_OT_duplicate_add";
+ ot->name= "Face Specials";
+ ot->idname= "MESH_OT_face_specials";
/* api callbacks */
- ot->invoke= mesh_add_duplicate_invoke;
- ot->exec= mesh_add_duplicate_exec;
-
+ ot->invoke= face_specials_invoke;
ot->poll= ED_operator_editmesh;
+}
+
+static int specials_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, "Specials", 0);
+ layout= uiPupMenuLayout(pup);
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
+
+ uiItemO(layout, "Subdivide", 0, "MESH_OT_subdivide");
+ uiItemFloatO(layout, "Subdivide Smooth", 0, "MESH_OT_subdivide", "smoothness", 1.0f);
+ uiItemO(layout, "Merge...", 0, "MESH_OT_merge");
+ uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles");
+ uiItemO(layout, "Hide", 0, "MESH_OT_hide");
+ uiItemO(layout, "Reveal", 0, "MESH_OT_reveal");
+ uiItemO(layout, "Select Inverse", 0, "MESH_OT_select_inverse");
+ uiItemO(layout, NULL, 0, "MESH_OT_flip_normals");
+ uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth");
+ // uiItemO(layout, "Bevel", 0, "MESH_OT_bevel"); // bevelmenu(em)
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_smooth");
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_solid");
+ //uiItemO(layout, "Blend From Shape", 0, "MESH_OT_blend_from_shape");
+ //uiItemO(layout, "Propagate to All Shapes", 0, "MESH_OT_shape_propagate_to_all");
+ uiItemO(layout, "Select Vertex Path", 0, "MESH_OT_select_vertex_path");
+
+ uiPupMenuEnd(C, pup);
- /* to give to transform */
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+ return OPERATOR_CANCELLED;
}
+static void MESH_OT_specials(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Specials";
+ ot->idname= "MESH_OT_specials";
+
+ /* api callbacks */
+ ot->invoke= specials_invoke;
+ ot->poll= ED_operator_editmesh;
+}
-/* ************************** registration **********************************/
+/**************************** registration **********************************/
void ED_operatortypes_mesh(void)
{
WM_operatortype_append(MESH_OT_select_all_toggle);
WM_operatortype_append(MESH_OT_select_more);
WM_operatortype_append(MESH_OT_select_less);
- WM_operatortype_append(MESH_OT_select_invert);
+ WM_operatortype_append(MESH_OT_select_inverse);
WM_operatortype_append(MESH_OT_select_non_manifold);
WM_operatortype_append(MESH_OT_select_linked);
WM_operatortype_append(MESH_OT_select_linked_pick);
@@ -120,12 +241,10 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_selection_type);
WM_operatortype_append(MESH_OT_hide);
WM_operatortype_append(MESH_OT_reveal);
+ WM_operatortype_append(MESH_OT_select_by_number_vertices);
WM_operatortype_append(MESH_OT_normals_make_consistent);
+ WM_operatortype_append(MESH_OT_merge);
WM_operatortype_append(MESH_OT_subdivide);
- WM_operatortype_append(MESH_OT_subdivide_multi);
- WM_operatortype_append(MESH_OT_subdivide_multi_fractal);
- WM_operatortype_append(MESH_OT_subdivide_smooth);
- WM_operatortype_append(MESH_OT_subdivs);
WM_operatortype_append(MESH_OT_faces_select_linked_flat);
WM_operatortype_append(MESH_OT_edges_select_sharp);
WM_operatortype_append(MESH_OT_primitive_plane_add);
@@ -140,7 +259,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_primitive_ico_sphere_add);
WM_operatortype_append(MESH_OT_fgon_clear);
WM_operatortype_append(MESH_OT_fgon_make);
- WM_operatortype_append(MESH_OT_duplicate_add);
+ WM_operatortype_append(MESH_OT_duplicate);
WM_operatortype_append(MESH_OT_remove_doubles);
WM_operatortype_append(MESH_OT_extrude);
WM_operatortype_append(MESH_OT_spin);
@@ -150,6 +269,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_split);
WM_operatortype_append(MESH_OT_extrude_repeat);
WM_operatortype_append(MESH_OT_edge_rotate);
+ WM_operatortype_append(MESH_OT_select_vertex_path);
WM_operatortype_append(MESH_OT_loop_to_region);
WM_operatortype_append(MESH_OT_region_to_loop);
@@ -173,19 +293,26 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_loop_select);
WM_operatortype_append(MESH_OT_edge_face_add);
WM_operatortype_append(MESH_OT_select_shortest_path);
- WM_operatortype_append(MESH_OT_vertices_select_similar);
- WM_operatortype_append(MESH_OT_edges_select_similar);
- WM_operatortype_append(MESH_OT_faces_select_similar);
+ WM_operatortype_append(MESH_OT_select_similar);
WM_operatortype_append(MESH_OT_loop_multi_select);
WM_operatortype_append(MESH_OT_mark_seam);
WM_operatortype_append(MESH_OT_mark_sharp);
WM_operatortype_append(MESH_OT_vertices_smooth);
- WM_operatortype_append(MESH_OT_flip_editnormals);
+ WM_operatortype_append(MESH_OT_flip_normals);
WM_operatortype_append(MESH_OT_knife_cut);
-
WM_operatortype_append(MESH_OT_rip);
- WM_operatortype_append(MESH_OT_bmesh_test);
+ WM_operatortype_append(MESH_OT_uv_texture_add);
+ WM_operatortype_append(MESH_OT_uv_texture_remove);
+ WM_operatortype_append(MESH_OT_vertex_color_add);
+ WM_operatortype_append(MESH_OT_vertex_color_remove);
+ WM_operatortype_append(MESH_OT_sticky_add);
+ WM_operatortype_append(MESH_OT_sticky_remove);
+
+ WM_operatortype_append(MESH_OT_vertex_specials);
+ WM_operatortype_append(MESH_OT_edge_specials);
+ WM_operatortype_append(MESH_OT_face_specials);
+ WM_operatortype_append(MESH_OT_specials);
}
/* note mesh keymap also for other space? */
@@ -210,7 +337,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
WM_keymap_add_item(keymap, "MESH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "MESH_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0);
WM_keymap_add_item(keymap, "MESH_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
@@ -220,28 +347,13 @@ void ED_keymap_mesh(wmWindowManager *wm)
RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_edges_select_sharp", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
- WM_keymap_add_item(keymap, "MESH_OT_select_random", SPACEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_vertices_transform_to_sphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT , 0);
- WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_CTRL , 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_seam", ONEKEY, KM_PRESS, KM_ALT , 0)->ptr,"clear",1);
-
- WM_keymap_add_item(keymap, "MESH_OT_mark_sharp", TWOKEY, KM_PRESS, KM_CTRL , 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_sharp", TWOKEY, KM_PRESS, KM_ALT , 0)->ptr,"set",1);
-
- /* temp hotkeys! */
- WM_keymap_add_item(keymap, "MESH_OT_vertices_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_edges_select_similar", GKEY, KM_PRESS, KM_SHIFT2|KM_CTRL, 0);
- WM_keymap_add_item(keymap, "MESH_OT_faces_select_similar", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL2, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
/* selection mode */
- kmi = WM_keymap_add_item(keymap, "MESH_OT_selection_type", TABKEY, KM_PRESS, KM_CTRL, 0);
- /*RNA_int_set(kmi->ptr, "type", 1);
- kmi = WM_keymap_add_item(keymap, "MESH_OT_selection_type", WKEY, KM_PRESS, 0, 0);
- RNA_int_set(kmi->ptr, "type", 2);
- kmi = WM_keymap_add_item(keymap, "MESH_OT_selection_type", EKEY, KM_PRESS, 0, 0);
- RNA_int_set(kmi->ptr, "type", 3);*/
-
+ WM_keymap_add_item(keymap, "MESH_OT_selection_type", TABKEY, KM_PRESS, KM_CTRL, 0);
+
/* hide */
WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
@@ -250,27 +362,20 @@ void ED_keymap_mesh(wmWindowManager *wm)
/* tools */
WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1);
- WM_keymap_add_item(keymap, "MESH_OT_vertices_smooth", THREEKEY, KM_PRESS, KM_CTRL , 0);
- WM_keymap_add_item(keymap, "MESH_OT_flip_editnormals", THREEKEY, KM_PRESS, KM_ALT , 0);
- WM_keymap_add_item(keymap, "MESH_OT_subdivs", WKEY, KM_PRESS, 0, 0); // this is the menu
- /*WM_keymap_add_item(keymap, "MESH_OT_subdivide_multi", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_subdivide_multi_fractal", WKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_subdivide_smooth", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);*/
- WM_keymap_add_item(keymap, "MESH_OT_remove_doubles", VKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_extrude", EKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_spin", RKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_screw", NINEKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "VIEW3D_OT_editmesh_face_toolbox", FKEY, KM_PRESS, KM_CTRL, 0); /* operators below are in this toolbox */
WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "MESH_OT_beauty_fill", FKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_edge_flip", FKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_split", FOURKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "MESH_OT_extrude_repeat", FOURKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_extrude_repeat", FOURKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_edge_rotate", FIVEKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_loop_to_region",SIXKEY, KM_PRESS, KM_CTRL, 0);
@@ -282,10 +387,11 @@ void ED_keymap_mesh(wmWindowManager *wm)
WM_keymap_add_item(keymap, "MESH_OT_colors_mirror",EIGHTKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_rip",VKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_merge", MKEY, KM_PRESS, KM_ALT, 0);
/* add/remove */
WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_duplicate_add", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_mesh_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, KM_SHIFT, 0);
/* use KM_RELEASE because same key is used for tweaks */
@@ -297,8 +403,13 @@ void ED_keymap_mesh(wmWindowManager *wm)
WM_keymap_add_item(keymap, "MESH_OT_fgon_clear", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0);
+
+ /* menus */
+ WM_keymap_add_item(keymap, "MESH_OT_vertex_specials", VKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_edge_specials", EKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_face_specials", FKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_specials", WKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_bmesh_test", JKEY, KM_PRESS, 0, 0);
/* UV's */
WM_keymap_add_item(keymap, "UV_OT_mapping_menu", UKEY, KM_PRESS, 0, 0);
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 56417ec4c08..5f406cb4db8 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -38,16 +38,17 @@
#include "MEM_guardedalloc.h"
#include "DNA_image_types.h"
-#include "DNA_mesh_types.h"
+#include "DNA_key_types.h"
+#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
-#include "DNA_material_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
-#include "DNA_world_types.h"
#include "DNA_windowmanager_types.h"
+#include "DNA_world_types.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -58,10 +59,12 @@
#include "BKE_blender.h"
+#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_customdata.h"
#include "BKE_global.h"
#include "BKE_image.h"
+#include "BKE_key.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
@@ -87,15 +90,13 @@
#include "ED_object.h"
#include "ED_view3d.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
/* own include */
#include "mesh_intern.h"
-
-/* from rendercode.c */
-#define VECMUL(dest, f) dest[0]*= f; dest[1]*= f; dest[2]*= f
-
/* XXX */
-static void BIF_undo_push() {}
static void waitcursor() {}
static void error() {}
static int pupmenu() {return 0;}
@@ -104,268 +105,434 @@ static int pupmenu() {return 0;}
/* * ********************** no editmode!!! *********** */
+/*********************** JOIN ***************************/
+
/* join selected meshes into the active mesh, context sensitive
return 0 if no join is made (error) and 1 of the join is done */
-int join_mesh(Scene *scene, View3D *v3d, wmOperator *op)
+
+int join_mesh_exec(bContext *C, wmOperator *op)
{
- Base *base, *nextb;
- Object *ob;
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
Material **matar, *ma;
Mesh *me;
- MVert *mvert, *mvertmain;
+ MVert *mvert, *mv, *mvertmain;
MEdge *medge = NULL, *medgemain;
MFace *mface = NULL, *mfacemain;
- float imat[4][4], cmat[4][4];
- int a, b, totcol, totedge=0, totvert=0, totface=0, ok=0, vertofs, map[MAXMAT];
- int i, j, index, haskey=0, hasmulti=0, edgeofs, faceofs;
+ MPoly *mpoly = NULL, *mpolymain;
+ MLoop *mloop = NULL, *mloopmain;
+ Key *key, *nkey=NULL;
+ KeyBlock *kb, *okb, *kbn;
+ float imat[4][4], cmat[4][4], *fp1, *fp2, curpos;
+ int a, b, totcol, totmat=0, totedge=0, totvert=0, totface=0, ok=0;
+ int totloop=0, totpoly=0, vertofs, *matmap;
+ int i, j, index, haskey=0, edgeofs, faceofs, loopofs, polyofs;
bDeformGroup *dg, *odg;
MDeformVert *dvert;
- CustomData vdata, edata, fdata;
+ CustomData vdata, edata, fdata, ldata, pdata;
- if(scene->obedit) return 0;
+ if(scene->obedit)
+ return OPERATOR_CANCELLED;
- ob= OBACT;
- if(!ob || ob->type!=OB_MESH) return 0;
+ /* ob is the object we are adding geometry to */
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
- if (object_data_is_libdata(ob)) {
-// XXX error_libdata();
- return 0;
- }
-
/* count & check */
- base= FIRSTBASE;
- while(base) {
- if(TESTBASELIB_BGMODE(base)) { /* BGMODE since python can access */
- if(base->object->type==OB_MESH) {
- me= base->object->data;
- totvert+= me->totvert;
- totface+= me->totface;
-
- if(base->object == ob) ok= 1;
-
- if(me->key) {
- haskey= 1;
- break;
- }
- if(me->mr) {
- hasmulti= 1;
- break;
- }
- }
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base->object->type==OB_MESH) {
+ me= base->object->data;
+
+ totvert+= me->totvert;
+ totedge+= me->totedge;
+ totface+= me->totface;
+ totloop+= me->totloop;
+ totpoly+= me->totpoly;
+ totmat+= base->object->totcol;
+
+ if(base->object == ob)
+ ok= 1;
+
+ /* check for shapekeys */
+ if(me->key)
+ haskey++;
}
- base= base->next;
}
+ CTX_DATA_END;
- if(haskey) {
- BKE_report(op->reports, RPT_ERROR, "Can't join meshes with vertex keys");
- return 0;
- }
- if(hasmulti) {
- BKE_report(op->reports, RPT_ERROR, "Can't join meshes with Multires");
- return 0;
- }
/* that way the active object is always selected */
- if(ok==0) return 0;
+ if(ok==0)
+ return OPERATOR_CANCELLED;
- if(totvert==0 || totvert>MESH_MAX_VERTS) return 0;
-
- /* if needed add edges to other meshes */
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB_BGMODE(base)) {
- if(base->object->type==OB_MESH) {
- me= base->object->data;
- totedge += me->totedge;
- }
- }
- }
+ /* only join meshes if there are verts to join, there aren't too many, and we only had one mesh selected */
+ me= (Mesh *)ob->data;
+ key= me->key;
+ if(totvert==0 || totvert>MESH_MAX_VERTS || totvert==me->totvert)
+ return OPERATOR_CANCELLED;
/* new material indices and material array */
- matar= MEM_callocN(sizeof(void *)*MAXMAT, "join_mesh");
+ matar= MEM_callocN(sizeof(void*)*totmat, "join_mesh matar");
+ matmap= MEM_callocN(sizeof(int)*totmat, "join_mesh matmap");
totcol= ob->totcol;
/* obact materials in new main array, is nicer start! */
- for(a=1; a<=ob->totcol; a++) {
- matar[a-1]= give_current_material(ob, a);
- id_us_plus((ID *)matar[a-1]);
+ for(a=0; a<ob->totcol; a++) {
+ matar[a]= give_current_material(ob, a+1);
+ id_us_plus((ID *)matar[a]);
/* increase id->us : will be lowered later */
}
- base= FIRSTBASE;
- while(base) {
- if(TESTBASELIB_BGMODE(base)) {
- if(ob!=base->object && base->object->type==OB_MESH) {
- me= base->object->data;
-
- // Join this object's vertex groups to the base one's
- for (dg=base->object->defbase.first; dg; dg=dg->next){
- /* See if this group exists in the object */
- for (odg=ob->defbase.first; odg; odg=odg->next){
- if (!strcmp(odg->name, dg->name)){
- break;
- }
- }
- if (!odg){
- odg = MEM_callocN (sizeof(bDeformGroup), "join deformGroup");
- memcpy (odg, dg, sizeof(bDeformGroup));
- BLI_addtail(&ob->defbase, odg);
+ /* - if destination mesh had shapekeys, move them somewhere safe, and set up placeholders
+ * with arrays that are large enough to hold shapekey data for all meshes
+ * - if destination mesh didn't have shapekeys, but we encountered some in the meshes we're
+ * joining, set up a new keyblock and assign to the mesh
+ */
+ if(key) {
+ /* make a duplicate copy that will only be used here... (must remember to free it!) */
+ nkey= copy_key(key);
+
+ /* for all keys in old block, clear data-arrays */
+ for(kb= key->block.first; kb; kb= kb->next) {
+ if(kb->data) MEM_freeN(kb->data);
+ kb->data= MEM_callocN(sizeof(float)*3*totvert, "join_shapekey");
+ kb->totelem= totvert;
+ kb->weights= NULL;
+ }
+ }
+ else if(haskey) {
+ /* add a new key-block and add to the mesh */
+ key= me->key= add_key((ID *)me);
+ key->type = KEY_RELATIVE;
+ }
+
+ /* first pass over objects - copying materials and vertexgroups across */
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ /* only act if a mesh, and not the one we're joining to */
+ if((ob!=base->object) && (base->object->type==OB_MESH)) {
+ me= base->object->data;
+
+ /* Join this object's vertex groups to the base one's */
+ for(dg=base->object->defbase.first; dg; dg=dg->next) {
+ /* See if this group exists in the object (if it doesn't, add it to the end) */
+ for(odg=ob->defbase.first; odg; odg=odg->next) {
+ if(!strcmp(odg->name, dg->name)) {
+ break;
}
-
}
- if (ob->defbase.first && ob->actdef==0)
- ob->actdef=1;
-
- if(me->totvert) {
+ if(!odg) {
+ odg = MEM_callocN(sizeof(bDeformGroup), "join deformGroup");
+ memcpy(odg, dg, sizeof(bDeformGroup));
+ BLI_addtail(&ob->defbase, odg);
+ }
+ }
+ if(ob->defbase.first && ob->actdef==0)
+ ob->actdef=1;
+
+
+ if(me->totvert) {
+ /* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */
+ if(totcol < MAXMAT-1) {
for(a=1; a<=base->object->totcol; a++) {
ma= give_current_material(base->object, a);
- if(ma) {
- for(b=0; b<totcol; b++) {
- if(ma == matar[b]) break;
- }
- if(b==totcol) {
- matar[b]= ma;
+
+ for(b=0; b<totcol; b++) {
+ if(ma == matar[b]) break;
+ }
+ if(b==totcol) {
+ matar[b]= ma;
+ if(ma)
ma->id.us++;
- totcol++;
+ totcol++;
+ }
+ if(totcol>=MAXMAT-1)
+ break;
+ }
+ }
+
+ /* if this mesh has shapekeys, check if destination mesh already has matching entries too */
+ if(me->key && key) {
+ for(kb= me->key->block.first; kb; kb= kb->next) {
+ /* if key doesn't exist in destination mesh, add it */
+ if(key_get_named_keyblock(key, kb->name) == NULL) {
+ /* copy this existing one over to the new shapekey block */
+ kbn= MEM_dupallocN(kb);
+ kbn->prev= kbn->next= NULL;
+
+ /* adjust adrcode and other settings to fit (allocate a new data-array) */
+ kbn->data= MEM_callocN(sizeof(float)*3*totvert, "joined_shapekey");
+ kbn->totelem= totvert;
+ kbn->weights= NULL;
+
+ okb= key->block.last;
+ curpos= (okb) ? okb->pos : -0.1f;
+ if(key->type == KEY_RELATIVE)
+ kbn->pos= curpos + 0.1f;
+ else
+ kbn->pos= curpos;
+
+ BLI_addtail(&key->block, kbn);
+ kbn->adrcode= key->totkey;
+ key->totkey++;
+ if(key->totkey==1) key->refkey= kbn;
+
+ // XXX 2.5 Animato
+#if 0
+ /* also, copy corresponding ipo-curve to ipo-block if applicable */
+ if(me->key->ipo && key->ipo) {
+ // FIXME... this is a luxury item!
+ puts("FIXME: ignoring IPO's when joining shapekeys on Meshes for now...");
}
- if(totcol>=MAXMAT-1) break;
+#endif
}
}
}
}
- if(totcol>=MAXMAT-1) break;
}
- base= base->next;
}
-
- me= ob->data;
-
+ CTX_DATA_END;
+
+ /* setup new data for destination mesh */
memset(&vdata, 0, sizeof(vdata));
memset(&edata, 0, sizeof(edata));
memset(&fdata, 0, sizeof(fdata));
+ memset(&ldata, 0, sizeof(ldata));
+ memset(&pdata, 0, sizeof(pdata));
mvert= CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
medge= CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
mface= CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface);
-
+ mloop= CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop);
+ mpoly= CustomData_add_layer(&pdata, CD_MPOLY, CD_CALLOC, NULL, totpoly);
+
mvertmain= mvert;
medgemain= medge;
mfacemain= mface;
-
- /* inverse transorm all selected meshes in this object */
- Mat4Invert(imat, ob->obmat);
-
+ mloopmain = mloop;
+ mpolymain = mpoly;
+
vertofs= 0;
edgeofs= 0;
faceofs= 0;
- base= FIRSTBASE;
- while(base) {
- nextb= base->next;
- if (TESTBASELIB_BGMODE(base)) {
- if(base->object->type==OB_MESH) {
+ loopofs= 0;
+ polyofs= 0;
+
+ /* inverse transform for all selected meshes in this object */
+ Mat4Invert(imat, ob->obmat);
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ /* only join if this is a mesh */
+ if(base->object->type==OB_MESH) {
+ me= base->object->data;
+
+ if(me->totvert) {
+ /* standard data */
+ CustomData_merge(&me->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
+ CustomData_copy_data(&me->vdata, &vdata, 0, vertofs, me->totvert);
- me= base->object->data;
+ /* vertex groups */
+ dvert= CustomData_get(&vdata, vertofs, CD_MDEFORMVERT);
- if(me->totvert) {
- CustomData_merge(&me->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
- CustomData_copy_data(&me->vdata, &vdata, 0, vertofs, me->totvert);
-
- dvert= CustomData_get(&vdata, vertofs, CD_MDEFORMVERT);
-
- /* NEW VERSION */
- if (dvert){
- for (i=0; i<me->totvert; i++){
- for (j=0; j<dvert[i].totweight; j++){
- // Find the old vertex group
- odg = BLI_findlink (&base->object->defbase, dvert[i].dw[j].def_nr);
- if(odg) {
- // Search for a match in the new object
- for (dg=ob->defbase.first, index=0; dg; dg=dg->next, index++){
- if (!strcmp(dg->name, odg->name)){
- dvert[i].dw[j].def_nr = index;
- break;
- }
+ /* NB: vertex groups here are new version */
+ if(dvert) {
+ for(i=0; i<me->totvert; i++) {
+ for(j=0; j<dvert[i].totweight; j++) {
+ /* Find the old vertex group */
+ odg = BLI_findlink(&base->object->defbase, dvert[i].dw[j].def_nr);
+ if(odg) {
+ /* Search for a match in the new object, and set new index */
+ for(dg=ob->defbase.first, index=0; dg; dg=dg->next, index++) {
+ if(!strcmp(dg->name, odg->name)) {
+ dvert[i].dw[j].def_nr = index;
+ break;
}
}
}
}
}
-
- if(base->object != ob) {
- /* watch this: switch matmul order really goes wrong */
- Mat4MulMat4(cmat, base->object->obmat, imat);
-
- a= me->totvert;
- while(a--) {
- Mat4MulVecfl(cmat, mvert->co);
- mvert++;
+ }
+
+ /* if this is the object we're merging into, no need to do anything */
+ if(base->object != ob) {
+ /* watch this: switch matmul order really goes wrong */
+ Mat4MulMat4(cmat, base->object->obmat, imat);
+
+ /* transform vertex coordinates into new space */
+ for(a=0, mv=mvert; a < me->totvert; a++, mv++) {
+ Mat4MulVecfl(cmat, mv->co);
+ }
+
+ /* for each shapekey in destination mesh:
+ * - if there's a matching one, copy it across (will need to transform vertices into new space...)
+ * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space)
+ */
+ if(key) {
+ /* if this mesh has any shapekeys, check first, otherwise just copy coordinates */
+ for(kb= key->block.first; kb; kb= kb->next) {
+ /* get pointer to where to write data for this mesh in shapekey's data array */
+ fp1= ((float *)kb->data) + (vertofs*3);
+
+ /* check if this mesh has such a shapekey */
+ okb= key_get_named_keyblock(me->key, kb->name);
+ if(okb) {
+ /* copy this mesh's shapekey to the destination shapekey (need to transform first) */
+ fp2= ((float *)(okb->data));
+ for(a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
+ VECCOPY(fp1, fp2);
+ Mat4MulVecfl(cmat, fp1);
+ }
+ }
+ else {
+ /* copy this mesh's vertex coordinates to the destination shapekey */
+ mv= mvert;
+ for(a=0; a < me->totvert; a++, fp1+=3, mv++) {
+ VECCOPY(fp1, mv->co);
+ }
+ }
}
}
- else mvert+= me->totvert;
}
- if(me->totface) {
-
- /* make mapping for materials */
- memset(map, 0, 4*MAXMAT);
- for(a=1; a<=base->object->totcol; a++) {
- ma= give_current_material(base->object, a);
- if(ma) {
- for(b=0; b<totcol; b++) {
- if(ma == matar[b]) {
- map[a-1]= b;
- break;
+ else {
+ /* for each shapekey in destination mesh:
+ * - if it was an 'original', copy the appropriate data from nkey
+ * - otherwise, copy across plain coordinates (no need to transform coordinates)
+ */
+ if(key) {
+ for(kb= key->block.first; kb; kb= kb->next) {
+ /* get pointer to where to write data for this mesh in shapekey's data array */
+ fp1= ((float *)kb->data) + (vertofs*3);
+
+ /* check if this was one of the original shapekeys */
+ okb= key_get_named_keyblock(nkey, kb->name);
+ if(okb) {
+ /* copy this mesh's shapekey to the destination shapekey */
+ fp2= ((float *)(okb->data));
+ for(a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
+ VECCOPY(fp1, fp2);
+ }
+ }
+ else {
+ /* copy base-coordinates to the destination shapekey */
+ mv= mvert;
+ for(a=0; a < me->totvert; a++, fp1+=3, mv++) {
+ VECCOPY(fp1, mv->co);
}
}
}
}
-
- CustomData_merge(&me->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface);
- CustomData_copy_data(&me->fdata, &fdata, 0, faceofs, me->totface);
-
- for(a=0; a<me->totface; a++, mface++) {
- mface->v1+= vertofs;
- mface->v2+= vertofs;
- mface->v3+= vertofs;
- if(mface->v4) mface->v4+= vertofs;
-
- mface->mat_nr= map[(int)mface->mat_nr];
+ }
+
+ /* advance mvert pointer to end of base mesh's data */
+ mvert+= me->totvert;
+ }
+
+ if(me->totface) {
+ /* make mapping for materials */
+ for(a=1; a<=base->object->totcol; a++) {
+ ma= give_current_material(base->object, a);
+
+ for(b=0; b<totcol; b++) {
+ if(ma == matar[b]) {
+ matmap[a-1]= b;
+ break;
+ }
}
-
- faceofs += me->totface;
}
- if(me->totedge) {
- CustomData_merge(&me->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
- CustomData_copy_data(&me->edata, &edata, 0, edgeofs, me->totedge);
+ CustomData_merge(&me->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface);
+ CustomData_copy_data(&me->fdata, &fdata, 0, faceofs, me->totface);
+
+ for(a=0; a<me->totface; a++, mface++) {
+ mface->v1+= vertofs;
+ mface->v2+= vertofs;
+ mface->v3+= vertofs;
+ if(mface->v4) mface->v4+= vertofs;
+
+ mface->mat_nr= matmap[(int)mface->mat_nr];
+ }
+
+ faceofs += me->totface;
+ }
+
+ if(me->totedge) {
+ CustomData_merge(&me->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
+ CustomData_copy_data(&me->edata, &edata, 0, edgeofs, me->totedge);
+
+ for(a=0; a<me->totedge; a++, medge++) {
+ medge->v1+= vertofs;
+ medge->v2+= vertofs;
+ }
+
+ edgeofs += me->totedge;
+ }
- for(a=0; a<me->totedge; a++, medge++) {
- medge->v1+= vertofs;
- medge->v2+= vertofs;
+ if (me->totloop) {
+ CustomData_merge(&me->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop);
+ CustomData_copy_data(&me->ldata, &ldata, 0, loopofs, me->totloop);
+
+ for(a=0; a<me->totloop; a++, mloop++) {
+ mloop->v += vertofs;
+ mloop->e += edgeofs;
+ }
+
+ loopofs += me->totloop;
+ }
+
+ if(me->totpoly) {
+ /* make mapping for materials */
+ for(a=1; a<=base->object->totcol; a++) {
+ ma= give_current_material(base->object, a);
+
+ for(b=0; b<totcol; b++) {
+ if(ma == matar[b]) {
+ matmap[a-1]= b;
+ break;
+ }
}
-
- edgeofs += me->totedge;
}
- vertofs += me->totvert;
+ CustomData_merge(&me->pdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly);
+ CustomData_copy_data(&me->pdata, &pdata, 0, polyofs, me->totpoly);
+
+ for(a=0; a<me->totpoly; a++, mpoly++) {
+ mpoly->loopstart += loopofs;
+ mpoly->mat_nr= matmap[(int)mpoly->mat_nr];
+ }
- if(base->object!=ob)
- ED_base_object_free_and_unlink(scene, base);
+ polyofs += me->totface;
}
+
+ /* vertofs is used to help newly added verts be reattached to their edge/face
+ * (cannot be set earlier, or else reattaching goes wrong)
+ */
+ vertofs += me->totvert;
+
+ /* free base, now that data is merged */
+ if(base->object != ob)
+ ED_base_object_free_and_unlink(scene, base);
}
- base= nextb;
}
+ CTX_DATA_END;
+ /* return to mesh we're merging to */
me= ob->data;
CustomData_free(&me->vdata, me->totvert);
CustomData_free(&me->edata, me->totedge);
CustomData_free(&me->fdata, me->totface);
+ CustomData_free(&me->ldata, me->totloop);
+ CustomData_free(&me->pdata, me->totpoly);
me->totvert= totvert;
me->totedge= totedge;
me->totface= totface;
+ me->totloop= totloop;
+ me->totpoly= totpoly;
me->vdata= vdata;
me->edata= edata;
me->fdata= fdata;
+ me->ldata= ldata;
+ me->pdata= pdata;
mesh_update_customdata_pointers(me);
@@ -379,30 +546,53 @@ int join_mesh(Scene *scene, View3D *v3d, wmOperator *op)
if(ma) ma->id.us--;
}
if(ob->mat) MEM_freeN(ob->mat);
+ if(ob->matbits) MEM_freeN(ob->matbits);
if(me->mat) MEM_freeN(me->mat);
- ob->mat= me->mat= 0;
+ ob->mat= me->mat= NULL;
+ ob->matbits= NULL;
if(totcol) {
me->mat= matar;
ob->mat= MEM_callocN(sizeof(void *)*totcol, "join obmatar");
+ ob->matbits= MEM_callocN(sizeof(char)*totcol, "join obmatbits");
}
- else MEM_freeN(matar);
+ else
+ MEM_freeN(matar);
ob->totcol= me->totcol= totcol;
ob->colbits= 0;
+
+ MEM_freeN(matmap);
/* other mesh users */
test_object_materials((ID *)me);
- DAG_scene_sort(scene); // removed objects, need to rebuild dag before editmode call
+ /* free temp copy of destination shapekeys (if applicable) */
+ if(nkey) {
+ // XXX 2.5 Animato
+#if 0
+ /* free it's ipo too - both are not actually freed from memory yet as ID-blocks */
+ if(nkey->ipo) {
+ free_ipo(nkey->ipo);
+ BLI_remlink(&G.main->ipo, nkey->ipo);
+ MEM_freeN(nkey->ipo);
+ }
+#endif
+
+ free_key(nkey);
+ BLI_remlink(&G.main->key, nkey);
+ MEM_freeN(nkey);
+ }
-// XXX enter_editmode(EM_WAITCURSOR);
-// exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo
+ DAG_scene_sort(scene); // removed objects, need to rebuild dag before editmode call
- BIF_undo_push("Join Mesh");
- return 1;
-}
+ ED_object_enter_editmode(C, EM_WAITCURSOR);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ return OPERATOR_FINISHED;
+}
/* ********************** SORT FACES ******************* */
@@ -516,14 +706,14 @@ void sort_faces(Scene *scene, View3D *v3d)
else face_sort_floats[i] = reverse;
} else {
/* find the faces center */
- VECADD(vec, (me->mvert+mf->v1)->co, (me->mvert+mf->v2)->co);
+ VecAddf(vec, (me->mvert+mf->v1)->co, (me->mvert+mf->v2)->co);
if (mf->v4) {
- VECADD(vec, vec, (me->mvert+mf->v3)->co);
- VECADD(vec, vec, (me->mvert+mf->v4)->co);
- VECMUL(vec, 0.25f);
+ VecAddf(vec, vec, (me->mvert+mf->v3)->co);
+ VecAddf(vec, vec, (me->mvert+mf->v4)->co);
+ VecMulf(vec, 0.25f);
} else {
- VECADD(vec, vec, (me->mvert+mf->v3)->co);
- VECMUL(vec, 1.0f/3.0f);
+ VecAddf(vec, vec, (me->mvert+mf->v3)->co);
+ VecMulf(vec, 1.0f/3.0f);
} /* done */
if (event == 1) { /* sort on view axis */
diff --git a/source/blender/editors/object/Makefile b/source/blender/editors/object/Makefile
index c0312023bfd..70ada46c80f 100644
--- a/source/blender/editors/object/Makefile
+++ b/source/blender/editors/object/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/object/editconstraint.c b/source/blender/editors/object/editconstraint.c
index ff2f79e7cdb..7be4697d0c8 100644
--- a/source/blender/editors/object/editconstraint.c
+++ b/source/blender/editors/object/editconstraint.c
@@ -81,7 +81,6 @@ static int pupmenu() {return 0;}
/* -------------- Get Active Constraint Data ---------------------- */
-
/* if object in posemode, active bone constraints, else object constraints */
ListBase *get_active_constraints (Object *ob)
{
@@ -117,63 +116,6 @@ bConstraint *get_active_constraint (Object *ob)
return NULL;
}
-
-/* single channel, for ipo */
-bConstraintChannel *get_active_constraint_channel (Scene *scene, Object *ob)
-{
- bConstraint *con;
-
- if (ob->flag & OB_POSEMODE) {
- //if (ob->action) { // XXX old animation system
- bPoseChannel *pchan;
-
- pchan = get_active_posechannel(ob);
- if (pchan) {
- for (con= pchan->constraints.first; con; con= con->next) {
- if (con->flag & CONSTRAINT_ACTIVE)
- break;
- }
-
- if (con) {
-#if 0 // XXX old animation system
- bActionChannel *achan = get_action_channel(ob->action, pchan->name);
- if (achan) {
- for (chan= achan->constraintChannels.first; chan; chan= chan->next) {
- if (!strcmp(chan->name, con->name))
- break;
- }
- return chan;
- }
-#endif // XXX old animation system
- }
- }
- //} // xxx old animation system
- }
- else {
- for (con= ob->constraints.first; con; con= con->next) {
- if (con->flag & CONSTRAINT_ACTIVE)
- break;
- }
-
- if (con) {
-#if 0 // XXX old animation system
- ListBase *lb= get_active_constraint_channels(scene, ob, 0);
-
- if (lb) {
- for (chan= lb->first; chan; chan= chan->next) {
- if (!strcmp(chan->name, con->name))
- break;
- }
-
- return chan;
- }
-#endif // XXX old animation system
- }
- }
-
- return NULL;
-}
-
/* -------------- Constraint Management (Add New, Remove, Rename) -------------------- */
/* ------------- PyConstraints ------------------ */
@@ -790,15 +732,17 @@ void object_test_constraints (Object *owner)
/* ------------- Child-Of Constraint ------------------ */
/* ChildOf Constraint - set inverse callback */
-void childof_const_setinv (void *conv, void *scenev)
+static int childof_set_inverse_exec (bContext *C, wmOperator *op)
{
- bConstraint *con= (bConstraint *)conv;
- Scene *scene= (Scene *)scenev;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_ChildOfConstraint);
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= ptr.id.data;
+ bConstraint *con= ptr.data;
bChildOfConstraint *data= (bChildOfConstraint *)con->data;
- Object *ob= OBACT;
bPoseChannel *pchan= NULL;
/* try to find a pose channel */
+ // TODO: get from context instead?
if (ob && ob->pose)
pchan= get_active_posechannel(ob);
@@ -839,16 +783,53 @@ void childof_const_setinv (void *conv, void *scenev)
}
else
Mat4One(data->invmat);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+
+ return OPERATOR_FINISHED;
}
+void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Set Inverse";
+ ot->idname= "CONSTRAINT_OT_childof_set_inverse";
+ ot->description= "Set inverse correction for ChildOf constraint.";
+
+ ot->exec= childof_set_inverse_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+
/* ChildOf Constraint - clear inverse callback */
-void childof_const_clearinv (void *conv, void *unused)
+static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
{
- bConstraint *con= (bConstraint *)conv;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_ChildOfConstraint);
+ Object *ob= ptr.id.data;
+ bConstraint *con= ptr.data;
bChildOfConstraint *data= (bChildOfConstraint *)con->data;
/* simply clear the matrix */
Mat4One(data->invmat);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Clear Inverse";
+ ot->idname= "CONSTRAINT_OT_childof_clear_inverse";
+ ot->description= "Clear inverse correction for ChildOf constraint.";
+
+ ot->exec= childof_clear_inverse_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************************** BUTTONS ****************************/
@@ -859,7 +840,6 @@ void ED_object_constraint_rename(Object *ob, bConstraint *con, char *oldname)
bConstraint *tcon;
ListBase *conlist= NULL;
int from_object= 0;
- char *channame="";
/* get context by searching for con (primitive...) */
for (tcon= ob->constraints.first; tcon; tcon= tcon->next) {
@@ -869,7 +849,6 @@ void ED_object_constraint_rename(Object *ob, bConstraint *con, char *oldname)
if (tcon) {
conlist= &ob->constraints;
- channame= "Object";
from_object= 1;
}
else if (ob->pose) {
@@ -886,7 +865,6 @@ void ED_object_constraint_rename(Object *ob, bConstraint *con, char *oldname)
if (tcon) {
conlist= &pchan->constraints;
- channame= pchan->name;
}
}
@@ -896,7 +874,7 @@ void ED_object_constraint_rename(Object *ob, bConstraint *con, char *oldname)
}
/* first make sure it's a unique name within context */
- unique_constraint_name (con, conlist);
+ unique_constraint_name(con, conlist);
}
@@ -919,77 +897,111 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
if(con==origcon) con->flag |= CONSTRAINT_ACTIVE;
else con->flag &= ~CONSTRAINT_ACTIVE;
}
-
- /* make sure ipowin and buttons shows it */
- if(ob->ipowin==ID_CO) {
- // XXX allqueue(REDRAWIPO, ID_CO);
- // XXX allspace(REMAKEIPO, 0);
- // XXX allqueue(REDRAWNLA, 0);
- }
- // XXX allqueue(REDRAWBUTSOBJECT, 0);
}
-int ED_object_constraint_delete(ReportList *reports, Object *ob, bConstraint *con)
+static int constraint_delete_exec (bContext *C, wmOperator *op)
{
- bConstraintChannel *chan;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ Object *ob= ptr.id.data;
+ bConstraint *con= ptr.data;
ListBase *lb;
- /* remove ipo channel */
- lb= NULL; // XXX get_active_constraint_channels(ob, 0);
- if(lb) {
- chan = NULL; // XXX get_constraint_channel(lb, con->name);
- if(chan) {
- if(chan->ipo) chan->ipo->id.us--;
- BLI_freelinkN(lb, chan);
- }
- }
-
/* remove constraint itself */
lb= get_active_constraints(ob);
free_constraint_data(con);
BLI_freelinkN(lb, con);
ED_object_constraint_set_active(ob, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
- return 1;
+ return OPERATOR_FINISHED;
}
-int ED_object_constraint_move_down(ReportList *reports, Object *ob, bConstraint *constr)
+void CONSTRAINT_OT_delete (wmOperatorType *ot)
{
- bConstraint *con;
- ListBase *conlist;
-
- if(constr->next) {
- conlist = get_active_constraints(ob);
- for(con= conlist->first; con; con= con->next) {
- if(con==constr) {
- BLI_remlink(conlist, con);
- BLI_insertlink(conlist, con->next, con);
- return 1;
- }
- }
+ /* identifiers */
+ ot->name= "Delete Constraint";
+ ot->idname= "CONSTRAINT_OT_delete";
+ ot->description= "Remove constraitn from constraint stack.";
+
+ /* callbacks */
+ ot->exec= constraint_delete_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int constraint_move_down_exec (bContext *C, wmOperator *op)
+{
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ Object *ob= ptr.id.data;
+ bConstraint *con= ptr.data;
+
+ if (con->next) {
+ ListBase *conlist= get_active_constraints(ob);
+ bConstraint *nextCon= con->next;
+
+ /* insert the nominated constraint after the one that used to be after it */
+ BLI_remlink(conlist, con);
+ BLI_insertlinkafter(conlist, nextCon, con);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+
+ return OPERATOR_FINISHED;
}
+
+ return OPERATOR_CANCELLED;
+}
- return 0;
+void CONSTRAINT_OT_move_down (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Move Constraint Down";
+ ot->idname= "CONSTRAINT_OT_move_down";
+ ot->description= "Move constraint down constraint stack.";
+
+ /* callbacks */
+ ot->exec= constraint_move_down_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-int ED_object_constraint_move_up(ReportList *reports, Object *ob, bConstraint *constr)
+
+static int constraint_move_up_exec (bContext *C, wmOperator *op)
{
- bConstraint *con;
- ListBase *conlist;
-
- if(constr->prev) {
- conlist = get_active_constraints(ob);
- for(con= conlist->first; con; con= con->next) {
- if(con==constr) {
- BLI_remlink(conlist, con);
- BLI_insertlink(conlist, con->prev->prev, con);
- return 1;
- }
- }
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
+ Object *ob= ptr.id.data;
+ bConstraint *con= ptr.data;
+
+ if (con->prev) {
+ ListBase *conlist= get_active_constraints(ob);
+ bConstraint *prevCon= con->prev;
+
+ /* insert the nominated constraint before the one that used to be before it */
+ BLI_remlink(conlist, con);
+ BLI_insertlinkbefore(conlist, prevCon, con);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
+
+ return OPERATOR_FINISHED;
}
+
+ return OPERATOR_CANCELLED;
+}
- return 0;
+void CONSTRAINT_OT_move_up (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Move Constraint Up";
+ ot->idname= "CONSTRAINT_OT_move_up";
+ ot->description= "Move constraint up constraint stack.";
+
+ /* callbacks */
+ ot->exec= constraint_move_up_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************************** OPERATORS ****************************/
@@ -1033,10 +1045,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op)
case CONSTRAINT_TYPE_RIGIDBODYJOINT:
{
bRigidBodyJointConstraint *data;
-
+
/* set selected first object as target - moved from new_constraint_data */
data = (bRigidBodyJointConstraint*)con->data;
-
+
CTX_DATA_BEGIN(C, Object*, selob, selected_objects) {
if(selob != ob) {
data->tar= selob;
diff --git a/source/blender/editors/object/editgroup.c b/source/blender/editors/object/editgroup.c
index b49e2040b03..5943b36a6b0 100644
--- a/source/blender/editors/object/editgroup.c
+++ b/source/blender/editors/object/editgroup.c
@@ -161,7 +161,7 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Selected From active group";
+ ot->name= "Remove Selected From Active Group";
ot->description = "Remove the object from an object group that contains the active object.";
ot->idname= "GROUP_OT_objects_remove_active";
diff --git a/source/blender/editors/object/editkey.c b/source/blender/editors/object/editkey.c
index 913046c5ab8..f38c03fb284 100644
--- a/source/blender/editors/object/editkey.c
+++ b/source/blender/editors/object/editkey.c
@@ -55,6 +55,7 @@
#include "BKE_action.h"
#include "BKE_anim.h"
+#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
@@ -70,12 +71,12 @@
#include "ED_object.h"
-#include "object_intern.h"
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
-/* XXX */
-static void BIF_undo_push() {}
-static void error() {}
-/* XXX */
+#include "object_intern.h"
#if 0 // XXX old animation system
static void default_key_ipo(Scene *scene, Key *key)
@@ -112,7 +113,7 @@ static void default_key_ipo(Scene *scene, Key *key)
#endif // XXX old animation system
-/* **************************************** */
+/************************* Mesh ************************/
void mesh_to_key(Mesh *me, KeyBlock *kb)
{
@@ -208,7 +209,7 @@ void insert_meshkey(Scene *scene, Mesh *me, short rel)
mesh_to_key(me, kb);
}
-/* ******************** */
+/************************* Lattice ************************/
void latt_to_key(Lattice *lt, KeyBlock *kb)
{
@@ -266,7 +267,7 @@ void insert_lattkey(Scene *scene, Lattice *lt, short rel)
latt_to_key(lt, kb);
}
-/* ******************************** */
+/************************* Curve ************************/
void curve_to_key(Curve *cu, KeyBlock *kb, ListBase *nurb)
{
@@ -378,7 +379,7 @@ void insert_curvekey(Scene *scene, Curve *cu, short rel)
if(cu->key==NULL) {
cu->key= add_key( (ID *)cu);
- if (rel)
+ if(rel)
cu->key->type = KEY_RELATIVE;
// else
// default_key_ipo(scene, cu->key); // XXX old animation system
@@ -391,36 +392,34 @@ void insert_curvekey(Scene *scene, Curve *cu, short rel)
else curve_to_key(cu, kb, &cu->nurb);
}
+/*********************** add shape key ***********************/
-/* ******************** */
-
-void insert_shapekey(Scene *scene, Object *ob)
+void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob)
{
- if(get_mesh(ob) && get_mesh(ob)->mr) {
- error("Cannot create shape keys on a multires mesh.");
- }
- else {
- Key *key;
-
- if(ob->type==OB_MESH) insert_meshkey(scene, ob->data, 1);
- else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(scene, ob->data, 1);
- else if(ob->type==OB_LATTICE) insert_lattkey(scene, ob->data, 1);
-
- key= ob_get_key(ob);
- ob->shapenr= BLI_countlist(&key->block);
-
- BIF_undo_push("Add Shapekey");
- }
+ Key *key;
+
+ if(ob->type==OB_MESH) insert_meshkey(scene, ob->data, 1);
+ else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(scene, ob->data, 1);
+ else if(ob->type==OB_LATTICE) insert_lattkey(scene, ob->data, 1);
+
+ key= ob_get_key(ob);
+ ob->shapenr= BLI_countlist(&key->block);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
-void delete_key(Scene *scene, Object *ob)
+/*********************** remove shape key ***********************/
+
+int ED_object_shape_key_remove(bContext *C, Scene *scene, Object *ob)
{
+ Main *bmain= CTX_data_main(C);
KeyBlock *kb, *rkb;
Key *key;
//IpoCurve *icu;
-
+
key= ob_get_key(ob);
- if(key==NULL) return;
+ if(key==NULL)
+ return 0;
kb= BLI_findlink(&key->block, ob->shapenr-1);
@@ -431,15 +430,15 @@ void delete_key(Scene *scene, Object *ob)
BLI_remlink(&key->block, kb);
key->totkey--;
- if(key->refkey== kb) key->refkey= key->block.first;
+ if(key->refkey== kb)
+ key->refkey= key->block.first;
if(kb->data) MEM_freeN(kb->data);
MEM_freeN(kb);
- for(kb= key->block.first; kb; kb= kb->next) {
+ for(kb= key->block.first; kb; kb= kb->next)
if(kb->adrcode>=ob->shapenr)
kb->adrcode--;
- }
#if 0 // XXX old animation system
if(key->ipo) {
@@ -465,12 +464,68 @@ void delete_key(Scene *scene, Object *ob)
else if(GS(key->from->name)==ID_CU) ((Curve *)key->from)->key= NULL;
else if(GS(key->from->name)==ID_LT) ((Lattice *)key->from)->key= NULL;
- free_libblock_us(&(G.main->key), key);
+ free_libblock_us(&(bmain->key), key);
}
DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return 1;
+}
+
+/********************** shape key operators *********************/
+
+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;
+}
+
+void OBJECT_OT_shape_key_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Shape Key";
+ ot->idname= "OBJECT_OT_shape_key_add";
+
+ /* api callbacks */
+ ot->exec= shape_key_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int shape_key_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(!ob)
+ return OPERATOR_CANCELLED;
+
+ if(!ED_object_shape_key_remove(C, scene, ob))
+ return OPERATOR_CANCELLED;
- BIF_undo_push("Delete Shapekey");
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Shape Key";
+ ot->idname= "OBJECT_OT_shape_key_remove";
+
+ /* api callbacks */
+ ot->exec= shape_key_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
void move_keys(Object *ob)
@@ -560,3 +615,4 @@ void move_keys(Object *ob)
BIF_undo_push("Move Shapekey(s)");
#endif
}
+
diff --git a/source/blender/editors/object/editlattice.c b/source/blender/editors/object/editlattice.c
index 523f38dd432..3e30efd635a 100644
--- a/source/blender/editors/object/editlattice.c
+++ b/source/blender/editors/object/editlattice.c
@@ -52,6 +52,7 @@
#include "BKE_utildefines.h"
#include "ED_object.h"
+#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h"
@@ -60,16 +61,15 @@
#include "object_intern.h"
-/* ***************************** */
-
-static int okee() {return 0;}
+/********************** Load/Make/Free ********************/
void free_editLatt(Object *ob)
{
Lattice *lt= ob->data;
if(lt->editlatt) {
- if(lt->editlatt->def) MEM_freeN(lt->editlatt->def);
+ if(lt->editlatt->def)
+ MEM_freeN(lt->editlatt->def);
if(lt->editlatt->dvert)
free_dverts(lt->editlatt->dvert, lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw);
@@ -78,27 +78,6 @@ void free_editLatt(Object *ob)
}
}
-
-static void setflagsLatt(Object *obedit, int flag)
-{
- Lattice *lt= obedit->data;
- BPoint *bp;
- int a;
-
- bp= lt->editlatt->def;
-
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
-
- while(a--) {
- if(bp->hide==0) {
- bp->f1= flag;
- }
- bp++;
- }
-}
-
-
-
void make_editLatt(Object *obedit)
{
Lattice *lt= obedit->data;
@@ -108,10 +87,9 @@ void make_editLatt(Object *obedit)
lt= obedit->data;
- actkey = ob_get_keyblock(obedit);
- if(actkey) {
+ actkey= ob_get_keyblock(obedit);
+ if(actkey)
key_to_latt(actkey, lt);
- }
lt->editlatt= MEM_dupallocN(lt);
lt->editlatt->def= MEM_dupallocN(lt->def);
@@ -121,11 +99,8 @@ void make_editLatt(Object *obedit)
lt->editlatt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
copy_dverts(lt->editlatt->dvert, lt->dvert, tot);
}
-
- //BIF_undo_push("Original");
}
-
void load_editLatt(Object *obedit)
{
Lattice *lt;
@@ -136,7 +111,8 @@ void load_editLatt(Object *obedit)
lt= obedit->data;
- actkey = ob_get_keyblock(obedit);
+ actkey= ob_get_keyblock(obedit);
+
if(actkey) {
/* active key: vertices */
tot= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
@@ -154,7 +130,6 @@ void load_editLatt(Object *obedit)
}
}
else {
-
MEM_freeN(lt->def);
lt->def= MEM_dupallocN(lt->editlatt->def);
@@ -181,55 +156,135 @@ void load_editLatt(Object *obedit)
lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
copy_dverts(lt->dvert, lt->editlatt->dvert, tot);
}
-
}
-void remake_editLatt(Object *obedit)
+/************************** Operators *************************/
+
+static void setflagsLatt(Object *obedit, int flag)
{
- if(okee("Reload original data")==0) return;
+ Lattice *lt= obedit->data;
+ BPoint *bp;
+ int a;
- make_editLatt(obedit);
-
- //BIF_undo_push("Reload original");
+ bp= lt->editlatt->def;
+
+ a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+
+ while(a--) {
+ if(bp->hide==0) {
+ bp->f1= flag;
+ }
+ bp++;
+ }
}
-
-void deselectall_Latt(Object *obedit)
+int de_select_all_exec(bContext *C, wmOperator *op)
{
+ Object *obedit= CTX_data_edit_object(C);
Lattice *lt= obedit->data;
BPoint *bp;
- int a;
+ int a, deselect= 0;
bp= lt->editlatt->def;
-
a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
while(a--) {
if(bp->hide==0) {
if(bp->f1) {
- setflagsLatt(obedit, 0);
- //BIF_undo_push("(De)select all");
- return;
+ deselect= 1;
+ break;
}
}
bp++;
}
- setflagsLatt(obedit, 1);
- //BIF_undo_push("(De)select all");
+
+ if(deselect)
+ setflagsLatt(obedit, 0);
+ else
+ setflagsLatt(obedit, 1);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
}
+void LATTICE_OT_select_all_toggle(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select or Deselect All";
+ ot->idname= "LATTICE_OT_select_all_toggle";
+
+ /* api callbacks */
+ ot->exec= de_select_all_exec;
+ ot->poll= ED_operator_editlattice;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+int make_regular_poll(bContext *C)
+{
+ Object *ob;
+
+ if(ED_operator_editlattice(C)) return 1;
+
+ ob= CTX_data_active_object(C);
+ return (ob && ob->type==OB_LATTICE);
+}
+
+int make_regular_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_edit_object(C);
+ Lattice *lt;
+
+ if(ob) {
+ lt= ob->data;
+ resizelattice(lt->editlatt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ }
+ else {
+ ob= CTX_data_active_object(C);
+ lt= ob->data;
+ resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void LATTICE_OT_make_regular(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make Regular";
+ ot->idname= "LATTICE_OT_make_regular";
+
+ /* api callbacks */
+ ot->exec= make_regular_exec;
+ ot->poll= make_regular_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/****************************** Mouse Selection *************************/
+
static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, int y)
{
struct { BPoint *bp; short dist, select, mval[2]; } *data = userData;
float temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
- if ((bp->f1 & SELECT)==data->select) temp += 5;
- if (temp<data->dist) {
+ if((bp->f1 & SELECT)==data->select)
+ temp += 5;
+
+ if(temp<data->dist) {
data->dist = temp;
data->bp = bp;
}
}
+
static BPoint *findnearestLattvert(ViewContext *vc, short mval[2], int sel)
{
/* sel==1: selected gets a disadvantage */
@@ -247,34 +302,27 @@ static BPoint *findnearestLattvert(ViewContext *vc, short mval[2], int sel)
return data.bp;
}
-
void mouse_lattice(bContext *C, short mval[2], int extend)
{
ViewContext vc;
- BPoint *bp=0;
+ BPoint *bp= NULL;
view3d_set_viewcontext(C, &vc);
-
bp= findnearestLattvert(&vc, mval, 1);
if(bp) {
if(extend==0) {
-
setflagsLatt(vc.obedit, 0);
bp->f1 |= SELECT;
-
}
- else {
+ else
bp->f1 ^= SELECT; /* swap */
- }
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
- //BIF_undo_push("Select");
}
}
-
-/* **************** undo for lattice object ************** */
+/******************************** Undo *************************/
typedef struct UndoLattice {
BPoint *def;
@@ -324,20 +372,18 @@ static int validate_undoLatt(void *data, void *edata)
static void *get_editlatt(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
+
if(obedit && obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
return lt->editlatt;
}
+
return NULL;
}
-
/* and this is all the undo system needs to know */
void undo_push_lattice(bContext *C, char *name)
{
undo_editmode_push(C, name, get_editlatt, free_undoLatt, undoLatt_to_editLatt, editLatt_to_undoLatt, validate_undoLatt);
}
-
-
-/***/
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 18ed6dc1e10..a938018d97b 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -96,6 +96,7 @@
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_particle.h"
@@ -108,7 +109,6 @@
#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "BKE_modifier.h"
-#include "BKE_tessmesh.h"
#include "ED_anim_api.h"
#include "ED_armature.h"
@@ -117,12 +117,11 @@
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
#include "ED_view3d.h"
-#include "BIF_transform.h"
-
#include "UI_interface.h"
#include "RNA_access.h"
@@ -245,17 +244,19 @@ void ED_object_base_init_from_view(bContext *C, Base *base)
/* ******************* add object operator ****************** */
static EnumPropertyItem prop_object_types[] = {
- {OB_EMPTY, "EMPTY", "Empty", ""},
- {OB_MESH, "MESH", "Mesh", ""},
- {OB_CURVE, "CURVE", "Curve", ""},
- {OB_SURF, "SURFACE", "Surface", ""},
- {OB_FONT, "TEXT", "Text", ""},
- {OB_MBALL, "META", "Meta", ""},
- {OB_LAMP, "LAMP", "Lamp", ""},
- {OB_CAMERA, "CAMERA", "Camera", ""},
- {OB_ARMATURE, "ARMATURE", "Armature", ""},
- {OB_LATTICE, "LATTICE", "Lattice", ""},
- {0, NULL, NULL, NULL}
+ {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}
};
@@ -322,16 +323,17 @@ void OBJECT_OT_object_add(wmOperatorType *ot)
/* ****** work both in and outside editmode ****** */
static EnumPropertyItem prop_mesh_types[] = {
- {0, "PLANE", "Plane", ""},
- {1, "CUBE", "Cube", ""},
- {2, "CIRCLE", "Circle", ""},
- {3, "UVSPHERE", "UVsphere", ""},
- {4, "ICOSPHERE", "Icosphere", ""},
- {5, "CYLINDER", "Cylinder", ""},
- {6, "CONE", "Cone", ""},
- {7, "GRID", "Grid", ""},
- {8, "MONKEY", "Monkey", ""},
- {0, NULL, NULL, NULL}
+ {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)
@@ -341,7 +343,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op)
if(obedit==NULL || obedit->type!=OB_MESH) {
object_add_type(C, OB_MESH);
- ED_object_enter_editmode(C, 0);
+ ED_object_enter_editmode(C, EM_DO_UNDO);
newob = 1;
}
else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
@@ -389,7 +391,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op)
void OBJECT_OT_mesh_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mesh";
+ ot->name= "Add Mesh";
ot->description = "Add a mesh object to the scene.";
ot->idname= "OBJECT_OT_mesh_add";
@@ -399,19 +401,19 @@ void OBJECT_OT_mesh_add(wmOperatorType *ot)
ot->poll= ED_operator_scene_editable;
- /* flags */
- ot->flag= 0;
+ /* 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", "Bezier Curve", ""},
- {CU_BEZIER|CU_2D|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", "Bezier Circle", ""},
- {CU_NURBS|CU_2D|CU_PRIM_CURVE, "NURBS_CURVE", "NURBS Curve", ""},
- {CU_NURBS|CU_2D|CU_PRIM_CIRCLE, "NURBS_CIRCLE", "NURBS Circle", ""},
- {CU_NURBS|CU_2D|CU_PRIM_PATH, "PATH", "Path", ""},
- {0, NULL, NULL, NULL}
+ {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)
@@ -463,7 +465,7 @@ static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event)
void OBJECT_OT_curve_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Curve";
+ ot->name= "Add Curve";
ot->description = "Add a curve object to the scene.";
ot->idname= "OBJECT_OT_curve_add";
@@ -480,13 +482,13 @@ void OBJECT_OT_curve_add(wmOperatorType *ot)
}
static EnumPropertyItem prop_surface_types[]= {
- {CU_PRIM_CURVE|CU_NURBS, "NURBS_CURVE", "NURBS Curve", ""},
- {CU_PRIM_CIRCLE|CU_NURBS, "NURBS_CIRCLE", "NURBS Circle", ""},
- {CU_PRIM_PATCH|CU_NURBS, "NURBS_SURFACE", "NURBS Surface", ""},
- {CU_PRIM_TUBE|CU_NURBS, "NURBS_TUBE", "NURBS Tube", ""},
- {CU_PRIM_SPHERE|CU_NURBS, "NURBS_SPHERE", "NURBS Sphere", ""},
- {CU_PRIM_DONUT|CU_NURBS, "NURBS_DONUT", "NURBS Donut", ""},
- {0, NULL, NULL, NULL}
+ {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)
@@ -521,7 +523,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op)
void OBJECT_OT_surface_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Surface";
+ ot->name= "Add Surface";
ot->description = "Add a surface object to the scene.";
ot->idname= "OBJECT_OT_surface_add";
@@ -558,7 +560,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
void OBJECT_OT_text_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Text";
+ ot->name= "Add Text";
ot->description = "Add a text object to the scene";
ot->idname= "OBJECT_OT_text_add";
@@ -603,7 +605,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_armature_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Armature";
+ ot->name= "Add Armature";
ot->description = "Add an armature object to the scene.";
ot->idname= "OBJECT_OT_armature_add";
@@ -621,16 +623,18 @@ static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *eve
uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0);
uiLayout *layout= uiPupMenuLayout(pup);
- uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type");
- uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type");
- uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type");
- uiItemO(layout, NULL, ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add");
+ 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");
uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_object_add", "type", OB_MBALL);
+ 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);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_object_add", "type", OB_EMPTY);
- uiItemO(layout, NULL, ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add");
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LATTICE, "OBJECT_OT_object_add", "type", OB_LATTICE);
uiPupMenuEnd(C, pup);
@@ -701,8 +705,8 @@ void OBJECT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Objects";
- ot->description = "Delete the object.";
+ ot->name= "Delete";
+ ot->description = "Delete selected objects.";
ot->idname= "OBJECT_OT_delete";
/* api callbacks */
@@ -842,13 +846,14 @@ static void copy_object_set_idnew(Scene *scene, View3D *v3d, int dupflag)
}
-static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float *cent)
+static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, float *cent)
{
- EditVert *eve;
+ BMVert *eve;
+ BMIter iter;
int *index, nr, totvert=0;
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(eve->f & SELECT) totvert++;
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if(BM_TestHFlag(eve, BM_SELECT)) totvert++;
}
if(totvert==0) return 0;
@@ -857,8 +862,8 @@ static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float
nr= 0;
cent[0]= cent[1]= cent[2]= 0.0;
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(eve->f & SELECT) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if(BM_TestHFlag(eve, BM_SELECT)) {
*index= nr; index++;
VecAddf(cent, cent, eve->co);
}
@@ -870,19 +875,19 @@ static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float
return totvert;
}
-static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, float *cent)
+static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, float *cent)
{
MDeformVert *dvert;
- EditVert *eve;
+ BMVert *eve;
+ BMIter iter;
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);
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ dvert= CustomData_em_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
if(dvert) {
for(i=0; i<dvert->totweight; i++){
@@ -907,19 +912,18 @@ static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, floa
static void select_editmesh_hook(Object *ob, HookModifierData *hmd)
{
Mesh *me= ob->data;
- EditMesh *em= BKE_mesh_get_editmesh(me);
- EditVert *eve;
+ BMEditMesh *em= me->edit_btmesh;
+ BMVert *eve;
+ BMIter iter;
int index=0, nr=0;
- for(eve= em->verts.first; eve; eve= eve->next, nr++) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if(nr==hmd->indexar[index]) {
- eve->f |= SELECT;
+ BM_Select(em->bm, eve, 1);
if(index < hmd->totindex-1) index++;
}
+ nr++;
}
- EM_select_flush(em);
-
- BKE_mesh_end_editmesh(me, em);
}
static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar, float *cent)
@@ -1092,16 +1096,13 @@ int hook_getIndexArray(Object *obedit, int *tot, int **indexar, char *name, floa
case OB_MESH:
{
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ BMEditMesh *em = me->edit_btmesh;
/* 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;
+ return return_editmesh_vgroup(obedit, em, name, cent_r);
}
}
case OB_CURVE:
@@ -1367,43 +1368,45 @@ void add_hook_menu(Scene *scene, View3D *v3d)
/* ******************** clear parent operator ******************* */
static EnumPropertyItem prop_clear_parent_types[] = {
- {0, "CLEAR", "Clear Parent", ""},
- {1, "CLEAR_KEEP_TRANSFORM", "Clear and Keep Transformation (Clear Track)", ""},
- {2, "CLEAR_INVERSE", "Clear Parent Inverse", ""},
- {0, NULL, NULL, NULL}
+ {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(RNA_enum_is_equal(op->ptr, "type", "CLEAR")) {
+ if(type == 0) {
ob->parent= NULL;
}
- if(RNA_enum_is_equal(op->ptr, "type", "CLEAR_KEEP_TRANSFORM")) {
+ else if(type == 1) {
ob->parent= NULL;
ob->track= NULL;
ED_object_apply_obmat(ob);
}
- if(RNA_enum_is_equal(op->ptr, "type", "CLEAR_INVERSE")) {
+ 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->name= "Clear Parent";
ot->description = "Clear the object's parenting.";
ot->idname= "OBJECT_OT_parent_clear";
@@ -1423,14 +1426,16 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot)
static EnumPropertyItem prop_clear_track_types[] = {
- {0, "CLEAR", "Clear Track", ""},
- {1, "CLEAR_KEEP_TRANSFORM", "Clear and Keep Transformation (Clear Track)", ""},
- {0, NULL, NULL, NULL}
+ {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;
@@ -1439,9 +1444,8 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
ob->track= NULL;
ob->recalc |= OB_RECALC;
- if(RNA_enum_is_equal(op->ptr, "type", "CLEAR_KEEP_TRANSFORM")) {
+ if(type == 1)
ED_object_apply_obmat(ob);
- }
}
CTX_DATA_END;
@@ -1472,9 +1476,9 @@ void OBJECT_OT_track_clear(wmOperatorType *ot)
/* *****************Selection Operators******************* */
static EnumPropertyItem prop_select_types[] = {
- {0, "EXCLUSIVE", "Exclusive", ""},
- {1, "EXTEND", "Extend", ""},
- {0, NULL, NULL, NULL}
+ {0, "EXCLUSIVE", 0, "Exclusive", ""},
+ {1, "EXTEND", 0, "Extend", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* ****** Select by Type ****** */
@@ -1527,13 +1531,13 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
/* ****** selection by links *******/
static EnumPropertyItem prop_select_linked_types[] = {
- {1, "IPO", "Object IPO", ""}, // XXX depreceated animation system stuff...
- {2, "OBDATA", "Ob Data", ""},
- {3, "MATERIAL", "Material", ""},
- {4, "TEXTURE", "Texture", ""},
- {5, "DUPGROUP", "Dupligroup", ""},
- {6, "PARTICLE", "Particle System", ""},
- {0, NULL, NULL, NULL}
+ {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)
@@ -1684,6 +1688,308 @@ void OBJECT_OT_select_linked(wmOperatorType *ot)
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)
@@ -1733,7 +2039,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot)
}
/* ****** invert selection *******/
-static int object_select_invert_exec(bContext *C, wmOperator *op)
+static int object_select_inverse_exec(bContext *C, wmOperator *op)
{
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
if (base->flag & SELECT)
@@ -1749,16 +2055,16 @@ static int object_select_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void OBJECT_OT_select_invert(wmOperatorType *ot)
+void OBJECT_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Invert selection";
- ot->description = "Invert th select of all visible objects.";
- ot->idname= "OBJECT_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->description = "Invert selection of all visible objects.";
+ ot->idname= "OBJECT_OT_select_inverse";
/* api callbacks */
- ot->exec= object_select_invert_exec;
+ ot->exec= object_select_inverse_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1891,7 +2197,7 @@ void OBJECT_OT_location_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Object Location";
+ ot->name= "Clear Location";
ot->description = "Clear the object's location.";
ot->idname= "OBJECT_OT_location_clear";
@@ -1935,7 +2241,7 @@ void OBJECT_OT_rotation_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Object Rotation";
+ ot->name= "Clear Rotation";
ot->description = "Clear the object's rotation.";
ot->idname= "OBJECT_OT_rotation_clear";
@@ -1983,7 +2289,7 @@ void OBJECT_OT_scale_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Object Scale";
+ ot->name= "Clear Scale";
ot->description = "Clear the object's scale.";
ot->idname= "OBJECT_OT_scale_clear";
@@ -2029,7 +2335,7 @@ void OBJECT_OT_origin_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Object Origin";
+ ot->name= "Clear Origin";
ot->description = "Clear the object's origin.";
ot->idname= "OBJECT_OT_origin_clear";
@@ -2072,12 +2378,11 @@ void OBJECT_OT_restrictview_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear restrict view";
+ ot->name= "Clear Restrict View";
ot->description = "Reveal the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_clear";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
ot->exec= object_restrictview_clear_exec;
ot->poll= ED_operator_view3d_active;
@@ -2085,19 +2390,14 @@ void OBJECT_OT_restrictview_clear(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static EnumPropertyItem prop_set_restrictview_types[] = {
- {0, "SELECTED", "Selected", ""},
- {1, "UNSELECTED", "Unselected ", ""},
- {0, NULL, NULL, NULL}
-};
-
static int object_restrictview_set_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
short changed = 0;
+ int unselected= RNA_boolean_get(op->ptr, "unselected");
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(RNA_enum_is_equal(op->ptr, "type", "SELECTED")){
+ if(!unselected) {
if (base->flag & SELECT){
base->flag &= ~SELECT;
base->object->flag = base->flag;
@@ -2108,7 +2408,7 @@ static int object_restrictview_set_exec(bContext *C, wmOperator *op)
}
}
}
- else if (RNA_enum_is_equal(op->ptr, "type", "UNSELECTED")){
+ else {
if (!(base->flag & SELECT)){
base->object->restrictflag |= OB_RESTRICT_VIEW;
changed = 1;
@@ -2130,19 +2430,18 @@ static int object_restrictview_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_restrictview_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set restrict view";
+ ot->name= "Set Restrict View";
ot->description = "Hide the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_set";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
ot->exec= object_restrictview_set_exec;
ot->poll= ED_operator_view3d_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", prop_set_restrictview_types, 0, "Type", "");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
}
/* ************* Slow Parent ******************* */
@@ -2240,10 +2539,10 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d)
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ BMEditMesh *em = me->edit_btmesh;
+ BMIter iter;
- eve= em->verts.first;
- while(eve) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if(eve->f & 1) {
if(v1==0) v1= nr;
else if(v2==0) v2= nr;
@@ -2252,10 +2551,7 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d)
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);
@@ -2463,16 +2759,16 @@ void make_proxy(Scene *scene)
#define PAR_TRIA 8
static EnumPropertyItem prop_make_parent_types[] = {
- {PAR_OBJECT, "OBJECT", "Object", ""},
- {PAR_ARMATURE, "ARMATURE", "Armature Deform", ""},
- {PAR_BONE, "BONE", "Bone", ""},
- {PAR_CURVE, "CURVE", "Curve Deform", ""},
- {PAR_FOLLOW, "FOLLOW", "Follow Path", ""},
- {PAR_PATH_CONST, "PATH_CONST", "Path Constraint", ""},
- {PAR_LATTICE, "LATTICE", "Lattice Deform", ""},
- {PAR_VERTEX, "VERTEX", "Vertex", ""},
- {PAR_TRIA, "TRIA", "Triangle", ""},
- {0, NULL, NULL, NULL}
+ {PAR_OBJECT, "OBJECT", 0, "Object", ""},
+ {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""},
+ {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)
@@ -2601,7 +2897,8 @@ static int parent_set_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
+ ED_anim_dag_flush_update(C);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -2638,7 +2935,7 @@ static int parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
void OBJECT_OT_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make parent";
+ ot->name= "Make Parent";
ot->description = "Set the object's parenting.";
ot->idname= "OBJECT_OT_parent_set";
@@ -2649,24 +2946,25 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
/* flags */
- ot->flag= 0;
+ 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", "TrackTo Constraint", ""},
- {2, "LOCKTRACK", "LockTrack Constraint", ""},
- {3, "OLDTRACK", "Old Track", ""},
- {0, NULL, NULL, NULL}
+ {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(RNA_enum_is_equal(op->ptr, "type", "TRACKTO")){
+ if(type == 1) {
bConstraint *con;
bTrackToConstraint *data;
@@ -2690,7 +2988,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
- else if(RNA_enum_is_equal(op->ptr, "type", "LOCKTRACK")){
+ else if(type == 2) {
bConstraint *con;
bLockTrackConstraint *data;
@@ -2714,7 +3012,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
- else if(RNA_enum_is_equal(op->ptr, "type", "OLDTRACK")){
+ else {
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
if(base!=BASACT) {
base->object->track= BASACT->object;
@@ -2792,7 +3090,7 @@ static void make_object_duplilist_real(Scene *scene, View3D *v3d, Base *base)
}
-static int object_dupli_set_real_exec(bContext *C, wmOperator *op)
+static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
@@ -2812,17 +3110,17 @@ static int object_dupli_set_real_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void OBJECT_OT_dupli_set_real(wmOperatorType *ot)
+void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Dupli Real";
+ ot->name= "Make Duplicates Real";
ot->description = "Make dupli objects attached to this object real.";
- ot->idname= "OBJECT_OT_dupli_set_real";
+ ot->idname= "OBJECT_OT_duplicates_make_real";
/* api callbacks */
ot->invoke= WM_operator_confirm;
- ot->exec= object_dupli_set_real_exec;
+ ot->exec= object_duplicates_make_real_exec;
ot->poll= ED_operator_scene_editable;
@@ -2832,10 +3130,10 @@ void OBJECT_OT_dupli_set_real(wmOperatorType *ot)
/* ******************* Set Object Center ********************** */
static EnumPropertyItem prop_set_center_types[] = {
- {0, "CENTER", "ObData to Center", "Move object data around Object center"},
- {1, "CENTERNEW", "Center New", "Move Object center to center of object data"},
- {2, "CENTERCURSOR", "Center Cursor", "Move Object Center to position of the 3d cursor"},
- {0, NULL, NULL, NULL}
+ {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 */
@@ -2876,9 +3174,10 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ BMEditMesh *em = me->edit_btmesh;
+ BMIter iter;
- for(eve= em->verts.first; eve; eve= eve->next) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if(v3d->around==V3D_CENTROID) {
total++;
VECADD(cent, cent, eve->co);
@@ -2897,14 +3196,13 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
cent[2]= (min[2]+max[2])/2.0f;
}
- for(eve= em->verts.first; eve; eve= eve->next) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
VecSubf(eve->co, eve->co, cent);
}
- recalc_editnormals(em);
+ EDBM_RecalcNormals(em);
tot_change++;
DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- BKE_mesh_end_editmesh(me, em);
}
}
@@ -3208,7 +3506,11 @@ void ED_object_exit_editmode(bContext *C, int flag)
EDBM_LoadEditBMesh(scene, obedit);
- if(freedata) EDBM_FreeEditBMesh(me->edit_btmesh);
+ if(freedata) {
+ EDBM_FreeEditBMesh(me->edit_btmesh);
+ MEM_freeN(me->edit_btmesh);
+ me->edit_btmesh= NULL;
+ }
if(G.f & G_WEIGHTPAINT)
mesh_octree_table(obedit, NULL, NULL, 'e');
@@ -3257,7 +3559,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
{
Scene *scene= CTX_data_scene(C);
Base *base= CTX_data_active_base(C);
- Object *ob= base->object;
+ Object *ob;
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= NULL;
int ok= 0;
@@ -3269,7 +3571,10 @@ void ED_object_enter_editmode(bContext *C, int flag)
v3d= sa->spacedata.first;
if((v3d==NULL || (base->lay & v3d->lay))==0) return;
-
+
+ ob = base->object;
+
+ if(ob==NULL) return;
if(ob->data==NULL) return;
if (object_data_is_libdata(ob)) {
@@ -3351,6 +3656,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
}
+ if(flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
if(flag & EM_WAITCURSOR) waitcursor(0);
}
@@ -3574,9 +3880,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX static short numcuts= 2;
Object *ob= OBACT;
Object *obedit= NULL; // XXX
- float fac;
int nr,ret=0;
- short randfac;
if(ob==NULL) return;
@@ -3663,7 +3967,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
if(!psys)
return;
- if(scene->selectmode & SCE_SELECT_POINT)
+ if(pset->selectmode & SCE_SELECT_POINT)
nr= pupmenu("Specials%t|Rekey%x1|Subdivide%x2|Select First%x3|Select Last%x4|Remove Doubles%x5");
else
nr= pupmenu("Specials%t|Rekey%x1|Remove Doubles%x5");
@@ -3765,144 +4069,8 @@ void special_editmenu(Scene *scene, View3D *v3d)
}
}
else if(obedit->type==OB_MESH) {
- /* This is all that is needed, since all other functionality is in Ctrl+ V/E/F but some users didnt like, so for now have the old/big menu */
- /*
- nr= pupmenu("Subdivide Mesh%t|Subdivide%x1|Subdivide Multi%x2|Subdivide Multi Fractal%x3|Subdivide Smooth%x4");
- switch(nr) {
- case 1:
- waitcursor(1);
- esubdivideflag(1, 0.0, scene->toolsettings->editbutflag, 1, 0);
-
- break;
- case 2:
- if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return;
- waitcursor(1);
- esubdivideflag(1, 0.0, scene->toolsettings->editbutflag, numcuts, 0);
- break;
- case 3:
- if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return;
- randfac= 10;
- if(button(&randfac, 1, 100, "Rand fac:")==0) return;
- waitcursor(1);
- fac= -( (float)randfac )/100;
- esubdivideflag(1, fac, scene->toolsettings->editbutflag, numcuts, 0);
- break;
-
- case 4:
- fac= 1.0f;
- if(fbutton(&fac, 0.0f, 5.0f, 10, 10, "Smooth:")==0) return;
- fac= 0.292f*fac;
-
- waitcursor(1);
- esubdivideflag(1, fac, scene->toolsettings->editbutflag | B_SMOOTH, 1, 0);
- break;
- }
- */
-
- nr= pupmenu("Specials%t|Subdivide%x1|Subdivide Multi%x2|Subdivide Multi Fractal%x3|Subdivide Smooth%x12|Merge%x4|Remove Doubles%x5|Hide%x6|Reveal%x7|Select Swap%x8|Flip Normals %x9|Smooth %x10|Bevel %x11|Set Smooth %x14|Set Solid %x15|Blend From Shape%x16|Propagate To All Shapes%x17|Select Vertex Path%x18");
-
- switch(nr) {
- case 1:
- waitcursor(1);
-// XXX esubdivideflag(1, 0.0, scene->toolsettings->editbutflag, 1, 0);
-
- break;
- case 2:
-// XXX if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return;
- waitcursor(1);
-// XXX esubdivideflag(1, 0.0, scene->toolsettings->editbutflag, numcuts, 0);
- break;
- case 3:
-// XXX if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return;
- randfac= 10;
-// XXX if(button(&randfac, 1, 100, "Rand fac:")==0) return;
- waitcursor(1);
- fac= -( (float)randfac )/100;
-// XXX esubdivideflag(1, fac, scene->toolsettings->editbutflag, numcuts, 0);
- break;
-
- case 12: /* smooth */
- /* if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return; */
- fac= 1.0f;
-// XXX if(fbutton(&fac, 0.0f, 5.0f, 10, 10, "Smooth:")==0) return;
-// XXX fac= 0.292f*fac;
-
- waitcursor(1);
-// XXX esubdivideflag(1, fac, scene->toolsettings->editbutflag | B_SMOOTH, 1, 0);
- break;
-
- case 4:
-// XXX mergemenu();
- break;
- case 5:
-// XXX notice("Removed %d Vertices", removedoublesflag(1, 0, scene->toolsettings->doublimit));
- break;
- case 6:
-// XXX hide_mesh(0);
- break;
- case 7:
-// XXX reveal_mesh();
- break;
- case 8:
-// XXX selectswap_mesh();
- break;
- case 9:
-// XXX flip_editnormals();
- break;
- case 10:
-// XXX vertexsmooth();
- break;
- case 11:
-// XXX bevel_menu();
- break;
- case 14:
-// XXX mesh_set_smooth_faces(1);
- break;
- case 15:
-// XXX mesh_set_smooth_faces(0);
- break;
- case 16:
-// XXX shape_copy_select_from();
- break;
- case 17:
-// XXX shape_propagate();
- break;
- case 18:
-// XXX pathselect();
- break;
- }
-
-
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
-
- if(nr>0) waitcursor(0);
-
}
else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) {
-
- nr= pupmenu("Specials%t|Subdivide%x1|Switch Direction%x2|Set Goal Weight%x3|Set Radius%x4|Smooth%x5|Smooth Radius%x6");
-
- switch(nr) {
- case 1:
-// XXX subdivideNurb();
- break;
- case 2:
-// XXX switchdirectionNurb2();
- break;
- case 3:
-// XXX setweightNurb();
- break;
- case 4:
-// XXX setradiusNurb();
- break;
- case 5:
-// XXX smoothNurb();
- break;
- case 6:
-// XXX smoothradiusNurb();
- break;
- }
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
else if(obedit->type==OB_ARMATURE) {
nr= pupmenu("Specials%t|Subdivide %x1|Subdivide Multi%x2|Switch Direction%x7|Flip Left-Right Names%x3|%l|AutoName Left-Right%x4|AutoName Front-Back%x5|AutoName Top-Bottom%x6");
@@ -6088,11 +6256,12 @@ Base *ED_object_add_duplicate(Scene *scene, Base *base, int usedupflag)
}
/* contextual operator dupli */
-static int duplicate_add_exec(bContext *C, wmOperator *op)
+static int duplicate_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C);
- int dupflag= U.dupflag;
+ int linked= RNA_boolean_get(op->ptr, "linked");
+ int dupflag= (linked)? 0: U.dupflag;
clear_id_newpoins();
clear_sca_new_poins(); /* sensor/contr/act */
@@ -6120,9 +6289,9 @@ static int duplicate_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int duplicate_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- duplicate_add_exec(C, op);
+ 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);
@@ -6130,17 +6299,17 @@ static int duplicate_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
}
-void OBJECT_OT_duplicate_add(wmOperatorType *ot)
+void OBJECT_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Duplicate";
- ot->description = "Duplicate the object.";
- ot->idname= "OBJECT_OT_duplicate_add";
+ ot->name= "Duplicate";
+ ot->description = "Duplicate selected objects.";
+ ot->idname= "OBJECT_OT_duplicate";
/* api callbacks */
- ot->invoke= duplicate_add_invoke;
- ot->exec= duplicate_add_exec;
+ ot->invoke= duplicate_invoke;
+ ot->exec= duplicate_exec;
ot->poll= ED_operator_scene_editable;
@@ -6148,9 +6317,57 @@ void OBJECT_OT_duplicate_add(wmOperatorType *ot)
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;
+}
+
/* ********************** */
void image_aspect(Scene *scene, View3D *v3d)
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 1eb867e19a0..23a4b5773ff 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -45,11 +45,12 @@ 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_invert(struct wmOperatorType *ot);
+void OBJECT_OT_select_inverse(struct wmOperatorType *ot);
void OBJECT_OT_select_random(struct wmOperatorType *ot);
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_location_clear(struct wmOperatorType *ot);
void OBJECT_OT_rotation_clear(struct wmOperatorType *ot);
void OBJECT_OT_scale_clear(struct wmOperatorType *ot);
@@ -59,10 +60,11 @@ 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_dupli_set_real(struct wmOperatorType *ot);
+void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
void OBJECT_OT_object_add(struct wmOperatorType *ot);
-void OBJECT_OT_duplicate_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_mesh_add(struct wmOperatorType *ot);
void OBJECT_OT_curve_add(struct wmOperatorType *ot);
@@ -78,6 +80,9 @@ void make_editLatt(Object *obedit);
void load_editLatt(Object *obedit);
void remake_editLatt(Object *obedit);
+void LATTICE_OT_select_all_toggle(struct wmOperatorType *ot);
+void LATTICE_OT_make_regular(struct wmOperatorType *ot);
+
/* editgroup.c */
void GROUP_OT_group_create(struct wmOperatorType *ot);
void GROUP_OT_objects_remove(struct wmOperatorType *ot);
@@ -86,11 +91,38 @@ void GROUP_OT_objects_remove_active(struct wmOperatorType *ot);
/* object_modifier.c */
void OBJECT_OT_modifier_add(struct wmOperatorType *ot);
+void OBJECT_OT_modifier_remove(struct wmOperatorType *ot);
+void OBJECT_OT_modifier_move_up(struct wmOperatorType *ot);
+void OBJECT_OT_modifier_move_down(struct wmOperatorType *ot);
+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_modifier_mdef_bind(struct wmOperatorType *ot);
/* editconstraint.c */
void OBJECT_OT_constraint_add(struct wmOperatorType *ot);
+void CONSTRAINT_OT_delete(struct wmOperatorType *ot);
+
+void CONSTRAINT_OT_move_up(struct wmOperatorType *ot);
+void CONSTRAINT_OT_move_down(struct wmOperatorType *ot);
+
+void CONSTRAINT_OT_childof_set_inverse(struct wmOperatorType *ot);
+void CONSTRAINT_OT_childof_clear_inverse(struct wmOperatorType *ot);
+
+/* object_vgroup.c */
+void OBJECT_OT_vertex_group_add(struct wmOperatorType *ot);
+void OBJECT_OT_vertex_group_remove(struct wmOperatorType *ot);
+void OBJECT_OT_vertex_group_assign(struct wmOperatorType *ot);
+void OBJECT_OT_vertex_group_remove_from(struct wmOperatorType *ot);
+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);
+
+/* editkey.c */
+void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
+void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot);
#endif /* ED_OBJECT_INTERN_H */
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 4bcfcc4d5ab..6b9f2db0d96 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -25,6 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -35,6 +36,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.h"
@@ -44,6 +46,7 @@
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
@@ -52,6 +55,7 @@
#include "BKE_report.h"
#include "BKE_object.h"
#include "BKE_particle.h"
+#include "BKE_softbody.h"
#include "BKE_utildefines.h"
#include "RNA_access.h"
@@ -67,31 +71,102 @@
/******************************** API ****************************/
-int ED_object_modifier_delete(ReportList *reports, Object *ob, ModifierData *md)
+int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int type)
+{
+ ModifierData *md;
+ ModifierTypeInfo *mti = modifierType_getInfo(type);
+
+ if(mti->flags&eModifierTypeFlag_Single) {
+ if(modifiers_findByType(ob, type)) {
+ BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed.");
+ return 0;
+ }
+ }
+
+ if(type == eModifierType_ParticleSystem) {
+ object_add_particle_system(scene, ob);
+ }
+ else {
+ if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ md = ob->modifiers.first;
+
+ while(md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
+ md = md->next;
+
+ BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(type));
+ }
+ else
+ BLI_addtail(&ob->modifiers, modifier_new(type));
+
+ /* special cases */
+ if(type == eModifierType_Softbody) {
+ if(!ob->soft) {
+ ob->soft= sbNew(scene);
+ ob->softflag |= OB_SB_GOAL|OB_SB_EDGES;
+ }
+ }
+ else if(type == eModifierType_Collision) {
+ if(!ob->pd)
+ ob->pd= object_add_collision_fields();
+
+ ob->pd->deflect= 1;
+ DAG_scene_sort(scene);
+ }
+ else if(type == eModifierType_Surface)
+ DAG_scene_sort(scene);
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ return 1;
+}
+
+int ED_object_modifier_remove(ReportList *reports, Scene *scene, Object *ob, ModifierData *md)
{
ModifierData *obmd;
/* It seems on rapid delete it is possible to
* get called twice on same modifier, so make
* sure it is in list. */
- for (obmd=ob->modifiers.first; obmd; obmd=obmd->next)
- if (obmd==md)
+ for(obmd=ob->modifiers.first; obmd; obmd=obmd->next)
+ if(obmd==md)
break;
- if (!obmd)
+ if(!obmd)
return 0;
+ /* special cases */
if(md->type == eModifierType_ParticleSystem) {
ParticleSystemModifierData *psmd=(ParticleSystemModifierData*)md;
BLI_remlink(&ob->particlesystem, psmd->psys);
psys_free(ob, psmd->psys);
}
+ else if(md->type == eModifierType_Softbody) {
+ if(ob->soft) {
+ sbFree(ob->soft);
+ ob->soft= NULL;
+ ob->softflag= 0;
+ }
+ }
+ else if(md->type == eModifierType_Collision) {
+ if(ob->pd)
+ ob->pd->deflect= 0;
- BLI_remlink(&ob->modifiers, md);
+ DAG_scene_sort(scene);
+ }
+ else if(md->type == eModifierType_Surface) {
+ if(ob->pd)
+ ob->pd->flag &= ~PFIELD_SURFACE;
+
+ DAG_scene_sort(scene);
+ }
+ BLI_remlink(&ob->modifiers, md);
modifier_free(md);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
return 1;
}
@@ -103,9 +178,10 @@ int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md
if(mti->type!=eModifierTypeType_OnlyDeform) {
ModifierTypeInfo *nmti = modifierType_getInfo(md->prev->type);
- if(nmti->flags&eModifierTypeFlag_RequiresOriginalData)
+ if(nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data.");
return 0;
+ }
}
BLI_remlink(&ob->modifiers, md);
@@ -155,11 +231,11 @@ int ED_object_modifier_convert(ReportList *reports, Scene *scene, Object *ob, Mo
psys=((ParticleSystemModifierData *)md)->psys;
part= psys->part;
- if(part->draw_as == PART_DRAW_GR || part->draw_as == PART_DRAW_OB) {
+ if(part->ren_as == PART_DRAW_GR || part->ren_as == PART_DRAW_OB) {
; // XXX make_object_duplilist_real(NULL);
}
else {
- if(part->draw_as != PART_DRAW_PATH || psys->pathcache == 0)
+ if(part->ren_as != PART_DRAW_PATH || psys->pathcache == 0)
return 0;
totpart= psys->totcached;
@@ -260,6 +336,10 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
}
mesh_pmv_off(ob, me);
+
+ /* Multires: ensure that recent sculpting is applied */
+ if(md->type == eModifierType_Multires)
+ multires_force_update(ob);
dm = mesh_create_derived_for_modifier(scene, ob, md);
if (!dm) {
@@ -329,22 +409,11 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
- ModifierData *md;
int type= RNA_enum_get(op->ptr, "type");
- ModifierTypeInfo *mti = modifierType_getInfo(type);
-
- if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
- md = ob->modifiers.first;
-
- while(md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
- md = md->next;
- BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(type));
- }
- else
- BLI_addtail(&ob->modifiers, modifier_new(type));
+ if(!ED_object_modifier_add(op->reports, scene, ob, type))
+ return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -370,13 +439,198 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", modifier_type_items, 0, "Type", "");
}
+/************************ remove modifier operator *********************/
+
+static int modifier_remove_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(!ob || !md || !ED_object_modifier_remove(op->reports, scene, ob, md))
+ return OPERATOR_CANCELLED;
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_remove(wmOperatorType *ot)
+{
+ ot->name= "Remove Modifier";
+ ot->description= "Remove a modifier from the active object.";
+ ot->idname= "OBJECT_OT_modifier_remove";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move up modifier operator *********************/
+
+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(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md))
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
+{
+ ot->name= "Move Up Modifier";
+ ot->description= "Move modifier up in the stack.";
+ ot->idname= "OBJECT_OT_modifier_move_up";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_move_up_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move down modifier operator *********************/
+
+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;
+
+ if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
+{
+ ot->name= "Move Down Modifier";
+ ot->description= "Move modifier down in the stack.";
+ ot->idname= "OBJECT_OT_modifier_move_down";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_move_down_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ apply modifier operator *********************/
+
+static int modifier_apply_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(!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md))
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_apply(wmOperatorType *ot)
+{
+ ot->name= "Apply Modifier";
+ ot->description= "Apply modifier and remove from the stack.";
+ ot->idname= "OBJECT_OT_modifier_apply";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_apply_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ convert modifier operator *********************/
+
+static int modifier_convert_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(!ob || !md || !ED_object_modifier_convert(op->reports, scene, ob, md))
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_convert(wmOperatorType *ot)
+{
+ ot->name= "Convert Modifier";
+ ot->description= "Convert particles to a mesh object.";
+ ot->idname= "OBJECT_OT_modifier_convert";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_convert_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ copy modifier operator *********************/
+
+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;
+
+ if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
+ return OPERATOR_CANCELLED;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_modifier_copy(wmOperatorType *ot)
+{
+ ot->name= "Copy Modifier";
+ ot->description= "Duplicate modifier at the same position in the stack.";
+ ot->idname= "OBJECT_OT_modifier_copy";
+ ot->poll= ED_operator_object_active;
+
+ ot->exec= modifier_copy_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/****************** multires subdivide operator *********************/
static int multires_subdivide_exec(bContext *C, wmOperator *op)
{
- Object *ob = CTX_data_active_object(C);
- PointerRNA ptr = CTX_data_pointer_get(C, "modifier");
- MultiresModifierData *mmd = (RNA_struct_is_a(ptr.type, &RNA_Modifier))? ptr.data: NULL;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier);
+ Object *ob= ptr.id.data;
+ MultiresModifierData *mmd= ptr.data;
if(mmd) {
multiresModifier_subdivide(mmd, ob, 1, 0, mmd->simple);
@@ -403,8 +657,7 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
static int modifier_mdef_bind_poll(bContext *C)
{
- PointerRNA ptr= CTX_data_pointer_get(C, "modifier");
- return RNA_struct_is_a(ptr.type, &RNA_MeshDeformModifier);
+ return CTX_data_pointer_get_type(C, "modifier", &RNA_MeshDeformModifier).data != NULL;
}
static int modifier_mdef_bind_exec(bContext *C, wmOperator *op)
@@ -519,9 +772,7 @@ static uiBlock *modifiers_add_menu(void *ob_v)
ModifierTypeInfo *mti = modifierType_getInfo(i);
/* Only allow adding through appropriate other interfaces */
- if(ELEM3(i, eModifierType_Softbody, eModifierType_Hook, eModifierType_ParticleSystem)) continue;
-
- if(ELEM4(i, eModifierType_Cloth, eModifierType_Collision, eModifierType_Surface, eModifierType_Fluidsim)) continue;
+ if(ELEM(i, eModifierType_ParticleSystem, eModifierType_Surface)) continue;
if((mti->flags&eModifierTypeFlag_AcceptsCVs) ||
(ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) {
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index cfee6a55152..acfe2416d77 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -68,12 +68,13 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_parent_clear);
WM_operatortype_append(OBJECT_OT_track_set);
WM_operatortype_append(OBJECT_OT_track_clear);
- WM_operatortype_append(OBJECT_OT_select_invert);
+ WM_operatortype_append(OBJECT_OT_select_inverse);
WM_operatortype_append(OBJECT_OT_select_random);
WM_operatortype_append(OBJECT_OT_select_all_toggle);
WM_operatortype_append(OBJECT_OT_select_by_type);
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_location_clear);
WM_operatortype_append(OBJECT_OT_rotation_clear);
WM_operatortype_append(OBJECT_OT_scale_clear);
@@ -83,8 +84,9 @@ void ED_operatortypes_object(void)
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_dupli_set_real);
- WM_operatortype_append(OBJECT_OT_duplicate_add);
+ WM_operatortype_append(OBJECT_OT_duplicates_make_real);
+ WM_operatortype_append(OBJECT_OT_duplicate);
+ WM_operatortype_append(OBJECT_OT_join);
WM_operatortype_append(GROUP_OT_group_create);
WM_operatortype_append(GROUP_OT_objects_remove);
WM_operatortype_append(GROUP_OT_objects_add_active);
@@ -100,10 +102,36 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_primitive_add);
WM_operatortype_append(OBJECT_OT_modifier_add);
+ WM_operatortype_append(OBJECT_OT_modifier_remove);
+ WM_operatortype_append(OBJECT_OT_modifier_move_up);
+ WM_operatortype_append(OBJECT_OT_modifier_move_down);
+ WM_operatortype_append(OBJECT_OT_modifier_apply);
+ 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_modifier_mdef_bind);
WM_operatortype_append(OBJECT_OT_constraint_add);
+ WM_operatortype_append(CONSTRAINT_OT_delete);
+ WM_operatortype_append(CONSTRAINT_OT_move_up);
+ WM_operatortype_append(CONSTRAINT_OT_move_down);
+ WM_operatortype_append(CONSTRAINT_OT_childof_set_inverse);
+ WM_operatortype_append(CONSTRAINT_OT_childof_clear_inverse);
+
+ WM_operatortype_append(OBJECT_OT_vertex_group_add);
+ WM_operatortype_append(OBJECT_OT_vertex_group_remove);
+ WM_operatortype_append(OBJECT_OT_vertex_group_assign);
+ WM_operatortype_append(OBJECT_OT_vertex_group_remove_from);
+ WM_operatortype_append(OBJECT_OT_vertex_group_select);
+ 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_shape_key_add);
+ WM_operatortype_append(OBJECT_OT_shape_key_remove);
+
+ WM_operatortype_append(LATTICE_OT_select_all_toggle);
+ WM_operatortype_append(LATTICE_OT_make_regular);
}
void ED_keymap_object(wmWindowManager *wm)
@@ -118,11 +146,12 @@ void ED_keymap_object(wmWindowManager *wm)
keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "OBJECT_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_random", PADASTERKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_by_type", PADASTERKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_by_layer", PADASTERKEY, KM_PRESS, KM_ALT, 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_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);
@@ -134,12 +163,15 @@ void ED_keymap_object(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "OBJECT_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_origin_clear", OKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_restrictview_clear", HKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_clear", HKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
WM_keymap_verify_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_verify_item(keymap, "OBJECT_OT_duplicate_add", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_duplicate", DKEY, KM_PRESS, KM_ALT, 0)->ptr, "linked", 1);
+ WM_keymap_add_item(keymap, "OBJECT_OT_join", JKEY, KM_PRESS, KM_CTRL, 0);
// XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith
WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe_menu", IKEY, KM_PRESS, 0, 0);
@@ -150,5 +182,9 @@ void ED_keymap_object(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "GROUP_OT_objects_add_active", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove_active", GKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
+ /* Lattice */
+ keymap= WM_keymap_listbase(wm, "Lattice", 0, 0);
+
+ WM_keymap_add_item(keymap, "LATTICE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
}
diff --git a/source/blender/editors/mesh/editdeform.c b/source/blender/editors/object/object_vgroup.c
index 3ccd4d56ece..fb71fc09108 100644
--- a/source/blender/editors/mesh/editdeform.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -48,19 +48,26 @@
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
+#include "BKE_context.h"
#include "BKE_customdata.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_depsgraph.h"
#include "BKE_deform.h"
+#include "BKE_depsgraph.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
#include "BKE_utildefines.h"
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
#include "ED_mesh.h"
#include "ED_view3d.h"
-#include "mesh_intern.h"
+
+#include "object_intern.h"
/* XXX */
static void BIF_undo_push() {}
@@ -719,18 +726,13 @@ void add_vert_to_defgroup (Object *ob, bDeformGroup *dg, int vertnum,
}
/* Only available in editmode */
-void assign_verts_defgroup (Object *obedit, float weight)
+void assign_verts_defgroup (Object *ob, float weight)
{
- Object *ob;
EditVert *eve;
bDeformGroup *dg, *eg;
MDeformWeight *newdw;
MDeformVert *dvert;
int i, done;
-
-// XXX if(multires_level1_test()) return;
-
- ob= obedit;
if (!ob)
return;
@@ -883,18 +885,13 @@ float get_vert_defgroup (Object *ob, bDeformGroup *dg, int vertnum)
/* Only available in editmode */
/* removes from active defgroup, if allverts==0 only selected vertices */
-void remove_verts_defgroup (Object *obedit, int allverts)
+void remove_verts_defgroup (Object *ob, int allverts)
{
- Object *ob;
EditVert *eve;
MDeformVert *dvert;
MDeformWeight *newdw;
bDeformGroup *dg, *eg;
int i;
-
-// XXX if(multires_level1_test()) return;
-
- ob= obedit;
if (!ob)
return;
@@ -966,14 +963,10 @@ void remove_verts_defgroup (Object *obedit, int allverts)
/* Only available in editmode */
/* removes from all defgroup, if allverts==0 only selected vertices */
-void remove_verts_defgroups(Object *obedit, int allverts)
+void remove_verts_defgroups(Object *ob, int allverts)
{
- Object *ob;
int actdef, defCount;
-
-// XXX if (multires_level1_test()) return;
- ob= obedit;
if (ob == NULL) return;
actdef= ob->actdef;
@@ -1107,4 +1100,245 @@ void vgroup_operation_with_menu(Object *ob)
}
}
+/********************** vertex group operators *********************/
+
+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);
+
+ 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;
+}
+
+void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_add";
+
+ /* api callbacks */
+ ot->exec= vertex_group_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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(!ob)
+ return OPERATOR_CANCELLED;
+
+ 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;
+}
+
+void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_remove";
+
+ /* api callbacks */
+ ot->exec= vertex_group_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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(!ob)
+ return OPERATOR_CANCELLED;
+
+ 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;
+}
+
+void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Assign Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_assign";
+
+ /* api callbacks */
+ ot->exec= vertex_group_assign_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_edit_object(C);
+
+ 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;
+}
+
+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->exec= vertex_group_remove_from_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int vertex_group_select_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_edit_object(C);
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ sel_verts_defgroup(ob, 1); /* runs countall() */
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_select";
+
+ /* api callbacks */
+ ot->exec= vertex_group_select_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int vertex_group_deselect_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_edit_object(C);
+
+ 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;
+}
+
+void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Deselect Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_deselect";
+
+ /* api callbacks */
+ ot->exec= vertex_group_deselect_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+
+ 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;
+}
+
+void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Vertex Group";
+ ot->idname= "OBJECT_OT_vertex_group_copy";
+
+ /* api callbacks */
+ ot->exec= vertex_group_copy_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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;
+ int retval= OPERATOR_CANCELLED;
+
+ if(!ob)
+ return retval;
+
+ 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;
+
+ 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;
+}
+
+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->exec= vertex_group_copy_to_linked_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/physics/Makefile b/source/blender/editors/physics/Makefile
index a71ea9e2083..63968fdd537 100644
--- a/source/blender/editors/physics/Makefile
+++ b/source/blender/editors/physics/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/ed_fluidsim.c
index 215a72d6927..3990521bd1b 100644
--- a/source/blender/editors/physics/ed_fluidsim.c
+++ b/source/blender/editors/physics/ed_fluidsim.c
@@ -67,18 +67,19 @@
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_effect.h"
#include "BKE_fluidsim.h"
#include "BKE_global.h"
-#include "BKE_modifier.h"
-#include "BKE_main.h"
+#include "BKE_ipo.h"
#include "BKE_key.h"
-#include "BKE_scene.h"
+#include "BKE_main.h"
+#include "BKE_modifier.h"
#include "BKE_object.h"
+#include "BKE_report.h"
+#include "BKE_scene.h"
#include "BKE_softbody.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_ipo.h"
#include "PIL_time.h"
@@ -89,6 +90,9 @@
#include "ED_fluidsim.h"
#include "ED_screen.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
/* XXX */
/* from header info.c */
static int start_progress_bar(void) {return 0;};
@@ -124,7 +128,7 @@ char* fluidsimViscosityPresetString[6] = {
/* ********************** fluid sim settings struct functions ********************** */
/* helper function */
-void fluidsimGetGeometryObjFilename(struct Object *ob, char *dst) { //, char *srcname) {
+void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname) {
//snprintf(dst,FILE_MAXFILE, "%s_cfgdata_%s.bobj.gz", srcname, ob->id.name);
snprintf(dst,FILE_MAXFILE, "fluidcfgdata_%s.bobj.gz", ob->id.name);
}
@@ -337,14 +341,14 @@ int runSimulationCallback(void *data, int status, int frame) {
/* ********************** write fluidsim config to file ************************* */
/* ******************************************************************************** */
-void fluidsimBake(bContext *C, struct Object *ob)
+int fluidsimBake(bContext *C, ReportList *reports, Object *ob)
{
Scene *scene= CTX_data_scene(C);
FILE *fileCfg;
int i;
- struct Object *fsDomain = NULL;
+ Object *fsDomain = NULL;
FluidsimSettings *domainSettings;
- struct Object *obit = NULL; /* object iterator */
+ Object *obit = NULL; /* object iterator */
Base *base;
int origFrame = scene->r.cfra;
char debugStrBuffer[256];
@@ -412,8 +416,8 @@ void fluidsimBake(bContext *C, struct Object *ob)
// old: noFrames = scene->r.efra - scene->r.sfra +1;
noFrames = scene->r.efra - 0;
if(noFrames<=0) {
- pupmenu("Fluidsim Bake Error%t|No frames to export - check your animation range settings. Aborted%x0");
- return;
+ BKE_report(reports, RPT_ERROR, "No frames to export - check your animation range settings.");
+ return 0;
}
/* no object pointer, find in selected ones.. */
@@ -434,7 +438,7 @@ void fluidsimBake(bContext *C, struct Object *ob)
}
}
// no domains found?
- if(!ob) return;
+ if(!ob) return 0;
}
channelObjCount = 0;
@@ -452,8 +456,8 @@ void fluidsimBake(bContext *C, struct Object *ob)
}
if (channelObjCount>=255) {
- pupmenu("Fluidsim Bake Error%t|Cannot bake with more then 256 objects");
- return;
+ BKE_report(reports, RPT_ERROR, "Cannot bake with more then 256 objects.");
+ return 0;
}
/* check if there's another domain... */
@@ -467,8 +471,8 @@ void fluidsimBake(bContext *C, struct Object *ob)
{
if(obit != ob)
{
- pupmenu("Fluidsim Bake Error%t|There should be only one domain object! Aborted%x0");
- return;
+ BKE_report(reports, RPT_ERROR, "There should be only one domain object.");
+ return 0;
}
}
}
@@ -490,8 +494,8 @@ void fluidsimBake(bContext *C, struct Object *ob)
}
}
if(!haveSomeFluid) {
- pupmenu("Fluidsim Bake Error%t|No fluid objects in scene... Aborted%x0");
- return;
+ BKE_report(reports, RPT_ERROR, "No fluid objects in scene.");
+ return 0;
}
/* these both have to be valid, otherwise we wouldnt be here */
@@ -585,7 +589,7 @@ void fluidsimBake(bContext *C, struct Object *ob)
// ask user if thats what he/she wants...
selection = pupmenu(dispmsg);
- if(selection<1) return; // 0 from menu, or -1 aborted
+ if(selection<1) return 0; // 0 from menu, or -1 aborted
strcpy(targetDir, newSurfdataPath);
strncpy(domainSettings->surfdataPath, newSurfdataPath, FILE_MAXDIR);
BLI_convertstringcode(targetDir, G.sce); // fixed #frame-no
@@ -710,6 +714,10 @@ void fluidsimBake(bContext *C, struct Object *ob)
// check & init loc,rot,size
for(j=0; j<3; j++) {
for(k=0; k<3; k++) {
+ // XXX prevent invalid memory access until this works
+ icuex[j][k]= NULL;
+ icudex[j][k]= NULL;
+
// XXX icuex[j][k] = find_ipocurve(obit->ipo, icuIds[j][k] );
// XXX icudex[j][k] = find_ipocurve(obit->ipo, icudIds[j][k] );
// XXX lines below were already disabled!
@@ -812,12 +820,12 @@ void fluidsimBake(bContext *C, struct Object *ob)
if(!Mat4Invert(invDomMat, domainMat)) {
snprintf(debugStrBuffer,256,"fluidsimBake::error - Invalid obj matrix?\n");
elbeemDebugOut(debugStrBuffer);
+ BKE_report(reports, RPT_ERROR, "Invalid object matrix.");
// FIXME add fatal msg
FS_FREE_CHANNELS;
- return;
+ return 0;
}
-
// --------------------------------------------------------------------------------------------
// start writing / exporting
strcpy(targetFile, targetDir);
@@ -1001,7 +1009,6 @@ void fluidsimBake(bContext *C, struct Object *ob)
} // valid mesh
} // objects
//domainSettings->type = OB_FLUIDSIM_DOMAIN; // enable for bake display again
- //fsDomain->fluidsimFlag = OB_FLUIDSIM_ENABLE; // disable during bake
// set to neutral, -1 means user abort, -2 means init error
globalBakeState = 0;
@@ -1080,7 +1087,7 @@ void fluidsimBake(bContext *C, struct Object *ob)
// --------------------------------------------------------------------------------------------
else
{ // write config file to be run with command line simulator
- pupmenu("Fluidsim Bake Message%t|Config file export not supported.%x0");
+ BKE_report(reports, RPT_WARNING, "Config file export not supported.");
} // config file export done!
// --------------------------------------------------------------------------------------------
@@ -1099,51 +1106,81 @@ void fluidsimBake(bContext *C, struct Object *ob)
ED_update_for_newframe(C, 1);
if(!simAborted) {
- char fsmessage[512];
char elbeemerr[256];
- strcpy(fsmessage,"Fluidsim Bake Error: ");
+
// check if some error occurred
if(globalBakeState==-2) {
- strcat(fsmessage,"Failed to initialize [Msg: ");
-
elbeemGetErrorString(elbeemerr);
- strcat(fsmessage,elbeemerr);
-
- strcat(fsmessage,"] |OK%x0");
- pupmenu(fsmessage);
+ BKE_reportf(reports, RPT_ERROR, "Failed to initialize [Msg: %s]", elbeemerr);
+ return 0;
} // init error
}
// elbeemFree();
+ return 1;
}
-void fluidsimFreeBake(struct Object *ob)
+void fluidsimFreeBake(Object *ob)
{
/* not implemented yet */
}
-
#else /* DISABLE_ELBEEM */
/* compile dummy functions for disabled fluid sim */
-FluidsimSettings *fluidsimSettingsNew(struct Object *srcob) {
+FluidsimSettings *fluidsimSettingsNew(Object *srcob)
+{
return NULL;
}
-void fluidsimSettingsFree(FluidsimSettings *fss) {
+void fluidsimSettingsFree(FluidsimSettings *fss)
+{
}
-FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *fss) {
+FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *fss)
+{
return NULL;
}
/* only compile dummy functions */
-void fluidsimBake(bContext *C, struct Object *ob) {
+int fluidsimBake(bContext *C, ReportList *reports, Object *ob)
+{
+ return 0;
}
-void fluidsimFreeBake(struct Object *ob) {
+void fluidsimFreeBake(Object *ob)
+{
}
#endif /* DISABLE_ELBEEM */
+/***************************** Operators ******************************/
+
+static int fluid_bake_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+
+ // XXX TODO redraw, escape, non-blocking, ..
+ if(!fluidsimBake(C, op->reports, ob))
+ return OPERATOR_CANCELLED;
+
+ return OPERATOR_FINISHED;
+}
+
+void FLUID_OT_bake(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Fluid Simulation Bake";
+ ot->idname= "FLUID_OT_bake";
+
+ /* api callbacks */
+ ot->exec= fluid_bake_exec;
+ ot->poll= ED_operator_object_active;
+}
+
+void ED_operatortypes_fluid(void)
+{
+ WM_operatortype_append(FLUID_OT_bake);
+}
+
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/ed_pointcache.c
new file mode 100644
index 00000000000..4bf6612df67
--- /dev/null
+++ b/source/blender/editors/physics/ed_pointcache.c
@@ -0,0 +1,385 @@
+/*
+ * $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 Janne Karhu.
+ * 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_scene_types.h"
+#include "DNA_object_force.h"
+#include "DNA_modifier_types.h"
+
+#include "BKE_context.h"
+#include "BKE_particle.h"
+#include "BKE_report.h"
+#include "BKE_scene.h"
+#include "BKE_utildefines.h"
+#include "BKE_pointcache.h"
+#include "BKE_global.h"
+#include "BKE_modifier.h"
+
+#include "BLI_blenlib.h"
+
+#include "ED_screen.h"
+#include "ED_physics.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "physics_intern.h"
+
+static int cache_break_test(void *cbd) {
+ return G.afbreek==1;
+}
+/**************************** general **********************************/
+static int ptcache_bake_all_poll(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ if(!scene)
+ return 0;
+
+ return 1;
+}
+
+static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ PTCacheBaker baker;
+
+
+ baker.scene = scene;
+ baker.pid = NULL;
+ baker.bake = RNA_boolean_get(op->ptr, "bake");
+ baker.render = 0;
+ baker.anim_init = 0;
+ baker.quick_step = 1;
+ baker.break_test = cache_break_test;
+ baker.break_data = NULL;
+ baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progresscontext = CTX_wm_window(C);
+
+ BKE_ptcache_make_cache(&baker);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+static int ptcache_free_bake_all_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Base *base;
+ PTCacheID *pid;
+ ListBase pidlist;
+
+ for(base=scene->base.first; base; base= base->next) {
+ BKE_ptcache_ids_from_object(&pidlist, base->object);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ pid->cache->flag &= ~PTCACHE_BAKED;
+ }
+
+ BLI_freelistN(&pidlist);
+ }
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+void PTCACHE_OT_bake_all(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake All Physics";
+ ot->idname= "PTCACHE_OT_bake_all";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_all_exec;
+ ot->poll= ptcache_bake_all_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
+}
+void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Free All Physics Bakes";
+ ot->idname= "PTCACHE_OT_free_bake_all";
+
+ /* api callbacks */
+ ot->exec= ptcache_free_bake_all_exec;
+ ot->poll= ptcache_bake_all_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/**************************** cloth **********************************/
+static int ptcache_bake_cloth_poll(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+
+ if(!scene || !ob || ob->id.lib || !clmd)
+ return 0;
+
+ return 1;
+}
+
+static int ptcache_bake_cloth_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+ PTCacheID pid;
+ PTCacheBaker baker;
+
+ BKE_ptcache_id_from_cloth(&pid, ob, clmd);
+
+ baker.scene = scene;
+ baker.pid = &pid;
+ baker.bake = RNA_boolean_get(op->ptr, "bake");
+ baker.render = 0;
+ baker.anim_init = 0;
+ baker.quick_step = 1;
+ baker.break_test = cache_break_test;
+ baker.break_data = NULL;
+ baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progresscontext = CTX_wm_window(C);
+
+ BKE_ptcache_make_cache(&baker);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+static int ptcache_free_bake_cloth_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_cloth(&pid, ob, clmd);
+ pid.cache->flag &= ~PTCACHE_BAKED;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_cache_cloth(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake Cloth";
+ ot->idname= "PTCACHE_OT_cache_cloth";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_cloth_exec;
+ ot->poll= ptcache_bake_cloth_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
+}
+void PTCACHE_OT_free_bake_cloth(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Free Cloth Bake";
+ ot->idname= "PTCACHE_OT_free_bake_cloth";
+
+ /* api callbacks */
+ ot->exec= ptcache_free_bake_cloth_exec;
+ ot->poll= ptcache_bake_cloth_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+static int ptcache_bake_from_cloth_cache_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_cloth(&pid, ob, clmd);
+ pid.cache->flag |= PTCACHE_BAKED;
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_bake_from_cloth_cache(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake From Cache";
+ ot->idname= "PTCACHE_OT_bake_from_cloth_cache";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_from_cloth_cache_exec;
+ ot->poll= ptcache_bake_cloth_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/**************************** particles **********************************/
+static int ptcache_bake_particle_system_poll(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+
+ if(!scene || !ob || ob->id.lib)
+ return 0;
+
+ return (ob->particlesystem.first != NULL);
+}
+
+static int ptcache_bake_particle_system_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys =psys_get_current(ob);
+ PTCacheID pid;
+ PTCacheBaker baker;
+
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+
+ baker.scene = scene;
+ baker.pid = &pid;
+ baker.bake = RNA_boolean_get(op->ptr, "bake");
+ baker.render = 0;
+ baker.anim_init = 0;
+ baker.quick_step = 1;
+ baker.break_test = cache_break_test;
+ baker.break_data = NULL;
+ baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progresscontext = CTX_wm_window(C);
+
+ BKE_ptcache_make_cache(&baker);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+static int ptcache_free_bake_particle_system_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys= psys_get_current(ob);
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+ psys->pointcache->flag &= ~PTCACHE_BAKED;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_cache_particle_system(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake Particles";
+ ot->idname= "PTCACHE_OT_cache_particle_system";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_particle_system_exec;
+ ot->poll= ptcache_bake_particle_system_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
+}
+void PTCACHE_OT_free_bake_particle_system(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Free Particles Bake";
+ ot->idname= "PTCACHE_OT_free_bake_particle_system";
+
+ /* api callbacks */
+ ot->exec= ptcache_free_bake_particle_system_exec;
+ ot->poll= ptcache_bake_particle_system_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+static int ptcache_bake_from_particles_cache_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys= psys_get_current(ob);
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_particles(&pid, ob, psys);
+ psys->pointcache->flag |= PTCACHE_BAKED;
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_bake_from_particles_cache(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake From Cache";
+ ot->idname= "PTCACHE_OT_bake_from_particles_cache";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_from_particles_cache_exec;
+ ot->poll= ptcache_bake_particle_system_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/**************************** registration **********************************/
+
+void ED_operatortypes_pointcache(void)
+{
+ WM_operatortype_append(PTCACHE_OT_bake_all);
+ WM_operatortype_append(PTCACHE_OT_free_bake_all);
+ WM_operatortype_append(PTCACHE_OT_cache_particle_system);
+ WM_operatortype_append(PTCACHE_OT_free_bake_particle_system);
+ WM_operatortype_append(PTCACHE_OT_bake_from_particles_cache);
+ WM_operatortype_append(PTCACHE_OT_cache_cloth);
+ WM_operatortype_append(PTCACHE_OT_free_bake_cloth);
+ WM_operatortype_append(PTCACHE_OT_bake_from_cloth_cache);
+}
+
+//void ED_keymap_pointcache(wmWindowManager *wm)
+//{
+// ListBase *keymap= WM_keymap_listbase(wm, "Pointcache", 0, 0);
+//
+// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0);
+// WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
+// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_particle_system", PADMINUS, KM_PRESS, KM_CTRL, 0);
+// WM_keymap_add_item(keymap, "PHYSICS_OT_free_particle_system", LKEY, KM_PRESS, 0, 0);
+//}
+
diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c
index 6d5b6768ceb..da8bcaab0b5 100644
--- a/source/blender/editors/physics/editparticle.c
+++ b/source/blender/editors/physics/editparticle.c
@@ -225,7 +225,7 @@ void PE_hide_keys_time(Scene *scene, ParticleSystem *psys, float cfra)
ParticleEditSettings *pset=PE_settings(scene);
int i, k, totpart= psys->totpart;
- if(pset->draw_timed && scene->selectmode==SCE_SELECT_POINT) {
+ 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)
@@ -425,11 +425,12 @@ static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest)
ParticleEdit *edit= psys->edit;
ParticleData *pa;
ParticleEditKey *key;
+ ParticleEditSettings *pset= PE_settings(data->scene);
int i, k, totpart, nearest_pa, nearest_key;
float dist= data->rad;
/* in path select mode we have no keys */
- if(data->scene->selectmode==SCE_SELECT_PATH)
+ if(pset->selectmode==SCE_SELECT_PATH)
return;
totpart= psys->totpart;
@@ -439,7 +440,7 @@ static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest)
LOOP_PARTICLES(i, pa) {
if(pa->flag & PARS_HIDE) continue;
- if(data->scene->selectmode == SCE_SELECT_END) {
+ if(pset->selectmode == SCE_SELECT_END) {
/* only do end keys */
key= edit->keys[i] + pa->totkey-1;
@@ -481,18 +482,19 @@ static void foreach_mouse_hit_particle(PEData *data, ForParticleFunc func, int s
ParticleSystem *psys= data->psys;
ParticleData *pa;
ParticleEditKey *key;
+ ParticleEditSettings *pset= PE_settings(data->scene);
int i, k, totpart;
totpart= psys->totpart;
/* all is selected in path mode */
- if(data->scene->selectmode==SCE_SELECT_PATH)
+ if(pset->selectmode==SCE_SELECT_PATH)
selected=0;
LOOP_PARTICLES(i, pa) {
if(pa->flag & PARS_HIDE) continue;
- if(data->scene->selectmode==SCE_SELECT_END) {
+ if(pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
key= psys->edit->keys[i] + pa->totkey-1;
@@ -522,6 +524,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
ParticleData *pa;
ParticleEditKey *key;
ParticleSystemModifierData *psmd=0;
+ ParticleEditSettings *pset= PE_settings(data->scene);
int i, k, totpart;
float mat[4][4], imat[4][4];
@@ -529,7 +532,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
totpart= psys->totpart;
/* all is selected in path mode */
- if(data->scene->selectmode==SCE_SELECT_PATH)
+ if(pset->selectmode==SCE_SELECT_PATH)
selected= 0;
Mat4One(imat);
@@ -541,7 +544,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, pa, mat);
Mat4Invert(imat,mat);
- if(data->scene->selectmode==SCE_SELECT_END) {
+ if(pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
key= psys->edit->keys[i] + pa->totkey-1;
@@ -610,6 +613,7 @@ static int count_selected_keys(Scene *scene, ParticleSystem *psys)
{
ParticleData *pa;
ParticleEditKey *key;
+ ParticleEditSettings *pset= PE_settings(scene);
int i, k, totpart, sel= 0;
totpart= psys->totpart;
@@ -619,12 +623,12 @@ static int count_selected_keys(Scene *scene, ParticleSystem *psys)
key= psys->edit->keys[i];
- if(scene->selectmode==SCE_SELECT_POINT) {
+ if(pset->selectmode==SCE_SELECT_POINT) {
for(k=0; k<pa->totkey; k++,key++)
if(key->flag & PEK_SELECT)
sel++;
}
- else if(scene->selectmode==SCE_SELECT_END) {
+ else if(pset->selectmode==SCE_SELECT_END) {
key += pa->totkey-1;
if(key->flag & PEK_SELECT)
@@ -999,7 +1003,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
BLI_kdtree_free(edit->emitter_field);
- totface=dm->getNumTessFaces(dm);
+ totface=dm->getNumFaces(dm);
totvert=dm->getNumVerts(dm);
edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos");
@@ -1454,6 +1458,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
ParticleEdit *edit;
ParticleData *pa;
ParticleEditKey *key;
+ ParticleEditSettings *pset= PE_settings(scene);
float co[3], mat[4][4];
short vertco[2];
int i, k, totpart;
@@ -1470,7 +1475,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat);
- if(scene->selectmode==SCE_SELECT_POINT) {
+ if(pset->selectmode==SCE_SELECT_POINT) {
LOOP_KEYS(k, key) {
VECCOPY(co, key->co);
Mat4MulVecfl(mat, co);
@@ -1487,7 +1492,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
}
}
}
- else if(scene->selectmode==SCE_SELECT_END) {
+ else if(pset->selectmode==SCE_SELECT_END) {
key= edit->keys[i] + pa->totkey - 1;
VECCOPY(co, key->co);
@@ -1821,7 +1826,7 @@ void PARTICLE_OT_rekey(wmOperatorType *ot)
/* api callbacks */
ot->exec= rekey_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= PE_poll;
/* flags */
@@ -2339,7 +2344,7 @@ void PARTICLE_OT_brush_radial_control(wmOperatorType *ot)
ot->poll= PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
/*************************** delete operator **************************/
@@ -2347,9 +2352,9 @@ void PARTICLE_OT_brush_radial_control(wmOperatorType *ot)
enum { DEL_PARTICLE, DEL_KEY };
static EnumPropertyItem delete_type_items[]= {
- {DEL_PARTICLE, "PARTICLE", "Particle", ""},
- {DEL_KEY, "KEY", "Key", ""},
- {0, NULL, NULL}};
+ {DEL_PARTICLE, "PARTICLE", 0, "Particle", ""},
+ {DEL_KEY, "KEY", 0, "Key", ""},
+ {0, NULL, 0, NULL, NULL}};
static void set_delete_particle(PEData *data, int pa_index)
{
@@ -2563,15 +2568,15 @@ void PARTICLE_OT_mirror(wmOperatorType *ot)
/*********************** set brush operator **********************/
static EnumPropertyItem brush_type_items[]= {
- {PE_BRUSH_NONE, "NONE", "None", ""},
- {PE_BRUSH_COMB, "COMB", "Comb", ""},
- {PE_BRUSH_SMOOTH, "SMOOTH", "Smooth", ""},
- {PE_BRUSH_WEIGHT, "WEIGHT", "Weight", ""},
- {PE_BRUSH_ADD, "ADD", "Add", ""},
- {PE_BRUSH_LENGTH, "LENGTH", "Length", ""},
- {PE_BRUSH_PUFF, "PUFF", "Puff", ""},
- {PE_BRUSH_CUT, "CUT", "Cut", ""},
- {0, NULL, NULL, NULL}
+ {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", ""},
+ {PE_BRUSH_CUT, "CUT", 0, "Cut", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int set_brush_exec(bContext *C, wmOperator *op)
@@ -3353,7 +3358,7 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot)
ot->poll= PE_poll_3dview;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -3842,6 +3847,7 @@ void PE_change_act_psys(Scene *scene, Object *ob, ParticleSystem *psys)
static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
+ ParticleEditSettings *pset=PE_settings(scene);
uiPopupMenu *pup;
uiLayout *layout;
@@ -3849,7 +3855,7 @@ static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
layout= uiPupMenuLayout(pup);
uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey");
- if(scene->selectmode & SCE_SELECT_POINT) {
+ 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");
diff --git a/source/blender/editors/preview/Makefile b/source/blender/editors/preview/Makefile
index c44da6753f3..48e1dc64673 100644
--- a/source/blender/editors/preview/Makefile
+++ b/source/blender/editors/preview/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c
index 3ed4fa6bd0f..1efa5108b96 100644
--- a/source/blender/editors/preview/previewrender.c
+++ b/source/blender/editors/preview/previewrender.c
@@ -114,46 +114,12 @@ typedef struct ShaderPreview {
ID *id;
int sizex, sizey;
+ int *pr_rect;
int pr_method;
} ShaderPreview;
-static void set_previewrect(ScrArea *sa, RenderInfo *ri)
-{
- ARegion *ar= NULL; // XXX
- rctf viewplane;
-
- BLI_init_rctf(&viewplane, PR_XMIN, PR_XMAX, PR_YMIN, PR_YMAX);
-
-// ui_graphics_to_window_rct(ar->win, &viewplane, &ri->disprect);
-
- /* correction for gla draw */
- BLI_translate_rcti(&ri->disprect, -ar->winrct.xmin, -ar->winrct.ymin);
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- glaDefine2DArea(&ar->winrct);
-
- ri->pr_rectx= (ri->disprect.xmax-ri->disprect.xmin);
- ri->pr_recty= (ri->disprect.ymax-ri->disprect.ymin);
-}
-
-static void end_previewrect(ARegion *ar)
-{
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- // restore viewport / scissor which was set by glaDefine2DArea
- glViewport(ar->winrct.xmin, ar->winrct.ymin, ar->winx, ar->winy);
- glScissor(ar->winrct.xmin, ar->winrct.ymin, ar->winx, ar->winy);
-
-}
/* unused now */
void draw_tex_crop(Tex *tex)
@@ -438,236 +404,46 @@ static Scene *preview_prepare_scene(Scene *scene, int id_type, ShaderPreview *sp
return NULL;
}
-void previewrender_progress(void *handle, RenderResult *rr, volatile rcti *renrect)
-{
- SpaceButs *sbuts= NULL; // XXX
- RenderLayer *rl;
- RenderInfo *ri= sbuts->ri;
- float ofsx, ofsy;
-
- if(renrect) return;
-
- rl= rr->layers.first;
-
- ofsx= ri->disprect.xmin + rr->tilerect.xmin;
- ofsy= ri->disprect.ymin + rr->tilerect.ymin;
-
- glDrawBuffer(GL_FRONT);
- glaDrawPixelsSafe_to32(ofsx, ofsy, rr->rectx, rr->recty, rr->rectx, rl->rectf);
- bglFlush();
- glDrawBuffer(GL_BACK);
-}
-
-
-/* called by interface_icons.c, or by BIF_previewrender_buts or by nodes... */
-void BIF_previewrender(Scene *scene, struct ID *id, struct RenderInfo *ri, struct ScrArea *area, int pr_method)
-{
- SpaceButs *sbuts= NULL; // XXX
- Render *re;
- RenderStats *rstats;
- Scene *sce;
- int oldx= ri->pr_rectx, oldy= ri->pr_recty;
- char name [32];
-
- if(ri->tottile && ri->curtile>=ri->tottile) return;
-
- /* check for return with a new event */
- if(pr_method!=PR_ICON_RENDER && qtest()) {
-// if(area)
-// addafterqueue(area->win, RENDERPREVIEW, 1);
- return;
- }
-
- /* get the stuff from the builtin preview dbase */
-// sce= preview_prepare_scene(scene, ri, GS(id->name), id, pr_method);
- if(sce==NULL) return;
-
- /* set drawing conditions OK */
- if(area) {
- sbuts= area->spacedata.first; /* needed for flag */
-
- set_previewrect(area, ri); // uses UImat
-
- /* because preview render size can differs */
- if(ri->rect && (oldx!=ri->pr_rectx || oldy!=ri->pr_recty)) {
- MEM_freeN(ri->rect);
- ri->rect= NULL;
- ri->curtile= 0;
- }
- }
-
-// XXX sprintf(name, "ButsPreview %d", area?area->win:0);
- re= RE_GetRender(name);
-
- /* full refreshed render from first tile */
- if(re==NULL || ri->curtile==0) {
-
- re= RE_NewRender(name);
-
- /* handle cases */
- if(pr_method==PR_DRAW_RENDER) {
-// RE_display_draw_cb(re, previewrender_progress);
-// RE_test_break_cb(re, qtest);
- sce->r.scemode |= R_NODE_PREVIEW;
- if(sbuts->flag & SB_PRV_OSA)
- sce->r.mode |= R_OSA;
- sce->r.scemode &= ~R_NO_IMAGE_LOAD;
- }
- else if(pr_method==PR_DO_RENDER) {
-// RE_test_break_cb(re, qtest);
- sce->r.scemode |= R_NODE_PREVIEW;
- sce->r.scemode &= ~R_NO_IMAGE_LOAD;
- }
- else { /* PR_ICON_RENDER */
- sce->r.scemode &= ~R_NODE_PREVIEW;
- sce->r.scemode |= R_NO_IMAGE_LOAD;
- }
-
- /* allocates render result */
- RE_InitState(re, NULL, &sce->r, ri->pr_rectx, ri->pr_recty, NULL);
-
- /* enforce preview image clear */
- if(GS(id->name)==ID_MA) {
- Material *ma= (Material *)id;
- ntreeClearPreview(ma->nodetree);
- }
- }
- /* entire cycle for render engine */
- RE_SetCamera(re, sce->camera);
- RE_Database_FromScene(re, sce, 1);
- RE_TileProcessor(re, ri->curtile, 0); // actual render engine
- RE_Database_Free(re);
-
- /* handle results */
- if(pr_method==PR_ICON_RENDER) {
- if(ri->rect==NULL)
- ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender");
- RE_ResultGet32(re, ri->rect);
- }
- else {
- rstats= RE_GetStats(re);
-
- if(rstats->partsdone!=ri->curtile) {
- if(ri->rect==NULL)
- ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender");
- RE_ResultGet32(re, ri->rect);
- }
-
- if(rstats->totpart==rstats->partsdone && rstats->partsdone) {
- // allqueues
- }
- else {
-// if(pr_method==PR_DRAW_RENDER && qtest())
-// addafterqueue(area->win, RENDERPREVIEW, 1);
- }
-
- ri->curtile= rstats->partsdone;
- ri->tottile= rstats->totpart;
- }
-
- /* unassign the pointers, reset vars */
-// preview_prepare_scene(scene, ri, GS(id->name), NULL, 0);
-
-}
-
-
-/* afterqueue call */
-void BIF_previewrender_buts(Scene *scene, SpaceButs *sbuts)
-{
-// ScrArea *sa= NULL; // XXX
- ARegion *ar= NULL; // XXX
- uiBlock *block;
- struct ID* id = 0;
-// struct ID* idfrom = 0;
- struct ID* idshow = 0;
- Object *ob;
-
- if (!sbuts->ri) return;
-
-
-// block= uiFindOpenPanelBlockName(&sa->uiblocks, "Preview");
- if(block==NULL) return;
-
- ob= ((scene->basact)? (scene->basact)->object: 0);
-
- /* we cant trust this global lockpoin.. for example with headerless window */
-// buttons_active_id(&id, &idfrom);
- sbuts->lockpoin= id;
-
- if(sbuts->mainb==CONTEXT_SHADING) {
- int tab= TAB_SHADING_MAT; // XXX sbuts->tab[CONTEXT_SHADING];
-
- if(tab==TAB_SHADING_MAT)
- idshow = sbuts->lockpoin;
- else if(tab==TAB_SHADING_TEX)
- idshow = sbuts->lockpoin;
- else if(tab==TAB_SHADING_LAMP) {
- if(ob && ob->type==OB_LAMP) idshow= ob->data;
- }
- else if(tab==TAB_SHADING_WORLD)
- idshow = sbuts->lockpoin;
- }
- else if(sbuts->mainb==CONTEXT_OBJECT) {
- if(ob && ob->type==OB_LAMP) idshow = ob->data;
- }
-
- if (idshow) {
- BKE_icon_changed(BKE_icon_getid(idshow));
-// uiPanelPush(block);
-// BIF_previewrender(scene, idshow, sbuts->ri, sbuts->area, PR_DRAW_RENDER);
-// uiPanelPop(block);
- end_previewrect(ar);
- }
- else {
- /* no active block to draw. But we do draw black if possible */
- if(sbuts->ri->rect) {
- memset(sbuts->ri->rect, 0, sizeof(int)*sbuts->ri->pr_rectx*sbuts->ri->pr_recty);
- sbuts->ri->tottile= 10000;
-// addqueue(sa->win, REDRAW, 1);
- }
- return;
- }
-}
/* new UI convention: draw is in pixel space already. */
/* uses ROUNDBOX button in block to get the rect */
void ED_preview_draw(const bContext *C, void *idp, rcti *rect)
{
- ScrArea *sa= CTX_wm_area(C);
- SpaceButs *sbuts= sa->spacedata.first;
- RenderResult rres;
- int newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
- int ok= 0;
- char name[32];
-
- sprintf(name, "Preview %p", sa);
- BLI_lock_malloc_thread();
- RE_GetResultImage(RE_GetRender(name), &rres);
-
- if(rres.rectf) {
-
- if( ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2 ) {
- /* correct size, then black outline matches */
- rect->xmax= rect->xmin + rres.rectx;
- rect->ymax= rect->ymin + rres.recty;
+ if(idp) {
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceButs *sbuts= sa->spacedata.first;
+ RenderResult rres;
+ int newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
+ int ok= 0;
+ char name[32];
- glaDrawPixelsSafe(rect->xmin, rect->ymin, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_FLOAT, rres.rectf);
- ok= 1;
+ sprintf(name, "Preview %p", sa);
+ BLI_lock_malloc_thread();
+ RE_GetResultImage(RE_GetRender(name), &rres);
+
+ if(rres.rectf) {
+
+ if( ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2 ) {
+ /* correct size, then black outline matches */
+ rect->xmax= rect->xmin + rres.rectx;
+ rect->ymax= rect->ymin + rres.recty;
+
+ glaDrawPixelsSafe(rect->xmin, rect->ymin, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_FLOAT, rres.rectf);
+ ok= 1;
+ }
}
- }
- BLI_unlock_malloc_thread();
+ BLI_unlock_malloc_thread();
- /* check for spacetype... */
- if(sbuts->spacetype==SPACE_BUTS && sbuts->preview) {
- sbuts->preview= 0;
- ok= 0;
- }
-
- if(ok==0) {
- printf("added shader job\n");
- ED_preview_shader_job(C, sa, idp, newx, newy);
- }
-
+ /* check for spacetype... */
+ if(sbuts->spacetype==SPACE_BUTS && sbuts->preview) {
+ sbuts->preview= 0;
+ ok= 0;
+ }
+
+ if(ok==0) {
+ ED_preview_shader_job(C, sa, idp, newx, newy);
+ }
+ }
}
/* *************************** Preview for 3d window *********************** */
@@ -1006,7 +782,7 @@ static void shader_preview_updatejob(void *spv)
}
-/* runs inside thread */
+/* runs inside thread for material, in foreground for icons */
static void shader_preview_startjob(void *customdata, short *stop, short *do_update)
{
ShaderPreview *sp= customdata;
@@ -1064,9 +840,8 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd
/* handle results */
if(sp->pr_method==PR_ICON_RENDER) {
- //if(ri->rect==NULL)
- // ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender");
- //RE_ResultGet32(re, ri->rect);
+ if(sp->pr_rect)
+ RE_ResultGet32(re, sp->pr_rect);
}
else {
/* validate owner */
@@ -1113,6 +888,29 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, int sizex, in
WM_jobs_callbacks(steve, shader_preview_startjob, NULL, shader_preview_updatejob);
WM_jobs_start(CTX_wm_manager(C), steve);
+
+ /* signal to rerender icon in menus */
+ BKE_icon_changed(BKE_icon_getid(id));
+}
+
+/* rect should be allocated, sizex/sizy pixels, 32 bits */
+void ED_preview_iconrender(Scene *scene, ID *id, int *rect, int sizex, int sizey)
+{
+ ShaderPreview *sp= MEM_callocN(sizeof(ShaderPreview), "ShaderPreview");
+ short stop=0, do_update=0;
+
+ /* customdata for preview thread */
+ sp->scene= scene;
+ sp->sizex= sizex;
+ sp->sizey= sizey;
+ sp->pr_method= PR_ICON_RENDER;
+ sp->pr_rect= rect;
+ sp->id = id;
+
+ shader_preview_startjob(sp, &stop, &do_update);
+
+ MEM_freeN(sp);
}
+
diff --git a/source/blender/editors/screen/Makefile b/source/blender/editors/screen/Makefile
index cf6e692c304..923a020afcf 100644
--- a/source/blender/editors/screen/Makefile
+++ b/source/blender/editors/screen/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 81b63b694ba..69af4fbb45d 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -259,14 +259,17 @@ static void region_scissor_winrct(ARegion *ar, rcti *winrct)
while(ar->prev) {
ar= ar->prev;
- if(ar->flag & RGN_FLAG_HIDDEN);
- else if(ar->alignment==RGN_OVERLAP_LEFT) {
- winrct->xmin= ar->winrct.xmax + 1;
- }
- else if(ar->alignment==RGN_OVERLAP_RIGHT) {
- winrct->xmax= ar->winrct.xmin - 1;
+ if(BLI_isect_rcti(winrct, &ar->winrct, NULL)) {
+ if(ar->flag & RGN_FLAG_HIDDEN);
+ else if(ar->alignment & RGN_SPLIT_PREV);
+ else if(ar->alignment==RGN_OVERLAP_LEFT) {
+ winrct->xmin= ar->winrct.xmax + 1;
+ }
+ else if(ar->alignment==RGN_OVERLAP_RIGHT) {
+ winrct->xmax= ar->winrct.xmin - 1;
+ }
+ else break;
}
- else break;
}
}
@@ -1048,6 +1051,7 @@ static char *windowtype_pup(void)
"|Outliner %x3" //232
"|Buttons Window %x4" //251
"|Node Editor %x16"
+ "|Logic Editor %x17"
"|%l" //254
"|File Browser %x5" //290
@@ -1106,6 +1110,7 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *context)
{
+ ScrArea *sa= CTX_wm_area(C);
uiStyle *style= U.uistyles.first;
uiBlock *block;
PanelType *pt;
@@ -1123,8 +1128,6 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
em= (ar->type->minsizex)? 10: 20;
}
- header= 20; // XXX
- triangle= 22;
x= 0;
y= -style->panelouter;
@@ -1143,12 +1146,16 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
/* draw panel */
if(pt->draw && (!pt->poll || pt->poll(C, pt))) {
block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS);
- panel= uiBeginPanel(ar, block, pt, &open);
+ panel= uiBeginPanel(sa, ar, block, pt, &open);
+
+ /* bad fixed values */
+ header= (pt->flag & PNL_NO_HEADER)? 0: 20;
+ triangle= 22;
if(vertical)
y -= header;
- if(pt->draw_header && (open || vertical)) {
+ if(pt->draw_header && header && (open || vertical)) {
/* for enabled buttons */
panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
triangle, header+style->panelspace, header, 1, style);
@@ -1161,7 +1168,6 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
}
if(open) {
- panel->type= pt;
panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
style->panelspace, 0, w-2*style->panelspace, em, style);
@@ -1173,13 +1179,18 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
yco -= 2*style->panelspace;
uiEndPanel(block, w, -yco);
}
- else
+ else {
yco= 0;
+ uiEndPanel(block, w, 0);
+ }
uiEndBlock(C, block);
if(vertical) {
- y += yco-style->panelouter;
+ if(pt->flag & PNL_NO_HEADER)
+ y += yco;
+ else
+ y += yco-style->panelouter;
}
else {
x += w;
@@ -1208,13 +1219,20 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
if(vertical) {
v2d->keepofs |= V2D_LOCKOFS_X;
v2d->keepofs &= ~V2D_LOCKOFS_Y;
+
+ // don't jump back when panels close or hide
+ y= MAX2(-y, -v2d->cur.ymin);
}
else {
v2d->keepofs &= ~V2D_LOCKOFS_X;
v2d->keepofs |= V2D_LOCKOFS_Y;
+
+ // don't jump back when panels close or hide
+ x= MAX2(x, v2d->cur.xmax);
+ y= -y;
}
- UI_view2d_totRect_set(v2d, x, -y);
+ UI_view2d_totRect_set(v2d, x, y);
/* set the view */
UI_view2d_view_ortho(C, v2d);
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index a81a52fd544..a23487effa1 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -1,5 +1,5 @@
/**
- * $Id: glutil.c 11920 2007-09-02 17:25:03Z elubie $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 11d1d019005..1ea6f8baceb 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -42,7 +42,15 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
Scene *scene= sc->scene;
Base *base;
- if(CTX_data_equals(member, "scene")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {
+ "scene", "selected_objects", "selected_bases", "active_base",
+ "active_object", "edit_object", NULL};
+
+ CTX_data_dir_set(result, dir);
+ return 1;
+ }
+ else if(CTX_data_equals(member, "scene")) {
CTX_data_id_pointer_set(result, &scene->id);
return 1;
}
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 4e08310240c..6da00f12a25 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1460,7 +1460,9 @@ void ED_screen_full_prevspace(bContext *C)
ed_screen_fullarea(C, sa);
}
-/* redraws: uses defines from stime->redraws */
+/* redraws: uses defines from stime->redraws
+ * enable: 1 - forward on, -1 - backwards on, 0 - off
+ */
void ED_screen_animation_timer(bContext *C, int redraws, int enable)
{
bScreen *screen= CTX_wm_screen(C);
@@ -1477,6 +1479,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int enable)
screen->animtimer= WM_event_add_window_timer(win, TIMER0, (1.0/FPS));
sad->ar= CTX_wm_region(C);
sad->redraws= redraws;
+ sad->reverse= (enable < 0);
screen->animtimer->customdata= sad;
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 646c77ec5b5..19cbf93a83c 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -34,6 +34,7 @@
#include "DNA_armature_types.h"
#include "DNA_image_types.h"
+#include "DNA_lattice_types.h"
#include "DNA_object_types.h"
#include "DNA_mesh_types.h"
#include "DNA_curve_types.h"
@@ -52,7 +53,6 @@
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
-#include "BKE_mesh.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -60,6 +60,7 @@
#include "ED_util.h"
#include "ED_screen.h"
#include "ED_mesh.h"
+#include "ED_object.h"
#include "ED_screen_types.h"
#include "RE_pipeline.h"
@@ -165,6 +166,7 @@ int ED_operator_node_active(bContext *C)
return 0;
}
+// XXX rename
int ED_operator_ipo_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_IPO);
@@ -180,6 +182,16 @@ int ED_operator_image_active(bContext *C)
return ed_spacetype_test(C, SPACE_IMAGE);
}
+int ED_operator_nla_active(bContext *C)
+{
+ return ed_spacetype_test(C, SPACE_NLA);
+}
+
+int ED_operator_logic_active(bContext *C)
+{
+ return ed_spacetype_test(C, SPACE_LOGIC);
+}
+
int ED_operator_object_active(bContext *C)
{
return NULL != CTX_data_active_object(C);
@@ -282,6 +294,14 @@ int ED_operator_editfont(bContext *C)
return 0;
}
+int ED_operator_editlattice(bContext *C)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ if(obedit && obedit->type==OB_LATTICE)
+ return NULL != ((Lattice *)obedit->data)->editlatt;
+ return 0;
+}
+
/* *************************** action zone operator ************************** */
/* operator state vars used:
@@ -483,8 +503,10 @@ void SCREEN_OT_actionzone(wmOperatorType *ot)
ot->invoke= actionzone_invoke;
ot->modal= actionzone_modal;
-
ot->poll= actionzone_area_poll;
+
+ ot->flag= OPTYPE_BLOCKING;
+
RNA_def_int(ot->srna, "modifier", 0, 0, 2, "modifier", "modifier state", 0, 2);
}
@@ -598,6 +620,8 @@ static void SCREEN_OT_area_swap(wmOperatorType *ot)
ot->invoke= area_swap_invoke;
ot->modal= area_swap_modal;
ot->poll= ED_operator_areaactive;
+
+ ot->flag= OPTYPE_BLOCKING;
}
/* *********** Duplicate area as new window operator ****************** */
@@ -892,9 +916,10 @@ void SCREEN_OT_area_move(wmOperatorType *ot)
ot->invoke= area_move_invoke;
ot->cancel= area_move_cancel;
ot->modal= area_move_modal;
-
ot->poll= ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
+ ot->flag= OPTYPE_BLOCKING;
+
/* rna */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
@@ -1193,9 +1218,9 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
}
static EnumPropertyItem prop_direction_items[] = {
- {'h', "HORIZONTAL", "Horizontal", ""},
- {'v', "VERTICAL", "Vertical", ""},
- {0, NULL, NULL, NULL}};
+ {'h', "HORIZONTAL", 0, "Horizontal", ""},
+ {'v', "VERTICAL", 0, "Vertical", ""},
+ {0, NULL, 0, NULL, NULL}};
void SCREEN_OT_area_split(wmOperatorType *ot)
{
@@ -1207,7 +1232,7 @@ void SCREEN_OT_area_split(wmOperatorType *ot)
ot->modal= area_split_modal;
ot->poll= ED_operator_areaactive;
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
/* rna */
RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", "");
@@ -1324,6 +1349,8 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
ot->modal= region_scale_modal;
ot->poll= ED_operator_areaactive;
+
+ ot->flag= OPTYPE_BLOCKING;
}
@@ -1705,9 +1732,10 @@ void SCREEN_OT_area_join(wmOperatorType *ot)
ot->exec= area_join_exec;
ot->invoke= area_join_invoke;
ot->modal= area_join_modal;
-
ot->poll= ED_operator_areaactive;
+ ot->flag= OPTYPE_BLOCKING;
+
/* rna */
RNA_def_int(ot->srna, "x1", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "y1", -100, INT_MIN, INT_MAX, "Y 1", "", INT_MIN, INT_MAX);
@@ -2056,19 +2084,40 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
if(scene->audio.flag & AUDIO_SYNC) {
int step = floor(wt->duration * FPS);
- scene->r.cfra += step;
+ if (sad->reverse) // XXX does this option work with audio?
+ scene->r.cfra -= step;
+ else
+ scene->r.cfra += step;
wt->duration -= ((float)step)/FPS;
}
- else
- scene->r.cfra++;
+ else {
+ if (sad->reverse)
+ scene->r.cfra--;
+ else
+ scene->r.cfra++;
+ }
- if (scene->r.psfra) {
- if(scene->r.cfra > scene->r.pefra)
- scene->r.cfra= scene->r.psfra;
+ if (sad->reverse) {
+ /* jump back to end */
+ if (scene->r.psfra) {
+ if(scene->r.cfra < scene->r.psfra)
+ scene->r.cfra= scene->r.pefra;
+ }
+ else {
+ if(scene->r.cfra < scene->r.sfra)
+ scene->r.cfra= scene->r.efra;
+ }
}
else {
- if(scene->r.cfra > scene->r.efra)
- scene->r.cfra= scene->r.sfra;
+ /* jump back to start */
+ if (scene->r.psfra) {
+ if(scene->r.cfra > scene->r.pefra)
+ scene->r.cfra= scene->r.psfra;
+ }
+ else {
+ if(scene->r.cfra > scene->r.efra)
+ scene->r.cfra= scene->r.sfra;
+ }
}
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
@@ -2116,8 +2165,9 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event)
ED_screen_animation_timer(C, 0, 0);
}
else {
- /* todo: RNA properties to define play types */
- ED_screen_animation_timer(C, TIME_REGION|TIME_ALL_3D_WIN, 1);
+ int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
+
+ ED_screen_animation_timer(C, TIME_REGION|TIME_ALL_3D_WIN, mode);
if(screen->animtimer) {
wmTimer *wt= screen->animtimer;
@@ -2141,7 +2191,7 @@ void SCREEN_OT_animation_play(wmOperatorType *ot)
ot->poll= ED_operator_screenactive;
-
+ RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards");
}
/* ************** border select operator (template) ***************************** */
@@ -2270,48 +2320,92 @@ static ScrArea *find_area_showing_r_result(bContext *C)
return sa;
}
-static void screen_set_image_output(bContext *C)
+static ScrArea *find_area_image_empty(bContext *C)
{
+ bScreen *sc= CTX_wm_screen(C);
ScrArea *sa;
SpaceImage *sima;
- sa= find_area_showing_r_result(C);
+ /* find an imagewindow showing render result */
+ for(sa=sc->areabase.first; sa; sa= sa->next) {
+ if(sa->spacetype==SPACE_IMAGE) {
+ sima= sa->spacedata.first;
+ if(!sima->image)
+ break;
+ }
+ }
+ return sa;
+}
+
+static ScrArea *find_empty_image_area(bContext *C)
+{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa;
+ SpaceImage *sima;
- if(sa==NULL) {
- /* find largest open non-image area */
- sa= biggest_non_image_area(C);
- if(sa) {
- ED_area_newspace(C, sa, SPACE_IMAGE);
+ /* find an imagewindow showing render result */
+ for(sa=sc->areabase.first; sa; sa= sa->next) {
+ if(sa->spacetype==SPACE_IMAGE) {
sima= sa->spacedata.first;
-
- /* makes ESC go back to prev space */
- sima->flag |= SI_PREVSPACE;
+ if(!sima->image)
+ break;
}
- else {
- /* use any area of decent size */
- sa= biggest_area(C);
- if(sa->spacetype!=SPACE_IMAGE) {
- // XXX newspace(sa, SPACE_IMAGE);
+ }
+ return sa;
+}
+
+static void screen_set_image_output(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa;
+ SpaceImage *sima;
+
+ if(scene->r.displaymode==R_OUTPUT_SCREEN) {
+ /* this function returns with changed context */
+ ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE);
+ sa= CTX_wm_area(C);
+ }
+ else {
+
+ sa= find_area_showing_r_result(C);
+ if(sa==NULL)
+ sa= find_area_image_empty(C);
+
+ if(sa==NULL) {
+ /* find largest open non-image area */
+ sa= biggest_non_image_area(C);
+ if(sa) {
+ ED_area_newspace(C, sa, SPACE_IMAGE);
sima= sa->spacedata.first;
/* makes ESC go back to prev space */
sima->flag |= SI_PREVSPACE;
}
+ else {
+ /* use any area of decent size */
+ sa= biggest_area(C);
+ if(sa->spacetype!=SPACE_IMAGE) {
+ // XXX newspace(sa, SPACE_IMAGE);
+ sima= sa->spacedata.first;
+
+ /* makes ESC go back to prev space */
+ sima->flag |= SI_PREVSPACE;
+ }
+ }
}
- }
-
+ }
sima= sa->spacedata.first;
/* get the correct image, and scale it */
sima->image= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result");
- if(G.displaymode==2) { // XXX
- if(sa->full==0) {
- sima->flag |= SI_FULLWINDOW;
+// if(G.displaymode==2) { // XXX
+ if(sa->full) {
+ sima->flag |= SI_FULLWINDOW|SI_PREVSPACE;
- ed_screen_fullarea(C, sa);
+// ed_screen_fullarea(C, sa);
}
- }
+// }
}
@@ -2357,6 +2451,62 @@ static void render_freejob(void *rjv)
MEM_freeN(rj);
}
+/* str is IMA_RW_MAXTEXT in size */
+static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str)
+{
+ char info_time_str[32]; // used to be extern to header_info.c
+ uintptr_t mem_in_use, mmap_in_use;
+ float megs_used_memory, mmap_used_memory;
+ char *spos= str;
+
+ mem_in_use= MEM_get_memory_in_use();
+ mmap_in_use= MEM_get_mapped_memory_in_use();
+
+ megs_used_memory= (mem_in_use-mmap_in_use)/(1024.0*1024.0);
+ mmap_used_memory= (mmap_in_use)/(1024.0*1024.0);
+
+ if(scene->lay & 0xFF000000)
+ spos+= sprintf(spos, "Localview | ");
+ else if(scene->r.scemode & R_SINGLE_LAYER)
+ spos+= sprintf(spos, "Single Layer | ");
+
+ spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d ", (scene->r.cfra), rs->totvert, rs->totface);
+ if(rs->tothalo) spos+= sprintf(spos, "Ha:%d ", rs->tothalo);
+ if(rs->totstrand) spos+= sprintf(spos, "St:%d ", rs->totstrand);
+ spos+= sprintf(spos, "La:%d Mem:%.2fM (%.2fM) ", rs->totlamp, megs_used_memory, mmap_used_memory);
+
+ if(rs->curfield)
+ spos+= sprintf(spos, "Field %d ", rs->curfield);
+ if(rs->curblur)
+ spos+= sprintf(spos, "Blur %d ", rs->curblur);
+
+ BLI_timestr(rs->lastframetime, info_time_str);
+ spos+= sprintf(spos, "Time:%s ", info_time_str);
+
+ if(rs->infostr)
+ spos+= sprintf(spos, "| %s ", rs->infostr);
+
+ /* very weak... but 512 characters is quite safe */
+ if(spos >= str+IMA_RW_MAXTEXT)
+ printf("WARNING! renderwin text beyond limit \n");
+
+}
+
+static void image_renderinfo_cb(void *rjv, RenderStats *rs)
+{
+ RenderJob *rj= rjv;
+
+ /* malloc OK here, stats_draw is not in tile threads */
+ if(rj->image->render_text==NULL)
+ rj->image->render_text= MEM_callocN(IMA_RW_MAXTEXT, "rendertext");
+
+ make_renderinfo_string(rs, rj->scene, rj->image->render_text);
+
+ /* make jobs timer to send notifier */
+ *(rj->do_update)= 1;
+
+}
+
/* called inside thread! */
static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect)
{
@@ -2505,7 +2655,9 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* flush multires changes (for sculpt) */
multires_force_update(CTX_data_active_object(C));
- // get editmode results
+ /* get editmode results */
+ ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
+
// store spare
// get view3d layer, local layer, make this nice api call to render
// store spare
@@ -2536,6 +2688,8 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
re= RE_NewRender(scene->id.name);
RE_test_break_cb(re, rj, render_breakjob);
RE_display_draw_cb(re, rj, image_rect_update);
+ RE_stats_draw_cb(re, rj, image_renderinfo_cb);
+
rj->re= re;
G.afbreek= 0;
@@ -2610,6 +2764,48 @@ void SCREEN_OT_render_view_cancel(struct wmOperatorType *ot)
ot->poll= ED_operator_image_active;
}
+/* *********************** show render viewer *************** */
+
+static int render_view_show_exec(bContext *C, wmOperator *unused)
+{
+ ScrArea *sa= find_area_showing_r_result(C);
+
+ /* determine if render already shows */
+ if(sa) {
+ SpaceImage *sima= sa->spacedata.first;
+
+ if(sima->flag & SI_PREVSPACE) {
+ sima->flag &= ~SI_PREVSPACE;
+
+ if(sima->flag & SI_FULLWINDOW) {
+ sima->flag &= ~SI_FULLWINDOW;
+ ED_screen_full_prevspace(C);
+ }
+ else if(sima->next) {
+ ED_area_newspace(C, sa, sima->next->spacetype);
+ ED_area_tag_redraw(sa);
+ }
+ }
+ }
+ else {
+ screen_set_image_output(C);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void SCREEN_OT_render_view_show(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Show/Hide Render View";
+ ot->idname= "SCREEN_OT_render_view_show";
+
+ /* api callbacks */
+ ot->exec= render_view_show_exec;
+ ot->poll= ED_operator_screenactive;
+}
+
+
/* **************** Assigning operatortypes to global list, adding handlers **************** */
@@ -2645,7 +2841,8 @@ void ED_operatortypes_screen(void)
/* render */
WM_operatortype_append(SCREEN_OT_render);
WM_operatortype_append(SCREEN_OT_render_view_cancel);
-
+ WM_operatortype_append(SCREEN_OT_render_view_show);
+
/* tools shared by more space types */
WM_operatortype_append(ED_OT_undo);
WM_operatortype_append(ED_OT_redo);
@@ -2706,6 +2903,7 @@ void ED_keymap_screen(wmWindowManager *wm)
/* render */
WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_render_view_cancel", ESCKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "SCREEN_OT_render_view_show", F11KEY, KM_PRESS, 0, 0);
/* frame offsets & play */
keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
diff --git a/source/blender/editors/sculpt_paint/Makefile b/source/blender/editors/sculpt_paint/Makefile
index 9353116a4bc..012a39b8d25 100644
--- a/source/blender/editors/sculpt_paint/Makefile
+++ b/source/blender/editors/sculpt_paint/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 2a97c0ba1b0..08a1c014a10 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -4517,6 +4517,9 @@ static int paint_init(bContext *C, wmOperator *op)
pop->ps.ar= CTX_wm_region(C);
/* intialize brush */
+ if(!settings->imapaint.brush)
+ return 0;
+
pop->s.brush = settings->imapaint.brush;
pop->s.tool = settings->imapaint.tool;
if(pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE))
@@ -4536,6 +4539,10 @@ static int paint_init(bContext *C, wmOperator *op)
if (!pop->s.ob || !(pop->s.ob->lay & pop->ps.v3d->lay)) return 0;
pop->s.me = get_mesh(pop->s.ob);
if (!pop->s.me) return 0;
+
+ /* Dont allow brush size below 2 */
+ if (pop->ps.brush && pop->ps.brush->size<=1)
+ pop->ps.brush->size = 2;
}
else {
pop->s.image = pop->s.sima->image;
@@ -4548,10 +4555,6 @@ static int paint_init(bContext *C, wmOperator *op)
return 0;
}
-
- /* Dont allow brush size below 2 */
- if (pop->ps.brush->size<=1)
- pop->ps.brush->size = 2;
}
/* note, if we have no UVs on the derived mesh, then we must return here */
@@ -4801,7 +4804,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot)
ot->poll= image_paint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -4908,7 +4911,7 @@ void PAINT_OT_image_paint_radial_control(wmOperatorType *ot)
ot->poll= image_paint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
/************************ grab clone operator ************************/
@@ -5007,7 +5010,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot)
ot->poll= image_paint_2d_clone_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 0710079301b..c5aea5ae077 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -424,8 +424,9 @@ void clear_vpaint_selectedfaces(Scene *scene)
/* fills in the selected faces with the current weight and vertex group */
void clear_wpaint_selectedfaces(Scene *scene)
{
- VPaint *wp= scene->toolsettings->wpaint;
- float paintweight= wp->brush->alpha;
+ ToolSettings *ts= scene->toolsettings;
+ VPaint *wp= ts->wpaint;
+ float paintweight= ts->vgroup_weight;
Mesh *me;
MFace *mface;
Object *ob;
@@ -909,7 +910,7 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float
void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
{
ViewContext vc;
- VPaint *wp= scene->toolsettings->wpaint;
+ ToolSettings *ts= scene->toolsettings;
Object *ob= OBACT;
Mesh *me= get_mesh(ob);
int index;
@@ -1019,20 +1020,20 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
fac= MIN4(w1, w2, w3, w4);
if(w1==fac) {
dw= get_defweight(me->dvert+mface->v1, ob->actdef-1);
- if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f;
+ if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w2==fac) {
dw= get_defweight(me->dvert+mface->v2, ob->actdef-1);
- if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f;
+ if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w3==fac) {
dw= get_defweight(me->dvert+mface->v3, ob->actdef-1);
- if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f;
+ if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w4==fac) {
if(mface->v4) {
dw= get_defweight(me->dvert+mface->v4, ob->actdef-1);
- if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f;
+ if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
}
}
@@ -1224,7 +1225,7 @@ void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot)
ot->poll= wp_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot)
@@ -1240,7 +1241,7 @@ void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot)
ot->poll= vp_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
/* ************ weight paint operator ********** */
@@ -1308,7 +1309,7 @@ static int wpaint_modal(bContext *C, wmOperator *op, wmEvent *event)
Object *ob= vc->obact;
Mesh *me= ob->data;
float mat[4][4];
- float paintweight= wp->brush->alpha;
+ float paintweight= ts->vgroup_weight;
int *indexar= wpd->indexar;
int totindex, index, alpha, totw;
short mval[2];
@@ -1365,7 +1366,7 @@ static int wpaint_modal(bContext *C, wmOperator *op, wmEvent *event)
if(wp->mode==VP_BLUR)
paintweight= 0.0f;
else
- paintweight= wp->brush->alpha;
+ paintweight= ts->vgroup_weight;
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totface) {
@@ -1566,7 +1567,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot)
ot->poll= wp_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
@@ -1863,6 +1864,6 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot)
ot->poll= vp_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 0ae39a661c1..f3108e02159 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1,5 +1,5 @@
/*
- * $Id: sculptmode.c 18309 2009-01-04 07:47:11Z nicholasbishop $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -148,6 +148,7 @@ typedef struct StrokeCache {
float *layer_disps; /* Displacements for each vertex */
float (*mesh_store)[3]; /* Copy of the mesh vertices' locations */
short (*orig_norms)[3]; /* Copy of the mesh vertices' normals */
+ float (*face_norms)[3]; /* Copy of the mesh faces' normals */
float rotation; /* Texture rotation (radians) for anchored and rake modes */
int pixel_radius, previous_pixel_radius;
ListBase grab_active_verts[8]; /* The same list of verts is used throught grab stroke */
@@ -155,7 +156,6 @@ typedef struct StrokeCache {
float old_grab_location[3];
int symmetry; /* Symmetry index between 0 and 7 */
float view_normal[3], view_normal_symmetry[3];
- int last_dot[2]; /* Last location of stroke application */
int last_rake[2]; /* Last location of updating rake rotation */
} StrokeCache;
@@ -234,66 +234,50 @@ static char brush_size(Sculpt *sd)
special multiplier found experimentally to scale the strength factor. */
static float brush_strength(Sculpt *sd, StrokeCache *cache)
{
+ /* Primary strength input; square it to make lower values more sensitive */
+ float alpha = sd->brush->alpha * sd->brush->alpha;
+
float dir= sd->brush->flag & BRUSH_DIR_IN ? -1 : 1;
float pressure= 1;
float flip= cache->flip ? -1:1;
- float anchored = sd->brush->flag & BRUSH_ANCHORED ? 25 : 1;
if(sd->brush->flag & BRUSH_ALPHA_PRESSURE)
pressure *= cache->pressure;
switch(sd->brush->sculpt_tool){
case SCULPT_TOOL_DRAW:
+ case SCULPT_TOOL_INFLATE:
+ case SCULPT_TOOL_CLAY:
+ case SCULPT_TOOL_FLATTEN:
case SCULPT_TOOL_LAYER:
- return sd->brush->alpha / 50.0f * dir * pressure * flip * anchored; /*XXX: not sure why? multiplied by G.vd->grid */;
+ return alpha * dir * pressure * flip; /*XXX: not sure why? was multiplied by G.vd->grid */;
case SCULPT_TOOL_SMOOTH:
- return sd->brush->alpha / .5 * pressure * anchored;
+ return alpha * 4 * pressure;
case SCULPT_TOOL_PINCH:
- return sd->brush->alpha / 10.0f * dir * pressure * flip * anchored;
+ return alpha / 2 * dir * pressure * flip;
case SCULPT_TOOL_GRAB:
return 1;
- case SCULPT_TOOL_INFLATE:
- return sd->brush->alpha / 50.0f * dir * pressure * flip * anchored;
- case SCULPT_TOOL_FLATTEN:
- return sd->brush->alpha / 5.0f * pressure * anchored;
default:
return 0;
}
}
-/* For clipping against a mirror modifier */
-static void sculpt_clip(StrokeCache *cache, float *co, const float val[3])
+/* Handles clipping against a mirror modifier and SCULPT_LOCK axis flags */
+static void sculpt_clip(Sculpt *sd, float *co, const float val[3])
{
int i;
+
for(i=0; i<3; ++i) {
- if((cache->flag & (CLIP_X << i)) && (fabs(co[i]) <= cache->clip_tolerance[i]))
+ if(sd->flags & (SCULPT_LOCK_X << i))
+ continue;
+
+ if((sd->session->cache->flag & (CLIP_X << i)) && (fabs(co[i]) <= sd->session->cache->clip_tolerance[i]))
co[i]= 0.0f;
else
co[i]= val[i];
}
}
-static void sculpt_axislock(Sculpt *sd, float *co)
-{
- if(sd->flags == (SCULPT_LOCK_X|SCULPT_LOCK_Y|SCULPT_LOCK_Z))
- return;
-
- if(sd->session->cache->vc.v3d->twmode == V3D_MANIP_LOCAL) {
- float mat[3][3], imat[3][3];
- Mat3CpyMat4(mat, sd->session->cache->vc.obact->obmat);
- Mat3Inv(imat, mat);
- Mat3MulVecfl(mat, co);
- if (sd->flags & SCULPT_LOCK_X) co[0] = 0.0;
- if (sd->flags & SCULPT_LOCK_Y) co[1] = 0.0;
- if (sd->flags & SCULPT_LOCK_Z) co[2] = 0.0;
- Mat3MulVecfl(imat, co);
- } else {
- if (sd->flags & SCULPT_LOCK_X) co[0] = 0.0;
- if (sd->flags & SCULPT_LOCK_Y) co[1] = 0.0;
- if (sd->flags & SCULPT_LOCK_Z) co[2] = 0.0;
- }
-}
-
static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], const short no[3])
{
float fno[3] = {no[0], no[1], no[2]};
@@ -350,16 +334,14 @@ static void do_draw_brush(Sculpt *sd, SculptSession *ss, const ListBase* active_
calc_area_normal(sd, area_normal, active_verts);
- sculpt_axislock(sd, area_normal);
-
while(node){
float *co= ss->mvert[node->Index].co;
-
- const float val[3]= {co[0]+area_normal[0]*node->Fade*ss->cache->scale[0],
- co[1]+area_normal[1]*node->Fade*ss->cache->scale[1],
- co[2]+area_normal[2]*node->Fade*ss->cache->scale[2]};
+
+ const float val[3]= {co[0]+area_normal[0]*ss->cache->radius*node->Fade*ss->cache->scale[0],
+ co[1]+area_normal[1]*ss->cache->radius*node->Fade*ss->cache->scale[1],
+ co[2]+area_normal[2]*ss->cache->radius*node->Fade*ss->cache->scale[2]};
- sculpt_clip(ss->cache, co, val);
+ sculpt_clip(sd, co, val);
node= node->next;
}
@@ -409,34 +391,37 @@ static void neighbor_average(SculptSession *ss, float avg[3], const int vert)
VecCopyf(avg, ss->mvert[vert].co);
}
-static void do_smooth_brush(SculptSession *ss, const ListBase* active_verts)
+static void do_smooth_brush(Sculpt *s, const ListBase* active_verts)
{
ActiveData *node= active_verts->first;
-
- while(node){
- float *co= ss->mvert[node->Index].co;
- float avg[3], val[3];
-
- neighbor_average(ss, avg, node->Index);
- val[0] = co[0]+(avg[0]-co[0])*node->Fade;
- val[1] = co[1]+(avg[1]-co[1])*node->Fade;
- val[2] = co[2]+(avg[2]-co[2])*node->Fade;
-
- sculpt_clip(ss->cache, co, val);
- node= node->next;
+ int i;
+
+ for(i = 0; i < 2; ++i) {
+ while(node){
+ float *co= s->session->mvert[node->Index].co;
+ float avg[3], val[3];
+
+ neighbor_average(s->session, avg, node->Index);
+ val[0] = co[0]+(avg[0]-co[0])*node->Fade;
+ val[1] = co[1]+(avg[1]-co[1])*node->Fade;
+ val[2] = co[2]+(avg[2]-co[2])*node->Fade;
+
+ sculpt_clip(s, co, val);
+ node= node->next;
+ }
}
}
-static void do_pinch_brush(SculptSession *ss, const ListBase* active_verts)
+static void do_pinch_brush(Sculpt *s, const ListBase* active_verts)
{
ActiveData *node= active_verts->first;
while(node) {
- float *co= ss->mvert[node->Index].co;
- const float val[3]= {co[0]+(ss->cache->location[0]-co[0])*node->Fade,
- co[1]+(ss->cache->location[1]-co[1])*node->Fade,
- co[2]+(ss->cache->location[2]-co[2])*node->Fade};
- sculpt_clip(ss->cache, co, val);
+ float *co= s->session->mvert[node->Index].co;
+ const float val[3]= {co[0]+(s->session->cache->location[0]-co[0])*node->Fade,
+ co[1]+(s->session->cache->location[1]-co[1])*node->Fade,
+ co[2]+(s->session->cache->location[2]-co[2])*node->Fade};
+ sculpt_clip(s, co, val);
node= node->next;
}
}
@@ -448,7 +433,6 @@ static void do_grab_brush(Sculpt *sd, SculptSession *ss)
float grab_delta[3];
VecCopyf(grab_delta, ss->cache->grab_delta_symmetry);
- sculpt_axislock(sd, grab_delta);
while(node) {
float *co= ss->mvert[node->Index].co;
@@ -456,7 +440,7 @@ static void do_grab_brush(Sculpt *sd, SculptSession *ss)
VecCopyf(add, grab_delta);
VecMulf(add, node->Fade);
VecAddf(add, add, co);
- sculpt_clip(ss->cache, co, add);
+ sculpt_clip(sd, co, add);
node= node->next;
}
@@ -467,42 +451,38 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, const ListBase *active
{
float area_normal[3];
ActiveData *node= active_verts->first;
- const float bstr= brush_strength(sd, ss->cache);
+ float lim= ss->cache->radius / 4;
+
+ if(ss->cache->flip)
+ lim = -lim;
calc_area_normal(sd, area_normal, active_verts);
while(node){
float *disp= &ss->cache->layer_disps[node->Index];
+ float *co= ss->mvert[node->Index].co;
+ float val[3];
- if((bstr > 0 && *disp < bstr) ||
- (bstr < 0 && *disp > bstr)) {
- float *co= ss->mvert[node->Index].co;
-
- *disp+= node->Fade;
-
- if(bstr < 0) {
- if(*disp < bstr)
- *disp = bstr;
- } else {
- if(*disp > bstr)
- *disp = bstr;
- }
+ *disp+= node->Fade;
+
+ /* Don't let the displacement go past the limit */
+ if((lim < 0 && *disp < lim) || (lim > 0 && *disp > lim))
+ *disp = lim;
+
+ val[0] = ss->cache->mesh_store[node->Index][0]+area_normal[0] * *disp*ss->cache->scale[0];
+ val[1] = ss->cache->mesh_store[node->Index][1]+area_normal[1] * *disp*ss->cache->scale[1];
+ val[2] = ss->cache->mesh_store[node->Index][2]+area_normal[2] * *disp*ss->cache->scale[2];
- {
- const float val[3]= {ss->cache->mesh_store[node->Index][0]+area_normal[0] * *disp*ss->cache->scale[0],
- ss->cache->mesh_store[node->Index][1]+area_normal[1] * *disp*ss->cache->scale[1],
- ss->cache->mesh_store[node->Index][2]+area_normal[2] * *disp*ss->cache->scale[2]};
- sculpt_clip(ss->cache, co, val);
- }
- }
+ sculpt_clip(sd, co, val);
node= node->next;
}
}
-static void do_inflate_brush(SculptSession *ss, const ListBase *active_verts)
+static void do_inflate_brush(Sculpt *s, const ListBase *active_verts)
{
ActiveData *node= active_verts->first;
+ SculptSession *ss = s->session;
float add[3];
while(node) {
@@ -512,13 +492,13 @@ static void do_inflate_brush(SculptSession *ss, const ListBase *active_verts)
add[0]= no[0]/ 32767.0f;
add[1]= no[1]/ 32767.0f;
add[2]= no[2]/ 32767.0f;
- VecMulf(add, node->Fade);
+ VecMulf(add, node->Fade * ss->cache->radius);
add[0]*= ss->cache->scale[0];
add[1]*= ss->cache->scale[1];
add[2]*= ss->cache->scale[2];
VecAddf(add, add, co);
- sculpt_clip(ss->cache, co, add);
+ sculpt_clip(s, co, add);
node= node->next;
}
@@ -547,7 +527,7 @@ static void calc_flatten_center(SculptSession *ss, ActiveData *node, float co[3]
VecMulf(co, 1.0f / FLATTEN_SAMPLE_SIZE);
}
-static void do_flatten_brush(Sculpt *sd, SculptSession *ss, const ListBase *active_verts)
+static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, const ListBase *active_verts, int clay)
{
ActiveData *node= active_verts->first;
/* area_normal and cntr define the plane towards which vertices are squashed */
@@ -570,16 +550,23 @@ static void do_flatten_brush(Sculpt *sd, SculptSession *ss, const ListBase *acti
VecAddf(intr, intr, p1);
VecSubf(val, intr, co);
- VecMulf(val, node->Fade);
+ VecMulf(val, fabs(node->Fade));
VecAddf(val, val, co);
- sculpt_clip(ss->cache, co, val);
+ if(clay) {
+ /* Clay brush displaces after flattening */
+ float tmp[3];
+ VecCopyf(tmp, area_normal);
+ VecMulf(tmp, ss->cache->radius * node->Fade * 0.1);
+ VecAddf(val, val, tmp);
+ }
+
+ sculpt_clip(sd, co, val);
node= node->next;
}
}
-
-
+
/* Uses symm to selectively flip any axis of a coordinate. */
static void flip_coord(float out[3], float in[3], const char symm)
{
@@ -750,37 +737,6 @@ static void sculpt_add_damaged_rect(SculptSession *ss)
}
}
-/* Clears the depth buffer in each modified area. */
-#if 0
-static void sculpt_clear_damaged_areas(SculptSession *ss)
-{
- RectNode *rn= NULL;
-
- for(rn = ss->damaged_rects.first; rn; rn = rn->next) {
- rcti clp = rn->r;
- rcti *win = NULL; /*XXX: &curarea->winrct; */
-
- clp.xmin += win->xmin;
- clp.xmax += win->xmin;
- clp.ymin += win->ymin;
- clp.ymax += win->ymin;
-
- if(clp.xmin < win->xmax && clp.xmax > win->xmin &&
- clp.ymin < win->ymax && clp.ymax > win->ymin) {
- if(clp.xmin < win->xmin) clp.xmin = win->xmin;
- if(clp.ymin < win->ymin) clp.ymin = win->ymin;
- if(clp.xmax > win->xmax) clp.xmax = win->xmax;
- if(clp.ymax > win->ymax) clp.ymax = win->ymax;
-
- glScissor(clp.xmin + 1, clp.ymin + 1,
- clp.xmax - clp.xmin - 2,
- clp.ymax - clp.ymin - 2);
- }
-
- glClear(GL_DEPTH_BUFFER_BIT);
- }
-}
-#endif
static void do_brush_action(Sculpt *sd, StrokeCache *cache)
{
SculptSession *ss = sd->session;
@@ -832,13 +788,13 @@ static void do_brush_action(Sculpt *sd, StrokeCache *cache)
do_draw_brush(sd, ss, &active_verts);
break;
case SCULPT_TOOL_SMOOTH:
- do_smooth_brush(ss, &active_verts);
+ do_smooth_brush(sd, &active_verts);
break;
case SCULPT_TOOL_PINCH:
- do_pinch_brush(ss, &active_verts);
+ do_pinch_brush(sd, &active_verts);
break;
case SCULPT_TOOL_INFLATE:
- do_inflate_brush(ss, &active_verts);
+ do_inflate_brush(sd, &active_verts);
break;
case SCULPT_TOOL_GRAB:
do_grab_brush(sd, ss);
@@ -847,8 +803,10 @@ static void do_brush_action(Sculpt *sd, StrokeCache *cache)
do_layer_brush(sd, ss, &active_verts);
break;
case SCULPT_TOOL_FLATTEN:
- do_flatten_brush(sd, ss, &active_verts);
+ do_flatten_clay_brush(sd, ss, &active_verts, 0);
break;
+ case SCULPT_TOOL_CLAY:
+ do_flatten_clay_brush(sd, ss, &active_verts, 1);
}
/* Copy the modified vertices from mesh to the active key */
@@ -890,15 +848,6 @@ static void do_symmetrical_brush_actions(Sculpt *sd, StrokeCache *cache)
const char symm = sd->flags & 7;
int i;
- /* Brush spacing: only apply dot if next dot is far enough away */
- if((sd->brush->flag & BRUSH_SPACE) && !(sd->brush->flag & BRUSH_ANCHORED) && !cache->first_time) {
- int dx = cache->last_dot[0] - cache->mouse[0];
- int dy = cache->last_dot[1] - cache->mouse[1];
- if(sqrt(dx*dx+dy*dy) < sd->brush->spacing)
- return;
- }
- memcpy(cache->last_dot, cache->mouse, sizeof(int) * 2);
-
VecCopyf(cache->location, cache->true_location);
VecCopyf(cache->grab_delta_symmetry, cache->grab_delta);
cache->symmetry = 0;
@@ -997,25 +946,6 @@ static void sculpt_update_tex(Sculpt *sd)
}
}
-void sculptmode_selectbrush_menu(void)
-{
- /* XXX: I guess menus belong elsewhere too?
-
- Sculpt *sd= sculpt_data();
- int val;
-
- pupmenu_set_active(sd->brush_type);
-
- val= pupmenu("Select Brush%t|Draw|Smooth|Pinch|Inflate|Grab|Layer|Flatten");
-
- if(val>0) {
- sd->brush_type= val;
-
- allqueue(REDRAWVIEW3D, 1);
- allqueue(REDRAWBUTSEDIT, 1);
- }*/
-}
-
static void sculptmode_update_all_projverts(SculptSession *ss)
{
unsigned i;
@@ -1069,7 +999,7 @@ static void sculpt_update_mesh_elements(bContext *C)
if((ss->multires = sculpt_multires_active(ob))) {
DerivedMesh *dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
ss->totvert = dm->getNumVerts(dm);
- ss->totface = dm->getNumTessFaces(dm);
+ ss->totface = dm->getNumFaces(dm);
ss->mvert = dm->getVertDataArray(dm, CD_MVERT);
ss->mface = dm->getTessFaceDataArray(dm, CD_MFACE);
ss->face_normals = dm->getTessFaceDataArray(dm, CD_NORMAL);
@@ -1094,89 +1024,11 @@ static void sculpt_update_mesh_elements(bContext *C)
}
}
-/* XXX: lots of drawing code (partial redraw), has to go elsewhere */
-#if 0
-void sculptmode_draw_wires(SculptSession *ss, int only_damaged)
+static int sculpt_mode_poll(bContext *C)
{
- Mesh *me = get_mesh(OBACT);
- int i;
-
- bglPolygonOffset(1.0);
- glDepthMask(0);
- BIF_ThemeColor((OBACT==OBACT)?TH_ACTIVE:TH_SELECT);
-
- for(i=0; i<me->totedge; i++) {
- MEdge *med= &me->medge[i];
-
- if((!only_damaged || (ss->projverts[med->v1].inside || ss->projverts[med->v2].inside)) &&
- (med->flag & ME_EDGEDRAW)) {
- glDrawElements(GL_LINES, 2, GL_UNSIGNED_INT, &med->v1);
- }
- }
-
- glDepthMask(1);
- bglPolygonOffset(0.0);
+ return G.f & G_SCULPTMODE;
}
-void sculptmode_draw_mesh(int only_damaged)
-{
- int i, j, dt, drawCurrentMat = 1, matnr= -1;
- SculptSession *ss = sculpt_session();
-
- sculpt_update_mesh_elements(ss, OBACT);
-
- persp(PERSP_VIEW);
- mymultmatrix(OBACT->obmat);
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_LIGHTING);
- /* XXX: GPU_set_object_materials(G.scene, OBACT, 0, NULL); */
- glEnable(GL_CULL_FACE);
-
- glShadeModel(GL_SMOOTH);
-
- glVertexPointer(3, GL_FLOAT, sizeof(MVert), &cache->mvert[0].co);
- glNormalPointer(GL_SHORT, sizeof(MVert), &cache->mvert[0].no);
-
- dt= MIN2(G.vd->drawtype, OBACT->dt);
- if(dt==OB_WIRE)
- glColorMask(0,0,0,0);
-
- for(i=0; i<ss->totface; ++i) {
- MFace *f= &ss->mface[i];
- char inside= 0;
- int new_matnr= f->mat_nr + 1;
-
- if(new_matnr != matnr)
- drawCurrentMat= GPU_enable_material(matnr = new_matnr, NULL);
-
- /* If only_damaged!=0, only draw faces that are partially
- inside the area(s) modified by the brush */
- if(only_damaged) {
- for(j=0; j<(f->v4?4:3); ++j) {
- if(ss->projverts[*((&f->v1)+j)].inside) {
- inside= 1;
- break;
- }
- }
- }
- else
- inside= 1;
-
- if(inside && drawCurrentMat)
- glDrawElements(f->v4?GL_QUADS:GL_TRIANGLES, f->v4?4:3, GL_UNSIGNED_INT, &f->v1);
- }
-
- glDisable(GL_CULL_FACE);
- glDisable(GL_LIGHTING);
- glColorMask(1,1,1,1);
-
- if(dt==OB_WIRE || (OBACT->dtx & OB_DRAWWIRE))
- sculptmode_draw_wires(ss, only_damaged);
-
- glDisable(GL_DEPTH_TEST);
-}
-#endif
-
static int sculpt_poll(bContext *C)
{
return G.f & G_SCULPTMODE && CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
@@ -1188,16 +1040,21 @@ static void draw_paint_cursor(bContext *C, int x, int y, void *customdata)
{
Sculpt *sd= CTX_data_tool_settings(C)->sculpt;
- glTranslatef((float)x, (float)y, 0.0f);
-
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, sd->brush->size, 40);
+ glTranslatef((float)-x, (float)-y, 0.0f);
+
+ if(sd->session && sd->session->cache && sd->brush && (sd->brush->flag & BRUSH_SMOOTH_STROKE)) {
+ ARegion *ar = CTX_wm_region(C);
+ sdrawline(x, y, sd->session->cache->mouse[0] - ar->winrct.xmin, sd->session->cache->mouse[1] - ar->winrct.ymin);
+ }
+
glDisable(GL_BLEND);
glDisable( GL_LINE_SMOOTH );
-
- glTranslatef((float)-x, (float)-y, 0.0f);
}
static void toggle_paint_cursor(bContext *C)
@@ -1245,16 +1102,16 @@ static int sculpt_brush_curve_preset_exec(bContext *C, wmOperator *op)
static void SCULPT_OT_brush_curve_preset(wmOperatorType *ot)
{
static EnumPropertyItem prop_mode_items[] = {
- {BRUSH_PRESET_SHARP, "SHARP", "Sharp Curve", ""},
- {BRUSH_PRESET_SMOOTH, "SMOOTH", "Smooth Curve", ""},
- {BRUSH_PRESET_MAX, "MAX", "Max Curve", ""},
- {0, NULL, NULL, NULL}};
+ {BRUSH_PRESET_SHARP, "SHARP", 0, "Sharp Curve", ""},
+ {BRUSH_PRESET_SMOOTH, "SMOOTH", 0, "Smooth Curve", ""},
+ {BRUSH_PRESET_MAX, "MAX", 0, "Max Curve", ""},
+ {0, NULL, 0, NULL, NULL}};
ot->name= "Preset";
ot->idname= "SCULPT_OT_brush_curve_preset";
ot->exec= sculpt_brush_curve_preset_exec;
- ot->poll= sculpt_poll;
+ ot->poll= sculpt_mode_poll;
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1294,7 +1151,7 @@ static void SCULPT_OT_radial_control(wmOperatorType *ot)
ot->exec= sculpt_radial_control_exec;
ot->poll= sculpt_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
/**** Operator for applying a stroke (various attributes including mouse path)
@@ -1319,6 +1176,8 @@ static void sculpt_cache_free(StrokeCache *cache)
MEM_freeN(cache->mesh_store);
if(cache->orig_norms)
MEM_freeN(cache->orig_norms);
+ if(cache->face_norms)
+ MEM_freeN(cache->face_norms);
if(cache->mats)
MEM_freeN(cache->mats);
MEM_freeN(cache);
@@ -1338,6 +1197,9 @@ static void sculpt_update_cache_invariants(Sculpt *sd, bContext *C, wmOperator *
RNA_int_get_array(op->ptr, "initial_mouse", cache->initial_mouse);
cache->depth = RNA_float_get(op->ptr, "depth");
+ cache->mouse[0] = cache->initial_mouse[0];
+ cache->mouse[1] = cache->initial_mouse[1];
+
/* Truly temporary data that isn't stored in properties */
view3d_set_viewcontext(C, &cache->vc);
@@ -1347,9 +1209,11 @@ static void sculpt_update_cache_invariants(Sculpt *sd, bContext *C, wmOperator *
sculpt_update_mesh_elements(C);
+ if(sd->brush->sculpt_tool == SCULPT_TOOL_LAYER)
+ cache->layer_disps = MEM_callocN(sizeof(float) * sd->session->totvert, "layer brush displacements");
+
/* Make copies of the mesh vertex locations and normals for some tools */
if(sd->brush->sculpt_tool == SCULPT_TOOL_LAYER || (sd->brush->flag & BRUSH_ANCHORED)) {
- cache->layer_disps = MEM_callocN(sizeof(float) * sd->session->totvert, "layer brush displacements");
cache->mesh_store= MEM_mallocN(sizeof(float) * 3 * sd->session->totvert, "sculpt mesh vertices copy");
for(i = 0; i < sd->session->totvert; ++i)
VecCopyf(cache->mesh_store[i], sd->session->mvert[i].co);
@@ -1361,6 +1225,13 @@ static void sculpt_update_cache_invariants(Sculpt *sd, bContext *C, wmOperator *
cache->orig_norms[i][1] = sd->session->mvert[i].no[1];
cache->orig_norms[i][2] = sd->session->mvert[i].no[2];
}
+
+ if(sd->session->face_normals) {
+ float *fn = sd->session->face_normals;
+ cache->face_norms= MEM_mallocN(sizeof(float) * 3 * sd->session->totface, "Sculpt face norms");
+ for(i = 0; i < sd->session->totface; ++i, fn += 3)
+ VecCopyf(cache->face_norms[i], fn);
+ }
}
}
@@ -1470,9 +1341,6 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
view3d_operator_needs_opengl(C);
- sculpt_brush_stroke_init_properties(C, op, event, sd->session);
-
- sculptmode_update_all_projverts(sd->session);
/* TODO: Shouldn't really have to do this at the start of every
stroke, but sculpt would need some sort of notification when
@@ -1487,17 +1355,27 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
static void sculpt_restore_mesh(Sculpt *sd)
{
- StrokeCache *cache = sd->session->cache;
+ SculptSession *ss = sd->session;
+ StrokeCache *cache = ss->cache;
int i;
/* Restore the mesh before continuing with anchored stroke */
if((sd->brush->flag & BRUSH_ANCHORED) && cache->mesh_store) {
- for(i = 0; i < sd->session->totvert; ++i) {
- VecCopyf(sd->session->mvert[i].co, cache->mesh_store[i]);
- sd->session->mvert[i].no[0] = cache->orig_norms[i][0];
- sd->session->mvert[i].no[1] = cache->orig_norms[i][1];
- sd->session->mvert[i].no[2] = cache->orig_norms[i][2];
+ for(i = 0; i < ss->totvert; ++i) {
+ VecCopyf(ss->mvert[i].co, cache->mesh_store[i]);
+ ss->mvert[i].no[0] = cache->orig_norms[i][0];
+ ss->mvert[i].no[1] = cache->orig_norms[i][1];
+ ss->mvert[i].no[2] = cache->orig_norms[i][2];
+ }
+
+ if(ss->face_normals) {
+ float *fn = ss->face_normals;
+ for(i = 0; i < ss->totface; ++i, fn += 3)
+ VecCopyf(fn, cache->face_norms[i]);
}
+
+ if(sd->brush->sculpt_tool == SCULPT_TOOL_LAYER)
+ memset(cache->layer_disps, 0, sizeof(float) * ss->totvert);
}
}
@@ -1527,38 +1405,141 @@ static void sculpt_flush_update(bContext *C)
ED_region_tag_redraw(ar);
}
-static int sculpt_brush_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
+/* Returns zero if no sculpt changes should be made, non-zero otherwise */
+static int sculpt_smooth_stroke(Sculpt *s, int output[2], wmEvent *event)
{
- PointerRNA itemptr;
- Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- float center[3];
- int mouse[2] = {event->x, event->y};
+ output[0] = event->x;
+ output[1] = event->y;
- sculpt_update_mesh_elements(C);
+ if(s->brush->flag & BRUSH_SMOOTH_STROKE && s->brush->sculpt_tool != SCULPT_TOOL_GRAB) {
+ StrokeCache *cache = s->session->cache;
+ float u = .9, v = 1.0 - u;
+ int dx = cache->mouse[0] - event->x, dy = cache->mouse[1] - event->y;
+ int radius = 50;
+
+ /* 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 < radius*radius)
+ return 0;
- unproject(sd->session->cache->mats, center, event->x, event->y,
- read_cached_depth(&sd->session->cache->vc, event->x, event->y));
+ output[0] = event->x * v + cache->mouse[0] * u;
+ output[1] = event->y * v + cache->mouse[1] * u;
+ }
+ return 1;
+}
+
+/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */
+int sculpt_space_stroke_enabled(Sculpt *s)
+{
+ Brush *br = s->brush;
+ 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, int mouse[2])
+{
+ Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+ StrokeCache *cache = sd->session->cache;
+ PointerRNA itemptr;
+ float cur_depth;
+ float center[3];
+
+ cur_depth = read_cached_depth(&cache->vc, mouse[0], mouse[1]);
+ unproject(sd->session->cache->mats, center, mouse[0], mouse[1], cur_depth);
+
/* Add to stroke */
RNA_collection_add(op->ptr, "stroke", &itemptr);
RNA_float_set_array(&itemptr, "location", center);
RNA_int_set_array(&itemptr, "mouse", mouse);
RNA_boolean_set(&itemptr, "flip", event->shift);
sculpt_update_cache_variants(sd, &itemptr);
-
+
sculpt_restore_mesh(sd);
- do_symmetrical_brush_actions(CTX_data_tool_settings(C)->sculpt, sd->session->cache);
+ do_symmetrical_brush_actions(sd, cache);
+}
- sculpt_flush_update(C);
- sculpt_post_stroke_free(sd->session);
+/* 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, const int final_mouse[2])
+{
+ StrokeCache *cache = s->session->cache;
+ int cnt = 0;
- /* Finished */
- if(event->type == LEFTMOUSE && event->val == 0) {
- request_depth_update(sd->session->cache->vc.rv3d);
+ if(sculpt_space_stroke_enabled(s)) {
+ float vec[2] = {final_mouse[0] - cache->mouse[0], final_mouse[1] - cache->mouse[1]};
+ int 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 = s->brush->spacing / length;
+ vec[0] *= scale;
+ vec[1] *= scale;
+
+ steps = (int)(length / s->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;
+}
- sculpt_cache_free(sd->session->cache);
+static int sculpt_brush_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+ ARegion *ar = CTX_wm_region(C);
+ float cur_depth;
- sculpt_undo_push(C, sd);
+ sculpt_update_mesh_elements(C);
+
+ if(!sd->session->cache) {
+ ViewContext vc;
+ 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) {
+ sculpt_brush_stroke_init_properties(C, op, event, sd->session);
+ sculptmode_update_all_projverts(sd->session);
+ }
+
+ ED_region_tag_redraw(ar);
+ }
+
+ if(sd->session->cache) {
+ int mouse[2];
+
+ if(sculpt_smooth_stroke(sd, mouse, event)) {
+ if(sculpt_space_stroke_enabled(sd)) {
+ if(!sculpt_space_stroke(C, op, event, sd, mouse))
+ ED_region_tag_redraw(ar);
+ }
+ else
+ sculpt_brush_stroke_add_step(C, op, event, mouse);
+
+ sculpt_flush_update(C);
+ sculpt_post_stroke_free(sd->session);
+ }
+ else
+ ED_region_tag_redraw(ar);
+ }
+
+ /* Finished */
+ if(event->type == LEFTMOUSE && event->val == 0) {
+ if(sd->session->cache) {
+ request_depth_update(sd->session->cache->vc.rv3d);
+ sculpt_cache_free(sd->session->cache);
+ sd->session->cache = NULL;
+ sculpt_undo_push(C, sd);
+ }
return OPERATOR_FINISHED;
}
@@ -1608,7 +1589,7 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot)
ot->poll= sculpt_poll;
/* flags (sculpt does own undo? (ton) */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
/* properties */
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -1702,454 +1683,3 @@ void ED_operatortypes_sculpt()
WM_operatortype_append(SCULPT_OT_sculptmode_toggle);
WM_operatortype_append(SCULPT_OT_brush_curve_preset);
}
-
-void sculpt(Sculpt *sd)
-{
-#if 0
- SculptSession *ss= sd->session;
- Object *ob= NULL; /*XXX */
- Mesh *me;
- MultiresModifierData *mmd = NULL;
- /* lastSigMouse is for the rake, to store the last place the mouse movement was significant */
- short mouse[2], mvalo[2], lastSigMouse[2],firsttime=1, mousebut;
- short modifier_calculations= 0;
- BrushAction *a = MEM_callocN(sizeof(BrushAction), "brush action");
- short spacing= 32000;
- int scissor_box[4];
- float offsetRot;
- int smooth_stroke = 0, i;
- int anchored, rake = 0 /* XXX: rake = ? */;
-
- /* XXX: checking that sculpting is allowed
- if(!(G.f & G_SCULPTMODE) || G.obedit || !ob || ob->id.lib || !get_mesh(ob) || (get_mesh(ob)->totface == 0))
- return;
- if(!(ob->lay & G.vd->lay))
- error("Active object is not in this layer");
- if(ob_get_keyblock(ob)) {
- if(!(ob->shapeflag & OB_SHAPE_LOCK)) {
- error("Cannot sculpt on unlocked shape key");
- return;
- }
- }*/
-
- anchored = sd->brush->flag & BRUSH_ANCHORED;
- smooth_stroke = (sd->flags & SCULPT_INPUT_SMOOTH) && (sd->brush->sculpt_tool != SCULPT_TOOL_GRAB) && !anchored;
-
- if(smooth_stroke)
- sculpt_stroke_new(256);
-
- ss->damaged_rects.first = ss->damaged_rects.last = NULL;
- ss->damaged_verts.first = ss->damaged_verts.last = NULL;
- ss->vertexcosnos = NULL;
-
- mmd = sculpt_multires_active(ob);
-
- /* Check that vertex users are up-to-date */
- if(ob != active_ob || !ss->vertex_users || ss->vertex_users_size != cache->totvert) {
- sculpt_vertexusers_free(ss);
- calc_vertex_users(ss);
- if(ss->projverts)
- MEM_freeN(ss->projverts);
- ss->projverts = NULL;
- active_ob= ob;
- }
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_NORMAL_ARRAY);
-
- /*XXX:
- persp(PERSP_VIEW);
- getmouseco_areawin(mvalo);*/
-
- /* Init texture
- FIXME: Shouldn't be doing this every time! */
- if(sd->tex_mode!=SCULPTREPT_3D)
- sculptmode_update_tex(sd);
-
- /*XXX: getmouseco_areawin(mouse); */
- mvalo[0]= mouse[0];
- mvalo[1]= mouse[1];
- lastSigMouse[0]=mouse[0];
- lastSigMouse[1]=mouse[1];
- mousebut = 0; /* XXX: L_MOUSE; */
-
- /* If modifier_calculations is true, then extra time must be spent
- updating the mesh. This takes a *lot* longer, so it's worth
- skipping if the modifier stack is empty. */
- modifier_calculations= sculpt_modifiers_active(ob);
-
- if(modifier_calculations)
- ss->vertexcosnos= mesh_get_mapped_verts_nors(NULL, ob); /* XXX: scene = ? */
- sculptmode_update_all_projverts(ss);
-
- /* Capture original copy */
- if(sd->flags & SCULPT_DRAW_FAST)
- glAccum(GL_LOAD, 1);
-
- /* Get original scissor box */
- glGetIntegerv(GL_SCISSOR_BOX, scissor_box);
-
- /* For raking, get the original angle*/
- offsetRot=sculpt_tex_angle(sd);
-
- me = get_mesh(ob);
-
- while (/*XXX:get_mbut() & mousebut*/0) {
- /* XXX: getmouseco_areawin(mouse); */
- /* If rake, and the mouse has moved over 10 pixels (euclidean) (prevents jitter) then get the new angle */
- if (rake && (pow(lastSigMouse[0]-mouse[0],2)+pow(lastSigMouse[1]-mouse[1],2))>100){
- /*Nasty looking, but just orig + new angle really*/
- set_tex_angle(sd, offsetRot+180.+to_deg(atan2((float)(mouse[1]-lastSigMouse[1]),(float)(mouse[0]-lastSigMouse[0]))));
- lastSigMouse[0]=mouse[0];
- lastSigMouse[1]=mouse[1];
- }
-
- if(firsttime || mouse[0]!=mvalo[0] || mouse[1]!=mvalo[1] ||
- sd->brush->flag & BRUSH_AIRBRUSH) {
- a->firsttime = firsttime;
- firsttime= 0;
-
- if(smooth_stroke)
- sculpt_stroke_add_point(ss->stroke, mouse[0], mouse[1]);
-
- spacing+= sqrt(pow(mvalo[0]-mouse[0],2)+pow(mvalo[1]-mouse[1],2));
-
- if(modifier_calculations && !ss->vertexcosnos)
- ss->vertexcosnos= mesh_get_mapped_verts_nors(NULL, ob); /*XXX scene = ? */
-
- if(sd->brush->sculpt_tool != SCULPT_TOOL_GRAB) {
- if(anchored) {
- /* Restore the mesh before continuing with anchored stroke */
- /*if(a->mesh_store) {
- for(i = 0; i < cache->totvert; ++i) {
- VecCopyf(cache->mvert[i].co, &a->mesh_store[i].x);
- cache->mvert[i].no[0] = a->orig_norms[i][0];
- cache->mvert[i].no[1] = a->orig_norms[i][1];
- cache->mvert[i].no[2] = a->orig_norms[i][2];
- }
- }*/
-
- //do_symmetrical_brush_actions(sd, a, mouse, NULL);
- }
- else {
- if(smooth_stroke) {
- sculpt_stroke_apply(sd, ss->stroke);
- }
- else if(sd->spacing==0 || spacing>sd->spacing) {
- //do_symmetrical_brush_actions(sd, a, mouse, NULL);
- spacing= 0;
- }
- }
- }
- else {
- //do_symmetrical_brush_actions(sd, a, mouse, mvalo);
- //unproject(ss, sd->pivot, mouse[0], mouse[1], a->depth);
- }
-
- if((!ss->multires && modifier_calculations) || ob_get_keyblock(ob)) {
- /* XXX: DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); */ }
-
- if(modifier_calculations || sd->brush->sculpt_tool == SCULPT_TOOL_GRAB || !(sd->flags & SCULPT_DRAW_FAST)) {
- calc_damaged_verts(ss, a);
- /*XXX: scrarea_do_windraw(curarea);
- screen_swapbuffers(); */
- } else { /* Optimized drawing */
- calc_damaged_verts(ss, a);
-
- /* Draw the stored image to the screen */
- glAccum(GL_RETURN, 1);
-
- sculpt_clear_damaged_areas(ss);
-
- /* Draw all the polygons that are inside the modified area(s) */
- glScissor(scissor_box[0], scissor_box[1], scissor_box[2], scissor_box[3]);
- /* XXX: sculptmode_draw_mesh(1); */
- glAccum(GL_LOAD, 1);
-
- projverts_clear_inside(ss);
-
- /* XXX: persp(PERSP_WIN); */
- glDisable(GL_DEPTH_TEST);
-
- /* Draw cursor */
- if(sd->flags & SCULPT_TOOL_DRAW)
- fdrawXORcirc((float)mouse[0],(float)mouse[1],sd->brush->size);
- /* XXX: if(smooth_stroke)
- sculpt_stroke_draw();
-
- myswapbuffers(); */
- }
-
- BLI_freelistN(&ss->damaged_rects);
- ss->damaged_rects.first = ss->damaged_rects.last = NULL;
-
- mvalo[0]= mouse[0];
- mvalo[1]= mouse[1];
-
- if(ss->vertexcosnos) {
- MEM_freeN(ss->vertexcosnos);
- ss->vertexcosnos= NULL;
- }
-
- }
- else { /*XXX:BIF_wait_for_statechange();*/ }
- }
-
- /* Set the rotation of the brush back to what it was before any rake */
- set_tex_angle(sd, offsetRot);
-
- if(smooth_stroke) {
- sculpt_stroke_apply_all(sd, ss->stroke);
- calc_damaged_verts(ss, a);
- BLI_freelistN(&ss->damaged_rects);
- }
-
- //if(a->layer_disps) MEM_freeN(a->layer_disps);
- //if(a->mesh_store) MEM_freeN(a->mesh_store);
- //if(a->orig_norms) MEM_freeN(a->orig_norms);
- for(i=0; i<8; ++i)
- BLI_freelistN(&a->grab_active_verts[i]);
- MEM_freeN(a);
- sculpt_stroke_free(ss->stroke);
- ss->stroke = NULL;
-
- if(mmd) {
- if(mmd->undo_verts && mmd->undo_verts != cache->mvert)
- MEM_freeN(mmd->undo_verts);
-
- mmd->undo_verts = cache->mvert;
- mmd->undo_verts_tot = cache->totvert;
- }
-
- //sculpt_undo_push(sd);
-
- /* XXX: if(G.vd->depths) G.vd->depths->damaged= 1;
- allqueue(REDRAWVIEW3D, 0); */
-#endif
-}
-
-/* Partial Mesh Visibility */
-
-/* XXX: Partial vis. always was a mess, have to figure something out */
-#if 0
-/* mode: 0=hide outside selection, 1=hide inside selection */
-static void sculptmode_do_pmv(Object *ob, rcti *hb_2d, int mode)
-{
- Mesh *me= get_mesh(ob);
- float hidebox[6][3];
- vec3f plane_normals[4];
- float plane_ds[4];
- unsigned i, j;
- unsigned ndx_show, ndx_hide;
- MVert *nve;
- unsigned face_cnt_show= 0, face_ndx_show= 0;
- unsigned edge_cnt_show= 0, edge_ndx_show= 0;
- unsigned *old_map= NULL;
- const unsigned SHOW= 0, HIDE=1;
-
- /* Convert hide box from 2D to 3D */
- unproject(hidebox[0], hb_2d->xmin, hb_2d->ymax, 1);
- unproject(hidebox[1], hb_2d->xmax, hb_2d->ymax, 1);
- unproject(hidebox[2], hb_2d->xmax, hb_2d->ymin, 1);
- unproject(hidebox[3], hb_2d->xmin, hb_2d->ymin, 1);
- unproject(hidebox[4], hb_2d->xmin, hb_2d->ymax, 0);
- unproject(hidebox[5], hb_2d->xmax, hb_2d->ymin, 0);
-
- /* Calculate normals for each side of hide box */
- CalcNormFloat(hidebox[0], hidebox[1], hidebox[4], &plane_normals[0].x);
- CalcNormFloat(hidebox[1], hidebox[2], hidebox[5], &plane_normals[1].x);
- CalcNormFloat(hidebox[2], hidebox[3], hidebox[5], &plane_normals[2].x);
- CalcNormFloat(hidebox[3], hidebox[0], hidebox[4], &plane_normals[3].x);
-
- /* Calculate D for each side of hide box */
- for(i= 0; i<4; ++i)
- plane_ds[i]= hidebox[i][0]*plane_normals[i].x + hidebox[i][1]*plane_normals[i].y +
- hidebox[i][2]*plane_normals[i].z;
-
- /* Add partial visibility to mesh */
- if(!me->pv) {
- me->pv= MEM_callocN(sizeof(PartialVisibility),"PartialVisibility");
- } else {
- old_map= MEM_callocN(sizeof(unsigned)*me->pv->totvert,"PMV oldmap");
- for(i=0; i<me->pv->totvert; ++i) {
- old_map[i]= me->pv->vert_map[i]<me->totvert?0:1;
- }
- mesh_pmv_revert(ob, me);
- }
-
- /* Kill sculpt data */
- active_ob= NULL;
-
- /* Initalize map with which verts are to be hidden */
- me->pv->vert_map= MEM_mallocN(sizeof(unsigned)*me->totvert, "PMV vertmap");
- me->pv->totvert= me->totvert;
- me->totvert= 0;
- for(i=0; i<me->pv->totvert; ++i) {
- me->pv->vert_map[i]= mode ? HIDE:SHOW;
- for(j=0; j<4; ++j) {
- if(me->mvert[i].co[0] * plane_normals[j].x +
- me->mvert[i].co[1] * plane_normals[j].y +
- me->mvert[i].co[2] * plane_normals[j].z < plane_ds[j] ) {
- me->pv->vert_map[i]= mode ? SHOW:HIDE; /* Vert is outside the hide box */
- break;
- }
- }
- if(old_map && old_map[i]) me->pv->vert_map[i]= 1;
- if(!me->pv->vert_map[i]) ++me->totvert;
-
- }
- if(old_map) MEM_freeN(old_map);
-
- /* Find out how many faces to show */
- for(i=0; i<me->totface; ++i) {
- if(!me->pv->vert_map[me->mface[i].v1] &&
- !me->pv->vert_map[me->mface[i].v2] &&
- !me->pv->vert_map[me->mface[i].v3]) {
- if(me->mface[i].v4) {
- if(!me->pv->vert_map[me->mface[i].v4])
- ++face_cnt_show;
- }
- else ++face_cnt_show;
- }
- }
- /* Find out how many edges to show */
- for(i=0; i<me->totedge; ++i) {
- if(!me->pv->vert_map[me->medge[i].v1] &&
- !me->pv->vert_map[me->medge[i].v2])
- ++edge_cnt_show;
- }
-
- /* Create new vert array and reset each vert's map with map[old]=new index */
- nve= MEM_mallocN(sizeof(MVert)*me->pv->totvert, "PMV verts");
- ndx_show= 0; ndx_hide= me->totvert;
- for(i=0; i<me->pv->totvert; ++i) {
- if(me->pv->vert_map[i]) {
- me->pv->vert_map[i]= ndx_hide;
- nve[me->pv->vert_map[i]]= me->mvert[i];
- ++ndx_hide;
- } else {
- me->pv->vert_map[i]= ndx_show;
- nve[me->pv->vert_map[i]]= me->mvert[i];
- ++ndx_show;
- }
- }
- CustomData_free_layer_active(&me->vdata, CD_MVERT, me->pv->totvert);
- me->mvert= CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, nve, me->totvert);
-
- /* Create new face array */
- me->pv->old_faces= me->mface;
- me->pv->totface= me->totface;
- me->mface= MEM_mallocN(sizeof(MFace)*face_cnt_show, "PMV faces");
- for(i=0; i<me->totface; ++i) {
- MFace *pr_f= &me->pv->old_faces[i];
- char show= 0;
-
- if(me->pv->vert_map[pr_f->v1] < me->totvert &&
- me->pv->vert_map[pr_f->v2] < me->totvert &&
- me->pv->vert_map[pr_f->v3] < me->totvert) {
- if(pr_f->v4) {
- if(me->pv->vert_map[pr_f->v4] < me->totvert)
- show= 1;
- }
- else show= 1;
- }
-
- if(show) {
- MFace *cr_f= &me->mface[face_ndx_show];
- *cr_f= *pr_f;
- cr_f->v1= me->pv->vert_map[pr_f->v1];
- cr_f->v2= me->pv->vert_map[pr_f->v2];
- cr_f->v3= me->pv->vert_map[pr_f->v3];
- cr_f->v4= pr_f->v4 ? me->pv->vert_map[pr_f->v4] : 0;
- test_index_face(cr_f,NULL,0,pr_f->v4?4:3);
- ++face_ndx_show;
- }
- }
- me->totface= face_cnt_show;
- CustomData_set_layer(&me->fdata, CD_MFACE, me->mface);
-
- /* Create new edge array */
- me->pv->old_edges= me->medge;
- me->pv->totedge= me->totedge;
- me->medge= MEM_mallocN(sizeof(MEdge)*edge_cnt_show, "PMV edges");
- me->pv->edge_map= MEM_mallocN(sizeof(int)*me->pv->totedge,"PMV edgemap");
- for(i=0; i<me->totedge; ++i) {
- if(me->pv->vert_map[me->pv->old_edges[i].v1] < me->totvert &&
- me->pv->vert_map[me->pv->old_edges[i].v2] < me->totvert) {
- MEdge *cr_e= &me->medge[edge_ndx_show];
- me->pv->edge_map[i]= edge_ndx_show;
- *cr_e= me->pv->old_edges[i];
- cr_e->v1= me->pv->vert_map[me->pv->old_edges[i].v1];
- cr_e->v2= me->pv->vert_map[me->pv->old_edges[i].v2];
- ++edge_ndx_show;
- }
- else me->pv->edge_map[i]= -1;
- }
- me->totedge= edge_cnt_show;
- CustomData_set_layer(&me->edata, CD_MEDGE, me->medge);
-
- /* XXX: DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA); */
-}
-
-static rcti sculptmode_pmv_box()
-{
- /*XXX: short down[2], mouse[2];
- rcti ret;
-
- getmouseco_areawin(down);
-
- while((get_mbut()&L_MOUSE) || (get_mbut()&R_MOUSE)) {
- getmouseco_areawin(mouse);
-
- scrarea_do_windraw(curarea);
-
- persp(PERSP_WIN);
- glLineWidth(2);
- setlinestyle(2);
- sdrawXORline(down[0],down[1],mouse[0],down[1]);
- sdrawXORline(mouse[0],down[1],mouse[0],mouse[1]);
- sdrawXORline(mouse[0],mouse[1],down[0],mouse[1]);
- sdrawXORline(down[0],mouse[1],down[0],down[1]);
- setlinestyle(0);
- glLineWidth(1);
- persp(PERSP_VIEW);
-
- screen_swapbuffers();
- backdrawview3d(0);
- }
-
- ret.xmin= down[0]<mouse[0]?down[0]:mouse[0];
- ret.ymin= down[1]<mouse[1]?down[1]:mouse[1];
- ret.xmax= down[0]>mouse[0]?down[0]:mouse[0];
- ret.ymax= down[1]>mouse[1]?down[1]:mouse[1];
- return ret;*/
-}
-
-void sculptmode_pmv(int mode)
-{
- Object *ob= NULL; /*XXX: OBACT; */
- rcti hb_2d;
-
- if(ob_get_key(ob)) {
- error("Cannot hide mesh with shape keys enabled");
- return;
- }
-
- hb_2d= sculptmode_pmv_box(); /* Get 2D hide box */
-
- sculptmode_correct_state();
-
- waitcursor(1);
-
- if(hb_2d.xmax-hb_2d.xmin > 3 && hb_2d.ymax-hb_2d.ymin > 3) {
- init_sculptmatrices();
-
- sculptmode_do_pmv(ob,&hb_2d,mode);
- }
- else mesh_pmv_off(ob, get_mesh(ob));
-
- /*XXX: scrarea_do_windraw(curarea); */
-
- waitcursor(0);
-}
-#endif
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 112da5b4f0f..febca301939 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1,5 +1,5 @@
/*
- * $Id: BDR_sculptmode.h 13396 2008-01-25 04:17:38Z nicholasbishop $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/space_action/Makefile b/source/blender/editors/space_action/Makefile
index 840f31b8a40..e856587acca 100644
--- a/source/blender/editors/space_action/Makefile
+++ b/source/blender/editors/space_action/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 6eae581aa40..2fd5b9bbd93 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -1,5 +1,5 @@
/**
- * $Id: drawaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -422,6 +422,8 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
*/
v2d->tot.ymin= (float)(-height);
}
+ /* need to do a view-sync here, so that the keys area doesn't jump around */
+ UI_view2d_sync(NULL, ac->sa, v2d, V2D_VIEWSYNC_AREA_VERTICAL);
/* loop through channels, and set up drawing depending on their type */
y= (float)ACHANNEL_FIRST;
@@ -645,6 +647,11 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
expand = ICON_TRIA_RIGHT;
}
+ if (agrp->flag & AGRP_MUTED)
+ mute = ICON_MUTE_IPO_ON;
+ else
+ mute = ICON_MUTE_IPO_OFF;
+
if (EDITABLE_AGRP(agrp))
protect = ICON_UNLOCKED;
else
@@ -955,27 +962,8 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* ************************************************************************* */
/* Keyframes */
-ActKeysInc *init_aki_data(bAnimContext *ac, bAnimListElem *ale)
-{
- static ActKeysInc aki;
-
- /* no need to set settings if wrong context */
- if ((ac->data == NULL) || ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)==0)
- return NULL;
-
- /* if strip is mapped, store settings */
- aki.ob= ANIM_nla_mapping_get(ac, ale);
-
- if (ac->datatype == ANIMCONT_DOPESHEET)
- aki.ads= (bDopeSheet *)ac->data;
- else
- aki.ads= NULL;
- aki.actmode= ac->datatype;
-
- /* always return pointer... */
- return &aki;
-}
-
+/* extra padding for lengths (to go under scrollers) */
+#define EXTRA_SCROLL_PAD 100.0f
/* draw keyframes in each channel */
void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
@@ -985,13 +973,11 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
int filter;
View2D *v2d= &ar->v2d;
- Object *nob= NULL;
- gla2DDrawInfo *di;
- rcti scr_rct;
+ bDopeSheet *ads= &saction->ads;
+ AnimData *adt= NULL;
- int act_start, act_end, dummy;
+ float act_start, act_end, y;
int height, items;
- float y, sta, end;
char col1[3], col2[3];
char col1a[3], col2a[3];
@@ -1001,6 +987,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* get theme colors */
UI_GetThemeColor3ubv(TH_BACK, col2);
UI_GetThemeColor3ubv(TH_HILITE, col1);
+
UI_GetThemeColor3ubv(TH_GROUP, col2a);
UI_GetThemeColor3ubv(TH_GROUP_ACTIVE, col1a);
@@ -1008,26 +995,14 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
UI_GetThemeColor3ubv(TH_DOPESHEET_CHANNELSUBOB, col2b);
/* set view-mapping rect (only used for x-axis), for NLA-scaling mapping with less calculation */
- scr_rct.xmin= ar->winrct.xmin + ar->v2d.mask.xmin;
- scr_rct.ymin= ar->winrct.ymin + ar->v2d.mask.ymin;
- scr_rct.xmax= ar->winrct.xmin + ar->v2d.hor.xmax;
- scr_rct.ymax= ar->winrct.ymin + ar->v2d.mask.ymax;
- di= glaBegin2DDraw(&scr_rct, &v2d->cur);
/* if in NLA there's a strip active, map the view */
if (ac->datatype == ANIMCONT_ACTION) {
- nob= ANIM_nla_mapping_get(ac, NULL);
-
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 0);
+ adt= ANIM_nla_mapping_get(ac, NULL);
/* start and end of action itself */
- calc_action_range(ac->data, &sta, &end, 0);
- gla2DDrawTranslatePt(di, sta, 0.0f, &act_start, &dummy);
- gla2DDrawTranslatePt(di, end, 0.0f, &act_end, &dummy);
-
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 1);
+ // TODO: this has not had scaling applied
+ calc_action_range(ac->data, &act_start, &act_end, 0);
}
/* build list of channels to draw */
@@ -1058,7 +1033,7 @@ 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) )
{
- int frame1_x, channel_y, sel=0;
+ int sel=0;
/* determine if any need to draw channel */
if (ale->datatype != ALE_NONE) {
@@ -1097,8 +1072,6 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
}
if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) {
- gla2DDrawTranslatePt(di, v2d->cur.xmin, y, &frame1_x, &channel_y);
-
switch (ale->type) {
case ANIMTYPE_SCENE:
case ANIMTYPE_OBJECT:
@@ -1134,36 +1107,32 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
}
/* draw region twice: firstly backdrop, then the current range */
- glRectf((float)frame1_x, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)v2d->hor.xmax, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(v2d->cur.xmin, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmax+EXTRA_SCROLL_PAD, (float)y+ACHANNEL_HEIGHT_HALF);
if (ac->datatype == ANIMCONT_ACTION)
- glRectf((float)act_start, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)act_end, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(act_start, (float)y-ACHANNEL_HEIGHT_HALF, act_end, (float)y+ACHANNEL_HEIGHT_HALF);
}
else if (ac->datatype == ANIMCONT_SHAPEKEY) {
- gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y);
-
/* all frames that have a frame number less than one
* get a desaturated orange background
*/
glColor4ub(col2[0], col2[1], col2[2], 0x22);
- glRectf(0.0f, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)frame1_x, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(0.0f, (float)y-ACHANNEL_HEIGHT_HALF, 1.0f, (float)y+ACHANNEL_HEIGHT_HALF);
/* frames one and higher get a saturated orange background */
glColor4ub(col2[0], col2[1], col2[2], 0x44);
- glRectf((float)frame1_x, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)v2d->hor.xmax, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(1.0f, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmax+EXTRA_SCROLL_PAD, (float)y+ACHANNEL_HEIGHT_HALF);
}
else if (ac->datatype == ANIMCONT_GPENCIL) {
- gla2DDrawTranslatePt(di, v2d->cur.xmin, y, &frame1_x, &channel_y);
-
/* frames less than one get less saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
- glRectf(0.0f, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)frame1_x, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(0.0f, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmin, (float)y+ACHANNEL_HEIGHT_HALF);
/* frames one and higher get a saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x44);
else glColor4ub(col2[0], col2[1], col2[2], 0x44);
- glRectf((float)frame1_x, (float)channel_y-ACHANNEL_HEIGHT_HALF, (float)v2d->hor.xmax, (float)channel_y+ACHANNEL_HEIGHT_HALF);
+ glRectf(v2d->cur.xmin, (float)y-ACHANNEL_HEIGHT_HALF, v2d->cur.xmax+EXTRA_SCROLL_PAD, (float)y+ACHANNEL_HEIGHT_HALF);
}
}
}
@@ -1190,36 +1159,29 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
{
/* check if anything to show for this channel */
if (ale->datatype != ALE_NONE) {
- ActKeysInc *aki= init_aki_data(ac, ale);
- nob= ANIM_nla_mapping_get(ac, ale);
-
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 0);
+ adt= ANIM_nla_mapping_get(ac, ale);
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
case ALE_SCE:
- draw_scene_channel(di, aki, ale->key_data, y);
+ draw_scene_channel(v2d, ads, ale->key_data, y);
break;
case ALE_OB:
- draw_object_channel(di, aki, ale->key_data, y);
+ draw_object_channel(v2d, ads, ale->key_data, y);
break;
case ALE_ACT:
- draw_action_channel(di, aki, ale->key_data, y);
+ draw_action_channel(v2d, adt, ale->key_data, y);
break;
case ALE_GROUP:
- draw_agroup_channel(di, aki, ale->data, y);
+ draw_agroup_channel(v2d, adt, ale->data, y);
break;
case ALE_FCURVE:
- draw_fcurve_channel(di, aki, ale->key_data, y);
+ draw_fcurve_channel(v2d, adt, ale->key_data, y);
break;
case ALE_GPFRAME:
- draw_gpl_channel(di, aki, ale->data, y);
+ draw_gpl_channel(v2d, ads, ale->data, y);
break;
}
-
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 1);
}
}
@@ -1231,16 +1193,11 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* black line marking 'current frame' for Time-Slide transform mode */
if (saction->flag & SACTION_MOVING) {
- int frame1_x;
-
- gla2DDrawTranslatePt(di, saction->timeslide, 0, &frame1_x, &dummy);
- cpack(0x0);
+ glColor3f(0.0f, 0.0f, 0.0f);
glBegin(GL_LINES);
- glVertex2f((float)frame1_x, (float)v2d->mask.ymin - 100);
- glVertex2f((float)frame1_x, (float)v2d->mask.ymax);
+ glVertex2f(saction->timeslide, v2d->cur.ymin-EXTRA_SCROLL_PAD);
+ glVertex2f(saction->timeslide, v2d->cur.ymax);
glEnd();
}
-
- glaEnd2DDraw(di);
}
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index af074ca348d..d4709e94e5e 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1,5 +1,5 @@
/**
- * $Id: editaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -67,6 +67,7 @@
#include "BKE_fcurve.h"
#include "BKE_key.h"
#include "BKE_material.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_report.h"
@@ -74,14 +75,13 @@
#include "UI_view2d.h"
-#include "BIF_transform.h"
-
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframes_edit.h"
#include "ED_screen.h"
#include "ED_space_api.h"
+#include "ED_transform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -101,7 +101,7 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max)
int filter;
/* get data to filter, from Action or Dopesheet */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
@@ -112,16 +112,16 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max)
if (anim_data.first) {
/* go through channels, finding max extents */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
float tmin, tmax;
/* get range and apply necessary scaling before */
calc_fcurve_range(fcu, &tmin, &tmax);
- if (nob) {
- tmin= get_action_frame_inv(nob, tmin);
- tmax= get_action_frame_inv(nob, tmax);
+ if (adt) {
+ tmin= BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
+ tmax= BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP);
}
/* try to set cur using these values, if they're more extreme than previously set values */
@@ -178,10 +178,11 @@ void ACT_OT_previewrange_set (wmOperatorType *ot)
/* identifiers */
ot->name= "Auto-Set Preview Range";
ot->idname= "ACT_OT_previewrange_set";
+ ot->description= "Set Preview Range based on extents of selected Keyframes.";
/* api callbacks */
ot->exec= actkeys_previewrange_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -214,7 +215,7 @@ static int actkeys_viewall_exec(bContext *C, wmOperator *op)
/* do View2D syncing */
UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
- /* set notifier that things have changed */
+ /* just redraw this view */
ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
@@ -225,10 +226,11 @@ void ACT_OT_view_all (wmOperatorType *ot)
/* identifiers */
ot->name= "View All";
ot->idname= "ACT_OT_view_all";
+ ot->description= "Reset viewable area to show full keyframe range.";
/* api callbacks */
ot->exec= actkeys_viewall_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -301,21 +303,19 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
}
}
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
-
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_copy (wmOperatorType *ot)
+void ACT_OT_copy (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Keyframes";
- ot->idname= "ACT_OT_keyframes_copy";
+ ot->idname= "ACT_OT_copy";
+ ot->description= "Copy selected keyframes to the copy/paste buffer.";
/* api callbacks */
ot->exec= actkeys_copy_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -345,21 +345,22 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_paste (wmOperatorType *ot)
+void ACT_OT_paste (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Paste Keyframes";
- ot->idname= "ACT_OT_keyframes_paste";
+ ot->idname= "ACT_OT_paste";
+ ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame.";
/* api callbacks */
ot->exec= actkeys_paste_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -369,10 +370,10 @@ void ACT_OT_keyframes_paste (wmOperatorType *ot)
/* defines for insert keyframes tool */
EnumPropertyItem prop_actkeys_insertkey_types[] = {
- {1, "ALL", "All Channels", ""},
- {2, "SEL", "Only Selected Channels", ""},
- {3, "GROUP", "In Active Group", ""}, // xxx not in all cases
- {0, NULL, NULL, NULL}
+ {1, "ALL", 0, "All Channels", ""},
+ {2, "SEL", 0, "Only Selected Channels", ""},
+ {3, "GROUP", 0, "In Active Group", ""}, // xxx not in all cases
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for snapping keyframes to frame-times */
@@ -400,14 +401,14 @@ static void insert_action_keys(bAnimContext *ac, short mode)
/* insert keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
- //Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
/* adjust current frame for NLA-scaling */
- //if (nob)
- // cfra= get_action_frame(nob, CFRA);
- //else
- // cfra= (float)CFRA;
+ if (adt)
+ cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
+ else
+ cfra= (float)CFRA;
/* if there's an id */
if (ale->id)
@@ -432,31 +433,32 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
if (ac.datatype == ANIMCONT_GPENCIL)
return OPERATOR_CANCELLED;
- /* get snapping mode */
+ /* what channels to affect? */
mode= RNA_enum_get(op->ptr, "type");
- /* snap keyframes */
+ /* insert keyframes */
insert_action_keys(&ac, mode);
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_insert (wmOperatorType *ot)
+void ACT_OT_insert_keyframe (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Insert Keyframes";
- ot->idname= "ACT_OT_keyframes_insert";
+ ot->idname= "ACT_OT_insert_keyframe";
+ ot->description= "Insert keyframes for the specified channels.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_insertkey_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -508,8 +510,8 @@ static int actkeys_duplicate_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED; // xxx - start transform
}
@@ -524,16 +526,17 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_duplicate (wmOperatorType *ot)
+void ACT_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Duplicate Keyframes";
- ot->idname= "ACT_OT_keyframes_duplicate";
+ ot->idname= "ACT_OT_duplicate";
+ ot->description= "Make a copy of all selected keyframes.";
/* api callbacks */
ot->invoke= actkeys_duplicate_invoke;
ot->exec= actkeys_duplicate_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -585,22 +588,23 @@ static int actkeys_delete_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_delete (wmOperatorType *ot)
+void ACT_OT_delete (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Keyframes";
- ot->idname= "ACT_OT_keyframes_delete";
+ ot->idname= "ACT_OT_delete";
+ ot->description= "Remove all selected keyframes.";
/* api callbacks */
ot->invoke= WM_operator_confirm;
ot->exec= actkeys_delete_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -648,22 +652,23 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_clean (wmOperatorType *ot)
+void ACT_OT_clean (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clean Keyframes";
- ot->idname= "ACT_OT_keyframes_clean";
+ ot->idname= "ACT_OT_clean";
+ ot->description= "Simplify F-Curves by removing closely spaced keyframes.";
/* api callbacks */
//ot->invoke= // XXX we need that number popup for this!
ot->exec= actkeys_clean_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -772,21 +777,22 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_sample (wmOperatorType *ot)
+void ACT_OT_sample (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Sample Keyframes";
- ot->idname= "ACT_OT_keyframes_sample";
+ ot->idname= "ACT_OT_sample";
+ ot->description= "Add keyframes on every frame between the selected keyframes.";
/* api callbacks */
ot->exec= actkeys_sample_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -799,9 +805,9 @@ void ACT_OT_keyframes_sample (wmOperatorType *ot)
/* defines for set extrapolation-type for selected keyframes tool */
EnumPropertyItem prop_actkeys_expo_types[] = {
- {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", "Constant Extrapolation", ""},
- {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", "Linear Extrapolation", ""},
- {0, NULL, NULL, NULL}
+ {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""},
+ {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for setting extrapolation mode for keyframes */
@@ -847,22 +853,23 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_extrapolation_type_set (wmOperatorType *ot)
+void ACT_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Extrapolation";
- ot->idname= "ACT_OT_keyframes_extrapolation_type_set";
+ ot->idname= "ACT_OT_extrapolation_type";
+ ot->description= "Set extrapolation mode for selected F-Curves.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_expo_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -917,22 +924,23 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_interpolation_type (wmOperatorType *ot)
+void ACT_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Interpolation";
- ot->idname= "ACT_OT_keyframes_interpolation_type";
+ ot->idname= "ACT_OT_interpolation_type";
+ ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_ipo_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1005,22 +1013,23 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot)
+void ACT_OT_handle_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Handle Type";
- ot->idname= "ACT_OT_keyframes_handle_type_set";
+ ot->idname= "ACT_OT_handle_type";
+ ot->description= "Set type of handle for selected keyframes.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_handletype_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1032,10 +1041,10 @@ void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot)
/* ************************************************************************** */
/* TRANSFORM STUFF */
-/* ***************** Snap Current Frame Operator *********************** */
+/* ***************** Jump to Selected Frames Operator *********************** */
/* snap current-frame indicator to 'average time' of selected keyframe */
-static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op)
+static int actkeys_framejump_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
ListBase anim_data= {NULL, NULL};
@@ -1054,8 +1063,17 @@ static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op)
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
- ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
+
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ }
+ else
+ ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+ }
BLI_freelistN(&anim_data);
@@ -1071,15 +1089,16 @@ static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_cfrasnap (wmOperatorType *ot)
+void ACT_OT_frame_jump (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Current Frame to Keys";
- ot->idname= "ACT_OT_keyframes_cfrasnap";
+ ot->name= "Jump to Frame";
+ ot->idname= "ACT_OT_frame_jump";
+ ot->description= "Set the current frame to the average frame of the selected keyframes.";
/* api callbacks */
- ot->exec= actkeys_cfrasnap_exec;
- ot->poll= ED_operator_areaactive;
+ ot->exec= actkeys_framejump_exec;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1089,11 +1108,11 @@ void ACT_OT_keyframes_cfrasnap (wmOperatorType *ot)
/* defines for snap keyframes tool */
EnumPropertyItem prop_actkeys_snap_types[] = {
- {ACTKEYS_SNAP_CFRA, "CFRA", "Current frame", ""},
- {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", "Nearest Frame", ""}, // XXX as single entry?
- {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", "Nearest Second", ""}, // XXX as single entry?
- {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", "Nearest Marker", ""},
- {0, NULL, NULL, NULL}
+ {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", ""},
+ {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
+ {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
+ {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for snapping keyframes to frame-times */
@@ -1125,12 +1144,12 @@ static void snap_action_keys(bAnimContext *ac, short mode)
/* snap keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
//else if (ale->type == ACTTYPE_GPLAYER)
// snap_gplayer_frames(ale->data, mode);
@@ -1160,22 +1179,23 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_snap (wmOperatorType *ot)
+void ACT_OT_snap (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Keys";
- ot->idname= "ACT_OT_keyframes_snap";
+ ot->idname= "ACT_OT_snap";
+ ot->description= "Snap selected keyframes to the times specified.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_snap_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1188,11 +1208,11 @@ void ACT_OT_keyframes_snap (wmOperatorType *ot)
/* defines for mirror keyframes tool */
EnumPropertyItem prop_actkeys_mirror_types[] = {
- {ACTKEYS_MIRROR_CFRA, "CFRA", "Current frame", ""},
- {ACTKEYS_MIRROR_YAXIS, "YAXIS", "Vertical Axis", ""},
- {ACTKEYS_MIRROR_XAXIS, "XAXIS", "Horizontal Axis", ""},
- {ACTKEYS_MIRROR_MARKER, "MARKER", "First Selected Marker", ""},
- {0, NULL, NULL, NULL}
+ {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""},
+ {ACTKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""},
+ {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""},
+ {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for mirroring keyframes */
@@ -1241,12 +1261,12 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
/* mirror keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
//else if (ale->type == ACTTYPE_GPLAYER)
// snap_gplayer_frames(ale->data, mode);
@@ -1276,22 +1296,23 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_mirror (wmOperatorType *ot)
+void ACT_OT_mirror (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mirror Keys";
- ot->idname= "ACT_OT_keyframes_mirror";
+ ot->idname= "ACT_OT_mirror";
+ ot->description= "Flip selected keyframes over the selected mirror line.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= actkeys_mirror_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index fa96e1ea81f..f5c85d4d983 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -48,9 +48,12 @@
#include "ED_anim_api.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
+#include "RNA_access.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -63,1494 +66,183 @@
#include "action_intern.h"
-/* ********************************************************* */
-/* Menu Defines... */
-
-/* button events */
-enum {
- B_REDR = 0,
- B_ACTCOPYKEYS,
- B_ACTPASTEKEYS,
-} eActHeader_ButEvents;
-
-/* ------------------------------- */
-/* enums declaring constants that are used as menu event codes */
-
-enum {
- ACTMENU_VIEW_CENTERVIEW= 0,
- ACTMENU_VIEW_AUTOUPDATE,
- ACTMENU_VIEW_PLAY3D,
- ACTMENU_VIEW_PLAYALL,
- ACTMENU_VIEW_ALL,
- ACTMENU_VIEW_MAXIMIZE,
- ACTMENU_VIEW_LOCK,
- ACTMENU_VIEW_SLIDERS,
- ACTMENU_VIEW_NEXTMARKER,
- ACTMENU_VIEW_PREVMARKER,
- ACTMENU_VIEW_NEXTKEYFRAME,
- ACTMENU_VIEW_PREVKEYFRAME,
- ACTMENU_VIEW_TIME,
- ACTMENU_VIEW_NOHIDE,
- ACTMENU_VIEW_FRANUM,
- ACTMENU_VIEW_TRANSDELDUPS,
- ACTMENU_VIEW_HORIZOPTIMISE,
- ACTMENU_VIEW_GCOLORS,
- ACTMENU_VIEW_PREVRANGESET,
- ACTMENU_VIEW_PREVRANGECLEAR,
- ACTMENU_VIEW_PREVRANGEAUTO
-};
-
-enum {
- ACTMENU_SEL_BORDER = 0,
- ACTMENU_SEL_BORDERC,
- ACTMENU_SEL_BORDERM,
- ACTMENU_SEL_ALL_KEYS,
- ACTMENU_SEL_ALL_CHAN,
- ACTMENU_SEL_ALL_MARKERS,
- ACTMENU_SEL_INVERSE_KEYS,
- ACTMENU_SEL_INVERSE_MARKERS,
- ACTMENU_SEL_INVERSE_CHANNELS,
- ACTMENU_SEL_LEFTKEYS,
- ACTMENU_SEL_RIGHTKEYS
-};
-
-enum {
- ACTMENU_SEL_COLUMN_KEYS = 1,
- ACTMENU_SEL_COLUMN_CFRA,
- ACTMENU_SEL_COLUMN_MARKERSCOLUMN,
- ACTMENU_SEL_COLUMN_MARKERSBETWEEN
-};
-
-enum {
- ACTMENU_CHANNELS_OPENLEVELS = 0,
- ACTMENU_CHANNELS_CLOSELEVELS,
- ACTMENU_CHANNELS_EXPANDALL,
- ACTMENU_CHANNELS_SHOWACHANS,
- ACTMENU_CHANNELS_DELETE
-};
-
-enum {
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_UP = 0,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_DOWN,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_TOP,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_BOTTOM
-};
-
-enum {
- ACTMENU_CHANNELS_GROUP_ADD_TOACTIVE = 0,
- ACTMENU_CHANNELS_GROUP_ADD_TONEW,
- ACTMENU_CHANNELS_GROUP_REMOVE,
- ACTMENU_CHANNELS_GROUP_SYNCPOSE
-};
-
-enum {
- ACTMENU_CHANNELS_SETTINGS_TOGGLE = 0,
- ACTMENU_CHANNELS_SETTINGS_ENABLE,
- ACTMENU_CHANNELS_SETTINGS_DISABLE,
-};
-
-enum {
- ACTMENU_KEY_DUPLICATE = 0,
- ACTMENU_KEY_DELETE,
- ACTMENU_KEY_CLEAN,
- ACTMENU_KEY_SAMPLEKEYS,
- ACTMENU_KEY_INSERTKEY
-};
-
-enum {
- ACTMENU_KEY_TRANSFORM_MOVE = 0,
- ACTMENU_KEY_TRANSFORM_SCALE,
- ACTMENU_KEY_TRANSFORM_SLIDE,
- ACTMENU_KEY_TRANSFORM_EXTEND
-};
-
-enum {
- ACTMENU_KEY_HANDLE_AUTO = 0,
- ACTMENU_KEY_HANDLE_ALIGN,
- ACTMENU_KEY_HANDLE_FREE,
- ACTMENU_KEY_HANDLE_VECTOR
-};
-
enum {
- ACTMENU_KEY_INTERP_CONST = 0,
- ACTMENU_KEY_INTERP_LINEAR,
- ACTMENU_KEY_INTERP_BEZIER
-};
+ B_REDR= 0,
+} eActHeader_Events;
-enum {
- ACTMENU_KEY_EXTEND_CONST = 0,
- ACTMENU_KEY_EXTEND_EXTRAPOLATION,
- ACTMENU_KEY_EXTEND_CYCLIC,
- ACTMENU_KEY_EXTEND_CYCLICEXTRAPOLATION
-};
-
-enum {
- ACTMENU_KEY_SNAP_NEARFRAME = 1,
- ACTMENU_KEY_SNAP_CURFRAME,
- ACTMENU_KEY_SNAP_NEARMARK,
- ACTMENU_KEY_SNAP_NEARTIME,
- ACTMENU_KEY_SNAP_CFRA2KEY,
-};
-
-enum {
- ACTMENU_KEY_MIRROR_CURFRAME = 1,
- ACTMENU_KEY_MIRROR_YAXIS,
- ACTMENU_KEY_MIRROR_XAXIS,
- ACTMENU_KEY_MIRROR_MARKER
-};
-
-enum {
- ACTMENU_MARKERS_ADD = 0,
- ACTMENU_MARKERS_DUPLICATE,
- ACTMENU_MARKERS_DELETE,
- ACTMENU_MARKERS_NAME,
- ACTMENU_MARKERS_MOVE,
- ACTMENU_MARKERS_LOCALADD,
- ACTMENU_MARKERS_LOCALRENAME,
- ACTMENU_MARKERS_LOCALDELETE,
- ACTMENU_MARKERS_LOCALMOVE
-};
-
-/* ------------------------------- */
-/* macros for easier state testing (only for use here) */
-
-/* test if active action editor is showing any markers */
-#if 0
- #define SACTION_HASMARKERS \
- ((saction->action && saction->action->markers.first) \
- || (scene->markers.first))
-#endif
-
-/* need to find out how to get scene from context */
-#define SACTION_HASMARKERS (saction->action && saction->action->markers.first)
-
-/* ------------------------------- */
-
-/* *************************************************************** */
-/* menus */
-
-/* Key menu --------------------------- */
-
-static void do_keymenu_transformmenu(bContext *C, void *arg, int event)
-{
- switch (event)
- {
- case ACTMENU_KEY_TRANSFORM_MOVE:
- //transform_action_keys('g', 0);
- break;
- case ACTMENU_KEY_TRANSFORM_SCALE:
- //transform_action_keys('s', 0);
- break;
- case ACTMENU_KEY_TRANSFORM_SLIDE:
- //transform_action_keys('t', 0);
- break;
- case ACTMENU_KEY_TRANSFORM_EXTEND:
- //transform_action_keys('e', 0);
- break;
- }
-}
+/* ********************************************************* */
+/* Menu Defines... */
-static uiBlock *action_keymenu_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_keymenu_transformmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_transformmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Grab/Move|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_TRANSFORM_MOVE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Grab/Extend from Frame|E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_TRANSFORM_EXTEND, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Scale|S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_TRANSFORM_SCALE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Time Slide|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_TRANSFORM_SLIDE, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
-
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceAction *sact= (SpaceAction*)CTX_wm_space_data(C);
+ PointerRNA spaceptr;
- return block;
-}
-
-static void do_keymenu_snapmenu(bContext *C, void *arg, int event)
-{
- switch(event)
- {
- case ACTMENU_KEY_SNAP_NEARFRAME:
- case ACTMENU_KEY_SNAP_CURFRAME:
- case ACTMENU_KEY_SNAP_NEARMARK:
- case ACTMENU_KEY_SNAP_NEARTIME:
- //snap_action_keys(event);
- break;
-
- case ACTMENU_KEY_SNAP_CFRA2KEY:
- //snap_cfra_action();
- break;
- }
-}
-
-static uiBlock *action_keymenu_snapmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
+ /* retrieve state */
+ RNA_pointer_create(&sc->id, &RNA_SpaceDopeSheetEditor, sact, &spaceptr);
- block= uiBeginBlock(C, ar, "action_keymenu_snapmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_snapmenu, NULL);
-
- if (saction->flag & SACTION_DRAWTIME) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Key -> Nearest Second|Shift S, 1", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_NEARTIME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Key -> Current Time|Shift S, 2", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_CURFRAME, "");
-
- }
- else {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Key -> Nearest Frame|Shift S, 1", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_NEARFRAME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Key -> Current Frame|Shift S, 2", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_CURFRAME, "");
- }
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Key -> Nearest Marker|Shift S, 3", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_NEARMARK, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Current Frame -> Key|Ctrl Shift S", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SNAP_NEARMARK, "");
+ /* create menu */
+ //uiItemO(layout, NULL, ICON_MENU_PANEL, "ACT_OT_properties");
- uiBlockSetDirection(block, UI_RIGHT);
+ //uiItemS(layout);
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
+ 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);
- return block;
-}
-
-static void do_keymenu_mirrormenu(bContext *C, void *arg, int event)
-{
- switch(event)
- {
- case ACTMENU_KEY_MIRROR_CURFRAME:
- case ACTMENU_KEY_MIRROR_YAXIS:
- //mirror_action_keys(event);
- break;
- }
-
-}
-
-static uiBlock *action_keymenu_mirrormenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ if (sact->flag & SACTION_DRAWTIME)
+ uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
+ else
+ uiItemO(layout, "Show Seconds", 0, "ANIM_OT_time_toggle");
- block= uiBeginBlock(C, ar, "action_keymenu_mirrormenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_mirrormenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Current Frame|Shift M, 1", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_MIRROR_CURFRAME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Vertical Axis|Shift M, 2", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_MIRROR_YAXIS, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Horizontal Axis|Shift M, 3", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_MIRROR_XAXIS, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Selected Marker|Shift M, 4", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_MIRROR_MARKER, "");
+ uiItemS(layout);
- uiBlockSetDirection(block, UI_RIGHT);
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_set");
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_clear");
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
+ uiItemO(layout, NULL, 0, "ACT_OT_previewrange_set");
- return block;
-}
-
-static void do_keymenu_handlemenu(bContext *C, void *arg, int event)
-{
- switch (event) {
- case ACTMENU_KEY_HANDLE_AUTO:
- //sethandles_action_keys(HD_AUTO);
- break;
-
- case ACTMENU_KEY_HANDLE_ALIGN:
- case ACTMENU_KEY_HANDLE_FREE:
- /* OK, this is kinda dumb, need to fix the
- * toggle crap in sethandles_ipo_keys()
- */
- //sethandles_action_keys(HD_ALIGN);
- break;
-
- case ACTMENU_KEY_HANDLE_VECTOR:
- //sethandles_action_keys(HD_VECT);
- break;
- }
-}
-
-static uiBlock *action_keymenu_handlemenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemS(layout);
- block= uiBeginBlock(C, ar, "action_keymenu_handlemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_handlemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Auto|Shift H", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_HANDLE_AUTO, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Aligned|H", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_HANDLE_ALIGN, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Free|H", 0, yco-=20, menuwidth,
- 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_HANDLE_FREE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Vector|V", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_HANDLE_VECTOR, "");
+ uiItemO(layout, NULL, 0, "ACT_OT_frame_jump");
- uiBlockSetDirection(block, UI_RIGHT);
+ uiItemO(layout, NULL, 0, "ACT_OT_view_all");
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
-
- return block;
-}
-
-static void do_keymenu_extendmenu(bContext *C, void *arg, int event)
-{
- switch(event)
- {
- case ACTMENU_KEY_EXTEND_CONST:
- //action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CONSTANT);
- break;
- case ACTMENU_KEY_EXTEND_EXTRAPOLATION:
- //action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_EXTRAPOLATION);
- break;
- case ACTMENU_KEY_EXTEND_CYCLIC:
- //action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CYCLIC);
- break;
- case ACTMENU_KEY_EXTEND_CYCLICEXTRAPOLATION:
- //action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CYCLICEXTRAPOLATION);
- break;
- }
+ if (sa->full)
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
+ else
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctrl DownArrow
}
-static uiBlock *action_keymenu_extendmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemO(layout, NULL, 0, "ACT_OT_select_all_toggle");
+ uiItemBooleanO(layout, "Invert All", 0, "ACT_OT_select_all_toggle", "invert", 1);
- block= uiBeginBlock(C, ar, "action_keymenu_extendmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_extendmenu, NULL);
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Constant", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_EXTEND_CONST, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Extrapolation", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_EXTEND_EXTRAPOLATION, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Cyclic", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_EXTEND_CYCLIC, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Cyclic Extrapolation", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_EXTEND_CYCLICEXTRAPOLATION, "");
+ uiItemO(layout, NULL, 0, "ACT_OT_select_border");
+ uiItemBooleanO(layout, "Border Axis Range", 0, "ACT_OT_select_border", "axis_range", 1);
- uiBlockSetDirection(block, UI_RIGHT);
+ uiItemS(layout);
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
+ uiItemEnumO(layout, "Columns on Selected Keys", 0, "ACT_OT_select_column", "mode", ACTKEYS_COLUMNSEL_KEYS);
+ uiItemEnumO(layout, "Column on Current Frame", 0, "ACT_OT_select_column", "mode", ACTKEYS_COLUMNSEL_CFRA);
- return block;
+ uiItemEnumO(layout, "Columns on Selected Markers", 0, "ACT_OT_select_column", "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
+ uiItemEnumO(layout, "Between Selected Markers", 0, "ACT_OT_select_column", "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
}
-static void do_keymenu_intpolmenu(bContext *C, void *arg, int event)
+static void act_channelmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- switch(event)
- {
- case ACTMENU_KEY_INTERP_CONST:
- //action_set_ipo_flags(SET_IPO_MENU, SET_IPO_CONSTANT);
- break;
- case ACTMENU_KEY_INTERP_LINEAR:
- //action_set_ipo_flags(SET_IPO_MENU, SET_IPO_LINEAR);
- break;
- case ACTMENU_KEY_INTERP_BEZIER:
- //action_set_ipo_flags(SET_IPO_MENU, SET_IPO_BEZIER);
- break;
- }
-}
-
-static uiBlock *action_keymenu_intpolmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_toggle");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_enable");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_disable");
- block= uiBeginBlock(C, ar, "action_keymenu_intpolmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_keymenu_intpolmenu, NULL);
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Constant|Shift T, 1", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_INTERP_CONST, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Linear|Shift T, 2", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_INTERP_LINEAR, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Bezier|Shift T, 3", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_INTERP_BEZIER, "");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_editable_toggle");
- uiBlockSetDirection(block, UI_RIGHT);
+ uiItemS(layout);
- uiTextBoundsBlock(block, 60);
- uiEndBlock(C, block);
-
- return block;
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_expand");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_collapse");
}
-static void do_action_keymenu(bContext *C, void *arg, int event)
+static void act_gplayermenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- bAction *act;
- //Key *key;
-
- if (!saction) return;
-
- act = saction->action;
- //key = get_action_mesh_key();
-
- switch(event)
- {
- case ACTMENU_KEY_DUPLICATE:
- //duplicate_action_keys();
- break;
- case ACTMENU_KEY_DELETE:
- //delete_action_keys();
- break;
- case ACTMENU_KEY_CLEAN:
- //clean_action();
- break;
- case ACTMENU_KEY_SAMPLEKEYS:
- //sample_action_keys();
- break;
- case ACTMENU_KEY_INSERTKEY:
- //insertkey_action();
- break;
- }
+ //uiItemMenuF(layout, "Transform", 0, nla_edit_transformmenu);
+ //uiItemS(layout);
+ //uiItemO(layout, NULL, 0, "NLAEDIT_OT_duplicate");
}
-static uiBlock *action_keymenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_keymenu", UI_EMBOSSP);
-
-
- uiBlockSetButmFunc(block, do_action_keymenu, NULL);
-
- uiDefIconTextBlockBut(block, action_keymenu_transformmenu,
- NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_snapmenu,
- NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_mirrormenu,
- NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, 120, 20, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Insert Key|I", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_INSERTKEY, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Duplicate|Shift D", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_DUPLICATE, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Delete|X", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_DELETE, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Clean Action|O", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_CLEAN, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Sample Keys|Alt O", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_SAMPLEKEYS, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_handlemenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Handle Type", 0, yco-=20, 120, 20, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_extendmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Extend Mode", 0, yco-=20, 120, 20, "");
- uiDefIconTextBlockBut(block, action_keymenu_intpolmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Interpolation Mode", 0, yco-=20, 120, 20, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
+ uiItemEnumO(layout, "Grab/Move", 0, "TFM_OT_transform", "mode", TFM_TIME_TRANSLATE);
+ uiItemEnumO(layout, "Extend", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND);
+ uiItemEnumO(layout, "Scale", 0, "TFM_OT_transform", "mode", TFM_TIME_SCALE);
}
-/* Frame menu --------------------------- */
-
-
-// framemenu uses functions from keymenu
-static uiBlock *action_framemenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_framemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_action_keymenu, NULL);
-
- uiDefIconTextBlockBut(block, action_keymenu_transformmenu,
- NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_snapmenu,
- NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_keymenu_mirrormenu,
- NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, 120, 20, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Duplicate|Shift D", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_DUPLICATE, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Delete|X", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_KEY_DELETE, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
+ 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);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_MARKER);
}
-/* Marker menu --------------------------- */
-
-static void do_markermenu(bContext *C, void *arg, int event)
+static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- switch(event)
- {
- case ACTMENU_MARKERS_ADD:
- //add_marker(CFRA);
- break;
- case ACTMENU_MARKERS_DUPLICATE:
- //duplicate_marker();
- break;
- case ACTMENU_MARKERS_DELETE:
- //remove_marker();
- break;
- case ACTMENU_MARKERS_NAME:
- //rename_marker();
- break;
- case ACTMENU_MARKERS_MOVE:
- //transform_markers('g', 0);
- break;
- case ACTMENU_MARKERS_LOCALADD:
- //action_add_localmarker(G.saction->action, CFRA);
- break;
- case ACTMENU_MARKERS_LOCALDELETE:
- //action_remove_localmarkers(G.saction->action);
- break;
- case ACTMENU_MARKERS_LOCALRENAME:
- //action_rename_localmarker(G.saction->action);
- break;
- case ACTMENU_MARKERS_LOCALMOVE:
- /*G.saction->flag |= SACTION_POSEMARKERS_MOVE;
- transform_markers('g', 0);
- G.saction->flag &= ~SACTION_POSEMARKERS_MOVE;*/
- break;
- }
+ 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 uiBlock *action_markermenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_markermenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_markermenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Marker|M", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_ADD, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate Marker|Ctrl Shift D", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_DUPLICATE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Marker|Shift X", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_DELETE, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_NAME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Ctrl G", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_MOVE, "");
-
- if (saction->mode == SACTCONT_ACTION) {
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Pose Marker|Shift L", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_LOCALADD, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rename Pose Marker|Ctrl Shift L", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_LOCALRENAME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Pose Marker|Alt L", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_LOCALDELETE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Pose Marker|Ctrl L", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_LOCALMOVE, "");
- }
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
+ 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);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_ALIGN);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO_ANIM); // xxx?
}
-
-/* Channel menu --------------------------- */
-
-static void do_channelmenu_posmenu(bContext *C, void *arg, int event)
+static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- switch(event)
- {
- case ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_DOWN:
- //rearrange_action_channels(REARRANGE_ACTCHAN_DOWN);
- break;
- case ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_UP:
- //rearrange_action_channels(REARRANGE_ACTCHAN_UP);
- break;
- case ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_TOP:
- //rearrange_action_channels(REARRANGE_ACTCHAN_TOP);
- break;
- case ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_BOTTOM:
- //rearrange_action_channels(REARRANGE_ACTCHAN_BOTTOM);
- break;
- }
-}
-
-static uiBlock *action_channelmenu_posmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_channelmenu_posmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_channelmenu_posmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Move Up|Shift Page Up", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_UP, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Move Down|Shift Page Down", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_DOWN, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Move to Top|Ctrl Shift Page Up", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_TOP, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Move to Bottom|Ctrl Shift Page Down", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_CHANPOS_MOVE_CHANNEL_BOTTOM, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
-
- return block;
-}
-
-static void do_channelmenu_groupmenu(bContext *C, void *arg, int event)
-{
- switch(event)
- {
- case ACTMENU_CHANNELS_GROUP_ADD_TOACTIVE:
- //action_groups_group(0);
- break;
- case ACTMENU_CHANNELS_GROUP_ADD_TONEW:
- //action_groups_group(1);
- break;
- case ACTMENU_CHANNELS_GROUP_REMOVE:
- //action_groups_ungroup();
- break;
- case ACTMENU_CHANNELS_GROUP_SYNCPOSE: /* Syncronise Pose-data and Action-data */
- //sync_pchan2achan_grouping();
- break;
- }
-}
-
-static uiBlock *action_channelmenu_groupmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_channelmenu_groupmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_channelmenu_groupmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Add to Active Group|Shift G", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_GROUP_ADD_TOACTIVE, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Add to New Group|Ctrl Shift G", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_GROUP_ADD_TONEW, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Remove From Group|Alt G", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_GROUP_REMOVE, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Synchronise with Armature", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_GROUP_SYNCPOSE, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
-
- return block;
-}
-
-static void do_channelmenu_settingsmenu(bContext *C, void *arg, int event)
-{
- //setflag_action_channels(event);
-}
-
-static uiBlock *action_channelmenu_settingsmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_channelmenu_settingsmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_channelmenu_settingsmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Toggle a Setting|Shift W", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_SETTINGS_TOGGLE, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Enable a Setting|Ctrl Shift W", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_SETTINGS_ENABLE, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Disable a Setting|Alt W", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_CHANNELS_SETTINGS_DISABLE, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
-
- return block;
-}
-
-static void do_channelmenu(bContext *C, void *arg, int event)
-{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
-
- if (saction == NULL) return;
-
- switch(event)
- {
- case ACTMENU_CHANNELS_OPENLEVELS: /* Unfold selected channels one step */
- //openclose_level_action(1);
- break;
- case ACTMENU_CHANNELS_CLOSELEVELS: /* Fold selected channels one step */
- //openclose_level_action(-1);
- break;
- case ACTMENU_CHANNELS_EXPANDALL: /* Expands all channels */
- //expand_all_action();
- break;
- case ACTMENU_CHANNELS_SHOWACHANS: /* Unfold groups that are hiding selected achans */
- //expand_obscuregroups_action();
- break;
- case ACTMENU_CHANNELS_DELETE: /* Deletes selected channels */
- //delete_action_channels();
- break;
- }
-}
-
-static uiBlock *action_channelmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_channelmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_channelmenu, NULL);
-
- uiDefIconTextBlockBut(block, action_channelmenu_groupmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Grouping", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_channelmenu_posmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Ordering", 0, yco-=20, 120, 20, "");
-
- uiDefIconTextBlockBut(block, action_channelmenu_settingsmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Settings", 0, yco-=20, 120, 20, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Delete|X", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_DELETE, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Toggle Show Hierachy|~", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_EXPANDALL, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Group-Hidden Channels|Shift ~", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_SHOWACHANS, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Expand One Level|Ctrl NumPad+", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_OPENLEVELS, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Collapse One Level|Ctrl NumPad-", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_CLOSELEVELS, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
-}
-
-/* Grease Pencil --------------------------- */
-
-/* Uses channelmenu functions */
-static uiBlock *action_gplayermenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_gplayermenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_channelmenu, NULL);
-
- uiDefIconTextBlockBut(block, action_channelmenu_settingsmenu,
- NULL, ICON_RIGHTARROW_THIN,
- "Settings", 0, yco-=20, 120, 20, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Delete|X", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_CHANNELS_DELETE, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
-}
-
-/* Select menu --------------------------- */
-
-static void do_selectmenu_columnmenu(bContext *C, void *arg, int event)
-{
- switch (event) {
- case ACTMENU_SEL_COLUMN_MARKERSBETWEEN:
- //markers_selectkeys_between();
- break;
- case ACTMENU_SEL_COLUMN_KEYS:
- //column_select_action_keys(1);
- break;
- case ACTMENU_SEL_COLUMN_MARKERSCOLUMN:
- //column_select_action_keys(2);
- break;
- case ACTMENU_SEL_COLUMN_CFRA:
- //column_select_action_keys(3);
- break;
- }
-}
-
-static uiBlock *action_selectmenu_columnmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_selectmenu_columnmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_selectmenu_columnmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "On Selected Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_COLUMN_KEYS, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "On Current Frame|Ctrl K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_COLUMN_CFRA, "");
-
- if (SACTION_HASMARKERS) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "On Selected Markers|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_COLUMN_MARKERSCOLUMN, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Between Selected Markers|Alt K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_COLUMN_MARKERSBETWEEN, "");
- }
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
-
- return block;
-}
-
-static void do_selectmenu(bContext *C, void *arg, int event)
-{
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- //Key *key;
-
- if (saction == NULL) return;
-
- //key = get_action_mesh_key();
-
- switch(event)
- {
- case ACTMENU_SEL_BORDER: /* Border Select */
- //borderselect_action();
- break;
-
- case ACTMENU_SEL_BORDERC: /* Border Select */
- //borderselect_actionchannels();
- break;
-
- case ACTMENU_SEL_BORDERM: /* Border Select */
- //borderselect_markers();
- break;
-
- case ACTMENU_SEL_ALL_KEYS: /* Select/Deselect All Keys */
- /*deselect_action_keys(1, 1);
- BIF_undo_push("(De)Select Keys");
- allqueue(REDRAWACTION, 0);
- allqueue(REDRAWNLA, 0);
- allqueue(REDRAWIPO, 0);*/
- break;
-
- case ACTMENU_SEL_ALL_CHAN: /* Select/Deselect All Channels */
- /*deselect_action_channels(1);
- BIF_undo_push("(De)Select Action Channels");
- allqueue(REDRAWVIEW3D, 0);
- allqueue(REDRAWACTION, 0);
- allqueue(REDRAWNLA, 0);
- allqueue(REDRAWIPO, 0);*/
- break;
-
- case ACTMENU_SEL_ALL_MARKERS: /* select/deselect all markers */
- /*deselect_markers(1, 0);
- BIF_undo_push("(De)Select Markers");
- allqueue(REDRAWMARKER, 0);*/
- break;
-
- case ACTMENU_SEL_INVERSE_KEYS: /* invert selection status of keys */
- /*deselect_action_keys(0, 2);
- BIF_undo_push("Inverse Keys");
- allqueue(REDRAWACTION, 0);
- allqueue(REDRAWNLA, 0);
- allqueue(REDRAWIPO, 0);*/
- break;
-
- case ACTMENU_SEL_INVERSE_CHANNELS: /* invert selection status of channels */
- /*deselect_action_channels(2);
- BIF_undo_push("Inverse Action Channels");
- allqueue(REDRAWVIEW3D, 0);
- allqueue(REDRAWACTION, 0);
- allqueue(REDRAWNLA, 0);
- allqueue(REDRAWIPO, 0);*/
- break;
-
- case ACTMENU_SEL_INVERSE_MARKERS: /* invert selection of markers */
- /*deselect_markers(0, 2);
- BIF_undo_push("Inverse Action Channels");
- allqueue(REDRAWMARKER, 0);*/
- break;
-
- case ACTMENU_SEL_LEFTKEYS:
- //selectkeys_leftright(1, SELECT_REPLACE);
- break;
-
- case ACTMENU_SEL_RIGHTKEYS:
- //selectkeys_leftright(0, SELECT_REPLACE);
- break;
- }
-}
-
-static uiBlock *action_selectmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "action_selectmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_selectmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Border Select Keys|B", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_BORDER, "");
- if (SACTION_HASMARKERS) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Border Select Markers|Ctrl B", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_BORDERM, "");
- }
- if (saction->mode != SACTCONT_SHAPEKEY) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Border Select Channels|B", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_BORDERC, "");
- }
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Select/Deselect All Keys|A", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_ALL_KEYS, "");
- if (SACTION_HASMARKERS) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Select/Deselect All Markers|Ctrl A", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_ALL_MARKERS, "");
- }
- if (saction->mode != SACTCONT_SHAPEKEY) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Select/Deselect All Channels|A", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_ALL_CHAN, "");
- }
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Inverse Keys|Ctrl I", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_INVERSE_KEYS, "");
- if (SACTION_HASMARKERS) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Inverse Markers|Ctrl Shift I", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_INVERSE_MARKERS, "");
- }
- if (saction->mode != SACTCONT_SHAPEKEY) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Inverse All Channels|Ctrl I", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_INVERSE_CHANNELS, "");
- }
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Back In Time|Alt RMB", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_LEFTKEYS, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Ahead In Time|Alt RMB", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_SEL_RIGHTKEYS, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, action_selectmenu_columnmenu,
- NULL, ICON_RIGHTARROW_THIN, "Column Select Keys", 0, yco-=20, 120, 20, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
+ 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);
}
-/* View menu --------------------------- */
-
-static void do_viewmenu(bContext *C, void *arg, int event)
+static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- switch(event) {
- case ACTMENU_VIEW_CENTERVIEW: /* Center View to Current Frame */
- //center_currframe();
- break;
- case ACTMENU_VIEW_AUTOUPDATE: /* Update Automatically */
- /*if (BTST(G.saction->lock, 0))
- G.saction->lock = BCLR(G.saction->lock, 0);
- else
- G.saction->lock = BSET(G.saction->lock, 0);*/
- break;
- case ACTMENU_VIEW_PLAY3D: /* Play Back Animation */
- //play_anim(0);
- break;
- case ACTMENU_VIEW_PLAYALL: /* Play Back Animation in All */
- //play_anim(1);
- break;
- case ACTMENU_VIEW_ALL: /* View All */
- //do_action_buttons(B_ACTHOME);
- break;
- case ACTMENU_VIEW_LOCK:
- /*G.v2d->flag ^= V2D_VIEWLOCK;
- if (G.v2d->flag & V2D_VIEWLOCK)
- view2d_do_locks(curarea, 0);*/
- break;
- case ACTMENU_VIEW_SLIDERS: /* Show sliders (when applicable) */
- //G.saction->flag ^= SACTION_SLIDERS;
- break;
- case ACTMENU_VIEW_MAXIMIZE: /* Maximize Window */
- /* using event B_FULL */
- break;
- case ACTMENU_VIEW_NEXTMARKER: /* Jump to next marker */
- //nextprev_marker(1);
- break;
- case ACTMENU_VIEW_PREVMARKER: /* Jump to previous marker */
- //nextprev_marker(-1);
- break;
- case ACTMENU_VIEW_TIME: /* switch between frames and seconds display */
- //G.saction->flag ^= SACTION_DRAWTIME;
- break;
- case ACTMENU_VIEW_NOHIDE: /* Show hidden channels */
- //G.saction->flag ^= SACTION_NOHIDE;
- break;
- case ACTMENU_VIEW_NEXTKEYFRAME: /* Jump to next keyframe */
- //nextprev_action_keyframe(1);
- break;
- case ACTMENU_VIEW_PREVKEYFRAME: /* Jump to previous keyframe */
- //nextprev_action_keyframe(-1);
- break;
- case ACTMENU_VIEW_TRANSDELDUPS: /* Don't delete duplicate/overlapping keyframes after transform */
- //G.saction->flag ^= SACTION_NOTRANSKEYCULL;
- break;
- case ACTMENU_VIEW_HORIZOPTIMISE: /* Include keyframes not in view (horizontally) when preparing to draw */
- //G.saction->flag ^= SACTION_HORIZOPTIMISEON;
- break;
- case ACTMENU_VIEW_GCOLORS: /* Draw grouped-action channels using its group's color */
- //G.saction->flag ^= SACTION_NODRAWGCOLORS;
- break;
- case ACTMENU_VIEW_PREVRANGESET: /* Set preview range */
- //anim_previewrange_set();
- break;
- case ACTMENU_VIEW_PREVRANGECLEAR: /* Clear preview range */
- //anim_previewrange_clear();
- break;
- case ACTMENU_VIEW_PREVRANGEAUTO: /* Auto preview-range length */
- //action_previewrange_set(G.saction->action);
- break;
- }
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
-static uiBlock *action_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void act_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
- View2D *v2d= UI_view2d_fromcontext_rwin(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemMenuF(layout, "Transform", 0, act_edit_transformmenu);
+ uiItemMenuF(layout, "Snap", 0, act_edit_snapmenu);
+ uiItemMenuF(layout, "Mirror", 0, act_edit_mirrormenu);
- block= uiBeginBlock(C, ar, "viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_viewmenu, NULL);
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Center View to Current Frame|C", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_CENTERVIEW, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- if (saction->flag & SACTION_DRAWTIME) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Frames|Ctrl T", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_TIME, "");
- }
- else {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Seconds|Ctrl T", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_TIME, "");
- }
+ uiItemO(layout, NULL, 0, "ACT_OT_insert_keyframe");
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
- if (saction->mode == SACTCONT_GPENCIL) {
- // this option may get removed in future
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_HORIZOPTIMISEON)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Cull Out-of-View Keys (Time)|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_HORIZOPTIMISE, "");
- }
- else {
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_SLIDERS)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Show Sliders|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_SLIDERS, "");
-
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_NOHIDE)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Show Hidden Channels|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_NOHIDE, "");
-
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_NODRAWGCOLORS)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "Use Group Colors|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_GCOLORS, "");
-
- // this option may get removed in future
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_HORIZOPTIMISEON)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Cull Out-of-View Keys (Time)|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_HORIZOPTIMISE, "");
-
- uiDefIconTextBut(block, BUTM, 1, (saction->flag & SACTION_NOTRANSKEYCULL)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "AutoMerge Keyframes|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_TRANSDELDUPS, "");
- }
+ uiItemO(layout, NULL, 0, "ACT_OT_duplicate");
+ uiItemO(layout, NULL, 0, "ACT_OT_delete");
-
- 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,
- ACTMENU_VIEW_LOCK, "");
-
- /*uiDefIconTextBut(block, BUTM, 1, BTST(saction->lock, 0)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Update Automatically|", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_AUTOUPDATE, "");*/
-
- 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, ACTMENU_VIEW_NEXTMARKER, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Jump To Prev Marker|PageDown", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_VIEW_PREVMARKER, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Jump To Next Keyframe|Ctrl PageUp", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_VIEW_NEXTKEYFRAME, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Jump To Prev Keyframe|Ctrl PageDown", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_VIEW_PREVKEYFRAME, "");
-
- 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, 1,
- ACTMENU_VIEW_PLAY3D, "");
- //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- // "Play Back Animation in 3D View|Alt Shift A", 0, yco-=20,
- // menuwidth, 19, NULL, 0.0, 0.0, 1,
- // ACTMENU_VIEW_PLAYALL, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Set Preview Range|Ctrl P", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_PREVRANGESET, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Clear Preview Range|Alt P", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_PREVRANGECLEAR, "");
-
- if ((saction->mode == SACTCONT_ACTION) && (saction->action)) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Preview Range from Action Length|Ctrl Alt P", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_PREVRANGEAUTO, "");
- }
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "View All|Home", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1,
- ACTMENU_VIEW_ALL, "");
+ uiItemMenuF(layout, "Handle Type", 0, act_edit_handlesmenu);
+ uiItemMenuF(layout, "Interpolation Mode", 0, act_edit_ipomenu);
+ uiItemMenuF(layout, "Extrapolation Mode", 0, act_edit_expomenu);
-/* 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,
- ACTMENU_VIEW_MAXIMIZE, "");
- else
- uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1,
- "Tile Window|Ctrl DownArrow", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
- ACTMENU_VIEW_MAXIMIZE, "");
-*/
+ uiItemS(layout);
- if (curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemO(layout, NULL, 0, "ACT_OT_clean");
+ uiItemO(layout, NULL, 0, "ACT_OT_sample");
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
+ uiItemS(layout);
- return block;
+ uiItemO(layout, NULL, 0, "ACT_OT_copy");
+ uiItemO(layout, NULL, 0, "ACT_OT_paste");
}
/* ************************ header area region *********************** */
static void do_action_buttons(bContext *C, void *arg, int event)
{
- switch(event) {
+ switch (event) {
case B_REDR:
ED_area_tag_redraw(CTX_wm_area(C));
break;
-
- case B_ACTCOPYKEYS:
- WM_operator_name_call(C, "ACT_OT_keyframes_copy", WM_OP_EXEC_REGION_WIN, NULL);
- break;
- case B_ACTPASTEKEYS:
- WM_operator_name_call(C, "ACT_OT_keyframes_paste", WM_OP_EXEC_REGION_WIN, NULL);
- break;
}
}
@@ -1622,45 +314,38 @@ void action_header_buttons(const bContext *C, ARegion *ar)
if ((sa->flag & HEADER_NO_PULLDOWN)==0) {
xmax= GetButStringLength("View");
- uiDefPulldownBut(block, action_viewmenu, CTX_wm_area(C),
- "View", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, act_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
xco+= xmax;
xmax= GetButStringLength("Select");
- uiDefPulldownBut(block, action_selectmenu, CTX_wm_area(C),
- "Select", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, act_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, "");
xco+= xmax;
if ( (saction->mode == SACTCONT_DOPESHEET) ||
((saction->action) && (saction->mode==SACTCONT_ACTION)) )
{
xmax= GetButStringLength("Channel");
- uiDefPulldownBut(block, action_channelmenu, CTX_wm_area(C),
- "Channel", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, act_channelmenu, NULL, "Channel", xco, yco, xmax-3, 20, "");
xco+= xmax;
}
else if (saction->mode==SACTCONT_GPENCIL) {
xmax= GetButStringLength("Channel");
- uiDefPulldownBut(block, action_gplayermenu, CTX_wm_area(C),
- "Channel", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, act_gplayermenu, NULL, "Channel", xco, yco, xmax-3, 20, "");
xco+= xmax;
}
- xmax= GetButStringLength("Marker");
- uiDefPulldownBut(block, action_markermenu, CTX_wm_area(C),
- "Marker", xco, yco-2, xmax-3, 24, "");
- xco+= xmax;
+ //xmax= GetButStringLength("Marker");
+ //uiDefMenuBut(block, act_markermenu, NULL, "Marker", xco, yco, xmax-3, 20, "");
+ //xco+= xmax;
if (saction->mode == SACTCONT_GPENCIL) {
- xmax= GetButStringLength("Frame");
- uiDefPulldownBut(block, action_framemenu, CTX_wm_area(C),
- "Frame", xco, yco-2, xmax-3, 24, "");
- xco+= xmax;
+ //xmax= GetButStringLength("Frame");
+ //uiDefMenuBut(block, act_selectmenu, NULL, "Frame", xco, yco, xmax-3, 20, "");
+ //xco+= xmax;
}
else {
xmax= GetButStringLength("Key");
- uiDefPulldownBut(block, action_keymenu, CTX_wm_area(C),
- "Key", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, act_editmenu, NULL, "Key", xco, yco, xmax-3, 20, "");
xco+= xmax;
}
}
@@ -1712,8 +397,9 @@ void action_header_buttons(const bContext *C, ARegion *ar)
/* COPY PASTE */
uiBlockBeginAlign(block);
- uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYDOWN, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer");
- uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer");
+ uiDefIconButO(block, BUT, "ACT_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco,yco,XIC,YIC, "Copies the selected keyframes to the buffer.");
+ xco += XIC;
+ uiDefIconButO(block, BUT, "ACT_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco,yco,XIC,YIC, "Pastes the keyframes from the buffer into the selected channels.");
uiBlockEndAlign(block);
xco += (XIC + 8);
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index b4d2528b3b4..26655892176 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -53,10 +53,10 @@ void action_header_buttons(const struct bContext *C, struct ARegion *ar);
/* ***************************************** */
/* action_select.c */
-void ACT_OT_keyframes_select_all_toggle(struct wmOperatorType *ot);
-void ACT_OT_keyframes_select_border(struct wmOperatorType *ot);
-void ACT_OT_keyframes_select_column(struct wmOperatorType *ot);
-void ACT_OT_keyframes_clickselect(struct wmOperatorType *ot);
+void ACT_OT_select_all_toggle(struct wmOperatorType *ot);
+void ACT_OT_select_border(struct wmOperatorType *ot);
+void ACT_OT_select_column(struct wmOperatorType *ot);
+void ACT_OT_clickselect(struct wmOperatorType *ot);
/* defines for left-right select tool */
enum {
@@ -80,22 +80,23 @@ enum {
void ACT_OT_previewrange_set(struct wmOperatorType *ot);
void ACT_OT_view_all(struct wmOperatorType *ot);
-void ACT_OT_keyframes_copy(struct wmOperatorType *ot);
-void ACT_OT_keyframes_paste(struct wmOperatorType *ot);
+void ACT_OT_copy(struct wmOperatorType *ot);
+void ACT_OT_paste(struct wmOperatorType *ot);
-void ACT_OT_keyframes_insert(struct wmOperatorType *ot);
-void ACT_OT_keyframes_duplicate(struct wmOperatorType *ot);
-void ACT_OT_keyframes_delete(struct wmOperatorType *ot);
-void ACT_OT_keyframes_clean(struct wmOperatorType *ot);
-void ACT_OT_keyframes_sample(struct wmOperatorType *ot);
+void ACT_OT_insert_keyframe(struct wmOperatorType *ot);
+void ACT_OT_duplicate(struct wmOperatorType *ot);
+void ACT_OT_delete(struct wmOperatorType *ot);
+void ACT_OT_clean(struct wmOperatorType *ot);
+void ACT_OT_sample(struct wmOperatorType *ot);
-void ACT_OT_keyframes_handle_type_set(struct wmOperatorType *ot);
-void ACT_OT_keyframes_interpolation_type(struct wmOperatorType *ot);
-void ACT_OT_keyframes_extrapolation_type_set(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);
-void ACT_OT_keyframes_cfrasnap(struct wmOperatorType *ot);
-void ACT_OT_keyframes_snap(struct wmOperatorType *ot);
-void ACT_OT_keyframes_mirror(struct wmOperatorType *ot);
+void ACT_OT_frame_jump(struct wmOperatorType *ot);
+
+void ACT_OT_snap(struct wmOperatorType *ot);
+void ACT_OT_mirror(struct wmOperatorType *ot);
/* defines for snap keyframes
* NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 49a0befdbe2..d1c9e1deac3 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -46,7 +46,7 @@
#include "UI_interface.h"
#include "UI_view2d.h"
-#include "BIF_transform.h"
+#include "ED_transform.h"
#include "action_intern.h"
@@ -63,25 +63,25 @@ void action_operatortypes(void)
{
/* keyframes */
/* selection */
- WM_operatortype_append(ACT_OT_keyframes_clickselect);
- WM_operatortype_append(ACT_OT_keyframes_select_all_toggle);
- WM_operatortype_append(ACT_OT_keyframes_select_border);
- WM_operatortype_append(ACT_OT_keyframes_select_column);
+ WM_operatortype_append(ACT_OT_clickselect);
+ WM_operatortype_append(ACT_OT_select_all_toggle);
+ WM_operatortype_append(ACT_OT_select_border);
+ WM_operatortype_append(ACT_OT_select_column);
/* editing */
- WM_operatortype_append(ACT_OT_keyframes_snap);
- WM_operatortype_append(ACT_OT_keyframes_mirror);
- WM_operatortype_append(ACT_OT_keyframes_cfrasnap);
- WM_operatortype_append(ACT_OT_keyframes_handle_type_set);
- WM_operatortype_append(ACT_OT_keyframes_interpolation_type);
- WM_operatortype_append(ACT_OT_keyframes_extrapolation_type_set);
- WM_operatortype_append(ACT_OT_keyframes_sample);
- WM_operatortype_append(ACT_OT_keyframes_clean);
- WM_operatortype_append(ACT_OT_keyframes_delete);
- WM_operatortype_append(ACT_OT_keyframes_duplicate);
- WM_operatortype_append(ACT_OT_keyframes_insert);
- WM_operatortype_append(ACT_OT_keyframes_copy);
- WM_operatortype_append(ACT_OT_keyframes_paste);
+ WM_operatortype_append(ACT_OT_snap);
+ WM_operatortype_append(ACT_OT_mirror);
+ WM_operatortype_append(ACT_OT_frame_jump);
+ 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_sample);
+ WM_operatortype_append(ACT_OT_clean);
+ WM_operatortype_append(ACT_OT_delete);
+ WM_operatortype_append(ACT_OT_duplicate);
+ WM_operatortype_append(ACT_OT_insert_keyframe);
+ WM_operatortype_append(ACT_OT_copy);
+ WM_operatortype_append(ACT_OT_paste);
WM_operatortype_append(ACT_OT_previewrange_set);
WM_operatortype_append(ACT_OT_view_all);
@@ -95,57 +95,58 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
/* action_select.c - selection tools */
/* click-select */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
- kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "left_right", ACTKEYS_LRSEL_TEST);
/* deselect all */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+ WM_keymap_add_item(keymap, "ACT_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
/* borderselect */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
+ WM_keymap_add_item(keymap, "ACT_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
/* column select */
- RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
- RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_CFRA);
- RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
- RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
+ RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_CFRA);
+ RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
/* action_edit.c */
/* snap - current frame to selected keys */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_cfrasnap", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ // TODO: maybe since this is called jump, we're better to have it on <something>-J?
+ WM_keymap_add_item(keymap, "ACT_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* menu + single-step transform */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
/* menu + set setting */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_handle_type_set", HKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_extrapolation_type_set", EKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
/* destructive */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_clean", OKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_clean", OKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_insert", IKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_insert_keyframe", IKEY, KM_PRESS, 0, 0);
/* copy/paste */
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframes_paste", VKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
/* auto-set range */
WM_keymap_add_item(keymap, "ACT_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index d4782418be7..ef1b392815d 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1,5 +1,5 @@
/**
- * $Id: editaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -64,6 +64,7 @@
#include "BKE_fcurve.h"
#include "BKE_key.h"
#include "BKE_material.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_utildefines.h"
@@ -173,21 +174,22 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op)
else
deselect_action_keys(&ac, 1, SELECT_ADD);
- /* set notifier that things have changed */
- ED_area_tag_redraw(CTX_wm_area(C)); // FIXME... should be updating 'keyframes' data context or so instead!
+ /* set notifier that keyframe selection have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_select_all_toggle (wmOperatorType *ot)
+void ACT_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "ACT_OT_keyframes_select_all_toggle";
+ ot->idname= "ACT_OT_select_all_toggle";
+ ot->description= "Toggle selection of all keyframes.";
/* api callbacks */
ot->exec= actkeys_deselectall_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -222,7 +224,8 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
BeztEditFunc ok_cb, select_cb;
View2D *v2d= &ac->ar->v2d;
rctf rectf;
- float ymin=0, ymax=(float)(-ACHANNEL_HEIGHT);
+ //float ymin=0, ymax=(float)(-ACHANNEL_HEIGHT);
+ float ymin=0, ymax=(float)(-ACHANNEL_HEIGHT_HALF);
/* convert mouse coordinates to frame ranges and channel coordinates corrected for view pan/zoom */
UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin);
@@ -245,7 +248,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
/* loop over data, doing border select */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* get new vertical minimum extent of channel */
ymin= ymax - ACHANNEL_STEP;
@@ -253,9 +256,9 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
/* set horizontal range (if applicable) */
if (ELEM(mode, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_ALLKEYS)) {
/* if channel is mapped in NLA, apply correction */
- if (nob) {
- bed.f1= get_action_frame(nob, rectf.xmin);
- bed.f2= get_action_frame(nob, rectf.xmax);
+ if (adt) {
+ bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP);
+ bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP);
}
else {
bed.f1= rectf.xmin;
@@ -335,21 +338,25 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
/* apply borderselect action */
borderselect_action(&ac, rect, mode, selectmode);
+ /* set notifier that keyframe selection have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_select_border(wmOperatorType *ot)
+void ACT_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
- ot->idname= "ACT_OT_keyframes_select_border";
+ ot->idname= "ACT_OT_select_border";
+ ot->description= "Select all keyframes within the specified region.";
/* api callbacks */
ot->invoke= WM_border_select_invoke;
ot->exec= actkeys_borderselect_exec;
ot->modal= WM_border_select_modal;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -374,11 +381,11 @@ void ACT_OT_keyframes_select_border(wmOperatorType *ot)
/* defines for column-select mode */
static EnumPropertyItem prop_column_select_types[] = {
- {ACTKEYS_COLUMNSEL_KEYS, "KEYS", "On Selected Keyframes", ""},
- {ACTKEYS_COLUMNSEL_CFRA, "CFRA", "On Current Frame", ""},
- {ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", "On Selected Markers", ""},
- {ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", "Between Min/Max Selected Markers", ""},
- {0, NULL, NULL, NULL}
+ {ACTKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""},
+ {ACTKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""},
+ {ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""},
+ {ACTKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* ------------------- */
@@ -413,12 +420,12 @@ static void markers_selectkeys_between (bAnimContext *ac)
/* select keys in-between */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else {
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
@@ -495,15 +502,15 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the BeztEditData->list)
* - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
for (ce= bed.list.first; ce; ce= ce->next) {
/* set frame for validation callback to refer to */
- if (nob)
- bed.f1= get_action_frame(nob, ce->cfra);
+ if (adt)
+ bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
else
bed.f1= ce->cfra;
@@ -549,21 +556,22 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
else
columnselect_action_keys(&ac, mode);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_SELECT);
+ /* set notifier that keyframe selection have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
return OPERATOR_FINISHED;
}
-void ACT_OT_keyframes_select_column (wmOperatorType *ot)
+void ACT_OT_select_column (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "ACT_OT_keyframes_select_column";
+ ot->idname= "ACT_OT_select_column";
+ ot->description= "Select all keyframes on the specified frame(s).";
/* api callbacks */
ot->exec= actkeys_columnselect_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -584,11 +592,11 @@ void ACT_OT_keyframes_select_column (wmOperatorType *ot)
/* defines for left-right select tool */
static EnumPropertyItem prop_actkeys_leftright_select_types[] = {
- {ACTKEYS_LRSEL_TEST, "CHECK", "Check if Select Left or Right", ""},
- {ACTKEYS_LRSEL_NONE, "OFF", "Don't select", ""},
- {ACTKEYS_LRSEL_LEFT, "LEFT", "Before current frame", ""},
- {ACTKEYS_LRSEL_RIGHT, "RIGHT", "After current frame", ""},
- {0, NULL, NULL, NULL}
+ {ACTKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
+ {ACTKEYS_LRSEL_NONE, "OFF", 0, "Don't select", ""},
+ {ACTKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
+ {ACTKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* sensitivity factor for frame-selections */
@@ -641,7 +649,7 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short
memset(&bed, 0, sizeof(BeztEditFunc));
if (leftright == ACTKEYS_LRSEL_LEFT) {
- bed.f1 = -MAXFRAMEF;
+ bed.f1 = MINAFRAMEF;
bed.f2 = (float)(CFRA + FRAME_CLICK_THRESH);
}
else {
@@ -658,12 +666,12 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short
/* select keys on the side where most data occurs */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
//else if (ale->type == ANIMTYPE_GPLAYER)
// borderselect_gplayer_frames(ale->data, min, max, SELECT_ADD);
@@ -702,11 +710,11 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* set frame for validation callback to refer to */
- if (nob)
- bed.f1= get_action_frame(nob, selx);
+ if (adt)
+ bed.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
else
bed.f1= selx;
@@ -742,12 +750,16 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
int filter;
View2D *v2d= &ac->ar->v2d;
+ bDopeSheet *ads = NULL;
int channel_index;
short found = 0;
float selx = 0.0f;
float x, y;
rctf rectf;
+ /* get dopesheet info */
+ if (ac->datatype == ANIMCONT_DOPESHEET)
+ ads= ac->data;
/* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
@@ -766,51 +778,41 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
if (ale == NULL) {
/* channel not found */
printf("Error: animation channel (index = %d) not found in mouse_action_keys() \n", channel_index);
+ BLI_freelistN(&anim_data);
return;
}
else {
/* found match - must return here... */
- Object *nob= ANIM_nla_mapping_get(ac, ale);
- ActKeysInc *aki= init_aki_data(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
ActKeyColumn *ak;
- float xmin, xmax;
-
- /* apply NLA-scaling correction? */
- if (nob) {
- xmin= get_action_frame(nob, rectf.xmin);
- xmax= get_action_frame(nob, rectf.xmax);
- }
- else {
- xmin= rectf.xmin;
- xmax= rectf.xmax;
- }
/* make list of keyframes */
+ // TODO: it would be great if we didn't have to apply this to all the keyframes to do this...
if (ale->key_data) {
switch (ale->datatype) {
case ALE_OB:
{
Object *ob= (Object *)ale->key_data;
- ob_to_keylist(ob, &anim_keys, NULL, aki);
+ ob_to_keylist(ads, ob, &anim_keys, NULL);
}
break;
case ALE_ACT:
{
bAction *act= (bAction *)ale->key_data;
- action_to_keylist(act, &anim_keys, NULL, aki);
+ action_to_keylist(adt, act, &anim_keys, NULL);
}
break;
case ALE_FCURVE:
{
FCurve *fcu= (FCurve *)ale->key_data;
- fcurve_to_keylist(fcu, &anim_keys, NULL, aki);
+ fcurve_to_keylist(adt, fcu, &anim_keys, NULL);
}
break;
}
}
else if (ale->type == ANIMTYPE_GROUP) {
bActionGroup *agrp= (bActionGroup *)ale->data;
- agroup_to_keylist(agrp, &anim_keys, NULL, aki);
+ agroup_to_keylist(adt, agrp, &anim_keys, NULL);
}
else if (ale->type == ANIMTYPE_GPDATABLOCK) {
/* cleanup */
@@ -820,13 +822,17 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
}
else if (ale->type == ANIMTYPE_GPLAYER) {
bGPDlayer *gpl= (bGPDlayer *)ale->data;
- gpl_to_keylist(gpl, &anim_keys, NULL, aki);
+ gpl_to_keylist(ads, gpl, &anim_keys, NULL);
}
/* loop through keyframes, finding one that was clicked on */
for (ak= anim_keys.first; ak; ak= ak->next) {
- if (IN_RANGE(ak->cfra, xmin, xmax)) {
- selx= ak->cfra;
+ if (IN_RANGE(ak->cfra, rectf.xmin, rectf.xmax)) {
+ /* set the frame to use, and apply inverse-correction for NLA-mapping
+ * so that the frame will get selected by the selection functiosn without
+ * requiring to map each frame once again...
+ */
+ selx= BKE_nla_tweakedit_remap(adt, ak->cfra, NLATIME_CONVERT_UNMAP);
found= 1;
break;
}
@@ -857,17 +863,19 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
/* Highlight Action-Group or F-Curve? */
- if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= ale->data;
-
- agrp->flag |= AGRP_SELECTED;
- ANIM_set_active_channel(ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
- }
- else if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= ale->data;
-
- fcu->flag |= FCURVE_SELECTED;
- ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ if (ale && ale->data) {
+ if (ale->type == ANIMTYPE_GROUP) {
+ bActionGroup *agrp= ale->data;
+
+ agrp->flag |= AGRP_SELECTED;
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
+ }
+ else if (ale->type == ANIMTYPE_FCURVE) {
+ FCurve *fcu= ale->data;
+
+ fcu->flag |= FCURVE_SELECTED;
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ }
}
}
else if (ac->datatype == ANIMCONT_GPENCIL) {
@@ -881,18 +889,20 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
/* only select keyframes if we clicked on a valid channel and hit something */
if (ale) {
- /* apply selection to keyframes */
- if (/*gpl*/0) {
- /* grease pencil */
- //select_gpencil_frame(gpl, (int)selx, selectmode);
- }
- else if (column) {
- /* select all keyframes in the same frame as the one we hit on the active channel */
- actkeys_mselect_column(ac, select_mode, selx);
- }
- else {
- /* select the nominated keyframe on the given frame */
- actkeys_mselect_single(ac, ale, select_mode, selx);
+ if (found) {
+ /* apply selection to keyframes */
+ if (/*gpl*/0) {
+ /* grease pencil */
+ //select_gpencil_frame(gpl, (int)selx, selectmode);
+ }
+ else if (column) {
+ /* select all keyframes in the same frame as the one we hit on the active channel */
+ actkeys_mselect_column(ac, select_mode, selx);
+ }
+ else {
+ /* select the nominated keyframe on the given frame */
+ actkeys_mselect_single(ac, ale, select_mode, selx);
+ }
}
/* free this channel */
@@ -950,22 +960,23 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
mouse_action_keys(&ac, mval, selectmode, column);
}
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
+ /* set notifier that keyframe selection (and channels too) have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT|ND_ANIMCHAN_SELECT, NULL);
/* for tweak grab to work */
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
}
-void ACT_OT_keyframes_clickselect (wmOperatorType *ot)
+void ACT_OT_clickselect (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mouse Select Keys";
- ot->idname= "ACT_OT_keyframes_clickselect";
+ ot->idname= "ACT_OT_clickselect";
+ ot->description= "Select keyframes by clicking on them.";
/* api callbacks - absolutely no exec() this yet... */
ot->invoke= actkeys_clickselect_invoke;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_action_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index b4e43c29c3d..0b06499693c 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -288,6 +288,9 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
case NC_SCENE:
switch(wmn->data) {
case ND_OB_ACTIVE:
@@ -314,6 +317,9 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
case NC_SCENE:
switch(wmn->data) {
case ND_OB_ACTIVE:
@@ -344,6 +350,9 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
{
/* context changes */
switch (wmn->category) {
+ case NC_ANIMATION:
+ ED_area_tag_refresh(sa);
+ break;
case NC_SCENE:
/*switch (wmn->data) {
case ND_OB_ACTIVE:
diff --git a/source/blender/editors/space_api/Makefile b/source/blender/editors/space_api/Makefile
index 46f926afbc9..474fbe89053 100644
--- a/source/blender/editors/space_api/Makefile
+++ b/source/blender/editors/space_api/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 9a4d1f329e8..c8df9bb9741 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -42,12 +42,13 @@
#include "ED_anim_api.h"
#include "ED_armature.h"
#include "ED_curve.h"
-#include "ED_mesh.h"
#include "ED_markers.h"
+#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_particle.h"
-#include "ED_sculpt.h"
+#include "ED_physics.h"
#include "ED_screen.h"
+#include "ED_sculpt.h"
#include "ED_space_api.h"
#include "ED_uvedit.h"
@@ -73,6 +74,7 @@ void ED_spacetypes_init(void)
ED_spacetype_script();
ED_spacetype_text();
ED_spacetype_sequencer();
+ ED_spacetype_logic();
// ...
/* register operator types for screen and all spaces */
@@ -87,7 +89,9 @@ void ED_spacetypes_init(void)
ED_operatortypes_particle();
ED_operatortypes_curve();
ED_operatortypes_armature();
- ED_marker_operatortypes();
+ ED_operatortypes_marker();
+ ED_operatortypes_pointcache();
+ ED_operatortypes_fluid();
ui_view2d_operatortypes();
diff --git a/source/blender/editors/space_buttons/Makefile b/source/blender/editors/space_buttons/Makefile
index b96d1cc5495..a4894ede06b 100644
--- a/source/blender/editors/space_buttons/Makefile
+++ b/source/blender/editors/space_buttons/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript
index 541da52f7f9..71530d6f92d 100644
--- a/source/blender/editors/space_buttons/SConscript
+++ b/source/blender/editors/space_buttons/SConscript
@@ -5,14 +5,11 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../makesrna ../../render/extern/include'
+incs += ' ../../makesrna ../../render/extern/include ../../bmesh'
defs = []
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
- if env['WITH_BF_SOLID']:
- defs.append('USE_SUMO_SOLID')
-
env.BlenderLib ( 'bf_editors_space_buttons', sources, Split(incs), defs, libtype=['core'], priority=[120] )
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 255bee1bf5a..24d5fcc648a 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -54,6 +54,7 @@
#include "RNA_access.h"
+#include "ED_armature.h"
#include "ED_screen.h"
#include "UI_interface.h"
@@ -249,16 +250,29 @@ static int buttons_context_path_bone(ButsContextPath *path)
{
bArmature *arm;
Bone *bone;
+ EditBone *edbo;
/* if we have an armature, get the active bone */
if(buttons_context_path_data(path, OB_ARMATURE)) {
arm= path->ptr[path->len-1].data;
- bone= find_active_bone(arm->bonebase.first);
- if(bone) {
- RNA_pointer_create(&arm->id, &RNA_Bone, bone, &path->ptr[path->len]);
- path->len++;
- return 1;
+ if(arm->edbo) {
+ for(edbo=arm->edbo->first; edbo; edbo=edbo->next) {
+ if(edbo->flag & BONE_ACTIVE) {
+ RNA_pointer_create(&arm->id, &RNA_EditBone, edbo, &path->ptr[path->len]);
+ path->len++;
+ return 1;
+ }
+ }
+ }
+ else {
+ bone= find_active_bone(arm->bonebase.first);
+
+ if(bone) {
+ RNA_pointer_create(&arm->id, &RNA_Bone, bone, &path->ptr[path->len]);
+ path->len++;
+ return 1;
+ }
}
}
@@ -478,8 +492,17 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 0;
/* here we handle context, getting data from precomputed path */
-
- if(CTX_data_equals(member, "world")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {
+ "world", "object", "meshe", "armature", "lattice", "curve",
+ "meta_ball", "lamp", "camera", "material", "material_slot",
+ "texture", "texture_slot", "bone", "edit_bone", "particle_system",
+ "cloth", "soft_body", "fluid", "collision", NULL};
+
+ CTX_data_dir_set(result, dir);
+ return 1;
+ }
+ else if(CTX_data_equals(member, "world")) {
set_pointer_type(path, result, &RNA_World);
return 1;
}
@@ -529,7 +552,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
if(ptr) {
Object *ob= ptr->data;
- if(ob && ob->type && (ob->type<OB_LAMP))
+ if(ob && ob->type && (ob->type<OB_LAMP) && ob->totcol)
CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, ob->mat+ob->actcol-1);
}
@@ -569,20 +592,31 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
set_pointer_type(path, result, &RNA_Bone);
return 1;
}
+ else if(CTX_data_equals(member, "edit_bone")) {
+ set_pointer_type(path, result, &RNA_EditBone);
+ return 1;
+ }
else if(CTX_data_equals(member, "particle_system")) {
set_pointer_type(path, result, &RNA_ParticleSystem);
return 1;
}
else if(CTX_data_equals(member, "cloth")) {
- set_pointer_type(path, result, &RNA_ClothModifier);
- return 1;
+ PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+
+ if(ptr && ptr->data) {
+ Object *ob= ptr->data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+ CTX_data_pointer_set(result, &ob->id, &RNA_ClothModifier, md);
+ return 1;
+ }
}
else if(CTX_data_equals(member, "soft_body")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
if(ptr && ptr->data) {
Object *ob= ptr->data;
- CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodySettings, ob->soft);
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Softbody);
+ CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodyModifier, md);
return 1;
}
}
@@ -596,6 +630,16 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
}
+ else if(CTX_data_equals(member, "collision")) {
+ PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
+
+ if(ptr && ptr->data) {
+ Object *ob= ptr->data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Collision);
+ CTX_data_pointer_set(result, &ob->id, &RNA_CollisionModifier, md);
+ return 1;
+ }
+ }
return 0;
}
@@ -635,38 +679,35 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
uiBlock *block;
uiBut *but;
PointerRNA *ptr;
- PropertyRNA *nameprop;
char namebuf[128], *name;
int a, icon;
if(!path)
return;
- row= uiLayoutRow(layout, 0);
+ row= uiLayoutRow(layout, 1);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
block= uiLayoutGetBlock(row);
uiBlockSetEmboss(block, UI_EMBOSSN);
- but= uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, (sbuts->flag & SB_PIN_CONTEXT)? ICON_PINNED: ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed.");
+ but= uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed.");
uiButSetFunc(but, pin_cb, NULL, NULL);
for(a=0; a<path->len; a++) {
ptr= &path->ptr[a];
+ if(a != 0)
+ uiDefIconBut(block, LABEL, 0, VICON_SMALL_TRI_RIGHT, 0, 0, 10, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+
if(ptr->data) {
icon= RNA_struct_ui_icon(ptr->type);
- nameprop= RNA_struct_name_property(ptr->type);
+ name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf));
-#if 0
- if(sbuts->mainb != BCONTEXT_SCENE && ptr->type == &RNA_Scene) {
- uiItemL(row, "", icon); /* save some space */
- }
- else
-#endif
- if(nameprop) {
- name= RNA_property_string_get_alloc(ptr, nameprop, namebuf, sizeof(namebuf));
-
- uiItemL(row, name, icon);
+ if(name) {
+ if(sbuts->mainb != BCONTEXT_SCENE && ptr->type == &RNA_Scene)
+ uiItemL(row, "", icon); /* save some space */
+ else
+ uiItemL(row, name, icon);
if(name != namebuf)
MEM_freeN(name);
@@ -690,6 +731,7 @@ void buttons_context_register(ARegionType *art)
strcpy(pt->idname, "BUTTONS_PT_context");
strcpy(pt->label, "Context");
pt->draw= buttons_panel_context;
+ pt->flag= PNL_NO_HEADER;
BLI_addtail(&art->paneltypes, pt);
}
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 79284ada483..99cc85d9a52 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -173,10 +173,10 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object");
if(sbuts->pathflag & (1<<BCONTEXT_CONSTRAINT))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_CONSTRAINT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Constraint");
- if(sbuts->pathflag & (1<<BCONTEXT_MODIFIER))
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier");
if(sbuts->pathflag & (1<<BCONTEXT_DATA))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, sbuts->dataicon, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data");
+ if(sbuts->pathflag & (1<<BCONTEXT_MODIFIER))
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier");
if(sbuts->pathflag & (1<<BCONTEXT_BONE))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone");
if(sbuts->pathflag & (1<<BCONTEXT_MATERIAL))
@@ -193,7 +193,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiBlockEndAlign(block);
xco+=XIC;
- uiDefButI(block, NUM, B_NEWFRAME, "", (xco+20),yco,60,YIC, &(CTX_data_scene(C)->r.cfra), 1.0, MAXFRAMEF, 0, 0, "Displays Current Frame of animation. Click to change.");
+ uiDefButI(block, NUM, B_NEWFRAME, "", (xco+20),yco,60,YIC, &(CTX_data_scene(C)->r.cfra), MINAFRAMEF, MAXFRAMEF, 0, 0, "Displays Current Frame of animation. Click to change.");
xco+= 80;
/* always as last */
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 196647a3750..f09f35589b9 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -61,9 +61,27 @@ void buttons_context_draw(const struct bContext *C, struct uiLayout *layout);
void buttons_context_register(struct ARegionType *art);
/* buttons_ops.c */
+void OBJECT_OT_material_slot_add(struct wmOperatorType *ot);
+void OBJECT_OT_material_slot_remove(struct wmOperatorType *ot);
+void OBJECT_OT_material_slot_assign(struct wmOperatorType *ot);
+void OBJECT_OT_material_slot_select(struct wmOperatorType *ot);
+void OBJECT_OT_material_slot_deselect(struct wmOperatorType *ot);
+
void MATERIAL_OT_new(struct wmOperatorType *ot);
void TEXTURE_OT_new(struct wmOperatorType *ot);
void WORLD_OT_new(struct wmOperatorType *ot);
+void OBJECT_OT_particle_system_add(struct wmOperatorType *ot);
+void OBJECT_OT_particle_system_remove(struct wmOperatorType *ot);
+
+void PARTICLE_OT_new(struct wmOperatorType *ot);
+void PARTICLE_OT_new_keyed_target(struct wmOperatorType *ot);
+void PARTICLE_OT_remove_keyed_target(struct wmOperatorType *ot);
+void PARTICLE_OT_keyed_target_move_up(struct wmOperatorType *ot);
+void PARTICLE_OT_keyed_target_move_down(struct wmOperatorType *ot);
+
+void SCENE_OT_render_layer_add(struct wmOperatorType *ot);
+void SCENE_OT_render_layer_remove(struct wmOperatorType *ot);
+
#endif /* ED_BUTTONS_INTERN_H */
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 63469a8294d..0c3bda5b9b8 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -30,38 +30,268 @@
#include "MEM_guardedalloc.h"
+#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_material_types.h"
+#include "DNA_node_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "BKE_context.h"
+#include "BKE_depsgraph.h"
+#include "BKE_font.h"
#include "BKE_library.h"
+#include "BKE_main.h"
#include "BKE_material.h"
+#include "BKE_node.h"
+#include "BKE_particle.h"
+#include "BKE_scene.h"
#include "BKE_texture.h"
+#include "BKE_utildefines.h"
#include "BKE_world.h"
+#include "BKE_tessmesh.h"
+
+#include "BLI_editVert.h"
+#include "BLI_listbase.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_curve.h"
+#include "ED_mesh.h"
+
#include "buttons_intern.h" // own include
+/********************** material slot operators *********************/
+
+static int material_slot_add_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ object_add_material_slot(ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_material_slot_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_add";
+
+ /* api callbacks */
+ ot->exec= material_slot_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int material_slot_remove_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ object_remove_material_slot(ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_remove";
+
+ /* api callbacks */
+ ot->exec= material_slot_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+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)
+ return OPERATOR_CANCELLED;
+
+ if(ob && ob->actcol>0) {
+ if(ob->type == OB_MESH) {
+ BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh;
+ BMFace *efa;
+ BMIter iter;
+
+ if(em) {
+ BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL)
+ if(BM_TestHFlag(efa, BM_SELECT))
+ efa->mat_nr= ob->actcol-1;
+ }
+ }
+ else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ ListBase *editnurb= ((Curve*)ob->data)->editnurb;
+ Nurb *nu;
+
+ if(editnurb) {
+ for(nu= editnurb->first; nu; nu= nu->next)
+ if(isNurbsel(nu))
+ nu->mat_nr= nu->charidx= ob->actcol-1;
+ }
+ }
+ else if(ob->type == OB_FONT) {
+ EditFont *ef= ((Curve*)ob->data)->editfont;
+ int i, selstart, selend;
+
+ if(ef && BKE_font_getselection(ob, &selstart, &selend)) {
+ for(i=selstart; i<=selend; i++)
+ ef->textbufinfo[i].mat_nr = ob->actcol-1;
+ }
+ }
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Assign Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_assign";
+
+ /* api callbacks */
+ ot->exec= material_slot_assign_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int material_slot_de_select(bContext *C, int select)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ if(ob->type == OB_MESH) {
+ EditMesh *em= BKE_mesh_get_editmesh(((Mesh*)ob->data));
+
+ if(em) {
+ if(select)
+ EM_select_by_material(em, ob->actcol-1);
+ else
+ EM_deselect_by_material(em, ob->actcol-1);
+ }
+
+ BKE_mesh_end_editmesh(ob->data, em);
+ }
+ else if ELEM(ob->type, OB_CURVE, OB_SURF) {
+ ListBase *editnurb= ((Curve*)ob->data)->editnurb;
+ Nurb *nu;
+ BPoint *bp;
+ BezTriple *bezt;
+ int a;
+
+ for(nu= editnurb->first; nu; nu=nu->next) {
+ if(nu->mat_nr==ob->actcol-1) {
+ if(nu->bezt) {
+ a= nu->pntsu;
+ bezt= nu->bezt;
+ while(a--) {
+ if(bezt->hide==0) {
+ if(select) {
+ bezt->f1 |= SELECT;
+ bezt->f2 |= SELECT;
+ bezt->f3 |= SELECT;
+ }
+ else {
+ bezt->f1 &= ~SELECT;
+ bezt->f2 &= ~SELECT;
+ bezt->f3 &= ~SELECT;
+ }
+ }
+ bezt++;
+ }
+ }
+ else if(nu->bp) {
+ a= nu->pntsu*nu->pntsv;
+ bp= nu->bp;
+ while(a--) {
+ if(bp->hide==0) {
+ if(select) bp->f1 |= SELECT;
+ else bp->f1 &= ~SELECT;
+ }
+ bp++;
+ }
+ }
+ }
+ }
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+static int material_slot_select_exec(bContext *C, wmOperator *op)
+{
+ return material_slot_de_select(C, 1);
+}
+
+void OBJECT_OT_material_slot_select(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_select";
+
+ /* api callbacks */
+ ot->exec= material_slot_select_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int material_slot_deselect_exec(bContext *C, wmOperator *op)
+{
+ return material_slot_de_select(C, 0);
+}
+
+void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Deselect Material Slot";
+ ot->idname= "OBJECT_OT_material_slot_deselect";
+
+ /* api callbacks */
+ ot->exec= material_slot_deselect_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/********************** new material operator *********************/
static int new_material_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr;
- Material *ma;
+ Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
Object *ob;
+ PointerRNA ptr;
int index;
/* add or copy material */
- ptr= CTX_data_pointer_get(C, "material");
- ma= (RNA_struct_is_a(ptr.type, &RNA_Material))? ptr.data: NULL;
-
if(ma)
ma= copy_material(ma);
else
@@ -70,9 +300,9 @@ static int new_material_exec(bContext *C, wmOperator *op)
ma->id.us--; /* compensating for us++ in assign_material */
/* attempt to assign to material slot */
- ptr= CTX_data_pointer_get(C, "material_slot");
+ ptr= CTX_data_pointer_get_type(C, "material_slot", &RNA_MaterialSlot);
- if(RNA_struct_is_a(ptr.type, &RNA_MaterialSlot)) {
+ if(ptr.data) {
ob= ptr.id.data;
index= (Material**)ptr.data - ob->mat;
@@ -80,6 +310,8 @@ static int new_material_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
+
+ WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma);
return OPERATOR_FINISHED;
}
@@ -101,15 +333,12 @@ void MATERIAL_OT_new(wmOperatorType *ot)
static int new_texture_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr;
+ Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
ID *id;
- Tex *tex;
MTex *mtex;
+ PointerRNA ptr;
/* add or copy texture */
- ptr= CTX_data_pointer_get(C, "texture");
- tex= (RNA_struct_is_a(ptr.type, &RNA_Texture))? ptr.data: NULL;
-
if(tex)
tex= copy_texture(tex);
else
@@ -118,9 +347,9 @@ static int new_texture_exec(bContext *C, wmOperator *op)
id_us_min(&tex->id);
/* attempt to assign to texture slot */
- ptr= CTX_data_pointer_get(C, "texture_slot");
+ ptr= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot);
- if(RNA_struct_is_a(ptr.type, &RNA_TextureSlot)) {
+ if(ptr.data) {
id= ptr.id.data;
mtex= ptr.data;
@@ -133,6 +362,8 @@ static int new_texture_exec(bContext *C, wmOperator *op)
/* XXX nodes, notifier .. */
}
+
+ WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex);
return OPERATOR_FINISHED;
}
@@ -154,27 +385,21 @@ void TEXTURE_OT_new(wmOperatorType *ot)
static int new_world_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr;
- Scene *scene;
- World *wo;
+ Scene *scene= CTX_data_scene(C);
+ World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data;
/* add or copy world */
- ptr= CTX_data_pointer_get(C, "world");
- wo= (RNA_struct_is_a(ptr.type, &RNA_World))? ptr.data: NULL;
-
if(wo)
wo= copy_world(wo);
else
wo= add_world("World");
/* assign to scene */
- scene= CTX_data_scene(C);
-
if(scene->world)
id_us_min(&scene->world->id);
scene->world= wo;
- // XXX notifier
+ WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo);
return OPERATOR_FINISHED;
}
@@ -192,3 +417,353 @@ void WORLD_OT_new(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
+
+/********************** particle system slot operators *********************/
+
+static int particle_system_add_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Scene *scene = CTX_data_scene(C);
+
+ if(!scene || !ob)
+ return OPERATOR_CANCELLED;
+
+ object_add_particle_system(scene, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_particle_system_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Particle System Slot";
+ ot->idname= "OBJECT_OT_particle_system_add";
+
+ /* api callbacks */
+ ot->exec= particle_system_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int particle_system_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(!scene || !ob)
+ return OPERATOR_CANCELLED;
+
+ object_remove_particle_system(scene, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_particle_system_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Particle System Slot";
+ ot->idname= "OBJECT_OT_particle_system_remove";
+
+ /* api callbacks */
+ ot->exec= particle_system_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** new particle settings operator *********************/
+
+static int new_particle_settings_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Main *bmain= CTX_data_main(C);
+ ParticleSystem *psys;
+ ParticleSettings *part = NULL;
+ Object *ob;
+ PointerRNA ptr;
+
+ ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
+
+ psys = ptr.data;
+
+ /* add or copy particle setting */
+ if(psys->part)
+ part= psys_copy_settings(psys->part);
+ else
+ part= psys_new_settings("PSys", bmain);
+
+ ob= ptr.id.data;
+
+ if(psys->part)
+ psys->part->id.us--;
+
+ psys->part = part;
+
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_new(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New Particle Settings";
+ ot->idname= "PARTICLE_OT_new";
+
+ /* api callbacks */
+ ot->exec= new_particle_settings_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** keyed particle target operators *********************/
+
+static int new_keyed_particle_target_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;
+
+ KeyedParticleTarget *kpt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ kpt = psys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next)
+ kpt->flag &= ~KEYED_TARGET_CURRENT;
+
+ kpt = MEM_callocN(sizeof(KeyedParticleTarget), "keyed particle target");
+
+ kpt->flag |= KEYED_TARGET_CURRENT;
+ kpt->psys = 1;
+
+ BLI_addtail(&psys->keyed_targets, kpt);
+
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_new_keyed_target(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New Keyed Particle Target";
+ ot->idname= "PARTICLE_OT_new_keyed_target";
+
+ /* api callbacks */
+ ot->exec= new_keyed_particle_target_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int remove_keyed_particle_target_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;
+
+ KeyedParticleTarget *kpt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ kpt = psys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->flag & KEYED_TARGET_CURRENT) {
+ BLI_remlink(&psys->keyed_targets, kpt);
+ MEM_freeN(kpt);
+ break;
+ }
+
+ }
+ kpt = psys->keyed_targets.last;
+
+ if(kpt)
+ kpt->flag |= KEYED_TARGET_CURRENT;
+
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_remove_keyed_target(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Keyed Particle Target";
+ ot->idname= "PARTICLE_OT_remove_keyed_target";
+
+ /* api callbacks */
+ ot->exec= remove_keyed_particle_target_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move up modifier operator *********************/
+
+static int keyed_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;
+ KeyedParticleTarget *kpt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+
+ kpt = psys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->flag & KEYED_TARGET_CURRENT && kpt->prev) {
+ BLI_remlink(&psys->keyed_targets, kpt);
+ BLI_insertlink(&psys->keyed_targets, kpt->prev->prev, kpt);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_keyed_target_move_up(wmOperatorType *ot)
+{
+ ot->name= "Move Up Keyed Target";
+ ot->description= "Move keyed particle target up in the list.";
+ ot->idname= "PARTICLE_OT_keyed_target_move_up";
+
+ ot->exec= keyed_target_move_up_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/************************ move down modifier operator *********************/
+
+static int keyed_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;
+ KeyedParticleTarget *kpt;
+
+ if(!psys)
+ return OPERATOR_CANCELLED;
+ kpt = psys->keyed_targets.first;
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->flag & KEYED_TARGET_CURRENT && kpt->next) {
+ BLI_remlink(&psys->keyed_targets, kpt);
+ BLI_insertlink(&psys->keyed_targets, kpt->next, kpt);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ break;
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void PARTICLE_OT_keyed_target_move_down(wmOperatorType *ot)
+{
+ ot->name= "Move Down Keyed Target";
+ ot->description= "Move keyed particle target down in the list.";
+ ot->idname= "PARTICLE_OT_keyed_target_move_down";
+
+ ot->exec= keyed_target_move_down_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************** render layer operators *********************/
+
+static int render_layer_add_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ scene_add_render_layer(scene);
+ scene->r.actlay= BLI_countlist(&scene->r.layers) - 1;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+void SCENE_OT_render_layer_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Render Layer";
+ ot->idname= "SCENE_OT_render_layer_add";
+
+ /* api callbacks */
+ ot->exec= render_layer_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int render_layer_remove_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ SceneRenderLayer *rl;
+ int act= scene->r.actlay;
+
+ if(BLI_countlist(&scene->r.layers) <= 1)
+ return OPERATOR_CANCELLED;
+
+ rl= BLI_findlink(&scene->r.layers, scene->r.actlay);
+ BLI_remlink(&scene->r.layers, rl);
+ MEM_freeN(rl);
+
+ scene->r.actlay= 0;
+
+ if(scene->nodetree) {
+ bNode *node;
+ for(node= scene->nodetree->nodes.first; node; node= node->next) {
+ if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
+ if(node->custom1==act)
+ node->custom1= 0;
+ else if(node->custom1>act)
+ node->custom1--;
+ }
+ }
+ }
+
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+void SCENE_OT_render_layer_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Render Layer";
+ ot->idname= "SCENE_OT_render_layer_remove";
+
+ /* api callbacks */
+ ot->exec= render_layer_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 38ce88019ed..17f55c9395e 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -210,9 +210,27 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
void buttons_operatortypes(void)
{
+ WM_operatortype_append(OBJECT_OT_material_slot_add);
+ WM_operatortype_append(OBJECT_OT_material_slot_remove);
+ WM_operatortype_append(OBJECT_OT_material_slot_assign);
+ WM_operatortype_append(OBJECT_OT_material_slot_select);
+ WM_operatortype_append(OBJECT_OT_material_slot_deselect);
+
WM_operatortype_append(MATERIAL_OT_new);
WM_operatortype_append(TEXTURE_OT_new);
WM_operatortype_append(WORLD_OT_new);
+
+ WM_operatortype_append(OBJECT_OT_particle_system_add);
+ WM_operatortype_append(OBJECT_OT_particle_system_remove);
+
+ WM_operatortype_append(PARTICLE_OT_new);
+ WM_operatortype_append(PARTICLE_OT_new_keyed_target);
+ WM_operatortype_append(PARTICLE_OT_remove_keyed_target);
+ WM_operatortype_append(PARTICLE_OT_keyed_target_move_up);
+ WM_operatortype_append(PARTICLE_OT_keyed_target_move_down);
+
+ WM_operatortype_append(SCENE_OT_render_layer_add);
+ WM_operatortype_append(SCENE_OT_render_layer_remove);
}
void buttons_keymap(struct wmWindowManager *wm)
@@ -220,14 +238,23 @@ void buttons_keymap(struct wmWindowManager *wm)
}
+//#define PY_HEADER
/* add handlers, stuff you only do once or on area/region changes */
static void buttons_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 buttons_header_area_draw(const bContext *C, ARegion *ar)
{
+#ifdef PY_HEADER
+ ED_region_header(C, ar);
+#else
+
float col[3];
/* clear */
@@ -243,7 +270,8 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(C, &ar->v2d);
buttons_header_buttons(C, ar);
-
+#endif
+
/* restore view matrix? */
UI_view2d_view_restore(C);
}
@@ -310,6 +338,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case NC_SCENE:
switch(wmn->data) {
case ND_FRAME:
+ case ND_MODE:
ED_area_tag_redraw(sa);
break;
@@ -327,6 +356,11 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_GEOM_SELECT:
ED_area_tag_redraw(sa);
break;
+ case ND_SHADING:
+ case ND_SHADING_DRAW:
+ /* currently works by redraws... if preview is set, it (re)starts job */
+ sbuts->preview= 1;
+ break;
}
break;
case NC_MATERIAL:
@@ -337,7 +371,6 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_SHADING_DRAW:
/* currently works by redraws... if preview is set, it (re)starts job */
sbuts->preview= 1;
- printf("shader notifier \n");
break;
}
break;
@@ -351,6 +384,9 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
sbuts->preview= 1;
}
+
+ if(wmn->data == ND_KEYS)
+ ED_area_tag_redraw(sa);
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_file/Makefile b/source/blender/editors/space_file/Makefile
index 8f48217473c..2f4180448e5 100644
--- a/source/blender/editors/space_file/Makefile
+++ b/source/blender/editors/space_file/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 6ed8f87d987..339ebe27fcd 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -90,6 +90,8 @@ enum {
B_FS_EXEC,
B_FS_CANCEL,
B_FS_PARENT,
+ B_FS_DIRNAME,
+ B_FS_FILENAME
} eFile_ButEvents;
@@ -105,68 +107,130 @@ static void do_file_buttons(bContext *C, void *arg, int event)
case B_FS_PARENT:
file_parent_exec(C, NULL); /* file_ops.c */
break;
+ case B_FS_FILENAME:
+ file_filename_exec(C, NULL);
+ break;
+ case B_FS_DIRNAME:
+ file_directory_exec(C, NULL);
+ break;
}
}
-/* note; this function uses pixelspace (0, 0, winx, winy), not view2d */
+/* Note: This function uses pixelspace (0, 0, winx, winy), not view2d.
+ * The controls are laid out as follows:
+ *
+ * -------------------------------------------
+ * | Directory input | execute |
+ * -------------------------------------------
+ * | Filename input | + | - | cancel |
+ * -------------------------------------------
+ *
+ * The input widgets will stretch to fill any excess space.
+ * When there isn't enough space for all controls to be shown, they are
+ * hidden in this order: x/-, execute/cancel, input widgets.
+ */
void file_draw_buttons(const bContext *C, ARegion *ar)
{
- SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ /* Button layout. */
+ const short min_x = 10;
+ const short max_x = ar->winx - 10;
+ const short line2_y = ar->winy - IMASEL_BUTTONS_HEIGHT - 12;
+ const short line1_y = line2_y + IMASEL_BUTTONS_HEIGHT/2 + 4;
+ const short input_minw = 20;
+ const short btn_h = UI_UNIT_Y;
+ const short btn_fn_w = UI_UNIT_X;
+ const short btn_minw = 80;
+ const short btn_margin = 20;
+ const short separator = 4;
+
+ /* Additional locals. */
+ char name[20];
+ short loadbutton;
+ short fnumbuttons;
+ short available_w = max_x - min_x;
+ short line1_w = available_w;
+ short line2_w = available_w;
+
+ uiBut* but;
+ uiBlock* block;
+ SpaceFile* sfile = (SpaceFile*) CTX_wm_space_data(C);
FileSelectParams* params = ED_fileselect_get_params(sfile);
- uiBlock *block;
- int loadbutton;
- char name[20];
- float slen;
- int filebuty1, filebuty2;
-
- float xmin = 8;
- float xmax = ar->winx - 10;
-
- filebuty1= ar->winy - IMASEL_BUTTONS_HEIGHT - 12;
- filebuty2= filebuty1 + IMASEL_BUTTONS_HEIGHT/2 + 4;
-
- /* HEADER */
+
+ /* Initialize UI block. */
sprintf(name, "win %p", ar);
block = uiBeginBlock(C, ar, name, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_file_buttons, NULL);
-
- /* XXXX
- uiSetButLock( filelist_gettype(simasel->files)==FILE_MAIN && simasel->returnfunc, NULL);
- */
-
- /* space available for load/save buttons? */
- slen = UI_GetStringWidth(sfile->params->title);
- loadbutton= slen > 60 ? slen + 20 : MAX2(80, 20+UI_GetStringWidth(params->title));
- if(ar->winx > loadbutton+20) {
- if(params->title[0]==0) {
- loadbutton= 0;
- }
+
+ /* Is there enough space for the execute / cancel buttons? */
+ loadbutton = UI_GetStringWidth(sfile->params->title) + btn_margin;
+ if (loadbutton < btn_minw) {
+ loadbutton = MAX2(btn_minw,
+ btn_margin + UI_GetStringWidth(params->title));
}
- else {
- loadbutton= 0;
+
+ if (available_w <= loadbutton + separator + input_minw
+ || params->title[0] == 0) {
+ loadbutton = 0;
+ } else {
+ line1_w -= (loadbutton + separator);
+ line2_w = line1_w;
}
- uiDefBut(block, TEX, 0 /* XXX B_FS_FILENAME */,"", xmin+2, filebuty1, xmax-xmin-loadbutton-4, 21, params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, "");
- uiDefBut(block, TEX, 0 /* XXX B_FS_DIRNAME */,"", xmin+2, filebuty2, xmax-xmin-loadbutton-4, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, "");
+ /* Is there enough space for file number increment/decrement buttons? */
+ fnumbuttons = 2 * btn_fn_w;
+ if (!loadbutton || line2_w <= fnumbuttons + separator + input_minw) {
+ fnumbuttons = 0;
+ } else {
+ line2_w -= (fnumbuttons + separator);
+ }
+
+ /* Text input fields for directory and file. */
+ if (available_w > 0) {
+ but = uiDefBut(block, TEX, B_FS_DIRNAME, "",
+ min_x, line1_y, line1_w, btn_h,
+ params->dir, 0.0, (float)FILE_MAXDIR-1, 0, 0,
+ "File path.");
+ uiButSetCompleteFunc(but, autocomplete_directory, NULL);
+ uiDefBut(block, TEX, B_FS_FILENAME, "",
+ min_x, line2_y, line2_w, btn_h,
+ params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0,
+ "File name.");
+ }
+ /* Filename number increment / decrement buttons. */
+ if (fnumbuttons) {
+ uiBlockBeginAlign(block);
+ but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
+ min_x + line2_w + separator, line2_y,
+ btn_fn_w, btn_h,
+ "Decrement the filename number.");
+ RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1);
+
+ but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN,
+ min_x + line2_w + separator + btn_fn_w, line2_y,
+ btn_fn_w, btn_h,
+ "Increment the filename number.");
+ RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1);
+ uiBlockEndAlign(block);
+ }
+
+ /* Execute / cancel buttons. */
if(loadbutton) {
- uiDefBut(block, BUT, B_FS_EXEC, params->title, xmax-loadbutton, filebuty2, loadbutton, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, "");
- uiDefBut(block, BUT, B_FS_CANCEL, "Cancel", xmax-loadbutton, filebuty1, loadbutton, 21, params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, "");
+ uiDefBut(block, BUT, B_FS_EXEC, params->title,
+ max_x - loadbutton, line1_y, loadbutton, btn_h,
+ params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, params->title);
+ uiDefBut(block, BUT, B_FS_CANCEL, "Cancel",
+ max_x - loadbutton, line2_y, loadbutton, btn_h,
+ params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, "Cancel.");
}
-
+
uiEndBlock(C, block);
uiDrawBlock(C, block);
}
static void draw_tile(short sx, short sy, short width, short height, int colorid, int shade)
-{
- /* TODO: BIF_ThemeColor seems to need this to show the color, not sure why? - elubie */
- //glEnable(GL_BLEND);
- //glColor4ub(0, 0, 0, 100);
- //glDisable(GL_BLEND);
- /* I think it was a missing glDisable() - ton */
-
+{
UI_ThemeColorShade(colorid, shade);
uiSetRoundBox(15);
uiRoundBox(sx, sy - height, sx + width, sy, 6);
@@ -550,81 +614,4 @@ void file_draw_list(const bContext *C, ARegion *ar)
}
}
-static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCategory category, const char* category_name, short *starty)
-{
- struct FSMenu* fsmenu = fsmenu_get();
- char bookmark[FILE_MAX];
- int nentries = fsmenu_get_nentries(fsmenu, category);
-
- short sx, sy, xpos, ypos;
- int bmwidth = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*TILE_BORDER_X - ICON_DEFAULT_WIDTH - 4;
- int fontsize = file_font_pointsize();
- int cat_icon;
- int i;
-
- sx = ar->v2d.cur.xmin + TILE_BORDER_X;
- sy = *starty;
-
- UI_ThemeColor(TH_TEXT_HI);
- file_draw_string(sx, sy, category_name, bmwidth, fontsize, FILE_SHORTEN_END);
-
- sy -= fontsize*2.0f;
-
- switch(category) {
- case FS_CATEGORY_SYSTEM:
- cat_icon = ICON_DISK_DRIVE; break;
- case FS_CATEGORY_BOOKMARKS:
- cat_icon = ICON_BOOKMARKS; break;
- case FS_CATEGORY_RECENT:
- cat_icon = ICON_FILE_FOLDER; break;
- }
- for (i=0; i< nentries && (sy > ar->v2d.cur.ymin) ;++i) {
- char *fname = fsmenu_get_entry(fsmenu, category, i);
-
- if (fname) {
- int sl;
- BLI_strncpy(bookmark, fname, FILE_MAX);
-
- sl = strlen(bookmark)-1;
- if (sl > 1) {
- while (bookmark[sl] == '\\' || bookmark[sl] == '/') {
- bookmark[sl] = '\0';
- sl--;
- }
- }
-
- if (fsmenu_is_selected(fsmenu, category, i) ) {
- UI_ThemeColor(TH_HILITE);
- uiRoundBox(sx, sy - fontsize*2.0f, ar->v2d.cur.xmax - TILE_BORDER_X, sy, 4.0f);
- UI_ThemeColor(TH_TEXT);
- } else {
- UI_ThemeColor(TH_TEXT_HI);
- }
-
- xpos = sx;
- ypos = sy - (TILE_BORDER_Y * 0.5);
-
- file_draw_icon(xpos, ypos, cat_icon, ICON_DEFAULT_WIDTH, ICON_DEFAULT_WIDTH);
- xpos += ICON_DEFAULT_WIDTH + 4;
- file_draw_string(xpos, ypos, bookmark, bmwidth, fontsize, FILE_SHORTEN_FRONT);
- sy -= fontsize*2.0;
- fsmenu_set_pos(fsmenu, category, i, xpos, ypos);
- }
- }
-
- *starty = sy;
-}
-
-void file_draw_fsmenu(const bContext *C, ARegion *ar)
-{
- int linestep = file_font_pointsize()*2.0f;
- short sy= ar->v2d.cur.ymax-2*TILE_BORDER_Y;
-
- file_draw_fsmenu_category(C, ar, FS_CATEGORY_SYSTEM, "SYSTEM", &sy);
- sy -= linestep;
- file_draw_fsmenu_category(C, ar, FS_CATEGORY_BOOKMARKS, "BOOKMARKS", &sy);
- sy -= linestep;
- file_draw_fsmenu_category(C, ar, FS_CATEGORY_RECENT, "RECENT", &sy);
-
-}
diff --git a/source/blender/editors/space_file/file_header.c b/source/blender/editors/space_file/file_header.c
deleted file mode 100644
index 4799003d6c7..00000000000
--- a/source/blender/editors/space_file/file_header.c
+++ /dev/null
@@ -1,187 +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 *****
- */
-
-#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 "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-
-#include "BKE_context.h"
-#include "BKE_screen.h"
-#include "BKE_global.h"
-
-#include "ED_screen.h"
-#include "ED_types.h"
-#include "ED_util.h"
-#include "ED_fileselect.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-#include "UI_view2d.h"
-
-#include "file_intern.h"
-#include "filelist.h"
-
-#define B_SORTIMASELLIST 1
-#define B_RELOADIMASELDIR 2
-#define B_FILTERIMASELDIR 3
-#define B_HIDEDOTFILES 4
-
-/* ************************ header area region *********************** */
-
-static void do_file_header_buttons(bContext *C, void *arg, int event)
-{
- SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
- switch(event) {
- case B_SORTIMASELLIST:
- filelist_sort(sfile->files, sfile->params->sort);
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- break;
- case B_RELOADIMASELDIR:
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- break;
- case B_FILTERIMASELDIR:
- if(sfile->params) {
- if (sfile->params->flag & FILE_FILTER) {
- filelist_setfilter(sfile->files,sfile->params->filter);
- filelist_filter(sfile->files);
- } else {
- filelist_setfilter(sfile->files,0);
- filelist_filter(sfile->files);
- }
- }
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- break;
- case B_HIDEDOTFILES:
- if(sfile->params) {
- filelist_free(sfile->files);
- filelist_hidedot(sfile->files, sfile->params->flag & FILE_HIDE_DOT);
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- }
- break;
- }
-}
-
-
-void file_header_buttons(const bContext *C, ARegion *ar)
-{
- SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
- FileSelectParams* params = ED_fileselect_get_params(sfile);
-
- uiBlock *block;
- int xco, yco= 3;
- int xcotitle;
-
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
- uiBlockSetHandleFunc(block, do_file_header_buttons, NULL);
-
- xco= ED_area_header_standardbuttons(C, block, yco);
-
- /*
- if((sa->flag & HEADER_NO_PULLDOWN)==0) {
- int xmax;
-
- xmax= GetButStringLength("View");
- uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C),
- "View", xco, yco-2, xmax-3, 24, "");
- xco+=XIC+xmax;
- }
- */
-
- xco += 5;
-
- uiBlockBeginAlign(block);
- uiDefIconButO(block, BUT, "FILE_OT_parent", WM_OP_INVOKE_DEFAULT, ICON_FILE_PARENT, xco+=XIC, yco, 20, 20, "Navigate to Parent Folder");
- uiDefIconButO(block, BUT, "FILE_OT_refresh", WM_OP_INVOKE_DEFAULT, ICON_FILE_REFRESH, xco+=XIC, yco, 20, 20, "Refresh List of Files");
- uiBlockEndAlign(block);
-
- xco += 5;
-
- uiBlockBeginAlign(block);
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_SHORTDISPLAY, xco+=XIC, yco, XIC,YIC, &params->display, 1.0, FILE_SHORTDISPLAY, 0, 0, "Displays short file description");
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_LONGDISPLAY, xco+=XIC, yco, XIC,YIC, &params->display, 1.0, FILE_LONGDISPLAY, 0, 0, "Displays long file description");
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_IMGDISPLAY, xco+=XIC, yco, XIC,YIC, &params->display, 1.0, FILE_IMGDISPLAY, 0, 0, "Displays files as thumbnails");
- uiBlockEndAlign(block);
-
- xco+=XIC;
-
-
- uiBlockBeginAlign(block);
- uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTALPHA, xco+=XIC, yco, XIC,YIC, &params->sort, 1.0, 0.0, 0, 0, "Sorts files alphabetically");
- uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTBYEXT, xco+=XIC, yco, XIC,YIC, &params->sort, 1.0, 3.0, 0, 0, "Sorts files by extension");
- uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTTIME, xco+=XIC, yco, XIC,YIC, &params->sort, 1.0, 1.0, 0, 0, "Sorts files by time");
- uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTSIZE, xco+=XIC, yco, XIC,YIC, &params->sort, 1.0, 2.0, 0, 0, "Sorts files by size");
- uiBlockEndAlign(block);
-
- xco+=XIC;
- uiDefIconButBitS(block, TOG, FILE_HIDE_DOT, B_HIDEDOTFILES, ICON_GHOST,xco+=XIC,yco,XIC,YIC, &params->flag, 0, 0, 0, 0, "Hide dot files");
- xco+=XIC;
- uiDefIconButBitS(block, TOG, FILE_FILTER, B_FILTERIMASELDIR, ICON_FILTER,xco+=XIC,yco,XIC,YIC, &params->flag, 0, 0, 0, 0, "Filter files");
-
- if (params->flag & FILE_FILTER) {
- xco+=4;
- uiBlockBeginAlign(block);
- uiDefIconButBitS(block, TOG, IMAGEFILE, B_FILTERIMASELDIR, ICON_FILE_IMAGE,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show images");
- uiDefIconButBitS(block, TOG, BLENDERFILE, B_FILTERIMASELDIR, ICON_FILE_BLEND,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show .blend files");
- uiDefIconButBitS(block, TOG, MOVIEFILE, B_FILTERIMASELDIR, ICON_FILE_MOVIE,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show movies");
- uiDefIconButBitS(block, TOG, PYSCRIPTFILE, B_FILTERIMASELDIR, ICON_FILE_SCRIPT,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show python scripts");
- uiDefIconButBitS(block, TOG, FTFONTFILE, B_FILTERIMASELDIR, ICON_FILE_FONT,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show fonts");
- uiDefIconButBitS(block, TOG, SOUNDFILE, B_FILTERIMASELDIR, ICON_FILE_SOUND,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show sound files");
- uiDefIconButBitS(block, TOG, TEXTFILE, B_FILTERIMASELDIR, ICON_FILE_BLANK,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show text files");
- uiDefIconButBitS(block, TOG, FOLDERFILE, B_FILTERIMASELDIR, ICON_FILE_FOLDER,xco+=XIC,yco,XIC,YIC, &params->filter, 0, 0, 0, 0, "Show folders");
- uiBlockEndAlign(block);
- xco+=XIC;
- }
-
- xcotitle= xco;
- xco+= UI_GetStringWidth(params->title);
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- /* always as last */
- UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
-
- uiEndBlock(C, block);
- uiDrawBlock(C, block);
-}
-
-
-
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index 642189ad3fd..dce56e05d6b 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -30,9 +30,9 @@
/* internal exports only */
-
-/* file_header.c */
-void file_header_buttons(const bContext *C, ARegion *ar);
+struct ARegion;
+struct ARegionType;
+struct SpaceFile;
/* file_ops.c */
struct ARegion *file_buttons_region(struct ScrArea *sa);
@@ -45,7 +45,6 @@ void file_draw_buttons(const bContext *C, ARegion *ar);
void file_calc_previews(const bContext *C, ARegion *ar);
void file_draw_previews(const bContext *C, ARegion *ar);
void file_draw_list(const bContext *C, ARegion *ar);
-void file_draw_fsmenu(const bContext *C, ARegion *ar);
/* file_ops.h */
struct wmOperatorType;
@@ -56,21 +55,44 @@ void FILE_OT_select(struct wmOperatorType *ot);
void FILE_OT_select_all_toggle(struct wmOperatorType *ot);
void FILE_OT_select_border(struct wmOperatorType *ot);
void FILE_OT_select_bookmark(struct wmOperatorType *ot);
+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_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);
+void FILE_OT_filename(struct wmOperatorType *ot);
+void FILE_OT_previous(struct wmOperatorType *ot);
+void FILE_OT_next(struct wmOperatorType *ot);
void FILE_OT_refresh(struct wmOperatorType *ot);
void FILE_OT_bookmark_toggle(struct wmOperatorType *ot);
+void FILE_OT_filenum(struct wmOperatorType *ot);
+void FILE_OT_delete(struct wmOperatorType *ot);
int file_exec(bContext *C, struct wmOperator *unused);
int file_cancel_exec(bContext *C, struct wmOperator *unused);
int file_parent_exec(bContext *C, struct wmOperator *unused);
-int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my);
+int file_previous_exec(bContext *C, struct wmOperator *unused);
+int file_next_exec(bContext *C, struct wmOperator *unused);
+int file_filename_exec(bContext *C, struct wmOperator *unused);
+int file_directory_exec(bContext *C, struct wmOperator *unused);
+int file_directory_new_exec(bContext *C,struct wmOperator *unused);
+int file_delete_exec(bContext *C, struct wmOperator *unused);
+
+int file_hilight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, int my);
+
/* filesel.c */
float file_string_width(const char* str);
float file_font_pointsize();
+void file_change_dir(struct SpaceFile *sfile);
+int file_select_match(struct SpaceFile *sfile, const char *pattern);
+void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
+
+/* file_panels.c */
+void file_panels_register(struct ARegionType *art);
#endif /* ED_FILE_INTERN_H */
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 0c6cadc05c1..0d36bac7505 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -42,6 +42,8 @@
#include "ED_screen.h"
#include "ED_fileselect.h"
+#include "MEM_guardedalloc.h"
+
#include "RNA_access.h"
#include "RNA_define.h"
@@ -135,25 +137,16 @@ static void file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short v
params->active_file = last_file;
if(file && S_ISDIR(file->type)) {
- /* the path is too long and we are not going up! */
- if (strcmp(file->relname, ".") &&
- strcmp(file->relname, "..") &&
- strlen(params->dir) + strlen(file->relname) >= FILE_MAX )
+ /* the path is too long! */
+ if (strlen(params->dir) + strlen(file->relname) >= FILE_MAX )
{
// XXX error("Path too long, cannot enter this directory");
} else {
- if (strcmp(file->relname, "..")==0) {
- /* avoids /../../ */
- BLI_parent_dir(params->dir);
- } else {
- strcat(params->dir, file->relname);
- strcat(params->dir,"/");
- params->file[0] = '\0';
- BLI_cleanup_dir(G.sce, params->dir);
- }
- filelist_setdir(sfile->files, params->dir);
- filelist_free(sfile->files);
- params->active_file = -1;
+ BLI_cleanup_dir(G.sce, params->dir);
+ strcat(params->dir, file->relname);
+ BLI_add_slash(params->dir);
+ params->file[0] = '\0';
+ file_change_dir(sfile);
}
}
else if (file)
@@ -190,7 +183,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
rect.xmax= RNA_int_get(op->ptr, "xmax");
rect.ymax= RNA_int_get(op->ptr, "ymax");
- BLI_isect_rctf(&(ar->v2d.mask), &rect, &rect);
+ BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
file_select(sfile, ar, &rect, val );
WM_event_add_notifier(C, NC_WINDOW, NULL);
@@ -234,7 +227,7 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* single select, deselect all selected first */
file_deselect_all(sfile);
file_select(sfile, ar, &rect, val );
- WM_event_add_notifier(C, NC_WINDOW, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
}
return OPERATOR_FINISHED;
}
@@ -299,89 +292,104 @@ void FILE_OT_select_all_toggle(wmOperatorType *ot)
/* ---------- BOOKMARKS ----------- */
-static int file_select_bookmark_category(SpaceFile* sfile, ARegion* ar, short x, short y, FSMenuCategory category)
+static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- struct FSMenu* fsmenu = fsmenu_get();
- int nentries = fsmenu_get_nentries(fsmenu, category);
- int linestep = file_font_pointsize()*2.0f;
- short xs, ys;
- int i;
- int selected = -1;
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
- for (i=0; i < nentries; ++i) {
- fsmenu_get_pos(fsmenu, category, i, &xs, &ys);
- if ( (y<=ys) && (y>ys-linestep) ) {
- fsmenu_select_entry(fsmenu, category, i);
- selected = i;
- break;
- }
+ if(RNA_struct_find_property(op->ptr, "dir")) {
+ char entry[256];
+ FileSelectParams* params = sfile->params;
+
+ RNA_string_get(op->ptr, "dir", entry);
+ BLI_strncpy(params->dir, entry, sizeof(params->dir));
+ BLI_cleanup_dir(G.sce, params->dir);
+ file_change_dir(sfile);
+ params->file[0] = '\0';
+
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
}
- return selected;
+
+ return OPERATOR_FINISHED;
}
-static void file_select_bookmark(SpaceFile* sfile, ARegion* ar, short x, short y)
+void FILE_OT_select_bookmark(wmOperatorType *ot)
{
- float fx, fy;
- int selected;
- FSMenuCategory category = FS_CATEGORY_SYSTEM;
-
- if (BLI_in_rcti(&ar->v2d.mask, x, y)) {
- char *entry;
+ /* identifiers */
+ ot->name= "Select Directory";
+ ot->idname= "FILE_OT_select_bookmark";
+
+ /* api callbacks */
+ ot->invoke= bookmark_select_invoke;
+ ot->poll= ED_operator_file_active;
- UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy);
- selected = file_select_bookmark_category(sfile, ar, fx, fy, FS_CATEGORY_SYSTEM);
- if (selected<0) {
- category = FS_CATEGORY_BOOKMARKS;
- selected = file_select_bookmark_category(sfile, ar, fx, fy, category);
- }
- if (selected<0) {
- category = FS_CATEGORY_RECENT;
- selected = file_select_bookmark_category(sfile, ar, fx, fy, category);
- }
-
- if (selected>=0) {
- entry= fsmenu_get_entry(fsmenu_get(), category, selected);
- /* which string */
- if (entry) {
- FileSelectParams* params = sfile->params;
- BLI_strncpy(params->dir, entry, sizeof(params->dir));
- BLI_cleanup_dir(G.sce, params->dir);
- filelist_free(sfile->files);
- filelist_setdir(sfile->files, params->dir);
- params->file[0] = '\0';
- params->active_file = -1;
- }
- }
- }
+ RNA_def_string(ot->srna, "dir", "", 256, "Dir", "");
}
-static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int bookmark_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ScrArea *sa= CTX_wm_area(C);
- ARegion *ar= CTX_wm_region(C);
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ struct FSMenu* fsmenu = fsmenu_get();
+ struct FileSelectParams* params= ED_fileselect_get_params(sfile);
- short x, y;
-
- x = event->x - ar->winrct.xmin;
- y = event->y - ar->winrct.ymin;
+ if (params->dir[0] != '\0') {
+ char name[FILE_MAX];
+
+ fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, params->dir, 0, 1);
+ BLI_make_file_string("/", name, BLI_gethome(), ".Bfs");
+ fsmenu_write_file(fsmenu, name);
+ }
- file_select_bookmark(sfile, ar, x, y);
ED_area_tag_redraw(sa);
return OPERATOR_FINISHED;
}
-void FILE_OT_select_bookmark(wmOperatorType *ot)
+void FILE_OT_add_bookmark(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Directory";
- ot->idname= "FILE_OT_select_bookmark";
+ ot->name= "Add Bookmark";
+ ot->idname= "FILE_OT_add_bookmark";
/* api callbacks */
- ot->invoke= bookmark_select_invoke;
+ ot->invoke= bookmark_add_invoke;
ot->poll= ED_operator_file_active;
}
+static int bookmark_delete_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ struct FSMenu* fsmenu = fsmenu_get();
+ int nentries = fsmenu_get_nentries(fsmenu, FS_CATEGORY_BOOKMARKS);
+
+ if(RNA_struct_find_property(op->ptr, "index")) {
+ int index = RNA_int_get(op->ptr, "index");
+ if ( (index >-1) && (index < nentries)) {
+ char name[FILE_MAX];
+
+ fsmenu_remove_entry(fsmenu, FS_CATEGORY_BOOKMARKS, index);
+ BLI_make_file_string("/", name, BLI_gethome(), ".Bfs");
+ fsmenu_write_file(fsmenu, name);
+ ED_area_tag_redraw(sa);
+ }
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void FILE_OT_delete_bookmark(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Delete Bookmark";
+ ot->idname= "FILE_OT_delete_bookmark";
+
+ /* api callbacks */
+ ot->invoke= bookmark_delete_invoke;
+ ot->poll= ED_operator_file_active;
+
+ RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000);
+}
+
+
static int loadimages_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ScrArea *sa= CTX_wm_area(C);
@@ -455,7 +463,10 @@ void FILE_OT_highlight(struct wmOperatorType *ot)
int file_cancel_exec(bContext *C, wmOperator *unused)
{
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
-
+
+ folderlist_free(sfile->folders_prev);
+ folderlist_free(sfile->folders_next);
+
WM_event_fileselect_event(C, sfile->op, EVT_FILESELECT_CANCEL);
sfile->op = NULL;
@@ -517,6 +528,9 @@ int file_exec(bContext *C, wmOperator *unused)
}
}
+ folderlist_free(sfile->folders_prev);
+ folderlist_free(sfile->folders_next);
+
fsmenu_insert_entry(fsmenu_get(), FS_CATEGORY_RECENT, sfile->params->dir,0, 1);
BLI_make_file_string(G.sce, name, BLI_gethome(), ".Bfs");
fsmenu_write_file(fsmenu_get(), name);
@@ -543,13 +557,14 @@ int file_parent_exec(bContext *C, wmOperator *unused)
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
if(sfile->params) {
- BLI_parent_dir(sfile->params->dir);
- filelist_setdir(sfile->files, sfile->params->dir);
- filelist_free(sfile->files);
- sfile->params->active_file = -1;
+ if (BLI_has_parent(sfile->params->dir)) {
+ BLI_parent_dir(sfile->params->dir);
+ BLI_cleanup_dir(G.sce, sfile->params->dir);
+ file_change_dir(sfile);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ }
}
- ED_area_tag_redraw(CTX_wm_area(C));
-
+
return OPERATOR_FINISHED;
}
@@ -571,15 +586,168 @@ int file_refresh_exec(bContext *C, wmOperator *unused)
{
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ file_change_dir(sfile);
+
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+
+ return OPERATOR_FINISHED;
+
+}
+
+void FILE_OT_previous(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Previous Folder";
+ ot->idname= "FILE_OT_previous";
+
+ /* api callbacks */
+ ot->exec= file_previous_exec;
+ ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+}
+
+int file_previous_exec(bContext *C, wmOperator *unused)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
if(sfile->params) {
- filelist_setdir(sfile->files, sfile->params->dir);
- filelist_free(sfile->files);
- sfile->params->active_file = -1;
+ if (!sfile->folders_next)
+ sfile->folders_next = folderlist_new();
+
+ folderlist_pushdir(sfile->folders_next, sfile->params->dir);
+ folderlist_popdir(sfile->folders_prev, sfile->params->dir);
+ folderlist_pushdir(sfile->folders_next, sfile->params->dir);
+
+ file_change_dir(sfile);
+ }
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void FILE_OT_next(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Next Folder";
+ ot->idname= "FILE_OT_next";
+
+ /* api callbacks */
+ ot->exec= file_next_exec;
+ ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+}
+
+int file_next_exec(bContext *C, wmOperator *unused)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ if(sfile->params) {
+ if (!sfile->folders_next)
+ sfile->folders_next = folderlist_new();
+
+ folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
+ folderlist_popdir(sfile->folders_next, sfile->params->dir);
+
+ // update folder_prev so we can check for it in folderlist_clear_next()
+ folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
+
+ file_change_dir(sfile);
+ }
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+int file_directory_new_exec(bContext *C, wmOperator *unused)
+{
+ char tmpstr[FILE_MAX];
+ char tmpdir[FILE_MAXFILE];
+ int i = 1;
+
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ if(sfile->params) {
+
+ BLI_strncpy(tmpstr, sfile->params->dir, FILE_MAX);
+ BLI_join_dirfile(tmpstr, tmpstr, "New Folder");
+ while (BLI_exists(tmpstr)) {
+ BLI_snprintf(tmpdir, FILE_MAXFILE, "New Folder(%d)", i++);
+ BLI_strncpy(tmpstr, sfile->params->dir, FILE_MAX);
+ BLI_join_dirfile(tmpstr, tmpstr, tmpdir);
+ }
+ BLI_recurdir_fileops(tmpstr);
+ if (!BLI_exists(tmpstr)) {
+ filelist_free(sfile->files);
+ filelist_parent(sfile->files);
+ BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX);
+ }
+ }
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+
+void FILE_OT_directory_new(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Create New Directory";
+ ot->idname= "FILE_OT_directory_new";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= file_directory_new_exec;
+ ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+}
+
+int file_directory_exec(bContext *C, wmOperator *unused)
+{
+ char tmpstr[FILE_MAX];
+
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ if(sfile->params) {
+
+ if ( sfile->params->dir[0] == '~' ) {
+ if (sfile->params->dir[1] == '\0') {
+ BLI_strncpy(sfile->params->dir, BLI_gethome(), sizeof(sfile->params->dir) );
+ } else {
+ /* replace ~ with home */
+ char homestr[FILE_MAX];
+ char *d = &sfile->params->dir[1];
+
+ while ( (*d == '\\') || (*d == '/') )
+ d++;
+ BLI_strncpy(homestr, BLI_gethome(), FILE_MAX);
+ BLI_add_slash(homestr);
+ BLI_join_dirfile(tmpstr, homestr, d);
+ BLI_strncpy(sfile->params->dir, tmpstr, sizeof(sfile->params->dir));
+ }
+ }
+#ifdef WIN32
+ if (sfile->params->dir[0] == '\0')
+ get_default_root(sfile->params->dir);
+#endif
+ BLI_cleanup_dir(G.sce, sfile->params->dir);
+ BLI_add_slash(sfile->params->dir);
+ file_change_dir(sfile);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
}
- ED_area_tag_redraw(CTX_wm_area(C));
+
return OPERATOR_FINISHED;
+}
+
+int file_filename_exec(bContext *C, wmOperator *unused)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ if(sfile->params) {
+ if (file_select_match(sfile, sfile->params->file))
+ {
+ sfile->params->file[0] = '\0';
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
+ }
+ }
+ return OPERATOR_FINISHED;
}
@@ -594,14 +762,58 @@ void FILE_OT_refresh(struct wmOperatorType *ot)
ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
}
+int file_hidedot_exec(bContext *C, wmOperator *unused)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ if(sfile->params) {
+ sfile->params->flag ^= FILE_HIDE_DOT;
+ filelist_free(sfile->files);
+ sfile->params->active_file = -1;
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ }
+
+ return OPERATOR_FINISHED;
+
+}
+
+
+void FILE_OT_hidedot(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Toggle Hide Dot Files";
+ ot->idname= "FILE_OT_hidedot";
+
+ /* api callbacks */
+ ot->exec= file_hidedot_exec;
+ ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+}
+
struct ARegion *file_buttons_region(struct ScrArea *sa)
{
- ARegion *ar;
+ ARegion *ar, *arnew;
for(ar= sa->regionbase.first; ar; ar= ar->next)
if(ar->regiontype==RGN_TYPE_CHANNELS)
return ar;
- return NULL;
+
+ /* add subdiv level; after header */
+ for(ar= sa->regionbase.first; ar; ar= ar->next)
+ if(ar->regiontype==RGN_TYPE_HEADER)
+ break;
+
+ /* is error! */
+ if(ar==NULL) return NULL;
+
+ arnew= MEM_callocN(sizeof(ARegion), "buttons for file panels");
+
+ BLI_insertlinkafter(&sa->regionbase, ar, arnew);
+ arnew->regiontype= RGN_TYPE_CHANNELS;
+ arnew->alignment= RGN_ALIGN_LEFT;
+
+ arnew->flag = RGN_FLAG_HIDDEN;
+
+ return arnew;
}
int file_bookmark_toggle_exec(bContext *C, wmOperator *unused)
@@ -629,3 +841,78 @@ void FILE_OT_bookmark_toggle(struct wmOperatorType *ot)
ot->exec= file_bookmark_toggle_exec;
ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
}
+
+
+int file_filenum_exec(bContext *C, wmOperator *op)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ int inc = RNA_int_get(op->ptr, "increment");
+ if(sfile->params && (inc != 0)) {
+ BLI_newname(sfile->params->file, inc);
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+ }
+
+ return OPERATOR_FINISHED;
+
+}
+
+void FILE_OT_filenum(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Increment Number in Filename";
+ ot->idname= "FILE_OT_filenum";
+
+ /* api callbacks */
+ ot->exec= file_filenum_exec;
+ ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+
+ /* props */
+ RNA_def_int(ot->srna, "increment", 1, 0, 100, "Increment", "", 0,100);
+}
+
+int file_delete_poll(bContext *C)
+{
+ int poll = ED_operator_file_active(C);
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ struct direntry* file;
+
+ if(!sfile->params ) poll= 0;
+
+ if (sfile->params->active_file < 0) {
+ poll= 0;
+ } else {
+ file = filelist_file(sfile->files, sfile->params->active_file);
+ if (file && S_ISDIR(file->type)) poll= 0;
+ }
+ return poll;
+}
+
+int file_delete_exec(bContext *C, wmOperator *op)
+{
+ char str[FILE_MAX];
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ struct direntry* file;
+
+
+ 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_FILE | ND_FILELIST, NULL);
+
+ return OPERATOR_FINISHED;
+
+}
+
+void FILE_OT_delete(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Delete File";
+ ot->idname= "FILE_OT_delete";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= file_delete_exec;
+ ot->poll= file_delete_poll; /* <- important, handler is on window level */
+}
+
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
new file mode 100644
index 00000000000..96366b9f82b
--- /dev/null
+++ b/source/blender/editors/space_file/file_panels.c
@@ -0,0 +1,164 @@
+/**
+ * $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): Blender Foundation, Andrea Weikert
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "BKE_context.h"
+#include "BKE_screen.h"
+
+#include "BLI_blenlib.h"
+
+#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "RNA_access.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "file_intern.h"
+#include "fsmenu.h"
+
+#include <string.h>
+
+static void do_file_panel_events(bContext *C, void *arg, int event)
+{
+
+}
+
+static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory category, int icon, int allow_delete)
+{
+ uiBlock *block;
+ struct FSMenu* fsmenu = fsmenu_get();
+ int nentries = fsmenu_get_nentries(fsmenu, category);
+ int i;
+
+ uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT);
+ block= uiLayoutFreeBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_file_panel_events, NULL);
+ uiBlockSetEmboss(block, UI_EMBOSSP);
+ uiBlockBeginAlign(block);
+ for (i=0; i< nentries;++i) {
+ char dir[FILE_MAX];
+ char temp[FILE_MAX];
+ uiLayout* layout = uiLayoutRow(pa->layout, UI_LAYOUT_ALIGN_LEFT);
+ char *entry = fsmenu_get_entry(fsmenu, category, i);
+
+ /* create nice bookmark name, shows last directory in the full path currently */
+ BLI_strncpy(temp, entry, FILE_MAX);
+ BLI_add_slash(temp);
+ BLI_getlastdir(temp, dir, FILE_MAX);
+ BLI_del_slash(dir);
+
+ /* operator shows the short bookmark name, should eventually have tooltip */
+ uiItemStringO(layout, dir, icon, "FILE_OT_select_bookmark", "dir", entry);
+ if (allow_delete && fsmenu_can_save(fsmenu, category, i) )
+ uiItemIntO(layout, "", ICON_X, "FILE_OT_delete_bookmark", "index", i);
+ }
+ uiBlockEndAlign(block);
+}
+
+static void file_panel_system(const bContext *C, Panel *pa)
+{
+ file_panel_category(C, pa, FS_CATEGORY_SYSTEM, ICON_DISK_DRIVE, 0);
+}
+
+static void file_panel_bookmarks(const bContext *C, Panel *pa)
+{
+ file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, ICON_BOOKMARKS, 1);
+}
+
+
+static void file_panel_recent(const bContext *C, Panel *pa)
+{
+ file_panel_category(C, pa, FS_CATEGORY_RECENT, ICON_FILE_FOLDER, 0);
+}
+
+
+static void file_panel_operator(const bContext *C, Panel *pa)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ struct wmOperator *op = sfile ? sfile->op : NULL;
+ uiBlock *block;
+ int sy;
+
+ block= uiLayoutFreeBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_file_panel_events, NULL);
+
+ sy= 0;
+ if (op) {
+ uiBlockBeginAlign(block);
+ RNA_STRUCT_BEGIN(op->ptr, prop) {
+ if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
+ continue;
+ if(strcmp(RNA_property_identifier(prop), "filename") == 0)
+ continue;
+
+ uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0, 0, 0);
+ }
+ RNA_STRUCT_END;
+ uiBlockEndAlign(block);
+ }
+ uiBlockLayoutResolve(C, block, NULL, &sy);
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
+}
+
+
+void file_panels_register(ARegionType *art)
+{
+ PanelType *pt;
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype file system directories");
+ strcpy(pt->idname, "FILE_PT_system");
+ strcpy(pt->label, "System");
+ pt->draw= file_panel_system;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype file bookmarks");
+ strcpy(pt->idname, "FILE_PT_bookmarks");
+ strcpy(pt->label, "Bookmarks");
+ pt->draw= file_panel_bookmarks;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype file recent directories");
+ strcpy(pt->idname, "FILE_PT_recent");
+ strcpy(pt->label, "Recent");
+ pt->draw= file_panel_recent;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype file operator properties");
+ strcpy(pt->idname, "FILE_PT_operator");
+ strcpy(pt->label, "Operator");
+ pt->draw= file_panel_operator;
+ BLI_addtail(&art->paneltypes, pt);
+}
+
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 766dec7c064..6e442c654ca 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -123,6 +123,12 @@ typedef struct FileList
ListBase threads;
} FileList;
+typedef struct FolderList
+{
+ struct FolderList *next, *prev;
+ char *foldername;
+} FolderList;
+
#define SPECIAL_IMG_SIZE 48
#define SPECIAL_IMG_ROWS 4
#define SPECIAL_IMG_COLS 4
@@ -354,6 +360,86 @@ void filelist_free_icons()
}
}
+//-----------------FOLDERLIST (previous/next) --------------//
+struct ListBase* folderlist_new()
+{
+ ListBase* p = MEM_callocN( sizeof(ListBase), "folderlist" );
+ return p;
+}
+
+void folderlist_popdir(struct ListBase* folderlist, char *dir)
+{
+ const char *prev_dir;
+ struct FolderList *folder;
+ folder = folderlist->last;
+
+ if(folder){
+ // remove the current directory
+ MEM_freeN(folder->foldername);
+ BLI_freelinkN(folderlist, folder);
+
+ folder = folderlist->last;
+ if(folder){
+ prev_dir = folder->foldername;
+ BLI_strncpy(dir, prev_dir, FILE_MAXDIR);
+ }
+ }
+ // delete the folder next or use setdir directly before PREVIOUS OP
+}
+
+void folderlist_pushdir(ListBase* folderlist, const char *dir)
+{
+ struct FolderList *folder, *previous_folder;
+ previous_folder = folderlist->last;
+
+ // check if already exists
+ if(previous_folder){
+ if(! strcmp(previous_folder->foldername, dir)){
+ return;
+ }
+ }
+
+ // create next folder element
+ folder = (FolderList*)MEM_mallocN(sizeof(FolderList),"FolderList");
+ folder->foldername = (char*)MEM_mallocN(sizeof(char)*(strlen(dir)+1), "foldername");
+ folder->foldername[0] = '\0';
+
+ BLI_strncpy(folder->foldername, dir, FILE_MAXDIR);
+
+ // add it to the end of the list
+ BLI_addtail(folderlist, folder);
+}
+
+int folderlist_clear_next(struct SpaceFile *sfile)
+{
+ struct FolderList *folder;
+
+ // if there is no folder_next there is nothing we can clear
+ if (!sfile->folders_next)
+ return 0;
+
+ // if previous_folder, next_folder or refresh_folder operators are executed it doesn't clear folder_next
+ folder = sfile->folders_prev->last;
+ if ((!folder) ||(!strcmp(folder->foldername, sfile->params->dir)))
+ return 0;
+
+ // eventually clear flist->folders_next
+ return 1;
+}
+
+void folderlist_free(ListBase* folderlist)
+{
+ FolderList *folder;
+ if (folderlist){
+ for(folder= folderlist->last; folder; folder= folderlist->last) {
+ MEM_freeN(folder->foldername);
+ BLI_freelinkN(folderlist, folder);
+ }
+ }
+ folderlist= NULL;
+}
+
+//------------------FILELIST------------------------//
struct FileList* filelist_new()
{
FileList* p = MEM_callocN( sizeof(FileList), "filelist" );
@@ -375,7 +461,7 @@ void filelist_free(struct FileList* filelist)
int i;
if (!filelist) {
- printf("Attemtping to delete empty filelist.\n");
+ printf("Attempting to delete empty filelist.\n");
return;
}
@@ -823,16 +909,16 @@ void filelist_sort(struct FileList* filelist, short sort)
int num;/* , act= 0; */
switch(sort) {
- case FILE_SORTALPHA:
+ case FILE_SORT_ALPHA:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_name);
break;
- case FILE_SORTDATE:
+ case FILE_SORT_TIME:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_date);
break;
- case FILE_SORTSIZE:
+ case FILE_SORT_SIZE:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_size);
break;
- case FILE_SORTEXTENS:
+ case FILE_SORT_EXTENSION:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_extension);
}
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index f10c89926d6..dd3c2c766c1 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -38,6 +38,7 @@ extern "C" {
#endif
struct FileList;
+struct FolderList;
struct direntry;
struct BlendHandle;
struct Scene;
@@ -49,7 +50,6 @@ void filelist_free_icons();
struct FileList * filelist_copy(struct FileList* filelist);
int filelist_find(struct FileList* filelist, char *file);
void filelist_free(struct FileList* filelist);
-void filelist_freelib(struct FileList* filelist);
void filelist_sort(struct FileList* filelist, short sort);
int filelist_numfiles(struct FileList* filelist);
const char * filelist_dir(struct FileList* filelist);
@@ -71,6 +71,11 @@ int filelist_empty(struct FileList* filelist);
void filelist_parent(struct FileList* filelist);
void filelist_setfiletypes(struct FileList* filelist, short has_quicktime);
+struct ListBase * folderlist_new();
+void folderlist_free(struct ListBase* folderlist);
+void folderlist_popdir(struct ListBase* folderlist, char *dir);
+void folderlist_pushdir(struct ListBase* folderlist, const char *dir);
+int folderlist_clear_next(struct SpaceFile* sfile);
#ifdef __cplusplus
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index d57fc7f90bc..30712ea0b07 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -80,16 +80,27 @@
#include "file_intern.h"
#include "filelist.h"
+#if defined __BeOS
+static int fnmatch(const char *pattern, const char *string, int flags)
+{
+ return 0;
+}
+#elif defined WIN32 && !defined _LIBC
+ /* use fnmatch included in blenlib */
+ #include "BLI_fnmatch.h"
+#else
+ #include <fnmatch.h>
+#endif
FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile)
{
if (!sfile->params) {
- ED_fileselect_set_params(sfile, "", "/", 0, FILE_SHORTDISPLAY, 0, FILE_SORTALPHA);
+ ED_fileselect_set_params(sfile, "", NULL, "/", 0, FILE_SHORTDISPLAY, 0, FILE_SORT_ALPHA);
}
return sfile->params;
}
-short ED_fileselect_set_params(SpaceFile *sfile, const char *title, const char *path,
+short ED_fileselect_set_params(SpaceFile *sfile, const char *title, const char *last_dir, const char *path,
short flag, short display, short filter, short sort)
{
char name[FILE_MAX], dir[FILE_MAX], file[FILE_MAX];
@@ -107,14 +118,19 @@ short ED_fileselect_set_params(SpaceFile *sfile, const char *title, const char *
params->sort = sort;
BLI_strncpy(params->title, title, sizeof(params->title));
-
- BLI_strncpy(name, path, sizeof(name));
- BLI_convertstringcode(name, G.sce);
- BLI_split_dirfile(name, dir, file);
- BLI_strncpy(params->file, file, sizeof(params->file));
- BLI_strncpy(params->dir, dir, sizeof(params->dir));
- BLI_make_file_string(G.sce, params->dir, dir, ""); /* XXX needed ? - also solve G.sce */
+ if(last_dir){
+ BLI_strncpy(params->dir, last_dir, sizeof(params->dir));
+ }
+ else {
+ BLI_strncpy(name, path, sizeof(name));
+ BLI_convertstringcode(name, G.sce);
+
+ BLI_split_dirfile(name, dir, file);
+ BLI_strncpy(params->file, file, sizeof(params->file));
+ BLI_strncpy(params->dir, dir, sizeof(params->dir));
+ BLI_make_file_string(G.sce, params->dir, dir, ""); /* XXX needed ? - also solve G.sce */
+ }
return 1;
}
@@ -131,6 +147,9 @@ int ED_fileselect_layout_offset(FileLayout* layout, int x, int y)
int offsetx, offsety;
int active_file;
+ if (layout == NULL)
+ return NULL;
+
offsetx = (x)/(layout->tile_w + 2*layout->tile_border_x);
offsety = (y)/(layout->tile_h + 2*layout->tile_border_y);
@@ -159,7 +178,7 @@ float file_string_width(const char* str)
{
uiStyle *style= U.uistyles.first;
uiStyleFontSet(&style->widget);
- return BLF_width(str);
+ return BLF_width((char *)str);
}
float file_font_pointsize()
@@ -279,3 +298,68 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar
}
return sfile->layout;
}
+
+void file_change_dir(struct SpaceFile *sfile)
+{
+ if (sfile->params) {
+ if (BLI_exists(sfile->params->dir)) {
+ filelist_setdir(sfile->files, sfile->params->dir);
+
+ if(folderlist_clear_next(sfile))
+ folderlist_free(sfile->folders_next);
+
+ folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
+
+ filelist_free(sfile->files);
+ sfile->params->active_file = -1;
+ } else {
+ BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX);
+ }
+ }
+}
+
+int file_select_match(struct SpaceFile *sfile, const char *pattern)
+{
+ int match = 0;
+ if (strchr(pattern, '*') || strchr(pattern, '?') || strchr(pattern, '[')) {
+ int i;
+ struct direntry *file;
+ int n = filelist_numfiles(sfile->files);
+
+ for (i = 0; i < n; i++) {
+ file = filelist_file(sfile->files, i);
+ if (fnmatch(pattern, file->relname, 0) == 0) {
+ file->flags |= ACTIVE;
+ match = 1;
+ }
+ }
+ }
+ return match;
+}
+
+
+void autocomplete_directory(struct bContext *C, char *str, void *arg_v)
+{
+ char tmp[FILE_MAX];
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+
+ /* search if str matches the beginning of name */
+ if(str[0] && sfile->files) {
+ AutoComplete *autocpl= autocomplete_begin(str, FILE_MAX);
+ int nentries = filelist_numfiles(sfile->files);
+ int i;
+
+ for(i= 0; i<nentries; ++i) {
+ struct direntry* file = filelist_file(sfile->files, i);
+ char* dir = filelist_dir(sfile->files);
+ if (file && S_ISDIR(file->type)) {
+ BLI_make_file_string(G.sce, tmp, dir, file->relname);
+ autocomplete_do_name(autocpl,tmp);
+ }
+ }
+ autocomplete_end(autocpl, str);
+ if (BLI_exists(str)) {
+ BLI_add_slash(str);
+ }
+ }
+} \ No newline at end of file
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 59e8dcf82e6..a87ad4c4fd8 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -65,7 +65,6 @@ struct _FSMenuEntry {
char *path;
short save;
- short xs, ys;
};
typedef struct FSMenu
@@ -74,9 +73,6 @@ typedef struct FSMenu
FSMenuEntry *fsmenu_bookmarks;
FSMenuEntry *fsmenu_recent;
- FSMenuCategory selected_category;
- int selected_entry;
-
} FSMenu;
static FSMenu *g_fsmenu = NULL;
@@ -89,17 +85,6 @@ struct FSMenu* fsmenu_get(void)
return g_fsmenu;
}
-void fsmenu_select_entry(struct FSMenu* fsmenu, FSMenuCategory category, int index)
-{
- fsmenu->selected_category = category;
- fsmenu->selected_entry = index;
-}
-
-int fsmenu_is_selected(struct FSMenu* fsmenu, FSMenuCategory category, int index)
-{
- return (category==fsmenu->selected_category) && (index==fsmenu->selected_entry);
-}
-
static FSMenuEntry *fsmenu_get_category(struct FSMenu* fsmenu, FSMenuCategory category)
{
FSMenuEntry *fsms = NULL;
@@ -154,36 +139,16 @@ char *fsmenu_get_entry(struct FSMenu* fsmenu, FSMenuCategory category, int idx)
return fsme?fsme->path:NULL;
}
-void fsmenu_set_pos(struct FSMenu* fsmenu, FSMenuCategory category, int idx, short xs, short ys)
+short fsmenu_can_save (struct FSMenu* fsmenu, FSMenuCategory category, int idx)
{
FSMenuEntry *fsme;
for (fsme= fsmenu_get_category(fsmenu, category); fsme && idx; fsme= fsme->next)
idx--;
- if (fsme) {
- fsme->xs = xs;
- fsme->ys = ys;
- }
+ return fsme?fsme->save:0;
}
-int fsmenu_get_pos (struct FSMenu* fsmenu, FSMenuCategory category, int idx, short* xs, short* ys)
-{
- FSMenuEntry *fsme;
-
- for (fsme= fsmenu_get_category(fsmenu, category); fsme && idx; fsme= fsme->next)
- idx--;
-
- if (fsme) {
- *xs = fsme->xs;
- *ys = fsme->ys;
- return 1;
- }
-
- return 0;
-}
-
-
void fsmenu_insert_entry(struct FSMenu* fsmenu, FSMenuCategory category, char *path, int sorted, short save)
{
FSMenuEntry *prev;
diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h
index c51c45b7dc4..2cab622d523 100644
--- a/source/blender/editors/space_file/fsmenu.h
+++ b/source/blender/editors/space_file/fsmenu.h
@@ -52,22 +52,15 @@ int fsmenu_get_nentries (struct FSMenu* fsmenu, FSMenuCategory category);
*/
char* fsmenu_get_entry (struct FSMenu* fsmenu, FSMenuCategory category, int index);
-void fsmenu_select_entry (struct FSMenu* fsmenu, FSMenuCategory category, int index);
-
-int fsmenu_is_selected (struct FSMenu* fsmenu, FSMenuCategory category, int index);
-
- /** Sets the position of the fsmenu entry at @a index */
-void fsmenu_set_pos (struct FSMenu* fsmenu, FSMenuCategory category, int index, short xs, short ys);
-
- /** Returns the position of the fsmenu entry at @a index. return value is 1 if successful, 0 otherwise */
-int fsmenu_get_pos (struct FSMenu* fsmenu, FSMenuCategory category, int index, short* xs, short* ys);
-
/** Inserts a new fsmenu entry with the given @a path.
* Duplicate entries are not added.
* @param sorted Should entry be inserted in sorted order?
*/
void fsmenu_insert_entry (struct FSMenu* fsmenu, FSMenuCategory category, char *path, int sorted, short save);
+ /** Return whether the entry was created by the user and can be saved and deleted */
+short fsmenu_can_save (struct FSMenu* fsmenu, FSMenuCategory category, int index);
+
/** Removes the fsmenu entry at the given @a index. */
void fsmenu_remove_entry (struct FSMenu* fsmenu, FSMenuCategory category, int index);
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 37d8f2bffa4..5af79eb2800 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -34,6 +34,8 @@
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "RNA_access.h"
+
#include "MEM_guardedalloc.h"
#include "BIF_gl.h"
@@ -122,6 +124,18 @@ static void file_free(SpaceLink *sl)
sfile->files= NULL;
}
+ if(sfile->folders_prev) {
+ folderlist_free(sfile->folders_prev);
+ MEM_freeN(sfile->folders_prev);
+ sfile->folders_prev= NULL;
+ }
+
+ if(sfile->folders_next) {
+ folderlist_free(sfile->folders_next);
+ MEM_freeN(sfile->folders_next);
+ sfile->folders_next= NULL;
+ }
+
if (sfile->params) {
if(sfile->params->pupmenu)
MEM_freeN(sfile->params->pupmenu);
@@ -151,11 +165,15 @@ static SpaceLink *file_duplicate(SpaceLink *sl)
sfilen->op = NULL; /* file window doesn't own operators */
sfilen->files = filelist_new();
-
+ if(sfileo->folders_prev)
+ sfilen->folders_prev = MEM_dupallocN(sfileo->folders_prev);
+
+ if(sfileo->folders_next)
+ sfilen->folders_next = MEM_dupallocN(sfileo->folders_next);
+
if(sfileo->params) {
sfilen->params= MEM_dupallocN(sfileo->params);
-
- filelist_setdir(sfilen->files, sfilen->params->dir);
+ file_change_dir(sfilen);
}
if (sfileo->layout) {
sfilen->layout= MEM_dupallocN(sfileo->layout);
@@ -163,6 +181,48 @@ static SpaceLink *file_duplicate(SpaceLink *sl)
return (SpaceLink *)sfilen;
}
+static void file_refresh(const bContext *C, ScrArea *sa)
+{
+ SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
+ FileSelectParams *params = ED_fileselect_get_params(sfile);
+
+ if (!sfile->folders_prev)
+ sfile->folders_prev = folderlist_new();
+ if (!sfile->files) {
+ sfile->files = filelist_new();
+ file_change_dir(sfile);
+ params->active_file = -1; // added this so it opens nicer (ton)
+ }
+ filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT);
+ if (filelist_empty(sfile->files))
+ {
+ filelist_readdir(sfile->files);
+ }
+ filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0);
+ if(params->sort!=FILE_SORT_NONE) filelist_sort(sfile->files, params->sort);
+}
+
+static void file_listener(ScrArea *sa, wmNotifier *wmn)
+{
+ SpaceFile* sfile = (SpaceFile*)sa->spacedata.first;
+
+ /* context changes */
+ switch(wmn->category) {
+ case NC_FILE:
+ switch (wmn->data) {
+ case ND_FILELIST:
+ if (sfile->files) filelist_free(sfile->files);
+ ED_area_tag_refresh(sa);
+ ED_area_tag_redraw(sa);
+ break;
+ case ND_PARAMS:
+ ED_area_tag_refresh(sa);
+ ED_area_tag_redraw(sa);
+ break;
+ }
+ break;
+ }
+}
/* add handlers, stuff you only do once or on area/region changes */
static void file_main_area_init(wmWindowManager *wm, ARegion *ar)
@@ -171,8 +231,11 @@ static void file_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
- /* own keymap */
- keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); /* XXX weak? */
+ /* own keymaps */
+ keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+
+ keymap= WM_keymap_listbase(wm, "FileMain", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
@@ -188,31 +251,9 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
float col[3];
-
- if (!sfile->files) {
- sfile->files = filelist_new();
- filelist_setdir(sfile->files, params->dir);
- params->active_file = -1; // added this so it opens nicer (ton)
- }
layout = ED_fileselect_get_layout(sfile, ar);
- if (filelist_empty(sfile->files))
- {
- unsigned int filter = 0;
- filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT);
- if (params->flag & FILE_FILTER) {
- filter = params->filter ;
- } else {
- filter = 0;
- }
-
- filelist_setfilter(sfile->files, filter);
- filelist_readdir(sfile->files);
-
- if(params->sort!=FILE_SORTALPHA) filelist_sort(sfile->files, params->sort);
- }
-
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
@@ -272,24 +313,68 @@ void file_operatortypes(void)
WM_operatortype_append(FILE_OT_exec);
WM_operatortype_append(FILE_OT_cancel);
WM_operatortype_append(FILE_OT_parent);
+ WM_operatortype_append(FILE_OT_previous);
+ WM_operatortype_append(FILE_OT_next);
WM_operatortype_append(FILE_OT_refresh);
WM_operatortype_append(FILE_OT_bookmark_toggle);
+ WM_operatortype_append(FILE_OT_add_bookmark);
+ WM_operatortype_append(FILE_OT_delete_bookmark);
+ WM_operatortype_append(FILE_OT_hidedot);
+ WM_operatortype_append(FILE_OT_filenum);
+ WM_operatortype_append(FILE_OT_directory_new);
+ WM_operatortype_append(FILE_OT_delete);
}
/* NOTE: do not add .blend file reading on this level */
void file_keymap(struct wmWindowManager *wm)
{
+ wmKeymapItem *kmi;
+ /* keys for all areas */
ListBase *keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_bookmark_toggle", NKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_add_bookmark", BKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_hidedot", HKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_previous", BACKSPACEKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_next", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0);
+ /* WM_keymap_add_item(keymap, "FILE_OT_directory_new", IKEY, KM_PRESS, 0, 0); */ /* XXX needs button */
+ WM_keymap_add_item(keymap, "FILE_OT_delete", XKEY, KM_PRESS, 0, 0);
+
+ /* keys for main area */
+ keymap= WM_keymap_listbase(wm, "FileMain", SPACE_FILE, 0);
WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_highlight", MOUSEMOVE, KM_ANY, 0, 0);
- WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0);
-
WM_keymap_add_item(keymap, "FILE_OT_loadimages", TIMER1, KM_ANY, KM_ANY, 0);
-
- keymap= WM_keymap_listbase(wm, "FileBookmark", SPACE_FILE, 0);
- WM_keymap_add_item(keymap, "FILE_OT_select_bookmark", LEFTMOUSE, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0);
+ RNA_int_set(kmi->ptr, "increment", 1);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_int_set(kmi->ptr, "increment", 10);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_int_set(kmi->ptr, "increment", 100);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, 0,0);
+ RNA_int_set(kmi->ptr, "increment", -1);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_SHIFT, 0);
+ RNA_int_set(kmi->ptr, "increment", -10);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL, 0);
+ RNA_int_set(kmi->ptr, "increment",-100);
+
+ /* keys for button area (top) */
+ keymap= WM_keymap_listbase(wm, "FileButtons", SPACE_FILE, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0);
+ RNA_int_set(kmi->ptr, "increment", 1);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_int_set(kmi->ptr, "increment", 10);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_int_set(kmi->ptr, "increment", 100);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, 0, 0);
+ RNA_int_set(kmi->ptr, "increment", -1);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_SHIFT,0);
+ RNA_int_set(kmi->ptr, "increment", -10);
+ kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL,0);
+ RNA_int_set(kmi->ptr, "increment",-100);
}
@@ -297,60 +382,50 @@ static void file_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
ListBase *keymap;
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
+ ED_region_panels_init(wm, ar);
- /* own keymap */
- keymap= WM_keymap_listbase(wm, "FileBookmark", SPACE_FILE, 0);
- WM_event_add_keymap_handler_bb(&ar->handlers, keymap, NULL, NULL);
+ /* own keymaps */
+ keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0);
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
static void file_channel_area_draw(const bContext *C, ARegion *ar)
{
- View2D *v2d= &ar->v2d;
- float col[3];
-
- UI_GetThemeColor3fv(TH_PANEL, col);
- glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* data... */
- UI_view2d_view_ortho(C, v2d);
+ ED_region_panels(C, ar, 1, NULL);
+}
- file_draw_fsmenu(C, ar);
+static void file_channel_area_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+
+ }
}
/* add handlers, stuff you only do once or on area/region changes */
static void file_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+ ED_region_header_init(ar);
}
static void file_header_area_draw(const bContext *C, ARegion *ar)
{
- 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);
-
- file_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
/* add handlers, stuff you only do once or on area/region changes */
static void file_ui_area_init(wmWindowManager *wm, ARegion *ar)
{
+ ListBase *keymap;
+
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+
+ /* own keymap */
+ keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); /* XXX weak? */
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+
+ keymap= WM_keymap_listbase(wm, "FileButtons", SPACE_FILE, 0); /* XXX weak? */
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
static void file_ui_area_draw(const bContext *C, ARegion *ar)
@@ -386,6 +461,8 @@ void ED_spacetype_file(void)
st->free= file_free;
st->init= file_init;
st->duplicate= file_duplicate;
+ st->refresh= file_refresh;
+ st->listener= file_listener;
st->operatortypes= file_operatortypes;
st->keymap= file_keymap;
@@ -405,6 +482,7 @@ void ED_spacetype_file(void)
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
art->init= file_header_area_init;
art->draw= file_header_area_draw;
+ // art->listener= file_header_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: ui */
@@ -421,10 +499,12 @@ void ED_spacetype_file(void)
art->regionid = RGN_TYPE_CHANNELS;
art->minsizex= 240;
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->listener= file_channel_area_listener;
art->init= file_channel_area_init;
art->draw= file_channel_area_draw;
BLI_addhead(&st->regiontypes, art);
-
+ file_panels_register(art);
+
BKE_spacetype_register(st);
}
diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c
index 25890953320..ac15ed93ad0 100644
--- a/source/blender/editors/space_file/writeimage.c
+++ b/source/blender/editors/space_file/writeimage.c
@@ -153,6 +153,9 @@ void save_image_filesel_str(Scene *scene, char *str)
strcpy(str, "Save Radiance HDR");
break;
case R_FFMPEG:
+ case R_H264:
+ case R_XVID:
+ case R_THEORA:
case R_PNG:
strcpy(str, "Save PNG");
break;
diff --git a/source/blender/editors/space_graph/Makefile b/source/blender/editors/space_graph/Makefile
index 340495ecc79..e04a354fb1d 100644
--- a/source/blender/editors/space_graph/Makefile
+++ b/source/blender/editors/space_graph/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index a4babaad74c..0e48d56ac90 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -347,6 +347,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
}
/* ******************* f-modifiers ******************************** */
+/* all the drawing code is in editors/animation/fmodifier_ui.c */
#define B_FMODIFIER_REDRAW 20
@@ -360,671 +361,41 @@ static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event)
}
}
-/* macro for use here to draw background box and set height */
-// XXX for now, roundbox has it's callback func set to NULL to not intercept events
-#define DRAW_BACKDROP(height) \
- { \
- uiDefBut(block, ROUNDBOX, B_REDR, "", -3, *yco-height, width+3, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \
- }
-
-/* callback to verify modifier data */
-static void validate_fmodifier_cb (bContext *C, void *fcu_v, void *fcm_v)
-{
- FModifier *fcm= (FModifier *)fcm_v;
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
- /* call the verify callback on the modifier if applicable */
- if (fmi && fmi->verify_data)
- fmi->verify_data(fcm);
-}
-
-/* callback to set the active modifier */
-static void activate_fmodifier_cb (bContext *C, void *fcu_v, void *fcm_v)
-{
- FCurve *fcu= (FCurve *)fcu_v;
- FModifier *fcm= (FModifier *)fcm_v;
-
- /* call API function to set the active modifier for active F-Curve */
- fcurve_set_active_modifier(fcu, fcm);
-}
-
-/* callback to remove the given modifier */
-static void delete_fmodifier_cb (bContext *C, void *fcu_v, void *fcm_v)
-{
- FCurve *fcu= (FCurve *)fcu_v;
- FModifier *fcm= (FModifier *)fcm_v;
-
- /* remove the given F-Modifier from the F-Curve */
- fcurve_remove_modifier(fcu, fcm);
-}
-
-/* --------------- */
-
-/* draw settings for generator modifier */
-static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col)
-{
- FMod_Generator *data= (FMod_Generator *)fcm->data;
- char gen_mode[]="Generator Type%t|Expanded Polynomial%x0|Factorised Polynomial%x1|Built-In Function%x2|Expression%x3";
- char fn_type[]="Built-In Function%t|Sin%x0|Cos%x1|Tan%x2|Square Root%x3|Natural Log%x4";
- int cy= *yco - 30;
- uiBut *but;
-
- /* set the height */
- (*height) = 90;
- switch (data->mode) {
- case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */
- (*height) += 20*(data->poly_order+1) + 20;
- break;
- case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* factorised polynomial */
- (*height) += 20 * data->poly_order + 15;
- break;
- case FCM_GENERATOR_FUNCTION: /* builtin function */
- (*height) += 55; // xxx
- break;
- case FCM_GENERATOR_EXPRESSION: /* py-expression */
- // xxx nothing to draw
- break;
- }
-
- /* basic settings (backdrop + mode selector + some padding) */
- DRAW_BACKDROP((*height));
- uiBlockBeginAlign(block);
- but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, gen_mode, 10,cy,width-30,19, &data->mode, 0, 0, 0, 0, "Selects type of generator algorithm.");
- uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
- cy -= 20;
-
- uiDefButBitS(block, TOG, FCM_GENERATOR_ADDITIVE, B_FMODIFIER_REDRAW, "Additive", 10,cy,width-30,19, &data->flag, 0, 0, 0, 0, "Values generated by this modifier are applied on top of the existing values instead of overwriting them");
- cy -= 35;
- uiBlockEndAlign(block);
-
- /* now add settings for individual modes */
- switch (data->mode) {
- case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */
- {
- float *cp = NULL;
- char xval[32];
- unsigned int i;
-
- /* draw polynomial order selector */
- but= uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 10,cy,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
- uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
- cy -= 35;
-
- /* draw controls for each coefficient and a + sign at end of row */
- uiDefBut(block, LABEL, 1, "y = ", 0, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- cp= data->coefficients;
- for (i=0; (i < data->arraysize) && (cp); i++, cp++) {
- /* coefficient */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient for polynomial");
-
- /* 'x' param (and '+' if necessary) */
- if (i == 0)
- strcpy(xval, "");
- else if (i == 1)
- strcpy(xval, "x");
- else
- sprintf(xval, "x^%d", i);
- uiDefBut(block, LABEL, 1, xval, 200, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, "Power of x");
-
- if ( (i != (data->arraysize - 1)) || ((i==0) && data->arraysize==2) )
- uiDefBut(block, LABEL, 1, "+", 250, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- cy -= 20;
- }
- }
- break;
-
- case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* factorised polynomial expression */
- {
- float *cp = NULL;
- unsigned int i;
-
- /* draw polynomial order selector */
- but= uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 10,cy,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
- uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
- cy -= 35;
-
- /* draw controls for each pair of coefficients */
- uiDefBut(block, LABEL, 1, "y = ", 0, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- cp= data->coefficients;
- for (i=0; (i < data->poly_order) && (cp); i++, cp+=2) {
- /* opening bracket */
- uiDefBut(block, LABEL, 1, "(", 40, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- /* coefficients */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient of x");
-
- uiDefBut(block, LABEL, 1, "x + ", 150, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 180, cy, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Second coefficient");
-
- /* closing bracket and '+' sign */
- if ( (i != (data->poly_order - 1)) || ((i==0) && data->poly_order==2) )
- uiDefBut(block, LABEL, 1, ") â—Š", 280, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
- else
- uiDefBut(block, LABEL, 1, ")", 280, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- cy -= 20;
- }
- }
- break;
-
- case FCM_GENERATOR_FUNCTION: /* built-in function */
- {
- float *cp= data->coefficients;
-
- /* draw function selector */
- but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, fn_type, 10,cy,width-30,19, &data->func_type, 0, 0, 0, 0, "Built-In Function to use");
- uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
- cy -= 35;
-
- /* draw controls for equation of coefficients */
- /* row 1 */
- {
- uiDefBut(block, LABEL, 1, "y = ", 0, cy, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 50, cy, 150, 20, cp+3, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (D) for function");
- uiDefBut(block, LABEL, 1, "+", 200, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
- cy -= 20;
- }
-
- /* row 2 */
- {
- char func_name[32];
-
- /* coefficient outside bracket */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5, cy, 80, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (A) for function");
-
- /* opening bracket */
- switch (data->func_type)
- {
- case FCM_GENERATOR_FN_SIN: /* sine wave */
- sprintf(func_name, "sin(");
- break;
- case FCM_GENERATOR_FN_COS: /* cosine wave */
- sprintf(func_name, "cos(");
- break;
- case FCM_GENERATOR_FN_TAN: /* tangent wave */
- sprintf(func_name, "tan(");
- break;
- case FCM_GENERATOR_FN_LN: /* natural log */
- sprintf(func_name, "ln(");
- break;
- case FCM_GENERATOR_FN_SQRT: /* square root */
- sprintf(func_name, "sqrt(");
- break;
- default: /* unknown */
- sprintf(func_name, "<fn?>(");
- break;
- }
- uiDefBut(block, LABEL, 1, func_name, 85, cy, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- /* coefficients inside bracket */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 120, cy, 75, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (B) of x");
-
- uiDefBut(block, LABEL, 1, "x+", 195, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 225, cy, 80, 20, cp+2, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient (C) of function");
-
- /* closing bracket */
- uiDefBut(block, LABEL, 1, ")", 300, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
- cy -= 20;
- }
- }
- break;
-
- case FCM_GENERATOR_EXPRESSION: /* py-expression */
- // TODO...
- break;
- }
-}
-
-/* --------------- */
-
-/* draw settings for cycles modifier */
-static void draw_modifier__cycles(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col)
-{
- FMod_Cycles *data= (FMod_Cycles *)fcm->data;
- char cyc_mode[]="Cycling Mode%t|No Cycles%x0|Repeat Motion%x1|Repeat with Offset%x2|Repeat Mirrored%x3";
- int cy= (*yco - 30), cy1= (*yco - 50), cy2= (*yco - 70);
-
- /* set the height */
- (*height) = 80;
-
- /* basic settings (backdrop + some padding) */
- DRAW_BACKDROP((*height));
-
- /* 'before' range */
- uiDefBut(block, LABEL, 1, "Before:", 4, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe");
- uiBlockBeginAlign(block);
- uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 3,cy1,150,20, &data->before_mode, 0, 0, 0, 0, "Cycling mode to use before first keyframe");
- uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 3, cy2, 150, 20, &data->before_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
- uiBlockEndAlign(block);
-
- /* 'after' range */
- uiDefBut(block, LABEL, 1, "After:", 155, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling after last keyframe");
- uiBlockBeginAlign(block);
- uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 157,cy1,150,20, &data->after_mode, 0, 0, 0, 0, "Cycling mode to use after first keyframe");
- uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 157, cy2, 150, 20, &data->after_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
- uiBlockEndAlign(block);
-}
-
-/* --------------- */
-
-/* draw settings for noise modifier */
-static void draw_modifier__noise(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col)
-{
- FMod_Noise *data= (FMod_Noise *)fcm->data;
- int cy= (*yco - 30), cy1= (*yco - 50), cy2= (*yco - 70);
- char cyc_mode[]="Modification %t|Replace %x0|Add %x1|Subtract %x2|Multiply %x3";
-
- /* set the height */
- (*height) = 80;
-
- /* basic settings (backdrop + some padding) */
- DRAW_BACKDROP((*height));
-
- uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode,
- 3, cy, 150, 20, &data->modification, 0, 0, 0, 0, "Method of modifying the existing F-Curve use before first keyframe");
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Size:",
- 3, cy1, 150, 20, &data->size, 0.000001, 10000.0, 0.01, 3, "");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Strength:",
- 3, cy2, 150, 20, &data->strength, 0.0, 10000.0, 0.01, 3, "");
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Phase:",
- 155, cy1, 150, 20, &data->phase, 0.0, 100000.0, 0.1, 3, "");
- uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Depth:",
- 155, cy2, 150, 20, &data->depth, 0, 128, 1, 3, "");
-
-}
-
-/* --------------- */
-
-#define BINARYSEARCH_FRAMEEQ_THRESH 0.0001
-
-/* Binary search algorithm for finding where to insert Envelope Data Point.
- * Returns the index to insert at (data already at that index will be offset if replace is 0)
- */
-static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float frame, int arraylen, short *exists)
-{
- int start=0, end=arraylen;
- int loopbreaker= 0, maxloop= arraylen * 2;
-
- /* initialise exists-flag first */
- *exists= 0;
-
- /* sneaky optimisations (don't go through searching process if...):
- * - keyframe to be added is to be added out of current bounds
- * - keyframe to be added would replace one of the existing ones on bounds
- */
- if ((arraylen <= 0) || (array == NULL)) {
- printf("Warning: binarysearch_fcm_envelopedata_index() encountered invalid array \n");
- return 0;
- }
- else {
- /* check whether to add before/after/on */
- float framenum;
-
- /* 'First' Point (when only one point, this case is used) */
- framenum= array[0].time;
- if (IS_EQT(frame, framenum, BINARYSEARCH_FRAMEEQ_THRESH)) {
- *exists = 1;
- return 0;
- }
- else if (frame < framenum)
- return 0;
-
- /* 'Last' Point */
- framenum= array[(arraylen-1)].time;
- if (IS_EQT(frame, framenum, BINARYSEARCH_FRAMEEQ_THRESH)) {
- *exists= 1;
- return (arraylen - 1);
- }
- else if (frame > framenum)
- return arraylen;
- }
-
-
- /* most of the time, this loop is just to find where to put it
- * - 'loopbreaker' is just here to prevent infinite loops
- */
- for (loopbreaker=0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
- /* compute and get midpoint */
- int mid = start + ((end - start) / 2); /* we calculate the midpoint this way to avoid int overflows... */
- float midfra= array[mid].time;
-
- /* check if exactly equal to midpoint */
- if (IS_EQT(frame, midfra, BINARYSEARCH_FRAMEEQ_THRESH)) {
- *exists = 1;
- return mid;
- }
-
- /* repeat in upper/lower half */
- if (frame > midfra)
- start= mid + 1;
- else if (frame < midfra)
- end= mid - 1;
- }
-
- /* print error if loop-limit exceeded */
- if (loopbreaker == (maxloop-1)) {
- printf("Error: binarysearch_fcm_envelopedata_index() was taking too long \n");
-
- // include debug info
- printf("\tround = %d: start = %d, end = %d, arraylen = %d \n", loopbreaker, start, end, arraylen);
- }
-
- /* not found, so return where to place it */
- return start;
-}
-
-/* callback to add new envelope data point */
-// TODO: should we have a separate file for things like this?
-static void fmod_envelope_addpoint_cb (bContext *C, void *fcm_dv, void *dummy)
-{
- Scene *scene= CTX_data_scene(C);
- FMod_Envelope *env= (FMod_Envelope *)fcm_dv;
- FCM_EnvelopeData *fedn;
- FCM_EnvelopeData fed;
-
- /* init template data */
- fed.min= -1.0f;
- fed.max= 1.0f;
- fed.time= (float)scene->r.cfra; // XXX make this int for ease of use?
- fed.f1= fed.f2= 0;
-
- /* check that no data exists for the current frame... */
- if (env->data) {
- short exists = -1;
- int i= binarysearch_fcm_envelopedata_index(env->data, (float)(scene->r.cfra), env->totvert, &exists);
-
- /* binarysearch_...() will set exists by default to 0, so if it is non-zero, that means that the point exists already */
- if (exists)
- return;
-
- /* add new */
- fedn= MEM_callocN((env->totvert+1)*sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
-
- /* add the points that should occur before the point to be pasted */
- if (i > 0)
- memcpy(fedn, env->data, i*sizeof(FCM_EnvelopeData));
-
- /* add point to paste at index i */
- *(fedn + i)= fed;
-
- /* add the points that occur after the point to be pasted */
- if (i < env->totvert)
- memcpy(fedn+i+1, env->data+i, (env->totvert-i)*sizeof(FCM_EnvelopeData));
-
- /* replace (+ free) old with new */
- MEM_freeN(env->data);
- env->data= fedn;
-
- env->totvert++;
- }
- else {
- env->data= MEM_callocN(sizeof(FCM_EnvelopeData), "FCM_EnvelopeData");
- *(env->data)= fed;
-
- env->totvert= 1;
- }
-}
-
-/* callback to remove envelope data point */
-// TODO: should we have a separate file for things like this?
-static void fmod_envelope_deletepoint_cb (bContext *C, void *fcm_dv, void *ind_v)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm_dv;
- FCM_EnvelopeData *fedn;
- int index= GET_INT_FROM_POINTER(ind_v);
-
- /* check that no data exists for the current frame... */
- if (env->totvert > 1) {
- /* allocate a new smaller array */
- fedn= MEM_callocN(sizeof(FCM_EnvelopeData)*(env->totvert-1), "FCM_EnvelopeData");
-
- memcpy(fedn, &env->data, sizeof(FCM_EnvelopeData)*(index));
- memcpy(&fedn[index], &env->data[index+1], sizeof(FCM_EnvelopeData)*(env->totvert-index-1));
-
- /* free old array, and set the new */
- MEM_freeN(env->data);
- env->data= fedn;
- env->totvert--;
- }
- else {
- /* just free array, since the only vert was deleted */
- if (env->data)
- MEM_freeN(env->data);
- env->totvert= 0;
- }
-}
-
-/* draw settings for envelope modifier */
-static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col)
-{
- FMod_Envelope *env= (FMod_Envelope *)fcm->data;
- FCM_EnvelopeData *fed;
- uiBut *but;
- int cy= (*yco - 28);
- int i;
-
- /* set the height:
- * - basic settings + variable height from envelope controls
- */
- (*height) = 115 + (35 * env->totvert);
-
- /* basic settings (backdrop + general settings + some padding) */
- DRAW_BACKDROP((*height));
-
- /* General Settings */
- uiDefBut(block, LABEL, 1, "Envelope:", 10, cy, 100, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe");
- cy -= 20;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Reference Val:", 10, cy, 300, 20, &env->midval, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "");
- cy -= 20;
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 10, cy, 150, 20, &env->min, -UI_FLT_MAX, env->max, 10, 3, "Minimum value (relative to Reference Value) that is used as the 'normal' minimum value");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 160, cy, 150, 20, &env->max, env->min, UI_FLT_MAX, 10, 3, "Maximum value (relative to Reference Value) that is used as the 'normal' maximum value");
- cy -= 35;
- uiBlockEndAlign(block);
-
-
- /* Points header */
- uiDefBut(block, LABEL, 1, "Control Points:", 10, cy, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
-
- but= uiDefBut(block, BUT, B_FMODIFIER_REDRAW, "Add Point", 160,cy,150,19, NULL, 0, 0, 0, 0, "Adds a new control-point to the envelope on the current frame");
- uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
- cy -= 35;
-
- /* Points List */
- for (i=0, fed=env->data; i < env->totvert; i++, fed++) {
- uiBlockBeginAlign(block);
- but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 2, cy, 90, 20, &fed->time, -UI_FLT_MAX, UI_FLT_MAX, 10, 1, "Frame that envelope point occurs");
- uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
-
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 92, cy, 100, 20, &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Minimum bound of envelope at this point");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 192, cy, 100, 20, &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Maximum bound of envelope at this point");
-
- but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 292, cy, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point");
- uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
- uiBlockBeginAlign(block);
- cy -= 25;
- }
-}
-
-/* --------------- */
-
-/* draw settings for limits modifier */
-static void draw_modifier__limits(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco, short *height, short width, short active, int rb_col)
-{
- FMod_Limits *data= (FMod_Limits *)fcm->data;
- const int togButWidth = 50;
- const int textButWidth = ((width/2)-togButWidth);
-
- /* set the height */
- (*height) = 60;
-
- /* basic settings (backdrop + some padding) */
- DRAW_BACKDROP((*height));
-
- /* Draw Pairs of LimitToggle+LimitValue */
- uiBlockBeginAlign(block);
- uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMIN, B_FMODIFIER_REDRAW, "xMin", 5, *yco-30, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum x value");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+togButWidth, *yco-30, (textButWidth-5), 18, &data->rect.xmin, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Lowest x value to allow");
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMAX, B_FMODIFIER_REDRAW, "XMax", 5+(width-(textButWidth-5)-togButWidth), *yco-30, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum x value");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+(width-textButWidth-5), *yco-30, (textButWidth-5), 18, &data->rect.xmax, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Highest x value to allow");
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMIN, B_FMODIFIER_REDRAW, "yMin", 5, *yco-52, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum y value");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+togButWidth, *yco-52, (textButWidth-5), 18, &data->rect.ymin, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Lowest y value to allow");
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMAX, B_FMODIFIER_REDRAW, "YMax", 5+(width-(textButWidth-5)-togButWidth), *yco-52, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum y value");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5+(width-textButWidth-5), *yco-52, (textButWidth-5), 18, &data->rect.ymax, -UI_FLT_MAX, UI_FLT_MAX, 0.1,0.5,"Highest y value to allow");
- uiBlockEndAlign(block);
-}
-
-/* --------------- */
-
-static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fcm, int *yco)
-{
- FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
- uiBut *but;
- short active= (fcm->flag & FMODIFIER_FLAG_ACTIVE);
- short width= 314;
- short height = 0;
- int rb_col;
-
- /* draw header */
- {
- uiBlockSetEmboss(block, UI_EMBOSSN);
-
- /* rounded header */
- rb_col= (active)?-20:20;
- but= uiDefBut(block, ROUNDBOX, B_REDR, "", 0, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), "");
-
- /* expand */
- uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_EXPANDED, B_REDR, ICON_TRIA_RIGHT, 5, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is expanded.");
-
- /* checkbox for 'active' status (for now) */
- but= uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_ACTIVE, B_REDR, ICON_RADIOBUT_OFF, 25, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is active one.");
- uiButSetFunc(but, activate_fmodifier_cb, fcu, fcm);
-
- /* name */
- if (fmi)
- uiDefBut(block, LABEL, 1, fmi->name, 10+40, *yco, 150, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one.");
- else
- uiDefBut(block, LABEL, 1, "<Unknown Modifier>", 10+40, *yco, 150, 20, NULL, 0.0, 0.0, 0, 0, "F-Curve Modifier Type. Click to make modifier active one.");
-
- /* 'mute' button */
- uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_MUTED, B_REDR, ICON_MUTE_IPO_OFF, 10+(width-60), *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is temporarily muted (not evaluated).");
-
- /* delete button */
- but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 10+(width-30), *yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Delete F-Curve Modifier.");
- uiButSetFunc(but, delete_fmodifier_cb, fcu, fcm);
-
- uiBlockSetEmboss(block, UI_EMBOSS);
- }
-
- /* when modifier is expanded, draw settings */
- if (fcm->flag & FMODIFIER_FLAG_EXPANDED) {
- /* draw settings for individual modifiers */
- switch (fcm->type) {
- case FMODIFIER_TYPE_GENERATOR: /* Generator */
- draw_modifier__generator(block, fcu, fcm, yco, &height, width, active, rb_col);
- break;
-
- case FMODIFIER_TYPE_CYCLES: /* Cycles */
- draw_modifier__cycles(block, fcu, fcm, yco, &height, width, active, rb_col);
- break;
-
- case FMODIFIER_TYPE_ENVELOPE: /* Envelope */
- draw_modifier__envelope(block, fcu, fcm, yco, &height, width, active, rb_col);
- break;
-
- case FMODIFIER_TYPE_LIMITS: /* Limits */
- draw_modifier__limits(block, fcu, fcm, yco, &height, width, active, rb_col);
- break;
-
- case FMODIFIER_TYPE_NOISE: /* Noise */
- draw_modifier__noise(block, fcu, fcm, yco, &height, width, active, rb_col);
- break;
-
- default: /* unknown type */
- height= 96;
- //DRAW_BACKDROP(height); // XXX buggy...
- break;
- }
- }
-
- /* adjust height for new to start */
- (*yco) -= (height + 27);
-}
-
static void graph_panel_modifiers(const bContext *C, Panel *pa)
{
bAnimListElem *ale;
FCurve *fcu;
FModifier *fcm;
+ uiLayout *col, *row;
uiBlock *block;
- int yco= 190;
- if(!graph_panel_context(C, &ale, &fcu))
+ if (!graph_panel_context(C, &ale, &fcu))
return;
- block= uiLayoutFreeBlock(pa->layout);
+ block= uiLayoutGetBlock(pa->layout);
uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL);
/* 'add modifier' button at top of panel */
- // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
- uiDefButO(block, BUT, "GRAPHEDIT_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
+ {
+ row= uiLayoutRow(pa->layout, 0);
+ block= uiLayoutGetBlock(row);
+
+ // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
+ uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 0, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
+ }
/* draw each modifier */
- for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next)
- graph_panel_modifier_draw(block, fcu, fcm, &yco);
+ for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
+ col= uiLayoutColumn(pa->layout, 1);
+
+ ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);
+ }
MEM_freeN(ale);
}
/* ******************* general ******************************** */
-/* Find 'active' F-Curve. It must be editable, since that's the purpose of these buttons (subject to change).
- * We return the 'wrapper' since it contains valuable context info (about hierarchy), which will need to be freed
- * when the caller is done with it.
- */
-// TODO: move this to anim api with another name?
-bAnimListElem *get_active_fcurve_channel (bAnimContext *ac)
-{
- ListBase anim_data = {NULL, NULL};
- int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE | ANIMFILTER_CURVESONLY);
- int items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
-
- /* We take the first F-Curve only, since some other ones may have had 'active' flag set
- * if they were from linked data.
- */
- if (items) {
- bAnimListElem *ale= (bAnimListElem *)anim_data.first;
-
- /* remove first item from list, then free the rest of the list and return the stored one */
- BLI_remlink(&anim_data, ale);
- BLI_freelistN(&anim_data);
-
- return ale;
- }
-
- /* no active F-Curve */
- return NULL;
-}
-
void graph_buttons_register(ARegionType *art)
{
PanelType *pt;
@@ -1066,10 +437,10 @@ static int graph_properties(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_properties(wmOperatorType *ot)
+void GRAPH_OT_properties(wmOperatorType *ot)
{
ot->name= "Properties";
- ot->idname= "GRAPHEDIT_OT_properties";
+ ot->idname= "GRAPH_OT_properties";
ot->exec= graph_properties;
ot->poll= ED_operator_ipo_active; // xxx
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index acf712d0147..f8f613223db 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1,5 +1,5 @@
/**
- * $Id: drawipo.c 17512 2008-11-20 05:55:42Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -775,46 +775,6 @@ void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, Vie
glDisable(GL_BLEND);
}
-/* check if any FModifiers to draw controls for - fcm is 'active' modifier */
-static short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm)
-{
- /* don't draw if there aren't any modifiers at all */
- if (fcu->modifiers.first == NULL)
- return 0;
-
- /* if there's an active modifier - don't draw if it doesn't drastically
- * alter the curve...
- */
- if (fcm) {
- switch (fcm->type) {
- /* clearly harmless */
- case FMODIFIER_TYPE_CYCLES:
- return 0;
-
- /* borderline... */
- case FMODIFIER_TYPE_NOISE:
- return 0;
- }
- }
-
- /* if only one modifier - don't draw if it is muted or disabled */
- if (fcu->modifiers.first == fcu->modifiers.last) {
- fcm= fcu->modifiers.first;
- if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED))
- return 0;
- }
-
- /* if only active modifier - don't draw if it is muted or disabled */
- if (fcm) {
- if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED))
- return 0;
- }
-
- /* if we're still here, this means that there are modifiers with controls to be drawn */
- // FIXME: what happens if all the modifiers were muted/disabled
- return 1;
-}
-
/* This is called twice from space_graph.c -> graph_main_area_draw()
* Unselected then selected F-Curves are drawn so that they do not occlude each other.
*/
@@ -835,12 +795,12 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
*/
for (ale=anim_data.first; ale; ale=ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
- FModifier *fcm= fcurve_find_active_modifier(fcu);
- //Object *nob= ANIM_nla_mapping_get(ac, ale);
+ FModifier *fcm= find_active_fmodifier(&fcu->modifiers);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* map keyframes for drawing if scaled F-Curve */
- //if (nob)
- // ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 0);
+ if (adt)
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
/* draw curve:
* - curve line may be result of one or more destructive modifiers or just the raw data,
@@ -918,8 +878,8 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
}
/* undo mapping of keyframes for drawing if scaled F-Curve */
- //if (nob)
- // ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 0);
+ if (adt)
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
}
/* free list of curves */
@@ -1206,6 +1166,17 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
expand = ICON_TRIA_RIGHT;
}
+ /* for now, 'special' (i.e. in front of name) is used to show visibility status */
+ if (agrp->flag & AGRP_NOTVISIBLE)
+ special= ICON_CHECKBOX_DEHLT;
+ else
+ special= ICON_CHECKBOX_HLT;
+
+ if (agrp->flag & AGRP_MUTED)
+ mute = ICON_MUTE_IPO_ON;
+ else
+ mute = ICON_MUTE_IPO_OFF;
+
if (EDITABLE_AGRP(agrp))
protect = ICON_UNLOCKED;
else
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index a3d0b50b9a6..24c7a0c5c23 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1,5 +1,5 @@
/**
- * $Id: editaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -67,21 +67,22 @@
#include "BKE_fcurve.h"
#include "BKE_key.h"
#include "BKE_material.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "BKE_utildefines.h"
+#include "UI_interface.h"
#include "UI_view2d.h"
-#include "BIF_transform.h"
-
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframes_edit.h"
#include "ED_screen.h"
#include "ED_space_api.h"
+#include "ED_transform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -94,14 +95,15 @@
/* *************************** Calculate Range ************************** */
/* Get the min/max keyframes*/
-static void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax)
+/* note: it should return total boundbox, filter for selection only can be argument... */
+void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
/* get data to filter, from Dopesheet */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
@@ -114,16 +116,16 @@ static void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xm
if (anim_data.first) {
/* go through channels, finding max extents */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= NULL; //ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
float txmin, txmax, tymin, tymax;
/* get range and apply necessary scaling before */
calc_fcurve_bounds(fcu, &txmin, &txmax, &tymin, &tymax);
- if (nob) {
- txmin= get_action_frame_inv(nob, txmin);
- txmax= get_action_frame_inv(nob, txmax);
+ if (adt) {
+ txmin= BKE_nla_tweakedit_remap(adt, txmin, NLATIME_CONVERT_MAP);
+ txmax= BKE_nla_tweakedit_remap(adt, txmax, NLATIME_CONVERT_MAP);
}
/* try to set cur using these values, if they're more extreme than previously set values */
@@ -180,15 +182,15 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_previewrange_set (wmOperatorType *ot)
+void GRAPH_OT_previewrange_set (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Auto-Set Preview Range";
- ot->idname= "GRAPHEDIT_OT_previewrange_set";
+ ot->idname= "GRAPH_OT_previewrange_set";
/* api callbacks */
ot->exec= graphkeys_previewrange_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -227,15 +229,16 @@ static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_view_all (wmOperatorType *ot)
+void GRAPH_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
ot->name= "View All";
- ot->idname= "GRAPHEDIT_OT_view_all";
+ ot->idname= "GRAPH_OT_view_all";
+ ot->description= "Reset viewable area to show full keyframe range.";
/* api callbacks */
ot->exec= graphkeys_viewall_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -271,6 +274,7 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
for (ale= anim_data.first; ale; ale= ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
FCurve *gcu= MEM_callocN(sizeof(FCurve), "Ghost FCurve");
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
ChannelDriver *driver= fcu->driver;
FPoint *fpt;
int cfra;
@@ -286,8 +290,10 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
/* use the sampling callback at 1-frame intervals from start to end frames */
for (cfra= start; cfra <= end; cfra++, fpt++) {
- fpt->vec[0]= (float)cfra;
- fpt->vec[1]= fcurve_samplingcb_evalcurve(fcu, NULL, (float)cfra);
+ float cfrae= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
+
+ fpt->vec[0]= cfrae;
+ fpt->vec[1]= fcurve_samplingcb_evalcurve(fcu, NULL, cfrae);
}
/* set color of ghost curve
@@ -334,16 +340,16 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_ghost_curves_create (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create Ghost Curves";
- ot->idname= "GRAPHEDIT_OT_ghost_curves_create";
+ ot->idname= "GRAPH_OT_ghost_curves_create";
ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor.";
/* api callbacks */
ot->exec= graphkeys_create_ghostcurves_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -377,16 +383,16 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_ghost_curves_clear (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create Ghost Curves";
- ot->idname= "GRAPHEDIT_OT_ghost_curves_clear";
+ ot->idname= "GRAPH_OT_ghost_curves_clear";
ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor.";
/* api callbacks */
ot->exec= graphkeys_clear_ghostcurves_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_ipo_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -395,7 +401,104 @@ void GRAPHEDIT_OT_ghost_curves_clear (wmOperatorType *ot)
/* ************************************************************************** */
/* GENERAL STUFF */
-// TODO: insertkey
+/* ******************** Insert Keyframes Operator ************************* */
+
+/* defines for insert keyframes tool */
+EnumPropertyItem prop_graphkeys_insertkey_types[] = {
+ {1, "ALL", 0, "All Channels", ""},
+ {2, "SEL", 0, "Only Selected Channels", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* this function is responsible for snapping keyframes to frame-times */
+static void insert_graph_keys(bAnimContext *ac, short mode)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ Scene *scene= ac->scene;
+ float cfra= (float)CFRA;
+ short flag = 0;
+
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ if (mode == 2) filter |= ANIMFILTER_SEL;
+
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* init keyframing flag */
+ if (IS_AUTOKEY_FLAG(AUTOMATKEY)) flag |= INSERTKEY_MATRIX;
+ if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED;
+ // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE;
+
+ /* insert keyframes */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+ FCurve *fcu= (FCurve *)ale->key_data;
+
+ /* adjust current frame for NLA-mapping */
+ if (adt)
+ cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
+ else
+ cfra= (float)CFRA;
+
+ /* if there's an id */
+ if (ale->id)
+ insert_keyframe(ale->id, NULL, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ else
+ insert_vert_fcurve(fcu, cfra, fcu->curval, 0);
+ }
+
+ BLI_freelistN(&anim_data);
+}
+
+/* ------------------- */
+
+static int graphkeys_insertkey_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_CANCELLED;
+
+ /* which channels to affect? */
+ mode= RNA_enum_get(op->ptr, "type");
+
+ /* insert keyframes */
+ insert_graph_keys(&ac, mode);
+
+ /* validate keyframes after editing */
+ ANIM_editkeyframes_refresh(&ac);
+
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void GRAPH_OT_insert_keyframe (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Insert Keyframes";
+ ot->idname= "GRAPH_OT_insert_keyframe";
+ ot->description= "Insert keyframes for the specified channels.";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= graphkeys_insertkey_exec;
+ ot->poll= graphop_editable_keyframes_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* id-props */
+ RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", "");
+}
/* ******************** Click-Insert Keyframes Operator ************************* */
@@ -403,6 +506,7 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
{
bAnimContext ac;
bAnimListElem *ale;
+ AnimData *adt;
float frame, val;
/* get animation context */
@@ -420,14 +524,18 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
frame= RNA_float_get(op->ptr, "frame");
val= RNA_float_get(op->ptr, "value");
+ /* apply inverse NLA-mapping to frame to get correct time in un-scaled action */
+ adt= ANIM_nla_mapping_get(&ac, ale);
+ frame= BKE_nla_tweakedit_remap(adt, frame, NLATIME_CONVERT_UNMAP);
+
/* insert keyframe on the specified frame + value */
insert_vert_fcurve((FCurve *)ale->data, frame, val, 0);
/* free temp data */
MEM_freeN(ale);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* done */
return OPERATOR_FINISHED;
@@ -461,16 +569,17 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *
return graphkeys_click_insert_exec(C, op);
}
-void GRAPHEDIT_OT_keyframes_click_insert (wmOperatorType *ot)
+void GRAPH_OT_click_insert (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Click-Insert Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_click_insert";
+ ot->idname= "GRAPH_OT_click_insert";
+ ot->description= "Insert new keyframe at the cursor position for the active F-Curve.";
/* api callbacks */
ot->invoke= graphkeys_click_insert_invoke;
ot->exec= graphkeys_click_insert_exec;
- ot->poll= ED_operator_areaactive; // XXX active + editable poll
+ ot->poll= graphop_active_fcurve_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -538,21 +647,20 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
-
+ /* just return - no operator needed here (no changes) */
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_copy (wmOperatorType *ot)
+void GRAPH_OT_copy (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_copy";
+ ot->idname= "GRAPH_OT_copy";
+ ot->description= "Copy selected keyframes to the copy/paste buffer.";
/* api callbacks */
ot->exec= graphkeys_copy_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -577,21 +685,22 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_paste (wmOperatorType *ot)
+void GRAPH_OT_paste (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Paste Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_paste";
+ ot->idname= "GRAPH_OT_paste";
+ ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame.";
/* api callbacks */
ot->exec= graphkeys_paste_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -634,8 +743,8 @@ static int graphkeys_duplicate_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -650,16 +759,17 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *even
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_duplicate (wmOperatorType *ot)
+void GRAPH_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Duplicate Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_duplicate";
+ ot->idname= "GRAPH_OT_duplicate";
+ ot->description= "Make a copy of all selected keyframes.";
/* api callbacks */
ot->invoke= graphkeys_duplicate_invoke;
ot->exec= graphkeys_duplicate_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -705,22 +815,23 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_delete (wmOperatorType *ot)
+void GRAPH_OT_delete (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_delete";
+ ot->idname= "GRAPH_OT_delete";
+ ot->description= "Remove all selected keyframes.";
/* api callbacks */
ot->invoke= WM_operator_confirm;
ot->exec= graphkeys_delete_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -766,22 +877,23 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_clean (wmOperatorType *ot)
+void GRAPH_OT_clean (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clean Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_clean";
+ ot->idname= "GRAPH_OT_clean";
+ ot->description= "Simplify F-Curves by removing closely spaced keyframes.";
/* api callbacks */
//ot->invoke= // XXX we need that number popup for this!
ot->exec= graphkeys_clean_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -847,22 +959,24 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ // NOTE: some distinction between order/number of keyframes and type should be made?
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_bake (wmOperatorType *ot)
+void GRAPH_OT_bake (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Bake Curve";
- ot->idname= "GRAPHEDIT_OT_keyframes_bake";
+ ot->idname= "GRAPH_OT_bake";
+ ot->description= "Bake selected F-Curves to a set of sampled points defining a similar curve.";
/* api callbacks */
ot->invoke= WM_operator_confirm; // FIXME...
ot->exec= graphkeys_bake_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -973,21 +1087,22 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_sample (wmOperatorType *ot)
+void GRAPH_OT_sample (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Sample Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_sample";
+ ot->idname= "GRAPH_OT_sample";
+ ot->description= "Add keyframes on every frame between the selected keyframes.";
/* api callbacks */
ot->exec= graphkeys_sample_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1001,9 +1116,9 @@ void GRAPHEDIT_OT_keyframes_sample (wmOperatorType *ot)
/* defines for set extrapolation-type for selected keyframes tool */
EnumPropertyItem prop_graphkeys_expo_types[] = {
- {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", "Constant Extrapolation", ""},
- {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", "Linear Extrapolation", ""},
- {0, NULL, NULL, NULL}
+ {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""},
+ {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for setting extrapolation mode for keyframes */
@@ -1047,22 +1162,23 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_extrapolation_type (wmOperatorType *ot)
+void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Extrapolation";
- ot->idname= "GRAPHEDIT_OT_keyframes_extrapolation_type";
+ ot->idname= "GRAPH_OT_extrapolation_type";
+ ot->description= "Set extrapolation mode for selected F-Curves.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_expo_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1115,22 +1231,23 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_interpolation_type (wmOperatorType *ot)
+void GRAPH_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Interpolation";
- ot->idname= "GRAPHEDIT_OT_keyframes_interpolation_type";
+ ot->idname= "GRAPH_OT_interpolation_type";
+ ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_ipo_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1203,21 +1320,22 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_handletype (wmOperatorType *ot)
+void GRAPH_OT_handle_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Handle Type";
- ot->idname= "GRAPHEDIT_OT_keyframes_handletype";
+ ot->idname= "GRAPH_OT_handle_type";
+ ot->description= "Set type of handle for selected keyframes.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_handletype_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1298,15 +1416,15 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot)
+void GRAPH_OT_euler_filter (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Euler Filter";
- ot->idname= "GRAPHEDIT_OT_keyframes_euler_filter";
+ ot->idname= "GRAPH_OT_euler_filter";
/* api callbacks */
ot->exec= graphkeys_euler_filter_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1314,10 +1432,10 @@ void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot)
#endif // XXX this is not ready for the primetime yet
-/* ***************** Snap Current Frame Operator *********************** */
+/* ***************** Jump to Selected Frames Operator *********************** */
/* snap current-frame indicator to 'average time' of selected keyframe */
-static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op)
+static int graphkeys_framejump_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
ListBase anim_data= {NULL, NULL};
@@ -1333,11 +1451,21 @@ static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op)
memset(&bed, 0, sizeof(BeztEditData));
/* loop over action data, averaging values */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
- ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
+
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ }
+ else
+ ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
+
+ }
BLI_freelistN(&anim_data);
@@ -1353,15 +1481,16 @@ static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_cfrasnap (wmOperatorType *ot)
+void GRAPH_OT_frame_jump (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Current Frame to Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_cfrasnap";
+ ot->name= "Jump to Frame";
+ ot->idname= "GRAPH_OT_frame_jump";
+ ot->description= "Set the current frame to the average frame of the selected keyframes.";
/* api callbacks */
- ot->exec= graphkeys_cfrasnap_exec;
- ot->poll= ED_operator_areaactive;
+ ot->exec= graphkeys_framejump_exec;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1371,12 +1500,12 @@ void GRAPHEDIT_OT_keyframes_cfrasnap (wmOperatorType *ot)
/* defines for snap keyframes tool */
EnumPropertyItem prop_graphkeys_snap_types[] = {
- {GRAPHKEYS_SNAP_CFRA, "CFRA", "Current frame", ""},
- {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", "Nearest Frame", ""}, // XXX as single entry?
- {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", "Nearest Second", ""}, // XXX as single entry?
- {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", "Nearest Marker", ""},
- {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", "Flatten Handles", ""},
- {0, NULL, NULL, NULL}
+ {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", ""},
+ {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
+ {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
+ {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
+ {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for snapping keyframes to frame-times */
@@ -1405,12 +1534,12 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
/* snap keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
@@ -1438,22 +1567,23 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_snap (wmOperatorType *ot)
+void GRAPH_OT_snap (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_snap";
+ ot->idname= "GRAPH_OT_snap";
+ ot->description= "Snap selected keyframes to the times specified.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_snap_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1466,11 +1596,11 @@ void GRAPHEDIT_OT_keyframes_snap (wmOperatorType *ot)
/* defines for mirror keyframes tool */
EnumPropertyItem prop_graphkeys_mirror_types[] = {
- {GRAPHKEYS_MIRROR_CFRA, "CFRA", "Current frame", ""},
- {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", "Vertical Axis", ""},
- {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", "Horizontal Axis", ""},
- {GRAPHKEYS_MIRROR_MARKER, "MARKER", "First Selected Marker", ""},
- {0, NULL, NULL, NULL}
+ {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""},
+ {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""},
+ {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""},
+ {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* this function is responsible for mirroring keyframes */
@@ -1516,12 +1646,12 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
/* mirror keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
@@ -1549,22 +1679,23 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_mirror (wmOperatorType *ot)
+void GRAPH_OT_mirror (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mirror Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_mirror";
+ ot->idname= "GRAPH_OT_mirror";
+ ot->description= "Flip selected keyframes over the selected mirror line.";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_mirror_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1603,21 +1734,22 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_smooth (wmOperatorType *ot)
+void GRAPH_OT_smooth (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Smooth Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_smooth";
+ ot->idname= "GRAPH_OT_smooth";
+ ot->description= "Apply weighted moving means to make selected F-Curves less bumpy.";
/* api callbacks */
ot->exec= graphkeys_smooth_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_editable_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1626,7 +1758,35 @@ void GRAPHEDIT_OT_keyframes_smooth (wmOperatorType *ot)
/* ************************************************************************** */
/* F-CURVE MODIFIERS */
-/* ******************** Add F-Curve Modifier Operator *********************** */
+/* ******************** Add F-Modifier Operator *********************** */
+
+/* present a special customised popup menu for this, with some filtering */
+static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *event)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+ int i;
+
+ pup= uiPupMenuBegin(C, "Add F-Curve Modifier", 0);
+ layout= uiPupMenuLayout(pup);
+
+ /* start from 1 to skip the 'Invalid' modifier type */
+ for (i = 1; i < FMODIFIER_NUM_TYPES; i++) {
+ FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i);
+
+ /* check if modifier is valid for this context */
+ if (fmi == NULL)
+ continue;
+
+ /* add entry to add this type of modifier */
+ uiItemEnumO(layout, fmi->name, 0, "GRAPH_OT_fmodifier_add", "type", i);
+ }
+ uiItemS(layout);
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
{
@@ -1654,9 +1814,9 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
type= RNA_enum_get(op->ptr, "type");
/* add F-Modifier of specified type to active F-Curve, and make it the active one */
- fcm= fcurve_add_modifier(fcu, type);
+ fcm= add_fmodifier(&fcu->modifiers, type);
if (fcm)
- fcurve_set_active_modifier(fcu, fcm);
+ set_active_fmodifier(&fcu->modifiers, fcm);
else {
BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added. See console for details.");
return OPERATOR_CANCELLED;
@@ -1666,21 +1826,23 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
+ // FIXME: this really isn't the best description for it...
+ WM_event_add_notifier(C, NC_ANIMATION, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_fmodifier_add (wmOperatorType *ot)
+void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add F-Curve Modifier";
- ot->idname= "GRAPHEDIT_OT_fmodifier_add";
+ ot->idname= "GRAPH_OT_fmodifier_add";
+ ot->description= "Add F-Modifiers to the selected F-Curves.";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
+ ot->invoke= graph_fmodifier_add_invoke;
ot->exec= graph_fmodifier_add_exec;
- ot->poll= ED_operator_areaactive; // XXX need active F-Curve
+ ot->poll= graphop_active_fcurve_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c
index 178b4b4562f..eeede3ae95b 100644
--- a/source/blender/editors/space_graph/graph_header.c
+++ b/source/blender/editors/space_graph/graph_header.c
@@ -43,10 +43,13 @@
#include "BKE_screen.h"
#include "ED_anim_api.h"
+#include "ED_transform.h"
#include "ED_screen.h"
#include "ED_types.h"
#include "ED_util.h"
+#include "RNA_access.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -62,77 +65,175 @@
/* ********************************************************* */
/* Menu Defines... */
-/* button events */
-enum {
- B_REDR = 0,
- B_MODECHANGE,
-} eActHeader_ButEvents;
+static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceIpo *sipo= (SpaceIpo*)CTX_wm_space_data(C);
+ PointerRNA spaceptr;
+
+ /* retrieve state */
+ RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
+
+ /* create menu */
+ uiItemO(layout, NULL, ICON_MENU_PANEL, "GRAPH_OT_properties");
+
+ uiItemS(layout);
+
+ 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, "automerge_keyframes", 0, 0, 0);
+
+ if (sipo->flag & SIPO_DRAWTIME)
+ uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
+ else
+ uiItemO(layout, "Show Seconds", 0, "ANIM_OT_time_toggle");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_set");
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_clear");
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_previewrange_set");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_frame_jump");
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_view_all");
+
+ if (sa->full)
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
+ else
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctrl DownArrow
+}
-/* ************************ header area region *********************** */
+static void graph_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "GRAPH_OT_select_all_toggle");
+ uiItemBooleanO(layout, "Invert All", 0, "GRAPH_OT_select_all_toggle", "invert", 1);
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_select_border");
+ uiItemBooleanO(layout, "Border Axis Range", 0, "GRAPH_OT_select_border", "axis_range", 1);
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Columns on Selected Keys", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_KEYS);
+ uiItemEnumO(layout, "Column on Current Frame", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_CFRA);
+
+ uiItemEnumO(layout, "Columns on Selected Markers", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
+ uiItemEnumO(layout, "Between Selected Markers", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
+}
-static void do_viewmenu(bContext *C, void *arg, int event)
+static void graph_channelmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C);
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_toggle");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_enable");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_disable");
- switch (event) {
- case 1: /* Show time/frames */
- sipo->flag ^= SIPO_DRAWTIME;
- break;
- case 2: /* AutoMerge Keyframes */
- sipo->flag ^= SIPO_NOTRANSKEYCULL;
- break;
- case 3: /* Show/Hide handles */
- sipo->flag ^= SIPO_NOHANDLES;
- break;
- case 4: /* Show current frame number beside indicator */
- sipo->flag ^= SIPO_NODRAWCFRANUM;
- break;
- }
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_editable_toggle");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_expand");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_collapse");
}
-static uiBlock *graph_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void graph_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemEnumO(layout, "Grab/Move", 0, "TFM_OT_transform", "mode", TFM_TIME_TRANSLATE);
+ uiItemEnumO(layout, "Extend", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND);
+ uiItemEnumO(layout, "Scale", 0, "TFM_OT_transform", "mode", TFM_TIME_SCALE);
+}
+
+static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ 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);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_MARKER);
+}
+
+static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ 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);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_MARKER);
+}
+
+static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ 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);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_ALIGN);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO_ANIM); // xxx?
+}
+
+static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ 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);
+}
+
+static void graph_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
+}
+
+static void graph_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemMenuF(layout, "Transform", 0, graph_edit_transformmenu);
+ uiItemMenuF(layout, "Snap", 0, graph_edit_snapmenu);
+ uiItemMenuF(layout, "Mirror", 0, graph_edit_mirrormenu);
- block= uiBeginBlock(C, ar, "graph_viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_viewmenu, NULL);
+ uiItemS(layout);
- // XXX these options should use new menu-options
+ uiItemO(layout, NULL, 0, "GRAPH_OT_insert_keyframe");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_fmodifier_add");
- if (sipo->flag & SIPO_DRAWTIME) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- }
- else {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- }
+ uiItemS(layout);
+ uiItemO(layout, NULL, 0, "GRAPH_OT_duplicate");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_delete");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NOTRANSKEYCULL)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "AutoMerge Keyframes|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NOHANDLES)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "Show Handles|Ctrl H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NODRAWCFRANUM)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "Show Current Frame Number|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ uiItemS(layout);
- if (curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemMenuF(layout, "Handle Type", 0, graph_edit_handlesmenu);
+ uiItemMenuF(layout, "Interpolation Mode", 0, graph_edit_ipomenu);
+ uiItemMenuF(layout, "Extrapolation Mode", 0, graph_edit_expomenu);
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_clean");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_sample");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_bake");
+
+ uiItemS(layout);
- return block;
+ uiItemO(layout, NULL, 0, "GRAPH_OT_copy");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_paste");
}
+/* ********************************************************* */
+
+enum {
+ B_REDR = 0,
+ B_MODECHANGE,
+} eGraphEdit_Events;
+
static void do_graph_buttons(bContext *C, void *arg, int event)
{
switch (event) {
@@ -163,8 +264,19 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
int xmax;
xmax= GetButStringLength("View");
- uiDefPulldownBut(block, graph_viewmenu, CTX_wm_area(C),
- "View", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, graph_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Select");
+ uiDefMenuBut(block, graph_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Channel");
+ uiDefMenuBut(block, graph_channelmenu, NULL, "Channel", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Key");
+ uiDefMenuBut(block, graph_editmenu, NULL, "Key", xco, yco, xmax-3, 20, "");
xco+= xmax;
}
@@ -202,8 +314,8 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
/* copy + paste */
uiBlockBeginAlign(block);
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
+ uiDefIconButO(block, BUT, "GRAPH_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
+ uiDefIconButO(block, BUT, "GRAPH_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
uiBlockEndAlign(block);
xco += (XIC + 8);
@@ -225,9 +337,9 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
/* ghost curves */
// XXX these icons need to be changed
if (sipo->ghostCurves.first)
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_DATA_CURVE, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_DATA_CURVE, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance");
else
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_OB_CURVE, xco,yco,XIC,YIC, "Create snapshot (Ghosts) of selected F-Curves as background aid for this Graph Editor instance");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_OB_CURVE, xco,yco,XIC,YIC, "Create snapshot (Ghosts) of selected F-Curves as background aid for this Graph Editor instance");
xco+= XIC;
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 7ba636302a5..31f1c6d4301 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -32,6 +32,8 @@ struct bContext;
struct wmWindowManager;
struct bAnimContext;
struct bAnimListElem;
+struct FCurve;
+struct FModifier;
struct SpaceIpo;
struct ScrArea;
struct ARegion;
@@ -58,10 +60,10 @@ void graph_header_buttons(const bContext *C, struct ARegion *ar);
/* ***************************************** */
/* graph_select.c */
-void GRAPHEDIT_OT_keyframes_select_all_toggle(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_select_border(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_columnselect(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_clickselect(struct wmOperatorType *ot);
+void GRAPH_OT_select_all_toggle(struct wmOperatorType *ot);
+void GRAPH_OT_select_border(struct wmOperatorType *ot);
+void GRAPH_OT_select_column(struct wmOperatorType *ot);
+void GRAPH_OT_clickselect(struct wmOperatorType *ot);
/* defines for left-right select tool */
enum {
@@ -82,28 +84,31 @@ enum {
/* ***************************************** */
/* graph_edit.c */
-void GRAPHEDIT_OT_previewrange_set(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_view_all(struct wmOperatorType *ot);
+void get_graph_keyframe_extents (struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax);
-void GRAPHEDIT_OT_keyframes_click_insert(struct wmOperatorType *ot);
+void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
+void GRAPH_OT_view_all(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_copy(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_paste(struct wmOperatorType *ot);
+void GRAPH_OT_click_insert(struct wmOperatorType *ot);
+void GRAPH_OT_insert_keyframe(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_duplicate(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_delete(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_clean(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_sample(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_bake(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_smooth(struct wmOperatorType *ot);
+void GRAPH_OT_copy(struct wmOperatorType *ot);
+void GRAPH_OT_paste(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_handletype(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_interpolation_type(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_extrapolation_type(struct wmOperatorType *ot);
+void GRAPH_OT_duplicate(struct wmOperatorType *ot);
+void GRAPH_OT_delete(struct wmOperatorType *ot);
+void GRAPH_OT_clean(struct wmOperatorType *ot);
+void GRAPH_OT_sample(struct wmOperatorType *ot);
+void GRAPH_OT_bake(struct wmOperatorType *ot);
+void GRAPH_OT_smooth(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_cfrasnap(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_snap(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_mirror(struct wmOperatorType *ot);
+void GRAPH_OT_handle_type(struct wmOperatorType *ot);
+void GRAPH_OT_interpolation_type(struct wmOperatorType *ot);
+void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot);
+
+void GRAPH_OT_frame_jump(struct wmOperatorType *ot);
+void GRAPH_OT_snap(struct wmOperatorType *ot);
+void GRAPH_OT_mirror(struct wmOperatorType *ot);
/* defines for snap keyframes
* NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
@@ -128,20 +133,29 @@ enum {
/* ----------- */
-void GRAPHEDIT_OT_fmodifier_add(struct wmOperatorType *ot);
+void GRAPH_OT_fmodifier_add(struct wmOperatorType *ot);
/* ----------- */
-void GRAPHEDIT_OT_ghost_curves_create(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_ghost_curves_clear(struct wmOperatorType *ot);
+void GRAPH_OT_ghost_curves_create(struct wmOperatorType *ot);
+void GRAPH_OT_ghost_curves_clear(struct wmOperatorType *ot);
/* ***************************************** */
/* graph_buttons.c */
-void GRAPHEDIT_OT_properties(struct wmOperatorType *ot);
+void GRAPH_OT_properties(struct wmOperatorType *ot);
void graph_buttons_register(struct ARegionType *art);
+/* ***************************************** */
+/* graph_utils.c */
+
struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac);
+short fcurve_needs_draw_fmodifier_controls(struct FCurve *fcu, struct FModifier *fcm);
+
+int graphop_visible_keyframes_poll(struct bContext *C);
+int graphop_editable_keyframes_poll(struct bContext *C);
+int graphop_active_fcurve_poll(struct bContext *C);
+
/* ***************************************** */
/* graph_ops.c */
void graphedit_keymap(struct wmWindowManager *wm);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index a23f0081c04..68f4db555f8 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -47,8 +47,7 @@
#include "UI_view2d.h"
#include "ED_screen.h"
-
-#include "BIF_transform.h"
+#include "ED_transform.h"
#include "graph_intern.h"
@@ -58,6 +57,10 @@
#include "WM_api.h"
#include "WM_types.h"
+/* ************************** poll callbacks **********************************/
+
+
+
/* ************************** view-based operators **********************************/
// XXX this probably shouldn't be here..
@@ -80,15 +83,15 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_view_togglehandles (wmOperatorType *ot)
+void GRAPH_OT_view_togglehandles (wmOperatorType *ot)
{
/* identification */
ot->name= "Show/Hide All Handles";
- ot->idname= "GRAPHEDIT_OT_handles_view_toggle";
+ ot->idname= "GRAPH_OT_handles_view_toggle";
/* callbacks */
ot->exec= view_toggle_handles_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= ED_operator_ipo_active;
}
/* ************************** registration - operator types **********************************/
@@ -96,45 +99,44 @@ void GRAPHEDIT_OT_view_togglehandles (wmOperatorType *ot)
void graphedit_operatortypes(void)
{
/* view */
- WM_operatortype_append(GRAPHEDIT_OT_view_togglehandles);
- WM_operatortype_append(GRAPHEDIT_OT_previewrange_set);
- WM_operatortype_append(GRAPHEDIT_OT_view_all);
- WM_operatortype_append(GRAPHEDIT_OT_properties);
+ WM_operatortype_append(GRAPH_OT_view_togglehandles);
+ WM_operatortype_append(GRAPH_OT_previewrange_set);
+ WM_operatortype_append(GRAPH_OT_view_all);
+ WM_operatortype_append(GRAPH_OT_properties);
- WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_create);
- WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_clear);
+ WM_operatortype_append(GRAPH_OT_ghost_curves_create);
+ WM_operatortype_append(GRAPH_OT_ghost_curves_clear);
/* keyframes */
/* selection */
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_clickselect);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_select_all_toggle);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_select_border);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_columnselect);
+ WM_operatortype_append(GRAPH_OT_clickselect);
+ WM_operatortype_append(GRAPH_OT_select_all_toggle);
+ WM_operatortype_append(GRAPH_OT_select_border);
+ WM_operatortype_append(GRAPH_OT_select_column);
/* editing */
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_snap);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_mirror);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_cfrasnap);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_handletype);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_interpolation_type);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_extrapolation_type);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_sample);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_bake);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_smooth);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_clean);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_delete);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_duplicate);
-
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_copy);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_paste);
-
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_click_insert);
-
- //TODO: insertkey...
+ WM_operatortype_append(GRAPH_OT_snap);
+ WM_operatortype_append(GRAPH_OT_mirror);
+ WM_operatortype_append(GRAPH_OT_frame_jump);
+ WM_operatortype_append(GRAPH_OT_handle_type);
+ WM_operatortype_append(GRAPH_OT_interpolation_type);
+ WM_operatortype_append(GRAPH_OT_extrapolation_type);
+ WM_operatortype_append(GRAPH_OT_sample);
+ WM_operatortype_append(GRAPH_OT_bake);
+ WM_operatortype_append(GRAPH_OT_smooth);
+ WM_operatortype_append(GRAPH_OT_clean);
+ WM_operatortype_append(GRAPH_OT_delete);
+ WM_operatortype_append(GRAPH_OT_duplicate);
+
+ WM_operatortype_append(GRAPH_OT_copy);
+ WM_operatortype_append(GRAPH_OT_paste);
+
+ WM_operatortype_append(GRAPH_OT_insert_keyframe);
+ WM_operatortype_append(GRAPH_OT_click_insert);
/* F-Curve Modifiers */
// XXX temporary?
- WM_operatortype_append(GRAPHEDIT_OT_fmodifier_add);
+ WM_operatortype_append(GRAPH_OT_fmodifier_add);
}
/* ************************** registration - keymaps **********************************/
@@ -144,81 +146,82 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
wmKeymapItem *kmi;
/* view */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
/* graph_select.c - selection tools */
/* click-select */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "left_right", GRAPHKEYS_LRSEL_TEST);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "curves", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "curves", 1);
RNA_boolean_set(kmi->ptr, "extend", 1);
/* deselect all */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+ WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
/* borderselect */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
+ WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
/* column select */
// XXX KKEY would be nice to keep for 'keyframe' lines
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_CFRA);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_CFRA);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
/* graph_edit.c */
/* snap - current frame to selected keys */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_cfrasnap", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ // TODO: maybe since this is called jump, we're better to have it on <something>-J?
+ WM_keymap_add_item(keymap, "GRAPH_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* menu + single-step transform */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_handletype", HKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
/* destructive */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clean", OKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_smooth", OKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_clean", OKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_smooth", OKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_bake", CKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_bake", CKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
/* insertkey */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_click_insert", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_insert_keyframe", IKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_click_insert", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
/* copy/paste */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_paste", VKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
/* auto-set range */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
- /* F-Curve Modifiers */
- // XXX these are temporary? operators...
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ /* F-Modifiers */
+ WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* transform system */
@@ -233,7 +236,7 @@ void graphedit_keymap(wmWindowManager *wm)
/* keymap for all regions */
keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_properties", NKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
/* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module.
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index bb923ca6f95..c4885d095ed 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -1,5 +1,5 @@
/**
- * $Id: editaction.c 17746 2008-12-08 11:19:44Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -63,6 +63,7 @@
#include "BKE_fcurve.h"
#include "BKE_key.h"
#include "BKE_material.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_utildefines.h"
@@ -168,20 +169,21 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
deselect_graph_keys(&ac, 1, SELECT_ADD);
/* set notifier that things have changed */
- ED_area_tag_redraw(CTX_wm_area(C)); // FIXME... should be updating 'keyframes' data context or so instead!
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_select_all_toggle (wmOperatorType *ot)
+void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "GRAPHEDIT_OT_keyframes_select_all_toggle";
+ ot->idname= "GRAPH_OT_select_all_toggle";
+ ot->description= "Toggle selection of all keyframes.";
/* api callbacks */
ot->exec= graphkeys_deselectall_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
@@ -231,14 +233,14 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
/* loop over data, doing border select */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* set horizontal range (if applicable) */
if (mode != BEZT_OK_VALUERANGE) {
/* if channel is mapped in NLA, apply correction */
- if (nob) {
- bed.f1= get_action_frame(nob, rectf.xmin);
- bed.f2= get_action_frame(nob, rectf.xmax);
+ if (adt) {
+ bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP);
+ bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP);
}
else {
bed.f1= rectf.xmin;
@@ -301,21 +303,25 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
/* apply borderselect action */
borderselect_graphkeys(&ac, rect, mode, selectmode);
+ /* send notifier that keyframe selection has changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_select_border(wmOperatorType *ot)
+void GRAPH_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
- ot->idname= "GRAPHEDIT_OT_keyframes_select_border";
+ ot->idname= "GRAPH_OT_select_border";
+ ot->description= "Select all keyframes within the specified region.";
/* api callbacks */
ot->invoke= WM_border_select_invoke;
ot->exec= graphkeys_borderselect_exec;
ot->modal= WM_border_select_modal;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
@@ -340,11 +346,11 @@ void GRAPHEDIT_OT_keyframes_select_border(wmOperatorType *ot)
/* defines for column-select mode */
static EnumPropertyItem prop_column_select_types[] = {
- {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", "On Selected Keyframes", ""},
- {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", "On Current Frame", ""},
- {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", "On Selected Markers", ""},
- {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", "Between Min/Max Selected Markers", ""},
- {0, NULL, NULL, NULL}
+ {GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""},
+ {GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""},
+ {GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""},
+ {GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, "MARKERS_BETWEEN", 0, "Between Min/Max Selected Markers", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* ------------------- */
@@ -379,12 +385,12 @@ static void markers_selectkeys_between (bAnimContext *ac)
/* select keys in-between */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else {
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
@@ -450,15 +456,15 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the BeztEditData->list)
* - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
for (ce= bed.list.first; ce; ce= ce->next) {
/* set frame for validation callback to refer to */
- if (nob)
- bed.f1= get_action_frame(nob, ce->cfra);
+ if (ale)
+ bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
else
bed.f1= ce->cfra;
@@ -491,21 +497,22 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op)
else
columnselect_graph_keys(&ac, mode);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_SELECT);
+ /* set notifier that keyframe selection has changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_columnselect (wmOperatorType *ot)
+void GRAPH_OT_select_column (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "GRAPHEDIT_OT_keyframes_columnselect";
+ ot->idname= "GRAPH_OT_select_column";
+ ot->description= "Select all keyframes on the specified frame(s).";
/* api callbacks */
ot->exec= graphkeys_columnselect_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* flags */
ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
@@ -526,11 +533,11 @@ void GRAPHEDIT_OT_keyframes_columnselect (wmOperatorType *ot)
/* defines for left-right select tool */
static EnumPropertyItem prop_graphkeys_leftright_select_types[] = {
- {GRAPHKEYS_LRSEL_TEST, "CHECK", "Check if Select Left or Right", ""},
- {GRAPHKEYS_LRSEL_NONE, "OFF", "Don't select", ""},
- {GRAPHKEYS_LRSEL_LEFT, "LEFT", "Before current frame", ""},
- {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", "After current frame", ""},
- {0, NULL, NULL, NULL}
+ {GRAPHKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
+ {GRAPHKEYS_LRSEL_NONE, "OFF", 0, "Don't select", ""},
+ {GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
+ {GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* ------------------- */
@@ -566,11 +573,16 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc
for (ale= anim_data.first; ale; ale= ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* try to progressively get closer to the right point... */
if (fcu->bezt) {
BezTriple *bezt1=fcu->bezt, *prevbezt=NULL;
+ /* apply NLA mapping to all the keyframes */
+ if (adt)
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+
for (i=0; i < fcu->totvert; i++, prevbezt=bezt1, bezt1++) {
/* convert beztriple points to screen-space */
UI_view2d_to_region_no_clip(v2d, bezt1->vec[0][0], bezt1->vec[0][1], &sco[0][0], &sco[0][1]);
@@ -624,6 +636,10 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc
}
}
}
+
+ /* un-apply NLA mapping from all the keyframes */
+ if (adt)
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
}
@@ -722,7 +738,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s
/* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */
if (fcu->flag & FCURVE_SELECTED) {
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
- ANIM_set_active_channel(ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
}
}
@@ -753,7 +769,7 @@ static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, shor
memset(&bed, 0, sizeof(BeztEditFunc));
if (leftright == GRAPHKEYS_LRSEL_LEFT) {
- bed.f1 = -MAXFRAMEF;
+ bed.f1 = MINAFRAMEF;
bed.f2 = (float)(CFRA + 0.1f);
}
else {
@@ -767,12 +783,12 @@ static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, shor
/* select keys on the side where most data occurs */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
@@ -827,11 +843,11 @@ static void graphkeys_mselect_column (bAnimContext *ac, int mval[2], short selec
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* set frame for validation callback to refer to */
- if (nob)
- bed.f1= get_action_frame(nob, selx);
+ if (adt)
+ bed.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
else
bed.f1= selx;
@@ -901,22 +917,23 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev
mouse_graph_keys(&ac, mval, selectmode, 0);
}
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
+ /* set notifier that keyframe selection (and also channel selection in some cases) has changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT|ND_ANIMCHAN_SELECT, NULL);
/* for tweak grab to work */
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
}
-void GRAPHEDIT_OT_keyframes_clickselect (wmOperatorType *ot)
+void GRAPH_OT_clickselect (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mouse Select Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_clickselect";
+ ot->idname= "GRAPH_OT_clickselect";
+ ot->description= "Select keyframes by clicking on them.";
/* api callbacks */
ot->invoke= graphkeys_clickselect_invoke;
- ot->poll= ED_operator_areaactive;
+ ot->poll= graphop_visible_keyframes_poll;
/* id-props */
// XXX should we make this into separate operators?
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
new file mode 100644
index 00000000000..f00e7845549
--- /dev/null
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -0,0 +1,288 @@
+/**
+ * $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): Blender Foundation, Joshua Leung
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_arithb.h"
+#include "BLI_blenlib.h"
+#include "BLI_editVert.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_action.h"
+#include "BKE_context.h"
+#include "BKE_curve.h"
+#include "BKE_customdata.h"
+#include "BKE_depsgraph.h"
+#include "BKE_fcurve.h"
+#include "BKE_object.h"
+#include "BKE_global.h"
+#include "BKE_scene.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "BIF_gl.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframing.h"
+#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "graph_intern.h" // own include
+
+/* ************************************************************** */
+/* Active F-Curve */
+
+/* Find 'active' F-Curve. It must be editable, since that's the purpose of these buttons (subject to change).
+ * We return the 'wrapper' since it contains valuable context info (about hierarchy), which will need to be freed
+ * when the caller is done with it.
+ */
+bAnimListElem *get_active_fcurve_channel (bAnimContext *ac)
+{
+ ListBase anim_data = {NULL, NULL};
+ int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE | ANIMFILTER_CURVESONLY);
+ int items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* We take the first F-Curve only, since some other ones may have had 'active' flag set
+ * if they were from linked data.
+ */
+ if (items) {
+ bAnimListElem *ale= (bAnimListElem *)anim_data.first;
+
+ /* remove first item from list, then free the rest of the list and return the stored one */
+ BLI_remlink(&anim_data, ale);
+ BLI_freelistN(&anim_data);
+
+ return ale;
+ }
+
+ /* no active F-Curve */
+ return NULL;
+}
+
+/* ************************************************************** */
+/* Operator Polling Callbacks */
+
+/* check if any FModifiers to draw controls for - fcm is 'active' modifier
+ * used for the polling callbacks + also for drawing
+ */
+short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm)
+{
+ /* don't draw if there aren't any modifiers at all */
+ if (fcu->modifiers.first == NULL)
+ return 0;
+
+ /* if there's an active modifier - don't draw if it doesn't drastically
+ * alter the curve...
+ */
+ if (fcm) {
+ switch (fcm->type) {
+ /* clearly harmless */
+ case FMODIFIER_TYPE_CYCLES:
+ return 0;
+
+ /* borderline... */
+ case FMODIFIER_TYPE_NOISE:
+ return 0;
+ }
+ }
+
+ /* if only one modifier - don't draw if it is muted or disabled */
+ if (fcu->modifiers.first == fcu->modifiers.last) {
+ fcm= fcu->modifiers.first;
+ if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED))
+ return 0;
+ }
+
+ /* if only active modifier - don't draw if it is muted or disabled */
+ if (fcm) {
+ if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED))
+ return 0;
+ }
+
+ /* if we're still here, this means that there are modifiers with controls to be drawn */
+ // FIXME: what happens if all the modifiers were muted/disabled
+ return 1;
+}
+
+/* ------------------- */
+
+/* Check if there are any visible keyframes (for selection tools) */
+int graphop_visible_keyframes_poll (bContext *C)
+{
+ bAnimContext ac;
+ bAnimListElem *ale;
+ ListBase anim_data = {NULL, NULL};
+ ScrArea *sa= CTX_wm_area(C);
+ int filter, items;
+ short found = 0;
+
+ /* firstly, check if in Graph Editor */
+ // TODO: also check for region?
+ if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
+ return 0;
+
+ /* try to init Anim-Context stuff ourselves and check */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return 0;
+
+ /* loop over the visible (selection doesn't matter) F-Curves, and see if they're suitable
+ * stopping on the first successful match
+ */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+ if (items == 0)
+ return 0;
+
+ for (ale = anim_data.first; ale; ale= ale->next) {
+ FCurve *fcu= (FCurve *)ale->data;
+ FModifier *fcm;
+
+ /* visible curves for selection must fulfull the following criteria:
+ * - it has bezier keyframes
+ * - F-Curve modifiers do not interfere with the result too much
+ * (i.e. the modifier-control drawing check returns false)
+ */
+ if (fcu->bezt == NULL)
+ continue;
+ fcm= find_active_fmodifier(&fcu->modifiers);
+
+ found= (fcurve_needs_draw_fmodifier_controls(fcu, fcm) == 0);
+ if (found) break;
+ }
+
+ /* cleanup and return findings */
+ BLI_freelistN(&anim_data);
+ return found;
+}
+
+/* Check if there are any visible + editable keyframes (for editing tools) */
+int graphop_editable_keyframes_poll (bContext *C)
+{
+ bAnimContext ac;
+ bAnimListElem *ale;
+ ListBase anim_data = {NULL, NULL};
+ ScrArea *sa= CTX_wm_area(C);
+ int filter, items;
+ short found = 0;
+
+ /* firstly, check if in Graph Editor */
+ // TODO: also check for region?
+ if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
+ return 0;
+
+ /* try to init Anim-Context stuff ourselves and check */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return 0;
+
+ /* loop over the editable (selected + editable) F-Curves, and see if they're suitable
+ * stopping on the first successful match
+ */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+ if (items == 0)
+ return 0;
+
+ for (ale = anim_data.first; ale; ale= ale->next) {
+ FCurve *fcu= (FCurve *)ale->data;
+ FModifier *fcm;
+
+ /* editable curves must fulfull the following criteria:
+ * - it has bezier keyframes
+ * - it must not be protected from editing (this is already checked for with the foredit flag
+ * - F-Curve modifiers do not interfere with the result too much
+ * (i.e. the modifier-control drawing check returns false)
+ */
+ if (fcu->bezt == NULL)
+ continue;
+ fcm= find_active_fmodifier(&fcu->modifiers);
+
+ found= (fcurve_needs_draw_fmodifier_controls(fcu, fcm) == 0);
+ if (found) break;
+ }
+
+ /* cleanup and return findings */
+ BLI_freelistN(&anim_data);
+ return found;
+}
+
+/* has active F-Curve that's editable */
+int graphop_active_fcurve_poll (bContext *C)
+{
+ bAnimContext ac;
+ bAnimListElem *ale;
+ ScrArea *sa= CTX_wm_area(C);
+ short has_fcurve= 0;
+
+ /* firstly, check if in Graph Editor */
+ // TODO: also check for region?
+ if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
+ return 0;
+
+ /* try to init Anim-Context stuff ourselves and check */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return 0;
+
+ /* try to get the Active F-Curve */
+ ale= get_active_fcurve_channel(&ac);
+ if (ale == NULL)
+ return 0;
+
+ /* free temp data... */
+ has_fcurve= ((ale->data) && (ale->type == ANIMTYPE_FCURVE));
+ MEM_freeN(ale);
+
+ /* return success */
+ return has_fcurve;
+}
+
+/* ************************************************************** */
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 74002f64187..c36d790f0be 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -68,23 +68,25 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
{
ARegion *ar, *arnew;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
if(ar->regiontype==RGN_TYPE_UI)
return ar;
+ }
- /* add subdiv level; after channel */
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_CHANNELS)
+ /* add subdiv level; after main window */
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if(ar->regiontype==RGN_TYPE_WINDOW)
break;
+ }
/* is error! */
if(ar==NULL) return NULL;
- arnew= MEM_callocN(sizeof(ARegion), "buttons for view3d");
+ arnew= MEM_callocN(sizeof(ARegion), "buttons for nla");
BLI_insertlinkafter(&sa->regionbase, ar, arnew);
arnew->regiontype= RGN_TYPE_UI;
- arnew->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
+ arnew->alignment= RGN_ALIGN_RIGHT;
arnew->flag = RGN_FLAG_HIDDEN;
@@ -117,7 +119,7 @@ static SpaceLink *graph_new(const bContext *C)
ar->alignment= RGN_ALIGN_BOTTOM;
/* channels */
- ar= MEM_callocN(sizeof(ARegion), "main area for graphedit");
+ ar= MEM_callocN(sizeof(ARegion), "channels area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
ar->regiontype= RGN_TYPE_CHANNELS;
@@ -126,11 +128,11 @@ static SpaceLink *graph_new(const bContext *C)
ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
/* ui buttons */
- ar= MEM_callocN(sizeof(ARegion), "main area for graphedit");
+ ar= MEM_callocN(sizeof(ARegion), "buttons area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_TOP|RGN_SPLIT_PREV;
+ ar->alignment= RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main area */
@@ -192,7 +194,7 @@ static SpaceLink *graph_duplicate(SpaceLink *sl)
SpaceIpo *sipon= MEM_dupallocN(sl);
/* clear or remove stuff from old */
- //sipon->ipokey.first= sipon->ipokey.last= NULL;
+ BLI_duplicatelist(&sipon->ghostCurves, &((SpaceIpo *)sl)->ghostCurves);
sipon->ads= MEM_dupallocN(sipon->ads);
return (SpaceLink *)sipon;
@@ -243,6 +245,12 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
/* draw curves twice - unselected, then selected, so that the are fewer occlusion problems */
graph_draw_curves(&ac, sipo, ar, grid, 0);
graph_draw_curves(&ac, sipo, ar, grid, 1);
+
+ /* XXX the slow way to set tot rect... but for nice sliders needed (ton) */
+ get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax);
+ /* extra offset so that these items are visible */
+ v2d->tot.xmin -= 10.0f;
+ v2d->tot.xmax += 10.0f;
}
/* only free grid after drawing data, as we need to use it to determine sampling rate */
@@ -361,6 +369,9 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
case NC_SCENE:
switch(wmn->data) {
case ND_OB_ACTIVE:
@@ -391,6 +402,9 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
{
/* context changes */
switch (wmn->category) {
+ case NC_ANIMATION:
+ ED_area_tag_refresh(sa);
+ break;
case NC_SCENE:
/*switch (wmn->data) {
case ND_OB_ACTIVE:
@@ -562,7 +576,7 @@ void ED_spacetype_ipo(void)
/* regions: UI buttons */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_UI;
- art->minsizey= 200;
+ art->minsizex= 200;
art->keymapflag= ED_KEYMAP_UI;
art->listener= graph_region_listener;
art->init= graph_buttons_area_init;
diff --git a/source/blender/editors/space_image/Makefile b/source/blender/editors/space_image/Makefile
index 44d841a0606..e7e9a9b5665 100644
--- a/source/blender/editors/space_image/Makefile
+++ b/source/blender/editors/space_image/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 35004a4bdef..edf9bcbd896 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -383,41 +383,7 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block
}
}
-static void image_panel_game_properties(const bContext *C, Panel *pa)
-{
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- ImBuf *ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
- uiBlock *block;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_image_panel_events, NULL);
-
- if (ibuf) {
- char str[128];
-
- image_info(sima->image, ibuf, str);
- uiDefBut(block, LABEL, B_NOP, str, 10,180,300,19, 0, 0, 0, 0, 0, "");
-
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, IMA_TWINANIM, B_TWINANIM, "Anim", 10,150,140,19, &sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of animated texture");
- uiDefButS(block, NUM, B_TWINANIM, "Start:", 10,130,140,19, &sima->image->twsta, 0.0, 128.0, 0, 0, "Displays the start frame of an animated texture");
- uiDefButS(block, NUM, B_TWINANIM, "End:", 10,110,140,19, &sima->image->twend, 0.0, 128.0, 0, 0, "Displays the end frame of an animated texture");
- uiDefButS(block, NUM, B_NOP, "Speed", 10,90,140,19, &sima->image->animspeed, 1.0, 100.0, 0, 0, "Displays Speed of the animation in frames per second");
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, IMA_TILES, B_SIMAGETILE, "Tiles", 160,150,140,19, &sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of tilemode for faces (Shift LMB to pick the tile for selected faces)");
- uiDefButS(block, NUM, B_REDR, "X:", 160,130,70,19, &sima->image->xrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the X direction");
- uiDefButS(block, NUM, B_REDR, "Y:", 230,130,70,19, &sima->image->yrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the Y direction");
- uiBlockBeginAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, IMA_CLAMP_U, B_REDR, "ClampX", 160,100,70,19, &sima->image->tpageflag, 0, 0, 0, 0, "Disable texture repeating horizontaly");
- uiDefButBitS(block, TOG, IMA_CLAMP_V, B_REDR, "ClampY", 230,100,70,19, &sima->image->tpageflag, 0, 0, 0, 0, "Disable texture repeating vertically");
- uiBlockEndAlign(block);
- }
-}
-
+#if 0
static void image_panel_view_properties(const bContext *C, Panel *pa)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
@@ -474,6 +440,7 @@ static void image_panel_view_properties(const bContext *C, Panel *pa)
}
image_editcursor_buts(C, &ar->v2d, block);
}
+#endif
void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
int evt_nop, int evt_change,
@@ -1058,42 +1025,53 @@ static void image_load_fs_cb(bContext *C, void *ima_pp_v, void *iuser_v)
static void image_multi_cb(bContext *C, void *rr_v, void *iuser_v)
{
BKE_image_multilayer_index(rr_v, iuser_v);
+ WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
}
static void image_multi_inclay_cb(bContext *C, void *rr_v, void *iuser_v)
{
RenderResult *rr= rr_v;
ImageUser *iuser= iuser_v;
int tot= BLI_countlist(&rr->layers) + (rr->rectf?1:0); /* fake compo result layer */
- if(iuser->layer<tot-1)
+
+ if(iuser->layer<tot-1) {
iuser->layer++;
- BKE_image_multilayer_index(rr, iuser);
+ BKE_image_multilayer_index(rr, iuser);
+ WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
+ }
}
static void image_multi_declay_cb(bContext *C, void *rr_v, void *iuser_v)
{
ImageUser *iuser= iuser_v;
- if(iuser->layer>0)
+
+ if(iuser->layer>0) {
iuser->layer--;
- BKE_image_multilayer_index(rr_v, iuser);
+ BKE_image_multilayer_index(rr_v, iuser);
+ WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
+ }
}
static void image_multi_incpass_cb(bContext *C, void *rr_v, void *iuser_v)
{
RenderResult *rr= rr_v;
ImageUser *iuser= iuser_v;
RenderLayer *rl= BLI_findlink(&rr->layers, iuser->layer);
+
if(rl) {
int tot= BLI_countlist(&rl->passes) + (rl->rectf?1:0); /* builtin render result has no combined pass in list */
if(iuser->pass<tot-1) {
iuser->pass++;
BKE_image_multilayer_index(rr, iuser);
+ WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
}
}
}
static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v)
{
ImageUser *iuser= iuser_v;
+
if(iuser->pass>0) {
iuser->pass--;
BKE_image_multilayer_index(rr_v, iuser);
+ WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
}
}
@@ -1110,7 +1088,7 @@ static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v)
}
if ((G.fileflags & G_AUTOPACK) == 0) {
- unpackImage(ima, PF_ASK);
+ unpackImage(NULL, ima, PF_ASK); /* XXX report errors */
ED_undo_push(C, "Unpack image");
}
}
@@ -1119,7 +1097,7 @@ static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v)
if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) {
// XXX error("Can't pack painted image. Save image or use Repack as PNG.");
} else {
- ima->packedfile = newPackedFile(ima->name);
+ ima->packedfile = newPackedFile(NULL, ima->name); /* XXX report errors */
ED_undo_push(C, "Pack image");
}
}
@@ -1388,6 +1366,23 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
uiBlockEndAlign(block);
}
+void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
+{
+ uiBlock *block= uiLayoutFreeBlock(layout);
+ Scene *scene= CTX_data_scene(C);
+ RenderResult *rr;
+
+ /* render layers and passes */
+ if(ima && iuser) {
+ rr= BKE_image_get_renderresult(scene, ima);
+
+ if(rr) {
+ uiBlockBeginAlign(block);
+ uiblock_layer_pass_buttons(block, rr, iuser, 0, 0, 0, 160);
+ uiBlockEndAlign(block);
+ }
+ }
+}
static void image_panel_properties(const bContext *C, Panel *pa)
{
@@ -1412,18 +1407,6 @@ void image_buttons_register(ARegionType *art)
pt->draw= image_panel_properties;
BLI_addtail(&art->paneltypes, pt);
- pt= MEM_callocN(sizeof(PanelType), "spacetype image panel game properties");
- strcpy(pt->idname, "IMAGE_PT_game_properties");
- strcpy(pt->label, "Game Properties");
- pt->draw= image_panel_game_properties;
- BLI_addtail(&art->paneltypes, pt);
-
- pt= MEM_callocN(sizeof(PanelType), "spacetype image view properties");
- strcpy(pt->idname, "IMAGE_PT_view_properties");
- strcpy(pt->label, "View Properties");
- pt->draw= image_panel_view_properties;
- BLI_addtail(&art->paneltypes, pt);
-
pt= MEM_callocN(sizeof(PanelType), "spacetype image panel paint");
strcpy(pt->idname, "IMAGE_PT_paint");
strcpy(pt->label, "Paint");
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 122e298baaa..e5d74e6dddd 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -127,14 +127,13 @@ static void image_verify_buffer_float(SpaceImage *sima, ImBuf *ibuf)
}
}
-static void draw_render_info(SpaceImage *sima, ARegion *ar)
+static void draw_render_info(Image *ima, ARegion *ar)
{
rcti rect;
float colf[3];
int showspare= 0; // XXX BIF_show_render_spare();
- char *str= "render text"; // XXX BIF_render_text();
- if(str==NULL)
+ if(ima->render_text==NULL)
return;
rect= ar->winrct;
@@ -152,10 +151,10 @@ static void draw_render_info(SpaceImage *sima, ARegion *ar)
if(showspare) {
UI_DrawString(12, rect.ymin + 5, "(Previous)");
- UI_DrawString(72, rect.ymin + 5, str);
+ UI_DrawString(72, rect.ymin + 5, ima->render_text);
}
else
- UI_DrawString(12, rect.ymin + 5, str);
+ UI_DrawString(12, rect.ymin + 5, ima->render_text);
}
void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf)
@@ -311,12 +310,14 @@ static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, fl
// glColorMask(1, 1, 1, 1);
}
+#ifdef WITH_LCMS
static void sima_draw_colorcorrected_pixels(float x1, float y1, ImBuf *ibuf)
{
colorcorrection_do_ibuf(ibuf, "MONOSCNR.ICM"); /* path is hardcoded here, find some place better */
glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->crect);
}
+#endif
static void sima_draw_zbuf_pixels(float x1, float y1, int rectx, int recty, int *recti)
{
@@ -450,7 +451,7 @@ static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty,
return rectmain;
}
-static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Image *ima, ImBuf *ibuf, float zoomx, float zoomy)
+static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Image *ima, ImBuf *ibuf, float fx, float fy, float zoomx, float zoomy)
{
unsigned int *rect;
int dx, dy, sx, sy, x, y;
@@ -477,7 +478,7 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Image *ima, I
/* draw repeated */
for(sy=0; sy+dy<=ibuf->y; sy+= dy) {
for(sx=0; sx+dx<=ibuf->x; sx+= dx) {
- UI_view2d_view_to_region(&ar->v2d, (float)sx/(float)ibuf->x, (float)sy/(float)ibuf->y, &x, &y);
+ UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx/(float)ibuf->x, fy + (float)sy/(float)ibuf->y, &x, &y);
glaDrawPixelsSafe(x, y, dx, dy, dx, GL_RGBA, GL_UNSIGNED_BYTE, rect);
}
@@ -488,16 +489,19 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Image *ima, I
MEM_freeN(rect);
}
-static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *scene, ImBuf *ibuf, float zoomx, float zoomy)
+static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float zoomx, float zoomy)
{
float x, y;
double time_current;
time_current = PIL_check_seconds_timer();
- for(x=ar->v2d.cur.xmin; x<ar->v2d.cur.xmax; x += zoomx) {
- for(y=ar->v2d.cur.ymin; y<ar->v2d.cur.ymax; y += zoomy) {
- draw_image_buffer(sima, ar, scene, ibuf, x, y, zoomx, zoomy);
+ for(x=floor(ar->v2d.cur.xmin); x<ar->v2d.cur.xmax; x += 1.0f) {
+ for(y=floor(ar->v2d.cur.ymin); y<ar->v2d.cur.ymax; y += 1.0f) {
+ if(ima && (ima->tpageflag & IMA_TILES))
+ draw_image_buffer_tiled(sima, ar, ima, ibuf, x, y, zoomx, zoomy);
+ else
+ draw_image_buffer(sima, ar, scene, ibuf, x, y, zoomx, zoomy);
/* only draw until running out of time */
if((PIL_check_seconds_timer() - time_current) > 0.25)
@@ -667,9 +671,9 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
if(ibuf==NULL)
draw_image_grid(ar, zoomx, zoomy);
else if(sima->flag & SI_DRAW_TILE)
- draw_image_buffer_repeated(sima, ar, scene, ibuf, zoomx, zoomy);
+ draw_image_buffer_repeated(sima, ar, scene, ima, ibuf, zoomx, zoomy);
else if(ima && (ima->tpageflag & IMA_TILES))
- draw_image_buffer_tiled(sima, ar, ima, ibuf, zoomx, zoomy);
+ draw_image_buffer_tiled(sima, ar, ima, ibuf, 0.0f, 0.0, zoomx, zoomy);
else
draw_image_buffer(sima, ar, scene, ibuf, 0.0f, 0.0f, zoomx, zoomy);
@@ -680,8 +684,8 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
draw_image_paint_helpers(sima, ar, scene, zoomx, zoomy);
/* render info */
- if(ibuf && show_render)
- draw_render_info(sima, ar);
+ if(ibuf && ima && show_render)
+ draw_render_info(ima, ar);
/* XXX integrate this code */
#if 0
@@ -699,12 +703,5 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
}
}
#endif
-
-#if 0
- /* it is important to end a view in a transform compatible with buttons */
- bwin_scalematrix(sa->win, sima->blockscale, sima->blockscale, sima->blockscale);
- if(!(G.rendering && show_render))
- image_blockhandlers(sa);
-#endif
}
diff --git a/source/blender/editors/space_image/image_header.c b/source/blender/editors/space_image/image_header.c
index 9451a22fe6f..e4cd5c77703 100644
--- a/source/blender/editors/space_image/image_header.c
+++ b/source/blender/editors/space_image/image_header.c
@@ -56,6 +56,7 @@
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
@@ -64,7 +65,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BIF_transform.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -87,95 +87,6 @@
#define B_SIMA_RECORD 8
#define B_SIMA_PLAY 9
-static void image_view_viewnavmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- int a;
-
- uiItemO(layout, NULL, 0, "IMAGE_OT_view_zoom_in");
- uiItemO(layout, NULL, 0, "IMAGE_OT_view_zoom_out");
-
- uiItemS(layout);
-
- for(a=0; a<7; a++) {
- const int ratios[7][2] = {{1, 8}, {1, 4}, {1, 2}, {1, 1}, {2, 1}, {4, 1}, {8, 1}};
- char namestr[128];
-
- sprintf(namestr, "Zoom %d:%d", ratios[a][0], ratios[a][1]);
- uiItemFloatO(layout, namestr, 0, "IMAGE_OT_view_zoom_ratio", "ratio", (float)ratios[a][0]/(float)ratios[a][1]);
- }
-}
-
-#if 0
-static void do_viewmenu(bContext *C, void *arg, int event)
-{
- add_blockhandler(curarea, IMAGE_HANDLER_VIEW_PROPERTIES, UI_PNL_UNSTOW);
- add_blockhandler(curarea, IMAGE_HANDLER_PROPERTIES, UI_PNL_UNSTOW);
- add_blockhandler(curarea, IMAGE_HANDLER_PAINT, UI_PNL_UNSTOW);
- add_blockhandler(curarea, IMAGE_HANDLER_CURVES, UI_PNL_UNSTOW);
-
- toggle_blockhandler(curarea, IMAGE_HANDLER_PREVIEW, 0);
- scrarea_queue_winredraw(curarea);
-
- add_blockhandler(curarea, IMAGE_HANDLER_GAME_PROPERTIES, UI_PNL_UNSTOW);
- add_blockhandler(curarea, IMAGE_HANDLER_GREASEPENCIL, UI_PNL_UNSTOW);
-
- allqueue(REDRAWIMAGE, 0);
- allqueue(REDRAWVIEW3D, 0);
-}
-#endif
-
-static void image_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- bScreen *sc= CTX_wm_screen(C);
- ScrArea *sa= CTX_wm_area(C);
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- PointerRNA spaceptr, uvptr;
- int show_paint, show_render, show_uvedit;
-
- /* retrieve state */
- RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &spaceptr);
- RNA_pointer_create(&sc->id, &RNA_SpaceUVEditor, sima, &uvptr);
-
- show_render= ED_space_image_show_render(sima);
- show_paint= ED_space_image_show_paint(sima);
- show_uvedit= ED_space_image_show_uvedit(sima, CTX_data_edit_object(C));
-
- /* create menu */
- uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_properties");
- //if(show_render) uiItemO(layout, NULL, ICON_MENU_PANEL, "IMAGE_OT_toggle_compositing_preview_panel"); // Compositing Preview...|Shift P
-
- uiItemS(layout);
-
- uiItemR(layout, NULL, 0, &spaceptr, "update_automatically", 0, 0, 0);
- // XXX if(show_uvedit) uiItemR(layout, NULL, 0, &uvptr, "local_view", 0, 0, 0); // "UV Local View", Numpad /
-
- uiItemS(layout);
-
- uiItemMenuF(layout, "View Navigation", 0, image_view_viewnavmenu);
- if(show_uvedit) uiItemO(layout, NULL, 0, "IMAGE_OT_view_selected");
- uiItemO(layout, NULL, 0, "IMAGE_OT_view_all");
-
- if(sa->full) uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
- else uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow
-}
-
-static void image_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemO(layout, NULL, 0, "UV_OT_select_border");
- uiItemBooleanO(layout, "Border Select Pinned", 0, "UV_OT_select_border", "pinned", 1); // Border Select Pinned|Shift B
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "UV_OT_select_all_toggle");
- uiItemO(layout, NULL, 0, "UV_OT_select_invert");
- uiItemO(layout, NULL, 0, "UV_OT_unlink_selection");
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "UV_OT_select_pinned");
- uiItemO(layout, NULL, 0, "UV_OT_select_linked");
-}
-
#if 0
static void do_image_imagemenu(void *arg, int event)
{
@@ -184,61 +95,7 @@ static void do_image_imagemenu(void *arg, int event)
if (event >= 20) BPY_menu_do_python(PYMENU_IMAGE, event - 20);
#endif
}
-#endif
-
-static void image_imagemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- bScreen *sc= CTX_wm_screen(C);
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- PointerRNA spaceptr, imaptr;
- Image *ima;
- ImBuf *ibuf;
- int show_render;
-
- /* retrieve state */
- ima= ED_space_image(sima);
- ibuf= ED_space_image_buffer(sima);
-
- show_render= ED_space_image_show_render(sima);
-
- RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &spaceptr);
-
- /* create menu */
- uiItemO(layout, NULL, 0, "IMAGE_OT_new"); // New...
- uiItemO(layout, NULL, 0, "IMAGE_OT_open"); // Open...
-
- if(ima) {
- if(!show_render) {
- uiItemO(layout, NULL, 0, "IMAGE_OT_replace"); // Replace...
- uiItemO(layout, NULL, 0, "IMAGE_OT_reload"); // Reload...
- }
- uiItemO(layout, NULL, 0, "IMAGE_OT_save"); // Save
- uiItemO(layout, NULL, 0, "IMAGE_OT_save_as"); // Save As...
- if(ima->source == IMA_SRC_SEQUENCE)
- uiItemO(layout, NULL, 0, "IMAGE_OT_save_sequence"); // Save Changed Sequence Images
- if(!show_render) {
- uiItemS(layout);
-
- if(ima->packedfile) uiItemO(layout, NULL, 0, "IMAGE_OT_unpack"); // Unpack Image...
- else uiItemO(layout, NULL, 0, "IMAGE_OT_pack"); // Pack Image
-
- /* only for dirty && specific image types : XXX poll? */
- if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
- if(ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_GENERATED) && ima->type != IMA_TYPE_MULTILAYER)
- uiItemBooleanO(layout, "Pack As PNG", 0, "IMAGE_OT_pack", "as_png", 1); // Pack Image As PNG
-
- uiItemS(layout);
-
- uiItemR(layout, NULL, 0, &spaceptr, "image_painting", 0, 0, 0);
-
- /* move to realtime properties panel */
- RNA_id_pointer_create(&ima->id, &imaptr);
- uiItemMenuEnumR(layout, NULL, 0, &imaptr, "mapping");
- }
- }
-
-#if 0
#ifndef DISABLE_PYTHON
{
BPyMenu *pym;
@@ -254,33 +111,6 @@ static void image_imagemenu(bContext *C, uiLayout *layout, void *arg_unused)
}
#endif
#endif
-}
-
-static void image_uvs_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemO(layout, NULL, 0, "UV_OT_reveal");
- uiItemO(layout, NULL, 0, "UV_OT_hide");
- uiItemBooleanO(layout, "Hide Unselected", 0, "UV_OT_hide", "unselected", 1);
-}
-
-static void image_uvs_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TRANSLATION);
- uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_ROTATION);
- uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_RESIZE);
-}
-
-static void image_uvs_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemEnumO(layout, NULL, 0, "UV_OT_mirror", "axis", 'x'); // "X Axis", M, 1
- uiItemEnumO(layout, NULL, 0, "UV_OT_mirror", "axis", 'y'); // "Y Axis", M, 2
-}
-
-static void image_uvs_weldalignmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemO(layout, NULL, 0, "UV_OT_weld"); // W, 1
- uiItemsEnumO(layout, "UV_OT_align", "axis"); // W, 2/3/4
-}
#if 0
#ifndef DISABLE_PYTHON
@@ -317,87 +147,7 @@ static void image_uvs_scriptsmenu (void *args_unused)
#endif /* DISABLE_PYTHON */
#endif
-static void image_uvsmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- bScreen *sc= CTX_wm_screen(C);
- Scene *scene= CTX_data_scene(C);
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- PointerRNA uvptr, sceneptr;
- Image *ima;
- ImBuf *ibuf;
-
- /* retrieve state */
- ima= ED_space_image(sima);
- ibuf= ED_space_image_buffer(sima);
-
- RNA_pointer_create(&sc->id, &RNA_SpaceUVEditor, sima, &uvptr);
- RNA_id_pointer_create(&scene->id, &sceneptr);
-
- /* create menu */
- uiItemR(layout, NULL, 0, &uvptr, "snap_to_pixels", 0, 0, 0);
- uiItemR(layout, NULL, 0, &uvptr, "constrain_to_image_bounds", 0, 0, 0);
-
- uiItemS(layout);
-
- uiItemR(layout, NULL, 0, &uvptr, "live_unwrap", 0, 0, 0);
- uiItemO(layout, NULL, 0, "UV_OT_unwrap");
- uiItemBooleanO(layout, "Unpin", 0, "UV_OT_pin", "clear", 1);
- uiItemO(layout, NULL, 0, "UV_OT_pin");
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "UV_OT_pack_islands");
- uiItemO(layout, NULL, 0, "UV_OT_average_islands_scale");
- uiItemO(layout, NULL, 0, "UV_OT_minimize_stretch");
- uiItemO(layout, NULL, 0, "UV_OT_stitch");
-
- uiItemS(layout);
-
- uiItemMenuF(layout, "Transform", 0, image_uvs_transformmenu);
- uiItemMenuF(layout, "Mirror", 0, image_uvs_mirrormenu);
- uiItemMenuF(layout, "Weld/Align", 0, image_uvs_weldalignmenu);
-
- uiItemS(layout);
-
- uiItemR(layout, NULL, 0, &sceneptr, "proportional_editing", 0, 0, 0);
- uiItemMenuEnumR(layout, NULL, 0, &sceneptr, "proportional_editing_falloff");
-
- uiItemS(layout);
-
- uiItemMenuF(layout, "Show/Hide Faces", 0, image_uvs_showhidemenu);
-
#if 0
-#ifndef DISABLE_PYTHON
- uiItemS(layout);
-
- uiItemMenuF(layout, "Scripts", image_uvs_scriptsmenu);
-#endif
-#endif
-}
-
-static void image_menu_uvlayers(Object *obedit, char *menustr, int *active)
-{
- Mesh *me= (Mesh*)obedit->data;
- EditMesh *em= BKE_mesh_get_editmesh(me);
- CustomDataLayer *layer;
- int i, count = 0;
-
- menustr[0]= '\0';
-
- for(i=0; i<em->fdata.totlayer; i++) {
- layer = &em->fdata.layers[i];
-
- if(layer->type == CD_MTFACE) {
- menustr += sprintf(menustr, "%s%%x%d|", layer->name, count);
- count++;
- }
- }
-
- *active= CustomData_get_active_layer(&em->fdata, CD_MTFACE);
-
- BKE_mesh_end_editmesh(me, em);
-}
-
static void do_image_buttons(bContext *C, void *arg, int event)
{
switch(event) {
@@ -406,7 +156,6 @@ static void do_image_buttons(bContext *C, void *arg, int event)
break;
}
-#if 0
ToolSettings *settings= G.scene->toolsettings;
ID *id, *idtest;
int nr;
@@ -661,279 +410,9 @@ static void do_image_buttons(bContext *C, void *arg, int event)
imagespace_composite_flipbook(curarea);
break;
}
-#endif
-}
-
-#if 0
-static void do_image_buttons_set_uvlayer_callback(void *act, void *data)
-{
- CustomData_set_layer_active(&G.editMesh->fdata, CD_MTFACE, *((int *)act));
-
- BIF_undo_push("Set Active UV Texture");
- allqueue(REDRAWVIEW3D, 0);
- allqueue(REDRAWBUTSEDIT, 0);
- allqueue(REDRAWIMAGE, 0);
}
#endif
-static void sima_idpoin_handle(bContext *C, ID *id, int event)
-{
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
-
- switch(event) {
- case UI_ID_BROWSE:
- case UI_ID_DELETE:
- ED_space_image_set(C, sima, scene, obedit, (Image*)id);
- ED_undo_push(C, "Assign Image UV");
- break;
- case UI_ID_RENAME:
- break;
- case UI_ID_ADD_NEW:
- WM_operator_name_call(C, "IMAGE_OT_new", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case UI_ID_OPEN:
- WM_operator_name_call(C, "IMAGE_OT_open", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case UI_ID_PIN:
- ED_area_tag_refresh(CTX_wm_area(C));
- break;
- }
-}
-
-void image_header_buttons(const bContext *C, ARegion *ar)
-{
- bScreen *sc= CTX_wm_screen(C);
- ScrArea *sa= CTX_wm_area(C);
- Scene *scene= CTX_data_scene(C);
- SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- Image *ima;
- ImBuf *ibuf;
- uiBlock *block;
- uiBut *but;
- PointerRNA spaceptr, uvptr, sceneptr;
- int xco, yco= 3, show_uvedit, show_render, show_paint, pinflag;
-
- /* retrieve state */
- ima= ED_space_image(sima);
- ibuf= ED_space_image_buffer(sima);
-
- show_render= ED_space_image_show_render(sima);
- show_paint= ED_space_image_show_paint(sima);
- show_uvedit= ED_space_image_show_uvedit(sima, CTX_data_edit_object(C));
-
- RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &spaceptr);
- RNA_pointer_create(&sc->id, &RNA_SpaceUVEditor, sima, &uvptr);
- RNA_id_pointer_create(&scene->id, &sceneptr);
-
- /* create block */
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
- uiBlockSetHandleFunc(block, do_image_buttons, NULL);
-
- xco= ED_area_header_standardbuttons(C, block, yco);
-
- /* create pulldown menus */
- if((sa->flag & HEADER_NO_PULLDOWN)==0) {
- char *menuname;
- int xmax;
-
- xmax= GetButStringLength("View");
- uiDefMenuBut(block, image_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- if(show_uvedit) {
- xmax= GetButStringLength("Select");
- uiDefMenuBut(block, image_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, "");
- xco+= xmax;
- }
-
- menuname= (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))? "Image*": "Image";
- xmax= GetButStringLength(menuname);
- uiDefMenuBut(block, image_imagemenu, NULL, menuname, xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- if(show_uvedit) {
- xmax= GetButStringLength("UVs");
- uiDefMenuBut(block, image_uvsmenu, NULL, "UVs", xco, yco, xmax-3, 20, "");
- xco+= xmax;
- }
- }
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- /* image select */
-
- pinflag= (show_render)? 0: UI_ID_PIN;
- xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)sima->image, ID_IM, &sima->pin, xco, yco,
- sima_idpoin_handle, UI_ID_BROWSE|UI_ID_BROWSE_RENDER|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE|pinflag);
- xco += 8;
-
- if(ima && !ELEM3(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_VIEWER) && ima->ok) {
- /* XXX this should not be a static var */
- static int headerbuttons_packdummy;
-
- headerbuttons_packdummy = 0;
-
- if (ima->packedfile) {
- headerbuttons_packdummy = 1;
- }
- if (ima->packedfile && ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
- uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMA_REPACK */, ICON_UGLYPACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Re-Pack this image as PNG");
- else
- uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMAPACKIMA */, ICON_PACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Pack/Unpack this image");
-
- xco+= XIC+8;
- }
-
- /* uv editing */
- if(show_uvedit) {
- /* pivot */
- uiDefIconTextButS(block, ICONTEXTROW, B_NOP, ICON_ROTATE,
- "Pivot: %t|Bounding Box Center %x0|Median Point %x3|2D Cursor %x1",
- xco,yco,XIC+10,YIC, &ar->v2d.around, 0, 3.0, 0, 0,
- "Rotation/Scaling Pivot (Hotkeys: Comma, Shift Comma, Period)");
- xco+= XIC + 18;
-
- /* selection modes */
- uiDefIconButBitS(block, TOG, UV_SYNC_SELECTION, B_REDR, ICON_EDIT, xco,yco,XIC,YIC, &scene->toolsettings->uv_flag, 0, 0, 0, 0, "Sync UV and Mesh Selection");
- xco+= XIC+8;
-
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- uiBlockBeginAlign(block);
-
- uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_REDR, ICON_VERTEXSEL,
- xco,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode");
- uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_REDR, ICON_EDGESEL,
- xco+=XIC,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode");
- uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_REDR, ICON_FACESEL,
- xco+=XIC,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode");
-
- uiBlockEndAlign(block);
- }
- else {
- uiBlockBeginAlign(block);
-
- uiDefIconButS(block, ROW, B_REDR, ICON_VERTEXSEL,
- xco,yco,XIC,YIC, &scene->toolsettings->uv_selectmode, 1.0, UV_SELECT_VERTEX, 0, 0, "Vertex select mode");
- uiDefIconButS(block, ROW, B_REDR, ICON_EDGESEL,
- xco+=XIC,yco,XIC,YIC, &scene->toolsettings->uv_selectmode, 1.0, UV_SELECT_EDGE, 0, 0, "Edge select mode");
- uiDefIconButS(block, ROW, B_REDR, ICON_FACESEL,
- xco+=XIC,yco,XIC,YIC, &scene->toolsettings->uv_selectmode, 1.0, UV_SELECT_FACE, 0, 0, "Face select mode");
- uiDefIconButS(block, ROW, B_REDR, ICON_LINKEDSEL,
- xco+=XIC,yco,XIC,YIC, &scene->toolsettings->uv_selectmode, 1.0, UV_SELECT_ISLAND, 0, 0, "Island select mode");
-
- uiBlockEndAlign(block);
-
- /* would use these if const's could go in strings
- * SI_STICKY_LOC SI_STICKY_DISABLE SI_STICKY_VERTEX */
- but = uiDefIconTextButC(block, ICONTEXTROW, B_REDR, ICON_STICKY_UVS_LOC,
- "Sticky UV Selection: %t|Disable%x1|Shared Location%x0|Shared Vertex%x2",
- xco+=XIC+10,yco,XIC+10,YIC, &(sima->sticky), 0, 3.0, 0, 0,
- "Sticky UV Selection (Hotkeys: Shift C, Alt C, Ctrl C)");
- }
-
- xco+= XIC + 16;
-
- /* snap options, identical to options in 3d view header */
- uiBlockBeginAlign(block);
-
- if (scene->snap_flag & SCE_SNAP) {
- uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Use Snap or Grid (Shift Tab).");
- xco+= XIC;
- uiDefButS(block, MENU, B_NOP, "Mode%t|Closest%x0|Center%x1|Median%x2",xco,yco,70,YIC, &scene->snap_target, 0, 0, 0, 0, "Snap Target Mode.");
- xco+= 70;
- }
- else {
- uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEAR,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab).");
- xco+= XIC;
- }
-
- uiBlockEndAlign(block);
- xco+= 8;
-
- /* uv layers */
- {
- Object *obedit= CTX_data_edit_object(C);
- char menustr[34*MAX_MTFACE];
- static int act;
-
- image_menu_uvlayers(obedit, menustr, &act);
-
- but = uiDefButI(block, MENU, B_NOP, menustr ,xco,yco,85,YIC, &act, 0, 0, 0, 0, "Active UV Layer for editing.");
- // uiButSetFunc(but, do_image_buttons_set_uvlayer_callback, &act, NULL);
-
- xco+= 85;
- }
-
- xco+= 8;
- }
-
- if(ima) {
- RenderResult *rr;
-
- /* render layers and passes */
- rr= BKE_image_get_renderresult(scene, ima);
- if(rr) {
- uiBlockBeginAlign(block);
-#if 0
- uiblock_layer_pass_buttons(block, rr, &sima->iuser, B_REDR, xco, 0, 160);
-#endif
- uiBlockEndAlign(block);
- xco+= 166;
- }
-
- /* painting */
- uiDefIconButR(block, TOG, B_REDR, ICON_TPAINT_HLT, xco,yco,XIC,YIC, &spaceptr, "image_painting", 0, 0, 0, 0, 0, NULL);
- xco+= XIC+8;
-
- /* image draw options */
- uiBlockBeginAlign(block);
- uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_RGB, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, 0, 0, 0, NULL);
- xco+= XIC;
- if(ibuf==NULL || ibuf->channels==4) {
- uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_RGB_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_USE_ALPHA, 0, 0, NULL);
- xco+= XIC;
- uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ALPHA, 0, 0, NULL);
- xco+= XIC;
- }
- if(ibuf) {
- if(ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1)) {
- uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ZDEPTH, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ZBUF, 0, 0, NULL);
- xco+= XIC;
- }
- }
-#ifdef WITH_LCMS
- uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_COLOR_CORRECTION, 0, 0, NULL);
- xco+= XIC;
-#endif
- xco+= 8;
-
- /* record & play */
- uiBlockBeginAlign(block);
- if(ima->type==IMA_TYPE_COMPOSITE) {
- uiDefIconButO(block, BUT, "IMAGE_OT_record_composite", WM_OP_INVOKE_REGION_WIN, ICON_REC, xco, yco, XIC, YIC, NULL); // Record Composite
- xco+= XIC;
- }
- if((ima->type==IMA_TYPE_COMPOSITE) || ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
-//XXX uiDefIconButO(block, BUT, "IMAGE_OT_play_composite", WM_OP_INVOKE_REGION_WIN, ICON_PLAY, xco, yco, XIC, YIC, NULL); // PLAY
- xco+= XIC;
- }
- uiBlockEndAlign(block);
- xco+= 8;
-
- }
-
- /* draw lock */
- uiDefIconButR(block, ICONTOG, 0, ICON_UNLOCKED, xco,yco,XIC,YIC, &spaceptr, "update_automatically", 0, 0, 0, 0, 0, NULL);
-
- /* always as last */
- UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
-
- uiEndBlock(C, block);
- uiDrawBlock(C, block);
-}
-
/********************** toolbox operator *********************/
static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -949,10 +428,10 @@ static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
pup= uiPupMenuBegin(C, "Toolbox", 0);
layout= uiPupMenuLayout(pup);
- uiItemMenuF(layout, "View", 0, image_viewmenu);
- if(show_uvedit) uiItemMenuF(layout, "Select", 0, image_selectmenu);
- uiItemMenuF(layout, "Image", 0, image_imagemenu);
- if(show_uvedit) uiItemMenuF(layout, "UVs", 0, image_uvsmenu);
+ uiItemM(layout, C, NULL, 0, "IMAGE_MT_view");
+ if(show_uvedit) uiItemM(layout, C, NULL, 0, "IMAGE_MT_select");
+ uiItemM(layout, C, NULL, 0, "IMAGE_MT_image");
+ if(show_uvedit) uiItemM(layout, C, NULL, 0, "IMAGE_MT_uvs");
uiPupMenuEnd(C, pup);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 378d91c8e32..fd37020c3b4 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -132,10 +132,10 @@ static int space_image_file_exists_poll(bContext *C)
int space_image_main_area_poll(bContext *C)
{
SpaceLink *slink= CTX_wm_space_data(C);
- ARegion *ar= CTX_wm_region(C);
+ // XXX ARegion *ar= CTX_wm_region(C);
if(slink && (slink->spacetype == SPACE_IMAGE))
- return (ar && ar->type->regionid == RGN_TYPE_WINDOW);
+ return 1; // XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW);
return 0;
}
@@ -251,6 +251,9 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
ot->modal= view_pan_modal;
ot->cancel= view_pan_cancel;
ot->poll= space_image_main_area_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -363,6 +366,9 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
ot->modal= view_zoom_modal;
ot->cancel= view_zoom_cancel;
ot->poll= space_image_main_area_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
/* properties */
RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
@@ -381,7 +387,6 @@ static int view_all_exec(bContext *C, wmOperator *op)
ARegion *ar;
Scene *scene;
Object *obedit;
- Image *ima;
ImBuf *ibuf;
float aspx, aspy, zoomx, zoomy, w, h;
int width, height;
@@ -392,7 +397,6 @@ static int view_all_exec(bContext *C, wmOperator *op)
scene= (Scene*)CTX_data_scene(C);
obedit= CTX_data_edit_object(C);
- ima= ED_space_image(sima);
ibuf= ED_space_image_buffer(sima);
ED_space_image_size(sima, &width, &height);
ED_space_image_aspect(sima, &aspx, &aspy);
@@ -577,34 +581,30 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
/**************** load/replace/save callbacks ******************/
-static char *filesel_imagetype_string(Image *ima)
-{
- char *strp, *str= MEM_callocN(15*32, "menu for filesel");
-
- strp= str;
- str += sprintf(str, "Save Image as: %%t|");
- str += sprintf(str, "Targa %%x%d|", R_TARGA);
- str += sprintf(str, "Targa Raw %%x%d|", R_RAWTGA);
- str += sprintf(str, "PNG %%x%d|", R_PNG);
- str += sprintf(str, "BMP %%x%d|", R_BMP);
- str += sprintf(str, "Jpeg %%x%d|", R_JPEG90);
+/* XXX make dynamic */
+static const EnumPropertyItem image_file_type_items[] = {
+ {R_TARGA, "TARGA", 0, "Targa", ""},
+ {R_RAWTGA, "TARGA RAW", 0, "Targa Raw", ""},
+ {R_PNG, "PNG", 0, "PNG", ""},
+ {R_BMP, "BMP", 0, "BMP", ""},
+ {R_JPEG90, "JPEG", 0, "Jpeg", ""},
#ifdef WITH_OPENJPEG
- str += sprintf(str, "Jpeg 2000 %%x%d|", R_JP2);
+ {R_JP2, "JPEG_2000", 0, "Jpeg 2000", ""},
#endif
- str += sprintf(str, "Iris %%x%d|", R_IRIS);
- if(G.have_libtiff)
- str += sprintf(str, "Tiff %%x%d|", R_TIFF);
- str += sprintf(str, "Radiance HDR %%x%d|", R_RADHDR);
- str += sprintf(str, "Cineon %%x%d|", R_CINEON);
- str += sprintf(str, "DPX %%x%d|", R_DPX);
+ {R_IRIS, "IRIS", 0, "Iris", ""},
+ //if(G.have_libtiff)
+ {R_TIFF, "TIFF", 0, "Tiff", ""},
+ {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
+ {R_CINEON, "CINEON", 0, "Cineon", ""},
+ {R_DPX, "DPX", 0, "DPX", ""},
#ifdef WITH_OPENEXR
- str += sprintf(str, "OpenEXR %%x%d|", R_OPENEXR);
+ {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
/* saving sequences of multilayer won't work, they copy buffers */
- if(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER);
- else str += sprintf(str, "MultiLayer %%x%d|", R_MULTILAYER);
+ /*if(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER);
+ else*/
+ {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
#endif
- return strp;
-}
+ {0, NULL, 0, NULL, NULL}};
static void image_filesel(bContext *C, wmOperator *op, const char *path)
{
@@ -799,7 +799,9 @@ static int save_as_exec(bContext *C, wmOperator *op)
if(!ima)
return OPERATOR_CANCELLED;
+ sima->imtypenr= RNA_enum_get(op->ptr, "file_type");
RNA_string_get(op->ptr, "filename", str);
+
save_image_doit(C, sima, scene, op, str);
return OPERATOR_FINISHED;
@@ -820,10 +822,6 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* always opens fileselect */
if(ibuf) {
- char *strp;
-
- strp= filesel_imagetype_string(ima); // XXX unused still
-
/* cant save multilayer sequence, ima->rr isn't valid for a specific frame */
if(ima->rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER))
sima->imtypenr= R_MULTILAYER;
@@ -831,14 +829,14 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event)
sima->imtypenr= scene->r.imtype;
else
sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype);
+
+ RNA_enum_set(op->ptr, "file_type", sima->imtypenr);
if(ibuf->name[0]==0)
BLI_strncpy(ibuf->name, G.ima, FILE_MAX);
// XXX note: we can give default menu enums to operator for this
image_filesel(C, op, ibuf->name);
-
- MEM_freeN(strp);
return OPERATOR_RUNNING_MODAL;
}
@@ -862,6 +860,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
/* properties */
RNA_def_string_file_path(ot->srna, "filename", "", FILE_MAX, "Filename", "File path to save image to.");
+ RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
}
/******************** save image operator ********************/
@@ -1065,7 +1064,7 @@ void IMAGE_OT_new(wmOperatorType *ot)
/* api callbacks */
ot->exec= new_exec;
- ot->invoke= WM_operator_redo;
+ ot->invoke= WM_operator_props_popup;
ot->poll= ED_operator_image_active;
/* flags */
@@ -1119,7 +1118,7 @@ static int pack_exec(bContext *C, wmOperator *op)
if(as_png)
BKE_image_memorypack(ima);
else
- ima->packedfile= newPackedFile(ima->name);
+ ima->packedfile= newPackedFile(op->reports, ima->name);
return OPERATOR_FINISHED;
}
@@ -1167,13 +1166,96 @@ 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;
+ uiLayout *layout;
+ char line[FILE_MAXDIR + FILE_MAXFILE + 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)
{
Image *ima= CTX_data_edit_image(C);
+ int method= RNA_enum_get(op->ptr, "method");
- if(!ima)
+ if(!ima || !ima->packedfile)
return OPERATOR_CANCELLED;
- if(!ima->packedfile)
+
+ if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
+ BKE_report(op->reports, RPT_ERROR, "Can't unpack movie or image sequence.");
+ 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.");
+
+ unpackImage(op->reports, ima, method);
+
+ return OPERATOR_FINISHED;
+}
+
+static int unpack_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Image *ima= CTX_data_edit_image(C);
+
+ if(!ima || !ima->packedfile)
return OPERATOR_CANCELLED;
if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
@@ -1184,7 +1266,7 @@ static int unpack_exec(bContext *C, wmOperator *op)
if(G.fileflags & G_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save.");
- unpackImage(ima, PF_ASK);
+ unpack_menu(C, "IMAGE_OT_unpack", ima->name, "textures", ima->packedfile);
return OPERATOR_FINISHED;
}
@@ -1197,10 +1279,14 @@ void IMAGE_OT_unpack(wmOperatorType *ot)
/* api callbacks */
ot->exec= unpack_exec;
+ ot->invoke= unpack_invoke;
ot->poll= space_image_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.");
}
/******************** sample image operator ********************/
@@ -1405,6 +1491,9 @@ void IMAGE_OT_sample(wmOperatorType *ot)
ot->modal= sample_modal;
ot->cancel= sample_cancel;
ot->poll= space_image_main_area_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
}
/******************** set curve point operator ********************/
@@ -1412,9 +1501,9 @@ void IMAGE_OT_sample(wmOperatorType *ot)
void IMAGE_OT_curves_point_set(wmOperatorType *ot)
{
static EnumPropertyItem point_items[]= {
- {0, "BLACK_POINT", "Black Point", ""},
- {1, "WHITE_POINT", "White Point", ""},
- {0, NULL, NULL, NULL}};
+ {0, "BLACK_POINT", 0, "Black Point", ""},
+ {1, "WHITE_POINT", 0, "White Point", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Set Curves Point";
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 73472a70a0d..709fbb6299b 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -50,7 +50,6 @@
#include "BKE_mesh.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
-#include "BKE_mesh.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
@@ -271,13 +270,6 @@ static void image_refresh(const bContext *C, ScrArea *sa)
if(sima->flag & SI_EDITTILE);
else sima->curtile= tf->tile;
-
- if(ima) {
- if(tf->mode & TF_TILES)
- ima->tpageflag |= IMA_TILES;
- else
- ima->tpageflag &= ~IMA_TILES;
- }
}
}
@@ -287,8 +279,6 @@ static void image_refresh(const bContext *C, ScrArea *sa)
static void image_listener(ScrArea *sa, wmNotifier *wmn)
{
- SpaceImage *sima= sa->spacedata.first;
-
/* context changes */
switch(wmn->category) {
case NC_SCENE:
@@ -302,9 +292,15 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_IMAGE:
- if(!wmn->reference || wmn->reference == sima->image)
- ED_area_tag_redraw(sa);
+ ED_area_tag_redraw(sa);
break;
+ case NC_OBJECT:
+ switch(wmn->data) {
+ case ND_GEOM_SELECT:
+ case ND_GEOM_DATA:
+ ED_area_tag_redraw(sa);
+ break;
+ }
}
}
@@ -312,7 +308,11 @@ static int image_context(const bContext *C, const char *member, bContextDataResu
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- if(CTX_data_equals(member, "edit_image")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {"edit_image", NULL};
+ CTX_data_dir_set(result, dir);
+ }
+ else if(CTX_data_equals(member, "edit_image")) {
CTX_data_id_pointer_set(result, (ID*)ED_space_image(sima));
return 1;
}
@@ -334,12 +334,10 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce
#endif
if(sima->image) {
ImBuf *ibuf= ED_space_image_buffer(sima);
- float xuser_asp, yuser_asp;
- ED_image_aspect(sima->image, &xuser_asp, &yuser_asp);
if(ibuf) {
- width= ibuf->x*xuser_asp;
- height= ibuf->y*yuser_asp;
+ width= ibuf->x;
+ height= ibuf->y;
}
else if(sima->image->type==IMA_TYPE_R_RESULT) {
/* not very important, just nice */
@@ -371,7 +369,6 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *sce
ar->v2d.mask.ymax= winy;
/* which part of the image space do we see? */
- /* same calculation as in lrectwrite: area left and down*/
x1= ar->winrct.xmin+(winx-sima->zoom*w)/2;
y1= ar->winrct.ymin+(winy-sima->zoom*h)/2;
@@ -404,6 +401,10 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar)
/* image paint polls for mode */
keymap= WM_keymap_listbase(wm, "ImagePaint", SPACE_IMAGE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+
+ /* XXX need context here?
+ keymap= WM_keymap_listbase(wm, "UVEdit", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);*/
/* own keymaps */
keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0);
@@ -468,13 +469,6 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
- case NC_OBJECT:
- switch(wmn->data) {
- case ND_GEOM_SELECT:
- case ND_GEOM_DATA:
- ED_region_tag_redraw(ar);
- break;
- }
}
}
@@ -509,11 +503,17 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void image_header_area_init(wmWindowManager *wm, ARegion *ar)
{
+#if 0
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+#else
+ ED_region_header_init(ar);
+#endif
}
static void image_header_area_draw(const bContext *C, ARegion *ar)
{
+ ED_region_header(C, ar);
+#if 0
float col[3];
/* clear */
@@ -532,6 +532,7 @@ static void image_header_area_draw(const bContext *C, ARegion *ar)
/* restore view matrix? */
UI_view2d_view_restore(C);
+#endif
}
/**************************** spacetype *****************************/
@@ -587,7 +588,6 @@ void ED_spacetype_image(void)
BLI_addhead(&st->regiontypes, art);
-
BKE_spacetype_register(st);
}
@@ -617,10 +617,12 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe
if(sima->image && sima->image->id.us==0)
sima->image->id.us= 1;
- if(obedit)
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ if(C) {
+ if(obedit)
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- ED_area_tag_redraw(CTX_wm_area(C));
+ ED_area_tag_redraw(CTX_wm_area(C));
+ }
}
ImBuf *ED_space_image_buffer(SpaceImage *sima)
@@ -681,7 +683,7 @@ void ED_image_aspect(Image *ima, float *aspx, float *aspy)
*aspx= *aspy= 1.0;
if((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) ||
- (ima->tpageflag & IMA_TILES) || (ima->aspx==0.0 || ima->aspy==0.0))
+ (ima->aspx==0.0 || ima->aspy==0.0))
return;
/* x is always 1 */
@@ -750,6 +752,7 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit)
int ret;
ret = EM_texFaceCheck(em);
+
BKE_mesh_end_editmesh(obedit->data, em);
return ret;
}
@@ -766,6 +769,7 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit)
if(obedit && obedit->type == OB_MESH) {
EditMesh *em = BKE_mesh_get_editmesh(obedit->data);
int ret;
+
ret = EM_texFaceCheck(em);
BKE_mesh_end_editmesh(obedit->data, em);
diff --git a/source/blender/editors/space_info/Makefile b/source/blender/editors/space_info/Makefile
index bc04ddc7824..931c2f2097c 100644
--- a/source/blender/editors/space_info/Makefile
+++ b/source/blender/editors/space_info/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript
index 05afcae162e..01268115687 100644
--- a/source/blender/editors/space_info/SConscript
+++ b/source/blender/editors/space_info/SConscript
@@ -11,7 +11,4 @@ defs = []
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
- if env['WITH_BF_SOLID']:
- defs.append('USE_SUMO_SOLID')
-
env.BlenderLib ( 'bf_editors_space_info', sources, Split(incs), defs, libtype=['core'], priority=[70] )
diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c
deleted file mode 100644
index c8dd3df8425..00000000000
--- a/source/blender/editors/space_info/info_header.c
+++ /dev/null
@@ -1,507 +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 *****
- */
-
-#include <string.h>
-#include <stdio.h>
-
-#include "DNA_packedFile_types.h"
-#include "DNA_space_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_userdef_types.h"
-#include "DNA_windowmanager_types.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_bpath.h"
-
-#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_image.h"
-#include "BKE_main.h"
-#include "BKE_packedFile.h"
-#include "BKE_screen.h"
-
-#include "ED_screen.h"
-#include "ED_types.h"
-#include "ED_util.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-#include "UI_view2d.h"
-
-#include "IMB_imbuf_types.h"
-
-#include "info_intern.h"
-
-static int pupmenu() {return 0;}
-static int okee() {return 0;}
-static int error() {return 0;}
-
-/* ************************ header area region *********************** */
-
-#define B_STOPRENDER 1
-#define B_STOPCAST 2
-#define B_STOPANIM 3
-
-static void do_viewmenu(bContext *C, void *arg, int event)
-{
-}
-
-static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_viewmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
-
- return block;
-}
-
-static int buttons_do_unpack()
-{
- int how;
- char menu[2048];
- char *line = menu;
- int ret_value = 1, count = 0;
-
- count = countPackedFiles();
-
- if(!count) {
- pupmenu("No packed files. Autopack disabled");
- return ret_value;
- }
- if (count == 1)
- line += sprintf(line, "Unpack 1 file%%t");
- else
- line += sprintf(line, "Unpack %d files%%t", count);
-
- line += sprintf(line, "|Use files in current directory (create when necessary)%%x%d", PF_USE_LOCAL);
- line += sprintf(line, "|Write files to current directory (overwrite existing files)%%x%d", PF_WRITE_LOCAL);
- line += sprintf(line, "|%%l|Use files in original location (create when necessary)%%x%d", PF_USE_ORIGINAL);
- line += sprintf(line, "|Write files to original location (overwrite existing files)%%x%d", PF_WRITE_ORIGINAL);
- line += sprintf(line, "|%%l|Disable AutoPack, keep all packed files %%x%d", PF_KEEP);
- line += sprintf(line, "|Ask for each file %%x%d", PF_ASK);
-
- how = pupmenu(menu);
-
- if(how == -1)
- ret_value = 0;
- else {
- if (how != PF_KEEP) unpackAll(how);
- G.fileflags &= ~G_AUTOPACK;
- }
-
- return ret_value;
-}
-
-static void check_packAll()
-{
- // first check for dirty images
- Image *ima;
-
- for(ima = G.main->image.first; ima; ima= ima->id.next) {
- if (ima->ibufs.first) { /* XXX FIX */
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
-
- if (ibuf && (ibuf->userflags &= IB_BITMAPDIRTY))
- break;
- }
- }
-
- if (ima == NULL || okee("Some images are painted on. These changes will be lost. Continue ?")) {
- packAll();
- G.fileflags |= G_AUTOPACK;
- }
-}
-
-static void do_info_externalfiles(bContext *C, void *arg, int event)
-{
- switch (event) {
-
- case 1: /* pack data */
- check_packAll();
- break;
- case 3: /* unpack data */
- if (buttons_do_unpack() != 0) {
- /* Clear autopack bit only if user selected one of the unpack options */
- G.fileflags &= ~G_AUTOPACK;
- }
- break;
- case 10: /* make all paths relative */
- if (G.relbase_valid) {
- int tot,changed,failed,linked;
- char str[512];
- char txtname[24]; /* text block name */
- txtname[0] = '\0';
- makeFilesRelative(txtname, &tot, &changed, &failed, &linked);
- if (failed) sprintf(str, "Make Relative%%t|Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked);
- else sprintf(str, "Make Relative%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked);
- pupmenu(str);
- } else {
- pupmenu("Can't set relative paths with an unsaved blend file");
- }
- break;
- case 11: /* make all paths absolute */
- {
- int tot,changed,failed,linked;
- char str[512];
- char txtname[24]; /* text block name */
- txtname[0] = '\0';
- makeFilesAbsolute(txtname, &tot, &changed, &failed, &linked);
- sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked);
- if (failed) sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked);
- else sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked);
-
- pupmenu(str);
- }
- break;
- case 12: /* check images exist */
- {
- char txtname[24]; /* text block name */
- txtname[0] = '\0';
-
- /* run the missing file check */
- checkMissingFiles( txtname );
-
- if (txtname[0] == '\0') {
- okee("No external files missing");
- } else {
- char str[128];
- sprintf(str, "Missing files listed in Text \"%s\"", txtname );
- error(str);
- }
- }
- break;
- case 13: /* search for referenced files that are not available */
-// XXX if(curarea->spacetype==SPACE_INFO) {
-// ScrArea *sa;
-// sa= closest_bigger_area();
-// areawinset(sa->win);
-// }
-// activate_fileselect(FILE_SPECIAL, "Find Missing Files", "", findMissingFiles);
- break;
- }
-
-}
-
-
-uiBlock *info_externalfiles(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "info_externalfiles", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_info_externalfiles, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pack into .blend file", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Unpack into Files...", 0, yco-=20, 160, 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, "Make all Paths Relative", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 10, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make all Paths Absolute", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 11, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Report Missing Files...", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 12, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Find Missing Files...", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 13, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
-
-
-
-static void info_filemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
- uiItemO(layout, NULL, 0, "WM_OT_read_homefile");
- uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
- uiItemO(layout, NULL, 0, "WM_OT_open_mainfile");
-// uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open Recent",0, yco-=20, 120, 19, "");
-// uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recover Last Session", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
-
- uiItemS(layout);
-
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
- uiItemO(layout, NULL, 0, "WM_OT_save_mainfile");
- uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
- uiItemO(layout, NULL, 0, "WM_OT_save_as_mainfile");
-
-#if 0
- if(U.flag & USER_FILECOMPRESS) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
- } else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
- }
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Rendered Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot Subwindow|Ctrl F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot All|Ctrl Shift F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
-#if GAMEBLENDER == 1
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Game As Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, "");
-#endif
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Load Factory Settings", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 32, "");
-
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link (Image Browser)|Ctrl F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
-// uiDefIconTextBlockBut(block, info_file_importmenu, NULL, ICON_RIGHTARROW_THIN, "Import", 0, yco-=20, menuwidth, 19, "");
-// uiDefIconTextBlockBut(block, info_file_exportmenu, NULL, ICON_RIGHTARROW_THIN, "Export", 0, yco-=20, menuwidth, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, info_externalfiles, NULL, ICON_RIGHTARROW_THIN, "External Data",0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Quit Blender|Ctrl Q", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
- uiBlockSetDirection(block, UI_DOWN);
- uiTextBoundsBlock(block, 80);
-
- uiEndBlock(C, block);
- return block;
-#endif
-}
-
-
-static void do_info_buttons(bContext *C, void *arg, int event)
-{
- switch(event) {
- case B_STOPRENDER:
- G.afbreek= 1;
- break;
- case B_STOPCAST:
- WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C));
- break;
- case B_STOPANIM:
- ED_screen_animation_timer(C, 0, 0);
- break;
- }
-}
-
-static void screen_idpoin_handle(bContext *C, ID *id, int event)
-{
- switch(event) {
- case UI_ID_BROWSE:
- /* exception: can't set screens inside of area/region handers */
- WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, id);
- break;
- case UI_ID_DELETE:
- ED_undo_push(C, "");
- break;
- case UI_ID_RENAME:
- break;
- case UI_ID_ADD_NEW:
- /* XXX not implemented */
- break;
- case UI_ID_OPEN:
- /* XXX not implemented */
- break;
- case UI_ID_ALONE:
- /* XXX not implemented */
- break;
- case UI_ID_PIN:
- break;
- }
-}
-
-static void scene_idpoin_handle(bContext *C, ID *id, int event)
-{
- switch(event) {
- case UI_ID_BROWSE:
- /* exception: can't set screens inside of area/region handers */
- WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, id);
- break;
- case UI_ID_DELETE:
- ED_undo_push(C, "");
- break;
- case UI_ID_RENAME:
- break;
- case UI_ID_ADD_NEW:
- /* XXX not implemented */
- break;
- case UI_ID_OPEN:
- /* XXX not implemented */
- break;
- case UI_ID_ALONE:
- /* XXX not implemented */
- break;
- case UI_ID_PIN:
- break;
- }
-}
-
-static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
-{
- wmOperatorType *ot= arg2;
-
- if(ot)
- WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
-}
-
-static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items)
-{
- wmOperatorType *ot = WM_operatortype_first();
-
- for(; ot; ot= ot->next) {
-
- if(BLI_strcasestr(ot->name, str)) {
- if(ot->poll==NULL || ot->poll((bContext *)C)) {
- char name[256];
- int len= strlen(ot->name);
-
- /* display name for menu, can hold hotkey */
- BLI_strncpy(name, ot->name, 256);
-
- /* check for hotkey */
- if(len < 256-6) {
- if(WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, &name[len+1], 256-len-1))
- name[len]= '|';
- }
-
- if(0==uiSearchItemAdd(items, name, ot))
- break;
- }
- }
- }
-}
-
-void info_header_buttons(const bContext *C, ARegion *ar)
-{
- wmWindow *win= CTX_wm_window(C);
- bScreen *screen= CTX_wm_screen(C);
- ScrArea *sa= CTX_wm_area(C);
- uiBlock *block;
- int xco, yco= 3;
-
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
- uiBlockSetHandleFunc(block, do_info_buttons, NULL);
-
- xco= ED_area_header_standardbuttons(C, block, yco);
-
- if((sa->flag & HEADER_NO_PULLDOWN)==0) {
- int xmax;
-
- xmax= GetButStringLength("File");
- uiDefMenuBut(block, info_filemenu, NULL, "File", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- xmax= GetButStringLength("Add");
- uiDefPulldownBut(block, dummy_viewmenu, sa, "Add", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- xmax= GetButStringLength("Timeline");
- uiDefPulldownBut(block, dummy_viewmenu, sa, "Timeline", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- xmax= GetButStringLength("Game");
- uiDefPulldownBut(block, dummy_viewmenu, sa, "Game", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- xmax= GetButStringLength("Render");
- uiDefPulldownBut(block, dummy_viewmenu, sa, "Render", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
- xmax= GetButStringLength("Help");
- uiDefPulldownBut(block, dummy_viewmenu, NULL, "Help", xco, yco, xmax-3, 20, "");
- xco+= xmax;
- }
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- if(screen->full==0) {
- xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)win->screen, ID_SCR, NULL, xco, yco,
- screen_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE);
- xco += 8;
- xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)screen->scene, ID_SCE, NULL, xco, yco,
- scene_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE);
- xco += 8;
- }
-
- if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
- uiDefIconTextBut(block, BUT, B_STOPRENDER, ICON_REC, "Render", xco+5,yco,75,19, NULL, 0.0f, 0.0f, 0, 0, "Stop rendering");
- xco+= 80;
- }
- if(WM_jobs_test(CTX_wm_manager(C), CTX_wm_screen(C))) {
- uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_REC, "Capture", xco+5,yco,85,19, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast");
- xco+= 90;
- }
- if(screen->animtimer) {
- uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_REC, "Anim Player", xco+5,yco,85,19, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback");
- xco+= 90;
- }
-
- {
- static char search[256]= "";
- uiBut *but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, xco+5, yco, 120, 19, "");
-
- uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb);
-
- xco+= 125;
- }
-
-
- /* always as last */
- UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
-
- uiEndBlock(C, block);
- uiDrawBlock(C, block);
-}
-
-
diff --git a/source/blender/editors/space_info/info_intern.h b/source/blender/editors/space_info/info_intern.h
index 213c0688f20..519364b58d9 100644
--- a/source/blender/editors/space_info/info_intern.h
+++ b/source/blender/editors/space_info/info_intern.h
@@ -30,10 +30,17 @@
/* internal exports only */
+struct wmOperatorType;
/* info_header.c */
void info_header_buttons(const bContext *C, ARegion *ar);
+void FILE_OT_pack_all(struct wmOperatorType *ot);
+void FILE_OT_unpack_all(struct wmOperatorType *ot);
+void FILE_OT_make_paths_relative(struct wmOperatorType *ot);
+void FILE_OT_make_paths_absolute(struct wmOperatorType *ot);
+void FILE_OT_report_missing_files(struct wmOperatorType *ot);
+void FILE_OT_find_missing_files(struct wmOperatorType *ot);
#endif /* ED_INFO_INTERN_H */
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
new file mode 100644
index 00000000000..56f925a2e81
--- /dev/null
+++ b/source/blender/editors/space_info/info_ops.c
@@ -0,0 +1,397 @@
+/**
+ * $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 *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_packedFile_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_bpath.h"
+
+#include "BKE_context.h"
+#include "BKE_global.h"
+#include "BKE_image.h"
+#include "BKE_main.h"
+#include "BKE_packedFile.h"
+#include "BKE_report.h"
+#include "BKE_screen.h"
+
+#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "IMB_imbuf_types.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "WM_types.h"
+
+#include "info_intern.h"
+
+/********************* pack all operator *********************/
+
+static int pack_all_exec(bContext *C, wmOperator *op)
+{
+ Main *bmain= CTX_data_main(C);
+
+ packAll(bmain, op->reports);
+ G.fileflags |= G_AUTOPACK;
+
+ return OPERATOR_FINISHED;
+}
+
+static int pack_all_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Main *bmain= CTX_data_main(C);
+ Image *ima;
+ ImBuf *ibuf;
+
+ // first check for dirty images
+ for(ima=bmain->image.first; ima; ima=ima->id.next) {
+ if(ima->ibufs.first) { /* XXX FIX */
+ ibuf= BKE_image_get_ibuf(ima, NULL);
+
+ if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
+ break;
+ }
+ }
+
+ if(ima) {
+ uiPupMenuOkee(C, "FILE_OT_pack_all", "Some images are painted on. These changes will be lost. Continue?");
+ return OPERATOR_CANCELLED;
+ }
+
+ return pack_all_exec(C, op);
+}
+
+void FILE_OT_pack_all(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Pack All";
+ ot->idname= "FILE_OT_pack_all";
+
+ /* api callbacks */
+ ot->exec= pack_all_exec;
+ ot->invoke= pack_all_invoke;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************* unpack all operator *********************/
+
+static const EnumPropertyItem unpack_all_method_items[] = {
+ {PF_USE_LOCAL, "USE_LOCAL", 0, "Use files in current directory (create when necessary)", ""},
+ {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write files to current directory (overwrite existing files)", ""},
+ {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use files in original location (create when necessary)", ""},
+ {PF_WRITE_ORIGINAL, "WRITE_ORIGINAL", 0, "Write files to original location (overwrite existing files)", ""},
+ {PF_KEEP, "KEEP", 0, "Disable AutoPack, keep all packed files", ""},
+ {PF_ASK, "ASK", 0, "Ask for each file", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static int unpack_all_exec(bContext *C, wmOperator *op)
+{
+ Main *bmain= CTX_data_main(C);
+ int method= RNA_enum_get(op->ptr, "method");
+
+ if(method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
+ G.fileflags &= ~G_AUTOPACK;
+
+ return OPERATOR_FINISHED;
+}
+
+static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Main *bmain= CTX_data_main(C);
+ uiPopupMenu *pup;
+ uiLayout *layout;
+ char title[128];
+ int count = 0;
+
+ count = countPackedFiles(bmain);
+
+ if(!count) {
+ BKE_report(op->reports, RPT_WARNING, "No packed files. Autopack disabled.");
+ G.fileflags &= ~G_AUTOPACK;
+ return OPERATOR_CANCELLED;
+ }
+
+ if(count == 1)
+ sprintf(title, "Unpack 1 file");
+ else
+ sprintf(title, "Unpack %d files", count);
+
+ pup= uiPupMenuBegin(C, title, 0);
+ layout= uiPupMenuLayout(pup);
+
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiItemsEnumO(layout, "FILE_OT_unpack_all", "method");
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+void FILE_OT_unpack_all(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Unpack All";
+ ot->idname= "FILE_OT_unpack_all";
+
+ /* api callbacks */
+ ot->exec= unpack_all_exec;
+ ot->invoke= unpack_all_invoke;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack.");
+}
+
+/********************* make paths relative operator *********************/
+
+static int make_paths_relative_exec(bContext *C, wmOperator *op)
+{
+ char txtname[24]; /* text block name */
+ int tot, changed, failed, linked;
+
+ if(!G.relbase_valid) {
+ BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file.");
+ return OPERATOR_CANCELLED;
+ }
+
+ txtname[0] = '\0';
+ makeFilesRelative(txtname, &tot, &changed, &failed, &linked);
+
+ if(failed)
+ BKE_reportf(op->reports, RPT_ERROR, "Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked);
+ else
+ BKE_reportf(op->reports, RPT_INFO, "Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked);
+
+ return OPERATOR_FINISHED;
+}
+
+void FILE_OT_make_paths_relative(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make All Paths Relative";
+ ot->idname= "FILE_OT_make_paths_relative";
+
+ /* api callbacks */
+ ot->exec= make_paths_relative_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************* make paths absolute operator *********************/
+
+static int make_paths_absolute_exec(bContext *C, wmOperator *op)
+{
+ char txtname[24]; /* text block name */
+ int tot, changed, failed, linked;
+
+ if(!G.relbase_valid) {
+ BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file.");
+ return OPERATOR_CANCELLED;
+ }
+
+ txtname[0] = '\0';
+ makeFilesAbsolute(txtname, &tot, &changed, &failed, &linked);
+
+ if(failed)
+ BKE_reportf(op->reports, RPT_ERROR, "Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked);
+ else
+ BKE_reportf(op->reports, RPT_INFO, "Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked);
+
+ return OPERATOR_FINISHED;
+}
+
+void FILE_OT_make_paths_absolute(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make All Paths Absolute";
+ ot->idname= "FILE_OT_make_paths_absolute";
+
+ /* api callbacks */
+ ot->exec= make_paths_absolute_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************* report missing files operator *********************/
+
+static int report_missing_files_exec(bContext *C, wmOperator *op)
+{
+ char txtname[24]; /* text block name */
+
+ txtname[0] = '\0';
+
+ /* run the missing file check */
+ checkMissingFiles(txtname);
+
+ if(txtname[0] == '\0')
+ BKE_report(op->reports, RPT_INFO, "No external files missing.");
+ else
+ BKE_reportf(op->reports, RPT_ERROR, "Missing files listed in Text \"%s\"", txtname);
+
+ return OPERATOR_FINISHED;
+}
+
+void FILE_OT_report_missing_files(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Report Missing Files...";
+ ot->idname= "FILE_OT_report_missing_files";
+
+ /* api callbacks */
+ ot->exec= report_missing_files_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/********************* find missing files operator *********************/
+
+static int find_missing_files_exec(bContext *C, wmOperator *op)
+{
+ char *filename;
+
+ filename= RNA_string_get_alloc(op->ptr, "filename", NULL, 0);
+ findMissingFiles(filename);
+ MEM_freeN(filename);
+
+ return OPERATOR_FINISHED;
+}
+
+static int find_missing_files_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ /* XXX file open button text "Find Missing Files" */
+ WM_event_add_fileselect(C, op);
+ return OPERATOR_RUNNING_MODAL;
+}
+
+void FILE_OT_find_missing_files(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Find Missing Files...";
+ ot->idname= "FILE_OT_find_missing_files";
+
+ /* api callbacks */
+ ot->exec= find_missing_files_exec;
+ ot->invoke= find_missing_files_invoke;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_string_file_path(ot->srna, "filename", "", FILE_MAX, "Filename", "File path of image to open.");
+}
+
+#if 0
+static void info_filemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
+ uiItemO(layout, NULL, 0, "WM_OT_read_homefile");
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
+ uiItemO(layout, NULL, 0, "WM_OT_open_mainfile");
+// uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open Recent",0, yco-=20, 120, 19, "");
+// uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recover Last Session", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
+
+ uiItemS(layout);
+
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
+ uiItemO(layout, NULL, 0, "WM_OT_save_mainfile");
+ uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
+ uiItemO(layout, NULL, 0, "WM_OT_save_as_mainfile");
+
+#if 0
+ if(U.flag & USER_FILECOMPRESS) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
+ } else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
+ }
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Rendered Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot Subwindow|Ctrl F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot All|Ctrl Shift F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
+#if GAMEBLENDER == 1
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Game As Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, "");
+#endif
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Load Factory Settings", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 32, "");
+
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link (Image Browser)|Ctrl F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
+// uiDefIconTextBlockBut(block, info_file_importmenu, NULL, ICON_RIGHTARROW_THIN, "Import", 0, yco-=20, menuwidth, 19, "");
+// uiDefIconTextBlockBut(block, info_file_exportmenu, NULL, ICON_RIGHTARROW_THIN, "Export", 0, yco-=20, menuwidth, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBlockBut(block, info_externalfiles, NULL, ICON_RIGHTARROW_THIN, "External Data",0, yco-=20, 120, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Quit Blender|Ctrl Q", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
+ uiBlockSetDirection(block, UI_DOWN);
+ uiTextBoundsBlock(block, 80);
+
+ uiEndBlock(C, block);
+ return block;
+#endif
+}
+#endif
+
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index d72ecd60da9..7b24e8f4e07 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -151,7 +151,12 @@ static void info_main_area_draw(const bContext *C, ARegion *ar)
void info_operatortypes(void)
{
-
+ WM_operatortype_append(FILE_OT_pack_all);
+ WM_operatortype_append(FILE_OT_unpack_all);
+ WM_operatortype_append(FILE_OT_make_paths_relative);
+ WM_operatortype_append(FILE_OT_make_paths_absolute);
+ WM_operatortype_append(FILE_OT_report_missing_files);
+ WM_operatortype_append(FILE_OT_find_missing_files);
}
void info_keymap(struct wmWindowManager *wm)
@@ -162,29 +167,12 @@ void info_keymap(struct wmWindowManager *wm)
/* add handlers, stuff you only do once or on area/region changes */
static void info_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+ ED_region_header_init(ar);
}
static void info_header_area_draw(const bContext *C, ARegion *ar)
{
- 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);
-
- info_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
static void info_main_area_listener(ARegion *ar, wmNotifier *wmn)
diff --git a/source/blender/radiosity/intern/source/Makefile b/source/blender/editors/space_logic/Makefile
index 44b38de9bae..d5709993368 100644
--- a/source/blender/radiosity/intern/source/Makefile
+++ b/source/blender/editors/space_logic/Makefile
@@ -6,7 +6,7 @@
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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) 2001-2002 by NaN Holding BV.
+# The Original Code is Copyright (C) 2007 Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
@@ -26,10 +26,9 @@
#
# ***** END GPL LICENSE BLOCK *****
#
-# radiosity uses the render lib
-#
+# Makes module object directory and bounces make to subdirectories.
-LIBNAME = radiosity
+LIBNAME = ed_logic
DIR = $(OCGDIR)/blender/$(LIBNAME)
include nan_compile.mk
@@ -40,16 +39,16 @@ CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
# not very neat....
-CPPFLAGS += -I../../../blenkernel
-CPPFLAGS += -I../../../blenlib
-CPPFLAGS += -I../../../makesdna
-CPPFLAGS += -I../../../imbuf
-CPPFLAGS += -I../../../
-CPPFLAGS += -I../../../blenloader
+CPPFLAGS += -I../../windowmanager
+CPPFLAGS += -I../../blenloader
+CPPFLAGS += -I../../blenkernel
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../makesrna
+CPPFLAGS += -I../../imbuf
+CPPFLAGS += -I../../python
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-# first /include is my own includes, second are the external includes
-# third is the external interface. there should be a nicer way to say this
-CPPFLAGS += -I../include -I../../../editors/include -I../../extern/include
-CPPFLAGS += -I../../../render/extern/include
-CPPFLAGS += -I../../../render/intern/include
+# own include
+
+CPPFLAGS += -I../include
diff --git a/source/blender/editors/space_logic/SConscript b/source/blender/editors/space_logic/SConscript
new file mode 100644
index 00000000000..e32fcc1b535
--- /dev/null
+++ b/source/blender/editors/space_logic/SConscript
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = env.Glob('*.c')
+
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
+incs += ' ../../makesrna'
+
+defs = []
+
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('GAMEBLENDER=1')
+
+env.BlenderLib ( 'bf_editors_space_game', sources, Split(incs), defs, libtype=['core'], priority=[120] )
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
new file mode 100644
index 00000000000..b082d5d6ae2
--- /dev/null
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -0,0 +1,147 @@
+/**
+ * $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 by Blender Foundation
+ * All rights reserved.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_object_types.h"
+#include "DNA_node_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
+#include "BKE_context.h"
+#include "BKE_global.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BKE_mesh.h"
+#include "BKE_node.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "ED_space_api.h"
+#include "ED_screen.h"
+#include "ED_util.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "logic_intern.h"
+
+static void do_logic_panel_events(bContext *C, void *arg, int event)
+{
+
+ switch(event) {
+
+ }
+}
+
+
+/* *** */
+
+static void logic_panel_properties(const bContext *C, Panel *pa)
+{
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ uiBlock *block;
+
+ block= uiLayoutFreeBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_logic_panel_events, NULL);
+
+}
+
+static void logic_panel_view_properties(const bContext *C, Panel *pa)
+{
+ // SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ uiBlock *block;
+
+ block= uiLayoutFreeBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_logic_panel_events, NULL);
+
+}
+
+
+void logic_buttons_register(ARegionType *art)
+{
+ PanelType *pt;
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype logic panel properties");
+ strcpy(pt->idname, "LOGIC_PT_properties");
+ strcpy(pt->label, "Logic Properties");
+ pt->draw= logic_panel_properties;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype logic view properties");
+ strcpy(pt->idname, "LOGIC_PT_view_properties");
+ strcpy(pt->label, "View Properties");
+ pt->draw= logic_panel_view_properties;
+ BLI_addtail(&art->paneltypes, pt);
+
+}
+
+static int logic_properties(bContext *C, wmOperator *op)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= logic_has_buttons_region(sa);
+
+ if(ar) {
+ ar->flag ^= RGN_FLAG_HIDDEN;
+ ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
+
+ ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
+ ED_area_tag_redraw(sa);
+ }
+ return OPERATOR_FINISHED;
+}
+
+void LOGIC_OT_properties(wmOperatorType *ot)
+{
+ ot->name= "Properties";
+ ot->idname= "LOGIC_OT_properties";
+
+ ot->exec= logic_properties;
+ ot->poll= ED_operator_logic_active;
+
+ /* flags */
+ ot->flag= 0;
+}
+
+
+
diff --git a/source/blender/editors/space_logic/logic_header.c b/source/blender/editors/space_logic/logic_header.c
new file mode 100644
index 00000000000..d0e905728be
--- /dev/null
+++ b/source/blender/editors/space_logic/logic_header.c
@@ -0,0 +1,126 @@
+/**
+ * $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): Blender Foundation
+ *
+ * ***** 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 "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+
+#include "BKE_context.h"
+#include "BKE_screen.h"
+#include "BKE_main.h"
+
+#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "logic_intern.h"
+
+/* ************************ header area region *********************** */
+
+
+static void do_logic_buttons(bContext *C, void *arg, int event)
+{
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+}
+
+static uiBlock *logic_addmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "logic_addmenu", UI_EMBOSSP);
+// uiBlockSetButmFunc(block, do_logic_addmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ uiTextBoundsBlock(block, 50);
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+void logic_header_buttons(const bContext *C, ARegion *ar)
+{
+ ScrArea *sa= CTX_wm_area(C);
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ uiBlock *block;
+ short xco, yco= 3;
+
+ block= uiBeginBlock(C, ar, "header logic", UI_EMBOSS);
+ uiBlockSetHandleFunc(block, do_logic_buttons, NULL);
+
+ xco= ED_area_header_standardbuttons(C, block, yco);
+
+ if((sa->flag & HEADER_NO_PULLDOWN)==0) {
+ int xmax;
+
+ xmax= GetButStringLength("View");
+ uiDefPulldownBut(block, logic_addmenu, NULL,
+ "View", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Select");
+ uiDefPulldownBut(block, logic_addmenu, NULL,
+ "Select", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Add");
+ uiDefPulldownBut(block, logic_addmenu, NULL,
+ "Add", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+ }
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ UI_view2d_totRect_set(&ar->v2d, xco+XIC+100, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
+
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
+}
+
+
diff --git a/source/blender/editors/space_logic/logic_intern.h b/source/blender/editors/space_logic/logic_intern.h
new file mode 100644
index 00000000000..ac5d11a3ee1
--- /dev/null
+++ b/source/blender/editors/space_logic/logic_intern.h
@@ -0,0 +1,58 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef ED_LOGIC_INTERN_H
+#define ED_LOGIC_INTERN_H
+
+/* internal exports only */
+struct bContext;
+struct ARegion;
+struct ARegionType;
+struct ScrArea;
+struct SpaceLogic;
+struct Object;
+struct wmOperatorType;
+struct Scene;
+
+/* space_logic.c */
+struct ARegion *logic_has_buttons_region(struct ScrArea *sa);
+
+/* logic_header.c */
+void logic_header_buttons(const struct bContext *C, struct ARegion *ar);
+
+/* logic_ops.c */
+
+/* logic_buttons.c */
+void logic_buttons_register(struct ARegionType *art);
+void LOGIC_OT_properties(struct wmOperatorType *ot);
+
+/* logic_window.c */
+void logic_buttons(struct bContext *C, struct ARegion *ar);
+
+#endif /* ED_LOGIC_INTERN_H */
+
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
new file mode 100644
index 00000000000..55e21561c34
--- /dev/null
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -0,0 +1,3351 @@
+/**
+ * $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): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_actuator_types.h"
+#include "DNA_controller_types.h"
+#include "DNA_object_types.h"
+#include "DNA_property_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sensor_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+
+#include "BKE_context.h"
+#include "BKE_global.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BKE_property.h"
+#include "BKE_screen.h"
+#include "BKE_sca.h"
+#include "BKE_utildefines.h"
+
+#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+/* XXX BAD BAD */
+#include "../interface/interface_intern.h"
+
+#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
+
+#define B_ADD_CONT 2706
+#define B_CHANGE_CONT 2707
+#define B_DEL_CONT 2708
+
+#define B_ADD_ACT 2709
+#define B_CHANGE_ACT 2710
+#define B_DEL_ACT 2711
+
+#define B_SOUNDACT_BROWSE 2712
+
+#define B_SETSECTOR 2713
+#define B_SETPROP 2714
+#define B_SETACTOR 2715
+#define B_SETMAINACTOR 2716
+#define B_SETDYNA 2717
+#define B_SET_STATE_BIT 2718
+#define B_INIT_STATE_BIT 2719
+
+/* proto */
+static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisflag);
+
+static int vergname(const void *v1, const void *v2)
+{
+ char **x1, **x2;
+
+ x1= (char **)v1;
+ x2= (char **)v2;
+
+ return strcmp(*x1, *x2);
+}
+
+void make_unique_prop_names(bContext *C, char *str)
+{
+ Object *ob;
+ bProperty *prop;
+ bSensor *sens;
+ bController *cont;
+ bActuator *act;
+ ID **idar;
+ short a, obcount, propcount=0, nr;
+ char **names;
+
+ /* this function is called by a Button, and gives the current
+ * stringpointer as an argument, this is the one that can change
+ */
+
+ idar= get_selected_and_linked_obs(C, &obcount, BUTS_SENS_SEL|BUTS_SENS_ACT|BUTS_ACT_SEL|BUTS_ACT_ACT|BUTS_CONT_SEL|BUTS_CONT_ACT);
+
+ /* for each object, make properties and sca names unique */
+
+ /* count total names */
+ for(a=0; a<obcount; a++) {
+ ob= (Object *)idar[a];
+ propcount+= BLI_countlist(&ob->prop);
+ propcount+= BLI_countlist(&ob->sensors);
+ propcount+= BLI_countlist(&ob->controllers);
+ propcount+= BLI_countlist(&ob->actuators);
+ }
+ if(propcount==0) {
+ if(idar) MEM_freeN(idar);
+ return;
+ }
+
+ /* make names array for sorting */
+ names= MEM_callocN(propcount*sizeof(void *), "names");
+
+ /* count total names */
+ nr= 0;
+ for(a=0; a<obcount; a++) {
+ ob= (Object *)idar[a];
+ prop= ob->prop.first;
+ while(prop) {
+ names[nr++]= prop->name;
+ prop= prop->next;
+ }
+ sens= ob->sensors.first;
+ while(sens) {
+ names[nr++]= sens->name;
+ sens= sens->next;
+ }
+ cont= ob->controllers.first;
+ while(cont) {
+ names[nr++]= cont->name;
+ cont= cont->next;
+ }
+ act= ob->actuators.first;
+ while(act) {
+ names[nr++]= act->name;
+ act= act->next;
+ }
+ }
+
+ qsort(names, propcount, sizeof(void *), vergname);
+
+ /* now we check for double names, and change them */
+
+ for(nr=0; nr<propcount; nr++) {
+ if(names[nr]!=str && strcmp( names[nr], str )==0 ) {
+ BLI_newname(str, +1);
+ }
+ }
+
+ MEM_freeN(idar);
+ MEM_freeN(names);
+}
+
+static void make_unique_prop_names_cb(bContext *C, void *strv, void *redraw_view3d_flagv)
+{
+ char *str= strv;
+// int redraw_view3d_flag= GET_INT_FROM_POINTER(redraw_view3d_flagv);
+
+ make_unique_prop_names(C, str);
+}
+
+
+static void sca_move_sensor(bContext *C, void *datav, void *data2_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ bSensor *sens_to_delete= datav;
+ int val;
+ Base *base;
+ bSensor *sens, *tmp;
+
+ val= pupmenu("Move up%x1|Move down %x2");
+
+ if(val>0) {
+ /* now find out which object has this ... */
+ base= FIRSTBASE;
+ while(base) {
+
+ sens= base->object->sensors.first;
+ while(sens) {
+ if(sens == sens_to_delete) break;
+ sens= sens->next;
+ }
+
+ if(sens) {
+ if( val==1 && sens->prev) {
+ for (tmp=sens->prev; tmp; tmp=tmp->prev) {
+ if (tmp->flag & SENS_VISIBLE)
+ break;
+ }
+ if (tmp) {
+ BLI_remlink(&base->object->sensors, sens);
+ BLI_insertlinkbefore(&base->object->sensors, tmp, sens);
+ }
+ }
+ else if( val==2 && sens->next) {
+ for (tmp=sens->next; tmp; tmp=tmp->next) {
+ if (tmp->flag & SENS_VISIBLE)
+ break;
+ }
+ if (tmp) {
+ BLI_remlink(&base->object->sensors, sens);
+ BLI_insertlink(&base->object->sensors, tmp, sens);
+ }
+ }
+ ED_undo_push(C, "Move sensor");
+ break;
+ }
+
+ base= base->next;
+ }
+ }
+}
+
+static void sca_move_controller(bContext *C, void *datav, void *data2_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ bController *controller_to_del= datav;
+ int val;
+ Base *base;
+ bController *cont, *tmp;
+
+ val= pupmenu("Move up%x1|Move down %x2");
+
+ if(val>0) {
+ /* now find out which object has this ... */
+ base= FIRSTBASE;
+ while(base) {
+
+ cont= base->object->controllers.first;
+ while(cont) {
+ if(cont == controller_to_del) break;
+ cont= cont->next;
+ }
+
+ if(cont) {
+ if( val==1 && cont->prev) {
+ /* locate the controller that has the same state mask but is earlier in the list */
+ tmp = cont->prev;
+ while(tmp) {
+ if(tmp->state_mask & cont->state_mask)
+ break;
+ tmp = tmp->prev;
+ }
+ if (tmp) {
+ BLI_remlink(&base->object->controllers, cont);
+ BLI_insertlinkbefore(&base->object->controllers, tmp, cont);
+ }
+ }
+ else if( val==2 && cont->next) {
+ tmp = cont->next;
+ while(tmp) {
+ if(tmp->state_mask & cont->state_mask)
+ break;
+ tmp = tmp->next;
+ }
+ BLI_remlink(&base->object->controllers, cont);
+ BLI_insertlink(&base->object->controllers, tmp, cont);
+ }
+ ED_undo_push(C, "Move controller");
+ break;
+ }
+
+ base= base->next;
+ }
+ }
+}
+
+static void sca_move_actuator(bContext *C, void *datav, void *data2_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ bActuator *actuator_to_move= datav;
+ int val;
+ Base *base;
+ bActuator *act, *tmp;
+
+ val= pupmenu("Move up%x1|Move down %x2");
+
+ if(val>0) {
+ /* now find out which object has this ... */
+ base= FIRSTBASE;
+ while(base) {
+
+ act= base->object->actuators.first;
+ while(act) {
+ if(act == actuator_to_move) break;
+ act= act->next;
+ }
+
+ if(act) {
+ if( val==1 && act->prev) {
+ /* locate the first visible actuators before this one */
+ for (tmp = act->prev; tmp; tmp=tmp->prev) {
+ if (tmp->flag & ACT_VISIBLE)
+ break;
+ }
+ if (tmp) {
+ BLI_remlink(&base->object->actuators, act);
+ BLI_insertlinkbefore(&base->object->actuators, tmp, act);
+ }
+ }
+ else if( val==2 && act->next) {
+ for (tmp=act->next; tmp; tmp=tmp->next) {
+ if (tmp->flag & ACT_VISIBLE)
+ break;
+ }
+ if (tmp) {
+ BLI_remlink(&base->object->actuators, act);
+ BLI_insertlink(&base->object->actuators, tmp, act);
+ }
+ }
+ ED_undo_push(C, "Move actuator");
+ break;
+ }
+
+ base= base->next;
+ }
+ }
+}
+
+void do_logic_buts(bContext *C, void *arg, int event)
+{
+ bProperty *prop;
+ bSensor *sens;
+ bController *cont;
+ bActuator *act;
+ Object *ob;
+ int didit, bit;
+
+ ob= CTX_data_active_object(C);
+ if(ob==NULL) return;
+
+ switch(event) {
+
+ case B_SETPROP:
+ /* check for inconsistant types */
+ ob->gameflag &= ~(OB_SECTOR|OB_MAINACTOR|OB_DYNAMIC|OB_ACTOR);
+ break;
+
+ case B_SETACTOR:
+ case B_SETDYNA:
+ 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;
+
+ case B_CHANGE_PROP:
+ prop= ob->prop.first;
+ while(prop) {
+ if(prop->type!=prop->otype) {
+ init_property(prop);
+ }
+ prop= prop->next;
+ }
+ break;
+
+ case B_ADD_SENS:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ if(ob->scaflag & OB_ADDSENS) {
+ ob->scaflag &= ~OB_ADDSENS;
+ sens= new_sensor(SENS_ALWAYS);
+ BLI_addtail(&(ob->sensors), sens);
+ make_unique_prop_names(C, sens->name);
+ ob->scaflag |= OB_SHOWSENS;
+ }
+ }
+
+ ED_undo_push(C, "Add sensor");
+ break;
+
+ case B_CHANGE_SENS:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ sens= ob->sensors.first;
+ while(sens) {
+ if(sens->type != sens->otype) {
+ init_sensor(sens);
+ sens->otype= sens->type;
+ break;
+ }
+ sens= sens->next;
+ }
+ }
+ break;
+
+ case B_DEL_SENS:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ sens= ob->sensors.first;
+ while(sens) {
+ if(sens->flag & SENS_DEL) {
+ BLI_remlink(&(ob->sensors), sens);
+ free_sensor(sens);
+ break;
+ }
+ sens= sens->next;
+ }
+ }
+ ED_undo_push(C, "Delete sensor");
+ break;
+
+ case B_ADD_CONT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ if(ob->scaflag & OB_ADDCONT) {
+ ob->scaflag &= ~OB_ADDCONT;
+ cont= new_controller(CONT_LOGIC_AND);
+ make_unique_prop_names(C, cont->name);
+ ob->scaflag |= OB_SHOWCONT;
+ BLI_addtail(&(ob->controllers), cont);
+ /* set the controller state mask from the current object state.
+ A controller is always in a single state, so select the lowest bit set
+ from the object state */
+ for (bit=0; bit<32; bit++) {
+ if (ob->state & (1<<bit))
+ break;
+ }
+ cont->state_mask = (1<<bit);
+ if (cont->state_mask == 0) {
+ /* shouldn't happen, object state is never 0 */
+ cont->state_mask = 1;
+ }
+ }
+ }
+ ED_undo_push(C, "Add controller");
+ break;
+
+ case B_SET_STATE_BIT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ if(ob->scaflag & OB_SETSTBIT) {
+ ob->scaflag &= ~OB_SETSTBIT;
+ ob->state = 0x3FFFFFFF;
+ }
+ }
+ break;
+
+ case B_INIT_STATE_BIT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ if(ob->scaflag & OB_INITSTBIT) {
+ ob->scaflag &= ~OB_INITSTBIT;
+ ob->state = ob->init_state;
+ if (!ob->state)
+ ob->state = 1;
+ }
+ }
+ break;
+
+ case B_CHANGE_CONT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ cont= ob->controllers.first;
+ while(cont) {
+ if(cont->type != cont->otype) {
+ init_controller(cont);
+ cont->otype= cont->type;
+ break;
+ }
+ cont= cont->next;
+ }
+ }
+ break;
+
+
+ case B_DEL_CONT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ cont= ob->controllers.first;
+ while(cont) {
+ if(cont->flag & CONT_DEL) {
+ BLI_remlink(&(ob->controllers), cont);
+ unlink_controller(cont);
+ free_controller(cont);
+ break;
+ }
+ cont= cont->next;
+ }
+ }
+ ED_undo_push(C, "Delete controller");
+ break;
+
+ case B_ADD_ACT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ if(ob->scaflag & OB_ADDACT) {
+ ob->scaflag &= ~OB_ADDACT;
+ act= new_actuator(ACT_OBJECT);
+ make_unique_prop_names(C, act->name);
+ BLI_addtail(&(ob->actuators), act);
+ ob->scaflag |= OB_SHOWACT;
+ }
+ }
+ ED_undo_push(C, "Add actuator");
+ break;
+
+ case B_CHANGE_ACT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ act= ob->actuators.first;
+ while(act) {
+ if(act->type != act->otype) {
+ init_actuator(act);
+ act->otype= act->type;
+ break;
+ }
+ act= act->next;
+ }
+ }
+ break;
+
+ case B_DEL_ACT:
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ act= ob->actuators.first;
+ while(act) {
+ if(act->flag & ACT_DEL) {
+ BLI_remlink(&(ob->actuators), act);
+ unlink_actuator(act);
+ free_actuator(act);
+ break;
+ }
+ act= act->next;
+ }
+ }
+ ED_undo_push(C, "Delete actuator");
+ break;
+
+ case B_SOUNDACT_BROWSE:
+ /* since we don't know which... */
+ didit= 0;
+ for(ob=G.main->object.first; ob; ob=ob->id.next) {
+ act= ob->actuators.first;
+ while(act)
+ {
+ if(act->type==ACT_SOUND)
+ {
+ bSoundActuator *sa= act->data;
+ if(sa->sndnr)
+ {
+ bSound *sound= G.main->sound.first;
+ int nr= 1;
+
+ if(sa->sndnr == -2) {
+// XXX activate_databrowse((ID *)G.main->sound.first, ID_SO, 0, B_SOUNDACT_BROWSE,
+// &sa->sndnr, do_logic_buts);
+ break;
+ }
+
+ while(sound)
+ {
+ if(nr==sa->sndnr)
+ break;
+ nr++;
+ sound= sound->id.next;
+ }
+
+ if(sa->sound)
+ sa->sound->id.us--;
+
+ sa->sound= sound;
+
+ if(sound)
+ sound->id.us++;
+
+ sa->sndnr= 0;
+ didit= 1;
+ }
+ }
+ act= act->next;
+ }
+ if(didit)
+ break;
+ }
+
+ break;
+ }
+}
+
+
+static char *sensor_name(int type)
+{
+ switch (type) {
+ case SENS_ALWAYS:
+ return "Always";
+ case SENS_TOUCH:
+ return "Touch";
+ case SENS_NEAR:
+ return "Near";
+ case SENS_KEYBOARD:
+ return "Keyboard";
+ case SENS_PROPERTY:
+ return "Property";
+ case SENS_ACTUATOR:
+ return "Actuator";
+ case SENS_DELAY:
+ return "Delay";
+ case SENS_MOUSE:
+ return "Mouse";
+ case SENS_COLLISION:
+ return "Collision";
+ case SENS_RADAR:
+ return "Radar";
+ case SENS_RANDOM:
+ return "Random";
+ case SENS_RAY:
+ return "Ray";
+ case SENS_MESSAGE:
+ return "Message";
+ case SENS_JOYSTICK:
+ return "Joystick";
+ }
+ return "unknown";
+}
+
+static char *sensor_pup(void)
+{
+ /* the number needs to match defines in game.h */
+ return "Sensors %t|Always %x0|Delay %x13|Keyboard %x3|Mouse %x5|"
+ "Touch %x1|Collision %x6|Near %x2|Radar %x7|"
+ "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12";
+}
+
+static char *controller_name(int type)
+{
+ switch (type) {
+ case CONT_LOGIC_AND:
+ return "AND";
+ case CONT_LOGIC_OR:
+ return "OR";
+ case CONT_LOGIC_NAND:
+ return "NAND";
+ case CONT_LOGIC_NOR:
+ return "NOR";
+ case CONT_LOGIC_XOR:
+ return "XOR";
+ case CONT_LOGIC_XNOR:
+ return "XNOR";
+ case CONT_EXPRESSION:
+ return "Expression";
+ case CONT_PYTHON:
+ return "Python";
+ }
+ return "unknown";
+}
+
+static char *controller_pup(void)
+{
+ return "Controllers %t|AND %x0|OR %x1|XOR %x6|NAND %x4|NOR %x5|XNOR %x7|Expression %x2|Python %x3";
+}
+
+static char *actuator_name(int type)
+{
+ switch (type) {
+ case ACT_SHAPEACTION:
+ return "Shape Action";
+ case ACT_ACTION:
+ return "Action";
+ case ACT_OBJECT:
+ return "Motion";
+ case ACT_IPO:
+ return "Ipo";
+ case ACT_LAMP:
+ return "Lamp";
+ case ACT_CAMERA:
+ return "Camera";
+ case ACT_MATERIAL:
+ return "Material";
+ case ACT_SOUND:
+ return "Sound";
+ case ACT_CD:
+ return "CD";
+ case ACT_PROPERTY:
+ return "Property";
+ case ACT_EDIT_OBJECT:
+ return "Edit Object";
+ case ACT_CONSTRAINT:
+ return "Constraint";
+ case ACT_SCENE:
+ return "Scene";
+ case ACT_GROUP:
+ return "Group";
+ case ACT_RANDOM:
+ return "Random";
+ case ACT_MESSAGE:
+ return "Message";
+ case ACT_GAME:
+ return "Game";
+ case ACT_VISIBILITY:
+ return "Visibility";
+ case ACT_2DFILTER:
+ return "2D Filter";
+ case ACT_PARENT:
+ return "Parent";
+ case ACT_STATE:
+ return "State";
+ }
+ return "unknown";
+}
+
+
+
+
+static char *actuator_pup(Object *owner)
+{
+ switch (owner->type)
+ {
+ case OB_ARMATURE:
+ return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1"
+ "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10"
+ "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17"
+ "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22";
+ break;
+
+ case OB_MESH:
+ return "Actuators %t|Shape Action %x21|Motion %x0|Constraint %x9|Ipo %x1"
+ "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10"
+ "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17"
+ "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22";
+ break;
+
+ default:
+ return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1"
+ "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10"
+ "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17"
+ "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22";
+ }
+}
+
+
+
+static void set_sca_ob(Object *ob)
+{
+ bController *cont;
+ bActuator *act;
+
+ cont= ob->controllers.first;
+ while(cont) {
+ cont->mynew= (bController *)ob;
+ cont= cont->next;
+ }
+ act= ob->actuators.first;
+ while(act) {
+ act->mynew= (bActuator *)ob;
+ act= act->next;
+ }
+}
+
+static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisflag)
+{
+ Base *base;
+ Scene *scene= CTX_data_scene(C);
+ Object *ob, *obt, *obact= CTX_data_active_object(C);
+ ID **idar;
+ bSensor *sens;
+ bController *cont;
+ unsigned int lay;
+ int a, nr, doit;
+
+ /* we need a sorted object list */
+ /* set scavisflags flags in Objects to indicate these should be evaluated */
+ /* also hide ob pointers in ->new entries of controllerss/actuators */
+
+ *count= 0;
+
+ if(scene==NULL) return NULL;
+
+ ob= G.main->object.first;
+ while(ob) {
+ ob->scavisflag= 0;
+ set_sca_ob(ob);
+ ob= ob->id.next;
+ }
+
+ /* XXX here it checked 3d lay */
+ lay= scene->lay;
+
+ base= FIRSTBASE;
+ while(base) {
+ if(base->lay & lay) {
+ if(base->flag & SELECT) {
+ if(scavisflag & BUTS_SENS_SEL) base->object->scavisflag |= OB_VIS_SENS;
+ if(scavisflag & BUTS_CONT_SEL) base->object->scavisflag |= OB_VIS_CONT;
+ if(scavisflag & BUTS_ACT_SEL) base->object->scavisflag |= OB_VIS_ACT;
+ }
+ }
+ base= base->next;
+ }
+
+ if(obact) {
+ if(scavisflag & BUTS_SENS_ACT) obact->scavisflag |= OB_VIS_SENS;
+ if(scavisflag & BUTS_CONT_ACT) obact->scavisflag |= OB_VIS_CONT;
+ if(scavisflag & BUTS_ACT_ACT) obact->scavisflag |= OB_VIS_ACT;
+ }
+
+ /* BUTS_XXX_STATE are similar to BUTS_XXX_LINK for selecting the object */
+ if(scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) {
+ doit= 1;
+ while(doit) {
+ doit= 0;
+
+ ob= G.main->object.first;
+ while(ob) {
+
+ /* 1st case: select sensor when controller selected */
+ if((scavisflag & (BUTS_SENS_LINK|BUTS_SENS_STATE)) && (ob->scavisflag & OB_VIS_SENS)==0) {
+ sens= ob->sensors.first;
+ while(sens) {
+ for(a=0; a<sens->totlinks; a++) {
+ if(sens->links[a]) {
+ obt= (Object *)sens->links[a]->mynew;
+ if(obt && (obt->scavisflag & OB_VIS_CONT)) {
+ doit= 1;
+ ob->scavisflag |= OB_VIS_SENS;
+ break;
+ }
+ }
+ }
+ if(doit) break;
+ sens= sens->next;
+ }
+ }
+
+ /* 2nd case: select cont when act selected */
+ if((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) {
+ cont= ob->controllers.first;
+ while(cont) {
+ for(a=0; a<cont->totlinks; a++) {
+ if(cont->links[a]) {
+ obt= (Object *)cont->links[a]->mynew;
+ if(obt && (obt->scavisflag & OB_VIS_ACT)) {
+ doit= 1;
+ ob->scavisflag |= OB_VIS_CONT;
+ break;
+ }
+ }
+ }
+ if(doit) break;
+ cont= cont->next;
+ }
+ }
+
+ /* 3rd case: select controller when sensor selected */
+ if((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_SENS)) {
+ sens= ob->sensors.first;
+ while(sens) {
+ for(a=0; a<sens->totlinks; a++) {
+ if(sens->links[a]) {
+ obt= (Object *)sens->links[a]->mynew;
+ if(obt && (obt->scavisflag & OB_VIS_CONT)==0) {
+ doit= 1;
+ obt->scavisflag |= OB_VIS_CONT;
+ }
+ }
+ }
+ sens= sens->next;
+ }
+ }
+
+ /* 4th case: select actuator when controller selected */
+ if( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) {
+ cont= ob->controllers.first;
+ while(cont) {
+ for(a=0; a<cont->totlinks; a++) {
+ if(cont->links[a]) {
+ obt= (Object *)cont->links[a]->mynew;
+ if(obt && (obt->scavisflag & OB_VIS_ACT)==0) {
+ doit= 1;
+ obt->scavisflag |= OB_VIS_ACT;
+ }
+ }
+ }
+ cont= cont->next;
+ }
+
+ }
+ ob= ob->id.next;
+ }
+ }
+ }
+
+ /* now we count */
+ ob= G.main->object.first;
+ while(ob) {
+ if( ob->scavisflag ) (*count)++;
+ ob= ob->id.next;
+ }
+
+ if(*count==0) return NULL;
+ if(*count>24) *count= 24; /* temporal */
+
+ idar= MEM_callocN( (*count)*sizeof(void *), "idar");
+
+ ob= G.main->object.first;
+ nr= 0;
+ while(ob) {
+ if( ob->scavisflag ) {
+ idar[nr]= (ID *)ob;
+ nr++;
+ }
+ if(nr>=24) break;
+ ob= ob->id.next;
+ }
+
+ /* just to be sure... these were set in set_sca_done_ob() */
+ clear_sca_new_poins();
+
+ return idar;
+}
+
+
+static int get_col_sensor(int type)
+{
+ /* XXX themecolors not here */
+
+ switch(type) {
+ case SENS_ALWAYS: return TH_PANEL;
+ case SENS_DELAY: return TH_PANEL;
+ case SENS_TOUCH: return TH_PANEL;
+ case SENS_COLLISION: return TH_PANEL;
+ case SENS_NEAR: return TH_PANEL;
+ case SENS_KEYBOARD: return TH_PANEL;
+ case SENS_PROPERTY: return TH_PANEL;
+ case SENS_ACTUATOR: return TH_PANEL;
+ case SENS_MOUSE: return TH_PANEL;
+ case SENS_RADAR: return TH_PANEL;
+ case SENS_RANDOM: return TH_PANEL;
+ case SENS_RAY: return TH_PANEL;
+ case SENS_MESSAGE: return TH_PANEL;
+ case SENS_JOYSTICK: return TH_PANEL;
+ default: return TH_PANEL;
+ }
+}
+static void set_col_sensor(int type, int medium)
+{
+ int col= get_col_sensor(type);
+ UI_ThemeColorShade(col, medium?30:0);
+}
+
+
+static void verify_logicbutton_func(bContext *C, void *data1, void *data2)
+{
+ bSensor *sens= (bSensor*)data1;
+
+ if(sens->level && sens->tap) {
+ if(data2 == &(sens->level))
+ sens->tap= 0;
+ else
+ sens->level= 0;
+ }
+}
+
+
+/**
+ * Draws a toggle for pulse mode, a frequency field and a toggle to invert
+ * the value of this sensor. Operates on the shared data block of sensors.
+ */
+static void draw_default_sensor_header(bSensor *sens,
+ uiBlock *block,
+ short x,
+ short y,
+ short w)
+{
+ uiBut *but;
+
+ /* Pulsing and frequency */
+ 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,
+ "Activate TRUE level triggering (pulse mode)");
+
+ uiDefIconButBitS(block, TOG, SENS_NEG_PULSE_MODE, 1, ICON_DOTSDOWN,
+ (short)(x + 10 + 0.1 * (w-20)), (short)(y - 21), (short)(0.1 * (w-20)), 19,
+ &sens->pulse, 0.0, 0.0, 0, 0,
+ "Activate FALSE level triggering (pulse mode)");
+ uiDefButS(block, NUM, 1, "f:",
+ (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)");
+
+ /* value or shift? */
+ 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,
+ "Level detector, trigger controllers of new states (only applicable upon logic state transition)");
+ uiButSetFunc(but, verify_logicbutton_func, sens, &(sens->level));
+ but= uiDefButS(block, TOG, 1, "Tap",
+ (short)(x + 10 + 0.702 * (w-20)), (short)(y - 21), (short)(0.12 * (w-20)), 19,
+ &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));
+
+ uiDefButS(block, TOG, 1, "Inv",
+ (short)(x + 10 + 0.85 * (w-20)), (short)(y - 21), (short)(0.15 * (w-20)), 19,
+ &sens->invert, 0.0, 0.0, 0, 0,
+ "Invert the level (output) of this sensor");
+}
+
+static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname)
+{
+ bNearSensor *ns = NULL;
+ bTouchSensor *ts = NULL;
+ bKeyboardSensor *ks = NULL;
+ bPropertySensor *ps = NULL;
+ bMouseSensor *ms = NULL;
+ bCollisionSensor *cs = NULL;
+ bRadarSensor *rs = NULL;
+ bRandomSensor *randomSensor = NULL;
+ bRaySensor *raySens = NULL;
+ bMessageSensor *mes = NULL;
+ bJoystickSensor *joy = NULL;
+ bActuatorSensor *as = NULL;
+ bDelaySensor *ds = NULL;
+ short ysize;
+ char *str;
+
+ /* yco is at the top of the rect, draw downwards */
+
+ set_col_sensor(sens->type, 0);
+
+ switch (sens->type)
+ {
+ case SENS_ALWAYS:
+ {
+ ysize= 24;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ yco-= ysize;
+
+ break;
+ }
+ case SENS_TOUCH:
+ {
+ ysize= 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ ts= sens->data;
+
+ /* uiDefBut(block, TEX, 1, "Property:", xco,yco-22,width, 19, &ts->name, 0, 31, 0, 0, "Only look for Objects with this property"); */
+ uiDefIDPoinBut(block, test_matpoin_but, ID_MA, 1, "MA:",(short)(xco + 10),(short)(yco-44), (short)(width - 20), 19, &ts->ma, "Only look for floors with this Material");
+ ///* uiDefButF(block, NUM, 1, "Margin:", xco+width/2,yco-44,width/2, 19, &ts->dist, 0.0, 10.0, 100, 0, "Extra margin (distance) for larger sensitivity");
+ yco-= ysize;
+ break;
+ }
+ case SENS_COLLISION:
+ {
+ ysize= 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ cs= sens->data;
+
+ /* The collision sensor will become a generic collision (i.e. it */
+ /* absorb the old touch sensor). */
+
+ uiDefButBitS(block, TOG, SENS_COLLISION_PULSE, B_REDR, "Pulse",(short)(xco + 10),(short)(yco - 44),
+ (short)(0.20 * (width-20)), 19, &cs->mode, 0.0, 0.0, 0, 0,
+ "Changes to the set of colliding objects generated pulses");
+
+ uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",(short)(xco + 10 + (0.20 * (width-20))),(short)(yco - 44),
+ (short)(0.20 * (width-20)), 19, &cs->mode, 0.0, 0.0, 0, 0,
+ "Toggle collision on material or property");
+
+ if (cs->mode & SENS_COLLISION_MATERIAL) {
+ uiDefBut(block, TEX, 1, "Material:", (short)(xco + 10 + 0.40 * (width-20)),
+ (short)(yco-44), (short)(0.6*(width-20)), 19, &cs->materialName, 0, 31, 0, 0,
+ "Only look for Objects with this material");
+ } else {
+ uiDefBut(block, TEX, 1, "Property:", (short)(xco + 10 + 0.40 * (width-20)), (short)(yco-44),
+ (short)(0.6*(width-20)), 19, &cs->name, 0, 31, 0, 0,
+ "Only look for Objects with this property");
+ }
+
+ /* uiDefButS(block, NUM, 1, "Damp:", xco+10+width-90,yco-24, 70, 19, &cs->damp, 0, 250, 0, 0, "For 'damp' time don't detect another collision"); */
+
+ yco-= ysize;
+ break;
+ }
+ case SENS_NEAR:
+ {
+ ysize= 72;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ ns= sens->data;
+
+ uiDefBut(block, TEX, 1, "Property:",(short)(10+xco),(short)(yco-44), (short)(width-20), 19,
+ &ns->name, 0, 31, 0, 0, "Only look for Objects with this property");
+ uiDefButF(block, NUM, 1, "Dist",(short)(10+xco),(short)(yco-68),(short)((width-22)/2), 19,
+ &ns->dist, 0.0, 1000.0, 1000, 0, "Trigger distance");
+ uiDefButF(block, NUM, 1, "Reset",(short)(10+xco+(width-22)/2), (short)(yco-68), (short)((width-22)/2), 19,
+ &ns->resetdist, 0.0, 1000.0, 1000, 0, "Reset distance");
+ yco-= ysize;
+ break;
+ }
+ case SENS_RADAR:
+ {
+ ysize= 72;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ rs= sens->data;
+
+ uiDefBut(block, TEX, 1, "Prop:",
+ (short)(10+xco),(short)(yco-44), (short)(0.7 * (width-20)), 19,
+ &rs->name, 0, 31, 0, 0,
+ "Only look for Objects with this property");
+
+ str = "Type %t|+X axis %x0|+Y axis %x1|+Z axis %x2|-X axis %x3|-Y axis %x4|-Z axis %x5";
+ uiDefButS(block, MENU, B_REDR, str,
+ (short)(10+xco+0.7 * (width-20)), (short)(yco-44), (short)(0.3 * (width-22)), 19,
+ &rs->axis, 2.0, 31, 0, 0,
+ "Specify along which axis the radar cone is cast");
+
+ uiDefButF(block, NUM, 1, "Ang:",
+ (short)(10+xco), (short)(yco-68), (short)((width-20)/2), 19,
+ &rs->angle, 0.0, 179.9, 10, 0,
+ "Opening angle of the radar cone");
+ uiDefButF(block, NUM, 1, "Dist:",
+ (short)(xco+10 + (width-20)/2), (short)(yco-68), (short)((width-20)/2), 19,
+ &rs->range, 0.01, 10000.0, 100, 0,
+ "Depth of the radar cone");
+ yco-= ysize;
+ break;
+ }
+ case SENS_KEYBOARD:
+ {
+ ks= sens->data;
+
+ /* 5 lines: 120 height */
+ ysize= (ks->type&1) ? 96:120;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ /* header line */
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ /* part of line 1 */
+ uiDefBut(block, LABEL, 0, "Key", xco, yco-44, 40, 19, NULL, 0, 0, 0, 0, "");
+ uiDefButBitS(block, TOG, 1, B_REDR, "All keys", xco+40+(width/2), yco-44, (width/2)-50, 19,
+ &ks->type, 0, 0, 0, 0, "");
+
+
+ if ((ks->type&1)==0) { /* is All Keys option off? */
+ /* line 2: hotkey and allkeys toggle */
+ uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code");
+
+ /* line 3: two key modifyers (qual1, qual2) */
+ uiDefBut(block, LABEL, 0, "Hold", xco, yco-68, 40, 19, NULL, 0, 0, 0, 0, "");
+ uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code");
+ uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code");
+ }
+
+ /* line 4: toggle property for string logging mode */
+ uiDefBut(block, TEX, 1, "LogToggle: ",
+ xco+10, yco-((ks->type&1) ? 68:92), (width-20), 19,
+ ks->toggleName, 0, 31, 0, 0,
+ "Property that indicates whether to log "
+ "keystrokes as a string");
+
+ /* line 5: target property for string logging mode */
+ uiDefBut(block, TEX, 1, "Target: ",
+ xco+10, yco-((ks->type&1) ? 92:116), (width-20), 19,
+ ks->targetName, 0, 31, 0, 0,
+ "Property that receives the keystrokes in case "
+ "a string is logged");
+
+ yco-= ysize;
+ break;
+ }
+ case SENS_PROPERTY:
+ {
+ ysize= 96;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize,
+ (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ ps= sens->data;
+
+ str= "Type %t|Equal %x0|Not Equal %x1|Interval %x2|Changed %x3";
+ /* str= "Type %t|Equal %x0|Not Equal %x1"; */
+ uiDefButI(block, MENU, B_REDR, str, xco+30,yco-44,width-60, 19,
+ &ps->type, 0, 31, 0, 0, "Type");
+
+ if (ps->type != SENS_PROP_EXPRESSION)
+ {
+ uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-68,width-60, 19,
+ ps->name, 0, 31, 0, 0, "Property name");
+ }
+
+ if(ps->type == SENS_PROP_INTERVAL)
+ {
+ uiDefBut(block, TEX, 1, "Min: ", xco,yco-92,width/2, 19,
+ ps->value, 0, 31, 0, 0, "check for min value");
+ uiDefBut(block, TEX, 1, "Max: ", xco+width/2,yco-92,width/2, 19,
+ ps->maxvalue, 0, 31, 0, 0, "check for max value");
+ }
+ else if(ps->type == SENS_PROP_CHANGED);
+ else
+ {
+ uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-92,width-60, 19,
+ ps->value, 0, 31, 0, 0, "check for value");
+ }
+
+ yco-= ysize;
+ break;
+ }
+ case SENS_ACTUATOR:
+ {
+ ysize= 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize,
+ (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ as= sens->data;
+
+ uiDefBut(block, TEX, 1, "Act: ", xco+30,yco-44,width-60, 19,
+ as->name, 0, 31, 0, 0, "Actuator name, actuator active state modifications will be detected");
+ yco-= ysize;
+ break;
+ }
+ case SENS_DELAY:
+ {
+ ysize= 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize,
+ (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ ds = sens->data;
+
+ uiDefButS(block, NUM, 0, "Delay",(short)(10+xco),(short)(yco-44),(short)((width-22)*0.4+10), 19,
+ &ds->delay, 0.0, 5000.0, 0, 0, "Delay in number of logic tics before the positive trigger (default 60 per second)");
+ uiDefButS(block, NUM, 0, "Dur",(short)(10+xco+(width-22)*0.4+10),(short)(yco-44),(short)((width-22)*0.4-10), 19,
+ &ds->duration, 0.0, 5000.0, 0, 0, "If >0, delay in number of logic tics before the negative trigger following the positive trigger");
+ uiDefButBitS(block, TOG, SENS_DELAY_REPEAT, 0, "REP",(short)(xco + 10 + (width-22)*0.8),(short)(yco - 44),
+ (short)(0.20 * (width-22)), 19, &ds->flag, 0.0, 0.0, 0, 0,
+ "Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics");
+ yco-= ysize;
+ break;
+ }
+ case SENS_MOUSE:
+ {
+ ms= sens->data;
+ /* Two lines: 48 pixels high. */
+ ysize = 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ /* line 1: header */
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ /* Line 2: type selection. The number are a bit mangled to get
+ * 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-20, 19,
+ &ms->type, 0, 31, 0, 0,
+ "Specify the type of event this mouse sensor should trigger on");
+
+ yco-= ysize;
+ break;
+ }
+ case SENS_RANDOM:
+ {
+ ysize = 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ randomSensor = sens->data;
+ /* some files were wrongly written, avoid crash now */
+ if (randomSensor)
+ {
+ uiDefButI(block, NUM, 1, "Seed: ", xco+10,yco-44,(width-20), 19,
+ &randomSensor->seed, 0, 1000, 0, 0,
+ "Initial seed of the generator. (Choose 0 for not random)");
+ }
+ yco-= ysize;
+ break;
+ }
+ case SENS_RAY:
+ {
+ ysize = 72;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ draw_default_sensor_header(sens, block, xco, yco, width);
+ raySens = sens->data;
+
+ /* 1. property or material */
+ uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",
+ xco + 10,yco - 44, 0.20 * (width-20), 19,
+ &raySens->mode, 0.0, 0.0, 0, 0,
+ "Toggle collision on material or property");
+
+ if (raySens->mode & SENS_COLLISION_MATERIAL)
+ {
+ uiDefBut(block, TEX, 1, "Material:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
+ &raySens->matname, 0, 31, 0, 0,
+ "Only look for Objects with this material");
+ }
+ else
+ {
+ uiDefBut(block, TEX, 1, "Property:", xco + 10 + 0.20 * (width-20), yco-44, 0.8*(width-20), 19,
+ &raySens->propname, 0, 31, 0, 0,
+ "Only look for Objects with this property");
+ }
+
+ /* X-Ray option */
+ uiDefButBitS(block, TOG, SENS_RAY_XRAY, 1, "X",
+ xco + 10,yco - 68, 0.10 * (width-20), 19,
+ &raySens->mode, 0.0, 0.0, 0, 0,
+ "Toggle X-Ray option (see through objects that don't have the property)");
+ /* 2. sensing range */
+ uiDefButF(block, NUM, 1, "Range", xco+10 + 0.10 * (width-20), yco-68, 0.5 * (width-20), 19,
+ &raySens->range, 0.01, 10000.0, 100, 0,
+ "Sense objects no farther than this distance");
+
+ /* 3. axis choice */
+ str = "Type %t|+ X axis %x1|+ Y axis %x0|+ Z axis %x2|- X axis %x3|- Y axis %x4|- Z axis %x5";
+ uiDefButI(block, MENU, B_REDR, str, xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
+ &raySens->axisflag, 2.0, 31, 0, 0,
+ "Specify along which axis the ray is cast");
+
+ yco-= ysize;
+ break;
+ }
+ case SENS_MESSAGE:
+ {
+ mes = sens->data;
+ ysize = 2 * 24; /* total number of lines * 24 pixels/line */
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize,
+ (float)xco+width, (float)yco, 1);
+
+ /* line 1: header line */
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ /* line 2: Subject filter */
+ uiDefBut(block, TEX, 1, "Subject: ",
+ (xco+10), (yco-44), (width-20), 19,
+ mes->subject, 0, 31, 0, 0,
+ "Optional subject filter: only accept messages with this subject"
+ ", or empty for all");
+
+ yco -= ysize;
+ break;
+ }
+ case SENS_JOYSTICK:
+ {
+
+ ysize = 72;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ /* line 1: header */
+ draw_default_sensor_header(sens, block, xco, yco, width);
+
+ joy= sens->data;
+
+ uiDefButC(block, NUM, 1, "Index:", xco+10, yco-44, 0.33 * (width-20), 19,
+ &joy->joyindex, 0, SENS_JOY_MAXINDEX-1, 100, 0,
+ "Specify which joystick to use");
+
+ str= "Type %t|Button %x0|Axis %x1|Single Axis %x3|Hat%x2";
+ uiDefButC(block, MENU, B_REDR, str, xco+87, yco-44, 0.26 * (width-20), 19,
+ &joy->type, 0, 31, 0, 0,
+ "The type of event this joystick sensor is triggered on");
+
+ if (joy->type != SENS_JOY_AXIS_SINGLE) {
+ if (joy->flag & SENS_JOY_ANY_EVENT) {
+ switch (joy->type) {
+ case SENS_JOY_AXIS:
+ str = "All Axis Events";
+ break;
+ case SENS_JOY_BUTTON:
+ str = "All Button Events";
+ break;
+ default:
+ str = "All Hat Events";
+ break;
+ }
+ } else {
+ str = "All";
+ }
+
+ uiDefButBitS(block, TOG, SENS_JOY_ANY_EVENT, B_REDR, str,
+ xco+10 + 0.475 * (width-20), yco-68, ((joy->flag & SENS_JOY_ANY_EVENT) ? 0.525 : 0.12) * (width-20), 19,
+ &joy->flag, 0, 0, 0, 0,
+ "Triggered by all events on this joysticks current type (axis/button/hat)");
+ }
+ if(joy->type == SENS_JOY_BUTTON)
+ {
+ if ((joy->flag & SENS_JOY_ANY_EVENT)==0) {
+ uiDefButI(block, NUM, 1, "Number:", xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
+ &joy->button, 0, 18, 100, 0,
+ "Specify which button to use");
+ }
+ }
+ else if(joy->type == SENS_JOY_AXIS)
+ {
+ uiDefButS(block, NUM, 1, "Number:", xco+10, yco-68, 0.46 * (width-20), 19,
+ &joy->axis, 1, 8.0, 100, 0,
+ "Specify which axis pair to use, 1 is useually the main direction input");
+
+ uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20),yco-44, 0.4 * (width-20), 19,
+ &joy->precision, 0, 32768.0, 100, 0,
+ "Specify the precision of the axis");
+
+ if ((joy->flag & SENS_JOY_ANY_EVENT)==0) {
+ str = "Type %t|Up Axis %x1 |Down Axis %x3|Left Axis %x2|Right Axis %x0";
+ uiDefButI(block, MENU, B_REDR, str, xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
+ &joy->axisf, 2.0, 31, 0, 0,
+ "The direction of the axis, use 'All Events' to recieve events on any direction");
+ }
+ }
+ else if (joy->type == SENS_JOY_HAT)
+ {
+ uiDefButI(block, NUM, 1, "Number:", xco+10, yco-68, 0.46 * (width-20), 19,
+ &joy->hat, 1, 4.0, 100, 0,
+ "Specify which hat to use");
+
+ if ((joy->flag & SENS_JOY_ANY_EVENT)==0) {
+ str = "Direction%t|Up%x1|Down%x4|Left%x8|Right%x2|%l|Up/Right%x3|Down/Left%x12|Up/Left%x9|Down/Right%x6";
+ uiDefButI(block, MENU, 0, str, xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
+ &joy->hatf, 2.0, 31, 0, 0,
+ "The direction of the hat, use 'All Events' to recieve events on any direction");
+ }
+ }
+ else { /* (joy->type == SENS_JOY_AXIS_SINGLE)*/
+ uiDefButS(block, NUM, 1, "Number:", xco+10, yco-68, 0.46 * (width-20), 19,
+ &joy->axis_single, 1, 16.0, 100, 0,
+ "Specify a single axis (verticle/horizontal/other) to detect");
+
+ uiDefButI(block, NUM, 1, "Threshold:", xco+10 + 0.6 * (width-20),yco-44, 0.4 * (width-20), 19,
+ &joy->precision, 0, 32768.0, 100, 0,
+ "Specify the precision of the axis");
+ }
+ yco-= ysize;
+ break;
+ }
+ }
+
+ return yco-4;
+}
+
+
+
+static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco, short yco, short width)
+{
+ bExpressionCont *ec;
+ bPythonCont *pc;
+ short ysize;
+
+ switch (cont->type) {
+ case CONT_EXPRESSION:
+ ysize= 28;
+
+ UI_ThemeColor(TH_PANEL);
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ /* uiDefBut(block, LABEL, 1, "Not yet...", xco,yco-24,80, 19, NULL, 0, 0, 0, 0, ""); */
+ ec= cont->data;
+ /* uiDefBut(block, BUT, 1, "Variables", xco,yco-24,80, 19, NULL, 0, 0, 0, 0, "Available variables for expression"); */
+ uiDefBut(block, TEX, 1, "Exp:", xco + 10 , yco-21, width-20, 19,
+ ec->str, 0, 127, 0, 0,
+ "Expression");
+
+ yco-= ysize;
+ break;
+ case CONT_PYTHON:
+ ysize= 28;
+
+ if(cont->data==NULL) init_controller(cont);
+ pc= cont->data;
+
+ UI_ThemeColor(TH_PANEL);
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+
+ uiBlockBeginAlign(block);
+ uiDefButI(block, MENU, B_REDR, "Execution Method%t|Script%x0|Module%x1", xco+4,yco-23, 66, 19, &pc->mode, 0, 0, 0, 0, "Python script type (textblock or module - faster)");
+ if(pc->mode==0)
+ uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", xco+70,yco-23,width-74, 19, &pc->text, "Blender textblock to run as a script");
+ else {
+ uiDefBut(block, TEX, 1, "", xco+70,yco-23,(width-70)-25, 19, pc->module, 0, 63, 0, 0, "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
+ uiDefButBitI(block, TOG, CONT_PY_DEBUG, B_REDR, "D", (xco+width)-25, yco-23, 19, 19, &pc->flag, 0, 0, 0, 0, "Continuously reload the module from disk for editing external modules without restarting");
+ }
+ uiBlockEndAlign(block);
+
+ yco-= ysize;
+ break;
+
+ default:
+ ysize= 4;
+
+ UI_ThemeColor(TH_PANEL);
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ yco-= ysize;
+ }
+
+ return yco;
+}
+
+static int get_col_actuator(int type)
+{
+ switch(type) {
+ case ACT_ACTION: return TH_PANEL;
+ case ACT_SHAPEACTION: return TH_PANEL;
+ case ACT_OBJECT: return TH_PANEL;
+ case ACT_IPO: return TH_PANEL;
+ case ACT_PROPERTY: return TH_PANEL;
+ case ACT_SOUND: return TH_PANEL;
+ case ACT_CD: return TH_PANEL;
+ case ACT_CAMERA: return TH_PANEL;
+ case ACT_EDIT_OBJECT: return TH_PANEL;
+ case ACT_GROUP: return TH_PANEL;
+ case ACT_RANDOM: return TH_PANEL;
+ case ACT_SCENE: return TH_PANEL;
+ case ACT_MESSAGE: return TH_PANEL;
+ case ACT_GAME: return TH_PANEL;
+ case ACT_VISIBILITY: return TH_PANEL;
+ case ACT_CONSTRAINT: return TH_PANEL;
+ case ACT_STATE: return TH_PANEL;
+ default: return TH_PANEL;
+ }
+}
+static void set_col_actuator(int item, int medium)
+{
+ int col= get_col_actuator(item);
+ UI_ThemeColorShade(col, medium?30:10);
+
+}
+
+static void change_object_actuator(bContext *C, void *act, void *arg)
+{
+ bObjectActuator *oa = act;
+
+ if (oa->type != oa->otype) {
+ switch (oa->type) {
+ case ACT_OBJECT_NORMAL:
+ memset(oa, 0, sizeof(bObjectActuator));
+ oa->flag = ACT_FORCE_LOCAL|ACT_TORQUE_LOCAL|ACT_DLOC_LOCAL|ACT_DROT_LOCAL;
+ oa->type = ACT_OBJECT_NORMAL;
+ break;
+
+ case ACT_OBJECT_SERVO:
+ memset(oa, 0, sizeof(bObjectActuator));
+ oa->flag = ACT_LIN_VEL_LOCAL;
+ oa->type = ACT_OBJECT_SERVO;
+ oa->forcerot[0] = 30.0f;
+ oa->forcerot[1] = 0.5f;
+ oa->forcerot[2] = 0.0f;
+ break;
+ }
+ }
+}
+
+static void change_ipo_actuator(bContext *C, void *arg1_but, void *arg2_ia)
+{
+ bIpoActuator *ia = arg2_ia;
+ uiBut *but = arg1_but;
+
+ if (but->retval & ACT_IPOFORCE)
+ ia->flag &= ~ACT_IPOADD;
+ else if (but->retval & ACT_IPOADD)
+ ia->flag &= ~ACT_IPOFORCE;
+ but->retval = B_REDR;
+}
+
+void update_object_actuator_PID(bContext *C, void *act, void *arg)
+{
+ bObjectActuator *oa = act;
+ oa->forcerot[0] = 60.0f*oa->forcerot[1];
+}
+
+char *get_state_name(Object *ob, short bit)
+{
+ bController *cont;
+ unsigned int mask;
+
+ mask = (1<<bit);
+ cont = ob->controllers.first;
+ while (cont) {
+ if (cont->state_mask & mask) {
+ return cont->name;
+ }
+ cont = cont->next;
+ }
+ return (char*)"";
+}
+
+static void check_state_mask(bContext *C, void *arg1_but, void *arg2_mask)
+{
+ int shift= 0; // XXX
+ unsigned int *cont_mask = arg2_mask;
+ uiBut *but = arg1_but;
+
+ if (*cont_mask == 0 || !(shift))
+ *cont_mask = (1<<but->retval);
+ but->retval = B_REDR;
+}
+
+static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, short xco, short yco, short width)
+{
+ bSoundActuator *sa = NULL;
+ bCDActuator *cda = NULL;
+ bObjectActuator *oa = NULL;
+ bIpoActuator *ia = NULL;
+ bPropertyActuator *pa = NULL;
+ bCameraActuator *ca = NULL;
+ bEditObjectActuator *eoa = NULL;
+ bConstraintActuator *coa = NULL;
+ bSceneActuator *sca = NULL;
+ bGroupActuator *ga = NULL;
+ bRandomActuator *randAct = NULL;
+ bMessageActuator *ma = NULL;
+ bActionActuator *aa = NULL;
+ bGameActuator *gma = NULL;
+ bVisibilityActuator *visAct = NULL;
+ bTwoDFilterActuator *tdfa = NULL;
+ bParentActuator *parAct = NULL;
+ bStateActuator *staAct = NULL;
+
+ float *fp;
+ short ysize = 0, wval;
+ char *str;
+ int myline, stbit;
+ uiBut *but;
+
+
+ /* yco is at the top of the rect, draw downwards */
+ set_col_actuator(act->type, 0);
+
+ switch (act->type)
+ {
+ case ACT_OBJECT:
+ {
+ oa = act->data;
+ wval = (width-100)/3;
+ if (oa->type == ACT_OBJECT_NORMAL)
+ {
+ if ( ob->gameflag & OB_DYNAMIC )
+ {
+ ysize= 175;
+ }
+ else
+ {
+ ysize= 72;
+ }
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiBlockBeginAlign(block);
+ uiDefBut(block, LABEL, 0, "Loc", xco, yco-45, 45, 19, NULL, 0, 0, 0, 0, "Sets the location");
+ uiDefButF(block, NUM, 0, "", xco+45, yco-45, wval, 19, oa->dloc, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-45, wval, 19, oa->dloc+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-45, wval, 19, oa->dloc+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "Rot", xco, yco-64, 45, 19, NULL, 0, 0, 0, 0, "Sets the rotation");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-64, wval, 19, oa->drot, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-64, wval, 19, oa->drot+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-64, wval, 19, oa->drot+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+
+ uiDefButBitS(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitS(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+
+ if ( ob->gameflag & OB_DYNAMIC )
+ {
+ uiDefBut(block, LABEL, 0, "Force", xco, yco-87, 55, 19, NULL, 0, 0, 0, 0, "Sets the force");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-87, wval, 19, oa->forceloc, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-87, wval, 19, oa->forceloc+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-87, wval, 19, oa->forceloc+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "Torque", xco, yco-106, 55, 19, NULL, 0, 0, 0, 0, "Sets the torque");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-106, wval, 19, oa->forcerot, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-106, wval, 19, oa->forcerot+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-106, wval, 19, oa->forcerot+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+ }
+
+ if ( ob->gameflag & OB_DYNAMIC )
+ {
+ uiDefBut(block, LABEL, 0, "LinV", xco, yco-129, 45, 19, NULL, 0, 0, 0, 0, "Sets the linear velocity");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-129, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-129, wval, 19, oa->linearvelocity+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-129, wval, 19, oa->linearvelocity+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "AngV", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Sets the angular velocity");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-148, wval, 19, oa->angularvelocity, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-148, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-148, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "Damp", xco, yco-171, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity");
+ uiDefButS(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, "");
+
+ uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-87, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-129, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitS(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-148, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+
+ uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-129, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
+ }
+ } else if (oa->type == ACT_OBJECT_SERVO)
+ {
+ ysize= 195;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefBut(block, LABEL, 0, "Ref", xco, yco-45, 45, 19, NULL, 0, 0, 0, 0, "");
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+45, yco-45, wval*3, 19, &(oa->reference), "Reference object for velocity calculation, leave empty for world reference");
+ uiDefBut(block, LABEL, 0, "linV", xco, yco-68, 45, 19, NULL, 0, 0, 0, 0, "Sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, 0, "", xco+45, yco-68, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-68, wval, 19, oa->linearvelocity+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-68, wval, 19, oa->linearvelocity+2, -10000.0, 10000.0, 10, 0, "");
+ uiBlockEndAlign(block);
+ uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-68, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Velocity is defined in local coordinates");
+
+ uiDefBut(block, LABEL, 0, "Limit", xco, yco-91, 45, 19, NULL, 0, 0, 0, 0, "Select if the force needs to be limited along certain axis (local or global depending on LinV Local flag)");
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_X, B_REDR, "X", xco+45, yco-91, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the X axis");
+ uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_Y, B_REDR, "Y", xco+45+wval, yco-91, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the Y axis");
+ uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_Z, B_REDR, "Z", xco+45+2*wval, yco-91, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the Z axis");
+ uiBlockEndAlign(block);
+ uiDefBut(block, LABEL, 0, "Max", xco, yco-110, 45, 19, NULL, 0, 0, 0, 0, "Set the upper limit for force");
+ uiDefBut(block, LABEL, 0, "Min", xco, yco-129, 45, 19, NULL, 0, 0, 0, 0, "Set the lower limit for force");
+ if (oa->flag & ACT_SERVO_LIMIT_X) {
+ uiDefButF(block, NUM, 0, "", xco+45, yco-110, wval, 19, oa->dloc, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45, yco-129, wval, 19, oa->drot, -10000.0, 10000.0, 10, 0, "");
+ }
+ if (oa->flag & ACT_SERVO_LIMIT_Y) {
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-110, wval, 19, oa->dloc+1, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-129, wval, 19, oa->drot+1, -10000.0, 10000.0, 10, 0, "");
+ }
+ if (oa->flag & ACT_SERVO_LIMIT_Z) {
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-110, wval, 19, oa->dloc+2, -10000.0, 10000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-129, wval, 19, oa->drot+2, -10000.0, 10000.0, 10, 0, "");
+ }
+ uiDefBut(block, LABEL, 0, "Servo", xco, yco-152, 45, 19, NULL, 0, 0, 0, 0, "Coefficients of the PID servo controller");
+ uiDefButF(block, NUMSLI, B_REDR, "P: ", xco+45, yco-152, wval*3, 19, oa->forcerot, 0.00, 200.0, 100, 0, "Proportional coefficient, typical value is 60x Integral coefficient");
+ uiDefBut(block, LABEL, 0, "Slow", xco, yco-171, 45, 19, NULL, 0, 0, 0, 0, "Low value of I coefficient correspond to slow response");
+ but = uiDefButF(block, NUMSLI, B_REDR, " I : ", xco+45, yco-171, wval*3, 19, oa->forcerot+1, 0.0, 3.0, 1, 0, "Integral coefficient, low value (0.01) for slow response, high value (0.5) for fast response");
+ uiButSetFunc(but, update_object_actuator_PID, oa, NULL);
+ uiDefBut(block, LABEL, 0, "Fast", xco+45+3*wval, yco-171, 45, 19, NULL, 0, 0, 0, 0, "High value of I coefficient correspond to fast response");
+ uiDefButF(block, NUMSLI, B_REDR, "D: ", xco+45, yco-190, wval*3, 19, oa->forcerot+2, -100.0, 100.0, 100, 0, "Derivate coefficient, not required, high values can cause instability");
+ }
+ str= "Motion Type %t|Simple motion %x0|Servo Control %x1";
+ but = uiDefButS(block, MENU, B_REDR, str, xco+40, yco-23, (width-80), 19, &oa->type, 0.0, 0.0, 0, 0, "");
+ oa->otype = oa->type;
+ uiButSetFunc(but, change_object_actuator, oa, NULL);
+ yco-= ysize;
+ break;
+ }
+ case ACT_ACTION:
+ case ACT_SHAPEACTION:
+ {
+ /* DrawAct */
+#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
+ ysize = 112;
+#else
+ ysize= 92;
+#endif
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ aa = act->data;
+ wval = (width-60)/3;
+
+ // str= "Action types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
+#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
+ str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6|Displacement %x7";
+#else
+ str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
+#endif
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, width/3, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type");
+ uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+10+ (width/3), yco-24, ((width/3)*2) - (20 + 60), 19, &aa->act, "Action name");
+
+ uiDefButBitS(block, TOGN, 1, 0, "Continue", xco+((width/3)*2)+20, yco-24, 60, 19,
+ &aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time");
+
+
+ if(aa->type == ACT_ACTION_FROM_PROP)
+ {
+ uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position");
+ }
+ else
+ {
+ uiDefButI(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame");
+ uiDefButI(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame");
+ }
+
+ uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending");
+ uiDefButS(block, NUM, 0, "Priority: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack");
+
+ uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign the action's current frame number to this property");
+
+
+#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
+ if(aa->type == ACT_ACTION_MOTION)
+ {
+ uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action");
+ }
+#endif
+
+
+
+ yco-=ysize;
+ break;
+ }
+ case ACT_IPO:
+ {
+ ia= act->data;
+
+ ysize= 72;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
+
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, (width-20)/2, 19, &ia->type, 0, 0, 0, 0, "");
+
+ but = uiDefButBitS(block, TOG, ACT_IPOFORCE, ACT_IPOFORCE,
+ "Force", xco+10+(width-20)/2, yco-24, (width-20)/4-10, 19,
+ &ia->flag, 0, 0, 0, 0,
+ "Apply Ipo as a global or local force depending on the local option (dynamic objects only)");
+ uiButSetFunc(but, change_ipo_actuator, but, ia);
+
+ but = uiDefButBitS(block, TOG, ACT_IPOADD, ACT_IPOADD,
+ "Add", xco+3*(width-20)/4, yco-24, (width-20)/4-10, 19,
+ &ia->flag, 0, 0, 0, 0,
+ "Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag");
+ uiButSetFunc(but, change_ipo_actuator, but, ia);
+
+ /* Only show the do-force-local toggle if force is requested */
+ if (ia->flag & (ACT_IPOFORCE|ACT_IPOADD)) {
+ uiDefButBitS(block, TOG, ACT_IPOLOCAL, 0,
+ "L", xco+width-30, yco-24, 20, 19,
+ &ia->flag, 0, 0, 0, 0,
+ "Let the ipo acts in local coordinates, used in Force and Add mode");
+ }
+
+ if(ia->type==ACT_IPO_FROM_PROP) {
+ uiDefBut(block, TEX, 0,
+ "Prop: ", xco+10, yco-44, width-80, 19,
+ ia->name, 0.0, 31.0, 0, 0,
+ "Use this property to define the Ipo position");
+ }
+ else {
+ uiDefButI(block, NUM, 0,
+ "Sta", xco+10, yco-44, (width-80)/2, 19,
+ &ia->sta, 1.0, MAXFRAMEF, 0, 0,
+ "Start frame");
+ uiDefButI(block, NUM, 0,
+ "End", xco+10+(width-80)/2, yco-44, (width-80)/2, 19,
+ &ia->end, 1.0, MAXFRAMEF, 0, 0,
+ "End frame");
+ }
+ uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR,
+ "Child", xco+10+(width-80), yco-44, 60, 19,
+ &ia->flag, 0, 0, 0, 0,
+ "Update IPO on all children Objects as well");
+ uiDefBut(block, TEX, 0,
+ "FrameProp: ", xco+10, yco-64, width-20, 19,
+ ia->frameProp, 0.0, 31.0, 0, 0,
+ "Assign the action's current frame number to this property");
+
+ yco-= ysize;
+ break;
+ }
+ case ACT_PROPERTY:
+ {
+ ysize= 68;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ pa= act->data;
+
+ str= "Type%t|Assign%x0|Add %x1|Copy %x2|Toggle (bool/int/float/timer)%x3";
+ uiDefButI(block, MENU, B_REDR, str, xco+30,yco-24,width-60, 19, &pa->type, 0, 31, 0, 0, "Type");
+
+ uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-44,width-60, 19, pa->name, 0, 31, 0, 0, "Property name");
+
+
+ if(pa->type==ACT_PROP_TOGGLE) {
+ /* no ui */
+ ysize -= 22;
+ }
+ else if(pa->type==ACT_PROP_COPY) {
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-64, (width-20)/2, 19, &(pa->ob), "Copy from this Object");
+ uiDefBut(block, TEX, 1, "Prop: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, pa->value, 0, 31, 0, 0, "Copy this property");
+ }
+ else {
+ uiDefBut(block, TEX, 1, "Value: ", xco+30,yco-64,width-60, 19, pa->value, 0, 31, 0, 0, "change with this value, use \"\" around strings");
+ }
+ yco-= ysize;
+
+ break;
+ }
+ case ACT_SOUND:
+ {
+ ysize = 70;
+
+ sa = act->data;
+ sa->sndnr = 0;
+
+ wval = (width-20)/2;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ if(G.main->sound.first) {
+ IDnames_to_pupstring(&str, "Sound files", NULL, &(G.main->sound), (ID *)sa->sound, &(sa->sndnr));
+ /* reset this value, it is for handling the event */
+ sa->sndnr = 0;
+ uiDefButS(block, MENU, B_SOUNDACT_BROWSE, str, xco+10,yco-22,20,19, &(sa->sndnr), 0, 0, 0, 0, "");
+
+ 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,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->sound->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->sound->pitch,-12.0, 12.0, 0, 0, "Sets the pitch of this sound");
+ }
+ MEM_freeN(str);
+ }
+ else {
+ uiDefBut(block, LABEL, 0, "Use Sound window (F10) to load samples", xco, yco-24, width, 19, NULL, 0, 0, 0, 0, "");
+ }
+
+ yco-= ysize;
+
+ break;
+ }
+ case ACT_CD:
+ {
+ char cd_type_str[] = "Sound mode %t|Play all tracks %x0|Play one track %x1|"
+ "Volume %x3|Stop %x4|Pause %x5|Resume %x6";
+ cda = act->data;
+
+ if (cda) {
+ if (cda->track == 0) {
+ cda->track = 1;
+ cda->volume = 1;
+ cda->type = ACT_CD_PLAY_ALL;
+ }
+
+ if (cda->type == ACT_CD_PLAY_TRACK || cda->type == ACT_CD_LOOP_TRACK) {
+ ysize = 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ uiDefButS(block, NUM, 0, "Track:", xco+10,yco-44,width-20, 19, &cda->track, 1, 99, 0, 0, "Select the track to be played");
+ }
+ else if (cda->type == ACT_CD_VOLUME) {
+ ysize = 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-44,width-20, 19, &cda->volume, 0, 1, 0, 0, "Set the volume for CD playback");
+ }
+ else {
+ ysize = 28;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ }
+ uiDefButS(block, MENU, B_REDR, cd_type_str,xco+10,yco-22,width-20, 19, &cda->type, 0.0, 0.0, 0, 0, "");
+ }
+ yco-= ysize;
+ break;
+ }
+ case ACT_CAMERA:
+
+ ysize= 48;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ ca= act->data;
+
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-24, (width-20)/2, 19, &(ca->ob), "Look at this Object");
+ uiDefButF(block, NUM, 0, "Height:", xco+10+(width-20)/2, yco-24, (width-20)/2, 19, &ca->height, 0.0, 20.0, 0, 0, "");
+
+ uiDefButF(block, NUM, 0, "Min:", xco+10, yco-44, (width-60)/2, 19, &ca->min, 0.0, 20.0, 0, 0, "");
+
+ if(ca->axis==0) ca->axis= 'x';
+ uiDefButS(block, ROW, 0, "X", xco+10+(width-60)/2, yco-44, 20, 19, &ca->axis, 4.0, (float)'x', 0, 0, "Camera tries to get behind the X axis");
+ uiDefButS(block, ROW, 0, "Y", xco+30+(width-60)/2, yco-44, 20, 19, &ca->axis, 4.0, (float)'y', 0, 0, "Camera tries to get behind the Y axis");
+
+ uiDefButF(block, NUM, 0, "Max:", xco+20+(width)/2, yco-44, (width-60)/2, 19, &ca->max, 0.0, 20.0, 0, 0, "");
+
+ yco-= ysize;
+
+ break;
+
+ case ACT_EDIT_OBJECT:
+
+ eoa= act->data;
+
+ if(eoa->type==ACT_EDOB_ADD_OBJECT) {
+ int wval; /* just a temp width */
+ ysize = 92;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Add this Object and all its children (cant be on an visible layer)");
+ uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the new Object lives");
+
+ wval= (width-60)/3;
+ uiDefBut(block, LABEL, 0, "linV", xco, yco-68, 45, 19,
+ NULL, 0, 0, 0, 0,
+ "Velocity upon creation");
+ uiDefButF(block, NUM, 0, "", xco+45, yco-68, wval, 19,
+ eoa->linVelocity, -100.0, 100.0, 10, 0,
+ "Velocity upon creation, x component");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-68, wval, 19,
+ eoa->linVelocity+1, -100.0, 100.0, 10, 0,
+ "Velocity upon creation, y component");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-68, wval, 19,
+ eoa->linVelocity+2, -100.0, 100.0, 10, 0,
+ "Velocity upon creation, z component");
+ uiDefButBitS(block, TOG, ACT_EDOB_LOCAL_LINV, 0, "L", xco+45+3*wval, yco-68, 15, 19,
+ &eoa->localflag, 0.0, 0.0, 0, 0,
+ "Apply the transformation locally");
+
+
+ uiDefBut(block, LABEL, 0, "AngV", xco, yco-90, 45, 19,
+ NULL, 0, 0, 0, 0,
+ "Angular velocity upon creation");
+ uiDefButF(block, NUM, 0, "", xco+45, yco-90, wval, 19,
+ eoa->angVelocity, -10000.0, 10000.0, 10, 0,
+ "Angular velocity upon creation, x component");
+ uiDefButF(block, NUM, 0, "", xco+45+wval, yco-90, wval, 19,
+ eoa->angVelocity+1, -10000.0, 10000.0, 10, 0,
+ "Angular velocity upon creation, y component");
+ uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-90, wval, 19,
+ eoa->angVelocity+2, -10000.0, 10000.0, 10, 0,
+ "Angular velocity upon creation, z component");
+ uiDefButBitS(block, TOG, ACT_EDOB_LOCAL_ANGV, 0, "L", xco+45+3*wval, yco-90, 15, 19,
+ &eoa->localflag, 0.0, 0.0, 0, 0,
+ "Apply the rotation locally");
+
+
+ }
+ else if(eoa->type==ACT_EDOB_END_OBJECT) {
+ ysize= 28;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ }
+ else if(eoa->type==ACT_EDOB_REPLACE_MESH) {
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_meshpoin_but, ID_ME, 1, "ME:", xco+40, yco-44, (width-80), 19, &(eoa->me), "replace the existing mesh with this one");
+ }
+ else if(eoa->type==ACT_EDOB_TRACK_TO) {
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Track to this Object");
+ uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes");
+ uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking");
+ }
+ else if(eoa->type==ACT_EDOB_DYNAMICS) {
+ ysize= 69;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str= "Dynamic Operation %t|Restore Dynamics %x0|Suspend Dynamics %x1|Enable Rigid Body %x2|Disable Rigid Body %x3|Set Mass %x4";
+ uiDefButS(block, MENU, B_REDR, str, xco+40, yco-44, (width-80), 19, &(eoa->dyn_operation), 0.0, 0.0, 0, 0, "");
+ if(eoa->dyn_operation==4) {
+ uiDefButF(block, NUM, 0, "", xco+40, yco-63, width-80, 19,
+ &eoa->mass, 0.0, 10000.0, 10, 0,
+ "Mass for object");
+ }
+ }
+ str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3|Dynamics %x4";
+ uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &eoa->type, 0.0, 0.0, 0, 0, "");
+
+ yco-= ysize;
+
+ break;
+
+ case ACT_CONSTRAINT:
+ coa= act->data;
+
+ if (coa->type == ACT_CONST_TYPE_LOC) {
+ ysize= 69;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ /* str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4|Rot X %x8|Rot Y %x16|Rot Z %x32"; */
+ /* coa->flag &= ~(63); */
+ str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4";
+ coa->flag &= 7;
+ coa->time = 0;
+ uiDefButS(block, MENU, 1, str, xco+10, yco-65, 70, 19, &coa->flag, 0.0, 0.0, 0, 0, "");
+
+ uiDefButS(block, NUM, 0, "damp", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant (in frame) of low pass filter");
+ uiDefBut(block, LABEL, 0, "Min", xco+80, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Max", xco+80+(width-90)/2, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(coa->flag & ACT_CONST_LOCX) fp= coa->minloc;
+ else if(coa->flag & ACT_CONST_LOCY) fp= coa->minloc+1;
+ else if(coa->flag & ACT_CONST_LOCZ) fp= coa->minloc+2;
+ else if(coa->flag & ACT_CONST_ROTX) fp= coa->minrot;
+ else if(coa->flag & ACT_CONST_ROTY) fp= coa->minrot+1;
+ else fp= coa->minrot+2;
+
+ uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-90)/2, 19, fp, -2000.0, 2000.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, "", xco+80+(width-90)/2, yco-65, (width-90)/2, 19, fp+3, -2000.0, 2000.0, 10, 0, "");
+ } else if (coa->type == ACT_CONST_TYPE_DIST) {
+ ysize= 106;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4|-X axis %x8|-Y axis %x16|-Z axis %x32";
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Set the direction of the ray");
+
+ uiDefButS(block, NUM, 0, "damp", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant (in frame) of low pass filter");
+ uiDefBut(block, LABEL, 0, "Range", xco+80, yco-45, (width-115)/2, 19, NULL, 0.0, 0.0, 0, 0, "Set the maximum length of ray");
+ uiDefButBitS(block, TOG, ACT_CONST_DISTANCE, B_REDR, "Dist", xco+80+(width-115)/2, yco-45, (width-115)/2, 19, &coa->flag, 0.0, 0.0, 0, 0, "Force distance of object to point of impact of ray");
+ uiDefButBitS(block, TOG, ACT_CONST_LOCAL, 0, "L", xco+80+(width-115), yco-45, 25, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Set ray along object's axis or global axis");
+
+ if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
+ else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
+ else fp= coa->minloc+2;
+
+ uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-115)/2, 19, fp+3, 0.0, 2000.0, 10, 0, "Maximum length of ray");
+ if (coa->flag & ACT_CONST_DISTANCE)
+ uiDefButF(block, NUM, 0, "", xco+80+(width-115)/2, yco-65, (width-115)/2, 19, fp, -2000.0, 2000.0, 10, 0, "Keep this distance to target");
+ uiDefButBitS(block, TOG, ACT_CONST_NORMAL, 0, "N", xco+80+(width-115), yco-65, 25, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
+ uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
+ if (coa->flag & ACT_CONST_MATERIAL)
+ {
+ uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
+ coa->matprop, 0, 31, 0, 0,
+ "Ray detects only Objects with this material");
+ }
+ else
+ {
+ uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
+ coa->matprop, 0, 31, 0, 0,
+ "Ray detect only Objects with this property");
+ }
+ uiDefButBitS(block, TOG, ACT_CONST_PERMANENT, 0, "PER", xco+10, yco-103, 40, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Persistent actuator: stays active even if ray does not reach target");
+ uiDefButS(block, NUM, 0, "time", xco+50, yco-103, (width-60)/2, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited");
+ uiDefButS(block, NUM, 0, "rotDamp", xco+50+(width-60)/2, yco-103, (width-60)/2, 19, &(coa->rotdamp), 0.0, 100.0, 0, 0, "Use a different damping for orientation");
+ } else if (coa->type == ACT_CONST_TYPE_ORI) {
+ ysize= 87;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4";
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Select the axis to be aligned along the reference direction");
+
+ uiDefButS(block, NUM, 0, "damp", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant (in frame) of low pass filter");
+ uiDefBut(block, LABEL, 0, "X", xco+80, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Y", xco+80+(width-115)/3, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Z", xco+80+2*(width-115)/3, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-115)/3, 19, &coa->maxrot[0], -2000.0, 2000.0, 10, 0, "X component of reference direction");
+ uiDefButF(block, NUM, 0, "", xco+80+(width-115)/3, yco-65, (width-115)/3, 19, &coa->maxrot[1], -2000.0, 2000.0, 10, 0, "Y component of reference direction");
+ uiDefButF(block, NUM, 0, "", xco+80+2*(width-115)/3, yco-65, (width-115)/3, 19, &coa->maxrot[2], -2000.0, 2000.0, 10, 0, "Z component of reference direction");
+
+ uiDefButS(block, NUM, 0, "time", xco+10, yco-84, 70, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited");
+ uiDefButF(block, NUM, 0, "min", xco+80, yco-84, (width-115)/2, 19, &(coa->minloc[0]), 0.0, 180.0, 10, 1, "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max");
+ uiDefButF(block, NUM, 0, "max", xco+80+(width-115)/2, yco-84, (width-115)/2, 19, &(coa->maxloc[0]), 0.0, 180.0, 10, 1, "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max");
+ } else if (coa->type == ACT_CONST_TYPE_FH) {
+ ysize= 106;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4|-X axis %x8|-Y axis %x16|-Z axis %x32";
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Set the direction of the ray (in world coordinate)");
+
+ if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
+ else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
+ else fp= coa->minloc+2;
+
+ uiDefButF(block, NUM, 0, "damp", xco+10, yco-45, (width-70)/2, 19, &coa->maxrot[0], 0.0, 1.0, 1, 0, "Damping factor of the Fh spring force");
+ uiDefButF(block, NUM, 0, "dist", xco+10+(width-70)/2, yco-45, (width-70)/2, 19, fp, 0.010, 2000.0, 10, 0, "Height of the Fh area");
+ uiDefButBitS(block, TOG, ACT_CONST_DOROTFH, 0, "Rot Fh", xco+10+(width-70), yco-45, 50, 19, &coa->flag, 0.0, 0.0, 0, 0, "Keep object axis parallel to normal");
+
+ uiDefButF(block, NUMSLI, 0, "Fh ", xco+80, yco-65, (width-115), 19, fp+3, 0.0, 1.0, 0, 0, "Spring force within the Fh area");
+ uiDefButBitS(block, TOG, ACT_CONST_NORMAL, 0, "N", xco+80+(width-115), yco-65, 25, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
+ uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property");
+ if (coa->flag & ACT_CONST_MATERIAL)
+ {
+ uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19,
+ coa->matprop, 0, 31, 0, 0,
+ "Ray detects only Objects with this material");
+ }
+ else
+ {
+ uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19,
+ coa->matprop, 0, 31, 0, 0,
+ "Ray detect only Objects with this property");
+ }
+ uiDefButBitS(block, TOG, ACT_CONST_PERMANENT, 0, "PER", xco+10, yco-103, 40, 19,
+ &coa->flag, 0.0, 0.0, 0, 0, "Persistent actuator: stays active even if ray does not reach target");
+ uiDefButS(block, NUM, 0, "time", xco+50, yco-103, 90, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited");
+ uiDefButF(block, NUM, 0, "rotDamp", xco+140, yco-103, (width-150), 19, &coa->maxrot[1], 0.0, 1.0, 1, 0, "Use a different damping for rotation");
+ }
+ str= "Constraint Type %t|Location %x0|Distance %x1|Orientation %x2|Force field %x3";
+ but = uiDefButS(block, MENU, B_REDR, str, xco+40, yco-23, (width-80), 19, &coa->type, 0.0, 0.0, 0, 0, "");
+ yco-= ysize;
+ break;
+
+ case ACT_SCENE:
+ sca= act->data;
+
+ if(sca->type==ACT_SCENE_RESTART) {
+ ysize= 28;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ }
+ else if(sca->type==ACT_SCENE_CAMERA) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+40, yco-44, (width-80), 19, &(sca->camera), "Set this Camera. Leave empty to refer to self object");
+ }
+ else if(sca->type==ACT_SCENE_SET) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Set this Scene");
+ }
+ else if(sca->type==ACT_SCENE_ADD_FRONT) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Add an Overlay Scene");
+ }
+ else if(sca->type==ACT_SCENE_ADD_BACK) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Add a Background Scene");
+ }
+ else if(sca->type==ACT_SCENE_REMOVE) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Remove a Scene");
+ }
+ else if(sca->type==ACT_SCENE_SUSPEND) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Pause a Scene");
+ }
+ else if(sca->type==ACT_SCENE_RESUME) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Unpause a Scene");
+ }
+
+ str= "Scene %t|Restart %x0|Set Scene %x1|Set Camera %x2|Add OverlayScene %x3|Add BackgroundScene %x4|Remove Scene %x5|Suspend Scene %x6|Resume Scene %x7";
+ uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &sca->type, 0.0, 0.0, 0, 0, "");
+
+ yco-= ysize;
+ break;
+ case ACT_GAME:
+ {
+ gma = act->data;
+ if (gma->type == ACT_GAME_LOAD)
+ {
+ //ysize = 68;
+ ysize = 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, 63, 0, 0, "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
+// uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, 63, 0, 0, "Use this loadinganimation");
+ }
+/* else if (gma->type == ACT_GAME_START)
+ {
+ ysize = 68;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ uiDefBut(block, TEX, 1, "File: ", xco+10, yco-44,width-20,19, &(gma->filename), 0, 63, 0, 0, "Load this file");
+ uiDefBut(block, TEX, 1, "Anim: ", xco+10, yco-64,width-20,19, &(gma->loadaniname), 0, 63, 0, 0, "Use this loadinganimation");
+ }
+*/ else if (ELEM4(gma->type, ACT_GAME_RESTART, ACT_GAME_QUIT, ACT_GAME_SAVECFG, ACT_GAME_LOADCFG))
+ {
+ ysize = 28;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ }
+
+ //str = "Scene %t|Load game%x0|Start loaded game%x1|Restart this game%x2|Quit this game %x3";
+ str = "Scene %t|Start new game%x0|Restart this game%x2|Quit this game %x3|Save GameLogic.globalDict %x4|Load GameLogic.globalDict %x5";
+ uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &gma->type, 0.0, 0.0, 0, 0, "");
+
+ yco -= ysize;
+ break;
+ }
+ case ACT_GROUP:
+ ga= act->data;
+
+ ysize= 52;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ str= "GroupKey types %t|Set Key %x6|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x5";
+
+ uiDefButS(block, MENU, 1, str, xco+20, yco-24, width-40, 19, &ga->type, 0, 0, 0, 0, "");
+ if(ga->type==ACT_GROUP_SET) {
+ uiDefBut(block, TEX, 0, "Key: ", xco+20, yco-44, (width-10)/2, 19, ga->name, 0.0, 31.0, 0, 0, "This name defines groupkey to be set");
+ uiDefButI(block, NUM, 0, "Frame:", xco+20+(width-10)/2, yco-44, (width-70)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Set this frame");
+ }
+ else if(ga->type==ACT_GROUP_FROM_PROP) {
+ uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, 31.0, 0, 0, "Use this property to define the Group position");
+ }
+ else {
+ uiDefButI(block, NUM, 0, "State", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame");
+ uiDefButI(block, NUM, 0, "End", xco+20+(width-40)/2, yco-44, (width-40)/2, 19, &ga->end, 0.0, 2500.0, 0, 0, "End frame");
+ }
+ yco-= ysize;
+ break;
+
+ case ACT_VISIBILITY:
+ ysize = 24;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco,
+ (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ visAct = act->data;
+
+ uiBlockBeginAlign(block);
+ uiDefButBitI(block, TOGN, ACT_VISIBILITY_INVISIBLE, B_REDR,
+ "Visible",
+ xco + 10, yco - 20, (width - 20)/3, 19, &visAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)");
+ uiDefButBitI(block, TOG, ACT_VISIBILITY_OCCLUSION, B_REDR,
+ "Occlusion",
+ xco + 10 + ((width - 20)/3), yco - 20, (width - 20)/3, 19, &visAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Set the object to occlude objects behind it. Initialized from the object type in physics button");
+ uiBlockEndAlign(block);
+
+ uiDefButBitI(block, TOG, ACT_VISIBILITY_RECURSIVE, 0,
+ "Children",
+ xco + 10 + (((width - 20)/3)*2)+10, yco - 20, ((width - 20)/3)-10, 19, &visAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Sets all the children of this object to the same visibility/occlusion recursively");
+
+ yco-= ysize;
+
+ break;
+
+ case ACT_STATE:
+ ysize = 34;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco,
+ (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ staAct = act->data;
+
+ str= "Operation %t|Cpy %x0|Add %x1|Sub %x2|Inv %x3";
+
+ uiDefButI(block, MENU, B_REDR, str,
+ xco + 10, yco - 24, 65, 19, &staAct->type,
+ 0.0, 0.0, 0, 0,
+ "Select the bit operation on object state mask");
+
+ for (wval=0; wval<15; wval+=5) {
+ uiBlockBeginAlign(block);
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, TOG, 1<<(stbit+wval), stbit+wval, "", (short)(xco+85+12*stbit+13*wval), yco-17, 12, 12, (int *)&(staAct->mask), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+wval)));
+ uiButSetFunc(but, check_state_mask, but, &(staAct->mask));
+ }
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, TOG, 1<<(stbit+wval+15), stbit+wval+15, "", (short)(xco+85+12*stbit+13*wval), yco-29, 12, 12, (int *)&(staAct->mask), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+wval+15)));
+ uiButSetFunc(but, check_state_mask, but, &(staAct->mask));
+ }
+ }
+ uiBlockEndAlign(block);
+
+ yco-= ysize;
+
+ break;
+
+ case ACT_RANDOM:
+ ysize = 69;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco,
+ (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ randAct = act->data;
+
+ /* 1. seed */
+ uiDefButI(block, NUM, 1, "Seed: ", (xco+10),yco-24, 0.4 *(width-20), 19,
+ &randAct->seed, 0, 1000, 0, 0,
+ "Initial seed of the random generator. Use Python for more freedom. "
+ " (Choose 0 for not random)");
+
+ /* 2. distribution type */
+ /* One pick per distribution. These numbers MUST match the #defines */
+ /* in game.h !!! */
+ str= "Distribution %t|Bool Constant %x0|Bool Uniform %x1"
+ "|Bool Bernoulli %x2|Int Constant %x3|Int Uniform %x4"
+ "|Int Poisson %x5|Float Constant %x6|Float Uniform %x7"
+ "|Float Normal %x8|Float Neg. Exp. %x9";
+ uiDefButI(block, MENU, B_REDR, str, (xco+10) + 0.4 * (width-20), yco-24, 0.6 * (width-20), 19,
+ &randAct->distribution, 0.0, 0.0, 0, 0,
+ "Choose the type of distribution");
+
+ /* 3. property */
+ uiDefBut(block, TEX, 1, "Property:", (xco+10), yco-44, (width-20), 19,
+ &randAct->propname, 0, 31, 0, 0,
+ "Assign the random value to this property");
+
+ /*4. and 5. arguments for the distribution*/
+ switch (randAct->distribution) {
+ case ACT_RANDOM_BOOL_CONST:
+ uiDefButBitI(block, TOG, 1, 1, "Always true", (xco+10), yco-64, (width-20), 19,
+ &randAct->int_arg_1, 2.0, 1, 0, 0,
+ "Always false or always true");
+ break;
+ case ACT_RANDOM_BOOL_UNIFORM:
+ uiDefBut(block, LABEL, 0, " Do a 50-50 pick", (xco+10), yco-64, (width-20), 19,
+ NULL, 0, 0, 0, 0,
+ "Choose between true and false, 50% chance each");
+ break;
+ case ACT_RANDOM_BOOL_BERNOUILLI:
+ uiDefButF(block, NUM, 1, "Chance", (xco+10), yco-64, (width-20), 19,
+ &randAct->float_arg_1, 0.0, 1.0, 0, 0,
+ "Pick a number between 0 and 1. Success if you stay "
+ "below this value");
+ break;
+ case ACT_RANDOM_INT_CONST:
+ uiDefButI(block, NUM, 1, "Value: ", (xco+10), yco-64, (width-20), 19,
+ &randAct->int_arg_1, -1000, 1000, 0, 0,
+ "Always return this number");
+ break;
+ case ACT_RANDOM_INT_UNIFORM:
+ uiDefButI(block, NUM, 1, "Min: ", (xco+10), yco-64, (width-20)/2, 19,
+ &randAct->int_arg_1, -1000, 1000, 0, 0,
+ "Choose a number from a range. "
+ "Lower boundary of the range");
+ uiDefButI(block, NUM, 1, "Max: ", (xco+10) + (width-20)/2, yco-64, (width-20)/2, 19,
+ &randAct->int_arg_2, -1000, 1000, 0, 0,
+ "Choose a number from a range. "
+ "Upper boundary of the range");
+ break;
+ case ACT_RANDOM_INT_POISSON:
+ uiDefButF(block, NUM, 1, "Mean: ", (xco+10), yco-64, (width-20), 19,
+ &randAct->float_arg_1, 0.01, 100.0, 0, 0,
+ "Expected mean value of the distribution");
+ break;
+ case ACT_RANDOM_FLOAT_CONST:
+ uiDefButF(block, NUM, 1, "Value: ", (xco+10), yco-64, (width-20), 19,
+ &randAct->float_arg_1, 0.0, 1.0, 0, 0,
+ "Always return this number");
+ break;
+ case ACT_RANDOM_FLOAT_UNIFORM:
+ uiDefButF(block, NUM, 1, "Min: ", (xco+10), yco-64, (width-20)/2, 19,
+ &randAct->float_arg_1, -10000.0, 10000.0, 0, 0,
+ "Choose a number from a range"
+ "Lower boundary of the range");
+ uiDefButF(block, NUM, 1, "Max: ", (xco+10) + (width-20)/2, yco-64, (width-20)/2, 19,
+ &randAct->float_arg_2, -10000.0, 10000.0, 0, 0,
+ "Choose a number from a range"
+ "Upper boundary of the range");
+ break;
+ case ACT_RANDOM_FLOAT_NORMAL:
+ uiDefButF(block, NUM, 1, "Mean: ", (xco+10), yco-64, (width-20)/2, 19,
+ &randAct->float_arg_1, -10000.0, 10000.0, 0, 0,
+ "A normal distribution. Mean of the distribution");
+ uiDefButF(block, NUM, 1, "SD: ", (xco+10) + (width-20)/2, yco-64, (width-20)/2, 19,
+ &randAct->float_arg_2, 0.0, 10000.0, 0, 0,
+ "A normal distribution. Standard deviation of the "
+ "distribution");
+ break;
+ case ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL:
+ uiDefButF(block, NUM, 1, "Half-life time: ", (xco+10), yco-64, (width-20), 19,
+ &randAct->float_arg_1, 0.001, 10000.0, 0, 0,
+ "Negative exponential dropoff");
+ break;
+ default:
+ ; /* don't know what this distro is... can be useful for testing */
+ /* though :) */
+ }
+
+ yco-= ysize;
+ break;
+ case ACT_MESSAGE:
+ ma = act->data;
+
+ ysize = 4 + (3 * 24); /* footer + number of lines * 24 pixels/line */
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize,
+ (float)xco+width, (float)yco, 1);
+
+ myline=1;
+
+ /* line 1: To */
+ uiDefBut(block, TEX, 1, "To: ",
+ (xco+10), (yco-(myline++*24)), (width-20), 19,
+ &ma->toPropName, 0, 31, 0, 0,
+ "Optional send message to objects with this name only, or empty to broadcast");
+
+ /* line 2: Message Subject */
+ uiDefBut(block, TEX, 1, "Subject: ",
+ (xco+10), (yco-(myline++*24)), (width-20), 19,
+ &ma->subject, 0, 31, 0, 0,
+ "Optional message subject. This is what can be filtered on");
+
+ /* line 3: Text/Property */
+ uiDefButBitS(block, TOG, 1, B_REDR, "T/P",
+ (xco+10),(yco-(myline*24)), (0.20 * (width-20)), 19,
+ &ma->bodyType, 0.0, 0.0, 0, 0,
+ "Toggle message type: either Text or a PropertyName");
+
+ if (ma->bodyType == ACT_MESG_MESG)
+ {
+ /* line 3: Message Body */
+ uiDefBut(block, TEX, 1, "Body: ",
+ (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
+ &ma->body, 0, 31, 0, 0,
+ "Optional message body Text");
+ } else
+ {
+ /* line 3: Property body (set by property) */
+ uiDefBut(block, TEX, 1, "Propname: ",
+ (xco+10+(0.20*(width-20))),(yco-(myline++*24)),(0.8*(width-20)),19,
+ &ma->body, 0, 31, 0, 0,
+ "The message body will be set by the Property Value");
+ }
+
+ yco -= ysize;
+ break;
+ case ACT_2DFILTER:
+ tdfa = act->data;
+
+ ysize = 50;
+ if(tdfa->type == ACT_2DFILTER_CUSTOMFILTER)
+ {
+ ysize +=20;
+ }
+ glRects( xco, yco-ysize, xco+width, yco );
+ uiEmboss( (float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1 );
+
+ switch(tdfa->type)
+ {
+ case ACT_2DFILTER_MOTIONBLUR:
+ if(!tdfa->flag)
+ {
+ uiDefButS(block, TOG, B_REDR, "D", xco+30,yco-44,19, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Disable Motion Blur");
+ uiDefButF(block, NUM, B_REDR, "Value:", xco+52,yco-44,width-82,19,&tdfa->float_arg,0.0,1.0,0.0,0.0,"Set motion blur value");
+ }
+ else
+ {
+ uiDefButS(block, TOG, B_REDR, "Disabled", xco+30,yco-44,width-60, 19, &tdfa->flag, 0.0, 0.0, 0.0, 0.0, "Enable Motion Blur");
+ }
+ break;
+ case ACT_2DFILTER_BLUR:
+ case ACT_2DFILTER_SHARPEN:
+ case ACT_2DFILTER_DILATION:
+ case ACT_2DFILTER_EROSION:
+ case ACT_2DFILTER_LAPLACIAN:
+ case ACT_2DFILTER_SOBEL:
+ case ACT_2DFILTER_PREWITT:
+ case ACT_2DFILTER_GRAYSCALE:
+ case ACT_2DFILTER_SEPIA:
+ case ACT_2DFILTER_INVERT:
+ case ACT_2DFILTER_NOFILTER:
+ case ACT_2DFILTER_DISABLED:
+ case ACT_2DFILTER_ENABLED:
+ uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set motion blur value");
+ break;
+ case ACT_2DFILTER_CUSTOMFILTER:
+ uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set motion blur value");
+ uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width-60, 19, &tdfa->text, "");
+ break;
+ }
+
+ str= "2D Filter %t|Motion Blur %x1|Blur %x2|Sharpen %x3|Dilation %x4|Erosion %x5|"
+ "Laplacian %x6|Sobel %x7|Prewitt %x8|Gray Scale %x9|Sepia %x10|Invert %x11|Custom Filter %x12|"
+ "Enable Filter %x-2|Disable Filter %x-1|Remove Filter %x0|";
+ uiDefButS(block, MENU, B_REDR, str, xco+30,yco-24,width-60, 19, &tdfa->type, 0.0, 0.0, 0.0, 0.0, "2D filter type");
+
+ yco -= ysize;
+ break;
+ case ACT_PARENT:
+ parAct = act->data;
+
+ if(parAct->type==ACT_PARENT_SET) {
+
+ ysize= 48;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+95, yco-24, (width-100), 19, &(parAct->ob), "Set this object as parent");
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOGN, ACT_PARENT_COMPOUND, B_REDR,
+ "Compound",
+ xco + 5, yco - 44, (width - 10)/2, 19, &parAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Add this object shape to the parent shape (only if the parent shape is already compound)");
+ uiDefButBitS(block, TOGN, ACT_PARENT_GHOST, B_REDR,
+ "Ghost",
+ xco + 5 + ((width - 10)/2), yco - 44, (width - 10)/2, 19, &parAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Make this object ghost while parented (only if not compound)");
+ uiBlockEndAlign(block);
+ }
+ else if(parAct->type==ACT_PARENT_REMOVE) {
+
+ ysize= 28;
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+ }
+
+ str= "Parent %t|Set Parent %x0|Remove Parent %x1";
+ uiDefButI(block, MENU, B_REDR, str, xco+5, yco-24, parAct->type==1?(width-80):90, 19, &parAct->type, 0.0, 0.0, 0, 0, "");
+
+ yco-= ysize;
+ break;
+ default:
+ ysize= 4;
+
+ glRects(xco, yco-ysize, xco+width, yco);
+ uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
+
+ yco-= ysize;
+ break;
+ }
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ return yco-4;
+}
+
+static void do_sensor_menu(bContext *C, void *arg, int event)
+{
+ SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ ID **idar;
+ Object *ob;
+ bSensor *sens;
+ short count, a;
+
+ idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ if(event==0 || event==2) ob->scaflag |= OB_SHOWSENS;
+ else if(event==1) ob->scaflag &= ~OB_SHOWSENS;
+ }
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ sens= ob->sensors.first;
+ while(sens) {
+ if(event==2) sens->flag |= SENS_SHOW;
+ else if(event==3) sens->flag &= ~SENS_SHOW;
+ sens= sens->next;
+ }
+ }
+
+ if(idar) MEM_freeN(idar);
+}
+
+static uiBlock *sensor_menu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+ int yco=0;
+
+ block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_sensor_menu, NULL);
+
+ uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefBut(block, SEPR, 0, "", 0, (short)(yco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, BUTM, 1, "Show Sensors", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefBut(block, BUTM, 1, "Hide Sensors", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 3, "");
+
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+static void do_controller_menu(bContext *C, void *arg, int event)
+{
+ SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ ID **idar;
+ Object *ob;
+ bController *cont;
+ short count, a;
+
+ idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ if(event==0 || event==2) ob->scaflag |= OB_SHOWCONT;
+ else if(event==1) ob->scaflag &= ~OB_SHOWCONT;
+ }
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ cont= ob->controllers.first;
+ while(cont) {
+ if(event==2) cont->flag |= CONT_SHOW;
+ else if(event==3) cont->flag &= ~CONT_SHOW;
+ cont= cont->next;
+ }
+ }
+
+ if(idar) MEM_freeN(idar);
+}
+
+static uiBlock *controller_menu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+ int yco=0;
+
+ block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_controller_menu, NULL);
+
+ uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefBut(block, BUTM, 1, "Hide Objects", 0,(short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefBut(block, SEPR, 0, "", 0, (short)(yco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, BUTM, 1, "Show Controllers", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 2, 2, "");
+ uiDefBut(block, BUTM, 1, "Hide Controllers", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 3, 3, "");
+
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+static void do_actuator_menu(bContext *C, void *arg, int event)
+{
+ SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ ID **idar;
+ Object *ob;
+ bActuator *act;
+ short count, a;
+
+ idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ if(event==0 || event==2) ob->scaflag |= OB_SHOWACT;
+ else if(event==1) ob->scaflag &= ~OB_SHOWACT;
+ }
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ act= ob->actuators.first;
+ while(act) {
+ if(event==2) act->flag |= ACT_SHOW;
+ else if(event==3) act->flag &= ~ACT_SHOW;
+ act= act->next;
+ }
+ }
+
+ if(idar) MEM_freeN(idar);
+}
+
+static uiBlock *actuator_menu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+ int xco=0;
+
+ block= uiBeginBlock(C, ar, "filemenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_actuator_menu, NULL);
+
+ uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefBut(block, SEPR, 0, "", 0, (short)(xco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, BUTM, 1, "Show Actuators", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefBut(block, BUTM, 1, "Hide Actuators", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 3, "");
+
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+
+
+static void check_controller_state_mask(bContext *C, void *arg1_but, void *arg2_mask)
+{
+ unsigned int *cont_mask = arg2_mask;
+ uiBut *but = arg1_but;
+
+ /* a controller is always in a single state */
+ *cont_mask = (1<<but->retval);
+ but->retval = B_REDR;
+}
+
+static int first_bit(unsigned int mask)
+{
+ int bit;
+
+ for (bit=0; bit<32; bit++) {
+ if (mask & (1<<bit))
+ return bit;
+ }
+ return -1;
+}
+
+static uiBlock *controller_state_mask_menu(bContext *C, ARegion *ar, void *arg_cont)
+{
+ uiBlock *block;
+ uiBut *but;
+ bController *cont = arg_cont;
+
+ short yco = 12, xco = 0, stbit, offset;
+
+ block= uiBeginBlock(C, ar, "Controller state mask", UI_EMBOSS);
+
+ /* use this for a fake extra empy space around the buttons */
+ uiDefBut(block, LABEL, 0, "", -5, -5, 200, 34, NULL, 0, 0, 0, 0, "");
+
+ for (offset=0; offset<15; offset+=5) {
+ uiBlockBeginAlign(block);
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, TOG, (1<<(stbit+offset)), (stbit+offset), "", (short)(xco+12*stbit+13*offset), yco, 12, 12, (int *)&(cont->state_mask), 0, 0, 0, 0, "");
+ uiButSetFunc(but, check_controller_state_mask, but, &(cont->state_mask));
+ }
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, TOG, (1<<(stbit+offset+15)), (stbit+offset+15), "", (short)(xco+12*stbit+13*offset), yco-12, 12, 12, (int *)&(cont->state_mask), 0, 0, 0, 0, "");
+ uiButSetFunc(but, check_controller_state_mask, but, &(cont->state_mask));
+ }
+ }
+ uiBlockEndAlign(block);
+
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+static void do_object_state_menu(bContext *C, void *arg, int event)
+{
+ Object *ob = arg;
+
+ switch (event) {
+ case 0:
+ ob->state = 0x3FFFFFFF;
+ break;
+ case 1:
+ ob->state = ob->init_state;
+ if (!ob->state)
+ ob->state = 1;
+ break;
+ case 2:
+ ob->init_state = ob->state;
+ break;
+ }
+}
+
+static uiBlock *object_state_mask_menu(bContext *C, ARegion *ar, void *arg_obj)
+{
+ uiBlock *block;
+ short xco = 0;
+
+ block= uiBeginBlock(C, ar, "obstatemenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_object_state_menu, arg_obj);
+
+ uiDefBut(block, BUTM, 1, "Set all bits", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefBut(block, BUTM, 1, "Recall init state", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefBut(block, SEPR, 0, "", 0, (short)(xco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, BUTM, 1, "Store init state", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+static int is_sensor_linked(uiBlock *block, bSensor *sens)
+{
+ bController *cont;
+ int i, count;
+
+ for (count=0, i=0; i<sens->totlinks; i++) {
+ cont = sens->links[i];
+ if (uiFindInlink(block, cont) != NULL)
+ return 1;
+ }
+ return 0;
+}
+
+/* never used, see CVS 1.134 for the code */
+/* static FreeCamera *new_freecamera(void) */
+
+/* never used, see CVS 1.120 for the code */
+/* static uiBlock *freecamera_menu(void) */
+
+
+void logic_buttons(bContext *C, ARegion *ar)
+{
+ SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ Object *ob= CTX_data_active_object(C);
+ ID **idar;
+ bSensor *sens;
+ bController *cont;
+ bActuator *act;
+ uiBlock *block;
+ uiBut *but;
+ int a, iact, stbit, offset;
+ short xco, yco, count, width, ycoo;
+ char name[32];
+ /* pin is a bool used for actuator and sensor drawing with states
+ * pin so changing states dosnt hide the logic brick */
+ char pin;
+
+ if(ob==NULL) return;
+// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+
+ sprintf(name, "buttonswin %p", ar);
+ block= uiBeginBlock(C, ar, name, UI_EMBOSS);
+ uiBlockSetHandleFunc(block, do_logic_buts, NULL);
+
+ idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
+
+ /* clean ACT_LINKED and ACT_VISIBLE of all potentially visible actuators so that
+ we can determine which is actually linked/visible */
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+ act= ob->actuators.first;
+ while(act) {
+ act->flag &= ~(ACT_LINKED|ACT_VISIBLE);
+ act = act->next;
+ }
+ /* same for sensors */
+ sens= ob->sensors.first;
+ while(sens) {
+ sens->flag &= ~(SENS_VISIBLE);
+ sens = sens->next;
+ }
+ }
+
+ /* start with the controller because we need to know which one is visible */
+ /* ******************************* */
+ xco= 500; yco= 170; width= 300;
+
+ uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, UI_UNIT_Y, "");
+
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, BUTS_CONT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_CONT_ACT, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_CONT_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
+ uiBlockEndAlign(block);
+
+ ob= CTX_data_active_object(C);
+
+ for(a=0; a<count; a++) {
+ unsigned int controller_state_mask = 0; /* store a bitmask for states that are used */
+
+ ob= (Object *)idar[a];
+// uiClearButLock();
+// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
+
+ /* presume it is only objects for now */
+ uiBlockBeginAlign(block);
+// if(ob->controllers.first) uiSetCurFont(block, UI_HELVB);
+ uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
+// if(ob->controllers.first) uiSetCurFont(block, UI_HELV);
+ uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
+ uiBlockEndAlign(block);
+ yco-=20;
+
+ /* mark all actuators linked to these controllers */
+ /* note that some of these actuators could be from objects that are not in the display list.
+ It's ok because those actuators will not be displayed here */
+ cont= ob->controllers.first;
+ while(cont) {
+ for (iact=0; iact<cont->totlinks; iact++) {
+ act = cont->links[iact];
+ if (act)
+ act->flag |= ACT_LINKED;
+ }
+ controller_state_mask |= cont->state_mask;
+ cont = cont->next;
+ }
+
+ if(ob->scaflag & OB_SHOWCONT) {
+
+ /* first show the state */
+ uiDefBlockBut(block, object_state_mask_menu, ob, "State", (short)(xco-10), (short)(yco-10), 36, UI_UNIT_Y, "Object state menu: store and retrieve initial state");
+
+ if (!ob->state)
+ ob->state = 1;
+ for (offset=0; offset<15; offset+=5) {
+ uiBlockBeginAlign(block);
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+31+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset)));
+ uiButSetFunc(but, check_state_mask, but, &(ob->state));
+ }
+ for (stbit=0; stbit<5; stbit++) {
+ but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset+15)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+31+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15)));
+ uiButSetFunc(but, check_state_mask, but, &(ob->state));
+ }
+ }
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, OB_SETSTBIT, B_SET_STATE_BIT, "All",(short)(xco+226), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set all state bits");
+ uiDefButBitS(block, TOG, OB_INITSTBIT, B_INIT_STATE_BIT, "Ini",(short)(xco+248), yco-10, 22, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Set the initial state");
+ uiDefButBitS(block, TOG, OB_DEBUGSTATE, 0, "D",(short)(xco+270), yco-10, 15, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Print state debug info");
+ uiBlockEndAlign(block);
+
+ yco-=35;
+
+ /* display only the controllers that match the current state */
+ offset = 0;
+ for (stbit=0; stbit<32; stbit++) {
+ if (!(ob->state & (1<<stbit)))
+ continue;
+ /* add a separation between controllers of different states */
+ if (offset) {
+ offset = 0;
+ yco -= 6;
+ }
+ cont= ob->controllers.first;
+ while(cont) {
+ if (cont->state_mask & (1<<stbit)) {
+ /* this controller is visible, mark all its actuator */
+ for (iact=0; iact<cont->totlinks; iact++) {
+ act = cont->links[iact];
+ if (act)
+ act->flag |= ACT_VISIBLE;
+ }
+ uiDefIconButBitS(block, TOG, CONT_DEL, B_DEL_CONT, ICON_X, xco, yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Delete Controller");
+ uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Controller settings");
+ uiDefIconButBitS(block, TOG, CONT_PRIO, B_REDR, ICON_BOOKMARKS, (short)(xco+width-66), yco, 22, UI_UNIT_Y, &cont->flag, 0, 0, 0, 0, "Mark controller for execution before all non-marked controllers (good for startup scripts)");
+
+ sprintf(name, "%d", first_bit(cont->state_mask)+1);
+ uiDefBlockBut(block, controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
+
+ if(cont->flag & CONT_SHOW) {
+ cont->otype= cont->type;
+ uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 70, UI_UNIT_Y, &cont->type, 0, 0, 0, 0, "Controller type");
+ but= uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, 31, 0, 0, "Controller name");
+ uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0);
+
+ ycoo= yco;
+ yco= draw_controllerbuttons(cont, block, xco, yco, width);
+ if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ }
+ else {
+ 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);
+ 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);
+ ycoo= yco;
+ }
+
+ but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+ uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR);
+
+ uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, "");
+ /* offset is >0 if at least one controller was displayed */
+ offset++;
+ yco-=20;
+ }
+ cont= cont->next;
+ }
+
+ }
+ yco-= 6;
+ }
+ }
+
+ /* ******************************* */
+ xco= 10; yco= 170; width= 400;
+
+ uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 70, UI_UNIT_Y, "");
+
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+80, yco+35, (width-70)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+80+(width-70)/4, yco+35, (width-70)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+80+2*(width-70)/4, yco+35, (width-70)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
+ uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "State", xco+80+3*(width-70)/4, yco+35, (width-70)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states");
+ uiBlockEndAlign(block);
+
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+// uiClearButLock();
+// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+
+ if( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
+
+ /* presume it is only objects for now */
+ uiBlockBeginAlign(block);
+// if(ob->sensors.first) uiSetCurFont(block, UI_HELVB);
+ uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
+// if(ob->sensors.first) uiSetCurFont(block, UI_HELV);
+ uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
+ uiBlockEndAlign(block);
+ yco-=20;
+
+ if(ob->scaflag & OB_SHOWSENS) {
+
+ sens= ob->sensors.first;
+ while(sens) {
+ if (!(slogic->scaflag & BUTS_SENS_STATE) ||
+ (sens->totlinks == 0) || /* always display sensor without links so that is can be edited */
+ (sens->flag & SENS_PIN && slogic->scaflag & BUTS_SENS_STATE) || /* states can hide some sensors, pinned sensors ignore the visible state */
+ (is_sensor_linked(block, sens))
+ ) {
+ /* should we draw the pin? - for now always draw when there is a state */
+ pin = (slogic->scaflag & BUTS_SENS_STATE && (sens->flag & SENS_SHOW || sens->flag & SENS_PIN)) ? 1:0 ;
+
+ sens->flag |= SENS_VISIBLE;
+ uiDefIconButBitS(block, TOG, SENS_DEL, B_DEL_SENS, ICON_X, xco, yco, 22, UI_UNIT_Y, &sens->flag, 0, 0, 0, 0, "Delete Sensor");
+ if (pin)
+ uiDefIconButBitS(block, ICONTOG, SENS_PIN, B_REDR, ICON_PINNED, (short)(xco+width-44), yco, 22, UI_UNIT_Y, &sens->flag, 0, 0, 0, 0, "Display when not linked to a visible states controller");
+
+ uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &sens->flag, 0, 0, 0, 0, "Sensor settings");
+
+ ycoo= yco;
+ if(sens->flag & SENS_SHOW)
+ {
+ uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 80, UI_UNIT_Y, &sens->type, 0, 0, 0, 0, "Sensor type");
+ but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, 31, 0, 0, "Sensor name");
+ uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
+
+ sens->otype= sens->type;
+ yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name);
+ if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ }
+ else {
+ 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);
+ 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);
+ }
+
+ but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+ uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER);
+
+ yco-=20;
+ }
+ sens= sens->next;
+ }
+ yco-= 6;
+ }
+ }
+
+ /* ******************************* */
+ xco= 900; yco= 170; width= 400;
+
+ uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 90, UI_UNIT_Y, "");
+
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, BUTS_ACT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-100)/4, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-100)/4, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
+ uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "State", xco+110+3*(width-100)/4, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states");
+ uiBlockEndAlign(block);
+ for(a=0; a<count; a++) {
+ ob= (Object *)idar[a];
+// uiClearButLock();
+// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
+
+ /* presume it is only objects for now */
+ uiBlockBeginAlign(block);
+// if(ob->actuators.first) uiSetCurFont(block, UI_HELVB);
+ uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
+// if(ob->actuators.first) uiSetCurFont(block, UI_HELV);
+ uiDefButBitS(block, TOG, OB_ADDACT, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
+ uiBlockEndAlign(block);
+ yco-=20;
+
+ if(ob->scaflag & OB_SHOWACT) {
+
+ act= ob->actuators.first;
+ while(act) {
+ if (!(slogic->scaflag & BUTS_ACT_STATE) ||
+ !(act->flag & ACT_LINKED) || /* always display actuators without links so that is can be edited */
+ (act->flag & ACT_VISIBLE) || /* this actuator has visible connection, display it */
+ (act->flag & ACT_PIN && slogic->scaflag & BUTS_ACT_STATE)) {
+
+ pin = (slogic->scaflag & BUTS_ACT_STATE && (act->flag & SENS_SHOW || act->flag & SENS_PIN)) ? 1:0 ;
+
+ act->flag |= ACT_VISIBLE; /* mark the actuator as visible to help implementing the up/down action */
+ uiDefIconButBitS(block, TOG, ACT_DEL, B_DEL_ACT, ICON_X, xco, yco, 22, UI_UNIT_Y, &act->flag, 0, 0, 0, 0, "Delete Actuator");
+ if (pin)
+ uiDefIconButBitS(block, ICONTOG, ACT_PIN, B_REDR, ICON_PINNED, (short)(xco+width-44), yco, 22, UI_UNIT_Y, &act->flag, 0, 0, 0, 0, "Display when not linked to a visible states controller");
+ uiDefIconButBitS(block, ICONTOG, ACT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &act->flag, 0, 0, 0, 0, "Display the actuator");
+
+ if(act->flag & ACT_SHOW) {
+ act->otype= act->type;
+ uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 90, UI_UNIT_Y, &act->type, 0, 0, 0, 0, "Actuator type");
+ but= uiDefBut(block, TEX, 1, "", (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act->name, 0, 31, 0, 0, "Actuator name");
+ uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0);
+
+ ycoo= yco;
+ yco= draw_actuatorbuttons(ob, act, block, xco, yco, width);
+ if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ }
+ else {
+ 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);
+ 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);
+ ycoo= yco;
+ }
+
+ uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, act, LINK_ACTUATOR, 0, 0, 0, "");
+
+ yco-=20;
+ }
+ act= act->next;
+ }
+ yco-= 6;
+ }
+ }
+
+ uiComposeLinks(block);
+
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
+
+ if(idar) MEM_freeN(idar);
+}
+
+
+
+
+
+
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
new file mode 100644
index 00000000000..a593cfd1e7f
--- /dev/null
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -0,0 +1,369 @@
+/**
+ * $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): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_image_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
+#include "BKE_context.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "ED_space_api.h"
+#include "ED_screen.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "logic_intern.h"
+
+/* ******************** manage regions ********************* */
+
+ARegion *logic_has_buttons_region(ScrArea *sa)
+{
+ ARegion *ar, *arnew;
+
+ for(ar= sa->regionbase.first; ar; ar= ar->next)
+ if(ar->regiontype==RGN_TYPE_UI)
+ return ar;
+
+ /* add subdiv level; after header */
+ for(ar= sa->regionbase.first; ar; ar= ar->next)
+ if(ar->regiontype==RGN_TYPE_HEADER)
+ break;
+
+ /* is error! */
+ if(ar==NULL) return NULL;
+
+ arnew= MEM_callocN(sizeof(ARegion), "buttons for image");
+
+ BLI_insertlinkafter(&sa->regionbase, ar, arnew);
+ arnew->regiontype= RGN_TYPE_UI;
+ arnew->alignment= RGN_ALIGN_LEFT;
+
+ arnew->flag = RGN_FLAG_HIDDEN;
+
+ return arnew;
+}
+
+/* ******************** default callbacks for image space ***************** */
+
+static SpaceLink *logic_new(const bContext *C)
+{
+ ARegion *ar;
+ SpaceLogic *slogic;
+
+ slogic= MEM_callocN(sizeof(SpaceLogic), "initlogic");
+ slogic->spacetype= SPACE_LOGIC;
+
+ /* header */
+ ar= MEM_callocN(sizeof(ARegion), "header for logic");
+
+ BLI_addtail(&slogic->regionbase, ar);
+ ar->regiontype= RGN_TYPE_HEADER;
+ ar->alignment= RGN_ALIGN_BOTTOM;
+
+ /* buttons/list view */
+ ar= MEM_callocN(sizeof(ARegion), "buttons for logic");
+
+ BLI_addtail(&slogic->regionbase, ar);
+ ar->regiontype= RGN_TYPE_UI;
+ ar->alignment= RGN_ALIGN_LEFT;
+
+ /* main area */
+ ar= MEM_callocN(sizeof(ARegion), "main area for logic");
+
+ BLI_addtail(&slogic->regionbase, ar);
+ ar->regiontype= RGN_TYPE_WINDOW;
+
+ ar->v2d.tot.xmin= 0.0f;
+ ar->v2d.tot.ymin= 0.0f;
+ ar->v2d.tot.xmax= 1280;
+ ar->v2d.tot.ymax= 240.0f;
+
+ ar->v2d.cur.xmin= 0.0f;
+ ar->v2d.cur.ymin= 0.0f;
+ ar->v2d.cur.xmax= 1280.0f;
+ ar->v2d.cur.ymax= 240.0f;
+
+ ar->v2d.min[0]= 1.0f;
+ ar->v2d.min[1]= 1.0f;
+
+ ar->v2d.max[0]= 32000.0f;
+ ar->v2d.max[1]= 32000.0f;
+
+ ar->v2d.minzoom= 0.5f;
+ ar->v2d.maxzoom= 1.21f;
+
+ ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ ar->v2d.keepzoom= V2D_KEEPZOOM|V2D_KEEPASPECT;
+ ar->v2d.keeptot= 0;
+
+
+ return (SpaceLink *)slogic;
+}
+
+/* not spacelink itself */
+static void logic_free(SpaceLink *sl)
+{
+// Spacelogic *slogic= (SpaceLogic*) sl;
+
+// if(slogic->gpd)
+// XXX free_gpencil_data(slogic->gpd);
+
+}
+
+
+/* spacetype; init callback */
+static void logic_init(struct wmWindowManager *wm, ScrArea *sa)
+{
+
+}
+
+static SpaceLink *logic_duplicate(SpaceLink *sl)
+{
+ SpaceLogic *slogicn= MEM_dupallocN(sl);
+
+ return (SpaceLink *)slogicn;
+}
+
+void logic_operatortypes(void)
+{
+ WM_operatortype_append(LOGIC_OT_properties);
+
+}
+
+void logic_keymap(struct wmWindowManager *wm)
+{
+ ListBase *keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0);
+
+ WM_keymap_add_item(keymap, "LOGIC_OT_properties", NKEY, KM_PRESS, 0, 0);
+}
+
+static void logic_refresh(const bContext *C, ScrArea *sa)
+{
+// SpaceLogic *slogic= (SpaceImage*)CTX_wm_space_data(C);
+// Object *obedit= CTX_data_edit_object(C);
+
+}
+
+static void logic_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_FRAME:
+ ED_region_tag_redraw(ar);
+ break;
+
+ case ND_OB_ACTIVE:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_OBJECT:
+ break;
+ }
+}
+
+static int logic_context(const bContext *C, const char *member, bContextDataResult *result)
+{
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+
+
+ return 0;
+}
+
+/************************** main region ***************************/
+
+
+/* add handlers, stuff you only do once or on area/region changes */
+static void logic_main_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ ListBase *keymap;
+
+ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
+
+ /* own keymaps */
+ keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+}
+
+static void logic_main_area_draw(const bContext *C, ARegion *ar)
+{
+ /* draw entirely, view changes should be handled here */
+// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ View2D *v2d= &ar->v2d;
+ View2DScrollers *scrollers;
+ float col[3];
+
+ /* clear and setup matrix */
+ UI_GetThemeColor3fv(TH_BACK, col);
+ glClearColor(col[0], col[1], col[2], 0.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ UI_view2d_view_ortho(C, v2d);
+
+ logic_buttons((bContext *)C, ar);
+
+ /* reset view matrix */
+ UI_view2d_view_restore(C);
+
+ /* scrollers */
+ scrollers= UI_view2d_scrollers_calc(C, v2d, 10, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ UI_view2d_scrollers_draw(C, v2d, scrollers);
+ UI_view2d_scrollers_free(scrollers);
+
+}
+
+
+/* *********************** buttons region ************************ */
+
+/* add handlers, stuff you only do once or on area/region changes */
+static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ ListBase *keymap;
+
+ ED_region_panels_init(wm, ar);
+
+ keymap= WM_keymap_listbase(wm, "Logic Generic", SPACE_LOGIC, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+}
+
+static void logic_buttons_area_draw(const bContext *C, ARegion *ar)
+{
+ ED_region_panels(C, ar, 1, NULL);
+}
+
+/************************* header region **************************/
+
+/* add handlers, stuff you only do once or on area/region changes */
+static void logic_header_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ ED_region_header_init(ar);
+}
+
+static void logic_header_area_draw(const bContext *C, ARegion *ar)
+{
+ 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);
+
+ logic_header_buttons(C, ar);
+
+ /* restore view matrix? */
+ UI_view2d_view_restore(C);
+}
+
+/**************************** spacetype *****************************/
+
+/* only called once, from space/spacetypes.c */
+void ED_spacetype_logic(void)
+{
+ SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype logic");
+ ARegionType *art;
+
+ st->spaceid= SPACE_LOGIC;
+
+ st->new= logic_new;
+ st->free= logic_free;
+ st->init= logic_init;
+ st->duplicate= logic_duplicate;
+ st->operatortypes= logic_operatortypes;
+ st->keymap= logic_keymap;
+ st->refresh= logic_refresh;
+ st->context= logic_context;
+
+ /* regions: main window */
+ art= MEM_callocN(sizeof(ARegionType), "spacetype logic region");
+ art->regionid = RGN_TYPE_WINDOW;
+ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES|ED_KEYMAP_VIEW2D;
+ art->init= logic_main_area_init;
+ art->draw= logic_main_area_draw;
+ art->listener= logic_listener;
+
+ BLI_addhead(&st->regiontypes, art);
+
+ /* regions: listview/buttons */
+ art= MEM_callocN(sizeof(ARegionType), "spacetype logic region");
+ art->regionid = RGN_TYPE_UI;
+ art->minsizex= 220; // XXX
+ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
+ art->listener= logic_listener;
+ art->init= logic_buttons_area_init;
+ art->draw= logic_buttons_area_draw;
+ BLI_addhead(&st->regiontypes, art);
+
+ logic_buttons_register(art);
+
+ /* regions: header */
+ art= MEM_callocN(sizeof(ARegionType), "spacetype logic region");
+ art->regionid = RGN_TYPE_HEADER;
+ art->minsizey= HEADERY;
+ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
+ art->init= logic_header_area_init;
+ art->draw= logic_header_area_draw;
+
+ BLI_addhead(&st->regiontypes, art);
+
+ BKE_spacetype_register(st);
+}
+
+
diff --git a/source/blender/editors/space_nla/Makefile b/source/blender/editors/space_nla/Makefile
index 43f010e6adc..d7c9477dc83 100644
--- a/source/blender/editors/space_nla/Makefile
+++ b/source/blender/editors/space_nla/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
new file mode 100644
index 00000000000..a74037d1ace
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -0,0 +1,426 @@
+/**
+ * $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): Blender Foundation, Joshua Leung
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_arithb.h"
+#include "BLI_blenlib.h"
+#include "BLI_editVert.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_nla.h"
+#include "BKE_action.h"
+#include "BKE_context.h"
+#include "BKE_curve.h"
+#include "BKE_customdata.h"
+#include "BKE_depsgraph.h"
+#include "BKE_fcurve.h"
+#include "BKE_object.h"
+#include "BKE_global.h"
+#include "BKE_scene.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "BIF_gl.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframing.h"
+#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "nla_intern.h" // own include
+
+
+/* ******************* nla editor space & buttons ************** */
+
+#define B_NOP 1
+#define B_REDR 2
+
+/* -------------- */
+
+static void do_nla_region_buttons(bContext *C, void *arg, int event)
+{
+ //Scene *scene= CTX_data_scene(C);
+
+ switch(event) {
+
+ }
+
+ /* default for now */
+ WM_event_add_notifier(C, NC_SCENE|NC_OBJECT|ND_TRANSFORM, NULL);
+}
+
+static int nla_panel_context(const bContext *C, PointerRNA *nlt_ptr, PointerRNA *strip_ptr)
+{
+ bAnimContext ac;
+ bAnimListElem *ale= NULL;
+ ListBase anim_data = {NULL, NULL};
+ short found=0;
+ int filter;
+
+ /* for now, only draw if we could init the anim-context info (necessary for all animation-related tools)
+ * to work correctly is able to be correctly retrieved. There's no point showing empty panels?
+ */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return 0;
+
+ /* extract list of active channel(s), of which we should only take the first one (expecting it to be an NLA track) */
+ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_ACTIVE);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ if (ale->type == ANIMTYPE_NLATRACK) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ /* found it, now set the pointers */
+ if (nlt_ptr) {
+ /* NLA-Track pointer */
+ RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt, nlt_ptr);
+ }
+ if (strip_ptr) {
+ /* NLA-Strip pointer */
+ NlaStrip *strip= BKE_nlastrip_find_active(nlt);
+ RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr);
+ }
+
+ found= 1;
+ break;
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ return found;
+}
+
+#if 0
+static int nla_panel_poll(const bContext *C, PanelType *pt)
+{
+ return nla_panel_context(C, NULL, NULL);
+}
+#endif
+
+static int nla_track_panel_poll(const bContext *C, PanelType *pt)
+{
+ PointerRNA ptr;
+ return (nla_panel_context(C, &ptr, NULL) && (ptr.data != NULL));
+}
+
+static int nla_strip_panel_poll(const bContext *C, PanelType *pt)
+{
+ PointerRNA ptr;
+ return (nla_panel_context(C, NULL, &ptr) && (ptr.data != NULL));
+}
+
+static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *pt)
+{
+ PointerRNA ptr;
+ NlaStrip *strip;
+
+ if (!nla_panel_context(C, NULL, &ptr))
+ return 0;
+ if (ptr.data == NULL)
+ return 0;
+
+ strip= ptr.data;
+ return (strip->type == NLASTRIP_TYPE_CLIP);
+}
+
+/* -------------- */
+
+/* active NLA-Track */
+static void nla_panel_track (const bContext *C, Panel *pa)
+{
+ PointerRNA nlt_ptr;
+ uiLayout *layout= pa->layout;
+ uiLayout *row;
+ uiBlock *block;
+
+ /* check context and also validity of pointer */
+ if (!nla_panel_context(C, &nlt_ptr, NULL))
+ return;
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
+
+ /* Info - Active NLA-Context:Track ---------------------- */
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, NULL, ICON_NLA, &nlt_ptr, "name", 0, 0, 0);
+}
+
+/* generic settings for active NLA-Strip */
+static void nla_panel_properties(const bContext *C, Panel *pa)
+{
+ PointerRNA strip_ptr;
+ uiLayout *layout= pa->layout;
+ uiLayout *column, *row, *subcol;
+ uiBlock *block;
+
+ if (!nla_panel_context(C, NULL, &strip_ptr))
+ return;
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
+
+ /* Strip Properties ------------------------------------- */
+ /* strip type */
+ row= uiLayoutColumn(layout, 1);
+ 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, 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, 0, 0);
+
+ /* blending */
+ row= uiLayoutRow(layout, 1);
+ 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, 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, 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, 0, 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "reversed", 0, 0, 0);
+}
+
+
+/* action-clip only settings for active NLA-Strip */
+static void nla_panel_actclip(const bContext *C, Panel *pa)
+{
+ PointerRNA strip_ptr;
+ uiLayout *layout= pa->layout;
+ uiLayout *column, *row;
+ uiBlock *block;
+
+ /* check context and also validity of pointer */
+ if (!nla_panel_context(C, NULL, &strip_ptr))
+ return;
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
+
+ /* Strip Properties ------------------------------------- */
+ /* action pointer */
+ row= uiLayoutRow(layout, 1);
+ 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, 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, 0, 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "repeat", 0, 0, 0);
+}
+
+/* evaluation settings for active NLA-Strip */
+static void nla_panel_evaluation(const bContext *C, Panel *pa)
+{
+ PointerRNA strip_ptr;
+ uiLayout *layout= pa->layout;
+ uiLayout *column, *subcolumn;
+ uiBlock *block;
+
+ /* check context and also validity of pointer */
+ if (!nla_panel_context(C, NULL, &strip_ptr))
+ return;
+
+ block= uiLayoutGetBlock(layout);
+ uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
+
+ column= uiLayoutColumn(layout, 1);
+ 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, 0, 0);
+
+
+ column= uiLayoutColumn(layout, 1);
+ 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, 0, 0);
+}
+
+/* F-Modifiers for active NLA-Strip */
+static void nla_panel_modifiers(const bContext *C, Panel *pa)
+{
+ PointerRNA strip_ptr;
+ NlaStrip *strip;
+ FModifier *fcm;
+ uiLayout *col, *row;
+ uiBlock *block;
+
+ /* check context and also validity of pointer */
+ if (!nla_panel_context(C, NULL, &strip_ptr))
+ return;
+ strip= strip_ptr.data;
+
+ block= uiLayoutGetBlock(pa->layout);
+ uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
+
+ /* 'add modifier' button at top of panel */
+ {
+ row= uiLayoutRow(pa->layout, 0);
+ block= uiLayoutGetBlock(row);
+
+ // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
+ // FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected)
+ uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 0, 150, 20, "Adds a new F-Modifier for the active NLA Strip");
+ }
+
+ /* draw each modifier */
+ for (fcm= strip->modifiers.first; fcm; fcm= fcm->next) {
+ col= uiLayoutColumn(pa->layout, 1);
+
+ ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm);
+ }
+}
+
+/* ******************* general ******************************** */
+
+
+void nla_buttons_register(ARegionType *art)
+{
+ PanelType *pt;
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel track");
+ strcpy(pt->idname, "NLA_PT_track");
+ strcpy(pt->label, "Active Track");
+ pt->draw= nla_panel_track;
+ pt->poll= nla_track_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
+ strcpy(pt->idname, "NLA_PT_properties");
+ strcpy(pt->label, "Active Strip");
+ pt->draw= nla_panel_properties;
+ pt->poll= nla_strip_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
+ strcpy(pt->idname, "NLA_PT_actionclip");
+ strcpy(pt->label, "Action Clip");
+ pt->draw= nla_panel_actclip;
+ pt->poll= nla_strip_actclip_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
+ strcpy(pt->idname, "NLA_PT_evaluation");
+ strcpy(pt->label, "Evaluation");
+ pt->draw= nla_panel_evaluation;
+ pt->poll= nla_strip_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
+ strcpy(pt->idname, "NLA_PT_modifiers");
+ strcpy(pt->label, "Modifiers");
+ pt->draw= nla_panel_modifiers;
+ pt->poll= nla_strip_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+}
+
+static int nla_properties(bContext *C, wmOperator *op)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= nla_has_buttons_region(sa);
+
+ if(ar) {
+ ar->flag ^= RGN_FLAG_HIDDEN;
+ ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
+
+ ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
+ ED_area_tag_redraw(sa);
+ }
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_properties(wmOperatorType *ot)
+{
+ ot->name= "Properties";
+ ot->idname= "NLA_OT_properties";
+
+ ot->exec= nla_properties;
+ ot->poll= ED_operator_nla_active;
+
+ /* flags */
+ ot->flag= 0;
+}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
new file mode 100644
index 00000000000..1ab348eb28e
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -0,0 +1,516 @@
+/**
+ * $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
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Joshua Leung (major recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "DNA_listBase.h"
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_object_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_space_types.h"
+#include "DNA_key_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
+#include "DNA_world_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_nla.h"
+#include "BKE_context.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframes_edit.h"
+#include "ED_markers.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_interface_icons.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "nla_intern.h" // own include
+
+/* *********************************************** */
+/* Operators for NLA channels-list which need to be different from the standard Animation Editor ones */
+
+/* ******************** Mouse-Click Operator *********************** */
+/* Depending on the channel that was clicked on, the mouse click will activate whichever
+ * part of the channel is relevant.
+ *
+ * NOTE: eventually, this should probably be phased out when many of these things are replaced with buttons
+ */
+
+static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, short selectmode)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+ int notifierFlags = 0;
+
+ /* get the channel that was clicked on */
+ /* filter channels */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
+ filter= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* get channel from index */
+ ale= BLI_findlink(&anim_data, channel_index);
+ if (ale == NULL) {
+ /* channel not found */
+ printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index);
+
+ BLI_freelistN(&anim_data);
+ return 0;
+ }
+
+ /* action to take depends on what channel we've got */
+ switch (ale->type) {
+ case ANIMTYPE_SCENE:
+ {
+ Scene *sce= (Scene *)ale->data;
+
+ if (x < 16) {
+ /* toggle expand */
+ sce->flag ^= SCE_DS_COLLAPSED;
+
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else {
+ /* set selection status */
+ if (selectmode == SELECT_INVERT) {
+ /* swap select */
+ sce->flag ^= SCE_DS_SELECTED;
+ }
+ else {
+ sce->flag |= SCE_DS_SELECTED;
+ }
+
+ notifierFlags |= ND_ANIMCHAN_SELECT;
+ }
+ }
+ break;
+ case ANIMTYPE_OBJECT:
+ {
+ bDopeSheet *ads= (bDopeSheet *)ac->data;
+ Scene *sce= (Scene *)ads->source;
+ Base *base= (Base *)ale->data;
+ Object *ob= base->object;
+
+ if (x < 16) {
+ /* toggle expand */
+ ob->nlaflag ^= OB_ADS_COLLAPSED; // XXX
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else if (nlaedit_is_tweakmode_on(ac) == 0) {
+ /* set selection status */
+ if (selectmode == SELECT_INVERT) {
+ /* swap select */
+ base->flag ^= SELECT;
+ ob->flag= base->flag;
+ }
+ else {
+ Base *b;
+
+ /* deleselect all */
+ for (b= sce->base.first; b; b= b->next) {
+ b->flag &= ~SELECT;
+ b->object->flag= b->flag;
+ }
+
+ /* select object now */
+ base->flag |= SELECT;
+ ob->flag |= SELECT;
+ }
+
+ /* xxx should be ED_base_object_activate(), but we need context pointer for that... */
+ //set_active_base(base);
+
+ /* notifiers - channel was selected */
+ notifierFlags |= ND_ANIMCHAN_SELECT;
+ }
+ }
+ break;
+ case ANIMTYPE_FILLMATD:
+ {
+ Object *ob= (Object *)ale->data;
+ ob->nlaflag ^= OB_ADS_SHOWMATS; // XXX
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+
+ case ANIMTYPE_DSMAT:
+ {
+ Material *ma= (Material *)ale->data;
+ ma->flag ^= MA_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+ case ANIMTYPE_DSLAM:
+ {
+ Lamp *la= (Lamp *)ale->data;
+ la->flag ^= LA_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+ case ANIMTYPE_DSCAM:
+ {
+ Camera *ca= (Camera *)ale->data;
+ ca->flag ^= CAM_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+ case ANIMTYPE_DSCUR:
+ {
+ Curve *cu= (Curve *)ale->data;
+ cu->flag ^= CU_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+ case ANIMTYPE_DSSKEY:
+ {
+ Key *key= (Key *)ale->data;
+ key->flag ^= KEYBLOCK_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+ case ANIMTYPE_DSWOR:
+ {
+ World *wo= (World *)ale->data;
+ wo->flag ^= WO_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
+
+ case ANIMTYPE_NLATRACK:
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ short offset;
+
+ /* offset for start of channel (on LHS of channel-list) */
+ if (ale->id) {
+ /* special exception for materials */
+ if (GS(ale->id->name) == ID_MA)
+ offset= 21 + NLACHANNEL_BUTTON_WIDTH;
+ else
+ offset= 14;
+ }
+ else
+ offset= 0;
+
+ 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 >= (NLACHANNEL_NAMEWIDTH-2*NLACHANNEL_BUTTON_WIDTH)) {
+ /* toggle mute */
+ nlt->flag ^= NLATRACK_MUTED;
+
+ /* notifier flags - channel was edited */
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else if (x <= ((NLACHANNEL_BUTTON_WIDTH*2)+offset)) {
+ /* toggle 'solo' */
+ BKE_nlatrack_solo_toggle(adt, nlt);
+
+ /* notifier flags - channel was edited */
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ else if (nlaedit_is_tweakmode_on(ac) == 0) {
+ /* set selection */
+ if (selectmode == SELECT_INVERT) {
+ /* inverse selection status of this F-Curve only */
+ nlt->flag ^= NLATRACK_SELECTED;
+ }
+ else {
+ /* select F-Curve by itself */
+ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ nlt->flag |= NLATRACK_SELECTED;
+ }
+
+ /* if NLA-Track is selected now, make NLA-Track the 'active' one in the visible list */
+ if (nlt->flag & NLATRACK_SELECTED)
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
+
+ /* notifier flags - channel was selected */
+ notifierFlags |= ND_ANIMCHAN_SELECT;
+ }
+ }
+ break;
+ case ANIMTYPE_NLAACTION:
+ {
+ AnimData *adt= BKE_animdata_from_id(ale->owner); /* this won't crash, right? */
+
+ 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
+ // however, calling the operator requires that we supply the args, and that works with proper buttons only
+ BKE_nla_action_pushdown(adt);
+ }
+ else {
+ /* when in tweakmode, this button becomes the toggle for mapped editing */
+ adt->flag ^= ADT_NLA_EDIT_NOMAP;
+ }
+
+ /* changes to NLA-Action occurred */
+ notifierFlags |= ND_NLA_ACTCHANGE;
+ }
+ }
+ break;
+
+ default:
+ printf("Error: Invalid channel type in mouse_nla_channels() \n");
+ }
+
+ /* free channels */
+ BLI_freelistN(&anim_data);
+
+ /* return the notifier-flags set */
+ return notifierFlags;
+}
+
+/* ------------------- */
+
+/* handle clicking */
+static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ bAnimContext ac;
+ Scene *scene;
+ ARegion *ar;
+ View2D *v2d;
+ int mval[2], channel_index;
+ int notifierFlags = 0;
+ short selectmode;
+ float x, y;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get useful pointers from animation context data */
+ scene= ac.scene;
+ ar= ac.ar;
+ v2d= &ar->v2d;
+
+ /* get mouse coordinates (in region coordinates) */
+ mval[0]= (event->x - ar->winrct.xmin);
+ mval[1]= (event->y - ar->winrct.ymin);
+
+ /* select mode is either replace (deselect all, then add) or add/extend */
+ if (RNA_boolean_get(op->ptr, "extend"))
+ selectmode= SELECT_INVERT;
+ else
+ selectmode= SELECT_REPLACE;
+
+ /* figure out which channel user clicked in
+ * Note: although channels technically start at y= NLACHANNEL_FIRST, we need to adjust by half a channel's height
+ * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use
+ * NLACHANNEL_HEIGHT_HALF.
+ */
+ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
+ UI_view2d_listview_view_to_cell(v2d, NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP, 0, (float)NLACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
+
+ /* handle mouse-click in the relevant channel then */
+ notifierFlags= mouse_nla_channels(&ac, x, channel_index, selectmode);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|notifierFlags, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_channels_click (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Mouse Click on Channels";
+ ot->idname= "NLA_OT_channels_click";
+
+ /* api callbacks */
+ ot->invoke= nlachannels_mouseclick_invoke;
+ ot->poll= ED_operator_nla_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* id-props */
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+}
+
+/* *********************************************** */
+/* Special Operators */
+
+/* ******************** Add Tracks Operator ***************************** */
+/* Add NLA Tracks to the same AnimData block as a selected track, or above the selected tracks */
+
+static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ AnimData *lastAdt = NULL;
+ short above_sel= RNA_boolean_get(op->ptr, "above_selected");
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the AnimData blocks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_SEL);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* add tracks... */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+
+ /* check if just adding a new track above this one,
+ * or whether we're adding a new one to the top of the stack that this one belongs to
+ */
+ if (above_sel) {
+ /* just add a new one above this one */
+ add_nlatrack(adt, nlt);
+ }
+ else if ((lastAdt == NULL) || (adt != lastAdt)) {
+ /* add one track to the top of the owning AnimData's stack, then don't add anymore to this stack */
+ add_nlatrack(adt, NULL);
+ lastAdt= adt;
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_add_tracks (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Track(s)";
+ ot->idname= "NLA_OT_add_tracks";
+ ot->description= "Add NLA-Tracks above/after the selected tracks.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_add_tracks_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one.");
+}
+
+/* ******************** Delete Tracks Operator ***************************** */
+/* Delete selected NLA Tracks */
+
+static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the AnimData blocks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_SEL);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* delete tracks */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+
+ /* call delete on this track - deletes all strips too */
+ free_nlatrack(&adt->nla_tracks, nlt);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_delete_tracks (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Delete Tracks";
+ ot->idname= "NLA_OT_delete_tracks";
+ ot->description= "Delete selected NLA-Tracks and the strips they contain.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_delete_tracks_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
new file mode 100644
index 00000000000..8d56670a149
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -0,0 +1,1028 @@
+/**
+ * $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
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Joshua Leung (major recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <float.h>
+
+#include "DNA_listBase.h"
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_object_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_space_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_key_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
+#include "DNA_world_types.h"
+#include "DNA_vec_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_fcurve.h"
+#include "BKE_nla.h"
+#include "BKE_context.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframes_draw.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_interface_icons.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "ED_markers.h"
+
+#include "nla_intern.h" // own include
+
+/* XXX */
+extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
+extern void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown);
+
+/* *********************************************** */
+/* Strips */
+
+/* Action-Line ---------------------- */
+
+/* get colors for drawing Action-Line
+ * NOTE: color returned includes fine-tuned alpha!
+ */
+static void nla_action_get_color (AnimData *adt, bAction *act, float color[4])
+{
+ // TODO: if tweaking some action, use the same color as for the tweaked track (quick hack done for now)
+ if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
+ // greenish color (same as tweaking strip) - hardcoded for now
+ color[0]= 0.30f;
+ color[1]= 0.95f;
+ color[2]= 0.10f;
+ color[3]= 0.30f;
+ }
+ else {
+ if (act) {
+ // reddish color - hardcoded for now
+ color[0]= 0.8f;
+ color[1]= 0.2f;
+ color[2]= 0.0f;
+ color[3]= 0.4f;
+ }
+ else {
+ // greyish-red color - hardcoded for now
+ color[0]= 0.6f;
+ color[1]= 0.5f;
+ color[2]= 0.5f;
+ color[3]= 0.3f;
+ }
+ }
+}
+
+/* draw the keyframes in the specified Action */
+static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d, float y, float ymin, float ymax)
+{
+ ListBase keys = {NULL, NULL};
+ ActKeyColumn *ak;
+ float xscale, f1, f2;
+ float color[4];
+
+ /* get a list of the keyframes with NLA-scaling applied */
+ action_to_keylist(adt, act, &keys, NULL);
+
+ if ELEM(NULL, act, keys.first)
+ return;
+
+ /* draw a darkened region behind the strips
+ * - get and reset the background color, this time without the alpha to stand out better
+ */
+ nla_action_get_color(adt, act, color);
+ glColor3fv(color);
+ /* - draw a rect from the first to the last frame (no extra overlaps for now)
+ * that is slightly stumpier than the track background (hardcoded 2-units here)
+ */
+ f1= ((ActKeyColumn *)keys.first)->cfra;
+ f2= ((ActKeyColumn *)keys.last)->cfra;
+
+ glRectf(f1, ymin+2, f2, ymax-2);
+
+
+ /* get View2D scaling factor */
+ UI_view2d_getscale(v2d, &xscale, NULL);
+
+ /* for now, color is hardcoded to be black */
+ glColor3f(0.0f, 0.0f, 0.0f);
+
+ /* just draw each keyframe as a simple dot (regardless of the selection status)
+ * - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction
+ */
+ for (ak= keys.first; ak; ak= ak->next)
+ draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, KEYFRAME_SHAPE_FRAME);
+
+ /* free icons */
+ BLI_freelistN(&keys);
+}
+
+/* Strips (Proper) ---------------------- */
+
+/* get colors for drawing NLA-Strips */
+static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float color[3])
+{
+ if (strip->type == NLASTRIP_TYPE_TRANSITION) {
+ /* Transition Clip */
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* selected - use a bright blue color */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.18f;
+ color[1]= 0.46f;
+ color[2]= 0.86f;
+ }
+ else {
+ /* normal, unselected strip - use (hardly noticable) blue tinge */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.11f;
+ color[1]= 0.15f;
+ color[2]= 0.19f;
+ }
+ }
+ else if (strip->type == NLASTRIP_TYPE_META) {
+ /* Meta Clip */
+ // TODO: should temporary metas get different colours too?
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* selected - use a bold purple color */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.41f;
+ color[1]= 0.13f;
+ color[2]= 0.59f;
+ }
+ else {
+ /* normal, unselected strip - use (hardly noticable) dark purple tinge */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.20f;
+ color[1]= 0.15f;
+ color[2]= 0.26f;
+ }
+ }
+ else {
+ /* Action Clip (default/normal type of strip) */
+ if ((strip->flag & NLASTRIP_FLAG_ACTIVE) && (adt && (adt->flag & ADT_NLA_EDIT_ON))) {
+ /* active strip should be drawn green when it is acting as the tweaking strip.
+ * however, this case should be skipped for when not in EditMode...
+ */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.3f;
+ color[1]= 0.95f;
+ color[2]= 0.1f;
+ }
+ else if (strip->flag & NLASTRIP_FLAG_TWEAKUSER) {
+ /* alert user that this strip is also used by the tweaking track (this is set when going into
+ * 'editmode' for that strip), since the edits made here may not be what the user anticipated
+ */
+ // FIXME: hardcoded temp-hack colors
+ color[0]= 0.85f;
+ color[1]= 0.0f;
+ color[2]= 0.0f;
+ }
+ else if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* selected strip - use theme color for selected */
+ UI_GetThemeColor3fv(TH_STRIP_SELECT, color);
+ }
+ else {
+ /* normal, unselected strip - use standard strip theme color */
+ UI_GetThemeColor3fv(TH_STRIP, color);
+ }
+ }
+}
+
+/* helper call for drawing influence/time control curves for a given NLA-strip */
+static void nla_draw_strip_curves (NlaStrip *strip, View2D *v2d, float yminc, float ymaxc)
+{
+ const float yheight = ymaxc - yminc;
+
+ /* drawing color is simply a light-grey */
+ // TODO: is this color suitable?
+ // XXX nasty hacked color for now... which looks quite bad too...
+ glColor3f(0.7f, 0.7f, 0.7f);
+
+ /* draw with AA'd line, 2 units thick (it's either 1 or 2 px) */
+ glEnable(GL_LINE_SMOOTH);
+ glEnable(GL_BLEND);
+ glLineWidth(2.0f);
+
+ /* influence -------------------------- */
+ if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
+ FCurve *fcu= list_find_fcurve(&strip->fcurves, "influence", 0);
+ float cfra;
+
+ /* plot the curve (over the strip's main region) */
+ glBegin(GL_LINE_STRIP);
+ /* sample at 1 frame intervals, and draw
+ * - min y-val is yminc, max is y-maxc, so clamp in those regions
+ */
+ for (cfra= strip->start; cfra <= strip->end; cfra += 1.0f) {
+ float y= evaluate_fcurve(fcu, cfra); // assume this to be in 0-1 range
+ glVertex2f(cfra, ((y*yheight)+yminc));
+ }
+ glEnd(); // GL_LINE_STRIP
+ }
+ else {
+ /* use blend in/out values only if both aren't zero */
+ if ((IS_EQ(strip->blendin, 0.0f) && IS_EQ(strip->blendout, 0.0f))==0) {
+ glBegin(GL_LINE_STRIP);
+ /* start of strip - if no blendin, start straight at 1, otherwise from 0 to 1 over blendin frames */
+ if (IS_EQ(strip->blendin, 0.0f) == 0) {
+ glVertex2f(strip->start, yminc);
+ glVertex2f(strip->start + strip->blendin, ymaxc);
+ }
+ else
+ glVertex2f(strip->start, ymaxc);
+
+ /* end of strip */
+ if (IS_EQ(strip->blendout, 0.0f) == 0) {
+ glVertex2f(strip->end - strip->blendout, ymaxc);
+ glVertex2f(strip->end, yminc);
+ }
+ else
+ glVertex2f(strip->end, ymaxc);
+ glEnd(); // GL_LINE_STRIP
+ }
+ }
+
+ /* time -------------------------- */
+ // XXX do we want to draw this curve? in a different colour too?
+
+ /* turn off AA'd lines */
+ glDisable(GL_LINE_SMOOTH);
+ glDisable(GL_BLEND);
+ glLineWidth(1.0f);
+}
+
+/* main call for drawing a single NLA-strip */
+static void nla_draw_strip (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, View2D *v2d, float yminc, float ymaxc)
+{
+ float color[3];
+
+ /* get color of strip */
+ nla_strip_get_color_inside(adt, strip, color);
+
+ /* draw extrapolation info first (as backdrop) */
+ if (strip->extendmode != NLASTRIP_EXTEND_NOTHING) {
+ /* enable transparency... */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ switch (strip->extendmode) {
+ /* since this does both sides, only do the 'before' side, and leave the rest to the next case */
+ case NLASTRIP_EXTEND_HOLD:
+ /* only need to draw here if there's no strip before since
+ * it only applies in such a situation
+ */
+ if (strip->prev == NULL) {
+ /* set the drawing color to the color of the strip, but with very faint alpha */
+ glColor4f(color[0], color[1], color[2], 0.15f);
+
+ /* draw the rect to the edge of the screen */
+ glBegin(GL_QUADS);
+ glVertex2f(v2d->cur.xmin, yminc);
+ glVertex2f(v2d->cur.xmin, ymaxc);
+ glVertex2f(strip->start, ymaxc);
+ glVertex2f(strip->start, yminc);
+ glEnd();
+ }
+ /* no break needed... */
+
+ /* this only draws after the strip */
+ case NLASTRIP_EXTEND_HOLD_FORWARD:
+ /* only need to try and draw if the next strip doesn't occur immediately after */
+ if ((strip->next == NULL) || (IS_EQ(strip->next->start, strip->end)==0)) {
+ /* set the drawing color to the color of the strip, but this time less faint */
+ glColor4f(color[0], color[1], color[2], 0.3f);
+
+ /* draw the rect to the next strip or the edge of the screen */
+ glBegin(GL_QUADS);
+ glVertex2f(strip->end, yminc);
+ glVertex2f(strip->end, ymaxc);
+
+ if (strip->next) {
+ glVertex2f(strip->next->start, ymaxc);
+ glVertex2f(strip->next->start, yminc);
+ }
+ else {
+ glVertex2f(v2d->cur.xmax, ymaxc);
+ glVertex2f(v2d->cur.xmax, yminc);
+ }
+ glEnd();
+ }
+ break;
+ }
+
+ glDisable(GL_BLEND);
+ }
+
+ /* draw 'inside' of strip itself */
+ glColor3fv(color);
+ uiSetRoundBox(15); /* all corners rounded */
+ gl_round_box_shade(GL_POLYGON, strip->start, yminc, strip->end, ymaxc, 0.0, 0.5, 0.1);
+
+
+ /* draw strip's control 'curves' */
+ nla_draw_strip_curves(strip, v2d, yminc, ymaxc);
+
+ /* draw strip outline
+ * - color used here is to indicate active vs non-active
+ */
+ if (strip->flag & NLASTRIP_FLAG_ACTIVE) {
+ /* strip should appear 'sunken', so draw a light border around it */
+ glColor3f(0.9f, 1.0f, 0.9f); // FIXME: hardcoded temp-hack colors
+ }
+ else {
+ /* strip should appear to stand out, so draw a dark border around it */
+ glColor3f(0.0f, 0.0f, 0.0f);
+ }
+
+ /* - line style: dotted for muted */
+ if (strip->flag & NLASTRIP_FLAG_MUTED)
+ setlinestyle(4);
+
+ /* draw outline */
+ gl_round_box_shade(GL_LINE_LOOP, strip->start, yminc, strip->end, ymaxc, 0.0, 0.0, 0.1);
+
+ /* if action-clip strip, draw lines delimiting repeats too (in the same color as outline) */
+ if ((strip->type == NLASTRIP_TYPE_CLIP) && IS_EQ(strip->repeat, 1.0f)==0) {
+ float repeatLen = (strip->actend - strip->actstart) * strip->scale;
+ int i;
+
+ /* only draw lines for whole-numbered repeats, starting from the first full-repeat
+ * up to the last full repeat (but not if it lies on the end of the strip)
+ */
+ for (i = 1; i < strip->repeat; i++) {
+ float repeatPos = strip->start + (repeatLen * i);
+
+ /* don't draw if line would end up on or after the end of the strip */
+ if (repeatPos < strip->end)
+ fdrawline(repeatPos, yminc, repeatPos, ymaxc);
+ }
+ }
+ /* or if meta-strip, draw lines delimiting extents of sub-strips (in same color as outline, if more than 1 exists) */
+ else if ((strip->type == NLASTRIP_TYPE_META) && (strip->strips.first != strip->strips.last)) {
+ NlaStrip *cs;
+ float y= (ymaxc-yminc)/2.0f + yminc;
+
+ /* only draw first-level of child-strips, but don't draw any lines on the endpoints */
+ for (cs= strip->strips.first; cs; cs= cs->next) {
+ /* draw start-line if not same as end of previous (and only if not the first strip)
+ * - on upper half of strip
+ */
+ if ((cs->prev) && IS_EQ(cs->prev->end, cs->start)==0)
+ fdrawline(cs->start, y, cs->start, ymaxc);
+
+ /* draw end-line if not the last strip
+ * - on lower half of strip
+ */
+ if (cs->next)
+ fdrawline(cs->end, yminc, cs->end, y);
+ }
+ }
+
+ /* reset linestyle */
+ setlinestyle(0);
+}
+
+/* add the relevant text to the cache of text-strings to draw in pixelspace */
+static void nla_draw_strip_text (NlaTrack *nlt, NlaStrip *strip, int index, View2D *v2d, float yminc, float ymaxc)
+{
+ char str[256], dir[3];
+ rctf rect;
+
+ /* 'dir' - direction that strip is played in */
+ if (strip->flag & NLASTRIP_FLAG_REVERSE)
+ sprintf(dir, "<-");
+ else
+ sprintf(dir, "->");
+
+ /* just print the name and the range */
+ if (strip->flag & NLASTRIP_FLAG_TEMP_META)
+ sprintf(str, "Temp-Meta | %.2f %s %.2f", strip->start, dir, strip->end);
+ else
+ sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end);
+
+ /* set text colour - if colours (see above) are light, draw black text, otherwise draw white */
+ if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER))
+ glColor3f(0.0f, 0.0f, 0.0f);
+ else
+ glColor3f(1.0f, 1.0f, 1.0f);
+
+ /* set bounding-box for text
+ * - padding of 2 'units' on either side
+ */
+ // TODO: make this centered?
+ rect.xmin= strip->start + 0.5f;
+ rect.ymin= yminc;
+ rect.xmax= strip->end - 0.5f;
+ rect.ymax= ymaxc;
+
+ /* add this string to the cache of texts to draw*/
+ UI_view2d_text_cache_rectf(v2d, &rect, str);
+}
+
+/* ---------------------- */
+
+void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ View2D *v2d= &ar->v2d;
+ float y= 0.0f;
+ int items, height;
+
+ /* build list of channels to draw */
+ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS);
+ items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* Update max-extent of channels here (taking into account scrollers):
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
+ */
+ height= ((items*NLACHANNEL_STEP) + (NLACHANNEL_HEIGHT*2));
+ /* don't use totrect set, as the width stays the same
+ * (NOTE: this is ok here, the configuration is pretty straightforward)
+ */
+ v2d->tot.ymin= (float)(-height);
+ /* need to do a view-sync here, so that the strips area doesn't jump around */
+ UI_view2d_sync(NULL, ac->sa, v2d, V2D_VIEWSYNC_AREA_VERTICAL);
+
+ /* loop through channels, and set up drawing depending on their type */
+ y= (float)(-NLACHANNEL_HEIGHT);
+
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF);
+ const float ymaxc= (float)(y + NLACHANNEL_HEIGHT_HALF);
+
+ /* check if visible */
+ if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ {
+ /* data to draw depends on the type of channel */
+ switch (ale->type) {
+ case ANIMTYPE_NLATRACK:
+ {
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+ int index;
+
+ /* draw each strip in the track (if visible) */
+ for (strip=nlt->strips.first, index=1; strip; strip=strip->next, index++) {
+ if (BKE_nlastrip_within_bounds(strip, v2d->cur.xmin, v2d->cur.xmax)) {
+ /* draw the visualisation of the strip */
+ nla_draw_strip(adt, nlt, strip, v2d, yminc, ymaxc);
+
+ /* add the text for this strip to the cache */
+ nla_draw_strip_text(nlt, strip, index, v2d, yminc, ymaxc);
+ }
+ }
+ }
+ break;
+
+ case ANIMTYPE_NLAACTION:
+ {
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ float color[4];
+
+ /* just draw a semi-shaded rect spanning the width of the viewable area if there's data,
+ * and a second darker rect within which we draw keyframe indicator dots if there's data
+ */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ /* get colors for drawing */
+ nla_action_get_color(adt, ale->data, color);
+ glColor4fv(color);
+
+ /* draw slightly shifted up for greater separation from standard channels,
+ * but also slightly shorter for some more contrast when viewing the strips
+ */
+ glRectf(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+
+ /* draw keyframes in the action */
+ nla_action_draw_keyframes(adt, ale->data, v2d, y, yminc+NLACHANNEL_SKIP, ymaxc-NLACHANNEL_SKIP);
+
+ /* draw 'embossed' lines above and below the strip for effect */
+ /* white base-lines */
+ glLineWidth(2.0f);
+ glColor4f(1.0f, 1.0f, 1.0f, 0.3);
+ fdrawline(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, yminc+NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, ymaxc-NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+
+ /* black top-lines */
+ glLineWidth(1.0f);
+ glColor3f(0.0f, 0.0f, 0.0f);
+ fdrawline(v2d->cur.xmin, yminc+NLACHANNEL_SKIP, v2d->cur.xmax, yminc+NLACHANNEL_SKIP);
+ fdrawline(v2d->cur.xmin, ymaxc-NLACHANNEL_SKIP, v2d->cur.xmax, ymaxc-NLACHANNEL_SKIP);
+
+ glDisable(GL_BLEND);
+ }
+ break;
+ }
+ }
+
+ /* adjust y-position for next one */
+ y -= NLACHANNEL_STEP;
+ }
+
+ /* free tempolary channels */
+ BLI_freelistN(&anim_data);
+}
+
+/* *********************************************** */
+/* Channel List */
+
+void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ View2D *v2d= &ar->v2d;
+ float x= 0.0f, y= 0.0f;
+ int items, height;
+
+ /* build list of channels to draw */
+ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS);
+ items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* Update max-extent of channels here (taking into account scrollers):
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
+ */
+ height= ((items*NLACHANNEL_STEP) + (NLACHANNEL_HEIGHT*2));
+ /* don't use totrect set, as the width stays the same
+ * (NOTE: this is ok here, the configuration is pretty straightforward)
+ */
+ v2d->tot.ymin= (float)(-height);
+
+ /* loop through channels, and set up drawing depending on their type */
+ y= (float)(-NLACHANNEL_HEIGHT);
+
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF);
+ const float ymaxc= (float)(y + NLACHANNEL_HEIGHT_HALF);
+ const float ydatac= (float)(y - 7);
+
+ /* check if visible */
+ if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ {
+ short indent= 0, offset= 0, sel= 0, group= 0;
+ int expand= -1, protect = -1, special= -1, mute = -1;
+ char name[128];
+
+ /* determine what needs to be drawn */
+ switch (ale->type) {
+ case ANIMTYPE_SCENE: /* scene */
+ {
+ Scene *sce= (Scene *)ale->data;
+
+ group= 4;
+ indent= 0;
+
+ special= ICON_SCENE_DATA;
+
+ /* only show expand if there are any channels */
+ if (EXPANDED_SCEC(sce))
+ expand= ICON_TRIA_DOWN;
+ else
+ expand= ICON_TRIA_RIGHT;
+
+ sel = SEL_SCEC(sce);
+ strcpy(name, sce->id.name+2);
+ }
+ break;
+ case ANIMTYPE_OBJECT: /* object */
+ {
+ Base *base= (Base *)ale->data;
+ Object *ob= base->object;
+
+ group= 4;
+ indent= 0;
+
+ /* icon depends on object-type */
+ if (ob->type == OB_ARMATURE)
+ special= ICON_ARMATURE_DATA;
+ else
+ special= ICON_OBJECT_DATA;
+
+ /* only show expand if there are any channels */
+ if (EXPANDED_OBJC(ob))
+ expand= ICON_TRIA_DOWN;
+ else
+ expand= ICON_TRIA_RIGHT;
+
+ sel = SEL_OBJC(base);
+ strcpy(name, ob->id.name+2);
+ }
+ break;
+ case ANIMTYPE_FILLMATD: /* object materials (dopesheet) expand widget */
+ {
+ Object *ob = (Object *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_MATERIAL_DATA;
+
+ if (FILTER_MAT_OBJC(ob))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, "Materials");
+ }
+ break;
+
+
+ case ANIMTYPE_DSMAT: /* single material (dopesheet) expand widget */
+ {
+ Material *ma = (Material *)ale->data;
+
+ group = 0;
+ indent = 0;
+ special = ICON_MATERIAL_DATA;
+ offset = 21;
+
+ if (FILTER_MAT_OBJD(ma))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, ma->id.name+2);
+ }
+ break;
+ case ANIMTYPE_DSLAM: /* lamp (dopesheet) expand widget */
+ {
+ Lamp *la = (Lamp *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_LAMP_DATA;
+
+ if (FILTER_LAM_OBJD(la))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, la->id.name+2);
+ }
+ break;
+ case ANIMTYPE_DSCAM: /* camera (dopesheet) expand widget */
+ {
+ Camera *ca = (Camera *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_CAMERA_DATA;
+
+ if (FILTER_CAM_OBJD(ca))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, ca->id.name+2);
+ }
+ break;
+ case ANIMTYPE_DSCUR: /* curve (dopesheet) expand widget */
+ {
+ Curve *cu = (Curve *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_CURVE_DATA;
+
+ if (FILTER_CUR_OBJD(cu))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, cu->id.name+2);
+ }
+ break;
+ case ANIMTYPE_DSSKEY: /* shapekeys (dopesheet) expand widget */
+ {
+ Key *key= (Key *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_SHAPEKEY_DATA; // XXX
+
+ if (FILTER_SKE_OBJD(key))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ //sel = SEL_OBJC(base);
+ strcpy(name, "Shape Keys");
+ }
+ break;
+ case ANIMTYPE_DSWOR: /* world (dopesheet) expand widget */
+ {
+ World *wo= (World *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_WORLD_DATA;
+
+ if (FILTER_WOR_SCED(wo))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, wo->id.name+2);
+ }
+ break;
+
+ case ANIMTYPE_NLATRACK: /* NLA Track */
+ {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ indent= 0;
+
+ if (ale->id) {
+ /* special exception for materials */
+ if (GS(ale->id->name) == ID_MA) {
+ offset= 21;
+ indent= 1;
+ }
+ else
+ offset= 14;
+ }
+ else
+ offset= 0;
+
+ /* FIXME: 'solo' as the 'special' button?
+ * - need special icons for these
+ */
+ if (nlt->flag & NLATRACK_SOLO)
+ special= ICON_LAYER_ACTIVE;
+ else
+ special= ICON_LAYER_USED;
+
+ /* if this track is active and we're tweaking it, don't draw these toggles */
+ // TODO: need a special macro for this...
+ if ( ((nlt->flag & NLATRACK_ACTIVE) && (nlt->flag & NLATRACK_DISABLED)) == 0 )
+ {
+ if (nlt->flag & NLATRACK_MUTED)
+ mute = ICON_MUTE_IPO_ON;
+ else
+ mute = ICON_MUTE_IPO_OFF;
+
+ if (EDITABLE_NLT(nlt))
+ protect = ICON_UNLOCKED;
+ else
+ protect = ICON_LOCKED;
+ }
+
+ sel = SEL_NLT(nlt);
+ strcpy(name, nlt->name);
+ }
+ break;
+ case ANIMTYPE_NLAACTION: /* NLA Action-Line */
+ {
+ bAction *act= (bAction *)ale->data;
+
+ group = 5;
+
+ if (ale->id) {
+ /* special exception for materials */
+ if (GS(ale->id->name) == ID_MA) {
+ offset= 21;
+ indent= 1;
+ }
+ else
+ offset= 14;
+ }
+ else
+ offset= 0;
+
+ special = ICON_ACTION;
+
+ if (act)
+ sprintf(name, "ActAction: <%s>", act->id.name+2);
+ else
+ sprintf(name, "<No Action>");
+ }
+ break;
+ }
+
+ /* now, start drawing based on this information */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ /* draw backing strip behind channel name */
+ if (group == 4) {
+ /* only used in dopesheet... */
+ if (ELEM(ale->type, ANIMTYPE_SCENE, ANIMTYPE_OBJECT)) {
+ /* object channel - darker */
+ UI_ThemeColor(TH_DOPESHEET_CHANNELOB);
+ uiSetRoundBox((expand == ICON_TRIA_DOWN)? (8):(1|8));
+ gl_round_box(GL_POLYGON, x+offset, yminc, (float)NLACHANNEL_NAMEWIDTH, ymaxc, 10);
+ }
+ else {
+ /* sub-object folders - lighter */
+ UI_ThemeColor(TH_DOPESHEET_CHANNELSUBOB);
+
+ offset += 7 * indent;
+ glBegin(GL_QUADS);
+ glVertex2f(x+offset, yminc);
+ glVertex2f(x+offset, ymaxc);
+ glVertex2f((float)ACHANNEL_NAMEWIDTH, ymaxc);
+ glVertex2f((float)ACHANNEL_NAMEWIDTH, yminc);
+ glEnd();
+
+ /* clear group value, otherwise we cause errors... */
+ group = 0;
+ }
+ }
+ else if (group == 5) {
+ /* Action Line */
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+
+ // TODO: if tweaking some action, use the same color as for the tweaked track (quick hack done for now)
+ if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
+ // greenish color (same as tweaking strip) - hardcoded for now
+ glColor3f(0.3f, 0.95f, 0.1f);
+ }
+ else {
+ if (ale->data)
+ glColor3f(0.8f, 0.2f, 0.0f); // reddish color - hardcoded for now
+ else
+ glColor3f(0.6f, 0.5f, 0.5f); // greyish-red color - hardcoded for now
+ }
+
+ offset += 7 * indent;
+
+ /* only on top two corners, to show that this channel sits on top of the preceeding ones */
+ uiSetRoundBox((1|2));
+
+ /* draw slightly shifted up vertically to look like it has more separtion from other channels,
+ * but we then need to slightly shorten it so that it doesn't look like it overlaps
+ */
+ gl_round_box(GL_POLYGON, x+offset, yminc+NLACHANNEL_SKIP, (float)NLACHANNEL_NAMEWIDTH, ymaxc+NLACHANNEL_SKIP-1, 8);
+
+ /* clear group value, otherwise we cause errors... */
+ group = 0;
+ }
+ else {
+ /* for normal channels
+ * - use 3 shades of color group/standard color for 3 indention level
+ */
+ UI_ThemeColorShade(TH_HEADER, ((indent==0)?20: (indent==1)?-20: -40));
+
+ indent += group;
+ offset += 7 * indent;
+ glBegin(GL_QUADS);
+ glVertex2f(x+offset, yminc);
+ glVertex2f(x+offset, ymaxc);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH, ymaxc);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH, yminc);
+ glEnd();
+ }
+
+ /* draw expand/collapse triangle */
+ if (expand > 0) {
+ UI_icon_draw(x+offset, ydatac, expand);
+ offset += 17;
+ }
+
+ /* draw special icon indicating certain data-types */
+ if (special > -1) {
+ /* for normal channels */
+ UI_icon_draw(x+offset, ydatac, special);
+ offset += 17;
+ }
+ glDisable(GL_BLEND);
+
+ /* draw name */
+ if (sel)
+ UI_ThemeColor(TH_TEXT_HI);
+ else
+ UI_ThemeColor(TH_TEXT);
+ offset += 3;
+ UI_DrawString(x+offset, y-4, name);
+
+ /* reset offset - for RHS of panel */
+ offset = 0;
+
+ /* set blending again, as text drawing may clear it */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ /* draw protect 'lock' */
+ if (protect > -1) {
+ offset = 16;
+ UI_icon_draw((float)NLACHANNEL_NAMEWIDTH-offset, ydatac, protect);
+ }
+
+ /* draw mute 'eye' */
+ if (mute > -1) {
+ offset += 16;
+ UI_icon_draw((float)(NLACHANNEL_NAMEWIDTH-offset), ydatac, mute);
+ }
+
+ /* draw NLA-action line 'status-icons' - only when there's an action */
+ if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) {
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+
+ offset += 16;
+
+ /* now draw some indicator icons */
+ if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) {
+ /* toggle for tweaking with mapping/no-mapping (i.e. 'in place editing' toggle) */
+ // for now, use pin icon to symbolise this
+ if (adt->flag & ADT_NLA_EDIT_NOMAP)
+ UI_icon_draw((float)(NLACHANNEL_NAMEWIDTH-offset), ydatac, ICON_PINNED);
+ else
+ UI_icon_draw((float)(NLACHANNEL_NAMEWIDTH-offset), ydatac, ICON_UNPINNED);
+
+ fdrawline((float)(NLACHANNEL_NAMEWIDTH-offset), yminc,
+ (float)(NLACHANNEL_NAMEWIDTH-offset), ymaxc);
+ offset += 16;;
+
+ /* 'tweaking action' indicator - not a button */
+ UI_icon_draw((float)NLACHANNEL_NAMEWIDTH-offset, ydatac, ICON_EDIT);
+ }
+ else {
+ /* XXX firstly draw a little rect to help identify that it's different from the toggles */
+ glBegin(GL_LINE_LOOP);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH-offset-1, y-7);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH-offset-1, y+9);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH-1, y+9);
+ glVertex2f((float)NLACHANNEL_NAMEWIDTH-1, y-7);
+ glEnd(); // GL_LINES
+
+ /* 'push down' icon for normal active-actions */
+ UI_icon_draw((float)NLACHANNEL_NAMEWIDTH-offset, ydatac, ICON_FREEZE);
+ }
+ }
+
+ glDisable(GL_BLEND);
+ }
+
+ /* adjust y-position for next one */
+ y -= NLACHANNEL_STEP;
+ }
+
+ /* free tempolary channels */
+ BLI_freelistN(&anim_data);
+}
+
+/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
new file mode 100644
index 00000000000..01871d3d9d5
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -0,0 +1,1499 @@
+/**
+ * $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
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Joshua Leung (major recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_action.h"
+#include "BKE_fcurve.h"
+#include "BKE_nla.h"
+#include "BKE_context.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BKE_report.h"
+#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframes_edit.h"
+#include "ED_markers.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "nla_intern.h" // own include
+#include "nla_private.h" // FIXME... maybe this shouldn't be included?
+
+/* *********************************************** */
+/* 'Special' Editing */
+
+/* ******************** Tweak-Mode Operators ***************************** */
+/* 'Tweak mode' allows the action referenced by the active NLA-strip to be edited
+ * as if it were the normal Active-Action of its AnimData block.
+ */
+
+static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+ int ok=0;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the AnimData blocks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ANIMDATA);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* if no blocks, popup error? */
+ if (anim_data.first == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweakmode for");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* for each AnimData block with NLA-data, try setting it in tweak-mode */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ AnimData *adt= ale->data;
+
+ /* try entering tweakmode if valid */
+ ok += BKE_nla_tweakmode_enter(adt);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* if we managed to enter tweakmode on at least one AnimData block,
+ * set the flag for this in the active scene and send notifiers
+ */
+ if (ac.scene && ok) {
+ /* set editing flag */
+ ac.scene->flag |= SCE_NLA_EDIT_ON;
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No active strip(s) to enter tweakmode on.");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_tweakmode_enter (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Enter Tweak Mode";
+ ot->idname= "NLA_OT_tweakmode_enter";
+ ot->description= "Enter tweaking mode for the action referenced by the active strip.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_enable_tweakmode_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ------------- */
+
+static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the AnimData blocks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ANIMDATA);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* if no blocks, popup error? */
+ if (anim_data.first == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweakmode for");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* for each AnimData block with NLA-data, try exitting tweak-mode */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ AnimData *adt= ale->data;
+
+ /* try entering tweakmode if valid */
+ BKE_nla_tweakmode_exit(adt);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* if we managed to enter tweakmode on at least one AnimData block,
+ * set the flag for this in the active scene and send notifiers
+ */
+ if (ac.scene) {
+ /* clear editing flag */
+ ac.scene->flag &= ~SCE_NLA_EDIT_ON;
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL);
+ }
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_tweakmode_exit (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Exit Tweak Mode";
+ ot->idname= "NLA_OT_tweakmode_exit";
+ ot->description= "Exit tweaking mode for the action referenced by the active strip.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_disable_tweakmode_exec;
+ ot->poll= nlaop_poll_tweakmode_on;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* *********************************************** */
+/* NLA Editing Operations (Constructive/Destructive) */
+
+/* ******************** Add Action-Clip Operator ***************************** */
+/* Add a new Action-Clip strip to the active track (or the active block if no space in the track) */
+
+/* pop up menu allowing user to choose the action to use */
+static int nlaedit_add_actionclip_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ Main *m= CTX_data_main(C);
+ bAction *act;
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, "Add Action Clip", 0);
+ layout= uiPupMenuLayout(pup);
+
+ /* loop through Actions in Main database, adding as items in the menu */
+ for (act= m->action.first; act; act= act->id.next)
+ uiItemStringO(layout, act->id.name+2, 0, "NLA_OT_add_actionclip", "action", act->id.name);
+ uiItemS(layout);
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+/* add the specified action as new strip */
+static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+ Scene *scene;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter, items;
+
+ bAction *act = NULL;
+ char actname[22];
+ float cfra;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ scene= ac.scene;
+ cfra= (float)CFRA;
+
+ /* get action to use */
+ RNA_string_get(op->ptr, "action", actname);
+ act= (bAction *)find_id("AC", actname+2);
+
+ if (act == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "No valid Action to add.");
+ //printf("Add strip - actname = '%s' \n", actname);
+ return OPERATOR_CANCELLED;
+ }
+
+ /* get a list of the editable tracks being shown in the NLA
+ * - this is limited to active ones for now, but could be expanded to
+ */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ if (items == 0) {
+ BKE_report(op->reports, RPT_ERROR, "No active track(s) to add strip to.");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* for every active track, try to add strip to free space in track or to the top of the stack if no space */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaStrip *strip= NULL;
+
+ /* create a new strip, and offset it to start on the current frame */
+ strip= add_nlastrip(act);
+
+ strip->end += (cfra - strip->start);
+ strip->start = cfra;
+
+ /* firstly try adding strip to our current track, but if that fails, add to a new track */
+ if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
+ /* trying to add to the current failed (no space),
+ * so add a new track to the stack, and add to that...
+ */
+ nlt= add_nlatrack(adt, NULL);
+ BKE_nlatrack_add_strip(nlt, strip);
+ }
+
+ /* auto-name it */
+ BKE_nlastrip_validate_name(adt, strip);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_add_actionclip (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Action Strip";
+ ot->idname= "NLA_OT_add_actionclip";
+ ot->description= "Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track.";
+
+ /* api callbacks */
+ ot->invoke= nlaedit_add_actionclip_invoke;
+ ot->exec= nlaedit_add_actionclip_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* props */
+ // TODO: this would be nicer as an ID-pointer...
+ RNA_def_string(ot->srna, "action", "", 21, "Action", "Name of Action to add as a new Action-Clip Strip.");
+}
+
+/* ******************** Add Transition Operator ***************************** */
+/* Add a new transition strip between selected strips */
+
+static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ int done = 0;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each track, find pairs of strips to add transitions to */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaStrip *s1, *s2;
+
+ /* get initial pair of strips */
+ if ELEM(nlt->strips.first, NULL, nlt->strips.last)
+ continue;
+ s1= nlt->strips.first;
+ s2= s1->next;
+
+ /* loop over strips */
+ for (; s1 && s2; s1=s2, s2=s2->next) {
+ NlaStrip *strip;
+
+ /* check if both are selected */
+ if ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT))
+ continue;
+ /* check if there's space between the two */
+ if (IS_EQ(s1->end, s2->start))
+ continue;
+ /* make neither one is a transition
+ * - although this is impossible to create with the standard tools,
+ * the user may have altered the settings
+ */
+ if (ELEM(NLASTRIP_TYPE_TRANSITION, s1->type, s2->type))
+ continue;
+
+ /* allocate new strip */
+ strip= MEM_callocN(sizeof(NlaStrip), "NlaStrip");
+ BLI_insertlinkafter(&nlt->strips, s1, strip);
+
+ /* set the type */
+ strip->type= NLASTRIP_TYPE_TRANSITION;
+
+ /* generic settings
+ * - selected flag to highlight this to the user
+ * - auto-blends to ensure that blend in/out values are automatically
+ * determined by overlaps of strips
+ */
+ strip->flag = NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_AUTO_BLENDS;
+
+ /* range is simply defined as the endpoints of the adjacent strips */
+ strip->start = s1->end;
+ strip->end = s2->start;
+
+ /* scale and repeat aren't of any use, but shouldn't ever be 0 */
+ strip->scale= 1.0f;
+ strip->repeat = 1.0f;
+
+ /* auto-name it */
+ BKE_nlastrip_validate_name(adt, strip);
+
+ /* make note of this */
+ done++;
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* was anything added? */
+ if (done) {
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Needs at least a pair of adjacent selected strips with a gap between them.");
+ return OPERATOR_CANCELLED;
+ }
+}
+
+void NLA_OT_add_transition (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Transition";
+ ot->idname= "NLA_OT_add_transition";
+ ot->description= "Add a transition strip between two adjacent selected strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_add_transition_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Add Meta-Strip Operator ***************************** */
+/* Add new meta-strips incorporating the selected strips */
+
+/* add the specified action as new strip */
+static int nlaedit_add_meta_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each track, find pairs of strips to add transitions to */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaStrip *strip;
+
+ /* create meta-strips from the continuous chains of selected strips */
+ BKE_nlastrips_make_metas(&nlt->strips, 0);
+
+ /* name the metas */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ /* auto-name this strip if selected (that means it is a meta) */
+ if (strip->flag & NLASTRIP_FLAG_SELECT)
+ BKE_nlastrip_validate_name(adt, strip);
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_add_meta (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Meta-Strips";
+ ot->idname= "NLA_OT_add_meta";
+ ot->description= "Add new meta-strips incorporating the selected strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_add_meta_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Remove Meta-Strip Operator ***************************** */
+/* Separate out the strips held by the selected meta-strips */
+
+static int nlaedit_remove_meta_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each track, find pairs of strips to add transitions to */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ /* clear all selected meta-strips, regardless of whether they are temporary or not */
+ BKE_nlastrips_clear_metas(&nlt->strips, 1, 0);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_remove_meta (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Meta-Strips";
+ ot->idname= "NLA_OT_remove_meta";
+ ot->description= "Separate out the strips held by the selected meta-strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_remove_meta_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Duplicate Strips Operator ************************** */
+/* Duplicates the selected NLA-Strips, putting them on new tracks above the one
+ * the originals were housed in.
+ */
+
+static int nlaedit_duplicate_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ short done = 0;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* duplicate strips in tracks starting from the last one so that we're
+ * less likely to duplicate strips we just duplicated...
+ */
+ for (ale= anim_data.last; ale; ale= ale->prev) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaStrip *strip, *nstrip, *next;
+ NlaTrack *track;
+
+ for (strip= nlt->strips.first; strip; strip= next) {
+ next= strip->next;
+
+ /* if selected, split the strip at its midpoint */
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* make a copy (assume that this is possible) */
+ nstrip= copy_nlastrip(strip);
+
+ /* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */
+ if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) {
+ /* need to add a new track above the one above the current one
+ * - if the current one is the last one, nlt->next will be NULL, which defaults to adding
+ * at the top of the stack anyway...
+ */
+ track= add_nlatrack(adt, nlt->next);
+ BKE_nlatrack_add_strip(track, nstrip);
+ }
+
+ /* deselect the original and the active flag */
+ strip->flag &= ~(NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_ACTIVE);
+
+ /* auto-name it */
+ BKE_nlastrip_validate_name(adt, strip);
+
+ done++;
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ if (done) {
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+ }
+ else
+ return OPERATOR_CANCELLED;
+}
+
+static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ nlaedit_duplicate_exec(C, op);
+
+ RNA_int_set(op->ptr, "mode", TFM_TIME_TRANSLATE); // XXX
+ WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_duplicate (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Duplicate Strips";
+ ot->idname= "NLA_OT_duplicate";
+ ot->description= "Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals.";
+
+ /* api callbacks */
+ ot->invoke= nlaedit_duplicate_invoke;
+ ot->exec= nlaedit_duplicate_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* to give to transform */
+ RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+}
+
+/* ******************** Delete Strips Operator ***************************** */
+/* Deletes the selected NLA-Strips */
+
+static int nlaedit_delete_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each NLA-Track, delete all selected strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip, *nstrip;
+
+ for (strip= nlt->strips.first; strip; strip= nstrip) {
+ nstrip= strip->next;
+
+ /* if selected, delete */
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* if a strip either side of this was a transition, delete those too */
+ if ((strip->prev) && (strip->prev->type == NLASTRIP_TYPE_TRANSITION))
+ free_nlastrip(&nlt->strips, strip->prev);
+ if ((nstrip) && (nstrip->type == NLASTRIP_TYPE_TRANSITION)) {
+ nstrip= nstrip->next;
+ free_nlastrip(&nlt->strips, strip->next);
+ }
+
+ /* finally, delete this strip */
+ free_nlastrip(&nlt->strips, strip);
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_delete (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Delete Strips";
+ ot->idname= "NLA_OT_delete";
+ ot->description= "Delete selected strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_delete_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Split Strips Operator ***************************** */
+/* Splits the selected NLA-Strips into two strips at the midpoint of the strip */
+// TODO's?
+// - multiple splits
+// - variable-length splits?
+
+/* split a given Action-Clip strip */
+static void nlaedit_split_strip_actclip (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, float cfra)
+{
+ NlaStrip *nstrip;
+ float splitframe, splitaframe;
+
+ /* calculate the frames to do the splitting at
+ * - use current frame if within extents of strip
+ */
+ if ((cfra > strip->start) && (cfra < strip->end)) {
+ /* use the current frame */
+ splitframe= cfra;
+ splitaframe= nlastrip_get_frame(strip, cfra, NLATIME_CONVERT_UNMAP);
+ }
+ else {
+ /* split in the middle */
+ float len;
+
+ /* strip extents */
+ len= strip->end - strip->start;
+ if (IS_EQ(len, 0.0f))
+ return;
+ else
+ splitframe= strip->start + (len / 2.0f);
+
+ /* action range */
+ len= strip->actend - strip->actstart;
+ if (IS_EQ(len, 0.0f))
+ splitaframe= strip->actend;
+ else
+ splitaframe= strip->actstart + (len / 2.0f);
+ }
+
+ /* make a copy (assume that this is possible) and append
+ * it immediately after the current strip
+ */
+ nstrip= copy_nlastrip(strip);
+ BLI_insertlinkafter(&nlt->strips, strip, nstrip);
+
+ /* set the endpoint of the first strip and the start of the new strip
+ * to the splitframe values calculated above
+ */
+ strip->end= splitframe;
+ nstrip->start= splitframe;
+
+ if ((splitaframe > strip->actstart) && (splitaframe < strip->actend)) {
+ /* only do this if we're splitting down the middle... */
+ strip->actend= splitaframe;
+ nstrip->actstart= splitaframe;
+ }
+
+ /* clear the active flag from the copy */
+ nstrip->flag &= ~NLASTRIP_FLAG_ACTIVE;
+
+ /* auto-name the new strip */
+ BKE_nlastrip_validate_name(adt, nstrip);
+}
+
+/* split a given Meta strip */
+static void nlaedit_split_strip_meta (AnimData *adt, NlaTrack *nlt, NlaStrip *strip)
+{
+ /* simply ungroup it for now... */
+ BKE_nlastrips_clear_metastrip(&nlt->strips, strip);
+}
+
+/* ----- */
+
+static int nlaedit_split_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each NLA-Track, split all selected strips into two strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaStrip *strip, *next;
+
+ for (strip= nlt->strips.first; strip; strip= next) {
+ next= strip->next;
+
+ /* if selected, split the strip at its midpoint */
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* splitting method depends on the type of strip */
+ switch (strip->type) {
+ case NLASTRIP_TYPE_CLIP: /* action-clip */
+ nlaedit_split_strip_actclip(adt, nlt, strip, (float)ac.scene->r.cfra);
+ break;
+
+ case NLASTRIP_TYPE_META: /* meta-strips need special handling */
+ nlaedit_split_strip_meta(adt, nlt, strip);
+ break;
+
+ default: /* for things like Transitions, do not split! */
+ break;
+ }
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_split (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Split Strips";
+ ot->idname= "NLA_OT_split";
+ ot->description= "Split selected strips at their midpoints.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_split_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* *********************************************** */
+/* NLA Editing Operations (Modifying) */
+
+/* ******************** Toggle Muting Operator ************************** */
+/* Toggles whether strips are muted or not */
+
+static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* go over all selected strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* for every selected strip, toggle muting */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* just flip the mute flag for now */
+ // TODO: have a pre-pass to check if mute all or unmute all?
+ strip->flag ^= NLASTRIP_FLAG_MUTED;
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_mute_toggle (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Toggle Muting";
+ ot->idname= "NLA_OT_mute_toggle";
+ ot->description= "Mute or un-muted selected strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_toggle_mute_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Move Strips Up Operator ************************** */
+/* Tries to move the selected strips into the track above if possible. */
+
+static int nlaedit_move_up_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* since we're potentially moving strips from lower tracks to higher tracks, we should
+ * loop over the tracks in reverse order to avoid moving earlier strips up multiple tracks
+ */
+ for (ale= anim_data.last; ale; ale= ale->prev) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nltn= nlt->next;
+ NlaStrip *strip, *stripn;
+
+ /* if this track has no tracks after it, skip for now... */
+ if (nltn == NULL)
+ continue;
+
+ /* for every selected strip, try to move */
+ for (strip= nlt->strips.first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* check if the track above has room for this strip */
+ if (BKE_nlatrack_has_space(nltn, strip->start, strip->end)) {
+ /* remove from its current track, and add to the one above (it 'should' work, so no need to worry) */
+ BLI_remlink(&nlt->strips, strip);
+ BKE_nlatrack_add_strip(nltn, strip);
+ }
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_move_up (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Move Strips Up";
+ ot->idname= "NLA_OT_move_up";
+ ot->description= "Move selected strips up a track if there's room.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_move_up_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Move Strips Down Operator ************************** */
+/* Tries to move the selected strips into the track above if possible. */
+
+static int nlaedit_move_down_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* loop through the tracks in normal order, since we're pushing strips down,
+ * strips won't get operated on twice
+ */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaTrack *nltp= nlt->prev;
+ NlaStrip *strip, *stripn;
+
+ /* if this track has no tracks before it, skip for now... */
+ if (nltp == NULL)
+ continue;
+
+ /* for every selected strip, try to move */
+ for (strip= nlt->strips.first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* check if the track below has room for this strip */
+ if (BKE_nlatrack_has_space(nltp, strip->start, strip->end)) {
+ /* remove from its current track, and add to the one above (it 'should' work, so no need to worry) */
+ BLI_remlink(&nlt->strips, strip);
+ BKE_nlatrack_add_strip(nltp, strip);
+ }
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_move_down (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Move Strips Down";
+ ot->idname= "NLA_OT_move_down";
+ ot->description= "Move selected strips down a track if there's room.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_move_down_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Apply Scale Operator ***************************** */
+/* Reset the scaling of the selected strips to 1.0f */
+
+/* apply scaling to keyframe */
+static short bezt_apply_nlamapping (BeztEditData *bed, BezTriple *bezt)
+{
+ /* NLA-strip which has this scaling is stored in bed->data */
+ NlaStrip *strip= (NlaStrip *)bed->data;
+
+ /* adjust all the times */
+ bezt->vec[0][0]= nlastrip_get_frame(strip, bezt->vec[0][0], NLATIME_CONVERT_MAP);
+ bezt->vec[1][0]= nlastrip_get_frame(strip, bezt->vec[1][0], NLATIME_CONVERT_MAP);
+ bezt->vec[2][0]= nlastrip_get_frame(strip, bezt->vec[2][0], NLATIME_CONVERT_MAP);
+
+ /* nothing to return or else we exit */
+ return 0;
+}
+
+static int nlaedit_apply_scale_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ BeztEditData bed;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* init the editing data */
+ memset(&bed, 0, sizeof(BeztEditData));
+
+ /* for each NLA-Track, apply scale of all selected strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ /* strip must be selected, and must be action-clip only (transitions don't have scale) */
+ if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
+ /* if the referenced action is used by other strips, make this strip use its own copy */
+ if (strip->act == NULL)
+ continue;
+ if (strip->act->id.us > 1) {
+ /* make a copy of the Action to work on */
+ bAction *act= copy_action(strip->act);
+
+ /* set this as the new referenced action, decrementing the users of the old one */
+ strip->act->id.us--;
+ strip->act= act;
+ }
+
+ /* setup iterator, and iterate over all the keyframes in the action, applying this scaling */
+ bed.data= strip;
+ ANIM_animchanneldata_keys_bezier_loop(&bed, strip->act, ALE_ACT, NULL, bezt_apply_nlamapping, calchandles_fcurve, 0);
+
+ /* clear scale of strip now that it has been applied,
+ * and recalculate the extents of the action now that it has been scaled
+ * but leave everything else alone
+ */
+ strip->scale= 1.0f;
+ calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_apply_scale (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Apply Scale";
+ ot->idname= "NLA_OT_apply_scale";
+ ot->description= "Apply scaling of selected strips to their referenced Actions.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_apply_scale_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Clear Scale Operator ***************************** */
+/* Reset the scaling of the selected strips to 1.0f */
+
+static int nlaedit_clear_scale_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each NLA-Track, reset scale of all selected strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ /* strip must be selected, and must be action-clip only (transitions don't have scale) */
+ if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
+ PointerRNA strip_ptr;
+
+ RNA_pointer_create(NULL, &RNA_NlaStrip, strip, &strip_ptr);
+ RNA_float_set(&strip_ptr, "scale", 1.0f);
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_clear_scale (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Clear Scale";
+ ot->idname= "NLA_OT_clear_scale";
+ ot->description= "Reset scaling of selected strips.";
+
+ /* api callbacks */
+ ot->exec= nlaedit_clear_scale_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+/* ******************** Snap Strips Operator ************************** */
+/* Moves the start-point of the selected strips to the specified places */
+
+/* defines for snap keyframes tool */
+EnumPropertyItem prop_nlaedit_snap_types[] = {
+ {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current frame", ""},
+ {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
+ {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
+ {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int nlaedit_snap_exec (bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ Scene *scene;
+ int mode = RNA_enum_get(op->ptr, "type");
+ float secf;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* get some necessary vars */
+ scene= ac.scene;
+ secf= (float)FPS;
+
+ /* since we may add tracks, perform this in reverse order */
+ for (ale= anim_data.last; ale; ale= ale->prev) {
+ ListBase tmp_strips = {NULL, NULL};
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip, *stripn;
+ NlaTrack *track;
+
+ /* create meta-strips from the continuous chains of selected strips */
+ BKE_nlastrips_make_metas(&nlt->strips, 1);
+
+ /* apply the snapping to all the temp meta-strips, then put them in a separate list to be added
+ * back to the original only if they still fit
+ */
+ for (strip= nlt->strips.first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ if (strip->flag & NLASTRIP_FLAG_TEMP_META) {
+ float start, end;
+
+ /* get the existing end-points */
+ start= strip->start;
+ end= strip->end;
+
+ /* calculate new start position based on snapping mode */
+ switch (mode) {
+ case NLAEDIT_SNAP_CFRA: /* to current frame */
+ strip->start= (float)CFRA;
+ break;
+ case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */
+ strip->start= (float)(floor(start+0.5));
+ break;
+ case NLAEDIT_SNAP_NEAREST_SECOND: /* to nearest second */
+ strip->start= ((float)floor(start/secf + 0.5f) * secf);
+ break;
+ case NLAEDIT_SNAP_NEAREST_MARKER: /* to nearest marker */
+ strip->start= (float)ED_markers_find_nearest_marker_time(ac.markers, start);
+ break;
+ default: /* just in case... no snapping */
+ strip->start= start;
+ break;
+ }
+
+ /* get new endpoint based on start-point (and old length) */
+ strip->end= strip->start + (end - start);
+
+ /* apply transforms to meta-strip to its children */
+ BKE_nlameta_flush_transforms(strip);
+
+ /* remove strip from track, and add to the temp buffer */
+ BLI_remlink(&nlt->strips, strip);
+ BLI_addtail(&tmp_strips, strip);
+ }
+ }
+
+ /* try adding each meta-strip back to the track one at a time, to make sure they'll fit */
+ for (strip= tmp_strips.first; strip; strip= stripn) {
+ stripn= strip->next;
+
+ /* remove from temp-strips list */
+ BLI_remlink(&tmp_strips, strip);
+
+ /* in case there's no space in the current track, try adding */
+ if (BKE_nlatrack_add_strip(nlt, strip) == 0) {
+ /* need to add a new track above the current one */
+ track= add_nlatrack(adt, nlt);
+ BKE_nlatrack_add_strip(track, strip);
+
+ /* clear temp meta-strips on this new track, as we may not be able to get back to it */
+ BKE_nlastrips_clear_metas(&track->strips, 0, 1);
+ }
+ }
+
+ /* remove the meta-strips now that we're done */
+ BKE_nlastrips_clear_metas(&nlt->strips, 0, 1);
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_snap (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Snap Strips";
+ ot->idname= "NLA_OT_snap";
+ ot->description= "Move start of strips to specified time.";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= nlaedit_snap_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "type", prop_nlaedit_snap_types, 0, "Type", "");
+}
+
+/* *********************************************** */
+/* NLA Modifiers */
+
+/* ******************** Add F-Modifier Operator *********************** */
+
+/* present a special customised popup menu for this, with some filtering */
+static int nla_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *event)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+ int i;
+
+ pup= uiPupMenuBegin(C, "Add F-Modifier", 0);
+ layout= uiPupMenuLayout(pup);
+
+ /* start from 1 to skip the 'Invalid' modifier type */
+ for (i = 1; i < FMODIFIER_NUM_TYPES; i++) {
+ FModifierTypeInfo *fmi= get_fmodifier_typeinfo(i);
+
+ /* check if modifier is valid for this context */
+ if (fmi == NULL)
+ continue;
+ if (i == FMODIFIER_TYPE_CYCLES) /* we already have repeat... */
+ continue;
+
+ /* add entry to add this type of modifier */
+ uiItemEnumO(layout, fmi->name, 0, "NLA_OT_fmodifier_add", "type", i);
+ }
+ uiItemS(layout);
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ FModifier *fcm;
+ int type= RNA_enum_get(op->ptr, "type");
+ short onlyActive = RNA_boolean_get(op->ptr, "only_active");
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get a list of the editable tracks being shown in the NLA */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* for each NLA-Track, add the specified modifier to all selected strips */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+ int i = 1;
+
+ for (strip= nlt->strips.first; strip; strip=strip->next, i++) {
+ /* only add F-Modifier if on active strip? */
+ if ((onlyActive) && (strip->flag & NLASTRIP_FLAG_ACTIVE)==0)
+ continue;
+
+ /* add F-Modifier of specified type to selected, and make it the active one */
+ fcm= add_fmodifier(&strip->modifiers, type);
+
+ if (fcm)
+ set_active_fmodifier(&strip->modifiers, fcm);
+ else {
+ char errormsg[128];
+ sprintf(errormsg, "Modifier couldn't be added to (%s : %d). See console for details.", nlt->name, i);
+
+ BKE_report(op->reports, RPT_ERROR, errormsg);
+ }
+ }
+ }
+
+ /* free temp data */
+ BLI_freelistN(&anim_data);
+
+ /* set notifier that things have changed */
+ // FIXME: this doesn't really do it justice...
+ WM_event_add_notifier(C, NC_ANIMATION, NULL);
+
+ /* done */
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_fmodifier_add (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add F-Modifier";
+ ot->idname= "NLA_OT_fmodifier_add";
+
+ /* api callbacks */
+ ot->invoke= nla_fmodifier_add_invoke;
+ ot->exec= nla_fmodifier_add_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* id-props */
+ RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
+ RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add F-Modifier of the specified type to the active strip.");
+}
+
+/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index 0f6b77da6f5..e997a096bce 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -29,6 +29,10 @@
#include <string.h>
#include <stdio.h>
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -37,19 +41,29 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+#include "BKE_animsys.h"
+#include "BKE_nla.h"
#include "BKE_context.h"
+#include "BKE_report.h"
#include "BKE_screen.h"
-
-#include "ED_screen.h"
#include "ED_types.h"
#include "ED_util.h"
-#include "WM_api.h"
-#include "WM_types.h"
+#include "ED_anim_api.h"
+#include "ED_markers.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
#include "BIF_gl.h"
-#include "BIF_glutil.h"
+
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -57,49 +71,147 @@
#include "nla_intern.h"
+/* button events */
+enum {
+ B_REDR = 0,
+} eActHeader_ButEvents;
/* ************************ header area region *********************** */
-static void do_viewmenu(bContext *C, void *arg, int event)
+
+static void nla_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
+ PointerRNA spaceptr;
+
+ /* retrieve state */
+ RNA_pointer_create(&sc->id, &RNA_SpaceNLA, snla, &spaceptr);
+
+ /* create menu */
+ uiItemO(layout, NULL, ICON_MENU_PANEL, "NLA_OT_properties");
+
+ uiItemS(layout);
+
+ 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");
+
+ uiItemS(layout);
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_set");
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_clear");
+
+ uiItemS(layout);
+
+ //uiItemO(layout, NULL, 0, "NLA_OT_view_all");
+
+ if (sa->full)
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
+ else
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow
}
-static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void nla_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemO(layout, NULL, 0, "NLA_OT_select_all_toggle");
+ uiItemBooleanO(layout, "Invert All", 0, "NLA_OT_select_all_toggle", "invert", 1);
- block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_viewmenu, NULL);
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ uiItemO(layout, NULL, 0, "NLA_OT_select_border");
+ uiItemBooleanO(layout, "Border Axis Range", 0, "NLA_OT_select_border", "axis_range", 1);
+}
+
+static void nla_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ // XXX these operators may change for NLA...
+ uiItemEnumO(layout, "Grab/Move", 0, "TFM_OT_transform", "mode", TFM_TRANSLATION);
+ uiItemEnumO(layout, "Extend", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND);
+ uiItemEnumO(layout, "Scale", 0, "TFM_OT_transform", "mode", TFM_TIME_SCALE);
+}
+
+static void nla_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, NULL, 0, "NLA_OT_snap", "type", NLAEDIT_SNAP_CFRA);
+ uiItemEnumO(layout, NULL, 0, "NLA_OT_snap", "type", NLAEDIT_SNAP_NEAREST_FRAME);
+ uiItemEnumO(layout, NULL, 0, "NLA_OT_snap", "type", NLAEDIT_SNAP_NEAREST_SECOND);
+ uiItemEnumO(layout, NULL, 0, "NLA_OT_snap", "type", NLAEDIT_SNAP_NEAREST_MARKER);
+}
+
+static void nla_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Scene *scene= CTX_data_scene(C);
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemMenuF(layout, "Transform", 0, nla_edit_transformmenu);
+ uiItemMenuF(layout, "Snap", 0, nla_edit_snapmenu);
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_duplicate");
+ uiItemO(layout, NULL, 0, "NLA_OT_split");
+ uiItemO(layout, NULL, 0, "NLA_OT_delete");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_mute_toggle");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_apply_scale");
+ uiItemO(layout, NULL, 0, "NLA_OT_clear_scale");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_move_up");
+ uiItemO(layout, NULL, 0, "NLA_OT_move_down");
+
+ uiItemS(layout);
+
+ // TODO: names of these tools for 'tweakmode' need changing?
+ if (scene->flag & SCE_NLA_EDIT_ON)
+ uiItemO(layout, "Stop Tweaking Strip Actions", 0, "NLA_OT_tweakmode_exit");
+ else
+ uiItemO(layout, "Start Tweaking Strip Actions", 0, "NLA_OT_tweakmode_enter");
+}
+
+static void nla_addmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "NLA_OT_add_actionclip");
+ uiItemO(layout, NULL, 0, "NLA_OT_add_transition");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_add_meta");
+ uiItemO(layout, NULL, 0, "NLA_OT_remove_meta");
- return block;
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "NLA_OT_add_tracks");
+ uiItemBooleanO(layout, "Add Tracks Above Selected", 0, "NLA_OT_add_tracks", "above_selected", 1);
}
+/* ------------------ */
+
static void do_nla_buttons(bContext *C, void *arg, int event)
{
- switch(event) {
+ switch (event) {
+ case B_REDR:
+ ED_area_tag_redraw(CTX_wm_area(C));
+ break;
}
}
void nla_header_buttons(const bContext *C, ARegion *ar)
{
+ SpaceNla *snla= (SpaceNla *)CTX_wm_space_data(C);
ScrArea *sa= CTX_wm_area(C);
uiBlock *block;
int xco, yco= 3;
@@ -109,17 +221,68 @@ void nla_header_buttons(const bContext *C, ARegion *ar)
xco= ED_area_header_standardbuttons(C, block, yco);
- if((sa->flag & HEADER_NO_PULLDOWN)==0) {
+ if ((sa->flag & HEADER_NO_PULLDOWN)==0) {
int xmax;
xmax= GetButStringLength("View");
- uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C),
- "View", xco, yco-2, xmax-3, 24, "");
- xco+=XIC+xmax;
+ uiDefMenuBut(block, nla_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Select");
+ uiDefMenuBut(block, nla_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Edit");
+ uiDefMenuBut(block, nla_editmenu, NULL, "Edit", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Add");
+ uiDefMenuBut(block, nla_addmenu, NULL, "Add", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
}
uiBlockSetEmboss(block, UI_EMBOSS);
-
+
+ /* filtering buttons */
+ if (snla->ads) {
+ uiBlockBeginAlign(block);
+ uiDefIconButBitI(block, TOG, ADS_FILTER_ONLYSEL, B_REDR, ICON_RESTRICT_SELECT_OFF, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Only display selected Objects");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NLA_NOACT, B_REDR, ICON_ACTION, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Include AnimData blocks with no NLA Data");
+ uiBlockEndAlign(block);
+ xco += 5;
+
+ uiBlockBeginAlign(block);
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Scene Animation");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display World Animation");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Materials");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+ uiBlockEndAlign(block);
+ xco += 15;
+ }
+ else {
+ // XXX this case shouldn't happen at all... for now, just pad out same amount of space
+ xco += 7*XIC + 15;
+ }
+ xco += (XIC + 8);
+
+ /* auto-snap selector */
+ if (snla->flag & SNLA_DRAWTIME) {
+ uiDefButS(block, MENU, B_REDR,
+ "Auto-Snap Keyframes %t|No Time-Snap %x0|Nearest Second %x2|Nearest Marker %x3",
+ xco,yco,90,YIC, &snla->autosnap, 0, 1, 0, 0,
+ "Auto-snapping mode for times when transforming");
+ }
+ else {
+ uiDefButS(block, MENU, B_REDR,
+ "Auto-Snap Keyframes %t|No Time-Snap %x0|Nearest Frame %x2|Nearest Marker %x3",
+ xco,yco,90,YIC, &snla->autosnap, 0, 1, 0, 0,
+ "Auto-snapping mode for times when transforming");
+ }
+ xco += 98;
+
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index c544bd9a408..7cc09707ba7 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -17,11 +17,11 @@
* 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.
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung.
* All rights reserved.
*
*
- * Contributor(s): Blender Foundation
+ * Contributor(s): Blender Foundation, Joshua Leung
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -30,10 +30,107 @@
/* internal exports only */
+/* **************************************** */
+/* Macros, etc. only used by NLA */
+/* **************************************** */
+/* space_nla.c / nla_buttons.c */
+
+ARegion *nla_has_buttons_region(ScrArea *sa);
+
+void nla_buttons_register(ARegionType *art);
+void NLA_OT_properties(wmOperatorType *ot);
+
+/* **************************************** */
+/* nla_draw.c */
+
+void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar);
+void draw_nla_channel_list(bAnimContext *ac, SpaceNla *snla, ARegion *ar);
+
+/* **************************************** */
/* nla_header.c */
+
void nla_header_buttons(const bContext *C, ARegion *ar);
+/* **************************************** */
+/* nla_select.c */
+
+/* defines for left-right select tool */
+enum {
+ NLAEDIT_LRSEL_TEST = -1,
+ NLAEDIT_LRSEL_NONE,
+ NLAEDIT_LRSEL_LEFT,
+ NLAEDIT_LRSEL_RIGHT,
+} eNlaEdit_LeftRightSelect_Mode;
+
+/* --- */
+
+void NLA_OT_select_all_toggle(wmOperatorType *ot);
+void NLA_OT_select_border(wmOperatorType *ot);
+void NLA_OT_click_select(wmOperatorType *ot);
+
+/* **************************************** */
+/* nla_edit.c */
+
+/* defines for snap strips
+ */
+enum {
+ NLAEDIT_SNAP_CFRA = 1,
+ NLAEDIT_SNAP_NEAREST_FRAME,
+ NLAEDIT_SNAP_NEAREST_SECOND,
+ NLAEDIT_SNAP_NEAREST_MARKER,
+} eNlaEdit_Snap_Mode;
+
+/* --- */
+
+void NLA_OT_tweakmode_enter(wmOperatorType *ot);
+void NLA_OT_tweakmode_exit(wmOperatorType *ot);
+
+/* --- */
+
+void NLA_OT_add_actionclip(wmOperatorType *ot);
+void NLA_OT_add_transition(wmOperatorType *ot);
+
+void NLA_OT_add_meta(wmOperatorType *ot);
+void NLA_OT_remove_meta(wmOperatorType *ot);
+
+void NLA_OT_duplicate(wmOperatorType *ot);
+void NLA_OT_delete(wmOperatorType *ot);
+void NLA_OT_split(wmOperatorType *ot);
+
+void NLA_OT_mute_toggle(wmOperatorType *ot);
+
+void NLA_OT_move_up(wmOperatorType *ot);
+void NLA_OT_move_down(wmOperatorType *ot);
+
+void NLA_OT_apply_scale(wmOperatorType *ot);
+void NLA_OT_clear_scale(wmOperatorType *ot);
+
+void NLA_OT_snap(wmOperatorType *ot);
+
+void NLA_OT_fmodifier_add(wmOperatorType *ot);
+
+
+/* **************************************** */
+/* nla_channels.c */
+
+void NLA_OT_channels_click(wmOperatorType *ot);
+
+void NLA_OT_add_tracks(wmOperatorType *ot);
+void NLA_OT_delete_tracks(wmOperatorType *ot);
+
+/* **************************************** */
+/* nla_ops.c */
+
+int nlaop_poll_tweakmode_off(bContext *C);
+int nlaop_poll_tweakmode_on (bContext *C);
+
+short nlaedit_is_tweakmode_on(bAnimContext *ac);
+
+/* --- */
+
+void nla_operatortypes(void);
+void nla_keymap(wmWindowManager *wm);
#endif /* ED_NLA_INTERN_H */
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
new file mode 100644
index 00000000000..ad5f5174690
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -0,0 +1,307 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Joshua Leung (major recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_nla.h"
+#include "BKE_context.h"
+#include "BKE_report.h"
+#include "BKE_screen.h"
+
+#include "ED_anim_api.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+#include "ED_transform.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "RNA_access.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "nla_intern.h" // own include
+
+/* ************************** poll callbacks for operators **********************************/
+
+/* tweakmode is NOT enabled */
+int nlaop_poll_tweakmode_off (bContext *C)
+{
+ Scene *scene;
+
+ /* for now, we check 2 things:
+ * 1) active editor must be NLA
+ * 2) tweakmode is currently set as a 'per-scene' flag
+ * so that it will affect entire NLA data-sets,
+ * but not all AnimData blocks will be in tweakmode for
+ * various reasons
+ */
+ if (ED_operator_nla_active(C) == 0)
+ return 0;
+
+ scene= CTX_data_scene(C);
+ if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON))
+ return 0;
+
+ return 1;
+}
+
+/* tweakmode IS enabled */
+int nlaop_poll_tweakmode_on (bContext *C)
+{
+ Scene *scene;
+
+ /* for now, we check 2 things:
+ * 1) active editor must be NLA
+ * 2) tweakmode is currently set as a 'per-scene' flag
+ * so that it will affect entire NLA data-sets,
+ * but not all AnimData blocks will be in tweakmode for
+ * various reasons
+ */
+ if (ED_operator_nla_active(C) == 0)
+ return 0;
+
+ scene= CTX_data_scene(C);
+ if ((scene == NULL) || !(scene->flag & SCE_NLA_EDIT_ON))
+ return 0;
+
+ return 1;
+}
+
+/* is tweakmode enabled - for use in NLA operator code */
+short nlaedit_is_tweakmode_on (bAnimContext *ac)
+{
+ if (ac && ac->scene)
+ return (ac->scene->flag & SCE_NLA_EDIT_ON);
+ return 0;
+}
+
+/* ************************** registration - operator types **********************************/
+
+void nla_operatortypes(void)
+{
+ /* view */
+ WM_operatortype_append(NLA_OT_properties);
+
+ /* channels */
+ WM_operatortype_append(NLA_OT_channels_click);
+
+ WM_operatortype_append(NLA_OT_add_tracks);
+ WM_operatortype_append(NLA_OT_delete_tracks);
+
+ /* select */
+ WM_operatortype_append(NLA_OT_click_select);
+ WM_operatortype_append(NLA_OT_select_border);
+ WM_operatortype_append(NLA_OT_select_all_toggle);
+
+ /* edit */
+ WM_operatortype_append(NLA_OT_tweakmode_enter);
+ WM_operatortype_append(NLA_OT_tweakmode_exit);
+
+ WM_operatortype_append(NLA_OT_add_actionclip);
+ WM_operatortype_append(NLA_OT_add_transition);
+
+ WM_operatortype_append(NLA_OT_add_meta);
+ WM_operatortype_append(NLA_OT_remove_meta);
+
+ WM_operatortype_append(NLA_OT_duplicate);
+ WM_operatortype_append(NLA_OT_delete);
+ WM_operatortype_append(NLA_OT_split);
+
+ WM_operatortype_append(NLA_OT_mute_toggle);
+
+ WM_operatortype_append(NLA_OT_move_up);
+ WM_operatortype_append(NLA_OT_move_down);
+
+ WM_operatortype_append(NLA_OT_apply_scale);
+ WM_operatortype_append(NLA_OT_clear_scale);
+
+ WM_operatortype_append(NLA_OT_snap);
+
+ WM_operatortype_append(NLA_OT_fmodifier_add);
+}
+
+/* ************************** registration - keymaps **********************************/
+
+static void nla_keymap_channels (wmWindowManager *wm, ListBase *keymap)
+{
+ /* NLA-specific (different to standard channels keymap) -------------------------- */
+ /* selection */
+ /* click-select */
+ // XXX for now, only leftmouse....
+ WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
+
+ /* channel operations */
+ /* add tracks */
+ WM_keymap_add_item(keymap, "NLA_OT_add_tracks", AKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_add_tracks", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "above_selected", 1);
+
+ /* delete tracks */
+ WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", DELKEY, KM_PRESS, 0, 0);
+
+ /* General Animation Channels keymap (see anim_channels.c) ----------------------- */
+ /* selection */
+ /* borderselect - not in tweakmode */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
+
+ /* deselect all - not in tweakmode */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+
+ /* settings */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_toggle", WKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_enable", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_disable", WKEY, KM_PRESS, KM_ALT, 0);
+
+ /* settings - specialised hotkeys */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_editable_toggle", TABKEY, KM_PRESS, 0, 0);
+
+ /* expand/collapse */
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0);
+
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1);
+}
+
+static void nla_keymap_main (wmWindowManager *wm, ListBase *keymap)
+{
+ wmKeymapItem *kmi;
+
+ /* selection */
+ /* click select */
+ WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", 1);
+ kmi= WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ RNA_enum_set(kmi->ptr, "left_right", NLAEDIT_LRSEL_TEST);
+
+ /* deselect all */
+ WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+
+ /* borderselect */
+ WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
+
+
+ /* editing */
+ /* tweakmode
+ * - enter and exit are separate operators with the same hotkey...
+ * This works as they use different poll()'s
+ */
+ WM_keymap_add_item(keymap, "NLA_OT_tweakmode_enter", TABKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_tweakmode_exit", TABKEY, KM_PRESS, 0, 0);
+
+ /* add strips */
+ WM_keymap_add_item(keymap, "NLA_OT_add_actionclip", AKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_add_transition", TKEY, KM_PRESS, KM_SHIFT, 0);
+
+ /* meta-strips */
+ WM_keymap_add_item(keymap, "NLA_OT_add_meta", GKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_remove_meta", GKEY, KM_PRESS, KM_ALT, 0);
+
+ /* duplicate */
+ WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+
+ /* delete */
+ WM_keymap_add_item(keymap, "NLA_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_delete", DELKEY, KM_PRESS, 0, 0);
+
+ /* split */
+ WM_keymap_add_item(keymap, "NLA_OT_split", YKEY, KM_PRESS, 0, 0);
+
+ /* toggles */
+ WM_keymap_add_item(keymap, "NLA_OT_mute_toggle", HKEY, KM_PRESS, 0, 0);
+
+ /* move up */
+ WM_keymap_add_item(keymap, "NLA_OT_move_up", PAGEUPKEY, KM_PRESS, 0, 0);
+ /* move down */
+ WM_keymap_add_item(keymap, "NLA_OT_move_down", PAGEDOWNKEY, KM_PRESS, 0, 0);
+
+ /* apply scale */
+ WM_keymap_add_item(keymap, "NLA_OT_apply_scale", AKEY, KM_PRESS, KM_CTRL, 0);
+ /* clear scale */
+ WM_keymap_add_item(keymap, "NLA_OT_clear_scale", SKEY, KM_PRESS, KM_ALT, 0);
+
+ /* snap */
+ WM_keymap_add_item(keymap, "NLA_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
+
+ /* add f-modifier */
+ WM_keymap_add_item(keymap, "NLA_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+
+ /* transform system */
+ transform_keymap_for_space(wm, keymap, SPACE_NLA);
+}
+
+/* --------------- */
+
+void nla_keymap(wmWindowManager *wm)
+{
+ ListBase *keymap;
+
+ /* keymap for all regions */
+ keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0);
+
+ /* channels */
+ /* Channels are not directly handled by the NLA Editor module, but are inherited from the Animation module.
+ * Most of the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as there
+ * are many similarities with the other Animation Editors.
+ *
+ * However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
+ */
+ keymap= WM_keymap_listbase(wm, "NLA Channels", SPACE_NLA, 0);
+ nla_keymap_channels(wm, keymap);
+
+ /* data */
+ keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0);
+ nla_keymap_main(wm, keymap);
+}
+
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
new file mode 100644
index 00000000000..dd9ef2621c5
--- /dev/null
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -0,0 +1,614 @@
+/**
+ * $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
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Joshua Leung (major recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_nla_types.h"
+#include "DNA_object_types.h"
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+#include "BLI_rand.h"
+
+#include "BKE_animsys.h"
+#include "BKE_nla.h"
+#include "BKE_context.h"
+#include "BKE_report.h"
+#include "BKE_screen.h"
+
+#include "ED_anim_api.h"
+#include "ED_keyframes_edit.h"
+#include "ED_markers.h"
+#include "ED_space_api.h"
+#include "ED_screen.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "nla_intern.h" // own include
+
+/* ******************** Utilities ***************************************** */
+
+/* Convert SELECT_* flags to ACHANNEL_SETFLAG_* flags */
+static short selmodes_to_flagmodes (short sel)
+{
+ /* convert selection modes to selection modes */
+ switch (sel) {
+ case SELECT_SUBTRACT:
+ return ACHANNEL_SETFLAG_CLEAR;
+ break;
+
+ case SELECT_INVERT:
+ return ACHANNEL_SETFLAG_TOGGLE;
+ break;
+
+ case SELECT_ADD:
+ default:
+ return ACHANNEL_SETFLAG_ADD;
+ break;
+ }
+}
+
+
+/* ******************** Deselect All Operator ***************************** */
+/* This operator works in one of three ways:
+ * 1) (de)select all (AKEY) - test if select all or deselect all
+ * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
+ * 3) (de)select all - no testing is done; only for use internal tools as normal function...
+ */
+
+enum {
+ DESELECT_STRIPS_NOTEST = 0,
+ DESELECT_STRIPS_TEST,
+ DESELECT_STRIPS_CLEARACTIVE,
+} eDeselectNlaStrips;
+
+/* Deselects strips in the NLA Editor
+ * - This is called by the deselect all operator, as well as other ones!
+ *
+ * - test: check if select or deselect all (1) or clear all active (2)
+ * - sel: how to select keyframes
+ * 0 = deselect
+ * 1 = select
+ * 2 = invert
+ */
+static void deselect_nla_strips (bAnimContext *ac, short test, short sel)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+ short smode;
+
+ /* determine type-based settings */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS);
+
+ /* filter data */
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* See if we should be selecting or deselecting */
+ if (test == DESELECT_STRIPS_TEST) {
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* if any strip is selected, break out, since we should now be deselecting */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ sel= SELECT_SUBTRACT;
+ break;
+ }
+ }
+
+ if (sel == SELECT_SUBTRACT)
+ break;
+ }
+ }
+
+ /* convert selection modes to selection modes */
+ smode= selmodes_to_flagmodes(sel);
+
+ /* Now set the flags */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* apply same selection to all strips */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ /* set selection */
+ if (test != DESELECT_STRIPS_CLEARACTIVE)
+ ACHANNEL_SET_FLAG(strip, smode, NLASTRIP_FLAG_SELECT);
+
+ /* clear active flag */
+ // TODO: for clear active, do we want to limit this to only doing this on a certain set of tracks though?
+ strip->flag &= ~NLASTRIP_FLAG_ACTIVE;
+ }
+ }
+
+ /* Cleanup */
+ BLI_freelistN(&anim_data);
+}
+
+/* ------------------- */
+
+static int nlaedit_deselectall_exec(bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* 'standard' behaviour - check if selected, then apply relevant selection */
+ if (RNA_boolean_get(op->ptr, "invert"))
+ deselect_nla_strips(&ac, DESELECT_STRIPS_NOTEST, SELECT_INVERT);
+ else
+ deselect_nla_strips(&ac, DESELECT_STRIPS_TEST, SELECT_ADD);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_select_all_toggle (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select All";
+ ot->idname= "NLA_OT_select_all_toggle";
+
+ /* api callbacks */
+ ot->exec= nlaedit_deselectall_exec;
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+
+ /* props */
+ RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
+}
+
+/* ******************** Border Select Operator **************************** */
+/* This operator currently works in one of three ways:
+ * -> BKEY - 1) all strips within region are selected (ACTKEYS_BORDERSEL_ALLSTRIPS)
+ * -> ALT-BKEY - depending on which axis of the region was larger...
+ * -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE)
+ * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS)
+ */
+
+/* defines for borderselect mode */
+enum {
+ NLA_BORDERSEL_ALLSTRIPS = 0,
+ NLA_BORDERSEL_FRAMERANGE,
+ NLA_BORDERSEL_CHANNELS,
+} eActKeys_BorderSelect_Mode;
+
+
+static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, short selectmode)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ View2D *v2d= &ac->ar->v2d;
+ rctf rectf;
+ float ymin=(float)(-NLACHANNEL_HEIGHT), ymax=0;
+
+ /* convert border-region to view coordinates */
+ UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin);
+ UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax-2, &rectf.xmax, &rectf.ymax);
+
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* convert selection modes to selection modes */
+ selectmode= selmodes_to_flagmodes(selectmode);
+
+ /* loop over data, doing border select */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ ymin= ymax - NLACHANNEL_STEP;
+
+ /* perform vertical suitability check (if applicable) */
+ if ( (mode == NLA_BORDERSEL_FRAMERANGE) ||
+ !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
+ {
+ /* loop over data selecting (only if NLA-Track) */
+ if (ale->type == ANIMTYPE_NLATRACK) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* only select strips if they fall within the required ranges (if applicable) */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if ( (mode == NLA_BORDERSEL_CHANNELS) ||
+ BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax) )
+ {
+ /* set selection */
+ ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT);
+
+ /* clear active flag */
+ strip->flag &= ~NLASTRIP_FLAG_ACTIVE;
+ }
+ }
+ }
+ }
+
+ /* set minimum extent to be the maximum of the next channel */
+ ymax= ymin;
+ }
+
+ /* cleanup */
+ BLI_freelistN(&anim_data);
+}
+
+/* ------------------- */
+
+static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
+{
+ bAnimContext ac;
+ rcti rect;
+ short mode=0, selectmode=0;
+ int event;
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get settings from operator */
+ rect.xmin= RNA_int_get(op->ptr, "xmin");
+ rect.ymin= RNA_int_get(op->ptr, "ymin");
+ rect.xmax= RNA_int_get(op->ptr, "xmax");
+ rect.ymax= RNA_int_get(op->ptr, "ymax");
+
+ event= RNA_int_get(op->ptr, "event_type");
+ if (event == LEFTMOUSE) // FIXME... hardcoded
+ selectmode = SELECT_ADD;
+ else
+ selectmode = SELECT_SUBTRACT;
+
+ /* selection 'mode' depends on whether borderselect region only matters on one axis */
+ if (RNA_boolean_get(op->ptr, "axis_range")) {
+ /* mode depends on which axis of the range is larger to determine which axis to use
+ * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
+ * - the frame-range select option is favoured over the channel one (x over y), as frame-range one is often
+ * used for tweaking timing when "blocking", while channels is not that useful...
+ */
+ if ((rect.xmax - rect.xmin) >= (rect.ymax - rect.ymin))
+ mode= NLA_BORDERSEL_FRAMERANGE;
+ else
+ mode= NLA_BORDERSEL_CHANNELS;
+ }
+ else
+ mode= NLA_BORDERSEL_ALLSTRIPS;
+
+ /* apply borderselect action */
+ borderselect_nla_strips(&ac, rect, mode, selectmode);
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void NLA_OT_select_border(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Border Select";
+ ot->idname= "NLA_OT_select_border";
+
+ /* api callbacks */
+ ot->invoke= WM_border_select_invoke;
+ ot->exec= nlaedit_borderselect_exec;
+ ot->modal= WM_border_select_modal;
+
+ ot->poll= nlaop_poll_tweakmode_off;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* rna */
+ RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+
+ RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
+}
+
+/* ******************** Mouse-Click Select Operator *********************** */
+/* This operator works in one of 2 ways:
+ * 1) Select the strip directly under the mouse
+ * 2) Select all the strips to one side of the mouse
+ */
+
+/* defines for left-right select tool */
+static EnumPropertyItem prop_nlaedit_leftright_select_types[] = {
+ {NLAEDIT_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
+ {NLAEDIT_LRSEL_NONE, "OFF", 0, "Don't select", ""},
+ {NLAEDIT_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
+ {NLAEDIT_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* sensitivity factor for frame-selections */
+#define FRAME_CLICK_THRESH 0.1f
+
+
+/* ------------------- */
+
+/* option 1) select strip directly under mouse */
+static void mouse_nla_strips (bContext *C, bAnimContext *ac, int mval[2], short select_mode)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale = NULL;
+ int filter;
+
+ View2D *v2d= &ac->ar->v2d;
+ Scene *scene= ac->scene;
+ NlaStrip *strip = NULL;
+ int channel_index;
+ float xmin, xmax, dummy;
+ float x, y;
+
+
+ /* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */
+ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
+ UI_view2d_listview_view_to_cell(v2d, 0, NLACHANNEL_STEP, 0, (float)NLACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
+
+ /* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click
+ * (that is the size of keyframe icons, so user should be expecting similar tolerances)
+ */
+ UI_view2d_region_to_view(v2d, mval[0]-7, mval[1], &xmin, &dummy);
+ UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &xmax, &dummy);
+
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* try to get channel */
+ ale= BLI_findlink(&anim_data, channel_index);
+ if (ale == NULL) {
+ /* channel not found */
+ printf("Error: animation channel (index = %d) not found in mouse_nla_strips() \n", channel_index);
+ BLI_freelistN(&anim_data);
+ return;
+ }
+ else {
+ /* found some channel - we only really should do somethign when its an Nla-Track */
+ if (ale->type == ANIMTYPE_NLATRACK) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ /* loop over NLA-strips in this track, trying to find one which occurs in the necessary bounds */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (BKE_nlastrip_within_bounds(strip, xmin, xmax))
+ break;
+ }
+ }
+
+ /* remove active channel from list of channels for separate treatment (since it's needed later on) */
+ BLI_remlink(&anim_data, ale);
+
+ /* free list of channels, since it's not used anymore */
+ BLI_freelistN(&anim_data);
+ }
+
+ /* if currently in tweakmode, exit tweakmode before changing selection states
+ * now that we've found our target...
+ */
+ if (scene->flag & SCE_NLA_EDIT_ON)
+ WM_operator_name_call(C, "NLA_OT_tweakmode_exit", WM_OP_EXEC_DEFAULT, NULL);
+
+ /* for replacing selection, firstly need to clear existing selection */
+ if (select_mode == SELECT_REPLACE) {
+ /* reset selection mode for next steps */
+ select_mode = SELECT_ADD;
+
+ /* deselect all strips */
+ deselect_nla_strips(ac, 0, SELECT_SUBTRACT);
+
+ /* deselect all other channels first */
+ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+
+ /* Highlight NLA-Track */
+ if (ale->type == ANIMTYPE_NLATRACK) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ nlt->flag |= NLATRACK_SELECTED;
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
+ }
+ }
+
+ /* only select strip if we clicked on a valid channel and hit something */
+ if (ale) {
+ /* select the strip accordingly (if a matching one was found) */
+ if (strip) {
+ select_mode= selmodes_to_flagmodes(select_mode);
+ ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
+
+ /* if we selected it, we can make it active too
+ * - we always need to clear the active strip flag though...
+ */
+ deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0);
+ if (strip->flag & NLASTRIP_FLAG_SELECT)
+ strip->flag |= NLASTRIP_FLAG_ACTIVE;
+ }
+
+ /* free this channel */
+ MEM_freeN(ale);
+ }
+}
+
+/* Option 2) Selects all the strips on either side of the current frame (depends on which side the mouse is on) */
+static void nlaedit_mselect_leftright (bContext *C, bAnimContext *ac, short leftright, short select_mode)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ Scene *scene= ac->scene;
+ float xmin, xmax;
+
+ /* if currently in tweakmode, exit tweakmode first */
+ if (scene->flag & SCE_NLA_EDIT_ON)
+ WM_operator_name_call(C, "NLA_OT_tweakmode_exit", WM_OP_EXEC_DEFAULT, NULL);
+
+ /* if select mode is replace, deselect all keyframes (and channels) first */
+ if (select_mode==SELECT_REPLACE) {
+ select_mode= SELECT_ADD;
+
+ /* deselect all other channels and keyframes */
+ ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ deselect_nla_strips(ac, 0, SELECT_SUBTRACT);
+ }
+
+ /* get range, and get the right flag-setting mode */
+ if (leftright == NLAEDIT_LRSEL_LEFT) {
+ xmin = MINAFRAMEF;
+ xmax = (float)(CFRA + FRAME_CLICK_THRESH);
+ }
+ else {
+ xmin = (float)(CFRA - FRAME_CLICK_THRESH);
+ xmax = MAXFRAMEF;
+ }
+
+ select_mode= selmodes_to_flagmodes(select_mode);
+
+
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ /* select strips on the side where most data occurs */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* check each strip to see if it is appropriate */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ if (BKE_nlastrip_within_bounds(strip, xmin, xmax)) {
+ ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
+ }
+ }
+ }
+
+ /* Cleanup */
+ BLI_freelistN(&anim_data);
+}
+
+/* ------------------- */
+
+/* handle clicking */
+static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ bAnimContext ac;
+ Scene *scene;
+ ARegion *ar;
+ View2D *v2d;
+ short selectmode;
+ int mval[2];
+
+ /* get editor data */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return OPERATOR_CANCELLED;
+
+ /* get useful pointers from animation context data */
+ scene= ac.scene;
+ ar= ac.ar;
+ v2d= &ar->v2d;
+
+ /* get mouse coordinates (in region coordinates) */
+ mval[0]= (event->x - ar->winrct.xmin);
+ mval[1]= (event->y - ar->winrct.ymin);
+
+ /* select mode is either replace (deselect all, then add) or add/extend */
+ if (RNA_boolean_get(op->ptr, "extend"))
+ selectmode= SELECT_INVERT;
+ else
+ selectmode= SELECT_REPLACE;
+
+ /* figure out action to take */
+ if (RNA_enum_get(op->ptr, "left_right")) {
+ /* select all keys on same side of current frame as mouse */
+ float x;
+
+ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, NULL);
+ if (x < CFRA)
+ RNA_int_set(op->ptr, "left_right", NLAEDIT_LRSEL_LEFT);
+ else
+ RNA_int_set(op->ptr, "left_right", NLAEDIT_LRSEL_RIGHT);
+
+ nlaedit_mselect_leftright(C, &ac, RNA_enum_get(op->ptr, "left_right"), selectmode);
+ }
+ else {
+ /* select strips based upon mouse position */
+ mouse_nla_strips(C, &ac, mval, selectmode);
+ }
+
+ /* set notifier that things have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL);
+
+ /* for tweak grab to work */
+ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+}
+
+void NLA_OT_click_select (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Mouse Select";
+ ot->idname= "NLA_OT_click_select";
+
+ /* api callbacks - absolutely no exec() this yet... */
+ ot->invoke= nlaedit_clickselect_invoke;
+ ot->poll= ED_operator_nla_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* id-props */
+ // XXX should we make this into separate operators?
+ RNA_def_enum(ot->srna, "left_right", prop_nlaedit_leftright_select_types, 0, "Left Right", ""); // CTRLKEY
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+}
+
+/* *********************************************** */
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 6e1a97dea34..923208f3b35 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <stdio.h>
+#include "DNA_anim_types.h"
#include "DNA_nla_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
@@ -41,10 +42,16 @@
#include "BLI_arithb.h"
#include "BLI_rand.h"
+#include "BKE_animsys.h"
+#include "BKE_action.h"
+#include "BKE_nla.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "BKE_utildefines.h"
+#include "ED_anim_api.h"
+#include "ED_markers.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -57,20 +64,58 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "ED_markers.h"
-
#include "nla_intern.h" // own include
+/* ******************** manage regions ********************* */
+
+ARegion *nla_has_buttons_region(ScrArea *sa)
+{
+ ARegion *ar, *arnew;
+
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype==RGN_TYPE_UI)
+ return ar;
+ }
+
+ /* add subdiv level; after main */
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype==RGN_TYPE_WINDOW)
+ break;
+ }
+
+ /* is error! */
+ if (ar==NULL) return NULL;
+
+ arnew= MEM_callocN(sizeof(ARegion), "buttons for nla");
+
+ BLI_insertlinkafter(&sa->regionbase, ar, arnew);
+ arnew->regiontype= RGN_TYPE_UI;
+ arnew->alignment= RGN_ALIGN_RIGHT;
+
+ arnew->flag = RGN_FLAG_HIDDEN;
+
+ return arnew;
+}
+
+
+
/* ******************** default callbacks for nla space ***************** */
static SpaceLink *nla_new(const bContext *C)
{
+ Scene *scene= CTX_data_scene(C);
ARegion *ar;
SpaceNla *snla;
snla= MEM_callocN(sizeof(SpaceNla), "initnla");
snla->spacetype= SPACE_NLA;
+ /* allocate DopeSheet data for NLA Editor */
+ snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+
+ /* set auto-snapping settings */
+ snla->autosnap = SACTSNAP_FRAME;
+
/* header */
ar= MEM_callocN(sizeof(ARegion), "header for nla");
@@ -78,13 +123,23 @@ static SpaceLink *nla_new(const bContext *C)
ar->regiontype= RGN_TYPE_HEADER;
ar->alignment= RGN_ALIGN_BOTTOM;
- /* channel list region XXX */
- ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ /* channel list region */
+ ar= MEM_callocN(sizeof(ARegion), "channel list for nla");
BLI_addtail(&snla->regionbase, ar);
ar->regiontype= RGN_TYPE_CHANNELS;
ar->alignment= RGN_ALIGN_LEFT;
- ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+ /* only need to set these settings since this will use the 'stack' configuration */
+ ar->v2d.scroll = V2D_SCROLL_BOTTOM;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+
+ /* ui buttons */
+ ar= MEM_callocN(sizeof(ARegion), "buttons area for nla");
+
+ BLI_addtail(&snla->regionbase, ar);
+ ar->regiontype= RGN_TYPE_UI;
+ ar->alignment= RGN_ALIGN_RIGHT;
+ ar->flag = RGN_FLAG_HIDDEN;
/* main area */
ar= MEM_callocN(sizeof(ARegion), "main area for nla");
@@ -92,29 +147,26 @@ static SpaceLink *nla_new(const bContext *C)
BLI_addtail(&snla->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= 1.0f;
- ar->v2d.tot.ymin= 0.0f;
- ar->v2d.tot.xmax= 1000.0f;
- ar->v2d.tot.ymax= 1000.0f;
+ ar->v2d.tot.xmin= (float)(SFRA-10);
+ ar->v2d.tot.ymin= -500.0f;
+ ar->v2d.tot.xmax= (float)(EFRA+10);
+ ar->v2d.tot.ymax= 0.0f;
- ar->v2d.cur.xmin= -5.0f;
- ar->v2d.cur.ymin= 0.0f;
- ar->v2d.cur.xmax= 65.0f;
- ar->v2d.cur.ymax= 1000.0f;
+ ar->v2d.cur = ar->v2d.tot;
ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
+ ar->v2d.min[1]= 0.0f;
ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 1000.0f;
-
- ar->v2d.minzoom= 0.1f;
- ar->v2d.maxzoom= 50.0f;
-
- ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
+ ar->v2d.max[1]= 10000.0f;
+
+ ar->v2d.minzoom= 0.01f;
+ ar->v2d.maxzoom= 50;
+ ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
-
+ ar->v2d.align= V2D_ALIGN_NO_POS_Y;
+ ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
return (SpaceLink *)snla;
}
@@ -122,15 +174,25 @@ static SpaceLink *nla_new(const bContext *C)
/* not spacelink itself */
static void nla_free(SpaceLink *sl)
{
-// SpaceNla *snla= (SpaceNla*) sl;
+ SpaceNla *snla= (SpaceNla*) sl;
+ if (snla->ads) {
+ BLI_freelistN(&snla->ads->chanbase);
+ MEM_freeN(snla->ads);
+ }
}
/* spacetype; init callback */
static void nla_init(struct wmWindowManager *wm, ScrArea *sa)
{
+ SpaceNla *snla= (SpaceNla *)sa->spacedata.first;
+
+ /* init dopesheet data if non-existant (i.e. for old files) */
+ if (snla->ads == NULL)
+ snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
+ ED_area_tag_refresh(sa);
}
static SpaceLink *nla_duplicate(SpaceLink *sl)
@@ -138,15 +200,33 @@ static SpaceLink *nla_duplicate(SpaceLink *sl)
SpaceNla *snlan= MEM_dupallocN(sl);
/* clear or remove stuff from old */
+ snlan->ads= MEM_dupallocN(snlan->ads);
return (SpaceLink *)snlan;
}
+/* add handlers, stuff you only do once or on area/region changes */
+static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ ListBase *keymap;
+
+ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
+
+ /* own keymap */
+ // TODO: cannot use generic copy, need special NLA version
+ keymap= WM_keymap_listbase(wm, "NLA Channels", SPACE_NLA, 0); /* XXX weak? */
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+ keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+}
+
+/* draw entirely, view changes should be handled here */
static void nla_channel_area_draw(const bContext *C, ARegion *ar)
{
- /* draw entirely, view changes should be handled here */
- // SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
- // View2D *v2d= &ar->v2d;
+ SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
+ bAnimContext ac;
+ View2D *v2d= &ar->v2d;
+ View2DScrollers *scrollers;
float col[3];
/* clear and setup matrix */
@@ -154,15 +234,20 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- // UI_view2d_view_ortho(C, v2d);
-
- /* data... */
+ UI_view2d_view_ortho(C, v2d);
+ /* data */
+ if (ANIM_animdata_get_context(C, &ac)) {
+ draw_nla_channel_list(&ac, snla, ar);
+ }
/* reset view matrix */
- //UI_view2d_view_restore(C);
+ UI_view2d_view_restore(C);
- /* scrollers? */
+ /* scrollers */
+ scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ UI_view2d_scrollers_draw(C, v2d, scrollers);
+ UI_view2d_scrollers_free(scrollers);
}
@@ -174,16 +259,22 @@ static void nla_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "NLA", SPACE_NLA, 0); /* XXX weak? */
+ keymap= WM_keymap_listbase(wm, "NLA Data", SPACE_NLA, 0); /* XXX weak? */
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+ keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
}
static void nla_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
- // SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
+ SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
+ bAnimContext ac;
View2D *v2d= &ar->v2d;
+ View2DGrid *grid;
+ View2DScrollers *scrollers;
float col[3];
+ short unit=0, flag=0;
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
@@ -191,25 +282,46 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
UI_view2d_view_ortho(C, v2d);
+
+ /* time grid */
+ unit= (snla->flag & SNLA_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
+ grid= UI_view2d_grid_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL);
+ UI_view2d_grid_free(grid);
+
+ /* data */
+ if (ANIM_animdata_get_context(C, &ac)) {
+ /* strips and backdrops */
+ draw_nla_main_data(&ac, snla, ar);
- /* data... */
+ /* text draw cached, in pixelspace now */
+ UI_view2d_text_cache_draw(ar);
+ }
+ UI_view2d_view_ortho(C, v2d);
+
+ /* current frame */
+ if (snla->flag & SNLA_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
+ if ((snla->flag & SNLA_NODRAWCFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX;
+ ANIM_draw_cfra(C, v2d, flag);
+
+ /* markers */
+ UI_view2d_view_orthoSpecial(C, v2d, 1);
+ draw_markers_time(C, 0);
+
+ /* preview range */
+ UI_view2d_view_ortho(C, v2d);
+ ANIM_draw_previewrange(C, v2d);
/* reset view matrix */
UI_view2d_view_restore(C);
- /* scrollers? */
+ /* scrollers */
+ scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+ UI_view2d_scrollers_draw(C, v2d, scrollers);
+ UI_view2d_scrollers_free(scrollers);
}
-void nla_operatortypes(void)
-{
-
-}
-
-void nla_keymap(struct wmWindowManager *wm)
-{
-
-}
/* add handlers, stuff you only do once or on area/region changes */
static void nla_header_area_init(wmWindowManager *wm, ARegion *ar)
@@ -239,9 +351,144 @@ static void nla_header_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
}
+/* add handlers, stuff you only do once or on area/region changes */
+static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ ListBase *keymap;
+
+ ED_region_panels_init(wm, ar);
+
+ keymap= WM_keymap_listbase(wm, "NLA Generic", SPACE_NLA, 0);
+ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
+}
+
+static void nla_buttons_area_draw(const bContext *C, ARegion *ar)
+{
+ ED_region_panels(C, ar, 1, NULL);
+}
+
+static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_OB_ACTIVE:
+ case ND_FRAME:
+ case ND_MARKERS:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_OBJECT:
+ switch(wmn->data) {
+ case ND_BONE_ACTIVE:
+ case ND_BONE_SELECT:
+ case ND_KEYS:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ default:
+ if(wmn->data==ND_KEYS)
+ ED_region_tag_redraw(ar);
+ break;
+ }
+}
+
+
static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
+ switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_OB_ACTIVE:
+ case ND_FRAME:
+ case ND_MARKERS:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_OBJECT:
+ switch(wmn->data) {
+ case ND_BONE_ACTIVE:
+ case ND_BONE_SELECT:
+ case ND_KEYS:
+ case ND_TRANSFORM:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ default:
+ if(wmn->data==ND_KEYS)
+ ED_region_tag_redraw(ar);
+ }
+}
+
+static void nla_channel_area_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+ case NC_ANIMATION:
+ ED_region_tag_redraw(ar);
+ break;
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_OB_ACTIVE:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_OBJECT:
+ switch(wmn->data) {
+ case ND_BONE_ACTIVE:
+ case ND_BONE_SELECT:
+ case ND_KEYS:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ default:
+ if(wmn->data==ND_KEYS)
+ ED_region_tag_redraw(ar);
+ }
+}
+
+/* editor level listener */
+static void nla_listener(ScrArea *sa, wmNotifier *wmn)
+{
+ /* context changes */
+ switch (wmn->category) {
+ case NC_ANIMATION:
+ // TODO: filter specific types of changes?
+ ED_area_tag_refresh(sa);
+ break;
+ case NC_SCENE:
+ /*switch (wmn->data) {
+ case ND_OB_ACTIVE:
+ case ND_OB_SELECT:
+ ED_area_tag_refresh(sa);
+ break;
+ }*/
+ ED_area_tag_refresh(sa);
+ break;
+ case NC_OBJECT:
+ /*switch (wmn->data) {
+ case ND_BONE_SELECT:
+ case ND_BONE_ACTIVE:
+ ED_area_tag_refresh(sa);
+ break;
+ }*/
+ ED_area_tag_refresh(sa);
+ break;
+ }
}
/* only called once, from space/spacetypes.c */
@@ -257,6 +504,7 @@ void ED_spacetype_nla(void)
st->init= nla_init;
st->duplicate= nla_duplicate;
st->operatortypes= nla_operatortypes;
+ st->listener= nla_listener;
st->keymap= nla_keymap;
/* regions: main window */
@@ -265,7 +513,7 @@ void ED_spacetype_nla(void)
art->init= nla_main_area_init;
art->draw= nla_main_area_draw;
art->listener= nla_main_area_listener;
- art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
+ art->keymapflag= ED_KEYMAP_VIEW2D/*|ED_KEYMAP_MARKERS*/|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
@@ -286,10 +534,24 @@ void ED_spacetype_nla(void)
art->minsizex= 200;
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
- //art->init= nla_channel_area_init;
+ art->init= nla_channel_area_init;
art->draw= nla_channel_area_draw;
+ art->listener= nla_channel_area_listener;
+
+ BLI_addhead(&st->regiontypes, art);
+
+ /* regions: UI buttons */
+ art= MEM_callocN(sizeof(ARegionType), "spacetype nla region");
+ art->regionid = RGN_TYPE_UI;
+ art->minsizex= 200;
+ art->keymapflag= ED_KEYMAP_UI;
+ art->listener= nla_region_listener;
+ art->init= nla_buttons_area_init;
+ art->draw= nla_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);
+
+ nla_buttons_register(art);
BKE_spacetype_register(st);
diff --git a/source/blender/editors/space_node/Makefile b/source/blender/editors/space_node/Makefile
index 60f81255a74..5bd6e95e28c 100644
--- a/source/blender/editors/space_node/Makefile
+++ b/source/blender/editors/space_node/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 0670dd9e01f..f2e2486075b 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1,5 +1,5 @@
/**
- * $Id: drawnode.c 17439 2008-11-13 09:57:11Z kakbarnf $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index f7f637670b5..0384965e49e 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -74,6 +74,7 @@
#include "ED_space_api.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "RNA_access.h"
@@ -1177,7 +1178,7 @@ void NODE_OT_resize(wmOperatorType *ot)
ot->poll= ED_operator_node_active;
/* flags */
- ot->flag= 0;
+ ot->flag= OPTYPE_BLOCKING;
}
@@ -1686,18 +1687,54 @@ void node_mute(SpaceNode *snode)
}
-void node_adduplicate(SpaceNode *snode)
+#endif
+
+int node_duplicate_exec(bContext *C, wmOperator *op)
{
+ SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
ntreeCopyTree(snode->edittree, 1); /* 1 == internally selected nodes */
ntreeSolveOrder(snode->edittree);
snode_verify_groups(snode);
- // XXX snode_handle_recalc(snode);
+ snode_handle_recalc(C, snode);
+
+ return OPERATOR_FINISHED;
+}
-// XXX transform_nodes(snode->edittree, 'g', "Duplicate");
+static int node_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ node_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 NODE_OT_duplicate(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Duplicate Nodes";
+ ot->description = "Duplicate the nodes.";
+ ot->idname= "NODE_OT_duplicate";
+
+ /* api callbacks */
+ ot->invoke= node_duplicate_invoke;
+ ot->exec= node_duplicate_exec;
+
+ ot->poll= ED_operator_node_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* to give to transform */
+ RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+}
+
+#if 0
+
static void node_insert_convertor(SpaceNode *snode, bNodeLink *link)
{
bNode *newnode= NULL;
@@ -1975,7 +2012,7 @@ void NODE_OT_link(wmOperatorType *ot)
ot->poll= ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index b73f57f935f..d6680457376 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -82,6 +82,7 @@ void snode_composite_job(const struct bContext *C, ScrArea *sa);
bNode *snode_get_editgroup(SpaceNode *snode);
void snode_autoconnect(SpaceNode *snode, bNode *node_to, int flag);
+void NODE_OT_duplicate(struct wmOperatorType *ot);
void NODE_OT_link(struct wmOperatorType *ot);
void NODE_OT_delete(struct wmOperatorType *ot);
void NODE_OT_resize(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 7a1cc24fa58..f78abb28313 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -37,8 +37,7 @@
#include "ED_space_api.h"
#include "ED_screen.h"
-
-#include "BIF_transform.h"
+#include "ED_transform.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -59,6 +58,8 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_link);
WM_operatortype_append(NODE_OT_resize);
WM_operatortype_append(NODE_OT_links_cut);
+ WM_operatortype_append(NODE_OT_duplicate);
+
}
void node_keymap(struct wmWindowManager *wm)
@@ -71,6 +72,8 @@ void node_keymap(struct wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select_extend", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select_type", NODE_SELECT_MOUSE);
RNA_enum_set(WM_keymap_add_item(keymap, "NODE_OT_select_extend", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select_type", NODE_SELECT_MOUSE);
+ WM_keymap_add_item(keymap, "NODE_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+
WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_visibility_toggle", LEFTMOUSE, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 3c37793e8d6..450b17e69bb 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -177,8 +177,8 @@ static int node_extend_select_invoke(bContext *C, wmOperator *op, wmEvent *event
/* operators */
static EnumPropertyItem prop_select_items[] = {
- {NODE_SELECT_MOUSE, "NORMAL", "Normal Select", "Select using the mouse"},
- {0, NULL, NULL, NULL}};
+ {NODE_SELECT_MOUSE, "NORMAL", 0, "Normal Select", "Select using the mouse"},
+ {0, NULL, 0, NULL, NULL}};
void NODE_OT_select_extend(wmOperatorType *ot)
{
@@ -213,7 +213,7 @@ void NODE_OT_select(wmOperatorType *ot)
ot->modal= node_select_modal;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
RNA_def_enum(ot->srna, "select_type", prop_select_items, 0, "Select Type", "");
@@ -225,9 +225,9 @@ void NODE_OT_select(wmOperatorType *ot)
/* ****** Border Select ****** */
static EnumPropertyItem prop_select_types[] = {
- {NODE_EXCLUSIVE, "EXCLUSIVE", "Exclusive", ""}, /* right mouse */
- {NODE_EXTEND, "EXTEND", "Extend", ""}, /* left mouse */
- {0, NULL, NULL, NULL}
+ {NODE_EXCLUSIVE, "EXCLUSIVE", 0, "Exclusive", ""}, /* right mouse */
+ {NODE_EXTEND, "EXTEND", 0, "Extend", ""}, /* left mouse */
+ {0, NULL, 0, NULL, NULL}
};
static int node_borderselect_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 775f46b8e04..ac3a884c5f8 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -283,7 +283,12 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
{
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
- if(CTX_data_equals(member, "selected_nodes")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {"selected_nodes", NULL};
+ CTX_data_dir_set(result, dir);
+ return 1;
+ }
+ else if(CTX_data_equals(member, "selected_nodes")) {
bNode *node;
for(next_node(snode->edittree); (node=next_node(NULL));) {
diff --git a/source/blender/editors/space_outliner/Makefile b/source/blender/editors/space_outliner/Makefile
index 19d40a4a31e..8d7cd017e0b 100644
--- a/source/blender/editors/space_outliner/Makefile
+++ b/source/blender/editors/space_outliner/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 16748af39d5..4776b42b631 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -949,7 +949,6 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
/* NLA Data */
if (adt->nla_tracks.first) {
-#if 0
TreeElement *tenla= outliner_add_element(soops, &te->subtree, adt, te, TSE_NLA, 0);
NlaTrack *nlt;
int a= 0;
@@ -957,17 +956,18 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tenla->name= "NLA Tracks";
for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
- TreeElement *tenlt= outliner_add_element(soops, &te->subtree, nlt, te, TSE_NLA_TRACK, a);
- bActionStrip *strip;
+ TreeElement *tenlt= outliner_add_element(soops, &tenla->subtree, nlt, tenla, TSE_NLA_TRACK, a);
+ NlaStrip *strip;
TreeElement *ten;
int b= 0;
- for (strip=nlt->strips.first; strip; strip=strip->next, a++) {
- ten= outliner_add_element(soops, &tenla->subtree, strip->act, tenla, TSE_NLA_ACTION, a);
+ tenlt->name= nlt->name;
+
+ for (strip=nlt->strips.first; strip; strip=strip->next, b++) {
+ ten= outliner_add_element(soops, &tenlt->subtree, strip->act, tenlt, TSE_NLA_ACTION, b);
if(ten) ten->directdata= strip;
}
}
-#endif
}
}
else if(type==TSE_SEQUENCE) {
@@ -1031,7 +1031,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
}
else if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
PointerRNA pptr, propptr, *ptr= (PointerRNA*)idv;
- PropertyRNA *prop, *iterprop, *nameprop;
+ PropertyRNA *prop, *iterprop;
PropertyType proptype;
PropertySubType propsubtype;
int a, tot;
@@ -1043,12 +1043,10 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
}
else if(type == TSE_RNA_STRUCT) {
/* struct */
- nameprop= RNA_struct_name_property(ptr->type);
+ te->name= RNA_struct_name_get_alloc(ptr, NULL, 0);
- if(nameprop) {
- te->name= RNA_property_string_get_alloc(ptr, nameprop, NULL, 0);
+ if(te->name)
te->flag |= TE_FREE_NAME;
- }
else
te->name= (char*)RNA_struct_ui_name(ptr->type);
@@ -1702,22 +1700,24 @@ static int tree_element_active_material(Scene *scene, SpaceOops *soops, TreeElem
if(tes->idcode==ID_OB) {
if(set) {
ob->actcol= te->index+1;
- ob->colbits |= (1<<te->index); // make ob material active too
+ ob->matbits[te->index]= 1; // make ob material active too
+ ob->colbits |= (1<<te->index);
}
else {
if(ob->actcol == te->index+1)
- if(ob->colbits & (1<<te->index)) return 1;
+ if(ob->matbits[te->index]) return 1;
}
}
/* or we search for obdata material */
else {
if(set) {
ob->actcol= te->index+1;
- ob->colbits &= ~(1<<te->index); // make obdata material active too
+ ob->matbits[te->index]= 0; // make obdata material active too
+ ob->colbits &= ~(1<<te->index);
}
else {
if(ob->actcol == te->index+1)
- if( (ob->colbits & (1<<te->index))==0 ) return 1;
+ if(ob->matbits[te->index]==0) return 1;
}
}
if(set) {
@@ -3075,7 +3075,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
TreeElement *tem, *temnext, *temsub;
TreeStoreElem *tse, *tsenext;
PointerRNA *ptr, *nextptr;
- PropertyRNA *prop, *nameprop;
+ PropertyRNA *prop;
char *newpath=NULL;
/* optimise tricks:
@@ -3119,17 +3119,16 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
newpath= RNA_path_append(*path, ptr, prop, 0, NULL);
}
else if(RNA_property_type(prop) == PROP_COLLECTION) {
+ char buf[128], *name;
+
temnext= (TreeElement*)(ld->next->data);
tsenext= TREESTORE(temnext);
nextptr= &temnext->rnaptr;
- nameprop= RNA_struct_name_property(nextptr->type);
+ name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf));
- if(nameprop) {
+ if(name) {
/* if possible, use name as a key in the path */
- char buf[128], *name;
- name= RNA_property_string_get_alloc(nextptr, nameprop, buf, sizeof(buf));
-
newpath= RNA_path_append(*path, NULL, prop, 0, name);
if(name != buf)
@@ -3242,7 +3241,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, short m
case DRIVERS_EDITMODE_ADD:
{
/* add a new driver with the information obtained (only if valid) */
- ANIM_add_driver(id, path, array_index, flag);
+ ANIM_add_driver(id, path, array_index, flag, DRIVER_TYPE_AVERAGE);
}
break;
case DRIVERS_EDITMODE_REMOVE:
@@ -3521,6 +3520,8 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx
case TSE_NLA:
UI_icon_draw(x, y, ICON_NLA); break;
+ case TSE_NLA_TRACK:
+ UI_icon_draw(x, y, ICON_NLA); break; // XXX
case TSE_NLA_ACTION:
UI_icon_draw(x, y, ICON_ACTION); break;
case TSE_DEFGROUP_BASE:
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 48c904121a5..204298f2b70 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -94,6 +94,7 @@ typedef struct TreeElement {
#define TSE_RNA_STRUCT 30
#define TSE_RNA_PROPERTY 31
#define TSE_RNA_ARRAY_ELEM 32
+#define TSE_NLA_TRACK 33
/* outliner search flags */
#define OL_FIND 0
diff --git a/source/blender/editors/space_script/Makefile b/source/blender/editors/space_script/Makefile
index 48e1cd8e861..3322cb61a7f 100644
--- a/source/blender/editors/space_script/Makefile
+++ b/source/blender/editors/space_script/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 797302a8652..88b8dccc6c9 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -62,15 +62,17 @@
static int run_pyfile_exec(bContext *C, wmOperator *op)
{
ARegion *ar= CTX_wm_region(C);
+
char filename[512];
RNA_string_get(op->ptr, "filename", filename);
#ifndef DISABLE_PYTHON
- BPY_run_python_script(C, filename, NULL);
+ if(BPY_run_python_script(C, filename, NULL, op->reports)) {
+ ED_region_tag_redraw(ar);
+ return OPERATOR_FINISHED;
+ }
#endif
- ED_region_tag_redraw(ar);
-
- return OPERATOR_FINISHED;
+ return OPERATOR_CANCELLED; /* FAIL */
}
void SCRIPT_OT_python_file_run(wmOperatorType *ot)
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 4c17ed16475..99233cc5020 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -175,29 +175,12 @@ static void script_main_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void script_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+ ED_region_header_init(ar);
}
static void script_header_area_draw(const bContext *C, ARegion *ar)
{
- 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);
-
- script_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
static void script_main_area_listener(ARegion *ar, wmNotifier *wmn)
diff --git a/source/blender/editors/space_sequencer/Makefile b/source/blender/editors/space_sequencer/Makefile
index 80699db4baa..7be0bc9cfef 100644
--- a/source/blender/editors/space_sequencer/Makefile
+++ b/source/blender/editors/space_sequencer/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index f127ab4b0cf..cc4f5cf5ce3 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -1,5 +1,5 @@
/**
- * $Id: sequencer_buttons.c 20279 2009-05-19 17:13:33Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index bd31d8d86ff..3b90039335e 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -741,7 +741,8 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
static int recursive= 0;
float zoom;
float zoomx, zoomy;
- int render_size = 0;
+ float render_size = 0.0;
+ float proxy_size = 100.0;
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
@@ -749,6 +750,8 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
render_size = sseq->render_size;
if (render_size == 0) {
render_size = scene->r.size;
+ } else {
+ proxy_size = render_size;
}
if (render_size < 0) {
return;
@@ -767,13 +770,13 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
else {
recursive= 1;
if (special_seq_update) {
- ibuf= give_ibuf_seq_direct(scene, rectx, recty, (scene->r.cfra), render_size, special_seq_update);
+ ibuf= give_ibuf_seq_direct(scene, rectx, recty, (scene->r.cfra), proxy_size, special_seq_update);
}
else if (!U.prefetchframes) { // XXX || (G.f & G_PLAYANIM) == 0) {
- ibuf= (ImBuf *)give_ibuf_seq(scene, rectx, recty, (scene->r.cfra), sseq->chanshown, render_size);
+ ibuf= (ImBuf *)give_ibuf_seq(scene, rectx, recty, (scene->r.cfra), sseq->chanshown, proxy_size);
}
else {
- ibuf= (ImBuf *)give_ibuf_seq_threaded(scene, rectx, recty, (scene->r.cfra), sseq->chanshown, render_size);
+ ibuf= (ImBuf *)give_ibuf_seq_threaded(scene, rectx, recty, (scene->r.cfra), sseq->chanshown, proxy_size);
}
recursive= 0;
@@ -790,8 +793,8 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
if(ibuf->rect==NULL && ibuf->rect_float == NULL)
return;
-
- switch(sseq->mainb != SEQ_DRAW_SEQUENCE) {
+
+ switch(sseq->mainb) {
case SEQ_DRAW_IMG_IMBUF:
if (sseq->zebra != 0) {
ibuf = make_zebra_view_from_ibuf(ibuf, sseq->zebra);
@@ -824,7 +827,7 @@ static void draw_image_seq(Scene *scene, ARegion *ar, SpaceSeq *sseq)
zoom= SEQ_ZOOM_FAC(sseq->zoom);
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
- zoom /= render_size / 100.0;
+ zoom /= proxy_size / 100.0;
zoomx = zoom * ((float)scene->r.xasp / (float)scene->r.yasp);
zoomy = zoom;
} else {
@@ -960,8 +963,11 @@ void drawprefetchseqspace(Scene *scene, ARegion *ar, SpaceSeq *sseq)
{
int rectx, recty;
int render_size = sseq->render_size;
+ int proxy_size = 100.0;
if (render_size == 0) {
render_size = scene->r.size;
+ } else {
+ proxy_size = render_size;
}
if (render_size < 0) {
return;
@@ -973,7 +979,7 @@ void drawprefetchseqspace(Scene *scene, ARegion *ar, SpaceSeq *sseq)
if(sseq->mainb != SEQ_DRAW_SEQUENCE) {
give_ibuf_prefetch_request(
rectx, recty, (scene->r.cfra), sseq->chanshown,
- render_size);
+ proxy_size);
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 20ad1b61981..868897b76ac 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -66,8 +66,6 @@
#include "BKE_utildefines.h"
#include "BKE_report.h"
-#include "BIF_transform.h"
-
#include "WM_api.h"
#include "WM_types.h"
@@ -82,6 +80,7 @@
#include "ED_space_api.h"
#include "ED_types.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_util.h"
#include "UI_interface.h"
@@ -105,35 +104,30 @@ static int okee() {return 0;}
/* XXX */
/* RNA Enums, used in multiple files */
EnumPropertyItem sequencer_prop_effect_types[] = {
- {SEQ_CROSS, "CROSS", "Crossfade", "Crossfade effect strip type"},
- {SEQ_ADD, "ADD", "Add", "Add effect strip type"},
- {SEQ_SUB, "SUBTRACT", "Subtract", "Subtract effect strip type"},
- {SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", "Alpha Over effect strip type"},
- {SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", "Alpha Under effect strip type"},
- {SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", "Gamma Cross effect strip type"},
- {SEQ_MUL, "MULTIPLY", "Multiply", "Multiply effect strip type"},
- {SEQ_OVERDROP, "OVER_DROP", "Alpha Over Drop", "Alpha Over Drop effect strip type"},
- {SEQ_PLUGIN, "PLUGIN", "Plugin", "Plugin effect strip type"},
- {SEQ_WIPE, "WIPE", "Wipe", "Wipe effect strip type"},
- {SEQ_GLOW, "GLOW", "Glow", "Glow effect strip type"},
- {SEQ_TRANSFORM, "TRANSFORM", "Transform", "Transform effect strip type"},
- {SEQ_COLOR, "COLOR", "Color", "Color effect strip type"},
- {SEQ_SPEED, "SPEED", "Speed", "Color effect strip type"},
- {0, NULL, NULL, NULL}
+ {SEQ_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"},
+ {SEQ_ADD, "ADD", 0, "Add", "Add effect strip type"},
+ {SEQ_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", "Alpha Over effect strip type"},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", "Alpha Under effect strip type"},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"},
+ {SEQ_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"},
+ {SEQ_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"},
+ {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", "Plugin effect strip type"},
+ {SEQ_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"},
+ {SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
+ {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
+ {SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
+ {SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
+ {0, NULL, 0, NULL, NULL}
};
/* mute operator */
-EnumPropertyItem sequencer_prop_operate_types[] = { /* better name? */
- {SEQ_SELECTED, "SELECTED", "Selected", ""},
- {SEQ_UNSELECTED, "UNSELECTED", "Unselected ", ""},
- {0, NULL, NULL, NULL}
-};
EnumPropertyItem prop_side_types[] = {
- {SEQ_SIDE_LEFT, "LEFT", "Left", ""},
- {SEQ_SIDE_RIGHT, "RIGHT", "Right", ""},
- {SEQ_SIDE_BOTH, "BOTH", "Both", ""},
- {0, NULL, NULL, NULL}
+ {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""},
+ {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
+ {SEQ_SIDE_BOTH, "BOTH", 0, "Both", ""},
+ {0, NULL, 0, NULL, NULL}
};
typedef struct TransSeq {
@@ -1492,8 +1486,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op)
if(ed==NULL)
return OPERATOR_CANCELLED;
- selected= RNA_enum_is_equal(op->ptr, "type", "SELECTED");
-
+ selected= !RNA_boolean_get(op->ptr, "unselected");
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
if ((seq->flag & SEQ_LOCK)==0) {
@@ -1529,7 +1522,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", sequencer_prop_operate_types, SEQ_SELECTED, "Type", "");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips.");
}
@@ -1544,8 +1537,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op)
if(ed==NULL)
return OPERATOR_CANCELLED;
- selected= RNA_enum_is_equal(op->ptr, "type", "SELECTED");
-
+ selected= !RNA_boolean_get(op->ptr, "unselected");
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
if ((seq->flag & SEQ_LOCK)==0) {
@@ -1581,7 +1573,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", sequencer_prop_operate_types, SEQ_SELECTED, "Type", "");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips.");
}
@@ -1726,9 +1718,9 @@ void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot)
/* cut operator */
static EnumPropertyItem prop_cut_types[] = {
- {SEQ_CUT_SOFT, "SOFT", "Soft", ""},
- {SEQ_CUT_HARD, "HARD", "Hard", ""},
- {0, NULL, NULL, NULL}
+ {SEQ_CUT_SOFT, "SOFT", 0, "Soft", ""},
+ {SEQ_CUT_HARD, "HARD", 0, "Hard", ""},
+ {0, NULL, 0, NULL, NULL}
};
static int sequencer_cut_exec(bContext *C, wmOperator *op)
@@ -1855,12 +1847,12 @@ static int sequencer_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *
return OPERATOR_FINISHED;
}
-void SEQUENCER_OT_duplicate_add(wmOperatorType *ot)
+void SEQUENCER_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Duplicate";
- ot->idname= "SEQUENCER_OT_duplicate_add";
+ ot->name= "Duplicate";
+ ot->idname= "SEQUENCER_OT_duplicate";
/* api callbacks */
ot->invoke= sequencer_add_duplicate_invoke;
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 6d61f743917..ac396440a00 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -83,7 +83,7 @@ void SEQUENCER_OT_lock(struct wmOperatorType *ot);
void SEQUENCER_OT_unlock(struct wmOperatorType *ot);
void SEQUENCER_OT_reload(struct wmOperatorType *ot);
void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot);
-void SEQUENCER_OT_duplicate_add(struct wmOperatorType *ot);
+void SEQUENCER_OT_duplicate(struct wmOperatorType *ot);
void SEQUENCER_OT_delete(struct wmOperatorType *ot);
void SEQUENCER_OT_images_separate(struct wmOperatorType *ot);
void SEQUENCER_OT_meta_toggle(struct wmOperatorType *ot);
@@ -104,7 +104,7 @@ void SEQUENCER_OT_select_linked_pick(struct wmOperatorType *ot);
void SEQUENCER_OT_select_handles(struct wmOperatorType *ot);
void SEQUENCER_OT_select_active_side(struct wmOperatorType *ot);
void SEQUENCER_OT_select_border(struct wmOperatorType *ot);
-void SEQUENCER_OT_select_invert(struct wmOperatorType *ot);
+void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot);
/* sequencer_select.c */
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index c6e5fbe39a4..f561fb2ac43 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -41,8 +41,6 @@
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
-#include "BIF_transform.h" /* transform keymap */
-
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
@@ -54,6 +52,7 @@
#include "WM_types.h"
#include "ED_screen.h"
+#include "ED_transform.h" /* transform keymap */
#include "sequencer_intern.h"
@@ -71,7 +70,7 @@ void sequencer_operatortypes(void)
WM_operatortype_append(SEQUENCER_OT_unlock);
WM_operatortype_append(SEQUENCER_OT_reload);
WM_operatortype_append(SEQUENCER_OT_refresh_all);
- WM_operatortype_append(SEQUENCER_OT_duplicate_add);
+ WM_operatortype_append(SEQUENCER_OT_duplicate);
WM_operatortype_append(SEQUENCER_OT_delete);
WM_operatortype_append(SEQUENCER_OT_images_separate);
WM_operatortype_append(SEQUENCER_OT_meta_toggle);
@@ -84,7 +83,7 @@ void sequencer_operatortypes(void)
/* sequencer_select.c */
WM_operatortype_append(SEQUENCER_OT_select_all_toggle);
- WM_operatortype_append(SEQUENCER_OT_select_invert);
+ WM_operatortype_append(SEQUENCER_OT_select_inverse);
WM_operatortype_append(SEQUENCER_OT_select);
WM_operatortype_append(SEQUENCER_OT_select_more);
WM_operatortype_append(SEQUENCER_OT_select_less);
@@ -112,23 +111,23 @@ void sequencer_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "SEQUENCER_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "SEQUENCER_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0)->ptr, "type", SEQ_CUT_SOFT);
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", SEQ_CUT_HARD);
- RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0)->ptr, "type", SEQ_SELECTED);
- RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", SEQ_UNSELECTED);
+ WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
- RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", SEQ_SELECTED);
- RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "type", SEQ_UNSELECTED);
+ WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1);
WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", HKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate_add", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", DELKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index bfd89ccdffb..335652235c6 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -244,7 +244,7 @@ void SEQUENCER_OT_select_all_toggle(struct wmOperatorType *ot)
/* (de)select operator */
-static int sequencer_select_invert_exec(bContext *C, wmOperator *op)
+static int sequencer_select_inverse_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
@@ -267,14 +267,14 @@ static int sequencer_select_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void SEQUENCER_OT_select_invert(struct wmOperatorType *ot)
+void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Invert";
- ot->idname= "SEQUENCER_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "SEQUENCER_OT_select_inverse";
/* api callbacks */
- ot->exec= sequencer_select_invert_exec;
+ ot->exec= sequencer_select_inverse_exec;
ot->poll= ED_operator_sequencer_active;
diff --git a/source/blender/editors/space_sound/Makefile b/source/blender/editors/space_sound/Makefile
index 4d375282223..a072684d543 100644
--- a/source/blender/editors/space_sound/Makefile
+++ b/source/blender/editors/space_sound/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_text/Makefile b/source/blender/editors/space_text/Makefile
index 33e12dc1abb..50871017085 100644
--- a/source/blender/editors/space_text/Makefile
+++ b/source/blender/editors/space_text/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 384ad3e919c..68848c39c25 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -285,6 +285,11 @@ static void text_keymap(struct wmWindowManager *wm)
WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_line_break", RETKEY, KM_PRESS, 0, 0);
+#ifndef DISABLE_PYTHON
+ WM_keymap_add_item(keymap, "TEXT_OT_console_exec", RETKEY, KM_PRESS, KM_SHIFT, 0); /* python operator - space_text.py */
+ WM_keymap_add_item(keymap, "TEXT_OT_console_autocomplete", RETKEY, KM_PRESS, KM_ALT, 0); /* python operator - space_text.py */
+#endif
+
WM_keymap_add_item(keymap, "TEXT_OT_line_number", KM_TEXTINPUT, KM_ANY, KM_ANY, 0);
WM_keymap_add_item(keymap, "TEXT_OT_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last!
}
@@ -293,7 +298,12 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
{
SpaceText *st= CTX_wm_space_text(C);
- if(CTX_data_equals(member, "edit_text")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {"edit_text", NULL};
+ CTX_data_dir_set(result, dir);
+ return 1;
+ }
+ else if(CTX_data_equals(member, "edit_text")) {
CTX_data_id_pointer_set(result, &st->text->id);
return 1;
}
@@ -415,8 +425,6 @@ void ED_spacetype_text(void)
art->init= text_header_area_init;
art->draw= text_header_area_draw;
-
- text_header_register(art);
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 0dfe7c9e660..9721fbc2b9c 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -41,6 +41,7 @@
#include "DNA_text_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_global.h"
#include "BKE_main.h"
@@ -94,13 +95,7 @@ static int text_font_draw_character(SpaceText *st, int x, int y, char c)
BLF_position(x, y, 0);
BLF_draw(str);
- return text_font_width_character(st);
-}
-
-int text_font_width_character(SpaceText *st)
-{
- // XXX need quick BLF function, or cache it somewhere
- return (st->lheight == 12)? 7: 8;
+ return st->cwidth;
}
int text_font_width(SpaceText *st, char *str)
@@ -114,22 +109,18 @@ static void flatten_string_append(FlattenString *fs, char c, int accum)
{
if(fs->pos>=fs->len && fs->pos>=sizeof(fs->fixedbuf)-1) {
char *nbuf; int *naccum;
- int olen= fs->len;
-
- if(olen) fs->len*= 2;
- else fs->len= 256;
-
+ if(fs->len) fs->len*= 2;
+ else fs->len= sizeof(fs->fixedbuf) * 2;
+
nbuf= MEM_callocN(sizeof(*fs->buf)*fs->len, "fs->buf");
naccum= MEM_callocN(sizeof(*fs->accum)*fs->len, "fs->accum");
+
+ memcpy(nbuf, fs->buf, fs->pos);
+ memcpy(naccum, fs->accum, fs->pos);
- if(olen) {
- memcpy(nbuf, fs->buf, olen);
- memcpy(naccum, fs->accum, olen);
-
- if(fs->buf != fs->fixedbuf) {
- MEM_freeN(fs->buf);
- MEM_freeN(fs->accum);
- }
+ if(fs->buf != fs->fixedbuf) {
+ MEM_freeN(fs->buf);
+ MEM_freeN(fs->accum);
}
fs->buf= nbuf;
@@ -139,8 +130,7 @@ static void flatten_string_append(FlattenString *fs, char c, int accum)
fs->buf[fs->pos]= c;
fs->accum[fs->pos]= accum;
- if(c==0) fs->pos= 0;
- else fs->pos++;
+ fs->pos++;
}
int flatten_string(SpaceText *st, FlattenString *fs, char *in)
@@ -522,7 +512,7 @@ int wrap_width(SpaceText *st, ARegion *ar)
int x, max;
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
- max= (ar->winx-x)/text_font_width_character(st);
+ max= (ar->winx-x)/st->cwidth;
return max>8 ? max : 8;
}
@@ -614,7 +604,7 @@ static int text_draw_wrapped(SpaceText *st, char *str, int x, int y, int w, char
len= flatten_string(st, &fs, str);
str= fs.buf;
- max= w/text_font_width_character(st);
+ max= w/st->cwidth;
if(max<8) max= 8;
basex= x;
@@ -686,7 +676,7 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra
}
else {
while(w-- && *acc++ < maxwidth)
- r+= text_font_width_character(st);
+ r+= st->cwidth;
}
flatten_string_free(&fs);
@@ -701,7 +691,7 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra
/************************ draw scrollbar *****************************/
-static void calc_text_rcts(SpaceText *st, ARegion *ar)
+static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll)
{
int lhlstart, lhlend, ltexth;
short barheight, barstart, hlstart, hlend, blank_lines;
@@ -713,6 +703,12 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar)
ltexth= txt_get_span(st->text->lines.first, st->text->lines.last);
blank_lines = st->viewlines / 2;
+ /* nicer code: use scroll rect for entire bar */
+ scroll->xmin= 5;
+ scroll->xmax= 17;
+ scroll->ymin= 4;
+ scroll->ymax= 4+pix_available;
+
/* when resizing a vieport with the bar at the bottom to a greater height more blank lines will be added */
if(ltexth + blank_lines < st->top + st->viewlines) {
blank_lines = st->top + st->viewlines - ltexth;
@@ -728,9 +724,8 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar)
}
barstart = (ltexth > 0)? ((pix_available - pix_bardiff) * st->top)/ltexth: 0;
- st->txtbar.xmin = 5;
- st->txtbar.xmax = 17;
- st->txtbar.ymax = ar->winy - pix_top_margin - barstart;
+ st->txtbar= *scroll;
+ st->txtbar.ymax -= barstart;
st->txtbar.ymin = st->txtbar.ymax - barheight;
CLAMP(st->txtbar.ymin, pix_bottom_margin, ar->winy - pix_top_margin);
@@ -796,8 +791,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar)
hlend = hlstart + 2;
}
- st->txtscroll.xmin= 5;
- st->txtscroll.xmax= 17;
+ st->txtscroll= *scroll;
st->txtscroll.ymax= ar->winy - pix_top_margin - hlstart;
st->txtscroll.ymin= ar->winy - pix_top_margin - hlend;
@@ -805,19 +799,31 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar)
CLAMP(st->txtscroll.ymax, pix_bottom_margin, ar->winy - pix_top_margin);
}
-static void draw_textscroll(SpaceText *st, ARegion *ar)
+static void draw_textscroll(SpaceText *st, ARegion *ar, rcti *scroll)
{
- UI_ThemeColorShade(TH_SHADE1, -20);
- glRecti(2, 2, 20, ar->winy-6);
- uiEmboss(2, 2, 20, ar->winy-6, 1);
-
- UI_ThemeColor(TH_SHADE1);
- glRecti(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax);
+ bTheme *btheme= U.themes.first;
+ uiWidgetColors wcol= btheme->tui.wcol_scroll;
+ char col[3];
+ float rad;
+
+// UI_ThemeColorShade(TH_SHADE1, -20);
+// glRecti(2, 2, 20, ar->winy-6);
+// uiEmboss(2, 2, 20, ar->winy-6, 1);
- UI_ThemeColor(TH_SHADE2);
- glRecti(st->txtscroll.xmin, st->txtscroll.ymin, st->txtscroll.xmax, st->txtscroll.ymax);
+// UI_ThemeColor(TH_SHADE1);
+// glRecti(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax);
- uiEmboss(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax, st->flags & ST_SCROLL_SELECT);
+// uiEmboss(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax, st->flags & ST_SCROLL_SELECT);
+
+ uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT)?UI_SCROLL_PRESSED:0);
+
+ uiSetRoundBox(15);
+ rad= 0.4f*MIN2(st->txtscroll.xmax - st->txtscroll.xmin, st->txtscroll.ymax - st->txtscroll.ymin);
+ UI_GetThemeColor3ubv(TH_HILITE, col);
+ glColor4ub(col[0], col[1], col[2], 48);
+ glEnable(GL_BLEND);
+ uiRoundBox(st->txtscroll.xmin+1, st->txtscroll.ymin, st->txtscroll.xmax-1, st->txtscroll.ymax, rad);
+ glDisable(GL_BLEND);
}
/************************** draw markers **************************/
@@ -860,18 +866,18 @@ static void draw_markers(SpaceText *st, ARegion *ar)
if(y1==y2) {
y -= y1*st->lheight;
glBegin(GL_LINE_LOOP);
- glVertex2i(x+x2*text_font_width_character(st)+1, y);
- glVertex2i(x+x1*text_font_width_character(st)-2, y);
- glVertex2i(x+x1*text_font_width_character(st)-2, y-st->lheight);
- glVertex2i(x+x2*text_font_width_character(st)+1, y-st->lheight);
+ glVertex2i(x+x2*st->cwidth+1, y);
+ glVertex2i(x+x1*st->cwidth-2, y);
+ glVertex2i(x+x1*st->cwidth-2, y-st->lheight);
+ glVertex2i(x+x2*st->cwidth+1, y-st->lheight);
glEnd();
}
else {
y -= y1*st->lheight;
glBegin(GL_LINE_STRIP);
glVertex2i(ar->winx, y);
- glVertex2i(x+x1*text_font_width_character(st)-2, y);
- glVertex2i(x+x1*text_font_width_character(st)-2, y-st->lheight);
+ glVertex2i(x+x1*st->cwidth-2, y);
+ glVertex2i(x+x1*st->cwidth-2, y-st->lheight);
glVertex2i(ar->winx, y-st->lheight);
glEnd();
y-=st->lheight;
@@ -888,8 +894,8 @@ static void draw_markers(SpaceText *st, ARegion *ar)
glBegin(GL_LINE_STRIP);
glVertex2i(x, y);
- glVertex2i(x+x2*text_font_width_character(st)+1, y);
- glVertex2i(x+x2*text_font_width_character(st)+1, y-st->lheight);
+ glVertex2i(x+x2*st->cwidth+1, y);
+ glVertex2i(x+x2*st->cwidth+1, y-st->lheight);
glVertex2i(x, y-st->lheight);
glEnd();
}
@@ -923,18 +929,18 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
if(l<0) return;
if(st->showlinenrs) {
- x= text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
+ x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
- x= text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET - 4;
+ x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4;
}
if(texttool_suggest_first()) {
- x += SUGG_LIST_WIDTH*text_font_width_character(st) + 50;
+ x += SUGG_LIST_WIDTH*st->cwidth + 50;
}
top= y= ar->winy - st->lheight*l - 2;
len= strlen(docs);
- boxw= DOC_WIDTH*text_font_width_character(st) + 20;
+ boxw= DOC_WIDTH*st->cwidth + 20;
boxh= (DOC_HEIGHT+1)*st->lheight;
/* Draw panel */
@@ -1017,14 +1023,14 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
if(l<0) return;
if(st->showlinenrs) {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4;
}
y = ar->winy - st->lheight*l - 2;
- boxw = SUGG_LIST_WIDTH*text_font_width_character(st) + 20;
+ boxw = SUGG_LIST_WIDTH*st->cwidth + 20;
boxh = SUGG_LIST_SIZE*st->lheight + 8;
UI_ThemeColor(TH_SHADE1);
@@ -1094,9 +1100,9 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
if(vcurl==vsell) {
y -= vcurl*st->lheight;
if(vcurc < vselc)
- glRecti(x+vcurc*text_font_width_character(st)-1, y, x+vselc*text_font_width_character(st), y-st->lheight);
+ glRecti(x+vcurc*st->cwidth-1, y, x+vselc*st->cwidth, y-st->lheight);
else
- glRecti(x+vselc*text_font_width_character(st)-1, y, x+vcurc*text_font_width_character(st), y-st->lheight);
+ glRecti(x+vselc*st->cwidth-1, y, x+vcurc*st->cwidth, y-st->lheight);
}
else {
int froml, fromc, tol, toc;
@@ -1111,11 +1117,11 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
}
y -= froml*st->lheight;
- glRecti(x+fromc*text_font_width_character(st)-1, y, ar->winx, y-st->lheight); y-=st->lheight;
+ glRecti(x+fromc*st->cwidth-1, y, ar->winx, y-st->lheight); y-=st->lheight;
for(i=froml+1; i<tol; i++)
glRecti(x-4, y, ar->winx, y-st->lheight), y-=st->lheight;
- glRecti(x-4, y, x+toc*text_font_width_character(st), y-st->lheight); y-=st->lheight;
+ glRecti(x-4, y, x+toc*st->cwidth, y-st->lheight); y-=st->lheight;
}
}
else {
@@ -1132,13 +1138,13 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
if(!hidden) {
/* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
- x += vselc*text_font_width_character(st);
+ x += vselc*st->cwidth;
y= ar->winy-2 - vsell*st->lheight;
if(st->overwrite) {
char ch= text->sell->line[text->selc];
if(!ch) ch= ' ';
- w= text_font_width_character(st);
+ w= st->cwidth;
UI_ThemeColor(TH_HILITE);
glRecti(x, y-st->lheight-1, x+w, y-st->lheight+1);
}
@@ -1238,8 +1244,8 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
if(viewc >= 0){
viewl= txt_get_span(text->lines.first, startl) - st->top + offl;
- text_font_draw_character(st, x+viewc*text_font_width_character(st), y-viewl*st->lheight, ch);
- text_font_draw_character(st, x+viewc*text_font_width_character(st)+1, y-viewl*st->lheight, ch);
+ text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch);
+ text_font_draw_character(st, x+viewc*st->cwidth+1, y-viewl*st->lheight, ch);
}
/* draw closing bracket */
@@ -1250,8 +1256,8 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
if(viewc >= 0) {
viewl= txt_get_span(text->lines.first, endl) - st->top + offl;
- text_font_draw_character(st, x+viewc*text_font_width_character(st), y-viewl*st->lheight, ch);
- text_font_draw_character(st, x+viewc*text_font_width_character(st)+1, y-viewl*st->lheight, ch);
+ text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch);
+ text_font_draw_character(st, x+viewc*st->cwidth+1, y-viewl*st->lheight, ch);
}
}
@@ -1261,6 +1267,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
{
Text *text= st->text;
TextLine *tmp;
+ rcti scroll;
char linenr[12];
int i, x, y, linecount= 0;
@@ -1276,7 +1283,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
else st->viewlines= 0;
/* update rects for scroll */
- calc_text_rcts(st, ar);
+ calc_text_rcts(st, ar, &scroll); /* scroll will hold the entire bar size */
/* update syntax formatting if needed */
tmp= text->lines.first;
@@ -1288,13 +1295,23 @@ void draw_text_main(SpaceText *st, ARegion *ar)
linecount++;
}
+ text_font_begin(st);
+ st->cwidth= BLF_fixed_width();
+ st->cwidth= MAX2(st->cwidth, 1);
+
/* draw line numbers background */
if(st->showlinenrs) {
+ st->linenrs_tot = (int)floor(log10((float)(linecount + st->viewlines))) + 1;
+ x= TXT_OFFSET + TEXTXLOC;
+
UI_ThemeColor(TH_GRID);
- glRecti(23, 0, (st->lheight==15)? 63: 59, ar->winy - 2);
+ glRecti((TXT_OFFSET-12), 0, (TXT_OFFSET-5) + TEXTXLOC, ar->winy - 2);
}
-
- text_font_begin(st);
+ else {
+ st->linenrs_tot= 0; /* not used */
+ x= TXT_OFFSET;
+ }
+ y= ar->winy-st->lheight;
/* draw cursor */
draw_cursor(st, ar);
@@ -1302,9 +1319,6 @@ void draw_text_main(SpaceText *st, ARegion *ar)
/* draw the text */
UI_ThemeColor(TH_TEXT);
- y= ar->winy-st->lheight;
- x= (st->showlinenrs)? TXT_OFFSET + TEXTXLOC: TXT_OFFSET;
-
for(i=0; y>0 && i<st->viewlines && tmp; i++, tmp= tmp->next) {
if(st->showsyntax && !tmp->format)
txt_format_line(st, tmp, 0);
@@ -1316,14 +1330,9 @@ void draw_text_main(SpaceText *st, ARegion *ar)
else
UI_ThemeColor(TH_TEXT);
- if(((float)(i + linecount + 1)/10000.0) < 1.0) {
- sprintf(linenr, "%4d", i + linecount + 1);
- text_font_draw(st, TXT_OFFSET - 7, y, linenr);
- }
- else {
- sprintf(linenr, "%5d", i + linecount + 1);
- text_font_draw(st, TXT_OFFSET - 11, y, linenr);
- }
+ sprintf(linenr, "%d", i + linecount + 1);
+ /* itoa(i + linecount + 1, linenr, 10); */ /* not ansi-c :/ */
+ text_font_draw(st, TXT_OFFSET - 7, y, linenr);
UI_ThemeColor(TH_TEXT);
}
@@ -1343,7 +1352,8 @@ void draw_text_main(SpaceText *st, ARegion *ar)
/* draw other stuff */
draw_brackets(st, ar);
draw_markers(st, ar);
- draw_textscroll(st, ar);
+ glTranslatef(0.375f, 0.375f, 0.0f); /* XXX scroll requires exact pixel space */
+ draw_textscroll(st, ar, &scroll);
draw_documentation(st, ar);
draw_suggestion_list(st, ar);
@@ -1352,6 +1362,14 @@ void draw_text_main(SpaceText *st, ARegion *ar)
/************************** update ***************************/
+void text_update_character_width(SpaceText *st)
+{
+ text_font_begin(st);
+ st->cwidth= BLF_fixed_width();
+ st->cwidth= MAX2(st->cwidth, 1);
+ text_font_end(st);
+}
+
/* Moves the view to the cursor location,
also used to make sure the view isnt outside the file */
void text_update_cursor_moved(SpaceText *st, ARegion *ar)
@@ -1361,6 +1379,8 @@ void text_update_cursor_moved(SpaceText *st, ARegion *ar)
if(!text || !text->curl) return;
+ text_update_character_width(st);
+
i= txt_get_span(text->lines.first, text->sell);
if(st->top+st->viewlines <= i || st->top > i)
st->top= i - st->viewlines/2;
@@ -1372,7 +1392,7 @@ void text_update_cursor_moved(SpaceText *st, ARegion *ar)
x= text_draw(st, text->sell->line, st->left, text->selc, 0, 0, 0, NULL);
if(x==0 || x>ar->winx)
- st->left= text->curc-0.5*(ar->winx)/text_font_width_character(st);
+ st->left= text->curc-0.5*(ar->winx)/st->cwidth;
}
if(st->top < 0) st->top= 0;
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index fe00b86e19f..c761587198f 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -88,6 +88,7 @@
/* ************************ header area region *********************** */
#ifndef DISABLE_PYTHON
+#if 0
static void do_text_template_scriptsmenu(bContext *C, void *arg, int event)
{
// XXX BPY_menu_do_python(PYMENU_SCRIPTTEMPLATE, event);
@@ -154,101 +155,7 @@ static uiBlock *text_plugin_scriptsmenu(bContext *C, void *args_unused)
return block;
}
#endif
-
-static void text_editmenu_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemEnumO(layout, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP);
- uiItemEnumO(layout, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM);
-}
-
-static void text_editmenu_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemO(layout, NULL, 0, "TEXT_OT_select_all");
- uiItemO(layout, NULL, 0, "TEXT_OT_select_line");
-}
-
-static void text_editmenu_markermenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemO(layout, NULL, 0, "TEXT_OT_markers_clear");
- uiItemO(layout, NULL, 0, "TEXT_OT_next_marker");
- uiItemO(layout, NULL, 0, "TEXT_OT_previous_marker");
-}
-
-static void text_formatmenu(const bContext *C, Menu *menu)
-{
- uiLayout *layout= menu->layout;
-
- uiItemO(layout, NULL, 0, "TEXT_OT_indent");
- uiItemO(layout, NULL, 0, "TEXT_OT_unindent");
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "TEXT_OT_comment");
- uiItemO(layout, NULL, 0, "TEXT_OT_uncomment");
-
- uiItemS(layout);
-
- uiItemMenuEnumO(layout, NULL, 0, "TEXT_OT_convert_whitespace", "type");
-}
-
-static void text_editmenu_to3dmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiItemBooleanO(layout, "One Object", 0, "TEXT_OT_to_3d_object", "split_lines", 0);
- uiItemBooleanO(layout, "One Object Per Line", 0, "TEXT_OT_to_3d_object", "split_lines", 1);
-}
-
-static int text_menu_edit_poll(bContext *C)
-{
- return (CTX_data_edit_text(C) != NULL);
-}
-
-static void text_editmenu(const bContext *C, Menu *menu)
-{
- uiLayout *layout= menu->layout;
-
- uiItemO(layout, NULL, 0, "ED_OT_undo");
- uiItemO(layout, NULL, 0, "ED_OT_redo");
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "TEXT_OT_cut");
- uiItemO(layout, NULL, 0, "TEXT_OT_copy");
- uiItemO(layout, NULL, 0, "TEXT_OT_paste");
-
- uiItemS(layout);
-
- uiItemMenuF(layout, "View", 0, text_editmenu_viewmenu);
- uiItemMenuF(layout, "Select", 0, text_editmenu_selectmenu);
- uiItemMenuF(layout, "Markers", 0, text_editmenu_markermenu);
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "TEXT_OT_jump");
- uiItemO(layout, NULL, 0, "TEXT_OT_properties");
-
- uiItemS(layout);
-
- uiItemMenuF(layout, "Text to 3D Object", 0, text_editmenu_to3dmenu);
-}
-
-/********************** header buttons ***********************/
-
-void text_header_register(ARegionType *art)
-{
- MenuType *mt;
-
- mt= MEM_callocN(sizeof(MenuType), "spacetype text menu edit");
- strcpy(mt->idname, "TEXT_MT_edit");
- strcpy(mt->label, "Edit");
- mt->draw= text_editmenu;
- BLI_addhead(&art->menutypes, mt);
-
- mt= MEM_callocN(sizeof(MenuType), "spacetype text menu format");
- strcpy(mt->idname, "TEXT_MT_format");
- strcpy(mt->label, "Format");
- mt->draw= text_formatmenu;
- BLI_addhead(&art->menutypes, mt);
-}
+#endif
/************************** properties ******************************/
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 259811aee0f..cb425274fc0 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -41,9 +41,6 @@ struct TextLine;
struct wmOperatorType;
struct wmWindowManager;
-/* text_header.c */
-void text_header_register(struct ARegionType *art);
-
/* text_draw.c */
void draw_text_main(struct SpaceText *st, struct ARegion *ar);
@@ -58,9 +55,10 @@ int text_font_width(struct SpaceText *st, char *str);
void text_update_line_edited(struct Text *text, struct TextLine *line);
void text_update_edited(struct Text *text);
+void text_update_character_width(struct SpaceText *st);
void text_update_cursor_moved(struct SpaceText *st, struct ARegion *ar);
-#define TEXTXLOC 38
+#define TEXTXLOC (st->cwidth * st->linenrs_tot)
#define SUGG_LIST_SIZE 7
#define SUGG_LIST_WIDTH 20
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 065b4ffcc48..e6d97071ef5 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -248,8 +248,6 @@ static int reload_exec(bContext *C, wmOperator *op)
#ifndef DISABLE_PYTHON
if(text->compiled)
BPY_free_compiled_text(text);
-
- text->compiled = NULL;
#endif
text_update_edited(text);
@@ -521,10 +519,13 @@ static int run_script_exec(bContext *C, wmOperator *op)
#else
Text *text= CTX_data_edit_text(C);
- if (BPY_run_python_script( C, NULL, text ))
+ if (BPY_run_python_script(C, NULL, text, op->reports))
return OPERATOR_FINISHED;
- BKE_report(op->reports, RPT_ERROR, "Python script fail, look in the console for now...");
+ /* Dont report error messages while live editing */
+ if(!CTX_wm_space_text(C)->live_edit)
+ BKE_report(op->reports, RPT_ERROR, "Python script fail, look in the console for now...");
+
return OPERATOR_CANCELLED;
#endif
}
@@ -699,6 +700,10 @@ static int paste_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
+ /* run the script while editing, evil but useful */
+ if(CTX_wm_space_text(C)->live_edit)
+ run_script_exec(C, op);
+
return OPERATOR_FINISHED;
}
@@ -765,6 +770,10 @@ static int cut_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
+ /* run the script while editing, evil but useful */
+ if(CTX_wm_space_text(C)->live_edit)
+ run_script_exec(C, op);
+
return OPERATOR_FINISHED;
}
@@ -961,9 +970,9 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
enum { TO_SPACES, TO_TABS };
static EnumPropertyItem whitespace_type_items[]= {
- {TO_SPACES, "SPACES", "To Spaces", NULL},
- {TO_TABS, "TABS", "To Tabs", NULL},
- {0, NULL, NULL, NULL}};
+ {TO_SPACES, "SPACES", 0, "To Spaces", NULL},
+ {TO_TABS, "TABS", 0, "To Tabs", NULL},
+ {0, NULL, 0, NULL, NULL}};
static int convert_whitespace_exec(bContext *C, wmOperator *op)
{
@@ -1259,25 +1268,27 @@ void TEXT_OT_markers_clear(wmOperatorType *ot)
/************************ move operator ************************/
static EnumPropertyItem move_type_items[]= {
- {LINE_BEGIN, "LINE_BEGIN", "Line Begin", ""},
- {LINE_END, "LINE_END", "Line End", ""},
- {FILE_TOP, "FILE_TOP", "File Top", ""},
- {FILE_BOTTOM, "FILE_BOTTOM", "File Bottom", ""},
- {PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
- {NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
- {PREV_WORD, "PREVIOUS_WORD", "Previous Word", ""},
- {NEXT_WORD, "NEXT_WORD", "Next Word", ""},
- {PREV_LINE, "PREVIOUS_LINE", "Previous Line", ""},
- {NEXT_LINE, "NEXT_LINE", "Next Line", ""},
- {PREV_PAGE, "PREVIOUS_PAGE", "Previous Page", ""},
- {NEXT_PAGE, "NEXT_PAGE", "Next Page", ""},
- {0, NULL, NULL, NULL}};
+ {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
+ {LINE_END, "LINE_END", 0, "Line End", ""},
+ {FILE_TOP, "FILE_TOP", 0, "File Top", ""},
+ {FILE_BOTTOM, "FILE_BOTTOM", 0, "File Bottom", ""},
+ {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+ {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+ {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
+ {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
+ {PREV_LINE, "PREVIOUS_LINE", 0, "Previous Line", ""},
+ {NEXT_LINE, "NEXT_LINE", 0, "Next Line", ""},
+ {PREV_PAGE, "PREVIOUS_PAGE", 0, "Previous Page", ""},
+ {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""},
+ {0, NULL, 0, NULL, NULL}};
static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
{
Text *text= st->text;
int offl, offc, lin;
+ text_update_character_width(st);
+
lin= txt_get_span(text->lines.first, text->sell);
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
@@ -1296,6 +1307,8 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
Text *text= st->text;
int offl, offc, lin, startl, c;
+ text_update_character_width(st);
+
lin= txt_get_span(text->lines.first, text->sell);
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
startl= offl;
@@ -1320,6 +1333,8 @@ static void wrap_move_up(SpaceText *st, ARegion *ar, short sel)
Text *text= st->text;
int offl, offl_1, offc, fromline, toline, c, target;
+ text_update_character_width(st);
+
wrap_offset(st, ar, text->sell, 0, &offl_1, &offc);
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
fromline= toline= txt_get_span(text->lines.first, text->sell);
@@ -1365,6 +1380,8 @@ static void wrap_move_down(SpaceText *st, ARegion *ar, short sel)
Text *text= st->text;
int offl, startoff, offc, fromline, toline, c, target;
+ text_update_character_width(st);
+
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
fromline= toline= txt_get_span(text->lines.first, text->sell);
target= text->selc + offc;
@@ -1602,11 +1619,11 @@ void TEXT_OT_jump(wmOperatorType *ot)
/******************* delete operator **********************/
static EnumPropertyItem delete_type_items[]= {
- {DEL_NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
- {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
- {DEL_NEXT_WORD, "NEXT_WORD", "Next Word", ""},
- {DEL_PREV_WORD, "PREVIOUS_WORD", "Previous Word", ""},
- {0, NULL, NULL, NULL}};
+ {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+ {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+ {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
+ {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
+ {0, NULL, 0, NULL, NULL}};
static int delete_exec(bContext *C, wmOperator *op)
{
@@ -1627,6 +1644,10 @@ static int delete_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
+ /* run the script while editing, evil but useful */
+ if(CTX_wm_space_text(C)->live_edit)
+ run_script_exec(C, op);
+
return OPERATOR_FINISHED;
}
@@ -1739,6 +1760,8 @@ static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
TextScroll *tsc= op->customdata;
short *mval= event->mval;
+ text_update_character_width(st);
+
if(tsc->first) {
tsc->old[0]= mval[0];
tsc->old[1]= mval[1];
@@ -1748,7 +1771,7 @@ static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
}
if(!tsc->scrollbar) {
- tsc->delta[0]= (tsc->hold[0]-mval[0])/text_font_width_character(st);
+ tsc->delta[0]= (tsc->hold[0]-mval[0])/st->cwidth;
tsc->delta[1]= (mval[1]-tsc->hold[1])/st->lheight;
}
else
@@ -1821,6 +1844,9 @@ void TEXT_OT_scroll(wmOperatorType *ot)
ot->cancel= scroll_cancel;
ot->poll= text_space_edit_poll;
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
+
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100);
}
@@ -1865,6 +1891,9 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
ot->cancel= scroll_cancel;
ot->poll= text_region_edit_poll;
+ /* flags */
+ ot->flag= OPTYPE_BLOCKING;
+
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100);
}
@@ -1885,6 +1914,8 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
int *charp;
int w;
+ text_update_character_width(st);
+
if(sel) { linep= &text->sell; charp= &text->selc; }
else { linep= &text->curl; charp= &text->curc; }
@@ -1896,7 +1927,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
x-= TXT_OFFSET;
if(x<0) x= 0;
- x = (x/text_font_width_character(st)) + st->left;
+ x = (x/st->cwidth) + st->left;
if(st->wordwrap) {
int i, j, endj, curs, max, chop, start, end, chars, loop;
@@ -2136,7 +2167,7 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
ot->poll= text_region_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
/* properties */
RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor.");
@@ -2196,19 +2227,21 @@ static int insert_exec(bContext *C, wmOperator *op)
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
char *str;
- int done, ascii;
+ int done = 0, i;
str= RNA_string_get_alloc(op->ptr, "text", NULL, 0);
- ascii= str[0];
- MEM_freeN(str);
- if(!ascii)
- return OPERATOR_CANCELLED;
+ if(st && st->overwrite) {
+ for(i=0; str[i]; i++) {
+ done |= txt_replace_char(text, str[i]);
+ }
+ } else {
+ for(i=0; str[i]; i++) {
+ done |= txt_add_char(text, str[i]);
+ }
+ }
- if(st && st->overwrite)
- done= txt_replace_char(text, ascii);
- else
- done= txt_add_char(text, ascii);
+ MEM_freeN(str);
if(!done)
return OPERATOR_CANCELLED;
@@ -2224,7 +2257,7 @@ static int insert_exec(bContext *C, wmOperator *op)
static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
char str[2];
-
+ int ret;
/* XXX old code from winqreadtextspace, is it still needed somewhere? */
/* smartass code to prevent the CTRL/ALT events below from not working! */
/*if(qual & (LR_ALTKEY|LR_CTRLKEY))
@@ -2235,8 +2268,13 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
str[1]= '\0';
RNA_string_set(op->ptr, "text", str);
+ ret = insert_exec(C, op);
+
+ /* run the script while editing, evil but useful */
+ if(ret==OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit)
+ run_script_exec(C, op);
- return insert_exec(C, op);
+ return ret;
}
void TEXT_OT_insert(wmOperatorType *ot)
@@ -2449,11 +2487,11 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
enum { RESOLVE_IGNORE, RESOLVE_RELOAD, RESOLVE_SAVE, RESOLVE_MAKE_INTERNAL };
static EnumPropertyItem resolution_items[]= {
- {RESOLVE_IGNORE, "IGNORE", "Ignore", ""},
- {RESOLVE_RELOAD, "RELOAD", "Reload", ""},
- {RESOLVE_SAVE, "SAVE", "Save", ""},
- {RESOLVE_MAKE_INTERNAL, "MAKE_INTERNAL", "Make Internal", ""},
- {0, NULL, NULL, NULL}};
+ {RESOLVE_IGNORE, "IGNORE", 0, "Ignore", ""},
+ {RESOLVE_RELOAD, "RELOAD", 0, "Reload", ""},
+ {RESOLVE_SAVE, "SAVE", 0, "Save", ""},
+ {RESOLVE_MAKE_INTERNAL, "MAKE_INTERNAL", 0, "Make Internal", ""},
+ {0, NULL, 0, NULL, NULL}};
/* returns 0 if file on disk is the same or Text is in memory only
returns 1 if file has been modified on disk since last local edit
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 4fa54cdf27b..b606f8cb141 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -66,16 +66,18 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
/* Count the visible lines to the cursor */
for(tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
if(l<0) return 0;
+
+ text_update_character_width(st);
if(st->showlinenrs) {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4;
}
y = ar->winy - st->lheight*l - 2;
- w = SUGG_LIST_WIDTH*text_font_width_character(st) + 20;
+ w = SUGG_LIST_WIDTH*st->cwidth + 20;
h = SUGG_LIST_SIZE*st->lheight + 8;
// XXX getmouseco_areawin(mval);
diff --git a/source/blender/editors/space_time/Makefile b/source/blender/editors/space_time/Makefile
index 20877b48559..e0bf3943dd8 100644
--- a/source/blender/editors/space_time/Makefile
+++ b/source/blender/editors/space_time/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c
index cf9c12f3dff..9ffce53e572 100644
--- a/source/blender/editors/space_time/time_header.c
+++ b/source/blender/editors/space_time/time_header.c
@@ -373,6 +373,7 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused)
#define B_REDRAWALL 750
#define B_TL_REW 751
#define B_TL_PLAY 752
+#define B_TL_RPLAY 760
#define B_TL_FF 753
#define B_TL_PREVKEY 754
#define B_TL_NEXTKEY 755
@@ -416,6 +417,18 @@ void do_time_buttons(bContext *C, void *arg, int event)
}
break;
+ case B_TL_RPLAY:
+ ED_screen_animation_timer(C, stime->redraws, -1);
+
+ /* update region if TIME_REGION was set, to leftmost 3d window */
+ if(screen->animtimer && (stime->redraws & TIME_REGION)) {
+ wmTimer *wt= screen->animtimer;
+ ScreenAnimData *sad= wt->customdata;
+
+ sad->ar= time_top_left_3dwindow(screen);
+ }
+
+ break;
case B_TL_STOP:
ED_screen_animation_timer(C, 0, 0);
break;
@@ -536,9 +549,12 @@ void time_header_buttons(const bContext *C, ARegion *ar)
xco += (short)(4.5 * XIC + 16);
+ /* 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)3.5*XIC,YIC,
- &(scene->r.cfra), MINFRAMEF, MAXFRAMEF, 0, 0,
+ &(scene->r.cfra), MINAFRAMEF, MAXFRAMEF, 0, 0,
"Displays Current Frame of animation");
xco += (short)(3.5 * XIC + 16);
@@ -550,14 +566,27 @@ void time_header_buttons(const bContext *C, ARegion *ar)
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to previous keyframe (Ctrl PageDown)");
xco+= XIC+4;
- if(CTX_wm_screen(C)->animtimer)
+ if(CTX_wm_screen(C)->animtimer) {
+ /* pause button is drawn centered between the two other buttons for now (saves drawing 2 buttons, or having position changes) */
+ xco+= XIC/2 + 2;
+
uiDefIconBut(block, BUT, B_TL_STOP, ICON_PAUSE,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Stop Playing Timeline");
- else
+
+ xco+= XIC/2 + 2;
+ }
+ else {
+ // FIXME: the icon for this is crap
+ uiDefIconBut(block, BUT, B_TL_RPLAY, ICON_REW/*ICON_PLAY*/,
+ xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Play Timeline in Reverse");
+
+ xco+= XIC+4;
+
uiDefIconBut(block, BUT, B_TL_PLAY, ICON_PLAY,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Play Timeline ");
-
+ }
xco+= XIC+4;
+
uiDefIconBut(block, BUT, B_TL_NEXTKEY, ICON_NEXT_KEYFRAME,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to next keyframe (Ctrl PageUp)");
xco+= XIC+4;
@@ -567,12 +596,12 @@ void time_header_buttons(const bContext *C, ARegion *ar)
uiBlockBeginAlign(block);
uiDefIconButBitS(block, TOG, AUTOKEY_ON, B_REDRAWALL, ICON_REC,
- xco, yco, XIC, YIC, &(scene->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones");
+ xco, yco, XIC, YIC, &(scene->toolsettings->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones");
xco+= XIC;
if (IS_AUTOKEY_ON(scene)) {
uiDefButS(block, MENU, B_REDRAWALL,
"Auto-Keying Mode %t|Add/Replace Keys%x3|Replace Keys %x5",
- xco, yco, (int)5.5*XIC, YIC, &(scene->autokey_mode), 0, 1, 0, 0,
+ xco, yco, (int)5.5*XIC, YIC, &(scene->toolsettings->autokey_mode), 0, 1, 0, 0,
"Mode of automatic keyframe insertion for Objects and Bones");
xco+= (6*XIC);
}
diff --git a/source/blender/editors/space_view3d/Makefile b/source/blender/editors/space_view3d/Makefile
index dd4eab89411..5e6f8a6c426 100644
--- a/source/blender/editors/space_view3d/Makefile
+++ b/source/blender/editors/space_view3d/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript
index c4ca73cffbd..b90ac30cd41 100644
--- a/source/blender/editors/space_view3d/SConscript
+++ b/source/blender/editors/space_view3d/SConscript
@@ -2,10 +2,14 @@
Import ('env')
sources = env.Glob('*.c')
+defs = []
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna ../../blenfont ../../bmesh '
-env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), [], libtype=['core'], priority=[40] )
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('GAMEBLENDER=1')
+
+env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), defines = defs, libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 68a9bf3f555..ec3b716e616 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -37,6 +37,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_anim_types.h"
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
@@ -52,6 +53,7 @@
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
+#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_constraint.h"
@@ -61,6 +63,7 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
@@ -1812,7 +1815,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();
}
@@ -1996,7 +1999,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();
}
@@ -2019,10 +2022,9 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
*/
static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
{
+ AnimData *adt= BKE_animdata_from_id(&ob->id);
bArmature *arm= ob->data;
bPoseChannel *pchan;
- // bAction *act; // XXX old animsys - watch it!
- // bActionChannel *achan;
ActKeyColumn *ak;
ListBase keys;
float *fp, *fp_start;
@@ -2168,14 +2170,11 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
/* build list of all keyframes in active action for pchan */
keys.first = keys.last = NULL;
- #if 0 // XXX old animation system
- act= ob->action;
- if (act) {
- achan= get_action_channel(act, pchan->name);
- if (achan)
- ipo_to_keylist(achan->ipo, &keys, NULL, NULL);
+ if (adt) {
+ bActionGroup *agrp= action_groups_find_named(adt->action, pchan->name);
+ if (agrp)
+ agroup_to_keylist(adt, agrp, &keys, NULL);
}
- #endif // XXX old animation system
/* Draw slightly-larger yellow dots at each keyframe */
UI_ThemeColor(TH_VERTEX_SELECT);
@@ -2254,6 +2253,7 @@ static void ghost_poses_tag_unselected(Object *ob, short unset)
static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
{
Object *ob= base->object;
+ AnimData *adt= BKE_animdata_from_id(&ob->id);
bArmature *arm= ob->data;
bPose *posen, *poseo;
float start, end, stepsize, range, colfac;
@@ -2290,7 +2290,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d
colfac = (end - (float)CFRA) / range;
UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128-(int)(120.0*sqrt(colfac)));
- //do_all_pose_actions(scene, ob); // XXX old animation system
+ BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE);
}
@@ -2315,22 +2315,22 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, RegionView3D *rv3d
static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
{
Object *ob= base->object;
- bAction *act= ob->action; // XXX old animsys stuff... watch it!
+ AnimData *adt= BKE_animdata_from_id(&ob->id);
+ bAction *act= (adt) ? adt->action : NULL;
bArmature *arm= ob->data;
bPose *posen, *poseo;
ListBase keys= {NULL, NULL};
- ActKeysInc aki = {0, 0, 0};
ActKeyColumn *ak, *akn;
float start, end, range, colfac, i;
int cfrao, flago;
- aki.start= start = (float)arm->ghostsf;
- aki.end= end = (float)arm->ghostef;
+ start = (float)arm->ghostsf;
+ end = (float)arm->ghostef;
if (end <= start)
return;
/* get keyframes - then clip to only within range */
- action_to_keylist(act, &keys, NULL, &aki);
+ action_to_keylist(adt, act, &keys, NULL);
range= 0;
for (ak= keys.first; ak; ak= akn) {
akn= ak->next;
@@ -2366,7 +2366,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d,
CFRA= (int)ak->cfra;
- //do_all_pose_actions(scene, ob); // XXX old animation system
+ BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE);
}
@@ -2391,38 +2391,27 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, RegionView3D *rv3d,
static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base)
{
Object *ob= base->object;
+ AnimData *adt= BKE_animdata_from_id(&ob->id);
bArmature *arm= ob->data;
bPose *posen, *poseo;
- //bActionStrip *strip;
float cur, start, end, stepsize, range, colfac, actframe, ctime;
- int cfrao, maptime, flago;
+ int cfrao, flago;
/* pre conditions, get an action with sufficient frames */
- //if (ob->action==NULL)
- // return;
+ if ELEM(NULL, adt, adt->action)
+ return;
- calc_action_range(ob->action, &start, &end, 0);
+ calc_action_range(adt->action, &start, &end, 0);
if (start == end)
return;
stepsize= (float)(arm->ghostsize);
range= (float)(arm->ghostep)*stepsize + 0.5f; /* plus half to make the for loop end correct */
-#if 0 // XXX old animation system
- /* we only map time for armature when an active strip exists */
- for (strip=ob->nlastrips.first; strip; strip=strip->next)
- if (strip->flag & ACTSTRIP_ACTIVE)
- break;
-#endif // XXX old animsys
-
- //maptime= (strip!=NULL);
- maptime= 0;
-
/* store values */
ob->flag &= ~OB_POSEMODE;
cfrao= CFRA;
- if (maptime) actframe= get_action_frame(ob, (float)CFRA);
- else actframe= (float)CFRA;
+ actframe= BKE_nla_tweakedit_remap(adt, (float)CFRA, 0);
flago= arm->flag;
arm->flag &= ~(ARM_DRAWNAMES|ARM_DRAWAXES);
@@ -2444,11 +2433,10 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
/* only within action range */
if (actframe+ctime >= start && actframe+ctime <= end) {
- if (maptime) CFRA= (int)get_action_frame_inv(ob, actframe+ctime);
- else CFRA= (int)floor(actframe+ctime);
+ CFRA= (int)BKE_nla_tweakedit_remap(adt, actframe+ctime, NLATIME_CONVERT_MAP);
if (CFRA != cfrao) {
- //do_all_pose_actions(scene, ob); // xxx old animation system crap
+ BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE);
}
@@ -2460,11 +2448,10 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
/* only within action range */
if ((actframe-ctime >= start) && (actframe-ctime <= end)) {
- if (maptime) CFRA= (int)get_action_frame_inv(ob, actframe-ctime);
- else CFRA= (int)floor(actframe-ctime);
+ CFRA= (int)BKE_nla_tweakedit_remap(adt, actframe-ctime, NLATIME_CONVERT_MAP);
if (CFRA != cfrao) {
- //do_all_pose_actions(scene, ob); // XXX old animation system crap...
+ BKE_animsys_evaluate_animdata(&ob->id, adt, (float)CFRA, ADT_RECALC_ALL);
where_is_pose(scene, ob);
draw_pose_channels(scene, v3d, rv3d, base, OB_WIRE);
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 72594c6fa94..0c521512c12 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -118,7 +118,7 @@
(vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
#define CHECK_OB_DRAWFACEDOT(sce, vd, dt) \
-( (sce->selectmode & SCE_SELECT_FACE) && \
+( (sce->toolsettings->selectmode & SCE_SELECT_FACE) && \
(vd->drawtype<=OB_SOLID) && \
(((vd->drawtype==OB_SOLID) && (dt>=OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX) && (vd->flag & V3D_ZBUF_SELECT)) == 0) \
)
@@ -566,58 +566,6 @@ static void view3d_object_text_draw(View3D *v3d, ARegion *ar)
BLI_freelistN(&strings);
}
-void drawsolidcube(float size)
-{
- float n[3];
-
- glPushMatrix();
- glScalef(size, size, size);
-
- n[0]=0; n[1]=0; n[2]=0;
- glBegin(GL_QUADS);
- n[0]= -1.0;
- glNormal3fv(n);
- glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]);
- n[0]=0;
- glEnd();
-
- glBegin(GL_QUADS);
- n[1]= -1.0;
- glNormal3fv(n);
- glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[1]);
- n[1]=0;
- glEnd();
-
- glBegin(GL_QUADS);
- n[0]= 1.0;
- glNormal3fv(n);
- glVertex3fv(cube[4]); glVertex3fv(cube[7]); glVertex3fv(cube[6]); glVertex3fv(cube[5]);
- n[0]=0;
- glEnd();
-
- glBegin(GL_QUADS);
- n[1]= 1.0;
- glNormal3fv(n);
- glVertex3fv(cube[7]); glVertex3fv(cube[3]); glVertex3fv(cube[2]); glVertex3fv(cube[6]);
- n[1]=0;
- glEnd();
-
- glBegin(GL_QUADS);
- n[2]= 1.0;
- glNormal3fv(n);
- glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]);
- n[2]=0;
- glEnd();
-
- glBegin(GL_QUADS);
- n[2]= -1.0;
- glNormal3fv(n);
- glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]);
- glEnd();
-
- glPopMatrix();
-}
-
static void drawcube(void)
{
@@ -1497,12 +1445,13 @@ static void draw_dm_face_normals__mapFunc(void *userData, int index, float *cent
Scene *scene= ((void **)userData)[0];
BMEditMesh *em = ((void **)userData)[1];
BMFace *efa = EDBM_get_face_for_index(em, index);
+ ToolSettings *ts= ((Scene *)userData)->toolsettings;
if (!BM_TestHFlag(efa, BM_HIDDEN)) {
glVertex3fv(cent);
- glVertex3f( cent[0] + no[0]*scene->editbutsize,
- cent[1] + no[1]*scene->editbutsize,
- cent[2] + no[2]*scene->editbutsize);
+ glVertex3f( cent[0] + no[0]*ts->normalsize,
+ cent[1] + no[1]*ts->normalsize,
+ cent[2] + no[2]*ts->normalsize);
}
}
static void draw_dm_face_normals(BMEditMesh *tm, Scene *scene, DerivedMesh *dm)
@@ -1536,6 +1485,7 @@ static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, int sel)
static void draw_dm_vert_normals__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
{
Scene *scene= ((void **)userData)[0];
+ ToolSettings *ts= scene->toolsettings;
BMEditMesh *em = ((void **)userData)[1];
BMVert *eve = EDBM_get_vert_for_index(em, index);
@@ -1543,13 +1493,13 @@ static void draw_dm_vert_normals__mapFunc(void *userData, int index, float *co,
glVertex3fv(co);
if (no_f) {
- glVertex3f( co[0] + no_f[0]*scene->editbutsize,
- co[1] + no_f[1]*scene->editbutsize,
- co[2] + no_f[2]*scene->editbutsize);
+ glVertex3f( co[0] + no_f[0]*ts->normalsize,
+ co[1] + no_f[1]*ts->normalsize,
+ co[2] + no_f[2]*ts->normalsize);
} else {
- glVertex3f( co[0] + no_s[0]*scene->editbutsize/32767.0f,
- co[1] + no_s[1]*scene->editbutsize/32767.0f,
- co[2] + no_s[2]*scene->editbutsize/32767.0f);
+ glVertex3f( co[0] + no_s[0]*ts->normalsize/32767.0f,
+ co[1] + no_s[1]*ts->normalsize/32767.0f,
+ co[2] + no_s[2]*ts->normalsize/32767.0f);
}
}
}
@@ -1785,7 +1735,9 @@ static void draw_dm_bweights__mapFunc(void *userData, int index, float *co, floa
}
static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
{
- if (scene->selectmode & SCE_SELECT_VERTEX) {
+ ToolSettings *ts= scene->toolsettings;
+
+ if (ts->selectmode & SCE_SELECT_VERTEX) {
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) + 2);
bglBegin(GL_POINTS);
dm->foreachMappedVert(dm, draw_dm_bweights__mapFunc, em);
@@ -1810,6 +1762,7 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit,
BMEditMesh *em, DerivedMesh *cageDM, BMVert *eve_act)
{
+ ToolSettings *ts= scene->toolsettings;
int sel;
if(v3d->zbuf) glDepthMask(0); // disable write in zbuffer, zbuf select
@@ -1841,7 +1794,7 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit,
col[3] = fcol[3] = 255;
}
- if(scene->selectmode & SCE_SELECT_VERTEX) {
+ if(ts->selectmode & SCE_SELECT_VERTEX) {
glPointSize(size);
glColor4ubv((GLubyte *)col);
draw_dm_verts(em, cageDM, sel, eve_act);
@@ -1868,6 +1821,7 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d,
Mesh *me, DerivedMesh *cageDM, short sel_only,
BMEdge *eed_act)
{
+ ToolSettings *ts= scene->toolsettings;
int pass;
unsigned char wireCol[4], selCol[4], actCol[4];
@@ -1897,11 +1851,11 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d,
if (!sel_only) wireCol[3] = 255;
}
- if(scene->selectmode == SCE_SELECT_FACE) {
+ if(ts->selectmode == SCE_SELECT_FACE) {
draw_dm_edges_sel(em, cageDM, wireCol, selCol, actCol, eed_act);
}
- else if( (me->drawflag & ME_DRAWEDGES) || (scene->selectmode & SCE_SELECT_EDGE) ) {
- if(cageDM->drawMappedEdgesInterp && (scene->selectmode & SCE_SELECT_VERTEX)) {
+ else if( (me->drawflag & ME_DRAWEDGES) || (ts->selectmode & SCE_SELECT_EDGE) ) {
+ if(cageDM->drawMappedEdgesInterp && (ts->selectmode & SCE_SELECT_VERTEX)) {
glShadeModel(GL_SMOOTH);
draw_dm_edges_sel_interp(em, cageDM, wireCol, selCol);
glShadeModel(GL_FLAT);
@@ -2541,11 +2495,13 @@ static int draw_mesh_object(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
if(dt>OB_WIRE) {
// no transp in editmode, the fancy draw over goes bad then
glsl = draw_glsl_material(scene, ob, v3d, dt);
- GPU_set_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
}
draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
+ GPU_end_object_materials();
+
if (obedit!=ob && finalDM)
finalDM->release(finalDM);
}
@@ -2560,17 +2516,19 @@ static int draw_mesh_object(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base
check_alpha = check_material_alpha(base, me, glsl);
if(dt==OB_SOLID || glsl) {
- GPU_set_object_materials(v3d, rv3d, scene, ob, glsl,
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
(check_alpha)? &do_alpha_pass: NULL);
}
draw_mesh_fancy(scene, v3d, rv3d, base, dt, flag);
+
+ GPU_end_object_materials();
if(me->totvert==0) retval= 1;
}
}
- /* GPU_set_object_materials checked if this is needed */
+ /* GPU_begin_object_materials checked if this is needed */
if(do_alpha_pass) add_view3d_after(v3d, base, V3D_TRANSP, flag);
return retval;
@@ -2748,7 +2706,6 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl)
glVertexPointer(3, GL_FLOAT, 0, dl->verts);
glNormalPointer(GL_FLOAT, 0, dl->nors);
glDrawElements(GL_QUADS, 4*dl->totindex, GL_UNSIGNED_INT, dl->index);
- GPU_disable_material();
}
break;
@@ -2766,7 +2723,6 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl)
glNormalPointer(GL_FLOAT, 0, dl->nors);
glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index);
- GPU_disable_material();
if(index3_nors_incr==0)
glEnableClientState(GL_NORMAL_ARRAY);
@@ -2780,8 +2736,6 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl)
glNormalPointer(GL_FLOAT, 0, dl->nors);
glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index);
- GPU_disable_material();
-
break;
}
dl= dl->next;
@@ -2875,17 +2829,19 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
else {
if(draw_glsl_material(scene, ob, v3d, dt)) {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 1, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
drawDispListsolid(lb, ob, 1);
+ GPU_end_object_materials();
}
else if(dt == OB_SHADED) {
if(ob->disp.first==0) shadeDispList(scene, base);
drawDispListshaded(lb, ob);
}
else {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 0, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
drawDispListsolid(lb, ob, 0);
+ GPU_end_object_materials();
}
if(cu->editnurb && cu->bevobj==NULL && cu->taperobj==NULL && cu->ext1 == 0.0 && cu->ext2 == 0.0) {
cpack(0);
@@ -2913,18 +2869,19 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if(dl->nors==NULL) addnormalsDispList(ob, lb);
if(draw_glsl_material(scene, ob, v3d, dt)) {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 1, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
drawDispListsolid(lb, ob, 1);
+ GPU_end_object_materials();
}
else if(dt==OB_SHADED) {
if(ob->disp.first==NULL) shadeDispList(scene, base);
drawDispListshaded(lb, ob);
}
else {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 0, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
-
drawDispListsolid(lb, ob, 0);
+ GPU_end_object_materials();
}
}
else {
@@ -2941,8 +2898,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if(solid) {
if(draw_glsl_material(scene, ob, v3d, dt)) {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 1, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
drawDispListsolid(lb, ob, 1);
+ GPU_end_object_materials();
}
else if(dt == OB_SHADED) {
dl= lb->first;
@@ -2950,10 +2908,10 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
drawDispListshaded(lb, ob);
}
else {
- GPU_set_object_materials(v3d, rv3d, scene, ob, 0, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
-
drawDispListsolid(lb, ob, 0);
+ GPU_end_object_materials();
}
}
else{
@@ -2967,6 +2925,227 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
return retval;
}
+/* *********** text drawing for particles ************* */
+static ListBase pstrings= {NULL, NULL};
+
+typedef struct ViewParticleString {
+ struct ViewParticleString *next, *prev;
+ float vec[3], col[4];
+ char str[128];
+ short mval[2];
+ short xoffs;
+} ViewParticleString;
+
+
+void view3d_particle_text_draw_add(float x, float y, float z, char *str, short xoffs)
+{
+ ViewObjectString *vos= MEM_callocN(sizeof(ViewObjectString), "ViewObjectString");
+
+ BLI_addtail(&pstrings, vos);
+ BLI_strncpy(vos->str, str, 128);
+ vos->vec[0]= x;
+ vos->vec[1]= y;
+ vos->vec[2]= z;
+ glGetFloatv(GL_CURRENT_COLOR, vos->col);
+ vos->xoffs= xoffs;
+}
+
+static void view3d_particle_text_draw(View3D *v3d, ARegion *ar)
+{
+ ViewObjectString *vos;
+ int tot= 0;
+
+ /* project first and test */
+ for(vos= pstrings.first; vos; vos= vos->next) {
+ project_short(ar, vos->vec, vos->mval);
+ if(vos->mval[0]!=IS_CLIPPED)
+ tot++;
+ }
+
+ if(tot) {
+ RegionView3D *rv3d= ar->regiondata;
+ int a;
+
+ if(rv3d->rflag & RV3D_CLIPPING)
+ for(a=0; a<6; a++)
+ glDisable(GL_CLIP_PLANE0+a);
+
+ wmPushMatrix();
+ ED_region_pixelspace(ar);
+
+ if(v3d->zbuf) glDepthMask(0);
+
+ for(vos= pstrings.first; vos; vos= vos->next) {
+ if(vos->mval[0]!=IS_CLIPPED) {
+ glColor3fv(vos->col);
+ BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], 2.0, vos->str);
+ }
+ }
+
+ if(v3d->zbuf) glDepthMask(1);
+
+ wmPopMatrix();
+
+ if(rv3d->rflag & RV3D_CLIPPING)
+ for(a=0; a<6; a++)
+ glEnable(GL_CLIP_PLANE0+a);
+ }
+
+ if(pstrings.first)
+ BLI_freelistN(&pstrings);
+}
+typedef struct ParticleDrawData {
+ float *vdata, *vd;
+ float *ndata, *nd;
+ float *cdata, *cd;
+ float *vedata, *ved;
+ float *ma_r, *ma_g, *ma_b;
+} ParticleDrawData;
+static void draw_particle(ParticleKey *state, int draw_as, short draw, float pixsize, float imat[4][4], float *draw_line, ParticleBillboardData *bb, ParticleDrawData *pdd)
+{
+ float vec[3], vec2[3];
+ float *vd = pdd->vd;
+ float *cd = pdd->cd;
+ float ma_r;
+ float ma_g;
+ float ma_b;
+
+ if(pdd->ma_r) {
+ ma_r = *pdd->ma_r;
+ ma_g = *pdd->ma_g;
+ ma_b = *pdd->ma_b;
+ }
+
+ switch(draw_as){
+ case PART_DRAW_DOT:
+ {
+ if(vd) {
+ VECCOPY(vd,state->co) pdd->vd+=3;
+ }
+ if(cd) {
+ cd[0]=ma_r;
+ cd[1]=ma_g;
+ cd[2]=ma_b;
+ pdd->cd+=3;
+ }
+ break;
+ }
+ case PART_DRAW_CROSS:
+ case PART_DRAW_AXIS:
+ {
+ vec[0]=2.0f*pixsize;
+ vec[1]=vec[2]=0.0;
+ QuatMulVecf(state->rot,vec);
+ if(draw_as==PART_DRAW_AXIS) {
+ cd[1]=cd[2]=cd[4]=cd[5]=0.0;
+ cd[0]=cd[3]=1.0;
+ cd[6]=cd[8]=cd[9]=cd[11]=0.0;
+ cd[7]=cd[10]=1.0;
+ cd[13]=cd[12]=cd[15]=cd[16]=0.0;
+ cd[14]=cd[17]=1.0;
+ cd+=18;
+
+ VECCOPY(vec2,state->co);
+ }
+ else {
+ if(cd) {
+ cd[0]=cd[3]=cd[6]=cd[9]=cd[12]=cd[15]=ma_r;
+ cd[1]=cd[4]=cd[7]=cd[10]=cd[13]=cd[16]=ma_g;
+ cd[2]=cd[5]=cd[8]=cd[11]=cd[14]=cd[17]=ma_b;
+ pdd->cd+=18;
+ }
+ VECSUB(vec2,state->co,vec);
+ }
+
+ VECADD(vec,state->co,vec);
+ VECCOPY(pdd->vd,vec); pdd->vd+=3;
+ VECCOPY(pdd->vd,vec2); pdd->vd+=3;
+
+ vec[1]=2.0f*pixsize;
+ vec[0]=vec[2]=0.0;
+ QuatMulVecf(state->rot,vec);
+ if(draw_as==PART_DRAW_AXIS){
+ VECCOPY(vec2,state->co);
+ }
+ else VECSUB(vec2,state->co,vec);
+
+ VECADD(vec,state->co,vec);
+ VECCOPY(pdd->vd,vec); pdd->vd+=3;
+ VECCOPY(pdd->vd,vec2); pdd->vd+=3;
+
+ vec[2]=2.0f*pixsize;
+ vec[0]=vec[1]=0.0;
+ QuatMulVecf(state->rot,vec);
+ if(draw_as==PART_DRAW_AXIS){
+ VECCOPY(vec2,state->co);
+ }
+ else VECSUB(vec2,state->co,vec);
+
+ VECADD(vec,state->co,vec);
+
+ VECCOPY(pdd->vd,vec); pdd->vd+=3;
+ VECCOPY(pdd->vd,vec2); pdd->vd+=3;
+ break;
+ }
+ case PART_DRAW_LINE:
+ {
+ VECCOPY(vec,state->vel);
+ Normalize(vec);
+ if(draw & PART_DRAW_VEL_LENGTH)
+ VecMulf(vec,VecLength(state->vel));
+ VECADDFAC(pdd->vd,state->co,vec,-draw_line[0]); pdd->vd+=3;
+ VECADDFAC(pdd->vd,state->co,vec,draw_line[1]); pdd->vd+=3;
+ if(cd) {
+ cd[0]=cd[3]=ma_r;
+ cd[1]=cd[4]=ma_g;
+ cd[2]=cd[5]=ma_b;
+ pdd->cd+=6;
+ }
+ break;
+ }
+ case PART_DRAW_CIRC:
+ {
+ if(pdd->ma_r)
+ glColor3f(ma_r,ma_g,ma_b);
+ drawcircball(GL_LINE_LOOP, state->co, pixsize, imat);
+ break;
+ }
+ case PART_DRAW_BB:
+ {
+ float xvec[3], yvec[3], zvec[3], bb_center[3];
+ if(cd) {
+ cd[0]=cd[3]=cd[6]=cd[9]=ma_r;
+ cd[1]=cd[4]=cd[7]=cd[10]=ma_g;
+ cd[2]=cd[5]=cd[8]=cd[11]=ma_b;
+ pdd->cd+=12;
+ }
+
+
+ VECCOPY(bb->vec, state->co);
+ VECCOPY(bb->vel, state->vel);
+
+ psys_make_billboard(bb, xvec, yvec, zvec, bb_center);
+
+ VECADD(pdd->vd,bb_center,xvec);
+ VECADD(pdd->vd,pdd->vd,yvec); pdd->vd+=3;
+
+ VECSUB(pdd->vd,bb_center,xvec);
+ VECADD(pdd->vd,pdd->vd,yvec); pdd->vd+=3;
+
+ VECSUB(pdd->vd,bb_center,xvec);
+ VECSUB(pdd->vd,pdd->vd,yvec); pdd->vd+=3;
+
+ VECADD(pdd->vd,bb_center,xvec);
+ VECSUB(pdd->vd,pdd->vd,yvec); pdd->vd+=3;
+
+ VECCOPY(pdd->nd, zvec); pdd->nd+=3;
+ VECCOPY(pdd->nd, zvec); pdd->nd+=3;
+ VECCOPY(pdd->nd, zvec); pdd->nd+=3;
+ VECCOPY(pdd->nd, zvec); pdd->nd+=3;
+ break;
+ }
+ }
+}
/* unified drawing of all new particle systems draw types except dupli ob & group */
/* mostly tries to use vertex arrays for speed */
@@ -2977,7 +3156,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
/* 5. start filling the arrays */
/* 6. draw the arrays */
/* 7. clean up */
-static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int dt)
+static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int ob_dt)
{
Object *ob=base->object;
ParticleSystemModifierData *psmd;
@@ -2985,14 +3164,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
ParticleData *pars, *pa;
ParticleKey state, *states=0;
ParticleBillboardData bb;
+ ParticleDrawData pdd;
Material *ma;
- float vel[3], vec[3], vec2[3], imat[4][4], bb_center[3];
- float timestep, pixsize=1.0, pa_size, pa_time, r_tilt;
+ float vel[3], imat[4][4];
+ float timestep, pixsize=1.0, pa_size, r_tilt, r_length;
+ float pa_time, pa_birthtime, pa_dietime;
float cfra= bsystem_time(scene, ob,(float)CFRA,0.0);
- float *vdata=0, *vedata=0, *cdata=0, *ndata=0, *vd=0, *ved=0, *cd=0, *nd=0, xvec[3], yvec[3], zvec[3];
float ma_r=0.0f, ma_g=0.0f, ma_b=0.0f;
- int a, totpart, totpoint=0, draw_as, totchild=0;
- int select=ob->flag&SELECT, create_cdata=0;
+ int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0;
+ int select=ob->flag&SELECT, create_cdata=0, need_v=0;
GLint polygonmode[2];
char val[32];
@@ -3017,15 +3197,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* 2. */
if(part->phystype==PART_PHYS_KEYED){
- if(psys->flag & PSYS_FIRST_KEYED){
- if(psys->flag&PSYS_KEYED){
- select=psys_count_keyed_targets(ob,psys);
- if(psys->totkeyed==0)
- return;
- }
+ if(psys->flag&PSYS_KEYED){
+ psys_count_keyed_targets(ob,psys);
+ if(psys->totkeyed==0)
+ return;
}
- else
- return;
}
if(select){
@@ -3041,13 +3217,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
else
totchild=psys->totchild*part->disp/100;
- ma= give_current_material(ob,part->omat);
+ memset(&pdd, 0, sizeof(ParticleDrawData));
- if(ma) {
- ma_r = ma->r;
- ma_g = ma->g;
- ma_b = ma->b;
- }
+ ma= give_current_material(ob,part->omat);
if(v3d->zbuf) glDepthMask(1);
@@ -3055,6 +3227,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
cpack(0xFFFFFF);
else if((ma) && (part->draw&PART_DRAW_MAT_COL)) {
glColor3f(ma->r,ma->g,ma->b);
+
+ ma_r = ma->r;
+ ma_g = ma->g;
+ ma_b = ma->b;
+
+ pdd.ma_r = &ma_r;
+ pdd.ma_g = &ma_g;
+ pdd.ma_b = &ma_b;
+
create_cdata = 1;
}
else
@@ -3064,8 +3245,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
timestep= psys_get_timestep(part);
- wmLoadMatrix(rv3d->viewmat);
-
if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
float mat[4][4];
Mat4MulMat4(mat, psys->imat, ob->obmat);
@@ -3079,8 +3258,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
else
draw_as = part->draw_as;
- if(part->flag&PART_GLOB_TIME)
- cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f);
+ //if(part->flag&PART_GLOB_TIME)
+ cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f);
if(draw_as==PART_DRAW_PATH && psys->pathcache==NULL)
draw_as=PART_DRAW_DOT;
@@ -3145,6 +3324,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
case PART_DRAW_PATH:
break;
+ case PART_DRAW_LINE:
+ need_v=1;
+ break;
}
if(part->draw & PART_DRAW_SIZE && part->draw_as!=PART_DRAW_CIRC){
Mat4CpyMat4(imat, rv3d->viewinv);
@@ -3155,40 +3337,47 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* 4. */
if(draw_as && draw_as!=PART_DRAW_PATH) {
int tot_vec_size = (totpart + totchild) * 3 * sizeof(float);
+
+ if(part->draw_as == PART_DRAW_REND && part->trail_count > 1) {
+ tot_vec_size *= part->trail_count;
+ psys_make_temp_pointcache(ob, psys);
+ }
if(draw_as!=PART_DRAW_CIRC) {
switch(draw_as) {
case PART_DRAW_AXIS:
case PART_DRAW_CROSS:
if(draw_as != PART_DRAW_CROSS || create_cdata)
- cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata");
- vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata");
+ pdd.cdata = MEM_callocN(tot_vec_size * 6, "particle_cdata");
+ pdd.vdata = MEM_callocN(tot_vec_size * 6, "particle_vdata");
break;
case PART_DRAW_LINE:
if(create_cdata)
- cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata");
- vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata");
+ pdd.cdata = MEM_callocN(tot_vec_size * 2, "particle_cdata");
+ pdd.vdata = MEM_callocN(tot_vec_size * 2, "particle_vdata");
break;
case PART_DRAW_BB:
if(create_cdata)
- cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata");
- vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
- ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
+ pdd.cdata = MEM_callocN(tot_vec_size * 4, "particle_cdata");
+ pdd.vdata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
+ pdd.ndata = MEM_callocN(tot_vec_size * 4, "particle_vdata");
break;
default:
if(create_cdata)
- cdata=MEM_callocN(tot_vec_size, "particle_cdata");
- vdata=MEM_callocN(tot_vec_size, "particle_vdata");
+ pdd.cdata=MEM_callocN(tot_vec_size, "particle_cdata");
+ pdd.vdata=MEM_callocN(tot_vec_size, "particle_vdata");
}
}
- if(part->draw & PART_DRAW_VEL && draw_as != PART_DRAW_LINE)
- vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata");
+ if(part->draw & PART_DRAW_VEL && draw_as != PART_DRAW_LINE) {
+ pdd.vedata = MEM_callocN(tot_vec_size * 2, "particle_vedata");
+ need_v = 1;
+ }
- vd=vdata;
- ved=vedata;
- cd=cdata;
- nd=ndata;
+ pdd.vd= pdd.vdata;
+ pdd.ved= pdd.vedata;
+ pdd.cd= pdd.cdata;
+ pdd.nd= pdd.ndata;
psys->lattice= psys_get_lattice(scene, ob, psys);
}
@@ -3202,10 +3391,12 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) continue;
pa_time=(cfra-pa->time)/pa->lifetime;
+ pa_birthtime=pa->time;
+ pa_dietime = pa->dietime;
pa_size=pa->size;
- if((part->flag&PART_ABS_TIME)==0){
-#if 0 // XXX old animation system
+#if 0 // XXX old animation system
+ if((part->flag&PART_ABS_TIME)==0){
if(ma && ma->ipo){
IpoCurve *icu;
@@ -3232,19 +3423,20 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pa_size = icu->curval;
}
}
-#endif // XXX old animation system
}
+#endif // XXX old animation system
- r_tilt=1.0f+pa->r_ave[0];
+ 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];
- pa_time=psys_get_child_time(psys,cpa,cfra);
+ pa_time=psys_get_child_time(psys,cpa,cfra,&pa_birthtime,&pa_dietime);
+#if 0 // XXX old animation system
if((part->flag&PART_ABS_TIME)==0) {
if(ma && ma->ipo){
-#if 0 // XXX old animation system
IpoCurve *icu;
/* correction for lifetime */
@@ -3258,151 +3450,86 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
else if(icu->adrcode == MA_COL_B)
ma_b = icu->curval;
}
-#endif // XXX old animation system
}
}
+#endif // XXX old animation system
pa_size=psys_get_child_size(psys,cpa,cfra,0);
- r_tilt=2.0f*cpa->rand[2];
+ r_tilt = 2.0f * cpa->rand[2];
+ r_length = cpa->rand[1];
}
if(draw_as!=PART_DRAW_PATH){
- state.time=cfra;
- if(psys_get_particle_state(scene,ob,psys,a,&state,0)){
- /* create actiual particle data */
- switch(draw_as){
- case PART_DRAW_DOT:
- if(vd){
- VECCOPY(vd,state.co) vd+=3;
- }
- if(cd) {
- cd[0]=ma_r;
- cd[1]=ma_g;
- cd[2]=ma_b;
- cd+=3;
- }
- break;
- case PART_DRAW_CROSS:
- case PART_DRAW_AXIS:
- vec[0]=2.0f*pixsize;
- vec[1]=vec[2]=0.0;
- QuatMulVecf(state.rot,vec);
- if(draw_as==PART_DRAW_AXIS){
- cd[1]=cd[2]=cd[4]=cd[5]=0.0;
- cd[0]=cd[3]=1.0;
- cd[6]=cd[8]=cd[9]=cd[11]=0.0;
- cd[7]=cd[10]=1.0;
- cd[13]=cd[12]=cd[15]=cd[16]=0.0;
- cd[14]=cd[17]=1.0;
- cd+=18;
-
- VECCOPY(vec2,state.co);
- }
- else {
- if(cd) {
- cd[0]=cd[3]=cd[6]=cd[9]=cd[12]=cd[15]=ma_r;
- cd[1]=cd[4]=cd[7]=cd[10]=cd[13]=cd[16]=ma_g;
- cd[2]=cd[5]=cd[8]=cd[11]=cd[14]=cd[17]=ma_b;
- cd+=18;
- }
- VECSUB(vec2,state.co,vec);
- }
+ drawn = 0;
+ if(part->draw_as == PART_DRAW_REND && part->trail_count > 1) {
+ float length = part->path_end * (1.0 - part->randlength * r_length);
+ int trail_count = part->trail_count * (1.0 - part->randlength * r_length);
+ float ct = ((part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time) - length;
+ float dt = length / (trail_count ? (float)trail_count : 1.0f);
+ int i=0;
+
+ ct+=dt;
+ for(i=0; i < trail_count; i++, ct += dt) {
+ if(part->draw & PART_ABS_PATH_TIME) {
+ if(ct < pa_birthtime || ct > pa_dietime)
+ continue;
+ }
+ else if(ct < 0.0f || ct > 1.0f)
+ continue;
- VECADD(vec,state.co,vec);
- VECCOPY(vd,vec); vd+=3;
- VECCOPY(vd,vec2); vd+=3;
-
- vec[1]=2.0f*pixsize;
- vec[0]=vec[2]=0.0;
- QuatMulVecf(state.rot,vec);
- if(draw_as==PART_DRAW_AXIS){
- VECCOPY(vec2,state.co);
- }
- else VECSUB(vec2,state.co,vec);
-
- VECADD(vec,state.co,vec);
- VECCOPY(vd,vec); vd+=3;
- VECCOPY(vd,vec2); vd+=3;
-
- vec[2]=2.0f*pixsize;
- vec[0]=vec[1]=0.0;
- QuatMulVecf(state.rot,vec);
- if(draw_as==PART_DRAW_AXIS){
- VECCOPY(vec2,state.co);
- }
- else VECSUB(vec2,state.co,vec);
-
- VECADD(vec,state.co,vec);
-
- VECCOPY(vd,vec); vd+=3;
- VECCOPY(vd,vec2); vd+=3;
- break;
- case PART_DRAW_LINE:
- VECCOPY(vec,state.vel);
- Normalize(vec);
- if(part->draw & PART_DRAW_VEL_LENGTH)
- VecMulf(vec,VecLength(state.vel));
- VECADDFAC(vd,state.co,vec,-part->draw_line[0]); vd+=3;
- VECADDFAC(vd,state.co,vec,part->draw_line[1]); vd+=3;
- if(cd) {
- cd[0]=cd[3]=ma_r;
- cd[1]=cd[4]=ma_g;
- cd[2]=cd[5]=ma_b;
- cd+=3;
- }
- break;
- case PART_DRAW_CIRC:
- if(create_cdata)
- glColor3f(ma_r,ma_g,ma_b);
- drawcircball(GL_LINE_LOOP, state.co, pixsize, imat);
- break;
- case PART_DRAW_BB:
- if(cd) {
- cd[0]=cd[3]=cd[6]=cd[9]=ma_r;
- cd[1]=cd[4]=cd[7]=cd[10]=ma_g;
- cd[2]=cd[5]=cd[8]=cd[11]=ma_b;
- cd+=12;
- }
+ state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime));
+ psys_get_particle_on_path(scene,ob,psys,a,&state,need_v);
+
+ if(psys->parent)
+ Mat4MulVecfl(psys->parent->obmat, state.co);
+ /* create actiual particle data */
+ if(draw_as == PART_DRAW_BB) {
bb.size = pa_size;
bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt);
- bb.time = pa_time;
- VECCOPY(bb.vec, state.co);
- VECCOPY(bb.vel, state.vel);
-
- psys_make_billboard(&bb, xvec, yvec, zvec, bb_center);
-
- VECADD(vd,bb_center,xvec);
- VECADD(vd,vd,yvec); vd+=3;
+ bb.time = ct;
+ }
- VECSUB(vd,bb_center,xvec);
- VECADD(vd,vd,yvec); vd+=3;
+ draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd);
- VECSUB(vd,bb_center,xvec);
- VECSUB(vd,vd,yvec); vd+=3;
+ totpoint++;
+ drawn = 1;
+ }
+ }
+ else
+ {
+ state.time=cfra;
+ if(psys_get_particle_state(scene,ob,psys,a,&state,0)){
+ if(psys->parent)
+ Mat4MulVecfl(psys->parent->obmat, state.co);
+
+ /* create actiual particle data */
+ if(draw_as == PART_DRAW_BB) {
+ bb.size = pa_size;
+ bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt);
+ bb.time = pa_time;
+ }
- VECADD(vd,bb_center,xvec);
- VECSUB(vd,vd,yvec); vd+=3;
+ draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, &pdd);
- VECCOPY(nd, zvec); nd+=3;
- VECCOPY(nd, zvec); nd+=3;
- VECCOPY(nd, zvec); nd+=3;
- VECCOPY(nd, zvec); nd+=3;
- break;
+ totpoint++;
+ drawn = 1;
}
+ }
- totpoint++;
-
+ if(drawn) {
/* additional things to draw for each particle */
/* (velocity, size and number) */
- if(vedata){
- VECCOPY(ved,state.co);
- ved+=3;
+ if(pdd.vedata){
+ VECCOPY(pdd.ved,state.co);
+ pdd.ved+=3;
VECCOPY(vel,state.vel);
VecMulf(vel,timestep);
- VECADD(ved,state.co,vel);
- ved+=3;
+ VECADD(pdd.ved,state.co,vel);
+ pdd.ved+=3;
+
+ totve++;
}
if(part->draw & PART_DRAW_SIZE){
@@ -3414,7 +3541,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(part->draw&PART_DRAW_NUM && !(G.f & G_RENDER_SHADOW)){
/* in path drawing state.co is the end point */
sprintf(val," %i",a);
- view3d_object_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0);
+ view3d_particle_text_draw_add(state.co[0], state.co[1], state.co[2], val, 0);
}
}
}
@@ -3431,7 +3558,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glEnableClientState(GL_VERTEX_ARRAY);
/* setup gl flags */
- if(dt > OB_WIRE) {
+ if(ob_dt > OB_WIRE) {
glEnableClientState(GL_NORMAL_ARRAY);
if(part->draw&PART_DRAW_MAT_COL)
@@ -3459,7 +3586,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(path->steps > 0) {
glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
- if(dt > OB_WIRE) {
+ if(ob_dt > OB_WIRE) {
glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel);
if(part->draw&PART_DRAW_MAT_COL)
glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col);
@@ -3475,7 +3602,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
path=cache[a];
glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
- if(dt > OB_WIRE) {
+ if(ob_dt > OB_WIRE) {
glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel);
if(part->draw&PART_DRAW_MAT_COL)
glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col);
@@ -3486,7 +3613,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* restore & clean up */
- if(dt > OB_WIRE) {
+ if(ob_dt > OB_WIRE) {
if(part->draw&PART_DRAW_MAT_COL)
glDisable(GL_COLOR_ARRAY);
glDisable(GL_COLOR_MATERIAL);
@@ -3502,16 +3629,17 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glDisableClientState(GL_COLOR_ARRAY);
/* setup created data arrays */
- if(vdata){
+ if(pdd.vdata){
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, vdata);
+ glVertexPointer(3, GL_FLOAT, 0, pdd.vdata);
}
else
glDisableClientState(GL_VERTEX_ARRAY);
- if(ndata && dt>OB_WIRE){
+ /* billboards are drawn this way */
+ if(pdd.ndata && ob_dt>OB_WIRE){
glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT, 0, ndata);
+ glNormalPointer(GL_FLOAT, 0, pdd.ndata);
glEnable(GL_LIGHTING);
}
else{
@@ -3519,9 +3647,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glDisable(GL_LIGHTING);
}
- if(cdata){
+ if(pdd.cdata){
glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(3, GL_FLOAT, 0, cdata);
+ glColorPointer(3, GL_FLOAT, 0, pdd.cdata);
}
/* draw created data arrays */
@@ -3534,7 +3662,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glDrawArrays(GL_LINES, 0, 2*totpoint);
break;
case PART_DRAW_BB:
- if(dt<=OB_WIRE)
+ if(ob_dt<=OB_WIRE)
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
glDrawArrays(GL_QUADS, 0, 4*totpoint);
@@ -3545,14 +3673,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
}
}
- if(vedata){
+ if(pdd.vedata){
glDisableClientState(GL_COLOR_ARRAY);
cpack(0xC0C0C0);
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, vedata);
+ glVertexPointer(3, GL_FLOAT, 0, pdd.vedata);
- glDrawArrays(GL_LINES, 0, 2*totpoint);
+ glDrawArrays(GL_LINES, 0, 2*totve);
}
glPolygonMode(GL_FRONT, polygonmode[0]);
@@ -3567,14 +3695,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(states)
MEM_freeN(states);
- if(vdata)
- MEM_freeN(vdata);
- if(vedata)
- MEM_freeN(vedata);
- if(cdata)
- MEM_freeN(cdata);
- if(ndata)
- MEM_freeN(ndata);
+ if(pdd.vdata)
+ MEM_freeN(pdd.vdata);
+ if(pdd.vedata)
+ MEM_freeN(pdd.vedata);
+ if(pdd.cdata)
+ MEM_freeN(pdd.cdata);
+ if(pdd.ndata)
+ MEM_freeN(pdd.ndata);
psys->flag &= ~PSYS_DRAWING;
@@ -3583,8 +3711,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
psys->lattice= NULL;
}
- wmLoadMatrix(rv3d->viewmat);
- wmMultMatrix(ob->obmat); // bring back local matrix for dtx
+ if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) )
+ wmLoadMatrix(rv3d->viewmat);
}
static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, ParticleSystem *psys, int dt)
@@ -3619,8 +3747,6 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
if((v3d->flag & V3D_ZBUF_SELECT)==0)
glDisable(GL_DEPTH_TEST);
- wmLoadMatrix(rv3d->viewmat);
-
/* get selection theme colors */
UI_GetThemeColor3ubv(TH_VERTEX_SELECT, sel);
UI_GetThemeColor3ubv(TH_VERTEX, nosel);
@@ -3692,13 +3818,13 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
}
/* draw edit vertices */
- if(scene->selectmode!=SCE_SELECT_PATH){
+ if(pset->selectmode!=SCE_SELECT_PATH){
glDisableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glDisable(GL_LIGHTING);
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
- if(scene->selectmode==SCE_SELECT_POINT){
+ if(pset->selectmode==SCE_SELECT_POINT){
float *cd=0,*cdata=0;
cd=cdata=MEM_callocN(edit->totkeys*(timed?4:3)*sizeof(float), "particle edit color data");
@@ -3729,7 +3855,7 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
if(key->flag & PEK_HIDE) continue;
sprintf(val," %.1f",*key->time);
- view3d_object_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
+ view3d_particle_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
}
}
}
@@ -3737,7 +3863,7 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
MEM_freeN(cdata);
cd=cdata=0;
}
- else if(scene->selectmode == SCE_SELECT_END){
+ else if(pset->selectmode == SCE_SELECT_END){
for(i=0, pa=psys->particles; i<totpart; i++, pa++){
if((pa->flag & PARS_HIDE)==0){
key = edit->keys[i] + pa->totkey - 1;
@@ -3752,7 +3878,7 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
if((pset->flag & PE_SHOW_TIME) && !(G.f & G_RENDER_SHADOW)){
sprintf(val," %.1f",*key->time);
- view3d_object_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
+ view3d_particle_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
}
}
}
@@ -3767,7 +3893,6 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
glEnable(GL_DEPTH_TEST);
glLineWidth(1.0f);
- wmMultMatrix(ob->obmat); // bring back local matrix for dtx
glPointSize(1.0);
}
@@ -3975,6 +4100,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, Nurb *nurb, int dt)
{
+ ToolSettings *ts= scene->toolsettings;
Object *ob= base->object;
Curve *cu = ob->data;
Nurb *nu;
@@ -4006,7 +4132,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* direction vectors for 3d curve paths
when at its lowest, dont render normals */
- if(cu->flag & CU_3D && scene->editbutsize > 0.0015) {
+ 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);
@@ -4014,7 +4140,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
int skip= nu->resolu/16;
while (nr-->0) { /* accounts for empty bevel lists */
- float fac= bevp->radius * scene->editbutsize;
+ float fac= bevp->radius * ts->normalsize;
float ox,oy,oz; // Offset perpendicular to the curve
float dx,dy,dz; // Delta along the curve
@@ -5167,7 +5293,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
) {
ParticleSystem *psys;
if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */
- glDepthMask(GL_FALSE);
+ //glDepthMask(GL_FALSE);
+
+ wmLoadMatrix(rv3d->viewmat);
for(psys=ob->particlesystem.first; psys; psys=psys->next)
draw_new_particle_system(scene, v3d, rv3d, base, psys, dt);
@@ -5177,7 +5305,11 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(psys && !scene->obedit && psys_in_edit_mode(scene, psys))
draw_particle_edit(scene, v3d, rv3d, ob, psys, dt);
}
- glDepthMask(GL_TRUE);
+ view3d_particle_text_draw(v3d, ar);
+
+ wmMultMatrix(ob->obmat);
+
+ //glDepthMask(GL_TRUE);
if(col) cpack(col);
}
@@ -5444,6 +5576,7 @@ static void bbs_mesh_solid(Scene *scene, View3D *v3d, Object *ob)
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
{
+ ToolSettings *ts= scene->toolsettings;
wmMultMatrix(ob->obmat);
@@ -5461,8 +5594,8 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
EDBM_init_index_arrays(em, 1, 1, 1);
- bbs_mesh_solid_EM(em, scene, v3d, ob, dm, scene->selectmode & SCE_SELECT_FACE);
- if(scene->selectmode & SCE_SELECT_FACE)
+ bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
+ if(ts->selectmode & SCE_SELECT_FACE)
bm_solidoffs = 1+em->bm->totface;
else
bm_solidoffs= 1;
@@ -5474,7 +5607,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
bm_wireoffs= bm_solidoffs + em->bm->totedge;
// we draw verts if vert select mode or if in transform (for snap).
- if(scene->selectmode & SCE_SELECT_VERTEX || G.moving & G_TRANSFORM_EDIT) {
+ if(ts->selectmode & SCE_SELECT_VERTEX || G.moving & G_TRANSFORM_EDIT) {
bbs_mesh_verts(em, dm, bm_wireoffs);
bm_vertoffs= bm_wireoffs + em->bm->totvert;
}
@@ -5526,7 +5659,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
if(dm) {
glsl = draw_glsl_material(scene, ob, v3d, dt);
- GPU_set_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
}
else {
glEnable(GL_COLOR_MATERIAL);
@@ -5540,7 +5673,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
if(dm) {
dm->drawFacesSolid(dm, GPU_enable_material);
- GPU_disable_material();
+ GPU_end_object_materials();
}
else if(edm)
edm->drawMappedFaces(edm, NULL, NULL, 0);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6e33b1dcaab..387468f7160 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -97,31 +97,65 @@ ARegion *view3d_has_buttons_region(ScrArea *sa)
ARegion *view3d_has_tools_region(ScrArea *sa)
{
- ARegion *ar, *arnew;
+ ARegion *ar, *artool=NULL, *arprops=NULL, *arhead;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
+ for(ar= sa->regionbase.first; ar; ar= ar->next) {
if(ar->regiontype==RGN_TYPE_TOOLS)
- return ar;
-
- /* add subdiv level; after header */
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_HEADER)
- break;
-
- /* is error! */
- if(ar==NULL) return NULL;
+ artool= ar;
+ if(ar->regiontype==RGN_TYPE_TOOL_PROPS)
+ arprops= ar;
+ }
- arnew= MEM_callocN(sizeof(ARegion), "tools for view3d");
+ /* tool region hide/unhide also hides props */
+ if(arprops && artool) return artool;
- BLI_insertlinkafter(&sa->regionbase, ar, arnew);
- arnew->regiontype= RGN_TYPE_TOOLS;
- arnew->alignment= RGN_OVERLAP_LEFT;
-
- arnew->flag = RGN_FLAG_HIDDEN;
+ if(artool==NULL) {
+ /* add subdiv level; after header */
+ for(arhead= sa->regionbase.first; arhead; arhead= arhead->next)
+ if(arhead->regiontype==RGN_TYPE_HEADER)
+ break;
+
+ /* is error! */
+ if(arhead==NULL) return NULL;
+
+ artool= MEM_callocN(sizeof(ARegion), "tools for view3d");
+
+ BLI_insertlinkafter(&sa->regionbase, arhead, artool);
+ artool->regiontype= RGN_TYPE_TOOLS;
+ artool->alignment= RGN_OVERLAP_LEFT;
+ artool->flag = RGN_FLAG_HIDDEN;
+ }
+
+ if(arprops==NULL) {
+ /* add extra subdivided region for tool properties */
+ arprops= MEM_callocN(sizeof(ARegion), "tool props for view3d");
+
+ BLI_insertlinkafter(&sa->regionbase, artool, arprops);
+ arprops->regiontype= RGN_TYPE_TOOL_PROPS;
+ arprops->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
+ }
- return arnew;
+ return artool;
}
+/* ****************************************************** */
+
+/* function to always find a regionview3d context inside 3D window */
+RegionView3D *ED_view3d_context_rv3d(bContext *C)
+{
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+
+ if(rv3d==NULL) {
+ ScrArea *sa =CTX_wm_area(C);
+ if(sa->spacetype==SPACE_VIEW3D) {
+ ARegion *ar;
+ for(ar= sa->regionbase.first; ar; ar= ar->next)
+ if(ar->regiontype==RGN_TYPE_WINDOW)
+ return ar->regiondata;
+ }
+ }
+ return rv3d;
+}
/* ******************** default callbacks for view3d space ***************** */
@@ -270,6 +304,12 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
else
WM_event_remove_keymap_handler(&ar->handlers, keymap);
+ keymap= WM_keymap_listbase(wm, "Lattice", 0, 0);
+ if(stype==NS_EDITMODE_LATTICE)
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+ else
+ WM_event_remove_keymap_handler(&ar->handlers, keymap);
+
/* armature sketching needs to take over mouse */
keymap= WM_keymap_listbase(wm, "Armature_Sketch", 0, 0);
if(stype==NS_EDITMODE_TEXT)
@@ -289,7 +329,6 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10);
else
WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
}
/* add handlers, stuff you only do once or on area/region changes */
@@ -370,6 +409,17 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_ANIMATION:
+ switch(wmn->data) {
+ case ND_KEYFRAME_EDIT:
+ case ND_KEYFRAME_PROP:
+ case ND_NLA_EDIT:
+ case ND_NLA_ACTCHANGE:
+ case ND_ANIMCHAN_SELECT:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
case NC_SCENE:
switch(wmn->data) {
case ND_TRANSFORM:
@@ -442,30 +492,13 @@ static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar)
ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
-
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+
+ ED_region_header_init(ar);
}
static void view3d_header_area_draw(const bContext *C, ARegion *ar)
{
- 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);
-
- view3d_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn)
@@ -505,6 +538,16 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_ANIMATION:
+ switch(wmn->data) {
+ case ND_KEYFRAME_EDIT:
+ case ND_KEYFRAME_PROP:
+ case ND_NLA_EDIT:
+ case ND_NLA_ACTCHANGE:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
case NC_SCENE:
switch(wmn->data) {
case ND_FRAME:
@@ -541,9 +584,11 @@ static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
+
+
static void view3d_tools_area_draw(const bContext *C, ARegion *ar)
{
- ED_region_panels(C, ar, 1, NULL);
+ ED_region_panels(C, ar, 1, view3d_context_string(C));
}
/*
@@ -565,7 +610,17 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
if(v3d==NULL) return 0;
- if(CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {
+ "selected_objects", "selected_bases" "selected_editable_objects",
+ "selected_editable_bases" "visible_objects", "visible_bases", "selectable_objects", "selectable_bases",
+ "active_base", "active_object", "visible_bones", "editable_bones",
+ "selected_bones", "selected_editable_bones" "visible_pchans",
+ "selected_pchans", "active_bone", "active_pchan", NULL};
+
+ CTX_data_dir_set(result, dir);
+ }
+ else if(CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) {
int selected_objects= CTX_data_equals(member, "selected_objects");
for(base=scene->base.first; base; base=base->next) {
@@ -615,6 +670,22 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
return 1;
}
+ else if(CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) {
+ int selectable_objects= CTX_data_equals(member, "selectable_objects");
+
+ for(base=scene->base.first; base; base=base->next) {
+ if(base->lay & v3d->lay) {
+ if((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) {
+ if(selectable_objects)
+ CTX_data_id_list_add(result, &base->object->id);
+ else
+ CTX_data_list_add(result, &scene->id, &RNA_UnknownType, base);
+ }
+ }
+ }
+
+ return 1;
+ }
else if(CTX_data_equals(member, "active_base")) {
if(scene->basact && (scene->basact->lay & v3d->lay))
if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0)
@@ -832,6 +903,20 @@ void ED_spacetype_view3d(void)
BLI_addhead(&st->regiontypes, art);
view3d_toolbar_register(art);
+
+ /* regions: tool properties */
+ art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+ art->regionid = RGN_TYPE_TOOL_PROPS;
+ art->minsizex= 0;
+ art->minsizey= 120;
+ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
+ art->listener= view3d_buttons_area_listener;
+ art->init= view3d_tools_area_init;
+ art->draw= view3d_tools_area_draw;
+ BLI_addhead(&st->regiontypes, art);
+
+ view3d_tool_props_register(art);
+
/* regions: header */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 8d50a8afb29..fcfc48eff84 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -64,16 +64,14 @@
#include "BKE_depsgraph.h"
#include "BKE_idprop.h"
#include "BKE_mesh.h"
-#include "BKE_tessmesh.h"
#include "BKE_object.h"
#include "BKE_global.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
-#include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
#include "BIF_gl.h"
-#include "BIF_transform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -89,6 +87,7 @@
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
@@ -167,12 +166,12 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
if(ob->type==OB_MESH) {
Mesh *me= ob->data;
BMEditMesh *em = me->edit_btmesh;
+ BMesh *bm = em->bm;
BMVert *eve, *evedef=NULL;
BMEdge *eed;
BMIter iter;
- eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
- for ( ; eve; eve=BMIter_Step(&iter)) {
+ BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
if(BM_TestHFlag(eve, BM_SELECT)) {
evedef= eve;
tot++;
@@ -180,8 +179,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
}
}
- eed = BMIter_New(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for ( ; eed; eed=BMIter_Step(&iter)) {
+ BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
if(BM_TestHFlag(eed, BM_SELECT)) {
totedge++;
median[3]+= eed->crease;
@@ -1107,6 +1105,7 @@ static int view3d_panel_brush_poll(const bContext *C, PanelType *pt)
static void view3d_panel_brush(const bContext *C, Panel *pa)
{
uiBlock *block;
+ ToolSettings *ts= CTX_data_tool_settings(C);
Brush **brp = current_brush_source(CTX_data_scene(C)), *br;
short w = 268, h = 400, cx = 10, cy = h;
rctf rect;
@@ -1132,9 +1131,10 @@ static void view3d_panel_brush(const bContext *C, Panel *pa)
uiDefButC(block,ROW,B_REDR,"Pinch",cx+134,cy,67,19,&br->sculpt_tool,14.0,SCULPT_TOOL_PINCH,0,0,"Interactively pinch areas of the model");
uiDefButC(block,ROW,B_REDR,"Inflate",cx+201,cy,67,19,&br->sculpt_tool,14,SCULPT_TOOL_INFLATE,0,0,"Push vertices along the direction of their normals");
cy-= 20;
- uiDefButC(block,ROW,B_REDR,"Grab", cx,cy,89,19,&br->sculpt_tool,14,SCULPT_TOOL_GRAB,0,0,"Grabs a group of vertices and moves them with the mouse");
- uiDefButC(block,ROW,B_REDR,"Layer", cx+89,cy,89,19,&br->sculpt_tool,14, SCULPT_TOOL_LAYER,0,0,"Adds a layer of depth");
- uiDefButC(block,ROW,B_REDR,"Flatten", cx+178,cy,90,19,&br->sculpt_tool,14, SCULPT_TOOL_FLATTEN,0,0,"Interactively flatten areas of the model");
+ uiDefButC(block,ROW,B_REDR,"Grab", cx,cy,67,19,&br->sculpt_tool,14,SCULPT_TOOL_GRAB,0,0,"Grabs a group of vertices and moves them with the mouse");
+ uiDefButC(block,ROW,B_REDR,"Layer", cx+67,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_LAYER,0,0,"Adds a layer of depth");
+ uiDefButC(block,ROW,B_REDR,"Flatten", cx+134,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_FLATTEN,0,0,"Interactively flatten areas of the model");
+ uiDefButC(block,ROW,B_REDR,"Clay", cx+201,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_CLAY,0,0,"Build up depth quickly");
cy-= 25;
uiBlockEndAlign(block);
}
@@ -1142,6 +1142,10 @@ static void view3d_panel_brush(const bContext *C, Panel *pa)
uiBlockBeginAlign(block);
uiDefButI(block,NUMSLI,B_NOP,"Size: ",cx,cy,w,19,&br->size,1.0,200.0,0,0,"Set brush radius in pixels");
cy-= 20;
+ if(G.f & G_WEIGHTPAINT) {
+ uiDefButF(block,NUMSLI,B_NOP,"Weight: ",cx,cy,w,19,&ts->vgroup_weight,0,1.0,0,0,"Set vertex weight");
+ cy-= 20;
+ }
uiDefButF(block,NUMSLI,B_NOP,"Strength: ",cx,cy,w,19,&br->alpha,0,1.0,0,0,"Set brush strength");
cy-= 25;
uiBlockEndAlign(block);
@@ -1157,11 +1161,13 @@ static void view3d_panel_brush(const bContext *C, Panel *pa)
cy-= 20;
uiBlockEndAlign(block);
- rect.xmin= cx; rect.xmax= cx + w;
- rect.ymin= cy - 200; rect.ymax= cy;
- uiBlockBeginAlign(block);
- curvemap_buttons(block, br->curve, (char)0, B_NOP, 0, &rect);
- uiBlockEndAlign(block);
+ if(br->curve) {
+ rect.xmin= cx; rect.xmax= cx + w;
+ rect.ymin= cy - 200; rect.ymax= cy;
+ uiBlockBeginAlign(block);
+ curvemap_buttons(block, br->curve, (char)0, B_NOP, 0, &rect);
+ uiBlockEndAlign(block);
+ }
}
static void sculptmode_draw_interface_tools(Scene *scene, uiBlock *block, unsigned short cx, unsigned short cy)
@@ -1660,7 +1666,7 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
uiBlockEndAlign(block);
- uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->snap_flag, 0, 0, 0, 0, "Peel whole objects as one");
+ uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->toolsettings->snap_flag, 0, 0, 0, 0, "Peel whole objects as one");
}
@@ -1707,7 +1713,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
}
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
- uiDefAutoButsRNA(C, pa->layout, &ptr);
+ uiDefAutoButsRNA(C, pa->layout, &ptr, 2);
}
void view3d_buttons_register(ARegionType *art)
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 54696fc4508..dd4e67e612c 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -80,6 +80,7 @@
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_util.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "UI_interface.h"
@@ -2019,7 +2020,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
if(rv3d->rflag & RV3D_CLIPPING)
view3d_clr_clipping();
-// BIF_draw_manipulator(ar);
+ BIF_draw_manipulator(C);
if(v3d->zbuf) {
v3d->zbuf= FALSE;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index b4b35be3ef3..3c80b650cf3 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -62,7 +62,6 @@
#include "RE_pipeline.h" // make_stars
#include "BIF_gl.h"
-#include "BIF_retopo.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -71,8 +70,10 @@
#include "RNA_define.h"
#include "ED_particle.h"
+#include "ED_retopo.h"
#include "ED_space_api.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "UI_interface.h"
@@ -94,50 +95,50 @@ static void view3d_boxview_clip(ScrArea *sa)
float clip[6][4];
float x1= 0.0f, y1= 0.0f, z1= 0.0f, ofs[3];
int val;
-
+
/* create bounding box */
for(ar= sa->regionbase.first; ar; ar= ar->next) {
if(ar->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3d= ar->regiondata;
-
+
if(rv3d->viewlock & RV3D_BOXCLIP) {
if(ELEM(rv3d->view, V3D_VIEW_TOP, V3D_VIEW_BOTTOM)) {
if(ar->winx>ar->winy) x1= rv3d->dist;
else x1= ar->winx*rv3d->dist/ar->winy;
-
+
if(ar->winx>ar->winy) y1= ar->winy*rv3d->dist/ar->winx;
else y1= rv3d->dist;
-
+
ofs[0]= rv3d->ofs[0];
ofs[1]= rv3d->ofs[1];
}
else if(ELEM(rv3d->view, V3D_VIEW_FRONT, V3D_VIEW_BACK)) {
ofs[2]= rv3d->ofs[2];
-
+
if(ar->winx>ar->winy) z1= ar->winy*rv3d->dist/ar->winx;
else z1= rv3d->dist;
}
}
}
}
-
+
for(val=0; val<8; val++) {
if(ELEM4(val, 0, 3, 4, 7))
bb->vec[val][0]= -x1 - ofs[0];
else
bb->vec[val][0]= x1 - ofs[0];
-
+
if(ELEM4(val, 0, 1, 4, 5))
bb->vec[val][1]= -y1 - ofs[1];
else
bb->vec[val][1]= y1 - ofs[1];
-
+
if(val > 3)
bb->vec[val][2]= -z1 - ofs[2];
else
bb->vec[val][2]= z1 - ofs[2];
- }
-
+ }
+
/* normals for plane equations */
CalcNormFloat(bb->vec[0], bb->vec[1], bb->vec[4], clip[0]);
CalcNormFloat(bb->vec[1], bb->vec[2], bb->vec[5], clip[1]);
@@ -145,18 +146,18 @@ static void view3d_boxview_clip(ScrArea *sa)
CalcNormFloat(bb->vec[3], bb->vec[0], bb->vec[7], clip[3]);
CalcNormFloat(bb->vec[4], bb->vec[5], bb->vec[6], clip[4]);
CalcNormFloat(bb->vec[0], bb->vec[2], bb->vec[1], clip[5]);
-
+
/* then plane equations */
for(val=0; val<5; val++) {
clip[val][3]= - clip[val][0]*bb->vec[val][0] - clip[val][1]*bb->vec[val][1] - clip[val][2]*bb->vec[val][2];
}
clip[5][3]= - clip[5][0]*bb->vec[0][0] - clip[5][1]*bb->vec[0][1] - clip[5][2]*bb->vec[0][2];
-
+
/* create bounding box */
for(ar= sa->regionbase.first; ar; ar= ar->next) {
if(ar->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3d= ar->regiondata;
-
+
if(rv3d->viewlock & RV3D_BOXCLIP) {
rv3d->rflag |= RV3D_CLIPPING;
memcpy(rv3d->clip, clip, sizeof(clip));
@@ -171,11 +172,11 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar)
{
ARegion *artest;
RegionView3D *rv3d= ar->regiondata;
-
+
for(artest= sa->regionbase.first; artest; artest= artest->next) {
if(artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3dtest= artest->regiondata;
-
+
if(rv3dtest->viewlock) {
rv3dtest->dist= rv3d->dist;
@@ -197,7 +198,7 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar)
if( ELEM(rv3dtest->view, V3D_VIEW_FRONT, V3D_VIEW_BACK))
rv3dtest->ofs[2]= rv3d->ofs[2];
}
-
+
ED_region_tag_redraw(artest);
}
}
@@ -210,11 +211,11 @@ void view3d_boxview_copy(ScrArea *sa, ARegion *ar)
{
ARegion *artest;
RegionView3D *rv3d= ar->regiondata;
-
+
for(artest= sa->regionbase.first; artest; artest= artest->next) {
if(artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3dtest= artest->regiondata;
-
+
if(rv3dtest->viewlock) {
rv3dtest->dist= rv3d->dist;
VECCOPY(rv3dtest->ofs, rv3d->ofs);
@@ -237,7 +238,7 @@ typedef struct ViewOpsData {
float ofs[3], obofs[3];
float reverse, dist0;
float grid, far;
-
+
int origx, origy, oldx, oldy;
int origkey;
@@ -288,11 +289,11 @@ static void viewops_data(bContext *C, wmOperator *op, wmEvent *event)
vod->origx= vod->oldx= event->x;
vod->origy= vod->oldy= event->y;
vod->origkey= event->type;
-
+
/* lookup, we dont pass on v3d to prevent confusement */
vod->grid= v3d->grid;
vod->far= v3d->far;
-
+
calctrackballvec(&vod->ar->winrct, event->x, event->y, vod->trackvec);
initgrabz(rv3d, -rv3d->ofs[0], -rv3d->ofs[1], -rv3d->ofs[2]);
@@ -502,7 +503,8 @@ static int viewrotate_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
default:
- if(event->type==vod->origkey && event->val==0) {
+ /* origkey may be zero when invoked from a button */
+ if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) {
request_depth_update(CTX_wm_region_view3d(C));
MEM_freeN(vod);
@@ -522,7 +524,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(rv3d->viewlock)
return OPERATOR_CANCELLED;
-
+
/* makes op->customdata */
viewops_data(C, op, event);
vod= op->customdata;
@@ -556,9 +558,9 @@ void VIEW3D_OT_viewrotate(wmOperatorType *ot)
ot->invoke= viewrotate_invoke;
ot->modal= viewrotate_modal;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
}
/* ************************ viewmove ******************************** */
@@ -579,7 +581,7 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y)
window_to_3d_delta(vod->ar, dvec, x-vod->oldx, y-vod->oldy);
VecAddf(vod->rv3d->ofs, vod->rv3d->ofs, dvec);
-
+
if(vod->rv3d->viewlock & RV3D_BOXVIEW)
view3d_boxview_sync(vod->sa, vod->ar);
}
@@ -602,7 +604,8 @@ static int viewmove_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
default:
- if(event->type==vod->origkey && event->val==0) {
+ /* origkey may be zero when invoked from a button */
+ if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) {
request_depth_update(CTX_wm_region_view3d(C));
MEM_freeN(vod);
@@ -639,9 +642,9 @@ void VIEW3D_OT_viewmove(wmOperatorType *ot)
ot->invoke= viewmove_invoke;
ot->modal= viewmove_modal;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
}
/* ************************ viewzoom ******************************** */
@@ -649,7 +652,7 @@ void VIEW3D_OT_viewmove(wmOperatorType *ot)
static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my)
{
RegionView3D *rv3d= ar->regiondata;
-
+
if(U.uiflag & USER_ZOOM_TO_MOUSEPOS) {
float dvec[3];
float tvec[3];
@@ -762,7 +765,8 @@ static int viewzoom_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
default:
- if(event->type==vod->origkey && event->val==0) {
+ /* origkey may be zero when invoked from a button */
+ if(ELEM3(event->type, ESCKEY, LEFTMOUSE, RIGHTMOUSE) || (event->type==vod->origkey && event->val==0)) {
request_depth_update(CTX_wm_region_view3d(C));
MEM_freeN(vod);
@@ -799,7 +803,7 @@ static int viewzoom_exec(bContext *C, wmOperator *op)
if(rv3d->viewlock & RV3D_BOXVIEW)
view3d_boxview_sync(CTX_wm_area(C), CTX_wm_region(C));
-
+
request_depth_update(CTX_wm_region_view3d(C));
ED_region_tag_redraw(CTX_wm_region(C));
@@ -838,10 +842,10 @@ void VIEW3D_OT_zoom(wmOperatorType *ot)
ot->exec= viewzoom_exec;
ot->modal= viewzoom_modal;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
- ot->flag= OPTYPE_REGISTER;
-
+ ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
+
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
}
@@ -898,31 +902,31 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
if (rv3d->persp==V3D_CAMOB) {
rv3d->persp= V3D_PERSP;
- smooth_view(C, NULL, v3d->camera, new_ofs, NULL, &new_dist, NULL);
+ smooth_view(C, NULL, v3d->camera, new_ofs, NULL, &new_dist, NULL);
}
}
// XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT);
-
+
if(rv3d->viewlock & RV3D_BOXVIEW)
view3d_boxview_copy(CTX_wm_area(C), ar);
return OPERATOR_FINISHED;
}
-void VIEW3D_OT_viewhome(wmOperatorType *ot)
+void VIEW3D_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View home";
ot->description = "View all objects in scene.";
- ot->idname= "VIEW3D_OT_viewhome";
+ ot->idname= "VIEW3D_OT_view_all";
/* api callbacks */
ot->exec= viewhome_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
-
+
RNA_def_boolean(ot->srna, "center", 0, "Center", "");
}
@@ -1012,7 +1016,7 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with
/* perspective should be a bit farther away to look nice */
if(rv3d->persp==V3D_ORTHO)
size*= 0.7;
-
+
if(size <= v3d->near*1.5f) size= v3d->near*1.5f;
new_ofs[0]= -(min[0]+max[0])/2.0f;
@@ -1035,7 +1039,7 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with
if (rv3d->persp==V3D_CAMOB) {
rv3d->persp= V3D_PERSP;
smooth_view(C, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL);
- }
+ }
else {
smooth_view(C, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
}
@@ -1047,18 +1051,18 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with
return OPERATOR_FINISHED;
}
-void VIEW3D_OT_viewcenter(wmOperatorType *ot)
+void VIEW3D_OT_view_center(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View center";
ot->description = "Move the view to the selection center.";
- ot->idname= "VIEW3D_OT_viewcenter";
+ ot->idname= "VIEW3D_OT_view_center";
/* api callbacks */
ot->exec= viewcenter_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
}
@@ -1070,16 +1074,16 @@ static int render_border_exec(bContext *C, wmOperator *op)
View3D *v3d = CTX_wm_view3d(C);
ARegion *ar= CTX_wm_region(C);
Scene *scene= CTX_data_scene(C);
-
+
rcti rect;
rctf vb;
-
+
/* get border select values using rna */
rect.xmin= RNA_int_get(op->ptr, "xmin");
rect.ymin= RNA_int_get(op->ptr, "ymin");
rect.xmax= RNA_int_get(op->ptr, "xmax");
rect.ymax= RNA_int_get(op->ptr, "ymax");
-
+
/* calculate range */
calc_viewborder(scene, ar, v3d, &vb);
@@ -1087,13 +1091,13 @@ static int render_border_exec(bContext *C, wmOperator *op)
scene->r.border.ymin= ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin);
scene->r.border.xmax= ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin);
scene->r.border.ymax= ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin);
-
- /* actually set border */
+
+ /* actually set border */
CLAMP(scene->r.border.xmin, 0.0, 1.0);
CLAMP(scene->r.border.ymin, 0.0, 1.0);
CLAMP(scene->r.border.xmax, 0.0, 1.0);
CLAMP(scene->r.border.ymax, 0.0, 1.0);
-
+
/* drawing a border surrounding the entire camera view switches off border rendering
* or the border covers no pixels */
if ((scene->r.border.xmin <= 0.0 && scene->r.border.xmax >= 1.0 &&
@@ -1105,7 +1109,7 @@ static int render_border_exec(bContext *C, wmOperator *op)
} else {
scene->r.mode |= R_BORDER;
}
-
+
return OPERATOR_FINISHED;
}
@@ -1113,9 +1117,9 @@ static int render_border_exec(bContext *C, wmOperator *op)
static int view3d_render_border_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
-
+
/* if not in camera view do not exec the operator*/
- if (rv3d->persp == V3D_CAMOB) return WM_border_select_invoke(C, op, event);
+ if (rv3d->persp == V3D_CAMOB) return WM_border_select_invoke(C, op, event);
else return OPERATOR_PASS_THROUGH;
}
@@ -1130,12 +1134,12 @@ void VIEW3D_OT_render_border(wmOperatorType *ot)
ot->invoke= view3d_render_border_invoke;
ot->exec= render_border_exec;
ot->modal= WM_border_select_modal;
-
+
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
@@ -1151,7 +1155,7 @@ static int view3d_border_zoom_exec(bContext *C, wmOperator *op)
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d= CTX_wm_region_view3d(C);
Scene *scene= CTX_data_scene(C);
-
+
/* Zooms in on a border drawn by the user */
rcti rect;
float dvec[3], vb[2], xscale, yscale, scale;
@@ -1166,16 +1170,16 @@ static int view3d_border_zoom_exec(bContext *C, wmOperator *op)
int had_depth = 0;
double cent[2], p[3];
int xs, ys;
-
+
/* note; otherwise opengl won't work */
view3d_operator_needs_opengl(C);
-
+
/* get border select values using rna */
rect.xmin= RNA_int_get(op->ptr, "xmin");
rect.ymin= RNA_int_get(op->ptr, "ymin");
rect.xmax= RNA_int_get(op->ptr, "xmax");
rect.ymax= RNA_int_get(op->ptr, "ymax");
-
+
/* Get Z Depths, needed for perspective, nice for ortho */
bgl_get_mats(&mats);
draw_depth(scene, ar, v3d, NULL);
@@ -1274,27 +1278,27 @@ static int view3d_border_zoom_exec(bContext *C, wmOperator *op)
}
smooth_view(C, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
-
+
if(rv3d->viewlock & RV3D_BOXVIEW)
view3d_boxview_sync(CTX_wm_area(C), ar);
-
+
return OPERATOR_FINISHED;
}
static int view3d_border_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
-
+
/* if in camera view do not exec the operator so we do not conflict with set render border*/
- if (rv3d->persp != V3D_CAMOB)
- return WM_border_select_invoke(C, op, event);
- else
+ if (rv3d->persp != V3D_CAMOB)
+ return WM_border_select_invoke(C, op, event);
+ else
return OPERATOR_PASS_THROUGH;
}
void VIEW3D_OT_zoom_border(wmOperatorType *ot)
{
-
+
/* identifiers */
ot->name= "Border Zoom";
ot->description = "Zoom in the view to the nearest object contained in the border.";
@@ -1304,12 +1308,12 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot)
ot->invoke= view3d_border_zoom_invoke;
ot->exec= view3d_border_zoom_exec;
ot->modal= WM_border_select_modal;
-
+
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
-
+
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
@@ -1320,21 +1324,21 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot)
/* ********************* Changing view operator ****************** */
static EnumPropertyItem prop_view_items[] = {
- {V3D_VIEW_FRONT, "FRONT", "Front", "View From the Front"},
- {V3D_VIEW_BACK, "BACK", "Back", "View From the Back"},
- {V3D_VIEW_LEFT, "LEFT", "Left", "View From the Left"},
- {V3D_VIEW_RIGHT, "RIGHT", "Right", "View From the Right"},
- {V3D_VIEW_TOP, "TOP", "Top", "View From the Top"},
- {V3D_VIEW_BOTTOM, "BOTTOM", "Bottom", "View From the Bottom"},
- {V3D_VIEW_CAMERA, "CAMERA", "Camera", "View From the active amera"},
- {0, NULL, NULL, NULL}};
+ {V3D_VIEW_FRONT, "FRONT", 0, "Front", "View From the Front"},
+ {V3D_VIEW_BACK, "BACK", 0, "Back", "View From the Back"},
+ {V3D_VIEW_LEFT, "LEFT", 0, "Left", "View From the Left"},
+ {V3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"},
+ {V3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"},
+ {V3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"},
+ {V3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active amera"},
+ {0, NULL, 0, NULL, NULL}};
static void axis_set_view(bContext *C, float q1, float q2, float q3, float q4, short view, int perspo)
{
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d= CTX_wm_region_view3d(C);
float new_quat[4];
-
+
if(rv3d->viewlock) {
/* only pass on if */
if(rv3d->view==V3D_VIEW_FRONT && view==V3D_VIEW_BACK);
@@ -1345,10 +1349,10 @@ static void axis_set_view(bContext *C, float q1, float q2, float q3, float q4, s
else if(rv3d->view==V3D_VIEW_TOP && view==V3D_VIEW_BOTTOM);
else return;
}
-
+
new_quat[0]= q1; new_quat[1]= q2;
new_quat[2]= q3; new_quat[3]= q4;
-
+
rv3d->view= view;
if(rv3d->viewlock) {
@@ -1361,8 +1365,8 @@ static void axis_set_view(bContext *C, float q1, float q2, float q3, float q4, s
if (U.uiflag & USER_AUTOPERSP) rv3d->persp= V3D_ORTHO;
else if(rv3d->persp==V3D_CAMOB) rv3d->persp= perspo;
- smooth_view(C, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL);
- }
+ smooth_view(C, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL);
+ }
else {
if (U.uiflag & USER_AUTOPERSP) rv3d->persp= V3D_ORTHO;
@@ -1419,7 +1423,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
QUATCOPY(rv3d->lviewquat, rv3d->viewquat);
rv3d->lview= rv3d->view;
rv3d->lpersp= rv3d->persp;
-
+
#if 0
if(G.qual==LR_ALTKEY) {
if(oldcamera && is_an_active_object(oldcamera)) {
@@ -1428,7 +1432,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
handle_view3d_lock();
}
#endif
-
+
if(BASACT) {
/* check both G.vd as G.scene cameras */
if((v3d->camera==NULL || scene->camera==NULL) && OBACT->type==OB_CAMERA) {
@@ -1436,14 +1440,14 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
/*handle_view3d_lock();*/
}
}
-
+
if(v3d->camera==NULL) {
v3d->camera= scene_find_camera(scene);
/*handle_view3d_lock();*/
}
rv3d->persp= V3D_CAMOB;
smooth_view(C, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
-
+
}
else{
/* return to settings of last view */
@@ -1471,29 +1475,29 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
/* api callbacks */
ot->exec= viewnumpad_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
-
+
RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view");
}
static EnumPropertyItem prop_view_orbit_items[] = {
- {V3D_VIEW_STEPLEFT, "ORBITLEFT", "Orbit Left", "Orbit the view around to the Left"},
- {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", "Orbit Right", "Orbit the view around to the Right"},
- {V3D_VIEW_STEPUP, "ORBITUP", "Orbit Up", "Orbit the view Up"},
- {V3D_VIEW_STEPDOWN, "ORBITDOWN", "Orbit Down", "Orbit the view Down"},
- {0, NULL, NULL, NULL}};
+ {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, "Orbit Left", "Orbit the view around to the Left"},
+ {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"},
+ {V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"},
+ {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, "Orbit Down", "Orbit the view Down"},
+ {0, NULL, 0, NULL, NULL}};
static int vieworbit_exec(bContext *C, wmOperator *op)
{
ARegion *ar= CTX_wm_region(C);
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- float phi, si, q1[4];
+ float phi, si, q1[4];
int orbitdir;
orbitdir = RNA_enum_get(op->ptr, "type");
-
+
if(rv3d->viewlock==0) {
if(rv3d->persp != V3D_CAMOB) {
@@ -1527,7 +1531,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
}
}
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
}
void VIEW3D_OT_view_orbit(wmOperatorType *ot)
@@ -1540,28 +1544,28 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot)
/* api callbacks */
ot->exec= vieworbit_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
}
static EnumPropertyItem prop_view_pan_items[] = {
- {V3D_VIEW_PANLEFT, "PANLEFT", "Pan Left", "Pan the view to the Left"},
- {V3D_VIEW_PANRIGHT, "PANRIGHT", "Pan Right", "Pan the view to the Right"},
- {V3D_VIEW_PANUP, "PANUP", "Pan Up", "Pan the view Up"},
- {V3D_VIEW_PANDOWN, "PANDOWN", "Pan Down", "Pan the view Down"},
- {0, NULL, NULL, NULL}};
+ {V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"},
+ {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"},
+ {V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"},
+ {V3D_VIEW_PANDOWN, "PANDOWN", 0, "Pan Down", "Pan the view Down"},
+ {0, NULL, 0, NULL, NULL}};
static int viewpan_exec(bContext *C, wmOperator *op)
{
ARegion *ar= CTX_wm_region(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
- float vec[3];
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ float vec[3];
int pandir;
pandir = RNA_enum_get(op->ptr, "type");
-
+
initgrabz(rv3d, 0.0, 0.0, 0.0);
if(pandir == V3D_VIEW_PANRIGHT) window_to_3d_delta(ar, vec, -32, 0);
@@ -1577,7 +1581,7 @@ static int viewpan_exec(bContext *C, wmOperator *op)
ED_region_tag_redraw(ar);
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
}
void VIEW3D_OT_view_pan(wmOperatorType *ot)
@@ -1590,7 +1594,7 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot)
/* api callbacks */
ot->exec= viewpan_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan");
@@ -1599,17 +1603,17 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot)
static int viewpersportho_exec(bContext *C, wmOperator *op)
{
ARegion *ar= CTX_wm_region(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
-
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+
if(rv3d->viewlock==0) {
- if(rv3d->persp!=V3D_ORTHO)
+ if(rv3d->persp!=V3D_ORTHO)
rv3d->persp=V3D_ORTHO;
else rv3d->persp=V3D_PERSP;
ED_region_tag_redraw(ar);
}
return OPERATOR_FINISHED;
-
+
}
void VIEW3D_OT_view_persportho(wmOperatorType *ot)
@@ -1622,7 +1626,7 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot)
/* api callbacks */
ot->exec= viewpersportho_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
}
@@ -1710,13 +1714,13 @@ static int view3d_clipping_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* toggles */
-void VIEW3D_OT_clipping(wmOperatorType *ot)
+void VIEW3D_OT_clip_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clipping Border";
ot->description = "Set the view clipping border.";
- ot->idname= "VIEW3D_OT_clipping";
+ ot->idname= "VIEW3D_OT_clip_border";
/* api callbacks */
ot->invoke= view3d_clipping_invoke;
@@ -1724,10 +1728,10 @@ void VIEW3D_OT_clipping(wmOperatorType *ot)
ot->modal= WM_border_select_modal;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
-
+
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
@@ -1744,7 +1748,7 @@ static int view3d_drawtype_exec(bContext *C, wmOperator *op)
dt = RNA_int_get(op->ptr, "draw_type");
dt_alt = RNA_int_get(op->ptr, "draw_type_alternate");
-
+
if (dt_alt != -1) {
if (v3d->drawtype == dt)
v3d->drawtype = dt_alt;
@@ -1755,7 +1759,7 @@ static int view3d_drawtype_exec(bContext *C, wmOperator *op)
v3d->drawtype = dt;
ED_area_tag_redraw(CTX_wm_area(C));
-
+
return OPERATOR_FINISHED;
}
@@ -1777,10 +1781,10 @@ void VIEW3D_OT_drawtype(wmOperatorType *ot)
ot->exec= view3d_drawtype_exec;
ot->poll= ED_operator_view3d_active;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER;
-
+
/* rna XXX should become enum */
RNA_def_int(ot->srna, "draw_type", 0, INT_MIN, INT_MAX, "Draw Type", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "draw_type_alternate", -1, INT_MIN, INT_MAX, "Draw Type Alternate", "", INT_MIN, INT_MAX);
@@ -1798,36 +1802,36 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
float dx, dy, fz, *fp = NULL, dvec[3], oldcurs[3];
short mx, my, mval[2];
// short ctrl= 0; // XXX
-
+
fp= give_cursor(scene, v3d);
-
+
// if(obedit && ctrl) lr_click= 1;
VECCOPY(oldcurs, fp);
-
+
mx= event->x - ar->winrct.xmin;
my= event->y - ar->winrct.ymin;
project_short_noclip(ar, fp, mval);
-
+
initgrabz(rv3d, fp[0], fp[1], fp[2]);
-
+
if(mval[0]!=IS_CLIPPED) {
-
+
window_to_3d_delta(ar, dvec, mval[0]-mx, mval[1]-my);
VecSubf(fp, fp, dvec);
}
else {
-
+
dx= ((float)(mx-(ar->winx/2)))*rv3d->zfac/(ar->winx/2);
dy= ((float)(my-(ar->winy/2)))*rv3d->zfac/(ar->winy/2);
-
+
fz= rv3d->persmat[0][3]*fp[0]+ rv3d->persmat[1][3]*fp[1]+ rv3d->persmat[2][3]*fp[2]+ rv3d->persmat[3][3];
fz= fz/rv3d->zfac;
-
+
fp[0]= (rv3d->persinv[0][0]*dx + rv3d->persinv[1][0]*dy+ rv3d->persinv[2][0]*fz)-rv3d->ofs[0];
fp[1]= (rv3d->persinv[0][1]*dx + rv3d->persinv[1][1]*dy+ rv3d->persinv[2][1]*fz)-rv3d->ofs[1];
fp[2]= (rv3d->persinv[0][2]*dx + rv3d->persinv[1][2]*dy+ rv3d->persinv[2][2]*fz)-rv3d->ofs[2];
}
-
+
// if(lr_click) {
// XXX if(obedit->type==OB_MESH) add_click_mesh();
// else if ELEM(obedit->type, OB_CURVE, OB_SURF) addvert_Nurb(0);
@@ -1836,28 +1840,65 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
// }
// XXX notifier for scene */
ED_area_tag_redraw(CTX_wm_area(C));
-
+
/* prevent other mouse ops to fail */
return OPERATOR_PASS_THROUGH;
}
void VIEW3D_OT_cursor3d(wmOperatorType *ot)
{
-
+
/* identifiers */
ot->name= "Set 3D Cursor";
ot->description = "Set the location of the 3D cursor.";
ot->idname= "VIEW3D_OT_cursor3d";
-
+
/* api callbacks */
ot->invoke= set_3dcursor_invoke;
-
+
ot->poll= ED_operator_view3d_active;
-
+
/* rna later */
}
+/* ***************** manipulator op ******************* */
+
+
+static int manipulator_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+
+ if(!(v3d->twflag & V3D_USE_MANIPULATOR)) return OPERATOR_PASS_THROUGH;
+ if(!(v3d->twflag & V3D_DRAW_MANIPULATOR)) return OPERATOR_PASS_THROUGH;
+
+ /* note; otherwise opengl won't work */
+ view3d_operator_needs_opengl(C);
+
+ if(0==BIF_do_manipulator(C, event, op))
+ return OPERATOR_PASS_THROUGH;
+
+ return OPERATOR_FINISHED;
+}
+
+void VIEW3D_OT_manipulator(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "3D Manipulator";
+ ot->description = "";
+ ot->idname= "VIEW3D_OT_manipulator";
+
+ /* api callbacks */
+ ot->invoke= manipulator_invoke;
+
+ ot->poll= ED_operator_view3d_active;
+
+ /* rna later */
+ RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
+}
+
+
/* ************************* below the line! *********************** */
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index f3c4c1170d1..51ba58b3020 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -72,6 +72,7 @@
#include "ED_mesh.h"
#include "ED_util.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "WM_api.h"
@@ -82,7 +83,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BIF_transform.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -118,8 +118,7 @@
#define TEST_EDITMESH if(obedit==0) return; \
if( (v3d->lay & obedit->lay)==0 ) return;
-/* XXX port over */
-static void handle_view3d_lock(void) {}
+/* XXX port over */
static void countall(void) {}
extern void borderselect();
static int retopo_mesh_paint_check() {return 0;}
@@ -202,6 +201,25 @@ static RegionView3D *wm_region_view3d(const bContext *C)
return NULL;
}
+// XXX quickly ported across
+static void handle_view3d_lock(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= (View3D *)CTX_wm_space_data(C);
+
+ if (v3d != NULL && sa != NULL) {
+ if(v3d->localview==0 && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) {
+
+ /* copy to scene */
+ scene->lay= v3d->lay;
+ scene->camera= v3d->camera;
+
+ //copy_view3d_lock(REDRAW);
+ }
+ }
+}
+
/* XXX; all this context stuff... should become operator */
void do_layer_buttons(bContext *C, short event)
{
@@ -231,7 +249,7 @@ void do_layer_buttons(bContext *C, short event)
v3d->lay= (1<<20)-1;
}
- if(v3d->scenelock) handle_view3d_lock();
+ 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 */
@@ -267,7 +285,7 @@ static int layers_exec(bContext *C, wmOperator *op)
else
v3d->lay = (1<<nr);
- if(v3d->scenelock) handle_view3d_lock();
+ 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 */
@@ -518,7 +536,7 @@ static void do_view3d_view_alignviewmenu(bContext *C, void *arg, int event)
// XXX mainqenter(PADASTERKEY, 1);
break;
case 6: /* Center View and Cursor to Origin */
- WM_operator_name_call(C, "VIEW3D_OT_viewcenter", WM_OP_EXEC_REGION_WIN, NULL);
+ 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;
@@ -584,10 +602,10 @@ static void do_view3d_viewmenu(bContext *C, void *arg, int event)
case 8: /* Global View */
break;
case 9: /* View All (Home) */
- WM_operator_name_call(C, "VIEW3D_OT_viewhome", WM_OP_EXEC_REGION_WIN, NULL);
+ 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_viewcenter", WM_OP_EXEC_REGION_WIN, NULL);
+ WM_operator_name_call(C, "VIEW3D_OT_view_center", WM_OP_EXEC_REGION_WIN, NULL);
break;
case 13: /* Play Back Animation */
break;
@@ -598,7 +616,7 @@ static void do_view3d_viewmenu(bContext *C, void *arg, int event)
// add_blockhandler(sa, VIEW3D_HANDLER_PROPERTIES, UI_PNL_UNSTOW);
break;
case 17: /* Set Clipping Border */
- WM_operator_name_call(C, "VIEW3D_OT_clipping", WM_OP_INVOKE_REGION_WIN, NULL);
+ 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);
@@ -619,83 +637,6 @@ static void do_view3d_viewmenu(bContext *C, void *arg, int event)
}
#endif
-static void view3d_view_viewnavmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_fly_mode");
-
-// uiItemS(layout);
-
- uiItemsEnumO(layout, "VIEW3D_OT_view_orbit", "type");
-
- uiItemS(layout);
-
- uiItemsEnumO(layout, "VIEW3D_OT_view_pan", "type");
-
- uiItemS(layout);
-
- uiItemFloatO(layout, "Zoom in", 0, "VIEW3D_OT_zoom", "delta", 1.0f);
- uiItemFloatO(layout, "Zoom out", 0, "VIEW3D_OT_zoom", "delta", -1.0f);
-
-}
-static void view3d_view_alignviewmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-
-}
-
-static void view3d_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- ScrArea *sa= CTX_wm_area(C);
-
-// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_transform_orientations_panel"); // Transform Orientations...
-// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_render_preview_panel"); // render preview...
-// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_view_properties_panel"); // View Properties....
-// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_background_image_panel"); // Background Image....
-// uiItemO(layout, ICON_MENU_PANEL, "VIEW3D_OT_toggle_grease_pencil_panel"); // Grease Pencil....
-
-// uiItemS(layout);
-
- uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_CAMERA);
- uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_TOP);
- uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_FRONT);
- uiItemEnumO(layout, NULL, 0, "VIEW3D_OT_viewnumpad", "type", V3D_VIEW_RIGHT);
-
- //uiItemMenuF(layout, "Cameras", view3d_view_camerasmenu);
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "VIEW3D_OT_view_persportho");
-
- uiItemS(layout);
-
-// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_show_all_layers");
-
-// uiItemS(layout);
-
-// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_local_view");
-// uiItemO(layout, NULL, 0, "VIEW3D_OT_view_global_view");
-
-// uiItemS(layout);
-
- uiItemMenuF(layout, "View Navigation", 0, view3d_view_viewnavmenu);
- uiItemMenuF(layout, "Align View", 0, view3d_view_alignviewmenu);
-
- uiItemS(layout);
-
- uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
-
- uiItemO(layout, NULL, 0, "VIEW3D_OT_clipping");
- uiItemO(layout, NULL, 0, "VIEW3D_OT_zoom_border");
-
- uiItemS(layout);
-
- uiItemO(layout, NULL, 0, "VIEW3D_OT_viewcenter");
- uiItemO(layout, NULL, 0, "VIEW3D_OT_viewhome");
-
- uiItemS(layout);
-
- if(sa->full) uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
- else uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctr DownArrow
-}
#if 0
static uiBlock *view3d_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
{
@@ -1008,203 +949,68 @@ static uiBlock *view3d_select_object_groupedmenu(bContext *C, ARegion *ar, void
#endif
-static uiBlock *view3d_select_objectmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_select_objectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
-// short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_select_objectmenu", UI_EMBOSSP);
-
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Select/Deselect All", 0, "OBJECT_OT_select_all_toggle");
+ uiItemO(layout, "Inverse", 0, "OBJECT_OT_select_inverse");
+ uiItemO(layout, "Random", 0, "OBJECT_OT_select_random");
+ uiItemO(layout, "Select All by Layer", 0, "OBJECT_OT_select_by_layer");
+ uiItemMenuEnumO(layout, "Select All by Type", 0, "OBJECT_OT_select_by_type", "type");
+ uiItemMenuEnumO(layout, "Select Grouped", 0, "OBJECT_OT_select_grouped", "type");
+
#if 0
- uiBlockSetButmFunc(block, do_view3d_select_objectmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 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, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Inverse|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Random", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
-
uiDefIconTextBlockBut(block, view3d_select_object_layermenu, NULL, ICON_RIGHTARROW_THIN, "Select All by Layer", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_select_object_typemenu, NULL, ICON_RIGHTARROW_THIN, "Select All by Type", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
+
+ uiItemS(layout);
+
uiDefIconTextBlockBut(block, view3d_select_object_linkedmenu, NULL, ICON_RIGHTARROW_THIN, "Linked", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_select_object_groupedmenu, NULL, ICON_RIGHTARROW_THIN, "Grouped", 0, yco-=20, 120, 19, "");
#endif
- uiDefMenuButO(block, "VIEW3D_OT_select_border", "Border Select");
-
- uiDefMenuSep(block);
-
- uiDefMenuButO(block, "OBJECT_OT_select_all_toggle", "Select/Deselect All");
- uiDefMenuButO(block, "OBJECT_OT_select_invert", "Inverse");
- uiDefMenuButO(block, "OBJECT_OT_select_random", "Random");
- uiDefMenuButO(block, "OBJECT_OT_select_by_layer", "Select All by Layer");
- uiDefMenuButO(block, "OBJECT_OT_select_by_type", "Select All by Type");
-
-
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
- uiTextBoundsBlock(block, 50);
- return block;
}
-void do_view3d_select_meshmenu(bContext *C, void *arg, int event)
+static void view3d_select_meshmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0
-/* extern void borderselect(void);*/
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
- switch(event) {
-
- case 0: /* border select */
- borderselect();
- break;
- case 2: /* Select/Deselect all */
- deselectall_mesh();
- break;
- case 3: /* Inverse */
- selectswap_mesh();
- break;
- case 4: /* select linked vertices */
- selectconnected_mesh_all();
- break;
- case 5: /* select random */
- selectrandom_mesh();
- break;
- case 7: /* select more */
- select_more();
- break;
- case 8: /* select less */
- select_less();
- break;
- case 9: /* select non-manifold */
- select_non_manifold();
- break;
- case 11: /* select triangles */
- select_faces_by_numverts(3);
- break;
- case 12: /* select quads */
- select_faces_by_numverts(4);
- break;
- case 13: /* select non-triangles/quads */
- select_faces_by_numverts(5);
- break;
- case 14: /* select sharp edges */
- select_sharp_edges();
- break;
- case 15: /* select linked flat faces */
- select_linked_flat_faces();
- break;
+ uiItemS(layout);
- case 16: /* path select */
- pathselect();
- ED_undo_push(C, "Path Select");
- break;
- case 17: /* edge loop select */
- loop_multiselect(0);
- break;
- case 18: /* edge ring select */
- loop_multiselect(1);
- break;
- case 19: /* loop to region */
- loop_to_region();
- break;
- case 20: /* region to loop */
- region_to_loop();
- break;
- case 21: /* Select grouped */
- select_mesh_group_menu();
- break;
- }
-#endif
-}
+ uiItemO(layout, "Select/Deselect All", 0, "MESH_OT_select_all_toggle");
+ uiItemO(layout, "Inverse", 0, "MESH_OT_select_inverse");
+ uiItemS(layout);
-static uiBlock *view3d_select_meshmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_select_meshmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_select_meshmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 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, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Inverse|Ctrl I", 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, "Random...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Non-Manifold|Ctrl Alt Shift M",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Sharp Edges|Ctrl Alt Shift S",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 14, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Linked Flat Faces|Ctrl Alt Shift F",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Triangles|Ctrl Alt Shift 3",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Quads|Ctrl Alt Shift 4",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Non-Triangles/Quads|Ctrl Alt Shift 5",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Similar to Selection...|Shift G",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 21, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "More|Ctrl NumPad +",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Less|Ctrl NumPad -",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Linked Vertices|Ctrl L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vertex Path|W Alt 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Loop|Ctrl E 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Ring|Ctrl E 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 18, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6,
- menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Loop to Region|Ctrl E 8", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 19, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Region to Loop|Ctrl E 9", 0, yco-=20, menuwidth, 20, NULL, 0.0, 0.0, 1, 20, "");
-
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemO(layout, "Random...", 0, "MESH_OT_select_random"); // Random...
+ uiItemO(layout, "Sharp Edges", 0, "MESH_OT_edges_select_sharp");
+ uiItemO(layout, "Linked Flat Faces", 0, "MESH_OT_faces_select_linked_flat");
- uiTextBoundsBlock(block, 50);
- return block;
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Triangles", 0, "MESH_OT_select_by_number_vertices", "type", 3); // Ctrl Alt Shift 3
+ uiItemEnumO(layout, "Quads", 0, "MESH_OT_select_by_number_vertices", "type", 4); // Ctrl Alt Shift 4
+ uiItemEnumO(layout, "Loose Verts/Edges", 0, "MESH_OT_select_by_number_vertices", "type", 5); // Ctrl Alt Shift 5
+ uiItemO(layout, "Similar...", 0, "MESH_OT_select_similar");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Less", 0, "MESH_OT_select_more");
+ uiItemO(layout, "More", 0, "MESH_OT_select_less");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Linked", 0, "MESH_OT_select_linked");
+ uiItemO(layout, "Vertex Path", 0, "MESH_OT_select_vertex_path"); // W, Alt 7
+ uiItemO(layout, "Edge Loop", 0, "MESH_OT_loop_multi_select");
+ uiItemBooleanO(layout, "Edge Ring", 0, "MESH_OT_loop_multi_select", "ring", 1);
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_loop_to_region"); // Ctrl E 8
+ uiItemO(layout, NULL, 0, "MESH_OT_region_to_loop"); // Ctrl E 9
}
static void view3d_select_curvemenu(bContext *C, uiLayout *layout, void *arg_unused)
@@ -1217,7 +1023,7 @@ static void view3d_select_curvemenu(bContext *C, uiLayout *layout, void *arg_unu
uiItemS(layout);
uiItemO(layout, NULL, 0, "CURVE_OT_select_all_toggle");
- uiItemO(layout, NULL, 0, "CURVE_OT_select_invert");
+ uiItemO(layout, NULL, 0, "CURVE_OT_select_inverse");
uiItemO(layout, NULL, 0, "CURVE_OT_select_random"); // Random...
uiItemO(layout, NULL, 0, "CURVE_OT_select_every_nth"); // Every Nth..
@@ -1303,186 +1109,70 @@ static uiBlock *view3d_select_metaballmenu(bContext *C, ARegion *ar, void *arg_u
return block;
}
-static void do_view3d_select_latticemenu(bContext *C, void *arg, int event)
+static void view3d_select_latticemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0
-/* extern void borderselect(void);*/
-
- switch(event) {
- case 0: /* border select */
- borderselect();
- break;
- case 2: /* Select/Deselect all */
- deselectall_Latt();
- break;
- }
-#endif
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
+ uiItemS(layout);
+ uiItemO(layout, NULL, 0, "LATTICE_OT_select_all_toggle");
}
-static uiBlock *view3d_select_latticemenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_select_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_select_latticemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_select_latticemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 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, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ PointerRNA ptr;
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
- uiTextBoundsBlock(block, 50);
- return block;
-}
+ uiItemS(layout);
-static void do_view3d_select_armaturemenu(bContext *C, void *arg, int event)
-{
-#if 0
-/* extern void borderselect(void);*/
+ uiItemO(layout, "Select/Deselect All", 0, "ARMATURE_OT_select_all_toggle");
+ uiItemO(layout, "Inverse", 0, "ARMATURE_OT_select_inverse");
- switch(event) {
- case 0: /* border select */
- borderselect();
- break;
- case 2: /* Select/Deselect all */
- deselectall_armature(1, 1);
- break;
- case 3: /* Swap Select All */
- deselectall_armature(3, 1);
- break;
- case 4: /* Select parent */
- armature_select_hierarchy(BONE_SELECT_PARENT, 0);
- break;
- case 5: /* Select child */
- armature_select_hierarchy(BONE_SELECT_CHILD, 0);
- break;
- case 6: /* Extend Select parent */
- armature_select_hierarchy(BONE_SELECT_PARENT, 1);
- break;
- case 7: /* Extend Select child */
- armature_select_hierarchy(BONE_SELECT_CHILD, 1);
- break;
- }
-#endif
-}
+ uiItemS(layout);
-static uiBlock *view3d_select_armaturemenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_select_armaturemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_select_armaturemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 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, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Inverse|Ctrl I", 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, "Select Parent|[", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Child|]", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Select Parent|Shift [", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Select Child|Shift ]", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
-
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemEnumO(layout, "Parent", 0, "ARMATURE_OT_select_hierarchy", "direction", BONE_SELECT_PARENT);
+ uiItemEnumO(layout, "Child", 0, "ARMATURE_OT_select_hierarchy", "direction", BONE_SELECT_CHILD);
- uiTextBoundsBlock(block, 50);
- return block;
-}
+ uiItemS(layout);
-static void do_view3d_select_pose_armaturemenu(bContext *C, void *arg, int event)
-{
-#if 0
-/* extern void borderselect(void);*/
-
- switch(event) {
- case 0: /* border select */
- borderselect();
- break;
- case 2: /* Select/Deselect all */
- deselectall_posearmature(OBACT, 1, 1);
- break;
- case 3: /* Select Target(s) of Constraint(s) */
- pose_select_constraint_target();
- break;
- case 5: /* Swap Select All */
- deselectall_posearmature(OBACT, 3, 1);
- break;
- case 6: /* Select parent */
- pose_select_hierarchy(BONE_SELECT_PARENT, 0);
- break;
- case 7: /* Select child */
- pose_select_hierarchy(BONE_SELECT_CHILD, 0);
- break;
- case 8: /* Extend Select parent */
- pose_select_hierarchy(BONE_SELECT_PARENT, 1);
- break;
- case 9: /* Extend Select child */
- pose_select_hierarchy(BONE_SELECT_CHILD, 1);
- break;
- }
-#endif
+ 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);
}
-static uiBlock *view3d_select_pose_armaturemenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_select_posemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_select_pose_armaturemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_select_pose_armaturemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 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, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Swap Select All|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Constraint Target|W", 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, "Select Parent|[", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Child|]", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Select Parent|Shift [", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Select Child|Shift ]", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
-
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ PointerRNA ptr;
- uiTextBoundsBlock(block, 50);
- return block;
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Select/Deselect All", 0, "POSE_OT_select_all_toggle");
+ uiItemO(layout, "Inverse", 0, "POSE_OT_select_inverse");
+ uiItemO(layout, "Constraint Target", 0, "POSE_OT_select_constraint_target");
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Parent", 0, "POSE_OT_select_hierarchy", "direction", BONE_SELECT_PARENT);
+ uiItemEnumO(layout, "Child", 0, "POSE_OT_select_hierarchy", "direction", BONE_SELECT_CHILD);
+
+ uiItemS(layout);
+
+ 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);
}
void do_view3d_select_faceselmenu(bContext *C, void *arg, int event)
@@ -1555,57 +1245,17 @@ static uiBlock *view3d_select_faceselmenu(bContext *C, ARegion *ar, void *arg_un
return block;
}
-void do_view3d_edit_snapmenu(bContext *C, void *arg, int event)
+static void view3d_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0
- switch (event) {
- case 1: /*Selection to grid*/
- snap_sel_to_grid();
- ED_undo_push(C, "Snap selection to grid");
- break;
- case 2: /*Selection to cursor*/
- snap_sel_to_curs();
- ED_undo_push(C, "Snap selection to cursor");
- break;
- case 3: /*Selection to center of selection*/
- snap_to_center();
- ED_undo_push(C, "Snap selection to center");
- break;
- case 4: /*Cursor to selection*/
- snap_curs_to_sel();
- break;
- case 5: /*Cursor to grid*/
- snap_curs_to_grid();
- break;
- case 6: /*Cursor to Active*/
- snap_curs_to_active();
- ED_undo_push(C, "Snap selection to center");
- break;
- }
-#endif
-}
+ 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");
-static uiBlock *view3d_edit_snapmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
+ uiItemS(layout);
- block= uiBeginBlock(C, ar, "view3d_edit_snapmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_snapmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selection -> Grid|Shift S, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selection -> Cursor|Shift S, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selection -> Center|Shift S, 3", 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, "Cursor -> Selection|Shift S, 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cursor -> Grid|Shift S, 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cursor -> Active|Shift S, 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
-
-
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ 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");
}
void do_view3d_transform_moveaxismenu(bContext *C, void *arg, int event)
@@ -1813,6 +1463,7 @@ static void do_view3d_transformmenu(bContext *C, void *arg, int event)
{
#if 0
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
switch(event) {
case 1:
@@ -1871,22 +1522,22 @@ static void do_view3d_transformmenu(bContext *C, void *arg, int event)
Transform();
break;
case 15:
- scene->snap_flag &= ~SCE_SNAP;
+ ts->snap_flag &= ~SCE_SNAP;
break;
case 16:
- scene->snap_flag |= SCE_SNAP;
+ ts->snap_flag |= SCE_SNAP;
break;
case 17:
- scene->snap_target = SCE_SNAP_TARGET_CLOSEST;
+ ts->snap_target = SCE_SNAP_TARGET_CLOSEST;
break;
case 18:
- scene->snap_target = SCE_SNAP_TARGET_CENTER;
+ ts->snap_target = SCE_SNAP_TARGET_CENTER;
break;
case 19:
- scene->snap_target = SCE_SNAP_TARGET_MEDIAN;
+ ts->snap_target = SCE_SNAP_TARGET_MEDIAN;
break;
case 20:
- scene->snap_target = SCE_SNAP_TARGET_ACTIVE;
+ ts->snap_target = SCE_SNAP_TARGET_ACTIVE;
break;
case 21:
alignmenu();
@@ -1897,7 +1548,7 @@ static void do_view3d_transformmenu(bContext *C, void *arg, int event)
static uiBlock *view3d_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
{
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
uiBlock *block;
short yco = 20, menuwidth = 120;
@@ -1949,7 +1600,7 @@ static uiBlock *view3d_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
{
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
- if (scene->snap_flag & SCE_SNAP)
+ if (ts->snap_flag & SCE_SNAP)
{
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Grid", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Snap", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
@@ -1962,7 +1613,7 @@ static uiBlock *view3d_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
- switch(scene->snap_target)
+ switch(ts->snap_target)
{
case SCE_SNAP_TARGET_CLOSEST:
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Snap Closest", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, "");
@@ -1996,6 +1647,7 @@ static uiBlock *view3d_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
return block;
}
+#if 0
void do_view3d_object_mirrormenu(bContext *C, void *arg, int event)
{
#if 0
@@ -2041,64 +1693,29 @@ static uiBlock *view3d_object_mirrormenu(bContext *C, ARegion *ar, void *arg_unu
uiTextBoundsBlock(block, 60);
return block;
}
-
-static void do_view3d_edit_object_transformmenu(bContext *C, void *arg, int event)
-{
-#if 0
- switch(event) {
- case 0: /* clear origin */
- clear_object('o');
- break;
- case 1: /* clear scale */
- clear_object('s');
- break;
- case 2: /* clear rotation */
- clear_object('r');
- break;
- case 3: /* clear location */
- clear_object('g');
- break;
- case 4:
- if(OBACT) object_apply_deform(OBACT);
- break;
- case 5: /* make duplis real */
- make_duplilist_real();
- break;
- case 6: /* apply scale/rotation or deformation */
- apply_objects_locrot();
- break;
- case 7: /* apply visual matrix to objects loc/size/rot */
- apply_objects_visual_tx();
- break;
- }
#endif
-}
-static uiBlock *view3d_edit_object_transformmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_transformmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_transformmenu, NULL);
-
+#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, "");
+ apply_objects_visual_tx();
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Deformation|Ctrl Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Duplicates Real|Ctrl Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Location|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Rotation|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Scale|Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Origin|Alt O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ if(OBACT) object_apply_deform(OBACT);
+#endif
+ uiItemO(layout, NULL, 0, "OBJECT_OT_duplicates_make_real");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "OBJECT_OT_location_clear");
+ uiItemO(layout, NULL, 0, "OBJECT_OT_rotation_clear");
+ uiItemO(layout, NULL, 0, "OBJECT_OT_scale_clear");
+ uiItemO(layout, NULL, 0, "OBJECT_OT_origin_clear");
}
+#if 0
static void do_view3d_edit_object_makelocalmenu(bContext *C, void *arg, int event)
{
#if 0
@@ -2335,164 +1952,49 @@ static uiBlock *view3d_edit_object_copyattrmenu(bContext *C, ARegion *ar, void *
uiTextBoundsBlock(block, 60);
return block;
}
-
-
-static void do_view3d_edit_object_parentmenu(bContext *C, void *arg, int event)
-{
-#if 0
- switch(event) {
- case 0: /* clear parent */
- clear_parent();
- break;
- case 1: /* make parent */
- make_parent();
- break;
- }
#endif
-}
-static uiBlock *view3d_edit_object_parentmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_object_parentmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_parentmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_parentmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Parent...|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Parent...|Alt P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ uiItemO(layout, "Make Parent...", 0, "OBJECT_OT_parent_set");
+ uiItemO(layout, "Clear Parent...", 0, "OBJECT_OT_parent_clear");
}
-static void do_view3d_edit_object_groupmenu(bContext *C, void *arg, int event)
+static void view3d_edit_object_groupmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0
- switch(event) {
- case 1:
- case 2:
- case 3:
- group_operation(event);
- break;
- }
-#endif
-}
+ uiItemO(layout, NULL, 0, "GROUP_OT_group_create");
+ uiItemO(layout, NULL, 0, "GROUP_OT_objects_remove");
-static uiBlock *view3d_edit_object_groupmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_groupmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_groupmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add to Existing Group|Ctrl G, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add to New Group|Ctrl G, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove from All Groups|Ctrl G, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
+ uiItemS(layout);
-static void do_view3d_edit_object_trackmenu(bContext *C, void *arg, int event)
-{
-#if 0
- switch(event) {
- case 0: /* clear track */
- clear_track();
- break;
- case 1: /* make track */
- make_track();
- break;
- }
-#endif
+ uiItemO(layout, NULL, 0, "GROUP_OT_objects_add_active");
+ uiItemO(layout, NULL, 0, "GROUP_OT_objects_remove_active");
}
-static uiBlock *view3d_edit_object_trackmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_object_trackmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_trackmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_trackmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Track...|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Track...|Alt T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ uiItemO(layout, "Make Track...", 0, "OBJECT_OT_track_set");
+ uiItemO(layout, "Clear Track...", 0, "OBJECT_OT_track_clear");
}
-static void do_view3d_edit_object_constraintsmenu(bContext *C, void *arg, int event)
+static void view3d_edit_object_constraintsmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
#if 0
- switch(event) {
- case 1: /* add constraint */
- add_constraint(0);
- break;
- case 2: /* clear constraint */
- ob_clear_constraints();
- break;
- }
-#endif
-}
-
-static uiBlock *view3d_edit_object_constraintsmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_constraintsmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_constraintsmenu, NULL);
-
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Constraint...|Ctrl Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ add_constraint(0);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Constraints", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
-
-static void do_view3d_edit_object_showhidemenu(bContext *C, void *arg, int event)
-{
-#if 0
-
- switch(event) {
-
- case 0: /* show objects */
- show_objects();
- break;
- case 1: /* hide selected objects */
- hide_objects(1);
- break;
- case 2: /* hide deselected objects */
- hide_objects(0);
- break;
- }
+ ob_clear_constraints();
#endif
}
-static uiBlock *view3d_edit_object_showhidemenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_object_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_object_showhidemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_object_showhidemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ uiItemO(layout, "Show Hidden", 0, "OBJECT_OT_restrictview_clear");
+ uiItemO(layout, "Hide Selected", 0, "OBJECT_OT_restrictview_set");
+ uiItemBooleanO(layout, "Hide Unselected", 0, "OBJECT_OT_restrictview_set", "unselected", 1);
}
+#if 0
#ifndef DISABLE_PYTHON
static void do_view3d_edit_object_scriptsmenu(bContext *C, void *arg, int event)
{
@@ -2522,11 +2024,12 @@ static uiBlock *view3d_edit_object_scriptsmenu(bContext *C, ARegion *ar, void *a
return block;
}
#endif /* DISABLE_PYTHON */
+#endif
+#if 0
static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
{
-#if 0
Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
@@ -2536,15 +2039,6 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
case 0: /* transform properties*/
// XXX mainqenter(NKEY, 1);
break;
- case 1: /* delete */
- delete_context_selected();
- break;
- case 2: /* duplicate */
- duplicate_context_selected();
- break;
- case 3: /* duplicate linked */
- adduplicate(0, 0);
- break;
case 5: /* make single user */
single_user();
break;
@@ -2563,9 +2057,6 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
case 11: /* insert keyframe */
common_insertkey();
break;
- case 15: /* Object Panel */
- add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW);
- break;
case 16: /* make proxy object*/
make_proxy();
break;
@@ -2573,192 +2064,95 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
common_deletekey();
break;
}
-#endif
}
+#endif
-static uiBlock *view3d_edit_objectmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_objectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- Scene *scene= CTX_data_scene(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_objectmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_objectmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
+#if 0
+ Object *ob= CTX_data_active_object(C);
+
uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_object_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");
+#endif
- uiDefIconTextBlockBut(block, view3d_edit_object_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Clear/Apply", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
+ uiItemMenuF(layout, "Clear/Apply", 0, view3d_edit_object_transformmenu);
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu);
+
+ uiItemS(layout);
+
+#if 0
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 18, "");
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate|Shift D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate Linked|Alt D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
+#endif
+ uiItemO(layout, NULL, 0, "OBJECT_OT_duplicate");
+ uiItemBooleanO(layout, "Duplicate Linked", 0, "OBJECT_OT_duplicate", "linked", 1);
+ uiItemO(layout, NULL, 0, "OBJECT_OT_delete");
+
+#if 0
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Proxy|Ctrl Alt P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
uiDefIconTextBlockBut(block, view3d_edit_object_makelinksmenu, NULL, ICON_RIGHTARROW_THIN, "Make Links", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_singleusermenu, NULL, ICON_RIGHTARROW_THIN, "Make Single User", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_makelocalmenu, NULL, ICON_RIGHTARROW_THIN, "Make Local", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_copyattrmenu, NULL, ICON_RIGHTARROW_THIN, "Copy Attributes", 0, yco-=20, 120, 19, "");
+#endif
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, view3d_edit_object_parentmenu, NULL, ICON_RIGHTARROW_THIN, "Parent", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_object_groupmenu, NULL, ICON_RIGHTARROW_THIN, "Group", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_object_trackmenu, NULL, ICON_RIGHTARROW_THIN, "Track", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_object_constraintsmenu, NULL, ICON_RIGHTARROW_THIN, "Constraints", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
- if (OBACT && OBACT->type == OB_MESH) {
+ uiItemMenuF(layout, "Parent", 0, view3d_edit_object_parentmenu);
+ uiItemMenuF(layout, "Track", 0, view3d_edit_object_trackmenu);
+ uiItemMenuF(layout, "Group", 0, view3d_edit_object_groupmenu);
+ uiItemMenuF(layout, "Constraints", 0, view3d_edit_object_constraintsmenu);
+
+#if 0
+ uiItemS(layout);
+
+ if(ob && ob->type == OB_MESH) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Boolean Operation...|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
}
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Join Objects|Ctrl J", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Convert Object Type...|Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
+#endif
+
+ uiItemS(layout);
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
+#if 0
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Move to Layer...|M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
- uiDefIconTextBlockBut(block, view3d_edit_object_showhidemenu, NULL, ICON_RIGHTARROW_THIN, "Show/Hide Objects", 0, yco-=20, 120, 19, "");
+#endif
+
+ uiItemMenuF(layout, "Show/Hide", 0, view3d_edit_object_showhidemenu);
+#if 0
#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_edit_object_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "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;
-}
-
-
-static void do_view3d_edit_propfalloffmenu(bContext *C, void *arg, int event)
-{
- Scene *scene= CTX_data_scene(C);
-
- scene->prop_mode= event;
-
+#endif
}
-static uiBlock *view3d_edit_propfalloffmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_mesh_verticesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- Scene *scene= CTX_data_scene(C);
- uiBlock *block;
- short yco = 20, menuwidth = 120;
+ 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");
- block= uiBeginBlock(C, ar, "view3d_edit_propfalloffmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_propfalloffmenu, NULL);
-
- if (scene->prop_mode==PROP_SMOOTH) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Smooth|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SMOOTH, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Smooth|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SMOOTH, "");
- if (scene->prop_mode==PROP_SPHERE) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Sphere|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SPHERE, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Sphere|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SPHERE, "");
- if (scene->prop_mode==PROP_ROOT) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Root|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_ROOT, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Root|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_ROOT, "");
- if (scene->prop_mode==PROP_SHARP) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SHARP, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_SHARP, "");
- if (scene->prop_mode==PROP_LIN) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Linear|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_LIN, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Linear|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_LIN, "");
- if (scene->prop_mode==PROP_RANDOM) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Random|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_RANDOM, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Random|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_RANDOM, "");
- if (scene->prop_mode==PROP_CONST) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Constant|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_CONST, "");
- else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Constant|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, PROP_CONST, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
+ uiItemS(layout);
+ uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth");
+ uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles");
-void do_view3d_edit_mesh_verticesmenu(bContext *C, void *arg, int event)
-{
#if 0
- Scene *scene= CTX_data_scene(C);
-
- switch(event) {
- int count;
-
- case 0: /* make vertex parent */
- make_parent();
- break;
- case 1: /* remove doubles */
- count= removedoublesflag(1, 0, scene->toolsettings->doublimit);
- notice("Removed: %d", count);
- if (count) { /* only undo and redraw if an action is taken */
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- ED_undo_push(C, "Rem Doubles");
- }
- break;
- case 2: /* smooth */
- vertexsmooth();
- break;
- case 3: /* separate */
- separate_mesh();
- break;
- case 4: /*split */
- split_mesh();
- break;
- case 5: /*merge */
- mergemenu();
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 6: /* add hook */
- add_hook_menu();
- break;
- case 7: /* rip */
- mesh_rip();
- break;
- }
-#endif
-}
-
-static uiBlock *view3d_edit_mesh_verticesmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_mesh_verticesmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_mesh_verticesmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Merge...|Alt M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rip|V", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Split|Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Separate|P", 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, "Smooth|W, Alt 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove Doubles|W, 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Vertex Parent|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Hook|Ctrl H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ uiItemS(layout);
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ 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
}
-extern void editmesh_mark_sharp(int set); /* declared in editmesh_mods.c */
-
void do_view3d_edit_mesh_edgesmenu(bContext *C, void *arg, int event)
{
#if 0
@@ -2767,52 +2161,12 @@ void do_view3d_edit_mesh_edgesmenu(bContext *C, void *arg, int event)
short randfac;
switch(event) {
-
- case 0: /* subdivide smooth */
- esubdivideflag(1, 0.0, scene->toolsettings->editbutflag | B_SMOOTH,1,0);
- ED_undo_push(C, "Subdivide Smooth");
- break;
- case 1: /*subdivide fractal */
- randfac= 10;
- if(button(&randfac, 1, 100, "Rand fac:")==0) return;
- fac= -( (float)randfac )/100;
- esubdivideflag(1, fac, scene->toolsettings->editbutflag,1,0);
- ED_undo_push(C, "Subdivide Fractal");
- break;
- case 2: /* subdivide */
- esubdivideflag(1, 0.0, scene->toolsettings->editbutflag,1,0);
- ED_undo_push(C, "Subdivide");
- break;
- case 3: /* knife subdivide */
- KnifeSubdivide(KNIFE_PROMPT);
- break;
- case 4: /* Loop subdivide */
- CutEdgeloop(1);
- break;
- case 5: /* Make Edge/Face */
- addedgeface_mesh();
- break;
- case 6:
- bevel_menu();
- break;
- case 7: /* Mark Seam */
- editmesh_mark_seam(0);
- break;
- case 8: /* Clear Seam */
- editmesh_mark_seam(1);
- break;
case 9: /* Crease SubSurf */
if(!multires_level1_test()) {
initTransform(TFM_CREASE, CTX_EDGE);
Transform();
}
break;
- case 10: /* Rotate Edge */
- edge_rotate_selected(2);
- break;
- case 11: /* Rotate Edge */
- edge_rotate_selected(1);
- break;
case 12: /* Edgeslide */
EdgeSlide(0,0.0);
break;
@@ -2827,16 +2181,6 @@ void do_view3d_edit_mesh_edgesmenu(bContext *C, void *arg, int event)
collapseEdges();
ED_undo_push(C, "Collapse");
break;
- case 15:
- editmesh_mark_sharp(1);
- ED_undo_push(C, "Mark Sharp");
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 16:
- editmesh_mark_sharp(0);
- ED_undo_push(C, "Clear Sharp");
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
case 17: /* Adjust Bevel Weight */
if(!multires_level1_test()) {
initTransform(TFM_BWEIGHT, CTX_EDGE);
@@ -2847,158 +2191,79 @@ void do_view3d_edit_mesh_edgesmenu(bContext *C, void *arg, int event)
#endif
}
-static uiBlock *view3d_edit_mesh_edgesmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_mesh_edgesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
+ uiItemO(layout, NULL, 0, "MESH_OT_edge_face_add");
- block= uiBeginBlock(C, ar, "view3d_edit_mesh_edgesmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_mesh_edgesmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bevel|W, Alt 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Loop Subdivide...|Ctrl R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Knife Subdivide...|Shift K", 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, "Subdivide|W, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide Fractal|W, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide Smooth|W, 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+#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);
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
+#endif
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mark Seam|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Seam|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mark Sharp|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Sharp|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
-
+ 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
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rotate Edge CW|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rotate Edge CCW|Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
+ 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, "");
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
-
-void do_view3d_edit_mesh_facesmenu(bContext *C, void *arg, int event)
-{
-#if 0
- Scene *scene= CTX_data_scene(C);
-
- switch(event) {
- case 0: /* Fill Faces */
- fill_mesh();
- break;
- case 1: /* Beauty Fill Faces */
- beauty_fill();
- break;
- case 2: /* Quads to Tris */
- convert_to_triface(0);
- countall();
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- break;
- case 3: /* Tris to Quads */
- join_triangles();
- break;
- case 4: /* Flip triangle edges */
- edge_flip();
- break;
- case 5: /* Make Edge/Face */
- addedgeface_mesh();
- break;
- case 6: /* Set Smooth */
- mesh_set_smooth_faces(1);
- break;
- case 7: /* Set Solid */
- mesh_set_smooth_faces(0);
- break;
- }
#endif
}
-static uiBlock *view3d_edit_mesh_facesmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_mesh_facesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
+ uiItemO(layout, NULL, 0, "MESH_OT_edge_face_add");
+ uiItemO(layout, NULL, 0, "MESH_OT_fill");
+ uiItemO(layout, NULL, 0, "MESH_OT_beauty_fill");
- block= uiBeginBlock(C, ar, "view3d_edit_mesh_facesmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_mesh_facesmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Fill|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Beautify Fill|Alt F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Convert Quads to Triangles|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Convert Triangles to Quads|Alt J", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Flip Triangle Edges|Ctrl Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Smooth|W, Alt 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Solid|W, Alt 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
-}
+ uiItemS(layout);
-void do_view3d_edit_mesh_normalsmenu(bContext *C, void *arg, int event)
-{
-#if 0
- switch(event) {
- case 0: /* flip */
- flip_editnormals();
- break;
- case 1: /* recalculate inside */
- righthandfaces(2);
- break;
- case 2: /* recalculate outside */
- righthandfaces(1);
- break;
- }
-#endif
+ uiItemO(layout, NULL, 0, "MESH_OT_quads_convert_to_tris");
+ uiItemO(layout, NULL, 0, "MESH_OT_tris_convert_to_quads");
+ uiItemO(layout, NULL, 0, "MESH_OT_edge_flip");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_smooth");
+ uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_solid");
}
-static uiBlock *view3d_edit_mesh_normalsmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_mesh_normalsmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
+ uiItemO(layout, "Recalculate Outside", 0, "MESH_OT_normals_make_consistent");
+ uiItemBooleanO(layout, "Recalculate Inside", 0, "MESH_OT_normals_make_consistent", "inside", 1);
- block= uiBeginBlock(C, ar, "view3d_edit_mesh_normalsmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_mesh_normalsmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Outside|Ctrl N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Inside|Ctrl Shift N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Flip|W, 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_flip_normals");
}
void do_view3d_edit_mirrormenu(bContext *C, void *arg, int event)
@@ -3074,49 +2339,18 @@ static uiBlock *view3d_edit_mirrormenu(bContext *C, ARegion *ar, void *arg_unuse
return block;
}
-static void do_view3d_edit_mesh_showhidemenu(bContext *C, void *arg, int event)
+static void view3d_edit_mesh_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0
-
- switch(event) {
-
- case 0: /* show hidden vertices */
- reveal_mesh();
- break;
- case 1: /* hide selected vertices */
- hide_mesh(0);
- break;
- case 2: /* hide deselected vertices */
- hide_mesh(1);
- break;
- }
-#endif
-}
-
-static uiBlock *view3d_edit_mesh_showhidemenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- uiBlock *block;
- short yco = 20, menuwidth = 120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_mesh_showhidemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_mesh_showhidemenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
- return block;
+ uiItemO(layout, NULL, 0, "MESH_OT_reveal");
+ uiItemO(layout, NULL, 0, "MESH_OT_hide");
+ uiItemBooleanO(layout, "Hide Unselected", 0, "MESH_OT_hide", "unselected", 1);
}
#ifndef DISABLE_PYTHON
+#if 0
static void do_view3d_edit_mesh_scriptsmenu(bContext *C, void *arg, int event)
{
-#if 0
BPY_menu_do_python(PYMENU_MESH, event);
-
-#endif
}
static uiBlock *view3d_edit_mesh_scriptsmenu(bContext *C, ARegion *ar, void *arg_unused)
@@ -3138,153 +2372,94 @@ static uiBlock *view3d_edit_mesh_scriptsmenu(bContext *C, ARegion *ar, void *arg
return block;
}
+#endif
#endif /* DISABLE_PYTHON */
+#if 0
static void do_view3d_edit_meshmenu(bContext *C, void *arg, int event)
{
-#if 0
- Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
- View3D *v3d= sa->spacedata.first;
switch(event) {
- case 0: /* Undo Editing */
- BIF_undo();
- break;
- case 1: /* Redo Editing */
- BIF_redo();
- break;
case 2: /* transform properties */
add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, 0);
break;
case 4: /* insert keyframe */
common_insertkey();
break;
- case 5: /* Extrude */
- extrude_mesh();
- break;
- case 6: /* duplicate */
- duplicate_context_selected();
- break;
- case 7: /* make edge face */
- addedgeface_mesh();
- break;
- case 8: /* delete */
- delete_context_selected();
- break;
- case 9: /* Shrink/Fatten Along Normals */
- initTransform(TFM_SHRINKFATTEN, CTX_NONE);
- Transform();
- break;
- case 10: /* Shear */
- initTransform(TFM_SHEAR, CTX_NONE);
- Transform();
- break;
- case 11: /* Warp */
- initTransform(TFM_WARP, CTX_NONE);
- Transform();
- break;
- case 12: /* proportional edit (toggle) */
- if(scene->proportional) scene->proportional= 0;
- else scene->proportional= 1;
- break;
- case 13: /* automerge edit (toggle) */
- if(scene->automerge) scene->automerge= 0;
- else scene->automerge= 1;
- break;
- case 15:
- uv_autocalc_tface();
- break;
case 16: /* delete keyframe */
common_deletekey();
break;
}
-#endif
}
+#endif
-static uiBlock *view3d_edit_meshmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_meshmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
Scene *scene= CTX_data_scene(C);
- Object *obedit = CTX_data_edit_object(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_meshmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_meshmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|Ctrl Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Redo Editing|Ctrl Shift Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-// XXX uiDefIconTextBlockBut(block, editmode_undohistorymenu, NULL, ICON_RIGHTARROW_THIN, "Undo History", 0, yco-=20, 120, 19, "");
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ PointerRNA tsptr;
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ 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);
- uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties...|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+#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, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
+#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu);
+
+ 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, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "UV Unwrap|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extrude|E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate|Shift D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete...|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, view3d_edit_mesh_verticesmenu, NULL, ICON_RIGHTARROW_THIN, "Vertices", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_mesh_edgesmenu, NULL, ICON_RIGHTARROW_THIN, "Edges", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_mesh_facesmenu, NULL, ICON_RIGHTARROW_THIN, "Faces", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, view3d_edit_mesh_normalsmenu, NULL, ICON_RIGHTARROW_THIN, "Normals", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
-
- if(scene->proportional) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Proportional Editing|O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
- } else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Proportional Editing|O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
- }
- uiDefIconTextBlockBut(block, view3d_edit_propfalloffmenu, NULL, ICON_RIGHTARROW_THIN, "Proportional Falloff", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- /* PITA but we should let users know that automerge cant work with multires :/ */
- uiDefIconTextBut(block, BUTM, 1,
- scene->automerge ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT,
- ((Mesh*)obedit->data)->mr ? "AutoMerge Editing (disabled by multires)" : "AutoMerge Editing",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBlockBut(block, view3d_edit_mesh_showhidemenu, NULL, ICON_RIGHTARROW_THIN, "Show/Hide Vertices", 0, yco-=20, 120, 19, "");
+ 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);
+ uiItemMenuF(layout, "Edges", 0, view3d_edit_mesh_edgesmenu);
+ uiItemMenuF(layout, "Faces", 0, view3d_edit_mesh_facesmenu);
+ uiItemMenuF(layout, "Normals", 0, view3d_edit_mesh_normalsmenu);
+
+ 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);
+
+#if 0
#ifndef DISABLE_PYTHON
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiItemS(layout);
uiDefIconTextBlockBut(block, view3d_edit_mesh_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "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
}
static void view3d_edit_curve_controlpointsmenu(bContext *C, uiLayout *layout, void *arg_unused)
@@ -3326,19 +2501,21 @@ static void view3d_edit_curve_showhidemenu(bContext *C, uiLayout *layout, void *
static void view3d_edit_curvemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- PointerRNA sceneptr;
Scene *scene= CTX_data_scene(C);
-
- RNA_id_pointer_create(&scene->id, &sceneptr);
+ 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, "");
- uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
-
- uiItemS(layout);
#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu);
+
+ 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();
@@ -3360,8 +2537,8 @@ static void view3d_edit_curvemenu(bContext *C, uiLayout *layout, void *arg_unuse
uiItemS(layout);
- uiItemR(layout, NULL, 0, &sceneptr, "proportional_editing", 0, 0, 0); // |O
- uiItemMenuEnumR(layout, NULL, 0, &sceneptr, "proportional_editing_falloff");
+ uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0, 0, 0); // |O
+ uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
uiItemS(layout);
@@ -3453,7 +2630,7 @@ static uiBlock *view3d_edit_metaballmenu(bContext *C, ARegion *ar, void *arg_unu
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N",0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
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, "");
- uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
+ // XXX uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
@@ -3515,83 +2692,38 @@ static void view3d_edit_textmenu(bContext *C, uiLayout *layout, void *arg_unused
uiItemMenuF(layout, "Special Characters", 0, view3d_edit_text_charsmenu);
}
-static void do_view3d_edit_latticemenu(bContext *C, void *arg, int event)
-{
-#if 0
- Scene *scene= CTX_data_scene(C);
-
- switch(event) {
-
- case 0: /* Undo Editing */
- remake_editLatt();
- break;
- case 2: /* insert keyframe */
- common_insertkey();
- break;
- case 3: /* Shear */
- initTransform(TFM_SHEAR, CTX_NONE);
- Transform();
- break;
- case 4: /* Warp */
- initTransform(TFM_WARP, CTX_NONE);
- Transform();
- break;
- case 5: /* proportional edit (toggle) */
- if(scene->proportional) scene->proportional= 0;
- else scene->proportional= 1;
- break;
- case 7: /* delete keyframe */
- common_deletekey();
- break;
- }
-#endif
-}
-
-static uiBlock *view3d_edit_latticemenu(bContext *C, ARegion *ar, void *arg_unused)
+static void view3d_edit_latticemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
Scene *scene= CTX_data_scene(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "view3d_edit_latticemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_view3d_edit_latticemenu, NULL);
+ 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, "");
- uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "UV Unwrap|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu);
+
+ 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();
- if(scene->proportional) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Proportional Editing|O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- } else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Proportional Editing|O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- }
- uiDefIconTextBlockBut(block, view3d_edit_propfalloffmenu, NULL, ICON_RIGHTARROW_THIN, "Proportional Falloff", 0, yco-=20, 120, 19, "");
+ uiItemO(layout, NULL, 0, "LATTICE_OT_make_regular");
- if(ar->alignment==RGN_ALIGN_TOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemS(layout);
- uiTextBoundsBlock(block, 50);
- return block;
+ uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0, 0, 0); // |O
+ uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
}
void do_view3d_edit_armature_parentmenu(bContext *C, void *arg, int event)
@@ -3802,7 +2934,7 @@ static uiBlock *view3d_edit_armaturemenu(bContext *C, ARegion *ar, void *arg_unu
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, "");
- uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
+ // XXX uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_armature_rollmenu, NULL, ICON_RIGHTARROW_THIN, "Bone Roll", 0, yco-=20, 120, 19, "");
if (arm->drawtype==ARM_ENVELOPE)
@@ -4556,6 +3688,7 @@ static void view3d_sculpt_menu(bContext *C, uiLayout *layout, void *arg_unused)
uiItemR(layout, NULL, 0, &rna, "rake", 0, 0, 0);
uiItemR(layout, NULL, 0, &rna, "anchored", 0, 0, 0);
uiItemR(layout, NULL, 0, &rna, "space", 0, 0, 0);
+ uiItemR(layout, NULL, 0, &rna, "smooth_stroke", 0, 0, 0);
uiItemR(layout, NULL, 0, &rna, "flip_direction", 0, 0, 0);
}
@@ -4696,7 +3829,7 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused)
static void view3d_select_particlemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
@@ -4705,7 +3838,7 @@ static void view3d_select_particlemenu(bContext *C, uiLayout *layout, void *arg_
uiItemO(layout, NULL, 0, "PARTICLE_OT_select_all_toggle");
uiItemO(layout, NULL, 0, "PARTICLE_OT_select_linked");
- if(scene->selectmode & SCE_SELECT_POINT) {
+ if(ts->particle.selectmode & SCE_SELECT_POINT) {
uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last"); // |W, 4
uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first"); // |W, 3
}
@@ -4725,7 +3858,7 @@ static void view3d_particle_showhidemenu(bContext *C, uiLayout *layout, void *ar
static void view3d_particlemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- Scene *scene= CTX_data_scene(C);
+ 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);
@@ -4740,7 +3873,7 @@ static void view3d_particlemenu(bContext *C, uiLayout *layout, void *arg_unused)
uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); // |W, 5
uiItemO(layout, NULL, 0, "PARTICLE_OT_delete");
- if(scene->selectmode & SCE_SELECT_POINT)
+ 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
@@ -4874,6 +4007,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
{
wmWindow *win= CTX_wm_window(C);
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
Base *basact= CTX_data_active_base(C);
@@ -4889,7 +4023,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
switch(event) {
case B_HOME:
- WM_operator_name_call(C, "VIEW3D_OT_viewhome", WM_OP_EXEC_REGION_WIN, NULL);
+ WM_operator_name_call(C, "VIEW3D_OT_view_all", WM_OP_EXEC_REGION_WIN, NULL);
break;
case B_REDR:
ED_area_tag_redraw(sa);
@@ -5008,7 +4142,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
if(em) {
if(shift==0 || em->selectmode==0)
em->selectmode= SCE_SELECT_VERTEX;
- scene->selectmode= em->selectmode;
+ ts->selectmode= em->selectmode;
EDBM_selectmode_set(em);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Vertex");
@@ -5022,7 +4156,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
em->selectmode = SCE_SELECT_EDGE;
}
- scene->selectmode= em->selectmode;
+ ts->selectmode= em->selectmode;
EDBM_selectmode_set(em);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Edge");
@@ -5031,13 +4165,12 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
case B_SEL_FACE:
if(em) {
if( shift==0 || em->selectmode==0){
- if( ((scene->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((scene->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)){
- if(ctrl)
- EDBM_convertsel(em, (scene->selectmode ^ SCE_SELECT_FACE),SCE_SELECT_FACE);
+ if( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)){
+ if(ctrl) EDBM_convertsel(em, (ts->selectmode ^ SCE_SELECT_FACE),SCE_SELECT_FACE);
}
em->selectmode = SCE_SELECT_FACE;
}
- scene->selectmode= em->selectmode;
+ ts->selectmode= em->selectmode;
EDBM_selectmode_set(em);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Face");
@@ -5045,29 +4178,35 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
break;
case B_SEL_PATH:
- scene->selectmode= SCE_SELECT_PATH;
+ ts->particle.selectmode= SCE_SELECT_PATH;
ED_undo_push(C, "Selectmode Set: Path");
break;
case B_SEL_POINT:
- scene->selectmode = SCE_SELECT_POINT;
+ ts->particle.selectmode = SCE_SELECT_POINT;
ED_undo_push(C, "Selectmode Set: Point");
break;
case B_SEL_END:
- scene->selectmode = SCE_SELECT_END;
+ ts->particle.selectmode = SCE_SELECT_END;
ED_undo_push(C, "Selectmode Set: End point");
break;
case B_MAN_TRANS:
- if( shift==0 || v3d->twtype==0)
+ if( shift==0 || v3d->twtype==0) {
v3d->twtype= V3D_MANIP_TRANSLATE;
+ ED_area_tag_redraw(sa);
+ }
break;
case B_MAN_ROT:
- if( shift==0 || v3d->twtype==0)
+ if( shift==0 || v3d->twtype==0) {
v3d->twtype= V3D_MANIP_ROTATE;
+ ED_area_tag_redraw(sa);
+ }
break;
case B_MAN_SCALE:
- if( shift==0 || v3d->twtype==0)
+ if( shift==0 || v3d->twtype==0) {
v3d->twtype= V3D_MANIP_SCALE;
+ ED_area_tag_redraw(sa);
+ }
break;
case B_NDOF:
break;
@@ -5104,7 +4243,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
v3d->layact= v3d->lay;
}
- if(v3d->scenelock) handle_view3d_lock();
+ if(v3d->scenelock) handle_view3d_lock(C);
ED_area_tag_redraw(sa);
countall();
@@ -5115,7 +4254,6 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
break;
}
-
}
static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *ob, int *xcoord, int yco)
@@ -5124,7 +4262,6 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
RegionView3D *rv3d= wm_region_view3d(C);
short xmax, xco= *xcoord;
-
/* compensate for local mode when setting up the viewing menu/iconrow values */
if(rv3d->view==7) rv3d->viewbut= 1;
else if(rv3d->view==1) rv3d->viewbut= 2;
@@ -5135,25 +4272,20 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
* menu is drawn wider than it should be. The ypos of -2 is to make it properly fill the
* height of the header */
- xmax= GetButStringLength("View");
- uiDefMenuBut(block, view3d_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
- //uiDefPulldownBut(block, view3d_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
- xco+= xmax;
-
xmax= GetButStringLength("Select");
if (obedit) {
if (ob && ob->type == OB_MESH) {
- uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco,yco, xmax-3, 24, "");
+ uiDefMenuBut(block, view3d_select_meshmenu, NULL, "Select", xco,yco, xmax-3, 20, "");
} else if (ob && (ob->type == OB_CURVE || ob->type == OB_SURF)) {
- uiDefMenuBut(block, view3d_select_curvemenu, NULL, "Select", xco, yco, xmax-3, 24, "");
+ uiDefMenuBut(block, view3d_select_curvemenu, NULL, "Select", xco, yco, xmax-3, 20, "");
} else if (ob && ob->type == OB_FONT) {
xmax= 0;
} else if (ob && ob->type == OB_MBALL) {
- uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,yco, xmax-3, 24, "");
+ uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,yco, xmax-3, 20, "");
} else if (ob && ob->type == OB_LATTICE) {
- uiDefPulldownBut(block, view3d_select_latticemenu, NULL, "Select", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_select_latticemenu, NULL, "Select", xco, yco, xmax-3, 20, "");
} else if (ob && ob->type == OB_ARMATURE) {
- uiDefPulldownBut(block, view3d_select_armaturemenu, NULL, "Select", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_select_armaturemenu, NULL, "Select", xco,yco, xmax-3, 20, "");
}
} else if (FACESEL_PAINT_TEST) {
if (ob && ob->type == OB_MESH) {
@@ -5166,16 +4298,16 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
} else {
if (ob && (ob->flag & OB_POSEMODE))
- uiDefPulldownBut(block, view3d_select_pose_armaturemenu, NULL, "Select", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_select_posemenu, NULL, "Select", xco,yco, xmax-3, 20, "");
else
- uiDefPulldownBut(block, view3d_select_objectmenu, NULL, "Select", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_select_objectmenu, NULL, "Select", xco,yco, xmax-3, 20, "");
}
xco+= xmax;
if (obedit) {
if (ob && ob->type == OB_MESH) {
xmax= GetButStringLength("Mesh");
- uiDefPulldownBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,yco, xmax-3, 20, "");
xco+= xmax;
} else if (ob && ob->type == OB_CURVE) {
xmax= GetButStringLength("Curve");
@@ -5195,7 +4327,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
xco+= xmax;
} else if (ob && ob->type == OB_LATTICE) {
xmax= GetButStringLength("Lattice");
- uiDefPulldownBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco, yco, xmax-3, 20, "");
xco+= xmax;
} else if (ob && ob->type == OB_ARMATURE) {
xmax= GetButStringLength("Armature");
@@ -5244,7 +4376,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
}
else {
xmax= GetButStringLength("Object");
- uiDefPulldownBut(block, view3d_edit_objectmenu, NULL, "Object", xco,yco, xmax-3, 20, "");
+ uiDefMenuBut(block, view3d_edit_objectmenu, NULL, "Object", xco,yco, xmax-3, 20, "");
xco+= xmax;
}
}
@@ -5275,21 +4407,21 @@ static void header_xco_step(ARegion *ar, int *xco, int *yco, int *maxco, int ste
}
}
-void view3d_header_buttons(const bContext *C, ARegion *ar)
+void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
{
+ ARegion *ar= CTX_wm_region(C);
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *ob= OBACT;
Object *obedit = CTX_data_edit_object(C);
uiBlock *block;
int a, xco, maxco=0, yco= 3;
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
+ block= uiLayoutFreeBlock(layout);
uiBlockSetHandleFunc(block, do_view3d_header_buttons, NULL);
- xco= ED_area_header_standardbuttons(C, block, yco);
-
if((sa->flag & HEADER_NO_PULLDOWN)==0)
view3d_header_pulldowns(C, block, ob, &xco, yco);
@@ -5449,11 +4581,11 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
if((obedit && (obedit->type == OB_MESH || obedit->type == OB_CURVE || obedit->type == OB_SURF || obedit->type == OB_LATTICE)) || G.f & G_PARTICLEEDIT) {
uiBlockBeginAlign(block);
- uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_PROP_OFF, "Proportional %t|Off %x0|On %x1|Connected %x2", xco,yco,XIC+10,YIC, &(scene->proportional), 0, 1.0, 0, 0, "Proportional Edit Falloff (Hotkeys: O, Alt O) ");
+ uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_PROP_OFF, "Proportional %t|Off %x0|On %x1|Connected %x2", xco,yco,XIC+10,YIC, &(ts->proportional), 0, 1.0, 0, 0, "Proportional Edit Falloff (Hotkeys: O, Alt O) ");
xco+= XIC+10;
- if(scene->proportional) {
- uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SMOOTHCURVE, propfalloff_pup(), xco,yco,XIC+10,YIC, &(scene->prop_mode), 0.0, 0.0, 0, 0, "Proportional Edit Falloff (Hotkey: Shift O) ");
+ if(ts->proportional) {
+ uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SMOOTHCURVE, propfalloff_pup(), xco,yco,XIC+10,YIC, &(ts->prop_mode), 0.0, 0.0, 0, 0, "Proportional Edit Falloff (Hotkey: Shift O) ");
xco+= XIC+10;
}
uiBlockEndAlign(block);
@@ -5464,21 +4596,21 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
if (BIF_snappingSupported(obedit)) {
uiBlockBeginAlign(block);
- if (scene->snap_flag & SCE_SNAP) {
- uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)");
+ if (ts->snap_flag & SCE_SNAP) {
+ uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)");
xco+= XIC;
- uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target");
+ uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target");
xco+= XIC;
- if (scene->snap_mode == SCE_SNAP_MODE_VOLUME) {
- uiDefIconButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_REDR, ICON_SNAP_PEEL_OBJECT,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Consider objects as whole when finding volume center");
+ if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) {
+ uiDefIconButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_REDR, ICON_SNAP_PEEL_OBJECT,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Consider objects as whole when finding volume center");
xco+= XIC;
}
- uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SNAP_VERTEX, snapmode_pup(), xco,yco,XIC+10,YIC, &(scene->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode");
+ uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SNAP_VERTEX, snapmode_pup(), xco,yco,XIC+10,YIC, &(ts->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode");
xco+= XIC;
- uiDefButS(block, MENU, B_NOP, "Snap Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,yco,70,YIC, &scene->snap_target, 0, 0, 0, 0, "Snap Target Mode");
+ uiDefButS(block, MENU, B_NOP, "Snap Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,yco,70,YIC, &ts->snap_target, 0, 0, 0, 0, "Snap Target Mode");
xco+= XIC+70;
} else {
- uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEAR,xco,yco,XIC,YIC, &scene->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)");
+ uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEAR,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)");
xco+= XIC;
}
@@ -5507,11 +4639,11 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
}
else if(G.f & G_PARTICLEEDIT) {
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Path edit mode");
+ uiDefIconButBitI(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Path edit mode");
xco+= XIC;
- uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Point select mode");
+ uiDefIconButBitI(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Point select mode");
xco+= XIC;
- uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,yco,XIC,YIC, &scene->selectmode, 1.0, 0.0, 0, 0, "Tip select mode");
+ uiDefIconButBitI(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Tip select mode");
xco+= XIC;
uiBlockEndAlign(block);
@@ -5556,36 +4688,3 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
uiDrawBlock(C, block);
}
-
-
-/* edit face toolbox */
-static int editmesh_face_toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, "Edit Faces", 0);
- layout= uiPupMenuLayout(pup);
-
- uiItemO(layout, NULL, 0, "MESH_OT_fill");
- uiItemO(layout, NULL, 0, "MESH_OT_beauty_fill");
- uiItemO(layout, NULL, 0, "MESH_OT_quads_convert_to_tris");
- uiItemO(layout, NULL, 0, "MESH_OT_tris_convert_to_quads");
- uiItemO(layout, NULL, 0, "MESH_OT_edge_flip");
- uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_smooth");
- uiItemO(layout, NULL, 0, "MESH_OT_faces_shade_solid");
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-void VIEW3D_OT_editmesh_face_toolbox(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Edit Faces";
- ot->idname= "VIEW3D_OT_editmesh_face_toolbox";
-
- /* api callbacks */
- ot->invoke= editmesh_face_toolbox_invoke;
- ot->poll= ED_operator_editmesh;
-}
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index ab705cb32fb..3e9382509f4 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -68,18 +68,18 @@ void view3d_keymap(struct wmWindowManager *wm);
void VIEW3D_OT_zoom(struct wmOperatorType *ot);
void VIEW3D_OT_viewmove(struct wmOperatorType *ot);
void VIEW3D_OT_viewrotate(struct wmOperatorType *ot);
-void VIEW3D_OT_viewhome(struct wmOperatorType *ot);
+void VIEW3D_OT_view_all(struct wmOperatorType *ot);
void VIEW3D_OT_viewnumpad(struct wmOperatorType *ot);
-void VIEW3D_OT_viewcenter(struct wmOperatorType *ot);
+void VIEW3D_OT_view_center(struct wmOperatorType *ot);
void VIEW3D_OT_view_pan(struct wmOperatorType *ot);
void VIEW3D_OT_view_persportho(struct wmOperatorType *ot);
void VIEW3D_OT_view_orbit(struct wmOperatorType *ot);
-void VIEW3D_OT_clipping(struct wmOperatorType *ot);
+void VIEW3D_OT_clip_border(struct wmOperatorType *ot);
void VIEW3D_OT_cursor3d(struct wmOperatorType *ot);
+void VIEW3D_OT_manipulator(struct wmOperatorType *ot);
void VIEW3D_OT_render_border(struct wmOperatorType *ot);
void VIEW3D_OT_zoom_border(struct wmOperatorType *ot);
void VIEW3D_OT_drawtype(struct wmOperatorType *ot);
-void VIEW3D_OT_editmesh_face_toolbox(struct wmOperatorType *ot);
void view3d_boxview_copy(ScrArea *sa, ARegion *ar);
@@ -120,6 +120,8 @@ void VIEW3D_OT_select_lasso(struct wmOperatorType *ot);
void VIEW3D_OT_smoothview(struct wmOperatorType *ot);
void VIEW3D_OT_setcameratoview(struct wmOperatorType *ot);
void VIEW3D_OT_localview(struct wmOperatorType *ot);
+void VIEW3D_OT_game_start(struct wmOperatorType *ot);
+
int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb);
@@ -134,9 +136,11 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
void VIEW3D_OT_properties(struct wmOperatorType *ot);
void view3d_buttons_register(struct ARegionType *art);
-/* view3d_buttons.c */
+/* view3d_toolbar.c */
void VIEW3D_OT_toolbar(struct wmOperatorType *ot);
void view3d_toolbar_register(struct ARegionType *art);
+void view3d_tool_props_register(struct ARegionType *art);
+char *view3d_context_string(const struct bContext *C);
/* view3d_snap.c */
int minmax_verts(Object *obedit, float *min, float *max);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index ddd8e770f80..32305b5c76b 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -46,8 +46,6 @@
#include "BKE_global.h"
#include "BKE_utildefines.h"
-#include "BIF_transform.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
@@ -55,6 +53,7 @@
#include "WM_types.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "view3d_intern.h"
@@ -66,25 +65,26 @@ void view3d_operatortypes(void)
WM_operatortype_append(VIEW3D_OT_viewrotate);
WM_operatortype_append(VIEW3D_OT_viewmove);
WM_operatortype_append(VIEW3D_OT_zoom);
- WM_operatortype_append(VIEW3D_OT_viewhome);
+ WM_operatortype_append(VIEW3D_OT_view_all);
WM_operatortype_append(VIEW3D_OT_viewnumpad);
WM_operatortype_append(VIEW3D_OT_view_orbit);
WM_operatortype_append(VIEW3D_OT_view_pan);
WM_operatortype_append(VIEW3D_OT_view_persportho);
- WM_operatortype_append(VIEW3D_OT_viewcenter);
+ WM_operatortype_append(VIEW3D_OT_view_center);
WM_operatortype_append(VIEW3D_OT_select);
WM_operatortype_append(VIEW3D_OT_select_border);
- WM_operatortype_append(VIEW3D_OT_clipping);
+ WM_operatortype_append(VIEW3D_OT_clip_border);
WM_operatortype_append(VIEW3D_OT_select_circle);
WM_operatortype_append(VIEW3D_OT_smoothview);
WM_operatortype_append(VIEW3D_OT_render_border);
WM_operatortype_append(VIEW3D_OT_zoom_border);
+ WM_operatortype_append(VIEW3D_OT_manipulator);
WM_operatortype_append(VIEW3D_OT_cursor3d);
WM_operatortype_append(VIEW3D_OT_select_lasso);
WM_operatortype_append(VIEW3D_OT_setcameratoview);
WM_operatortype_append(VIEW3D_OT_drawtype);
- WM_operatortype_append(VIEW3D_OT_editmesh_face_toolbox);
WM_operatortype_append(VIEW3D_OT_localview);
+ WM_operatortype_append(VIEW3D_OT_game_start);
WM_operatortype_append(VIEW3D_OT_layers);
WM_operatortype_append(VIEW3D_OT_properties);
@@ -135,12 +135,13 @@ void view3d_keymap(wmWindowManager *wm)
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", 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);
WM_keymap_verify_item(keymap, "VIEW3D_OT_viewmove", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "VIEW3D_OT_viewcenter", PADPERIOD, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_view_center", PADPERIOD, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);
@@ -149,8 +150,8 @@ void view3d_keymap(wmWindowManager *wm)
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", WHEELINMOUSE, KM_PRESS, 0, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", WHEELOUTMOUSE, KM_PRESS, 0, 0)->ptr, "delta", -1);
- RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewhome", HOMEKEY, KM_PRESS, 0, 0)->ptr, "center", 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewhome", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "center", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0)->ptr, "center", 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "center", 1);
/* numpad view hotkeys*/
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "type", V3D_VIEW_CAMERA);
@@ -173,10 +174,12 @@ void view3d_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "VIEW3D_OT_localview", PADSLASHKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_game_start", PKEY, KM_PRESS, 0, 0);
+
/* layers, shift + alt are properties set in invoke() */
- RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ONEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "nr", 1);
- RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", TWOKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "nr", 2);
- RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", THREEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "nr", 3);
+ RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ONEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 1);
+ RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", TWOKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 2);
+ RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", THREEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 3);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", FOURKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 4);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", FIVEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 5);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", SIXKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 6);
@@ -203,10 +206,10 @@ void view3d_keymap(wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "type", 1);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0)->ptr, "type", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0)->ptr, "deselect", 1);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "VIEW3D_OT_clipping", BKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_clip_border", BKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 45e1a663441..31ea1070b32 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -67,7 +67,6 @@
#include "RE_pipeline.h" // make_stars
#include "BIF_gl.h"
-#include "BIF_retopo.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -83,6 +82,7 @@
#include "ED_screen.h"
#include "ED_types.h"
#include "ED_util.h"
+#include "ED_retopo.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -463,14 +463,14 @@ static void do_lasso_select_mesh(ViewContext *vc, short mcords[][2], short moves
bbsel= EM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
- if(vc->scene->selectmode & SCE_SELECT_VERTEX) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_VERTEX) {
if (bbsel) {
EM_backbuf_checkAndSelectVerts(vc->em, select);
} else {
mesh_foreachScreenVert(vc, do_lasso_select_mesh__doSelectVert, &data, 1);
}
}
- if(vc->scene->selectmode & SCE_SELECT_EDGE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_EDGE) {
/* Does both bbsel and non-bbsel versions (need screen cos for both) */
data.pass = 0;
@@ -482,7 +482,7 @@ static void do_lasso_select_mesh(ViewContext *vc, short mcords[][2], short moves
}
}
- if(vc->scene->selectmode & SCE_SELECT_FACE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_FACE) {
if (bbsel) {
EM_backbuf_checkAndSelectFaces(vc->em, select);
} else {
@@ -722,9 +722,9 @@ void view3d_lasso_select(bContext *C, ViewContext *vc, short mcords[][2], short
}
static EnumPropertyItem lasso_select_types[] = {
- {0, "SELECT", "Select", ""},
- {1, "DESELECT", "Deselect", ""},
- {0, NULL, NULL, NULL}
+ {0, "SELECT", 0, "Select", ""},
+ {1, "DESELECT", 0, "Deselect", ""},
+ {0, NULL, 0, NULL, NULL}
};
@@ -753,7 +753,7 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
/* setup view context for argument to callbacks */
view3d_set_viewcontext(C, &vc);
- select= RNA_enum_is_equal(op->ptr, "type", "SELECT");
+ select= RNA_enum_is_equal(C, op->ptr, "type", "SELECT");
view3d_lasso_select(C, &vc, mcords, i, select);
return OPERATOR_FINISHED;
@@ -1299,14 +1299,14 @@ static void do_mesh_box_select(ViewContext *vc, rcti *rect, int select)
bbsel= EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
- if(vc->scene->selectmode & SCE_SELECT_VERTEX) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_VERTEX) {
if (bbsel) {
EM_backbuf_checkAndSelectVerts(vc->em, select);
} else {
mesh_foreachScreenVert(vc, do_mesh_box_select__doSelectVert, &data, 1);
}
}
- if(vc->scene->selectmode & SCE_SELECT_EDGE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_EDGE) {
/* Does both bbsel and non-bbsel versions (need screen cos for both) */
data.pass = 0;
@@ -1318,7 +1318,7 @@ static void do_mesh_box_select(ViewContext *vc, rcti *rect, int select)
}
}
- if(vc->scene->selectmode & SCE_SELECT_FACE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_FACE) {
if(bbsel) {
EM_backbuf_checkAndSelectFaces(vc->em, select);
} else {
@@ -1538,9 +1538,9 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
/* *****************Selection Operators******************* */
static EnumPropertyItem prop_select_types[] = {
- {0, "EXCLUSIVE", "Exclusive", ""},
- {1, "EXTEND", "Extend", ""},
- {0, NULL, NULL, NULL}
+ {0, "EXCLUSIVE", 0, "Exclusive", ""},
+ {1, "EXTEND", 0, "Extend", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* ****** Border Select ****** */
@@ -1576,7 +1576,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot)
static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Object *obedit= CTX_data_edit_object(C);
- short extend= RNA_enum_is_equal(op->ptr, "type", "EXTEND");
+ short extend= RNA_enum_is_equal(C, op->ptr, "type", "EXTEND");
view3d_operator_needs_opengl(C);
@@ -1678,7 +1678,7 @@ static void mesh_circle_select(ViewContext *vc, int selecting, short *mval, floa
data.mval[1] = mval[1];
data.radius = rad;
- if(vc->scene->selectmode & SCE_SELECT_VERTEX) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_VERTEX) {
if(bbsel) {
EM_backbuf_checkAndSelectVerts(vc->em, selecting==LEFTMOUSE);
} else {
@@ -1686,7 +1686,7 @@ static void mesh_circle_select(ViewContext *vc, int selecting, short *mval, floa
}
}
- if(vc->scene->selectmode & SCE_SELECT_EDGE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_EDGE) {
if (bbsel) {
EM_backbuf_checkAndSelectEdges(vc->em, selecting==LEFTMOUSE);
} else {
@@ -1694,7 +1694,7 @@ static void mesh_circle_select(ViewContext *vc, int selecting, short *mval, floa
}
}
- if(vc->scene->selectmode & SCE_SELECT_FACE) {
+ if(vc->scene->toolsettings->selectmode & SCE_SELECT_FACE) {
if(bbsel) {
EM_backbuf_checkAndSelectFaces(vc->em, selecting==LEFTMOUSE);
} else {
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 1e55f2e4a9a..89a6d659d67 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -71,7 +71,6 @@
#include "BKE_utildefines.h"
#include "BIF_gl.h"
-#include "BIF_transform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -87,6 +86,7 @@
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
@@ -120,8 +120,6 @@ static void redo_cb(bContext *C, void *arg_op, void *arg2)
static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
{
- /* XXX temp */
- extern void uiDefAutoButsRNA_single(const bContext *C, uiLayout *layout, PointerRNA *ptr);
wmWindowManager *wm= CTX_wm_manager(C);
wmOperator *op;
PointerRNA ptr;
@@ -136,7 +134,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
if(op==NULL)
return;
- if(op->type->poll && op->type->poll(C)==0)
+ if(op->type->poll && op->type->poll((bContext *)C)==0)
return;
uiBlockSetFunc(block, redo_cb, op, NULL);
@@ -147,13 +145,160 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
}
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
- uiDefAutoButsRNA_single(C, pa->layout, &ptr);
+ uiDefAutoButsRNA(C, pa->layout, &ptr, 1);
}
+/* ******************* */
+
+char *view3d_context_string(const bContext *C)
+{
+ Object *obedit= CTX_data_edit_object(C);
+
+ if(obedit) {
+ switch(obedit->type) {
+ case OB_MESH:
+ return "editmode_mesh";
+ case OB_CURVE:
+ return "editmode_curve";
+ case OB_SURF:
+ return "editmode_surface";
+ case OB_FONT:
+ return "editmode_text";
+ case OB_ARMATURE:
+ return "editmode_armature";
+ case OB_MBALL:
+ return "editmode_mball";
+ case OB_LATTICE:
+ return "editmode_lattice";
+ }
+ }
+ else {
+ Object *ob = CTX_data_active_object(C);
+
+ if(ob && (ob->flag & OB_POSEMODE)) return "posemode";
+ else if (G.f & G_SCULPTMODE) return "sculptmode";
+ else if (G.f & G_WEIGHTPAINT) return "weightpaint";
+ else if (G.f & G_VERTEXPAINT) return "vertexpaint";
+ else if (G.f & G_TEXTUREPAINT) return "texturepaint";
+ else if(G.f & G_PARTICLEEDIT) return "particlemode";
+ }
+
+ return "objectmode";
+}
+
+typedef struct CustomTool {
+ struct CustomTool *next, *prev;
+ char opname[OP_MAX_TYPENAME];
+ char context[OP_MAX_TYPENAME];
+} CustomTool;
+
+static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2)
+{
+ wmOperatorType *ot= arg2;
+
+ if(ot) {
+ CustomTool *ct= MEM_callocN(sizeof(CustomTool), "CustomTool");
+
+ BLI_addtail(arg_listbase, ct);
+ BLI_strncpy(ct->opname, ot->idname, OP_MAX_TYPENAME);
+ BLI_strncpy(ct->context, view3d_context_string(C), OP_MAX_TYPENAME);
+ }
+
+}
+
+static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items)
+{
+ wmOperatorType *ot = WM_operatortype_first();
+
+ for(; ot; ot= ot->next) {
+
+ if(BLI_strcasestr(ot->name, str)) {
+ if(ot->poll==NULL || ot->poll((bContext *)C)) {
+
+ if(0==uiSearchItemAdd(items, ot->name, ot, 0))
+ break;
+ }
+ }
+ }
+}
+
+
+/* ID Search browse menu, open */
+static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase)
+{
+ static char search[OP_MAX_TYPENAME];
+ wmEvent event;
+ wmWindow *win= CTX_wm_window(C);
+ uiBlock *block;
+ uiBut *but;
+
+ /* clear initial search string, then all items show */
+ search[0]= 0;
+
+ block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
+
+ /* fake button, it holds space for search items */
+ uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
+
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, OP_MAX_TYPENAME, 10, 0, 150, 19, "");
+ uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL);
+
+ uiBoundsBlock(block, 6);
+ uiBlockSetDirection(block, UI_DOWN);
+ uiEndBlock(C, block);
+
+ event= *(win->eventstate); /* XXX huh huh? make api call */
+ event.type= EVT_BUT_OPEN;
+ event.val= KM_PRESS;
+ event.customdata= but;
+ event.customdatafree= FALSE;
+ wm_event_add(win, &event);
+
+ return block;
+}
+
+
+static void view3d_panel_tool_shelf(const bContext *C, Panel *pa)
+{
+ SpaceLink *sl= CTX_wm_space_data(C);
+ SpaceType *st= NULL;
+ uiLayout *col;
+ const char *context= view3d_context_string(C);
+
+ if(sl)
+ st= BKE_spacetype_from_id(sl->spacetype);
+
+ if(st && st->toolshelf.first) {
+ CustomTool *ct;
+
+ 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);
+ }
+ }
+ }
+ col= uiLayoutColumn(pa->layout, 1);
+ uiDefBlockBut(uiLayoutGetBlock(pa->layout), tool_search_menu, &st->toolshelf, "Add Tool", 0, 0, UI_UNIT_X, UI_UNIT_Y, "Add Tool in shelf, gets saved in files");
+}
+
+
void view3d_toolbar_register(ARegionType *art)
{
PanelType *pt;
+ pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools");
+ strcpy(pt->idname, "VIEW3D_PT_tool_shelf");
+ strcpy(pt->label, "Tool Shelf");
+ pt->draw= view3d_panel_tool_shelf;
+ BLI_addtail(&art->paneltypes, pt);
+}
+
+void view3d_tool_props_register(ARegionType *art)
+{
+ PanelType *pt;
+
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator");
strcpy(pt->idname, "VIEW3D_PT_last_operator");
strcpy(pt->label, "Last Operator");
@@ -161,6 +306,8 @@ void view3d_toolbar_register(ARegionType *art)
BLI_addtail(&art->paneltypes, pt);
}
+/* ********** operator to open/close toolbar region */
+
static int view3d_toolbar(bContext *C, wmOperator *op)
{
ScrArea *sa= CTX_wm_area(C);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index e1a6f32aa41..b57f4a91004 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -76,11 +76,12 @@
#include "UI_resources.h"
#include "UI_view2d.h"
+#include "GPU_draw.h"
+
#include "PIL_time.h" /* smoothview */
#include "view3d_intern.h" // own include
-
/* use this call when executing an operator,
event system doesn't set for each event the
opengl drawing context */
@@ -1382,6 +1383,85 @@ void VIEW3D_OT_localview(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
}
+static ListBase queue_back;
+static void SaveState(bContext *C)
+{
+ wmWindow *win= CTX_wm_window(C);
+
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+ GPU_state_init();
+
+ if(G.f & G_TEXTUREPAINT)
+ GPU_paint_set_mipmap(1);
+
+ queue_back= win->queue;
+
+ win->queue.first= win->queue.last= NULL;
+
+ //XXX waitcursor(1);
+}
+
+static void RestoreState(bContext *C)
+{
+ wmWindow *win= CTX_wm_window(C);
+
+ if(G.f & G_TEXTUREPAINT)
+ GPU_paint_set_mipmap(0);
+
+ //XXX curarea->win_swap = 0;
+ //XXX curarea->head_swap=0;
+ //XXX allqueue(REDRAWVIEW3D, 1);
+ //XXX allqueue(REDRAWBUTSALL, 0);
+ //XXX reset_slowparents();
+ //XXX waitcursor(0);
+ //XXX G.qual= 0;
+
+ win->queue= queue_back;
+
+ glPopAttrib();
+}
+
+/* maybe we need this defined somewhere else */
+extern void StartKetsjiShell(struct bContext *C,int always_use_expand_framing);
+
+
+static int game_engine_exec(bContext *C, wmOperator *unused)
+{
+ Scene *startscene = CTX_data_scene(C);
+
+#if GAMEBLENDER == 1
+
+ view3d_operator_needs_opengl(C);
+
+ SaveState(C);
+ StartKetsjiShell(C, 1);
+ RestoreState(C);
+
+ //XXX restore_all_scene_cfra(scene_cfra_store);
+ set_scene_bg(startscene);
+ //XXX scene_update_for_newframe(G.scene, G.scene->lay);
+
+#else
+ printf("GameEngine Disabled\n");
+#endif
+ ED_area_tag_redraw(CTX_wm_area(C));
+ return OPERATOR_FINISHED;
+}
+
+void VIEW3D_OT_game_start(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Start Game Engine";
+ ot->idname= "VIEW3D_OT_game_start";
+
+ /* api callbacks */
+ ot->exec= game_engine_exec;
+
+ ot->poll= ED_operator_view3d_active;
+}
+
/* ************************************** */
void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, float vec[3])
diff --git a/source/blender/editors/transform/Makefile b/source/blender/editors/transform/Makefile
index bc3e08a2ae8..607038b413b 100644
--- a/source/blender/editors/transform/Makefile
+++ b/source/blender/editors/transform/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 674de81a9f5..c62ea07e398 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -45,6 +45,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_action_types.h" /* for some special action-editor settings */
#include "DNA_constraint_types.h"
@@ -76,9 +77,9 @@
//#include "BIF_editmesh.h"
//#include "BIF_editsima.h"
//#include "BIF_editparticle.h"
-//#include "BIF_editaction.h"
-#include "BKE_action.h" /* get_action_frame */
+#include "BKE_action.h"
+#include "BKE_nla.h"
//#include "BKE_bad_level_calls.h"/* popmenu and error */
#include "BKE_bmesh.h"
#include "BKE_context.h"
@@ -89,7 +90,6 @@
#include "BKE_utildefines.h"
#include "BKE_context.h"
-//#include "BSE_editaction_types.h"
//#include "BSE_view.h"
#include "ED_image.h"
@@ -123,7 +123,7 @@ void setTransformViewMatrices(TransInfo *t)
{
if(t->spacetype==SPACE_VIEW3D && t->ar->regiontype == RGN_TYPE_WINDOW) {
RegionView3D *rv3d = t->ar->regiondata;
-
+
Mat4CpyMat4(t->viewmat, rv3d->viewmat);
Mat4CpyMat4(t->viewinv, rv3d->viewinv);
Mat4CpyMat4(t->persmat, rv3d->persmat);
@@ -137,7 +137,7 @@ void setTransformViewMatrices(TransInfo *t)
Mat4One(t->persinv);
t->persp = V3D_ORTHO;
}
-
+
calculateCenter2D(t);
}
@@ -152,23 +152,23 @@ void convertViewVec(TransInfo *t, float *vec, short dx, short dy)
else if(t->spacetype==SPACE_IMAGE) {
View2D *v2d = t->view;
float divx, divy, aspx, aspy;
-
+
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
-
+
divx= v2d->mask.xmax-v2d->mask.xmin;
divy= v2d->mask.ymax-v2d->mask.ymin;
-
+
vec[0]= aspx*(v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
vec[1]= aspy*(v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
vec[2]= 0.0f;
}
- else if(t->spacetype==SPACE_IPO) {
+ else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
View2D *v2d = t->view;
float divx, divy;
-
+
divx= v2d->mask.xmax-v2d->mask.xmin;
divy= v2d->mask.ymax-v2d->mask.ymin;
-
+
vec[0]= (v2d->cur.xmax-v2d->cur.xmin)*(dx) / (divx);
vec[1]= (v2d->cur.ymax-v2d->cur.ymin)*(dy) / (divy);
vec[2]= 0.0f;
@@ -176,10 +176,10 @@ void convertViewVec(TransInfo *t, float *vec, short dx, short dy)
else if(t->spacetype==SPACE_NODE) {
View2D *v2d = &t->ar->v2d;
float divx, divy;
-
+
divx= v2d->mask.xmax-v2d->mask.xmin;
divy= v2d->mask.ymax-v2d->mask.ymin;
-
+
vec[0]= (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
vec[1]= (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
vec[2]= 0.0f;
@@ -205,23 +205,23 @@ void projectIntView(TransInfo *t, float *vec, int *adr)
}
else if(t->spacetype==SPACE_IMAGE) {
float aspx, aspy, v[2];
-
+
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
v[0]= vec[0]/aspx;
v[1]= vec[1]/aspy;
-
+
UI_view2d_to_region_no_clip(t->view, v[0], v[1], adr, adr+1);
}
- else if(t->spacetype==SPACE_IPO) {
+ else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
int out[2] = {0, 0};
-
- UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], out, out+1);
+
+ UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], out, out+1);
adr[0]= out[0];
adr[1]= out[1];
}
else if(t->spacetype==SPACE_SEQ) { /* XXX not tested yet, but should work */
int out[2] = {0, 0};
-
+
UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], out, out+1);
adr[0]= out[0];
adr[1]= out[1];
@@ -236,14 +236,14 @@ void projectFloatView(TransInfo *t, float *vec, float *adr)
}
else if(t->spacetype==SPACE_IMAGE) {
int a[2];
-
+
projectIntView(t, vec, a);
adr[0]= a[0];
adr[1]= a[1];
}
- else if(t->spacetype==SPACE_IPO) {
+ else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
int a[2];
-
+
projectIntView(t, vec, a);
adr[0]= a[0];
adr[1]= a[1];
@@ -296,28 +296,19 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
{
if (t->spacetype == SPACE_VIEW3D)
{
- /* Do we need more refined tags? */
+ /* Do we need more refined tags? */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
}
else if (t->spacetype == SPACE_ACTION) {
- SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
-
- // TRANSFORM_FIX_ME
- if (saction->lock) {
- // whole window...
- }
- else
- ED_area_tag_redraw(t->sa);
+ //SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
else if (t->spacetype == SPACE_IPO) {
- SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
-
- // TRANSFORM_FIX_ME
- if (sipo->lock) {
- // whole window...
- }
- else
- ED_area_tag_redraw(t->sa);
+ //SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+ }
+ else if (t->spacetype == SPACE_NLA) {
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
}
else if(t->spacetype == SPACE_NODE)
{
@@ -343,7 +334,7 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
static void viewRedrawPost(TransInfo *t)
{
ED_area_headerprint(t->sa, NULL);
-
+
#if 0 // TRANSFORM_FIX_ME
if(t->spacetype==SPACE_VIEW3D) {
allqueue(REDRAWBUTSOBJECT, 0);
@@ -374,7 +365,7 @@ void BIF_selectOrientation() {
char *str_menu = BIF_menustringTransformOrientation("Orientation");
val= pupmenu(str_menu);
MEM_freeN(str_menu);
-
+
if(val >= 0) {
G.vd->twmode = val;
}
@@ -390,18 +381,18 @@ static void view_editmove(unsigned short event)
/* Ctrl: Scroll right */
/* Alt-Shift: Rotate up */
/* Alt-Ctrl: Rotate right */
-
+
/* only work in 3D window for now
* In the end, will have to send to event to a 2D window handler instead
*/
if (Trans.flag & T_2D_EDIT)
return;
-
+
switch(event) {
case WHEELUPMOUSE:
-
+
if( G.qual & LR_SHIFTKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_SHIFTKEY;
persptoetsen(PAD2);
G.qual |= LR_SHIFTKEY;
@@ -409,23 +400,23 @@ static void view_editmove(unsigned short event)
persptoetsen(PAD2);
}
} else if( G.qual & LR_CTRLKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_CTRLKEY;
persptoetsen(PAD4);
G.qual |= LR_CTRLKEY;
} else {
persptoetsen(PAD4);
}
- } else if(U.uiflag & USER_WHEELZOOMDIR)
+ } else if(U.uiflag & USER_WHEELZOOMDIR)
persptoetsen(PADMINUS);
else
persptoetsen(PADPLUSKEY);
-
+
refresh = 1;
break;
case WHEELDOWNMOUSE:
if( G.qual & LR_SHIFTKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_SHIFTKEY;
persptoetsen(PAD8);
G.qual |= LR_SHIFTKEY;
@@ -433,18 +424,18 @@ static void view_editmove(unsigned short event)
persptoetsen(PAD8);
}
} else if( G.qual & LR_CTRLKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_CTRLKEY;
persptoetsen(PAD6);
G.qual |= LR_CTRLKEY;
} else {
persptoetsen(PAD6);
}
- } else if(U.uiflag & USER_WHEELZOOMDIR)
+ } else if(U.uiflag & USER_WHEELZOOMDIR)
persptoetsen(PADPLUSKEY);
else
persptoetsen(PADMINUS);
-
+
refresh = 1;
break;
}
@@ -454,6 +445,7 @@ static void view_editmove(unsigned short event)
#endif
}
+#if 0
static char *transform_to_undostr(TransInfo *t)
{
switch (t->mode) {
@@ -500,6 +492,7 @@ static char *transform_to_undostr(TransInfo *t)
}
return "Transform";
}
+#endif
/* ************************************************* */
@@ -507,19 +500,19 @@ void transformEvent(TransInfo *t, wmEvent *event)
{
float mati[3][3] = {{1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}};
char cmode = constraintModeToChar(t);
-
+
t->redraw |= handleMouseInput(t, &t->mouse, event);
if (event->type == MOUSEMOVE)
{
t->mval[0] = event->x - t->ar->winrct.xmin;
t->mval[1] = event->y - t->ar->winrct.ymin;
-
+
t->redraw = 1;
-
+
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
-
+
if (event->val) {
switch (event->type){
/* enforce redraw of transform when modifiers are used */
@@ -528,7 +521,7 @@ void transformEvent(TransInfo *t, wmEvent *event)
t->modifiers |= MOD_SNAP_GEARS;
t->redraw = 1;
break;
-
+
case LEFTSHIFTKEY:
case RIGHTSHIFTKEY:
t->modifiers |= MOD_CONSTRAINT_PLANE;
@@ -539,7 +532,7 @@ void transformEvent(TransInfo *t, wmEvent *event)
if ((t->spacetype==SPACE_VIEW3D) && event->alt) {
#if 0 // TRANSFORM_FIX_ME
short mval[2];
-
+
getmouseco_sc(mval);
BIF_selectOrientation();
calc_manipulator_stats(curarea);
@@ -551,7 +544,7 @@ void transformEvent(TransInfo *t, wmEvent *event)
t->state = TRANS_CONFIRM;
}
break;
-
+
case MIDDLEMOUSE:
if ((t->flag & T_NO_CONSTRAINT)==0) {
/* exception for switching to dolly, or trackball, in camera view */
@@ -584,19 +577,16 @@ void transformEvent(TransInfo *t, wmEvent *event)
}
break;
case ESCKEY:
- case RIGHTMOUSE:
- printf("cancelled\n");
t->state = TRANS_CANCEL;
break;
- case LEFTMOUSE:
case PADENTER:
case RETKEY:
t->state = TRANS_CONFIRM;
break;
case GKEY:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
- resetTransRestrictions(t);
+ if( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
+ resetTransRestrictions(t);
restoreTransObjects(t);
initTranslation(t);
initSnapping(t, NULL); // need to reinit after mode change
@@ -605,8 +595,8 @@ void transformEvent(TransInfo *t, wmEvent *event)
break;
case SKEY:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
- resetTransRestrictions(t);
+ if( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
+ resetTransRestrictions(t);
restoreTransObjects(t);
initResize(t);
initSnapping(t, NULL); // need to reinit after mode change
@@ -616,9 +606,9 @@ void transformEvent(TransInfo *t, wmEvent *event)
case RKEY:
/* only switch when... */
if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
-
- resetTransRestrictions(t);
-
+
+ resetTransRestrictions(t);
+
if (t->mode == TFM_ROTATION) {
restoreTransObjects(t);
initTrackball(t);
@@ -778,10 +768,10 @@ void transformEvent(TransInfo *t, wmEvent *event)
// viewmoveNDOF(1);
// break;
}
-
+
// Numerical input events
t->redraw |= handleNumInput(&(t->num), event);
-
+
// NDof input events
switch(handleNDofInput(&(t->ndof), event))
{
@@ -796,7 +786,7 @@ void transformEvent(TransInfo *t, wmEvent *event)
if (t->options & CTX_NDOF)
{
/* Cancel on pure NDOF transform */
- t->state = TRANS_CANCEL;
+ t->state = TRANS_CANCEL;
}
else
{
@@ -814,16 +804,22 @@ void transformEvent(TransInfo *t, wmEvent *event)
case NDOF_REFRESH:
t->redraw = 1;
break;
-
+
}
-
+
// Snapping events
t->redraw |= handleSnapping(t, event);
-
+
//arrows_move_cursor(event->type);
}
else {
switch (event->type){
+ case RIGHTMOUSE:
+ t->state = TRANS_CANCEL;
+ break;
+ case LEFTMOUSE:
+ t->state = TRANS_CONFIRM;
+ break;
case LEFTSHIFTKEY:
case RIGHTSHIFTKEY:
t->modifiers &= ~MOD_CONSTRAINT_PLANE;
@@ -833,7 +829,7 @@ void transformEvent(TransInfo *t, wmEvent *event)
case LEFTCTRLKEY:
case RIGHTCTRLKEY:
t->modifiers &= ~MOD_SNAP_GEARS;
- /* no redraw on release modifier keys! this makes sure you can assign the 'grid' still
+ /* no redraw on release modifier keys! this makes sure you can assign the 'grid' still
after releasing modifer key */
//t->redraw = 1;
break;
@@ -844,15 +840,15 @@ void transformEvent(TransInfo *t, wmEvent *event)
t->redraw = 1;
}
break;
- case LEFTMOUSE:
- case RIGHTMOUSE:
- if(WM_modal_tweak_exit(event, t->event_type))
-// if (t->options & CTX_TWEAK)
- t->state = TRANS_CONFIRM;
- break;
+// case LEFTMOUSE:
+// case RIGHTMOUSE:
+// if(WM_modal_tweak_exit(event, t->event_type))
+//// if (t->options & CTX_TWEAK)
+// t->state = TRANS_CONFIRM;
+// break;
}
}
-
+
// Per transform event, if present
if (t->handleEvent)
t->redraw |= t->handleEvent(t, event);
@@ -866,7 +862,7 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float
t->state = TRANS_RUNNING;
t->options = CTX_NONE;
-
+
t->mode = TFM_DUMMY;
initTransInfo(C, t, NULL, event); // internal data, mouse, vectors
@@ -880,10 +876,10 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float
}
else {
success = 1;
-
+
calculateCenter(t);
-
- // Copy center from constraint center. Transform center can be local
+
+ // Copy center from constraint center. Transform center can be local
VECCOPY(vec, t->con.center);
}
@@ -891,9 +887,9 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float
/* aftertrans does insert ipos and action channels, and clears base flags, doesnt read transdata */
special_aftertrans_update(t);
-
+
MEM_freeN(t);
-
+
return success;
}
@@ -912,28 +908,28 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
length = -length;
size = -size;
case RIGHT:
- glBegin(GL_LINES);
- glVertex2s( offset, 0);
- glVertex2s( offset + length, 0);
- glVertex2s( offset + length, 0);
- glVertex2s( offset + length - size, -size);
- glVertex2s( offset + length, 0);
+ glBegin(GL_LINES);
+ glVertex2s( offset, 0);
+ glVertex2s( offset + length, 0);
+ glVertex2s( offset + length, 0);
+ glVertex2s( offset + length - size, -size);
+ glVertex2s( offset + length, 0);
glVertex2s( offset + length - size, size);
- glEnd();
+ glEnd();
break;
case DOWN:
offset = -offset;
length = -length;
size = -size;
case UP:
- glBegin(GL_LINES);
- glVertex2s( 0, offset);
- glVertex2s( 0, offset + length);
- glVertex2s( 0, offset + length);
- glVertex2s(-size, offset + length - size);
- glVertex2s( 0, offset + length);
+ glBegin(GL_LINES);
+ glVertex2s( 0, offset);
+ glVertex2s( 0, offset + length);
+ glVertex2s( 0, offset + length);
+ glVertex2s(-size, offset + length - size);
+ glVertex2s( 0, offset + length);
glVertex2s( size, offset + length - size);
- glEnd();
+ glEnd();
break;
}
}
@@ -945,22 +941,22 @@ static void drawArrowHead(ArrowDirection d, short size)
case LEFT:
size = -size;
case RIGHT:
- glBegin(GL_LINES);
- glVertex2s( 0, 0);
- glVertex2s( -size, -size);
- glVertex2s( 0, 0);
+ glBegin(GL_LINES);
+ glVertex2s( 0, 0);
+ glVertex2s( -size, -size);
+ glVertex2s( 0, 0);
glVertex2s( -size, size);
- glEnd();
+ glEnd();
break;
case DOWN:
size = -size;
case UP:
- glBegin(GL_LINES);
- glVertex2s( 0, 0);
- glVertex2s(-size, -size);
- glVertex2s( 0, 0);
+ glBegin(GL_LINES);
+ glVertex2s( 0, 0);
+ glVertex2s(-size, -size);
+ glVertex2s( 0, 0);
glVertex2s( size, -size);
- glEnd();
+ glEnd();
break;
}
}
@@ -969,15 +965,15 @@ static void drawArc(float size, float angle_start, float angle_end, int segments
{
float delta = (angle_end - angle_start) / segments;
float angle;
-
+
glBegin(GL_LINE_STRIP);
-
+
for( angle = angle_start; angle < angle_end; angle += delta)
{
glVertex2f( cosf(angle) * size, sinf(angle) * size);
}
glVertex2f( cosf(angle_end) * size, sinf(angle_end) * size);
-
+
glEnd();
}
@@ -986,7 +982,7 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR))
{
float vecrot[3], cent[2];
-
+
VECCOPY(vecrot, t->center);
if(t->flag & T_EDIT) {
Object *ob= t->obedit;
@@ -996,9 +992,9 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
Object *ob=t->poseobj;
if(ob) Mat4MulVecfl(ob->obmat, vecrot);
}
-
+
projectFloatView(t, vecrot, cent); // no overflow in extreme cases
-
+
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
@@ -1007,16 +1003,16 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
glPushMatrix();
ED_region_pixelspace(t->ar);
-
+
switch(t->helpline)
{
case HLP_SPRING:
UI_ThemeColor(TH_WIRE);
-
+
setlinestyle(3);
- glBegin(GL_LINE_STRIP);
- glVertex2sv(t->mval);
- glVertex2fv(cent);
+ glBegin(GL_LINE_STRIP);
+ glVertex2sv(t->mval);
+ glVertex2fv(cent);
glEnd();
glTranslatef(t->mval[0], t->mval[1], 0);
@@ -1044,7 +1040,7 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
glTranslatef(t->mval[0], t->mval[1], 0);
glLineWidth(3.0);
- glBegin(GL_LINES);
+ glBegin(GL_LINES);
drawArrow(UP, 5, 10, 5);
drawArrow(DOWN, 5, 10, 5);
glLineWidth(1.0);
@@ -1057,27 +1053,27 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
float delta_angle = MIN2(15 / dist, M_PI/4);
float spacing_angle = MIN2(5 / dist, M_PI/12);
UI_ThemeColor(TH_WIRE);
-
+
setlinestyle(3);
- glBegin(GL_LINE_STRIP);
- glVertex2sv(t->mval);
- glVertex2fv(cent);
+ glBegin(GL_LINE_STRIP);
+ glVertex2sv(t->mval);
+ glVertex2fv(cent);
glEnd();
-
+
glTranslatef(cent[0], cent[1], 0);
-
+
setlinestyle(0);
glLineWidth(3.0);
drawArc(dist, angle - delta_angle, angle - spacing_angle, 10);
drawArc(dist, angle + spacing_angle, angle + delta_angle, 10);
-
+
glPushMatrix();
glTranslatef(cosf(angle - delta_angle) * dist, sinf(angle - delta_angle) * dist, 0);
glRotatef(180 / M_PI * (angle - delta_angle), 0, 0, 1);
-
+
drawArrowHead(DOWN, 5);
-
+
glPopMatrix();
glTranslatef(cosf(angle + delta_angle) * dist, sinf(angle + delta_angle) * dist, 0);
@@ -1092,32 +1088,32 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
{
char col[3], col2[3];
UI_GetThemeColor3ubv(TH_GRID, col);
-
+
glTranslatef(t->mval[0], t->mval[1], 0);
-
+
glLineWidth(3.0);
-
+
UI_make_axis_color(col, col2, 'x');
glColor3ubv((GLubyte *)col2);
-
+
drawArrow(RIGHT, 5, 10, 5);
drawArrow(LEFT, 5, 10, 5);
-
+
UI_make_axis_color(col, col2, 'y');
glColor3ubv((GLubyte *)col2);
-
+
drawArrow(UP, 5, 10, 5);
drawArrow(DOWN, 5, 10, 5);
glLineWidth(1.0);
break;
}
}
-
+
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
-
+
glEnable(GL_DEPTH_TEST);
}
}
@@ -1125,7 +1121,7 @@ void drawHelpline(const struct bContext *C, TransInfo *t)
void drawTransform(const struct bContext *C, struct ARegion *ar, void *arg)
{
TransInfo *t = arg;
-
+
drawConstraint(C, t);
drawPropCircle(C, t);
drawSnapping(C, t);
@@ -1134,7 +1130,7 @@ void drawTransform(const struct bContext *C, struct ARegion *ar, void *arg)
void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
- Scene *sce = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
int constraint_axis[3] = {0, 0, 0};
int proportional = 0;
@@ -1171,10 +1167,10 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
RNA_boolean_set(op->ptr, "mirror", t->flag & T_MIRROR);
}
-
+
if (RNA_struct_find_property(op->ptr, "constraint_axis"))
{
- RNA_int_set(op->ptr, "constraint_orientation", t->current_orientation);
+ RNA_enum_set(op->ptr, "constraint_orientation", t->current_orientation);
if (t->con.mode & CON_APPLY)
{
@@ -1195,13 +1191,13 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
// XXX If modal, save settings back in scene
if (t->flag & T_MODAL)
{
- sce->prop_mode = t->prop_mode;
- sce->proportional = proportional;
+ ts->prop_mode = t->prop_mode;
+ ts->proportional = proportional;
if(t->spacetype == SPACE_VIEW3D)
{
View3D *v3d = t->view;
-
+
v3d->twmode = t->current_orientation;
}
}
@@ -1216,7 +1212,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->state = TRANS_RUNNING;
t->options = options;
-
+
t->mode = mode;
if (!initTransInfo(C, t, op, event)) // internal data, mouse, vectors
@@ -1228,7 +1224,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
{
//calc_manipulator_stats(curarea);
initTransformOrientation(C, t);
-
+
t->draw_handle = ED_region_draw_cb_activate(t->ar->type, drawTransform, t, REGION_DRAW_POST);
}
else if(t->spacetype == SPACE_IMAGE) {
@@ -1251,10 +1247,10 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
/* EVIL2: we gave as argument also texture space context bit... was cleared */
/* EVIL3: extend mode for animation editors also switches modes... but is best way to avoid duplicate code */
mode = t->mode;
-
+
calculatePropRatio(t);
calculateCenter(t);
-
+
initMouseInput(t, &t->mouse, t->center2d, t->imval);
switch (mode) {
@@ -1318,13 +1314,13 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
case TFM_TIME_SCALE:
initTimeScale(t);
break;
- case TFM_TIME_EXTEND:
+ case TFM_TIME_EXTEND:
/* now that transdata has been made, do like for TFM_TIME_TRANSLATE (for most Animation
* Editors because they have only 1D transforms for time values) or TFM_TRANSLATION
- * (for Graph Editor only since it uses 'standard' transforms to get 2D movement)
- * depending on which editor this was called from
+ * (for Graph/NLA Editors only since they uses 'standard' transforms to get 2D movement)
+ * depending on which editor this was called from
*/
- if (t->spacetype == SPACE_IPO)
+ if ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)
initTranslation(t);
else
initTimeTranslate(t);
@@ -1376,11 +1372,11 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
if (constraint_axis[2]) {
t->con.mode |= CON_AXIS2;
}
-
- setUserConstraint(t, t->con.mode, "%s");
+
+ setUserConstraint(t, t->con.mode, "%s");
}
}
-
+
return 1;
}
@@ -1399,7 +1395,7 @@ void transformApply(bContext *C, TransInfo *t)
t->redraw = 0;
}
- /* If auto confirm is on, break after one pass */
+ /* If auto confirm is on, break after one pass */
if (t->options & CTX_AUTOCONFIRM)
{
t->state = TRANS_CONFIRM;
@@ -1416,7 +1412,7 @@ void transformApply(bContext *C, TransInfo *t)
int transformEnd(bContext *C, TransInfo *t)
{
int exit_code = OPERATOR_RUNNING_MODAL;
-
+
if (t->state != TRANS_RUNNING)
{
/* handle restoring objects */
@@ -1429,16 +1425,16 @@ int transformEnd(bContext *C, TransInfo *t)
{
exit_code = OPERATOR_FINISHED;
}
-
+
/* free data */
postTrans(t);
-
+
/* aftertrans does insert keyframes, and clears base flags, doesnt read transdata */
special_aftertrans_update(t);
-
+
/* send events out for redraws */
viewRedrawPost(t);
-
+
/* Undo as last, certainly after special_trans_update! */
if(t->state == TRANS_CANCEL) {
@@ -1452,7 +1448,7 @@ int transformEnd(bContext *C, TransInfo *t)
viewRedrawForce(C, t);
}
-
+
return exit_code;
}
@@ -1460,13 +1456,15 @@ int transformEnd(bContext *C, TransInfo *t)
void initManipulator(int mode)
{
+ printf("init manipulator mode %d\n", mode);
+
#if 0 // TRANSFORM_FIX_ME
Trans.state = TRANS_RUNNING;
Trans.options = CTX_NONE;
-
+
Trans.mode = mode;
-
+
/* automatic switch to scaling bone envelopes */
if(mode==TFM_RESIZE && t->obedit && t->obedit->type==OB_ARMATURE) {
bArmature *arm= t->obedit->data;
@@ -1487,7 +1485,7 @@ void initManipulator(int mode)
/* EVIL! posemode code can switch translation to rotate when 1 bone is selected. will be removed (ton) */
/* EVIL2: we gave as argument also texture space context bit... was cleared */
mode = Trans.mode;
-
+
calculatePropRatio(&Trans);
calculateCenter(&Trans);
@@ -1510,7 +1508,7 @@ void initManipulator(int mode)
#endif
}
-void ManipulatorTransform()
+void ManipulatorTransform()
{
#if 0 // TRANSFORM_FIX_ME
int mouse_moved = 0;
@@ -1523,9 +1521,9 @@ void ManipulatorTransform()
Trans.redraw = 1; /* initial draw */
while (Trans.state == TRANS_RUNNING) {
-
+
getmouseco_areawin(mval);
-
+
if (mval[0] != pmval[0] || mval[1] != pmval[1]) {
Trans.redraw = 1;
}
@@ -1539,7 +1537,7 @@ void ManipulatorTransform()
}
Trans.redraw = 0;
}
-
+
/* essential for idling subloop */
if( qtest()==0) PIL_sleep_ms(2);
@@ -1564,9 +1562,9 @@ void ManipulatorTransform()
Trans.flag |= T_SHIFT_MOD;
Trans.redraw = 1;
}
- else Trans.flag &= ~T_SHIFT_MOD;
+ else Trans.flag &= ~T_SHIFT_MOD;
break;
-
+
case ESCKEY:
case RIGHTMOUSE:
Trans.state = TRANS_CANCEL;
@@ -1624,23 +1622,23 @@ void ManipulatorTransform()
Trans.redraw= 1;
break;
}
-
+
// Numerical input events
Trans.redraw |= handleNumInput(&(Trans.num), event);
}
}
}
-
+
if(Trans.state == TRANS_CANCEL) {
restoreTransObjects(&Trans);
}
-
+
/* free data, reset vars */
postTrans(&Trans);
-
+
/* aftertrans does insert ipos and action channels, and clears base flags */
special_aftertrans_update(&Trans);
-
+
/* send events out for redraws */
viewRedrawPost(&Trans);
@@ -1686,21 +1684,21 @@ static void protectedQuaternionBits(short protectflag, float *quat, float *oldqu
{
/* quaternions get limited with euler... */
/* this function only does the delta rotation */
-
+
if(protectflag) {
float eul[3], oldeul[3], quat1[4];
-
+
QUATCOPY(quat1, quat);
QuatToEul(quat, eul);
QuatToEul(oldquat, oldeul);
-
+
if(protectflag & OB_LOCK_ROTX)
eul[0]= oldeul[0];
if(protectflag & OB_LOCK_ROTY)
eul[1]= oldeul[1];
if(protectflag & OB_LOCK_ROTZ)
eul[2]= oldeul[2];
-
+
EulToQuat(eul, quat);
/* quaternions flip w sign to accumulate rotations correctly */
if( (quat1[0]<0.0f && quat[0]>0.0f) || (quat1[0]>0.0f && quat[0]<0.0f) ) {
@@ -1717,8 +1715,8 @@ static void constraintTransLim(TransInfo *t, TransData *td)
bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_LOCLIMIT);
bConstraintOb cob;
bConstraint *con;
-
- /* Make a temporary bConstraintOb for using these limit constraints
+
+ /* Make a temporary bConstraintOb for using these limit constraints
* - they only care that cob->matrix is correctly set ;-)
* - current space should be local
*/
@@ -1733,22 +1731,22 @@ static void constraintTransLim(TransInfo *t, TransData *td)
else {
VECCOPY(cob.matrix[3], td->loc);
}
-
+
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
float tmat[4][4];
-
+
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
-
+
/* only use it if it's tagged for this purpose (and the right type) */
if (con->type == CONSTRAINT_TYPE_LOCLIMIT) {
bLocLimitConstraint *data= con->data;
-
- if ((data->flag2 & LIMIT_TRANSFORM)==0)
+
+ if ((data->flag2 & LIMIT_TRANSFORM)==0)
continue;
-
+
/* do space conversions */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1759,10 +1757,10 @@ static void constraintTransLim(TransInfo *t, TransData *td)
/* skip... incompatable spacetype */
continue;
}
-
+
/* do constraint */
cti->evaluate_constraint(con, &cob, NULL);
-
+
/* convert spaces again */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1771,7 +1769,7 @@ static void constraintTransLim(TransInfo *t, TransData *td)
}
}
}
-
+
/* copy results from cob->matrix */
if (td->tdi) {
TransDataIpokey *tdi= td->tdi;
@@ -1791,8 +1789,8 @@ static void constraintRotLim(TransInfo *t, TransData *td)
bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT);
bConstraintOb cob;
bConstraint *con;
-
- /* Make a temporary bConstraintOb for using these limit constraints
+
+ /* Make a temporary bConstraintOb for using these limit constraints
* - they only care that cob->matrix is correctly set ;-)
* - current space should be local
*/
@@ -1808,11 +1806,11 @@ static void constraintRotLim(TransInfo *t, TransData *td)
/* ipo-keys eulers */
TransDataIpokey *tdi= td->tdi;
float eul[3];
-
+
eul[0]= tdi->rotx[0];
eul[1]= tdi->roty[0];
eul[2]= tdi->rotz[0];
-
+
EulToMat4(eul, cob.matrix);
}
else {
@@ -1822,22 +1820,22 @@ static void constraintRotLim(TransInfo *t, TransData *td)
else
return;
}
-
+
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
-
+
/* we're only interested in Limit-Rotation constraints */
if (con->type == CONSTRAINT_TYPE_ROTLIMIT) {
bRotLimitConstraint *data= con->data;
float tmat[4][4];
-
+
/* only use it if it's tagged for this purpose */
- if ((data->flag2 & LIMIT_TRANSFORM)==0)
+ if ((data->flag2 & LIMIT_TRANSFORM)==0)
continue;
-
+
/* do space conversions */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1848,10 +1846,10 @@ static void constraintRotLim(TransInfo *t, TransData *td)
/* skip... incompatable spacetype */
continue;
}
-
+
/* do constraint */
cti->evaluate_constraint(con, &cob, NULL);
-
+
/* convert spaces again */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1860,7 +1858,7 @@ static void constraintRotLim(TransInfo *t, TransData *td)
}
}
}
-
+
/* copy results from cob->matrix */
if (td->flag & TD_USEQUAT) {
/* quats */
@@ -1870,9 +1868,9 @@ static void constraintRotLim(TransInfo *t, TransData *td)
/* ipo-keys eulers */
TransDataIpokey *tdi= td->tdi;
float eul[3];
-
+
Mat4ToEul(cob.matrix, eul);
-
+
tdi->rotx[0]= eul[0];
tdi->roty[0]= eul[1];
tdi->rotz[0]= eul[2];
@@ -1890,8 +1888,8 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_SIZELIMIT);
bConstraintOb cob;
bConstraint *con;
-
- /* Make a temporary bConstraintOb for using these limit constraints
+
+ /* Make a temporary bConstraintOb for using these limit constraints
* - they only care that cob->matrix is correctly set ;-)
* - current space should be local
*/
@@ -1899,12 +1897,12 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
if (td->tdi) {
TransDataIpokey *tdi= td->tdi;
float size[3];
-
+
size[0]= tdi->sizex[0];
size[1]= tdi->sizey[0];
size[2]= tdi->sizez[0];
SizeToMat4(size, cob.matrix);
- }
+ }
else if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
return; // TODO: fix this case
@@ -1913,25 +1911,25 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* Reset val if SINGLESIZE but using a constraint */
if (td->flag & TD_SINGLESIZE)
return;
-
+
SizeToMat4(td->ext->size, cob.matrix);
}
-
+
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
-
+
/* we're only interested in Limit-Scale constraints */
if (con->type == CONSTRAINT_TYPE_SIZELIMIT) {
bSizeLimitConstraint *data= con->data;
float tmat[4][4];
-
+
/* only use it if it's tagged for this purpose */
- if ((data->flag2 & LIMIT_TRANSFORM)==0)
+ if ((data->flag2 & LIMIT_TRANSFORM)==0)
continue;
-
+
/* do space conversions */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1942,10 +1940,10 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* skip... incompatable spacetype */
continue;
}
-
+
/* do constraint */
cti->evaluate_constraint(con, &cob, NULL);
-
+
/* convert spaces again */
if (con->ownspace == CONSTRAINT_SPACE_WORLD) {
/* just multiply by td->mtx (this should be ok) */
@@ -1954,18 +1952,18 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
}
}
}
-
+
/* copy results from cob->matrix */
if (td->tdi) {
TransDataIpokey *tdi= td->tdi;
float size[3];
-
+
Mat4ToSize(cob.matrix, size);
-
+
tdi->sizex[0]= size[0];
tdi->sizey[0]= size[1];
tdi->sizez[0]= size[2];
- }
+ }
else if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
return; // TODO: fix this case
@@ -1974,7 +1972,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* Reset val if SINGLESIZE but using a constraint */
if (td->flag & TD_SINGLESIZE)
return;
-
+
Mat4ToSize(cob.matrix, td->ext->size);
}
}
@@ -1982,15 +1980,15 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* ************************** WARP *************************** */
-void initWarp(TransInfo *t)
+void initWarp(TransInfo *t)
{
float max[3], min[3];
int i;
-
+
t->mode = TFM_WARP;
t->transform = Warp;
t->handleEvent = handleEventWarp;
-
+
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO);
t->idx_max = 0;
@@ -1998,9 +1996,9 @@ void initWarp(TransInfo *t)
t->snap[0] = 0.0f;
t->snap[1] = 5.0f;
t->snap[2] = 1.0f;
-
+
t->flag |= T_NO_CONSTRAINT;
-
+
/* we need min/max in view space */
for(i = 0; i < t->total; i++) {
float center[3];
@@ -2015,11 +2013,11 @@ void initWarp(TransInfo *t)
VECCOPY(min, center);
}
}
-
+
t->center[0]= (min[0]+max[0])/2.0f;
t->center[1]= (min[1]+max[1])/2.0f;
t->center[2]= (min[2]+max[2])/2.0f;
-
+
if (max[0] == min[0]) max[0] += 0.1; /* not optimal, but flipping is better than invalid garbage (i.e. division by zero!) */
t->val= (max[0]-min[0])/2.0f; /* t->val is X dimension projected boundbox */
}
@@ -2027,7 +2025,7 @@ void initWarp(TransInfo *t)
int handleEventWarp(TransInfo *t, wmEvent *event)
{
int status = 0;
-
+
if (event->type == MIDDLEMOUSE && event->val)
{
// Use customData pointer to signal warp direction
@@ -2035,10 +2033,10 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
t->customData = (void*)1;
else
t->customData = 0;
-
+
status = 1;
}
-
+
return status;
}
@@ -2048,7 +2046,7 @@ int Warp(TransInfo *t, short mval[2])
float vec[3], circumfac, dist, phi0, co, si, *curs, cursor[3], gcursor[3];
int i;
char str[50];
-
+
curs= give_cursor(t->scene, t->view);
/*
* gcursor is the one used for helpline.
@@ -2061,7 +2059,7 @@ int Warp(TransInfo *t, short mval[2])
* into account if in Edit mode.
*/
VECCOPY(cursor, curs);
- VECCOPY(gcursor, cursor);
+ VECCOPY(gcursor, cursor);
if (t->flag & T_EDIT) {
VecSubf(cursor, cursor, t->obedit->obmat[3]);
VecSubf(gcursor, gcursor, t->obedit->obmat[3]);
@@ -2072,7 +2070,7 @@ int Warp(TransInfo *t, short mval[2])
/* amount of degrees for warp */
circumfac = 360.0f * t->values[0];
-
+
if (t->customData) /* non-null value indicates reversed input */
{
circumfac *= -1;
@@ -2080,22 +2078,22 @@ int Warp(TransInfo *t, short mval[2])
snapGrid(t, &circumfac);
applyNumInput(&t->num, &circumfac);
-
+
/* header print for NumInput */
if (hasNumInput(&t->num)) {
char c[20];
-
+
outputNumInput(&(t->num), c);
-
+
sprintf(str, "Warp: %s", c);
}
else {
/* default header print */
sprintf(str, "Warp: %.3f", circumfac);
}
-
+
circumfac*= (float)(-M_PI/360.0);
-
+
for(i = 0; i < t->total; i++, td++) {
float loc[3];
if (td->flag & TD_NOACTION)
@@ -2103,65 +2101,65 @@ int Warp(TransInfo *t, short mval[2])
if (td->flag & TD_SKIP)
continue;
-
+
/* translate point to center, rotate in such a way that outline==distance */
VECCOPY(vec, td->iloc);
Mat3MulVecfl(td->mtx, vec);
Mat4MulVecfl(t->viewmat, vec);
VecSubf(vec, vec, t->viewmat[3]);
-
+
dist= vec[0]-cursor[0];
-
+
/* t->val is X dimension projected boundbox */
- phi0= (circumfac*dist/t->val);
-
+ phi0= (circumfac*dist/t->val);
+
vec[1]= (vec[1]-cursor[1]);
-
+
co= (float)cos(phi0);
si= (float)sin(phi0);
loc[0]= -si*vec[1]+cursor[0];
loc[1]= co*vec[1]+cursor[1];
loc[2]= vec[2];
-
+
Mat4MulVecfl(t->viewinv, loc);
VecSubf(loc, loc, t->viewinv[3]);
Mat3MulVecfl(td->smtx, loc);
-
+
VecSubf(loc, loc, td->iloc);
VecMulf(loc, td->factor);
VecAddf(td->loc, td->iloc, loc);
}
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
/* ************************** SHEAR *************************** */
-void initShear(TransInfo *t)
+void initShear(TransInfo *t)
{
t->mode = TFM_SHEAR;
t->transform = Shear;
t->handleEvent = handleEventShear;
-
+
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
int handleEventShear(TransInfo *t, wmEvent *event)
{
int status = 0;
-
+
if (event->type == MIDDLEMOUSE && event->val)
{
// Use customData pointer to signal Shear direction
@@ -2175,15 +2173,15 @@ int handleEventShear(TransInfo *t, wmEvent *event)
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
t->customData = 0;
}
-
+
status = 1;
}
-
+
return status;
}
-int Shear(TransInfo *t, short mval[2])
+int Shear(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float vec[3];
@@ -2213,18 +2211,18 @@ int Shear(TransInfo *t, short mval[2])
/* default header print */
sprintf(str, "Shear: %.3f %s", value, t->proptext);
}
-
+
Mat3One(smat);
-
+
// Custom data signals shear direction
if (t->customData == 0)
smat[1][0] = value;
else
smat[0][1] = value;
-
+
Mat3MulMat3(tmat, smat, persmat);
Mat3MulMat3(totmat, persinv, tmat);
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -2261,13 +2259,13 @@ int Shear(TransInfo *t, short mval[2])
/* ************************** RESIZE *************************** */
-void initResize(TransInfo *t)
+void initResize(TransInfo *t)
{
t->mode = TFM_RESIZE;
t->transform = Resize;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
-
+
t->flag |= T_NULL_ONE;
t->num.flag |= NUM_NULL_ONE;
t->num.flag |= NUM_AFFECT_ALL;
@@ -2275,7 +2273,7 @@ void initResize(TransInfo *t)
t->flag |= T_NO_ZERO;
t->num.flag |= NUM_NO_ZERO;
}
-
+
t->idx_max = 2;
t->num.idx_max = 2;
t->snap[0] = 0.0f;
@@ -2321,18 +2319,18 @@ static void headerResize(TransInfo *t, float vec[3], char *str) {
static void TransMat3ToSize( float mat[][3], float smat[][3], float *size)
{
float vec[3];
-
+
VecCopyf(vec, mat[0]);
size[0]= Normalize(vec);
VecCopyf(vec, mat[1]);
size[1]= Normalize(vec);
VecCopyf(vec, mat[2]);
size[2]= Normalize(vec);
-
+
/* first tried with dotproduct... but the sign flip is crucial */
- if( VECSIGNFLIP(mat[0], smat[0]) ) size[0]= -size[0];
- if( VECSIGNFLIP(mat[1], smat[1]) ) size[1]= -size[1];
- if( VECSIGNFLIP(mat[2], smat[2]) ) size[2]= -size[2];
+ if( VECSIGNFLIP(mat[0], smat[0]) ) size[0]= -size[0];
+ if( VECSIGNFLIP(mat[1], smat[1]) ) size[1]= -size[1];
+ if( VECSIGNFLIP(mat[2], smat[2]) ) size[2]= -size[2];
}
@@ -2358,8 +2356,8 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
VECCOPY(center, td->center);
}
else if (t->flag & T_EDIT) {
-
- if(t->around==V3D_LOCAL && (t->scene->selectmode & SCE_SELECT_FACE)) {
+
+ if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
VECCOPY(center, td->center);
}
else {
@@ -2376,7 +2374,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
if (td->ext) {
float fsize[3];
-
+
if (t->flag & (T_OBJECT|T_TEXTURE|T_POSE)) {
float obsizemat[3][3];
// Reorient the size mat to fit the oriented object.
@@ -2388,28 +2386,28 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
else {
Mat3ToSize(tmat, fsize);
}
-
+
protectedSizeBits(td->protectflag, fsize);
-
+
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't resize objects itself
/* handle ipokeys? */
if(td->tdi) {
TransDataIpokey *tdi= td->tdi;
/* calculate delta size (equal for size and dsize) */
-
+
vec[0]= (tdi->oldsize[0])*(fsize[0] -1.0f) * td->factor;
vec[1]= (tdi->oldsize[1])*(fsize[1] -1.0f) * td->factor;
vec[2]= (tdi->oldsize[2])*(fsize[2] -1.0f) * td->factor;
-
+
add_tdi_poin(tdi->sizex, tdi->oldsize, vec[0]);
add_tdi_poin(tdi->sizey, tdi->oldsize+1, vec[1]);
add_tdi_poin(tdi->sizez, tdi->oldsize+2, vec[2]);
-
- }
+
+ }
else if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){
/* scale val and reset size */
*td->val = td->ival * fsize[0] * td->factor;
-
+
td->ext->size[0] = td->ext->isize[0];
td->ext->size[1] = td->ext->isize[1];
td->ext->size[2] = td->ext->isize[2];
@@ -2418,16 +2416,16 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
/* Reset val if SINGLESIZE but using a constraint */
if (td->flag & TD_SINGLESIZE)
*td->val = td->ival;
-
+
td->ext->size[0] = td->ext->isize[0] * (fsize[0]) * td->factor;
td->ext->size[1] = td->ext->isize[1] * (fsize[1]) * td->factor;
td->ext->size[2] = td->ext->isize[2] * (fsize[2]) * td->factor;
}
}
-
+
constraintSizeLim(t, td);
}
-
+
/* For individual element center, Editmode need to use iloc */
if (t->flag & T_POINTS)
VecSubf(vec, td->iloc, center);
@@ -2457,11 +2455,11 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
add_tdi_poin(tdi->locz, tdi->oldloc+2, vec[2]);
}
else VecAddf(td->loc, td->iloc, vec);
-
+
constraintTransLim(t, td);
}
-int Resize(TransInfo *t, short mval[2])
+int Resize(TransInfo *t, short mval[2])
{
TransData *td;
float size[3], mat[3][3];
@@ -2478,7 +2476,7 @@ int Resize(TransInfo *t, short mval[2])
{
ratio = t->values[0];
}
-
+
size[0] = size[1] = size[2] = ratio;
snapGrid(t, size);
@@ -2504,7 +2502,7 @@ int Resize(TransInfo *t, short mval[2])
}
Mat3CpyMat3(t->mat, mat); // used in manipulator
-
+
headerResize(t, size, str);
for(i = 0, td=t->data; i < t->total; i++, td++) {
@@ -2513,7 +2511,7 @@ int Resize(TransInfo *t, short mval[2])
if (td->flag & TD_SKIP)
continue;
-
+
ElementResize(t, td, mat);
}
@@ -2537,14 +2535,14 @@ int Resize(TransInfo *t, short mval[2])
/* ************************** TOSPHERE *************************** */
-void initToSphere(TransInfo *t)
+void initToSphere(TransInfo *t)
{
TransData *td = t->data;
int i;
t->mode = TFM_TOSPHERE;
t->transform = ToSphere;
-
+
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO);
t->idx_max = 0;
@@ -2552,10 +2550,10 @@ void initToSphere(TransInfo *t)
t->snap[0] = 0.0f;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->num.flag |= NUM_NULL_ONE | NUM_NO_NEGATIVE;
t->flag |= T_NO_CONSTRAINT;
-
+
// Calculate average radius
for(i = 0 ; i < t->total; i++, td++) {
t->val += VecLenf(t->center, td->iloc);
@@ -2564,7 +2562,7 @@ void initToSphere(TransInfo *t)
t->val /= (float)t->total;
}
-int ToSphere(TransInfo *t, short mval[2])
+int ToSphere(TransInfo *t, short mval[2])
{
float vec[3];
float ratio, radius;
@@ -2595,8 +2593,8 @@ int ToSphere(TransInfo *t, short mval[2])
/* default header print */
sprintf(str, "To Sphere: %.4f %s", ratio, t->proptext);
}
-
-
+
+
for(i = 0 ; i < t->total; i++, td++) {
float tratio;
if (td->flag & TD_NOACTION)
@@ -2615,7 +2613,7 @@ int ToSphere(TransInfo *t, short mval[2])
VecAddf(td->loc, t->center, vec);
}
-
+
recalcData(t);
@@ -2627,23 +2625,23 @@ int ToSphere(TransInfo *t, short mval[2])
/* ************************** ROTATION *************************** */
-void initRotation(TransInfo *t)
+void initRotation(TransInfo *t)
{
t->mode = TFM_ROTATION;
t->transform = Rotation;
-
+
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
-
+
t->ndof.axis = 16;
/* Scale down and flip input for rotation */
t->ndof.factor[0] = -0.2f;
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = (float)((5.0/180)*M_PI);
t->snap[2] = t->snap[1] * 0.2f;
-
+
if (t->flag & T_2D_EDIT)
t->flag |= T_NO_CONSTRAINT;
}
@@ -2652,7 +2650,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
float vec[3], totmat[3][3], smat[3][3];
float eul[3], fmat[3][3], quat[4];
float *center = t->center;
-
+
/* local constraint shouldn't alter center */
if (around == V3D_LOCAL) {
if (t->flag & (T_OBJECT|T_POSE)) {
@@ -2660,19 +2658,19 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
}
else {
/* !TODO! Make this if not rely on G */
- if(around==V3D_LOCAL && (t->scene->selectmode & SCE_SELECT_FACE)) {
+ if(around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
center = td->center;
}
}
}
-
+
if (t->flag & T_POINTS) {
Mat3MulMat3(totmat, mat, td->mtx);
Mat3MulMat3(smat, td->smtx, totmat);
-
+
VecSubf(vec, td->iloc, center);
Mat3MulVecfl(smat, vec);
-
+
VecAddf(td->loc, vec, center);
VecSubf(vec,td->loc,td->iloc);
@@ -2682,10 +2680,10 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if(td->flag & TD_USEQUAT) {
Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
Mat3ToQuat(fmat, quat); // Actual transform
-
+
if(td->ext->quat){
QuatMul(td->ext->quat, quat, td->ext->iquat);
-
+
/* is there a reason not to have this here? -jahka */
protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat);
}
@@ -2693,11 +2691,11 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
}
/**
* HACK WARNING
- *
+ *
* This is some VERY ugly special case to deal with pose mode.
- *
+ *
* The problem is that mtx and smtx include each bone orientation.
- *
+ *
* That is needed to rotate each bone properly, HOWEVER, to calculate
* the translation component, we only need the actual armature object's
* matrix (and inverse). That is not all though. Once the proper translation
@@ -2706,65 +2704,65 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
else if (t->flag & T_POSE) {
float pmtx[3][3], imtx[3][3];
- // Extract and invert armature object matrix
+ // Extract and invert armature object matrix
Mat3CpyMat4(pmtx, t->poseobj->obmat);
Mat3Inv(imtx, pmtx);
-
+
if ((td->flag & TD_NO_LOC) == 0)
{
VecSubf(vec, td->center, center);
-
+
Mat3MulVecfl(pmtx, vec); // To Global space
Mat3MulVecfl(mat, vec); // Applying rotation
Mat3MulVecfl(imtx, vec); // To Local space
-
+
VecAddf(vec, vec, center);
/* vec now is the location where the object has to be */
-
+
VecSubf(vec, vec, td->center); // Translation needed from the initial location
-
+
Mat3MulVecfl(pmtx, vec); // To Global space
Mat3MulVecfl(td->smtx, vec);// To Pose space
-
+
protectedTransBits(td->protectflag, vec);
-
+
VecAddf(td->loc, td->iloc, vec);
-
+
constraintTransLim(t, td);
}
-
+
/* rotation */
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself
/* euler or quaternion? */
if (td->flag & TD_USEQUAT) {
Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
-
+
Mat3ToQuat(fmat, quat); // Actual transform
-
+
QuatMul(td->ext->quat, quat, td->ext->iquat);
/* this function works on end result */
protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat);
}
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);
EulToMat3(eul, eulmat);
-
+
/* mat = transform, obmat = bone rotation */
Mat3MulMat3(fmat, smat, eulmat);
-
+
Mat3ToCompatibleEul(fmat, eul, td->ext->rot);
-
+
/* and apply (to end result only) */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
VECCOPY(td->ext->rot, eul);
}
-
+
constraintRotLim(t, td);
}
}
@@ -2778,9 +2776,9 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* vec now is the location where the object has to be */
VecSubf(vec, vec, td->center);
Mat3MulVecfl(td->smtx, vec);
-
+
protectedTransBits(td->protectflag, vec);
-
+
if(td->tdi) {
TransDataIpokey *tdi= td->tdi;
add_tdi_poin(tdi->locx, tdi->oldloc, vec[0]);
@@ -2789,8 +2787,8 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
}
else VecAddf(td->loc, td->iloc, vec);
}
-
-
+
+
constraintTransLim(t, td);
/* rotation */
@@ -2799,34 +2797,34 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if (td->flag & TD_USEQUAT) {
Mat3MulSerie(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
Mat3ToQuat(fmat, quat); // Actual transform
-
+
QuatMul(td->ext->quat, quat, td->ext->iquat);
/* this function works on end result */
protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat);
}
else {
float obmat[3][3];
-
+
/* are there ipo keys? */
if(td->tdi) {
TransDataIpokey *tdi= td->tdi;
float current_rot[3];
float rot[3];
-
+
/* current IPO value for compatible euler */
current_rot[0] = (tdi->rotx) ? tdi->rotx[0] : 0.0f;
current_rot[1] = (tdi->roty) ? tdi->roty[0] : 0.0f;
current_rot[2] = (tdi->rotz) ? tdi->rotz[0] : 0.0f;
VecMulf(current_rot, (float)(M_PI_2 / 9.0));
-
+
/* calculate the total rotatation in eulers */
VecAddf(eul, td->ext->irot, td->ext->drot);
EulToMat3(eul, obmat);
/* mat = transform, obmat = object rotation */
Mat3MulMat3(fmat, mat, obmat);
-
+
Mat3ToCompatibleEul(fmat, eul, current_rot);
-
+
/* correct back for delta rot */
if(tdi->flag & TOB_IPODROT) {
VecSubf(rot, eul, td->ext->irot);
@@ -2834,12 +2832,12 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
else {
VecSubf(rot, eul, td->ext->drot);
}
-
+
VecMulf(rot, (float)(9.0/M_PI_2));
VecSubf(rot, rot, tdi->oldrot);
-
+
protectedRotateBits(td->protectflag, rot, tdi->oldrot);
-
+
add_tdi_poin(tdi->rotx, tdi->oldrot, rot[0]);
add_tdi_poin(tdi->roty, tdi->oldrot+1, rot[1]);
add_tdi_poin(tdi->rotz, tdi->oldrot+2, rot[2]);
@@ -2847,37 +2845,37 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
else {
Mat3MulMat3(totmat, mat, td->mtx);
Mat3MulMat3(smat, td->smtx, totmat);
-
+
/* calculate the total rotatation in eulers */
VecAddf(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */
EulToMat3(eul, obmat);
/* mat = transform, obmat = object rotation */
Mat3MulMat3(fmat, smat, obmat);
-
+
Mat3ToCompatibleEul(fmat, eul, td->ext->rot);
-
+
/* correct back for delta rot */
VecSubf(eul, eul, td->ext->drot);
-
+
/* and apply */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
VECCOPY(td->ext->rot, eul);
}
}
-
+
constraintRotLim(t, td);
}
}
}
-static void applyRotation(TransInfo *t, float angle, float axis[3])
+static void applyRotation(TransInfo *t, float angle, float axis[3])
{
TransData *td = t->data;
float mat[3][3];
int i;
VecRotToMat3(axis, angle, mat);
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -2885,7 +2883,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
if (td->flag & TD_SKIP)
continue;
-
+
if (t->con.applyRot) {
t->con.applyRot(t, td, axis, NULL);
VecRotToMat3(axis, angle * td->factor, mat);
@@ -2898,7 +2896,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
}
}
-int Rotation(TransInfo *t, short mval[2])
+int Rotation(TransInfo *t, short mval[2])
{
char str[64];
@@ -2914,13 +2912,13 @@ int Rotation(TransInfo *t, short mval[2])
final = t->values[0];
applyNDofInput(&t->ndof, &final);
-
+
snapGrid(t, &final);
if (t->con.applyRot) {
t->con.applyRot(t, NULL, axis, &final);
}
-
+
applySnapping(t, &final);
if (hasNumInput(&t->num)) {
@@ -2935,7 +2933,7 @@ int Rotation(TransInfo *t, short mval[2])
/* Clamp between -180 and 180 */
while (final >= 180.0)
final -= 360.0;
-
+
while (final <= -180.0)
final += 360.0;
@@ -2950,9 +2948,9 @@ int Rotation(TransInfo *t, short mval[2])
// TRANSFORM_FIX_ME
// t->values[0] = final; // used in manipulator
// Mat3CpyMat3(t->mat, mat); // used in manipulator
-
+
applyRotation(t, final, axis);
-
+
recalcData(t);
ED_area_headerprint(t->sa, str);
@@ -2963,13 +2961,13 @@ int Rotation(TransInfo *t, short mval[2])
/* ************************** TRACKBALL *************************** */
-void initTrackball(TransInfo *t)
+void initTrackball(TransInfo *t)
{
t->mode = TFM_TRACKBALL;
t->transform = Trackball;
-
+
initMouseInputMode(t, &t->mouse, INPUT_TRACKBALL);
-
+
t->ndof.axis = 40;
/* Scale down input for rotation */
t->ndof.factor[0] = 0.2f;
@@ -2980,7 +2978,7 @@ void initTrackball(TransInfo *t)
t->snap[0] = 0.0f;
t->snap[1] = (float)((5.0/180)*M_PI);
t->snap[2] = t->snap[1] * 0.2f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
@@ -2992,7 +2990,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
VecRotToMat3(axis1, angles[0], smat);
VecRotToMat3(axis2, angles[1], totmat);
-
+
Mat3MulMat3(mat, smat, totmat);
for(i = 0 ; i < t->total; i++, td++) {
@@ -3001,46 +2999,46 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
if (td->flag & TD_SKIP)
continue;
-
+
if (t->flag & T_PROP_EDIT) {
VecRotToMat3(axis1, td->factor * angles[0], smat);
VecRotToMat3(axis2, td->factor * angles[1], totmat);
-
+
Mat3MulMat3(mat, smat, totmat);
}
-
+
ElementRotation(t, td, mat, t->around);
}
}
-int Trackball(TransInfo *t, short mval[2])
+int Trackball(TransInfo *t, short mval[2])
{
char str[128];
float axis1[3], axis2[3];
float mat[3][3], totmat[3][3], smat[3][3];
float phi[2];
-
+
VECCOPY(axis1, t->persinv[0]);
VECCOPY(axis2, t->persinv[1]);
Normalize(axis1);
Normalize(axis2);
-
+
phi[0] = t->values[0];
phi[1] = t->values[1];
-
+
applyNDofInput(&t->ndof, phi);
-
+
snapGrid(t, phi);
-
+
if (hasNumInput(&t->num)) {
char c[40];
-
+
applyNumInput(&t->num, phi);
-
+
outputNumInput(&(t->num), c);
-
+
sprintf(str, "Trackball: %s %s %s", &c[0], &c[20], t->proptext);
-
+
phi[0] *= (float)(M_PI / 180.0);
phi[1] *= (float)(M_PI / 180.0);
}
@@ -3050,34 +3048,34 @@ int Trackball(TransInfo *t, short mval[2])
VecRotToMat3(axis1, phi[0], smat);
VecRotToMat3(axis2, phi[1], totmat);
-
+
Mat3MulMat3(mat, smat, totmat);
-
+
// TRANSFORM_FIX_ME
//Mat3CpyMat3(t->mat, mat); // used in manipulator
-
+
applyTrackball(t, axis1, axis2, phi);
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
/* ************************** TRANSLATION *************************** */
-
-void initTranslation(TransInfo *t)
+
+void initTranslation(TransInfo *t)
{
t->mode = TFM_TRANSLATION;
t->transform = Translation;
-
+
initMouseInputMode(t, &t->mouse, INPUT_VECTOR);
t->idx_max = (t->flag & T_2D_EDIT)? 1: 2;
t->num.flag = 0;
t->num.idx_max = t->idx_max;
-
+
t->ndof.axis = (t->flag & T_2D_EDIT)? 1|2: 1|2|4;
if(t->spacetype == SPACE_VIEW3D) {
@@ -3103,7 +3101,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) {
char distvec[20];
char autoik[20];
float dist;
-
+
if (hasNumInput(&t->num)) {
outputNumInput(&(t->num), tvec);
dist = VecLength(t->num.val);
@@ -3124,10 +3122,10 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) {
sprintf(distvec, "%.4e", dist);
else
sprintf(distvec, "%.4f", dist);
-
+
if(t->flag & T_AUTOIK) {
- short chainlen= t->scene->toolsettings->autoik_chainlen;
-
+ short chainlen= t->settings->autoik_chainlen;
+
if(chainlen)
sprintf(autoik, "AutoIK-Len: %d", chainlen);
else
@@ -3164,10 +3162,10 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
/* handle snapping rotation before doing the translation */
if (usingSnappingNormal(t))
{
@@ -3178,22 +3176,22 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
float quat[4];
float mat[3][3];
float angle;
-
+
Crossf(axis, original_normal, t->tsnap.snapNormal);
angle = saacos(Inpf(original_normal, t->tsnap.snapNormal));
-
+
AxisAngleToQuat(quat, axis, angle);
-
+
QuatToMat3(quat, mat);
-
+
ElementRotation(t, td, mat, V3D_LOCAL);
}
else
{
float mat[3][3];
-
+
Mat3One(mat);
-
+
ElementRotation(t, td, mat, V3D_LOCAL);
}
}
@@ -3205,12 +3203,12 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
else {
VECCOPY(tvec, vec);
}
-
+
Mat3MulVecfl(td->smtx, tvec);
VecMulf(tvec, td->factor);
-
+
protectedTransBits(td->protectflag, tvec);
-
+
/* transdata ipokey */
if(td->tdi) {
TransDataIpokey *tdi= td->tdi;
@@ -3219,17 +3217,17 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
add_tdi_poin(tdi->locz, tdi->oldloc+2, tvec[2]);
}
else VecAddf(td->loc, td->iloc, tvec);
-
+
constraintTransLim(t, td);
}
}
/* uses t->vec to store actual translation in */
-int Translation(TransInfo *t, short mval[2])
+int Translation(TransInfo *t, short mval[2])
{
float tvec[3];
char str[250];
-
+
if (t->con.mode & CON_APPLY) {
float pvec[3] = {0.0f, 0.0f, 0.0f};
applySnapping(t, t->values);
@@ -3245,11 +3243,11 @@ int Translation(TransInfo *t, short mval[2])
{
removeAspectRatio(t, t->values);
}
-
+
applySnapping(t, t->values);
headerTranslation(t, t->values, str);
}
-
+
applyTranslation(t, t->values);
/* evil hack - redo translation if clipping needed */
@@ -3265,7 +3263,7 @@ int Translation(TransInfo *t, short mval[2])
/* ************************** SHRINK/FATTEN *************************** */
-void initShrinkFatten(TransInfo *t)
+void initShrinkFatten(TransInfo *t)
{
// If not in mesh edit mode, fallback to Resize
if (t->obedit==NULL || t->obedit->type != OB_MESH) {
@@ -3274,22 +3272,22 @@ void initShrinkFatten(TransInfo *t)
else {
t->mode = TFM_SHRINKFATTEN;
t->transform = ShrinkFatten;
-
+
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = 1.0f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
}
-int ShrinkFatten(TransInfo *t, short mval[2])
+int ShrinkFatten(TransInfo *t, short mval[2])
{
float vec[3];
float distance;
@@ -3315,8 +3313,8 @@ int ShrinkFatten(TransInfo *t, short mval[2])
/* default header print */
sprintf(str, "Shrink/Fatten: %.4f %s", distance, t->proptext);
}
-
-
+
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3340,11 +3338,11 @@ int ShrinkFatten(TransInfo *t, short mval[2])
/* ************************** TILT *************************** */
-void initTilt(TransInfo *t)
+void initTilt(TransInfo *t)
{
t->mode = TFM_TILT;
t->transform = Tilt;
-
+
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
t->ndof.axis = 16;
@@ -3356,13 +3354,13 @@ void initTilt(TransInfo *t)
t->snap[0] = 0.0f;
t->snap[1] = (float)((5.0/180)*M_PI);
t->snap[2] = t->snap[1] * 0.2f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
-int Tilt(TransInfo *t, short mval[2])
+int Tilt(TransInfo *t, short mval[2])
{
TransData *td = t->data;
int i;
@@ -3371,7 +3369,7 @@ int Tilt(TransInfo *t, short mval[2])
float final;
final = t->values[0];
-
+
applyNDofInput(&t->ndof, &final);
snapGrid(t, &final);
@@ -3417,72 +3415,72 @@ void initCurveShrinkFatten(TransInfo *t)
{
t->mode = TFM_CURVE_SHRINKFATTEN;
t->transform = CurveShrinkFatten;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
-int CurveShrinkFatten(TransInfo *t, short mval[2])
+int CurveShrinkFatten(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float ratio;
int i;
char str[50];
-
+
ratio = t->values[0];
-
+
snapGrid(t, &ratio);
-
+
applyNumInput(&t->num, &ratio);
-
+
/* header print for NumInput */
if (hasNumInput(&t->num)) {
char c[20];
-
+
outputNumInput(&(t->num), c);
sprintf(str, "Shrink/Fatten: %s", c);
}
else {
sprintf(str, "Shrink/Fatten: %3f", ratio);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
+
if(td->val) {
//*td->val= ratio;
*td->val= td->ival*ratio;
if (*td->val <= 0.0f) *td->val = 0.0001f;
}
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
/* ************************** PUSH/PULL *************************** */
-void initPushPull(TransInfo *t)
+void initPushPull(TransInfo *t)
{
t->mode = TFM_PUSHPULL;
t->transform = PushPull;
-
+
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
-
+
t->ndof.axis = 4;
/* Flip direction */
t->ndof.factor[0] = -1.0f;
@@ -3495,7 +3493,7 @@ void initPushPull(TransInfo *t)
}
-int PushPull(TransInfo *t, short mval[2])
+int PushPull(TransInfo *t, short mval[2])
{
float vec[3], axis[3];
float distance;
@@ -3504,7 +3502,7 @@ int PushPull(TransInfo *t, short mval[2])
TransData *td = t->data;
distance = t->values[0];
-
+
applyNDofInput(&t->ndof, &distance);
snapGrid(t, &distance);
@@ -3523,11 +3521,11 @@ int PushPull(TransInfo *t, short mval[2])
/* default header print */
sprintf(str, "Push/Pull: %.4f%s %s", distance, t->con.text, t->proptext);
}
-
+
if (t->con.applyRot && t->con.mode & CON_APPLY) {
t->con.applyRot(t, NULL, axis, NULL);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3563,11 +3561,11 @@ int PushPull(TransInfo *t, short mval[2])
/* ************************** BEVEL **************************** */
-void initBevel(TransInfo *t)
+void initBevel(TransInfo *t)
{
t->transform = Bevel;
t->handleEvent = handleEventBevel;
-
+
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
t->mode = TFM_BEVEL;
@@ -3636,7 +3634,7 @@ int Bevel(TransInfo *t, short mval[2])
mode = (G.editBMesh->options & BME_BEVEL_VERT) ? "verts only" : "normal";
distance = t->values[0] / 4; /* 4 just seemed a nice value to me, nothing special */
-
+
distance = fabs(distance);
snapGrid(t, &distance);
@@ -3655,7 +3653,7 @@ int Bevel(TransInfo *t, short mval[2])
/* default header print */
sprintf(str, "Bevel - Dist: %.4f, Mode: %s (MMB to toggle))", distance, mode);
}
-
+
if (distance < 0) distance = -distance;
for(i = 0 ; i < t->total; i++, td++) {
if (td->axismtx[1][0] > 0 && distance > td->axismtx[1][0]) {
@@ -3676,23 +3674,23 @@ int Bevel(TransInfo *t, short mval[2])
/* ************************** BEVEL WEIGHT *************************** */
-void initBevelWeight(TransInfo *t)
+void initBevelWeight(TransInfo *t)
{
t->mode = TFM_BWEIGHT;
t->transform = BevelWeight;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
-int BevelWeight(TransInfo *t, short mval[2])
+int BevelWeight(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float weight;
@@ -3726,7 +3724,7 @@ int BevelWeight(TransInfo *t, short mval[2])
else
sprintf(str, "Bevel Weight: %.3f %s", weight, t->proptext);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3747,23 +3745,23 @@ int BevelWeight(TransInfo *t, short mval[2])
/* ************************** CREASE *************************** */
-void initCrease(TransInfo *t)
+void initCrease(TransInfo *t)
{
t->mode = TFM_CREASE;
t->transform = Crease;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
t->snap[1] = 0.1f;
t->snap[2] = t->snap[1] * 0.1f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
-int Crease(TransInfo *t, short mval[2])
+int Crease(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float crease;
@@ -3797,7 +3795,7 @@ int Crease(TransInfo *t, short mval[2])
else
sprintf(str, "Crease: %.3f %s", crease, t->proptext);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3825,9 +3823,9 @@ void initBoneSize(TransInfo *t)
{
t->mode = TFM_BONESIZE;
t->transform = BoneSize;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
-
+
t->idx_max = 2;
t->num.idx_max = 2;
t->num.flag |= NUM_NULL_ONE;
@@ -3851,7 +3849,7 @@ static void headerBoneSize(TransInfo *t, float vec[3], char *str) {
if (t->con.mode & CON_APPLY) {
if (t->num.idx_max == 0)
sprintf(str, "ScaleB: %s%s %s", &tvec[0], t->con.text, t->proptext);
- else
+ else
sprintf(str, "ScaleB: %s : %s : %s%s %s", &tvec[0], &tvec[20], &tvec[40], t->con.text, t->proptext);
}
else {
@@ -3859,18 +3857,18 @@ static void headerBoneSize(TransInfo *t, float vec[3], char *str) {
}
}
-static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
+static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
{
float tmat[3][3], smat[3][3], oldy;
float sizemat[3][3];
-
+
Mat3MulMat3(smat, mat, td->mtx);
Mat3MulMat3(tmat, td->smtx, smat);
-
+
if (t->con.applySize) {
t->con.applySize(t, td, tmat);
}
-
+
/* we've tucked the scale in loc */
oldy= td->iloc[1];
SizeToMat3(td->iloc, sizemat);
@@ -3879,14 +3877,14 @@ static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
td->loc[1]= oldy;
}
-int BoneSize(TransInfo *t, short mval[2])
+int BoneSize(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float size[3], mat[3][3];
float ratio;
int i;
char str[60];
-
+
// TRANSFORM_FIX_ME MOVE TO MOUSE INPUT
/* for manipulator, center handle, the scaling can't be done relative to center */
if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
@@ -3897,40 +3895,40 @@ int BoneSize(TransInfo *t, short mval[2])
{
ratio = t->values[0];
}
-
+
size[0] = size[1] = size[2] = ratio;
-
+
snapGrid(t, size);
-
+
if (hasNumInput(&t->num)) {
applyNumInput(&t->num, size);
constraintNumInput(t, size);
}
-
+
SizeToMat3(size, mat);
-
+
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
}
-
+
Mat3CpyMat3(t->mat, mat); // used in manipulator
-
+
headerBoneSize(t, size, str);
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
+
ElementBoneSize(t, td, mat);
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
@@ -3941,9 +3939,9 @@ void initBoneEnvelope(TransInfo *t)
{
t->mode = TFM_BONE_ENVELOPE;
t->transform = BoneEnvelope;
-
+
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
@@ -3953,37 +3951,37 @@ void initBoneEnvelope(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
}
-int BoneEnvelope(TransInfo *t, short mval[2])
+int BoneEnvelope(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float ratio;
int i;
char str[50];
-
+
ratio = t->values[0];
-
+
snapGrid(t, &ratio);
-
+
applyNumInput(&t->num, &ratio);
-
+
/* header print for NumInput */
if (hasNumInput(&t->num)) {
char c[20];
-
+
outputNumInput(&(t->num), c);
sprintf(str, "Envelope: %s", c);
}
else {
sprintf(str, "Envelope: %3f", ratio);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
+
if (td->val) {
/* if the old/original value was 0.0f, then just use ratio */
if (td->ival)
@@ -3992,11 +3990,11 @@ int BoneEnvelope(TransInfo *t, short mval[2])
*td->val= ratio;
}
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
-
+
return 1;
}
@@ -4007,7 +4005,7 @@ void initBoneRoll(TransInfo *t)
{
t->mode = TFM_BONE_ROLL;
t->transform = BoneRoll;
-
+
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
t->idx_max = 0;
@@ -4015,11 +4013,11 @@ void initBoneRoll(TransInfo *t)
t->snap[0] = 0.0f;
t->snap[1] = (float)((5.0/180)*M_PI);
t->snap[2] = t->snap[1] * 0.2f;
-
+
t->flag |= T_NO_CONSTRAINT;
}
-int BoneRoll(TransInfo *t, short mval[2])
+int BoneRoll(TransInfo *t, short mval[2])
{
TransData *td = t->data;
int i;
@@ -4045,18 +4043,18 @@ int BoneRoll(TransInfo *t, short mval[2])
else {
sprintf(str, "Roll: %.2f", 180.0*final/M_PI);
}
-
+
/* set roll values */
- for (i = 0; i < t->total; i++, td++) {
+ for (i = 0; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
+
*(td->val) = td->ival - final;
}
-
+
recalcData(t);
ED_area_headerprint(t->sa, str);
@@ -4066,11 +4064,11 @@ int BoneRoll(TransInfo *t, short mval[2])
/* ************************** BAKE TIME ******************* */
-void initBakeTime(TransInfo *t)
+void initBakeTime(TransInfo *t)
{
t->transform = BakeTime;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
-
+
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
@@ -4078,15 +4076,15 @@ void initBakeTime(TransInfo *t)
t->snap[2] = t->snap[1] * 0.1f;
}
-int BakeTime(TransInfo *t, short mval[2])
+int BakeTime(TransInfo *t, short mval[2])
{
TransData *td = t->data;
float time;
int i;
char str[50];
-
+
float fac = 0.1f;
-
+
if(t->mouse.precision) {
/* calculate ratio for shiftkey pos, and for total, and blend these for precision */
time= (float)(t->center2d[0] - t->mouse.precision_mval[0]) * fac;
@@ -4118,7 +4116,7 @@ int BakeTime(TransInfo *t, short mval[2])
else
sprintf(str, "Time: %.3f %s", time, t->proptext);
}
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -4142,7 +4140,7 @@ int BakeTime(TransInfo *t, short mval[2])
/* ************************** MIRROR *************************** */
-void initMirror(TransInfo *t)
+void initMirror(TransInfo *t)
{
t->transform = Mirror;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
@@ -4153,7 +4151,7 @@ void initMirror(TransInfo *t)
}
}
-int Mirror(TransInfo *t, short mval[2])
+int Mirror(TransInfo *t, short mval[2])
{
TransData *td;
float size[3], mat[3][3];
@@ -4169,47 +4167,47 @@ int Mirror(TransInfo *t, short mval[2])
/* if an axis has been selected */
if (t->con.mode & CON_APPLY) {
size[0] = size[1] = size[2] = -1;
-
+
SizeToMat3(size, mat);
-
+
if (t->con.applySize) {
t->con.applySize(t, NULL, mat);
}
-
+
sprintf(str, "Mirror%s", t->con.text);
-
+
for(i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
ElementResize(t, td, mat);
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, str);
}
else
{
size[0] = size[1] = size[2] = 1;
-
+
SizeToMat3(size, mat);
-
+
for(i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
ElementResize(t, td, mat);
}
-
+
recalcData(t);
-
+
ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
}
@@ -4218,12 +4216,12 @@ int Mirror(TransInfo *t, short mval[2])
/* ************************** ALIGN *************************** */
-void initAlign(TransInfo *t)
+void initAlign(TransInfo *t)
{
t->flag |= T_NO_CONSTRAINT;
-
+
t->transform = Align;
-
+
initMouseInputMode(t, &t->mouse, INPUT_NONE);
}
@@ -4239,37 +4237,37 @@ int Align(TransInfo *t, short mval[2])
for(i = 0 ; i < t->total; i++, td++)
{
float mat[3][3], invmat[3][3];
-
+
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
+
/* around local centers */
if (t->flag & (T_OBJECT|T_POSE)) {
VECCOPY(t->center, td->center);
}
else {
- if(t->scene->selectmode & SCE_SELECT_FACE) {
+ if(t->settings->selectmode & SCE_SELECT_FACE) {
VECCOPY(t->center, td->center);
}
}
Mat3Inv(invmat, td->axismtx);
-
- Mat3MulMat3(mat, t->spacemtx, invmat);
+
+ Mat3MulMat3(mat, t->spacemtx, invmat);
ElementRotation(t, td, mat, t->around);
}
/* restoring original center */
VECCOPY(t->center, center);
-
+
recalcData(t);
ED_area_headerprint(t->sa, "Align");
-
+
return 1;
}
@@ -4278,37 +4276,37 @@ int Align(TransInfo *t, short mval[2])
/* ---------------- Special Helpers for Various Settings ------------- */
-/* This function returns the snapping 'mode' for Animation Editors only
+/* This function returns the snapping 'mode' for Animation Editors only
* We cannot use the standard snapping due to NLA-strip scaling complexities.
*/
// XXX these modifier checks should be keymappable
static short getAnimEdit_SnapMode(TransInfo *t)
{
short autosnap= SACTSNAP_OFF;
-
+
/* currently, some of these are only for the action editor */
if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
-
+
if (saction)
autosnap= saction->autosnap;
}
else if (t->spacetype == SPACE_IPO) {
SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
-
+
if (sipo)
autosnap= sipo->autosnap;
}
else if (t->spacetype == SPACE_NLA) {
SpaceNla *snla= (SpaceNla *)t->sa->spacedata.first;
-
+
if (snla)
autosnap= snla->autosnap;
}
else {
// TRANSFORM_FIX_ME This needs to use proper defines for t->modifiers
// // FIXME: this still toggles the modes...
-// if (ctrl)
+// if (ctrl)
// autosnap= SACTSNAP_STEP;
// else if (shift)
// autosnap= SACTSNAP_FRAME;
@@ -4317,41 +4315,41 @@ static short getAnimEdit_SnapMode(TransInfo *t)
// else
autosnap= SACTSNAP_OFF;
}
-
+
return autosnap;
}
/* This function is used for testing if an Animation Editor is displaying
* its data in frames or seconds (and the data needing to be edited as such).
- * Returns 1 if in seconds, 0 if in frames
+ * Returns 1 if in seconds, 0 if in frames
*/
static short getAnimEdit_DrawTime(TransInfo *t)
{
short drawtime;
-
+
/* currently, some of these are only for the action editor */
if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
-
+
drawtime = (saction->flag & SACTION_DRAWTIME)? 1 : 0;
}
else if (t->spacetype == SPACE_NLA) {
SpaceNla *snla= (SpaceNla *)t->sa->spacedata.first;
-
+
drawtime = (snla->flag & SNLA_DRAWTIME)? 1 : 0;
}
else {
drawtime = 0;
}
-
+
return drawtime;
-}
+}
-/* This function is used by Animation Editor specific transform functions to do
+/* This function is used by Animation Editor specific transform functions to do
* the Snap Keyframe to Nearest Frame/Marker
*/
-static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, Object *ob, short autosnap)
+static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, AnimData *adt, short autosnap)
{
/* snap key to nearest frame? */
if (autosnap == SACTSNAP_FRAME) {
@@ -4359,42 +4357,42 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, Object *ob, short
const short doTime= getAnimEdit_DrawTime(t);
const double secf= FPS;
double val;
-
+
/* convert frame to nla-action time (if needed) */
- if (ob)
- val= get_action_frame_inv(ob, *(td->val));
+ if (adt)
+ val= BKE_nla_tweakedit_remap(adt, *(td->val), NLATIME_CONVERT_MAP);
else
val= *(td->val);
-
+
/* do the snapping to nearest frame/second */
if (doTime)
val= (float)( floor((val/secf) + 0.5f) * secf );
else
val= (float)( floor(val+0.5f) );
-
+
/* convert frame out of nla-action time */
- if (ob)
- *(td->val)= get_action_frame(ob, val);
+ if (adt)
+ *(td->val)= BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP);
else
*(td->val)= val;
}
/* snap key to nearest marker? */
else if (autosnap == SACTSNAP_MARKER) {
float val;
-
+
/* convert frame to nla-action time (if needed) */
- if (ob)
- val= get_action_frame_inv(ob, *(td->val));
+ if (adt)
+ val= BKE_nla_tweakedit_remap(adt, *(td->val), NLATIME_CONVERT_MAP);
else
val= *(td->val);
-
+
/* snap to nearest marker */
// TODO: need some more careful checks for where data comes from
val= (float)ED_markers_find_nearest_marker_time(&t->scene->markers, val);
-
+
/* convert frame out of nla-action time */
- if (ob)
- *(td->val)= get_action_frame(ob, val);
+ if (adt)
+ *(td->val)= BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP);
else
*(td->val)= val;
}
@@ -4402,27 +4400,27 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, Object *ob, short
/* ----------------- Translation ----------------------- */
-void initTimeTranslate(TransInfo *t)
+void initTimeTranslate(TransInfo *t)
{
t->mode = TFM_TIME_TRANSLATE;
t->transform = TimeTranslate;
-
+
initMouseInputMode(t, &t->mouse, INPUT_NONE);
/* num-input has max of (n-1) */
t->idx_max = 0;
t->num.flag = 0;
t->num.idx_max = t->idx_max;
-
+
/* initialise snap like for everything else */
- t->snap[0] = 0.0f;
+ t->snap[0] = 0.0f;
t->snap[1] = t->snap[2] = 1.0f;
}
-static void headerTimeTranslate(TransInfo *t, char *str)
+static void headerTimeTranslate(TransInfo *t, char *str)
{
char tvec[60];
-
+
/* if numeric input is active, use results from that, otherwise apply snapping to result */
if (hasNumInput(&t->num)) {
outputNumInput(&(t->num), tvec);
@@ -4433,7 +4431,7 @@ static void headerTimeTranslate(TransInfo *t, char *str)
const short doTime = getAnimEdit_DrawTime(t);
const double secf= FPS;
float val = t->values[0];
-
+
/* apply snapping + frame->seconds conversions */
if (autosnap == SACTSNAP_STEP) {
if (doTime)
@@ -4445,85 +4443,86 @@ static void headerTimeTranslate(TransInfo *t, char *str)
if (doTime)
val= val / secf;
}
-
+
sprintf(&tvec[0], "%.4f", val);
}
-
+
sprintf(str, "DeltaX: %s", &tvec[0]);
}
-static void applyTimeTranslate(TransInfo *t, float sval)
+static void applyTimeTranslate(TransInfo *t, float sval)
{
TransData *td = t->data;
Scene *scene = t->scene;
int i;
-
+
const short doTime= getAnimEdit_DrawTime(t);
const double secf= FPS;
-
+
const short autosnap= getAnimEdit_SnapMode(t);
-
+
float deltax, val;
-
+
/* it doesn't matter whether we apply to t->data or t->data2d, but t->data2d is more convenient */
for (i = 0 ; i < t->total; i++, td++) {
- /* it is assumed that td->ob is a pointer to the object,
- * whose active action is where this keyframe comes from
+ /* it is assumed that td->extra is a pointer to the AnimData,
+ * whose active action is where this keyframe comes from
+ * (this is only valid when not in NLA)
*/
- Object *ob= td->ob;
-
- /* check if any need to apply nla-scaling */
- if (ob) {
+ AnimData *adt= (t->spacetype != SPACE_NLA) ? td->extra : NULL;
+
+ /* check if any need to apply nla-mapping */
+ if (adt) {
deltax = t->values[0];
-
+
if (autosnap == SACTSNAP_STEP) {
- if (doTime)
+ if (doTime)
deltax= (float)( floor((deltax/secf) + 0.5f) * secf );
else
deltax= (float)( floor(deltax + 0.5f) );
}
-
- val = get_action_frame_inv(ob, td->ival);
+
+ val = BKE_nla_tweakedit_remap(adt, td->ival, NLATIME_CONVERT_MAP);
val += deltax;
- *(td->val) = get_action_frame(ob, val);
+ *(td->val) = BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP);
}
else {
deltax = val = t->values[0];
-
+
if (autosnap == SACTSNAP_STEP) {
if (doTime)
val= (float)( floor((deltax/secf) + 0.5f) * secf );
else
val= (float)( floor(val + 0.5f) );
}
-
+
*(td->val) = td->ival + val;
}
-
+
/* apply nearest snapping */
- doAnimEdit_SnapFrame(t, td, ob, autosnap);
+ doAnimEdit_SnapFrame(t, td, adt, autosnap);
}
}
-int TimeTranslate(TransInfo *t, short mval[2])
+int TimeTranslate(TransInfo *t, short mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
char str[200];
-
+
/* calculate translation amount from mouse movement - in 'time-grid space' */
UI_view2d_region_to_view(v2d, mval[0], mval[0], &cval[0], &cval[1]);
UI_view2d_region_to_view(v2d, t->imval[0], t->imval[0], &sval[0], &sval[1]);
-
+
/* we only need to calculate effect for time (applyTimeTranslate only needs that) */
t->values[0] = cval[0] - sval[0];
-
+
/* handle numeric-input stuff */
t->vec[0] = t->values[0];
applyNumInput(&t->num, &t->vec[0]);
t->values[0] = t->vec[0];
headerTimeTranslate(t, str);
-
+
applyTimeTranslate(t, sval[0]);
recalcData(t);
@@ -4535,36 +4534,36 @@ int TimeTranslate(TransInfo *t, short mval[2])
/* ----------------- Time Slide ----------------------- */
-void initTimeSlide(TransInfo *t)
+void initTimeSlide(TransInfo *t)
{
/* this tool is only really available in the Action Editor... */
if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
-
+
/* set flag for drawing stuff */
saction->flag |= SACTION_MOVING;
}
-
+
t->mode = TFM_TIME_SLIDE;
t->transform = TimeSlide;
t->flag |= T_FREE_CUSTOMDATA;
-
+
initMouseInputMode(t, &t->mouse, INPUT_NONE);
/* num-input has max of (n-1) */
t->idx_max = 0;
t->num.flag = 0;
t->num.idx_max = t->idx_max;
-
+
/* initialise snap like for everything else */
- t->snap[0] = 0.0f;
+ t->snap[0] = 0.0f;
t->snap[1] = t->snap[2] = 1.0f;
}
-static void headerTimeSlide(TransInfo *t, float sval, char *str)
+static void headerTimeSlide(TransInfo *t, float sval, char *str)
{
char tvec[60];
-
+
if (hasNumInput(&t->num)) {
outputNumInput(&(t->num), tvec);
}
@@ -4573,49 +4572,50 @@ static void headerTimeSlide(TransInfo *t, float sval, char *str)
float maxx= *((float *)(t->customData) + 1);
float cval= t->values[0];
float val;
-
+
val= 2.0f*(cval-sval) / (maxx-minx);
CLAMP(val, -1.0f, 1.0f);
-
+
sprintf(&tvec[0], "%.4f", val);
}
-
+
sprintf(str, "TimeSlide: %s", &tvec[0]);
}
-static void applyTimeSlide(TransInfo *t, float sval)
+static void applyTimeSlide(TransInfo *t, float sval)
{
TransData *td = t->data;
int i;
-
+
float minx= *((float *)(t->customData));
float maxx= *((float *)(t->customData) + 1);
-
+
/* set value for drawing black line */
if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
float cvalf = t->values[0];
-
+
saction->timeslide= cvalf;
}
-
+
/* it doesn't matter whether we apply to t->data or t->data2d, but t->data2d is more convenient */
for (i = 0 ; i < t->total; i++, td++) {
- /* it is assumed that td->ob is a pointer to the object,
- * whose active action is where this keyframe comes from
+ /* it is assumed that td->extra is a pointer to the AnimData,
+ * whose active action is where this keyframe comes from
+ * (this is only valid when not in NLA)
*/
- Object *ob= td->ob;
+ AnimData *adt= (t->spacetype != SPACE_NLA) ? td->extra : NULL;
float cval = t->values[0];
-
- /* apply scaling to necessary values */
- if (ob)
- cval= get_action_frame(ob, cval);
-
+
+ /* apply NLA-mapping to necessary values */
+ if (adt)
+ cval= BKE_nla_tweakedit_remap(adt, cval, NLATIME_CONVERT_UNMAP);
+
/* only apply to data if in range */
if ((sval > minx) && (sval < maxx)) {
float cvalc= CLAMPIS(cval, minx, maxx);
float timefac;
-
+
/* left half? */
if (td->ival < sval) {
timefac= (sval - td->ival) / (sval - minx);
@@ -4629,26 +4629,26 @@ static void applyTimeSlide(TransInfo *t, float sval)
}
}
-int TimeSlide(TransInfo *t, short mval[2])
+int TimeSlide(TransInfo *t, short mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
float minx= *((float *)(t->customData));
float maxx= *((float *)(t->customData) + 1);
char str[200];
-
+
/* calculate mouse co-ordinates */
UI_view2d_region_to_view(v2d, mval[0], mval[0], &cval[0], &cval[1]);
UI_view2d_region_to_view(v2d, t->imval[0], t->imval[0], &sval[0], &sval[1]);
-
+
/* t->values[0] stores cval[0], which is the current mouse-pointer location (in frames) */
t->values[0] = cval[0];
-
+
/* handle numeric-input stuff */
t->vec[0] = 2.0f*(cval[0]-sval[0]) / (maxx-minx);
applyNumInput(&t->num, &t->vec[0]);
t->values[0] = (maxx-minx) * t->vec[0] / 2.0 + sval[0];
-
+
headerTimeSlide(t, sval[0], str);
applyTimeSlide(t, sval[0]);
@@ -4661,35 +4661,35 @@ int TimeSlide(TransInfo *t, short mval[2])
/* ----------------- Scaling ----------------------- */
-void initTimeScale(TransInfo *t)
+void initTimeScale(TransInfo *t)
{
t->mode = TFM_TIME_SCALE;
t->transform = TimeScale;
-
+
initMouseInputMode(t, &t->mouse, INPUT_NONE);
t->helpline = HLP_SPRING; /* set manually because we don't use a predefined input */
t->flag |= T_NULL_ONE;
t->num.flag |= NUM_NULL_ONE;
-
+
/* num-input has max of (n-1) */
t->idx_max = 0;
t->num.flag = 0;
t->num.idx_max = t->idx_max;
-
+
/* initialise snap like for everything else */
- t->snap[0] = 0.0f;
+ t->snap[0] = 0.0f;
t->snap[1] = t->snap[2] = 1.0f;
}
static void headerTimeScale(TransInfo *t, char *str) {
char tvec[60];
-
+
if (hasNumInput(&t->num))
outputNumInput(&(t->num), tvec);
else
sprintf(&tvec[0], "%.4f", t->values[0]);
-
+
sprintf(str, "ScaleX: %s", &tvec[0]);
}
@@ -4697,74 +4697,63 @@ static void applyTimeScale(TransInfo *t) {
Scene *scene = t->scene;
TransData *td = t->data;
int i;
-
+
const short autosnap= getAnimEdit_SnapMode(t);
const short doTime= getAnimEdit_DrawTime(t);
const double secf= FPS;
-
-
+
+
for (i = 0 ; i < t->total; i++, td++) {
- /* it is assumed that td->ob is a pointer to the object,
- * whose active action is where this keyframe comes from
+ /* it is assumed that td->extra is a pointer to the AnimData,
+ * whose active action is where this keyframe comes from
+ * (this is only valid when not in NLA)
*/
- Object *ob= td->ob;
+ AnimData *adt= (t->spacetype != SPACE_NLA) ? td->extra : NULL;
float startx= CFRA;
float fac= t->values[0];
-
+
if (autosnap == SACTSNAP_STEP) {
if (doTime)
fac= (float)( floor(fac/secf + 0.5f) * secf );
else
fac= (float)( floor(fac + 0.5f) );
}
-
- /* check if any need to apply nla-scaling */
- if (ob)
- startx= get_action_frame(ob, startx);
-
+
+ /* check if any need to apply nla-mapping */
+ if (adt)
+ startx= BKE_nla_tweakedit_remap(adt, startx, NLATIME_CONVERT_UNMAP);
+
/* now, calculate the new value */
*(td->val) = td->ival - startx;
*(td->val) *= fac;
*(td->val) += startx;
-
+
/* apply nearest snapping */
- doAnimEdit_SnapFrame(t, td, ob, autosnap);
+ doAnimEdit_SnapFrame(t, td, adt, autosnap);
}
}
-int TimeScale(TransInfo *t, short mval[2])
+int TimeScale(TransInfo *t, short mval[2])
{
float cval, sval;
float deltax, startx;
float width= 0.0f;
char str[200];
-
+
sval= t->imval[0];
cval= mval[0];
-
- // XXX ewww... we need a better factor!
-#if 0 // TRANSFORM_FIX_ME
- switch (t->spacetype) {
- case SPACE_ACTION:
- width= ACTWIDTH;
- break;
- case SPACE_NLA:
- width= NLAWIDTH;
- break;
- }
-#endif
-
+
/* calculate scaling factor */
startx= sval-(width/2+(t->ar->winx)/2);
deltax= cval-(width/2+(t->ar->winx)/2);
t->values[0] = deltax / startx;
-
+
/* handle numeric-input stuff */
t->vec[0] = t->values[0];
applyNumInput(&t->num, &t->vec[0]);
t->values[0] = t->vec[0];
headerTimeScale(t, str);
-
+
applyTimeScale(t);
recalcData(t);
@@ -4803,7 +4792,7 @@ void NDofTransform()
maxval = val;
}
}
-
+
switch(axis)
{
case -1:
@@ -4824,7 +4813,7 @@ void NDofTransform()
default:
printf("ndof: what we are doing here ?");
}
-
+
if (mode != 0)
{
initTransform(mode, CTX_NDOF);
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index ee767fada58..db78632e76a 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -30,7 +30,7 @@
#ifndef TRANSFORM_H
#define TRANSFORM_H
-#include "BIF_transform.h"
+#include "ED_transform.h"
/* ************************** Types ***************************** */
@@ -71,7 +71,7 @@ typedef struct NumInput {
/*
The ctrl value has different meaning:
0 : No value has been typed
-
+
otherwise, |value| - 1 is where the cursor is located after the period
Positive : number is positive
Negative : number is negative
@@ -100,7 +100,7 @@ typedef struct TransCon {
float mtx[3][3]; /* Matrix of the Constraint space */
float imtx[3][3]; /* Inverse Matrix of the Constraint space */
float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with some axis == 0) */
- float center[3]; /* transformation center to define where to draw the view widget
+ float center[3]; /* transformation center to define where to draw the view widget
ALWAYS in global space. Unlike the transformation center */
short imval[2]; /* initial mouse value for visual calculation */
/* the one in TransInfo is not garanty to stay the same (Rotates change it) */
@@ -138,7 +138,7 @@ typedef struct TransDataExtension {
float iquat[4]; /* Initial rotation quaternion */
float *size; /* Size of the data to transform (Faculative) */
float isize[3]; /* Initial size */
- float obmat[4][4]; /* Object matrix */
+ float obmat[4][4]; /* Object matrix */
} TransDataExtension;
typedef struct TransData2D {
@@ -158,9 +158,26 @@ typedef struct TransDataSeq {
int flag; /* a copy of seq->flag that may be modified for nested strips */
short start_offset; /* use this so we can have transform data at the strips start, but apply correctly to the start frame */
short sel_flag; /* one of SELECT, SEQ_LEFTSEL and SEQ_RIGHTSEL */
-
+
} TransDataSeq;
+/* for NLA transform (stored in td->extra pointer) */
+typedef struct TransDataNla {
+ ID *id; /* ID-block NLA-data is attached to */
+
+ struct NlaTrack *oldTrack; /* Original NLA-Track that the strip belongs to */
+ struct NlaTrack *nlt; /* Current NLA-Track that the strip belongs to */
+
+ struct NlaStrip *strip; /* NLA-strip this data represents */
+
+ /* dummy values for transform to write in - must have 3 elements... */
+ float h1[3]; /* start handle */
+ float h2[3]; /* end handle */
+
+ int trackIndex; /* index of track that strip is currently in */
+ int handle; /* handle-index: 0 for dummy entry, -1 for start, 1 for end, 2 for both ends */
+} TransDataNla;
+
typedef struct TransData {
float dist; /* Distance needed to affect element (for Proportionnal Editing) */
float rdist; /* Distance to the nearest element (for Proportionnal Editing) */
@@ -185,9 +202,9 @@ typedef struct TransData {
typedef struct MouseInput {
void (*apply)(struct TransInfo *, struct MouseInput *, short [2], float [3]);
-
+
short imval[2]; /* initial mouse position */
- char precision;
+ char precision;
short precision_mval[2]; /* mouse position when precision key was pressed */
int center[2];
float factor;
@@ -224,7 +241,7 @@ typedef struct TransInfo {
short idx_max; /* maximum index on the input vector */
float snap[3]; /* Snapping Gears */
char frame_side; /* Mouse side of the cfra, 'L', 'R' or 'B' */
-
+
float viewmat[4][4]; /* copy from G.vd, prevents feedback, */
float viewinv[4][4]; /* and to make sure we don't have to */
float persmat[4][4]; /* access G.vd from other space types */
@@ -233,16 +250,16 @@ typedef struct TransInfo {
short around;
char spacetype; /* spacetype where transforming is */
char helpline; /* helpline modes (not to be confused with hotline) */
-
+
float vec[3]; /* translation, to show for widget */
float mat[3][3]; /* rot/rescale, to show for widget */
-
+
char *undostr; /* if set, uses this string for undo */
float spacemtx[3][3]; /* orientation matrix of the current space */
char spacename[32]; /* name of the current space */
-
+
struct Object *poseobj; /* if t->flag & T_POSE, this denotes pose object */
-
+
void *customData; /* Per Transform custom data */
/*************** NEW STUFF *********************/
@@ -257,6 +274,7 @@ typedef struct TransInfo {
struct ScrArea *sa;
struct ARegion *ar;
struct Scene *scene;
+ struct ToolSettings *settings;
struct wmTimer *animtimer;
short mval[2]; /* current mouse position */
struct Object *obedit;
@@ -287,7 +305,7 @@ typedef struct TransInfo {
#define T_POSE (1 << 2)
#define T_TEXTURE (1 << 3)
#define T_CAMERA (1 << 4)
- // trans on points, having no rotation/scale
+ // trans on points, having no rotation/scale
#define T_POINTS (1 << 6)
// for manipulator exceptions, like scaling using center point, drawing help lines
#define T_USES_MANIPULATOR (1 << 7)
@@ -303,7 +321,7 @@ typedef struct TransInfo {
#define T_V3D_ALIGN (1 << 14)
/* for 2d views like uv or ipo */
-#define T_2D_EDIT (1 << 15)
+#define T_2D_EDIT (1 << 15)
#define T_CLIP_UV (1 << 16)
#define T_FREE_CUSTOMDATA (1 << 17)
@@ -480,8 +498,7 @@ void flushTransNodes(TransInfo *t);
void flushTransSeq(TransInfo *t);
/*********************** exported from transform_manipulator.c ********** */
-void draw_manipulator_ext(struct ScrArea *sa, int type, char axis, int col, float vec[3], float mat[][3]);
-int calc_manipulator_stats(struct ScrArea *sa);
+int calc_manipulator_stats(const struct bContext *C);
float get_drawsize(struct ARegion *ar, float *co);
/*********************** TransData Creation and General Handling *********** */
@@ -492,8 +509,9 @@ void special_aftertrans_update(TransInfo *t);
void transform_autoik_update(TransInfo *t, short mode);
+int count_set_pose_transflags(int *out_mode, short around, struct Object *ob);
+
/* auto-keying stuff used by special_aftertrans_update */
-short autokeyframe_cfra_can_key(struct Scene *scene, struct Object *ob);
void autokeyframe_ob_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode);
void autokeyframe_pose_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode, short targetless_ik);
@@ -592,8 +610,6 @@ void calculatePropRatio(TransInfo *t);
void getViewVector(TransInfo *t, float coord[3], float vec[3]);
-TransInfo * BIF_GetTransInfo(void);
-
/*********************** NumInput ********************************/
void initNumInput(NumInput *n);
@@ -630,7 +646,7 @@ int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3])
int addMatrixSpace(struct bContext *C, float mat[3][3], char name[]);
int addObjectSpace(struct bContext *C, struct Object *ob);
-void applyTransformOrientation(struct bContext *C, TransInfo *t);
+void applyTransformOrientation(const struct bContext *C, TransInfo *t);
#define ORIENTATION_NONE 0
@@ -639,7 +655,7 @@ void applyTransformOrientation(struct bContext *C, TransInfo *t);
#define ORIENTATION_EDGE 3
#define ORIENTATION_FACE 4
-int getTransformOrientation(struct bContext *C, float normal[3], float plane[3], int activeOnly);
+int getTransformOrientation(const struct bContext *C, float normal[3], float plane[3], int activeOnly);
int createSpaceNormal(float mat[3][3], float normal[3]);
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]);
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 7f47bfd25af..158ea98c090 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -183,7 +183,7 @@ static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) {
VECCOPY(vec, t->auto_values);
constraintAutoValues(t, vec);
}
-
+
if (t->con.mode & CON_AXIS0) {
pvec[i++] = vec[0];
}
@@ -199,10 +199,10 @@ static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) {
static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3]) {
float norm[3], vec[3], factor;
-
+
if(in[0]==0.0f && in[1]==0.0f && in[2]==0.0f)
return;
-
+
/* For when view is parallel to constraint... will cause NaNs otherwise
So we take vertical motion in 3D space and apply it to the
constraint axis. Nice for camera grab + MMB */
@@ -212,30 +212,30 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
/* since camera distance is quite relative, use quadratic relationship. holding shift can compensate */
if(factor<0.0f) factor*= -factor;
else factor*= factor;
-
+
VECCOPY(out, axis);
Normalize(out);
VecMulf(out, -factor); /* -factor makes move down going backwards */
}
else {
float cb[3], ab[3];
-
+
VECCOPY(out, axis);
-
+
/* Get view vector on axis to define a plane */
VecAddf(vec, t->con.center, in);
getViewVector(t, vec, norm);
-
+
Crossf(vec, norm, axis);
-
+
/* Project input vector on the plane passing on axis */
Projf(vec, in, vec);
VecSubf(vec, in, vec);
-
+
/* intersect the two lines: axis and norm */
Crossf(cb, vec, norm);
Crossf(ab, axis, norm);
-
+
VecMulf(out, Inpf(cb, ab) / Inpf(ab, ab));
}
}
@@ -262,7 +262,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) {
/*
* Generic callback for constant spacial constraints applied to linear motion
- *
+ *
* The IN vector in projected into the constrained space and then further
* projected along the view vector.
* (in perspective mode, the view vector is relative to the position on screen)
@@ -274,7 +274,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
VECCOPY(out, in);
if (!td && t->con.mode & CON_APPLY) {
Mat3MulVecfl(t->con.pmtx, out);
-
+
// With snap, a projection is alright, no need to correct for view alignment
if ((t->tsnap.status & SNAP_ON) == 0) {
if (getConstraintSpaceDimension(t) == 2) {
@@ -284,7 +284,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
}
else if (getConstraintSpaceDimension(t) == 1) {
float c[3];
-
+
if (t->con.mode & CON_AXIS0) {
VECCOPY(c, t->con.mtx[0]);
}
@@ -303,7 +303,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
/*
* Generic callback for object based spacial constraints applied to linear motion
- *
+ *
* At first, the following is applied to the first data in the array
* The IN vector in projected into the constrained space and then further
* projected along the view vector.
@@ -360,7 +360,7 @@ static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], f
/*
* Generic callback for constant spacial constraints applied to resize motion
- *
+ *
*
*/
@@ -386,7 +386,7 @@ static void applyAxisConstraintSize(TransInfo *t, TransData *td, float smat[3][3
/*
* Callback for object based spacial constraints applied to resize motion
- *
+ *
*
*/
@@ -415,7 +415,7 @@ static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3]
/*
* Generic callback for constant spacial constraints applied to rotations
- *
+ *
* The rotation axis is copied into VEC.
*
* In the case of single axis constraints, the rotation axis is directly the one constrained to.
@@ -457,7 +457,7 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], fl
/*
* Callback for object based spacial constraints applied to rotations
- *
+ *
* The rotation axis is copied into VEC.
*
* In the case of single axis constraints, the rotation axis is directly the one constrained to.
@@ -473,7 +473,7 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3],
{
if (t->con.mode & CON_APPLY) {
int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2);
-
+
/* on setup call, use first object */
if (td == NULL) {
td= t->data;
@@ -585,128 +585,6 @@ void setUserConstraint(TransInfo *t, int mode, const char ftext[]) {
t->con.mode |= CON_USER;
}
-/*--------------------- EXTERNAL SETUP CALLS ------------------*/
-
-void BIF_setLocalLockConstraint(char axis, char *text) {
- TransInfo *t = BIF_GetTransInfo();
-
- if (t->total == 0) {
- return;
- }
-
- switch (axis) {
- case 'x':
- setLocalConstraint(t, (CON_AXIS1|CON_AXIS2), text);
- break;
- case 'y':
- setLocalConstraint(t, (CON_AXIS0|CON_AXIS2), text);
- break;
- case 'z':
- setLocalConstraint(t, (CON_AXIS0|CON_AXIS1), text);
- break;
- }
-}
-
-void BIF_setLocalAxisConstraint(char axis, char *text) {
- TransInfo *t = BIF_GetTransInfo();
-
- if (t->total == 0) {
- return;
- }
-
- switch (axis) {
- case 'X':
- setLocalConstraint(t, CON_AXIS0, text);
- break;
- case 'Y':
- setLocalConstraint(t, CON_AXIS1, text);
- break;
- case 'Z':
- setLocalConstraint(t, CON_AXIS2, text);
- break;
- }
-}
-
-/* text is optional, for header print */
-void BIF_setSingleAxisConstraint(float vec[3], char *text) {
- TransInfo *t = BIF_GetTransInfo();
- float space[3][3], v[3];
-
- if (t->total == 0) {
- return;
- }
-
- VECCOPY(space[0], vec);
-
- v[0] = vec[2];
- v[1] = vec[0];
- v[2] = vec[1];
-
- Crossf(space[1], vec, v);
- Crossf(space[2], vec, space[1]);
- Mat3Ortho(space);
-
- Mat3CpyMat3(t->con.mtx, space);
- t->con.mode = CON_AXIS0;
-
- getConstraintMatrix(t);
-
- startConstraint(t);
-
- /* start copying with an offset of 1, to reserve a spot for the SPACE char */
- if(text)
- {
- strncpy(t->con.text+1, text, 48); /* 50 in struct */
- }
- else
- {
- t->con.text[1] = '\0'; /* No text */
- }
-
- t->con.drawExtra = NULL;
- t->con.applyVec = applyAxisConstraintVec;
- t->con.applySize = applyAxisConstraintSize;
- t->con.applyRot = applyAxisConstraintRot;
- t->redraw = 1;
-}
-
-void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text) {
- TransInfo *t = BIF_GetTransInfo();
- float space[3][3];
-
- if (t->total == 0) {
- return;
- }
-
- VECCOPY(space[0], vec1);
- VECCOPY(space[1], vec2);
- Crossf(space[2], space[0], space[1]);
- Mat3Ortho(space);
-
- Mat3CpyMat3(t->con.mtx, space);
- t->con.mode = CON_AXIS0|CON_AXIS1;
-
- getConstraintMatrix(t);
-
- startConstraint(t);
-
- /* start copying with an offset of 1, to reserve a spot for the SPACE char */
- if(text)
- {
- strncpy(t->con.text+1, text, 48); /* 50 in struct */
- }
- else
- {
- t->con.text[1] = '\0'; /* No text */
- }
-
- t->con.drawExtra = NULL;
- t->con.applyVec = applyAxisConstraintVec;
- t->con.applySize = applyAxisConstraintSize;
- t->con.applyRot = applyAxisConstraintRot;
- t->redraw = 1;
-}
-
/*----------------- DRAWING CONSTRAINTS -------------------*/
void drawConstraint(const struct bContext *C, TransInfo *t)
@@ -721,10 +599,10 @@ void drawConstraint(const struct bContext *C, TransInfo *t)
return;
if (t->flag & T_NO_CONSTRAINT)
return;
-
+
/* nasty exception for Z constraint in camera view */
// TRANSFORM_FIX_ME
-// if((t->flag & T_OBJECT) && G.vd->camera==OBACT && G.vd->persp==V3D_CAMOB)
+// if((t->flag & T_OBJECT) && G.vd->camera==OBACT && G.vd->persp==V3D_CAMOB)
// return;
if (tc->drawExtra) {
@@ -742,17 +620,17 @@ void drawConstraint(const struct bContext *C, TransInfo *t)
drawLine(t, tc->center, tc->mtx[2], 'z', 0);
glColor3ubv((GLubyte *)col2);
-
+
glDisable(GL_DEPTH_TEST);
setlinestyle(1);
- glBegin(GL_LINE_STRIP);
- glVertex3fv(tc->center);
- glVertex3fv(vec);
+ glBegin(GL_LINE_STRIP);
+ glVertex3fv(tc->center);
+ glVertex3fv(vec);
glEnd();
setlinestyle(0);
// TRANSFORM_FIX_ME
//if(G.vd->zbuf)
- glEnable(GL_DEPTH_TEST);
+ glEnable(GL_DEPTH_TEST);
}
if (tc->mode & CON_AXIS0) {
@@ -775,7 +653,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
float tmat[4][4], imat[4][4];
UI_ThemeColor(TH_GRID);
-
+
if(t->spacetype == SPACE_VIEW3D && rv3d != NULL)
{
Mat4CpyMat4(tmat, rv3d->viewmat);
@@ -804,20 +682,9 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
set_inverted_drawing(1);
drawcircball(GL_LINE_LOOP, t->center, t->prop_size, imat);
set_inverted_drawing(0);
-
- glPopMatrix();
- }
-}
-void BIF_getPropCenter(float *center)
-{
- TransInfo *t = BIF_GetTransInfo();
-
- if (t && t->flag & T_PROP_EDIT) {
- VECCOPY(center, t->center);
+ glPopMatrix();
}
- else
- center[0] = center[1] = center[2] = 0.0f;
}
static void drawObjectConstraint(TransInfo *t) {
@@ -839,7 +706,7 @@ static void drawObjectConstraint(TransInfo *t) {
if (t->con.mode & CON_AXIS2) {
drawLine(t, td->ob->obmat[3], td->axismtx[2], 'z', DRAWLIGHT);
}
-
+
td++;
for(i=1;i<t->total;i++,td++) {
@@ -954,12 +821,12 @@ static void setNearestAxis3d(TransInfo *t)
float mvec[3], axis[3], proj[3];
float len[3];
int i, icoord[2];
-
+
/* calculate mouse movement */
mvec[0] = (float)(t->mval[0] - t->con.imval[0]);
mvec[1] = (float)(t->mval[1] - t->con.imval[1]);
mvec[2] = 0.0f;
-
+
/* we need to correct axis length for the current zoomlevel of view,
this to prevent projected values to be clipped behind the camera
and to overflow the short integers.
@@ -972,12 +839,12 @@ static void setNearestAxis3d(TransInfo *t)
for (i = 0; i<3; i++) {
VECCOPY(axis, t->con.mtx[i]);
-
+
VecMulf(axis, zfac);
/* now we can project to get window coordinate */
VecAddf(axis, axis, t->con.center);
projectIntView(t, axis, icoord);
-
+
axis[0] = (float)(icoord[0] - t->center2d[0]);
axis[1] = (float)(icoord[1] - t->center2d[1]);
axis[2] = 0.0f;
@@ -1034,13 +901,13 @@ void setNearestAxis(TransInfo *t)
/* constraint setting - depends on spacetype */
if (t->spacetype == SPACE_VIEW3D) {
/* 3d-view */
- setNearestAxis3d(t);
+ setNearestAxis3d(t);
}
else {
/* assume that this means a 2D-Editor */
setNearestAxis2d(t);
}
-
+
getConstraintMatrix(t);
}
@@ -1083,7 +950,7 @@ int isLockConstraint(TransInfo *t) {
/*
* Returns the dimension of the constraint space.
- *
+ *
* For that reason, the flags always needs to be set to properly evaluate here,
* even if they aren't actually used in the callback function. (Which could happen
* for weird constraints not yet designed. Along a path for example.)
@@ -1107,7 +974,7 @@ int getConstraintSpaceDimension(TransInfo *t)
Someone willing to do it criptically could do the following instead:
return t->con & (CON_AXIS0|CON_AXIS1|CON_AXIS2);
-
+
Based on the assumptions that the axis flags are one after the other and start at 1
*/
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index c90c7bfeef4..aeccaee070e 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -90,6 +90,7 @@
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_sequence.h"
@@ -101,21 +102,17 @@
#include "BKE_report.h"
#include "BKE_tessmesh.h"
-//#include "BIF_editaction.h"
//#include "BIF_editview.h"
//#include "BIF_editlattice.h"
//#include "BIF_editconstraint.h"
//#include "BIF_editmesh.h"
-//#include "BIF_editnla.h"
//#include "BIF_editsima.h"
//#include "BIF_editparticle.h"
#include "BIF_gl.h"
-//#include "BIF_keyframing.h"
//#include "BIF_poseobject.h"
//#include "BIF_meshtools.h"
//#include "BIF_mywindow.h"
//#include "BIF_resources.h"
-#include "BIF_retopo.h"
//#include "BIF_screen.h"
//#include "BIF_space.h"
//#include "BIF_toolbox.h"
@@ -127,20 +124,16 @@
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
#include "ED_object.h"
+#include "ED_markers.h"
#include "ED_mesh.h"
+#include "ED_retopo.h"
#include "ED_types.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
#include "UI_view2d.h"
-//#include "BSE_drawipo.h"
//#include "BSE_edit.h"
-//#include "BSE_editipo.h"
-//#include "BSE_editipo_types.h"
-//#include "BSE_editaction_types.h"
-
-//#include "BDR_drawaction.h" // list of keyframes in action
//#include "BDR_editobject.h" // reset_slowparents()
//#include "BDR_gpencil.h"
@@ -225,7 +218,7 @@ void sort_trans_data_dist(TransInfo *t) {
qsort_trans_data(t, start, t->data + t->total - 1);
}
-static void sort_trans_data(TransInfo *t)
+static void sort_trans_data(TransInfo *t)
{
TransData *sel, *unsel;
TransData temp;
@@ -261,16 +254,16 @@ static void set_prop_dist(TransInfo *t, short with_dist)
int a;
for(a=0, tob= t->data; a<t->total; a++, tob++) {
-
+
tob->rdist= 0.0f; // init, it was mallocced
-
+
if((tob->flag & TD_SELECTED)==0) {
TransData *td;
int i;
float dist, vec[3];
tob->rdist = -1.0f; // signal for next loop
-
+
for (i = 0, td= t->data; i < t->total; i++, td++) {
if(td->flag & TD_SELECTED) {
VecSubf(vec, tob->center, td->center);
@@ -288,7 +281,7 @@ static void set_prop_dist(TransInfo *t, short with_dist)
if (with_dist) {
tob->dist = tob->rdist;
}
- }
+ }
}
}
@@ -303,9 +296,9 @@ static void createTransTexspace(bContext *C, TransInfo *t)
Object *ob;
ID *id;
int *texflag;
-
+
ob = OBACT;
-
+
if (ob == NULL) { // Shouldn't logically happen, but still...
t->total = 0;
return;
@@ -320,20 +313,20 @@ static void createTransTexspace(bContext *C, TransInfo *t)
t->total = 1;
td= t->data= MEM_callocN(sizeof(TransData), "TransTexspace");
td->ext= t->ext= MEM_callocN(sizeof(TransDataExtension), "TransTexspace");
-
+
td->flag= TD_SELECTED;
VECCOPY(td->center, ob->obmat[3]);
td->ob = ob;
-
+
Mat3CpyMat4(td->mtx, ob->obmat);
Mat3CpyMat4(td->axismtx, ob->obmat);
Mat3Ortho(td->axismtx);
Mat3Inv(td->smtx, td->mtx);
-
+
if (give_obdata_texspace(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) {
*texflag &= ~AUTOSPACE;
}
-
+
VECCOPY(td->iloc, td->loc);
VECCOPY(td->ext->irot, td->ext->rot);
VECCOPY(td->ext->isize, td->ext->size);
@@ -380,7 +373,7 @@ static void createTransEdge(bContext *C, TransInfo *t) {
td->loc= NULL;
if (eed->f & SELECT)
td->flag= TD_SELECTED;
- else
+ else
td->flag= 0;
@@ -409,14 +402,14 @@ static void createTransEdge(bContext *C, TransInfo *t) {
static bKinematicConstraint *has_targetless_ik(bPoseChannel *pchan)
{
bConstraint *con= pchan->constraints.first;
-
+
for(;con; con= con->next) {
if(con->type==CONSTRAINT_TYPE_KINEMATIC && (con->enforce!=0.0)) {
bKinematicConstraint *data= con->data;
-
- if(data->tar==NULL)
+
+ if(data->tar==NULL)
return data;
- if(data->tar->type==OB_ARMATURE && data->subtarget[0]==0)
+ if(data->tar->type==OB_ARMATURE && data->subtarget[0]==0)
return data;
}
}
@@ -428,67 +421,67 @@ static short apply_targetless_ik(Object *ob)
bPoseChannel *pchan, *parchan, *chanlist[256];
bKinematicConstraint *data;
int segcount, apply= 0;
-
+
/* now we got a difficult situation... we have to find the
- target-less IK pchans, and apply transformation to the all
+ target-less IK pchans, and apply transformation to the all
pchans that were in the chain */
-
+
for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) {
data= has_targetless_ik(pchan);
if(data && (data->flag & CONSTRAINT_IK_AUTO)) {
-
+
/* fill the array with the bones of the chain (armature.c does same, keep it synced) */
segcount= 0;
-
+
/* exclude tip from chain? */
if(!(data->flag & CONSTRAINT_IK_TIP))
parchan= pchan->parent;
else
parchan= pchan;
-
+
/* Find the chain's root & count the segments needed */
for (; parchan; parchan=parchan->parent){
chanlist[segcount]= parchan;
segcount++;
-
+
if(segcount==data->rootbone || segcount>255) break; // 255 is weak
}
for(;segcount;segcount--) {
Bone *bone;
float rmat[4][4], tmat[4][4], imat[4][4];
-
+
/* pose_mat(b) = pose_mat(b-1) * offs_bone * channel * constraint * IK */
/* we put in channel the entire result of rmat= (channel * constraint * IK) */
/* pose_mat(b) = pose_mat(b-1) * offs_bone * rmat */
/* rmat = pose_mat(b) * inv( pose_mat(b-1) * offs_bone ) */
-
+
parchan= chanlist[segcount-1];
bone= parchan->bone;
bone->flag |= BONE_TRANSFORM; /* ensures it gets an auto key inserted */
-
+
if(parchan->parent) {
Bone *parbone= parchan->parent->bone;
float offs_bone[4][4];
-
+
/* offs_bone = yoffs(b-1) + root(b) + bonemat(b) */
Mat4CpyMat3(offs_bone, bone->bone_mat);
-
+
/* The bone's root offset (is in the parent's coordinate system) */
VECCOPY(offs_bone[3], bone->head);
-
+
/* Get the length translation of parent (length along y axis) */
offs_bone[3][1]+= parbone->length;
-
+
/* pose_mat(b-1) * offs_bone */
if(parchan->bone->flag & BONE_HINGE) {
/* the rotation of the parent restposition */
Mat4CpyMat4(rmat, parbone->arm_mat); /* rmat used as temp */
-
+
/* the location of actual parent transform */
VECCOPY(rmat[3], offs_bone[3]);
offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f;
Mat4MulVecfl(parchan->parent->pose_mat, rmat[3]);
-
+
Mat4MulMat4(tmat, offs_bone, rmat);
}
else if(parchan->bone->flag & BONE_NO_SCALE) {
@@ -497,7 +490,7 @@ static short apply_targetless_ik(Object *ob)
}
else
Mat4MulMat4(tmat, offs_bone, parchan->parent->pose_mat);
-
+
Mat4Invert(imat, tmat);
}
else {
@@ -508,16 +501,16 @@ static short apply_targetless_ik(Object *ob)
}
/* result matrix */
Mat4MulMat4(rmat, parchan->pose_mat, imat);
-
+
/* apply and decompose, doesn't work for constraints or non-uniform scale well */
{
float rmat3[3][3], qmat[3][3], imat[3][3], smat[3][3];
-
+
Mat3CpyMat4(rmat3, rmat);
-
+
/* 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) {
@@ -526,19 +519,19 @@ static short apply_targetless_ik(Object *ob)
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]); */
}
-
+
}
-
+
apply= 1;
data->flag &= ~CONSTRAINT_IK_AUTO;
}
- }
-
+ }
+
return apply;
}
@@ -551,7 +544,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
VECCOPY(vec, pchan->pose_mat[3]);
VECCOPY(td->center, vec);
-
+
td->ob = ob;
td->flag = TD_SELECTED;
if (pchan->rotmode == PCHAN_ROT_QUAT)
@@ -562,43 +555,43 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
{
td->flag |= TD_NOCENTER;
}
-
+
if (bone->flag & BONE_TRANSFORM_CHILD)
{
td->flag |= TD_NOCENTER;
td->flag |= TD_NO_LOC;
}
-
+
td->protectflag= pchan->protectflag;
-
+
td->loc = pchan->loc;
VECCOPY(td->iloc, pchan->loc);
-
+
td->ext->size= pchan->size;
VECCOPY(td->ext->isize, pchan->size);
-
+
if (pchan->rotmode) {
td->ext->rot= pchan->eul;
td->ext->quat= NULL;
-
+
VECCOPY(td->ext->irot, pchan->eul);
}
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);
-
- if (pchan->parent) {
- if(pchan->bone->flag & BONE_HINGE)
- Mat3CpyMat4(pmat, pchan->parent->bone->arm_mat);
- else
+
+ if (pchan->parent) {
+ if(pchan->bone->flag & BONE_HINGE)
+ Mat3CpyMat4(pmat, pchan->parent->bone->arm_mat);
+ else
Mat3CpyMat4(pmat, pchan->parent->pose_mat);
-
+
if (constraints_list_needinv(t, &pchan->constraints)) {
Mat3CpyMat4(tmat, pchan->constinv);
Mat3Inv(cmat, tmat);
@@ -613,20 +606,20 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
Mat3Inv(cmat, tmat);
Mat3MulSerie(td->mtx, pchan->bone->bone_mat, omat, cmat, 0,0,0,0,0); // dang mulserie swaps args
}
- else
- Mat3MulMat3(td->mtx, omat, pchan->bone->bone_mat); // Mat3MulMat3 has swapped args!
+ else
+ Mat3MulMat3(td->mtx, omat, pchan->bone->bone_mat); // Mat3MulMat3 has swapped args!
}
-
+
Mat3Inv(td->smtx, td->mtx);
-
+
/* for axismat we use bone's own transform */
Mat3CpyMat4(pmat, pchan->pose_mat);
Mat3MulMat3(td->axismtx, omat, pmat);
Mat3Ortho(td->axismtx);
-
+
if (t->mode==TFM_BONESIZE) {
bArmature *arm= t->poseobj->data;
-
+
if(arm->drawtype==ARM_ENVELOPE) {
td->loc= NULL;
td->val= &bone->dist;
@@ -639,7 +632,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->val= NULL;
}
}
-
+
/* in this case we can do target-less IK grabbing */
if (t->mode==TFM_TRANSLATION) {
bKinematicConstraint *data= has_targetless_ik(pchan);
@@ -653,27 +646,27 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->loc = data->grabtarget;
VECCOPY(td->iloc, td->loc);
data->flag |= CONSTRAINT_IK_AUTO;
-
+
/* only object matrix correction */
Mat3CpyMat3 (td->mtx, omat);
Mat3Inv (td->smtx, td->mtx);
}
}
-
+
/* store reference to first constraint */
td->con= pchan->constraints.first;
}
-static void bone_children_clear_transflag(TransInfo *t, ListBase *lb)
+static void bone_children_clear_transflag(int mode, short around, ListBase *lb)
{
Bone *bone= lb->first;
-
+
for(;bone;bone= bone->next) {
if((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED))
{
bone->flag |= BONE_HINGE_CHILD_TRANSFORM;
}
- else if (bone->flag & BONE_TRANSFORM && (t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)
+ else if (bone->flag & BONE_TRANSFORM && (mode == TFM_ROTATION || mode == TFM_TRACKBALL) && around == V3D_LOCAL)
{
bone->flag |= BONE_TRANSFORM_CHILD;
}
@@ -682,69 +675,73 @@ static void bone_children_clear_transflag(TransInfo *t, ListBase *lb)
bone->flag &= ~BONE_TRANSFORM;
}
- bone_children_clear_transflag(t, &bone->childbase);
+ bone_children_clear_transflag(mode, around, &bone->childbase);
}
}
/* sets transform flags in the bones, returns total */
-static void set_pose_transflags(TransInfo *t, Object *ob)
+int count_set_pose_transflags(int *out_mode, short around, Object *ob)
{
bArmature *arm= ob->data;
bPoseChannel *pchan;
Bone *bone;
- int hastranslation;
-
- t->total= 0;
-
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- bone= pchan->bone;
+ int mode = *out_mode;
+ int hastranslation = 0;
+ int total = 0;
+
+ for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ bone = pchan->bone;
if(bone->layer & arm->layer) {
if(bone->flag & BONE_SELECTED)
bone->flag |= BONE_TRANSFORM;
else
bone->flag &= ~BONE_TRANSFORM;
-
+
bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM;
bone->flag &= ~BONE_TRANSFORM_CHILD;
}
}
-
+
/* make sure no bone can be transformed when a parent is transformed */
/* since pchans are depsgraph sorted, the parents are in beginning of list */
- if(t->mode!=TFM_BONESIZE) {
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- bone= pchan->bone;
+ if(mode != TFM_BONESIZE) {
+ for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ bone = pchan->bone;
if(bone->flag & BONE_TRANSFORM)
- bone_children_clear_transflag(t, &bone->childbase);
+ bone_children_clear_transflag(mode, around, &bone->childbase);
}
- }
+ }
/* now count, and check if we have autoIK or have to switch from translate to rotate */
- hastranslation= 0;
+ hastranslation = 0;
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- bone= pchan->bone;
+ for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ bone = pchan->bone;
if(bone->flag & BONE_TRANSFORM) {
- t->total++;
-
- if(t->mode==TFM_TRANSLATION) {
+ total++;
+
+ if(mode == TFM_TRANSLATION) {
if( has_targetless_ik(pchan)==NULL ) {
if(pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) {
if(pchan->bone->flag & BONE_HINGE_CHILD_TRANSFORM)
- hastranslation= 1;
+ hastranslation = 1;
}
else if((pchan->protectflag & OB_LOCK_LOC)!=OB_LOCK_LOC)
- hastranslation= 1;
+ hastranslation = 1;
}
else
- hastranslation= 1;
+ hastranslation = 1;
}
}
}
/* if there are no translatable bones, do rotation */
- if(t->mode==TFM_TRANSLATION && !hastranslation)
- t->mode= TFM_ROTATION;
+ if(mode == TFM_TRANSLATION && !hastranslation)
+ {
+ *out_mode = TFM_ROTATION;
+ }
+
+ return total;
}
@@ -754,16 +751,16 @@ static void set_pose_transflags(TransInfo *t, Object *ob)
static void pchan_autoik_adjust (bPoseChannel *pchan, short chainlen)
{
bConstraint *con;
-
+
/* don't bother to search if no valid constraints */
if ((pchan->constflag & (PCHAN_HAS_IK|PCHAN_HAS_TARGET))==0)
return;
-
+
/* check if pchan has ik-constraint */
for (con= pchan->constraints.first; con; con= con->next) {
if (con->type == CONSTRAINT_TYPE_KINEMATIC && (con->enforce!=0.0)) {
bKinematicConstraint *data= con->data;
-
+
/* only accept if a temporary one (for auto-ik) */
if (data->flag & CONSTRAINT_IK_TEMP) {
/* chainlen is new chainlen, but is limited by maximum chainlen */
@@ -779,9 +776,9 @@ static void pchan_autoik_adjust (bPoseChannel *pchan, short chainlen)
/* change the chain-length of auto-ik */
void transform_autoik_update (TransInfo *t, short mode)
{
- short *chainlen= &t->scene->toolsettings->autoik_chainlen;
+ short *chainlen= &t->settings->autoik_chainlen;
bPoseChannel *pchan;
-
+
/* mode determines what change to apply to chainlen */
if (mode == 1) {
/* mode=1 is from WHEELMOUSEDOWN... increases len */
@@ -791,15 +788,15 @@ void transform_autoik_update (TransInfo *t, short mode)
/* mode==-1 is from WHEELMOUSEUP... decreases len */
if (*chainlen > 0) (*chainlen)--;
}
-
+
/* sanity checks (don't assume t->poseobj is set, or that it is an armature) */
if (ELEM(NULL, t->poseobj, t->poseobj->pose))
return;
-
+
/* apply to all pose-channels */
for (pchan=t->poseobj->pose->chanbase.first; pchan; pchan=pchan->next) {
pchan_autoik_adjust(pchan, *chainlen);
- }
+ }
}
/* frees temporal IKs */
@@ -808,11 +805,11 @@ static void pose_grab_with_ik_clear(Object *ob)
bKinematicConstraint *data;
bPoseChannel *pchan;
bConstraint *con, *next;
-
+
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
/* clear all temporary lock flags */
pchan->ikflag &= ~(BONE_IK_NO_XDOF_TEMP|BONE_IK_NO_YDOF_TEMP|BONE_IK_NO_ZDOF_TEMP);
-
+
pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_TARGET);
/* remove all temporary IK-constraints added */
for (con= pchan->constraints.first; con; con= next) {
@@ -839,11 +836,11 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
bKinematicConstraint *data;
bConstraint *con;
bConstraint *targetless = 0;
-
+
/* Sanity check */
- if (pchan == NULL)
+ if (pchan == NULL)
return 0;
-
+
/* Rule: not if there's already an IK on this channel */
for (con= pchan->constraints.first; con; con= con->next) {
if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
@@ -860,7 +857,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
return 0;
}
}
-
+
con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC);
BLI_addtail(&pchan->constraints, con);
pchan->constflag |= (PCHAN_HAS_IK|PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */
@@ -873,22 +870,22 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
data->flag |= CONSTRAINT_IK_TEMP|CONSTRAINT_IK_AUTO;
VECCOPY(data->grabtarget, pchan->pose_tail);
data->rootbone= 1;
-
+
/* we include only a connected chain */
while ((pchan) && (pchan->bone->flag & BONE_CONNECTED)) {
/* here, we set ik-settings for bone from pchan->protectflag */
if (pchan->protectflag & OB_LOCK_ROTX) pchan->ikflag |= BONE_IK_NO_XDOF_TEMP;
if (pchan->protectflag & OB_LOCK_ROTY) pchan->ikflag |= BONE_IK_NO_YDOF_TEMP;
if (pchan->protectflag & OB_LOCK_ROTZ) pchan->ikflag |= BONE_IK_NO_ZDOF_TEMP;
-
+
/* now we count this pchan as being included */
data->rootbone++;
pchan= pchan->parent;
}
-
+
/* make a copy of maximum chain-length */
data->max_rootbone= data->rootbone;
-
+
return 1;
}
@@ -910,7 +907,7 @@ static short pose_grab_with_ik_children(bPose *pose, Bone *bone)
if (pchan)
added+= pose_grab_with_ik_add(pchan);
}
-
+
return added;
}
@@ -921,12 +918,12 @@ static short pose_grab_with_ik(Object *ob)
bPoseChannel *pchan, *parent;
Bone *bonec;
short tot_ik= 0;
-
+
if ((ob==NULL) || (ob->pose==NULL) || (ob->flag & OB_POSEMODE)==0)
return 0;
-
+
arm = ob->data;
-
+
/* Rule: allow multiple Bones (but they must be selected, and only one ik-solver per chain should get added) */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if (pchan->bone->layer & arm->layer) {
@@ -939,7 +936,7 @@ static short pose_grab_with_ik(Object *ob)
}
if ((pchan->bone->flag & BONE_CONNECTED)==0 && (bonec == NULL))
continue;
-
+
/* rule: if selected Bone is not a root bone, it gets a temporal IK */
if (pchan->parent) {
/* only adds if there's no IK yet (and no parent bone was selected) */
@@ -957,9 +954,9 @@ static short pose_grab_with_ik(Object *ob)
}
}
}
-
+
return (tot_ik) ? 1 : 0;
-}
+}
/* only called with pose mode active object now */
@@ -971,13 +968,13 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
TransDataExtension *tdx;
short ik_on= 0;
int i;
-
+
t->total= 0;
-
+
/* check validity of state */
arm= get_armature(ob);
if ((arm==NULL) || (ob->pose==NULL)) return;
-
+
if (arm->flag & ARM_RESTPOS) {
if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE)==0) {
// XXX use transform operator reports
@@ -991,15 +988,15 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
ik_on= pose_grab_with_ik(ob);
if (ik_on) t->flag |= T_AUTOIK;
}
-
+
/* set flags and count total (warning, can change transform to rotate) */
- set_pose_transflags(t, ob);
-
- if(t->total==0) return;
+ t->total = count_set_pose_transflags(&t->mode, t->around, ob);
+
+ if(t->total == 0) return;
t->flag |= T_POSE;
t->poseobj= ob; /* we also allow non-active objects to be transformed, in weightpaint */
-
+
/* init trans data */
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransPoseBone");
tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt");
@@ -1007,8 +1004,8 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
td->ext= tdx;
td->tdi = NULL;
td->val = NULL;
- }
-
+ }
+
/* use pose channels to fill trans data */
td= t->data;
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
@@ -1017,12 +1014,12 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
td++;
}
}
-
+
if(td != (t->data+t->total)) {
// XXX use transform operator reports
// BKE_report(op->reports, RPT_DEBUG, "Bone selection count error.");
}
-
+
/* initialise initial auto=ik chainlen's? */
if (ik_on) transform_autoik_update(t, 0);
}
@@ -1063,16 +1060,16 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
}
if (!t->total) return;
-
+
Mat3CpyMat4(mtx, t->obedit->obmat);
Mat3Inv(smtx, mtx);
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransEditBone");
-
+
for (ebo = edbo->first; ebo; ebo = ebo->next)
{
ebo->oldlength = ebo->length; // length==0.0 on extrude, used for scaling radius of bone points
-
+
if(ebo->layer & arm->layer) {
if (t->mode==TFM_BONE_ENVELOPE)
{
@@ -1080,17 +1077,17 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
{
td->val= &ebo->rad_head;
td->ival= *td->val;
-
+
VECCOPY (td->center, ebo->head);
td->flag= TD_SELECTED;
-
+
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
-
+
td->loc = NULL;
td->ext = NULL;
td->tdi = NULL;
-
+
td++;
}
if (ebo->flag & BONE_TIPSEL)
@@ -1099,17 +1096,17 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->ival= *td->val;
VECCOPY (td->center, ebo->tail);
td->flag= TD_SELECTED;
-
+
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
-
+
td->loc = NULL;
td->ext = NULL;
td->tdi = NULL;
-
+
td++;
}
-
+
}
else if (t->mode==TFM_BONESIZE)
{
@@ -1129,19 +1126,19 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
}
VECCOPY (td->center, ebo->head);
td->flag= TD_SELECTED;
-
+
/* use local bone matrix */
- VecSubf(delta, ebo->tail, ebo->head);
+ VecSubf(delta, ebo->tail, ebo->head);
vec_roll_to_mat3(delta, ebo->roll, bonemat);
Mat3MulMat3(td->mtx, mtx, bonemat);
Mat3Inv(td->smtx, td->mtx);
-
+
Mat3CpyMat3(td->axismtx, td->mtx);
Mat3Ortho(td->axismtx);
td->ext = NULL;
td->tdi = NULL;
-
+
td++;
}
}
@@ -1152,13 +1149,13 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
td->loc= NULL;
td->val= &(ebo->roll);
td->ival= ebo->roll;
-
+
VECCOPY (td->center, ebo->head);
td->flag= TD_SELECTED;
td->ext = NULL;
td->tdi = NULL;
-
+
td++;
}
}
@@ -1176,7 +1173,7 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
- VecSubf(delta, ebo->tail, ebo->head);
+ VecSubf(delta, ebo->tail, ebo->head);
vec_roll_to_mat3(delta, ebo->roll, td->axismtx);
if ((ebo->flag & BONE_ROOTSEL) == 0)
@@ -1202,7 +1199,7 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
- VecSubf(delta, ebo->tail, ebo->head);
+ VecSubf(delta, ebo->tail, ebo->head);
vec_roll_to_mat3(delta, ebo->roll, td->axismtx);
td->extra = ebo; /* to fix roll */
@@ -1239,16 +1236,16 @@ static void createTransMBallVerts(bContext *C, TransInfo *t)
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
-
- if(propmode) t->total = count;
+
+ if(propmode) t->total = count;
else t->total = countsel;
-
+
td = t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(MBall EditMode)");
tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "MetaElement_TransExtension");
Mat3CpyMat4(mtx, t->obedit->obmat);
Mat3Inv(smtx, mtx);
-
+
for(ml= editelems.first; ml; ml= ml->next) {
if(propmode || (ml->flag & SELECT)) {
td->loc= &ml->x;
@@ -1366,7 +1363,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
/* 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 & 7)==CU_BEZIER) {
@@ -1395,14 +1392,14 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
}
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
-
- if(propmode) t->total = count;
+
+ if(propmode) t->total = count;
else t->total = countsel;
t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(Curve EditMode)");
Mat3CpyMat4(mtx, t->obedit->obmat);
Mat3Inv(smtx, mtx);
-
+
td = t->data;
for(nu= cu->editnurb->first; nu; nu= nu->next) {
if((nu->type & 7)==CU_BEZIER) {
@@ -1411,7 +1408,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
if(bezt->hide==0) {
TransDataCurveHandleFlags *hdata = NULL;
-
+
if( propmode ||
((bezt->f2 & SELECT) && (G.f & G_HIDDENHANDLES)) ||
((bezt->f1 & SELECT) && (G.f & G_HIDDENHANDLES)==0)
@@ -1429,7 +1426,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
td->ext = NULL;
td->tdi = NULL;
td->val = NULL;
-
+
hdata = initTransDataCurveHandes(td, bezt);
Mat3CpyMat3(td->smtx, smtx);
@@ -1439,7 +1436,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
count++;
tail++;
}
-
+
/* This is the Curve Point, the other two are handles */
if(propmode || (bezt->f2 & SELECT)) {
VECCOPY(td->iloc, bezt->vec[1]);
@@ -1449,7 +1446,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
else td->flag= 0;
td->ext = NULL;
td->tdi = NULL;
-
+
if (t->mode==TFM_CURVE_SHRINKFATTEN) { /* || t->mode==TFM_RESIZE) {*/ /* TODO - make points scale */
td->val = &(bezt->radius);
td->ival = bezt->radius;
@@ -1462,13 +1459,13 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
-
+
if ((bezt->f1&SELECT)==0 && (bezt->f3&SELECT)==0)
/* If the middle is selected but the sides arnt, this is needed */
if (hdata==NULL) { /* if the handle was not saved by the previous handle */
hdata = initTransDataCurveHandes(td, bezt);
}
-
+
td++;
count++;
tail++;
@@ -1494,7 +1491,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
if (hdata==NULL) { /* if the handle was not saved by the previous handle */
hdata = initTransDataCurveHandes(td, bezt);
}
-
+
Mat3CpyMat3(td->smtx, smtx);
Mat3CpyMat3(td->mtx, mtx);
@@ -1510,7 +1507,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
}
if (propmode && head != tail)
calc_distanceCurveVerts(head, tail-1);
-
+
/* TODO - in the case of tilt and radius we can also avoid allocating the initTransDataCurveHandes
* but for now just dont change handle types */
if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0)
@@ -1529,7 +1526,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
else td->flag= 0;
td->ext = NULL;
td->tdi = NULL;
-
+
if (t->mode==TFM_CURVE_SHRINKFATTEN || t->mode==TFM_RESIZE) {
td->val = &(bp->radius);
td->ival = bp->radius;
@@ -1578,14 +1575,14 @@ static void createTransLatticeVerts(bContext *C, TransInfo *t)
}
bp++;
}
-
+
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
-
- if(propmode) t->total = count;
+
+ if(propmode) t->total = count;
else t->total = countsel;
t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(Lattice EditMode)");
-
+
Mat3CpyMat4(mtx, t->obedit->obmat);
Mat3Inv(smtx, mtx);
@@ -1633,7 +1630,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
int count = 0, hasselected = 0;
int propmode = t->flag & T_PROP_EDIT;
- if(psys==NULL || t->scene->selectmode==SCE_SELECT_PATH) return;
+ if(psys==NULL || t->settings->particle.selectmode==SCE_SELECT_PATH) return;
psmd = psys_get_modifier(ob,psys);
@@ -1663,10 +1660,10 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
pa->flag |= PARS_TRANSFORM;
}
}
-
+
/* note: in prop mode we need at least 1 selected */
if (hasselected==0) return;
-
+
t->total = count;
td = t->data = MEM_callocN(t->total * sizeof(TransData), "TransObData(Particle Mode)");
@@ -1804,13 +1801,13 @@ static void editmesh_set_connectivity_distance(EditMesh *em, int total, float *v
/* Floodfill routine */
/*
- At worst this is n*n of complexity where n is number of edges
+ At worst this is n*n of complexity where n is number of edges
Best case would be n if the list is ordered perfectly.
Estimate is n log n in average (so not too bad)
*/
while(done) {
done= 0;
-
+
for(eed= em->edges.first; eed; eed= eed->next) {
if(eed->h==0) {
EditVert *v1= eed->v1, *v2= eed->v2;
@@ -1905,7 +1902,7 @@ static void editmesh_set_connectivity_distance(EditMesh *em, int total, float *v
VECMUL(cent, 1.0f / (float)efa->len);
}
-
+
if (cent[0] == 0.0f && cent[1] == 0.0f && cent[2] == 0.0f) cent[2] = 1.0f;
VECCOPY(centout, cent);
}
@@ -1919,7 +1916,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, BMesh *em, BMVert *eve
// td->loc = key->co;
//else
td->loc = eve->co;
-
+
VECCOPY(td->center, td->loc);
if(t->around==V3D_LOCAL && (em->selectmode & SCE_SELECT_FACE))
get_face_center(td->center, em, eve);
@@ -1949,7 +1946,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, BMesh *em, BMVert *eve
static void make_vertexcos__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
{
float *vec = userData;
-
+
vec+= 3*index;
VECCOPY(vec, co);
}
@@ -1958,14 +1955,14 @@ static int modifiers_disable_subsurf_temporary(Object *ob)
{
ModifierData *md;
int disabled = 0;
-
+
for(md=ob->modifiers.first; md; md=md->next)
if(md->type==eModifierType_Subsurf)
if(md->mode & eModifierMode_OnCage) {
md->mode ^= eModifierMode_DisableTemporary;
disabled= 1;
}
-
+
return disabled;
}
@@ -1987,12 +1984,12 @@ static float *get_crazy_mapped_editverts(TransInfo *t)
vertexcos= MEM_mallocN(3*sizeof(float)*me->edit_btmesh->bm->totvert, "vertexcos map");
dm->foreachMappedVert(dm, make_vertexcos__mapFunc, vertexcos);
-
+
dm->release(dm);
-
+
/* set back the flag, no new cage needs to be built, transform does it */
modifiers_disable_subsurf_temporary(t->obedit);
-
+
return vertexcos;
}
@@ -2001,15 +1998,15 @@ static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3,
{
float vecu[3], vecv[3];
float q1[4], q2[4];
-
+
TAN_MAKE_VEC(vecu, v1, v2);
TAN_MAKE_VEC(vecv, v1, v3);
triatoquat(v1, vecu, vecv, q1);
-
+
TAN_MAKE_VEC(vecu, def1, def2);
TAN_MAKE_VEC(vecv, def1, def3);
triatoquat(def1, vecu, vecv, q2);
-
+
QuatSub(quat, q2, q1);
}
#undef TAN_MAKE_VEC
@@ -2021,16 +2018,16 @@ static void set_crazyspace_quats(BMEditMesh *em, float *origcos, float *mappedco
BMFace *efa;
float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4;
intptr_t index= 0;
-
+
/* two abused locations in vertices */
for(eve= em->verts.first; eve; eve= eve->next, index++) {
eve->tmp.p = NULL;
eve->prev= (BMVert *)index;
}
-
+
/* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
for(efa= em->faces.first; efa; efa= efa->next) {
-
+
/* retrieve mapped coordinates */
v1= mappedcos + 3*(intptr_t)(efa->v1->prev);
v2= mappedcos + 3*(intptr_t)(efa->v2->prev);
@@ -2045,7 +2042,7 @@ static void set_crazyspace_quats(BMEditMesh *em, float *origcos, float *mappedco
efa->v2->tmp.p= (void*)quats;
quats+= 4;
}
-
+
if(efa->v4) {
v4= mappedcos + 3*(intptr_t)(efa->v4->prev);
co4= (origcos)? origcos + 3*(intptr_t)(efa->v4->prev): efa->v4->co;
@@ -2113,7 +2110,7 @@ void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) {
static void createTransEditVerts(bContext *C, TransInfo *t)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
TransData *tob = NULL;
BMEditMesh *em = ((Mesh *)t->obedit->data)->edit_btmesh;
BMesh *bm = em->bm;
@@ -2133,16 +2130,15 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
// transform now requires awareness for select mode, so we tag the f1 flags in verts
- if(scene->selectmode & SCE_SELECT_VERTEX) {
- eve = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BMIter_Step(&iter)) {
+ if(ts->selectmode & SCE_SELECT_VERTEX) {
+ BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
if(!BM_TestHFlag(eve, BM_HIDDEN) && BM_TestHFlag(eve, BM_SELECT))
BMINDEX_SET(eve, SELECT);
else
BMINDEX_SET(eve, 0);
}
}
- else if(scene->selectmode & SCE_SELECT_EDGE) {
+ else if(ts->selectmode & SCE_SELECT_EDGE) {
BMEdge *eed;
eve = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);
@@ -2172,7 +2168,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
}
-
+
/* now we can count */
eve = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);
for( ; eve; eve=BMIter_Step(&iter)) {
@@ -2181,10 +2177,10 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
if(propmode) count++;
}
}
-
+
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
-
+
/* check active */
if (em->selected.last) {
BMEditSelection *ese = em->selected.last;
@@ -2193,22 +2189,22 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
-
+
if(propmode) {
- t->total = count;
-
+ t->total = count;
+
/* allocating scratch arrays */
vectors = (float *)MEM_mallocN(t->total * 3 * sizeof(float), "scratch vectors");
nears = (BMVert**)MEM_mallocN(t->total * sizeof(BMVert*), "scratch nears");
}
else t->total = countsel;
tob= t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(Mesh EditMode)");
-
+
Mat3CpyMat4(mtx, t->obedit->obmat);
Mat3Inv(smtx, mtx);
//BMESH_TODO if(propmode) editmesh_set_connectivity_distance(em, t->total, vectors, nears);
-
+
/* detect CrazySpace [tm] */
if(propmode==0) {
if(modifiers_getCageIndex(t->obedit, NULL)>=0) {
@@ -2233,7 +2229,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
}
-
+
/* find out which half we do */
if(mirror) {
eve = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);
@@ -2245,19 +2241,19 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
}
-
+
eve = BMIter_New(&iter, bm, BM_VERTS_OF_MESH, NULL);
for(a=0; eve; eve=BMIter_Step(&iter), a++) {
if(!BM_TestHFlag(eve, BM_HIDDEN)) {
if(propmode || BMINDEX_GET(eve)) {
VertsToTransData(t, tob, bm, eve);
-
+
/* selected */
if(BMINDEX_GET(eve)) tob->flag |= TD_SELECTED;
-
+
/* active */
if(eve == eve_act) tob->flag |= TD_ACTIVE;
-
+
if(propmode) {
/*BMESH_TODO
this has to do with edge connectivity
@@ -2273,11 +2269,11 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
tob->dist = MAXFLOAT;
//}
}
-
+
/* CrazySpace */
if(defmats) { // || (quats && eve->tmp.p)) {
float mat[3][3], imat[3][3], qmat[3][3];
-
+
/* use both or either quat and defmat correction */
//BMESH_TODO, need to restore this quats thing
/*if(quats && eve->tmp.f) {
@@ -2293,7 +2289,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
Mat3MulMat3(mat, mtx, defmats[a]);
Mat3Inv(imat, mat);
-
+
Mat3CpyMat3(tob->smtx, imat);
Mat3CpyMat3(tob->mtx, mat);
}
@@ -2301,7 +2297,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
Mat3CpyMat3(tob->smtx, smtx);
Mat3CpyMat3(tob->mtx, mtx);
}
-
+
/* Mirror? */
//BMESH_TODO
@@ -2311,7 +2307,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
//}
tob++;
}
- }
+ }
}
if (propmode) {
MEM_freeN(vectors);
@@ -2329,7 +2325,7 @@ void flushTransNodes(TransInfo *t)
{
int a;
TransData2D *td;
-
+
/* flush to 2d vector from internally used 3d vector */
for(a=0, td= t->data2d; a<t->total; a++, td++) {
td->loc2d[0]= td->loc[0];
@@ -2347,7 +2343,7 @@ void flushTransSeq(TransInfo *t)
TransDataSeq *tdsq= NULL;
Sequence *seq;
-
+
/* prevent updating the same seq twice
* if the transdata order is changed this will mess up
@@ -2365,7 +2361,7 @@ void flushTransSeq(TransInfo *t)
case SELECT:
if (seq->type != SEQ_META && seq_tx_test(seq)) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
-
+
if (seq->depth==0) {
seq->machine= (int)(td2d->loc[1] + 0.5f);
CLAMP(seq->machine, 1, MAXSEQ);
@@ -2389,7 +2385,7 @@ void flushTransSeq(TransInfo *t)
* children are ALWAYS transformed first
* so we dont need to do this in another loop. */
calc_sequence(seq);
-
+
/* test overlap, displayes red outline */
seq->flag &= ~SEQ_OVERLAP;
if( seq_test_overlap(seqbasep, seq) ) {
@@ -2467,7 +2463,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
EditMesh *em = ((Mesh *)t->obedit->data)->edit_mesh;
EditFace *efa;
-
+
if(!ED_uvedit_test(t->obedit)) return;
/* count */
@@ -2476,10 +2472,10 @@ static void createTransUVs(bContext *C, TransInfo *t)
if(uvedit_face_visible(scene, ima, efa, tf)) {
efa->tmp.p = tf;
-
- if (uvedit_uv_selected(scene, efa, tf, 0)) countsel++;
- if (uvedit_uv_selected(scene, efa, tf, 1)) countsel++;
- if (uvedit_uv_selected(scene, efa, tf, 2)) countsel++;
+
+ if (uvedit_uv_selected(scene, efa, tf, 0)) countsel++;
+ if (uvedit_uv_selected(scene, efa, tf, 1)) countsel++;
+ if (uvedit_uv_selected(scene, efa, tf, 2)) countsel++;
if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) countsel++;
if(propmode)
count += (efa->v4)? 4: 3;
@@ -2487,10 +2483,10 @@ static void createTransUVs(bContext *C, TransInfo *t)
efa->tmp.p = NULL;
}
}
-
+
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
-
+
t->total= (propmode)? count: countsel;
t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(UV Editing)");
/* for each 2d uv coord a 3d vector is allocated, so that they can be
@@ -2502,7 +2498,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
td= t->data;
td2d= t->data2d;
-
+
for (efa= em->faces.first; efa; efa= efa->next) {
if ((tf=(MTFace *)efa->tmp.p)) {
if (propmode) {
@@ -2519,7 +2515,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
}
}
}
-
+
if (sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_begin(t->scene, t->obedit);
#endif
@@ -2541,7 +2537,7 @@ void flushTransUVs(TransInfo *t)
for(a=0, td= t->data2d; a<t->total; a++, td++) {
td->loc2d[0]= td->loc[0]*invx;
td->loc2d[1]= td->loc[1]*invy;
-
+
if((sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) {
td->loc2d[0]= (float)floor(width*td->loc2d[0] + 0.5f)/width;
td->loc2d[1]= (float)floor(height*td->loc2d[1] + 0.5f)/height;
@@ -2592,40 +2588,251 @@ int clipUVTransform(TransInfo *t, float *vec, int resize)
vec[1] -= max[1]-aspy;
else
clipy= 0;
- }
+ }
return (clipx || clipy);
}
-/* ********************* ACTION/NLA EDITOR ****************** */
+/* ********************* ANIMATION EDITORS (GENERAL) ************************* */
+
+/* This function tests if a point is on the "mouse" side of the cursor/frame-marking */
+static short FrameOnMouseSide(char side, float frame, float cframe)
+{
+ /* both sides, so it doesn't matter */
+ if (side == 'B') return 1;
+
+ /* only on the named side */
+ if (side == 'R')
+ return (frame >= cframe) ? 1 : 0;
+ else
+ return (frame <= cframe) ? 1 : 0;
+}
+
+/* ********************* NLA EDITOR ************************* */
+
+static void createTransNlaData(bContext *C, TransInfo *t)
+{
+ Scene *scene= CTX_data_scene(C);
+ TransData *td = NULL;
+ TransDataNla *tdn = NULL;
+
+ bAnimContext ac;
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ int count=0;
+ char side;
+
+ /* determine what type of data we are operating on */
+ if (ANIM_animdata_get_context(C, &ac) == 0)
+ return;
+
+ /* filter data */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS | ANIMFILTER_FOREDIT);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* which side of the current frame should be allowed */
+ if (t->mode == TFM_TIME_EXTEND) {
+ /* only side on which mouse is gets transformed */
+ float xmouse, ymouse;
+
+ UI_view2d_region_to_view(&ac.ar->v2d, t->imval[0], t->imval[1], &xmouse, &ymouse);
+ side = (xmouse > CFRA) ? 'R' : 'L'; // XXX use t->frame_side
+ }
+ else {
+ /* normal transform - both sides of current frame are considered */
+ side = 'B';
+ }
+
+ /* loop 1: count how many strips are selected (consider each strip as 2 points) */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* make some meta-strips for chains of selected strips */
+ BKE_nlastrips_make_metas(&nlt->strips, 1);
+
+ /* only consider selected strips */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ // TODO: we can make strips have handles later on...
+ /* transition strips can't get directly transformed */
+ if (strip->type != NLASTRIP_TYPE_TRANSITION) {
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ if (FrameOnMouseSide(side, strip->start, (float)CFRA)) count++;
+ if (FrameOnMouseSide(side, strip->end, (float)CFRA)) count++;
+ }
+ }
+ }
+ }
+
+ /* stop if trying to build list if nothing selected */
+ if (count == 0) {
+ /* cleanup temp list */
+ BLI_freelistN(&anim_data);
+ return;
+ }
+
+ /* allocate memory for data */
+ t->total= count;
+
+ t->data= MEM_callocN(t->total*sizeof(TransData), "TransData(NLA Editor)");
+ td= t->data;
+ t->customData= MEM_callocN(t->total*sizeof(TransDataNla), "TransDataNla (NLA Editor)");
+ tdn= t->customData;
+
+ /* loop 2: build transdata array */
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* only if a real NLA-track */
+ if (ale->type == ANIMTYPE_NLATRACK) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+ NlaStrip *strip;
+
+ /* only consider selected strips */
+ for (strip= nlt->strips.first; strip; strip= strip->next) {
+ // TODO: we can make strips have handles later on...
+ /* transition strips can't get directly transformed */
+ if (strip->type != NLASTRIP_TYPE_TRANSITION) {
+ if (strip->flag & NLASTRIP_FLAG_SELECT) {
+ /* our transform data is constructed as follows:
+ * - only the handles on the right side of the current-frame get included
+ * - td structs are transform-elements operated on by the transform system
+ * and represent a single handle. The storage/pointer used (val or loc) depends on
+ * whether we're scaling or transforming. Ultimately though, the handles
+ * the td writes to will simply be a dummy in tdn
+ * - for each strip being transformed, a single tdn struct is used, so in some
+ * cases, there will need to be 1 of these tdn elements in the array skipped...
+ */
+ float center[3], yval;
+
+ /* firstly, init tdn settings */
+ tdn->id= ale->id;
+ tdn->oldTrack= tdn->nlt= nlt;
+ tdn->strip= strip;
+ tdn->trackIndex= BLI_findindex(&nlt->strips, strip);
+
+ yval= (float)(tdn->trackIndex * NLACHANNEL_STEP);
+
+ tdn->h1[0]= strip->start;
+ tdn->h1[1]= yval;
+ tdn->h2[0]= strip->end;
+ tdn->h2[1]= yval;
+
+ center[0]= (float)CFRA;
+ center[1]= yval;
+ center[2]= 0.0f;
+
+ /* set td's based on which handles are applicable */
+ if (FrameOnMouseSide(side, strip->start, (float)CFRA))
+ {
+ /* just set tdn to assume that it only has one handle for now */
+ tdn->handle= -1;
+
+ /* now, link the transform data up to this data */
+ if (t->mode == TFM_TRANSLATION) {
+ td->loc= tdn->h1;
+ VECCOPY(td->iloc, tdn->h1);
+
+ /* store all the other gunk that is required by transform */
+ VECCOPY(td->center, center);
+ memset(td->axismtx, 0, sizeof(td->axismtx));
+ td->axismtx[2][2] = 1.0f;
+
+ td->ext= NULL; td->tdi= NULL; td->val= NULL;
+
+ td->flag |= TD_SELECTED;
+ td->dist= 0.0f;
+
+ Mat3One(td->mtx);
+ Mat3One(td->smtx);
+ }
+ else {
+ td->val= &tdn->h1[0];
+ td->ival= tdn->h1[0];
+ }
+
+ td->extra= tdn;
+ td++;
+ }
+ if (FrameOnMouseSide(side, strip->end, (float)CFRA))
+ {
+ /* if tdn is already holding the start handle, then we're doing both, otherwise, only end */
+ tdn->handle= (tdn->handle) ? 2 : 1;
+
+ /* now, link the transform data up to this data */
+ if (t->mode == TFM_TRANSLATION) {
+ td->loc= tdn->h2;
+ VECCOPY(td->iloc, tdn->h2);
+
+ /* store all the other gunk that is required by transform */
+ VECCOPY(td->center, center);
+ memset(td->axismtx, 0, sizeof(td->axismtx));
+ td->axismtx[2][2] = 1.0f;
+
+ td->ext= NULL; td->tdi= NULL; td->val= NULL;
+
+ td->flag |= TD_SELECTED;
+ td->dist= 0.0f;
+
+ Mat3One(td->mtx);
+ Mat3One(td->smtx);
+ }
+ else {
+ td->val= &tdn->h2[0];
+ td->ival= tdn->h2[0];
+ }
+
+ td->extra= tdn;
+ td++;
+ }
+
+ /* if both handles were used, skip the next tdn (i.e. leave it blank) since the counting code is dumb...
+ * otherwise, just advance to the next one...
+ */
+ if (tdn->handle == 2)
+ tdn += 2;
+ else
+ tdn++;
+ }
+ }
+ }
+ }
+ }
+
+ /* cleanup temp list */
+ BLI_freelistN(&anim_data);
+}
+
+/* ********************* ACTION EDITOR ****************** */
/* Called by special_aftertrans_update to make sure selected gp-frames replace
* any other gp-frames which may reside on that frame (that are not selected).
* It also makes sure gp-frames are still stored in chronological order after
* transform.
*/
+#if 0
static void posttrans_gpd_clean (bGPdata *gpd)
{
bGPDlayer *gpl;
-
+
for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
ListBase sel_buffer = {NULL, NULL};
bGPDframe *gpf, *gpfn;
bGPDframe *gfs, *gfsn;
-
- /* loop 1: loop through and isolate selected gp-frames to buffer
+
+ /* loop 1: loop through and isolate selected gp-frames to buffer
* (these need to be sorted as they are isolated)
*/
for (gpf= gpl->frames.first; gpf; gpf= gpfn) {
short added= 0;
gpfn= gpf->next;
-
+
if (gpf->flag & GP_FRAME_SELECT) {
BLI_remlink(&gpl->frames, gpf);
-
+
/* find place to add them in buffer
* - go backwards as most frames will still be in order,
- * so doing it this way will be faster
+ * so doing it this way will be faster
*/
for (gfs= sel_buffer.last; gfs; gfs= gfs->prev) {
/* if current (gpf) occurs after this one in buffer, add! */
@@ -2639,27 +2846,27 @@ static void posttrans_gpd_clean (bGPdata *gpd)
BLI_addhead(&sel_buffer, gpf);
}
}
-
+
/* error checking: it is unlikely, but may be possible to have none selected */
if (sel_buffer.first == NULL)
continue;
-
+
/* if all were selected (i.e. gpl->frames is empty), then just transfer sel-buf over */
if (gpl->frames.first == NULL) {
gpl->frames.first= sel_buffer.first;
gpl->frames.last= sel_buffer.last;
-
+
continue;
}
-
+
/* loop 2: remove duplicates of frames in buffers */
for (gpf= gpl->frames.first; gpf && sel_buffer.first; gpf= gpfn) {
gpfn= gpf->next;
-
+
/* loop through sel_buffer, emptying stuff from front of buffer if ok */
for (gfs= sel_buffer.first; gfs && gpf; gfs= gfsn) {
gfsn= gfs->next;
-
+
/* if this buffer frame needs to go before current, add it! */
if (gfs->framenum < gpf->framenum) {
/* transfer buffer frame to frames list (before current) */
@@ -2671,23 +2878,24 @@ static void posttrans_gpd_clean (bGPdata *gpd)
/* transfer buffer frame to frames list (before current) */
BLI_remlink(&sel_buffer, gfs);
BLI_insertlinkbefore(&gpl->frames, gpf, gfs);
-
+
/* get rid of current frame */
// TRANSFORM_FIX_ME
//gpencil_layer_delframe(gpl, gpf);
}
}
}
-
+
/* if anything is still in buffer, append to end */
for (gfs= sel_buffer.first; gfs; gfs= gfsn) {
gfsn= gfs->next;
-
+
BLI_remlink(&sel_buffer, gfs);
BLI_addtail(&gpl->frames, gfs);
}
}
}
+#endif
/* Called during special_aftertrans_update to make sure selected keyframes replace
* any other keyframes which may reside on that frame (that is not selected).
@@ -2696,36 +2904,36 @@ static void posttrans_fcurve_clean (FCurve *fcu)
{
float *selcache; /* cache for frame numbers of selected frames (icu->totvert*sizeof(float)) */
int len, index, i; /* number of frames in cache, item index */
-
+
/* allocate memory for the cache */
// TODO: investigate using GHash for this instead?
- if (fcu->totvert == 0)
+ if (fcu->totvert == 0)
return;
selcache= MEM_callocN(sizeof(float)*fcu->totvert, "FCurveSelFrameNums");
len= 0;
index= 0;
-
- /* We do 2 loops, 1 for marking keyframes for deletion, one for deleting
- * as there is no guarantee what order the keyframes are exactly, even though
+
+ /* We do 2 loops, 1 for marking keyframes for deletion, one for deleting
+ * as there is no guarantee what order the keyframes are exactly, even though
* they have been sorted by time.
*/
-
+
/* Loop 1: find selected keyframes */
for (i = 0; i < fcu->totvert; i++) {
BezTriple *bezt= &fcu->bezt[i];
-
+
if (BEZSELECTED(bezt)) {
selcache[index]= bezt->vec[1][0];
index++;
len++;
}
}
-
+
/* Loop 2: delete unselected keyframes on the same frames (if any keyframes were found) */
if (len) {
for (i = 0; i < fcu->totvert; i++) {
BezTriple *bezt= &fcu->bezt[i];
-
+
if (BEZSELECTED(bezt) == 0) {
/* check beztriple should be removed according to cache */
for (index= 0; index < len; index++) {
@@ -2738,97 +2946,86 @@ static void posttrans_fcurve_clean (FCurve *fcu)
}
}
}
-
+
testhandles_fcurve(fcu);
}
-
+
/* free cache */
MEM_freeN(selcache);
}
+
/* Called by special_aftertrans_update to make sure selected keyframes replace
* any other keyframes which may reside on that frame (that is not selected).
- * remake_action_ipos should have already been called
+ * remake_action_ipos should have already been called
*/
static void posttrans_action_clean (bAnimContext *ac, bAction *act)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
-
+
/* filter data */
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(ac, &anim_data, filter, act, ANIMCONT_ACTION);
-
- /* loop through relevant data, removing keyframes from the ipo-blocks that were attached
- * - all keyframes are converted in/out of global time
+
+ /* loop through relevant data, removing keyframes from the ipo-blocks that were attached
+ * - all keyframes are converted in/out of global time
*/
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(ac, ale);
-
- if (nob) {
- //ANIM_nla_mapping_apply_ipocurve(nob, ale->key_data, 0, 1);
+ AnimData *adt= ANIM_nla_mapping_get(ac, ale);
+
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
posttrans_fcurve_clean(ale->key_data);
- //ANIM_nla_mapping_apply_ipocurve(nob, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
- else
+ else
posttrans_fcurve_clean(ale->key_data);
}
-
+
/* free temp data */
BLI_freelistN(&anim_data);
}
/* ----------------------------- */
-/* This function tests if a point is on the "mouse" side of the cursor/frame-marking */
-static short FrameOnMouseSide(char side, float frame, float cframe)
-{
- /* both sides, so it doesn't matter */
- if (side == 'B') return 1;
-
- /* only on the named side */
- if (side == 'R')
- return (frame >= cframe) ? 1 : 0;
- else
- return (frame <= cframe) ? 1 : 0;
-}
-
/* fully select selected beztriples, but only include if it's on the right side of cfra */
static int count_fcurve_keys(FCurve *fcu, char side, float cfra)
{
BezTriple *bezt;
int i, count = 0;
-
+
if (ELEM(NULL, fcu, fcu->bezt))
return count;
-
+
/* only include points that occur on the right side of cfra */
for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
if (bezt->f2 & SELECT) {
/* fully select the other two keys */
bezt->f1 |= SELECT;
bezt->f3 |= SELECT;
-
+
/* increment by 3, as there are 3 points (3 * x-coordinates) that need transform */
if (FrameOnMouseSide(side, bezt->vec[1][0], cfra))
count += 3;
}
}
-
+
return count;
}
/* fully select selected beztriples, but only include if it's on the right side of cfra */
+#if 0
static int count_gplayer_frames(bGPDlayer *gpl, char side, float cfra)
{
bGPDframe *gpf;
int count = 0;
-
+
if (gpl == NULL)
return count;
-
+
/* only include points that occur on the right side of cfra */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
@@ -2836,22 +3033,22 @@ static int count_gplayer_frames(bGPDlayer *gpl, char side, float cfra)
count++;
}
}
-
+
return count;
}
+#endif
/* This function assigns the information to transdata */
-static void TimeToTransData(TransData *td, float *time, Object *ob)
+static void TimeToTransData(TransData *td, float *time, AnimData *adt)
{
/* memory is calloc'ed, so that should zero everything nicely for us */
td->val = time;
td->ival = *(time);
-
- /* store the Object where this keyframe exists as a keyframe of the
- * active action as td->ob. Usually, this member is only used for constraints
- * drawing
+
+ /* store the AnimData where this keyframe exists as a keyframe of the
+ * active action as td->extra.
*/
- td->ob= ob;
+ td->extra= adt;
}
/* This function advances the address to which td points to, so it must return
@@ -2859,34 +3056,34 @@ static void TimeToTransData(TransData *td, float *time, Object *ob)
* overwrite the existing ones... i.e. td = IcuToTransData(td, icu, ob, side, cfra);
*
* The 'side' argument is needed for the extend mode. 'B' = both sides, 'R'/'L' mean only data
- * on the named side are used.
+ * on the named side are used.
*/
-static TransData *FCurveToTransData(TransData *td, FCurve *fcu, Object *ob, char side, float cfra)
+static TransData *FCurveToTransData(TransData *td, FCurve *fcu, AnimData *adt, char side, float cfra)
{
BezTriple *bezt;
int i;
-
+
if (fcu == NULL)
return td;
-
+
for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
/* only add selected keyframes (for now, proportional edit is not enabled) */
if (BEZSELECTED(bezt)) {
/* only add if on the right 'side' of the current frame */
if (FrameOnMouseSide(side, bezt->vec[1][0], cfra)) {
/* each control point needs to be added separetely */
- TimeToTransData(td, bezt->vec[0], ob);
+ TimeToTransData(td, bezt->vec[0], adt);
td++;
-
- TimeToTransData(td, bezt->vec[1], ob);
+
+ TimeToTransData(td, bezt->vec[1], adt);
td++;
-
- TimeToTransData(td, bezt->vec[2], ob);
+
+ TimeToTransData(td, bezt->vec[2], adt);
td++;
}
- }
+ }
}
-
+
return td;
}
@@ -2901,17 +3098,17 @@ void flushTransGPactionData (TransInfo *t)
{
tGPFtransdata *tfd;
int i;
-
+
/* find the first one to start from */
if (t->mode == TFM_TIME_SLIDE)
tfd= (tGPFtransdata *)( (float *)(t->customData) + 2 );
else
tfd= (tGPFtransdata *)(t->customData);
-
+
/* flush data! */
for (i = 0; i < t->total; i++, tfd++) {
*(tfd->sdata)= (int)floor(tfd->val + 0.5);
- }
+ }
}
/* This function advances the address to which td points to, so it must return
@@ -2919,13 +3116,14 @@ void flushTransGPactionData (TransInfo *t)
* overwrite the existing ones... i.e. td = GPLayerToTransData(td, ipo, ob, side, cfra);
*
* The 'side' argument is needed for the extend mode. 'B' = both sides, 'R'/'L' mean only data
- * on the named side are used.
+ * on the named side are used.
*/
+#if 0
static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl, char side, float cfra)
{
bGPDframe *gpf;
int count= 0;
-
+
/* check for select frames on right side of current frame */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
@@ -2933,10 +3131,10 @@ static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl
/* memory is calloc'ed, so that should zero everything nicely for us */
td->val= &tfd->val;
td->ival= (float)gpf->framenum;
-
+
tfd->val= (float)gpf->framenum;
tfd->sdata= &gpf->framenum;
-
+
/* advance td now */
td++;
tfd++;
@@ -2944,9 +3142,10 @@ static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl
}
}
}
-
+
return count;
}
+#endif
static void createTransActionData(bContext *C, TransInfo *t)
{
@@ -2973,7 +3172,7 @@ static void createTransActionData(bContext *C, TransInfo *t)
else
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-
+
/* which side of the current frame should be allowed */
if (t->mode == TFM_TIME_EXTEND) {
/* only side on which mouse is gets transformed */
@@ -2989,13 +3188,13 @@ static void createTransActionData(bContext *C, TransInfo *t)
/* loop 1: fully select ipo-keys and count how many BezTriples are selected */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(&ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
/* convert current-frame to action-time (slightly less accurate, espcially under
- * higher scaling ratios, but is faster than converting all points)
+ * higher scaling ratios, but is faster than converting all points)
*/
- if (nob)
- cfra = get_action_frame(nob, (float)CFRA);
+ if (adt)
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
else
cfra = (float)CFRA;
@@ -3036,24 +3235,24 @@ static void createTransActionData(bContext *C, TransInfo *t)
//if (ale->type == ANIMTYPE_GPLAYER) {
// bGPDlayer *gpl= (bGPDlayer *)ale->data;
// int i;
- //
+ //
// i = GPLayerToTransData(td, tfd, gpl, side, cfra);
// td += i;
// tfd += i;
//}
//else {
- Object *nob= ANIM_nla_mapping_get(&ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
/* convert current-frame to action-time (slightly less accurate, espcially under
- * higher scaling ratios, but is faster than converting all points)
+ * higher scaling ratios, but is faster than converting all points)
*/
- if (nob)
- cfra = get_action_frame(nob, (float)CFRA);
+ if (adt)
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
else
cfra = (float)CFRA;
- td= FCurveToTransData(td, fcu, nob, side, cfra);
+ td= FCurveToTransData(td, fcu, adt, side, cfra);
//}
}
@@ -3068,42 +3267,40 @@ static void createTransActionData(bContext *C, TransInfo *t)
if (max < *(td->val)) max= *(td->val);
}
- /* minx/maxx values used by TimeSlide are stored as a
+ /* minx/maxx values used by TimeSlide are stored as a
* calloced 2-float array in t->customData. This gets freed
- * in postTrans (T_FREE_CUSTOMDATA).
+ * in postTrans (T_FREE_CUSTOMDATA).
*/
*((float *)(t->customData)) = min;
*((float *)(t->customData) + 1) = max;
}
-
+
/* cleanup temp list */
BLI_freelistN(&anim_data);
}
/* ********************* GRAPH EDITOR ************************* */
-
-
/* Helper function for createTransGraphEditData, which is reponsible for associating
* source data with transform data
*/
-static void bezt_to_transdata (TransData *td, TransData2D *td2d, Object *nob, float *loc, float *cent, short selected, short ishandle, short intvals)
+static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, float *loc, float *cent, short selected, short ishandle, short intvals)
{
/* New location from td gets dumped onto the old-location of td2d, which then
* gets copied to the actual data at td2d->loc2d (bezt->vec[n])
*
- * Due to NLA scaling, we apply NLA scaling to some of the verts here,
- * and then that scaling will be undone after transform is done.
+ * Due to NLA mapping, we apply NLA mapping to some of the verts here,
+ * and then that mapping will be undone after transform is done.
*/
- if (nob) {
- td2d->loc[0] = get_action_frame_inv(nob, loc[0]);
+ if (adt) {
+ td2d->loc[0] = BKE_nla_tweakedit_remap(adt, loc[0], NLATIME_CONVERT_UNMAP);
td2d->loc[1] = loc[1];
td2d->loc[2] = 0.0f;
td2d->loc2d = loc;
td->loc = td2d->loc;
- td->center[0] = get_action_frame_inv(nob, cent[0]);
+ td->center[0] = BKE_nla_tweakedit_remap(adt, cent[0], NLATIME_CONVERT_UNMAP);
td->center[1] = cent[1];
td->center[2] = 0.0f;
@@ -3119,12 +3316,15 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, Object *nob, fl
VECCOPY(td->center, cent);
VECCOPY(td->iloc, td->loc);
}
-
+
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
-
+
td->ext= NULL; td->tdi= NULL; td->val= NULL;
-
+
+ /* store AnimData info in td->extra, for applying mapping when flushing */
+ td->extra= adt;
+
if (selected) {
td->flag |= TD_SELECTED;
td->dist= 0.0f;
@@ -3132,14 +3332,14 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, Object *nob, fl
else
td->dist= MAXFLOAT;
- if (ishandle)
+ if (ishandle)
td->flag |= TD_NOTIMESNAP;
if (intvals)
td->flag |= TD_INTVALUES;
Mat3One(td->mtx);
Mat3One(td->smtx);
-}
+}
static void createTransGraphEditData(bContext *C, TransInfo *t)
{
@@ -3167,7 +3367,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
/* filter data */
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_CURVEVISIBLE);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-
+
/* which side of the current frame should be allowed */
// XXX we still want this mode, but how to get this using standard transform too?
if (t->mode == TFM_TIME_EXTEND) {
@@ -3184,14 +3384,14 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
/* loop 1: count how many BezTriples (specifically their verts) are selected (or should be edited) */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= NULL; //ANIM_nla_mapping_get(&ac, ale); // XXX we don't handle NLA mapping for now here...
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
/* convert current-frame to action-time (slightly less accurate, espcially under
- * higher scaling ratios, but is faster than converting all points)
+ * higher scaling ratios, but is faster than converting all points)
*/
- if (nob)
- cfra = get_action_frame(nob, (float)CFRA);
+ if (adt)
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
else
cfra = (float)CFRA;
@@ -3241,13 +3441,19 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
td2d= t->data2d;
/* loop 2: build transdata arrays */
- cfra = (float)CFRA;
-
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= NULL; //ANIM_nla_mapping_get(&ac, ale); // XXX we don't handle NLA mapping here yet
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
short intvals= (fcu->flag & FCURVE_INT_VALUES);
+ /* convert current-frame to action-time (slightly less accurate, espcially under
+ * higher scaling ratios, but is faster than converting all points)
+ */
+ if (adt)
+ cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
+ else
+ cfra = (float)CFRA;
+
/* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse (if applicable) */
bezt= fcu->bezt;
prevbezt= NULL;
@@ -3261,7 +3467,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) {
if (bezt->f1 & SELECT) {
hdata = initTransDataCurveHandes(td, bezt);
- bezt_to_transdata(td++, td2d++, nob, bezt->vec[0], bezt->vec[1], 1, 1, intvals);
+ bezt_to_transdata(td++, td2d++, adt, bezt->vec[0], bezt->vec[1], 1, 1, intvals);
}
else
h1= 0;
@@ -3270,7 +3476,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
if (bezt->f3 & SELECT) {
if (hdata==NULL)
hdata = initTransDataCurveHandes(td, bezt);
- bezt_to_transdata(td++, td2d++, nob, bezt->vec[2], bezt->vec[1], 1, 1, intvals);
+ bezt_to_transdata(td++, td2d++, adt, bezt->vec[2], bezt->vec[1], 1, 1, intvals);
}
else
h2= 0;
@@ -3286,12 +3492,12 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
hdata = initTransDataCurveHandes(td, bezt);
}
- bezt_to_transdata(td++, td2d++, nob, bezt->vec[1], bezt->vec[1], 1, 0, intvals);
+ bezt_to_transdata(td++, td2d++, adt, bezt->vec[1], bezt->vec[1], 1, 0, intvals);
}
- /* special hack (must be done after initTransDataCurveHandes(), as that stores handle settings to restore...):
- * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
- * then check if we're using auto-handles.
+ /* special hack (must be done after initTransDataCurveHandes(), as that stores handle settings to restore...):
+ * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
+ * then check if we're using auto-handles.
* - If so, change them auto-handles to aligned handles so that handles get affected too
*/
if ((bezt->h1 == HD_AUTO) && (bezt->h2 == HD_AUTO) && ELEM(t->mode, TFM_ROTATION, TFM_RESIZE)) {
@@ -3305,7 +3511,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
}
/* Sets handles based on the selection */
- testhandles_fcurve(fcu);
+ testhandles_fcurve(fcu);
}
/* cleanup temp list */
@@ -3350,7 +3556,7 @@ static BeztMap *bezt_to_beztmaps (BezTriple *bezts, int totvert)
bezm->pipo= (prevbezt) ? prevbezt->ipo : bezt->ipo;
bezm->cipo= bezt->ipo;
}
-
+
return bezms;
}
@@ -3383,7 +3589,7 @@ static void sort_time_beztmaps (BeztMap *bezms, int totvert)
* optimisation: this only needs to be performed in the first loop
*/
if (bezm->swapHs == 0) {
- if ( (bezm->bezt->vec[0][0] > bezm->bezt->vec[1][0]) &&
+ if ( (bezm->bezt->vec[0][0] > bezm->bezt->vec[1][0]) &&
(bezm->bezt->vec[2][0] < bezm->bezt->vec[1][0]) )
{
/* handles need to be swapped */
@@ -3396,7 +3602,7 @@ static void sort_time_beztmaps (BeztMap *bezms, int totvert)
}
bezm++;
- }
+ }
}
}
@@ -3409,7 +3615,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
int i, j;
char *adjusted;
- /* dynamically allocate an array of chars to mark whether an TransData's
+ /* dynamically allocate an array of chars to mark whether an TransData's
* pointers have been fixed already, so that we don't override ones that are
* already done
*/
@@ -3418,7 +3624,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
/* for each beztmap item, find if it is used anywhere */
bezm= bezms;
for (i= 0; i < totvert; i++, bezm++) {
- /* loop through transdata, testing if we have a hit
+ /* loop through transdata, testing if we have a hit
* for the handles (vec[0]/vec[2]), we must also check if they need to be swapped...
*/
td= t->data2d;
@@ -3463,11 +3669,11 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
MEM_freeN(adjusted);
}
-/* This function is called by recalcData during the Transform loop to recalculate
+/* This function is called by recalcData during the Transform loop to recalculate
* the handles of curves and sort the keyframes so that the curves draw correctly.
* It is only called if some keyframes have moved out of order.
*
- * anim_data is the list of channels (F-Curves) retrieved already containing the
+ * anim_data is the list of channels (F-Curves) retrieved already containing the
* channels to work on. It should not be freed here as it may still need to be used.
*/
void remake_graph_transdata (TransInfo *t, ListBase *anim_data)
@@ -3499,37 +3705,44 @@ void remake_graph_transdata (TransInfo *t, ListBase *anim_data)
}
/* this function is called on recalcData to apply the transforms applied
- * to the transdata on to the actual keyframe data
+ * to the transdata on to the actual keyframe data
*/
void flushTransGraphData(TransInfo *t)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
TransData *td;
TransData2D *td2d;
+ Scene *scene= t->scene;
+ double secf= FPS;
int a;
/* flush to 2d vector from internally used 3d vector */
for (a=0, td= t->data, td2d=t->data2d; a<t->total; a++, td++, td2d++) {
- /* handle snapping for time values
- * - we should still be in NLA-mapping timespace
+ AnimData *adt= (AnimData *)td->extra; /* pointers to relevant AnimData blocks are stored in the td->extra pointers */
+
+ /* handle snapping for time values
+ * - we should still be in NLA-mapping timespace
* - only apply to keyframes (but never to handles)
*/
if ((td->flag & TD_NOTIMESNAP)==0) {
switch (sipo->autosnap) {
- case SACTSNAP_FRAME: /* snap to nearest frame */
- td2d->loc[0]= (float)( floor(td2d->loc[0]+0.5f) );
+ case SACTSNAP_FRAME: /* snap to nearest frame (or second if drawing seconds) */
+ if (sipo->flag & SIPO_DRAWTIME)
+ td2d->loc[0]= (float)( floor((td2d->loc[0]/secf) + 0.5f) * secf );
+ else
+ td2d->loc[0]= (float)( floor(td2d->loc[0]+0.5f) );
break;
-
+
case SACTSNAP_MARKER: /* snap to nearest marker */
- //td2d->loc[0]= (float)find_nearest_marker_time(td2d->loc[0]);
+ td2d->loc[0]= (float)ED_markers_find_nearest_marker_time(&t->scene->markers, td2d->loc[0]);
break;
}
}
- /* we need to unapply the nla-scaling from the time in some situations */
- //if (NLA_IPO_SCALED)
- // td2d->loc2d[0]= get_action_frame(OBACT, td2d->loc[0]);
- //else
+ /* we need to unapply the nla-mapping from the time in some situations */
+ if (adt)
+ td2d->loc2d[0]= BKE_nla_tweakedit_remap(adt, td2d->loc[0], NLATIME_CONVERT_UNMAP);
+ else
td2d->loc2d[0]= td2d->loc[0];
/* if int-values only, truncate to integers */
@@ -3540,7 +3753,6 @@ void flushTransGraphData(TransInfo *t)
}
}
-
/* **************** IpoKey stuff, for Object TransData ********** */
/* while transforming */
@@ -3569,13 +3781,13 @@ static void ipokey_to_transdata(IpoKey *ik, TransData *td)
TransDataIpokey *tdi= td->tdi;
BezTriple *bezt;
int a, delta= 0;
-
+
td->val= NULL; // is read on ESC
-
+
for(a=0; a<OB_TOTIPO; a++) {
if(ik->data[a]) {
bezt= ik->data[a];
-
+
switch( ob_ar[a] ) {
case OB_LOC_X:
case OB_DLOC_X:
@@ -3586,7 +3798,7 @@ static void ipokey_to_transdata(IpoKey *ik, TransData *td)
case OB_LOC_Z:
case OB_DLOC_Z:
tdi->locz= &(bezt->vec[1][1]); break;
-
+
case OB_DROT_X:
delta= 1;
case OB_ROT_X:
@@ -3599,7 +3811,7 @@ static void ipokey_to_transdata(IpoKey *ik, TransData *td)
delta= 1;
case OB_ROT_Z:
tdi->rotz= &(bezt->vec[1][1]); break;
-
+
case OB_SIZE_X:
case OB_DSIZE_X:
tdi->sizex= &(bezt->vec[1][1]); break;
@@ -3608,26 +3820,26 @@ static void ipokey_to_transdata(IpoKey *ik, TransData *td)
tdi->sizey= &(bezt->vec[1][1]); break;
case OB_SIZE_Z:
case OB_DSIZE_Z:
- tdi->sizez= &(bezt->vec[1][1]); break;
- }
+ tdi->sizez= &(bezt->vec[1][1]); break;
+ }
}
}
-
+
/* oldvals for e.g. undo */
if(tdi->locx) set_tdi_old(tdi->oldloc, tdi->locx);
if(tdi->locy) set_tdi_old(tdi->oldloc+1, tdi->locy);
if(tdi->locz) set_tdi_old(tdi->oldloc+2, tdi->locz);
-
+
/* remember, for mapping curves ('1'=10 degrees) */
if(tdi->rotx) set_tdi_old(tdi->oldrot, tdi->rotx);
if(tdi->roty) set_tdi_old(tdi->oldrot+1, tdi->roty);
if(tdi->rotz) set_tdi_old(tdi->oldrot+2, tdi->rotz);
-
+
/* this is not allowed to be dsize! */
if(tdi->sizex) set_tdi_old(tdi->oldsize, tdi->sizex);
if(tdi->sizey) set_tdi_old(tdi->oldsize+1, tdi->sizey);
if(tdi->sizez) set_tdi_old(tdi->oldsize+2, tdi->sizez);
-
+
tdi->flag= TOB_IPO;
if(delta) tdi->flag |= TOB_IPODROT;
}
@@ -3644,8 +3856,8 @@ static void ipokey_to_transdata(IpoKey *ik, TransData *td)
static short constraints_list_needinv(TransInfo *t, ListBase *list)
{
bConstraint *con;
-
- /* loop through constraints, checking if there's one of the mentioned
+
+ /* loop through constraints, checking if there's one of the mentioned
* constraints needing special crazyspace corrections
*/
if (list) {
@@ -3657,19 +3869,19 @@ static short constraints_list_needinv(TransInfo *t, ListBase *list)
if (con->type == CONSTRAINT_TYPE_CHILDOF) return 1;
if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) return 1;
if (con->type == CONSTRAINT_TYPE_CLAMPTO) return 1;
-
+
/* constraints that require this only under special conditions */
if (con->type == CONSTRAINT_TYPE_ROTLIKE) {
/* CopyRot constraint only does this when rotating, and offset is on */
bRotateLikeConstraint *data = (bRotateLikeConstraint *)con->data;
-
+
if ((data->flag & ROTLIKE_OFFSET) && (t->mode == TFM_ROTATION))
return 1;
}
}
}
}
-
+
/* no appropriate candidates found */
return 0;
}
@@ -3701,13 +3913,13 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
*flag= 0;
}
else if (seq->type ==SEQ_META) {
-
+
/* for meta's we only ever need to extend their children, no matter what depth
* just check the meta's are in the bounds */
if (t->frame_side=='R' && right <= cfra) *recursive= 0;
else if (t->frame_side=='L' && left >= cfra) *recursive= 0;
else *recursive= 1;
-
+
*count= 0;
*flag= 0;
}
@@ -3831,15 +4043,15 @@ static TransData *SeqToTransData(TransInfo *t, TransData *td, TransData2D *td2d,
td2d->loc[2] = 0.0f;
td2d->loc2d = NULL;
-
+
tdsq->seq= seq;
/* Use instead of seq->flag for nested strips and other
* cases where the selection may need to be modified */
tdsq->flag= flag;
tdsq->sel_flag= sel_flag;
-
-
+
+
td->extra= (void *)tdsq; /* allow us to update the strip from here */
td->flag = 0;
@@ -3861,7 +4073,7 @@ static TransData *SeqToTransData(TransInfo *t, TransData *td, TransData2D *td2d,
/* Time Transform (extend) */
td->val= td2d->loc;
td->ival= td2d->loc[0];
-
+
return td;
}
@@ -3870,15 +4082,15 @@ static int SeqToTransData_Recursive(TransInfo *t, ListBase *seqbase, TransData *
Sequence *seq;
int recursive, count, flag;
int tot= 0;
-
+
for (seq= seqbase->first; seq; seq= seq->next) {
SeqTransInfo(t, seq, &recursive, &count, &flag);
-
+
/* add children first so recalculating metastrips does nested strips first */
if (recursive) {
int tot_children= SeqToTransData_Recursive(t, &seq->seqbase, td, td2d, tdsq);
-
+
td= td + tot_children;
td2d= td2d + tot_children;
tdsq= tdsq + tot_children;
@@ -3911,7 +4123,7 @@ static int SeqToTransData_Recursive(TransInfo *t, ListBase *seqbase, TransData *
static void createTransSeqData(bContext *C, TransInfo *t)
{
-
+
View2D *v2d= UI_view2d_fromcontext(C);
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(t->scene, FALSE);
@@ -3949,12 +4161,12 @@ static void createTransSeqData(bContext *C, TransInfo *t)
if (count == 0) {
return;
}
-
+
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransSeq TransData");
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransSeq TransData2D");
tdsq = t->customData= MEM_callocN(t->total*sizeof(TransDataSeq), "TransSeq TransDataSeq");
-
+
/* loop 2: build transdata array */
SeqToTransData_Recursive(t, ed->seqbasep, td, td2d, tdsq);
@@ -3962,7 +4174,7 @@ static void createTransSeqData(bContext *C, TransInfo *t)
/* transcribe given object into TransData for Transforming */
-static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *ob)
+static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *ob)
{
Scene *scene = CTX_data_scene(C);
Object *track;
@@ -3976,35 +4188,35 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
Mat3Ortho(td->axismtx);
td->con= ob->constraints.first;
-
- /* hack: tempolarily disable tracking and/or constraints when getting
+
+ /* hack: tempolarily disable tracking and/or constraints when getting
* object matrix, if tracking is on, or if constraints don't need
* inverse correction to stop it from screwing up space conversion
* matrix later
*/
constinv = constraints_list_needinv(t, &ob->constraints);
-
+
/* disable constraints inversion for dummy pass */
if (t->mode == TFM_DUMMY)
skip_invert = 1;
-
+
if (skip_invert == 0 && (ob->track || constinv==0)) {
track= ob->track;
ob->track= NULL;
-
+
if (constinv == 0) {
fakecons.first = ob->constraints.first;
fakecons.last = ob->constraints.last;
ob->constraints.first = ob->constraints.last = NULL;
}
-
+
where_is_object(t->scene, ob);
-
+
if (constinv == 0) {
ob->constraints.first = fakecons.first;
ob->constraints.last = fakecons.last;
}
-
+
ob->track= track;
}
else
@@ -4014,23 +4226,23 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
td->loc = ob->loc;
VECCOPY(td->iloc, td->loc);
-
+
td->ext->rot = ob->rot;
VECCOPY(td->ext->irot, ob->rot);
VECCOPY(td->ext->drot, ob->drot);
-
+
td->ext->size = ob->size;
VECCOPY(td->ext->isize, ob->size);
VECCOPY(td->ext->dsize, ob->dsize);
VECCOPY(td->center, ob->obmat[3]);
-
+
Mat4CpyMat4(td->ext->obmat, ob->obmat);
/* is there a need to set the global<->data space conversion matrices? */
if (ob->parent || constinv) {
float totmat[3][3], obinv[3][3];
-
+
/* Get the effect of parenting, and/or certain constraints.
* NOTE: some Constraints, and also Tracking should never get this
* done, as it doesn't work well.
@@ -4046,7 +4258,7 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *
Mat3One(td->smtx);
Mat3One(td->mtx);
}
-
+
/* set active flag */
if (ob == OBACT)
{
@@ -4061,39 +4273,39 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t)
{
Scene *sce = CTX_data_scene(C);
View3D *v3d = t->view;
-
+
/*
if Base selected and has parent selected:
base->flag= BA_WAS_SEL
*/
Base *base;
-
+
/* don't do it if we're not actually going to recalculate anything */
if(t->mode == TFM_DUMMY)
return;
/* makes sure base flags and object flags are identical */
copy_baseflags(t->scene);
-
+
/* handle pending update events, otherwise they got copied below */
for (base= sce->base.first; base; base= base->next) {
- if(base->object->recalc)
+ if(base->object->recalc)
object_handle_update(t->scene, base->object);
}
-
+
for (base= sce->base.first; base; base= base->next) {
base->flag &= ~BA_WAS_SEL;
-
+
if(TESTBASELIB(v3d, base)) {
Object *ob= base->object;
Object *parsel= ob->parent;
-
+
/* if parent selected, deselect */
while(parsel) {
if(parsel->flag & SELECT) break;
parsel= parsel->parent;
}
-
+
if(parsel)
{
if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)
@@ -4113,7 +4325,7 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t)
/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
DAG_scene_flush_update(t->scene, -1, 0);
-
+
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */
for (base= sce->base.first; base; base= base->next) {
@@ -4128,7 +4340,7 @@ static void clear_trans_object_base_flags(TransInfo *t)
{
Scene *sce = t->scene;
Base *base;
-
+
for (base= sce->base.first; base; base = base->next)
{
if(base->flag & BA_WAS_SEL)
@@ -4138,39 +4350,25 @@ static void clear_trans_object_base_flags(TransInfo *t)
}
}
-/* auto-keyframing feature - checks for whether anything should be done for the current frame */
-// TODO: this should probably be done per channel instead...
-short autokeyframe_cfra_can_key(Scene *scene, Object *ob)
-{
- float cfra= (float)CFRA; // XXX for now, this will do
-
- /* only filter if auto-key mode requires this */
- if (IS_AUTOKEY_ON(scene) == 0)
- return 0;
- else if (IS_AUTOKEY_MODE(scene, NORMAL))
- return 1;
- else
- return id_frame_has_keyframe(&ob->id, cfra, ANIMFILTER_KEYS_LOCAL);
-}
-
-/* auto-keyframing feature - for objects
- * tmode: should be a transform mode
+/* auto-keyframing feature - for objects
+ * tmode: should be a transform mode
*/
void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
{
ID *id= &ob->id;
FCurve *fcu;
-
- if (autokeyframe_cfra_can_key(scene, ob)) {
+
+ // TODO: this should probably be done per channel instead...
+ if (autokeyframe_cfra_can_key(scene, id)) {
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_FLAG(INSERTAVAIL)) {
/* only key on available channels */
if (adt && adt->action) {
@@ -4182,7 +4380,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;
@@ -4193,9 +4391,9 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
doLoc = 1;
}
else if (v3d->around == V3D_CURSOR)
- doLoc = 1;
-
- if ((v3d->flag & V3D_ALIGN)==0)
+ doLoc = 1;
+
+ if ((v3d->flag & V3D_ALIGN)==0)
doRot = 1;
}
else if (tmode == TFM_RESIZE) {
@@ -4204,12 +4402,12 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
doLoc = 1;
}
else if (v3d->around == V3D_CURSOR)
- doLoc = 1;
-
+ 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) {
@@ -4234,22 +4432,22 @@ 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...
}
}
-/* auto-keyframing feature - for poses/pose-channels
- * tmode: should be a transform mode
+/* auto-keyframing feature - for poses/pose-channels
+ * tmode: should be a transform mode
* targetless_ik: has targetless ik been done on any channels?
*/
void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, short targetless_ik)
@@ -4261,13 +4459,14 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
bPose *pose= ob->pose;
bPoseChannel *pchan;
FCurve *fcu;
-
- if (autokeyframe_cfra_can_key(scene, ob)) {
+
+ // TODO: this should probably be done per channel instead...
+ if (autokeyframe_cfra_can_key(scene, id)) {
float cfra= (float)CFRA;
short flag= 0;
char buf[512];
-
- /* flag is initialised from UserPref keyframing settings
+
+ /* 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
* (for quick animation recording)
@@ -4276,12 +4475,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;
-
+
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) {
@@ -4292,29 +4491,29 @@ 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)
+ if (targetless_ik)
doRot= 1;
- else
+ else
doLoc = 1;
}
else if (tmode == TFM_ROTATION) {
if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
doLoc = 1;
-
- if ((v3d->flag & V3D_ALIGN)==0)
+
+ 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);
@@ -4349,7 +4548,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);
@@ -4363,7 +4562,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);
@@ -4371,15 +4570,15 @@ 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 // TRANSFORM_FIX_ME
if (arm->pathflag & ARM_PATH_ACFRA) {
pose_clear_paths(ob);
pose_recalculate_paths(ob);
- }
+ }
#endif
}
else {
@@ -4403,7 +4602,7 @@ void special_aftertrans_update(TransInfo *t)
// short redrawipo=0, resetslowpar=1;
int cancelled= (t->state == TRANS_CANCEL);
short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0;
-
+
if (t->spacetype==SPACE_VIEW3D) {
if (t->obedit) {
if (cancelled==0) {
@@ -4426,7 +4625,7 @@ void special_aftertrans_update(TransInfo *t)
#if 0 // TRANSFORM_FIX_ME, Would prefer to use this since the array takes into
// account what where transforming (with extend, locked strips etc)
// But at the moment t->data is freed in postTrans so for now re-shuffeling selected strips works ok. - Campbell
-
+
int a;
TransData *td= t->data;
@@ -4451,7 +4650,7 @@ void special_aftertrans_update(TransInfo *t)
for(seq= seqbasep->first; seq; seq= seq->next) {
max_machine = MAX2(max_machine, seq->machine);
}
-
+
for (machine = 0; machine <= max_machine; machine++)
{
for(seq= seqbasep->first; seq; seq= seq->next) {
@@ -4461,7 +4660,7 @@ void special_aftertrans_update(TransInfo *t)
}
}
#endif
-
+
for(seq= seqbasep->first; seq; seq= seq->next) {
/* We might want to build a list of effects that need to be updated during transform */
if(seq->type & SEQ_EFFECT) {
@@ -4473,7 +4672,7 @@ void special_aftertrans_update(TransInfo *t)
sort_seq(t->scene);
}
-
+
if (t->customData)
MEM_freeN(t->customData);
if (t->data)
@@ -4483,47 +4682,47 @@ void special_aftertrans_update(TransInfo *t)
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
Scene *scene;
bAnimContext ac;
-
+
/* initialise relevant anim-context 'context' data from TransInfo data */
/* NOTE: sync this with the code in ANIM_animdata_get_context() */
memset(&ac, 0, sizeof(bAnimContext));
-
+
scene= ac.scene= t->scene;
ob= ac.obact= OBACT;
ac.sa= t->sa;
ac.ar= t->ar;
ac.spacetype= (t->sa)? t->sa->spacetype : 0;
ac.regiontype= (t->ar)? t->ar->regiontype : 0;
-
+
if (ANIM_animdata_context_getdata(&ac) == 0)
return;
-
+
if (ac.datatype == ANIMCONT_DOPESHEET) {
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
short filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
-
+
/* get channels to work on */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-
+
/* these should all be ipo-blocks */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(&ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
-
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+
+ if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
((cancelled == 0) || (duplicate)) )
{
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, fcu, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
posttrans_fcurve_clean(fcu);
- ANIM_nla_mapping_apply_fcurve(nob, fcu, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
}
else
posttrans_fcurve_clean(fcu);
}
}
-
+
/* free temp memory */
BLI_freelistN(&anim_data);
}
@@ -4532,15 +4731,15 @@ void special_aftertrans_update(TransInfo *t)
// fixme... some of this stuff is not good
if (ob) {
ob->ctime= -1234567.0f;
-
+
if (ob->pose || ob_get_key(ob))
DAG_object_flush_update(scene, ob, OB_RECALC);
else
DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
-
+
/* Do curve cleanups? */
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+ if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
((cancelled == 0) || (duplicate)) )
{
posttrans_action_clean(&ac, (bAction *)ac.data);
@@ -4550,16 +4749,16 @@ void special_aftertrans_update(TransInfo *t)
#if 0 // XXX old animation system
/* fix up the Ipocurves and redraw stuff */
Key *key= (Key *)ac.data;
-
+
if (key->ipo) {
- if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
+ if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
((cancelled == 0) || (duplicate)) )
{
posttrans_ipo_clean(key->ipo);
}
}
#endif // XXX old animation system
-
+
DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
#if 0 // XXX future of this is still not clear
@@ -4569,23 +4768,23 @@ void special_aftertrans_update(TransInfo *t)
{
bScreen *sc= (bScreen *)ac.data;
ScrArea *sa;
-
+
/* BAD... we need to loop over all screen areas for current screen...
- * - sync this with actdata_filter_gpencil() in editaction.c
+ * - sync this with actdata_filter_gpencil() in editaction.c
*/
for (sa= sc->areabase.first; sa; sa= sa->next) {
bGPdata *gpd= gpencil_data_getactive(sa);
-
- if (gpd)
+
+ if (gpd)
posttrans_gpd_clean(gpd);
}
}
}
#endif // XXX future of this is still not clear
-
+
/* make sure all F-Curves are set correctly */
ANIM_editkeyframes_refresh(&ac);
-
+
/* clear flag that was set for time-slide drawing */
saction->flag &= ~SACTION_MOVING;
}
@@ -4593,60 +4792,105 @@ void special_aftertrans_update(TransInfo *t)
SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
Scene *scene;
bAnimContext ac;
-
+
/* initialise relevant anim-context 'context' data from TransInfo data */
/* NOTE: sync this with the code in ANIM_animdata_get_context() */
memset(&ac, 0, sizeof(bAnimContext));
-
+
scene= ac.scene= t->scene;
ob= ac.obact= OBACT;
ac.sa= t->sa;
ac.ar= t->ar;
ac.spacetype= (t->sa)? t->sa->spacetype : 0;
ac.regiontype= (t->ar)? t->ar->regiontype : 0;
-
+
if (ANIM_animdata_context_getdata(&ac) == 0)
return;
-
- if (ac.datatype)
+
+ if (ac.datatype)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
short filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_CURVEVISIBLE);
-
+
/* get channels to work on */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-
+
/* these should all be ipo-blocks */
for (ale= anim_data.first; ale; ale= ale->next) {
- Object *nob= ANIM_nla_mapping_get(&ac, ale);
+ AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
-
- if ( (sipo->flag & SIPO_NOTRANSKEYCULL)==0 &&
+
+ if ( (sipo->flag & SIPO_NOTRANSKEYCULL)==0 &&
((cancelled == 0) || (duplicate)) )
{
- if (nob) {
- ANIM_nla_mapping_apply_fcurve(nob, fcu, 0, 1);
+ if (adt) {
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
posttrans_fcurve_clean(fcu);
- ANIM_nla_mapping_apply_fcurve(nob, fcu, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
}
else
posttrans_fcurve_clean(fcu);
}
}
-
+
/* free temp memory */
BLI_freelistN(&anim_data);
}
-
+
/* make sure all F-Curves are set correctly */
ANIM_editkeyframes_refresh(&ac);
}
+ else if (t->spacetype == SPACE_NLA) {
+ Scene *scene;
+ bAnimContext ac;
+
+ /* initialise relevant anim-context 'context' data from TransInfo data */
+ /* NOTE: sync this with the code in ANIM_animdata_get_context() */
+ memset(&ac, 0, sizeof(bAnimContext));
+
+ scene= ac.scene= t->scene;
+ ob= ac.obact= OBACT;
+ ac.sa= t->sa;
+ ac.ar= t->ar;
+ ac.spacetype= (t->sa)? t->sa->spacetype : 0;
+ ac.regiontype= (t->ar)? t->ar->regiontype : 0;
+
+ if (ANIM_animdata_context_getdata(&ac) == 0)
+ return;
+
+ if (ac.datatype)
+ {
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ short filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NLATRACKS);
+
+ /* get channels to work on */
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ NlaTrack *nlt= (NlaTrack *)ale->data;
+
+ /* make sure strips are in order again */
+ BKE_nlatrack_sort_strips(nlt);
+
+ /* remove the temp metas */
+ BKE_nlastrips_clear_metas(&nlt->strips, 0, 1);
+ }
+
+ /* free temp memory */
+ BLI_freelistN(&anim_data);
+ }
+
+ // XXX check on the calls below... we need some of these sanity checks
+ //synchronize_action_strips();
+ //ANIM_editkeyframes_refresh(&ac);
+ }
else if (t->obedit) {
// TRANSFORM_FIX_ME
// if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE)
// allqueue(REDRAWBUTSEDIT, 0);
-
+
if (t->obedit->type == OB_MESH)
{
BMEditMesh *em = ((Mesh *)t->obedit->data)->edit_btmesh;
@@ -4659,11 +4903,11 @@ void special_aftertrans_update(TransInfo *t)
bPose *pose;
bPoseChannel *pchan;
short targetless_ik= 0;
-
+
ob= t->poseobj;
arm= ob->data;
pose= ob->pose;
-
+
/* if target-less IK grabbing, we calculate the pchan transforms and clear flag */
if (!cancelled && t->mode==TFM_TRANSLATION)
targetless_ik= apply_targetless_ik(ob);
@@ -4674,10 +4918,10 @@ void special_aftertrans_update(TransInfo *t)
if(data) data->flag &= ~CONSTRAINT_IK_AUTO;
}
}
-
+
if (t->mode==TFM_TRANSLATION)
pose_grab_with_ik_clear(ob);
-
+
/* 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);
@@ -4688,56 +4932,44 @@ void special_aftertrans_update(TransInfo *t)
DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
ob->recalc= 0; // is set on OK position already by recalcData()
}
- else
+ else
DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
-
+
//if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE)
// allqueue(REDRAWBUTSEDIT, 0);
-
+
}
else if(G.f & G_PARTICLEEDIT) {
;
}
- else {
+ else {
/* Objects */
// XXX ideally, this would go through context iterators, but we don't have context iterator access here,
// so we make do with old data + access styles...
Scene *scene= t->scene;
Base *base;
-
+
for (base= FIRSTBASE; base; base= base->next) {
ob= base->object;
-
+
if (base->flag & SELECT && (t->mode != TFM_DUMMY)) {
/* pointcache refresh */
- if (BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH))
+ if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH))
ob->recalc |= OB_RECALC_DATA;
-
+
+ /* Needed for proper updating of "quick cached" dynamics. */
+ /* 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_object_flush_update(scene, ob, OB_RECALC_OB);
+
/* Set autokey if necessary */
if (!cancelled)
autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode);
}
}
}
-
-#if 0 // TRANSFORM_FIX_ME
- else if (t->spacetype == SPACE_NLA) {
- recalc_all_ipos(); // bad
- synchronize_action_strips();
-
- /* cleanup */
- for (base=t->scene->base.first; base; base=base->next)
- base->flag &= ~(BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA);
-
- /* after transform, remove duplicate keyframes on a frame that resulted from transform */
- if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 &&
- ((cancelled == 0) || (duplicate)) )
- {
- posttrans_nla_clean(t);
- }
- }
-#endif
-
+
clear_trans_object_base_flags(t);
#if 0 // TRANSFORM_FIX_ME
@@ -4746,10 +4978,10 @@ void special_aftertrans_update(TransInfo *t)
allqueue(REDRAWACTION, 0);
allqueue(REDRAWIPO, 0);
}
-
+
if(resetslowpar)
reset_slowparents();
-
+
/* note; should actually only be done for all objects when a lamp is moved... (ton) */
if(t->spacetype==SPACE_VIEW3D && G.vd->drawtype == OB_SHADED)
reshadeall_displist();
@@ -4762,10 +4994,10 @@ static void createTransObject(bContext *C, TransInfo *t)
TransDataExtension *tx;
// IpoKey *ik;
// ListBase elems;
-
+
set_trans_object_base_flags(C, t);
- /* count */
+ /* count */
CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
{
#if 0 // TRANSFORM_FIX_ME
@@ -4773,12 +5005,12 @@ static void createTransObject(bContext *C, TransInfo *t)
if ((ob->id.lib == 0) && (ob->ipo) && (ob->ipo->showkey) && (ob->ipoflag & OB_DRAWKEY)) {
elems.first= elems.last= NULL;
make_ipokey_transform(ob, &elems, 1); /* '1' only selected keys */
-
+
pushdata(&elems, sizeof(ListBase));
-
+
for(ik= elems.first; ik; ik= ik->next)
t->total++;
-
+
if(elems.first==NULL)
t->total++;
}
@@ -4794,24 +5026,24 @@ static void createTransObject(bContext *C, TransInfo *t)
clear_trans_object_base_flags(t);
return;
}
-
+
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransOb");
tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransObExtension");
CTX_DATA_BEGIN(C, Base*, base, selected_bases)
{
Object *ob= base->object;
-
+
td->flag = TD_SELECTED;
td->protectflag= ob->protectflag;
td->ext = tx;
-
+
if (base->flag & BA_TRANSFORM_CHILD)
{
td->flag |= TD_NOCENTER;
td->flag |= TD_NO_LOC;
}
-
+
/* select linked objects, but skip them later */
if (ob->id.lib != 0) {
td->flag |= TD_SKIP;
@@ -4821,55 +5053,55 @@ static void createTransObject(bContext *C, TransInfo *t)
// TRANSFORM_FIX_ME
#if 0
if((ob->id.lib == 0) && (ob->ipo) && (ob->ipo->showkey) && (ob->ipoflag & OB_DRAWKEY)) {
-
+
popfirst(&elems); // bring back pushed listbase
-
+
if(elems.first) {
int cfraont;
int ipoflag;
-
+
base->flag |= BA_DO_IPO+BA_WAS_SEL;
base->flag &= ~SELECT;
-
+
cfraont= CFRA;
set_no_parent_ipo(1);
ipoflag= ob->ipoflag;
ob->ipoflag &= ~OB_OFFS_OB;
-
+
/*
* This is really EVIL code that pushes down Object values
* (loc, dloc, orig, size, dsize, rot, drot)
* */
-
+
pushdata((void*)ob->loc, 7 * 3 * sizeof(float)); // tsk! tsk!
-
+
for(ik= elems.first; ik; ik= ik->next) {
-
+
/* weak... this doesn't correct for floating values, giving small errors */
CFRA= (int)(ik->val/t->scene->r.framelen);
-
+
do_ob_ipo(ob);
ObjectToTransData(C, t, td, ob); // does where_is_object()
-
+
td->flag= TD_SELECTED;
-
+
td->tdi= MEM_callocN(sizeof(TransDataIpokey), "TransDataIpokey");
/* also does tdi->flag and oldvals, needs to be after ob_to_transob()! */
ipokey_to_transdata(ik, td);
-
+
td++;
tx++;
if(ik->next) td->ext= tx; // prevent corrupting mem!
}
free_ipokey(&elems);
-
+
poplast(ob->loc);
set_no_parent_ipo(0);
-
+
CFRA= cfraont;
ob->ipoflag= ipoflag;
-
- where_is_object(t->scene, ob); // restore
+
+ where_is_object(t->scene, ob); // restore
}
else {
ObjectToTransData(C, t, td, ob);
@@ -4893,7 +5125,7 @@ static void createTransObject(bContext *C, TransInfo *t)
/* transcribe given node into TransData2D for Transforming */
static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node)
-// static void NodeToTransData(bContext *C, TransInfo *t, TransData2D *td, bNode *node)
+// static void NodeToTransData(bContext *C, TransInfo *t, TransData2D *td, bNode *node)
{
td2d->loc[0] = node->locx; /* hold original location */
td2d->loc[1] = node->locy;
@@ -4921,22 +5153,22 @@ void createTransNodeData(bContext *C, TransInfo *t)
{
TransData *td;
TransData2D *td2d;
-
+
t->total= CTX_DATA_COUNT(C, selected_nodes);
-
+
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransNode TransData");
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransNode TransData2D");
-
+
CTX_DATA_BEGIN(C, bNode *, selnode, selected_nodes)
NodeToTransData(td++, td2d++, selnode);
CTX_DATA_END
}
-void createTransData(bContext *C, TransInfo *t)
+void createTransData(bContext *C, TransInfo *t)
{
Scene *scene = CTX_data_scene(C);
Object *ob = OBACT;
-
+
if (t->options == CTX_TEXTURE) {
t->flag |= T_TEXTURE;
createTransTexspace(C, t);
@@ -4970,8 +5202,7 @@ void createTransData(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_NLA) {
t->flag |= T_POINTS|T_2D_EDIT;
- // TRANSFORM_FIX_ME
- //createTransNlaData(C, t);
+ createTransNlaData(C, t);
}
else if (t->spacetype == SPACE_SEQ) {
t->flag |= T_POINTS|T_2D_EDIT;
@@ -4981,7 +5212,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->spacetype == SPACE_IPO) {
t->flag |= T_POINTS|T_2D_EDIT;
createTransGraphEditData(C, t);
-#if 0
+#if 0
if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become first in array
set_prop_dist(t, 1);
@@ -5001,7 +5232,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->obedit) {
t->ext = NULL;
if (t->obedit->type == OB_MESH) {
- createTransEditVerts(C, t);
+ createTransEditVerts(C, t);
}
else if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
createTransCurveVerts(C, t);
@@ -5015,7 +5246,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->obedit->type==OB_ARMATURE) {
t->flag &= ~T_PROP_EDIT;
createTransArmatureVerts(C, t);
- }
+ }
else {
printf("edit type not implemented!\n");
}
@@ -5034,7 +5265,7 @@ void createTransData(bContext *C, TransInfo *t)
}
t->flag |= T_EDIT|T_POINTS;
-
+
/* exception... hackish, we want bonesize to use bone orientation matrix (ton) */
if(t->mode==TFM_BONESIZE) {
t->flag &= ~(T_EDIT|T_POINTS);
@@ -5043,7 +5274,7 @@ void createTransData(bContext *C, TransInfo *t)
}
}
else if (ob && (ob->flag & OB_POSEMODE)) {
- // XXX this is currently limited to active armature only...
+ // XXX this is currently limited to active armature only...
// XXX active-layer checking isn't done as that should probably be checked through context instead
createTransPose(C, t, ob);
}
@@ -5077,7 +5308,7 @@ void createTransData(bContext *C, TransInfo *t)
t->flag &= ~T_PROP_EDIT; /* no proportional edit in object mode */
createTransObject(C, t);
t->flag |= T_OBJECT;
-
+
if (t->ar->regiontype == RGN_TYPE_WINDOW)
{
View3D *v3d = t->view;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index d79fe98b563..3fc9fe73a5b 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -59,13 +59,10 @@
//#include "BIF_screen.h"
//#include "BIF_mywindow.h"
#include "BIF_gl.h"
-//#include "BIF_editaction.h"
//#include "BIF_editmesh.h"
-//#include "BIF_editnla.h"
//#include "BIF_editsima.h"
//#include "BIF_editparticle.h"
//#include "BIF_meshtools.h"
-#include "BIF_retopo.h"
#include "BKE_action.h"
#include "BKE_anim.h"
@@ -82,6 +79,7 @@
#include "BKE_key.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
+#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
#include "BKE_context.h"
@@ -91,7 +89,9 @@
#include "ED_armature.h"
#include "ED_image.h"
#include "ED_keyframing.h"
+#include "ED_markers.h"
#include "ED_mesh.h"
+#include "ED_retopo.h"
#include "ED_space_api.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
@@ -103,6 +103,8 @@
#include "BLI_editVert.h"
#include "BLI_rand.h"
+#include "RNA_access.h"
+
#include "WM_types.h"
#include "UI_resources.h"
@@ -115,8 +117,6 @@
extern ListBase editelems;
-extern TransInfo Trans; /* From transform.c */
-
/* ************************** Functions *************************** */
void getViewVector(TransInfo *t, float coord[3], float vec[3])
@@ -155,8 +155,8 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
for (; md; md=md->next) {
if (md->type==eModifierType_Mirror) {
- MirrorModifierData *mmd = (MirrorModifierData*) md;
-
+ MirrorModifierData *mmd = (MirrorModifierData*) md;
+
if(mmd->flag & MOD_MIR_CLIPPING) {
axis = 0;
if(mmd->flag & MOD_MIR_AXIS_X) {
@@ -175,7 +175,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
float mtx[4][4], imtx[4][4];
int i;
TransData *td = t->data;
-
+
if (mmd->mirror_ob) {
float obinv[4][4];
@@ -192,10 +192,10 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
break;
if (td->loc==NULL)
break;
-
+
if (td->flag & TD_SKIP)
continue;
-
+
VecCopyf(loc, td->loc);
VecCopyf(iloc, td->iloc);
@@ -206,22 +206,22 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
clip = 0;
if(axis & 1) {
- if(fabs(iloc[0])<=tolerance[0] ||
+ if(fabs(iloc[0])<=tolerance[0] ||
loc[0]*iloc[0]<0.0f) {
loc[0]= 0.0f;
clip = 1;
}
}
-
+
if(axis & 2) {
- if(fabs(iloc[1])<=tolerance[1] ||
+ if(fabs(iloc[1])<=tolerance[1] ||
loc[1]*iloc[1]<0.0f) {
loc[1]= 0.0f;
clip = 1;
}
}
if(axis & 4) {
- if(fabs(iloc[2])<=tolerance[2] ||
+ if(fabs(iloc[2])<=tolerance[2] ||
loc[2]*iloc[2]<0.0f) {
loc[2]= 0.0f;
clip = 1;
@@ -248,7 +248,7 @@ static void editbmesh_apply_to_mirror(TransInfo *t)
BMVert *eve;
BMIter iter;
int i;
-
+
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -256,108 +256,45 @@ static void editbmesh_apply_to_mirror(TransInfo *t)
break;
if (td->flag & TD_SKIP)
continue;
-
+
eve = td->extra;
if(eve) {
eve->co[0]= -td->loc[0];
eve->co[1]= td->loc[1];
eve->co[2]= td->loc[2];
- }
- }
+ }
+ }
}
-/* called for updating while transform acts, once per redraw */
-void recalcData(TransInfo *t)
+/* tags the given ID block for refreshes (if applicable) due to
+ * Animation Editor editing
+ */
+static void animedit_refresh_id_tags (ID *id)
{
- Scene *scene = t->scene;
- Base *base;
+ AnimData *adt= BKE_animdata_from_id(id);
-#if 0 // TRANSFORM_FIX_ME
- if (t->spacetype == SPACE_ACTION) {
- Object *ob= OBACT;
- void *data;
- short context;
-
- /* determine what type of data we are operating on */
- data = get_action_context(&context);
- if (data == NULL) return;
+ /* tag AnimData for refresh so that other views will update in realtime with these changes */
+ if (adt)
+ adt->recalc |= ADT_RECALC_ANIM;
- /* always flush data if gpencil context */
- if (context == ACTCONT_GPENCIL) {
- flushTransGPactionData(t);
- }
-
- if (G.saction->lock) {
- if (context == ACTCONT_ACTION) {
- if(ob) {
- ob->ctime= -1234567.0f;
- if(ob->pose || ob_get_key(ob))
- DAG_object_flush_update(G.scene, ob, OB_RECALC);
- else
- DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
- }
- }
- else if (context == ACTCONT_SHAPEKEY) {
- DAG_object_flush_update(G.scene, OBACT, OB_RECALC_OB|OB_RECALC_DATA);
- }
- }
- }
- else if (t->spacetype == SPACE_NLA) {
- if (G.snla->lock) {
- for (base=G.scene->base.first; base; base=base->next) {
- if (base->flag & BA_HAS_RECALC_OB)
- base->object->recalc |= OB_RECALC_OB;
- if (base->flag & BA_HAS_RECALC_DATA)
- base->object->recalc |= OB_RECALC_DATA;
-
- if (base->object->recalc)
- base->object->ctime= -1234567.0f; // eveil!
-
- /* recalculate scale of selected nla-strips */
- if (base->object->nlastrips.first) {
- Object *bob= base->object;
- bActionStrip *strip;
-
- for (strip= bob->nlastrips.first; strip; strip= strip->next) {
- if (strip->flag & ACTSTRIP_SELECT) {
- float actlen= strip->actend - strip->actstart;
- float len= strip->end - strip->start;
-
- strip->scale= len / (actlen * strip->repeat);
- }
- }
- }
- }
-
- DAG_scene_flush_update(G.scene, screen_view3d_layers(), 0);
- }
- else {
- for (base=G.scene->base.first; base; base=base->next) {
- /* recalculate scale of selected nla-strips */
- if (base->object && base->object->nlastrips.first) {
- Object *bob= base->object;
- bActionStrip *strip;
-
- for (strip= bob->nlastrips.first; strip; strip= strip->next) {
- if (strip->flag & ACTSTRIP_SELECT) {
- float actlen= strip->actend - strip->actstart;
- float len= strip->end - strip->start;
-
- /* prevent 'negative' scaling */
- if (len < 0) {
- SWAP(float, strip->start, strip->end);
- len= fabs(len);
- }
-
- /* calculate new scale */
- strip->scale= len / (actlen * strip->repeat);
- }
- }
- }
- }
+ /* 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;
+ ob->recalc |= OB_RECALC;
}
+ break;
}
-#endif
+}
+
+/* called for updating while transform acts, once per redraw */
+void recalcData(TransInfo *t)
+{
+ Scene *scene = t->scene;
+ Base *base;
+
if (t->obedit) {
}
else if(G.f & G_PARTICLEEDIT) {
@@ -369,6 +306,41 @@ void recalcData(TransInfo *t)
else if (t->spacetype==SPACE_SEQ) {
flushTransSeq(t);
}
+ else if (t->spacetype == SPACE_ACTION) {
+ SpaceAction *sact= (SpaceAction *)t->sa->spacedata.first;
+ Scene *scene;
+
+ bAnimContext ac;
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ int filter;
+
+ /* initialise relevant anim-context 'context' data from TransInfo data */
+ /* NOTE: sync this with the code in ANIM_animdata_get_context() */
+ memset(&ac, 0, sizeof(bAnimContext));
+
+ scene= ac.scene= t->scene;
+ ac.obact= OBACT;
+ ac.sa= t->sa;
+ ac.ar= t->ar;
+ ac.spacetype= (t->sa)? t->sa->spacetype : 0;
+ ac.regiontype= (t->ar)? t->ar->regiontype : 0;
+
+ ANIM_animdata_context_getdata(&ac);
+
+ /* get animdata blocks visible in editor, assuming that these will be the ones where things changed */
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ANIMDATA);
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ /* 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(ale->id);
+ }
+
+ /* now free temp channels */
+ BLI_freelistN(&anim_data);
+ }
else if (t->spacetype == SPACE_IPO) {
SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
Scene *scene;
@@ -404,33 +376,207 @@ void recalcData(TransInfo *t)
/* now test if there is a need to re-sort */
for (ale= anim_data.first; ale; ale= ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
+ AnimData *adt= BKE_animdata_from_id(ale->id);
/* watch it: if the time is wrong: do not correct handles yet */
if (test_time_fcurve(fcu))
dosort++;
else
calchandles_fcurve(fcu);
+
+ /* set refresh tags for objects using this animation */
+ animedit_refresh_id_tags(ale->id);
}
/* do resort and other updates? */
if (dosort) remake_graph_transdata(t, &anim_data);
- //if (sipo->showkey) update_ipokey_val();
/* now free temp channels */
BLI_freelistN(&anim_data);
+ }
+ else if (t->spacetype == SPACE_NLA) {
+ TransDataNla *tdn= (TransDataNla *)t->customData;
+ SpaceNla *snla= (SpaceNla *)t->sa->spacedata.first;
+ Scene *scene= t->scene;
+ double secf= FPS;
+ int i;
- /* update realtime - not working? */
- if (sipo->lock) {
-
+ /* for each strip we've got, perform some additional validation of the values that got set before
+ * using RNA to set the value (which does some special operations when setting these values to make
+ * sure that everything works ok)
+ */
+ for (i = 0; i < t->total; i++, tdn++) {
+ NlaStrip *strip= tdn->strip;
+ PointerRNA strip_ptr;
+ short pExceeded, nExceeded, iter;
+ int delta_y1, delta_y2;
+
+ /* if this tdn has no handles, that means it is just a dummy that should be skipped */
+ if (tdn->handle == 0)
+ continue;
+
+ /* set refresh tags for objects using this animation */
+ animedit_refresh_id_tags(tdn->id);
+
+ /* if cancelling transform, just write the values without validating, then move on */
+ if (t->state == TRANS_CANCEL) {
+ /* clear the values by directly overwriting the originals, but also need to restore
+ * endpoints of neighboring transition-strips
+ */
+
+ /* start */
+ strip->start= tdn->h1[0];
+
+ if ((strip->prev) && (strip->prev->type == NLASTRIP_TYPE_TRANSITION))
+ strip->prev->end= tdn->h1[0];
+
+ /* end */
+ strip->end= tdn->h2[0];
+
+ if ((strip->next) && (strip->next->type == NLASTRIP_TYPE_TRANSITION))
+ strip->next->start= tdn->h2[0];
+
+ /* flush transforms to child strips (since this should be a meta) */
+ BKE_nlameta_flush_transforms(strip);
+
+ /* restore to original track (if needed) */
+ if (tdn->oldTrack != tdn->nlt) {
+ /* just append to end of list for now, since strips get sorted in special_aftertrans_update() */
+ BLI_remlink(&tdn->nlt->strips, strip);
+ BLI_addtail(&tdn->oldTrack->strips, strip);
+ }
+
+ continue;
+ }
+
+ /* firstly, check if the proposed transform locations would overlap with any neighbouring strips
+ * (barring transitions) which are absolute barriers since they are not being moved
+ *
+ * this is done as a iterative procedure (done 5 times max for now)
+ */
+ for (iter=0; iter < 5; iter++) {
+ pExceeded= ((strip->prev) && (strip->prev->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h1[0] < strip->prev->end));
+ nExceeded= ((strip->next) && (strip->next->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h2[0] > strip->next->start));
+
+ if ((pExceeded && nExceeded) || (iter == 4) ) {
+ /* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise)
+ * - simply crop strip to fit within the bounds of the strips bounding it
+ * - if there were no neighbours, clear the transforms (make it default to the strip's current values)
+ */
+ if (strip->prev && strip->next) {
+ tdn->h1[0]= strip->prev->end;
+ tdn->h2[0]= strip->next->start;
+ }
+ else {
+ tdn->h1[0]= strip->start;
+ tdn->h2[0]= strip->end;
+ }
+ }
+ else if (nExceeded) {
+ /* move backwards */
+ float offset= tdn->h2[0] - strip->next->start;
+
+ tdn->h1[0] -= offset;
+ tdn->h2[0] -= offset;
+ }
+ else if (pExceeded) {
+ /* more forwards */
+ float offset= strip->prev->end - tdn->h1[0];
+
+ tdn->h1[0] += offset;
+ tdn->h2[0] += offset;
+ }
+ else /* all is fine and well */
+ break;
+ }
+
+ /* handle auto-snapping */
+ switch (snla->autosnap) {
+ case SACTSNAP_FRAME: /* snap to nearest frame/time */
+ if (snla->flag & SNLA_DRAWTIME) {
+ tdn->h1[0]= (float)( floor((tdn->h1[0]/secf) + 0.5f) * secf );
+ tdn->h2[0]= (float)( floor((tdn->h2[0]/secf) + 0.5f) * secf );
+ }
+ else {
+ tdn->h1[0]= (float)( floor(tdn->h1[0]+0.5f) );
+ tdn->h2[0]= (float)( floor(tdn->h2[0]+0.5f) );
+ }
+ break;
+
+ case SACTSNAP_MARKER: /* snap to nearest marker */
+ tdn->h1[0]= (float)ED_markers_find_nearest_marker_time(&t->scene->markers, tdn->h1[0]);
+ tdn->h2[0]= (float)ED_markers_find_nearest_marker_time(&t->scene->markers, tdn->h2[0]);
+ break;
+ }
+
+ /* use RNA to write the values... */
+ // TODO: do we need to write in 2 passes to make sure that no truncation goes on?
+ RNA_pointer_create(NULL, &RNA_NlaStrip, strip, &strip_ptr);
+
+ RNA_float_set(&strip_ptr, "start_frame", tdn->h1[0]);
+ RNA_float_set(&strip_ptr, "end_frame", tdn->h2[0]);
+
+ /* flush transforms to child strips (since this should be a meta) */
+ BKE_nlameta_flush_transforms(strip);
+
+
+ /* now, check if we need to try and move track
+ * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved
+ */
+ delta_y1= ((int)tdn->h1[1] / NLACHANNEL_STEP - tdn->trackIndex);
+ delta_y2= ((int)tdn->h2[1] / NLACHANNEL_STEP - tdn->trackIndex);
+
+ if (delta_y1 || delta_y2) {
+ NlaTrack *track;
+ int delta = (delta_y2) ? delta_y2 : delta_y1;
+ int n;
+
+ /* move in the requested direction, checking at each layer if there's space for strip to pass through,
+ * stopping on the last track available or that we're able to fit in
+ */
+ if (delta > 0) {
+ for (track=tdn->nlt->next, n=0; (track) && (n < delta); track=track->next, n++) {
+ /* check if space in this track for the strip */
+ if (BKE_nlatrack_has_space(track, strip->start, strip->end)) {
+ /* move strip to this track */
+ BLI_remlink(&tdn->nlt->strips, strip);
+ BKE_nlatrack_add_strip(track, strip);
+
+ tdn->nlt= track;
+ tdn->trackIndex += (n + 1); /* + 1, since n==0 would mean that we didn't change track */
+ }
+ else /* can't move any further */
+ break;
+ }
+ }
+ else {
+ /* make delta 'positive' before using it, since we now know to go backwards */
+ delta= -delta;
+
+ for (track=tdn->nlt->prev, n=0; (track) && (n < delta); track=track->prev, n++) {
+ /* check if space in this track for the strip */
+ if (BKE_nlatrack_has_space(track, strip->start, strip->end)) {
+ /* move strip to this track */
+ BLI_remlink(&tdn->nlt->strips, strip);
+ BKE_nlatrack_add_strip(track, strip);
+
+ tdn->nlt= track;
+ tdn->trackIndex -= (n - 1); /* - 1, since n==0 would mean that we didn't change track */
+ }
+ else /* can't move any further */
+ break;
+ }
+ }
+ }
}
}
else if (t->obedit) {
if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
Curve *cu= t->obedit->data;
Nurb *nu= cu->editnurb->first;
-
+
DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
-
+
if (t->state == TRANS_CANCEL) {
while(nu) {
calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
@@ -450,7 +596,7 @@ void recalcData(TransInfo *t)
else if(t->obedit->type==OB_LATTICE) {
Lattice *la= t->obedit->data;
DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
-
+
if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
}
else if (t->obedit->type == OB_MESH) {
@@ -460,7 +606,7 @@ void recalcData(TransInfo *t)
flushTransUVs(t);
if(sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_re_solve();
-
+
DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA);
} else {
BMEditMesh *em = ((Mesh*)t->obedit->data)->edit_btmesh;
@@ -475,11 +621,11 @@ void recalcData(TransInfo *t)
}
if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
editbmesh_apply_to_mirror(t);
-
+
DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
-
- BMEdit_RecalcTesselation(em);
+
EDBM_RecalcNormals(em);
+ BMEdit_RecalcTesselation(em);
}
}
else if(t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
@@ -488,10 +634,10 @@ void recalcData(TransInfo *t)
EditBone *ebo;
TransData *td = t->data;
int i;
-
+
/* Ensure all bones are correctly adjusted */
for (ebo = edbo->first; ebo; ebo = ebo->next){
-
+
if ((ebo->flag & BONE_CONNECTED) && ebo->parent){
/* If this bone has a parent tip that has been moved */
if (ebo->parent->flag & BONE_TIPSEL){
@@ -504,7 +650,7 @@ void recalcData(TransInfo *t)
if(t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head;
}
}
-
+
/* on extrude bones, oldlength==0.0f, so we scale radius of points */
ebo->length= VecLenf(ebo->head, ebo->tail);
if(ebo->oldlength==0.0f) {
@@ -524,8 +670,8 @@ void recalcData(TransInfo *t)
ebo->oldlength= ebo->length;
}
}
-
-
+
+
if (t->mode != TFM_BONE_ROLL)
{
/* fix roll */
@@ -535,10 +681,10 @@ void recalcData(TransInfo *t)
{
float vec[3], up_axis[3];
float qrot[4];
-
+
ebo = td->extra;
VECCOPY(up_axis, td->axismtx[2]);
-
+
if (t->mode != TFM_ROTATION)
{
VecSubf(vec, ebo->tail, ebo->head);
@@ -550,15 +696,15 @@ void recalcData(TransInfo *t)
{
Mat3MulVecfl(t->mat, up_axis);
}
-
+
ebo->roll = ED_rollBoneToVector(ebo, up_axis);
}
}
}
-
- if(arm->flag & ARM_MIRROR_EDIT)
+
+ if(arm->flag & ARM_MIRROR_EDIT)
transform_armature_mirror_update(t->obedit);
-
+
}
else
DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
@@ -566,7 +712,7 @@ void recalcData(TransInfo *t)
else if( (t->flag & T_POSE) && t->poseobj) {
Object *ob= t->poseobj;
bArmature *arm= ob->data;
-
+
/* if animtimer is running, and the object already has animation data,
* check if the auto-record feature means that we should record 'samples'
* (i.e. uneditable animation values)
@@ -577,7 +723,7 @@ void recalcData(TransInfo *t)
short targetless_ik= (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet!
autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
}
-
+
/* old optimize trick... this enforces to bypass the depgraph */
if (!(arm->flag & ARM_DELAYDEFORM)) {
DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
@@ -588,13 +734,13 @@ void recalcData(TransInfo *t)
else {
for(base= FIRSTBASE; base; base= base->next) {
Object *ob= base->object;
-
+
/* this flag is from depgraph, was stored in initialize phase, handled in drawview.c */
if(base->flag & BA_HAS_RECALC_OB)
ob->recalc |= OB_RECALC_OB;
if(base->flag & BA_HAS_RECALC_DATA)
ob->recalc |= OB_RECALC_DATA;
-
+
/* if object/base is selected */
if ((base->flag & SELECT) || (ob->flag & SELECT)) {
/* if animtimer is running, and the object already has animation data,
@@ -607,13 +753,13 @@ void recalcData(TransInfo *t)
autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode);
}
}
-
+
/* proxy exception */
if(ob->proxy)
ob->proxy->recalc |= ob->recalc;
if(ob->proxy_group)
group_tag_recalc(ob->proxy_group->dup_group);
- }
+ }
}
/* update shaded drawmode while transform */
@@ -625,22 +771,22 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
{
float v1[3], v2[3], v3[3];
char col[3], col2[3];
-
+
if (t->spacetype == SPACE_VIEW3D)
{
View3D *v3d = t->view;
-
+
glPushMatrix();
-
+
//if(t->obedit) glLoadMatrixf(t->obedit->obmat); // sets opengl viewing
-
-
+
+
VecCopyf(v3, dir);
VecMulf(v3, v3d->far);
-
+
VecSubf(v2, center, v3);
VecAddf(v1, center, v3);
-
+
if (options & DRAWLIGHT) {
col[0] = col[1] = col[2] = 220;
}
@@ -649,13 +795,13 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
}
UI_make_axis_color(col, col2, axis);
glColor3ubv((GLubyte *)col2);
-
+
setlinestyle(0);
- glBegin(GL_LINE_STRIP);
- glVertex3fv(v1);
- glVertex3fv(v2);
+ glBegin(GL_LINE_STRIP);
+ glVertex3fv(v1);
+ glVertex3fv(v2);
glEnd();
-
+
glPopMatrix();
}
}
@@ -668,20 +814,22 @@ void resetTransRestrictions(TransInfo *t)
int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
Scene *sce = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
ARegion *ar = CTX_wm_region(C);
ScrArea *sa = CTX_wm_area(C);
Object *obedit = CTX_data_edit_object(C);
-
+
/* moving: is shown in drawobject() (transform color) */
-// TRANSFORM_FIX_ME
+// TRANSFORM_FIX_ME
// if(obedit || (t->flag & T_POSE) ) G.moving= G_TRANSFORM_EDIT;
// else if(G.f & G_PARTICLEEDIT) G.moving= G_TRANSFORM_PARTICLE;
// else G.moving= G_TRANSFORM_OBJ;
-
+
t->scene = sce;
t->sa = sa;
t->ar = ar;
t->obedit = obedit;
+ t->settings = ts;
t->data = NULL;
t->ext = NULL;
@@ -689,14 +837,14 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->helpline = HLP_NONE;
t->flag = 0;
-
+
t->redraw = 1; /* redraw first time */
-
+
if (event)
{
t->imval[0] = event->x - t->ar->winrct.xmin;
t->imval[1] = event->y - t->ar->winrct.ymin;
-
+
t->event_type = event->type;
}
else
@@ -704,7 +852,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->imval[0] = 0;
t->imval[1] = 0;
}
-
+
t->con.imval[0] = t->imval[0];
t->con.imval[1] = t->imval[1];
@@ -721,27 +869,27 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->vec[0] =
t->vec[1] =
t->vec[2] = 0.0f;
-
+
t->center[0] =
t->center[1] =
t->center[2] = 0.0f;
-
+
Mat3One(t->mat);
-
+
t->spacetype = sa->spacetype;
if(t->spacetype == SPACE_VIEW3D)
{
View3D *v3d = sa->spacedata.first;
-
+
t->view = v3d;
t->animtimer= CTX_wm_screen(C)->animtimer;
-
+
if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
if (op && RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_orientation"))
{
- t->current_orientation = RNA_int_get(op->ptr, "constraint_orientation");
+ t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C) - 1)
{
@@ -755,15 +903,16 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
else if(t->spacetype==SPACE_IMAGE || t->spacetype==SPACE_NODE)
{
+ SpaceImage *sima = sa->spacedata.first;
// XXX for now, get View2D from the active region
t->view = &ar->v2d;
- t->around = ar->v2d.around;
+ t->around = sima->around;
}
else
{
// XXX for now, get View2D from the active region
t->view = &ar->v2d;
-
+
t->around = V3D_CENTER;
}
@@ -777,7 +926,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
// Need stuff to take it from edit mesh or whatnot here
else
{
- if (t->obedit && t->obedit->type == OB_MESH && sce->toolsettings->editbutflag & B_MESH_X_MIRROR)
+ if (t->obedit && t->obedit->type == OB_MESH && ts->editbutflag & B_MESH_X_MIRROR)
{
t->flag |= T_MIRROR;
}
@@ -797,10 +946,10 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
else
{
- if ((t->options & CTX_NO_PET) == 0 && (sce->proportional)) {
+ if ((t->options & CTX_NO_PET) == 0 && (ts->proportional)) {
t->flag |= T_PROP_EDIT;
-
- if(sce->proportional == 2)
+
+ if(ts->proportional == 2)
t->flag |= T_PROP_CONNECTED; // yes i know, has to become define
}
}
@@ -811,16 +960,16 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
else
{
- t->prop_size = sce->toolsettings->proportional_size;
+ t->prop_size = ts->proportional_size;
}
-
+
if (op && RNA_struct_find_property(op->ptr, "proportional_editing_falloff") && RNA_property_is_set(op->ptr, "proportional_editing_falloff"))
{
t->prop_mode = RNA_enum_get(op->ptr, "proportional_editing_falloff");
}
else
{
- t->prop_mode = sce->prop_mode;
+ t->prop_mode = ts->prop_mode;
}
/* TRANSFORM_FIX_ME rna restrictions */
@@ -832,12 +981,12 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
setTransformViewMatrices(t);
initNumInput(&t->num);
initNDofInput(&t->ndof);
-
+
return 1;
}
/* Here I would suggest only TransInfo related issues, like free data & reset vars. Not redraws */
-void postTrans (TransInfo *t)
+void postTrans (TransInfo *t)
{
TransData *td;
@@ -845,7 +994,7 @@ void postTrans (TransInfo *t)
{
ED_region_draw_cb_exit(t->ar->type, t->draw_handle);
}
-
+
/* postTrans can be called when nothing is selected, so data is NULL already */
if (t->data) {
int a;
@@ -853,7 +1002,7 @@ void postTrans (TransInfo *t)
/* since ipokeys are optional on objects, we mallocced them per trans-data */
for(a=0, td= t->data; a<t->total; a++, td++) {
if(td->tdi) MEM_freeN(td->tdi);
- if (td->flag & TD_BEZTRIPLE) MEM_freeN(td->hdata);
+ if (td->flag & TD_BEZTRIPLE) MEM_freeN(td->hdata);
}
MEM_freeN(t->data);
}
@@ -869,21 +1018,15 @@ void postTrans (TransInfo *t)
if(sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_end(t->state == TRANS_CANCEL);
}
- else if(t->spacetype==SPACE_ACTION) {
+ else if(ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA)) {
if (t->customData)
MEM_freeN(t->customData);
- } else if (t->spacetype==SPACE_VIEW3D) {
- if (t->obedit) {
- /*retesselate*/
- //EDBM_Tesselate(((Mesh*)t->obedit->data)->edit_mesh);
- }
- }
-}
+ }}
void applyTransObjects(TransInfo *t)
{
TransData *td;
-
+
for (td = t->data; td < t->data + t->total; td++) {
VECCOPY(td->iloc, td->loc);
if (td->ext->rot) {
@@ -892,9 +1035,9 @@ void applyTransObjects(TransInfo *t)
if (td->ext->size) {
VECCOPY(td->ext->isize, td->ext->size);
}
- }
+ }
recalcData(t);
-}
+}
/* helper for below */
static void restore_ipokey(float *poin, float *old)
@@ -927,15 +1070,15 @@ static void restoreElement(TransData *td) {
}
}
}
-
+
if (td->flag & TD_BEZTRIPLE) {
*(td->hdata->h1) = td->hdata->ih1;
*(td->hdata->h2) = td->hdata->ih2;
}
-
+
if(td->tdi) {
TransDataIpokey *tdi= td->tdi;
-
+
restore_ipokey(tdi->locx, tdi->oldloc);
restore_ipokey(tdi->locy, tdi->oldloc+1);
restore_ipokey(tdi->locz, tdi->oldloc+2);
@@ -943,7 +1086,7 @@ static void restoreElement(TransData *td) {
restore_ipokey(tdi->rotx, tdi->oldrot);
restore_ipokey(tdi->roty, tdi->oldrot+1);
restore_ipokey(tdi->rotz, tdi->oldrot+2);
-
+
restore_ipokey(tdi->sizex, tdi->oldsize);
restore_ipokey(tdi->sizey, tdi->oldsize+1);
restore_ipokey(tdi->sizez, tdi->oldsize+2);
@@ -953,13 +1096,13 @@ static void restoreElement(TransData *td) {
void restoreTransObjects(TransInfo *t)
{
TransData *td;
-
+
for (td = t->data; td < t->data + t->total; td++) {
restoreElement(td);
}
-
+
Mat3One(t->mat);
-
+
recalcData(t);
}
@@ -968,7 +1111,7 @@ void calculateCenter2D(TransInfo *t)
if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
float vec[3];
-
+
VECCOPY(vec, t->center);
Mat4MulVecfl(ob->obmat, vec);
projectIntView(t, vec, t->center2d);
@@ -989,13 +1132,13 @@ void calculateCenterCursor(TransInfo *t)
if (t->flag & (T_EDIT|T_POSE)) {
Object *ob = t->obedit?t->obedit:t->poseobj;
float mat[3][3], imat[3][3];
-
+
VecSubf(t->center, t->center, ob->obmat[3]);
Mat3CpyMat4(mat, ob->obmat);
Mat3Inv(imat, mat);
Mat3MulVecfl(imat, t->center);
}
-
+
calculateCenter2D(t);
}
@@ -1003,13 +1146,13 @@ void calculateCenterCursor2D(TransInfo *t)
{
View2D *v2d= t->view;
float aspx=1.0, aspy=1.0;
-
+
if(t->spacetype==SPACE_IMAGE) /* only space supported right now but may change */
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
if (v2d) {
- t->center[0] = v2d->cursor[0] * aspx;
- t->center[1] = v2d->cursor[1] * aspy;
+ t->center[0] = v2d->cursor[0] * aspx;
+ t->center[1] = v2d->cursor[1] * aspy;
}
calculateCenter2D(t);
@@ -1020,7 +1163,7 @@ void calculateCenterMedian(TransInfo *t)
float partial[3] = {0.0f, 0.0f, 0.0f};
int total = 0;
int i;
-
+
for(i = 0; i < t->total; i++) {
if (t->data[i].flag & TD_SELECTED) {
if (!(t->data[i].flag & TD_NOCENTER))
@@ -1030,8 +1173,8 @@ void calculateCenterMedian(TransInfo *t)
}
}
else {
- /*
- All the selected elements are at the head of the array
+ /*
+ All the selected elements are at the head of the array
which means we can stop when it finds unselected data
*/
break;
@@ -1056,8 +1199,8 @@ void calculateCenterBound(TransInfo *t)
MinMax3(min, max, t->data[i].center);
}
else {
- /*
- All the selected elements are at the head of the array
+ /*
+ All the selected elements are at the head of the array
which means we can stop when it finds unselected data
*/
break;
@@ -1074,7 +1217,7 @@ void calculateCenterBound(TransInfo *t)
calculateCenter2D(t);
}
-void calculateCenter(TransInfo *t)
+void calculateCenter(TransInfo *t)
{
switch(t->around) {
case V3D_CENTER:
@@ -1106,7 +1249,7 @@ void calculateCenter(TransInfo *t)
break;
} /* END EDIT MODE ACTIVE ELEMENT */
#endif
-
+
calculateCenterMedian(t);
if((t->flag & (T_EDIT|T_POSE))==0)
{
@@ -1118,7 +1261,7 @@ void calculateCenter(TransInfo *t)
projectIntView(t, t->center, t->center2d);
}
}
-
+
}
}
@@ -1138,21 +1281,21 @@ void calculateCenter(TransInfo *t)
View3D *v3d = t->view;
Scene *scene = t->scene;
RegionView3D *rv3d = t->ar->regiondata;
-
+
if(v3d->camera == OBACT && rv3d->persp==V3D_CAMOB)
{
float axis[3];
/* persinv is nasty, use viewinv instead, always right */
VECCOPY(axis, t->viewinv[2]);
Normalize(axis);
-
+
/* 6.0 = 6 grid units */
axis[0]= t->center[0]- 6.0f*axis[0];
axis[1]= t->center[1]- 6.0f*axis[1];
axis[2]= t->center[2]- 6.0f*axis[2];
-
+
projectIntView(t, axis, t->center2d);
-
+
/* rotate only needs correct 2d center, grab needs initgrabz() value */
if(t->mode==TFM_TRANSLATION)
{
@@ -1161,7 +1304,7 @@ void calculateCenter(TransInfo *t)
}
}
}
- }
+ }
if(t->spacetype==SPACE_VIEW3D)
{
@@ -1169,14 +1312,14 @@ void calculateCenter(TransInfo *t)
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
float vec[3];
-
+
VECCOPY(vec, t->center);
Mat4MulVecfl(ob->obmat, vec);
initgrabz(t->ar->regiondata, vec[0], vec[1], vec[2]);
}
else {
initgrabz(t->ar->regiondata, t->center[0], t->center[1], t->center[2]);
- }
+ }
}
}
@@ -1186,18 +1329,18 @@ void calculatePropRatio(TransInfo *t)
int i;
float dist;
short connected = t->flag & T_PROP_CONNECTED;
-
+
if (t->flag & T_PROP_EDIT) {
for(i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_SELECTED) {
td->factor = 1.0f;
}
- else if ((connected &&
+ else if ((connected &&
(td->flag & TD_NOTCONNECTED || td->dist > t->prop_size))
||
(connected == 0 &&
td->rdist > t->prop_size)) {
- /*
+ /*
The elements are sorted according to their dist member in the array,
that means we can stop when it finds one element outside of the propsize.
*/
@@ -1209,7 +1352,7 @@ void calculatePropRatio(TransInfo *t)
/* Use rdist for falloff calculations, it is the real distance */
td->flag &= ~TD_NOACTION;
dist= (t->prop_size-td->rdist)/t->prop_size;
-
+
/*
* Clamp to positive numbers.
* Certain corner cases with connectivity and individual centers
@@ -1217,7 +1360,7 @@ void calculatePropRatio(TransInfo *t)
*/
if (dist < 0.0f)
dist = 0.0f;
-
+
switch(t->prop_mode) {
case PROP_SHARP:
td->factor= dist*dist;
@@ -1280,24 +1423,19 @@ void calculatePropRatio(TransInfo *t)
}
}
-TransInfo *BIF_GetTransInfo()
-{
- return NULL;
-}
-
float get_drawsize(ARegion *ar, float *co)
{
RegionView3D *rv3d= ar->regiondata;
float size, vec[3], len1, len2;
-
+
/* size calculus, depending ortho/persp settings, like initgrabz() */
size= rv3d->persmat[0][3]*co[0]+ rv3d->persmat[1][3]*co[1]+ rv3d->persmat[2][3]*co[2]+ rv3d->persmat[3][3];
-
+
VECCOPY(vec, rv3d->persinv[0]);
len1= Normalize(vec);
VECCOPY(vec, rv3d->persinv[1]);
len2= Normalize(vec);
-
+
size*= 0.01f*(len1>len2?len1:len2);
/* correct for window size to make widgets appear fixed size */
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 4d721a83c78..ae8aacb3477 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -1,5 +1,5 @@
/**
- * $Id: transform_input.c 18142 2008-12-29 07:19:16Z aligorith $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,6 +26,7 @@
#include <math.h>
#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
#include "BLI_arithb.h"
@@ -34,7 +35,7 @@
#include "transform.h"
-
+
/* ************************** INPUT FROM MOUSE *************************** */
void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
@@ -52,7 +53,7 @@ void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
{
convertViewVec(t, output, (short)(mval[0] - t->imval[0]), (short)(mval[1] - t->imval[1]));
}
-
+
}
void InputSpring(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
@@ -64,11 +65,11 @@ void InputSpring(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
dx = (float)(mi->center[0] - mi->precision_mval[0]);
dy = (float)(mi->center[1] - mi->precision_mval[1]);
ratio = (float)sqrt( dx*dx + dy*dy);
-
+
dx= (float)(mi->center[0] - mval[0]);
dy= (float)(mi->center[1] - mval[1]);
precise_ratio = (float)sqrt( dx*dx + dy*dy);
-
+
ratio = (ratio + (precise_ratio - ratio) / 10.0f) / mi->factor;
}
else
@@ -77,16 +78,16 @@ void InputSpring(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
dy = (float)(mi->center[1] - mval[1]);
ratio = (float)sqrt( dx*dx + dy*dy) / mi->factor;
}
-
+
output[0] = ratio;
}
void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
{
InputSpring(t, mi, mval, output);
-
+
/* flip scale */
- if ((mi->center[0] - mval[0]) * (mi->center[0] - mi->imval[0]) +
+ if ((mi->center[0] - mval[0]) * (mi->center[0] - mi->imval[0]) +
(mi->center[1] - mval[1]) * (mi->center[1] - mi->imval[1]) < 0)
{
output[0] *= -1.0f;
@@ -95,7 +96,7 @@ void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3
void InputTrackBall(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
{
-
+
if(mi->precision)
{
output[0] = ( mi->imval[1] - mi->precision_mval[1] ) + ( mi->precision_mval[1] - mval[1] ) * 0.1f;
@@ -106,7 +107,7 @@ void InputTrackBall(TransInfo *t, MouseInput *mi, short mval[2], float output[3]
output[0] = (float)( mi->imval[1] - mval[1] );
output[1] = (float)( mval[0] - mi->imval[0] );
}
-
+
output[0] *= mi->factor;
output[1] *= mi->factor;
}
@@ -124,7 +125,7 @@ void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float out
else {
x = mval[0];
}
-
+
output[0] = (x - pad) / (t->ar->winx - 2 * pad);
}
@@ -133,7 +134,7 @@ void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float
InputVector(t, mi, mval, vec);
Projf(vec, vec, t->viewinv[0]);
-
+
output[0] = Inpf(t->viewinv[0], vec) * 2.0f;
}
@@ -149,7 +150,7 @@ void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float outpu
else {
y = mval[0];
}
-
+
output[0] = (y - pad) / (t->ar->winy - 2 * pad);
}
@@ -158,7 +159,7 @@ void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float ou
InputVector(t, mi, mval, vec);
Projf(vec, vec, t->viewinv[1]);
-
+
output[0] = Inpf(t->viewinv[1], vec) * 2.0f;
}
@@ -181,7 +182,7 @@ void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
/* (A*B?A*B:1.0f) this takes care of potential divide by zero errors */
float dphi;
-
+
dphi = saacos((float)deler);
if( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
@@ -189,33 +190,33 @@ void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3])
* approximate the angle with the oposite side of the normalized triangle
* This is a good approximation here since the smallest acos value seems to be around
* 0.02 degree and lower values don't even have a 0.01% error compared to the approximation
- * */
+ * */
if (dphi == 0)
{
double dx, dy;
-
+
dx2 /= A;
dy2 /= A;
-
+
dx1 /= B;
dy1 /= B;
-
+
dx = dx1 - dx2;
dy = dy1 - dy2;
-
+
dphi = sqrt(dx*dx + dy*dy);
if( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
}
-
+
if(mi->precision) dphi = dphi/30.0f;
-
+
/* if no delta angle, don't update initial position */
if (dphi != 0)
{
mi->imval[0] = mval[0];
mi->imval[1] = mval[1];
}
-
+
output[0] += dphi;
}
@@ -226,7 +227,7 @@ void initMouseInput(TransInfo *t, MouseInput *mi, int center[2], short mval[2])
mi->center[0] = center[0];
mi->center[1] = center[1];
-
+
mi->imval[0] = mval[0];
mi->imval[1] = mval[1];
}
@@ -246,7 +247,7 @@ static void calcSpringFactor(MouseInput *mi)
void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
{
-
+
switch(mode)
{
case INPUT_VECTOR:
@@ -269,7 +270,7 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
break;
case INPUT_TRACKBALL:
/* factor has to become setting or so */
- mi->factor = 0.1f;
+ mi->factor = 0.01f;
mi->apply = InputTrackBall;
t->helpline = HLP_TRACKBALL;
break;
@@ -295,8 +296,8 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
mi->apply = NULL;
break;
}
-
- /* bootstrap mouse input with initial values */
+
+ /* bootstrap mouse input with initial values */
applyMouseInput(t, mi, mi->imval, t->values);
}
@@ -311,7 +312,7 @@ void applyMouseInput(TransInfo *t, MouseInput *mi, short mval[2], float output[3
int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
{
int redraw = 0;
-
+
switch (event->type)
{
case LEFTSHIFTKEY:
@@ -333,6 +334,6 @@ int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
redraw = 1;
break;
}
-
+
return redraw;
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 99d7805b938..bf87319d05c 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -27,18 +27,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
-// TRANSFORM_FIX_ME
-// Disable everything here, don't need it for now
-#if 0
-
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifndef WIN32
#include <unistd.h>
#else
@@ -61,31 +53,36 @@
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
+#include "RNA_access.h"
+
#include "BKE_armature.h"
+#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_lattice.h"
+#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
#include "BLI_arithb.h"
#include "BLI_editVert.h"
-#include "BIF_editarmature.h"
#include "BIF_gl.h"
-#include "BIF_mywindow.h"
-#include "BIF_resources.h"
-#include "BIF_screen.h"
-#include "BIF_space.h"
-#include "BIF_transform.h"
-#include "BIF_editmesh.h"
-#include "BIF_editparticle.h"
-
-#include "BSE_edit.h"
-#include "BSE_view.h"
-#include "BDR_drawobject.h"
-
-#include "blendef.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_armature.h"
+#include "ED_mesh.h"
+#include "ED_particle.h"
+#include "ED_space_api.h"
+#include "ED_transform.h"
+#include "ED_view3d.h"
+
+#include "UI_resources.h"
+
+/* local module include */
#include "transform.h"
/* return codes for select, and drawing flags */
@@ -113,26 +110,23 @@
#define MAN_GHOST 1
#define MAN_MOVECOL 2
-/* GLOBAL VARIABLE THAT SHOULD MOVED TO SCREEN MEMBER OR SOMETHING */
-extern TransInfo Trans;
-
static int is_mat4_flipped(float mat[][4])
{
float vec[3];
-
+
Crossf(vec, mat[0], mat[1]);
if( Inpf(vec, mat[2]) < 0.0 ) return 1;
return 0;
-}
+}
/* transform widget center calc helper for below */
-static void calc_tw_center(float *co)
+static void calc_tw_center(Scene *scene, float *co)
{
- float *twcent= G.scene->twcent;
- float *min= G.scene->twmin;
- float *max= G.scene->twmax;
-
+ float *twcent= scene->twcent;
+ float *min= scene->twmin;
+ float *max= scene->twmax;
+
DO_MINMAX(co, min, max);
VecAddf(twcent, twcent, co);
}
@@ -145,7 +139,7 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags)
*drawflags &= ~MAN_TRANS_Y;
if(protectflag & OB_LOCK_LOCZ)
*drawflags &= ~MAN_TRANS_Z;
-
+
if(protectflag & OB_LOCK_ROTX)
*drawflags &= ~MAN_ROT_X;
if(protectflag & OB_LOCK_ROTY)
@@ -162,13 +156,13 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags)
}
/* for pose mode */
-static void stats_pose(View3D *v3d, bPoseChannel *pchan)
+static void stats_pose(Scene *scene, View3D *v3d, bPoseChannel *pchan)
{
Bone *bone= pchan->bone;
-
+
if(bone) {
if (bone->flag & BONE_TRANSFORM) {
- calc_tw_center(pchan->pose_head);
+ calc_tw_center(scene, pchan->pose_head);
protectflag_to_drawflags(pchan->protectflag, &v3d->twdrawflag);
}
}
@@ -181,91 +175,69 @@ static void stats_editbone(View3D *v3d, EditBone *ebo)
protectflag_to_drawflags(OB_LOCK_LOC|OB_LOCK_ROT|OB_LOCK_SCALE, &v3d->twdrawflag);
}
-/* only counts the parent selection, and tags transform flag */
-/* bad call... should re-use method from transform_conversion once */
-static void count_bone_select(TransInfo *t, bArmature *arm, ListBase *lb, int do_it)
-{
- Bone *bone;
- int do_next;
-
- for(bone= lb->first; bone; bone= bone->next) {
- bone->flag &= ~BONE_TRANSFORM;
- do_next= do_it;
- if(do_it) {
- if(bone->layer & arm->layer) {
- if (bone->flag & BONE_SELECTED) {
- /* We don't let connected children get "grabbed" */
- if ( (t->mode!=TFM_TRANSLATION) || (bone->flag & BONE_CONNECTED)==0 ) {
- bone->flag |= BONE_TRANSFORM;
- t->total++;
- do_next= 0; // no transform on children if one parent bone is selected
- }
- }
- }
- }
- count_bone_select(t, arm, &bone->childbase, do_next);
- }
-}
-
/* centroid, boundbox, of selection */
/* returns total items selected */
-int calc_manipulator_stats(ScrArea *sa)
+int calc_manipulator_stats(const bContext *C)
{
- TransInfo *t;
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= CTX_wm_region(C);
+ Scene *scene= CTX_data_scene(C);
+ Object *obedit= CTX_data_edit_object(C);
View3D *v3d= sa->spacedata.first;
+ RegionView3D *rv3d= ar->regiondata;
Base *base;
Object *ob= OBACT;
float normal[3]={0.0, 0.0, 0.0};
float plane[3]={0.0, 0.0, 0.0};
- int a, totsel=0;
+ int a, totsel= 0;
-//XXX t = BIF_GetTransInfo();
-
/* transform widget matrix */
- Mat4One(v3d->twmat);
-
+ Mat4One(rv3d->twmat);
+
v3d->twdrawflag= 0xFFFF;
-
+
/* transform widget centroid/center */
- G.scene->twcent[0]= G.scene->twcent[1]= G.scene->twcent[2]= 0.0f;
- INIT_MINMAX(G.scene->twmin, G.scene->twmax);
-
- if(t->obedit) {
- ob= t->obedit;
- if((ob->lay & G.vd->lay)==0) return 0;
-
- if(t->obedit->type==OB_MESH) {
- EditMesh *em = NULL; // TRANSFORM_FIX_ME
- EditVert *eve;
- EditSelection ese;
+ scene->twcent[0]= scene->twcent[1]= scene->twcent[2]= 0.0f;
+ INIT_MINMAX(scene->twmin, scene->twmax);
+
+ if(obedit) {
+ ob= obedit;
+ if((ob->lay & v3d->lay)==0) return 0;
+
+ if(obedit->type==OB_MESH) {
+ BMEditMesh *em = ((Mesh*)obedit->data)->edit_btmesh;
+ BMesh *bm = em->bm;
+ BMVert *eve;
+ BMEditSelection ese;
+ BMIter iter;
float vec[3]= {0,0,0};
-
+
/* USE LAST SELECTE WITH ACTIVE */
- if (G.vd->around==V3D_ACTIVE && EM_get_actSelection(&ese)) {
- EM_editselection_center(vec, &ese);
- calc_tw_center(vec);
+ if (v3d->around==V3D_ACTIVE && EDBM_get_actSelection(em, &ese)) {
+ EDBM_editselection_center(em, vec, &ese);
+ calc_tw_center(scene, vec);
totsel= 1;
} else {
/* do vertices for center, and if still no normal found, use vertex normals */
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(eve->f & SELECT) {
+ BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+ if(BM_TestHFlag(eve, BM_SELECT)) {
totsel++;
- calc_tw_center(eve->co);
+ calc_tw_center(scene, eve->co);
}
}
}
} /* end editmesh */
- else if (t->obedit->type==OB_ARMATURE){
- bArmature *arm= t->obedit->data;
+ else if (obedit->type==OB_ARMATURE){
+ bArmature *arm= obedit->data;
EditBone *ebo;
- for (ebo=G.edbo.first;ebo;ebo=ebo->next){
+ for (ebo= arm->edbo->first; ebo; ebo=ebo->next){
if(ebo->layer & arm->layer) {
if (ebo->flag & BONE_TIPSEL) {
- calc_tw_center(ebo->tail);
+ calc_tw_center(scene, ebo->tail);
totsel++;
}
if (ebo->flag & BONE_ROOTSEL) {
- calc_tw_center(ebo->head);
+ calc_tw_center(scene, ebo->head);
totsel++;
}
if (ebo->flag & BONE_SELECTED) {
@@ -274,12 +246,12 @@ int calc_manipulator_stats(ScrArea *sa)
}
}
}
- else if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
- Curve *cu= t->obedit->data;
+ else if ELEM(obedit->type, OB_CURVE, OB_SURF) {
+ Curve *cu= obedit->data;
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
-
+
nu= cu->editnurb->first;
while(nu) {
if((nu->type & 7)==CU_BEZIER) {
@@ -292,25 +264,25 @@ int calc_manipulator_stats(ScrArea *sa)
*/
if (G.f & G_HIDDENHANDLES) {
if (bezt->f2 & SELECT) {
- calc_tw_center(bezt->vec[1]);
+ calc_tw_center(scene, bezt->vec[1]);
totsel++;
}
}
else if ( (bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT ) {
- calc_tw_center(bezt->vec[1]);
+ calc_tw_center(scene, bezt->vec[1]);
totsel++;
}
else {
if(bezt->f1) {
- calc_tw_center(bezt->vec[0]);
+ calc_tw_center(scene, bezt->vec[0]);
totsel++;
}
if(bezt->f2) {
- calc_tw_center(bezt->vec[1]);
+ calc_tw_center(scene, bezt->vec[1]);
totsel++;
}
if(bezt->f3) {
- calc_tw_center(bezt->vec[2]);
+ calc_tw_center(scene, bezt->vec[2]);
totsel++;
}
}
@@ -322,7 +294,7 @@ int calc_manipulator_stats(ScrArea *sa)
a= nu->pntsu*nu->pntsv;
while(a--) {
if(bp->f1 & SELECT) {
- calc_tw_center(bp->vec);
+ calc_tw_center(scene, bp->vec);
totsel++;
}
bp++;
@@ -331,76 +303,71 @@ int calc_manipulator_stats(ScrArea *sa)
nu= nu->next;
}
}
- else if(t->obedit->type==OB_MBALL) {
+ else if(obedit->type==OB_MBALL) {
/* editmball.c */
- extern ListBase editelems; /* go away ! */
+ ListBase editelems= {NULL, NULL}; /* XXX */
MetaElem *ml, *ml_sel=NULL;
-
+
ml= editelems.first;
while(ml) {
if(ml->flag & SELECT) {
- calc_tw_center(&ml->x);
+ calc_tw_center(scene, &ml->x);
ml_sel = ml;
totsel++;
}
ml= ml->next;
}
}
- else if(t->obedit->type==OB_LATTICE) {
+ else if(obedit->type==OB_LATTICE) {
BPoint *bp;
- bp= editLatt->def;
-
- a= editLatt->pntsu*editLatt->pntsv*editLatt->pntsw;
+ Lattice *lt= obedit->data;
+
+ bp= lt->editlatt->def;
+
+ a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
while(a--) {
if(bp->f1 & SELECT) {
- calc_tw_center(bp->vec);
+ calc_tw_center(scene, bp->vec);
totsel++;
}
bp++;
}
}
-
+
/* selection center */
if(totsel) {
- VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid!
- Mat4MulVecfl(t->obedit->obmat, G.scene->twcent);
- Mat4MulVecfl(t->obedit->obmat, G.scene->twmin);
- Mat4MulVecfl(t->obedit->obmat, G.scene->twmax);
+ VecMulf(scene->twcent, 1.0f/(float)totsel); // centroid!
+ Mat4MulVecfl(obedit->obmat, scene->twcent);
+ Mat4MulVecfl(obedit->obmat, scene->twmin);
+ Mat4MulVecfl(obedit->obmat, scene->twmax);
}
}
else if(ob && (ob->flag & OB_POSEMODE)) {
bArmature *arm = ob->data;
bPoseChannel *pchan;
- int mode;
-
- if((ob->lay & G.vd->lay)==0) return 0;
-
- mode = Trans.mode;
- Trans.mode = TFM_ROTATION; // mislead counting bones... bah
-
- /* count total, we use same method as transform will do */
- Trans.total= 0;
- count_bone_select(&Trans, arm, &arm->bonebase, 1);
- totsel = Trans.total;
+ int mode = TFM_ROTATION; // mislead counting bones... bah. We don't know the manipulator mode, could be mixed
+
+ if((ob->lay & v3d->lay)==0) return 0;
+
+ totsel = count_set_pose_transflags(&mode, 0, ob);
+
if(totsel) {
/* use channels to get stats */
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- stats_pose(v3d, pchan);
+ stats_pose(scene, v3d, pchan);
}
-
- VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid!
- Mat4MulVecfl(ob->obmat, G.scene->twcent);
- Mat4MulVecfl(ob->obmat, G.scene->twmin);
- Mat4MulVecfl(ob->obmat, G.scene->twmax);
+
+ VecMulf(scene->twcent, 1.0f/(float)totsel); // centroid!
+ Mat4MulVecfl(ob->obmat, scene->twcent);
+ Mat4MulVecfl(ob->obmat, scene->twmin);
+ Mat4MulVecfl(ob->obmat, scene->twmax);
}
- /* restore, mode can be TFM_INIT */
- Trans.mode = mode;
}
else if(G.f & (G_VERTEXPAINT + G_TEXTUREPAINT + G_WEIGHTPAINT + G_SCULPTMODE)) {
;
}
else if(G.f & G_PARTICLEEDIT) {
- ParticleSystem *psys=PE_get_current(OBACT);
+ ParticleSystem *psys= PE_get_current(scene, ob);
ParticleData *pa = psys->particles;
ParticleEditKey *ek;
int k;
@@ -411,7 +378,7 @@ int calc_manipulator_stats(ScrArea *sa)
for(k=0, ek=psys->edit->keys[a]; k<pa->totkey; k++, ek++) {
if(ek->flag & PEK_SELECT) {
- calc_tw_center(ek->world_co);
+ calc_tw_center(scene, ek->world_co);
totsel++;
}
}
@@ -419,48 +386,43 @@ int calc_manipulator_stats(ScrArea *sa)
/* selection center */
if(totsel)
- VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid!
+ VecMulf(scene->twcent, 1.0f/(float)totsel); // centroid!
}
}
else {
-
+
/* we need the one selected object, if its not active */
ob= OBACT;
if(ob && !(ob->flag & SELECT)) ob= NULL;
-
- for(base= G.scene->base.first; base; base= base->next) {
- if TESTBASELIB(base) {
- if(ob==NULL)
+
+ for(base= scene->base.first; base; base= base->next) {
+ if TESTBASELIB(scene, base) {
+ if(ob==NULL)
ob= base->object;
- calc_tw_center(base->object->obmat[3]);
+ calc_tw_center(scene, base->object->obmat[3]);
protectflag_to_drawflags(base->object->protectflag, &v3d->twdrawflag);
totsel++;
}
}
-
+
/* selection center */
if(totsel) {
- VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid!
+ VecMulf(scene->twcent, 1.0f/(float)totsel); // centroid!
}
}
-
+
/* global, local or normal orientation? */
if(ob && totsel) {
-
+
switch(v3d->twmode) {
- case V3D_MANIP_GLOBAL:
- strcpy(t->spacename, "global");
- break;
-
+
case V3D_MANIP_NORMAL:
- if(t->obedit || ob->flag & OB_POSEMODE) {
+ if(obedit || ob->flag & OB_POSEMODE) {
float mat[3][3];
int type;
-
- strcpy(t->spacename, "normal");
-
- type = getTransformOrientation(normal, plane, (G.vd->around == V3D_ACTIVE));
-
+
+ type = getTransformOrientation(C, normal, plane, (v3d->around == V3D_ACTIVE));
+
switch (type)
{
case ORIENTATION_NORMAL:
@@ -488,57 +450,55 @@ int calc_manipulator_stats(ScrArea *sa)
}
break;
}
-
+
if (type == ORIENTATION_NONE)
{
- Mat4One(v3d->twmat);
+ Mat4One(rv3d->twmat);
}
else
{
- Mat4CpyMat3(v3d->twmat, mat);
+ Mat4CpyMat3(rv3d->twmat, mat);
}
break;
}
/* no break we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
- strcpy(t->spacename, "local");
- Mat4CpyMat4(v3d->twmat, ob->obmat);
- Mat4Ortho(v3d->twmat);
+ Mat4CpyMat4(rv3d->twmat, ob->obmat);
+ Mat4Ortho(rv3d->twmat);
break;
-
+
case V3D_MANIP_VIEW:
{
float mat[3][3];
- strcpy(t->spacename, "view");
- Mat3CpyMat4(mat, v3d->viewinv);
+ Mat3CpyMat4(mat, rv3d->viewinv);
Mat3Ortho(mat);
- Mat4CpyMat3(v3d->twmat, mat);
+ Mat4CpyMat3(rv3d->twmat, mat);
}
break;
default: /* V3D_MANIP_CUSTOM */
- applyTransformOrientation();
+ // XXX applyTransformOrientation(C, t);
break;
}
-
+
}
-
+
return totsel;
}
/* ******************** DRAWING STUFFIES *********** */
-static float screen_aligned(float mat[][4])
+static float screen_aligned(RegionView3D *rv3d, float mat[][4])
{
float vec[3], size;
-
+
VECCOPY(vec, mat[0]);
size= Normalize(vec);
-
+
glTranslatef(mat[3][0], mat[3][1], mat[3][2]);
-
+
/* sets view screen aligned */
- glRotatef( -360.0f*saacos(G.vd->viewquat[0])/(float)M_PI, G.vd->viewquat[1], G.vd->viewquat[2], G.vd->viewquat[3]);
-
+ glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
+
return size;
}
@@ -557,32 +517,32 @@ static void partial_donut(float radring, float radhole, int start, int end, int
float cos_theta1, sin_theta1;
float ring_delta, side_delta;
int i, j, docaps= 1;
-
+
if(start==0 && end==nrings) docaps= 0;
-
+
ring_delta= 2.0f*(float)M_PI/(float)nrings;
side_delta= 2.0f*(float)M_PI/(float)nsides;
-
+
theta= (float)M_PI+0.5f*ring_delta;
cos_theta= (float)cos(theta);
sin_theta= (float)sin(theta);
-
+
for(i= nrings - 1; i >= 0; i--) {
theta1= theta + ring_delta;
cos_theta1= (float)cos(theta1);
sin_theta1= (float)sin(theta1);
-
+
if(docaps && i==start) { // cap
glBegin(GL_POLYGON);
phi= 0.0;
for(j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
-
+
phi += side_delta;
cos_phi= (float)cos(phi);
sin_phi= (float)sin(phi);
dist= radhole + radring * cos_phi;
-
+
glVertex3f(cos_theta1 * dist, -sin_theta1 * dist, radring * sin_phi);
}
glEnd();
@@ -592,35 +552,35 @@ static void partial_donut(float radring, float radhole, int start, int end, int
phi= 0.0;
for(j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
-
+
phi += side_delta;
cos_phi= (float)cos(phi);
sin_phi= (float)sin(phi);
dist= radhole + radring * cos_phi;
-
+
glVertex3f(cos_theta1 * dist, -sin_theta1 * dist, radring * sin_phi);
glVertex3f(cos_theta * dist, -sin_theta * dist, radring * sin_phi);
}
glEnd();
}
-
+
if(docaps && i==end) { // cap
glBegin(GL_POLYGON);
phi= 0.0;
for(j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
-
+
phi -= side_delta;
cos_phi= (float)cos(phi);
sin_phi= (float)sin(phi);
dist= radhole + radring * cos_phi;
-
+
glVertex3f(cos_theta * dist, -sin_theta * dist, radring * sin_phi);
}
glEnd();
}
-
-
+
+
theta= theta1;
cos_theta= cos_theta1;
sin_theta= sin_theta1;
@@ -632,30 +592,30 @@ static void partial_donut(float radring, float radhole, int start, int end, int
moving: in transform theme color
else the red/green/blue
*/
-static void manipulator_setcolor(char axis, int colcode)
+static void manipulator_setcolor(View3D *v3d, char axis, int colcode)
{
float vec[4];
char col[4];
-
+
vec[3]= 0.7f; // alpha set on 0.5, can be glEnabled or not
-
+
if(colcode==MAN_GHOST) {
glColor4ub(0, 0, 0, 70);
}
else if(colcode==MAN_MOVECOL) {
- BIF_GetThemeColor3ubv(TH_TRANSFORM, col);
+ UI_GetThemeColor3ubv(TH_TRANSFORM, col);
glColor4ub(col[0], col[1], col[2], 128);
}
else {
switch(axis) {
case 'c':
- BIF_GetThemeColor3ubv(TH_TRANSFORM, col);
- if(G.vd->twmode == V3D_MANIP_LOCAL) {
+ UI_GetThemeColor3ubv(TH_TRANSFORM, col);
+ if(v3d->twmode == V3D_MANIP_LOCAL) {
col[0]= col[0]>200?255:col[0]+55;
col[1]= col[1]>200?255:col[1]+55;
col[2]= col[2]>200?255:col[2]+55;
}
- else if(G.vd->twmode == V3D_MANIP_NORMAL) {
+ else if(v3d->twmode == V3D_MANIP_NORMAL) {
col[0]= col[0]<55?0:col[0]-55;
col[1]= col[1]<55?0:col[1]-55;
col[2]= col[2]<55?0:col[2]-55;
@@ -676,32 +636,32 @@ static void manipulator_setcolor(char axis, int colcode)
}
/* viewmatrix should have been set OK, also no shademode! */
-static void draw_manipulator_axes(int colcode, int flagx, int flagy, int flagz)
+static void draw_manipulator_axes(View3D *v3d, int colcode, int flagx, int flagy, int flagz)
{
-
+
/* axes */
if(flagx) {
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
if(flagx & MAN_SCALE_X) glLoadName(MAN_SCALE_X);
else if(flagx & MAN_TRANS_X) glLoadName(MAN_TRANS_X);
glBegin(GL_LINES);
glVertex3f(0.2f, 0.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glEnd();
- }
+ }
if(flagy) {
if(flagy & MAN_SCALE_Y) glLoadName(MAN_SCALE_Y);
else if(flagy & MAN_TRANS_Y) glLoadName(MAN_TRANS_Y);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
glBegin(GL_LINES);
glVertex3f(0.0f, 0.2f, 0.0f);
glVertex3f(0.0f, 1.0f, 0.0f);
glEnd();
- }
+ }
if(flagz) {
if(flagz & MAN_SCALE_Z) glLoadName(MAN_SCALE_Z);
else if(flagz & MAN_TRANS_Z) glLoadName(MAN_TRANS_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
glBegin(GL_LINES);
glVertex3f(0.0f, 0.0f, 0.2f);
glVertex3f(0.0f, 0.0f, 1.0f);
@@ -710,68 +670,68 @@ static void draw_manipulator_axes(int colcode, int flagx, int flagy, int flagz)
}
/* only called while G.moving */
-static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
+static void draw_manipulator_rotate_ghost(View3D *v3d, RegionView3D *rv3d, int drawflags)
{
GLUquadricObj *qobj;
float size, phi, startphi, vec[3], svec[3], matt[4][4], cross[3], tmat[3][3];
int arcs= (G.rt!=2);
-
+
glDisable(GL_DEPTH_TEST);
- qobj= gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_FILL);
-
+ qobj= gluNewQuadric();
+ gluQuadricDrawStyle(qobj, GLU_FILL);
+
glColor4ub(0,0,0,64);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
-
- /* we need both [4][4] transforms, Trans.mat seems to be premul, not post for mat[][4] */
- Mat4CpyMat4(matt, mat); // to copy the parts outside of [3][3]
- Mat4MulMat34(matt, Trans.mat, mat);
+
+ /* we need both [4][4] transforms, t->mat seems to be premul, not post for mat[][4] */
+ Mat4CpyMat4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
+// XXX Mat4MulMat34(matt, t->mat, rv3d->twmat);
/* Screen aligned view rot circle */
if(drawflags & MAN_ROT_V) {
-
+
/* prepare for screen aligned draw */
glPushMatrix();
- size= screen_aligned(mat);
-
- vec[0]= (float)(Trans.con.imval[0] - Trans.center2d[0]);
- vec[1]= (float)(Trans.con.imval[1] - Trans.center2d[1]);
+ size= screen_aligned(rv3d, rv3d->twmat);
+
+ vec[0]= 0; // XXX (float)(t->con.imval[0] - t->center2d[0]);
+ vec[1]= 0; // XXX (float)(t->con.imval[1] - t->center2d[1]);
vec[2]= 0.0f;
Normalize(vec);
-
+
startphi= saacos( vec[1] );
if(vec[0]<0.0) startphi= -startphi;
-
- phi= (float)fmod(180.0*Trans.val/M_PI, 360.0);
+
+ phi= 0; // XXX (float)fmod(180.0*t->val/M_PI, 360.0);
if(phi > 180.0) phi-= 360.0;
else if(phi<-180.0) phi+= 360.0;
-
+
gluPartialDisk(qobj, 0.0, size, 32, 1, 180.0*startphi/M_PI, phi);
-
+
glPopMatrix();
}
else if(arcs) {
float imat[3][3], ivmat[3][3];
/* try to get the start rotation */
-
- svec[0]= (float)(Trans.con.imval[0] - Trans.center2d[0]);
- svec[1]= (float)(Trans.con.imval[1] - Trans.center2d[1]);
+
+ svec[0]= 0; // XXX (float)(t->con.imval[0] - t->center2d[0]);
+ svec[1]= 0; // XXX (float)(t->con.imval[1] - t->center2d[1]);
svec[2]= 0.0f;
-
+
/* screen aligned vec transform back to manipulator space */
- Mat3CpyMat4(ivmat, G.vd->viewinv);
- Mat3CpyMat4(tmat, mat);
+ Mat3CpyMat4(ivmat, rv3d->viewinv);
+ Mat3CpyMat4(tmat, rv3d->twmat);
Mat3Inv(imat, tmat);
Mat3MulMat3(tmat, imat, ivmat);
-
+
Mat3MulVecfl(tmat, svec); // tmat is used further on
Normalize(svec);
- }
-
- mymultmatrix(mat); // aligns with original widget
-
+ }
+
+ wmMultMatrix(rv3d->twmat); // aligns with original widget
+
/* Z disk */
if(drawflags & MAN_ROT_Z) {
if(arcs) {
@@ -779,18 +739,18 @@ static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
svec[0]+= tmat[2][0];
svec[1]+= tmat[2][1];
Normalize(svec);
-
+
startphi= (float)atan2(svec[0], svec[1]);
}
else startphi= 0.5f*(float)M_PI;
-
- VECCOPY(vec, mat[0]); // use x axis to detect rotation
+
+ VECCOPY(vec, rv3d->twmat[0]); // use x axis to detect rotation
Normalize(vec);
Normalize(matt[0]);
phi= saacos( Inpf(vec, matt[0]) );
if(phi!=0.0) {
Crossf(cross, vec, matt[0]); // results in z vector
- if(Inpf(cross, mat[2]) > 0.0) phi= -phi;
+ if(Inpf(cross, rv3d->twmat[2]) > 0.0) phi= -phi;
gluPartialDisk(qobj, 0.0, 1.0, 32, 1, 180.0*startphi/M_PI, 180.0*(phi)/M_PI);
}
}
@@ -801,23 +761,23 @@ static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
svec[1]+= tmat[2][1];
svec[2]+= tmat[2][2];
Normalize(svec);
-
+
startphi= (float)(M_PI + atan2(svec[2], -svec[1]));
}
else startphi= 0.0f;
-
- VECCOPY(vec, mat[1]); // use y axis to detect rotation
+
+ VECCOPY(vec, rv3d->twmat[1]); // use y axis to detect rotation
Normalize(vec);
Normalize(matt[1]);
phi= saacos( Inpf(vec, matt[1]) );
if(phi!=0.0) {
Crossf(cross, vec, matt[1]); // results in x vector
- if(Inpf(cross, mat[0]) > 0.0) phi= -phi;
+ if(Inpf(cross, rv3d->twmat[0]) > 0.0) phi= -phi;
glRotatef(90.0, 0.0, 1.0, 0.0);
gluPartialDisk(qobj, 0.0, 1.0, 32, 1, 180.0*startphi/M_PI, 180.0*phi/M_PI);
glRotatef(-90.0, 0.0, 1.0, 0.0);
}
- }
+ }
/* Y circle */
if(drawflags & MAN_ROT_Y) {
if(arcs) {
@@ -825,83 +785,83 @@ static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
svec[0]+= tmat[2][0];
svec[2]+= tmat[2][2];
Normalize(svec);
-
+
startphi= (float)(M_PI + atan2(-svec[0], svec[2]));
}
else startphi= (float)M_PI;
-
- VECCOPY(vec, mat[2]); // use z axis to detect rotation
+
+ VECCOPY(vec, rv3d->twmat[2]); // use z axis to detect rotation
Normalize(vec);
Normalize(matt[2]);
phi= saacos( Inpf(vec, matt[2]) );
if(phi!=0.0) {
Crossf(cross, vec, matt[2]); // results in y vector
- if(Inpf(cross, mat[1]) > 0.0) phi= -phi;
+ if(Inpf(cross, rv3d->twmat[1]) > 0.0) phi= -phi;
glRotatef(-90.0, 1.0, 0.0, 0.0);
gluPartialDisk(qobj, 0.0, 1.0, 32, 1, 180.0*startphi/M_PI, 180.0*phi/M_PI);
glRotatef(90.0, 1.0, 0.0, 0.0);
}
}
-
+
glDisable(GL_BLEND);
- myloadmatrix(G.vd->viewmat);
+ wmLoadMatrix(rv3d->viewmat);
}
-static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, int combo)
+static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo)
{
- GLUquadricObj *qobj;
+ GLUquadricObj *qobj;
double plane[4];
float size, vec[3], unitmat[4][4];
- float cywid= 0.33f*0.01f*(float)U.tw_handlesize;
+ float cywid= 0.33f*0.01f*(float)U.tw_handlesize;
float cusize= cywid*0.65f;
int arcs= (G.rt!=2);
int colcode;
-
+
if(moving) colcode= MAN_MOVECOL;
else colcode= MAN_RGB;
-
+
/* when called while moving in mixed mode, do not draw when... */
if((drawflags & MAN_ROT_C)==0) return;
-
+
/* Init stuff */
glDisable(GL_DEPTH_TEST);
Mat4One(unitmat);
qobj= gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_FILL);
-
+ gluQuadricDrawStyle(qobj, GLU_FILL);
+
/* prepare for screen aligned draw */
- VECCOPY(vec, mat[0]);
+ VECCOPY(vec, rv3d->twmat[0]);
size= Normalize(vec);
glPushMatrix();
- glTranslatef(mat[3][0], mat[3][1], mat[3][2]);
-
+ glTranslatef(rv3d->twmat[3][0], rv3d->twmat[3][1], rv3d->twmat[3][2]);
+
if(arcs) {
/* clipplane makes nice handles, calc here because of multmatrix but with translate! */
- VECCOPY(plane, G.vd->viewinv[2]);
+ VECCOPY(plane, rv3d->viewinv[2]);
plane[3]= -0.02*size; // clip just a bit more
glClipPlane(GL_CLIP_PLANE0, plane);
}
/* sets view screen aligned */
- glRotatef( -360.0f*saacos(G.vd->viewquat[0])/(float)M_PI, G.vd->viewquat[1], G.vd->viewquat[2], G.vd->viewquat[3]);
-
+ glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
+
/* Screen aligned help circle */
if(arcs) {
if((G.f & G_PICKSEL)==0) {
- BIF_ThemeColorShade(TH_BACK, -30);
+ UI_ThemeColorShade(TH_BACK, -30);
drawcircball(GL_LINE_LOOP, unitmat[3], size, unitmat);
}
}
/* Screen aligned view rot circle */
if(drawflags & MAN_ROT_V) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
- BIF_ThemeColor(TH_TRANSFORM);
+ UI_ThemeColor(TH_TRANSFORM);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.2f*size, unitmat);
-
- if(moving) {
+
+ if(moving) {
float vec[3];
- vec[0]= (float)(Trans.imval[0] - Trans.center2d[0]);
- vec[1]= (float)(Trans.imval[1] - Trans.center2d[1]);
+ vec[0]= 0; // XXX (float)(t->imval[0] - t->center2d[0]);
+ vec[1]= 0; // XXX (float)(t->imval[1] - t->center2d[1]);
vec[2]= 0.0f;
Normalize(vec);
VecMulf(vec, 1.2f*size);
@@ -912,20 +872,20 @@ static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, i
}
}
glPopMatrix();
-
+
/* apply the transform delta */
if(moving) {
float matt[4][4];
- Mat4CpyMat4(matt, mat); // to copy the parts outside of [3][3]
- Mat4MulMat34(matt, Trans.mat, mat);
- mymultmatrix(matt);
+ Mat4CpyMat4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
+ // XXX Mat4MulMat34(matt, t->mat, rv3d->twmat);
+ wmMultMatrix(matt);
glFrontFace( is_mat4_flipped(matt)?GL_CW:GL_CCW);
}
else {
- glFrontFace( is_mat4_flipped(mat)?GL_CW:GL_CCW);
- mymultmatrix(mat);
+ glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW);
+ wmMultMatrix(rv3d->twmat);
}
-
+
/* axes */
if(arcs==0) {
if(!(G.f & G_PICKSEL)) {
@@ -933,17 +893,17 @@ static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, i
/* axis */
glBegin(GL_LINES);
if( (drawflags & MAN_ROT_X) || (moving && (drawflags & MAN_ROT_Z)) ) {
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
glVertex3f(0.2f, 0.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
- }
+ }
if( (drawflags & MAN_ROT_Y) || (moving && (drawflags & MAN_ROT_X)) ) {
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
glVertex3f(0.0f, 0.2f, 0.0f);
glVertex3f(0.0f, 1.0f, 0.0f);
- }
+ }
if( (drawflags & MAN_ROT_Z) || (moving && (drawflags & MAN_ROT_Y)) ) {
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
glVertex3f(0.0f, 0.0f, 0.2f);
glVertex3f(0.0f, 0.0f, 1.0f);
}
@@ -951,183 +911,248 @@ static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, i
}
}
}
-
+
if(arcs==0 && moving) {
-
+
/* Z circle */
if(drawflags & MAN_ROT_Z) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
}
/* X circle */
if(drawflags & MAN_ROT_X) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
glRotatef(-90.0, 0.0, 1.0, 0.0);
- }
+ }
/* Y circle */
if(drawflags & MAN_ROT_Y) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
glRotatef(90.0, 1.0, 0.0, 0.0);
}
-
+
if(arcs) glDisable(GL_CLIP_PLANE0);
}
// donut arcs
if(arcs) {
glEnable(GL_CLIP_PLANE0);
-
+
/* Z circle */
if(drawflags & MAN_ROT_Z) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
partial_donut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
}
/* X circle */
if(drawflags & MAN_ROT_X) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
partial_donut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
glRotatef(-90.0, 0.0, 1.0, 0.0);
- }
+ }
/* Y circle */
if(drawflags & MAN_ROT_Y) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
partial_donut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
glRotatef(90.0, 1.0, 0.0, 0.0);
}
-
+
glDisable(GL_CLIP_PLANE0);
}
-
+
if(arcs==0) {
-
+
/* Z handle on X axis */
if(drawflags & MAN_ROT_Z) {
glPushMatrix();
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
partial_donut(0.7f*cusize, 1.0f, 31, 33, 8, 64);
glPopMatrix();
- }
+ }
/* Y handle on X axis */
if(drawflags & MAN_ROT_Y) {
glPushMatrix();
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
- manipulator_setcolor('y', colcode);
-
+ manipulator_setcolor(v3d, 'y', colcode);
+
glRotatef(90.0, 1.0, 0.0, 0.0);
glRotatef(90.0, 0.0, 0.0, 1.0);
partial_donut(0.7f*cusize, 1.0f, 31, 33, 8, 64);
-
+
glPopMatrix();
}
-
+
/* X handle on Z axis */
if(drawflags & MAN_ROT_X) {
glPushMatrix();
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
- manipulator_setcolor('x', colcode);
-
+ manipulator_setcolor(v3d, 'x', colcode);
+
glRotatef(-90.0, 0.0, 1.0, 0.0);
glRotatef(90.0, 0.0, 0.0, 1.0);
partial_donut(0.7f*cusize, 1.0f, 31, 33, 8, 64);
glPopMatrix();
}
-
+
}
-
+
/* restore */
- myloadmatrix(G.vd->viewmat);
+ wmLoadMatrix(rv3d->viewmat);
gluDeleteQuadric(qobj);
- if(G.vd->zbuf) glEnable(GL_DEPTH_TEST);
-
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+
+}
+
+static void drawsolidcube(float size)
+{
+ static float cube[8][3] = {
+ {-1.0, -1.0, -1.0},
+ {-1.0, -1.0, 1.0},
+ {-1.0, 1.0, 1.0},
+ {-1.0, 1.0, -1.0},
+ { 1.0, -1.0, -1.0},
+ { 1.0, -1.0, 1.0},
+ { 1.0, 1.0, 1.0},
+ { 1.0, 1.0, -1.0}, };
+ float n[3];
+
+ glPushMatrix();
+ glScalef(size, size, size);
+
+ n[0]=0; n[1]=0; n[2]=0;
+ glBegin(GL_QUADS);
+ n[0]= -1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]);
+ n[0]=0;
+ glEnd();
+
+ glBegin(GL_QUADS);
+ n[1]= -1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[1]);
+ n[1]=0;
+ glEnd();
+
+ glBegin(GL_QUADS);
+ n[0]= 1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[4]); glVertex3fv(cube[7]); glVertex3fv(cube[6]); glVertex3fv(cube[5]);
+ n[0]=0;
+ glEnd();
+
+ glBegin(GL_QUADS);
+ n[1]= 1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[7]); glVertex3fv(cube[3]); glVertex3fv(cube[2]); glVertex3fv(cube[6]);
+ n[1]=0;
+ glEnd();
+
+ glBegin(GL_QUADS);
+ n[2]= 1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]);
+ n[2]=0;
+ glEnd();
+
+ glBegin(GL_QUADS);
+ n[2]= -1.0;
+ glNormal3fv(n);
+ glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]);
+ glEnd();
+
+ glPopMatrix();
}
-static void draw_manipulator_scale(float mat[][4], int moving, int drawflags, int combo, int colcode)
+
+static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo, int colcode)
{
- float cywid= 0.25f*0.01f*(float)U.tw_handlesize;
+ float cywid= 0.25f*0.01f*(float)U.tw_handlesize;
float cusize= cywid*0.75f, dz;
-
+
/* when called while moving in mixed mode, do not draw when... */
if((drawflags & MAN_SCALE_C)==0) return;
-
+
glDisable(GL_DEPTH_TEST);
-
+
/* not in combo mode */
if( (combo & (V3D_MANIP_TRANSLATE|V3D_MANIP_ROTATE))==0) {
float size, unitmat[4][4];
-
+ int shift= 0; // XXX
+
/* center circle, do not add to selection when shift is pressed (planar constraint) */
- if( (G.f & G_PICKSEL) && (G.qual & LR_SHIFTKEY)==0) glLoadName(MAN_SCALE_C);
-
- manipulator_setcolor('c', colcode);
+ if( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_SCALE_C);
+
+ manipulator_setcolor(v3d, 'c', colcode);
glPushMatrix();
- size= screen_aligned(mat);
+ size= screen_aligned(rv3d, rv3d->twmat);
Mat4One(unitmat);
drawcircball(GL_LINE_LOOP, unitmat[3], 0.2f*size, unitmat);
glPopMatrix();
-
+
dz= 1.0;
}
else dz= 1.0f-4.0f*cusize;
-
+
if(moving) {
float matt[4][4];
-
- Mat4CpyMat4(matt, mat); // to copy the parts outside of [3][3]
- Mat4MulMat34(matt, Trans.mat, mat);
- mymultmatrix(matt);
+
+ Mat4CpyMat4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
+ // XXX Mat4MulMat34(matt, t->mat, rv3d->twmat);
+ wmMultMatrix(matt);
glFrontFace( is_mat4_flipped(matt)?GL_CW:GL_CCW);
}
else {
- mymultmatrix(mat);
- glFrontFace( is_mat4_flipped(mat)?GL_CW:GL_CCW);
+ wmMultMatrix(rv3d->twmat);
+ glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW);
}
-
+
/* axis */
-
+
/* in combo mode, this is always drawn as first type */
- draw_manipulator_axes(colcode, drawflags & MAN_SCALE_X, drawflags & MAN_SCALE_Y, drawflags & MAN_SCALE_Z);
-
+ draw_manipulator_axes(v3d, colcode, drawflags & MAN_SCALE_X, drawflags & MAN_SCALE_Y, drawflags & MAN_SCALE_Z);
+
/* Z cube */
glTranslatef(0.0, 0.0, dz);
if(drawflags & MAN_SCALE_Z) {
if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
drawsolidcube(cusize);
- }
+ }
/* X cube */
glTranslatef(dz, 0.0, -dz);
if(drawflags & MAN_SCALE_X) {
if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_X);
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
drawsolidcube(cusize);
- }
+ }
/* Y cube */
glTranslatef(-dz, dz, 0.0);
if(drawflags & MAN_SCALE_Y) {
if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_Y);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
drawsolidcube(cusize);
}
-
+
/* if shiftkey, center point as last, for selectbuffer order */
if(G.f & G_PICKSEL) {
- if(G.qual & LR_SHIFTKEY) {
+ int shift= 0; // XXX
+
+ if(shift) {
glTranslatef(0.0, -dz, 0.0);
glLoadName(MAN_SCALE_C);
glBegin(GL_POINTS);
@@ -1135,11 +1160,11 @@ static void draw_manipulator_scale(float mat[][4], int moving, int drawflags, in
glEnd();
}
}
-
+
/* restore */
- myloadmatrix(G.vd->viewmat);
-
- if(G.vd->zbuf) glEnable(GL_DEPTH_TEST);
+ wmLoadMatrix(rv3d->viewmat);
+
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
glFrontFace(GL_CCW);
}
@@ -1149,132 +1174,133 @@ static void draw_cone(GLUquadricObj *qobj, float len, float width)
glTranslatef(0.0, 0.0, -0.5f*len);
gluCylinder(qobj, width, 0.0, len, 8, 1);
gluQuadricOrientation(qobj, GLU_INSIDE);
- gluDisk(qobj, 0.0, width, 8, 1);
+ gluDisk(qobj, 0.0, width, 8, 1);
gluQuadricOrientation(qobj, GLU_OUTSIDE);
glTranslatef(0.0, 0.0, 0.5f*len);
}
static void draw_cylinder(GLUquadricObj *qobj, float len, float width)
{
-
+
width*= 0.8f; // just for beauty
-
+
glTranslatef(0.0, 0.0, -0.5f*len);
gluCylinder(qobj, width, width, len, 8, 1);
gluQuadricOrientation(qobj, GLU_INSIDE);
- gluDisk(qobj, 0.0, width, 8, 1);
+ gluDisk(qobj, 0.0, width, 8, 1);
gluQuadricOrientation(qobj, GLU_OUTSIDE);
glTranslatef(0.0, 0.0, len);
- gluDisk(qobj, 0.0, width, 8, 1);
+ gluDisk(qobj, 0.0, width, 8, 1);
glTranslatef(0.0, 0.0, -0.5f*len);
}
-static void draw_manipulator_translate(float mat[][4], int moving, int drawflags, int combo, int colcode)
+static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo, int colcode)
{
- GLUquadricObj *qobj;
+ GLUquadricObj *qobj;
float cylen= 0.01f*(float)U.tw_handlesize;
float cywid= 0.25f*cylen, dz, size;
float unitmat[4][4];
-
+ int shift= 0; // XXX
+
/* when called while moving in mixed mode, do not draw when... */
if((drawflags & MAN_TRANS_C)==0) return;
-
- if(moving) glTranslatef(Trans.vec[0], Trans.vec[1], Trans.vec[2]);
+
+ // XXX if(moving) glTranslatef(t->vec[0], t->vec[1], t->vec[2]);
glDisable(GL_DEPTH_TEST);
qobj= gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_FILL);
-
+ gluQuadricDrawStyle(qobj, GLU_FILL);
+
/* center circle, do not add to selection when shift is pressed (planar constraint) */
- if( (G.f & G_PICKSEL) && (G.qual & LR_SHIFTKEY)==0) glLoadName(MAN_TRANS_C);
-
- manipulator_setcolor('c', colcode);
+ if( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_TRANS_C);
+
+ manipulator_setcolor(v3d, 'c', colcode);
glPushMatrix();
- size= screen_aligned(mat);
+ size= screen_aligned(rv3d, rv3d->twmat);
Mat4One(unitmat);
drawcircball(GL_LINE_LOOP, unitmat[3], 0.2f*size, unitmat);
glPopMatrix();
-
+
/* and now apply matrix, we move to local matrix drawing */
- mymultmatrix(mat);
-
+ wmMultMatrix(rv3d->twmat);
+
/* axis */
glLoadName(-1);
-
+
// translate drawn as last, only axis when no combo with scale, or for ghosting
if((combo & V3D_MANIP_SCALE)==0 || colcode==MAN_GHOST)
- draw_manipulator_axes(colcode, drawflags & MAN_TRANS_X, drawflags & MAN_TRANS_Y, drawflags & MAN_TRANS_Z);
+ draw_manipulator_axes(v3d, colcode, drawflags & MAN_TRANS_X, drawflags & MAN_TRANS_Y, drawflags & MAN_TRANS_Z);
+
-
/* offset in combo mode, for rotate a bit more */
if(combo & (V3D_MANIP_ROTATE)) dz= 1.0f+2.0f*cylen;
else if(combo & (V3D_MANIP_SCALE)) dz= 1.0f+0.5f*cylen;
else dz= 1.0f;
-
+
/* Z Cone */
glTranslatef(0.0, 0.0, dz);
if(drawflags & MAN_TRANS_Z) {
if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
draw_cone(qobj, cylen, cywid);
- }
+ }
/* X Cone */
glTranslatef(dz, 0.0, -dz);
if(drawflags & MAN_TRANS_X) {
if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
draw_cone(qobj, cylen, cywid);
glRotatef(-90.0, 0.0, 1.0, 0.0);
- }
+ }
/* Y Cone */
glTranslatef(-dz, dz, 0.0);
if(drawflags & MAN_TRANS_Y) {
if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
draw_cone(qobj, cylen, cywid);
}
gluDeleteQuadric(qobj);
- myloadmatrix(G.vd->viewmat);
-
- if(G.vd->zbuf) glEnable(GL_DEPTH_TEST);
-
+ wmLoadMatrix(rv3d->viewmat);
+
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+
}
-static void draw_manipulator_rotate_cyl(float mat[][4], int moving, int drawflags, int combo, int colcode)
+static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo, int colcode)
{
GLUquadricObj *qobj;
float size;
float cylen= 0.01f*(float)U.tw_handlesize;
float cywid= 0.25f*cylen;
-
+
/* when called while moving in mixed mode, do not draw when... */
if((drawflags & MAN_ROT_C)==0) return;
/* prepare for screen aligned draw */
glPushMatrix();
- size= screen_aligned(mat);
-
+ size= screen_aligned(rv3d, rv3d->twmat);
+
glDisable(GL_DEPTH_TEST);
- qobj= gluNewQuadric();
-
+ qobj= gluNewQuadric();
+
/* Screen aligned view rot circle */
if(drawflags & MAN_ROT_V) {
float unitmat[4][4];
Mat4One(unitmat);
-
+
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
- BIF_ThemeColor(TH_TRANSFORM);
+ UI_ThemeColor(TH_TRANSFORM);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.2f*size, unitmat);
-
+
if(moving) {
float vec[3];
- vec[0]= (float)(Trans.imval[0] - Trans.center2d[0]);
- vec[1]= (float)(Trans.imval[1] - Trans.center2d[1]);
+ vec[0]= 0; // XXX (float)(t->imval[0] - t->center2d[0]);
+ vec[1]= 0; // XXX (float)(t->imval[1] - t->center2d[1]);
vec[2]= 0.0f;
Normalize(vec);
VecMulf(vec, 1.2f*size);
@@ -1285,65 +1311,65 @@ static void draw_manipulator_rotate_cyl(float mat[][4], int moving, int drawflag
}
}
glPopMatrix();
-
+
/* apply the transform delta */
if(moving) {
float matt[4][4];
- Mat4CpyMat4(matt, mat); // to copy the parts outside of [3][3]
- if (Trans.flag & T_USES_MANIPULATOR) {
- Mat4MulMat34(matt, Trans.mat, mat);
- }
- mymultmatrix(matt);
+ Mat4CpyMat4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
+ // XXX if (t->flag & T_USES_MANIPULATOR) {
+ // XXX Mat4MulMat34(matt, t->mat, rv3d->twmat);
+ // XXX }
+ wmMultMatrix(matt);
}
else {
- mymultmatrix(mat);
+ wmMultMatrix(rv3d->twmat);
}
-
- glFrontFace( is_mat4_flipped(mat)?GL_CW:GL_CCW);
-
+
+ glFrontFace( is_mat4_flipped(rv3d->twmat)?GL_CW:GL_CCW);
+
/* axis */
if( (G.f & G_PICKSEL)==0 ) {
-
+
// only draw axis when combo didn't draw scale axes
if((combo & V3D_MANIP_SCALE)==0)
- draw_manipulator_axes(colcode, drawflags & MAN_ROT_X, drawflags & MAN_ROT_Y, drawflags & MAN_ROT_Z);
-
+ draw_manipulator_axes(v3d, colcode, drawflags & MAN_ROT_X, drawflags & MAN_ROT_Y, drawflags & MAN_ROT_Z);
+
/* only has to be set when not in picking */
- gluQuadricDrawStyle(qobj, GLU_FILL);
+ gluQuadricDrawStyle(qobj, GLU_FILL);
}
-
+
/* Z cyl */
glTranslatef(0.0, 0.0, 1.0);
if(drawflags & MAN_ROT_Z) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
- manipulator_setcolor('z', colcode);
+ manipulator_setcolor(v3d, 'z', colcode);
draw_cylinder(qobj, cylen, cywid);
- }
+ }
/* X cyl */
glTranslatef(1.0, 0.0, -1.0);
if(drawflags & MAN_ROT_X) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
- manipulator_setcolor('x', colcode);
+ manipulator_setcolor(v3d, 'x', colcode);
draw_cylinder(qobj, cylen, cywid);
glRotatef(-90.0, 0.0, 1.0, 0.0);
- }
+ }
/* Y cylinder */
glTranslatef(-1.0, 1.0, 0.0);
if(drawflags & MAN_ROT_Y) {
if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
- manipulator_setcolor('y', colcode);
+ manipulator_setcolor(v3d, 'y', colcode);
draw_cylinder(qobj, cylen, cywid);
}
-
+
/* restore */
-
+
gluDeleteQuadric(qobj);
- myloadmatrix(G.vd->viewmat);
-
- if(G.vd->zbuf) glEnable(GL_DEPTH_TEST);
-
+ wmLoadMatrix(rv3d->viewmat);
+
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+
}
@@ -1353,78 +1379,33 @@ static float get_manipulator_drawsize(ARegion *ar)
{
RegionView3D *rv3d= ar->regiondata;
float size = get_drawsize(ar, rv3d->twmat[3]);
-
+
size*= (float)U.tw_size;
return size;
}
-/* exported to transform_constraints.c */
-/* mat, vec = default orientation and location */
-/* type = transform type */
-/* axis = x, y, z, c */
-/* col: 0 = colored, 1 = moving, 2 = ghost */
-void draw_manipulator_ext(ScrArea *sa, int type, char axis, int col, float vec[3], float mat[][3])
-{
- int drawflags= 0;
- float mat4[4][4];
- int colcode;
-
- Mat4CpyMat3(mat4, mat);
- VECCOPY(mat4[3], vec);
-
- Mat4MulFloat3((float *)mat4, get_manipulator_drawsize(sa));
-
- glEnable(GL_BLEND); // let's do it transparent by default
- if(col==0) colcode= MAN_RGB;
- else if(col==1) colcode= MAN_MOVECOL;
- else colcode= MAN_GHOST;
-
-
- if(type==TFM_ROTATION) {
- if(axis=='x') drawflags= MAN_ROT_X;
- else if(axis=='y') drawflags= MAN_ROT_Y;
- else if(axis=='z') drawflags= MAN_ROT_Z;
- else drawflags= MAN_ROT_C;
-
- draw_manipulator_rotate_cyl(mat4, col, drawflags, V3D_MANIP_ROTATE, colcode);
- }
- else if(type==TFM_RESIZE) {
- if(axis=='x') drawflags= MAN_SCALE_X;
- else if(axis=='y') drawflags= MAN_SCALE_Y;
- else if(axis=='z') drawflags= MAN_SCALE_Z;
- else drawflags= MAN_SCALE_C;
-
- draw_manipulator_scale(mat4, col, drawflags, V3D_MANIP_SCALE, colcode);
- }
- else {
- if(axis=='x') drawflags= MAN_TRANS_X;
- else if(axis=='y') drawflags= MAN_TRANS_Y;
- else if(axis=='z') drawflags= MAN_TRANS_Z;
- else drawflags= MAN_TRANS_C;
-
- draw_manipulator_translate(mat4, 0, drawflags, V3D_MANIP_TRANSLATE, colcode);
- }
-
-
- glDisable(GL_BLEND);
-}
/* main call, does calc centers & orientation too */
/* uses global G.moving */
static int drawflags= 0xFFFF; // only for the calls below, belongs in scene...?
-void BIF_draw_manipulator(ScrArea *sa)
+
+void BIF_draw_manipulator(const bContext *C)
{
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= CTX_wm_region(C);
+ Scene *scene= CTX_data_scene(C);
View3D *v3d= sa->spacedata.first;
+ RegionView3D *rv3d= ar->regiondata;
int totsel;
-
+
if(!(v3d->twflag & V3D_USE_MANIPULATOR)) return;
if(G.moving && (G.moving & G_TRANSFORM_MANIP)==0) return;
-
+
if(G.moving==0) {
v3d->twflag &= ~V3D_DRAW_MANIPULATOR;
-
- totsel= calc_manipulator_stats(sa);
+
+ totsel= calc_manipulator_stats(C);
if(totsel==0) return;
drawflags= v3d->twdrawflag; /* set in calc_manipulator_stats */
@@ -1434,123 +1415,119 @@ void BIF_draw_manipulator(ScrArea *sa)
switch(v3d->around) {
case V3D_CENTER:
case V3D_ACTIVE:
- v3d->twmat[3][0]= (G.scene->twmin[0] + G.scene->twmax[0])/2.0f;
- v3d->twmat[3][1]= (G.scene->twmin[1] + G.scene->twmax[1])/2.0f;
- v3d->twmat[3][2]= (G.scene->twmin[2] + G.scene->twmax[2])/2.0f;
- if(v3d->around==V3D_ACTIVE && t->obedit==NULL) {
+ rv3d->twmat[3][0]= (scene->twmin[0] + scene->twmax[0])/2.0f;
+ rv3d->twmat[3][1]= (scene->twmin[1] + scene->twmax[1])/2.0f;
+ rv3d->twmat[3][2]= (scene->twmin[2] + scene->twmax[2])/2.0f;
+ if(v3d->around==V3D_ACTIVE && scene->obedit==NULL) {
Object *ob= OBACT;
- if(ob && !(ob->flag & OB_POSEMODE))
- VECCOPY(v3d->twmat[3], ob->obmat[3]);
+ if(ob && !(ob->flag & OB_POSEMODE))
+ VECCOPY(rv3d->twmat[3], ob->obmat[3]);
}
break;
case V3D_LOCAL:
case V3D_CENTROID:
- VECCOPY(v3d->twmat[3], G.scene->twcent);
+ VECCOPY(rv3d->twmat[3], scene->twcent);
break;
case V3D_CURSOR:
- VECCOPY(v3d->twmat[3], give_cursor());
+ VECCOPY(rv3d->twmat[3], give_cursor(scene, v3d));
break;
}
-
- Mat4MulFloat3((float *)v3d->twmat, get_manipulator_drawsize(sa));
+
+ Mat4MulFloat3((float *)rv3d->twmat, get_manipulator_drawsize(ar));
}
-
+
if(v3d->twflag & V3D_DRAW_MANIPULATOR) {
-
+
if(v3d->twtype & V3D_MANIP_ROTATE) {
-
+
/* rotate has special ghosting draw, for pie chart */
- if(G.moving) draw_manipulator_rotate_ghost(v3d->twmat, drawflags);
-
+ if(G.moving) draw_manipulator_rotate_ghost(v3d, rv3d, drawflags);
+
if(G.moving) glEnable(GL_BLEND);
-
+
if(G.rt==3) {
- if(G.moving) draw_manipulator_rotate_cyl(v3d->twmat, 1, drawflags, v3d->twtype, MAN_MOVECOL);
- else draw_manipulator_rotate_cyl(v3d->twmat, 0, drawflags, v3d->twtype, MAN_RGB);
+ if(G.moving) draw_manipulator_rotate_cyl(v3d, rv3d, 1, drawflags, v3d->twtype, MAN_MOVECOL);
+ else draw_manipulator_rotate_cyl(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
else
- draw_manipulator_rotate(v3d->twmat, G.moving, drawflags, v3d->twtype);
-
+ draw_manipulator_rotate(v3d, rv3d, G.moving, drawflags, v3d->twtype);
+
glDisable(GL_BLEND);
}
if(v3d->twtype & V3D_MANIP_SCALE) {
if(G.moving) {
glEnable(GL_BLEND);
- draw_manipulator_scale(v3d->twmat, 0, drawflags, v3d->twtype, MAN_GHOST);
- draw_manipulator_scale(v3d->twmat, 1, drawflags, v3d->twtype, MAN_MOVECOL);
+ draw_manipulator_scale(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_GHOST);
+ draw_manipulator_scale(v3d, rv3d, 1, drawflags, v3d->twtype, MAN_MOVECOL);
glDisable(GL_BLEND);
}
- else draw_manipulator_scale(v3d->twmat, 0, drawflags, v3d->twtype, MAN_RGB);
+ else draw_manipulator_scale(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
if(v3d->twtype & V3D_MANIP_TRANSLATE) {
if(G.moving) {
glEnable(GL_BLEND);
- draw_manipulator_translate(v3d->twmat, 0, drawflags, v3d->twtype, MAN_GHOST);
- draw_manipulator_translate(v3d->twmat, 1, drawflags, v3d->twtype, MAN_MOVECOL);
+ draw_manipulator_translate(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_GHOST);
+ draw_manipulator_translate(v3d, rv3d, 1, drawflags, v3d->twtype, MAN_MOVECOL);
glDisable(GL_BLEND);
}
- else draw_manipulator_translate(v3d->twmat, 0, drawflags, v3d->twtype, MAN_RGB);
+ else draw_manipulator_translate(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
}
}
-static int manipulator_selectbuf(ScrArea *sa, float hotspot)
+static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, short *mval, float hotspot)
{
View3D *v3d= sa->spacedata.first;
+ RegionView3D *rv3d= ar->regiondata;
rctf rect;
GLuint buffer[64]; // max 4 items per select, so large enuf
- short hits, mval[2];
-
+ short hits;
+ extern void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); // XXX check a bit later on this... (ton)
+
G.f |= G_PICKSEL;
-
- getmouseco_areawin(mval);
+
rect.xmin= mval[0]-hotspot;
rect.xmax= mval[0]+hotspot;
rect.ymin= mval[1]-hotspot;
rect.ymax= mval[1]+hotspot;
-
- /* get rid of overlay button matrix */
- persp(PERSP_VIEW);
-
- setwinmatrixview3d(sa->winx, sa->winy, &rect);
- Mat4MulMat4(v3d->persmat, v3d->viewmat, sa->winmat);
-
+
+ setwinmatrixview3d(ar, v3d, &rect);
+ Mat4MulMat4(rv3d->persmat, rv3d->viewmat, rv3d->winmat);
+
glSelectBuffer( 64, buffer);
glRenderMode(GL_SELECT);
glInitNames(); /* these two calls whatfor? It doesnt work otherwise */
glPushName(-2);
-
+
/* do the drawing */
if(v3d->twtype & V3D_MANIP_ROTATE) {
- if(G.rt==3) draw_manipulator_rotate_cyl(v3d->twmat, 0, MAN_ROT_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
- else draw_manipulator_rotate(v3d->twmat, 0, MAN_ROT_C & v3d->twdrawflag, v3d->twtype);
+ if(G.rt==3) draw_manipulator_rotate_cyl(v3d, rv3d, 0, MAN_ROT_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
+ else draw_manipulator_rotate(v3d, rv3d, 0, MAN_ROT_C & v3d->twdrawflag, v3d->twtype);
}
if(v3d->twtype & V3D_MANIP_SCALE)
- draw_manipulator_scale(v3d->twmat, 0, MAN_SCALE_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
+ draw_manipulator_scale(v3d, rv3d, 0, MAN_SCALE_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
if(v3d->twtype & V3D_MANIP_TRANSLATE)
- draw_manipulator_translate(v3d->twmat, 0, MAN_TRANS_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
-
+ draw_manipulator_translate(v3d, rv3d, 0, MAN_TRANS_C & v3d->twdrawflag, v3d->twtype, MAN_RGB);
+
glPopName();
hits= glRenderMode(GL_RENDER);
-
+
G.f &= ~G_PICKSEL;
- setwinmatrixview3d(sa->winx, sa->winy, NULL);
- Mat4MulMat4(v3d->persmat, v3d->viewmat, sa->winmat);
-
- persp(PERSP_WIN);
-
+ setwinmatrixview3d(ar, v3d, NULL);
+ Mat4MulMat4(rv3d->persmat, rv3d->viewmat, rv3d->winmat);
+
if(hits==1) return buffer[3];
else if(hits>1) {
GLuint val, dep, mindep=0, mindeprot=0, minval=0, minvalrot=0;
int a;
-
+
/* we compare the hits in buffer, but value centers highest */
/* we also store the rotation hits separate (because of arcs) and return hits on other widgets if there are */
for(a=0; a<hits; a++) {
dep= buffer[4*a + 1];
val= buffer[4*a + 3];
-
+
if(val==MAN_TRANS_C) return MAN_TRANS_C;
else if(val==MAN_SCALE_C) return MAN_SCALE_C;
else {
@@ -1568,7 +1545,7 @@ static int manipulator_selectbuf(ScrArea *sa, float hotspot)
}
}
}
-
+
if(minval)
return minval;
else
@@ -1578,108 +1555,110 @@ static int manipulator_selectbuf(ScrArea *sa, float hotspot)
}
/* return 0; nothing happened */
-int BIF_do_manipulator(ScrArea *sa)
+int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
{
+ ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
+ ARegion *ar= CTX_wm_region(C);
+ int constraint_axis[3] = {0, 0, 0};
int val;
-
+ int shift = event->shift;
+
if(!(v3d->twflag & V3D_USE_MANIPULATOR)) return 0;
if(!(v3d->twflag & V3D_DRAW_MANIPULATOR)) return 0;
-
+
// find the hotspots first test narrow hotspot
- val= manipulator_selectbuf(sa, 0.5f*(float)U.tw_hotspot);
+ val= manipulator_selectbuf(sa, ar, event->mval, 0.5f*(float)U.tw_hotspot);
if(val) {
- checkFirstTime(); // TEMPORARY, check this before doing any transform call.
+
// drawflags still global, for drawing call above
- drawflags= manipulator_selectbuf(sa, 0.2f*(float)U.tw_hotspot);
+ drawflags= manipulator_selectbuf(sa, ar, event->mval, 0.2f*(float)U.tw_hotspot);
if(drawflags==0) drawflags= val;
if (drawflags & MAN_TRANS_C) {
- initManipulator(TFM_TRANSLATION);
switch(drawflags) {
case MAN_TRANS_C:
break;
case MAN_TRANS_X:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_TRANS_Y|MAN_TRANS_Z;
- BIF_setDualAxisConstraint(v3d->twmat[1], v3d->twmat[2], " Y+Z");
+ if(shift) {
+ constraint_axis[1] = 1;
+ constraint_axis[2] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[0], " X");
+ constraint_axis[0] = 1;
break;
case MAN_TRANS_Y:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_TRANS_X|MAN_TRANS_Z;
- BIF_setDualAxisConstraint(v3d->twmat[0], v3d->twmat[2], " X+Z");
+ if(shift) {
+ constraint_axis[0] = 1;
+ constraint_axis[2] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[1], " Y");
+ constraint_axis[1] = 1;
break;
case MAN_TRANS_Z:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_TRANS_X|MAN_TRANS_Y;
- BIF_setDualAxisConstraint(v3d->twmat[0], v3d->twmat[1], " X+Y");
+ if(shift) {
+ constraint_axis[0] = 1;
+ constraint_axis[1] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[2], " Z");
+ constraint_axis[2] = 1;
break;
}
- ManipulatorTransform();
+ RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
+ WM_operator_name_call(C, "TFM_OT_translation", WM_OP_INVOKE_REGION_WIN, op->ptr);
}
else if (drawflags & MAN_SCALE_C) {
- initManipulator(TFM_RESIZE);
switch(drawflags) {
case MAN_SCALE_X:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_SCALE_Y|MAN_SCALE_Z;
- BIF_setDualAxisConstraint(v3d->twmat[1], v3d->twmat[2], " Y+Z");
+ if(shift) {
+ constraint_axis[1] = 1;
+ constraint_axis[2] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[0], " X");
+ constraint_axis[0] = 1;
break;
case MAN_SCALE_Y:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_SCALE_X|MAN_SCALE_Z;
- BIF_setDualAxisConstraint(v3d->twmat[0], v3d->twmat[2], " X+Z");
+ if(shift) {
+ constraint_axis[0] = 1;
+ constraint_axis[2] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[1], " Y");
+ constraint_axis[1] = 1;
break;
case MAN_SCALE_Z:
- if(G.qual & LR_SHIFTKEY) {
- drawflags= MAN_SCALE_X|MAN_SCALE_Y;
- BIF_setDualAxisConstraint(v3d->twmat[0], v3d->twmat[1], " X+Y");
+ if(shift) {
+ constraint_axis[0] = 1;
+ constraint_axis[1] = 1;
}
else
- BIF_setSingleAxisConstraint(v3d->twmat[2], " Z");
+ constraint_axis[2] = 1;
break;
}
- ManipulatorTransform();
+ RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
+ WM_operator_name_call(C, "TFM_OT_resize", WM_OP_INVOKE_REGION_WIN, op->ptr);
}
- else if (drawflags == MAN_ROT_T) { /* trackbal need special case, init is different */
- initManipulator(TFM_TRACKBALL);
- ManipulatorTransform();
+ else if (drawflags == MAN_ROT_T) { /* trackball need special case, init is different */
+ WM_operator_name_call(C, "TFM_OT_trackball", WM_OP_INVOKE_REGION_WIN, op->ptr);
}
else if (drawflags & MAN_ROT_C) {
- initManipulator(TFM_ROTATION);
switch(drawflags) {
case MAN_ROT_X:
- BIF_setSingleAxisConstraint(v3d->twmat[0], " X");
+ constraint_axis[0] = 1;
break;
case MAN_ROT_Y:
- BIF_setSingleAxisConstraint(v3d->twmat[1], " Y");
+ constraint_axis[1] = 1;
break;
case MAN_ROT_Z:
- BIF_setSingleAxisConstraint(v3d->twmat[2], " Z");
+ constraint_axis[2] = 1;
break;
}
- ManipulatorTransform();
+ RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
+ WM_operator_name_call(C, "TFM_OT_rotation", WM_OP_INVOKE_REGION_WIN, op->ptr);
}
}
/* after transform, restore drawflags */
drawflags= 0xFFFF;
-
+
return val;
}
-#endif
diff --git a/source/blender/editors/transform/transform_ndofinput.c b/source/blender/editors/transform/transform_ndofinput.c
index c52492ebd6b..f8567023e5f 100644
--- a/source/blender/editors/transform/transform_ndofinput.c
+++ b/source/blender/editors/transform/transform_ndofinput.c
@@ -31,12 +31,15 @@
#include "BKE_utildefines.h" /* ABS */
#include "DNA_view3d_types.h" /* for G.vd (view3d) */
+#include "DNA_windowmanager_types.h" /* for G.vd (view3d) */
#include "WM_types.h"
#include "transform.h"
+#if 0
static int updateNDofMotion(NDofInput *n); // return 0 when motion is null
+#endif
static void resetNDofInput(NDofInput *n);
void initNDofInput(NDofInput *n)
@@ -120,6 +123,8 @@ void applyNDofInput(NDofInput *n, float *vec)
}
}
+// TRANSFORM_FIX_ME
+#if 0
static int updateNDofMotion(NDofInput *n)
{
@@ -127,14 +132,11 @@ static int updateNDofMotion(NDofInput *n)
int i;
int retval = 0;
-// TRANSFORM_FIX_ME
-#if 0
getndof(fval);
if (G.vd->ndoffilter)
filterNDOFvalues(fval);
-#endif
-
+
for(i = 0; i < 6; i++)
{
if (!retval && fval[i] != 0.0f)
@@ -149,6 +151,7 @@ static int updateNDofMotion(NDofInput *n)
return retval;
}
+#endif
diff --git a/source/blender/editors/transform/transform_numinput.c b/source/blender/editors/transform/transform_numinput.c
index 34976105db3..f5f1d5fac9e 100644
--- a/source/blender/editors/transform/transform_numinput.c
+++ b/source/blender/editors/transform/transform_numinput.c
@@ -34,6 +34,7 @@
#include "BKE_utildefines.h" /* ABS */
#include "WM_types.h"
+#include "DNA_windowmanager_types.h"
#include "transform.h"
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 769001b30a8..2fc3d2f1e53 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -1,5 +1,5 @@
/**
- * $Id: transform_ops.c 17542 2008-11-23 15:27:53Z theeth $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -56,31 +56,38 @@ static float VecOne[3] = {1, 1, 1};
/* need constants for this */
EnumPropertyItem proportional_mode_types[] = {
- {0, "OFF", "Off", ""},
- {1, "ON", "On", ""},
- {2, "CONNECTED", "Connected", ""},
- {0, NULL, NULL, NULL}
+ {0, "OFF", 0, "Off", ""},
+ {1, "ON", 0, "On", ""},
+ {2, "CONNECTED", 0, "Connected", ""},
+ {0, NULL, 0, NULL, NULL}
};
EnumPropertyItem snap_mode_types[] = {
- {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", "Closest", ""},
- {SCE_SNAP_TARGET_CENTER, "CENTER", "Center", ""},
- {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", "Median", ""},
- {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", "Active", ""},
- {0, NULL, NULL, NULL}
+ {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", ""},
+ {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", ""},
+ {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", ""},
+ {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", ""},
+ {0, NULL, 0, NULL, NULL}
};
EnumPropertyItem proportional_falloff_types[] = {
- {PROP_SMOOTH, "SMOOTH", "Smooth", ""},
- {PROP_SPHERE, "SPHERE", "Sphere", ""},
- {PROP_ROOT, "ROOT", "Root", ""},
- {PROP_SHARP, "SHARP", "Sharp", ""},
- {PROP_LIN, "LINEAR", "Linear", ""},
- {PROP_CONST, "CONSTANT", "Constant", ""},
- {PROP_RANDOM, "RANDOM", "Random", ""},
- {0, NULL, NULL, NULL}
+ {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {PROP_ROOT, "ROOT", 0, "Root", ""},
+ {PROP_SHARP, "SHARP", 0, "Sharp", ""},
+ {PROP_LIN, "LINEAR", 0, "Linear", ""},
+ {PROP_CONST, "CONSTANT", 0, "Constant", ""},
+ {PROP_RANDOM, "RANDOM", 0, "Random", ""},
+ {0, NULL, 0, NULL, NULL}
};
+EnumPropertyItem orientation_items[]= {
+ {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", ""},
+ {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", ""},
+ {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", ""},
+ {V3D_MANIP_VIEW, "VIEW", 0, "View", ""},
+ {0, NULL, 0, NULL, NULL}};
+
char OP_TRANSLATION[] = "TFM_OT_translation";
char OP_ROTATION[] = "TFM_OT_rotation";
char OP_TOSPHERE[] = "TFM_OT_tosphere";
@@ -89,6 +96,7 @@ char OP_SHEAR[] = "TFM_OT_shear";
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";
TransformModeItem transform_modes[] =
@@ -101,17 +109,14 @@ TransformModeItem transform_modes[] =
{OP_WARP, TFM_WARP},
{OP_SHRINK_FATTEN, TFM_SHRINKFATTEN},
{OP_TILT, TFM_TILT},
+ {OP_TRACKBALL, TFM_TRACKBALL},
{NULL, 0}
};
static int select_orientation_exec(bContext *C, wmOperator *op)
{
int orientation = RNA_enum_get(op->ptr, "orientation");
- int custom_index= RNA_int_get(op->ptr, "custom_index");;
- if(orientation == V3D_MANIP_CUSTOM)
- orientation += custom_index;
-
BIF_selectTransformOrientationValue(C, orientation);
return OPERATOR_FINISHED;
@@ -121,24 +126,24 @@ static int select_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event
{
uiPopupMenu *pup;
uiLayout *layout;
-
+
pup= uiPupMenuBegin(C, "Orientation", 0);
layout= uiPupMenuLayout(pup);
- BIF_menuTransformOrientation(C, layout, NULL);
+ uiItemsEnumO(layout, "TFM_OT_select_orientation", "orientation");
uiPupMenuEnd(C, pup);
-
+
return OPERATOR_CANCELLED;
}
-
+
+static EnumPropertyItem *select_orientation_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ *free= 1;
+ return BIF_enumTransformOrientation(C);
+}
+
void TFM_OT_select_orientation(struct wmOperatorType *ot)
{
- static EnumPropertyItem orientation_items[]= {
- {V3D_MANIP_GLOBAL, "GLOBAL", "Global", ""},
- {V3D_MANIP_NORMAL, "NORMAL", "Normal", ""},
- {V3D_MANIP_LOCAL, "LOCAL", "Local", ""},
- {V3D_MANIP_VIEW, "VIEW", "View", ""},
- {V3D_MANIP_CUSTOM, "CUSTOM", "Custom", ""},
- {0, NULL, NULL, NULL}};
+ PropertyRNA *prop;
/* identifiers */
ot->name = "Select Orientation";
@@ -149,8 +154,8 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
ot->exec = select_orientation_exec;
ot->poll = ED_operator_areaactive;
- RNA_def_enum(ot->srna, "orientation", orientation_items, V3D_MANIP_CUSTOM, "Orientation", "DOC_BROKEN");
- RNA_def_int(ot->srna, "custom_index", 0, 0, INT_MAX, "Custom Index", "", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
+ RNA_def_enum_funcs(prop, select_orientation_itemf);
}
static void transformops_exit(bContext *C, wmOperator *op)
@@ -183,27 +188,27 @@ static int transformops_data(bContext *C, wmOperator *op, wmEvent *event)
}
retval = initTransform(C, t, op, event, mode);
-
+
/* store data */
op->customdata = t;
}
-
+
return retval; /* return 0 on error */
}
static int transform_modal(bContext *C, wmOperator *op, wmEvent *event)
{
int exit_code;
-
+
TransInfo *t = op->customdata;
-
+
transformEvent(t, event);
-
+
transformApply(C, t);
-
-
+
+
exit_code = transformEnd(C, t);
-
+
if (exit_code != OPERATOR_RUNNING_MODAL)
{
transformops_exit(C, op);
@@ -215,11 +220,11 @@ static int transform_modal(bContext *C, wmOperator *op, wmEvent *event)
static int transform_cancel(bContext *C, wmOperator *op)
{
TransInfo *t = op->customdata;
-
+
t->state = TRANS_CANCEL;
transformEnd(C, t);
transformops_exit(C, op);
-
+
return OPERATOR_CANCELLED;
}
@@ -237,11 +242,11 @@ static int transform_exec(bContext *C, wmOperator *op)
t->options |= CTX_AUTOCONFIRM;
transformApply(C, t);
-
+
transformEnd(C, t);
transformops_exit(C, op);
-
+
return OPERATOR_FINISHED;
}
@@ -279,7 +284,7 @@ void Properties_Snapping(struct wmOperatorType *ot, short align)
RNA_def_boolean(ot->srna, "snap", 0, "Snap to Point", "");
RNA_def_enum(ot->srna, "snap_mode", snap_mode_types, 0, "Mode", "");
RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "", -FLT_MAX, FLT_MAX);
-
+
if (align)
{
RNA_def_boolean(ot->srna, "snap_align", 0, "Align with Point Normal", "");
@@ -289,8 +294,11 @@ void Properties_Snapping(struct wmOperatorType *ot, short align)
void Properties_Constraints(struct wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
- RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "constraint_orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
+ RNA_def_enum_funcs(prop, select_orientation_itemf);
}
void TFM_OT_translation(struct wmOperatorType *ot)
@@ -298,7 +306,7 @@ void TFM_OT_translation(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Translation";
ot->idname = OP_TRANSLATION;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -314,7 +322,7 @@ void TFM_OT_translation(struct wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
Properties_Constraints(ot);
-
+
Properties_Snapping(ot, 1);
}
@@ -323,7 +331,7 @@ void TFM_OT_resize(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Resize";
ot->idname = OP_RESIZE;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -339,16 +347,38 @@ void TFM_OT_resize(struct wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
Properties_Constraints(ot);
-
+
Properties_Snapping(ot, 0);
}
+
+void TFM_OT_trackball(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Trackball";
+ ot->idname = OP_TRACKBALL;
+ 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;
+
+ RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "angle", "", -FLT_MAX, FLT_MAX);
+
+ Properties_Proportional(ot);
+
+ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+}
+
void TFM_OT_rotation(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Rotation";
ot->idname = OP_ROTATION;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -364,7 +394,7 @@ void TFM_OT_rotation(struct wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
Properties_Constraints(ot);
-
+
Properties_Snapping(ot, 0);
}
@@ -373,7 +403,7 @@ void TFM_OT_tilt(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Tilt";
ot->idname = OP_TILT;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -396,7 +426,7 @@ void TFM_OT_warp(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Warp";
ot->idname = OP_WARP;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -420,7 +450,7 @@ void TFM_OT_shear(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Shear";
ot->idname = OP_SHEAR;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -444,7 +474,7 @@ void TFM_OT_shrink_fatten(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Shrink/Fatten";
ot->idname = OP_SHRINK_FATTEN;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -465,7 +495,7 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
/* identifiers */
ot->name = "To Sphere";
ot->idname = OP_TOSPHERE;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -484,39 +514,39 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
void TFM_OT_transform(struct wmOperatorType *ot)
{
static EnumPropertyItem transform_mode_types[] = {
- {TFM_INIT, "INIT", "Init", ""},
- {TFM_DUMMY, "DUMMY", "Dummy", ""},
- {TFM_TRANSLATION, "TRANSLATION", "Translation", ""},
- {TFM_ROTATION, "ROTATION", "Rotation", ""},
- {TFM_RESIZE, "RESIZE", "Resize", ""},
- {TFM_TOSPHERE, "TOSPHERE", "Tosphere", ""},
- {TFM_SHEAR, "SHEAR", "Shear", ""},
- {TFM_WARP, "WARP", "Warp", ""},
- {TFM_SHRINKFATTEN, "SHRINKFATTEN", "Shrinkfatten", ""},
- {TFM_TILT, "TILT", "Tilt", ""},
- {TFM_TRACKBALL, "TRACKBALL", "Trackball", ""},
- {TFM_PUSHPULL, "PUSHPULL", "Pushpull", ""},
- {TFM_CREASE, "CREASE", "Crease", ""},
- {TFM_MIRROR, "MIRROR", "Mirror", ""},
- {TFM_BONESIZE, "BONESIZE", "Bonesize", ""},
- {TFM_BONE_ENVELOPE, "BONE_ENVELOPE", "Bone_Envelope", ""},
- {TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", "Curve_Shrinkfatten", ""},
- {TFM_BONE_ROLL, "BONE_ROLL", "Bone_Roll", ""},
- {TFM_TIME_TRANSLATE, "TIME_TRANSLATE", "Time_Translate", ""},
- {TFM_TIME_SLIDE, "TIME_SLIDE", "Time_Slide", ""},
- {TFM_TIME_SCALE, "TIME_SCALE", "Time_Scale", ""},
- {TFM_TIME_EXTEND, "TIME_EXTEND", "Time_Extend", ""},
- {TFM_BAKE_TIME, "BAKE_TIME", "Bake_Time", ""},
- {TFM_BEVEL, "BEVEL", "Bevel", ""},
- {TFM_BWEIGHT, "BWEIGHT", "Bweight", ""},
- {TFM_ALIGN, "ALIGN", "Align", ""},
- {0, NULL, NULL, NULL}
+ {TFM_INIT, "INIT", 0, "Init", ""},
+ {TFM_DUMMY, "DUMMY", 0, "Dummy", ""},
+ {TFM_TRANSLATION, "TRANSLATION", 0, "Translation", ""},
+ {TFM_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {TFM_RESIZE, "RESIZE", 0, "Resize", ""},
+ {TFM_TOSPHERE, "TOSPHERE", 0, "Tosphere", ""},
+ {TFM_SHEAR, "SHEAR", 0, "Shear", ""},
+ {TFM_WARP, "WARP", 0, "Warp", ""},
+ {TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, "Shrinkfatten", ""},
+ {TFM_TILT, "TILT", 0, "Tilt", ""},
+ {TFM_TRACKBALL, "TRACKBALL", 0, "Trackball", ""},
+ {TFM_PUSHPULL, "PUSHPULL", 0, "Pushpull", ""},
+ {TFM_CREASE, "CREASE", 0, "Crease", ""},
+ {TFM_MIRROR, "MIRROR", 0, "Mirror", ""},
+ {TFM_BONESIZE, "BONESIZE", 0, "Bonesize", ""},
+ {TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, "Bone_Envelope", ""},
+ {TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve_Shrinkfatten", ""},
+ {TFM_BONE_ROLL, "BONE_ROLL", 0, "Bone_Roll", ""},
+ {TFM_TIME_TRANSLATE, "TIME_TRANSLATE", 0, "Time_Translate", ""},
+ {TFM_TIME_SLIDE, "TIME_SLIDE", 0, "Time_Slide", ""},
+ {TFM_TIME_SCALE, "TIME_SCALE", 0, "Time_Scale", ""},
+ {TFM_TIME_EXTEND, "TIME_EXTEND", 0, "Time_Extend", ""},
+ {TFM_BAKE_TIME, "BAKE_TIME", 0, "Bake_Time", ""},
+ {TFM_BEVEL, "BEVEL", 0, "Bevel", ""},
+ {TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""},
+ {TFM_ALIGN, "ALIGN", 0, "Align", ""},
+ {0, NULL, 0, NULL, NULL}
};
/* identifiers */
ot->name = "Transform";
ot->idname = "TFM_OT_transform";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
@@ -531,9 +561,8 @@ void TFM_OT_transform(struct wmOperatorType *ot)
Properties_Proportional(ot);
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
-
- RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
- RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX);
+
+ Properties_Constraints(ot);
}
void transform_operatortypes(void)
@@ -547,10 +576,11 @@ void transform_operatortypes(void)
WM_operatortype_append(TFM_OT_warp);
WM_operatortype_append(TFM_OT_shrink_fatten);
WM_operatortype_append(TFM_OT_tilt);
+ WM_operatortype_append(TFM_OT_trackball);
WM_operatortype_append(TFM_OT_select_orientation);
}
-
+
void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid)
{
wmKeymapItem *km;
@@ -558,9 +588,9 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
{
case SPACE_VIEW3D:
km = WM_keymap_add_item(keymap, "TFM_OT_translation", GKEY, KM_PRESS, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_S, KM_ANY, 0, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_rotation", RKEY, KM_PRESS, 0, 0);
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
@@ -568,9 +598,9 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
km = WM_keymap_add_item(keymap, "TFM_OT_warp", WKEY, KM_PRESS, KM_SHIFT, 0);
km = WM_keymap_add_item(keymap, "TFM_OT_tosphere", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_shear", SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_shrink_fatten", SKEY, KM_PRESS, KM_ALT, 0);
km = WM_keymap_add_item(keymap, "TFM_OT_tilt", TKEY, KM_PRESS, 0, 0);
@@ -581,55 +611,68 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
case SPACE_ACTION:
km= WM_keymap_add_item(keymap, "TFM_OT_transform", GKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_TRANSLATE);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_TRANSLATE);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_transform", SKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_SCALE);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_transform", TKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_SLIDE);
break;
case SPACE_IPO:
km= WM_keymap_add_item(keymap, "TFM_OT_translation", GKEY, KM_PRESS, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_S, KM_ANY, 0, 0);
-
+
// XXX the 'mode' identifier here is not quite right
km= WM_keymap_add_item(keymap, "TFM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_rotation", RKEY, KM_PRESS, 0, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
break;
+ case SPACE_NLA:
+ km= WM_keymap_add_item(keymap, "TFM_OT_transform", GKEY, KM_PRESS, 0, 0);
+ RNA_int_set(km->ptr, "mode", TFM_TRANSLATION);
+
+ km= WM_keymap_add_item(keymap, "TFM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
+ RNA_int_set(km->ptr, "mode", TFM_TRANSLATION);
+
+ km= WM_keymap_add_item(keymap, "TFM_OT_transform", EKEY, KM_PRESS, 0, 0);
+ RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND);
+
+ km= WM_keymap_add_item(keymap, "TFM_OT_transform", SKEY, KM_PRESS, 0, 0);
+ RNA_int_set(km->ptr, "mode", TFM_TIME_SCALE);
+ break;
case SPACE_NODE:
km= WM_keymap_add_item(keymap, "TFM_OT_translation", GKEY, KM_PRESS, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_A, KM_ANY, 0, 0);
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_S, KM_ANY, 0, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_rotation", RKEY, KM_PRESS, 0, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
break;
case SPACE_SEQ:
km= WM_keymap_add_item(keymap, "TFM_OT_translation", GKEY, KM_PRESS, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_S, KM_ANY, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND);
break;
case SPACE_IMAGE:
km = WM_keymap_add_item(keymap, "TFM_OT_translation", GKEY, KM_PRESS, 0, 0);
-
+
km= WM_keymap_add_item(keymap, "TFM_OT_translation", EVT_TWEAK_S, KM_ANY, 0, 0);
-
+
km = WM_keymap_add_item(keymap, "TFM_OT_rotation", RKEY, KM_PRESS, 0, 0);
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 332a1e5a324..6cda535516e 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -60,6 +60,8 @@
#include "UI_interface.h"
+#include "RNA_define.h"
+
#include "transform.h"
/* *********************** TransSpace ************************** */
@@ -355,19 +357,48 @@ void BIF_selectTransformOrientationValue(bContext *C, int orientation) {
v3d->twmode = orientation;
}
-void BIF_menuTransformOrientation(bContext *C, uiLayout *layout, void *arg)
+EnumPropertyItem *BIF_enumTransformOrientation(bContext *C)
{
- ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
- TransformOrientation *ts;
- int i= V3D_MANIP_CUSTOM;
+ Scene *scene;
+ ListBase *transform_spaces;
+ TransformOrientation *ts= NULL;
+
+ EnumPropertyItem global = {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", ""};
+ EnumPropertyItem normal = {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", ""};
+ EnumPropertyItem local = {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", ""};
+ EnumPropertyItem view = {V3D_MANIP_VIEW, "VIEW", 0, "View", ""};
+ EnumPropertyItem sepr = {0, "", 0, NULL, NULL};
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ EnumPropertyItem *item= NULL;
+ int i = V3D_MANIP_CUSTOM, totitem= 0;
+
+ RNA_enum_item_add(&item, &totitem, &global);
+ RNA_enum_item_add(&item, &totitem, &normal);
+ RNA_enum_item_add(&item, &totitem, &local);
+ RNA_enum_item_add(&item, &totitem, &view);
+
+ if(C) {
+ scene= CTX_data_scene(C);
+
+ if(scene) {
+ transform_spaces = &scene->transform_spaces;
+ ts = transform_spaces->first;
+ }
+ }
+
+ if(ts)
+ RNA_enum_item_add(&item, &totitem, &sepr);
+
+ for(; ts; ts = ts->next) {
+ tmp.identifier = "CUSTOM";
+ tmp.name= ts->name;
+ tmp.value = i++;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
- uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_GLOBAL);
- uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_LOCAL);
- uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_NORMAL);
- uiItemEnumO(layout, NULL, 0, "TFM_OT_select_orientation", "orientation", V3D_MANIP_VIEW);
+ RNA_enum_item_end(&item, &totitem);
- for(ts = transform_spaces->first; ts; ts = ts->next)
- uiItemIntO(layout, ts->name, 0, "TFM_OT_select_orientation", "custom_index", i++);
+ return item;
}
char * BIF_menustringTransformOrientation(const bContext *C, char *title) {
@@ -403,7 +434,7 @@ int BIF_countTransformOrientation(const bContext *C) {
return count;
}
-void applyTransformOrientation(bContext *C, TransInfo *t) {
+void applyTransformOrientation(const bContext *C, TransInfo *t) {
TransformOrientation *ts;
View3D *v3d = CTX_wm_view3d(C);
int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
@@ -533,7 +564,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
}
}
-int getTransformOrientation(bContext *C, float normal[3], float plane[3], int activeOnly)
+int getTransformOrientation(const bContext *C, float normal[3], float plane[3], int activeOnly)
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -591,14 +622,11 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
BMFace *efa;
BMIter iter;
- efa = BMIter_New(&iter, em->bm, BM_FACES_OF_MESH, NULL);
- for( ; efa; efa=BMIter_Step(&iter))
- {
- if(BM_TestHFlag(efa, BM_SELECT))
- {
+ BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+ if(BM_TestHFlag(efa, BM_SELECT)) {
VECADD(normal, normal, efa->no);
VecSubf(vec, efa->loopbase->v->co,
- ((BMLoop*)efa->loopbase->head.next)->v->co);
+ ((BMLoop*)efa->loopbase->head.next)->v->co);
VECADD(plane, plane, vec);
}
}
@@ -610,11 +638,9 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
BMVert *v1 = NULL, *v2 = NULL, *v3 = NULL;
BMIter iter;
float cotangent[3];
-
- eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BMIter_Step(&iter))
- {
- if ( BM_TestHFlag(eve, BM_SELECT) ) {
+
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if (BM_TestHFlag(eve, BM_SELECT)) {
if (v1 == NULL) {
v1 = eve;
}
@@ -637,9 +663,8 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
{
BMEdge *eed = NULL;
BMIter iter;
-
- eed = BMIter_New(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for( ; eed; eed=BMIter_Step(&iter)) {
+
+ BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
if(BM_TestHFlag(eed, BM_SELECT)) {
VecSubf(plane, eed->v2->co, eed->v1->co);
break;
@@ -653,9 +678,8 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
{
BMEdge *eed = NULL;
BMIter iter;
-
- eed = BMIter_New(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
- for( ; eed; eed=BMIter_Step(&iter)) {
+
+ BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
if(BM_TestHFlag(eed, BM_SELECT)) {
/* use average vert normals as plane and edge vector as normal */
VECCOPY(plane, eed->v1->no);
@@ -668,13 +692,11 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
}
else if (em->bm->totvertsel == 2)
{
- BMVert *v1=NULL, *v2=NULL;
+ BMVert *v1 = NULL, *v2 = NULL;
BMIter iter;
- eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BMIter_Step(&iter))
- {
- if ( BM_TestHFlag(eve, BM_SELECT) ) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if (BM_TestHFlag(eve, BM_SELECT)) {
if (v1 == NULL) {
v1 = eve;
}
@@ -694,10 +716,8 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
{
BMIter iter;
- eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BMIter_Step(&iter))
- {
- if ( BM_TestHFlag(eve, BM_SELECT) ) {
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if (BM_TestHFlag(eve, BM_SELECT)) {
VECCOPY(normal, eve->no);
break;
}
@@ -707,14 +727,10 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac
else if (em->bm->totvertsel > 3)
{
BMIter iter;
-
- eve = BMIter_New(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
-
normal[0] = normal[1] = normal[2] = 0;
-
- for( ; eve; eve=BMIter_Step(&iter))
- {
- if ( BM_TestHFlag(eve, BM_SELECT) ) {
+
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ if (BM_TestHFlag(eve, BM_SELECT)) {
VecAddf(normal, normal, eve->no);
}
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index ad8ef95a870..575e8f2150a 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -63,8 +63,6 @@
//#include "BIF_drawimage.h"
//#include "BIF_editmesh.h"
-#include "BIF_transform.h"
-
#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BKE_DerivedMesh.h"
@@ -77,6 +75,7 @@
#include "ED_armature.h"
#include "ED_image.h"
#include "ED_mesh.h"
+#include "ED_transform.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
@@ -212,7 +211,7 @@ int handleSnapping(TransInfo *t, wmEvent *event)
if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift)
{
/* toggle snap and reinit */
- t->scene->snap_flag ^= SCE_SNAP;
+ t->settings->snap_flag ^= SCE_SNAP;
initSnapping(t, NULL);
status = 1;
}
@@ -284,10 +283,10 @@ int validSnappingNormal(TransInfo *t)
void initSnapping(TransInfo *t, wmOperator *op)
{
- Scene *scene = t->scene;
+ ToolSettings *ts = t->settings;
Object *obedit = t->obedit;
int snapping = 0;
- short snap_mode = t->scene->snap_target;
+ short snap_mode = t->settings->snap_target;
resetSnapping(t);
@@ -312,8 +311,8 @@ void initSnapping(TransInfo *t, wmOperator *op)
}
else
{
- snapping = ((scene->snap_flag & SCE_SNAP) == SCE_SNAP);
- t->tsnap.align = ((t->scene->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
+ snapping = ((ts->snap_flag & SCE_SNAP) == SCE_SNAP);
+ t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
}
if ((t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) && // Only 3D view or UV
@@ -544,7 +543,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
int dist = SNAP_MIN_DISTANCE; // Use a user defined value here
SnapMode mode;
- if (t->scene->snap_mode == SCE_SNAP_MODE_VOLUME)
+ if (t->settings->snap_mode == SCE_SNAP_MODE_VOLUME)
{
ListBase depth_peels;
DepthPeel *p1, *p2;
@@ -577,7 +576,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
p1->flag = 1;
/* if peeling objects, take the first and last from each object */
- if (t->scene->snap_flag & SCE_SNAP_PEEL_OBJECT)
+ if (t->settings->snap_flag & SCE_SNAP_PEEL_OBJECT)
{
DepthPeel *peel;
for (peel = p1->next; peel; peel = peel->next)
@@ -1361,6 +1360,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, B
int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], float *loc, float *no, int *dist, float *depth)
{
+ ToolSettings *ts= scene->toolsettings;
int retval = 0;
if (ob->type == OB_MESH) {
@@ -1378,13 +1378,13 @@ int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obma
dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
}
- retval = snapDerivedMesh(scene->snap_mode, ar, ob, dm, em, obmat, ray_start, ray_normal, mval, loc, no, dist, depth);
+ retval = snapDerivedMesh(ts->snap_mode, ar, ob, dm, em, obmat, ray_start, ray_normal, mval, loc, no, dist, depth);
dm->release(dm);
}
else if (ob->type == OB_ARMATURE)
{
- retval = snapArmature(scene->snap_mode, ar, ob, ob->data, obmat, ray_start, ray_normal, mval, loc, no, dist, depth);
+ retval = snapArmature(ts->snap_mode, ar, ob, ob->data, obmat, ray_start, ray_normal, mval, loc, no, dist, depth);
}
return retval;
diff --git a/source/blender/editors/util/Makefile b/source/blender/editors/util/Makefile
index da701dc5d86..303079daeee 100644
--- a/source/blender/editors/util/Makefile
+++ b/source/blender/editors/util/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 62ce76a7614..6f742d70440 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -125,7 +125,18 @@ static int ed_undo_step(bContext *C, int step)
{
Object *obedit= CTX_data_edit_object(C);
ScrArea *sa= CTX_wm_area(C);
-
+
+ if(sa && sa->spacetype==SPACE_IMAGE) {
+ SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
+
+ if(G.f & G_TEXTUREPAINT || sima->flag & SI_DRAWTOOL) {
+ undo_imagepaint_step(step);
+
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+ return OPERATOR_FINISHED;
+ }
+ }
+
if(sa && sa->spacetype==SPACE_TEXT) {
ED_text_undo_step(C, step);
}
@@ -138,13 +149,6 @@ static int ed_undo_step(bContext *C, int step)
if(G.f & G_TEXTUREPAINT)
undo_imagepaint_step(step);
- else if(sa && sa->spacetype==SPACE_IMAGE) {
- SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
- if(sima->flag & SI_DRAWTOOL)
- undo_imagepaint_step(step);
- else
- do_glob_undo= 1;
- }
else if(G.f & G_PARTICLEEDIT) {
if(step==1)
PE_undo(CTX_data_scene(C));
@@ -183,6 +187,8 @@ void ED_undo_redo(bContext *C)
static int ed_undo_exec(bContext *C, wmOperator *op)
{
+ /* "last operator" should disappear, later we can tie ths with undo stack nicer */
+ WM_operator_stack_clear(C);
return ed_undo_step(C, 1);
}
static int ed_redo_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/uvedit/Makefile b/source/blender/editors/uvedit/Makefile
index b8a8f0bc8af..d589bbec3bc 100644
--- a/source/blender/editors/uvedit/Makefile
+++ b/source/blender/editors/uvedit/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 372caa5564e..0a747c951f5 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -103,24 +103,26 @@ static void drawcursor_sima(SpaceImage *sima, ARegion *ar)
static int draw_uvs_face_check(Scene *scene)
{
+ ToolSettings *ts= scene->toolsettings;
+
/* checks if we are selecting only faces */
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
return 2;
- else if(scene->selectmode & SCE_SELECT_FACE)
+ else if(ts->selectmode & SCE_SELECT_FACE)
return 1;
else
return 0;
}
else
- return (scene->toolsettings->uv_selectmode == UV_SELECT_FACE);
+ return (ts->uv_selectmode == UV_SELECT_FACE);
}
static void draw_uvs_shadow(SpaceImage *sima, Object *obedit)
{
EditMesh *em;
EditFace *efa;
- TFace *tf;
+ MTFace *tf;
em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
@@ -419,7 +421,7 @@ static void draw_uvs_other(SpaceImage *sima, Scene *scene, Object *obedit, MTFac
/* draws uv's in the image space */
static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
{
- ToolSettings *settings;
+ ToolSettings *ts;
Mesh *me= obedit->data;
EditMesh *em;
EditFace *efa, *efa_act;
@@ -433,13 +435,13 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
em= BKE_mesh_get_editmesh(me);
activetf= EM_get_active_mtface(em, &efa_act, NULL, 0); /* will be set to NULL if hidden */
- settings= scene->toolsettings;
+ ts= scene->toolsettings;
drawfaces= draw_uvs_face_check(scene);
- if(settings->uv_flag & UV_SYNC_SELECTION)
- interpedges= (scene->selectmode & SCE_SELECT_VERTEX);
+ if(ts->uv_flag & UV_SYNC_SELECTION)
+ interpedges= (ts->selectmode & SCE_SELECT_VERTEX);
else
- interpedges= (settings->uv_selectmode == UV_SELECT_VERTEX);
+ interpedges= (ts->uv_selectmode == UV_SELECT_VERTEX);
/* draw other uvs */
if(sima->flag & SI_DRAW_OTHER)
@@ -455,7 +457,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* when sync selection is enabled, all faces are drawn (except for hidden)
* so if cage is the same as the final, theres no point in drawing this */
- if(!((settings->uv_flag & UV_SYNC_SELECTION) && (cagedm == finaldm)))
+ if(!((ts->uv_flag & UV_SYNC_SELECTION) && (cagedm == finaldm)))
draw_uvs_dm_shadow(finaldm);
/* release derivedmesh again */
@@ -590,7 +592,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
break;
case SI_UVDT_BLACK: /* black/white */
case SI_UVDT_WHITE:
- cpack((sima->dt_uv==SI_UVDT_WHITE) ? 0xFFFFFF : 0x0);
+ if(sima->dt_uv==SI_UVDT_WHITE) glColor3f(1.0f, 1.0f, 1.0f);
+ else glColor3f(0.0f, 0.0f, 0.0f);
for(efa= em->faces.first; efa; efa= efa->next) {
tf= (MTFace *)efa->tmp.p; /* visible faces cached */
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index d324c23fe06..6f8d710ed3e 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -54,11 +54,10 @@
#include "BKE_report.h"
#include "BKE_utildefines.h"
-#include "BIF_transform.h"
-
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -126,9 +125,6 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre
tf->tpage= ima;
tf->mode |= TF_TEX;
- if(ima->tpageflag & IMA_TILES) tf->mode |= TF_TILES;
- else tf->mode &= ~TF_TILES;
-
if(ima->id.us==0) id_us_plus(&ima->id);
else id_lib_extern(&ima->id);
}
@@ -150,7 +146,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre
/* dotile - 1, set the tile flag (from the space image)
* 2, set the tile index for the faces. */
-void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, int curtile, int dotile)
+void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, int curtile)
{
EditMesh *em;
EditFace *efa;
@@ -169,17 +165,8 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i
for(efa= em->faces.first; efa; efa= efa->next) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
- if(efa->h==0 && efa->f & SELECT) {
- if(dotile==1) {
- /* set tile flag */
- if(ima->tpageflag & IMA_TILES)
- tf->mode |= TF_TILES;
- else
- tf->mode &= ~TF_TILES;
- }
- else if(dotile==2)
- tf->tile= curtile; /* set tile index */
- }
+ if(efa->h==0 && efa->f & SELECT)
+ tf->tile= curtile; /* set tile index */
}
DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
@@ -203,7 +190,9 @@ static void uvedit_pixel_to_float(SpaceImage *sima, float *dist, float pixeldist
int uvedit_face_visible_nolocal(Scene *scene, EditFace *efa)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION)
return (efa->h==0);
else
return (efa->h==0 && (efa->f & SELECT));
@@ -211,7 +200,9 @@ int uvedit_face_visible_nolocal(Scene *scene, EditFace *efa)
int uvedit_face_visible(Scene *scene, Image *ima, EditFace *efa, MTFace *tf)
{
- if(scene->toolsettings->uv_flag & UV_SHOW_SAME_IMAGE)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SHOW_SAME_IMAGE)
return (tf->tpage==ima)? uvedit_face_visible_nolocal(scene, efa): 0;
else
return uvedit_face_visible_nolocal(scene, efa);
@@ -219,7 +210,9 @@ int uvedit_face_visible(Scene *scene, Image *ima, EditFace *efa, MTFace *tf)
int uvedit_face_selected(Scene *scene, EditFace *efa, MTFace *tf)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION)
return (efa->f & SELECT);
else
return (!(~tf->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) &&(!efa->v4 || tf->flag & TF_SEL4));
@@ -227,7 +220,9 @@ int uvedit_face_selected(Scene *scene, EditFace *efa, MTFace *tf)
void uvedit_face_select(Scene *scene, EditFace *efa, MTFace *tf)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION)
EM_select_face(efa, 1);
else
tf->flag |= (TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4);
@@ -235,7 +230,9 @@ void uvedit_face_select(Scene *scene, EditFace *efa, MTFace *tf)
void uvedit_face_deselect(Scene *scene, EditFace *efa, MTFace *tf)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION)
EM_select_face(efa, 0);
else
tf->flag &= ~(TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4);
@@ -243,12 +240,13 @@ void uvedit_face_deselect(Scene *scene, EditFace *efa, MTFace *tf)
int uvedit_edge_selected(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
+ ToolSettings *ts= scene->toolsettings;
int nvert= (efa->v4)? 4: 3;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
return (efa->f & SELECT);
- else if(scene->selectmode == SCE_SELECT_EDGE)
+ else if(ts->selectmode == SCE_SELECT_EDGE)
return (*(&efa->e1 + i))->f & SELECT;
else
return (((efa->v1 + i)->f & SELECT) && ((efa->v1 + (i+1)%nvert)->f & SELECT));
@@ -259,12 +257,13 @@ int uvedit_edge_selected(Scene *scene, EditFace *efa, MTFace *tf, int i)
void uvedit_edge_select(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
+ ToolSettings *ts= scene->toolsettings;
int nvert= (efa->v4)? 4: 3;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
EM_select_face(efa, 1);
- else if(scene->selectmode == SCE_SELECT_EDGE)
+ else if(ts->selectmode == SCE_SELECT_EDGE)
EM_select_edge((*(&efa->e1 + i)), 1);
else {
(efa->v1 + i)->f |= SELECT;
@@ -277,12 +276,13 @@ void uvedit_edge_select(Scene *scene, EditFace *efa, MTFace *tf, int i)
void uvedit_edge_deselect(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
+ ToolSettings *ts= scene->toolsettings;
int nvert= (efa->v4)? 4: 3;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
EM_select_face(efa, 0);
- else if(scene->selectmode == SCE_SELECT_EDGE)
+ else if(ts->selectmode == SCE_SELECT_EDGE)
EM_select_edge((*(&efa->e1 + i)), 0);
else {
(efa->v1 + i)->f &= ~SELECT;
@@ -295,8 +295,10 @@ void uvedit_edge_deselect(Scene *scene, EditFace *efa, MTFace *tf, int i)
int uvedit_uv_selected(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
return (efa->f & SELECT);
else
return (*(&efa->v1 + i))->f & SELECT;
@@ -307,8 +309,10 @@ int uvedit_uv_selected(Scene *scene, EditFace *efa, MTFace *tf, int i)
void uvedit_uv_select(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
EM_select_face(efa, 1);
else
(*(&efa->v1 + i))->f |= SELECT;
@@ -319,8 +323,10 @@ void uvedit_uv_select(Scene *scene, EditFace *efa, MTFace *tf, int i)
void uvedit_uv_deselect(Scene *scene, EditFace *efa, MTFace *tf, int i)
{
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode == SCE_SELECT_FACE)
+ ToolSettings *ts= scene->toolsettings;
+
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode == SCE_SELECT_FACE)
EM_select_face(efa, 0);
else
(*(&efa->v1 + i))->f &= ~SELECT;
@@ -963,9 +969,9 @@ static int mirror_exec(bContext *C, wmOperator *op)
void UV_OT_mirror(wmOperatorType *ot)
{
static EnumPropertyItem axis_items[] = {
- {'x', "MIRROR_X", "Mirror X", "Mirror UVs over X axis."},
- {'y', "MIRROR_Y", "Mirror Y", "Mirror UVs over Y axis."},
- {0, NULL, NULL, NULL}};
+ {'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";
@@ -1068,10 +1074,10 @@ static int align_exec(bContext *C, wmOperator *op)
void UV_OT_align(wmOperatorType *ot)
{
static EnumPropertyItem axis_items[] = {
- {'a', "ALIGN_AUTO", "Align Auto", "Automatically choose the axis on which there is most alignment already."},
- {'x', "ALIGN_X", "Align X", "Align UVs on X axis."},
- {'y', "ALIGN_Y", "Align Y", "Align UVs on Y axis."},
- {0, NULL, NULL, NULL}};
+ {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already."},
+ {'x', "ALIGN_X", 0, "Align X", "Align UVs on X axis."},
+ {'y', "ALIGN_Y", 0, "Align Y", "Align UVs on Y axis."},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Align";
@@ -1301,6 +1307,7 @@ void UV_OT_stitch(wmOperatorType *ot)
static int select_inverse_exec(bContext *C, wmOperator *op)
{
Scene *scene;
+ ToolSettings *ts;
Object *obedit;
EditMesh *em;
EditFace *efa;
@@ -1308,11 +1315,12 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
MTFace *tf;
scene= CTX_data_scene(C);
+ ts= CTX_data_tool_settings(C);
obedit= CTX_data_edit_object(C);
em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
ima= CTX_data_edit_image(C);
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_select_swap(em);
}
else {
@@ -1334,11 +1342,11 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void UV_OT_select_invert(wmOperatorType *ot)
+void UV_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Invert";
- ot->idname= "UV_OT_select_invert";
+ ot->name= "Select Inverse";
+ ot->idname= "UV_OT_select_inverse";
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
@@ -1351,6 +1359,7 @@ void UV_OT_select_invert(wmOperatorType *ot)
static int de_select_all_exec(bContext *C, wmOperator *op)
{
Scene *scene;
+ ToolSettings *ts;
Object *obedit;
EditMesh *em;
EditFace *efa;
@@ -1359,11 +1368,12 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
int sel;
scene= CTX_data_scene(C);
+ ts= CTX_data_tool_settings(C);
obedit= CTX_data_edit_object(C);
em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
ima= CTX_data_edit_image(C);
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
EDBM_toggle_select_all(((Mesh*)obedit->data)->edit_btmesh);
}
else {
@@ -1443,6 +1453,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Image *ima= CTX_data_edit_image(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
@@ -1457,12 +1468,12 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
uvedit_pixel_to_float(sima, penalty, 5.0f);
/* retrieve operation mode */
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
sync= 1;
- if(scene->selectmode & SCE_SELECT_FACE)
+ if(ts->selectmode & SCE_SELECT_FACE)
selectmode= UV_SELECT_FACE;
- else if(scene->selectmode & SCE_SELECT_EDGE)
+ else if(ts->selectmode & SCE_SELECT_EDGE)
selectmode= UV_SELECT_EDGE;
else
selectmode= UV_SELECT_VERTEX;
@@ -1471,7 +1482,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
else {
sync= 0;
- selectmode= scene->toolsettings->uv_selectmode;
+ selectmode= ts->uv_selectmode;
sticky= sima->sticky;
}
@@ -1693,7 +1704,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
if(sync) {
/* flush for mesh selection */
- if(scene->selectmode != SCE_SELECT_FACE) {
+ if(ts->selectmode != SCE_SELECT_FACE) {
if(flush==1) EM_select_flush(em);
else if(flush==-1) EM_deselect_flush(em);
}
@@ -1806,13 +1817,14 @@ static int select_linked_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Image *ima= CTX_data_edit_image(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
float limit[2];
int extend;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
@@ -1850,13 +1862,14 @@ void UV_OT_select_linked(wmOperatorType *ot)
static int unlink_selection_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Image *ima= CTX_data_edit_image(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
MTFace *tf;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
@@ -1913,12 +1926,13 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
* This only needs to be done when the Mesh is not used for
* selection (so for sticky modes, vertex or location based). */
+ ToolSettings *ts= CTX_data_tool_settings(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
MTFace *tf;
int nverts, i;
- if((scene->toolsettings->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_VERTEX) {
+ if((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_VERTEX) {
/* Tag all verts as untouched, then touch the ones that have a face center
* in the loop and select all MTFace UV's that use a touched vert. */
EditVert *eve;
@@ -1949,7 +1963,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
}
}
}
- else if((scene->toolsettings->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_LOC) {
+ else if((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_LOC) {
EditFace *efa_vlist;
MTFace *tf_vlist;
UvMapVert *start_vlist=NULL, *vlist_iter;
@@ -2020,7 +2034,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
EM_free_uv_vert_map(vmap);
}
- else { /* SI_STICKY_DISABLE or scene->toolsettings->uv_flag & UV_SYNC_SELECTION */
+ else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */
for(efa= em->faces.first; efa; efa= efa->next) {
if(efa->tmp.l) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -2038,6 +2052,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Image *ima= CTX_data_edit_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -2061,10 +2076,10 @@ static int border_select_exec(bContext *C, wmOperator *op)
select= (RNA_int_get(op->ptr, "event_type") == LEFTMOUSE); // XXX hardcoded
pinned= RNA_boolean_get(op->ptr, "pinned");
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION)
- faces= (scene->selectmode == SCE_SELECT_FACE);
+ if(ts->uv_flag & UV_SYNC_SELECTION)
+ faces= (ts->selectmode == SCE_SELECT_FACE);
else
- faces= (scene->toolsettings->uv_selectmode == UV_SELECT_FACE);
+ faces= (ts->uv_selectmode == UV_SELECT_FACE);
/* do actual selection */
if(faces && !pinned) {
@@ -2096,7 +2111,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
for(efa= em->faces.first; efa; efa= efa->next) {
tface= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
if(uvedit_face_visible(scene, ima, efa, tface)) {
- if(!pinned || (scene->toolsettings->uv_flag & UV_SYNC_SELECTION) ) {
+ if(!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
/* UV_SYNC_SELECTION - can't do pinned selection */
if(BLI_in_rctf(&rectf, tface->uv[0][0], tface->uv[0][1])) {
if(select) uvedit_uv_select(scene, efa, tface, 0);
@@ -2145,8 +2160,8 @@ static int border_select_exec(bContext *C, wmOperator *op)
if(change) {
/* make sure newly selected vert selection is updated*/
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(scene->selectmode != SCE_SELECT_FACE) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->selectmode != SCE_SELECT_FACE) {
if(select) EM_select_flush(em);
else EM_deselect_flush(em);
}
@@ -2326,9 +2341,9 @@ static int snap_cursor_exec(bContext *C, wmOperator *op)
void UV_OT_snap_cursor(wmOperatorType *ot)
{
static EnumPropertyItem target_items[] = {
- {0, "PIXELS", "Pixels", ""},
- {1, "SELECTION", "Selection", ""},
- {0, NULL, NULL, NULL}};
+ {0, "PIXELS", 0, "Pixels", ""},
+ {1, "SELECTION", 0, "Selection", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Snap Cursor";
@@ -2561,10 +2576,10 @@ static int snap_selection_exec(bContext *C, wmOperator *op)
void UV_OT_snap_selection(wmOperatorType *ot)
{
static EnumPropertyItem target_items[] = {
- {0, "PIXELS", "Pixels", ""},
- {1, "CURSOR", "Cursor", ""},
- {2, "ADJACENT_UNSELECTED", "Adjacent Unselected", ""},
- {0, NULL, NULL, NULL}};
+ {0, "PIXELS", 0, "Pixels", ""},
+ {1, "CURSOR", 0, "Cursor", ""},
+ {2, "ADJACENT_UNSELECTED", 0, "Adjacent Unselected", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Snap Selection";
@@ -2680,14 +2695,14 @@ void UV_OT_select_pinned(wmOperatorType *ot)
static int hide_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
MTFace *tf;
int swap= RNA_boolean_get(op->ptr, "unselected");
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_hide_mesh(em, swap);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
@@ -2824,14 +2839,14 @@ void UV_OT_hide(wmOperatorType *ot)
static int reveal_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C);
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
MTFace *tf;
/* call the mesh function if we are in mesh sync sel */
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_reveal_mesh(em);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
@@ -3006,7 +3021,7 @@ static int set_tile_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
RNA_int_get_array(op->ptr, "tile", tile);
- ED_uvedit_set_tile(C, CTX_data_scene(C), CTX_data_edit_object(C), ima, tile[0] + ima->xrep*tile[1], 1);
+ ED_uvedit_set_tile(C, CTX_data_scene(C), CTX_data_edit_object(C), ima, tile[0] + ima->xrep*tile[1]);
ED_area_tag_redraw(CTX_wm_area(C));
@@ -3065,7 +3080,7 @@ void UV_OT_tile_set(wmOperatorType *ot)
void ED_operatortypes_uvedit(void)
{
WM_operatortype_append(UV_OT_select_all_toggle);
- WM_operatortype_append(UV_OT_select_invert);
+ WM_operatortype_append(UV_OT_select_inverse);
WM_operatortype_append(UV_OT_select);
WM_operatortype_append(UV_OT_select_loop);
WM_operatortype_append(UV_OT_select_linked);
@@ -3120,7 +3135,7 @@ void ED_keymap_uvedit(wmWindowManager *wm)
WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "UV_OT_unlink_selection", LKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "UV_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "UV_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "UV_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "UV_OT_select_pinned", PKEY, KM_PRESS, KM_SHIFT, 0);
/* uv operations */
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 27d0c68ec36..c4f4704e47e 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -639,15 +639,15 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float
static void uv_transform_properties(wmOperatorType *ot, int radius)
{
static EnumPropertyItem direction_items[]= {
- {VIEW_ON_EQUATOR, "VIEW_ON_EQUATOR", "View on Equator", "3D view is on the equator."},
- {VIEW_ON_POLES, "VIEW_ON_POLES", "View on Poles", "3D view is on the poles."},
- {ALIGN_TO_OBJECT, "ALIGN_TO_OBJECT", "Align to Object", "Align according to object transform."},
- {0, NULL, NULL, NULL}
+ {VIEW_ON_EQUATOR, "VIEW_ON_EQUATOR", 0, "View on Equator", "3D view is on the equator."},
+ {VIEW_ON_POLES, "VIEW_ON_POLES", 0, "View on Poles", "3D view is on the poles."},
+ {ALIGN_TO_OBJECT, "ALIGN_TO_OBJECT", 0, "Align to Object", "Align according to object transform."},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem align_items[]= {
- {POLAR_ZX, "POLAR_ZX", "Polar ZX", "Polar 0 is X."},
- {POLAR_ZY, "POLAR_ZY", "Polar ZY", "Polar 0 is Y."},
- {0, NULL, NULL, NULL}
+ {POLAR_ZX, "POLAR_ZX", 0, "Polar ZX", "Polar 0 is X."},
+ {POLAR_ZY, "POLAR_ZY", 0, "Polar ZY", "Polar 0 is Y."},
+ {0, NULL, 0, NULL, NULL}
};
RNA_def_enum(ot->srna, "direction", direction_items, VIEW_ON_EQUATOR, "Direction", "Direction of the sphere or cylinder.");
@@ -820,9 +820,9 @@ static int unwrap_exec(bContext *C, wmOperator *op)
void UV_OT_unwrap(wmOperatorType *ot)
{
static EnumPropertyItem method_items[] = {
- {0, "ANGLE_BASED", "Angle Based", ""},
- {1, "CONFORMAL", "Conformal", ""},
- {0, NULL, NULL, NULL}};
+ {0, "ANGLE_BASED", 0, "Angle Based", ""},
+ {1, "CONFORMAL", 0, "Conformal", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Unwrap";
@@ -1337,7 +1337,7 @@ static int mapping_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
void UV_OT_mapping_menu(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mapping Menu";
+ ot->name= "UV Mapping";
ot->idname= "UV_OT_mapping_menu";
/* api callbacks */
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index ce130951840..802f30506f8 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -63,8 +63,10 @@ void GPU_state_init(void);
* GPU_enable_material returns 0 if drawing should be skipped
* - after drawing, the material must be disabled again */
-void GPU_set_object_materials(struct View3D *v3d, struct RegionView3D *rv3d,
+void GPU_begin_object_materials(struct View3D *v3d, struct RegionView3D *rv3d,
struct Scene *scene, struct Object *ob, int glsl, int *do_alpha_pass);
+void GPU_end_object_materials(void);
+
int GPU_enable_material(int nr, void *attribs);
void GPU_disable_material(void);
diff --git a/source/blender/gpu/intern/Makefile b/source/blender/gpu/intern/Makefile
index 733ee3f764c..3a3ac20ff6c 100644
--- a/source/blender/gpu/intern/Makefile
+++ b/source/blender/gpu/intern/Makefile
@@ -35,7 +35,7 @@ DIR = $(OCGDIR)/blender/$(LIBNAME)
include nan_compile.mk
-ifeq ($(OS),$(findstring $(OS), "beos darwin freebsd linux openbsd solaris windows"))
+ifeq ($(OS),$(findstring $(OS), "darwin freebsd linux openbsd solaris windows"))
CFLAGS += -funsigned-char
endif
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index f8d0957f70d..efb7d688a49 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -393,7 +393,7 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare)
/* initialize tile mode and number of repeats */
GTS.ima = ima;
- GTS.tilemode= (tfmode & TF_TILES) || (ima && (ima->tpageflag & IMA_TWINANIM));
+ GTS.tilemode= (ima && (ima->tpageflag & (IMA_TILES|IMA_TWINANIM)));
GTS.tileXRep = 0;
GTS.tileYRep = 0;
@@ -423,7 +423,7 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare)
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
- if((tfmode & TF_TILES) && ima!=NULL)
+ if(ima && (ima->tpageflag & IMA_TILES))
glScalef(ima->xrep, ima->yrep, 1.0);
glMatrixMode(GL_MODELVIEW);
@@ -776,16 +776,17 @@ void GPU_free_images(void)
/* OpenGL Materials */
-/* materials start counting at # one.... */
-#define MAXMATBUF (MAXMAT+1)
+#define FIXEDMAT 8
/* OpenGL state caching for materials */
static struct GPUMaterialState {
- float matbuf[MAXMATBUF][2][4];
+ float (*matbuf)[2][4];
+ float matbuf_fixed[FIXEDMAT][2][4];
int totmat;
- Material *gmatbuf[MAXMATBUF];
+ Material **gmatbuf;
+ Material *gmatbuf_fixed[FIXEDMAT];
Material *gboundmat;
Object *gob;
Scene *gscene;
@@ -793,7 +794,8 @@ static struct GPUMaterialState {
float (*gviewmat)[4];
float (*gviewinv)[4];
- GPUBlendMode blendmode[MAXMATBUF];
+ GPUBlendMode *blendmode;
+ GPUBlendMode blendmode_fixed[FIXEDMAT];
int alphapass;
int lastmatnr, lastretval;
@@ -814,7 +816,7 @@ Material *gpu_active_node_material(Material *ma)
return ma;
}
-void GPU_set_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Object *ob, int glsl, int *do_alpha_pass)
+void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Object *ob, int glsl, int *do_alpha_pass)
{
extern Material defmaterial; /* from material.c */
Material *ma;
@@ -830,7 +832,7 @@ void GPU_set_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Obj
GMS.gob = ob;
GMS.gscene = scene;
- GMS.totmat= ob->totcol;
+ GMS.totmat= ob->totcol+1; /* materials start from 1, default material is 0 */
GMS.glay= v3d->lay;
GMS.gviewmat= rv3d->viewmat;
GMS.gviewinv= rv3d->viewinv;
@@ -838,6 +840,17 @@ void GPU_set_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Obj
GMS.alphapass = (v3d && v3d->transp);
if(do_alpha_pass)
*do_alpha_pass = 0;
+
+ if(GMS.totmat > FIXEDMAT) {
+ GMS.matbuf= MEM_callocN(sizeof(*GMS.matbuf)*GMS.totmat, "GMS.matbuf");
+ GMS.gmatbuf= MEM_callocN(sizeof(*GMS.gmatbuf)*GMS.totmat, "GMS.matbuf");
+ GMS.blendmode= MEM_callocN(sizeof(*GMS.blendmode)*GMS.totmat, "GMS.matbuf");
+ }
+ else {
+ GMS.matbuf= GMS.matbuf_fixed;
+ GMS.gmatbuf= GMS.gmatbuf_fixed;
+ GMS.blendmode= GMS.blendmode_fixed;
+ }
/* no materials assigned? */
if(ob->totcol==0) {
@@ -870,10 +883,6 @@ void GPU_set_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Obj
if(!glsl) ma= gpu_active_node_material(ma);
if(ma==NULL) ma= &defmaterial;
- /* this shouldn't happen .. */
- if(a>=MAXMATBUF)
- continue;
-
/* create glsl material if requested */
gpumat = (glsl)? GPU_material_from_blender(GMS.gscene, ma): NULL;
@@ -926,14 +935,14 @@ int GPU_enable_material(int nr, void *attribs)
GPUBlendMode blendmode;
/* prevent index to use un-initialized array items */
- if(nr>GMS.totmat)
- nr= GMS.totmat;
+ if(nr>=GMS.totmat)
+ nr= 0;
if(gattribs)
memset(gattribs, 0, sizeof(*gattribs));
/* keep current material */
- if(nr>=MAXMATBUF || nr==GMS.lastmatnr)
+ if(nr==GMS.lastmatnr)
return GMS.lastretval;
/* unbind glsl material */
@@ -1004,6 +1013,21 @@ void GPU_disable_material(void)
GPU_set_material_blend_mode(GPU_BLEND_SOLID);
}
+void GPU_end_object_materials(void)
+{
+ GPU_disable_material();
+
+ if(GMS.matbuf && GMS.matbuf != GMS.matbuf_fixed) {
+ MEM_freeN(GMS.matbuf);
+ MEM_freeN(GMS.gmatbuf);
+ MEM_freeN(GMS.blendmode);
+
+ GMS.matbuf= NULL;
+ GMS.gmatbuf= NULL;
+ GMS.blendmode= NULL;
+ }
+}
+
/* Lights */
int GPU_default_lights(void)
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 7654c67419b..4984e043031 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -746,7 +746,9 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, /*GPU
glGetObjectParameterivARB(shader->object, GL_OBJECT_LINK_STATUS_ARB, &status);
if (!status) {
glGetInfoLogARB(shader->object, sizeof(log), &length, log);
- shader_print_errors("linking", log, fragcode);
+ if (fragcode) shader_print_errors("linking", log, fragcode);
+ else if (vertexcode) shader_print_errors("linking", log, vertexcode);
+ else if (libcode) shader_print_errors("linking", log, libcode);
GPU_shader_free(shader);
return NULL;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 818b67170c7..7e8b5c18d71 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1285,7 +1285,7 @@ void GPU_materials_free()
GPU_material_free(&defmaterial);
- for(ob=G.main->object.first; ma; ma=ma->id.next)
+ for(ob=G.main->object.first; ob; ob=ob->id.next)
GPU_lamp_free(ob);
}
diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h
index bd2a0d3082f..7b5d668ce2b 100644
--- a/source/blender/imbuf/intern/imbuf.h
+++ b/source/blender/imbuf/intern/imbuf.h
@@ -51,7 +51,7 @@
#include <sys/mman.h>
#endif
-#if !defined(WIN32) && !defined(__BeOS)
+#if !defined(WIN32)
#define O_BINARY 0
#endif
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index d00e34cfdbe..69c4970df38 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -191,7 +191,7 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, int size, int flags)
break;
}
}
- if (found) {
+ if (found && (x<(size + 2))) {
if (sscanf((char *)&mem[x+1], "%79s %d %79s %d", (char*)&oriY, &height,
(char*)&oriX, &width) != 4) return NULL;
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 6df92f69fff..1a6ab104bcf 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -244,26 +244,6 @@ struct ImBuf *IMB_loadifffile(int file, int flags) {
size = BLI_filesize(file);
-#if defined(AMIGA) || defined(__BeOS)
- mem= (int *)malloc(size);
- if (mem==0) {
- printf("Out of mem\n");
- return (0);
- }
-
- if (read(file, mem, size)!=size){
- printf("Read Error\n");
- free(mem);
- return (0);
- }
-
- ibuf = IMB_ibImageFromMemory(mem, size, flags);
- free(mem);
-
- /* for jpeg read */
- lseek(file, 0L, SEEK_SET);
-
-#else
mem= (int *)mmap(0,size,PROT_READ,MAP_SHARED,file,0);
if (mem==(int *)-1){
printf("Couldn't get mapping\n");
@@ -275,7 +255,6 @@ struct ImBuf *IMB_loadifffile(int file, int flags) {
if (munmap( (void *) mem, size)){
printf("Couldn't unmap file.\n");
}
-#endif
return(ibuf);
}
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 7e54045b5e4..4eddebc5b67 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -225,10 +225,18 @@ typedef struct bActionGroup {
/* Action Group flags */
typedef enum eActionGroup_Flag {
+ /* group is selected */
AGRP_SELECTED = (1<<0),
+ /* group is 'active' / last selected one */
AGRP_ACTIVE = (1<<1),
+ /* keyframes/channels belonging to it cannot be edited */
AGRP_PROTECTED = (1<<2),
+ /* for UI, sub-channels are shown */
AGRP_EXPANDED = (1<<3),
+ /* sub-channels are not evaluated */
+ AGRP_MUTED = (1<<4),
+ /* sub-channels are not visible in Graph Editor */
+ AGRP_NOTVISIBLE = (1<<5),
AGRP_TEMP = (1<<30),
AGRP_MOVED = (1<<31)
@@ -269,6 +277,7 @@ typedef enum eAction_Flags {
/* flags for evaluation/editing */
ACT_MUTED = (1<<9),
ACT_PROTECTED = (1<<10),
+ ACT_DISABLED = (1<<11),
} eAction_Flags;
@@ -288,8 +297,10 @@ typedef struct bDopeSheet {
/* DopeSheet filter-flag */
typedef enum DOPESHEET_FILTERFLAG {
/* general filtering */
- ADS_FILTER_ONLYSEL = (1<<0),
- ADS_FILTER_ONLYDRIVERS = (1<<1),
+ ADS_FILTER_ONLYSEL = (1<<0), /* only include channels relating to selected data */
+
+ ADS_FILTER_ONLYDRIVERS = (1<<1), /* for 'Drivers' editor - only include Driver data from AnimData */
+ ADS_FILTER_ONLYNLA = (1<<2), /* for 'NLA' editor - only include NLA data from AnimData */
/* datatype-based filtering */
ADS_FILTER_NOSHAPEKEYS = (1<<6),
@@ -300,9 +311,11 @@ typedef enum DOPESHEET_FILTERFLAG {
ADS_FILTER_NOWOR = (1<<14),
ADS_FILTER_NOSCE = (1<<15),
+ /* NLA-specific filters */
+ ADS_FILTER_NLA_NOACT = (1<<20), /* if the AnimData block has no NLA data, don't include to just show Action-line */
+
/* combination filters (some only used at runtime) */
ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR),
- ADS_FILTER_NLADUMMY = (ADS_FILTER_NOSHAPEKEYS|ADS_FILTER_NOOBDATA),
} DOPESHEET_FILTERFLAG;
/* DopeSheet general flags */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index bf6b9bed5a1..fed0c490014 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -1,5 +1,28 @@
-/* Testing code for new animation system in 2.5
- * Copyright 2009, Joshua Leung
+/**
+ * $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
+ * All rights reserved.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#ifndef DNA_ANIM_TYPES_H
@@ -43,9 +66,10 @@ typedef struct FModifier {
enum {
FMODIFIER_TYPE_NULL = 0,
FMODIFIER_TYPE_GENERATOR,
+ FMODIFIER_TYPE_FN_GENERATOR,
FMODIFIER_TYPE_ENVELOPE,
FMODIFIER_TYPE_CYCLES,
- FMODIFIER_TYPE_NOISE, /* unimplemented - generate variations using some basic noise generator... */
+ FMODIFIER_TYPE_NOISE,
FMODIFIER_TYPE_FILTER, /* unimplemented - for applying: fft, high/low pass filters, etc. */
FMODIFIER_TYPE_PYTHON,
FMODIFIER_TYPE_LIMITS,
@@ -68,39 +92,55 @@ enum {
/* --- */
-/* generator modifier data */
+/* Generator modifier data */
typedef struct FMod_Generator {
- /* generator based on PyExpression */
- char expression[256]; /* python expression to use as generator */
-
/* general generator information */
float *coefficients; /* coefficients array */
unsigned int arraysize; /* size of the coefficients array */
- short poly_order; /* order of polynomial generated (i.e. 1 for linear, 2 for quadratic) */
- short func_type; /* builtin math function eFMod_Generator_Functions */
-
- int pad;
+ int poly_order; /* order of polynomial generated (i.e. 1 for linear, 2 for quadratic) */
+ int mode; /* which 'generator' to use eFMod_Generator_Modes */
/* settings */
- short flag; /* settings */
- short mode; /* which 'generator' to use eFMod_Generator_Modes */
+ int flag; /* settings */
} FMod_Generator;
/* generator modes */
enum {
FCM_GENERATOR_POLYNOMIAL = 0,
FCM_GENERATOR_POLYNOMIAL_FACTORISED,
- FCM_GENERATOR_FUNCTION,
- FCM_GENERATOR_EXPRESSION,
} eFMod_Generator_Modes;
-/* generator flags */
+
+/* generator flags
+ * - shared by Generator and Function Generator
+ */
enum {
/* generator works in conjunction with other modifiers (i.e. doesn't replace those before it) */
FCM_GENERATOR_ADDITIVE = (1<<0),
} eFMod_Generator_Flags;
+
+/* 'Built-In Function' Generator modifier data
+ *
+ * This uses the general equation for equations:
+ * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
+ *
+ * where amplitude, phase_multiplier/offset, y_offset are user-defined coefficients,
+ * x is the evaluation 'time', and 'y' is the resultant value
+ */
+typedef struct FMod_FunctionGenerator {
+ /* coefficients for general equation (as above) */
+ float amplitude;
+ float phase_multiplier;
+ float phase_offset;
+ float value_offset;
+
+ /* flags */
+ int type; /* eFMod_Generator_Functions */
+ int flag; /* eFMod_Generator_flags */
+} FMod_FunctionGenerator;
+
/* 'function' generator types */
enum {
FCM_GENERATOR_FN_SIN = 0,
@@ -108,6 +148,7 @@ enum {
FCM_GENERATOR_FN_TAN,
FCM_GENERATOR_FN_SQRT,
FCM_GENERATOR_FN_LN,
+ FCM_GENERATOR_FN_SINC,
} eFMod_Generator_Functions;
@@ -386,85 +427,104 @@ typedef struct AnimMapper {
/* ************************************************ */
/* NLA - Non-Linear Animation */
-// TODO: the concepts here still need to be refined to solve any unresolved items
-
-/* NLA Modifiers ---------------------------------- */
-
-/* These differ from F-Curve modifiers, as although F-Curve modifiers also operate on a
- * per-channel basis too (in general), they are part of the animation data itself, which
- * means that their effects are inherited by all of their users. In order to counteract this,
- * the modifiers here should be used to provide variation to pre-created motions only.
- */
/* NLA Strips ------------------------------------- */
/* NLA Strip (strip)
*
* A NLA Strip is a container for the reuse of Action data, defining parameters
- * to control the remapping of the Action data to some destination. Actions being
- * referenced by NLA-Strips SHOULD-NOT be editable, unless they were created in such
- * a way that results in very little mapping distortion (i.e. for layered animation only,
- * opposed to prebuilt 'blocks' which are quickly dumped into the NLA for crappymatic machima-type
- * stuff)
+ * to control the remapping of the Action data to some destination.
*/
typedef struct NlaStrip {
struct NlaStrip *next, *prev;
- bAction *act; /* Action that is referenced by this strip */
+ ListBase strips; /* 'Child' strips (used for 'meta' strips) */
+ bAction *act; /* Action that is referenced by this strip (strip is 'user' of the action) */
AnimMapper *remap; /* Remapping info this strip (for tweaking correspondance of action with context) */
- ListBase modifiers; /* NLA Modifiers */
+ ListBase fcurves; /* F-Curves for controlling this strip's influence and timing */ // TODO: move out?
+ ListBase modifiers; /* F-Curve modifiers to be applied to the entire strip's referenced F-Curves */
+
+ char name[64]; /* User-Visible Identifier for Strip */
- ListBase fcurves; /* F-Curves for controlling this strip's influence and timing */
float influence; /* Influence of strip */
- float act_time; /* Current 'time' within action being used */
+ float strip_time; /* Current 'time' within action being used (automatically evaluated, but can be overridden) */
float start, end; /* extents of the strip */
float actstart, actend; /* range of the action to use */
- float repeat; /* The number of times to repeat the action range (only when no F-Curves) */
- float scale; /* The amount the action range is scaled by (only when no F-Curves) */
+ float repeat; /* The number of times to repeat the action range (only when no F-Curves) */
+ float scale; /* The amount the action range is scaled by (only when no F-Curves) */
float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */
- int blendmode; /* strip blending mode */
-
- int flag; /* settings */
-
- // umm... old unused cruft?
- int stride_axis; /* axis for stridebone stuff - 0=x, 1=y, 2=z */
- int pad;
+ short blendmode; /* strip blending mode (layer-based mixing) */
+ short extendmode; /* strip extrapolation mode (time-based mixing) */
- float actoffs; /* Offset within action, for cycles and striding (only set for ACT_USESTRIDE) */
- float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */
-
- char stridechannel[32]; /* Instead of stridelen, it uses an action channel */
- char offs_bone[32]; /* if repeat, use this bone/channel for defining offset */
+ short flag; /* settings */
+ short type; /* type of NLA strip */
} NlaStrip;
/* NLA Strip Blending Mode */
enum {
- NLASTRIPMODE_BLEND = 0,
- NLASTRIPMODE_ADD,
- NLASTRIPMODE_SUBTRACT,
-} eActStrip_Mode;
+ NLASTRIP_MODE_REPLACE = 0,
+ NLASTRIP_MODE_ADD,
+ NLASTRIP_MODE_SUBTRACT,
+ NLASTRIP_MODE_MULTIPLY,
+} eNlaStrip_Blend_Mode;
+
+/* NLA Strip Extrpolation Mode */
+enum {
+ /* extend before first frame if no previous strips in track, and always hold+extend last frame */
+ NLASTRIP_EXTEND_HOLD = 0,
+ /* only hold+extend last frame */
+ NLASTRIP_EXTEND_HOLD_FORWARD,
+ /* don't contribute at all */
+ NLASTRIP_EXTEND_NOTHING,
+} eNlaStrip_Extrapolate_Mode;
/* NLA Strip Settings */
-// TODO: check on which of these are still useful...
enum {
- NLASTRIP_SELECT = (1<<0),
- NLASTRIP_USESTRIDE = (1<<1),
- NLASTRIP_BLENDTONEXT = (1<<2), /* Not implemented. Is not used anywhere */
- NLASTRIP_HOLDLASTFRAME = (1<<3),
- NLASTRIP_ACTIVE = (1<<4),
- NLASTRIP_LOCK_ACTION = (1<<5),
- NLASTRIP_MUTE = (1<<6),
- NLASTRIP_REVERSE = (1<<7), /* This has yet to be implemented. To indicate that a strip should be played backwards */
- NLASTRIP_CYCLIC_USEX = (1<<8),
- NLASTRIP_CYCLIC_USEY = (1<<9),
- NLASTRIP_CYCLIC_USEZ = (1<<10),
- NLASTRIP_AUTO_BLENDS = (1<<11),
- NLASTRIP_TWEAK = (1<<12), /* This strip is a tweaking strip (only set if owner track is a tweak track) */
-} eActionStrip_Flag;
+ /* UI selection flags */
+ /* NLA strip is the active one in the track (also indicates if strip is being tweaked) */
+ NLASTRIP_FLAG_ACTIVE = (1<<0),
+ /* NLA strip is selected for editing */
+ NLASTRIP_FLAG_SELECT = (1<<1),
+// NLASTRIP_FLAG_SELECT_L = (1<<2), // left handle selected
+// NLASTRIP_FLAG_SELECT_R = (1<<3), // right handle selected
+ /* NLA strip uses the same action that the action being tweaked uses (not set for the twaking one though) */
+ NLASTRIP_FLAG_TWEAKUSER = (1<<4),
+
+ /* controls driven by local F-Curves */
+ /* strip influence is controlled by local F-Curve */
+ NLASTRIP_FLAG_USR_INFLUENCE = (1<<5),
+ NLASTRIP_FLAG_USR_TIME = (1<<6),
+
+ /* playback flags (may be overriden by F-Curves) */
+ /* NLA strip blendin/out values are set automatically based on overlaps */
+ NLASTRIP_FLAG_AUTO_BLENDS = (1<<10),
+ /* NLA strip is played back in reverse order */
+ NLASTRIP_FLAG_REVERSE = (1<<11),
+ /* NLA strip is muted (i.e. doesn't contribute in any way) */
+ // TODO: this overlaps a lot with the functionality in track
+ NLASTRIP_FLAG_MUTED = (1<<12),
+ /* NLA strip length is synced to the length of the referenced action */
+ NLASTRIP_FLAG_SYNC_LENGTH = (1<<13),
+
+ /* temporary editing flags */
+ /* NLA-Strip is really just a temporary meta used to facilitate easier transform code */
+ NLASTRIP_FLAG_TEMP_META = (1<<14),
+ NLASTRIP_FLAG_EDIT_TOUCHED = (1<<15),
+} eNlaStrip_Flag;
+
+/* NLA Strip Type */
+enum {
+ /* 'clip' - references an Action */
+ NLASTRIP_TYPE_CLIP = 0,
+ /* 'transition' - blends between the adjacent strips */
+ NLASTRIP_TYPE_TRANSITION,
+ /* 'meta' - a strip which acts as a container for a few others */
+ NLASTRIP_TYPE_META,
+} eNlaStrip_Type;
/* NLA Tracks ------------------------------------- */
@@ -483,14 +543,12 @@ typedef struct NlaTrack {
int flag; /* settings for this track */
int index; /* index of the track in the stack (NOTE: not really useful, but we need a pad var anyways!) */
- char info[64]; /* short user-description of this track */
+ char name[64]; /* short user-description of this track */
} NlaTrack;
/* settings for track */
enum {
- /* track is the one that settings can be modified on (doesn't indicate
- * that it's for 'tweaking' though)
- */
+ /* track is the one that settings can be modified on, also indicates if track is being 'tweaked' */
NLATRACK_ACTIVE = (1<<0),
/* track is selected in UI for relevant editing operations */
NLATRACK_SELECTED = (1<<1),
@@ -500,10 +558,9 @@ enum {
NLATRACK_SOLO = (1<<3),
/* track's settings (and strips) cannot be edited (to guard against unwanted changes) */
NLATRACK_PROTECTED = (1<<4),
- /* strip is the 'last' one that should be evaluated, as the active action
- * is being used to tweak the animation of the strips up to here
- */
- NLATRACK_TWEAK = (1<<5),
+
+ /* track is not allowed to execute, usually as result of tweaking being enabled (internal flag) */
+ NLATRACK_DISABLED = (1<<10),
} eNlaTrack_Flag;
@@ -646,11 +703,15 @@ typedef struct AnimOverride {
* blocks may override local settings.
*
* This datablock should be placed immediately after the ID block where it is used, so that
- * the code which retrieves this data can do so in an easier manner. See blenkernel/internal/anim_sys.c for details.
+ * the code which retrieves this data can do so in an easier manner. See blenkernel/intern/anim_sys.c for details.
*/
typedef struct AnimData {
/* active action - acts as the 'tweaking track' for the NLA */
- bAction *action;
+ bAction *action;
+ /* temp-storage for the 'real' active action (i.e. the one used before the tweaking-action
+ * took over to be edited in the Animation Editors)
+ */
+ bAction *tmpact;
/* remapping-info for active action - should only be used if needed
* (for 'foreign' actions that aren't working correctly)
*/
@@ -658,6 +719,8 @@ typedef struct AnimData {
/* nla-tracks */
ListBase nla_tracks;
+ /* active NLA-strip (only set/used during tweaking, so no need to worry about dangling pointers) */
+ NlaStrip *actstrip;
/* 'drivers' for this ID-block's settings - FCurves, but are completely
* separate from those for animation data
@@ -676,11 +739,20 @@ enum {
ADT_NLA_SOLO_TRACK = (1<<0),
/* don't use NLA */
ADT_NLA_EVAL_OFF = (1<<1),
- /* don't execute drivers */
- ADT_DRIVERS_DISABLED = (1<<2),
+ /* NLA is being 'tweaked' (i.e. in EditMode) */
+ ADT_NLA_EDIT_ON = (1<<2),
+ /* active Action for 'tweaking' does not have mapping applied for editing */
+ ADT_NLA_EDIT_NOMAP = (1<<3),
+ /* NLA-Strip F-Curves are expanded in UI */
+ ADT_NLA_SKEYS_COLLAPSED = (1<<4),
/* drivers expanded in UI */
ADT_DRIVERS_COLLAPSED = (1<<10),
+ /* don't execute drivers */
+ ADT_DRIVERS_DISABLED = (1<<11),
+
+ /* F-Curves from this AnimData block are not visible in the Graph Editor */
+ ADT_CURVES_NOT_VISIBLE = (1<<16),
} eAnimData_Flag;
/* Animation Data recalculation settings (to be set by depsgraph) */
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 88520a12e75..93a974c1180 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -84,6 +84,7 @@ typedef struct Brush {
#define BRUSH_ANCHORED 256
#define BRUSH_DIR_IN 512
#define BRUSH_SPACE 1024
+#define BRUSH_SMOOTH_STROKE 2048
/* Brush.blend */
#define BRUSH_BLEND_MIX 0
@@ -108,6 +109,7 @@ typedef struct Brush {
#define SCULPT_TOOL_GRAB 5
#define SCULPT_TOOL_LAYER 6
#define SCULPT_TOOL_FLATTEN 7
+#define SCULPT_TOOL_CLAY 8
#define PAINT_TOOL_DRAW 0
#define PAINT_TOOL_SOFTEN 1
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 7a504efdd2a..8ba7fa8b58d 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -79,6 +79,7 @@ typedef struct Camera {
#define CAM_SHOWNAME 16
#define CAM_ANGLETOGGLE 32
#define CAM_DS_EXPAND 64
+#define CAM_PANORAMA 128
/* yafray: dof sampling switch */
#define CAM_YF_NO_QMC 512
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index f8ea5f95d65..b0f089d670f 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -148,7 +148,7 @@ typedef struct Curve {
ListBase *editnurb; /* edited data, not in file, use pointer so we can check for it */
struct Object *bevobj, *taperobj, *textoncurve;
- struct Ipo *ipo;
+ struct Ipo *ipo; // XXX depreceated... old animation system
Path *path;
struct Key *key;
struct Material **mat;
@@ -193,7 +193,8 @@ typedef struct Curve {
int sepchar;
- int totbox, actbox, pad;
+ float ctime; /* current evaltime - for use by Objects parented to curves */
+ int totbox, actbox;
struct TextBox *tb;
int selstart, selend;
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 371b0d75951..65e4be1173d 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -87,6 +87,9 @@ typedef struct Image {
struct PackedFile * packedfile;
struct PreviewImage * preview;
+ /* not saved in file, statistics for render result */
+ char *render_text;
+
float lastupdate;
int lastused;
short animspeed;
@@ -120,5 +123,9 @@ typedef struct Image {
/* ima->type and ima->source moved to BKE_image.h, for API */
+/* render_text maxlen */
+#define IMA_RW_MAXTEXT 512
+
+
#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index cd0b73c8f70..561638bfd20 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -142,10 +142,10 @@ typedef struct Material {
/* **************** MATERIAL ********************* */
- /* maximum number of materials per material array
- * (on object, mesh, lamp, etc.)
- */
-#define MAXMAT 16
+/* maximum number of materials per material array.
+ * (on object, mesh, lamp, etc.). limited by
+ * short mat_nr in verts, faces. */
+#define MAXMAT 32767
/* material_type */
#define MA_TYPE_SURFACE 0
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index bbd5ce378d7..94713cf0d76 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -37,7 +37,7 @@ struct Image;
typedef struct MFace {
unsigned int v1, v2, v3, v4;
- char pad, mat_nr;
+ short mat_nr;
char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */
} MFace;
@@ -61,7 +61,8 @@ typedef struct MDeformVert {
typedef struct MVert {
float co[3];
short no[3];
- char flag, mat_nr, bweight, pad[3];
+ short mat_nr;
+ char flag, bweight, pad[2];
} MVert;
/* at the moment alpha is abused for vertex painting
@@ -75,7 +76,7 @@ typedef struct MCol {
typedef struct MPoly {
/*offset into loop array and number of loops in the face*/
int loopstart, totloop;
- char pad, mat_nr;
+ short mat_nr;
short flag;
} MPoly;
@@ -149,7 +150,7 @@ typedef struct MultiresColFace {
} MultiresColFace;
typedef struct MultiresFace {
unsigned int v[4];
- unsigned int mid;
+ unsigned int mid;
char flag, mat_nr, pad[2];
} MultiresFace;
typedef struct MultiresEdge {
@@ -256,7 +257,7 @@ typedef struct PartialVisibility {
#define TF_LIGHT 16
#define TF_SHAREDCOL 64
-#define TF_TILES 128
+#define TF_TILES 128 /* deprecated */
#define TF_BILLBOARD 256
#define TF_TWOSIDE 512
#define TF_INVISIBLE 1024
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 76f6b980aa2..49a6fd4daf0 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -503,12 +503,15 @@ typedef enum {
eParticleInstanceFlag_Unborn = (1<<3),
eParticleInstanceFlag_Alive = (1<<4),
eParticleInstanceFlag_Dead = (1<<5),
+ eParticleInstanceFlag_KeepShape = (1<<6),
+ eParticleInstanceFlag_UseSize = (1<<7),
} ParticleInstanceModifierFlag;
typedef struct ParticleInstanceModifierData {
ModifierData modifier;
struct Object *ob;
- short psys, flag, rt[2];
+ short psys, flag, axis, rt;
+ float position, random_position;
} ParticleInstanceModifierData;
typedef enum {
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index 66c5baab84b..09288b24c20 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -135,12 +135,12 @@ typedef struct FluidsimSettings {
/* ob->fluidsimSettings defines */
#define OB_FLUIDSIM_ENABLE 1
#define OB_FLUIDSIM_DOMAIN 2
-#define OB_FLUIDSIM_FLUID 4
+#define OB_FLUIDSIM_FLUID 4
#define OB_FLUIDSIM_OBSTACLE 8
-#define OB_FLUIDSIM_INFLOW 16
-#define OB_FLUIDSIM_OUTFLOW 32
-#define OB_FLUIDSIM_PARTICLE 64
-#define OB_FLUIDSIM_CONTROL 128
+#define OB_FLUIDSIM_INFLOW 16
+#define OB_FLUIDSIM_OUTFLOW 32
+#define OB_FLUIDSIM_PARTICLE 64
+#define OB_FLUIDSIM_CONTROL 128
#define OB_TYPEFLAG_START 7
#define OB_FSGEO_THIN (1<<(OB_TYPEFLAG_START+1))
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 718d1a17834..32bfc58f56c 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -33,6 +33,8 @@
#ifdef __cplusplus
extern "C" {
#endif
+
+#include "DNA_listBase.h"
typedef struct PartDeflect {
short deflect; /* Deflection flag - does mesh deflect particles*/
@@ -72,12 +74,26 @@ typedef struct PartDeflect {
int seed; /* wind noise random seed */
} PartDeflect;
+typedef struct PTCacheMem {
+ struct PTCacheMem *next, *prev;
+ int frame, totpoint;
+ float *data; /* data points */
+ void *xdata; /* extra data */
+} PTCacheMem;
+
typedef struct PointCache {
int flag; /* generic flag */
+ int step; /* frames between cached frames */
int simframe; /* current frame of simulation (only if SIMULATION_VALID) */
int startframe; /* simulation start frame */
int endframe; /* simulation end frame */
int editframe; /* frame being edited (runtime only) */
+ int last_exact; /* last exact frame that's cached */
+ int xdata_type; /* type of extra data */
+ char name[64];
+ char prev_name[64];
+ char info[64];
+ struct ListBase mem_cache;
} PointCache;
typedef struct SBVertex {
@@ -247,9 +263,15 @@ typedef struct SoftBody {
#define PTCACHE_BAKING 8
#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
+
+/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
+#define PTCACHE_REDO_NEEDED 258
/* ob->softflag */
-#define OB_SB_ENABLE 1
+#define OB_SB_ENABLE 1 /* deprecated, use modifier */
#define OB_SB_GOAL 2
#define OB_SB_EDGES 4
#define OB_SB_QUADS 8
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index febf2fe59cd..93980e58f8c 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -113,8 +113,12 @@ typedef struct Object {
ListBase disp;
ListBase defbase;
ListBase modifiers; /* list of ModifierData structures */
-
- struct Material **mat;
+
+ /* materials */
+ struct Material **mat; /* material slots */
+ char *matbits; /* a bitfield, with each bit 1 if corrusponding material linked to object */
+ int totcol; /* copy of mesh or curve or meta */
+ int actcol; /* currently selected material in the UI */
/* rot en drot have to be together! (transform('r' en 's')) */
float loc[3], dloc[3], orig[3];
@@ -129,7 +133,7 @@ typedef struct Object {
unsigned int lay; /* copy of Base */
short flag; /* copy of Base */
- short colbits; /* when zero, from obdata */
+ short colbits; /* deprecated */
short transflag, protectflag; /* transformation settings and transform locks */
short trackflag, upflag;
@@ -164,9 +168,7 @@ typedef struct Object {
float m_contactProcessingThreshold;
char dt, dtx;
- char totcol; /* copy of mesh or curve or meta */
- char actcol; /* currently selected material in the user interface */
- char empty_drawtype, pad1[3];
+ char empty_drawtype, pad1[5];
float empty_drawsize;
float dupfacesca; /* dupliface scale */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 6805082d094..0b3309bfc0c 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -34,6 +34,8 @@
#include "DNA_ID.h"
+struct AnimData;
+
typedef struct HairKey {
float co[3]; /* location of hair vertex */
float time; /* time along hair, default 0-100 */
@@ -59,6 +61,14 @@ typedef struct ChildParticle {
float rand[3];
} ChildParticle;
+typedef struct KeyedParticleTarget {
+ struct KeyedParticleTarget *next, *prev;
+ struct Object *ob;
+ int psys;
+ short flag, rt;
+ float time, duration;
+} KeyedParticleTarget;
+
/* Everything that's non dynamic for a particle: */
typedef struct ParticleData {
struct Object *stick_ob;/* object that particle sticks to when dead */
@@ -100,6 +110,7 @@ typedef struct ParticleData {
typedef struct ParticleSettings {
ID id;
+ struct AnimData *adt;
int flag;
short type, from, distr;
@@ -128,7 +139,7 @@ typedef struct ParticleSettings {
/* general values */
float sta, end, lifetime, randlife;
- float timetweak, jitfac, keyed_time, eff_hair, rt;
+ float timetweak, jitfac, eff_hair;
int totpart, userjit, grid_res;
/* initial velocity factors */
@@ -139,11 +150,11 @@ typedef struct ParticleSettings {
/* global physical properties */
float acc[3], dragfac, brownfac, dampfac;
/* length */
- float length, abslength, randlength;
+ float randlength;
/* children */
int child_nbr, ren_child_nbr;
float parents, childsize, childrandsize;
- float childrad, childflat, childspread;
+ float childrad, childflat, rt;
/* clumping */
float clumpfac, clumppow;
/* kink */
@@ -152,10 +163,16 @@ typedef struct ParticleSettings {
float rough1, rough1_size;
float rough2, rough2_size, rough2_thres;
float rough_end, rough_end_shape;
+ /* length */
+ float clength, clength_thres;
/* branching */
float branch_thres;
/* drawing stuff */
float draw_line[2];
+ float path_start, path_end;
+ int trail_count;
+ /* keyed particles */
+ int keyed_loops;
/* boids */
float max_vel, max_lat_acc, max_tan_acc;
@@ -167,7 +184,7 @@ typedef struct ParticleSettings {
struct Group *eff_group;
struct Object *dup_ob;
struct Object *bb_ob;
- struct Ipo *ipo;
+ struct Ipo *ipo; // xxx depreceated... old animation system
struct PartDeflect *pd;
struct PartDeflect *pd2;
} ParticleSettings;
@@ -190,16 +207,18 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
struct SoftBody *soft; /* hair softbody */
struct Object *target_ob;
- struct Object *keyed_ob;
struct Object *lattice;
+ struct Object *parent; /* particles from global space -> parent space */
struct ListBase effectors, reactevents; /* runtime */
+
+ struct ListBase keyed_targets;
float imat[4][4]; /* used for duplicators */
float cfra;
int seed;
int flag, totpart, totchild, totcached, totchildcache, rt;
- short recalc, target_psys, keyed_psys, totkeyed, softflag, bakespace;
+ short recalc, target_psys, totkeyed, softflag, bakespace, rt2;
char bb_uvname[3][32]; /* billboard uv name */
@@ -249,10 +268,10 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_ROT_DYN (1<<14) /* dynamic rotation */
#define PART_SIZEMASS (1<<16)
-#define PART_ABS_LENGTH (1<<15)
+//#define PART_KEYED_TIMING (1<<15)
-#define PART_ABS_TIME (1<<17)
-#define PART_GLOB_TIME (1<<18)
+//#define PART_ABS_TIME (1<<17)
+//#define PART_GLOB_TIME (1<<18)
#define PART_BOIDS_2D (1<<19)
@@ -307,8 +326,8 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_DRAW_SIZE 4
#define PART_DRAW_EMITTER 8 /* render emitter also */
//#define PART_DRAW_HEALTH 16
-//#define PART_DRAW_TIMED_PATH 32
-//#define PART_DRAW_CACHED_PATH 64
+#define PART_ABS_PATH_TIME 32
+//#define PART_DRAW_TRAIL 64
#define PART_DRAW_BB_LOCK 128
#define PART_DRAW_PARENT 256
#define PART_DRAW_NUM 512
@@ -390,14 +409,15 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PSYS_RECALC_RESET 2 /* reset everything including pointcache */
#define PSYS_RECALC_TYPE 4 /* handle system type change */
#define PSYS_RECALC_CHILD 16 /* only child settings changed */
+#define PSYS_RECALC_PHYS 32 /* physics type changed */
/* psys->flag */
#define PSYS_CURRENT 1
//#define PSYS_BAKING 2
//#define PSYS_BAKE_UI 4
-#define PSYS_KEYED_TIME 8
+#define PSYS_KEYED_TIMING 8
#define PSYS_ENABLED 16 /* deprecated */
-#define PSYS_FIRST_KEYED 32
+//#define PSYS_FIRST_KEYED 32
#define PSYS_DRAWING 64
//#define PSYS_SOFT_BAKE 128
#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
@@ -452,6 +472,10 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define BOID_GOAL 6
#define BOID_LEVEL 7
+/* psys->keyed_targets->flag */
+#define KEYED_TARGET_CURRENT 1
+#define KEYED_TARGET_VALID 2
+
//#define PSYS_INTER_CUBIC 0
//#define PSYS_INTER_LINEAR 1
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 7391201776e..7a6cbced45e 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -39,7 +39,6 @@ extern "C" {
#include "DNA_scriptlink_types.h"
#include "DNA_ID.h"
-struct Radio;
struct Object;
struct World;
struct Scene;
@@ -48,6 +47,7 @@ struct Group;
struct Text;
struct bNodeTree;
struct AnimData;
+struct Editing;
typedef struct Base {
struct Base *next, *prev;
@@ -158,7 +158,7 @@ typedef struct SceneRenderLayer {
#define SCE_PASS_REFRACT 1024
#define SCE_PASS_INDEXOB 2048
#define SCE_PASS_UV 4096
-#define SCE_PASS_RADIO 8192
+#define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
#define SCE_PASS_MIST 16384
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
@@ -218,7 +218,12 @@ typedef struct RenderData {
short bufflag;
short quality;
- short rpad, rpad1, rpad2;
+ /**
+ * Render to image editor, fullscreen or to new window.
+ */
+ short displaymode;
+
+ short rpad1, rpad2;
/**
* Flags for render settings. Use bit-masking to access the settings.
@@ -383,6 +388,8 @@ typedef struct ParticleEditSettings {
float emitterdist;
int draw_timed;
+
+ int selectmode, pad;
} ParticleEditSettings;
typedef struct TransformOrientation {
@@ -437,19 +444,27 @@ typedef struct ToolSettings {
VPaint *wpaint; /* weight paint */
Sculpt *sculpt;
+ /* Vertex groups */
+ float vgroup_weight;
+
/* Subdivide Settings */
short cornertype;
short editbutflag;
/*Triangle to Quad conversion threshold*/
float jointrilimit;
- /* Extrude Tools */
+ /* Editmode Tools */
float degr;
short step;
short turn;
- float extr_offs;
- float doublimit;
-
+ float extr_offs; /* extrude offset */
+ float doublimit; /* remove doubles limit */
+ float normalsize; /* size of normals */
+ short automerge;
+
+ /* Selection Mode for Mesh */
+ short selectmode;
+
/* Primitive Settings */
/* UV Sphere */
short segments;
@@ -463,7 +478,6 @@ typedef struct ToolSettings {
float uvcalc_radius;
float uvcalc_cubesize;
float uvcalc_margin;
- float pad;
short uvcalc_mapdir;
short uvcalc_mapalign;
short uvcalc_flag;
@@ -485,8 +499,11 @@ typedef struct ToolSettings {
/* Select Group Threshold */
float select_thresh;
- /* IPO-Editor */
+ /* Graph Editor */
float clean_thresh;
+
+ /* Auto-Keying Mode */
+ short autokey_mode, pad2; /* defines in DNA_userdef_types.h */
/* Retopo */
char retopo_mode;
@@ -513,7 +530,6 @@ typedef struct ToolSettings {
char skgen_postpro_passes;
char skgen_subdivisions[3];
char skgen_multi_level;
- int skgen_pad;
/* Skeleton Sketching */
struct Object *skgen_template;
@@ -527,7 +543,10 @@ typedef struct ToolSettings {
/* Alt+RMB option */
char edge_mode;
- char pad3[2];
+
+ /* Transform */
+ short snap_mode, snap_flag, snap_target;
+ short proportional, prop_mode;
} ToolSettings;
typedef struct bStats {
@@ -548,29 +567,22 @@ typedef struct Scene {
struct Image *ima;
ListBase base;
- struct Base *basact;
+ struct Base *basact; /* active base */
struct Object *obedit; /* name replaces old G.obedit */
- float cursor[3];
+ float cursor[3]; /* 3d cursor location */
float twcent[3]; /* center for transform widget */
float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
unsigned int lay;
- /* editmode stuff */
- float editbutsize; /* size of normals */
- short selectmode; /* for mesh only! */
- short proportional, prop_mode;
- short automerge, pad5;
short flag; /* various settings */
- short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h) */
short use_nodes;
struct bNodeTree *nodetree;
- void *ed; /* sequence editor data is allocated here */
- struct Radio *radio;
+ struct Editing *ed; /* sequence editor data is allocated here */
struct GameFraming framing;
@@ -580,20 +592,20 @@ typedef struct Scene {
/* migrate or replace? depends on some internal things... */
/* no, is on the right place (ton) */
struct RenderData r;
- struct AudioData audio; /* DEPRICATED 2.5 */
+ struct AudioData audio; /* DEPRECATED 2.5 */
ScriptLink scriptlink;
ListBase markers;
ListBase transform_spaces;
- short jumpframe;
- short snap_mode, snap_flag, snap_target;
/* none of the dependancy graph vars is mean to be saved */
struct DagForest *theDag;
short dagisvalid, dagflags;
- short pad4, recalc; /* recalc = counterpart of ob->recalc */
+ short recalc; /* recalc = counterpart of ob->recalc */
+
+ short jumpframe;
/* frame step. */
int frame_step;
@@ -623,7 +635,7 @@ typedef struct Scene {
#define R_FIELDSTILL 0x0080
#define R_RADIO 0x0100
#define R_BORDER 0x0200
-#define R_PANORAMA 0x0400
+#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
#define R_CROP 0x0800
#define R_COSMO 0x1000
#define R_ODDFIELD 0x2000
@@ -645,6 +657,12 @@ typedef struct Scene {
#define R_TOUCH 0x800000 /* touch files before rendering */
#define R_SIMPLIFY 0x1000000
+/* displaymode */
+
+#define R_OUTPUT_SCREEN 0
+#define R_OUTPUT_AREA 1
+#define R_OUTPUT_WINDOW 2
+#define R_OUTPUT_FORKED 3
/* filtertype */
#define R_FILTER_BOX 0
@@ -676,7 +694,7 @@ typedef struct Scene {
#define R_COMP_FREE 0x0800
#define R_NO_IMAGE_LOAD 0x1000
#define R_NO_TEX 0x2000
-#define R_STAMP_INFO 0x4000
+#define R_STAMP_INFO 0x4000 /* deprecated */
#define R_FULL_SAMPLE 0x8000
#define R_COMP_RERENDER 0x10000
#define R_RECURS_PROTECTION 0x20000
@@ -692,6 +710,7 @@ typedef struct Scene {
#define R_STAMP_MARKER 0x0080
#define R_STAMP_FILENAME 0x0100
#define R_STAMP_SEQSTRIP 0x0200
+#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP)
/* alphamode */
#define R_ADDSKY 0
@@ -728,6 +747,9 @@ typedef struct Scene {
#define R_MULTILAYER 28
#define R_DDS 29
#define R_JP2 30
+#define R_H264 31
+#define R_XVID 32
+#define R_THEORA 33
/* subimtype, flag options for imtype */
#define R_OPENEXR_HALF 1
@@ -765,6 +787,10 @@ typedef struct Scene {
#define MINFRAME 1
#define MINFRAMEF 1.0f
+/* (minimum frame number for current-frame) */
+#define MINAFRAME -300000
+#define MINAFRAMEF -300000.0f
+
/* depricate this! */
#define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
@@ -793,27 +819,27 @@ typedef struct Scene {
/* base->flag is in DNA_object_types.h */
-/* scene->snap_flag */
+/* toolsettings->snap_flag */
#define SCE_SNAP 1
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
-/* scene->snap_target */
+/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
#define SCE_SNAP_TARGET_MEDIAN 2
#define SCE_SNAP_TARGET_ACTIVE 3
-/* scene->snap_mode */
+/* toolsettings->snap_mode */
#define SCE_SNAP_MODE_VERTEX 0
#define SCE_SNAP_MODE_EDGE 1
#define SCE_SNAP_MODE_FACE 2
#define SCE_SNAP_MODE_VOLUME 3
-/* sce->selectmode */
+/* toolsettings->selectmode */
#define SCE_SELECT_VERTEX 1 /* for mesh */
#define SCE_SELECT_EDGE 2
#define SCE_SELECT_FACE 4
-/* sce->selectmode for particles */
+/* toolsettings->particle.selectmode for particles */
#define SCE_SELECT_PATH 1
#define SCE_SELECT_POINT 2
#define SCE_SELECT_END 4
@@ -821,7 +847,7 @@ typedef struct Scene {
/* sce->recalc (now in use by previewrender) */
#define SCE_PRV_CHANGED 1
-/* sce->prop_mode (proportional falloff) */
+/* toolsettings->prop_mode (proportional falloff) */
#define PROP_SMOOTH 0
#define PROP_SPHERE 1
#define PROP_ROOT 2
@@ -833,6 +859,7 @@ typedef struct Scene {
/* sce->flag */
#define SCE_DS_SELECTED (1<<0)
#define SCE_DS_COLLAPSED (1<<1)
+#define SCE_NLA_EDIT_ON (1<<2)
/* return flag next_object function */
@@ -888,7 +915,7 @@ typedef enum SculptFlags {
/* toolsettings->uv_selectmode */
#define UV_SELECT_VERTEX 1
-#define UV_SELECT_EDGE 2 /* not implemented */
+#define UV_SELECT_EDGE 2
#define UV_SELECT_FACE 4
#define UV_SELECT_ISLAND 8
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 418cc84205a..73ecade9b8b 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -53,6 +53,7 @@ typedef struct bScreen {
ListBase regionbase; /* screen level regions (menus), runtime only */
struct Scene *scene;
+ struct Scene *newscene; /* temporary when switching */
short full; /* fade out? */
short winid; /* winid from WM, starts with 1 */
@@ -104,6 +105,9 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */
int sortorder; /* panels are aligned according to increasing sortorder */
struct Panel *paneltab; /* this panel is tabbed in *paneltab */
void *activedata; /* runtime for panel manipulation */
+
+ int list_scroll, list_size;
+ char list_search[64];
} Panel;
typedef struct Header {
@@ -205,6 +209,10 @@ typedef struct ARegion {
#define PNL_SNAP_DIST 9.0
+/* paneltype flag */
+#define PNL_DEFAULT_CLOSED 1
+#define PNL_NO_HEADER 2
+
/* screen handlers */
#define SCREEN_MAXHANDLER 8
@@ -219,6 +227,7 @@ typedef struct ARegion {
#define RGN_TYPE_TEMPORARY 3
#define RGN_TYPE_UI 4
#define RGN_TYPE_TOOLS 5
+#define RGN_TYPE_TOOL_PROPS 6
/* region alignment */
#define RGN_ALIGN_NONE 0
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 7fa26aa7572..39e72c34adf 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -80,6 +80,9 @@ typedef struct StripProxy {
char dir[160];
char file[80];
struct anim *anim;
+ short size;
+ short quality;
+ int pad;
} StripProxy;
typedef struct Strip {
@@ -159,7 +162,7 @@ typedef struct Sequence {
struct bSound *sound; /* the linked "bSound" object */
struct hdaudio *hdaudio; /* external hdaudio object */
float level, pan; /* level in dB (0=full), pan -1..1 */
- int curpos; /* last sample position in audio_fill() */
+ int scenenr; /* for scene selection */
float strobe;
void *effectdata; /* Struct pointer for effect settings */
@@ -170,8 +173,6 @@ typedef struct Sequence {
int blend_mode;
float blend_opacity;
- int scenenr; /* for scene selection */
- int pad;
} Sequence;
typedef struct MetaStack {
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 3864bcd0a21..cc6987084d0 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -86,7 +86,7 @@ typedef struct SpaceInfo {
} SpaceInfo;
/* 'Graph' Editor (formerly known as the IPO Editor) */
-// XXX for now, we keep all old data...
+/* XXX for now, we keep all old data... */
typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -96,10 +96,6 @@ typedef struct SpaceIpo {
short blockhandler[8];
View2D v2d; /* depricated, copied to region */
- // 'IPO keys' - vertical lines for editing multiple keyframes at once - use Dopesheet instead for this?
- //ListBase ipokey; // XXX it's not clear how these will come back yet
- //short showkey; // XXX this doesn't need to be restored until ipokeys come back
-
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */
@@ -107,7 +103,7 @@ typedef struct SpaceIpo {
short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
short flag; /* settings for Graph editor */
short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
- char pin, lock;
+ char pin, lock; // XXX old, unused vars that are probably going to be depreceated soon...
} SpaceIpo;
typedef struct SpaceButs {
@@ -165,6 +161,33 @@ typedef struct SpaceSeq {
struct bGPdata *gpd; /* grease-pencil data */
} SpaceSeq;
+typedef struct FileSelectParams {
+ char title[24]; /* title, also used for the text of the execute button */
+ char dir[240]; /* directory */
+ char file[80]; /* file */
+
+ short flag; /* settings for filter, hiding files and display mode */
+ short sort; /* sort order */
+ short display; /* display mode flag */
+ short filter; /* filter when (flags & FILE_FILTER) is true */
+
+ /* XXX - temporary, better move to filelist */
+ short active_bookmark;
+ short pad;
+ int active_file;
+ int selstate;
+
+ /* XXX --- still unused -- */
+ short f_fp; /* show font preview */
+ short menu; /* currently selected option in pupmenu */
+ char fp_str[8]; /* string to use for font preview */
+
+ char *pupmenu; /* allows menu for save options - result stored in menup */
+
+ /* XXX --- end unused -- */
+} FileSelectParams;
+
+
typedef struct SpaceFile {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -175,6 +198,9 @@ typedef struct SpaceFile {
struct FileList *files; /* holds the list of files to show */
+ ListBase *folders_prev; /* holds the list of previous directories to show */
+ ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
+
/* operator that is invoking fileselect
op->exec() will be called on the 'Load' button.
if operator provides op->cancel(), then this will be invoked
@@ -229,7 +255,7 @@ typedef struct SpaceImage {
char dt_uv; /* UV draw type */
char sticky; /* sticky selection type */
char dt_uvstretch;
- char pad;
+ char around;
float xof, yof; /* user defined offset, image is centered */
float zoom, pad4; /* user defined zoom level */
@@ -246,10 +272,11 @@ typedef struct SpaceNla {
short blockhandler[8];
- short menunr, lock;
short autosnap; /* this uses the same settings as autosnap for Action Editor */
short flag;
+ int pad;
+ struct bDopeSheet *ads;
View2D v2d; /* depricated, copied to region */
} SpaceNla;
@@ -266,13 +293,15 @@ typedef struct SpaceText {
int top, viewlines;
short flags, menunr;
- int lheight;
+ short lheight; /* user preference */
+ char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
int left;
int showlinenrs;
int tabnumber;
int showsyntax;
- int overwrite;
+ short overwrite;
+ short live_edit; /* run python while editing, evil */
float pix_per_line;
struct rcti txtscroll, txtbar;
@@ -360,6 +389,21 @@ typedef struct SpaceNode {
#define SNODE_TEX_WORLD 1
#define SNODE_TEX_BRUSH 2
+typedef struct SpaceLogic {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+ float blockscale;
+
+ short blockhandler[8];
+
+ short flag, scaflag;
+ int pad;
+
+ struct bGPdata *gpd; /* grease-pencil data */
+} SpaceLogic;
+
+
typedef struct SpaceImaSel {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -511,6 +555,22 @@ typedef struct SpaceImaSel {
#define BUTS_SENS_STATE 512
#define BUTS_ACT_STATE 1024
+/* FileSelectParams.display */
+enum FileDisplayTypeE {
+ FILE_SHORTDISPLAY = 1,
+ FILE_LONGDISPLAY,
+ FILE_IMGDISPLAY
+};
+
+/* FileSelectParams.sort */
+enum FileSortTypeE {
+ FILE_SORT_NONE = 0,
+ FILE_SORT_ALPHA = 1,
+ FILE_SORT_EXTENSION,
+ FILE_SORT_TIME,
+ FILE_SORT_SIZE
+};
+
/* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in BKE */
#define FILE_MAXDIR 160
@@ -538,12 +598,6 @@ typedef struct SpaceImaSel {
#define FILE_FILTER 256
#define FILE_BOOKMARKS 512
-/* sfile->sort */
-#define FILE_SORTALPHA 0
-#define FILE_SORTDATE 1
-#define FILE_SORTSIZE 2
-#define FILE_SORTEXTENS 3
-
/* files in filesel list: 2=ACTIVE */
#define HILITE 1
#define BLENDERFILE 4
@@ -695,8 +749,11 @@ enum {
#define IMS_INFILESLI 4
/* nla->flag */
+ // depreceated
#define SNLA_ALLKEYED (1<<0)
+ // depreceated
#define SNLA_ACTIVELAYERS (1<<1)
+
#define SNLA_DRAWTIME (1<<2)
#define SNLA_NOTRANSKEYCULL (1<<3)
#define SNLA_NODRAWCFRANUM (1<<4)
@@ -752,8 +809,8 @@ enum {
SPACE_SCRIPT,
SPACE_TIME,
SPACE_NODE,
- SPACEICONMAX = SPACE_NODE
-/* SPACE_LOGIC */
+ SPACE_LOGIC,
+ SPACEICONMAX = SPACE_LOGIC
};
#endif
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 022e1cef840..4fab0de1f0a 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -66,6 +66,8 @@ typedef struct uiFont {
typedef struct uiFontStyle {
short uifont_id; /* saved in file, 0 is default */
short points; /* actual size depends on 'global' dpi */
+ short kerning; /* unfitted or default kerning value. */
+ char pad[6];
short italic, bold; /* style hint */
short shadow; /* value is amount of pixels blur */
short shadx, shady; /* shadow offset in pixels */
@@ -92,6 +94,8 @@ typedef struct uiStyle {
uiFontStyle widgetlabel;
uiFontStyle widget;
+ float panelzoom;
+
short minlabelchars; /* in characters */
short minwidgetchars; /* in characters */
@@ -103,7 +107,7 @@ typedef struct uiStyle {
short panelspace;
short panelouter;
- short pad[3];
+ short pad[1];
} uiStyle;
typedef struct uiWidgetColors {
@@ -118,13 +122,26 @@ typedef struct uiWidgetColors {
short pad;
} uiWidgetColors;
+typedef struct uiWidgetStateColors {
+ char inner_anim[4];
+ char inner_anim_sel[4];
+ char inner_key[4];
+ char inner_key_sel[4];
+ char inner_driven[4];
+ char inner_driven_sel[4];
+ float blend, pad;
+} uiWidgetStateColors;
+
typedef struct ThemeUI {
/* Interface Elements (buttons, menus, icons) */
- uiWidgetColors wcol_regular, wcol_tool, wcol_radio, wcol_text, wcol_option;
+ uiWidgetColors wcol_regular, wcol_tool, wcol_text;
+ uiWidgetColors wcol_radio, wcol_option, wcol_toggle;
uiWidgetColors wcol_num, wcol_numslider;
uiWidgetColors wcol_menu, wcol_pulldown, wcol_menu_back, wcol_menu_item;
- uiWidgetColors wcol_box;
+ uiWidgetColors wcol_box, wcol_scroll;
+
+ uiWidgetStateColors wcol_state;
char iconfile[80]; // FILE_MAXFILE length
@@ -242,6 +259,7 @@ typedef struct bTheme {
ThemeSpace toops;
ThemeSpace ttime;
ThemeSpace tnode;
+ ThemeSpace tlogic;
/* 20 sets of bone colors for this theme */
ThemeWireColor tarm[20];
@@ -376,6 +394,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_ZOOM_TO_MOUSEPOS (1 << 20)
#define USER_SHOW_FPS (1 << 21)
#define USER_MMB_PASTE (1 << 22)
+#define USER_MENUFIXEDORDER (1 << 23)
/* Auto-Keying mode */
/* AUTOKEY_ON is a bitflag */
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index ac628ca2266..dd73d691b62 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -118,6 +118,10 @@ typedef struct View2D {
#define V2D_SCROLL_VERTICAL_HIDE (1<<7)
#define V2D_SCROLL_HORIZONTAL_HIDE (1<<8)
+/* scroll_ui, activate flag for drawing */
+#define V2D_SCROLL_H_ACTIVE (1<<0)
+#define V2D_SCROLL_V_ACTIVE (1<<1)
+
/* alignment flags for totrect, flags use 'shading-out' convention (v2d->align) */
/* all quadrants free */
#define V2D_ALIGN_FREE 0
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 5cd78670e71..e221524eac2 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -82,6 +82,9 @@ typedef struct RegionView3D {
float viewmatob[4][4];
float persmatob[4][4];
+ /* transform widget matrix */
+ float twmat[4][4];
+
float viewquat[4], dist, zfac; /* zfac is initgrabz() result */
float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
float pixsize;
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 7d6b5ec8764..fcf3d0aec23 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -88,7 +88,8 @@ typedef struct wmWindow {
int winid, pad; /* winid also in screens, is for retrieving this window after read */
- struct bScreen *screen; /* active screen */
+ struct bScreen *screen; /* active screen */
+ struct bScreen *newscreen; /* temporary when switching */
char screenname[32]; /* MAX_ID_NAME for matching window with active screen after file read */
short posx, posy, sizex, sizey; /* window coords */
@@ -216,11 +217,47 @@ typedef struct wmOperator {
/* add this flag if the event should pass through */
#define OPERATOR_PASS_THROUGH 8
+
+/* ************** wmEvent ************************ */
+/* for read-only rna access, dont save this */
+
+/* each event should have full modifier state */
+/* event comes from eventmanager and from keymap */
+typedef struct wmEvent {
+ struct wmEvent *next, *prev;
+
+ short type; /* event code itself (short, is also in keymap) */
+ short val; /* press, release, scrollvalue */
+ short x, y; /* mouse pointer position, screen coord */
+ short mval[2]; /* region mouse position, name convention pre 2.5 :) */
+ short prevx, prevy; /* previous mouse pointer position */
+ short unicode; /* future, ghost? */
+ char ascii; /* from ghost */
+ char pad;
+
+ /* modifier states */
+ short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
+ short keymodifier; /* rawkey modifier */
+
+ short pad1;
+
+ /* keymap item, set by handler (weak?) */
+ const char *keymap_idname;
+
+ /* custom data */
+ short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
+ short customdatafree;
+ int pad2;
+ void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
+
+} wmEvent;
+
typedef enum wmRadialControlMode {
WM_RADIALCONTROL_SIZE,
WM_RADIALCONTROL_STRENGTH,
WM_RADIALCONTROL_ANGLE
} wmRadialControlMode;
+
#endif /* DNA_WINDOWMANAGER_TYPES_H */
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index b4b029a19e5..628983ae879 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -616,8 +616,8 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char
arrlen= DNA_elem_array_size(name, strlen(name));
/* define otypenr */
- if(strcmp(otype, "char")==0) otypenr= 0;
- else if((strcmp(otype, "uchar")==0)||(strcmp(otype, "unsigned char")==0)) otypenr= 1;
+ if(strcmp(otype, "char")==0 || (strcmp(otype, "const char")==0)) otypenr= 0;
+ else if((strcmp(otype, "uchar")==0) || (strcmp(otype, "unsigned char")==0)) otypenr= 1;
else if(strcmp(otype, "short")==0) otypenr= 2;
else if((strcmp(otype, "ushort")==0)||(strcmp(otype, "unsigned short")==0)) otypenr= 3;
else if(strcmp(otype, "int")==0) otypenr= 4;
@@ -629,6 +629,7 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char
/* define ctypenr */
if(strcmp(ctype, "char")==0) ctypenr= 0;
+ else if(strcmp(ctype, "const char")==0) ctypenr= 0;
else if((strcmp(ctype, "uchar")==0)||(strcmp(ctype, "unsigned char")==0)) ctypenr= 1;
else if(strcmp(ctype, "short")==0) ctypenr= 2;
else if((strcmp(ctype, "ushort")==0)||(strcmp(ctype, "unsigned short")==0)) ctypenr= 3;
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index bf2f0f3900e..08af6372d31 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -98,7 +98,6 @@ char *includefiles[] = {
"DNA_object_force.h",
"DNA_object_fluidsim.h",
"DNA_world_types.h",
- "DNA_radio_types.h",
"DNA_scene_types.h",
"DNA_view3d_types.h",
"DNA_view2d_types.h",
@@ -560,10 +559,11 @@ int convert_include(char *filename)
while( *md1 != '}' ) {
if(md1>mainend) break;
- /* skip when it says 'struct' or 'unsigned' */
+ /* skip when it says 'struct' or 'unsigned' or 'const' */
if(*md1) {
if( strncmp(md1, "struct", 6)==0 ) md1+= 7;
- if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9;
+ if( strncmp(md1, "unsigned", 8)==0 ) md1+= 9;
+ if( strncmp(md1, "const", 5)==0 ) md1+= 6;
/* we've got a type! */
type= add_type(md1, 0);
@@ -1124,7 +1124,6 @@ int main(int argc, char ** argv)
#include "DNA_object_force.h"
#include "DNA_object_fluidsim.h"
#include "DNA_world_types.h"
-#include "DNA_radio_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
#include "DNA_view2d_types.h"
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index d827d10ec27..ed1a8052acd 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -37,6 +37,7 @@ extern "C" {
struct bContext;
struct ID;
struct Main;
+struct ReportList;
/* Types */
@@ -163,6 +164,7 @@ extern StructRNA RNA_DomainFluidSettings;
extern StructRNA RNA_Driver;
extern StructRNA RNA_DriverTarget;
extern StructRNA RNA_EdgeSplitModifier;
+extern StructRNA RNA_EditBone;
extern StructRNA RNA_EffectSequence;
extern StructRNA RNA_EnumProperty;
extern StructRNA RNA_EnumPropertyItem;
@@ -170,12 +172,16 @@ extern StructRNA RNA_EnvironmentMap;
extern StructRNA RNA_EnvironmentMapTexture;
extern StructRNA RNA_ExplodeModifier;
extern StructRNA RNA_ExpressionController;
+extern StructRNA RNA_Event;
extern StructRNA RNA_FCurve;
+extern StructRNA RNA_FCurveSample;
+extern StructRNA RNA_FileSelectParams;
extern StructRNA RNA_FModifier;
extern StructRNA RNA_FModifierCycles;
extern StructRNA RNA_FModifierEnvelope;
+extern StructRNA RNA_FModifierEnvelopeControlPoint;
+extern StructRNA RNA_FModifierFunctionGenerator;
extern StructRNA RNA_FModifierGenerator;
-extern StructRNA RNA_FModifierGenerator_Function;
extern StructRNA RNA_FModifierGenerator_PolyExpanded;
extern StructRNA RNA_FModifierLimits;
extern StructRNA RNA_FModifierNoise;
@@ -215,6 +221,7 @@ extern StructRNA RNA_Key;
extern StructRNA RNA_KeyboardSensor;
extern StructRNA RNA_KeyingSet;
extern StructRNA RNA_KeyingSetPath;
+extern StructRNA RNA_KeyedParticleTarget;
extern StructRNA RNA_KinematicConstraint;
extern StructRNA RNA_Lamp;
extern StructRNA RNA_LampSkySettings;
@@ -270,6 +277,8 @@ extern StructRNA RNA_MultiresModifier;
extern StructRNA RNA_MusgraveTexture;
extern StructRNA RNA_NandController;
extern StructRNA RNA_NearSensor;
+extern StructRNA RNA_NlaTrack;
+extern StructRNA RNA_NlaStrip;
extern StructRNA RNA_Node;
extern StructRNA RNA_NodeTree;
extern StructRNA RNA_NoiseTexture;
@@ -356,16 +365,20 @@ extern StructRNA RNA_ShrinkwrapModifier;
extern StructRNA RNA_SimpleDeformModifier;
extern StructRNA RNA_SmoothModifier;
extern StructRNA RNA_SoftBodySettings;
-extern StructRNA RNA_SoftbodyModifier;
+extern StructRNA RNA_SoftBodyModifier;
extern StructRNA RNA_Sound;
extern StructRNA RNA_SoundSequence;
extern StructRNA RNA_Space;
extern StructRNA RNA_Space3DView;
extern StructRNA RNA_SpaceButtonsWindow;
+extern StructRNA RNA_SpaceDopeSheetEditor;
+extern StructRNA RNA_SpaceGraphEditor;
extern StructRNA RNA_SpaceImageEditor;
+extern StructRNA RNA_SpaceNLA;
extern StructRNA RNA_SpaceOutliner;
extern StructRNA RNA_SpaceSequenceEditor;
extern StructRNA RNA_SpaceTextEditor;
+extern StructRNA RNA_SpaceFileBrowser;
extern StructRNA RNA_SpaceUVEditor;
extern StructRNA RNA_SpeedControlSequence;
extern StructRNA RNA_SpotLamp;
@@ -376,6 +389,7 @@ extern StructRNA RNA_StucciTexture;
extern StructRNA RNA_SubsurfModifier;
extern StructRNA RNA_SunLamp;
extern StructRNA RNA_SurfaceCurve;
+extern StructRNA RNA_SurfaceModifier;
extern StructRNA RNA_TexMapping;
extern StructRNA RNA_Text;
extern StructRNA RNA_TextBox;
@@ -479,6 +493,8 @@ void RNA_pointer_create(struct ID *id, StructRNA *type, void *data, PointerRNA *
void RNA_blender_rna_pointer_create(PointerRNA *r_ptr);
+extern PointerRNA PointerRNA_NULL;
+
/* Structs */
const char *RNA_struct_identifier(StructRNA *type);
@@ -488,6 +504,7 @@ int RNA_struct_ui_icon(StructRNA *type);
PropertyRNA *RNA_struct_name_property(StructRNA *type);
PropertyRNA *RNA_struct_iterator_property(StructRNA *type);
+StructRNA *RNA_struct_base(StructRNA *type);
int RNA_struct_is_ID(StructRNA *type);
int RNA_struct_is_a(StructRNA *type, StructRNA *srna);
@@ -509,6 +526,8 @@ const struct ListBase *RNA_struct_defined_properties(StructRNA *srna);
FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier);
const struct ListBase *RNA_struct_defined_functions(StructRNA *srna);
+char *RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen);
+
/* Properties
*
* Access to struct properties. All this works with RNA pointers rather than
@@ -527,6 +546,7 @@ int RNA_property_string_maxlength(PropertyRNA *prop);
const char *RNA_property_ui_name(PropertyRNA *prop);
const char *RNA_property_ui_description(PropertyRNA *prop);
+int RNA_property_ui_icon(PropertyRNA *prop);
/* Dynamic Property Information */
@@ -536,9 +556,12 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin,
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax);
void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *softmin, float *softmax, float *step, float *precision);
-void RNA_property_enum_items(PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **item, int *totitem);
-int RNA_property_enum_value(PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value);
-int RNA_property_enum_identifier(PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
+int RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **identifier);
+int RNA_enum_name(EnumPropertyItem *item, const int value, const char **name);
+
+void RNA_property_enum_items(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free);
+int RNA_property_enum_value(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value);
+int RNA_property_enum_identifier(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
@@ -589,6 +612,14 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop);
int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr);
int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr);
+/* efficient functions to set properties for arrays */
+int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, RawArray *array);
+int RNA_property_collection_raw_get(struct ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, char *propname, void *array, RawPropertyType type, int len);
+int RNA_property_collection_raw_set(struct ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, char *propname, void *array, RawPropertyType type, int len);
+int RNA_raw_type_sizeof(RawPropertyType type);
+RawPropertyType RNA_property_raw_type(PropertyRNA *prop);
+
+
/* to create ID property groups */
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop);
void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop);
@@ -654,11 +685,11 @@ void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name);
void RNA_enum_set(PointerRNA *ptr, const char *name, int value);
-int RNA_enum_is_equal(PointerRNA *ptr, const char *name, const char *enumname);
+int RNA_enum_is_equal(struct bContext *C, PointerRNA *ptr, const char *name, const char *enumname);
/* lower level functions that donr use a PointerRNA */
-int RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *value);
-int RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **identifier);
+int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value);
+int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier);
void RNA_string_get(PointerRNA *ptr, const char *name, char *value);
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen);
@@ -684,6 +715,28 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
RNA_property_collection_end(&rna_macro_iter); \
}
+#define RNA_PROP_BEGIN(sptr, itemptr, prop) \
+ { \
+ CollectionPropertyIterator rna_macro_iter; \
+ for(RNA_property_collection_begin(sptr, prop, &rna_macro_iter); rna_macro_iter.valid; RNA_property_collection_next(&rna_macro_iter)) { \
+ PointerRNA itemptr= rna_macro_iter.ptr;
+
+#define RNA_PROP_END \
+ } \
+ RNA_property_collection_end(&rna_macro_iter); \
+ }
+
+#define RNA_STRUCT_BEGIN(sptr, prop) \
+ { \
+ CollectionPropertyIterator rna_macro_iter; \
+ for(RNA_property_collection_begin(sptr, RNA_struct_iterator_property(sptr->type), &rna_macro_iter); rna_macro_iter.valid; RNA_property_collection_next(&rna_macro_iter)) { \
+ PropertyRNA *prop= rna_macro_iter.ptr.data;
+
+#define RNA_STRUCT_END \
+ } \
+ RNA_property_collection_end(&rna_macro_iter); \
+ }
+
/* check if the idproperty exists, for operators */
int RNA_property_is_set(PointerRNA *ptr, const char *name);
@@ -716,13 +769,13 @@ void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void
void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, void *value);
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, void *value);
-int RNA_function_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *parms);
-int RNA_function_call_lookup(PointerRNA *ptr, const char *identifier, ParameterList *parms);
+int RNA_function_call(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms);
+int RNA_function_call_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, const char *identifier, ParameterList *parms);
-int RNA_function_call_direct(PointerRNA *ptr, FunctionRNA *func, const char *format, ...);
-int RNA_function_call_direct_lookup(PointerRNA *ptr, const char *identifier, const char *format, ...);
-int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args);
-int RNA_function_call_direct_va_lookup(PointerRNA *ptr, const char *identifier, const char *format, va_list args);
+int RNA_function_call_direct(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, ...);
+int RNA_function_call_direct_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, ...);
+int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args);
+int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, va_list args);
/* ID */
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index c40f50c34fc..a3fa97bf4b1 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -42,6 +42,8 @@ extern "C" {
BlenderRNA *RNA_create(void);
void RNA_define_free(BlenderRNA *brna);
void RNA_free(BlenderRNA *brna);
+
+void RNA_init(void);
void RNA_exit(void);
/* Struct */
@@ -78,7 +80,8 @@ PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont, const char *identifier, c
PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
-PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont, const char *identifier, EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);
+PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);
+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);
@@ -136,6 +139,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value);
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description);
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision);
+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);
@@ -146,7 +150,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item);
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set);
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *typef);
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring);
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *add, const char *remove);
/* Function */
@@ -156,6 +160,13 @@ void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret);
void RNA_def_function_flag(FunctionRNA *func, int flag);
void RNA_def_function_ui_description(FunctionRNA *func, const char *description);
+/* Dynamic Enums
+ * strings are not freed, assumed pointing to static location. */
+
+void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item);
+void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item);
+void RNA_enum_item_end(EnumPropertyItem **items, int *totitem);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index c679d9fc544..276f421c586 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -40,6 +40,9 @@ extern EnumPropertyItem beztriple_interpolation_mode_items[];
extern EnumPropertyItem fmodifier_type_items[];
+extern EnumPropertyItem event_value_items[];
+extern EnumPropertyItem event_type_items[];
+
#endif /* RNA_ENUM_TYPES */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 7e62ea6d823..dc2a2a1a1de 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -91,9 +91,13 @@ typedef enum PropertyFlag {
* and collections */
PROP_ANIMATEABLE = 2,
+ /* icon */
+ PROP_ICONS_CONSECUTIVE = 4096,
+
/* function paramater flags */
PROP_REQUIRED = 4,
PROP_RETURN = 8,
+ PROP_RNAPTR = 2048,
/* registering */
PROP_REGISTER = 16,
@@ -106,7 +110,9 @@ typedef enum PropertyFlag {
PROP_BUILTIN = 128,
PROP_EXPORT = 256,
PROP_RUNTIME = 512,
- PROP_IDPROPERTY = 1024
+ PROP_IDPROPERTY = 1024,
+ PROP_RAW_ACCESS = 8192,
+ PROP_RAW_ARRAY = 16384,
} PropertyFlag;
typedef struct CollectionPropertyIterator {
@@ -128,15 +134,31 @@ typedef struct CollectionPointerLink {
PointerRNA ptr;
} CollectionPointerLink;
-/* Iterator Utility */
+typedef enum RawPropertyType {
+ PROP_RAW_CHAR,
+ PROP_RAW_SHORT,
+ PROP_RAW_INT,
+ PROP_RAW_FLOAT,
+ PROP_RAW_DOUBLE
+} RawPropertyType;
+
+typedef struct RawArray {
+ void *array;
+ RawPropertyType type;
+ int len;
+ int stride;
+} RawArray;
typedef struct EnumPropertyItem {
int value;
const char *identifier;
+ int icon;
const char *name;
const char *description;
} EnumPropertyItem;
+typedef EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C, PointerRNA *ptr, int *free);
+
typedef struct PropertyRNA PropertyRNA;
/* Parameter List */
@@ -156,11 +178,13 @@ typedef struct ParameterIterator {
/* Function */
typedef enum FunctionFlag {
- FUNC_TYPESTATIC = 1, /* for static functions, FUNC_ STATIC is taken by some windows header it seems */
+ FUNC_NO_SELF = 1, /* for static functions */
+ FUNC_USE_CONTEXT = 2,
+ FUNC_USE_REPORTS = 4,
/* registering */
- FUNC_REGISTER = 2,
- FUNC_REGISTER_OPTIONAL = 2|4,
+ FUNC_REGISTER = 8,
+ FUNC_REGISTER_OPTIONAL = 8|16,
/* internal flags */
FUNC_BUILTIN = 128,
@@ -168,7 +192,7 @@ typedef enum FunctionFlag {
FUNC_RUNTIME = 512
} FunctionFlag;
-typedef void (*CallFunc)(PointerRNA *ptr, ParameterList *parms);
+typedef void (*CallFunc)(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, ParameterList *parms);
typedef struct FunctionRNA FunctionRNA;
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 7bf968a0979..2a1ae7be543 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -7,6 +7,30 @@ o = SConscript('intern/SConscript')
objs += o
incs = '#/intern/guardedalloc ../blenkernel ../blenlib ../makesdna intern .'
-incs += ' ../windowmanager ../editors/include'
+incs += ' ../windowmanager ../editors/include ../imbuf ../bmesh'
-env.BlenderLib ( 'bf_rna', objs, Split(incs), [], libtype=['core'], priority = [195] )
+defs = []
+
+if env['WITH_BF_OPENEXR']:
+ defs.append('WITH_OPENEXR')
+
+if env['WITH_BF_OPENJPEG']:
+ defs.append('WITH_OPENJPEG')
+
+if env['WITH_BF_DDS']:
+ defs.append('WITH_DDS')
+
+if env['WITH_BF_FFMPEG']:
+ defs.append('WITH_FFMPEG')
+ incs += ' ' + env['BF_FFMPEG_INC']
+
+if env['WITH_BF_OGG']:
+ defs.append('WITH_OGG')
+
+if env['WITH_BF_QUICKTIME']:
+ defs.append('WITH_QUICKTIME')
+
+if env['WITH_BF_LCMS']:
+ defs.append('WITH_LCMS')
+
+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 bc3be44aec9..85505d546c4 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -25,8 +25,9 @@
# ***** END GPL LICENSE BLOCK *****
FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
+FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
-FILE(GLOB_RECURSE APISRC "../../editors/*/*_api.c")
+LIST(REMOVE_ITEM DEFSRC ${APISRC})
STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
@@ -38,7 +39,7 @@ SET(SRC
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c)
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include .)
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
IF(WITH_OPENEXR)
@@ -58,9 +59,14 @@ IF(WITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
+IF(NOT WITH_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ENDIF(NOT WITH_ELBEEM)
+
# Build makesrna executable
ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
TARGET_LINK_LIBRARIES(makesrna bf_dna)
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index cd1f27f43b7..4a3715fb9a9 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 13161 2008-01-07 19:13:47Z hos $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -28,10 +28,11 @@ DIR = $(OCGDIR)/blender/makesrna
ALLRNA = $(wildcard rna_*.c)
DEFRNA = $(filter-out %rna_define.c, $(filter-out %rna_access.c, $(ALLRNA)))
-GENSRCS = $(patsubst rna_%.c, rna_%_gen.c, $(DEFRNA))
+GENRNA = $(filter-out %_api.c, $(DEFRNA))
+GENSRCS = $(patsubst rna_%.c, rna_%_gen.c, $(GENRNA))
GENTARGET = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.c, $(GENSRCS))
-MAKESRCS = $(DEFRNA) makesrna.c rna_define.c $(wildcard ../../editors/*/*_api.c)
+MAKESRCS = $(DEFRNA) makesrna.c rna_define.c
MAKEOBJS = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.o, $(notdir $(MAKESRCS)))
CSRCS = $(GENSRCS) rna_access.c
@@ -47,14 +48,17 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../blenkernel
+CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../windowmanager
CPPFLAGS += -I../../editors/include
+CPPFLAGS += -I../../bmesh
CPPFLAGS += -I..
CPPFLAGS += -I.
ifeq ($(WITH_FFMPEG),true)
CPPFLAGS += -DWITH_FFMPEG
+ CPPFLAGS += $(NAN_FFMPEGCFLAGS)
endif
ifeq ($(WITH_OPENEXR), true)
@@ -93,24 +97,6 @@ clean::
# TODO include right .mk for ldflags
-# XXX this is an ugly hack, copying code from nan_compile.mk
-# we want the .o's to be in the makesrna/ directory, but the
-# .c's are in the editors/*/ directories
-
-$(DIR)/$(DEBUG_DIR)%_api.o: ../../editors/interface/%_api.c
- ifdef NAN_DEPEND
- @set -e; $(CC) -M $(CPPFLAGS) $< 2>/dev/null \
- | sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \
- > $(DIR)/$(DEBUG_DIR)$*.d; \
- [ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$*.d
- endif
- ifdef NAN_QUIET
- @echo " -- $< -- "
- @$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
- else
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
- endif
-
# A small note: we do not use the debug version of the alloc lib. That
# is done quite intentionally. If there is a bug in that lib, it needs
# to be fixed by the module maintainer.
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 9c8e00da16d..53243fd97a0 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -16,9 +16,12 @@ source_files.remove('rna_access.c')
generated_files = source_files[:]
generated_files.remove('rna_define.c')
generated_files.remove('makesrna.c')
-generated_files = [filename[:-2] + '_gen.c' for filename in generated_files]
-source_files.extend(env.Glob('../../editors/*/*_api.c'))
+api_files = env.Glob('*_api.c')
+for api_file in api_files:
+ generated_files.remove(api_file)
+
+generated_files = [filename[:-2] + '_gen.c' for filename in generated_files]
makesrna_tool = env.Clone()
rna = env.Clone()
@@ -26,6 +29,10 @@ makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" '
defs = []
+incs = '#/intern/guardedalloc ../../bmesh ../../blenlib ../../blenkernel'
+incs += ' ../../imbuf ../../makesdna ../../makesrna'
+incs += ' ../../windowmanager ../../editors/include'
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
@@ -37,19 +44,20 @@ if env['WITH_BF_DDS']:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
+ incs += ' ' + env['BF_FFMPEG_INC']
+
+if env['WITH_BF_OGG']:
+ defs.append('WITH_OGG')
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
+if env['WITH_BF_LCMS']:
+ defs.append('WITH_LCMS')
+
makesrna_tool.Append(CPPDEFINES=defs)
-makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
- '../../blenlib',
- '../../blenkernel',
- '../../makesdna',
- '../../makesrna',
- '../../windowmanager',
- '../../editors/include'])
+makesrna_tool.Append (CPPPATH = Split(incs))
if env['OURPLATFORM'] == 'linuxcross':
USE_WINE = True # when cross compiling on linux 64bit this is useful
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index c8b81b9ffee..85c266e3f27 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -119,6 +119,11 @@ static void rna_print_c_string(FILE *f, const char *str)
static char *escape[] = {"\''", "\"\"", "\??", "\\\\","\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
int i, j;
+ if(!str) {
+ fprintf(f, "NULL");
+ return;
+ }
+
fprintf(f, "\"");
for(i=0; str[i]; i++) {
for(j=0; escape[j]; j++)
@@ -242,14 +247,13 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
case PROP_POINTER: {
PointerPropertyRNA *pparm= (PointerPropertyRNA*)parm;
- if(strcmp((char*)pparm->type, "AnyType") == 0)
+ if(parm->flag & PROP_RNAPTR)
return "PointerRNA";
else
return rna_find_dna_type((const char *)pparm->type);
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cparm= (CollectionPropertyRNA*)parm;
- return rna_find_dna_type((const char *)cparm->type);
+ return "ListBase";
}
default:
return "<error, no type specified>";
@@ -263,7 +267,8 @@ static int rna_enum_bitmask(PropertyRNA *prop)
if(eprop->item) {
for(a=0; a<eprop->totitem; a++)
- mask |= eprop->item[a].value;
+ if(eprop->item[a].identifier[0])
+ mask |= eprop->item[a].value;
}
return mask;
@@ -394,7 +399,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
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
- fprintf(f, " values[%d]= (%s)%s(data->%s[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname, i);
+ fprintf(f, " values[%d]= (%s)%s(((%s*)data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname, i);
}
}
}
@@ -559,7 +564,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " data->%s[%d]= FTOCHAR(values[%d]);\n", dp->dnaname, i, i);
}
else {
- fprintf(f, " data->%s[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": "");
+ fprintf(f, " ((%s*)data->%s)[%d]= %s", dp->dnatype, dp->dnaname, i, (dp->booleannegative)? "!": "");
rna_clamp_value(f, prop, 1, i);
}
}
@@ -694,16 +699,18 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
}
else {
if(dp->dnalengthname)
- fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), data->%s, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthname);
+ fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), data->%s, 0, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthname);
else
- fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), %d, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthfixed);
+ fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), %d, 0, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthfixed);
}
}
else {
if(manualfunc)
fprintf(f, "\n %s(iter, ptr);\n", manualfunc);
- else
+ else if(dp->dnapointerlevel == 0)
fprintf(f, "\n rna_iterator_listbase_begin(iter, &data->%s, NULL);\n", dp->dnaname);
+ else
+ fprintf(f, "\n rna_iterator_listbase_begin(iter, data->%s, NULL);\n", dp->dnaname);
}
getfunc= rna_alloc_function_name(srna->identifier, prop->identifier, "get");
@@ -761,6 +768,42 @@ static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *pr
return func;
}
+static void rna_set_raw_property(PropertyDefRNA *dp, PropertyRNA *prop)
+{
+ if(dp->dnapointerlevel != 0)
+ return;
+ if(!dp->dnatype || !dp->dnaname || !dp->dnastructname)
+ return;
+
+ if(strcmp(dp->dnatype, "char") == 0) {
+ prop->rawtype= PROP_RAW_CHAR;
+ prop->flag |= PROP_RAW_ACCESS;
+ }
+ else if(strcmp(dp->dnatype, "short") == 0) {
+ prop->rawtype= PROP_RAW_SHORT;
+ prop->flag |= PROP_RAW_ACCESS;
+ }
+ else if(strcmp(dp->dnatype, "int") == 0) {
+ prop->rawtype= PROP_RAW_INT;
+ prop->flag |= PROP_RAW_ACCESS;
+ }
+ else if(strcmp(dp->dnatype, "float") == 0) {
+ prop->rawtype= PROP_RAW_FLOAT;
+ prop->flag |= PROP_RAW_ACCESS;
+ }
+ else if(strcmp(dp->dnatype, "double") == 0) {
+ prop->rawtype= PROP_RAW_DOUBLE;
+ prop->flag |= PROP_RAW_ACCESS;
+ }
+}
+
+static void rna_set_raw_offset(FILE *f, StructRNA *srna, PropertyRNA *prop)
+{
+ PropertyDefRNA *dp= rna_find_struct_property_def(srna, prop);
+
+ fprintf(f, "\toffsetof(%s, %s), %d", dp->dnastructname, dp->dnaname, prop->rawtype);
+}
+
static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
{
PropertyRNA *prop;
@@ -772,6 +815,9 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
if(!prop->arraylength) {
+ if(!bprop->get && !bprop->set && !dp->booleanbit)
+ rna_set_raw_property(dp, prop);
+
bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)bprop->get);
bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)bprop->set);
}
@@ -785,10 +831,16 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
if(!prop->arraylength) {
+ if(!iprop->get && !iprop->set)
+ rna_set_raw_property(dp, prop);
+
iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->get);
iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->set);
}
else {
+ if(!iprop->getarray && !iprop->setarray)
+ rna_set_raw_property(dp, prop);
+
iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->getarray);
iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->setarray);
}
@@ -798,10 +850,16 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
if(!prop->arraylength) {
+ if(!fprop->get && !fprop->set)
+ rna_set_raw_property(dp, prop);
+
fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->get);
fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->set);
}
else {
+ if(!fprop->getarray && !fprop->setarray)
+ rna_set_raw_property(dp, prop);
+
fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->getarray);
fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->setarray);
}
@@ -840,6 +898,13 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
else if(dp->dnalengthname || dp->dnalengthfixed)
cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (char*)cprop->length);
+ /* test if we can allow raw array access, if it is using our standard
+ * array get/next function, we can be sure it is an actual array */
+ if(cprop->next && cprop->get)
+ if(strcmp((char*)cprop->next, "rna_iterator_array_next") == 0 &&
+ strcmp((char*)cprop->get, "rna_iterator_array_get") == 0)
+ prop->flag |= PROP_RAW_ARRAY;
+
cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)cprop->get);
cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (char*)cprop->begin);
cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (char*)cprop->next);
@@ -912,7 +977,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
fprintf(f, "enum {\n");
for(i=0; i<eprop->totitem; i++)
- fprintf(f, "\t%s_%s_%s = %d,\n", srna->identifier, prop->identifier, eprop->item[i].identifier, eprop->item[i].value);
+ if(eprop->item[i].identifier[0])
+ fprintf(f, "\t%s_%s_%s = %d,\n", srna->identifier, prop->identifier, eprop->item[i].identifier, eprop->item[i].value);
fprintf(f, "};\n\n");
}
@@ -1000,7 +1066,8 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
fprintf(f, "\tenum %s_enum {\n", prop->identifier);
for(i=0; i<eprop->totitem; i++)
- fprintf(f, "\t\t%s_%s = %d,\n", prop->identifier, eprop->item[i].identifier, eprop->item[i].value);
+ if(eprop->item[i].identifier[0])
+ fprintf(f, "\t\t%s_%s = %d,\n", prop->identifier, eprop->item[i].identifier, eprop->item[i].value);
fprintf(f, "\t};\n");
}
@@ -1104,6 +1171,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
FunctionRNA *func;
PropertyDefRNA *dparm;
char *funcname, *ptrstr;
+ int first;
srna= dsrna->srna;
func= dfunc->func;
@@ -1113,10 +1181,12 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
funcname= rna_alloc_function_name(srna->identifier, func->identifier, "call");
- fprintf(f, "void %s(PointerRNA *_ptr, ParameterList *_parms)", funcname);
+ /* function definition */
+ fprintf(f, "void %s(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)", funcname);
fprintf(f, "\n{\n");
- if((func->flag & FUNC_TYPESTATIC)==0) {
+ /* variable definitions */
+ if((func->flag & FUNC_NO_SELF)==0) {
if(dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname);
else fprintf(f, "\tstruct %s *_self;\n", srna->identifier);
}
@@ -1132,7 +1202,8 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, ";\n");
fprintf(f, "\t\n");
- if((func->flag & FUNC_TYPESTATIC)==0) {
+ /* assign self */
+ if((func->flag & FUNC_NO_SELF)==0) {
if(dsrna->dnaname) fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", dsrna->dnaname);
else fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", srna->identifier);
}
@@ -1146,9 +1217,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
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) {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)dparm->prop;
-
- if(strcmp((char*)pprop->type, "AnyType") == 0)
+ if(dparm->prop->flag & PROP_RNAPTR)
fprintf(f, "\t%s= ((%s%s*)_data);\n", dparm->prop->identifier, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else
fprintf(f, "\t%s= *((%s%s**)_data);\n", dparm->prop->identifier, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
@@ -1166,16 +1235,33 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
if(func->ret) fprintf(f, "%s= ", func->ret->identifier);
fprintf(f, "%s(", dfunc->call);
- if((func->flag & FUNC_TYPESTATIC)==0)
+ first= 1;
+
+ if((func->flag & FUNC_NO_SELF)==0) {
fprintf(f, "_self");
+ first= 0;
+ }
+
+ if(func->flag & FUNC_USE_CONTEXT) {
+ if(!first) fprintf(f, ", ");
+ first= 0;
+ fprintf(f, "C");
+ }
+
+ if(func->flag & FUNC_USE_REPORTS) {
+ if(!first) fprintf(f, ", ");
+ first= 0;
+ fprintf(f, "reports");
+ }
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret)
continue;
- if((func->flag & FUNC_TYPESTATIC)==0 || dparm!=dfunc->cont.properties.first)
- fprintf(f, ", ");
+ if(!first) fprintf(f, ", ");
+ first= 0;
+
fprintf(f, "%s", dparm->prop->identifier);
}
@@ -1358,7 +1444,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna,
base= srna->base;
while (base) {
for(func= base->functions.first; func; func= func->cont.next) {
- fprintf(f, "%s%s rna_%s_%s;\n", "extern ", "FunctionRNA", base->identifier, func->identifier);
+ fprintf(f, "%s%s rna_%s_%s_func;\n", "extern ", "FunctionRNA", base->identifier, func->identifier);
rna_generate_parameter_prototypes(brna, base, func, f);
}
@@ -1369,7 +1455,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna,
}
for(func= srna->functions.first; func; func= func->cont.next) {
- fprintf(f, "%s%s rna_%s_%s;\n", "extern ", "FunctionRNA", srna->identifier, func->identifier);
+ fprintf(f, "%s%s rna_%s_%s_func;\n", "extern ", "FunctionRNA", srna->identifier, func->identifier);
rna_generate_parameter_prototypes(brna, srna, func, f);
}
@@ -1382,10 +1468,12 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
FunctionRNA *func;
PropertyDefRNA *dparm;
StructDefRNA *dsrna;
+ int first;
dsrna= rna_find_struct_def(srna);
func= dfunc->func;
+ /* return type */
for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret) {
if(dparm->prop->arraylength)
@@ -1399,22 +1487,48 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
}
}
+ /* void if nothing to return */
if(!dparm)
fprintf(f, "void ");
+ /* function name */
fprintf(f, "%s(", dfunc->call);
- if(dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname);
- else fprintf(f, "struct %s *_self", srna->identifier);
+ first= 1;
+
+ /* self, context and reports parameters */
+ if((func->flag & FUNC_NO_SELF)==0) {
+ if(dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname);
+ else fprintf(f, "struct %s *_self", srna->identifier);
+ first= 0;
+ }
+ if(func->flag & FUNC_USE_CONTEXT) {
+ if(!first) fprintf(f, ", ");
+ first= 0;
+ fprintf(f, "bContext *C");
+ }
+
+ if(func->flag & FUNC_USE_REPORTS) {
+ if(!first) fprintf(f, ", ");
+ first= 0;
+ fprintf(f, "ReportList *reports");
+ }
+
+ /* defined parameters */
for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
- if(dparm->prop==func->ret) ;
- else 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);
+ if(dparm->prop==func->ret)
+ continue;
+
+ if(!first) fprintf(f, ", ");
+ first= 0;
+
+ 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);
+ fprintf(f, "%s%s *%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier);
else
- fprintf(f, ", %s%s %s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier);
+ fprintf(f, "%s%s %s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier);
}
fprintf(f, ");\n");
@@ -1462,34 +1576,33 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
int i, defaultfound= 0;
if(eprop->item) {
- fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {", srna->identifier, strnest, prop->identifier, eprop->totitem);
+ fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {", srna->identifier, strnest, prop->identifier, eprop->totitem+1);
for(i=0; i<eprop->totitem; i++) {
fprintf(f, "{%d, ", eprop->item[i].value);
rna_print_c_string(f, eprop->item[i].identifier); fprintf(f, ", ");
+ fprintf(f, "%d, ", eprop->item[i].icon);
rna_print_c_string(f, eprop->item[i].name); fprintf(f, ", ");
- rna_print_c_string(f, eprop->item[i].description); fprintf(f, "}");
- if(i != eprop->totitem-1)
- fprintf(f, ", ");
+ rna_print_c_string(f, eprop->item[i].description); fprintf(f, "}, ");
- if(eprop->defaultvalue == eprop->item[i].value)
- defaultfound= 1;
+ if(eprop->item[i].identifier[0])
+ if(eprop->defaultvalue == eprop->item[i].value)
+ defaultfound= 1;
}
- fprintf(f, "};\n\n");
+ fprintf(f, "{0, NULL, 0, NULL, NULL}};\n\n");
if(!defaultfound) {
fprintf(stderr, "rna_generate_structs: %s%s.%s, enum default is not in items.\n", srna->identifier, errnest, prop->identifier);
DefRNA.error= 1;
}
}
- else if(eprop->itemf);
else {
fprintf(stderr, "rna_generate_structs: %s%s.%s, enum must have items defined.\n", srna->identifier, errnest, prop->identifier);
DefRNA.error= 1;
}
break;
- }
+ }
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
unsigned int i;
@@ -1509,7 +1622,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "};\n\n");
}
break;
- }
+ }
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
unsigned int i;
@@ -1529,7 +1642,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "};\n\n");
}
break;
- }
+ }
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
unsigned int i;
@@ -1549,7 +1662,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "};\n\n");
}
break;
- }
+ }
default:
break;
}
@@ -1564,9 +1677,14 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, prop->identifier);
fprintf(f, ", %d, ", prop->flag);
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
- rna_print_c_string(f, prop->description); fprintf(f, ",\n");
+ rna_print_c_string(f, prop->description); fprintf(f, ",\n\t");
+ fprintf(f, "%d,\n", prop->icon);
fprintf(f, "\t%s, %s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), prop->arraylength);
- fprintf(f, "\t%s, %d, %s},\n", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable));
+ 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);
+ else fprintf(f, "\t0, 0");
+ fprintf(f, "},\n");
switch(prop->type) {
case PROP_BOOLEAN: {
@@ -1575,7 +1693,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
- }
+ }
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s,\n\t", rna_function_string(iprop->get), rna_function_string(iprop->set), rna_function_string(iprop->getarray), rna_function_string(iprop->setarray), rna_function_string(iprop->range));
@@ -1588,7 +1706,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
- }
+ }
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, ", rna_function_string(fprop->get), rna_function_string(fprop->set), rna_function_string(fprop->getarray), rna_function_string(fprop->setarray), rna_function_string(fprop->range));
@@ -1602,13 +1720,13 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
- }
+ }
case PROP_STRING: {
StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %d, ", rna_function_string(sprop->get), rna_function_string(sprop->length), rna_function_string(sprop->set), sprop->maxlength);
rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
break;
- }
+ }
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, ", rna_function_string(eprop->get), rna_function_string(eprop->set), rna_function_string(eprop->itemf));
@@ -1618,21 +1736,25 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "NULL, ");
fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
break;
- }
+ }
case PROP_POINTER: {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, ", rna_function_string(pprop->get), rna_function_string(pprop->set), rna_function_string(pprop->typef));
if(pprop->type) fprintf(f, "&RNA_%s\n", (char*)pprop->type);
else fprintf(f, "NULL\n");
break;
- }
+ }
case PROP_COLLECTION: {
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring));
+ if(cprop->add) fprintf(f, "&rna_%s_%s_func, ", srna->identifier, (char*)cprop->add);
+ else fprintf(f, "NULL, ");
+ if(cprop->remove) fprintf(f, "&rna_%s_%s_func, ", srna->identifier, (char*)cprop->remove);
+ else fprintf(f, "NULL, ");
if(cprop->type) fprintf(f, "&RNA_%s\n", (char*)cprop->type);
else fprintf(f, "NULL\n");
break;
- }
+ }
}
fprintf(f, "};\n\n");
@@ -1659,13 +1781,15 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
for(parm= func->cont.properties.first; parm; parm= parm->next)
rna_generate_property(f, srna, func->identifier, parm);
- fprintf(f, "%s%s rna_%s_%s = {\n", "", "FunctionRNA", srna->identifier, func->identifier);
+ fprintf(f, "%s%s rna_%s_%s_func = {\n", "", "FunctionRNA", srna->identifier, func->identifier);
- if(func->cont.next) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s, ", srna->identifier, ((FunctionRNA*)func->cont.next)->identifier);
+ if(func->cont.next) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, ((FunctionRNA*)func->cont.next)->identifier);
else fprintf(f, "\t{NULL, ");
- if(func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier);
+ if(func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier);
else fprintf(f, "NULL,\n");
+ fprintf(f, "\tNULL,\n");
+
parm= func->cont.properties.first;
if(parm) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier);
else fprintf(f, "\t{NULL, ");
@@ -1697,6 +1821,8 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
if(srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier);
else fprintf(f, "NULL,\n");
+ fprintf(f, "\tNULL,\n");
+
prop= srna->cont.properties.first;
if(prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier);
else fprintf(f, "\t{NULL, ");
@@ -1749,11 +1875,11 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
}
func= srna->functions.first;
- if(func) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s, ", srna->identifier, func->identifier);
+ if(func) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, func->identifier);
else fprintf(f, "\t{NULL, ");
func= srna->functions.last;
- if(func) fprintf(f, "(FunctionRNA*)&rna_%s_%s}\n", srna->identifier, func->identifier);
+ if(func) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func}\n", srna->identifier, func->identifier);
else fprintf(f, "NULL}\n");
fprintf(f, "};\n");
@@ -1763,63 +1889,64 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
typedef struct RNAProcessItem {
char *filename;
+ char *api_filename;
void (*define)(BlenderRNA *brna);
} RNAProcessItem;
RNAProcessItem PROCESS_ITEMS[]= {
- {"rna_rna.c", RNA_def_rna},
- {"rna_ID.c", RNA_def_ID},
- {"rna_texture.c", RNA_def_texture},
- {"rna_action.c", RNA_def_action},
- {"rna_animation.c", RNA_def_animation},
- {"rna_actuator.c", RNA_def_actuator},
- {"rna_armature.c", RNA_def_armature},
- {"rna_brush.c", RNA_def_brush},
- {"rna_camera.c", RNA_def_camera},
- {"rna_cloth.c", RNA_def_cloth},
- {"rna_color.c", RNA_def_color},
- {"rna_constraint.c", RNA_def_constraint},
- {"rna_context.c", RNA_def_context},
- {"rna_controller.c", RNA_def_controller},
- {"rna_curve.c", RNA_def_curve},
- {"rna_fcurve.c", RNA_def_fcurve},
- {"rna_fluidsim.c", RNA_def_fluidsim},
- {"rna_group.c", RNA_def_group},
- {"rna_image.c", RNA_def_image},
- {"rna_key.c", RNA_def_key},
- {"rna_lamp.c", RNA_def_lamp},
- {"rna_lattice.c", RNA_def_lattice},
- {"rna_main.c", RNA_def_main},
- {"rna_material.c", RNA_def_material},
- {"rna_mesh.c", RNA_def_mesh},
- {"rna_meta.c", RNA_def_meta},
- {"rna_modifier.c", RNA_def_modifier},
- {"rna_nodetree.c", RNA_def_nodetree},
- {"rna_object.c", RNA_def_object},
- {"rna_object_force.c", RNA_def_object_force},
- {"rna_packedfile.c", RNA_def_packedfile},
- {"rna_particle.c", RNA_def_particle},
- {"rna_pose.c", RNA_def_pose},
- {"rna_property.c", RNA_def_gameproperty},
- {"rna_radio.c", RNA_def_radio},
- {"rna_scene.c", RNA_def_scene},
- {"rna_screen.c", RNA_def_screen},
- {"rna_scriptlink.c", RNA_def_scriptlink},
- {"rna_sensor.c", RNA_def_sensor},
- {"rna_sequence.c", RNA_def_sequence},
- {"rna_space.c", RNA_def_space},
- {"rna_text.c", RNA_def_text},
- {"rna_timeline.c", RNA_def_timeline_marker},
- {"rna_sound.c", RNA_def_sound},
- {"rna_ui.c", RNA_def_ui},
- {"rna_userdef.c", RNA_def_userdef},
- {"rna_vfont.c", RNA_def_vfont},
- {"rna_vpaint.c", RNA_def_vpaint},
- {"rna_wm.c", RNA_def_wm},
- {"rna_world.c", RNA_def_world},
+ {"rna_rna.c", NULL, RNA_def_rna},
+ {"rna_ID.c", NULL, RNA_def_ID},
+ {"rna_texture.c", NULL, RNA_def_texture},
+ {"rna_action.c", NULL, RNA_def_action},
+ {"rna_animation.c", NULL, RNA_def_animation},
+ {"rna_actuator.c", NULL, RNA_def_actuator},
+ {"rna_armature.c", NULL, RNA_def_armature},
+ {"rna_brush.c", NULL, RNA_def_brush},
+ {"rna_camera.c", NULL, RNA_def_camera},
+ {"rna_cloth.c", NULL, RNA_def_cloth},
+ {"rna_color.c", NULL, RNA_def_color},
+ {"rna_constraint.c", NULL, RNA_def_constraint},
+ {"rna_context.c", NULL, RNA_def_context},
+ {"rna_controller.c", NULL, RNA_def_controller},
+ {"rna_curve.c", NULL, RNA_def_curve},
+ {"rna_fcurve.c", NULL, RNA_def_fcurve},
+ {"rna_fluidsim.c", NULL, RNA_def_fluidsim},
+ {"rna_group.c", NULL, RNA_def_group},
+ {"rna_image.c", NULL, RNA_def_image},
+ {"rna_key.c", NULL, RNA_def_key},
+ {"rna_lamp.c", NULL, RNA_def_lamp},
+ {"rna_lattice.c", NULL, RNA_def_lattice},
+ {"rna_main.c", "rna_main_api.c", RNA_def_main},
+ {"rna_material.c", NULL, RNA_def_material},
+ {"rna_mesh.c", "rna_mesh_api.c", RNA_def_mesh},
+ {"rna_meta.c", NULL, RNA_def_meta},
+ {"rna_modifier.c", NULL, RNA_def_modifier},
+ {"rna_nla.c", NULL, RNA_def_nla},
+ {"rna_nodetree.c", NULL, RNA_def_nodetree},
+ {"rna_object.c", "rna_object_api.c", RNA_def_object},
+ {"rna_object_force.c", NULL, RNA_def_object_force},
+ {"rna_packedfile.c", NULL, RNA_def_packedfile},
+ {"rna_particle.c", NULL, RNA_def_particle},
+ {"rna_pose.c", NULL, RNA_def_pose},
+ {"rna_property.c", NULL, RNA_def_gameproperty},
+ {"rna_scene.c", NULL, RNA_def_scene},
+ {"rna_screen.c", NULL, RNA_def_screen},
+ {"rna_scriptlink.c", NULL, RNA_def_scriptlink},
+ {"rna_sensor.c", NULL, RNA_def_sensor},
+ {"rna_sequence.c", NULL, RNA_def_sequence},
+ {"rna_space.c", NULL, RNA_def_space},
+ {"rna_text.c", NULL, RNA_def_text},
+ {"rna_timeline.c", NULL, RNA_def_timeline_marker},
+ {"rna_sound.c", NULL, RNA_def_sound},
+ {"rna_ui.c", "rna_ui_api.c", RNA_def_ui},
+ {"rna_userdef.c", NULL, RNA_def_userdef},
+ {"rna_vfont.c", NULL, RNA_def_vfont},
+ {"rna_vpaint.c", NULL, RNA_def_vpaint},
+ {"rna_wm.c", "rna_wm_api.c", RNA_def_wm},
+ {"rna_world.c", NULL, RNA_def_world},
{NULL, NULL}};
-static void rna_generate(BlenderRNA *brna, FILE *f, char *filename)
+static void rna_generate(BlenderRNA *brna, FILE *f, char *filename, char *api_filename)
{
StructDefRNA *ds;
PropertyDefRNA *dp;
@@ -1832,12 +1959,15 @@ static void rna_generate(BlenderRNA *brna, FILE *f, char *filename)
fprintf(f, "#include <float.h>\n");
fprintf(f, "#include <limits.h>\n");
fprintf(f, "#include <string.h>\n\n");
+ fprintf(f, "#include <stddef.h>\n\n");
fprintf(f, "#include \"DNA_ID.h\"\n");
fprintf(f, "#include \"BLI_blenlib.h\"\n\n");
+ fprintf(f, "#include \"BKE_context.h\"\n");
fprintf(f, "#include \"BKE_library.h\"\n");
+ fprintf(f, "#include \"BKE_report.h\"\n");
fprintf(f, "#include \"BKE_utildefines.h\"\n\n");
fprintf(f, "#include \"RNA_define.h\"\n");
@@ -1846,7 +1976,10 @@ static void rna_generate(BlenderRNA *brna, FILE *f, char *filename)
rna_generate_prototypes(brna, f);
- fprintf(f, "#include \"%s\"\n\n", filename);
+ fprintf(f, "#include \"%s\"\n", filename);
+ if(api_filename)
+ fprintf(f, "#include \"%s\"\n", api_filename);
+ fprintf(f, "\n");
fprintf(f, "/* Autogenerated Functions */\n\n");
@@ -2169,7 +2302,7 @@ static int rna_preprocess(char *outfile)
status = 1;
}
else {
- rna_generate(brna, file, PROCESS_ITEMS[i].filename);
+ rna_generate(brna, file, PROCESS_ITEMS[i].filename, PROCESS_ITEMS[i].api_filename);
fclose(file);
status= (DefRNA.error != 0);
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 56eda4eb735..7d8bab8bee8 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -218,7 +218,6 @@ static void rna_def_ID(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
srna= RNA_def_struct(brna, "ID", NULL);
RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection.");
@@ -246,12 +245,6 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "lib");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from.");
-
- /* XXX temporary for testing */
- func= RNA_def_function(srna, "rename", "rename_id");
- RNA_def_function_ui_description(func, "Rename this ID datablock.");
- prop= RNA_def_string(func, "name", "", 0, "", "New name for the datablock.");
- RNA_def_property_flag(prop, PROP_REQUIRED);
}
static void rna_def_library(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 870fa4d9aa3..e504d1d030b 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -32,8 +32,11 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
+#include "BLI_ghash.h"
+#include "BKE_context.h"
#include "BKE_idprop.h"
+#include "BKE_report.h"
#include "BKE_utildefines.h"
#include "WM_api.h"
@@ -44,15 +47,42 @@
#include "rna_internal.h"
-/* Exit */
+/* Init/Exit */
+
+void RNA_init()
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ for(srna=BLENDER_RNA.structs.first; srna; srna=srna->cont.next) {
+ if(!srna->cont.prophash) {
+ srna->cont.prophash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+
+ for(prop=srna->cont.properties.first; prop; prop=prop->next)
+ if(!(prop->flag & PROP_BUILTIN))
+ BLI_ghash_insert(srna->cont.prophash, (void*)prop->identifier, prop);
+ }
+ }
+}
void RNA_exit()
{
+ StructRNA *srna;
+
+ for(srna=BLENDER_RNA.structs.first; srna; srna=srna->cont.next) {
+ if(srna->cont.prophash) {
+ BLI_ghash_free(srna->cont.prophash, NULL, NULL);
+ srna->cont.prophash= NULL;
+ }
+ }
+
RNA_free(&BLENDER_RNA);
}
/* Pointer */
+PointerRNA PointerRNA_NULL = {{0}, 0, 0};
+
void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr)
{
r_ptr->id.data= NULL;
@@ -362,6 +392,11 @@ PropertyRNA *RNA_struct_iterator_property(StructRNA *type)
return type->iteratorproperty;
}
+StructRNA *RNA_struct_base(StructRNA *type)
+{
+ return type->base;
+}
+
int RNA_struct_is_ID(StructRNA *type)
{
return (type->flag & STRUCT_ID) != 0;
@@ -384,46 +419,28 @@ int RNA_struct_is_a(StructRNA *type, StructRNA *srna)
PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
{
- CollectionPropertyIterator iter;
- PropertyRNA *iterprop, *prop;
- int i = 0;
+ PropertyRNA *iterprop= RNA_struct_iterator_property(ptr->type);
+ PointerRNA propptr;
- iterprop= RNA_struct_iterator_property(ptr->type);
- RNA_property_collection_begin(ptr, iterprop, &iter);
- prop= NULL;
-
- for(; iter.valid; RNA_property_collection_next(&iter), i++) {
- if(strcmp(identifier, RNA_property_identifier(iter.ptr.data)) == 0) {
- prop= iter.ptr.data;
- break;
- }
- }
-
- RNA_property_collection_end(&iter);
-
- return prop;
+ if(RNA_property_collection_lookup_string(ptr, iterprop, identifier, &propptr))
+ return propptr.data;
+
+ return NULL;
}
/* Find the property which uses the given nested struct */
PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
{
- CollectionPropertyIterator iter;
- PropertyRNA *iterprop, *prop;
- int i = 0;
-
- iterprop= RNA_struct_iterator_property(ptr->type);
- RNA_property_collection_begin(ptr, iterprop, &iter);
- prop= NULL;
+ PropertyRNA *prop= NULL;
- for(; iter.valid; RNA_property_collection_next(&iter), i++) {
+ RNA_STRUCT_BEGIN(ptr, iprop) {
/* This assumes that there can only be one user of this nested struct */
- if (RNA_property_pointer_type(ptr, iter.ptr.data) == srna) {
- prop= iter.ptr.data;
+ if (RNA_property_pointer_type(ptr, iprop) == srna) {
+ prop= iprop;
break;
}
}
-
- RNA_property_collection_end(&iter);
+ RNA_PROP_END;
return prop;
}
@@ -436,25 +453,21 @@ const struct ListBase *RNA_struct_defined_properties(StructRNA *srna)
FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
{
PointerRNA tptr;
- CollectionPropertyIterator iter;
PropertyRNA *iterprop;
FunctionRNA *func;
- int i = 0;
RNA_pointer_create(NULL, &RNA_Struct, ptr->type, &tptr);
iterprop= RNA_struct_find_property(&tptr, "functions");
- RNA_property_collection_begin(&tptr, iterprop, &iter);
func= NULL;
- for(; iter.valid; RNA_property_collection_next(&iter), i++) {
- if(strcmp(identifier, RNA_function_identifier(iter.ptr.data)) == 0) {
- func= iter.ptr.data;
+ RNA_PROP_BEGIN(&tptr, funcptr, iterprop) {
+ if(strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
+ func= funcptr.data;
break;
}
}
-
- RNA_property_collection_end(&iter);
+ RNA_PROP_END;
return func;
}
@@ -499,6 +512,16 @@ void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
srna->blender_type= blender_type;
}
+char *RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen)
+{
+ PropertyRNA *nameprop;
+
+ if(ptr->data && (nameprop = RNA_struct_name_property(ptr->type)))
+ return RNA_property_string_get_alloc(ptr, nameprop, fixedbuf, fixedlen);
+
+ return NULL;
+}
+
/* Property Information */
const char *RNA_property_identifier(PropertyRNA *prop)
@@ -617,53 +640,86 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
return &RNA_UnknownType;
}
-void RNA_property_enum_items(PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **item, int *totitem)
+void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free)
{
EnumPropertyRNA *eprop= (EnumPropertyRNA*)rna_ensure_property(prop);
- int tot;
+
+ *free= 0;
if(eprop->itemf) {
- *item= eprop->itemf(ptr);
- for(tot=0; (*item)[tot].identifier; tot++);
- *totitem= tot;
+ int tot= 0;
+ *item= eprop->itemf(C, ptr, free);
+
+ if(totitem) {
+ if(*item) {
+ for( ; (*item)[tot].identifier; tot++);
+ }
+
+ *totitem= tot;
+ }
}
else {
*item= eprop->item;
- *totitem= eprop->totitem;
+ if(totitem)
+ *totitem= eprop->totitem;
}
}
-int RNA_property_enum_value(PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value)
+int RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value)
{
- const EnumPropertyItem *item;
- int totitem, i;
+ EnumPropertyItem *item;
+ int free;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
- for(i=0; i<totitem; i++) {
- if(strcmp(item[i].identifier, identifier)==0) {
- *value = item[i].value;
+ for(; item->identifier; item++) {
+ if(item->identifier[0] && strcmp(item->identifier, identifier)==0) {
+ *value = item->value;
return 1;
}
}
+ if(free)
+ MEM_freeN(item);
+
return 0;
}
-int RNA_property_enum_identifier(PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
-{
- const EnumPropertyItem *item;
- int totitem, i;
-
- RNA_property_enum_items(ptr, prop, &item, &totitem);
-
- for(i=0; i<totitem; i++) {
- if(item[i].value==value) {
- *identifier = item[i].identifier;
+int RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **identifier)
+{
+ for (; item->identifier; item++) {
+ if(item->identifier[0] && item->value==value) {
+ *identifier = item->identifier;
return 1;
}
}
+ return 0;
+}
+
+int RNA_enum_name(EnumPropertyItem *item, const int value, const char **name)
+{
+ for (; item->identifier; item++) {
+ if(item->identifier[0] && item->value==value) {
+ *name = item->name;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+int RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
+{
+ EnumPropertyItem *item= NULL;
+ int result, free;
+ RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
+ if(item) {
+ result= RNA_enum_identifier(item, value, identifier);
+ if(free)
+ MEM_freeN(item);
+
+ return result;
+ }
return 0;
}
@@ -677,6 +733,11 @@ const char *RNA_property_ui_description(PropertyRNA *prop)
return rna_ensure_property(prop)->description;
}
+int RNA_property_ui_icon(PropertyRNA *prop)
+{
+ return rna_ensure_property(prop)->icon;
+}
+
int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
{
ID *id;
@@ -718,7 +779,7 @@ int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
return 0;
}
-void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop)
+void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
prop= rna_ensure_property(prop);
@@ -1248,9 +1309,9 @@ void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, Collectio
iter->prop= prop;
if(idprop)
- rna_iterator_array_begin(iter, IDP_IDPArray(idprop), sizeof(IDProperty), idprop->len, NULL);
+ rna_iterator_array_begin(iter, IDP_IDPArray(idprop), sizeof(IDProperty), idprop->len, 0, NULL);
else
- rna_iterator_array_begin(iter, NULL, sizeof(IDProperty), 0, NULL);
+ rna_iterator_array_begin(iter, NULL, sizeof(IDProperty), 0, 0, NULL);
if(iter->valid)
rna_property_collection_get_idp(iter);
@@ -1314,6 +1375,7 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
{
IDProperty *idprop;
+ //CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
IDPropertyTemplate val = {0};
@@ -1339,8 +1401,17 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
MEM_freeN(item);
}
}
+#if 0
+ else if(cprop->add){
+ if(!(cprop->add->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
+ ParameterList *params= RNA_parameter_list_create(ptr, cprop->add);
+ RNA_function_call(NULL, NULL, ptr, cprop->add, params);
+ RNA_parameter_list_free(params);
+ }
+ }
+#endif
else
- printf("RNA_property_collection_add %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
+ printf("RNA_property_collection_add %s.%s: not implemented for this property.\n", ptr->type->identifier, prop->identifier);
if(r_ptr) {
if(idprop) {
@@ -1358,6 +1429,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
{
IDProperty *idprop;
+ //CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
IDProperty tmp, *array;
@@ -1378,6 +1450,15 @@ void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
}
}
else if(prop->flag & PROP_IDPROPERTY);
+#if 0
+ else if(cprop->remove){
+ if(!(cprop->remove->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
+ ParameterList *params= RNA_parameter_list_create(ptr, cprop->remove);
+ RNA_function_call(NULL, NULL, ptr, cprop->remove, params);
+ RNA_parameter_list_free(params);
+ }
+ }
+#endif
else
printf("RNA_property_collection_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
}
@@ -1464,6 +1545,323 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co
}
}
+int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, RawArray *array)
+{
+ CollectionPropertyIterator iter;
+ ArrayIterator *internal;
+ char *arrayp;
+
+ if(!(prop->flag & PROP_RAW_ARRAY) || !(itemprop->flag & PROP_RAW_ACCESS))
+ return 0;
+
+ RNA_property_collection_begin(ptr, prop, &iter);
+
+ if(iter.valid) {
+ /* get data from array iterator and item property */
+ internal= iter.internal;
+ arrayp= (iter.valid)? iter.ptr.data: NULL;
+
+ if(internal->skip || !RNA_property_editable(&iter.ptr, itemprop)) {
+ /* we might skip some items, so it's not a proper array */
+ RNA_property_collection_end(&iter);
+ return 0;
+ }
+
+ array->array= arrayp + itemprop->rawoffset;
+ array->stride= internal->itemsize;
+ array->len= ((char*)internal->endptr - arrayp)/internal->itemsize;
+ array->type= itemprop->rawtype;
+ }
+ else
+ memset(array, 0, sizeof(RawArray));
+
+ RNA_property_collection_end(&iter);
+
+ return 1;
+}
+
+#define RAW_GET(dtype, var, raw, a) \
+{ \
+ switch(raw.type) { \
+ case PROP_RAW_CHAR: var = (dtype)((char*)raw.array)[a]; break; \
+ case PROP_RAW_SHORT: var = (dtype)((short*)raw.array)[a]; break; \
+ case PROP_RAW_INT: var = (dtype)((int*)raw.array)[a]; break; \
+ case PROP_RAW_FLOAT: var = (dtype)((float*)raw.array)[a]; break; \
+ case PROP_RAW_DOUBLE: var = (dtype)((double*)raw.array)[a]; break; \
+ default: var = (dtype)0; \
+ } \
+}
+
+#define RAW_SET(dtype, raw, a, var) \
+{ \
+ switch(raw.type) { \
+ case PROP_RAW_CHAR: ((char*)raw.array)[a] = (char)var; break; \
+ case PROP_RAW_SHORT: ((short*)raw.array)[a] = (short)var; break; \
+ case PROP_RAW_INT: ((int*)raw.array)[a] = (int)var; break; \
+ case PROP_RAW_FLOAT: ((float*)raw.array)[a] = (float)var; break; \
+ case PROP_RAW_DOUBLE: ((double*)raw.array)[a] = (double)var; break; \
+ } \
+}
+
+int RNA_raw_type_sizeof(RawPropertyType type)
+{
+ switch(type) {
+ case PROP_RAW_CHAR: return sizeof(char);
+ case PROP_RAW_SHORT: return sizeof(short);
+ case PROP_RAW_INT: return sizeof(int);
+ case PROP_RAW_FLOAT: return sizeof(float);
+ case PROP_RAW_DOUBLE: return sizeof(double);
+ default: return 0;
+ }
+}
+
+static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, char *propname, void *inarray, RawPropertyType intype, int inlen, int set)
+{
+ StructRNA *ptype;
+ PointerRNA itemptr;
+ PropertyRNA *itemprop, *iprop;
+ PropertyType itemtype;
+ RawArray in;
+ int itemlen= 0;
+
+ /* initialize in array, stride assumed 0 in following code */
+ in.array= inarray;
+ in.type= intype;
+ in.len= inlen;
+ in.stride= 0;
+
+ ptype= RNA_property_pointer_type(ptr, prop);
+
+ /* try to get item property pointer */
+ RNA_pointer_create(NULL, ptype, NULL, &itemptr);
+ itemprop= RNA_struct_find_property(&itemptr, propname);
+
+ if(itemprop) {
+ /* we have item property pointer */
+ RawArray out;
+
+ /* check type */
+ itemtype= RNA_property_type(itemprop);
+
+ if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
+ BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported.");
+ return 0;
+ }
+
+ /* check item array */
+ itemlen= RNA_property_array_length(itemprop);
+
+ /* try to access as raw array */
+ if(RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
+ if(in.len != itemlen*out.len) {
+ BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d).", out.len*itemlen, in.len);
+ return 0;
+ }
+
+ /* matching raw types */
+ if(out.type == in.type) {
+ void *inp= in.array;
+ void *outp= out.array;
+ int a, size;
+
+ itemlen= (itemlen == 0)? 1: itemlen;
+ size= RNA_raw_type_sizeof(out.type) * itemlen;
+
+ for(a=0; a<out.len; a++) {
+ if(set) memcpy(outp, inp, size);
+ else memcpy(inp, outp, size);
+
+ inp= (char*)inp + size;
+ outp= (char*)outp + out.stride;
+ }
+
+ return 1;
+ }
+
+ /* could also be faster with non-matching types,
+ * for now we just do slower loop .. */
+ }
+ }
+
+ {
+ void *tmparray= NULL;
+ int tmplen= 0;
+ int err= 0, j, a= 0;
+
+ /* no item property pointer, can still be id property, or
+ * property of a type derived from the collection pointer type */
+ RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ if(itemptr.data) {
+ if(itemprop) {
+ /* we got the property already */
+ iprop= itemprop;
+ }
+ else {
+ /* not yet, look it up and verify if it is valid */
+ iprop= RNA_struct_find_property(&itemptr, propname);
+
+ if(iprop) {
+ itemlen= RNA_property_array_length(iprop);
+ itemtype= RNA_property_type(iprop);
+ }
+ else {
+ BKE_reportf(reports, RPT_ERROR, "Property named %s not found.", propname);
+ err= 1;
+ break;
+ }
+
+ if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
+ BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported.");
+ err= 1;
+ break;
+ }
+ }
+
+ /* editable check */
+ if(RNA_property_editable(&itemptr, iprop)) {
+ if(a+itemlen > in.len) {
+ BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more).", in.len);
+ err= 1;
+ break;
+ }
+
+ if(itemlen == 0) {
+ /* handle conversions */
+ if(set) {
+ switch(itemtype) {
+ case PROP_BOOLEAN: {
+ int b;
+ RAW_GET(int, b, in, a);
+ RNA_property_boolean_set(&itemptr, iprop, b);
+ break;
+ }
+ case PROP_INT: {
+ int i;
+ RAW_GET(int, i, in, a);
+ RNA_property_int_set(&itemptr, iprop, i);
+ break;
+ }
+ case PROP_FLOAT: {
+ float f;
+ RAW_GET(float, f, in, a);
+ RNA_property_float_set(&itemptr, iprop, f);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ else {
+ switch(itemtype) {
+ case PROP_BOOLEAN: {
+ int b= RNA_property_boolean_get(&itemptr, iprop);
+ RAW_SET(int, in, a, b);
+ break;
+ }
+ case PROP_INT: {
+ int i= RNA_property_int_get(&itemptr, iprop);
+ RAW_SET(int, in, a, i);
+ break;
+ }
+ case PROP_FLOAT: {
+ float f= RNA_property_float_get(&itemptr, iprop);
+ RAW_SET(float, in, a, f);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ a++;
+ }
+ else {
+ /* allocate temporary array if needed */
+ if(tmparray && tmplen != itemlen) {
+ MEM_freeN(tmparray);
+ tmparray= NULL;
+ }
+ if(!tmparray) {
+ tmparray= MEM_callocN(sizeof(float)*itemlen, "RNA tmparray\n");
+ tmplen= itemlen;
+ }
+
+ /* handle conversions */
+ if(set) {
+ switch(itemtype) {
+ case PROP_BOOLEAN: {
+ for(j=0; j<itemlen; j++, a++)
+ RAW_GET(int, ((int*)tmparray)[j], in, a);
+ RNA_property_boolean_set_array(&itemptr, iprop, tmparray);
+ break;
+ }
+ case PROP_INT: {
+ for(j=0; j<itemlen; j++, a++)
+ RAW_GET(int, ((int*)tmparray)[j], in, a);
+ RNA_property_int_set_array(&itemptr, iprop, tmparray);
+ break;
+ }
+ case PROP_FLOAT: {
+ for(j=0; j<itemlen; j++, a++)
+ RAW_GET(float, ((float*)tmparray)[j], in, a);
+ RNA_property_float_set_array(&itemptr, iprop, tmparray);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ else {
+ switch(itemtype) {
+ case PROP_BOOLEAN: {
+ RNA_property_boolean_get_array(&itemptr, iprop, tmparray);
+ for(j=0; j<itemlen; j++, a++)
+ RAW_SET(int, in, a, ((int*)tmparray)[j]);
+ break;
+ }
+ case PROP_INT: {
+ RNA_property_int_get_array(&itemptr, iprop, tmparray);
+ for(j=0; j<itemlen; j++, a++)
+ RAW_SET(int, in, a, ((int*)tmparray)[j]);
+ break;
+ }
+ case PROP_FLOAT: {
+ RNA_property_float_get_array(&itemptr, iprop, tmparray);
+ for(j=0; j<itemlen; j++, a++)
+ RAW_SET(float, in, a, ((float*)tmparray)[j]);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ RNA_PROP_END;
+
+ if(tmparray)
+ MEM_freeN(tmparray);
+
+ return !err;
+ }
+}
+
+RawPropertyType RNA_property_raw_type(PropertyRNA *prop)
+{
+ return prop->rawtype;
+}
+
+int RNA_property_collection_raw_get(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, char *propname, void *array, RawPropertyType type, int len)
+{
+ return rna_raw_access(reports, ptr, prop, propname, array, type, len, 0);
+}
+
+int RNA_property_collection_raw_set(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, char *propname, void *array, RawPropertyType type, int len)
+{
+ return rna_raw_access(reports, ptr, prop, propname, array, type, len, 1);
+}
+
/* Standard iterator functions */
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
@@ -1471,7 +1869,7 @@ void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb,
ListBaseIterator *internal;
internal= MEM_callocN(sizeof(ListBaseIterator), "ListBaseIterator");
- internal->link= lb->first;
+ internal->link= (lb)? lb->first: NULL;
internal->skip= skip;
iter->internal= internal;
@@ -1510,7 +1908,7 @@ void rna_iterator_listbase_end(CollectionPropertyIterator *iter)
iter->internal= NULL;
}
-void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, IteratorSkipFunc skip)
+void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, int free_ptr, IteratorSkipFunc skip)
{
ArrayIterator *internal;
@@ -1519,6 +1917,7 @@ void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int i
internal= MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
internal->ptr= ptr;
+ internal->free_ptr= free_ptr ? ptr:NULL;
internal->endptr= ((char*)ptr)+length*itemsize;
internal->itemsize= itemsize;
internal->skip= skip;
@@ -1563,6 +1962,11 @@ void *rna_iterator_array_dereference_get(CollectionPropertyIterator *iter)
void rna_iterator_array_end(CollectionPropertyIterator *iter)
{
+ ArrayIterator *internal= iter->internal;
+
+ if(internal->free_ptr)
+ MEM_freeN(internal->free_ptr);
+
MEM_freeN(iter->internal);
iter->internal= NULL;
}
@@ -1614,12 +2018,18 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
buf= MEM_callocN(sizeof(char)*(len+1), "rna_path_token");
/* copy string, taking into account escaped ] */
- for(p=*path, i=0, j=0; i<len; i++, p++) {
- if(*p == '\\' && *(p+1) == ']');
- else buf[j++]= *p;
- }
+ if(bracket) {
+ for(p=*path, i=0, j=0; i<len; i++, p++) {
+ if(*p == '\\' && *(p+1) == ']');
+ else buf[j++]= *p;
+ }
- buf[j]= 0;
+ buf[j]= 0;
+ }
+ else {
+ memcpy(buf, *path, sizeof(char)*len);
+ buf[len]= '\0';
+ }
/* set path to start of next token */
if(*p == ']') p++;
@@ -1631,8 +2041,7 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
{
- CollectionPropertyIterator iter;
- PropertyRNA *prop, *iterprop;
+ PropertyRNA *prop;
PointerRNA curptr, nextptr;
char fixedbuf[256], *token;
int len, intkey;
@@ -1647,18 +2056,7 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
if(!token)
return 0;
- iterprop= RNA_struct_iterator_property(curptr.type);
- RNA_property_collection_begin(&curptr, iterprop, &iter);
- prop= NULL;
-
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- if(strcmp(token, RNA_property_identifier(iter.ptr.data)) == 0) {
- prop= iter.ptr.data;
- break;
- }
- }
-
- RNA_property_collection_end(&iter);
+ prop= RNA_struct_find_property(&curptr, token);
if(token != fixedbuf)
MEM_freeN(token);
@@ -2010,18 +2408,21 @@ void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
printf("RNA_enum_set: %s.%s not found.\n", ptr->type->identifier, name);
}
-int RNA_enum_is_equal(PointerRNA *ptr, const char *name, const char *enumname)
+int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, name);
- const EnumPropertyItem *item;
- int a, totitem;
+ EnumPropertyItem *item;
+ int free;
if(prop) {
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
+
+ for(; item->identifier; item++)
+ if(strcmp(item->identifier, enumname) == 0)
+ return (item->value == RNA_property_enum_get(ptr, prop));
- for(a=0; a<totitem; a++)
- if(strcmp(item[a].identifier, enumname) == 0)
- return (item[a].value == RNA_property_enum_get(ptr, prop));
+ if(free)
+ MEM_freeN(item);
printf("RNA_enum_is_equal: %s.%s item %s not found.\n", ptr->type->identifier, name, enumname);
return 0;
@@ -2032,7 +2433,7 @@ int RNA_enum_is_equal(PointerRNA *ptr, const char *name, const char *enumname)
}
}
-int RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *value)
+int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value)
{
for( ; item->identifier; item++) {
if(strcmp(item->identifier, identifier)==0) {
@@ -2044,7 +2445,7 @@ int RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier,
return 0;
}
-int RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **identifier)
+int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier)
{
for( ; item->identifier; item++) {
if(item->value==value) {
@@ -2194,17 +2595,12 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
DynStr *dynstr= BLI_dynstr_new();
char *cstring;
- PropertyRNA *prop, *iterprop;
- CollectionPropertyIterator iter;
const char *propname;
int first_time = 1;
BLI_dynstr_append(dynstr, "{");
- iterprop= RNA_struct_iterator_property(ptr->type);
-
- for(RNA_property_collection_begin(ptr, iterprop, &iter); iter.valid; RNA_property_collection_next(&iter)) {
- prop= iter.ptr.data;
+ RNA_STRUCT_BEGIN(ptr, prop) {
propname = RNA_property_identifier(prop);
if(strcmp(propname, "rna_type")==0)
@@ -2218,8 +2614,8 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
BLI_dynstr_appendf(dynstr, "\"%s\":%s", propname, cstring);
MEM_freeN(cstring);
}
+ RNA_STRUCT_END;
- RNA_property_collection_end(&iter);
BLI_dynstr_append(dynstr, "}");
@@ -2291,7 +2687,7 @@ char *RNA_property_as_string(PointerRNA *ptr, PropertyRNA *prop)
const char *identifier;
int val = RNA_property_enum_get(ptr, prop);
- if(RNA_property_enum_identifier(ptr, prop, val, &identifier)) {
+ if(RNA_property_enum_identifier(NULL, ptr, prop, val, &identifier)) {
BLI_dynstr_appendf(dynstr, "'%s'", identifier);
}
else {
@@ -2411,6 +2807,17 @@ ParameterList *RNA_parameter_list_create(PointerRNA *ptr, FunctionRNA *func)
void RNA_parameter_list_free(ParameterList *parms)
{
+ PropertyRNA *parm;
+ int tot;
+
+ parm= parms->func->cont.properties.first;
+ for(tot= 0; parm; parm= parm->next) {
+ if(parm->type == PROP_COLLECTION)
+ BLI_freelistN((ListBase*)((char*)parms->data+tot));
+
+ tot+= rna_parameter_size(parm);
+ }
+
MEM_freeN(parms->data);
parms->data= NULL;
@@ -2517,10 +2924,10 @@ void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, void
RNA_parameter_set(parms, parm, value);
}
-int RNA_function_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
+int RNA_function_call(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
{
if(func->call) {
- func->call(ptr, parms);
+ func->call(C, reports, ptr, parms);
return 0;
}
@@ -2528,33 +2935,33 @@ int RNA_function_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
return -1;
}
-int RNA_function_call_lookup(PointerRNA *ptr, const char *identifier, ParameterList *parms)
+int RNA_function_call_lookup(bContext *C, ReportList *reports, PointerRNA *ptr, const char *identifier, ParameterList *parms)
{
FunctionRNA *func;
func= RNA_struct_find_function(ptr, identifier);
if(func)
- return RNA_function_call(ptr, func, parms);
+ return RNA_function_call(C, reports, ptr, func, parms);
return -1;
}
-int RNA_function_call_direct(PointerRNA *ptr, FunctionRNA *func, const char *format, ...)
+int RNA_function_call_direct(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, ...)
{
va_list args;
int ret;
va_start(args, format);
- ret= RNA_function_call_direct_va(ptr, func, format, args);
+ ret= RNA_function_call_direct_va(C, reports, ptr, func, format, args);
va_end(args);
return ret;
}
-int RNA_function_call_direct_lookup(PointerRNA *ptr, const char *identifier, const char *format, ...)
+int RNA_function_call_direct_lookup(bContext *C, ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, ...)
{
FunctionRNA *func;
@@ -2566,7 +2973,7 @@ int RNA_function_call_direct_lookup(PointerRNA *ptr, const char *identifier, con
va_start(args, format);
- ret= RNA_function_call_direct_va(ptr, func, format, args);
+ ret= RNA_function_call_direct_va(C, reports, ptr, func, format, args);
va_end(args);
@@ -2674,25 +3081,48 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
ptype= RNA_property_pointer_type(ptr, prop);
- if(ptype == &RNA_AnyType) {
+ if(prop->flag & PROP_RNAPTR) {
*((PointerRNA*)dest)= *((PointerRNA*)src);
+ break;
+ }
+
+ if (ptype!=srna && !RNA_struct_is_a(srna, ptype)) {
+ fprintf(stderr, "%s.%s: wrong type for parameter %s, an object of type %s was expected, passed an object of type %s\n", tid, fid, pid, RNA_struct_identifier(ptype), RNA_struct_identifier(srna));
+ return -1;
}
- else if (ptype!=srna) {
- if (!RNA_struct_is_a(srna, ptype)) {
- fprintf(stderr, "%s.%s: wrong type for parameter %s, an object of type %s was expected, passed an object of type %s\n", tid, fid, pid, RNA_struct_identifier(ptype), RNA_struct_identifier(ptype));
- return -1;
- }
-
- *((void**)dest)= *((void**)src);
- }
+
+ *((void**)dest)= *((void**)src);
break;
}
case PROP_COLLECTION:
{
- /* XXX collections are not supported yet */
- fprintf(stderr, "%s.%s: for parameter %s, collections are not supported yet\n", tid, fid, pid);
- return -1;
+ StructRNA *ptype;
+ ListBase *lb, *clb;
+ Link *link;
+ CollectionPointerLink *clink;
+
+ if (ftype!='C') {
+ fprintf(stderr, "%s.%s: wrong type for parameter %s, a collection was expected\n", tid, fid, pid);
+ return -1;
+ }
+
+ lb= (ListBase *)src;
+ clb= (ListBase *)dest;
+ ptype= RNA_property_pointer_type(ptr, prop);
+
+ if (ptype!=srna && !RNA_struct_is_a(srna, ptype)) {
+ fprintf(stderr, "%s.%s: wrong type for parameter %s, a collection of objects of type %s was expected, passed a collection of objects of type %s\n", tid, fid, pid, RNA_struct_identifier(ptype), RNA_struct_identifier(srna));
+ return -1;
+ }
+
+ for (link= lb->first; link; link= link->next) {
+ clink= MEM_callocN(sizeof(CollectionPointerLink), "CCollectionPointerLink");
+ RNA_pointer_create(NULL, srna, link, &clink->ptr);
+ BLI_addtail(clb, clink);
+ }
+
+ break;
}
default:
{
@@ -2708,7 +3138,7 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
return 0;
}
-int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args)
+int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args)
{
PointerRNA funcptr;
ParameterList *parms;
@@ -2790,6 +3220,13 @@ int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *
err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
break;
}
+ case PROP_COLLECTION:
+ {
+ StructRNA *srna= va_arg(args, StructRNA*);
+ ListBase *arg= va_arg(args, ListBase*);
+ err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
+ break;
+ }
default:
{
/* handle errors */
@@ -2803,7 +3240,7 @@ int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *
}
if (err==0)
- err= RNA_function_call(ptr, func, parms);
+ err= RNA_function_call(C, reports, ptr, func, parms);
/* XXX throw error when more parameters than those needed are passed or leave silent? */
if (err==0 && pret && ofs<flen && format[ofs++]=='R') {
@@ -2847,6 +3284,13 @@ int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *
err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
break;
}
+ case PROP_COLLECTION:
+ {
+ StructRNA *srna= va_arg(args, StructRNA*);
+ ListBase **arg= va_arg(args, ListBase**);
+ err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
+ break;
+ }
default:
{
/* handle errors */
@@ -2863,15 +3307,16 @@ int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *
return err;
}
-int RNA_function_call_direct_va_lookup(PointerRNA *ptr, const char *identifier, const char *format, va_list args)
+int RNA_function_call_direct_va_lookup(bContext *C, ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, va_list args)
{
FunctionRNA *func;
func= RNA_struct_find_function(ptr, identifier);
if(func)
- return RNA_function_call_direct_va(ptr, func, format, args);
+ return RNA_function_call_direct_va(C, reports, ptr, func, format, args);
return 0;
}
+
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 531ae1e2790..3eb88e706e9 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -41,25 +41,25 @@ void RNA_def_actuator(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem actuator_type_items[] ={
- {ACT_OBJECT, "OBJECT", "Object", ""},
- {ACT_IPO, "IPO", "IPO", ""},
- {ACT_CAMERA, "CAMERA", "Camera", ""},
- {ACT_SOUND, "SOUND", "Sound", ""},
- {ACT_PROPERTY, "PROPERTY", "Property", ""},
- {ACT_CONSTRAINT, "CONSTRAINT", "Constraint", ""},
- {ACT_EDIT_OBJECT, "EDIT_OBJECT", "Edit Object", ""},
- {ACT_SCENE, "SCENE", "Scene", ""},
- {ACT_RANDOM, "RANDOM", "Random", ""},
- {ACT_MESSAGE, "MESSAGE", "Message", ""},
- {ACT_ACTION, "ACTION", "Action", ""},
- {ACT_CD, "CD", "CD", ""},
- {ACT_GAME, "GAME", "Game", ""},
- {ACT_VISIBILITY, "VISIBILITY", "Visibility", ""},
- {ACT_2DFILTER, "FILTER_2D", "2D Filter", ""},
- {ACT_PARENT, "PARENT", "Parent", ""},
- {ACT_SHAPEACTION, "SHAPE_ACTION", "Shape Action", ""},
- {ACT_STATE, "STATE", "State", ""},
- {0, NULL, NULL, NULL}};
+ {ACT_OBJECT, "OBJECT", 0, "Object", ""},
+ {ACT_IPO, "IPO", 0, "IPO", ""},
+ {ACT_CAMERA, "CAMERA", 0, "Camera", ""},
+ {ACT_SOUND, "SOUND", 0, "Sound", ""},
+ {ACT_PROPERTY, "PROPERTY", 0, "Property", ""},
+ {ACT_CONSTRAINT, "CONSTRAINT", 0, "Constraint", ""},
+ {ACT_EDIT_OBJECT, "EDIT_OBJECT", 0, "Edit Object", ""},
+ {ACT_SCENE, "SCENE", 0, "Scene", ""},
+ {ACT_RANDOM, "RANDOM", 0, "Random", ""},
+ {ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
+ {ACT_ACTION, "ACTION", 0, "Action", ""},
+ {ACT_CD, "CD", 0, "CD", ""},
+ {ACT_GAME, "GAME", 0, "Game", ""},
+ {ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
+ {ACT_2DFILTER, "FILTER_2D", 0, "2D Filter", ""},
+ {ACT_PARENT, "PARENT", 0, "Parent", ""},
+ {ACT_SHAPEACTION, "SHAPE_ACTION", 0, "Shape Action", ""},
+ {ACT_STATE, "STATE", 0, "State", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Actuator", NULL);
RNA_def_struct_ui_text(srna, "Actuator", "Game engine logic brick to apply actions in the game engine.");
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 702dc9fa65d..3469d716853 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -79,11 +79,11 @@ void rna_def_keyingset_path(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_grouping_items[] = {
- {KSP_GROUP_NAMED, "NAMED", "Named Group", ""},
- {KSP_GROUP_NONE, "NONE", "None", ""},
- {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""},
- {KSP_GROUP_TEMPLATE_ITEM, "TEMPLATE", "Innermost Context-Item Name", ""},
- {0, NULL, NULL, NULL}};
+ {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");
@@ -184,7 +184,7 @@ void rna_def_animdata(BlenderRNA *brna)
/* NLA */
prop= RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL);
- RNA_def_property_struct_type(prop, "UnknownType"); // XXX!
+ RNA_def_property_struct_type(prop, "NlaTrack");
RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers).");
/* Action */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index d49e5d14714..caa970eff57 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -32,27 +32,36 @@
#include "DNA_armature_types.h"
#include "DNA_scene_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
-static void rna_Bone_layer_set(PointerRNA *ptr, const int *values)
+#include "ED_armature.h"
+
+static void rna_bone_layer_set(short *layer, const int *values)
{
- Bone *bone= (Bone*)ptr->data;
int i, tot= 0;
/* ensure we always have some layer selected */
- for(i=0; i<20; i++)
+ for(i=0; i<16; i++)
if(values[i])
tot++;
if(tot==0)
return;
- for(i=0; i<20; i++) {
- if(values[i]) bone->layer |= (1<<i);
- else bone->layer &= ~(1<<i);
+ for(i=0; i<16; i++) {
+ if(values[i]) *layer |= (1<<i);
+ else *layer &= ~(1<<i);
}
}
+static void rna_Bone_layer_set(PointerRNA *ptr, const int *values)
+{
+ Bone *bone= (Bone*)ptr->data;
+ rna_bone_layer_set(&bone->layer, values);
+}
+
static void rna_Armature_layer_set(PointerRNA *ptr, const int *values)
{
bArmature *arm= (bArmature*)ptr->data;
@@ -100,152 +109,553 @@ static void rna_Armature_path_end_frame_set(PointerRNA *ptr, int value)
data->pathef= value;
}
+PointerRNA rna_EditBone_rna_type_get(PointerRNA *ptr)
+{
+ return rna_builtin_type_get(ptr);
+}
+
+void rna_EditBone_name_get(PointerRNA *ptr, char *value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ BLI_strncpy(value, data->name, sizeof(data->name));
+}
+
+int rna_EditBone_name_length(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return strlen(data->name);
+}
+
+int rna_EditBone_active_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_ACTIVE) != 0);
+}
+
+void rna_EditBone_active_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_ACTIVE;
+ else data->flag &= ~BONE_ACTIVE;
+}
+
+float rna_EditBone_bbone_in_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->ease1);
+}
+
+void rna_EditBone_bbone_in_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->ease1= CLAMPIS(value, 0.0f, 2.0f);
+}
+
+float rna_EditBone_bbone_out_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->ease2);
+}
+
+void rna_EditBone_bbone_out_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->ease2= CLAMPIS(value, 0.0f, 2.0f);
+}
+
+int rna_EditBone_bbone_segments_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (int)(data->segments);
+}
+
+void rna_EditBone_bbone_segments_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->segments= CLAMPIS(value, 1, 32);
+}
+
+void rna_EditBone_layer_get(PointerRNA *ptr, int values[16])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ values[0]= ((data->layer & (1<<0)) != 0);
+ values[1]= ((data->layer & (1<<1)) != 0);
+ values[2]= ((data->layer & (1<<2)) != 0);
+ values[3]= ((data->layer & (1<<3)) != 0);
+ values[4]= ((data->layer & (1<<4)) != 0);
+ values[5]= ((data->layer & (1<<5)) != 0);
+ values[6]= ((data->layer & (1<<6)) != 0);
+ values[7]= ((data->layer & (1<<7)) != 0);
+ values[8]= ((data->layer & (1<<8)) != 0);
+ values[9]= ((data->layer & (1<<9)) != 0);
+ values[10]= ((data->layer & (1<<10)) != 0);
+ values[11]= ((data->layer & (1<<11)) != 0);
+ values[12]= ((data->layer & (1<<12)) != 0);
+ values[13]= ((data->layer & (1<<13)) != 0);
+ values[14]= ((data->layer & (1<<14)) != 0);
+ values[15]= ((data->layer & (1<<15)) != 0);
+}
+
+void rna_EditBone_layer_set(PointerRNA *ptr, const int values[16])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ rna_bone_layer_set(&data->layer, values);
+}
+
+int rna_EditBone_connected_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_CONNECTED) != 0);
+}
+
+void rna_EditBone_connected_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_CONNECTED;
+ else data->flag &= ~BONE_CONNECTED;
+}
+
+int rna_EditBone_cyclic_offset_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (!((data->flag) & BONE_NO_CYCLICOFFSET) != 0);
+}
+
+void rna_EditBone_cyclic_offset_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(!value) data->flag |= BONE_NO_CYCLICOFFSET;
+ else data->flag &= ~BONE_NO_CYCLICOFFSET;
+}
+
+int rna_EditBone_deform_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (!((data->flag) & BONE_NO_DEFORM) != 0);
+}
+
+void rna_EditBone_deform_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(!value) data->flag |= BONE_NO_DEFORM;
+ else data->flag &= ~BONE_NO_DEFORM;
+}
+
+int rna_EditBone_draw_wire_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_DRAWWIRE) != 0);
+}
+
+void rna_EditBone_draw_wire_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_DRAWWIRE;
+ else data->flag &= ~BONE_DRAWWIRE;
+}
+
+float rna_EditBone_envelope_distance_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->dist);
+}
+
+void rna_EditBone_envelope_distance_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->dist= CLAMPIS(value, 0.0f, 1000.0f);
+}
+
+float rna_EditBone_envelope_weight_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->weight);
+}
+
+void rna_EditBone_envelope_weight_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->weight= CLAMPIS(value, 0.0f, 1000.0f);
+}
+
+float rna_EditBone_radius_head_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->rad_head);
+}
+
+void rna_EditBone_radius_head_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->rad_head= value;
+}
+
+float rna_EditBone_radius_tail_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->rad_tail);
+}
+
+void rna_EditBone_radius_tail_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->rad_tail= value;
+}
+
+void rna_EditBone_head_get(PointerRNA *ptr, float values[3])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ values[0]= (float)(((float*)data->head)[0]);
+ values[1]= (float)(((float*)data->head)[1]);
+ values[2]= (float)(((float*)data->head)[2]);
+}
+
+void rna_EditBone_head_set(PointerRNA *ptr, const float values[3])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ ((float*)data->head)[0]= values[0];
+ ((float*)data->head)[1]= values[1];
+ ((float*)data->head)[2]= values[2];
+}
+
+int rna_EditBone_head_selected_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_ROOTSEL) != 0);
+}
+
+void rna_EditBone_head_selected_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_ROOTSEL;
+ else data->flag &= ~BONE_ROOTSEL;
+}
+
+int rna_EditBone_hidden_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_HIDDEN_A) != 0);
+}
+
+void rna_EditBone_hidden_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_HIDDEN_A;
+ else data->flag &= ~BONE_HIDDEN_A;
+}
+
+int rna_EditBone_hinge_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (!((data->flag) & BONE_HINGE) != 0);
+}
+
+void rna_EditBone_hinge_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(!value) data->flag |= BONE_HINGE;
+ else data->flag &= ~BONE_HINGE;
+}
+
+int rna_EditBone_inherit_scale_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (!((data->flag) & BONE_NO_SCALE) != 0);
+}
+
+void rna_EditBone_inherit_scale_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(!value) data->flag |= BONE_NO_SCALE;
+ else data->flag &= ~BONE_NO_SCALE;
+}
+
+int rna_EditBone_locked_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_EDITMODE_LOCKED) != 0);
+}
+
+void rna_EditBone_locked_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_EDITMODE_LOCKED;
+ else data->flag &= ~BONE_EDITMODE_LOCKED;
+}
+
+int rna_EditBone_multiply_vertexgroup_with_envelope_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_MULT_VG_ENV) != 0);
+}
+
+void rna_EditBone_multiply_vertexgroup_with_envelope_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_MULT_VG_ENV;
+ else data->flag &= ~BONE_MULT_VG_ENV;
+}
+
+PointerRNA rna_EditBone_parent_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return rna_pointer_inherit_refine(ptr, &RNA_EditBone, data->parent);
+}
+
+float rna_EditBone_roll_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (float)(data->roll);
+}
+
+void rna_EditBone_roll_set(PointerRNA *ptr, float value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ data->roll= value;
+}
+
+void rna_EditBone_tail_get(PointerRNA *ptr, float values[3])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ values[0]= (float)(((float*)data->tail)[0]);
+ values[1]= (float)(((float*)data->tail)[1]);
+ values[2]= (float)(((float*)data->tail)[2]);
+}
+
+void rna_EditBone_tail_set(PointerRNA *ptr, const float values[3])
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ ((float*)data->tail)[0]= values[0];
+ ((float*)data->tail)[1]= values[1];
+ ((float*)data->tail)[2]= values[2];
+}
+
+int rna_EditBone_tail_selected_get(PointerRNA *ptr)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ return (((data->flag) & BONE_TIPSEL) != 0);
+}
+
+void rna_EditBone_tail_selected_set(PointerRNA *ptr, int value)
+{
+ EditBone *data= (EditBone*)(ptr->data);
+ if(value) data->flag |= BONE_TIPSEL;
+ else data->flag &= ~BONE_TIPSEL;
+}
+
+static void rna_Armature_bones_next(CollectionPropertyIterator *iter)
+{
+ ListBaseIterator *internal= iter->internal;
+ Bone *bone= (Bone*)internal->link;
+
+ if(bone->childbase.first)
+ internal->link= (Link*)bone->childbase.first;
+ else if(bone->next)
+ internal->link= (Link*)bone->next;
+ else {
+ internal->link= NULL;
+
+ do {
+ bone= bone->parent;
+ if(bone && bone->next) {
+ internal->link= (Link*)bone->next;
+ break;
+ }
+ } while(bone);
+ }
+
+ iter->valid= (internal->link != NULL);
+}
+
#else
-// err... bones should not be directly edited (only editbones should be...)
-static void rna_def_bone(BlenderRNA *brna)
+static void rna_def_bone_common(StructRNA *srna, int editbone)
{
- StructRNA *srna;
PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "Bone", NULL);
- RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock.");
- RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
-
- /* pointers/collections */
- /* parent (pointer) */
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Bone");
- RNA_def_property_pointer_sdna(prop, NULL, "parent");
- RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature).");
-
- /* children (collection) */
- prop= RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "childbase", NULL);
- RNA_def_property_struct_type(prop, "Bone");
- RNA_def_property_ui_text(prop, "Children", "Bones which are children of this bone");
-
+
/* strings */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* must be unique */
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
-
+ if(editbone) RNA_def_property_string_funcs(prop, "rna_EditBone_name_get", "rna_EditBone_name_length", "rna_EditBone_name_set");
+
/* flags */
- /* 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, 16);
RNA_def_property_ui_text(prop, "Bone Layers", "Layers bone exists in");
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Bone_layer_set");
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_layer_get", "rna_EditBone_layer_set");
+ else {
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Bone_layer_set");
+ RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
+ }
- /* flag */
- prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
- RNA_def_property_ui_text(prop, "Selected", "");
-
- prop= RNA_def_property(srna, "head_selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ROOTSEL);
- RNA_def_property_ui_text(prop, "Head Selected", "");
-
- prop= RNA_def_property(srna, "tail_selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_TIPSEL);
- RNA_def_property_ui_text(prop, "Tail Selected", "");
-
prop= RNA_def_property(srna, "connected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_CONNECTED);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_connected_get", "rna_EditBone_connected_set");
+ else RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_CONNECTED);
RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is struck to the parent's tail.");
- // XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here...
- prop= RNA_def_property(srna, "pose_channel_hidden", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P);
- RNA_def_property_ui_text(prop, "Pose Channel Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes).");
-
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ACTIVE);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_active_get", "rna_EditBone_active_set");
+ else RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "Bone was the last bone clicked on (most operations are applied to only this bone)");
prop= RNA_def_property(srna, "hinge", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_HINGE);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_hinge_get", "rna_EditBone_hinge_set");
+ else RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_HINGE);
RNA_def_property_ui_text(prop, "Inherit Rotation", "Bone doesn't inherit rotation or scale from parent bone.");
- prop= RNA_def_property(srna, "editmode_hidden", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_A);
- RNA_def_property_ui_text(prop, "Edit Mode Hidden", "Bone is not visible when in Edit Mode");
-
prop= RNA_def_property(srna, "multiply_vertexgroup_with_envelope", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_MULT_VG_ENV);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_multiply_vertexgroup_with_envelope_get", "rna_EditBone_multiply_vertexgroup_with_envelope_set");
+ else RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_MULT_VG_ENV);
RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope", "When deforming bone, multiply effects of Vertex Group weights with Envelope influence.");
prop= RNA_def_property(srna, "deform", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_DEFORM);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_deform_get", "rna_EditBone_deform_set");
+ else RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_DEFORM);
RNA_def_property_ui_text(prop, "Deform", "Bone does not deform any geometry.");
prop= RNA_def_property(srna, "inherit_scale", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_SCALE);
RNA_def_property_ui_text(prop, "Inherit Scale", "Bone inherits scaling from parent bone.");
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_inherit_scale_get", "rna_EditBone_inherit_scale_set");
+ else RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_SCALE);
prop= RNA_def_property(srna, "draw_wire", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_draw_wire_get", "rna_EditBone_draw_wire_set");
+ else RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
RNA_def_property_ui_text(prop, "Draw Wire", "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes.");
prop= RNA_def_property(srna, "cyclic_offset", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_CYCLICOFFSET);
+ if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_cyclic_offset_get", "rna_EditBone_cyclic_offset_set");
+ else RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_CYCLICOFFSET);
RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects.");
-
- prop= RNA_def_property(srna, "editmode_locked", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_EDITMODE_LOCKED);
- RNA_def_property_ui_text(prop, "Edit Mode Locked", "Bone is not able to be transformed when in Edit Mode.");
-
+
/* Number values */
/* envelope deform settings */
prop= RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dist");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_envelope_distance_get", "rna_EditBone_envelope_distance_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only).");
prop= RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "weight");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_envelope_weight_get", "rna_EditBone_envelope_weight_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only).");
prop= RNA_def_property(srna, "radius_head", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "rad_head");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_radius_head_get", "rna_EditBone_radius_head_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "rad_head");
//RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
RNA_def_property_ui_text(prop, "Envelope Radius Head", "Radius of head of bone (for Envelope deform only).");
prop= RNA_def_property(srna, "radius_tail", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "rad_tail");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_radius_tail_get", "rna_EditBone_radius_tail_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "rad_tail");
//RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
RNA_def_property_ui_text(prop, "Envelope Radius Tail", "Radius of tail of bone (for Envelope deform only).");
/* b-bones deform settings */
prop= RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "segments");
+ if(editbone) RNA_def_property_int_funcs(prop, "rna_EditBone_bbone_segments_get", "rna_EditBone_bbone_segments_set", NULL);
+ else RNA_def_property_int_sdna(prop, NULL, "segments");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only).");
prop= RNA_def_property(srna, "bbone_in", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ease1");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_bbone_in_get", "rna_EditBone_bbone_in_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "ease1");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "B-Bone Ease In", "Length of first Bezier Handle (for B-Bones only).");
prop= RNA_def_property(srna, "bbone_out", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ease2");
+ if(editbone) RNA_def_property_float_funcs(prop, "rna_EditBone_bbone_out_get", "rna_EditBone_bbone_out_set", NULL);
+ else RNA_def_property_float_sdna(prop, NULL, "ease2");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only).");
+}
+
+// err... bones should not be directly edited (only editbones should be...)
+static void rna_def_bone(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
- /* editmode bone coordinates */
- // XXX not sure if we want to wrap these here... besides, changing these requires changing the matrix?
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_ui_text(prop, "Bone Head Location", "In Edit Mode, the location of the 'head' of the bone.");
+ srna= RNA_def_struct(brna, "Bone", NULL);
+ RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock.");
+ RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_ui_text(prop, "Bone Tail Location", "In Edit Mode, the location of the 'head' of the bone.");
+ /* pointers/collections */
+ /* parent (pointer) */
+ prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Bone");
+ RNA_def_property_pointer_sdna(prop, NULL, "parent");
+ RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature).");
+
+ /* children (collection) */
+ prop= RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "childbase", NULL);
+ RNA_def_property_struct_type(prop, "Bone");
+ RNA_def_property_ui_text(prop, "Children", "Bones which are children of this bone");
+
+ rna_def_bone_common(srna, 0);
+
+ // XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here...
+ prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P);
+ RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes).");
+
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
+ RNA_def_property_ui_text(prop, "Selected", "");
+}
+
+static void rna_def_edit_bone(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "EditBone", NULL);
+ RNA_def_struct_ui_text(srna, "Edit Bone", "Editmode bone in an Armature datablock.");
+ RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
+
+ prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "EditBone");
+ RNA_def_property_pointer_funcs(prop, "rna_EditBone_parent_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Parent", "Parent edit bone (in same Armature).");
prop= RNA_def_property(srna, "roll", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Bone Roll", "In Edit Mode, the 'roll' (i.e. rotation around the bone vector, equivalent to local Y-axis rotation).");
+ RNA_def_property_float_funcs(prop, "rna_EditBone_roll_get", "rna_EditBone_roll_set", NULL);
+ RNA_def_property_ui_text(prop, "Roll", "Bone rotation around head-tail axis.");
+
+ prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_funcs(prop, "rna_EditBone_head_get", "rna_EditBone_head_set", NULL);
+ RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone.");
+
+ prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_funcs(prop, "rna_EditBone_tail_get", "rna_EditBone_tail_set", NULL);
+ RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
+
+ rna_def_bone_common(srna, 1);
+
+ prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_EditBone_hidden_get", "rna_EditBone_hidden_set");
+ RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when in Edit Mode");
+
+ prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_EditBone_locked_get", "rna_EditBone_locked_set");
+ RNA_def_property_ui_text(prop, "Locked", "Bone is not able to be transformed when in Edit Mode.");
+
+ prop= RNA_def_property(srna, "head_selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_EditBone_head_selected_get", "rna_EditBone_head_selected_set");
+ RNA_def_property_ui_text(prop, "Head Selected", "");
+
+ prop= RNA_def_property(srna, "tail_selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_EditBone_tail_selected_get", "rna_EditBone_tail_selected_set");
+ RNA_def_property_ui_text(prop, "Tail Selected", "");
}
void rna_def_armature(BlenderRNA *brna)
@@ -254,16 +664,16 @@ void rna_def_armature(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_drawtype_items[] = {
- {ARM_OCTA, "OCTAHEDRAL", "Octahedral", "Draw bones as octahedral shape (default)."},
- {ARM_LINE, "STICK", "Stick", "Draw bones as simple 2D lines with dots."},
- {ARM_B_BONE, "BBONE", "B-Bone", "Draw bones as boxes, showing subdivision and B-Splines"},
- {ARM_ENVELOPE, "ENVELOPE", "Envelope", "Draw bones as extruded spheres, showing defomation influence volume."},
- {0, NULL, NULL, NULL}};
+ {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Draw bones as octahedral shape (default)."},
+ {ARM_LINE, "STICK", 0, "Stick", "Draw bones as simple 2D lines with dots."},
+ {ARM_B_BONE, "BBONE", 0, "B-Bone", "Draw bones as boxes, showing subdivision and B-Splines"},
+ {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Draw bones as extruded spheres, showing defomation influence volume."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
- {ARM_GHOST_CUR, "CURRENT_FRAME", "Around Current Frame", "Draw Ghosts of poses within a fixed number of frames around the current frame."},
- {ARM_GHOST_RANGE, "RANGE", "In Range", "Draw Ghosts of poses within specified range."},
- {ARM_GHOST_KEYS, "KEYS", "On Keyframes", "Draw Ghosts of poses on Keyframes."},
- {0, NULL, NULL, NULL}};
+ {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Current Frame", "Draw Ghosts of poses within a fixed number of frames around the current frame."},
+ {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Draw Ghosts of poses within specified range."},
+ {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Draw Ghosts of poses on Keyframes."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters.");
@@ -274,8 +684,14 @@ void rna_def_armature(BlenderRNA *brna)
/* Collections */
prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
+ RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", 0, 0, 0, 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_ui_text(prop, "Bones", "");
+
+ prop= RNA_def_property(srna, "edit_bones", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "edbo", NULL);
+ RNA_def_property_struct_type(prop, "EditBone");
+ RNA_def_property_ui_text(prop, "Edit Bones", "");
/* Enum values */
prop= RNA_def_property(srna, "drawtype", PROP_ENUM, PROP_NONE);
@@ -294,6 +710,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, NULL);
/* layer protection */
prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);
@@ -433,6 +850,7 @@ void RNA_def_armature(BlenderRNA *brna)
{
rna_def_armature(brna);
rna_def_bone(brna);
+ rna_def_edit_bone(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 3deb38a3a07..3b7df3aa948 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -37,7 +37,7 @@
static void rna_Brush_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Brush *brush= (Brush*)ptr->data;
- rna_iterator_array_begin(iter, (void*)brush->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+ rna_iterator_array_begin(iter, (void*)brush->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_Brush_active_texture_get(PointerRNA *ptr)
@@ -67,29 +67,29 @@ void rna_def_brush(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_blend_items[] = {
- {BRUSH_BLEND_MIX, "MIX", "Mix", "Use mix blending mode while painting."},
- {BRUSH_BLEND_ADD, "ADD", "Add", "Use add blending mode while painting."},
- {BRUSH_BLEND_SUB, "SUB", "Subtract", "Use subtract blending mode while painting."},
- {BRUSH_BLEND_MUL, "MUL", "Multiply", "Use multiply blending mode while painting."},
- {BRUSH_BLEND_LIGHTEN, "LIGHTEN", "Lighten", "Use lighten blending mode while painting."},
- {BRUSH_BLEND_DARKEN, "DARKEN", "Darken", "Use darken blending mode while painting."},
- {BRUSH_BLEND_ERASE_ALPHA, "ERASE_ALPHA", "Erase Alpha", "Erase alpha while painting."},
- {BRUSH_BLEND_ADD_ALPHA, "ADD_ALPHA", "Add Alpha", "Add alpha while painting."},
- {0, NULL, NULL, NULL}};
+ {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}};
static EnumPropertyItem prop_texture_mode_items[] = {
- {BRUSH_TEX_DRAG, "TEX_DRAG", "Drag", ""},
- {BRUSH_TEX_TILE, "TEX_TILE", "Tile", ""},
- {BRUSH_TEX_3D, "TEX_3D", "3D", ""},
- {0, NULL, NULL, NULL}};
+ {BRUSH_TEX_DRAG, "TEX_DRAG", 0, "Drag", ""},
+ {BRUSH_TEX_TILE, "TEX_TILE", 0, "Tile", ""},
+ {BRUSH_TEX_3D, "TEX_3D", 0, "3D", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_sculpt_tool_items[] = {
- {SCULPT_TOOL_DRAW, "DRAW", "Draw", ""},
- {SCULPT_TOOL_SMOOTH, "SMOOTH", "Smooth", ""},
- {SCULPT_TOOL_PINCH, "PINCH", "Pinch", ""},
- {SCULPT_TOOL_INFLATE, "INFLATE", "Inflate", ""},
- {SCULPT_TOOL_GRAB, "GRAB", "Grab", ""},
- {SCULPT_TOOL_LAYER, "LAYER", "Layer", ""},
- {SCULPT_TOOL_FLATTEN, "FLATTEN", "Flatten", ""},
- {0, NULL, NULL, NULL}};
+ {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
+ {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
+ {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
+ {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
+ {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
+ {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Brush", "ID");
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting.");
@@ -184,6 +184,10 @@ void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE);
RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing.");
+
+ prop= RNA_def_property(srna, "smooth_stroke", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
+ RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path.");
/* not exposed in the interface yet
prop= RNA_def_property(srna, "fixed_tex", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index bee8a21ad7d..9c33b0afb00 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -42,13 +42,13 @@ void RNA_def_camera(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {CAM_PERSP, "PERSP", "Perspective", ""},
- {CAM_ORTHO, "ORTHO", "Orthographic", ""},
- {0, NULL, NULL, NULL}};
+ {CAM_PERSP, "PERSP", 0, "Perspective", ""},
+ {CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_lens_unit_items[] = {
- {0, "MILLIMETERS", "Millimeters", ""},
- {CAM_ANGLETOGGLE, "DEGREES", "Degrees", ""},
- {0, NULL, NULL, NULL}};
+ {0, "MILLIMETERS", 0, "Millimeters", ""},
+ {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Camera", "ID");
RNA_def_struct_ui_text(srna, "Camera", "Camera datablock for storing camera settings.");
@@ -62,7 +62,7 @@ void RNA_def_camera(BlenderRNA *brna)
/* Number values */
- prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "passepartalpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view.");
@@ -153,6 +153,11 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_lens_unit_items);
RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface.");
+ prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
+ RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
/* pointers */
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 919ae210801..95b580ac298 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -31,10 +31,27 @@
#include "rna_internal.h"
#include "BKE_cloth.h"
+#include "BKE_modifier.h"
+
#include "DNA_cloth_types.h"
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+
+#include "WM_types.h"
#ifdef RNA_RUNTIME
+#include "BKE_context.h"
+#include "BKE_depsgraph.h"
+
+static void rna_cloth_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ptr->id.data;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+}
+
static void rna_ClothSettings_max_bend_set(struct PointerRNA *ptr, float value)
{
ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
@@ -129,6 +146,22 @@ static void rna_ClothSettings_gravity_set(PointerRNA *ptr, const float *values)
sim->gravity[2]= values[2];
}
+static char *rna_ClothSettings_path(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+
+ return BLI_sprintfN("modifiers[%s].settings", md->name);
+}
+
+static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+
+ return BLI_sprintfN("modifiers[%s].collision_settings", md->name);
+}
+
#else
static void rna_def_cloth_sim_settings(BlenderRNA *brna)
@@ -139,6 +172,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ClothSettings", NULL);
RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object.");
RNA_def_struct_sdna(srna, "ClothSimSettings");
+ RNA_def_struct_path_func(srna, "rna_ClothSettings_path");
/* goal */
@@ -146,42 +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, 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, 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, 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, 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, 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, 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 fine control over mass distribution.");
+ RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_VECTOR);
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, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* various */
@@ -189,61 +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, 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", "Define forces for vertices to stick to animated position.");
+ RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions.");
+ 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* unused */
@@ -297,46 +351,55 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL);
RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects.");
RNA_def_struct_sdna(srna, "ClothCollSettings");
+ RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path");
/* general collision */
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, 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, can be changed for each frame.");
+ RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in");
+ 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 (0=movement not changed, 100=no movement left)");
+ RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened (higher = less movement).");
+ 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_ui_text(prop, "Collision Quality", "How many collision iterations should be done (higher is better quality but slower).");
+ 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, 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, 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, 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), can be changed for each frame.");
+ 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_color.c b/source/blender/makesrna/intern/rna_color.c
index dcd5a494e5d..f4248d18db3 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -50,7 +50,7 @@ static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, Poin
{
CurveMapping *cumap= (CurveMapping*)ptr->data;
- rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), NULL);
+ rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), 0, NULL);
}
static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value)
@@ -120,9 +120,9 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_handle_type_items[] = {
- {0, "AUTO", "Auto Handle", ""},
- {CUMA_VECTOR, "VECTOR", "Vector Handle", ""},
- {0, NULL, NULL, NULL}
+ {0, "AUTO", 0, "Auto Handle", ""},
+ {CUMA_VECTOR, "VECTOR", 0, "Vector Handle", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna= RNA_def_struct(brna, "CurveMapPoint", NULL);
@@ -152,9 +152,9 @@ static void rna_def_curvemap(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_extend_items[] = {
- {0, "HORIZONTAL", "Horizontal", ""},
- {CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", "Extrapolated", ""},
- {0, NULL, NULL, NULL}
+ {0, "HORIZONTAL", 0, "Horizontal", ""},
+ {CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", 0, "Extrapolated", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna= RNA_def_struct(brna, "CurveMap", NULL);
@@ -212,7 +212,7 @@ static void rna_def_curvemapping(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxy_range");
prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_CurveMapping_curves_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_CurveMapping_curves_length", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "CurveMap");
RNA_def_property_ui_text(prop, "Curves", "");
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index a98bc41d129..0e3dd799612 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -36,29 +36,49 @@
#include "WM_types.h"
EnumPropertyItem constraint_type_items[] ={
- {CONSTRAINT_TYPE_NULL, "NULL", "Null", ""},
- {CONSTRAINT_TYPE_CHILDOF, "CHILD_OF", "Child Of", ""},
- {CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", "Track To", ""},
- {CONSTRAINT_TYPE_KINEMATIC, "IK", "IK", ""},
- {CONSTRAINT_TYPE_FOLLOWPATH, "FOLLOW_PATH", "Follow Path", ""},
- {CONSTRAINT_TYPE_ROTLIMIT, "LIMIT_ROTATION", "Limit Rotation", ""},
- {CONSTRAINT_TYPE_LOCLIMIT, "LIMIT_LOCATION", "Limit Location", ""},
- {CONSTRAINT_TYPE_SIZELIMIT, "LIMIT_SCALE", "Limit Scale", ""},
- {CONSTRAINT_TYPE_ROTLIKE, "COPY_ROTATION", "Copy Rotation", ""},
- {CONSTRAINT_TYPE_LOCLIKE, "COPY_LOCATION", "Copy Location", ""},
- {CONSTRAINT_TYPE_SIZELIKE, "COPY_SCALE", "Copy Scale", ""},
- {CONSTRAINT_TYPE_PYTHON, "SCRIPT", "Script", ""},
- {CONSTRAINT_TYPE_ACTION, "ACTION", "Action", ""},
- {CONSTRAINT_TYPE_LOCKTRACK, "LOCKED_TRACK", "Locked Track", ""},
- {CONSTRAINT_TYPE_DISTLIMIT, "LIMIT_DISTANCE", "Limit Distance", ""},
- {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO", "Stretch To", ""},
- {CONSTRAINT_TYPE_MINMAX, "FLOOR", "Floor", ""},
- {CONSTRAINT_TYPE_RIGIDBODYJOINT, "RIGID_BODY_JOINT", "Rigid Body Joint", ""},
- {CONSTRAINT_TYPE_CLAMPTO, "CLAMP_TO", "Clamp To", ""},
- {CONSTRAINT_TYPE_TRANSFORM, "TRANSFORM", "Transformation", ""},
- {CONSTRAINT_TYPE_SHRINKWRAP, "SHRINKWRAP", "Shrinkwrap", ""},
- {0, NULL, NULL, NULL}};
-
+ {CONSTRAINT_TYPE_CHILDOF, "CHILD_OF", 0, "Child Of", ""},
+ {CONSTRAINT_TYPE_TRANSFORM, "TRANSFORM", 0, "Transformation", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_LOCLIKE, "COPY_LOCATION", 0, "Copy Location", ""},
+ {CONSTRAINT_TYPE_ROTLIKE, "COPY_ROTATION", 0, "Copy Rotation", ""},
+ {CONSTRAINT_TYPE_SIZELIKE, "COPY_SCALE", 0, "Copy Scale", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_LOCLIMIT, "LIMIT_LOCATION", 0, "Limit Location", ""},
+ {CONSTRAINT_TYPE_ROTLIMIT, "LIMIT_ROTATION", 0, "Limit Rotation", ""},
+ {CONSTRAINT_TYPE_SIZELIMIT, "LIMIT_SCALE", 0, "Limit Scale", ""},
+ {CONSTRAINT_TYPE_DISTLIMIT, "LIMIT_DISTANCE", 0, "Limit Distance", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", 0, "Track To", ""},
+ {CONSTRAINT_TYPE_LOCKTRACK, "LOCKED_TRACK", 0, "Locked Track", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_MINMAX, "FLOOR", 0, "Floor", ""},
+ {CONSTRAINT_TYPE_SHRINKWRAP, "SHRINKWRAP", 0, "Shrinkwrap", ""},
+ {CONSTRAINT_TYPE_FOLLOWPATH, "FOLLOW_PATH", 0, "Follow Path", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_CLAMPTO, "CLAMP_TO", 0, "Clamp To", ""},
+ {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO", 0, "Stretch To", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_KINEMATIC, "IK", 0, "IK", ""},
+ {CONSTRAINT_TYPE_RIGIDBODYJOINT, "RIGID_BODY_JOINT", 0, "Rigid Body Joint", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_ACTION, "ACTION", 0, "Action", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_PYTHON, "SCRIPT", 0, "Script", ""},
+ {0, "", 0, NULL, NULL},
+ {CONSTRAINT_TYPE_NULL, "NULL", 0, "Null", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem space_pchan_items[] = {
+ {0, "WORLD", 0, "World Space", ""},
+ {2, "POSE", 0, "Pose Space", ""},
+ {3, "LOCAL_WITH_PARENT", 0, "Local With Parent", ""},
+ {1, "LOCAL", 0, "Local Space", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem space_object_items[] = {
+ {0, "WORLD", 0, "World Space", ""},
+ {1, "LOCAL", 0, "Local (Without Parent) Space", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -157,22 +177,24 @@ static void rna_Constraint_influence_update(bContext *C, PointerRNA *ptr)
rna_Constraint_update(C, ptr);
}
-static EnumPropertyItem space_pchan_items[] = {
- {0, "WORLD", "World Space", ""},
- {2, "POSE", "Pose Space", ""},
- {3, "LOCAL_WITH_PARENT", "Local With Parent", ""},
- {1, "LOCAL", "Local Space", ""},
- {0, NULL, NULL, NULL}};
-
-static EnumPropertyItem space_object_items[] = {
- {0, "WORLD", "World Space", ""},
- {1, "LOCAL", "Local (Without Parent) Space", ""},
- {0, NULL, NULL, NULL}};
-
-static EnumPropertyItem *rna_Constraint_owner_space_itemf(PointerRNA *ptr)
+static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *C, PointerRNA *ptr, int *free)
{
Object *ob= (Object*)ptr->id.data;
bConstraint *con= (bConstraint*)ptr->data;
+
+ if(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, space_object_items);
+ RNA_enum_items_add(&item, &totitem, space_pchan_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
if(BLI_findindex(&ob->constraints, con) == -1)
return space_pchan_items;
@@ -180,13 +202,27 @@ static EnumPropertyItem *rna_Constraint_owner_space_itemf(PointerRNA *ptr)
return space_object_items;
}
-static EnumPropertyItem *rna_Constraint_target_space_itemf(PointerRNA *ptr)
+static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerRNA *ptr, int *free)
{
bConstraint *con= (bConstraint*)ptr->data;
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
+ if(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, space_object_items);
+ RNA_enum_items_add(&item, &totitem, space_pchan_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
if(cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
@@ -415,19 +451,19 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem track_items[] = {
- {TRACK_X, "TRACK_X", "X", ""},
- {TRACK_Y, "TRACK_Y", "Y", ""},
- {TRACK_Z, "TRACK_Z", "Z", ""},
- {TRACK_nX, "TRACK_NEGATIVE_X", "-X", ""},
- {TRACK_nY, "TRACK_NEGATIVE_Y", "-Y", ""},
- {TRACK_nZ, "TRACK_NEGATIVE_Z", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "TRACK_X", 0, "X", ""},
+ {TRACK_Y, "TRACK_Y", 0, "Y", ""},
+ {TRACK_Z, "TRACK_Z", 0, "Z", ""},
+ {TRACK_nX, "TRACK_NEGATIVE_X", 0, "-X", ""},
+ {TRACK_nY, "TRACK_NEGATIVE_Y", 0, "-Y", ""},
+ {TRACK_nZ, "TRACK_NEGATIVE_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem up_items[] = {
- {TRACK_X, "UP_X", "X", ""},
- {TRACK_Y, "UP_Y", "Y", ""},
- {TRACK_Z, "UP_Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "UP_X", 0, "X", ""},
+ {TRACK_Y, "UP_Y", 0, "Y", ""},
+ {TRACK_Z, "UP_Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "TrackToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Track To Constraint", "Aims the constrained object toward the target.");
@@ -525,6 +561,12 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna)
srna= RNA_def_struct(brna, "CopyLocationConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copies the location of the target.");
+
+ prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
+ RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
RNA_def_struct_sdna_from(srna, "bLocateLikeConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -573,13 +615,6 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_OFFSET);
RNA_def_property_ui_text(prop, "Offset", "Add original location into copied location.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-
- RNA_def_struct_sdna(srna, "bConstraint");
-
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "headtail");
- RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
static void rna_def_constraint_minmax(BlenderRNA *brna)
@@ -588,13 +623,13 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem minmax_items[] = {
- {LOCLIKE_X, "FLOOR_X", "X", ""},
- {LOCLIKE_Y, "FLOOR_Y", "Y", ""},
- {LOCLIKE_Z, "FLOOR_Z", "Z", ""},
- {LOCLIKE_X_INVERT, "FLOOR_NEGATIVE_X", "-X", ""},
- {LOCLIKE_Y_INVERT, "FLOOR_NEGATIVE_Y", "-Y", ""},
- {LOCLIKE_Z_INVERT, "FLOOR_NEGATIVE_Z", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {LOCLIKE_X, "FLOOR_X", 0, "X", ""},
+ {LOCLIKE_Y, "FLOOR_Y", 0, "Y", ""},
+ {LOCLIKE_Z, "FLOOR_Z", 0, "Z", ""},
+ {LOCLIKE_X_INVERT, "FLOOR_NEGATIVE_X", 0, "-X", ""},
+ {LOCLIKE_Y_INVERT, "FLOOR_NEGATIVE_Y", 0, "-Y", ""},
+ {LOCLIKE_Z_INVERT, "FLOOR_NEGATIVE_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FloorConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Floor Constraint", "Uses the target object for location limitation.");
@@ -681,16 +716,16 @@ static void rna_def_constraint_action(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem transform_channel_items[] = {
- {00, "ROTATION_X", "Rotation X", ""},
- {01, "ROTATION_Y", "Rotation Y", ""},
- {02, "ROTATION_Z", "Rotation Z", ""},
- {10, "SIZE_X", "Scale X", ""},
- {11, "SIZE_Y", "Scale Y", ""},
- {12, "SIZE_Z", "Scale Z", ""},
- {20, "LOCATION_X", "Location X", ""},
- {21, "LOCATION_Y", "Location Y", ""},
- {22, "LOCATION_Z", "Location Z", ""},
- {0, NULL, NULL, NULL}};
+ {00, "ROTATION_X", 0, "Rotation X", ""},
+ {01, "ROTATION_Y", 0, "Rotation Y", ""},
+ {02, "ROTATION_Z", 0, "Rotation Z", ""},
+ {10, "SIZE_X", 0, "Scale X", ""},
+ {11, "SIZE_Y", 0, "Scale Y", ""},
+ {12, "SIZE_Z", 0, "Scale Z", ""},
+ {20, "LOCATION_X", 0, "Location X", ""},
+ {21, "LOCATION_Y", 0, "Location Y", ""},
+ {22, "LOCATION_Z", 0, "Location Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ActionConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Action Constraint", "Map an action to the transform axes of a bone.");
@@ -721,13 +756,13 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "start");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the Action to use.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "end");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "End Frame", "Last frame of the Action to use.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -750,19 +785,19 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem locktrack_items[] = {
- {TRACK_X, "TRACK_X", "X", ""},
- {TRACK_Y, "TRACK_Y", "Y", ""},
- {TRACK_Z, "TRACK_Z", "Z", ""},
- {TRACK_nX, "TRACK_NEGATIVE_X", "-X", ""},
- {TRACK_nY, "TRACK_NEGATIVE_Y", "-Y", ""},
- {TRACK_nZ, "TRACK_NEGATIVE_Z", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "TRACK_X", 0, "X", ""},
+ {TRACK_Y, "TRACK_Y", 0, "Y", ""},
+ {TRACK_Z, "TRACK_Z", 0, "Z", ""},
+ {TRACK_nX, "TRACK_NEGATIVE_X", 0, "-X", ""},
+ {TRACK_nY, "TRACK_NEGATIVE_Y", 0, "-Y", ""},
+ {TRACK_nZ, "TRACK_NEGATIVE_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem lock_items[] = {
- {TRACK_X, "LOCK_X", "X", ""},
- {TRACK_Y, "LOCK_Y", "Y", ""},
- {TRACK_Z, "LOCK_Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "LOCK_X", 0, "X", ""},
+ {TRACK_Y, "LOCK_Y", 0, "Y", ""},
+ {TRACK_Z, "LOCK_Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LockedTrackConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Points toward the target along the track axis, while locking the other axis.");
@@ -798,19 +833,19 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem forwardpath_items[] = {
- {TRACK_X, "FORWARD_X", "X", ""},
- {TRACK_Y, "FORWARD_Y", "Y", ""},
- {TRACK_Z, "FORWARD_Z", "Z", ""},
- {TRACK_nX, "TRACK_NEGATIVE_X", "-X", ""},
- {TRACK_nY, "TRACK_NEGATIVE_Y", "-Y", ""},
- {TRACK_nZ, "TRACK_NEGATIVE_Z", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "FORWARD_X", 0, "X", ""},
+ {TRACK_Y, "FORWARD_Y", 0, "Y", ""},
+ {TRACK_Z, "FORWARD_Z", 0, "Z", ""},
+ {TRACK_nX, "TRACK_NEGATIVE_X", 0, "-X", ""},
+ {TRACK_nY, "TRACK_NEGATIVE_Y", 0, "-Y", ""},
+ {TRACK_nZ, "TRACK_NEGATIVE_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pathup_items[] = {
- {TRACK_X, "UP_X", "X", ""},
- {TRACK_Y, "UP_Y", "Y", ""},
- {TRACK_Z, "UP_Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {TRACK_X, "UP_X", 0, "X", ""},
+ {TRACK_Y, "UP_Y", 0, "Y", ""},
+ {TRACK_Z, "UP_Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FollowPathConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Locks motion to the target path.");
@@ -851,16 +886,16 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem volume_items[] = {
- {VOLUME_XZ, "VOLUME_XZX", "XZ", ""},
- {VOLUME_X, "VOLUME_X", "Y", ""},
- {VOLUME_Z, "VOLUME_Z", "Z", ""},
- {NO_VOLUME, "NO_VOLUME", "None", ""},
- {0, NULL, NULL, NULL}};
+ {VOLUME_XZ, "VOLUME_XZX", 0, "XZ", ""},
+ {VOLUME_X, "VOLUME_X", 0, "Y", ""},
+ {VOLUME_Z, "VOLUME_Z", 0, "Z", ""},
+ {NO_VOLUME, "NO_VOLUME", 0, "None", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem plane_items[] = {
- {PLANE_X, "PLANE_X", "X", "Keep X Axis"},
- {PLANE_Z, "PLANE_Z", "Z", "Keep Z Axis"},
- {0, NULL, NULL, NULL}};
+ {PLANE_X, "PLANE_X", 0, "X", "Keep X Axis"},
+ {PLANE_Z, "PLANE_Z", 0, "Z", "Keep Z Axis"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "StretchToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretches to meet the target object.");
@@ -902,11 +937,11 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem pivot_items[] = {
- {CONSTRAINT_RB_BALL, "BALL", "Ball", ""},
- {CONSTRAINT_RB_HINGE, "HINGE", "Hinge", ""},
- {CONSTRAINT_RB_CONETWIST, "CONE_TWIST", "Cone Twist", ""},
- {CONSTRAINT_RB_GENERIC6DOF, "GENERIC_6_DOF", "Generic 6 DoF", ""},
- {0, NULL, NULL, NULL}};
+ {CONSTRAINT_RB_BALL, "BALL", 0, "Ball", ""},
+ {CONSTRAINT_RB_HINGE, "HINGE", 0, "Hinge", ""},
+ {CONSTRAINT_RB_CONETWIST, "CONE_TWIST", 0, "Cone Twist", ""},
+ {CONSTRAINT_RB_GENERIC6DOF, "GENERIC_6_DOF", 0, "Generic 6 DoF", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RigidBodyJointConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Rigid Body Joint Constraint", "For use with the Game Engine.");
@@ -986,11 +1021,11 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem clamp_items[] = {
- {CLAMPTO_AUTO, "CLAMPTO_AUTO", "Auto", ""},
- {CLAMPTO_X, "CLAMPTO_X", "X", ""},
- {CLAMPTO_Y, "CLAMPTO_Y", "Y", ""},
- {CLAMPTO_Z, "CLAMPTO_Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {CLAMPTO_AUTO, "CLAMPTO_AUTO", 0, "Auto", ""},
+ {CLAMPTO_X, "CLAMPTO_X", 0, "X", ""},
+ {CLAMPTO_Y, "CLAMPTO_Y", 0, "Y", ""},
+ {CLAMPTO_Z, "CLAMPTO_Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ClampToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Clamp To Constraint", "Constrains an object's location to the nearest point along the target path.");
@@ -1020,16 +1055,16 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem transform_items[] = {
- {0, "LOCATION", "Loc", ""},
- {1, "ROTATION", "Rot", ""},
- {2, "SCALE", "Scale", ""},
- {0, NULL, NULL, NULL}};
+ {0, "LOCATION", 0, "Loc", ""},
+ {1, "ROTATION", 0, "Rot", ""},
+ {2, "SCALE", 0, "Scale", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem axis_map_items[] = {
- {0, "X", "X", ""},
- {1, "Y", "Y", ""},
- {2, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "TransformConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object.");
@@ -1388,10 +1423,10 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem distance_items[] = {
- {LIMITDIST_INSIDE, "LIMITDIST_INSIDE", "Inside", ""},
- {LIMITDIST_OUTSIDE, "LIMITDIST_OUTSIDE", "Outside", ""},
- {LIMITDIST_ONSURFACE, "LIMITDIST_ONSURFACE", "On Surface", ""},
- {0, NULL, NULL, NULL}};
+ {LIMITDIST_INSIDE, "LIMITDIST_INSIDE", 0, "Inside", ""},
+ {LIMITDIST_OUTSIDE, "LIMITDIST_OUTSIDE", 0, "Outside", ""},
+ {LIMITDIST_ONSURFACE, "LIMITDIST_ONSURFACE", 0, "On Surface", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LimitDistanceConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limits the distance from target object.");
@@ -1427,10 +1462,10 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", "Nearest Surface Point", ""},
- {MOD_SHRINKWRAP_PROJECT, "PROJECT", "Project", ""},
- {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", "Nearest Vertex", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", 0, "Nearest Surface Point", ""},
+ {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", ""},
+ {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShrinkwrapConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Creates constraint-based shrinkwrap relationship.");
@@ -1497,11 +1532,13 @@ void RNA_def_constraint(BlenderRNA *brna)
prop= RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ownspace");
+ RNA_def_property_enum_items(prop, space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_owner_space_itemf");
RNA_def_property_ui_text(prop, "Owner Space", "Space that owner is evaluated in.");
prop= RNA_def_property(srna, "target_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tarspace");
+ RNA_def_property_enum_items(prop, space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_target_space_itemf");
RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in.");
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index ed609c48e50..7fa27348002 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -40,11 +40,11 @@ static PointerRNA rna_Context_manager_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_WindowManager, CTX_wm_manager(C));
}
-/*static PointerRNA rna_Context_window_get(PointerRNA *ptr)
+static PointerRNA rna_Context_window_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Window, CTX_wm_window(C));
-}*/
+}
static PointerRNA rna_Context_screen_get(PointerRNA *ptr)
{
@@ -55,25 +55,33 @@ static PointerRNA rna_Context_screen_get(PointerRNA *ptr)
static PointerRNA rna_Context_area_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_Area, CTX_wm_area(C));
+ PointerRNA newptr;
+ RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Area, CTX_wm_area(C), &newptr);
+ return newptr;
}
static PointerRNA rna_Context_space_data_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_Space, CTX_wm_space_data(C));
+ PointerRNA newptr;
+ RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Space, CTX_wm_space_data(C), &newptr);
+ return newptr;
}
static PointerRNA rna_Context_region_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_Region, CTX_wm_region(C));
+ PointerRNA newptr;
+ RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Region, CTX_wm_region(C), &newptr);
+ return newptr;
}
/*static PointerRNA rna_Context_region_data_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_RegionData, CTX_wm_region_data(C));
+ PointerRNA newptr;
+ RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_RegionData, CTX_wm_region_data(C), &newptr);
+ return newptr;
}*/
static PointerRNA rna_Context_main_get(PointerRNA *ptr)
@@ -88,6 +96,12 @@ static PointerRNA rna_Context_scene_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_Scene, CTX_data_scene(C));
}
+static PointerRNA rna_Context_tool_settings_get(PointerRNA *ptr)
+{
+ bContext *C= (bContext*)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_ToolSettings, CTX_data_tool_settings(C));
+}
+
#else
void RNA_def_context(BlenderRNA *brna)
@@ -105,10 +119,10 @@ void RNA_def_context(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "WindowManager");
RNA_def_property_pointer_funcs(prop, "rna_Context_manager_get", NULL, NULL);
- /* prop= RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Window");
- RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL, NULL); */
+ RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL, NULL);
prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -145,6 +159,12 @@ void RNA_def_context(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_pointer_funcs(prop, "rna_Context_scene_get", NULL, NULL);
+
+ prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_struct_type(prop, "ToolSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Context_tool_settings_get", NULL, NULL);
+
}
#endif
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index df603e7920f..4d5ef7aa123 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -66,15 +66,15 @@ void RNA_def_controller(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem controller_type_items[] ={
- {CONT_LOGIC_AND, "LOGIC_AND", "Logic And", ""},
- {CONT_LOGIC_OR, "LOGIC_OR", "Logic Or", ""},
- {CONT_LOGIC_NAND, "LOGIC_NAND", "Logic Nand", ""},
- {CONT_LOGIC_NOR, "LOGIC_NOR", "Logic Nor", ""},
- {CONT_LOGIC_XOR, "LOGIC_XOR", "Logic Xor", ""},
- {CONT_LOGIC_XNOR, "LOGIC_XNOR", "Logic Xnor", ""},
- {CONT_EXPRESSION, "EXPRESSION", "Expression", ""},
- {CONT_PYTHON, "PYTHON", "Python Script", ""},
- {0, NULL, NULL, NULL}};
+ {CONT_LOGIC_AND, "LOGIC_AND", 0, "Logic And", ""},
+ {CONT_LOGIC_OR, "LOGIC_OR", 0, "Logic Or", ""},
+ {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Logic Nand", ""},
+ {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "Logic Nor", ""},
+ {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Logic Xor", ""},
+ {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Logic Xnor", ""},
+ {CONT_EXPRESSION, "EXPRESSION", 0, "Expression", ""},
+ {CONT_PYTHON, "PYTHON", 0, "Python Script", ""},
+ {0, NULL, 0, NULL, NULL}};
/* Controller */
srna= RNA_def_struct(brna, "Controller", NULL);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index aac9d75c6a6..faf6c3a1f75 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -31,20 +31,21 @@
#include "DNA_curve_types.h"
#include "DNA_material_types.h"
+#include "DNA_scene_types.h"
EnumPropertyItem beztriple_handle_type_items[] = {
- {HD_FREE, "FREE", "Free", ""},
- {HD_AUTO, "AUTO", "Auto", ""},
- {HD_VECT, "VECTOR", "Vector", ""},
- {HD_ALIGN, "ALIGNED", "Aligned", ""},
- {HD_AUTO_ANIM, "AUTO_CLAMPED", "Auto Clamped", ""},
- {0, NULL, NULL, NULL}};
+ {HD_FREE, "FREE", 0, "Free", ""},
+ {HD_AUTO, "AUTO", 0, "Auto", ""},
+ {HD_VECT, "VECTOR", 0, "Vector", ""},
+ {HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
+ {HD_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped", ""},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem beztriple_interpolation_mode_items[] = {
- {BEZT_IPO_CONST, "CONSTANT", "Constant", ""},
- {BEZT_IPO_LIN, "LINEAR", "Linear", ""},
- {BEZT_IPO_BEZ, "BEZIER", "Bezier", ""},
- {0, NULL, NULL, NULL}};
+ {BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""},
+ {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
+ {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -138,7 +139,7 @@ static int rna_Nurb_length(PointerRNA *ptr)
static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Nurb *nu= (Nurb*)ptr->data;
- rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint*), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, NULL);
+ rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint*), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, 0, NULL);
}
#else
@@ -307,12 +308,12 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_align_items[] = {
- {CU_LEFT, "LEFT", "Left", "Align text to the left"},
- {CU_MIDDLE, "CENTRAL", "Center", "Center text"},
- {CU_RIGHT, "RIGHT", "Right", "Align text to the right"},
- {CU_JUSTIFY, "JUSTIFY", "Justify", "Align to the left and the right"},
- {CU_FLUSH, "FLUSH", "Flush", "Align to the left and the right, with equal character spacing"},
- {0, NULL, NULL, NULL}};
+ {CU_LEFT, "LEFT", 0, "Left", "Align text to the left"},
+ {CU_MIDDLE, "CENTRAL", 0, "Center", "Center text"},
+ {CU_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
+ {CU_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"},
+ {CU_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"},
+ {0, NULL, 0, NULL, NULL}};
/* Enums */
prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE);
@@ -558,6 +559,11 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property.");
+
+ prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ctime");
+ RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at.");
+
/* pointers */
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
@@ -590,11 +596,11 @@ static void rna_def_curve(BlenderRNA *brna)
static void rna_def_curve_nurb(BlenderRNA *brna)
{
static EnumPropertyItem spline_interpolation_items[] = {
- {BEZT_IPO_CONST, "LINEAR", "Linear", ""},
- {BEZT_IPO_LIN, "CARDINAL", "Cardinal", ""},
- {BEZT_IPO_BEZ, "BSPLINE", "BSpline", ""},
- {BEZT_IPO_BEZ, "EASE", "Ease", ""},
- {0, NULL, NULL, NULL}};
+ {BEZT_IPO_CONST, "LINEAR", 0, "Linear", ""},
+ {BEZT_IPO_LIN, "CARDINAL", 0, "Cardinal", ""},
+ {BEZT_IPO_BEZ, "BSPLINE", 0, "BSpline", ""},
+ {BEZT_IPO_BEZ, "EASE", 0, "Ease", ""},
+ {0, NULL, 0, NULL, NULL}};
StructRNA *srna;
PropertyRNA *prop;
@@ -605,7 +611,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
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);
+ 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 for Poly and Nurbs curves.");
prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
@@ -695,7 +701,6 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
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_range(prop, 0, MAXMAT-1);
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_material_index_range");
prop= RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 33d94e800d1..07515d3ad56 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -38,6 +38,8 @@
#include "RNA_define.h"
#include "RNA_types.h"
+#include "BLI_ghash.h"
+
#include "rna_internal.h"
/* Global used during defining */
@@ -110,7 +112,7 @@ StructDefRNA *rna_find_struct_def(StructRNA *srna)
return NULL;
}
-PropertyDefRNA *rna_find_struct_property_def(PropertyRNA *prop)
+PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
{
StructDefRNA *dsrna;
PropertyDefRNA *dprop;
@@ -121,7 +123,7 @@ PropertyDefRNA *rna_find_struct_property_def(PropertyRNA *prop)
return NULL;
}
- dsrna= rna_find_struct_def(DefRNA.laststruct);
+ dsrna= rna_find_struct_def(srna);
dprop= dsrna->cont.properties.last;
for (; dprop; dprop= dprop->prev)
if (dprop->prop==prop)
@@ -148,7 +150,7 @@ PropertyDefRNA *rna_find_property_def(PropertyRNA *prop)
return NULL;
}
- dprop= rna_find_struct_property_def(prop);
+ dprop= rna_find_struct_property_def(DefRNA.laststruct, prop);
if (dprop)
return dprop;
@@ -557,6 +559,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
/* copy from struct to derive stuff, a bit clumsy since we can't
* use MEM_dupallocN, data structs may not be alloced but builtin */
memcpy(srna, srnafrom, sizeof(StructRNA));
+ srna->cont.prophash= NULL;
srna->cont.properties.first= srna->cont.properties.last= NULL;
srna->functions.first= srna->functions.last= NULL;
srna->py_type= NULL;
@@ -604,7 +607,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
if(DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, "rna_builtin_properties_lookup_string", 0, 0);
}
else {
#ifdef RNA_RUNTIME
@@ -923,8 +926,13 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
break;
}
}
- else
+ else {
prop->flag |= PROP_IDPROPERTY|PROP_RUNTIME;
+#ifdef RNA_RUNTIME
+ if(cont->prophash)
+ BLI_ghash_insert(cont->prophash, (void*)prop->identifier, prop);
+#endif
+ }
rna_addtail(&cont->properties, prop);
@@ -976,6 +984,13 @@ void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *d
prop->description= description;
}
+void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
+{
+ prop->icon= icon;
+ if(consecutive)
+ prop->flag |= PROP_ICONS_CONSECUTIVE;
+}
+
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
{
StructRNA *srna= DefRNA.laststruct;
@@ -1097,12 +1112,12 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
switch(prop->type) {
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->item= item;
+ eprop->item= (EnumPropertyItem*)item;
eprop->totitem= 0;
for(i=0; item[i].identifier; i++) {
eprop->totitem++;
- if(item[i].value == eprop->defaultvalue)
+ if(item[i].identifier[0] && item[i].value == eprop->defaultvalue)
defaultfound= 1;
}
@@ -1265,7 +1280,7 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
eprop->defaultvalue= value;
for(i=0; i<eprop->totitem; i++) {
- if(eprop->item[i].value == eprop->defaultvalue)
+ if(eprop->item[i].identifier[0] && eprop->item[i].value == eprop->defaultvalue)
defaultfound= 1;
}
@@ -1296,7 +1311,7 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
StructDefRNA *ds;
PropertyDefRNA *dp;
- dp= rna_find_struct_property_def(prop);
+ dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
if (dp==NULL) return NULL;
ds= rna_find_struct_def((StructRNA*)dp->cont);
@@ -1356,7 +1371,7 @@ void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *struc
RNA_def_property_boolean_sdna(prop, structname, propname, booleanbit);
- dp= rna_find_struct_property_def(prop);
+ dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
if(dp)
dp->booleannegative= 1;
@@ -1453,7 +1468,7 @@ void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structnam
RNA_def_property_enum_sdna(prop, structname, propname);
- dp= rna_find_struct_property_def(prop);
+ dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
if(dp)
dp->enumbitflags= 1;
@@ -1769,7 +1784,7 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
}
}
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring)
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *add, const char *remove)
{
StructRNA *srna= DefRNA.laststruct;
@@ -1789,6 +1804,8 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
if(length) cprop->length= (PropCollectionLengthFunc)length;
if(lookupint) cprop->lookupint= (PropCollectionLookupIntFunc)lookupint;
if(lookupstring) cprop->lookupstring= (PropCollectionLookupStringFunc)lookupstring;
+ if(add) cprop->add= (FunctionRNA*)add;
+ if(remove) cprop->remove= (FunctionRNA*)remove;
break;
}
default:
@@ -1929,7 +1946,7 @@ PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *ide
return prop;
}
-PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, EnumPropertyItem *items, int default_value,
+PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value,
const char *ui_name, const char *ui_description)
{
ContainerRNA *cont= cont_;
@@ -1943,6 +1960,12 @@ PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, En
return prop;
}
+void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
+{
+ EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ eprop->itemf= 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)
{
@@ -2219,22 +2242,19 @@ int rna_parameter_size(PropertyRNA *parm)
case PROP_STRING:
return sizeof(char *);
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)parm;
-
#ifdef RNA_RUNTIME
- if(pprop->type == &RNA_AnyType)
+ if(parm->flag & PROP_RNAPTR)
return sizeof(PointerRNA);
else
return sizeof(void *);
#else
- if(strcmp((char*)pprop->type, "AnyType") == 0)
+ if(parm->flag & PROP_RNAPTR)
return sizeof(PointerRNA);
else
return sizeof(void *);
#endif
}
case PROP_COLLECTION:
- /* XXX does not work yet */
return sizeof(ListBase);
}
}
@@ -2242,3 +2262,37 @@ int rna_parameter_size(PropertyRNA *parm)
return sizeof(void *);
}
+/* Dynamic Enums */
+
+void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
+{
+ EnumPropertyItem *newitems;
+ int tot= *totitem;
+
+ if(tot == 0) {
+ *items= MEM_callocN(sizeof(EnumPropertyItem)*8, "RNA_enum_items_add");
+ }
+ else if(tot >= 8 && (tot&(tot-1)) == 0){
+ /* power of two > 8 */
+ newitems= MEM_callocN(sizeof(EnumPropertyItem)*tot*2, "RNA_enum_items_add");
+ memcpy(newitems, *items, sizeof(EnumPropertyItem)*tot);
+ MEM_freeN(*items);
+ *items= newitems;
+ }
+
+ (*items)[tot]= *item;
+ *totitem= tot+1;
+}
+
+void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
+{
+ for(; item->identifier; item++)
+ RNA_enum_item_add(items, totitem, item);
+}
+
+void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
+{
+ static EnumPropertyItem empty = {0, NULL, 0, NULL, NULL};
+ RNA_enum_item_add(items, totitem, &empty);
+}
+
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index ea26118f267..95a0482557f 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -35,74 +35,19 @@
#include "MEM_guardedalloc.h"
EnumPropertyItem fmodifier_type_items[] = {
- {FMODIFIER_TYPE_NULL, "NULL", "Invalid", ""},
- {FMODIFIER_TYPE_GENERATOR, "GENERATOR", "Generator", ""},
- {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", "Envelope", ""},
- {FMODIFIER_TYPE_CYCLES, "CYCLES", "Cycles", ""},
- {FMODIFIER_TYPE_NOISE, "NOISE", "Noise", ""},
- {FMODIFIER_TYPE_FILTER, "FILTER", "Filter", ""},
- {FMODIFIER_TYPE_PYTHON, "PYTHON", "Python", ""},
- {FMODIFIER_TYPE_LIMITS, "LIMITS", "Limits", ""},
- {0, NULL, NULL, NULL}};
+ {FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""},
+ {FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", ""},
+ {FMODIFIER_TYPE_FN_GENERATOR, "FNGENERATOR", 0, "Built-In Function", ""},
+ {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", 0, "Envelope", ""},
+ {FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", ""},
+ {FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", ""},
+ {FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},
+ {FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""},
+ {FMODIFIER_TYPE_LIMITS, "LIMITS", 0, "Limits", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
-float FModGenFunc_amplitude_get(PointerRNA *ptr)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- return (data->coefficients) ? (float)data->coefficients[0] : 1.0f;
-}
-
-void FModGenFunc_amplitude_set(PointerRNA *ptr, float value)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- if (data->coefficients) data->coefficients[0]= value;
-}
-
-float FModGenFunc_pre_multiplier_get(PointerRNA *ptr)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- return (data->coefficients) ? (float)data->coefficients[1] : 1.0f;
-}
-
-void FModGenFunc_pre_multiplier_set(PointerRNA *ptr, float value)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- if (data->coefficients) data->coefficients[1]= value;
-}
-
-float FModGenFunc_x_offset_get(PointerRNA *ptr)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- return (data->coefficients) ? (float)data->coefficients[2] : 0.0f;
-}
-
-void FModGenFunc_x_offset_set(PointerRNA *ptr, float value)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- if (data->coefficients) data->coefficients[2]= value;
-}
-
-float FModGenFunc_y_offset_get(PointerRNA *ptr)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- return (data->coefficients) ? (float)data->coefficients[3] : 0.0f;
-}
-
-void FModGenFunc_y_offset_set(PointerRNA *ptr, float value)
-{
- FModifier *fcm = (FModifier *)(ptr->data);
- FMod_Generator *data= (FMod_Generator*)(fcm->data);
- if (data->coefficients) data->coefficients[3]= value;
-}
-
/* --------- */
StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
@@ -111,20 +56,9 @@ StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
switch (fcm->type) {
case FMODIFIER_TYPE_GENERATOR:
- {
- FMod_Generator *gen= (FMod_Generator *)fcm->data;
-
- switch (gen->mode) {
- case FCM_GENERATOR_POLYNOMIAL:
- return &RNA_FModifierGenerator_PolyExpanded;
- //case FCM_GENERATOR_POLYNOMIAL_FACTORISED:
- case FCM_GENERATOR_FUNCTION:
- return &RNA_FModifierGenerator_Function;
- //case FCM_GENERATOR_EXPRESSION:
- default:
- return &RNA_FModifierGenerator;
- }
- }
+ return &RNA_FModifierGenerator;
+ case FMODIFIER_TYPE_FN_GENERATOR:
+ return &RNA_FModifierFunctionGenerator;
case FMODIFIER_TYPE_ENVELOPE:
return &RNA_FModifierEnvelope;
case FMODIFIER_TYPE_CYCLES:
@@ -215,21 +149,22 @@ static void rna_FCurve_RnaPath_set(PointerRNA *ptr, const char *value)
#else
-static void rna_def_fmodifier_generator_common(StructRNA *srna)
+
+static void rna_def_fmodifier_generator(BlenderRNA *brna)
{
+ StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {FCM_GENERATOR_POLYNOMIAL, "POLYNOMIAL", "Expanded Polynomial", ""},
- {FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", "Factorised Polynomial", ""},
- {FCM_GENERATOR_FUNCTION, "FUNCTION", "Built-In Function", ""},
- {FCM_GENERATOR_EXPRESSION, "EXPRESSION", "Expression", ""},
- {0, NULL, NULL, NULL}};
-
- /* struct wrapping settings */
- RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
+ {FCM_GENERATOR_POLYNOMIAL, "POLYNOMIAL", 0, "Expanded Polynomial", ""},
+ {FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", 0, "Factorised Polynomial", ""},
+ {0, NULL, 0, NULL, NULL}};
- /* settings */
+ srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
+ RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve.");
+ RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
+
+ /* define common props */
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.");
@@ -238,94 +173,122 @@ static void rna_def_fmodifier_generator_common(StructRNA *srna)
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.");
-}
-
-/* this is a temporary dummy generator-modifier wrapping (to be discarded) */
-static void rna_def_fmodifier_generator(BlenderRNA *brna)
-{
- StructRNA *srna;
- srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve.");
-
- /* define common props */
- rna_def_fmodifier_generator_common(srna);
-}
-
-static void rna_def_fmodifier_generator_polyexpanded(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "FModifierGenerator_PolyExpanded", "FModifier");
- RNA_def_struct_ui_text(srna, "Expanded Polynomial Generator", "Generates values for the modified F-Curve using expanded polynomial expresion.");
-
- /* define common props */
- rna_def_fmodifier_generator_common(srna);
/* 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. (i.e. the number of coefficients - 1)");
+ RNA_def_property_ui_text(prop, "Polynomial Order", "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
/* coefficients array */
- //prop= RNA_def_property(srna, "coefficients", PROP_FLOAT, PROP_NONE);
- //RNA_def_property_ui_text(prop, "Coefficients", "Coefficients for 'x' (starting from lowest power).");
+ // FIXME: this is quite difficult to try to wrap
+ //prop= RNA_def_property(srna, "coefficients", PROP_COLLECTION, PROP_NONE);
+ //RNA_def_property_collection_funcs(prop, "rna_FModifierGenerator_coefficients_begin", "rna_FModifierGenerator_coefficients_next", "rna_FModifierGenerator_coefficients_end", "rna_iterator_array_get", "rna_FModifierGenerator_coefficients_length", 0, 0, 0, 0);
+ //RNA_def_property_ui_text(prop, "Coefficients", "Coefficients for 'x' (starting from lowest power of x^0).");
}
-static void rna_def_fmodifier_generator_function(BlenderRNA *brna)
+/* --------- */
+
+static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {0, "SIN", "Sine", ""},
- {1, "COS", "Cosine", ""},
- {2, "TAN", "Tangent", ""},
- {3, "SQRT", "Square Root", ""},
- {4, "LN", "Natural Logarithm", ""},
- {0, NULL, NULL, NULL}};
-
-
- srna= RNA_def_struct(brna, "FModifierGenerator_Function", "FModifier");
- RNA_def_struct_ui_text(srna, "Built-In Function Generator", "Generates values for modified F-Curve using Built-In Function.");
-
- /* common settings */
- rna_def_fmodifier_generator_common(srna);
-
- /* type */
- prop= RNA_def_property(srna, "func_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of Built-In function to use as generator.");
+ {0, "SIN", 0, "Sine", ""},
+ {1, "COS", 0, "Cosine", ""},
+ {2, "TAN", 0, "Tangent", ""},
+ {3, "SQRT", 0, "Square Root", ""},
+ {4, "LN", 0, "Natural Logarithm", ""},
+ {5, "SINC", 0, "Normalised Sine", "sin(x) / x"},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
+ RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function.");
+ RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data");
/* coefficients */
prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "FModGenFunc_amplitude_get", "FModGenFunc_amplitude_set", NULL);
- RNA_def_property_ui_text(prop, "Amplitude", "Scale factor for y-values generated by the function.");
+ RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values.");
- prop= RNA_def_property(srna, "pre_multiplier", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "FModGenFunc_pre_multiplier_get", "FModGenFunc_pre_multiplier_set", NULL);
- RNA_def_property_ui_text(prop, "PreMultiplier", "Scale factor for x-value inputs to function.");
+ 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.");
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "FModGenFunc_x_offset_get", "FModGenFunc_x_offset_set", NULL);
- RNA_def_property_ui_text(prop, "X Offset", "Offset for x-value inputs to function.");
+ 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.");
+
+ 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.");
+
+ /* 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.");
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "FModGenFunc_y_offset_get", "FModGenFunc_y_offset_set", NULL);
- RNA_def_property_ui_text(prop, "Y Offset", "Offset for y-values generated by the function.");
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Type", "Type of built-in function to use.");
}
/* --------- */
+static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "FModifierEnvelopeControlPoint", NULL);
+ RNA_def_struct_ui_text(srna, "Envelope Control Point", "Control point for envelope F-Modifier.");
+ RNA_def_struct_sdna(srna, "FCM_EnvelopeData");
+
+ /* min/max extents
+ * - for now, these are allowed to go past each other, so that we can have inverted action
+ * - technically, the range is limited by the settings in the envelope-modifier data, not here...
+ */
+ 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.");
+
+ 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.");
+
+ /* Frame */
+ prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "time");
+ RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on.");
+
+ // TODO:
+ // - selection flags (not implemented in UI yet though)
+}
+
static void rna_def_fmodifier_envelope(BlenderRNA *brna)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
- RNA_def_struct_ui_text(srna, "Envelope F-Curve Modifier", "Scales the values of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scales the values of the modified F-Curve.");
RNA_def_struct_sdna_from(srna, "FMod_Envelope", "data");
+
+ /* Collections */
+ prop= RNA_def_property(srna, "control_points", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "data", "totvert");
+ RNA_def_property_struct_type(prop, "FModifierEnvelopeControlPoint");
+ RNA_def_property_ui_text(prop, "Control Points", "Control points defining the shape of the envelope.");
+
+ /* Range Settings */
+ 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.");
+
+ 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.");
+
+ 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.");
}
/* --------- */
@@ -336,14 +299,14 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {FCM_EXTRAPOLATE_NONE, "NONE", "No Cycles", "Don't do anything."},
- {FCM_EXTRAPOLATE_CYCLIC, "REPEAT", "Repeat Motion", "Repeat keyframe range as-is."},
- {FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", "Repeat with Offset", "Repeat keyframe range, but with offset based on gradient between values"},
- {FCM_EXTRAPOLATE_MIRROR, "MIRROR", "Repeat Mirrored", "Alternate between forward and reverse playback of keyframe range"},
- {0, NULL, NULL, NULL}};
+ {FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything."},
+ {FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is."},
+ {FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset", "Repeat keyframe range, but with offset based on gradient between values"},
+ {FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored", "Alternate between forward and reverse playback of keyframe range"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
- RNA_def_struct_ui_text(srna, "Cycles F-Curve Modifier", "Repeats the values of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeats the values of the modified F-Curve.");
RNA_def_struct_sdna_from(srna, "FMod_Cycles", "data");
/* before */
@@ -372,7 +335,7 @@ static void rna_def_fmodifier_python(BlenderRNA *brna)
//PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierPython", "FModifier");
- RNA_def_struct_ui_text(srna, "Python F-Curve Modifier", "Performs user-defined operation on the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Python F-Modifier", "Performs user-defined operation on the modified F-Curve.");
RNA_def_struct_sdna_from(srna, "FMod_Python", "data");
}
@@ -384,7 +347,7 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierLimits", "FModifier");
- RNA_def_struct_ui_text(srna, "Limits F-Curve Modifier", "Limits the time/value ranges of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Limits F-Modifier", "Limits the time/value ranges of the modified F-Curve.");
RNA_def_struct_sdna_from(srna, "FMod_Limits", "data");
prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
@@ -428,14 +391,14 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_modification_items[] = {
- {FCM_NOISE_MODIF_REPLACE, "REPLACE", "Replace", ""},
- {FCM_NOISE_MODIF_ADD, "ADD", "Add", ""},
- {FCM_NOISE_MODIF_SUBTRACT, "SUBTRACT", "Subtract", ""},
- {FCM_NOISE_MODIF_MULTIPLY, "MULTIPLY", "Multiply", ""},
- {0, NULL, NULL, NULL}};
+ {FCM_NOISE_MODIF_REPLACE, "REPLACE", 0, "Replace", ""},
+ {FCM_NOISE_MODIF_ADD, "ADD", 0, "Add", ""},
+ {FCM_NOISE_MODIF_SUBTRACT, "SUBTRACT", 0, "Subtract", ""},
+ {FCM_NOISE_MODIF_MULTIPLY, "MULTIPLY", 0, "Multiply", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierNoise", "FModifier");
- RNA_def_struct_ui_text(srna, "Noise F-Curve Modifier", "Gives randomness to the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Gives randomness to the modified F-Curve.");
RNA_def_struct_sdna_from(srna, "FMod_Noise", "data");
prop= RNA_def_property(srna, "modification", PROP_ENUM, PROP_NONE);
@@ -471,7 +434,7 @@ void rna_def_fmodifier(BlenderRNA *brna)
/* base struct definition */
srna= RNA_def_struct(brna, "FModifier", NULL);
RNA_def_struct_refine_func(srna, "rna_FModifierType_refine");
- RNA_def_struct_ui_text(srna, "FCurve Modifier", "Modifier for values of F-Curve.");
+ RNA_def_struct_ui_text(srna, "F-Modifier", "Modifier for values of F-Curve.");
#if 0 // XXX not used yet
/* name */
@@ -542,10 +505,10 @@ void rna_def_channeldriver(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {DRIVER_TYPE_AVERAGE, "AVERAGE", "Averaged Value", ""},
- {DRIVER_TYPE_PYTHON, "SCRIPTED", "Scripted Expression", ""},
- {DRIVER_TYPE_ROTDIFF, "ROTDIFF", "Rotational Difference", ""},
- {0, NULL, NULL, NULL}};
+ {DRIVER_TYPE_AVERAGE, "AVERAGE", 0, "Averaged Value", ""},
+ {DRIVER_TYPE_PYTHON, "SCRIPTED", 0, "Scripted Expression", ""},
+ {DRIVER_TYPE_ROTDIFF, "ROTDIFF", 0, "Rotational Difference", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Driver", NULL);
RNA_def_struct_sdna(srna, "ChannelDriver");
@@ -569,20 +532,41 @@ void rna_def_channeldriver(BlenderRNA *brna)
/* *********************** */
+static void rna_def_fpoint(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "FCurveSample", NULL);
+ RNA_def_struct_sdna(srna, "FPoint");
+ RNA_def_struct_ui_text(srna, "F-Curve Sample", "Sample point for F-Curve.");
+
+ /* Boolean values */
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
+ RNA_def_property_ui_text(prop, "Selected", "Selection status");
+
+ /* Vector value */
+ prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_float_sdna(prop, NULL, "vec");
+ RNA_def_property_ui_text(prop, "Point", "Point coordinates");
+}
+
void rna_def_fcurve(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_mode_extend_items[] = {
- {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", "Constant", ""},
- {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", "Linear", ""},
- {0, NULL, NULL, NULL}};
+ {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant", ""},
+ {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_mode_color_items[] = {
- {FCURVE_COLOR_AUTO_RAINBOW, "AUTO_RAINBOW", "Automatic Rainbow", ""},
- {FCURVE_COLOR_AUTO_RGB, "AUTO_RGB", "Automatic XYZ to RGB", ""},
- {FCURVE_COLOR_CUSTOM, "CUSTOM", "User Defined", ""},
- {0, NULL, NULL, NULL}};
+ {FCURVE_COLOR_AUTO_RAINBOW, "AUTO_RAINBOW", 0, "Automatic Rainbow", ""},
+ {FCURVE_COLOR_AUTO_RGB, "AUTO_RGB", 0, "Automatic XYZ to RGB", ""},
+ {FCURVE_COLOR_CUSTOM, "CUSTOM", 0, "User Defined", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FCurve", NULL);
RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time.");
@@ -619,7 +603,7 @@ void rna_def_fcurve(BlenderRNA *brna)
/* Collections */
prop= RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fpt", "totvert");
- RNA_def_property_struct_type(prop, "CurvePoint"); // XXX FPoints not BPoints here! FPoints are much smaller!
+ RNA_def_property_struct_type(prop, "FCurveSample");
RNA_def_property_ui_text(prop, "Sampled Points", "Sampled animation data");
prop= RNA_def_property(srna, "keyframe_points", PROP_COLLECTION, PROP_NONE);
@@ -637,6 +621,7 @@ void rna_def_fcurve(BlenderRNA *brna)
void RNA_def_fcurve(BlenderRNA *brna)
{
rna_def_fcurve(brna);
+ rna_def_fpoint(brna);
rna_def_drivertarget(brna);
rna_def_channeldriver(brna);
@@ -644,9 +629,9 @@ void RNA_def_fcurve(BlenderRNA *brna)
rna_def_fmodifier(brna);
rna_def_fmodifier_generator(brna);
- rna_def_fmodifier_generator_polyexpanded(brna);
- rna_def_fmodifier_generator_function(brna);
+ rna_def_fmodifier_function_generator(brna);
rna_def_fmodifier_envelope(brna);
+ rna_def_fmodifier_envelope_ctrl(brna);
rna_def_fmodifier_cycles(brna);
rna_def_fmodifier_python(brna);
rna_def_fmodifier_limits(brna);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 210024f0859..44a50fbae25 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -31,8 +31,23 @@
#include "DNA_object_fluidsim.h"
+#include "WM_api.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
+#include "MEM_guardedalloc.h"
+
+#include "DNA_scene_types.h"
+#include "DNA_particle_types.h"
+
+#include "BKE_depsgraph.h"
+#include "BKE_fluidsim.h"
+#include "BKE_main.h"
+#include "BKE_modifier.h"
+#include "BKE_particle.h"
+#include "BKE_pointcache.h"
+
static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
{
FluidsimSettings *fss= (FluidsimSettings*)ptr->data;
@@ -57,6 +72,79 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
}
}
+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;
+ ParticleSystem *psys;
+ ParticleSettings *part;
+
+ fluidmd= (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim);
+ fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; // clear flag
+
+ /* remove fluidsim particle system */
+ if(fluidmd->fss->type & OB_FLUIDSIM_PARTICLE) {
+ for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ if(psys->part->type == PART_FLUID)
+ break;
+
+ if(ob->type == OB_MESH && !psys) {
+ /* add particle system */
+ part= psys_new_settings("PSys", bmain);
+ psys= MEM_callocN(sizeof(ParticleSystem), "particle_system");
+
+ part->type= PART_FLUID;
+ psys->part= part;
+ psys->pointcache= BKE_ptcache_add();
+ psys->flag |= PSYS_ENABLED;
+ BLI_addtail(&ob->particlesystem,psys);
+
+ /* add modifier */
+ psmd= (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
+ sprintf(psmd->modifier.name, "FluidParticleSystem" );
+ psmd->psys= psys;
+ BLI_addtail(&ob->modifiers, psmd);
+ }
+ }
+ else {
+ for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ if(psys->part->type == PART_FLUID) {
+ /* clear modifier */
+ psmd= psys_get_modifier(ob, psys);
+ BLI_remlink(&ob->modifiers, psmd);
+ modifier_free((ModifierData *)psmd);
+
+ /* clear particle system */
+ BLI_remlink(&ob->particlesystem, psys);
+ psys_free(ob, psys);
+ }
+ }
+ }
+
+ 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)
+{
+#ifdef DISABLE_ELBEEM
+ value[0]= '\0';
+#else
+ Object *ob= (Object*)ptr->id.data;
+ FluidsimSettings *fss= (FluidsimSettings*)ptr->data;
+
+ fluid_estimate_memory(ob, fss, value);
+#endif
+}
+
+static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *ptr)
+{
+ return 32;
+}
+
#else
static void rna_def_fluidsim_slip(StructRNA *srna)
@@ -64,10 +152,10 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem slip_items[] = {
- {OB_FSBND_NOSLIP, "NOSLIP", "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects."},
- {OB_FSBND_PARTSLIP, "PARTIALSLIP", "Partial Slip", "Mix between no-slip and free-slip. Non moving objects only!"},
- {OB_FSBND_FREESLIP, "FREESLIP", "Free Slip", "Obstacle only causes zero normal velocity (=not sticky). Non moving objects only!"},
- {0, NULL, NULL, NULL}};
+ {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects."},
+ {OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip. Non moving objects only!"},
+ {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky). Non moving objects only!"},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "typeFlags");
@@ -86,17 +174,17 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem quality_items[] = {
- {OB_FSDOM_GEOM, "GEOMETRY", "Geometry", "Display geometry."},
- {OB_FSDOM_PREVIEW, "PREVIEW", "Preview", "Display preview quality results."},
- {OB_FSDOM_FINAL, "FINAL", "Final", "Display final quality results."},
- {0, NULL, NULL, NULL}};
+ {OB_FSDOM_GEOM, "GEOMETRY", 0, "Geometry", "Display geometry."},
+ {OB_FSDOM_PREVIEW, "PREVIEW", 0, "Preview", "Display preview quality results."},
+ {OB_FSDOM_FINAL, "FINAL", 0, "Final", "Display final quality results."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem viscosity_items[] = {
- {1, "MANUAL", "Manual", "Manual viscosity settings."},
- {2, "WATER", "Water", "Viscosity of 1.0 * 10^-6."},
- {3, "OIL", "Oil", "Viscosity of 5.0 * 10^-5."},
- {4, "HONEY", "Honey", "Viscosity of 2.0 * 10^-3."},
- {0, NULL, NULL, NULL}};
+ {1, "MANUAL", 0, "Manual", "Manual viscosity settings."},
+ {2, "WATER", 0, "Water", "Viscosity of 1.0 * 10^-6."},
+ {3, "OIL", 0, "Oil", "Viscosity of 5.0 * 10^-5."},
+ {4, "HONEY", 0, "Honey", "Viscosity of 2.0 * 10^-3."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
@@ -128,6 +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, 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");
@@ -142,6 +231,12 @@ 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, 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);
+ RNA_def_property_string_funcs(prop, "rna_DomainFluidSettings_memory_estimate_get", "rna_DomainFluidSettings_memory_estimate_length", NULL);
+ RNA_def_property_ui_text(prop, "Memory Estimate", "Estimated amount of memory needed for baking the domain.");
/* advanced settings */
@@ -217,10 +312,10 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem volume_type_items[] = {
- {1, "VOLUME", "Volume", "Use only the inner volume of the mesh."},
- {2, "SHELL", "Shell", "Use only the outer shell of the mesh."},
- {3, "BOTH", "Both", "Use both the inner volume and the outer shell of the mesh."},
- {0, NULL, NULL, NULL}};
+ {1, "VOLUME", 0, "Volume", "Use only the inner volume of the mesh."},
+ {2, "SHELL", 0, "Shell", "Use only the outer shell of the mesh."},
+ {3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh."},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "volumeInitType");
@@ -336,6 +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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
static void rna_def_fluidsim_control(BlenderRNA *brna)
@@ -393,15 +489,15 @@ void RNA_def_fluidsim(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_fluid_type_items[] = {
- {0, "NONE", "None", ""},
- {OB_FLUIDSIM_DOMAIN, "DOMAIN", "Domain", "Bounding box of this object represents the computational domain of the fluid simulation."},
- {OB_FLUIDSIM_FLUID, "FLUID", "Fluid", "Object represents a volume of fluid in the simulation."},
- {OB_FLUIDSIM_OBSTACLE, "OBSTACLE", "Obstacle", "Object is a fixed obstacle."},
- {OB_FLUIDSIM_INFLOW, "INFLOW", "Inflow", "Object adds fluid to the simulation."},
- {OB_FLUIDSIM_OUTFLOW, "OUTFLOW", "Outflow", "Object removes fluid from the simulation."},
- {OB_FLUIDSIM_PARTICLE, "PARTICLE", "Particle", "Object is made a particle system to display particles generated by a fluidsim domain object."},
- {OB_FLUIDSIM_CONTROL, "CONTROL", "Control", "Object is made a fluid control mesh, which influences the fluid."},
- {0, NULL, NULL, NULL}};
+ {OB_FLUIDSIM_ENABLE, "NONE", 0, "None", ""},
+ {OB_FLUIDSIM_DOMAIN, "DOMAIN", 0, "Domain", "Bounding box of this object represents the computational domain of the fluid simulation."},
+ {OB_FLUIDSIM_FLUID, "FLUID", 0, "Fluid", "Object represents a volume of fluid in the simulation."},
+ {OB_FLUIDSIM_OBSTACLE, "OBSTACLE", 0, "Obstacle", "Object is a fixed obstacle."},
+ {OB_FLUIDSIM_INFLOW, "INFLOW", 0, "Inflow", "Object adds fluid to the simulation."},
+ {OB_FLUIDSIM_OUTFLOW, "OUTFLOW", 0, "Outflow", "Object removes fluid from the simulation."},
+ {OB_FLUIDSIM_PARTICLE, "PARTICLE", 0, "Particle", "Object is made a particle system to display particles generated by a fluidsim domain object."},
+ {OB_FLUIDSIM_CONTROL, "CONTROL", 0, "Control", "Object is made a fluid control mesh, which influences the fluid."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FluidSettings", NULL);
@@ -409,18 +505,11 @@ void RNA_def_fluidsim(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine");
RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation.");
- /* enable and type */
-
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "type", OB_FLUIDSIM_ENABLE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // needs to create modifier
- RNA_def_property_ui_text(prop, "Enabled", "Sets object to participate in fluid simulation.");
-
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_fluid_type_items);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // needs to update variables
RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation.");
+ RNA_def_property_update(prop, 0, "rna_FluidSettings_update_type");
//prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
//RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by fluid simulation settings.");
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 059b2ce78f7..1406ad1ae60 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -61,7 +61,7 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "gobject", NULL);
RNA_def_property_struct_type(prop, "Object");
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);
+ 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_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 8620a933d61..c74e46c17da 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -32,10 +32,40 @@
#include "DNA_image_types.h"
#include "DNA_scene_types.h"
+#include "BKE_context.h"
#include "BKE_image.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
+#include "IMB_imbuf_types.h"
+
+static void rna_Image_animated_update(bContext *C, PointerRNA *ptr)
+{
+ Image *ima= (Image*)ptr->data;
+ int nr;
+
+ if(ima->flag & IMA_TWINANIM) {
+ nr= ima->xrep*ima->yrep;
+ if(ima->twsta>=nr) ima->twsta= 1;
+ if(ima->twend>=nr) ima->twend= nr-1;
+ if(ima->twsta>ima->twend) ima->twsta= 1;
+ }
+}
+
+static int rna_Image_dirty_get(PointerRNA *ptr)
+{
+ Image *ima= (Image*)ptr->data;
+ ImBuf *ibuf;
+
+ for(ibuf=ima->ibufs.first; ibuf; ibuf=ibuf->next)
+ if(ibuf->userflags & IB_BITMAPDIRTY)
+ return 1;
+
+ return 0;
+}
+
#else
static void rna_def_imageuser(BlenderRNA *brna)
@@ -89,27 +119,27 @@ static void rna_def_image(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static const EnumPropertyItem prop_type_items[]= {
- {IMA_TYPE_IMAGE, "IMAGE", "Image", ""},
- {IMA_TYPE_MULTILAYER, "MULTILAYER", "Multilayer", ""},
- {IMA_TYPE_UV_TEST, "UVTEST", "UV Test", ""},
- {IMA_TYPE_R_RESULT, "RENDERRESULT", "Render Result", ""},
- {IMA_TYPE_COMPOSITE, "COMPOSITING", "Compositing", ""},
- {0, NULL, NULL, NULL}};
+ {IMA_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
+ {IMA_TYPE_MULTILAYER, "MULTILAYER", 0, "Multilayer", ""},
+ {IMA_TYPE_UV_TEST, "UVTEST", 0, "UV Test", ""},
+ {IMA_TYPE_R_RESULT, "RENDERRESULT", 0, "Render Result", ""},
+ {IMA_TYPE_COMPOSITE, "COMPOSITING", 0, "Compositing", ""},
+ {0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_source_items[]= {
- {IMA_SRC_FILE, "FILE", "File", "Single image file"},
- {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", "Multiple image files, as a sequence"},
- {IMA_SRC_MOVIE, "MOVIE", "Movie", "Movie file"},
- {IMA_SRC_GENERATED, "GENERATED", "Generated", "Generated image"},
- {IMA_SRC_VIEWER, "VIEWER", "Viewer", "Compositing node viewer"},
- {0, NULL, NULL, NULL}};
+ {IMA_SRC_FILE, "FILE", 0, "File", "Single image file"},
+ {IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Sequence", "Multiple image files, as a sequence"},
+ {IMA_SRC_MOVIE, "MOVIE", 0, "Movie", "Movie file"},
+ {IMA_SRC_GENERATED, "GENERATED", 0, "Generated", "Generated image"},
+ {IMA_SRC_VIEWER, "VIEWER", 0, "Viewer", "Compositing node viewer"},
+ {0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_generated_type_items[]= {
- {0, "BLANK", "Blank", "Generate a blank image"},
- {1, "UVTESTGRID", "UV Test Grid", "Generated grid to test UV mappings"},
- {0, NULL, NULL, NULL}};
+ {0, "BLANK", 0, "Blank", "Generate a blank image"},
+ {1, "UVTESTGRID", 0, "UV Test Grid", "Generated grid to test UV mappings"},
+ {0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_mapping_items[]= {
- {0, "UV", "UV Coordinates", "Use UV coordinates for mapping the image"},
- {IMA_REFLECT, "REFLECTION", "Reflection", "Use reflection mapping for mapping the image"},
- {0, NULL, NULL, NULL}};
+ {0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping the image"},
+ {IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Image", "ID");
RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image.");
@@ -119,16 +149,19 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */
RNA_def_property_ui_text(prop, "Filename", "Image/Movie file name.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_source_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */
RNA_def_property_ui_text(prop, "Source", "Where the image comes from.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */
RNA_def_property_ui_text(prop, "Type", "How to generate the image.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
@@ -138,89 +171,110 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_FIELDS);
RNA_def_property_ui_text(prop, "Fields", "Use fields of the image.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "odd_fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_STD_FIELD);
RNA_def_property_ui_text(prop, "Odd Fields", "Standard field toggle.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "antialias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANTIALI);
RNA_def_property_ui_text(prop, "Anti-alias", "Toggles image anti-aliasing, only works with solid colors");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_DO_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+
+ prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved.");
/* generated image (image_generated_change_cb) */
prop= RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gen_type");
RNA_def_property_enum_items(prop, prop_generated_type_items);
RNA_def_property_ui_text(prop, "Generated Type", "Generated image type.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "generated_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_x");
RNA_def_property_range(prop, 1, 16384);
RNA_def_property_ui_text(prop, "Generated Width", "Generated image width.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "generated_height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_y");
RNA_def_property_range(prop, 1, 16384);
RNA_def_property_ui_text(prop, "Generated Height", "Generated image height.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* realtime properties */
prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, 5000.0f);
RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "animated", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* B_TWINANIM */
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM);
RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twsta");
RNA_def_property_range(prop, 0, 128);
RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twend");
RNA_def_property_range(prop, 0, 128);
RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "animspeed");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* B_SIMAGETILE */
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES);
RNA_def_property_ui_text(prop, "Tiles", "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces).");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xrep");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yrep");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "clamp_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_U);
RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "clamp_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_V);
RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically.");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
}
void RNA_def_image(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 9071efe71f7..ad0e05b91a6 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -139,13 +139,13 @@ void RNA_def_material(struct BlenderRNA *brna);
void RNA_def_mesh(struct BlenderRNA *brna);
void RNA_def_meta(struct BlenderRNA *brna);
void RNA_def_modifier(struct BlenderRNA *brna);
+void RNA_def_nla(struct BlenderRNA *brna);
void RNA_def_nodetree(struct BlenderRNA *brna);
void RNA_def_object(struct BlenderRNA *brna);
void RNA_def_object_force(struct BlenderRNA *brna);
void RNA_def_packedfile(struct BlenderRNA *brna);
void RNA_def_particle(struct BlenderRNA *brna);
void RNA_def_pose(struct BlenderRNA *brna);
-void RNA_def_radio(struct BlenderRNA *brna);
void RNA_def_rna(struct BlenderRNA *brna);
void RNA_def_scene(struct BlenderRNA *brna);
void RNA_def_screen(struct BlenderRNA *brna);
@@ -186,9 +186,16 @@ void rna_object_vgroup_name_set(struct PointerRNA *ptr, const char *value, char
void rna_object_uvlayer_name_set(struct PointerRNA *ptr, const char *value, char *result, int maxlen);
void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, char *result, int maxlen);
+void rna_Object_update(struct bContext *C, struct PointerRNA *ptr);
+void rna_Object_update_data(struct bContext *C, struct PointerRNA *ptr);
+
/* API functions */
+void RNA_api_main(struct StructRNA *srna);
+void RNA_api_mesh(struct StructRNA *srna);
+void RNA_api_object(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
+void RNA_api_wm(struct StructRNA *srna);
/* ID Properties */
@@ -213,6 +220,7 @@ void rna_builtin_properties_begin(struct CollectionPropertyIterator *iter, struc
void rna_builtin_properties_next(struct CollectionPropertyIterator *iter);
PointerRNA rna_builtin_properties_get(struct CollectionPropertyIterator *iter);
PointerRNA rna_builtin_type_get(struct PointerRNA *ptr);
+PointerRNA rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key);
/* Iterators */
@@ -232,11 +240,12 @@ void rna_iterator_listbase_end(struct CollectionPropertyIterator *iter);
typedef struct ArrayIterator {
char *ptr;
char *endptr;
+ void *free_ptr; /* will be free'd if set */
int itemsize;
IteratorSkipFunc skip;
} ArrayIterator;
-void rna_iterator_array_begin(struct CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, IteratorSkipFunc skip);
+void rna_iterator_array_begin(struct CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, int free_ptr, IteratorSkipFunc skip);
void rna_iterator_array_next(struct CollectionPropertyIterator *iter);
void *rna_iterator_array_get(struct CollectionPropertyIterator *iter);
void *rna_iterator_array_dereference_get(struct CollectionPropertyIterator *iter);
@@ -251,6 +260,7 @@ void rna_freelistN(struct ListBase *listbase);
StructDefRNA *rna_find_struct_def(StructRNA *srna);
FunctionDefRNA *rna_find_function_def(FunctionRNA *func);
PropertyDefRNA *rna_find_parameter_def(PropertyRNA *parm);
+PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop);
/* Pointer Handling */
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index d690251f503..b63e347e165 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -37,6 +37,7 @@ struct ReportList;
struct CollectionPropertyIterator;
struct bContext;
struct IDProperty;
+struct GHash;
#define RNA_MAX_ARRAY 32
@@ -67,7 +68,7 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr);
typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value);
-typedef EnumPropertyItem *(*PropEnumItemFunc)(struct PointerRNA *ptr);
+typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr, int *free);
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef StructRNA* (*PropPointerTypeFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
@@ -83,6 +84,7 @@ typedef PointerRNA (*PropCollectionLookupStringFunc)(struct PointerRNA *ptr, con
typedef struct ContainerRNA {
void *next, *prev;
+ struct GHash *prophash;
ListBase properties;
} ContainerRNA;
@@ -128,6 +130,8 @@ struct PropertyRNA {
const char *name;
/* single line description, displayed in the tooltip for example */
const char *description;
+ /* icon ID */
+ int icon;
/* property type as it appears to the outside */
PropertyType type;
@@ -142,6 +146,10 @@ struct PropertyRNA {
/* callback for testing if editable/evaluated */
EditableFunc editable;
+
+ /* raw access */
+ int rawoffset;
+ RawPropertyType rawtype;
};
/* Property Types */
@@ -217,7 +225,7 @@ typedef struct EnumPropertyRNA {
PropEnumSetFunc set;
PropEnumItemFunc itemf;
- const EnumPropertyItem *item;
+ EnumPropertyItem *item;
int totitem;
int defaultvalue;
@@ -243,6 +251,7 @@ typedef struct CollectionPropertyRNA {
PropCollectionLengthFunc length; /* optional */
PropCollectionLookupIntFunc lookupint; /* optional */
PropCollectionLookupStringFunc lookupstring; /* optional */
+ FunctionRNA *add, *remove;
struct StructRNA *type;
} CollectionPropertyRNA;
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index ae03cca74c2..7297ee8cb97 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -1,5 +1,5 @@
/**
- * $Id: rna_key.c 19382 2009-03-23 13:24:48Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -37,6 +37,16 @@
#ifdef RNA_RUNTIME
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+
+#include "BKE_depsgraph.h"
+#include "BKE_key.h"
+#include "BKE_main.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
static Key *rna_ShapeKey_find_key(ID *id)
{
switch(GS(id->name)) {
@@ -62,6 +72,18 @@ static PointerRNA rna_ShapeKey_relative_key_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, NULL, NULL);
}
+static void rna_ShapeKey_relative_key_set(PointerRNA *ptr, PointerRNA value)
+{
+ Key *key= rna_ShapeKey_find_key(ptr->id.data);
+ KeyBlock *kb= (KeyBlock*)ptr->data, *kbrel;
+ int a;
+
+ if(key)
+ for(a=0, kbrel=key->block.first; kbrel; kbrel=kbrel->next, a++)
+ if(kbrel == value.data)
+ kb->relative= a;
+}
+
static void rna_ShapeKeyPoint_co_get(PointerRNA *ptr, float *values)
{
float *vec= (float*)ptr->data;
@@ -176,7 +198,7 @@ static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA
}
}
- rna_iterator_array_begin(iter, (void*)kb->data, size, tot, NULL);
+ rna_iterator_array_begin(iter, (void*)kb->data, size, tot, 0, NULL);
}
static int rna_ShapeKey_data_length(PointerRNA *ptr)
@@ -220,6 +242,21 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, type, rna_iterator_array_get(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_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
+}
+
#else
static void rna_def_keydata(BlenderRNA *brna)
@@ -234,6 +271,7 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
srna= RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves.");
@@ -242,10 +280,12 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyCurvePoint_tilt_get", "rna_ShapeKeyCurvePoint_tilt_set", NULL);
RNA_def_property_ui_text(prop, "Tilt", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
srna= RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for bezier curves.");
@@ -254,21 +294,25 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_co_get", "rna_ShapeKeyBezierPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "handle_1_co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_1_co_get", "rna_ShapeKeyBezierPoint_handle_1_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1 Location", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "handle_2_co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_2_co_get", "rna_ShapeKeyBezierPoint_handle_2_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2 Location", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
/* appears to be unused currently
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_tilt_get", "rna_ShapeKeyBezierPoint_tilt_set", NULL);
- RNA_def_property_ui_text(prop, "Tilt", "");*/
+ RNA_def_property_ui_text(prop, "Tilt", "");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data"); */
}
static void rna_def_keyblock(BlenderRNA *brna)
@@ -277,10 +321,10 @@ static void rna_def_keyblock(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_keyblock_type_items[] = {
- {KEY_LINEAR, "KEY_LINEAR", "Linear", ""},
- {KEY_CARDINAL, "KEY_CARDINAL", "Cardinal", ""},
- {KEY_BSPLINE, "KEY_BSPLINE", "BSpline", ""},
- {0, NULL, NULL, NULL}};
+ {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
+ {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
+ {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShapeKey", NULL);
RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock.");
@@ -296,30 +340,37 @@ static void rna_def_keyblock(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_sdna(prop, NULL, "pos");
RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
/* for now, this is editable directly, as users can set this even if they're not animating them (to test results) */
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curval");
RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
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 weight group, to blend with basis shape.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "relative_key", PROP_POINTER, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "ShapeKey");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, "rna_ShapeKey_relative_key_get", "rna_ShapeKey_relative_key_set", NULL);
RNA_def_property_ui_text(prop, "Relative Key", "Shape used as a relative key.");
- RNA_def_property_pointer_funcs(prop, "rna_ShapeKey_relative_key_get", NULL, NULL);
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYBLOCK_MUTE);
RNA_def_property_ui_text(prop, "Mute", "Mute this shape key.");
+ RNA_def_property_ui_icon(prop, ICON_MUTE_IPO_OFF, 1);
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "slider_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "slidermin");
@@ -335,7 +386,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0, 0, 0);
}
static void rna_def_key(BlenderRNA *brna)
@@ -366,11 +417,13 @@ static void rna_def_key(BlenderRNA *brna)
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", KEY_RELATIVE);
RNA_def_property_ui_text(prop, "Relative", "Makes shape keys relative.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "slurph");
RNA_def_property_range(prop, -500, 500);
RNA_def_property_ui_text(prop, "Slurph", "Creates a delay in amount of frames in applying keypositions, first vertex goes first.");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
}
void RNA_def_key(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 97ad5b7f6a4..e592cb38693 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -54,7 +54,7 @@ static PointerRNA rna_Lamp_sky_settings_get(PointerRNA *ptr)
static void rna_Lamp_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Lamp *la= (Lamp*)ptr->data;
- rna_iterator_array_begin(iter, (void*)la->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+ rna_iterator_array_begin(iter, (void*)la->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_Lamp_active_texture_get(PointerRNA *ptr)
@@ -91,10 +91,10 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates."},
- {TEXCO_VIEW, "VIEW", "View", "Uses view coordinates for the texture coordinates."},
- {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
- {0, NULL, NULL, NULL}};
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
+ {TEXCO_VIEW, "VIEW", 0, "View", "Uses view coordinates for the texture coordinates."},
+ {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
@@ -126,29 +126,29 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_skycolorspace_items[] = {
- {0, "SMPTE", "SMPTE", ""},
- {1, "REC709", "REC709", ""},
- {2, "CIE", "CIE", ""},
- {0, NULL, NULL, NULL}};
+ {0, "SMPTE", 0, "SMPTE", ""},
+ {1, "REC709", 0, "REC709", ""},
+ {2, "CIE", 0, "CIE", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_blendmode_items[] = {
- {0, "MIX", "Mix", ""},
- {1, "ADD", "Add", ""},
- {2, "MULTIPLY", "Multiply", ""},
- {3, "SUBTRACT", "Subtract", ""},
- {4, "SCREEN", "Screen", ""},
- {5, "DIVIDE", "Divide", ""},
- {6, "DIFFERENCE", "Difference", ""},
- {7, "DARKEN", "Darken", ""},
- {8, "LIGHTEN", "Lighten", ""},
- {9, "OVERLAY", "Overlay", ""},
- {10, "DODGE", "Dodge", ""},
- {11, "BURN", "Burn", ""},
- {12, "HUE", "Hue", ""},
- {13, "SATURATION", "Saturation", ""},
- {14, "VALUE", "Value", ""},
- {15, "COLOR", "Color", ""},
- {0, NULL, NULL, NULL}};
+ {0, "MIX", 0, "Mix", ""},
+ {1, "ADD", 0, "Add", ""},
+ {2, "MULTIPLY", 0, "Multiply", ""},
+ {3, "SUBTRACT", 0, "Subtract", ""},
+ {4, "SCREEN", 0, "Screen", ""},
+ {5, "DIVIDE", 0, "Divide", ""},
+ {6, "DIFFERENCE", 0, "Difference", ""},
+ {7, "DARKEN", 0, "Darken", ""},
+ {8, "LIGHTEN", 0, "Lighten", ""},
+ {9, "OVERLAY", 0, "Overlay", ""},
+ {10, "DODGE", 0, "Dodge", ""},
+ {11, "BURN", 0, "Burn", ""},
+ {12, "HUE", 0, "Hue", ""},
+ {13, "SATURATION", 0, "Saturation", ""},
+ {14, "VALUE", 0, "Value", ""},
+ {15, "COLOR", 0, "Color", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LampSkySettings", NULL);
RNA_def_struct_sdna(srna, "Lamp");
@@ -253,12 +253,12 @@ static void rna_def_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {LA_LOCAL, "POINT", "Point", "Omnidirectional point light source."},
- {LA_SUN, "SUN", "Sun", "Constant direction parallel ray light source."},
- {LA_SPOT, "SPOT", "Spot", "Directional cone light source."},
- {LA_HEMI, "HEMI", "Hemi", "180 degree constant light source."},
- {LA_AREA, "AREA", "Area", "Directional area light source."},
- {0, NULL, NULL, NULL}};
+ {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source."},
+ {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source."},
+ {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source."},
+ {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemi", "180 degree constant light source."},
+ {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Lamp", "ID");
RNA_def_struct_refine_func(srna, "rna_Lamp_refine");
@@ -322,12 +322,12 @@ static void rna_def_lamp_falloff(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_fallofftype_items[] = {
- {LA_FALLOFF_CONSTANT, "CONSTANT", "Constant", ""},
- {LA_FALLOFF_INVLINEAR, "INVERSE_LINEAR", "Inverse Linear", ""},
- {LA_FALLOFF_INVSQUARE, "INVERSE_SQUARE", "Inverse Square", ""},
- {LA_FALLOFF_CURVE, "CUSTOM_CURVE", "Custom Curve", ""},
- {LA_FALLOFF_SLIDERS, "LINEAR_QUADRATIC_WEIGHTED", "Lin/Quad Weighted", ""},
- {0, NULL, NULL, NULL}};
+ {LA_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", ""},
+ {LA_FALLOFF_INVLINEAR, "INVERSE_LINEAR", 0, "Inverse Linear", ""},
+ {LA_FALLOFF_INVSQUARE, "INVERSE_SQUARE", 0, "Inverse Square", ""},
+ {LA_FALLOFF_CURVE, "CUSTOM_CURVE", 0, "Custom Curve", ""},
+ {LA_FALLOFF_SLIDERS, "LINEAR_QUADRATIC_WEIGHTED", 0, "Lin/Quad Weighted", ""},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fallofftype_items);
@@ -362,26 +362,26 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
PropertyRNA *prop;
static EnumPropertyItem prop_shadow_items[] = {
- {0, "NOSHADOW", "No Shadow", ""},
- {LA_SHAD_RAY, "RAY_SHADOW", "Ray Shadow", "Use ray tracing for shadow."},
- {0, NULL, NULL, NULL}};
+ {0, "NOSHADOW", 0, "No Shadow", ""},
+ {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_spot_shadow_items[] = {
- {0, "NOSHADOW", "No Shadow", ""},
- {LA_SHAD_BUF, "BUFFER_SHADOW", "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
- {LA_SHAD_RAY, "RAY_SHADOW", "Ray Shadow", "Use ray tracing for shadow."},
- {0, NULL, NULL, NULL}};
+ {0, "NOSHADOW", 0, "No Shadow", ""},
+ {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
+ {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ray_sampling_method_items[] = {
- {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""},
- {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""},
- {0, NULL, NULL, NULL}};
+ {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
+ {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
- {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""},
- {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""},
- {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""},
- {0, NULL, NULL, NULL}};
+ {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
+ {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
+ {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
@@ -457,9 +457,9 @@ static void rna_def_area_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_areashape_items[] = {
- {LA_AREA_SQUARE, "SQUARE", "Square", ""},
- {LA_AREA_RECT, "RECTANGLE", "Rectangle", ""},
- {0, NULL, NULL, NULL}};
+ {LA_AREA_SQUARE, "SQUARE", 0, "Square", ""},
+ {LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "AreaLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
@@ -513,22 +513,22 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", "Classical", "Classic shadow buffer."},
- {LA_SHADBUF_HALFWAY, "HALFWAY", "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces."},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."},
- {0, NULL, NULL, NULL}};
+ {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer."},
+ {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces."},
+ {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX , "BOX", "Box", "Apply the Box filter to shadow buffer samples."},
- {LA_SHADBUF_TENT, "TENT", "Tent", "Apply the Tent Filter to shadow buffer samples."},
- {LA_SHADBUF_GAUSS, "GAUSS", "Gauss", "Apply the Gauss filter to shadow buffer samples."},
- {0, NULL, NULL, NULL}};
+ {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples."},
+ {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples."},
+ {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_numbuffer_items[] = {
- {1, "BUFFERS_1", "1", "Only one buffer rendered."},
- {4, "BUFFERS_4", "4", "Renders 4 buffers for better AA, this quadruples memory usage."},
- {9, "BUFFERS_9", "9", "Renders 9 buffers for better AA, this uses nine times more memory."},
- {0, NULL, NULL, NULL}};
+ {1, "BUFFERS_1", 0, "1", "Only one buffer rendered."},
+ {4, "BUFFERS_4", 0, "4", "Renders 4 buffers for better AA, this quadruples memory usage."},
+ {9, "BUFFERS_9", 0, "9", "Renders 9 buffers for better AA, this uses nine times more memory."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpotLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 26c4ebb7b23..03a1dc9ec8f 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -1,5 +1,5 @@
/**
- * $Id: rna_lattice.c 19382 2009-03-23 13:24:48Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -36,6 +36,16 @@
#ifdef RNA_RUNTIME
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+
+#include "BKE_depsgraph.h"
+#include "BKE_lattice.h"
+#include "BKE_main.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
static void rna_LatticePoint_co_get(PointerRNA *ptr, float *values)
{
Lattice *lt= (Lattice*)ptr->id.data;
@@ -58,22 +68,103 @@ static void rna_LatticePoint_groups_begin(CollectionPropertyIterator *iter, Poin
BPoint *bp= (BPoint*)ptr->data;
MDeformVert *dvert= lt->dvert + (bp-lt->def);
- rna_iterator_array_begin(iter, (void*)dvert->dw, sizeof(MDeformWeight), dvert->totweight, NULL);
+ rna_iterator_array_begin(iter, (void*)dvert->dw, sizeof(MDeformWeight), dvert->totweight, 0, NULL);
}
else
- rna_iterator_array_begin(iter, NULL, 0, 0, NULL);
+ rna_iterator_array_begin(iter, NULL, 0, 0, 0, NULL);
}
static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Lattice *lt= (Lattice*)ptr->data;
+ int tot= lt->pntsu*lt->pntsv*lt->pntsw;
- if(lt->def) {
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
- rna_iterator_array_begin(iter, (void*)lt->def, sizeof(BPoint), tot, NULL);
- }
+ if(lt->editlatt && lt->editlatt->def)
+ rna_iterator_array_begin(iter, (void*)lt->editlatt->def, sizeof(BPoint), tot, 0, NULL);
+ else if(lt->def)
+ rna_iterator_array_begin(iter, (void*)lt->def, sizeof(BPoint), tot, 0, NULL);
else
- rna_iterator_array_begin(iter, NULL, 0, 0, NULL);
+ rna_iterator_array_begin(iter, NULL, 0, 0, 0, NULL);
+}
+
+static void rna_Lattice_update_data(bContext *C, PointerRNA *ptr)
+{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Lattice *lt= ptr->id.data;
+ Object *ob;
+
+ 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)
+{
+ Main *bmain= CTX_data_main(C);
+ Lattice *lt= ptr->id.data;
+ Object *ob;
+ int newu, newv, neww;
+
+ /* we don't modify the actual pnts, but go through opnts instead */
+ newu= (lt->opntsu > 0)? lt->opntsu: lt->pntsu;
+ newv= (lt->opntsv > 0)? lt->opntsv: lt->pntsv;
+ neww= (lt->opntsw > 0)? lt->opntsw: lt->pntsw;
+
+ /* resizelattice needs an object, any object will have the same result */
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == lt) {
+ resizelattice(lt, newu, newv, neww, ob);
+ if(lt->editlatt)
+ resizelattice(lt->editlatt, newu, newv, neww, ob);
+ break;
+ }
+ }
+
+ /* otherwise without, means old points are not repositioned */
+ if(!ob) {
+ resizelattice(lt, newu, newv, neww, NULL);
+ if(lt->editlatt)
+ resizelattice(lt->editlatt, newu, newv, neww, NULL);
+ }
+
+ rna_Lattice_update_data(C, ptr);
+}
+
+static void rna_Lattice_outside_set(PointerRNA *ptr, int value)
+{
+ Lattice *lt= ptr->data;
+
+ if(value) lt->flag |= LT_OUTSIDE;
+ else lt->flag &= ~LT_OUTSIDE;
+
+ outside_lattice(lt);
+
+ if(lt->editlatt) {
+ if(value) lt->editlatt->flag |= LT_OUTSIDE;
+ else lt->editlatt->flag &= ~LT_OUTSIDE;
+
+ outside_lattice(lt->editlatt);
+ }
+}
+
+static void rna_Lattice_points_u_set(PointerRNA *ptr, int value)
+{
+ ((Lattice*)ptr->data)->opntsu= CLAMPIS(value, 1, 64);
+}
+
+static void rna_Lattice_points_v_set(PointerRNA *ptr, int value)
+{
+ ((Lattice*)ptr->data)->opntsv= CLAMPIS(value, 1, 64);
+}
+
+static void rna_Lattice_points_w_set(PointerRNA *ptr, int value)
+{
+ ((Lattice*)ptr->data)->opntsw= CLAMPIS(value, 1, 64);
}
#else
@@ -97,9 +188,10 @@ static void rna_def_latticepoint(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Deformed Location", "");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of.");
}
@@ -110,10 +202,10 @@ static void rna_def_lattice(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_keyblock_type_items[] = {
- {KEY_LINEAR, "KEY_LINEAR", "Linear", ""},
- {KEY_CARDINAL, "KEY_CARDINAL", "Cardinal", ""},
- {KEY_BSPLINE, "KEY_BSPLINE", "BSpline", ""},
- {0, NULL, NULL, NULL}};
+ {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
+ {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
+ {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Lattice", "ID");
RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects.");
@@ -121,37 +213,48 @@ static void rna_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsu");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL);
+ RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, "U", "Points in U direction.");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsv");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL);
+ RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, "V", "Points in V direction.");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsw");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL);
+ RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, "W", "Points in W direction.");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typeu");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type U", "");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typev");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type V", "");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typew");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type W", "");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "outside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LT_OUTSIDE);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Lattice_outside_set");
RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices.");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
@@ -159,7 +262,7 @@ static void rna_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "LatticePoint");
- RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Points", "Points of the lattice.");
}
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index fdd0349b25e..26fc3c2941e 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -33,6 +33,7 @@
#ifdef RNA_RUNTIME
#include "BKE_main.h"
+#include "BKE_mesh.h"
/* all the list begin functions are added manually here, Main is not in SDNA */
@@ -218,6 +219,7 @@ void RNA_def_main(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
const char *lists[][5]= {
{"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks."},
{"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks."},
@@ -262,9 +264,11 @@ void RNA_def_main(BlenderRNA *brna)
{
prop= RNA_def_property(srna, lists[i][0], PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, lists[i][1]);
- RNA_def_property_collection_funcs(prop, lists[i][2], "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, lists[i][2], "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, lists[i][3], lists[i][4]);
}
+
+ RNA_api_main(srna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 7e66c9fb5e5..b0164bda27c 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -75,7 +75,7 @@ static void rna_Material_type_set(PointerRNA *ptr, int value)
static void rna_Material_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Material *ma= (Material*)ptr->data;
- rna_iterator_array_begin(iter, (void*)ma->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+ rna_iterator_array_begin(iter, (void*)ma->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_Material_active_texture_get(PointerRNA *ptr)
@@ -112,6 +112,35 @@ static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float
}
}
+static int rna_MaterialTextureSlot_enabled_get(PointerRNA *ptr)
+{
+ Material *ma= (Material*)ptr->id.data;
+ MTex *mtex= (MTex*)ptr->data;
+ int a;
+
+ for(a=0; a<MAX_MTEX; a++)
+ if(ma->mtex[a] == mtex)
+ return (ma->septex & (1<<a)) == 0;
+
+ return 0;
+}
+
+static void rna_MaterialTextureSlot_enabled_set(PointerRNA *ptr, int value)
+{
+ Material *ma= (Material*)ptr->id.data;
+ MTex *mtex= (MTex*)ptr->data;
+ int a;
+
+ for(a=0; a<MAX_MTEX; a++) {
+ if(ma->mtex[a] == mtex) {
+ if(value)
+ ma->septex &= ~(1<<a);
+ else
+ ma->septex |= (1<<a);
+ }
+ }
+}
+
#else
static void rna_def_material_mtex(BlenderRNA *brna)
@@ -120,54 +149,54 @@ static void rna_def_material_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates."},
- {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
- {TEXCO_UV, "UV", "UV", "Uses UV coordinates for texture coordinates."},
- {TEXCO_ORCO, "ORCO", "Orco", "Uses the original undeformed coordinates of the object."},
- {TEXCO_STRAND, "STRAND", "Strand", "Uses normalized strand texture coordinate (1D)."},
- {TEXCO_STICKY, "STICKY", "Sticky", "Uses mesh's sticky coordinates for the texture coordinates."},
- {TEXCO_WINDOW, "WINDOW", "Window", "Uses screen coordinates as texture coordinates."},
- {TEXCO_NORM, "NORMAL", "Normal", "Uses normal vector as texture coordinates."},
- {TEXCO_REFL, "REFLECTION", "Reflection", "Uses reflection vector as texture coordinates."},
- {TEXCO_STRESS, "STRESS", "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
- {TEXCO_SPEED, "TANGENT", "Tangent", "Uses the optional tangent vector as texture coordinates."},
-
- {0, NULL, NULL, NULL}};
+ {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", "Flat", "Maps X and Y coordinates directly."},
- {MTEX_CUBE, "CUBE", "Cube", "Maps using the normal vector."},
- {MTEX_TUBE, "TUBE", "Tube", "Maps with Z as central axis."},
- {MTEX_SPHERE, "SPHERE", "Sphere", "Maps with Z as central axis."},
- {0, NULL, NULL, NULL}};
+ {MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly."},
+ {MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector."},
+ {MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis."},
+ {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_x_mapping_items[] = {
- {0, "NONE", "None", ""},
- {1, "X", "X", ""},
- {2, "Y", "Y", ""},
- {3, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {1, "X", 0, "X", ""},
+ {2, "Y", 0, "Y", ""},
+ {3, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_y_mapping_items[] = {
- {0, "NONE", "None", ""},
- {1, "X", "X", ""},
- {2, "Y", "Y", ""},
- {3, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {1, "X", 0, "X", ""},
+ {2, "Y", 0, "Y", ""},
+ {3, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_z_mapping_items[] = {
- {0, "NONE", "None", ""},
- {1, "X", "X", ""},
- {2, "Y", "Y", ""},
- {3, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {1, "X", 0, "X", ""},
+ {2, "Y", 0, "Y", ""},
+ {3, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_normal_map_space_items[] = {
- {MTEX_NSPACE_CAMERA, "CAMERA", "Camera", ""},
- {MTEX_NSPACE_WORLD, "WORLD", "World", ""},
- {MTEX_NSPACE_OBJECT, "OBJECT", "Object", ""},
- {MTEX_NSPACE_TANGENT, "TANGENT", "Tangent", ""},
- {0, NULL, NULL, NULL}};
+ {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""},
+ {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""},
+ {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""},
+ {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
@@ -287,6 +316,12 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "warpfac");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects color values.");
+
+ 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.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
}
static void rna_def_material_colors(StructRNA *srna)
@@ -333,12 +368,12 @@ static void rna_def_material_diffuse(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_diff_shader_items[] = {
- {MA_DIFF_LAMBERT, "LAMBERT", "Lambert", ""},
- {MA_DIFF_ORENNAYAR, "OREN_NAYAR", "Oren-Nayar", ""},
- {MA_DIFF_TOON, "TOON", "Toon", ""},
- {MA_DIFF_MINNAERT, "MINNAERT", "Minnaert", ""},
- {MA_DIFF_FRESNEL, "FRESNEL", "Fresnel", ""},
- {0, NULL, NULL, NULL}};
+ {MA_DIFF_LAMBERT, "LAMBERT", 0, "Lambert", ""},
+ {MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, "Oren-Nayar", ""},
+ {MA_DIFF_TOON, "TOON", 0, "Toon", ""},
+ {MA_DIFF_MINNAERT, "MINNAERT", 0, "Minnaert", ""},
+ {MA_DIFF_FRESNEL, "FRESNEL", 0, "Fresnel", ""},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
@@ -356,12 +391,29 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_range(prop, 0.0f, 3.14f);
RNA_def_property_ui_text(prop, "Roughness", "Oren-Nayar Roughness");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "params1_4", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "param");
- RNA_def_property_array(prop, 4);
+
+ prop= RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[0]");
+ RNA_def_property_range(prop, 0.0f, 3.14f);
+ RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
+ prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[1]");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
+ prop= RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Params 1-4", "Parameters used for diffuse and specular Toon, and diffuse Fresnel shaders. Check documentation for details.");
+ RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
+ prop= RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[0]");
+ RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Frensel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
@@ -376,9 +428,9 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_fadeto_mir_items[] = {
- {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", "Fade to Sky Color", ""},
- {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", "Fade to Material Color", ""},
- {0, NULL, NULL, NULL}};
+ {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Fade to Sky Color", ""},
+ {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Fade to Material Color", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
RNA_def_struct_sdna(srna, "Material");
@@ -404,7 +456,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "fresnel_fac", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
- RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
@@ -734,29 +786,61 @@ static void rna_def_material_sss(BlenderRNA *brna)
void rna_def_material_specularity(StructRNA *srna)
{
PropertyRNA *prop;
-
- prop= RNA_def_property(srna, "specularity", PROP_FLOAT, PROP_NONE);
+
+ static EnumPropertyItem prop_spec_shader_items[] = {
+ {MA_SPEC_COOKTORR, "COOKTORR", 0, "CookTorr", ""},
+ {MA_SPEC_PHONG, "PHONG", 0, "Phong", ""},
+ {MA_SPEC_BLINN, "BLINN", 0, "Blinn", ""},
+ {MA_SPEC_TOON, "TOON", 0, "Toon", ""},
+ {MA_SPEC_WARDISO, "WARDISO", 0, "WardIso", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop= RNA_def_property(srna, "spec_shader", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "spec_shader");
+ RNA_def_property_enum_items(prop, prop_spec_shader_items);
+ 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_reflection", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
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
+ * settings. This should be fixed in DNA once, for RNA we just expose them
+ * multiple times, which may give somewhat strange changes in the outliner,
+ * but in the UI they are never visible at the same time. */
- /* XXX: this field is also used for Halo hardness. should probably be fixed in DNA */
prop= RNA_def_property(srna, "specular_hardness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 1, 511);
RNA_def_property_ui_text(prop, "Specular Hardness", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "specular_refraction", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "specular_ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "refrac");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Specular IOR", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- /* XXX: evil "param" field also does specular stuff */
+ prop= RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[2]");
+ RNA_def_property_range(prop, 0.0f, 1.53f);
+ RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
+ prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "param[3]");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Ssmoothness of specular toon area.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rms");
RNA_def_property_range(prop, 0, 0.4);
RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
void rna_def_material_strand(BlenderRNA *brna)
@@ -772,48 +856,58 @@ void rna_def_material_strand(BlenderRNA *brna)
prop= RNA_def_property(srna, "tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR);
RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "surface_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Blend Distance", "Distance in Blender units over which to blend in the surface normal.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "blender_units", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS);
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, "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, "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, "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, "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);
RNA_def_property_float_sdna(prop, NULL, "strand_min");
RNA_def_property_range(prop, 0.001, 10);
RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_ease");
RNA_def_property_range(prop, -0.9, 0.9);
RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_widthfade");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "strand_uvname");
RNA_def_property_ui_text(prop, "UV Layer", "Name of UV layer to override.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
void RNA_def_material(BlenderRNA *brna)
@@ -822,10 +916,10 @@ void RNA_def_material(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {MA_TYPE_SURFACE, "SURFACE", "Surface", "Render object as a surface."},
- {MA_TYPE_VOLUME, "VOLUME", "Volume", "Render object as a volume."},
- {MA_TYPE_HALO, "HALO", "Halo", "Render object as halo particles."},
- {0, NULL, NULL, NULL}};
+ {MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface."},
+ {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}};
srna= RNA_def_struct(brna, "Material", "ID");
RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering.");
@@ -847,6 +941,7 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
@@ -856,10 +951,12 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "cubic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR);
RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
@@ -1025,8 +1122,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this material.");
-
- /* XXX: does Material.septex get RNA? */
rna_def_material_colors(srna);
rna_def_material_diffuse(srna);
@@ -1048,7 +1143,7 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
/* mtex */
prop= RNA_def_property(srna, "textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
- RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures.");
prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index e58b3c51fec..0a0d70fa9eb 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -34,15 +34,46 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
-#include "BKE_customdata.h"
-
#ifdef RNA_RUNTIME
-/*static float rna_MeshVertex_no_get(PointerRNA *ptr, int index)
+#include "DNA_scene_types.h"
+
+#include "BLI_editVert.h"
+
+#include "BKE_customdata.h"
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
+#include "BKE_mesh.h"
+#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+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;
+
+ 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)
{
MVert *mvert= (MVert*)ptr->data;
- return mvert->no[index]/32767.0f;
-}*/
+
+ value[0]= mvert->no[0]/32767.0f;
+ value[1]= mvert->no[1]/32767.0f;
+ value[2]= mvert->no[2]/32767.0f;
+}
static float rna_MeshVertex_bevel_weight_get(PointerRNA *ptr)
{
@@ -80,76 +111,77 @@ static void rna_MEdge_crease_set(PointerRNA *ptr, float value)
medge->crease= (char)(CLAMPIS(value*255.0f, 0, 255));
}
+/* notice red and blue are swapped */
static void rna_MeshColor_color1_get(PointerRNA *ptr, float *values)
{
MCol *mcol= (MCol*)ptr->data;
- values[0]= (&mcol[0].r)[0]/255.0f;
+ values[2]= (&mcol[0].r)[0]/255.0f;
values[1]= (&mcol[0].r)[1]/255.0f;
- values[2]= (&mcol[0].r)[2]/255.0f;
+ values[0]= (&mcol[0].r)[2]/255.0f;
}
static void rna_MeshColor_color1_set(PointerRNA *ptr, const float *values)
{
MCol *mcol= (MCol*)ptr->data;
- (&mcol[0].r)[0]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
+ (&mcol[0].r)[2]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
(&mcol[0].r)[1]= (char)(CLAMPIS(values[1]*255.0f, 0, 255));
- (&mcol[0].r)[2]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
+ (&mcol[0].r)[0]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
}
static void rna_MeshColor_color2_get(PointerRNA *ptr, float *values)
{
MCol *mcol= (MCol*)ptr->data;
- values[0]= (&mcol[1].r)[0]/255.0f;
+ values[2]= (&mcol[1].r)[0]/255.0f;
values[1]= (&mcol[1].r)[1]/255.0f;
- values[2]= (&mcol[1].r)[2]/255.0f;
+ values[0]= (&mcol[1].r)[2]/255.0f;
}
static void rna_MeshColor_color2_set(PointerRNA *ptr, const float *values)
{
MCol *mcol= (MCol*)ptr->data;
- (&mcol[1].r)[0]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
+ (&mcol[1].r)[2]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
(&mcol[1].r)[1]= (char)(CLAMPIS(values[1]*255.0f, 0, 255));
- (&mcol[1].r)[2]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
+ (&mcol[1].r)[0]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
}
static void rna_MeshColor_color3_get(PointerRNA *ptr, float *values)
{
MCol *mcol= (MCol*)ptr->data;
- values[0]= (&mcol[2].r)[0]/255.0f;
+ values[2]= (&mcol[2].r)[0]/255.0f;
values[1]= (&mcol[2].r)[1]/255.0f;
- values[2]= (&mcol[2].r)[2]/255.0f;
+ values[0]= (&mcol[2].r)[2]/255.0f;
}
static void rna_MeshColor_color3_set(PointerRNA *ptr, const float *values)
{
MCol *mcol= (MCol*)ptr->data;
- (&mcol[2].r)[0]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
+ (&mcol[2].r)[2]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
(&mcol[2].r)[1]= (char)(CLAMPIS(values[1]*255.0f, 0, 255));
- (&mcol[2].r)[2]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
+ (&mcol[2].r)[0]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
}
static void rna_MeshColor_color4_get(PointerRNA *ptr, float *values)
{
MCol *mcol= (MCol*)ptr->data;
- values[0]= (&mcol[3].r)[0]/255.0f;
+ values[2]= (&mcol[3].r)[0]/255.0f;
values[1]= (&mcol[3].r)[1]/255.0f;
- values[2]= (&mcol[3].r)[2]/255.0f;
+ values[0]= (&mcol[3].r)[2]/255.0f;
}
static void rna_MeshColor_color4_set(PointerRNA *ptr, const float *values)
{
MCol *mcol= (MCol*)ptr->data;
- (&mcol[3].r)[0]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
+ (&mcol[3].r)[2]= (char)(CLAMPIS(values[0]*255.0f, 0, 255));
(&mcol[3].r)[1]= (char)(CLAMPIS(values[1]*255.0f, 0, 255));
- (&mcol[3].r)[2]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
+ (&mcol[3].r)[0]= (char)(CLAMPIS(values[2]*255.0f, 0, 255));
}
static int rna_Mesh_texspace_editable(PointerRNA *ptr)
@@ -166,10 +198,10 @@ static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, Pointe
MVert *mvert= (MVert*)ptr->data;
MDeformVert *dvert= me->dvert + (mvert-me->mvert);
- rna_iterator_array_begin(iter, (void*)dvert->dw, sizeof(MDeformWeight), dvert->totweight, NULL);
+ rna_iterator_array_begin(iter, (void*)dvert->dw, sizeof(MDeformWeight), dvert->totweight, 0, NULL);
}
else
- rna_iterator_array_begin(iter, NULL, 0, 0, NULL);
+ rna_iterator_array_begin(iter, NULL, 0, 0, 0, NULL);
}
static void rna_MeshFace_material_index_range(PointerRNA *ptr, int *min, int *max)
@@ -179,13 +211,19 @@ static void rna_MeshFace_material_index_range(PointerRNA *ptr, int *min, int *ma
*max= me->totcol-1;
}
+static CustomData *rna_mesh_fdata(Mesh *me)
+{
+ return (me->edit_btmesh)? &me->edit_btmesh->bm->pdata: &me->pdata;
+}
+
static int rna_CustomDataLayer_length(PointerRNA *ptr, int type)
{
Mesh *me= (Mesh*)ptr->id.data;
+ CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *layer;
int i, length= 0;
- for(layer=me->fdata.layers, i=0; i<me->fdata.totlayer; layer++, i++)
+ for(layer=fdata->layers, i=0; i<fdata->totlayer; layer++, i++)
if(layer->type == type)
length++;
@@ -195,41 +233,96 @@ static int rna_CustomDataLayer_length(PointerRNA *ptr, int type)
static int rna_CustomDataLayer_active_get(PointerRNA *ptr, int type, int render)
{
Mesh *me= (Mesh*)ptr->id.data;
- int n= ((CustomDataLayer*)ptr->data) - me->fdata.layers;
+ CustomData *fdata= rna_mesh_fdata(me);
+ int n= ((CustomDataLayer*)ptr->data) - fdata->layers;
- if(render) return (n == CustomData_get_render_layer_index(&me->fdata, type));
- else return (n == CustomData_get_active_layer_index(&me->fdata, type));
+ if(render) return (n == CustomData_get_render_layer_index(fdata, type));
+ else return (n == CustomData_get_active_layer_index(fdata, type));
}
static void rna_CustomDataLayer_active_set(PointerRNA *ptr, int value, int type, int render)
{
Mesh *me= (Mesh*)ptr->id.data;
- int n= ((CustomDataLayer*)ptr->data) - me->fdata.layers;
+ CustomData *fdata= rna_mesh_fdata(me);
+ int n= ((CustomDataLayer*)ptr->data) - fdata->layers;
if(value == 0)
return;
- if(render) CustomData_set_layer_render_index(&me->fdata, type, n);
- else CustomData_set_layer_active_index(&me->fdata, type, n);
+ if(render) CustomData_set_layer_render_index(fdata, type, n);
+ else CustomData_set_layer_active_index(fdata, type, n);
}
-static int rna_uv_layer_check(CollectionPropertyIterator *iter, void *data)
+static int rna_uv_texture_check(CollectionPropertyIterator *iter, void *data)
{
CustomDataLayer *layer= (CustomDataLayer*)data;
return (layer->type != CD_MTFACE);
}
-static void rna_Mesh_uv_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_Mesh_uv_textures_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->data;
- rna_iterator_array_begin(iter, (void*)me->fdata.layers, sizeof(CustomDataLayer), me->fdata.totlayer, rna_uv_layer_check);
+ CustomData *fdata= rna_mesh_fdata(me);
+ rna_iterator_array_begin(iter, (void*)fdata->layers, sizeof(CustomDataLayer), fdata->totlayer, 0, rna_uv_texture_check);
}
-static int rna_Mesh_uv_layers_length(PointerRNA *ptr)
+static int rna_Mesh_uv_textures_length(PointerRNA *ptr)
{
return rna_CustomDataLayer_length(ptr, CD_MTFACE);
}
+static PointerRNA rna_Mesh_active_uv_texture_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ int index= CustomData_get_active_layer_index(fdata, CD_MTFACE);
+ CustomDataLayer *cdl= (index == -1)? NULL: &fdata->layers[index];
+
+ return rna_pointer_inherit_refine(ptr, &RNA_MeshTextureFaceLayer, cdl);
+}
+
+static void rna_Mesh_active_uv_texture_set(PointerRNA *ptr, PointerRNA value)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ CustomDataLayer *cdl;
+ int a;
+
+ for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) {
+ if(value.data == cdl) {
+ CustomData_set_layer_active_index(fdata, CD_MTFACE, a);
+ mesh_update_customdata_pointers(me);
+ return;
+ }
+ }
+}
+
+static int rna_Mesh_active_uv_texture_index_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ return CustomData_get_active_layer(fdata, CD_MTFACE);
+}
+
+static void rna_Mesh_active_uv_texture_index_set(PointerRNA *ptr, int value)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+
+ CustomData_set_layer_active(fdata, CD_MTFACE, value);
+ mesh_update_customdata_pointers(me);
+}
+
+static void rna_Mesh_active_uv_texture_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+
+ *min= 0;
+ *max= CustomData_number_of_layers(fdata, CD_MTFACE)-1;
+ *max= MAX2(0, *max);
+}
+
static void rna_MeshTextureFace_uv1_get(PointerRNA *ptr, float *values)
{
MTFace *mtface= (MTFace*)ptr->data;
@@ -298,7 +391,7 @@ static void rna_MeshTextureFaceLayer_data_begin(CollectionPropertyIterator *iter
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
- rna_iterator_array_begin(iter, layer->data, sizeof(MTFace), me->totface, NULL);
+ rna_iterator_array_begin(iter, layer->data, sizeof(MTFace), me->totface, 0, NULL);
}
static int rna_MeshTextureFaceLayer_data_length(PointerRNA *ptr)
@@ -327,28 +420,89 @@ static void rna_MeshTextureFaceLayer_active_set(PointerRNA *ptr, int value)
rna_CustomDataLayer_active_set(ptr, value, CD_MTFACE, 0);
}
-static int rna_vcol_layer_check(CollectionPropertyIterator *iter, void *data)
+static void rna_MeshTextureFaceLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
+ BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ CustomData_set_layer_unique_name(&me->fdata, cdl - me->fdata.layers);
+}
+
+static int rna_vertex_color_check(CollectionPropertyIterator *iter, void *data)
{
CustomDataLayer *layer= (CustomDataLayer*)data;
return (layer->type != CD_MCOL);
}
-static void rna_Mesh_vcol_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_Mesh_vertex_colors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->data;
- rna_iterator_array_begin(iter, (void*)me->fdata.layers, sizeof(CustomDataLayer), me->fdata.totlayer, rna_vcol_layer_check);
+ CustomData *fdata= rna_mesh_fdata(me);
+ rna_iterator_array_begin(iter, (void*)fdata->layers, sizeof(CustomDataLayer), fdata->totlayer, 0, rna_vertex_color_check);
}
-static int rna_Mesh_vcol_layers_length(PointerRNA *ptr)
+static int rna_Mesh_vertex_colors_length(PointerRNA *ptr)
{
return rna_CustomDataLayer_length(ptr, CD_MCOL);
}
+static PointerRNA rna_Mesh_active_vertex_color_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ int index= CustomData_get_active_layer_index(fdata, CD_MCOL);
+ CustomDataLayer *cdl= (index == -1)? NULL: &fdata->layers[index];
+
+ return rna_pointer_inherit_refine(ptr, &RNA_MeshColorLayer, cdl);
+}
+
+static void rna_Mesh_active_vertex_color_set(PointerRNA *ptr, PointerRNA value)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ CustomDataLayer *cdl;
+ int a;
+
+ for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) {
+ if(value.data == cdl) {
+ CustomData_set_layer_active_index(fdata, CD_MCOL, a);
+ mesh_update_customdata_pointers(me);
+ return;
+ }
+ }
+}
+
+static int rna_Mesh_active_vertex_color_index_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+ return CustomData_get_active_layer(fdata, CD_MCOL);
+}
+
+static void rna_Mesh_active_vertex_color_index_set(PointerRNA *ptr, int value)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+
+ CustomData_set_layer_active(fdata, CD_MCOL, value);
+ mesh_update_customdata_pointers(me);
+}
+
+static void rna_Mesh_active_vertex_color_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Mesh *me= (Mesh*)ptr->data;
+ CustomData *fdata= rna_mesh_fdata(me);
+
+ *min= 0;
+ *max= CustomData_number_of_layers(fdata, CD_MCOL)-1;
+ *max= MAX2(0, *max);
+}
+
static void rna_MeshColorLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
- rna_iterator_array_begin(iter, layer->data, sizeof(MCol)*4, me->totface, NULL);
+ rna_iterator_array_begin(iter, layer->data, sizeof(MCol)*4, me->totface, 0, NULL);
}
static int rna_MeshColorLayer_data_length(PointerRNA *ptr)
@@ -377,11 +531,19 @@ static void rna_MeshColorLayer_active_set(PointerRNA *ptr, int value)
rna_CustomDataLayer_active_set(ptr, value, CD_MCOL, 0);
}
+static void rna_MeshColorLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
+ BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ CustomData_set_layer_unique_name(&me->fdata, cdl - me->fdata.layers);
+}
+
static void rna_MeshFloatPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
- rna_iterator_array_begin(iter, layer->data, sizeof(MFloatProperty), me->totface, NULL);
+ rna_iterator_array_begin(iter, layer->data, sizeof(MFloatProperty), me->totface, 0, NULL);
}
static int rna_MeshFloatPropertyLayer_data_length(PointerRNA *ptr)
@@ -399,7 +561,8 @@ static int rna_float_layer_check(CollectionPropertyIterator *iter, void *data)
static void rna_Mesh_float_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->data;
- rna_iterator_array_begin(iter, (void*)me->fdata.layers, sizeof(CustomDataLayer), me->fdata.totlayer, rna_float_layer_check);
+ CustomData *fdata= rna_mesh_fdata(me);
+ rna_iterator_array_begin(iter, (void*)fdata->layers, sizeof(CustomDataLayer), fdata->totlayer, 0, rna_float_layer_check);
}
static int rna_Mesh_float_layers_length(PointerRNA *ptr)
@@ -417,7 +580,7 @@ static void rna_MeshIntPropertyLayer_data_begin(CollectionPropertyIterator *iter
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
- rna_iterator_array_begin(iter, layer->data, sizeof(MIntProperty), me->totface, NULL);
+ rna_iterator_array_begin(iter, layer->data, sizeof(MIntProperty), me->totface, 0, NULL);
}
static int rna_MeshIntPropertyLayer_data_length(PointerRNA *ptr)
@@ -429,7 +592,8 @@ static int rna_MeshIntPropertyLayer_data_length(PointerRNA *ptr)
static void rna_Mesh_int_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->data;
- rna_iterator_array_begin(iter, (void*)me->fdata.layers, sizeof(CustomDataLayer), me->fdata.totlayer, rna_int_layer_check);
+ CustomData *fdata= rna_mesh_fdata(me);
+ rna_iterator_array_begin(iter, (void*)fdata->layers, sizeof(CustomDataLayer), fdata->totlayer, 0, rna_int_layer_check);
}
static int rna_Mesh_int_layers_length(PointerRNA *ptr)
@@ -447,7 +611,7 @@ static void rna_MeshStringPropertyLayer_data_begin(CollectionPropertyIterator *i
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
- rna_iterator_array_begin(iter, layer->data, sizeof(MStringProperty), me->totface, NULL);
+ rna_iterator_array_begin(iter, layer->data, sizeof(MStringProperty), me->totface, 0, NULL);
}
static int rna_MeshStringPropertyLayer_data_length(PointerRNA *ptr)
@@ -459,7 +623,8 @@ static int rna_MeshStringPropertyLayer_data_length(PointerRNA *ptr)
static void rna_Mesh_string_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->data;
- rna_iterator_array_begin(iter, (void*)me->fdata.layers, sizeof(CustomDataLayer), me->fdata.totlayer, rna_string_layer_check);
+ CustomData *fdata= rna_mesh_fdata(me);
+ rna_iterator_array_begin(iter, (void*)fdata->layers, sizeof(CustomDataLayer), fdata->totlayer, 0, rna_string_layer_check);
}
static int rna_Mesh_string_layers_length(PointerRNA *ptr)
@@ -518,17 +683,18 @@ static char *rna_MeshVertex_path(PointerRNA *ptr)
static char *rna_MeshTextureFaceLayer_path(PointerRNA *ptr)
{
- return BLI_sprintfN("uv_layers[%s]", ((CustomDataLayer*)ptr->data)->name);
+ return BLI_sprintfN("uv_textures[%s]", ((CustomDataLayer*)ptr->data)->name);
}
static char *rna_CustomDataData_path(PointerRNA *ptr, char *collection, int type)
{
Mesh *me= (Mesh*)ptr->id.data;
+ CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *cdl;
int a;
size_t b;
- for(cdl=me->fdata.layers, a=0; a<me->fdata.totlayer; cdl++, a++) {
+ 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)
@@ -541,17 +707,17 @@ static char *rna_CustomDataData_path(PointerRNA *ptr, char *collection, int type
static char *rna_MeshTextureFace_path(PointerRNA *ptr)
{
- return rna_CustomDataData_path(ptr, "uv_layers", CD_MTFACE);
+ return rna_CustomDataData_path(ptr, "uv_textures", CD_MTFACE);
}
static char *rna_MeshColorLayer_path(PointerRNA *ptr)
{
- return BLI_sprintfN("vcol_layers[%s]", ((CustomDataLayer*)ptr->data)->name);
+ return BLI_sprintfN("vertex_colors[%s]", ((CustomDataLayer*)ptr->data)->name);
}
static char *rna_MeshColor_path(PointerRNA *ptr)
{
- return rna_CustomDataData_path(ptr, "vcol_layers", CD_MCOL);
+ return rna_CustomDataData_path(ptr, "vertex_colors", CD_MCOL);
}
static char *rna_MeshSticky_path(PointerRNA *ptr)
@@ -628,10 +794,11 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_text(prop, "Location", "");
- /*prop= RNA_def_property(srna, "no", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_funcs(prop, "rna_MeshVertex_no_get", NULL, NULL);
+ prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_float_sdna(prop, NULL, "no");
+ RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Normal", "Vertex Normal");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
@@ -646,7 +813,7 @@ static void rna_def_mvert(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier 'Only Vertices' option");
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);
+ 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);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of.");
}
@@ -665,8 +832,8 @@ static void rna_def_medge(BlenderRNA *brna)
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
RNA_def_property_array(prop, 2);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
+ // XXX allows creating invalid meshes
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);
@@ -707,13 +874,12 @@ static void rna_def_mface(BlenderRNA *brna)
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
RNA_def_property_array(prop, 4);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
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_range(prop, 0, MAXMAT-1);
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -734,11 +900,11 @@ static void rna_def_mtface(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static const EnumPropertyItem transp_items[]= {
- {TF_SOLID, "OPAQUE", "Opaque", "Render color of textured face as color"},
- {TF_ADD, "ADD", "Add", "Render face transparent and add color of face"},
- {TF_ALPHA, "ALPHA", "Alpha", "Render polygon transparent, depending on alpha channel of the texture"},
- {TF_CLIP, "CLIPALPHA", "Clip Alpha", "Use the images alpha values clipped with no blending (binary alpha)"},
- {0, NULL, NULL, NULL}};
+ {TF_SOLID, "OPAQUE", 0, "Opaque", "Render color of textured face as color"},
+ {TF_ADD, "ADD", 0, "Add", "Render face transparent and add color of face"},
+ {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}};
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.");
@@ -747,6 +913,7 @@ static void rna_def_mtface(BlenderRNA *brna)
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", "");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
@@ -761,7 +928,7 @@ static void rna_def_mtface(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTextureFace");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTextureFaceLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTextureFaceLayer_data_length", 0, 0, 0, 0);
srna= RNA_def_struct(brna, "MeshTextureFace", NULL);
RNA_def_struct_sdna(srna, "MTFace");
@@ -779,10 +946,6 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX);
RNA_def_property_ui_text(prop, "Tex", "Render face with texture");
- prop= RNA_def_property(srna, "tiles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TILES);
- RNA_def_property_ui_text(prop, "Tiles", "Use tilemode for face");
-
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");
@@ -888,6 +1051,7 @@ static void rna_def_mcol(BlenderRNA *brna)
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", "");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
@@ -902,7 +1066,7 @@ static void rna_def_mcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshColorLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshColorLayer_data_length", 0, 0, 0, 0);
srna= RNA_def_struct(brna, "MeshColor", NULL);
RNA_def_struct_sdna(srna, "MCol");
@@ -911,21 +1075,25 @@ static void rna_def_mcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "color1", 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_color1_get", "rna_MeshColor_color1_set", NULL);
RNA_def_property_ui_text(prop, "Color 1", "");
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", "");
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", "");
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", "");
}
@@ -948,7 +1116,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshFloatPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshFloatPropertyLayer_data_length", 0, 0, 0, 0);
srna= RNA_def_struct(brna, "MeshFloatProperty", NULL);
RNA_def_struct_sdna(srna, "MFloatProperty");
@@ -972,7 +1140,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshIntPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshIntPropertyLayer_data_length", 0, 0, 0, 0);
srna= RNA_def_struct(brna, "MeshIntProperty", NULL);
RNA_def_struct_sdna(srna, "MIntProperty");
@@ -996,7 +1164,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshStringPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshStringPropertyLayer_data_length", 0, 0, 0, 0);
srna= RNA_def_struct(brna, "MeshStringProperty", NULL);
RNA_def_struct_sdna(srna, "MStringProperty");
@@ -1069,33 +1237,61 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MeshSticky");
RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
- prop= RNA_def_property(srna, "uv_layers", PROP_COLLECTION, PROP_NONE);
+ /* UV textures */
+
+ prop= RNA_def_property(srna, "uv_textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_layers_begin", 0, 0, 0, "rna_Mesh_uv_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0, 0, 0);
+ RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
+ RNA_def_property_ui_text(prop, "UV Textures", "");
+
+ prop= RNA_def_property(srna, "active_uv_texture", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
- RNA_def_property_ui_text(prop, "UV Layers", "");
+ RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_uv_texture_get", "rna_Mesh_active_uv_texture_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Active UV Texture", "Active UV texture.");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "active_uv_texture_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Mesh_active_uv_texture_index_get", "rna_Mesh_active_uv_texture_index_set", "rna_Mesh_active_uv_texture_index_range");
+ RNA_def_property_ui_text(prop, "Active UV Texture Index", "Active UV texture index.");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
- prop= RNA_def_property(srna, "vcol_layers", PROP_COLLECTION, PROP_NONE);
+ /* Vertex colors */
+
+ prop= RNA_def_property(srna, "vertex_colors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_vcol_layers_begin", 0, 0, 0, "rna_Mesh_vcol_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_vertex_colors_begin", 0, 0, 0, "rna_Mesh_vertex_colors_length", 0, 0, 0, 0);
+ RNA_def_property_struct_type(prop, "MeshColorLayer");
+ RNA_def_property_ui_text(prop, "Vertex Colors", "");
+
+ prop= RNA_def_property(srna, "active_vertex_color", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshColorLayer");
- RNA_def_property_ui_text(prop, "Vertex Color Layers", "");
+ RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_vertex_color_get", "rna_Mesh_active_vertex_color_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer.");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "active_vertex_color_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Mesh_active_vertex_color_index_get", "rna_Mesh_active_vertex_color_index_set", "rna_Mesh_active_vertex_color_index_range");
+ RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index.");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "float_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", 0, 0, 0, "rna_Mesh_float_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", 0, 0, 0, "rna_Mesh_float_layers_length", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MeshFloatPropertyLayer");
RNA_def_property_ui_text(prop, "Float Property Layers", "");
prop= RNA_def_property(srna, "int_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", 0, 0, 0, "rna_Mesh_int_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", 0, 0, 0, "rna_Mesh_int_layers_length", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MeshIntPropertyLayer");
RNA_def_property_ui_text(prop, "Int Property Layers", "");
prop= RNA_def_property(srna, "string_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", 0, 0, 0, "rna_Mesh_string_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", 0, 0, 0, "rna_Mesh_string_layers_length", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MeshStringPropertyLayer");
RNA_def_property_ui_text(prop, "String Property Layers", "");
@@ -1115,6 +1311,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "double_sided", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED);
RNA_def_property_ui_text(prop, "Double Sided", "Render/display the mesh with double or single sided lighting");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "texco_mesh", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
@@ -1126,6 +1323,8 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shape Keys", "");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
+
+ RNA_api_mesh(srna);
}
void RNA_def_mesh(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 472e776f500..5f95336af2d 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -47,12 +47,12 @@ void rna_def_metaelement(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {MB_BALL, "BALL", "Ball", ""},
- {MB_TUBE, "TUBE", "Tube", ""},
- {MB_PLANE, "PLANE", "Plane", ""},
- {MB_ELIPSOID, "ELLIPSOID", "Ellipsoid", ""}, // NOTE: typo at original definition!
- {MB_CUBE, "CUBE", "Cube", ""},
- {0, NULL, NULL, NULL}};
+ {MB_BALL, "BALL", 0, "Ball", ""},
+ {MB_TUBE, "TUBE", 0, "Tube", ""},
+ {MB_PLANE, "PLANE", 0, "Plane", ""},
+ {MB_ELIPSOID, "ELLIPSOID", 0, "Ellipsoid", ""}, // NOTE: typo at original definition!
+ {MB_CUBE, "CUBE", 0, "Cube", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MetaElement", NULL);
RNA_def_struct_sdna(srna, "MetaElem");
@@ -105,11 +105,11 @@ void rna_def_metaball(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_update_items[] = {
- {MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", "Always", "While editing, update metaball always."},
- {MB_UPDATE_HALFRES, "HALFRES", "Half Resolution", "While editing, update metaball in half resolution."},
- {MB_UPDATE_FAST, "FAST", "Fast", "While editing, update metaball without polygonization."},
- {MB_UPDATE_NEVER, "NEVER", "Never", "While editing, don't update metaball at all."},
- {0, NULL, NULL, NULL}};
+ {MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", 0, "Always", "While editing, update metaball always."},
+ {MB_UPDATE_HALFRES, "HALFRES", 0, "Half Resolution", "While editing, update metaball in half resolution."},
+ {MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization."},
+ {MB_UPDATE_NEVER, "NEVER", 0, "Never", "While editing, don't update metaball at all."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MetaBall", "ID");
RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces.");
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index be1e6a317a2..f207f4f605d 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -41,36 +41,37 @@
#include "WM_types.h"
EnumPropertyItem modifier_type_items[] ={
- {eModifierType_Armature, "ARMATURE", "Armature", ""},
- {eModifierType_Array, "ARRAY", "Array", ""},
- {eModifierType_Bevel, "BEVEL", "Bevel", ""},
- {eModifierType_Boolean, "BOOLEAN", "Boolean", ""},
- {eModifierType_Build, "BUILD", "Build", ""},
- {eModifierType_Cast, "CAST", "Cast", ""},
- {eModifierType_Cloth, "CLOTH", "Cloth", ""},
- {eModifierType_Collision, "COLLISION", "Collision", ""},
- {eModifierType_Curve, "CURVE", "Curve", ""},
- {eModifierType_Decimate, "DECIMATE", "Decimate", ""},
- {eModifierType_Displace, "DISPLACE", "Displace", ""},
- {eModifierType_EdgeSplit, "EDGE_SPLIT", "Edge Split", ""},
- {eModifierType_Explode, "EXPLODE", "Explode", ""},
- {eModifierType_Fluidsim, "FLUID_SIMULATION", "Fluid Simulation", ""},
- {eModifierType_Hook, "HOOK", "Hook", ""},
- {eModifierType_Lattice, "LATTICE", "Lattice", ""},
- {eModifierType_Mask, "MASK", "Mask", ""},
- {eModifierType_MeshDeform, "MESH_DEFORM", "Mesh Deform", ""},
- {eModifierType_Mirror, "MIRROR", "Mirror", ""},
- {eModifierType_Multires, "MULTIRES", "Multires", ""},
- {eModifierType_ParticleInstance, "PARTICLE_INSTANCE", "Particle Instance", ""},
- {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", "Particle System", ""},
- {eModifierType_Shrinkwrap, "SHRINKWRAP", "Shrinkwrap", ""},
- {eModifierType_SimpleDeform, "SIMPLE_DEFORM", "Simple Deform", ""},
- {eModifierType_Smooth, "SMOOTH", "Smooth", ""},
- {eModifierType_Softbody, "SOFTBODY", "Softbody", ""},
- {eModifierType_Subsurf, "SUBSURF", "Subsurf", ""},
- {eModifierType_UVProject, "UV_PROJECT", "UV Project", ""},
- {eModifierType_Wave, "WAVE", "Wave", ""},
- {0, NULL, NULL, NULL}};
+ {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_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, "Multires", ""},
+ {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_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
+ {eModifierType_Softbody, "SOFTBODY", ICON_MOD_SOFT, "Soft Body", ""},
+ {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subsurf", ""},
+ {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
@@ -82,7 +83,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*), 10, NULL);
+ rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), 10, 0, NULL);
}
static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
@@ -109,7 +110,7 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
case eModifierType_Hook:
return &RNA_HookModifier;
case eModifierType_Softbody:
- return &RNA_SoftbodyModifier;
+ return &RNA_SoftBodyModifier;
case eModifierType_Boolean:
return &RNA_BooleanModifier;
case eModifierType_Array:
@@ -148,6 +149,8 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
return &RNA_SimpleDeformModifier;
case eModifierType_Multires:
return &RNA_MultiresModifier;
+ case eModifierType_Surface:
+ return &RNA_SurfaceModifier;
default:
return &RNA_Modifier;
}
@@ -348,14 +351,26 @@ static void rna_ArrayModifier_curve_set(PointerRNA *ptr, PointerRNA value)
modifier_object_set(&((ArrayModifierData*)ptr->data)->curve_ob, OB_CURVE, value);
}
+static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
+}
+
+static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
+}
+
#else
static void rna_def_property_subdivision_common(StructRNA *srna, const char type[])
{
static EnumPropertyItem prop_subdivision_type_items[] = {
- {0, "CATMULL_CLARK", "Catmull-Clark", ""},
- {1, "SIMPLE", "Simple", ""},
- {0, NULL, NULL, NULL}};
+ {0, "CATMULL_CLARK", 0, "Catmull-Clark", ""},
+ {1, "SIMPLE", 0, "Simple", ""},
+ {0, NULL, 0, NULL, NULL}};
PropertyRNA *prop= RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, type);
@@ -378,14 +393,14 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
prop= RNA_def_property(srna, "levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "levels");
- RNA_def_property_range(prop, 1, 20);
+ 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, 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");
- RNA_def_property_range(prop, 1, 20);
+ RNA_def_property_range(prop, 1, 6);
RNA_def_property_ui_range(prop, 1, 6, 1, 0);
RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering.");
@@ -448,13 +463,13 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_deform_axis_items[] = {
- {MOD_CURVE_POSX, "POS_X", "X", ""},
- {MOD_CURVE_POSY, "POS_Y", "Y", ""},
- {MOD_CURVE_POSZ, "POS_Z", "Z", ""},
- {MOD_CURVE_NEGX, "NEG_X", "-X", ""},
- {MOD_CURVE_NEGY, "NEG_Y", "-Y", ""},
- {MOD_CURVE_NEGZ, "NEG_Z", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_CURVE_POSX, "POS_X", 0, "X", ""},
+ {MOD_CURVE_POSY, "POS_Y", 0, "Y", ""},
+ {MOD_CURVE_POSZ, "POS_Z", 0, "Z", ""},
+ {MOD_CURVE_NEGX, "NEG_X", 0, "-X", ""},
+ {MOD_CURVE_NEGY, "NEG_Y", 0, "-Y", ""},
+ {MOD_CURVE_NEGZ, "NEG_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier.");
@@ -491,7 +506,7 @@ static void rna_def_modifier_build(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 1, MAXFRAMEF);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -597,11 +612,11 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {MOD_WAV_MAP_LOCAL, "LOCAL", "Local", ""},
- {MOD_WAV_MAP_GLOBAL, "GLOBAL", "Global", ""},
- {MOD_WAV_MAP_OBJECT, "OBJECT", "Object", ""},
- {MOD_WAV_MAP_UV, "MAP_UV", "UV", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_WAV_MAP_LOCAL, "LOCAL", 0, "Local", ""},
+ {MOD_WAV_MAP_GLOBAL, "GLOBAL", 0, "Global", ""},
+ {MOD_WAV_MAP_OBJECT, "OBJECT", 0, "Object", ""},
+ {MOD_WAV_MAP_UV, "MAP_UV", 0, "UV", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WaveModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier.");
@@ -645,18 +660,18 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timeoffs");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "damp");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -669,14 +684,14 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "startx");
- RNA_def_property_range(prop, FLT_MIN, FLT_MAX);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starty");
- RNA_def_property_range(prop, FLT_MIN, FLT_MAX);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -717,13 +732,13 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
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_MIN, FLT_MAX);
+ 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, "Speed", "");
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_MIN, FLT_MAX);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -831,11 +846,17 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
static void rna_def_modifier_softbody(BlenderRNA *brna)
{
StructRNA *srna;
+ PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SoftbodyModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Softbody Modifier", "Softbody simulation modifier.");
+ srna= RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier.");
RNA_def_struct_sdna(srna, "SoftbodyModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SOFT);
+
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "SoftBodySettings");
+ RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Soft Body Settings", "");
}
static void rna_def_modifier_boolean(BlenderRNA *brna)
@@ -844,10 +865,10 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_operation_items[] = {
- {eBooleanModifierOp_Intersect, "INTERSECT", "Intersect", ""},
- {eBooleanModifierOp_Union, "UNION", "Union", ""},
- {eBooleanModifierOp_Difference, "DIFFERENCE", "Difference", ""},
- {0, NULL, NULL, NULL}};
+ {eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect", ""},
+ {eBooleanModifierOp_Union, "UNION", 0, "Union", ""},
+ {eBooleanModifierOp_Difference, "DIFFERENCE", 0, "Difference", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BooleanModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier.");
@@ -872,10 +893,10 @@ static void rna_def_modifier_array(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_fit_type_items[] = {
- {MOD_ARR_FIXEDCOUNT, "FIXED_COUNT", "Fixed Count", ""},
- {MOD_ARR_FITLENGTH, "FIT_LENGTH", "Fit Length", ""},
- {MOD_ARR_FITCURVE, "FIT_CURVE", "Fit Curve", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_ARR_FIXEDCOUNT, "FIXED_COUNT", 0, "Fixed Count", ""},
+ {MOD_ARR_FITLENGTH, "FIT_LENGTH", 0, "Fit Length", ""},
+ {MOD_ARR_FITCURVE, "FIT_CURVE", 0, "Fit Curve", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ArrayModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier.");
@@ -1005,19 +1026,19 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_direction_items[] = {
- {MOD_DISP_DIR_X, "X", "X", ""},
- {MOD_DISP_DIR_Y, "Y", "Y", ""},
- {MOD_DISP_DIR_Z, "Z", "Z", ""},
- {MOD_DISP_DIR_NOR, "NORMAL", "Normal", ""},
- {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", "RGB to XYZ", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_DISP_DIR_X, "X", 0, "X", ""},
+ {MOD_DISP_DIR_Y, "Y", 0, "Y", ""},
+ {MOD_DISP_DIR_Z, "Z", 0, "Z", ""},
+ {MOD_DISP_DIR_NOR, "NORMAL", 0, "Normal", ""},
+ {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", 0, "RGB to XYZ", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {MOD_DISP_MAP_LOCAL, "LOCAL", "Map", ""},
- {MOD_DISP_MAP_GLOBAL, "GLOBAL", "Global", ""},
- {MOD_DISP_MAP_OBJECT, "OBJECT", "Object", ""},
- {MOD_DISP_MAP_UV, "UV", "UV", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Map", ""},
+ {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", ""},
+ {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", ""},
+ {MOD_DISP_MAP_UV, "UV", 0, "UV", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DisplaceModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier.");
@@ -1042,7 +1063,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
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_MIN, FLT_MAX);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -1089,7 +1110,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
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);
+ 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);
@@ -1167,10 +1188,10 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_cast_type_items[] = {
- {MOD_CAST_TYPE_SPHERE, "SPHERE", "Sphere", ""},
- {MOD_CAST_TYPE_CYLINDER, "CYLINDER", "Cylinder", ""},
- {MOD_CAST_TYPE_CUBOID, "CUBOID", "Cuboid", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_CAST_TYPE_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {MOD_CAST_TYPE_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
+ {MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CastModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast modifier to cast to other shapes.");
@@ -1279,6 +1300,13 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem particleinstance_axis[] = {
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
srna= RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier.");
RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
@@ -1295,6 +1323,12 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Particle System Number", "");
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, 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);
@@ -1325,6 +1359,28 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
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, 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, 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, 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, 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_explode(BlenderRNA *brna)
@@ -1398,6 +1454,11 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision.");
RNA_def_struct_sdna(srna, "CollisionModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
+
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "CollisionSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_CollisionModifier_settings_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Settings", "");
prop= RNA_def_property(srna, "absorption", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "absorption");
@@ -1412,16 +1473,16 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_limit_method_items[] = {
- {0, "NONE", "None", "Bevel the entire mesh by a constant amount."},
- {BME_BEVEL_ANGLE, "ANGLE", "Angle", "Only bevel edges with sharp enough angles between faces."},
- {BME_BEVEL_WEIGHT, "WEIGHT", "Weight", "Use bevel weights to determine how much bevel is applied; apply them separately in vert/edge select mode."},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount."},
+ {BME_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces."},
+ {BME_BEVEL_WEIGHT, "WEIGHT", 0, "Weight", "Use bevel weights to determine how much bevel is applied; apply them separately in vert/edge select mode."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_edge_weight_method_items[] = {
- {0, "AVERAGE", "Average", ""},
- {BME_BEVEL_EMIN, "SHARPEST", "Sharpest", ""},
- {BME_BEVEL_EMAX, "LARGEST", "Largest", ""},
- {0, NULL, NULL, NULL}};
+ {0, "AVERAGE", 0, "Average", ""},
+ {BME_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
+ {BME_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BevelModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded.");
@@ -1465,10 +1526,10 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACEPOINT", "Nearest Surface Point", ""},
- {MOD_SHRINKWRAP_PROJECT, "PROJECT", "Project", ""},
- {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", "Nearest Vertex", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACEPOINT", 0, "Nearest Surface Point", ""},
+ {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", ""},
+ {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target.");
@@ -1524,7 +1585,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
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, 20);
+ 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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -1576,9 +1637,9 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", "Vertex Group", ""},
- {MOD_MASK_MODE_ARM, "ARMATURE", "Armature", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""},
+ {MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaskModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh.");
@@ -1615,11 +1676,11 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", "Twist", ""},
- {MOD_SIMPLEDEFORM_MODE_BEND, "BEND", "Bend", ""},
- {MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", "Taper", ""},
- {MOD_SIMPLEDEFORM_MODE_STRETCH, "STRETCH", "Stretch", ""},
- {0, NULL, NULL, NULL}};
+ {MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", 0, "Twist", ""},
+ {MOD_SIMPLEDEFORM_MODE_BEND, "BEND", 0, "Bend", ""},
+ {MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", 0, "Taper", ""},
+ {MOD_SIMPLEDEFORM_MODE_STRETCH, "STRETCH", 0, "Stretch", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending.");
@@ -1672,6 +1733,16 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
+static void rna_def_modifier_surface(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SurfaceModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Surface Modifier", "Surface modifier defining modifier stack position used for surface fields.");
+ RNA_def_struct_sdna(srna, "SurfaceModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
+}
+
void RNA_def_modifier(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1701,15 +1772,18 @@ void RNA_def_modifier(BlenderRNA *brna)
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, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_ui_icon(prop, ICON_VIEW3D, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render);
RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering.");
+ RNA_def_property_ui_icon(prop, ICON_SCENE, 0);
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, 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);
@@ -1751,6 +1825,7 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_mask(brna);
rna_def_modifier_simpledeform(brna);
rna_def_modifier_multires(brna);
+ rna_def_modifier_surface(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 8a90af69641..b35b02b2063 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -76,6 +76,7 @@ typedef struct NodeInfo
const char *enum_name;
const char *struct_name;
const char *base_name;
+ int icon;
const char *ui_name;
const char *ui_desc;
} NodeInfo;
@@ -146,6 +147,7 @@ static EnumPropertyItem* alloc_node_type_items(int category)
if(node->defined && node->category == category) {
item->value = i;
item->identifier = node->enum_name;
+ item->icon = node->icon;
item->name = node->ui_name;
item->description = node->ui_desc;
@@ -173,25 +175,25 @@ static void def_math(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem items[] = {
- { 0, "ADD", "Add", ""},
- { 1, "SUBTRACT", "Subtract", ""},
- { 2, "MULTIPLY", "Multiply", ""},
- { 3, "DIVIDE", "Divide", ""},
- { 4, "SINE", "Sine", ""},
- { 5, "COSINE", "Cosine", ""},
- { 6, "TANGENT", "Tangent", ""},
- { 7, "ARCSINE", "Arcsine", ""},
- { 8, "ARCCOSINE", "Arccosine", ""},
- { 9, "ARCTANGENT", "Arctangent", ""},
- {10, "POWER", "Power", ""},
- {11, "LOGARITHM", "Logarithm", ""},
- {12, "MINIMUM", "Minimum", ""},
- {13, "MAXIMUM", "Maximum", ""},
- {14, "ROUND", "Round", ""},
- {15, "LESS_THAN", "Less Than", ""},
- {16, "GREATER_THAN", "Greater Than", ""},
+ { 0, "ADD", 0, "Add", ""},
+ { 1, "SUBTRACT", 0, "Subtract", ""},
+ { 2, "MULTIPLY", 0, "Multiply", ""},
+ { 3, "DIVIDE", 0, "Divide", ""},
+ { 4, "SINE", 0, "Sine", ""},
+ { 5, "COSINE", 0, "Cosine", ""},
+ { 6, "TANGENT", 0, "Tangent", ""},
+ { 7, "ARCSINE", 0, "Arcsine", ""},
+ { 8, "ARCCOSINE", 0, "Arccosine", ""},
+ { 9, "ARCTANGENT", 0, "Arctangent", ""},
+ {10, "POWER", 0, "Power", ""},
+ {11, "LOGARITHM", 0, "Logarithm", ""},
+ {12, "MINIMUM", 0, "Minimum", ""},
+ {13, "MAXIMUM", 0, "Maximum", ""},
+ {14, "ROUND", 0, "Round", ""},
+ {15, "LESS_THAN", 0, "Less Than", ""},
+ {16, "GREATER_THAN", 0, "Greater Than", ""},
- {0, NULL, NULL, NULL}
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
@@ -205,14 +207,14 @@ static void def_vector_math(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem items[] = {
- {0, "ADD", "Add", ""},
- {1, "SUBTRACT", "Subtract", ""},
- {2, "AVERAGE", "Average", ""},
- {3, "DOT_PRODUCT", "Dot Product", ""},
- {4, "CROSS_PRODUCT", "Cross Product", ""},
- {5, "NORMALIZE", "Normalize", ""},
+ {0, "ADD", 0, "Add", ""},
+ {1, "SUBTRACT", 0, "Subtract", ""},
+ {2, "AVERAGE", 0, "Average", ""},
+ {3, "DOT_PRODUCT", 0, "Dot Product", ""},
+ {4, "CROSS_PRODUCT", 0, "Cross Product", ""},
+ {5, "NORMALIZE", 0, "Normalize", ""},
- {0, NULL, NULL, NULL}
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
@@ -275,23 +277,23 @@ static void def_mix_rgb(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem blend_type_items[] = {
- { 0, "MIX", "Mix", ""},
- { 1, "ADD", "Add", ""},
- { 3, "SUBTRACT", "Subtract", ""},
- { 2, "MULTIPLY", "Multiply", ""},
- { 4, "SCREEN", "Screen", ""},
- { 9, "OVERLAY", "Overlay", ""},
- { 5, "DIVIDE", "Divide", ""},
- { 6, "DIFFERENCE", "Difference", ""},
- { 7, "DARKEN", "Darken", ""},
- { 8, "LIGHTEN", "Lighten", ""},
- {10, "DODGE", "Dodge", ""},
- {11, "BURN", "Burn", ""},
- {15, "COLOR", "Color", ""},
- {14, "VALUE", "Value", ""},
- {13, "SATURATION", "Saturation", ""},
- {12, "HUE", "Hue", ""},
- {0, NULL, NULL, NULL}
+ { 0, "MIX", 0, "Mix", ""},
+ { 1, "ADD", 0, "Add", ""},
+ { 3, "SUBTRACT", 0, "Subtract", ""},
+ { 2, "MULTIPLY", 0, "Multiply", ""},
+ { 4, "SCREEN", 0, "Screen", ""},
+ { 9, "OVERLAY", 0, "Overlay", ""},
+ { 5, "DIVIDE", 0, "Divide", ""},
+ { 6, "DIFFERENCE", 0, "Difference", ""},
+ { 7, "DARKEN", 0, "Darken", ""},
+ { 8, "LIGHTEN", 0, "Lighten", ""},
+ {10, "DODGE", 0, "Dodge", ""},
+ {11, "BURN", 0, "Burn", ""},
+ {15, "COLOR", 0, "Color", ""},
+ {14, "VALUE", 0, "Value", ""},
+ {13, "SATURATION", 0, "Saturation", ""},
+ {12, "HUE", 0, "Hue", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
@@ -393,15 +395,15 @@ static void def_cmp_blur(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem filter_type_items[] = {
- {R_FILTER_BOX, "FLAT", "Flat", ""},
- {R_FILTER_TENT, "TENT", "Tent", ""},
- {R_FILTER_QUAD, "QUAD", "Quadratic", ""},
- {R_FILTER_CUBIC, "CUBIC", "Cubic", ""},
- {R_FILTER_GAUSS, "GAUSS", "Gaussian", ""},
- {R_FILTER_FAST_GAUSS, "FAST_GAUSS", "Fast Gaussian", ""},
- {R_FILTER_CATROM, "CATROM", "Catrom", ""},
- {R_FILTER_MITCH, "MITCH", "Mitch", ""},
- {0, NULL, NULL, NULL}
+ {R_FILTER_BOX, "FLAT", 0, "Flat", ""},
+ {R_FILTER_TENT, "TENT", 0, "Tent", ""},
+ {R_FILTER_QUAD, "QUAD", 0, "Quadratic", ""},
+ {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
+ {R_FILTER_GAUSS, "GAUSS", 0, "Gaussian", ""},
+ {R_FILTER_FAST_GAUSS, "FAST_GAUSS", 0, "Fast Gaussian", ""},
+ {R_FILTER_CATROM, "CATROM", 0, "Catrom", ""},
+ {R_FILTER_MITCH, "MITCH", 0, "Mitch", ""},
+ {0, NULL, 0, NULL, NULL}
};
RNA_def_struct_sdna_from(srna, "NodeBlurData", "storage");
@@ -471,14 +473,14 @@ static void def_cmp_filter(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {0, "SOFTEN", "Soften", ""},
- {1, "SHARPEN", "Sharpen", ""},
- {2, "LAPLACE", "Laplace", ""},
- {3, "SOBEL", "Sobel", ""},
- {4, "PREWITT", "Prewitt", ""},
- {5, "KIRSCH", "Kirsch", ""},
- {6, "SHADOW", "Shadow", ""},
- {0, NULL, NULL, NULL}
+ {0, "SOFTEN", 0, "Soften", ""},
+ {1, "SHARPEN", 0, "Sharpen", ""},
+ {2, "LAPLACE", 0, "Laplace", ""},
+ {3, "SOBEL", 0, "Sobel", ""},
+ {4, "PREWITT", 0, "Prewitt", ""},
+ {5, "KIRSCH", 0, "Kirsch", ""},
+ {6, "SHADOW", 0, "Shadow", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -550,11 +552,11 @@ static void def_cmp_image(StructRNA *srna)
PropertyRNA *prop;
/*static EnumPropertyItem type_items[] = {
- {IMA_SRC_FILE, "IMAGE", "Image", ""},
+ {IMA_SRC_FILE, "IMAGE", 0, "Image", ""},
{IMA_SRC_MOVIE, "MOVIE", "Movie", ""},
{IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""},
{IMA_SRC_GENERATED, "GENERATED", "Generated", ""},
- {0, NULL, NULL, NULL}
+ {0, NULL, 0, NULL, NULL}
};*/
prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
@@ -627,26 +629,26 @@ static void def_cmp_output_file(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {R_TARGA, "TARGA", "Targa", ""},
- {R_RAWTGA, "RAW_TARGA", "Targa Raw", ""},
- {R_PNG, "PNG", "PNG", ""},
- {R_BMP, "BMP", "BMP", ""},
- {R_JPEG90, "JPEG", "JPEG", ""},
- {R_IRIS, "IRIS", "IRIS", ""},
- {R_RADHDR, "RADIANCE_HDR", "Radiance HDR", ""},
- {R_CINEON, "CINEON", "Cineon", ""},
- {R_DPX, "DPX", "DPX", ""},
- {R_OPENEXR, "OPENEXR", "OpenEXR", ""},
- {0, NULL, NULL, NULL}
+ {R_TARGA, "TARGA", 0, "Targa", ""},
+ {R_RAWTGA, "RAW_TARGA", 0, "Targa Raw", ""},
+ {R_PNG, "PNG", 0, "PNG", ""},
+ {R_BMP, "BMP", 0, "BMP", ""},
+ {R_JPEG90, "JPEG", 0, "JPEG", ""},
+ {R_IRIS, "IRIS", 0, "IRIS", ""},
+ {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
+ {R_CINEON, "CINEON", 0, "Cineon", ""},
+ {R_DPX, "DPX", 0, "DPX", ""},
+ {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem openexr_codec_items[] = {
- {0, "NONE", "None", ""},
- {1, "PXR24", "Pxr24 (lossy)", ""},
- {2, "ZIP", "ZIP (lossless)", ""},
- {3, "PIZ", "PIX (lossless)", ""},
- {4, "RLE", "RLE (lossless)", ""},
- {0, NULL, NULL, NULL}
+ {0, "NONE", 0, "None", ""},
+ {1, "PXR24", 0, "Pxr24 (lossy)", ""},
+ {2, "ZIP", 0, "ZIP (lossless)", ""},
+ {3, "PIZ", 0, "PIX (lossless)", ""},
+ {4, "RLE", 0, "RLE (lossless)", ""},
+ {0, NULL, 0, NULL, NULL}
};
RNA_def_struct_sdna_from(srna, "NodeImageFile", "storage");
@@ -702,10 +704,10 @@ static void def_cmp_scale(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem space_items[] = {
- {0, "RELATIVE", "Relative", ""},
- {1, "ABSOLUTE", "Absolute", ""},
- {2, "SCENE_SIZE", "Scene Size", ""},
- {0, NULL, NULL, NULL}
+ {0, "RELATIVE", 0, "Relative", ""},
+ {1, "ABSOLUTE", 0, "Absolute", ""},
+ {2, "SCENE_SIZE", 0, "Scene Size", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
@@ -719,11 +721,11 @@ static void def_cmp_diff_matte(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem color_space_items[] = {
- {1, "RGB", "RGB", ""},
- {2, "HSV", "HSV", ""},
- {3, "YUV", "YUV", ""},
- {4, "YCC", "YCbCr", ""},
- {0, NULL, NULL, NULL}
+ {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, "color_space", PROP_ENUM, PROP_NONE);
@@ -757,10 +759,10 @@ static void def_cmp_color_spill(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem channel_items[] = {
- {1, "R", "Red", ""},
- {2, "G", "Green", ""},
- {3, "B", "Blue", ""},
- {0, NULL, NULL, NULL}
+ {1, "R", 0, "Red", ""},
+ {2, "G", 0, "Green", ""},
+ {3, "B", 0, "Blue", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
@@ -812,11 +814,11 @@ static void def_cmp_channel_matte(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem color_space_items[] = {
- {1, "RGB", "RGB", ""},
- {2, "HSV", "HSV", ""},
- {3, "YUV", "YUV", ""},
- {4, "YCC", "YCbCr", ""},
- {0, NULL, NULL, NULL}
+ {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, "color_space", PROP_ENUM, PROP_NONE);
@@ -850,10 +852,10 @@ static void def_cmp_flip(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem axis_items[] = {
- {0, "X", "X", ""},
- {1, "Y", "Y", ""},
- {2, "XY", "X & Y", ""},
- {0, NULL, NULL, NULL}
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "XY", 0, "X & Y", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
@@ -867,9 +869,9 @@ static void def_cmp_splitviewer(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem axis_items[] = {
- {0, "X", "X", ""},
- {1, "Y", "Y", ""},
- {0, NULL, NULL, NULL}
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
@@ -907,14 +909,14 @@ static void def_cmp_defocus(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem bokeh_items[] = {
- {8, "OCTAGON", "Octagonal", "8 sides"},
- {7, "HEPTAGON", "Heptagonal", "7 sides"},
- {6, "HEXAGON", "Hexagonal", "6 sides"},
- {5, "PENTAGON", "Pentagonal", "5 sides"},
- {4, "SQUARE", "Square", "4 sides"},
- {3, "TRIANGLE", "Triangular", "3 sides"},
- {0, "CIRCLE", "Circular", ""},
- {0, NULL, NULL, NULL}
+ {8, "OCTAGON", 0, "Octagonal", "8 sides"},
+ {7, "HEPTAGON", 0, "Heptagonal", "7 sides"},
+ {6, "HEXAGON", 0, "Hexagonal", "6 sides"},
+ {5, "PENTAGON", 0, "Pentagonal", "5 sides"},
+ {4, "SQUARE", 0, "Square", "4 sides"},
+ {3, "TRIANGLE", 0, "Triangular", "3 sides"},
+ {0, "CIRCLE", 0, "Circular", ""},
+ {0, NULL, 0, NULL, NULL}
};
RNA_def_struct_sdna_from(srna, "NodeDefocus", "storage");
@@ -1085,9 +1087,9 @@ static void def_cmp_premul_key(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {0, "KEY_TO_PREMUL", "Key to Premul", ""},
- {1, "PREMUL_TO_KEY", "Premul to Key", ""},
- {0, NULL, NULL, NULL}
+ {0, "KEY_TO_PREMUL", 0, "Key to Premul", ""},
+ {1, "PREMUL_TO_KEY", 0, "Premul to Key", ""},
+ {0, NULL, 0, NULL, NULL}
};
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -1102,18 +1104,18 @@ static void def_cmp_glare(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {3, "GHOSTS", "Ghosts", ""},
- {2, "STREAKS", "Streaks", ""},
- {1, "FOG_GLOW", "Fog Glow", ""},
- {0, "SIMPLE_STAR", "Simple Star", ""},
- {0, NULL, NULL, NULL}
+ {3, "GHOSTS", 0, "Ghosts", ""},
+ {2, "STREAKS", 0, "Streaks", ""},
+ {1, "FOG_GLOW", 0, "Fog Glow", ""},
+ {0, "SIMPLE_STAR", 0, "Simple Star", ""},
+ {0, NULL, 0, NULL, NULL}
};
/*static EnumPropertyItem quality_items[] = {
- {0, "HIGH", "High", ""},
- {1, "MEDIUM", "Medium", ""},
- {2, "LOW", "Low", ""},
- {0, NULL, NULL, NULL}
+ {0, "HIGH", 0, "High", ""},
+ {1, "MEDIUM", 0, "Medium", ""},
+ {2, "LOW", 0, "Low", ""},
+ {0, NULL, 0, NULL, NULL}
};*/
RNA_def_struct_sdna_from(srna, "NodeGlare", "storage");
@@ -1172,9 +1174,9 @@ static void def_cmp_tonemap(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {1, "RD_PHOTORECEPTOR", "R/D Photoreceptor", ""},
- {0, "RH_SIMPLE", "Rh Simple", ""},
- {0, NULL, NULL, NULL}
+ {1, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
+ {0, "RH_SIMPLE", 0, "Rh Simple", ""},
+ {0, NULL, 0, NULL, NULL}
};
RNA_def_struct_sdna_from(srna, "NodeTonemap", "storage");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 08eca7b0528..33e8c1fbd26 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@@ -33,6 +34,7 @@
#include "DNA_customdata_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
+#include "DNA_object_force.h"
#include "DNA_object_types.h"
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
@@ -41,20 +43,24 @@
#ifdef RNA_RUNTIME
+#include "DNA_key_types.h"
+
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
+#include "BKE_effect.h"
+#include "BKE_key.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_particle.h"
-static void rna_Object_update(bContext *C, PointerRNA *ptr)
+void rna_Object_update(bContext *C, PointerRNA *ptr)
{
DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
}
-static void rna_Object_update_data(bContext *C, PointerRNA *ptr)
+void rna_Object_update_data(bContext *C, PointerRNA *ptr)
{
DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
@@ -92,7 +98,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
ob->data= id;
test_object_materials(id);
- if(GS(id->name)==ID_CU )
+ if(GS(id->name)==ID_CU)
test_curve_type(ob);
else if(ob->type==OB_ARMATURE)
armature_rebuild_pose(ob, ob->data);
@@ -130,6 +136,27 @@ static PointerRNA rna_Object_active_vertex_group_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_VertexGroup, BLI_findlink(&ob->defbase, ob->actdef));
}
+static int rna_Object_active_vertex_group_index_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return MAX2(ob->actdef-1, 0);
+}
+
+static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ob->actdef= value+1;
+}
+
+static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ *min= 0;
+ *max= BLI_countlist(&ob->defbase)-1;
+ *max= MAX2(0, *max);
+}
+
void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
{
Object *ob= (Object*)ptr->id.data;
@@ -227,11 +254,23 @@ void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *res
BLI_strncpy(result, "", maxlen);
}
+static int rna_Object_active_material_index_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return MAX2(ob->actcol-1, 0);
+}
+
+static void rna_Object_active_material_index_set(PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ob->actcol= value+1;
+}
+
static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max)
{
Object *ob= (Object*)ptr->id.data;
- *min= 1;
- *max= ob->totcol;
+ *min= 0;
+ *max= MAX2(ob->totcol-1, 0);
}
static PointerRNA rna_Object_active_material_get(PointerRNA *ptr)
@@ -240,6 +279,26 @@ static PointerRNA rna_Object_active_material_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_MaterialSlot, ob->mat+ob->actcol);
}
+static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Object *ob= (Object*)ptr->id.data;
+ *min= 0;
+ *max= BLI_countlist(&ob->particlesystem)-1;
+ *max= MAX2(0, *max);
+}
+
+static int rna_Object_active_particle_system_index_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return psys_get_current_num(ob);
+}
+
+static void rna_Object_active_particle_system_index_set(struct PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+ psys_set_current_num(ob, value);
+}
+
#if 0
static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
{
@@ -272,7 +331,7 @@ static int rna_MaterialSlot_link_get(PointerRNA *ptr)
Object *ob= (Object*)ptr->id.data;
int index= (Material**)ptr->data - ob->mat;
- return (ob->colbits & (1<<index)) != 0;
+ return ob->matbits[index] != 0;
}
static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value)
@@ -280,10 +339,14 @@ static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value)
Object *ob= (Object*)ptr->id.data;
int index= (Material**)ptr->data - ob->mat;
- if(value)
+ if(value) {
+ ob->matbits[index]= 1;
ob->colbits |= (1<<index);
- else
+ }
+ else {
+ ob->matbits[index]= 0;
ob->colbits &= ~(1<<index);
+ }
}
static int rna_MaterialSlot_name_length(PointerRNA *ptr)
@@ -364,6 +427,78 @@ static void rna_GameObjectSettings_state_set(PointerRNA *ptr, const int *values)
}
}
+static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Object *ob= (Object*)ptr->id.data;
+ Key *key= ob_get_key(ob);
+
+ *min= 0;
+ *max= (key)? BLI_countlist(&key->block)-1: 0;
+ *max= MAX2(0, *max);
+}
+
+static int rna_Object_active_shape_key_index_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ return MAX2(ob->shapenr-1, 0);
+}
+
+static void rna_Object_active_shape_key_index_set(PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ ob->shapenr= value+1;
+ ob->shapeflag |= OB_SHAPE_TEMPLOCK;
+}
+
+static PointerRNA rna_Object_active_shape_key_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ Key *key= ob_get_key(ob);
+ KeyBlock *kb;
+ PointerRNA keyptr;
+
+ if(key==NULL)
+ return PointerRNA_NULL;
+
+ kb= BLI_findlink(&key->block, ob->shapenr-1);
+ RNA_pointer_create(&key->id, &RNA_ShapeKey, kb, &keyptr);
+ return keyptr;
+}
+
+static void rna_Object_shape_key_lock_set(PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ if(value) ob->shapeflag |= OB_SHAPE_LOCK;
+ else ob->shapeflag &= ~OB_SHAPE_LOCK;
+
+ ob->shapeflag &= ~OB_SHAPE_TEMPLOCK;
+}
+
+static PointerRNA rna_Object_field_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ /* weak */
+ if(!ob->pd)
+ ob->pd= object_add_collision_fields();
+
+ return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, ob->pd);
+}
+
+static PointerRNA rna_Object_collision_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ /* weak */
+ if(!ob->pd)
+ ob->pd= object_add_collision_fields();
+
+ return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
+}
+
#else
static void rna_def_vertex_group(BlenderRNA *brna)
@@ -392,9 +527,9 @@ static void rna_def_material_slot(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem link_items[] = {
- {0, "DATA", "Data", ""},
- {1, "OBJECT", "Object", ""},
- {0, NULL, NULL, NULL}};
+ {1, "OBJECT", 0, "Object", ""},
+ {0, "DATA", 0, "Data", ""},
+ {0, NULL, 0, NULL, NULL}};
/* NOTE: there is no MaterialSlot equivalent in DNA, so the internal
* pointer data points to ob->mat + index, and we manually implement
@@ -409,11 +544,13 @@ static void rna_def_material_slot(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL);
RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update");
prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, link_items);
RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL);
RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL);
@@ -428,22 +565,22 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem body_type_items[] = {
- {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", "No Collision", ""},
- {OB_BODY_TYPE_STATIC, "STATIC", "Static", ""},
- {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", "Dynamic", ""},
- {OB_BODY_TYPE_RIGID, "RIGID_BODY", "Rigid Body", ""},
- {OB_BODY_TYPE_SOFT, "SOFT_BODY", "Soft Body", ""},
- {0, NULL, NULL, NULL}};
+ {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", ""},
+ {OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", ""},
+ {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", ""},
+ {OB_BODY_TYPE_RIGID, "RIGID_BODY", 0, "Rigid Body", ""},
+ {OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, "Soft Body", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem collision_bounds_items[] = {
- {OB_BOUND_BOX, "BOX", "Box", ""},
- {OB_BOUND_SPHERE, "SPHERE", "Sphere", ""},
- {OB_BOUND_CYLINDER, "CYLINDER", "Cylinder", ""},
- {OB_BOUND_CONE, "CONE", "Cone", ""},
- {OB_BOUND_POLYH, "CONVEX_HULL", "Convex Hull", ""},
- {OB_BOUND_POLYT, "TRIANGLE_MESH", "Triangle Mesh", ""},
- //{OB_DYN_MESH, "DYNAMIC_MESH", "Dynamic Mesh", ""},
- {0, NULL, NULL, NULL}};
+ {OB_BOUND_BOX, "BOX", 0, "Box", ""},
+ {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
+ {OB_BOUND_CONE, "CONE", 0, "Cone", ""},
+ {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}};
srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
RNA_def_struct_sdna(srna, "Object");
@@ -522,6 +659,49 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping.");
+ prop= RNA_def_property(srna, "minimum_velocity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_vel");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still).");
+
+ prop= RNA_def_property(srna, "maximum_velocity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_vel");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed.");
+
+ /* lock position */
+ prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_AXIS);
+ RNA_def_property_ui_text(prop, "Lock X Axis", "Disable simulation of linear motion along the X axis.");
+
+ prop= RNA_def_property(srna, "lock_y_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_AXIS);
+ RNA_def_property_ui_text(prop, "Lock Y Axis", "Disable simulation of linear motion along the Y axis.");
+
+ prop= RNA_def_property(srna, "lock_z_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_AXIS);
+ RNA_def_property_ui_text(prop, "Lock Z Axis", "Disable simulation of linear motion along the Z axis.");
+
+
+ /* lock rotation */
+ prop= RNA_def_property(srna, "lock_x_rot_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_ROT_AXIS);
+ RNA_def_property_ui_text(prop, "Lock X Rotation Axis", "Disable simulation of angular motion along the X axis.");
+
+ prop= RNA_def_property(srna, "lock_y_rot_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_ROT_AXIS);
+ RNA_def_property_ui_text(prop, "Lock Y Rotation Axis", "Disable simulation of angular motion along the Y axis.");
+
+ prop= RNA_def_property(srna, "lock_z_rot_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_ROT_AXIS);
+ RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis.");
+
+ /* is this used anywhere ? */
+ prop= RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflag2", OB_NEVER_DO_ACTIVITY_CULLING);
+ RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis.");
+
+
prop= RNA_def_property(srna, "do_fh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH);
RNA_def_property_ui_text(prop, "Do Fh", "Use Fh settings in materials.");
@@ -584,84 +764,84 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Debug State", "Print state debug info in the game engine.");
}
-static StructRNA *rna_def_object(BlenderRNA *brna)
+static void rna_def_object(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem parent_type_items[] = {
- {PAROBJECT, "OBJECT", "Object", ""},
- {PARCURVE, "CURVE", "Curve", ""},
- //{PARKEY, "KEY", "Key", ""},
- {PARSKEL, "ARMATURE", "Armature", ""},
- {PARSKEL, "LATTICE", "Lattice", ""}, // PARSKEL reuse will give issues
- {PARVERT1, "VERTEX", "Vertex", ""},
- {PARVERT3, "VERTEX_3", "3 Vertices", ""},
- {PARBONE, "BONE", "Bone", ""},
- {0, NULL, NULL, NULL}};
+ {PAROBJECT, "OBJECT", 0, "Object", ""},
+ {PARCURVE, "CURVE", 0, "Curve", ""},
+ //{PARKEY, "KEY", 0, "Key", ""},
+ {PARSKEL, "ARMATURE", 0, "Armature", ""},
+ {PARSKEL, "LATTICE", 0, "Lattice", ""}, // PARSKEL reuse will give issues
+ {PARVERT1, "VERTEX", 0, "Vertex", ""},
+ {PARVERT3, "VERTEX_3", 0, "3 Vertices", ""},
+ {PARBONE, "BONE", 0, "Bone", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem object_type_items[] = {
- {OB_EMPTY, "EMPTY", "Empty", ""},
- {OB_MESH, "MESH", "Mesh", ""},
- {OB_CURVE, "CURVE", "Curve", ""},
- {OB_SURF, "SURFACE", "Surface", ""},
- {OB_FONT, "TEXT", "Text", ""},
- {OB_MBALL, "META", "Meta", ""},
- {OB_LAMP, "LAMP", "Lamp", ""},
- {OB_CAMERA, "CAMERA", "Camera", ""},
- {OB_WAVE, "WAVE", "Wave", ""},
- {OB_LATTICE, "LATTICE", "Lattice", ""},
- {OB_ARMATURE, "ARMATURE", "Armature", ""},
- {0, NULL, NULL, NULL}};
+ {OB_EMPTY, "EMPTY", 0, "Empty", ""},
+ {OB_MESH, "MESH", 0, "Mesh", ""},
+ {OB_CURVE, "CURVE", 0, "Curve", ""},
+ {OB_SURF, "SURFACE", 0, "Surface", ""},
+ {OB_FONT, "TEXT", 0, "Text", ""},
+ {OB_MBALL, "META", 0, "Meta", ""},
+ {OB_LAMP, "LAMP", 0, "Lamp", ""},
+ {OB_CAMERA, "CAMERA", 0, "Camera", ""},
+ {OB_WAVE, "WAVE", 0, "Wave", ""},
+ {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
+ {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem empty_drawtype_items[] = {
- {OB_ARROWS, "ARROWS", "Arrows", ""},
- {OB_SINGLE_ARROW, "SINGLE_ARROW", "Single Arrow", ""},
- {OB_PLAINAXES, "PLAIN_AXES", "Plain Axes", ""},
- {OB_CIRCLE, "CIRCLE", "Circle", ""},
- {OB_CUBE, "CUBE", "Cube", ""},
- {OB_EMPTY_SPHERE, "SPHERE", "Sphere", ""},
- {OB_EMPTY_CONE, "CONE", "Cone", ""},
- {0, NULL, NULL, NULL}};
+ {OB_ARROWS, "ARROWS", 0, "Arrows", ""},
+ {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
+ {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
+ {OB_CIRCLE, "CIRCLE", 0, "Circle", ""},
+ {OB_CUBE, "CUBE", 0, "Cube", ""},
+ {OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {OB_EMPTY_CONE, "CONE", 0, "Cone", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem track_items[] = {
- {OB_POSX, "POSX", "+X", ""},
- {OB_POSY, "POSY", "+Y", ""},
- {OB_POSZ, "POSZ", "+Z", ""},
- {OB_NEGX, "NEGX", "-X", ""},
- {OB_NEGY, "NEGY", "-Y", ""},
- {OB_NEGZ, "NEGZ", "-Z", ""},
- {0, NULL, NULL, NULL}};
+ {OB_POSX, "POSX", 0, "+X", ""},
+ {OB_POSY, "POSY", 0, "+Y", ""},
+ {OB_POSZ, "POSZ", 0, "+Z", ""},
+ {OB_NEGX, "NEGX", 0, "-X", ""},
+ {OB_NEGY, "NEGY", 0, "-Y", ""},
+ {OB_NEGZ, "NEGZ", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem up_items[] = {
- {OB_POSX, "X", "X", ""},
- {OB_POSY, "Y", "Y", ""},
- {OB_POSZ, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};
+ {OB_POSX, "X", 0, "X", ""},
+ {OB_POSY, "Y", 0, "Y", ""},
+ {OB_POSZ, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem drawtype_items[] = {
- {OB_BOUNDBOX, "BOUNDS", "Bounds", ""},
- {OB_WIRE, "WIRE", "Wire", ""},
- {OB_SOLID, "SOLID", "Solid", ""},
- {OB_SHADED, "SHADED", "Shaded", ""},
- {OB_TEXTURE, "TEXTURED", "Textured", ""},
- {0, NULL, NULL, NULL}};
+ {OB_BOUNDBOX, "BOUNDS", 0, "Bounds", ""},
+ {OB_WIRE, "WIRE", 0, "Wire", ""},
+ {OB_SOLID, "SOLID", 0, "Solid", ""},
+ {OB_SHADED, "SHADED", 0, "Shaded", ""},
+ {OB_TEXTURE, "TEXTURED", 0, "Textured", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem boundtype_items[] = {
- {OB_BOUND_BOX, "BOX", "Box", ""},
- {OB_BOUND_SPHERE, "SPHERE", "Sphere", ""},
- {OB_BOUND_CYLINDER, "CYLINDER", "Cylinder", ""},
- {OB_BOUND_CONE, "CONE", "Cone", ""},
- {OB_BOUND_POLYH, "POLYHEDER", "Polyheder", ""},
- {0, NULL, NULL, NULL}};
+ {OB_BOUND_BOX, "BOX", 0, "Box", ""},
+ {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
+ {OB_BOUND_CONE, "CONE", 0, "Cone", ""},
+ {OB_BOUND_POLYH, "POLYHEDER", 0, "Polyheder", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dupli_items[] = {
- {0, "NONE", "None", ""},
- {OB_DUPLIFRAMES, "FRAMES", "Frames", "Make copy of object for every frame."},
- {OB_DUPLIVERTS, "VERTS", "Verts", "Duplicate child objects on all vertices."},
- {OB_DUPLIFACES, "FACES", "Faces", "Duplicate child objects on all faces."},
- {OB_DUPLIGROUP, "GROUP", "Group", "Enable group instancing."},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame."},
+ {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices."},
+ {OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces."},
+ {OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Object", "ID");
RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene..");
@@ -739,7 +919,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", 0, 0, 0); /* don't dereference pointer! */
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", 0, 0, 0, 0, 0); /* don't dereference pointer! */
RNA_def_property_ui_text(prop, "Materials", "Material slots in the object.");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
@@ -749,7 +929,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "actcol");
- RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Object_active_material_index_range");
+ 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.");
/* transform */
@@ -799,6 +979,12 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
+ /* matrix */
+ prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_float_sdna(prop, NULL, "obmat");
+ RNA_def_property_array(prop, 16);
+ RNA_def_property_ui_text(prop, "Matrix", "Transformation matrix.");
+
/* collections */
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
@@ -824,8 +1010,15 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_vertex_group", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "VertexGroup");
- RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get", NULL, NULL);
+ 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* empty */
@@ -856,11 +1049,13 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "field", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "FieldSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Object_field_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the objects as a field in physics simulation.");
prop= RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "CollisionSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Object_collision_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the objects as a collider in physics simulation.");
prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
@@ -877,6 +1072,10 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Object_active_particle_system_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Particle System", "Active particle system being displayed");
+ prop= RNA_def_property(srna, "active_particle_system_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Object_active_particle_system_index_get", "rna_Object_active_particle_system_index_set", "rna_Object_active_particle_system_index_range");
+ RNA_def_property_ui_text(prop, "Active Particle System Index", "Index of active particle system slot.");
+
/* restrict */
prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
@@ -975,7 +1174,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sf");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for IPO's and dupligroup instances.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
@@ -1069,42 +1268,27 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Mode", "Object with armature data is in pose mode.");
- // XXX this stuff should be moved to AnimData...
-/*
- prop= RNA_def_property(srna, "nla_disable_path", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_DISABLE_PATH);
- RNA_def_property_ui_text(prop, "NLA Disable Path", "Disable path temporally, for editing cycles.");
-
- prop= RNA_def_property(srna, "nla_collapsed", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_COLLAPSED);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "NLA Collapsed", "");
-
- prop= RNA_def_property(srna, "nla_override", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_OVERRIDE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "NLA Override", "");
-
- prop= RNA_def_property(srna, "nla_strips", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "nlastrips", NULL);
- RNA_def_property_struct_type(prop, "UnknownType");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "NLA Strips", "NLA strips of the object.");
-*/
-
/* shape keys */
prop= RNA_def_property(srna, "shape_key_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ 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, 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");
+ RNA_def_property_pointer_funcs(prop, "rna_Object_active_shape_key_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key.");
- prop= RNA_def_property(srna, "active_shape_key", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shapenr");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key index.");
-
- return srna;
+ 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+
+ RNA_api_object(srna);
}
void RNA_def_object(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 4f4530e0424..269437a8fae 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -31,9 +31,319 @@
#include "DNA_object_types.h"
#include "DNA_object_force.h"
+#include "DNA_scene_types.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
#ifdef RNA_RUNTIME
+#include "MEM_guardedalloc.h"
+
+#include "DNA_modifier_types.h"
+#include "DNA_texture_types.h"
+
+#include "BKE_context.h"
+#include "BKE_modifier.h"
+#include "BKE_pointcache.h"
+#include "BKE_depsgraph.h"
+
+#include "BLI_blenlib.h"
+
+#include "ED_object.h"
+
+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;
+ ListBase pidlist;
+
+ if(!ob)
+ return;
+
+ cache->flag |= PTCACHE_OUTDATED;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache==cache)
+ break;
+ }
+
+ if(pid)
+ BKE_ptcache_update_info(pid);
+
+ BLI_freelistN(&pidlist);
+}
+
+static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
+{
+ Object *ob = CTX_data_active_object(C);
+ PointCache *cache = (PointCache*)ptr->data;
+ PTCacheID *pid = NULL;
+ ListBase pidlist;
+
+ if(!ob)
+ return;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache==cache)
+ break;
+ }
+
+ if(pid)
+ BKE_ptcache_toggle_disk_cache(pid);
+
+ BLI_freelistN(&pidlist);
+}
+
+static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
+{
+ Object *ob = CTX_data_active_object(C);
+ PointCache *cache = (PointCache*)ptr->data;
+ PTCacheID *pid = NULL, *pid2= NULL;
+ ListBase pidlist;
+ int new_name = 1;
+ char name[80];
+
+ if(!ob)
+ return;
+
+ /* TODO: check for proper characters */
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache==cache)
+ pid2 = pid;
+ else if(strcmp(cache->name, "") && strcmp(cache->name,pid->cache->name)==0) {
+ /*TODO: report "name exists" to user */
+ strcpy(cache->name, cache->prev_name);
+ new_name = 0;
+ }
+ }
+
+ if(new_name) {
+ if(pid2 && cache->flag & PTCACHE_DISK_CACHE) {
+ strcpy(name, cache->name);
+ strcpy(cache->name, cache->prev_name);
+
+ cache->flag &= ~PTCACHE_DISK_CACHE;
+
+ BKE_ptcache_toggle_disk_cache(pid2);
+
+ strcpy(cache->name, name);
+
+ cache->flag |= PTCACHE_DISK_CACHE;
+
+ BKE_ptcache_toggle_disk_cache(pid2);
+ }
+
+ strcpy(cache->prev_name, cache->name);
+ }
+
+ BLI_freelistN(&pidlist);
+}
+
+static int rna_SoftBodySettings_use_edges_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_EDGES) != 0);
+}
+
+static void rna_SoftBodySettings_use_edges_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_EDGES;
+ else data->softflag &= ~OB_SB_EDGES;
+}
+
+static int rna_SoftBodySettings_use_goal_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_GOAL) != 0);
+}
+
+static void rna_SoftBodySettings_use_goal_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_GOAL;
+ else data->softflag &= ~OB_SB_GOAL;
+}
+
+static int rna_SoftBodySettings_stiff_quads_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_QUADS) != 0);
+}
+
+static void rna_SoftBodySettings_stiff_quads_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_QUADS;
+ else data->softflag &= ~OB_SB_QUADS;
+}
+
+static int rna_SoftBodySettings_self_collision_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_SELF) != 0);
+}
+
+static void rna_SoftBodySettings_self_collision_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_SELF;
+ else data->softflag &= ~OB_SB_SELF;
+}
+
+static int rna_SoftBodySettings_new_aero_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_AERO_ANGLE) != 0);
+}
+
+static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_AERO_ANGLE;
+ else data->softflag &= ~OB_SB_AERO_ANGLE;
+}
+
+static int rna_SoftBodySettings_face_collision_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_FACECOLL) != 0);
+}
+
+static void rna_SoftBodySettings_face_collision_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_FACECOLL;
+ else data->softflag &= ~OB_SB_FACECOLL;
+}
+
+static int rna_SoftBodySettings_edge_collision_get(PointerRNA *ptr)
+{
+ Object *data= (Object*)(ptr->data);
+ return (((data->softflag) & OB_SB_EDGECOLL) != 0);
+}
+
+static void rna_SoftBodySettings_edge_collision_set(PointerRNA *ptr, int value)
+{
+ Object *data= (Object*)(ptr->data);
+ if(value) data->softflag |= OB_SB_EDGECOLL;
+ else data->softflag &= ~OB_SB_EDGECOLL;
+}
+
+static void rna_SoftBodySettings_goal_vgroup_get(PointerRNA *ptr, char *value)
+{
+ SoftBody *sb= (SoftBody*)ptr->data;
+ rna_object_vgroup_name_index_get(ptr, value, sb->vertgroup);
+}
+
+static int rna_SoftBodySettings_goal_vgroup_length(PointerRNA *ptr)
+{
+ SoftBody *sb= (SoftBody*)ptr->data;
+ return rna_object_vgroup_name_index_length(ptr, sb->vertgroup);
+}
+
+static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *value)
+{
+ SoftBody *sb= (SoftBody*)ptr->data;
+ rna_object_vgroup_name_index_set(ptr, value, &sb->vertgroup);
+}
+
+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) {
+ ob->pd->tex->id.us--;
+ ob->pd->tex= 0;
+ }
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+}
+
+static void rna_FieldSettings_surface_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= (Object*)ptr->id.data;
+ PartDeflect *pd= ob->pd;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Surface);
+
+ /* add/remove modifier as needed */
+ if(!md) {
+ if(pd && (pd->flag & PFIELD_SURFACE))
+ if(ELEM5(pd->forcefield,PFIELD_HARMONIC,PFIELD_FORCE,PFIELD_HARMONIC,PFIELD_CHARGE,PFIELD_LENNARDJ))
+ if(ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
+ ED_object_modifier_add(NULL, scene, ob, eModifierType_Surface);
+ }
+ else {
+ if(!pd || !(pd->flag & PFIELD_SURFACE))
+ ED_object_modifier_remove(NULL, scene, ob, md);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+}
+
+static void rna_FieldSettings_dependency_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= (Object*)ptr->id.data;
+
+ /* do this before scene sort, that one checks for CU_PATH */
+ /* XXX if(ob->type==OB_CURVE && ob->pd->forcefield==PFIELD_GUIDE) {
+ Curve *cu= ob->data;
+ cu->flag |= (CU_PATH|CU_3D);
+ do_curvebuts(B_CU3D); // all curves too
+ }*/
+
+ rna_FieldSettings_surface_update(C, ptr);
+
+ DAG_scene_sort(scene);
+
+ if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
+ DAG_object_flush_update(scene, ob, OB_RECALC);
+ else
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+}
+
+static void rna_CollisionSettings_dependency_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= (Object*)ptr->id.data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Collision);
+
+ /* add/remove modifier as needed */
+ if(ob->pd->deflect && !md)
+ ED_object_modifier_add(NULL, scene, ob, eModifierType_Collision);
+ else if(!ob->pd->deflect && md)
+ ED_object_modifier_remove(NULL, scene, ob, md);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+}
+
+static void rna_CollisionSettings_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= (Object*)ptr->id.data;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+}
+
#else
static void rna_def_pointcache(BlenderRNA *brna)
@@ -54,12 +364,49 @@ static void rna_def_pointcache(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 300000);
RNA_def_property_ui_text(prop, "End", "Frame on which the simulation stops.");
+ prop= RNA_def_property(srna, "step", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "step");
+ RNA_def_property_range(prop, 1, 20);
+ RNA_def_property_ui_text(prop, "Cache Step", "Number of frames between cached frames.");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
+
/* flags */
prop= RNA_def_property(srna, "baked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "baking", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKING);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "disk_cache", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_DISK_CACHE);
+ RNA_def_property_ui_text(prop, "Disk Cache", "Save cache files to disk");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_toggle_disk_cache");
+
+ prop= RNA_def_property(srna, "outdated", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_OUTDATED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Cache is outdated", "");
+
+ prop= RNA_def_property(srna, "frames_skipped", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_FRAMES_SKIPPED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Name", "Cache name");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
+
+ prop= RNA_def_property(srna, "quick_cache", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_QUICK_CACHE);
+ RNA_def_property_ui_text(prop, "Quick Cache", "Update simulation with cache steps");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
+
+ prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "info");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Cache Info", "Info on current cache status.");
}
static void rna_def_collision(BlenderRNA *brna)
@@ -74,6 +421,7 @@ static void rna_def_collision(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deflect", 1);
RNA_def_property_ui_text(prop, "Enabled", "Enable this objects as a collider for physics systems");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_dependency_update");
/* Particle Interaction */
@@ -81,30 +429,36 @@ static void rna_def_collision(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "pdef_damp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damping Factor", "Amount of damping during particle collision");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "random_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_rdamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Damping", "Random variation of damping");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "friction_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_frict");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Friction Factor", "Amount of friction during particle collision");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "random_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_rfrict");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Friction", "Random variation of friction");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "permeability", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_perm");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Permeability", "Chance that the particle will pass through the mesh");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "kill_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PDEFLE_KILL_PART);
RNA_def_property_ui_text(prop, "Kill Particles", "Kill collided particles");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
/* Soft Body and Cloth Interaction */
@@ -112,21 +466,25 @@ static void rna_def_collision(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "pdef_sbift");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Inner Thickness", "Inner face thickness");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "outer_thickness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_sboft");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Outer Thickness", "Outer face thickness");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_sbdamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damping", "Amount of damping during collision");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
/* Does this belong here?
prop= RNA_def_property(srna, "collision_stack", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "softflag", OB_SB_COLLFINAL);
RNA_def_property_ui_text(prop, "Collision from Stack", "Pick collision object from modifier stack (softbody only)");
+ RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
*/
}
@@ -136,50 +494,54 @@ static void rna_def_field(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem field_type_items[] = {
- {0, "NONE", "None", ""},
- {PFIELD_FORCE, "SPHERICAL", "Spherical", ""},
- {PFIELD_VORTEX, "VORTEX", "Vortex", ""},
- {PFIELD_MAGNET, "MAGNET", "Magnetic", ""},
- {PFIELD_WIND, "WIND", "Wind", ""},
- {PFIELD_GUIDE, "GUIDE", "Curve Guide", ""},
- {PFIELD_TEXTURE, "TEXTURE", "Texture", ""},
- {PFIELD_HARMONIC, "HARMONIC", "Harmonic", ""},
- {PFIELD_CHARGE, "CHARGE", "Charge", ""},
- {PFIELD_LENNARDJ, "LENNARDJ", "Lennard-Jones", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {PFIELD_FORCE, "SPHERICAL", 0, "Spherical", ""},
+ {PFIELD_VORTEX, "VORTEX", 0, "Vortex", ""},
+ {PFIELD_MAGNET, "MAGNET", 0, "Magnetic", ""},
+ {PFIELD_WIND, "WIND", 0, "Wind", ""},
+ {PFIELD_GUIDE, "GUIDE", 0, "Curve Guide", ""},
+ {PFIELD_TEXTURE, "TEXTURE", 0, "Texture", ""},
+ {PFIELD_HARMONIC, "HARMONIC", 0, "Harmonic", ""},
+ {PFIELD_CHARGE, "CHARGE", 0, "Charge", ""},
+ {PFIELD_LENNARDJ, "LENNARDJ", 0, "Lennard-Jones", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem falloff_items[] = {
- {PFIELD_FALL_SPHERE, "SPHERE", "Sphere", ""},
- {PFIELD_FALL_TUBE, "TUBE", "Tube", ""},
- {PFIELD_FALL_CONE, "CONE", "Cone", ""},
- {0, NULL, NULL, NULL}};
+ {PFIELD_FALL_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {PFIELD_FALL_TUBE, "TUBE", 0, "Tube", ""},
+ {PFIELD_FALL_CONE, "CONE", 0, "Cone", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem texture_items[] = {
- {PFIELD_TEX_RGB, "RGB", "RGB", ""},
- {PFIELD_TEX_GRAD, "GRADIENT", "Gradient", ""},
- {PFIELD_TEX_CURL, "CURL", "Curl", ""},
- {0, NULL, NULL, NULL}};
+ {PFIELD_TEX_RGB, "RGB", 0, "RGB", ""},
+ {PFIELD_TEX_GRAD, "GRADIENT", 0, "Gradient", ""},
+ {PFIELD_TEX_CURL, "CURL", 0, "Curl", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FieldSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for an object in physics simulation.");
+ RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
/* Enums */
- prop= RNA_def_property(srna, "field_type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forcefield");
RNA_def_property_enum_items(prop, field_type_items);
- RNA_def_property_ui_text(prop, "Field Type", "Choose Field Type");
+ RNA_def_property_ui_text(prop, "Type", "Type of field.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_dependency_update");
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff");
RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Fall-Off", "Fall-Off Shape");
+ RNA_def_property_ui_text(prop, "Fall-Off", "Fall-off shape.");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "texture_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tex_mode");
RNA_def_property_enum_items(prop, texture_items);
RNA_def_property_ui_text(prop, "Texture Mode", "How the texture effect is calculated (RGB & Curl need a RGB texture else Gradient will be used instead)");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Float */
@@ -187,103 +549,125 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Strength", "Strength of force field");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "falloff_power", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_power");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Falloff Power", "Falloff power (real gravitational falloff = 2)");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "harmonic_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_damp");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Harmonic Damping", "Damping of the harmonic force");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "minimum_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mindist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance for the field's fall-off");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "maximum_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxdist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance for the field to work");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "radial_minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minrad");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Radial Distance", "Minimum radial distance for the field's fall-off");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "radial_maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxrad");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Radial Distance", "Maximum radial distance for the field to work");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "radial_falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_power_r");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Radial Falloff Power", "Radial falloff power (real gravitational falloff = 2)");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "texture_nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tex_nabla");
RNA_def_property_range(prop, 0.0001f, 1.0f);
RNA_def_property_ui_text(prop, "Nabla", "Defines size of derivative offset used for calculating gradient and curl");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "noise", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_noise");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Noise", "Noise of the wind force");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Seed", "Seed of the wind noise");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Boolean */
prop= RNA_def_property(srna, "use_min_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMIN);
RNA_def_property_ui_text(prop, "Use Min", "Use a minimum distance for the field's fall-off");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "use_max_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMAX);
RNA_def_property_ui_text(prop, "Use Max", "Use a maximum distance for the field to work");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "use_radial_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMINR);
RNA_def_property_ui_text(prop, "Use Min", "Use a minimum radial distance for the field's fall-off");
// "Use a minimum angle for the field's fall-off"
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "use_radial_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMAXR);
RNA_def_property_ui_text(prop, "Use Max", "Use a maximum radial distance for the field to work");
// "Use a maximum angle for the field to work"
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "guide_path_add", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_GUIDE_PATH_ADD);
RNA_def_property_ui_text(prop, "Additive", "Based on distance/falloff it adds a portion of the entire path");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "planar", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_PLANAR);
RNA_def_property_ui_text(prop, "Planar", "Create planar field");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_SURFACE);
RNA_def_property_ui_text(prop, "Surface", "Use closest point on surface");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_surface_update");
prop= RNA_def_property(srna, "positive_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_POSZ);
RNA_def_property_ui_text(prop, "Positive", "Effect only in direction of positive Z axis");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "use_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_OBJECT);
RNA_def_property_ui_text(prop, "Use Coordinates", "Use object/global coordinates for texture");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "force_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_2D);
RNA_def_property_ui_text(prop, "2D", "Apply force only in 2d");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "root_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_ROOTCO);
RNA_def_property_ui_text(prop, "Root Texture Coordinates", "Texture coordinates from root particle locations");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Pointer */
@@ -291,6 +675,7 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "Texture to use as force");
+ RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
}
static void rna_def_game_softbody(BlenderRNA *brna)
@@ -305,10 +690,235 @@ static void rna_def_game_softbody(BlenderRNA *brna)
static void rna_def_softbody(BlenderRNA *brna)
{
StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem collision_type_items[] = {
+ {SBC_MODE_MANUAL, "MANUAL", 0, "Manual", "Manual adjust"},
+ {SBC_MODE_AVG, "AVERAGE", 0, "Average", "Average Spring length * Ball Size"},
+ {SBC_MODE_MIN, "MINIMAL", 0, "Minimal", "Minimal Spring length * Ball Size"},
+ {SBC_MODE_MAX, "MAXIMAL", 0, "Maximal", "Maximal Spring length * Ball Size"},
+ {SBC_MODE_AVGMINMAX, "MINMAX", 0, "AvMinMax", "(Min+Max)/2 * Ball Size"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SoftBodySettings", NULL);
RNA_def_struct_sdna(srna, "SoftBody");
RNA_def_struct_ui_text(srna, "Soft Body Settings", "Soft body simulation settings for an object.");
+
+ /* General Settings */
+
+ prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
+ 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+
+ /* Goal */
+
+ prop= RNA_def_property(srna, "goal_vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "vertgroup");
+ RNA_def_property_string_funcs(prop, "rna_SoftBodySettings_goal_vgroup_get", "rna_SoftBodySettings_goal_vgroup_length", "rna_SoftBodySettings_goal_vgroup_set");
+ RNA_def_property_ui_text(prop, "Goal Vertex Group", "Control point weight values.");
+
+ prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
+ 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, 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, 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, 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+
+ /* Edge Spring Settings */
+
+ prop= RNA_def_property(srna, "pull", PROP_FLOAT, PROP_NONE);
+ 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, 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, 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, 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, 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, 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, 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, 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");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Shear", "Shear Stiffness");
+
+ /* Collision */
+
+ prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
+ 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, 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, 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, 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, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+
+ /* Solver */
+
+ prop= RNA_def_property(srna, "error_limit", PROP_FLOAT, PROP_NONE);
+ 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, 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, 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, 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, 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, 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, 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);
+ RNA_def_property_ui_text(prop, "Print Performance to Console", "Turn on SB diagnose console prints");
+
+ /* Flags */
+
+ 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, 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, 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, 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, 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, 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, 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, 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 6b6db71ef87..6b9a708f555 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -1,5 +1,5 @@
/**
- * $Id: rna_packedfile.c 19382 2009-03-23 13:24:48Z blendix $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 8d23f9538a5..ef68e0ba019 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -38,6 +38,58 @@
#include "DNA_scene_types.h"
#include "WM_types.h"
+#include "WM_api.h"
+
+EnumPropertyItem part_from_items[] = {
+ {PART_FROM_VERT, "VERT", 0, "Verts", ""},
+ {PART_FROM_FACE, "FACE", 0, "Faces", ""},
+ {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem part_reactor_from_items[] = {
+ {PART_FROM_VERT, "VERT", 0, "Verts", ""},
+ {PART_FROM_FACE, "FACE", 0, "Faces", ""},
+ {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
+ {PART_FROM_PARTICLE, "PARTICLE", 0, "Particle", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem part_draw_as_items[] = {
+ {PART_DRAW_NOT, "NONE", 0, "None", ""},
+ {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
+ {PART_DRAW_DOT, "DOT", 0, "Point", ""},
+ {PART_DRAW_CIRC, "CIRC", 0, "Circle", ""},
+ {PART_DRAW_CROSS, "CROSS", 0, "Cross", ""},
+ {PART_DRAW_AXIS, "AXIS", 0, "Axis", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem part_hair_draw_as_items[] = {
+ {PART_DRAW_NOT, "NONE", 0, "None", ""},
+ {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
+ {PART_DRAW_PATH, "PATH", 0, "Path", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem part_ren_as_items[] = {
+ {PART_DRAW_NOT, "NONE", 0, "None", ""},
+ {PART_DRAW_HALO, "HALO", 0, "Halo", ""},
+ {PART_DRAW_LINE, "LINE", 0, "Line", ""},
+ {PART_DRAW_PATH, "PATH", 0, "Path", ""},
+ {PART_DRAW_OB, "OBJECT", 0, "Object", ""},
+ {PART_DRAW_GR, "GROUP", 0, "Group", ""},
+ {PART_DRAW_BB, "BILLBOARD", 0, "Billboard", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+EnumPropertyItem part_hair_ren_as_items[] = {
+ {PART_DRAW_NOT, "NONE", 0, "None", ""},
+ {PART_DRAW_PATH, "PATH", 0, "Path", ""},
+ {PART_DRAW_OB, "OBJECT", 0, "Object", ""},
+ {PART_DRAW_GR, "GROUP", 0, "Group", ""},
+ {0, NULL, 0, NULL, NULL}
+};
#ifdef RNA_RUNTIME
@@ -45,48 +97,160 @@
#include "BKE_depsgraph.h"
#include "BKE_particle.h"
+#include "BLI_arithb.h"
+
+/* property update functions */
static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
ParticleSettings *part;
- if(ptr->type==&RNA_ParticleSystem)
- part = ((ParticleSystem*)ptr->data)->part;
- else
+ if(ptr->type==&RNA_ParticleSystem) {
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
+ Object *ob = psys_find_object(scene, psys);
+
+ psys->recalc = PSYS_RECALC_REDO;
+
+ if(ob)
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
+ else {
part = ptr->id.data;
-
- psys_flush_particle_settings(CTX_data_scene(C), part, PSYS_RECALC_REDO);
+ psys_flush_particle_settings(scene, part, PSYS_RECALC_REDO);
+ }
}
static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
ParticleSettings *part;
- if(ptr->type==&RNA_ParticleSystem)
- part = ((ParticleSystem*)ptr->data)->part;
- else
+
+ if(ptr->type==&RNA_ParticleSystem) {
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
+ Object *ob = psys_find_object(scene, psys);
+
+ psys->recalc = PSYS_RECALC_RESET;
+
+ 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);
+ }
+}
+
+static void rna_Particle_keyed_reset(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene = CTX_data_scene(C);
- psys_flush_particle_settings(CTX_data_scene(C), part, PSYS_RECALC_RESET|PSYS_RECALC_REDO);
+ if(ptr->type==&RNA_KeyedParticleTarget) {
+ Object *ob = (Object*)ptr->id.data;
+ ParticleSystem *psys = psys_get_current(ob);
+
+ psys->recalc = PSYS_RECALC_RESET;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_scene_sort(scene);
+ }
+}
+
+static void rna_Particle_keyed_redo(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene = CTX_data_scene(C);
+
+ if(ptr->type==&RNA_KeyedParticleTarget) {
+ Object *ob = (Object*)ptr->id.data;
+ ParticleSystem *psys = psys_get_current(ob);
+
+ psys->recalc = PSYS_RECALC_REDO;
+
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
}
static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
ParticleSettings *part;
- if(ptr->type==&RNA_ParticleSystem)
- part = ((ParticleSystem*)ptr->data)->part;
- else
+
+ if(ptr->type==&RNA_ParticleSystem) {
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
+ Object *ob = psys_find_object(scene, psys);
+
+ psys->recalc = PSYS_RECALC_RESET|PSYS_RECALC_TYPE;
+
+ 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|PSYS_RECALC_TYPE);
+ }
+}
- psys_flush_particle_settings(CTX_data_scene(C), part, PSYS_RECALC_RESET|PSYS_RECALC_TYPE|PSYS_RECALC_REDO);
+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);
}
static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
ParticleSettings *part;
- if(ptr->type==&RNA_ParticleSystem)
- part = ((ParticleSystem*)ptr->data)->part;
- else
+
+ if(ptr->type==&RNA_ParticleSystem) {
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
+ Object *ob = psys_find_object(scene, psys);
+
+ psys->recalc = PSYS_RECALC_CHILD;
+
+ if(ob)
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
+ else {
part = ptr->id.data;
- psys_flush_particle_settings(CTX_data_scene(C), part, PSYS_RECALC_CHILD);
+ psys_flush_particle_settings(scene, part, PSYS_RECALC_CHILD);
+ }
+}
+static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ParticleSettings *part = psys_get_current(ob)->part;
+
+ return rna_pointer_inherit_refine(ptr, &RNA_ParticleSettings, part);
+}
+
+static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ParticleSystem *psys = psys_get_current(ob);
+
+ if(psys->part)
+ psys->part->id.us--;
+
+ psys->part = (ParticleSettings *)value.data;
+
+ if(psys->part)
+ psys->part->id.us++;
+}
+static void rna_Particle_abspathtime_update(bContext *C, PointerRNA *ptr)
+{
+ ParticleSettings *settings = (ParticleSettings*)ptr->data;
+ float delta = settings->end + settings->lifetime - settings->sta;
+ if(settings->draw & PART_ABS_PATH_TIME) {
+ settings->path_start = settings->sta + settings->path_start * delta;
+ settings->path_end = settings->sta + settings->path_end * delta;
+ }
+ else {
+ settings->path_start = (settings->path_start - settings->sta)/delta;
+ settings->path_end = (settings->path_end - settings->sta)/delta;
+ }
+ rna_Particle_redo(C, ptr);
}
static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
{
@@ -98,8 +262,8 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
if(settings->type==PART_REACTOR && value < 1.0)
value = 1.0;
- else if (value < -30000.0f) //TODO: replace 30000 with MAXFRAMEF when available in 2.5
- value = -30000.0f;
+ else if (value < MINAFRAMEF)
+ value = MINAFRAMEF;
settings->sta = value;
}
@@ -126,7 +290,19 @@ static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr)
ParticleSettings *settings = (ParticleSettings*)ptr->data;
return settings->draw_line[0];
}
+static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max)
+{
+ ParticleSettings *settings = (ParticleSettings*)ptr->data;
+ if(settings->type==PART_HAIR) {
+ *min = 0.0f;
+ *max = (settings->draw & PART_ABS_PATH_TIME) ? 100.0f : 1.0;
+ }
+ else {
+ *min = (settings->draw & PART_ABS_PATH_TIME) ? settings->sta : 0.0f;
+ *max= (settings->draw & PART_ABS_PATH_TIME) ? MAXFRAMEF : 1.0f;
+ }
+}
static void rna_PartSetting_linelenhead_set(struct PointerRNA *ptr, float value)
{
ParticleSettings *settings = (ParticleSettings*)ptr->data;
@@ -159,85 +335,167 @@ static void rna_ParticleSystem_name_get(PointerRNA *ptr, char *str)
strcpy(str, "");
}
-static EnumPropertyItem from_items[] = {
- {PART_FROM_VERT, "VERT", "Vertexes", ""},
- {PART_FROM_FACE, "FACE", "Faces", ""},
- {PART_FROM_VOLUME, "VOLUME", "Volume", ""},
- {0, NULL, NULL, NULL}
-};
+static PointerRNA rna_ParticleSystem_active_keyed_target_get(PointerRNA *ptr)
+{
+ ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+
+ for(; kpt; kpt=kpt->next) {
+ if(kpt->flag & KEYED_TARGET_CURRENT)
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyedParticleTarget, kpt);
+ }
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyedParticleTarget, NULL);
+}
+static void rna_ParticleSystem_active_keyed_target_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ *min= 0;
+ *max= BLI_countlist(&psys->keyed_targets)-1;
+ *max= MAX2(0, *max);
+}
-static EnumPropertyItem reactor_from_items[] = {
- {PART_FROM_VERT, "VERT", "Vertexes", ""},
- {PART_FROM_FACE, "FACE", "Faces", ""},
- {PART_FROM_VOLUME, "VOLUME", "Volume", ""},
- {PART_FROM_PARTICLE, "PARTICLE", "Particle", ""},
- {0, NULL, NULL, NULL}
-};
+static int rna_ParticleSystem_active_keyed_target_index_get(PointerRNA *ptr)
+{
+ ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+ int i=0;
+
+ for(; kpt; kpt=kpt->next, i++)
+ if(kpt->flag & KEYED_TARGET_CURRENT)
+ return i;
+
+ return 0;
+}
-static EnumPropertyItem *rna_Particle_from_itemf(PointerRNA *ptr)
+static void rna_ParticleSystem_active_keyed_target_index_set(struct PointerRNA *ptr, int value)
{
- ParticleSettings *part = ptr->id.data;
+ ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ KeyedParticleTarget *kpt = psys->keyed_targets.first;
+ int i=0;
+
+ for(; kpt; kpt=kpt->next, i++) {
+ if(i==value)
+ kpt->flag |= KEYED_TARGET_CURRENT;
+ else
+ kpt->flag &= ~KEYED_TARGET_CURRENT;
+ }
+}
+static int rna_KeyedParticleTarget_name_length(PointerRNA *ptr)
+{
+ KeyedParticleTarget *kpt= ptr->data;
+
+ if(kpt->flag & KEYED_TARGET_VALID) {
+ if(kpt->ob)
+ return strlen(kpt->ob->id.name+2) + 4;
+ else
+ return 20;
+ }
+ else
+ return 15;
+
+ return 0;
+}
- if(part->type==PART_REACTOR)
- return reactor_from_items;
+static void rna_KeyedParticleTarget_name_get(PointerRNA *ptr, char *str)
+{
+ KeyedParticleTarget *kpt= ptr->data;
+
+ if(kpt->flag & KEYED_TARGET_VALID) {
+ if(kpt->ob)
+ sprintf(str, "%s: %i", kpt->ob->id.name+2, kpt->psys);
+ else
+ sprintf(str, "Particle System: %i", kpt->psys);
+
+ }
else
- return from_items;
+ strcpy(str, "Invalid target!");
}
-static EnumPropertyItem draw_as_items[] = {
- {PART_DRAW_NOT, "NONE", "None", ""},
- {PART_DRAW_REND, "RENDER", "Rendered", ""},
- {PART_DRAW_DOT, "DOT", "Point", ""},
- {PART_DRAW_CIRC, "CIRC", "Circle", ""},
- {PART_DRAW_CROSS, "CROSS", "Cross", ""},
- {PART_DRAW_AXIS, "AXIS", "Axis", ""},
- {0, NULL, NULL, NULL}
+static EnumPropertyItem from_items[] = {
+ {PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
+ {PART_FROM_FACE, "FACE", 0, "Faces", ""},
+ {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
+ {0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem hair_draw_as_items[] = {
- {PART_DRAW_NOT, "NONE", "None", ""},
- {PART_DRAW_REND, "RENDER", "Rendered", ""},
- {PART_DRAW_PATH, "PATH", "Path", ""},
- {0, NULL, NULL, NULL}
+static EnumPropertyItem reactor_from_items[] = {
+ {PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
+ {PART_FROM_FACE, "FACE", 0, "Faces", ""},
+ {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
+ {PART_FROM_PARTICLE, "PARTICLE", 0, "Particle", ""},
+ {0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem ren_as_items[] = {
- {PART_DRAW_NOT, "NONE", "None", ""},
- {PART_DRAW_HALO, "HALO", "Halo", ""},
- {PART_DRAW_LINE, "LINE", "Line", ""},
- {PART_DRAW_PATH, "PATH", "Path", ""},
- {PART_DRAW_OB, "OBJECT", "Object", ""},
- {PART_DRAW_GR, "GROUP", "Group", ""},
- {PART_DRAW_BB, "BILLBOARD", "Billboard", ""},
- {0, NULL, NULL, NULL}
-};
+static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ ParticleSettings *part = ptr->id.data;
-static EnumPropertyItem hair_ren_as_items[] = {
- {PART_DRAW_NOT, "NONE", "None", ""},
- {PART_DRAW_PATH, "PATH", "Path", ""},
- {PART_DRAW_OB, "OBJECT", "Object", ""},
- {PART_DRAW_GR, "GROUP", "Group", ""},
- {0, NULL, NULL, NULL}
-};
+ if(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, part_reactor_from_items);
+ RNA_enum_items_add(&item, &totitem, part_from_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
+ if(part->type==PART_REACTOR)
+ return part_reactor_from_items;
+ else
+ return part_from_items;
+}
-static EnumPropertyItem *rna_Particle_draw_as_itemf(PointerRNA *ptr)
+static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr, int *free)
{
ParticleSettings *part = ptr->id.data;
+ if(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, part_hair_draw_as_items);
+ RNA_enum_items_add(&item, &totitem, part_draw_as_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
if(part->type==PART_HAIR)
- return hair_draw_as_items;
+ return part_hair_draw_as_items;
else
- return draw_as_items;
+ return part_draw_as_items;
}
-static EnumPropertyItem *rna_Particle_ren_as_itemf(PointerRNA *ptr)
+static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr, int *free)
{
ParticleSettings *part = ptr->id.data;
+ if(C==NULL) {
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* needed for doc generation */
+ RNA_enum_items_add(&item, &totitem, part_hair_ren_as_items);
+ RNA_enum_items_add(&item, &totitem, part_ren_as_items);
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+ }
+
if(part->type==PART_HAIR)
- return hair_ren_as_items;
+ return part_hair_ren_as_items;
else
- return ren_as_items;
+ return part_ren_as_items;
}
@@ -313,12 +571,12 @@ static void rna_def_particle(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem alive_items[] = {
- {PARS_KILLED, "KILLED", "Killed", ""},
- {PARS_DEAD, "DEAD", "Dead", ""},
- {PARS_UNBORN, "UNBORN", "Unborn", ""},
- {PARS_ALIVE, "ALIVE", "Alive", ""},
- {PARS_DYING, "DYING", "Dying", ""},
- {0, NULL, NULL, NULL}
+ {PARS_KILLED, "KILLED", 0, "Killed", ""},
+ {PARS_DEAD, "DEAD", 0, "Dead", ""},
+ {PARS_UNBORN, "UNBORN", 0, "Unborn", ""},
+ {PARS_ALIVE, "ALIVE", 0, "Alive", ""},
+ {PARS_DYING, "DYING", 0, "Dying", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "Particle", NULL);
@@ -453,115 +711,115 @@ static void rna_def_particle_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {PART_EMITTER, "EMITTER", "Emitter", ""},
- {PART_REACTOR, "REACTOR", "Reactor", ""},
- {PART_HAIR, "HAIR", "Hair", ""},
- {0, NULL, NULL, NULL}
+ {PART_EMITTER, "EMITTER", 0, "Emitter", ""},
+ {PART_REACTOR, "REACTOR", 0, "Reactor", ""},
+ {PART_HAIR, "HAIR", 0, "Hair", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem dist_items[] = {
- {PART_DISTR_JIT, "JIT", "Jittered", ""},
- {PART_DISTR_RAND, "RAND", "Random", ""},
- {PART_DISTR_GRID, "GRID", "Grid", ""},
- {0, NULL, NULL, NULL}
+ {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
+ {PART_DISTR_RAND, "RAND", 0, "Random", ""},
+ {PART_DISTR_GRID, "GRID", 0, "Grid", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem phys_type_items[] = {
- {PART_PHYS_NO, "NO", "No", ""},
- {PART_PHYS_NEWTON, "NEWTON", "Newtonian", ""},
- {PART_PHYS_KEYED, "KEYED", "Keyed", ""},
- {PART_PHYS_BOIDS, "BOIDS", "Boids", ""},
- {0, NULL, NULL, NULL}
+ {PART_PHYS_NO, "NO", 0, "No", ""},
+ {PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""},
+ {PART_PHYS_KEYED, "KEYED", 0, "Keyed", ""},
+ {PART_PHYS_BOIDS, "BOIDS", 0, "Boids", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem rot_mode_items[] = {
- {0, "NONE", "None", ""},
- {PART_ROT_NOR, "NOR", "Normal", ""},
- {PART_ROT_VEL, "VEL", "Velocity", ""},
- {PART_ROT_GLOB_X, "GLOB_X", "Global X", ""},
- {PART_ROT_GLOB_Y, "GLOB_Y", "Global Y", ""},
- {PART_ROT_GLOB_Z, "GLOB_Z", "Global Z", ""},
- {PART_ROT_OB_X, "OB_X", "Object X", ""},
- {PART_ROT_OB_Y, "OB_Y", "Object Y", ""},
- {PART_ROT_OB_Z, "OB_Z", "Object Z", ""},
- {0, NULL, NULL, NULL}
+ {0, "NONE", 0, "None", ""},
+ {PART_ROT_NOR, "NOR", 0, "Normal", ""},
+ {PART_ROT_VEL, "VEL", 0, "Velocity", ""},
+ {PART_ROT_GLOB_X, "GLOB_X", 0, "Global X", ""},
+ {PART_ROT_GLOB_Y, "GLOB_Y", 0, "Global Y", ""},
+ {PART_ROT_GLOB_Z, "GLOB_Z", 0, "Global Z", ""},
+ {PART_ROT_OB_X, "OB_X", 0, "Object X", ""},
+ {PART_ROT_OB_Y, "OB_Y", 0, "Object Y", ""},
+ {PART_ROT_OB_Z, "OB_Z", 0, "Object Z", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem ave_mode_items[] = {
- {0, "NONE", "None", ""},
- {PART_AVE_SPIN, "SPIN", "Spin", ""},
- {PART_AVE_RAND, "RAND", "Random", ""} ,
- {0, NULL, NULL, NULL}
+ {0, "NONE", 0, "None", ""},
+ {PART_AVE_SPIN, "SPIN", 0, "Spin", ""},
+ {PART_AVE_RAND, "RAND", 0, "Random", ""} ,
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem react_event_items[] = {
- {PART_EVENT_DEATH, "DEATH", "Death", ""},
- {PART_EVENT_COLLIDE, "COLLIDE", "Collision", ""},
- {PART_EVENT_NEAR, "NEAR", "Near", ""},
- {0, NULL, NULL, NULL}
+ {PART_EVENT_DEATH, "DEATH", 0, "Death", ""},
+ {PART_EVENT_COLLIDE, "COLLIDE", 0, "Collision", ""},
+ {PART_EVENT_NEAR, "NEAR", 0, "Near", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem child_type_items[] = {
- {0, "NONE", "None", ""},
- {PART_CHILD_PARTICLES, "PARTICLES", "Particles", ""},
- {PART_CHILD_FACES, "FACES", "Faces", ""},
- {0, NULL, NULL, NULL}
+ {0, "NONE", 0, "None", ""},
+ {PART_CHILD_PARTICLES, "PARTICLES", 0, "Particles", ""},
+ {PART_CHILD_FACES, "FACES", 0, "Faces", ""},
+ {0, NULL, 0, NULL, NULL}
};
//TODO: names, tooltips
static EnumPropertyItem rot_from_items[] = {
- {PART_ROT_KEYS, "KEYS", "keys", ""},
- {PART_ROT_ZINCR, "ZINCR", "zincr", ""},
- {PART_ROT_IINCR, "IINCR", "iincr", ""},
- {0, NULL, NULL, NULL}
+ {PART_ROT_KEYS, "KEYS", 0, "keys", ""},
+ {PART_ROT_ZINCR, "ZINCR", 0, "zincr", ""},
+ {PART_ROT_IINCR, "IINCR", 0, "iincr", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem integrator_type_items[] = {
- {PART_INT_EULER, "EULER", "Euler", ""},
- {PART_INT_MIDPOINT, "MIDPOINT", "Midpoint", ""},
- {PART_INT_RK4, "RK4", "RK4", ""},
- {0, NULL, NULL, NULL}
+ {PART_INT_EULER, "EULER", 0, "Euler", ""},
+ {PART_INT_MIDPOINT, "MIDPOINT", 0, "Midpoint", ""},
+ {PART_INT_RK4, "RK4", 0, "RK4", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem kink_type_items[] = {
- {PART_KINK_NO, "NO", "Nothing", ""},
- {PART_KINK_CURL, "CURL", "Curl", ""},
- {PART_KINK_RADIAL, "RADIAL", "Radial", ""},
- {PART_KINK_WAVE, "WAVE", "Wave", ""},
- {PART_KINK_BRAID, "BRAID", "Braid", ""},
- {0, NULL, NULL, NULL}
+ {PART_KINK_NO, "NO", 0, "Nothing", ""},
+ {PART_KINK_CURL, "CURL", 0, "Curl", ""},
+ {PART_KINK_RADIAL, "RADIAL", 0, "Radial", ""},
+ {PART_KINK_WAVE, "WAVE", 0, "Wave", ""},
+ {PART_KINK_BRAID, "BRAID", 0, "Braid", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem kink_axis_items[] = {
- {0, "X", "X", ""},
- {1, "Y", "Y", ""},
- {2, "Z", "Z", ""},
- {0, NULL, NULL, NULL}
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem bb_align_items[] = {
- {PART_BB_X, "X", "X", ""},
- {PART_BB_Y, "Y", "Y", ""},
- {PART_BB_Z, "Z", "Z", ""},
- {PART_BB_VIEW, "VIEW", "View", ""},
- {PART_BB_VEL, "VEL", "Velocity", ""},
- {0, NULL, NULL, NULL}
+ {PART_BB_X, "X", 0, "X", ""},
+ {PART_BB_Y, "Y", 0, "Y", ""},
+ {PART_BB_Z, "Z", 0, "Z", ""},
+ {PART_BB_VIEW, "VIEW", 0, "View", ""},
+ {PART_BB_VEL, "VEL", 0, "Velocity", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem bb_anim_items[] = {
- {PART_BB_ANIM_NONE, "NONE", "None", ""},
- {PART_BB_ANIM_TIME, "TIME", "Time", ""},
- {PART_BB_ANIM_ANGLE, "ANGLE", "Angle", ""},
- //{PART_BB_ANIM_OFF_TIME, "OFF_TIME", "off_time", ""},
- //{PART_BB_ANIM_OFF_ANGLE, "OFF_ANGLE", "off_angle", ""},
- {0, NULL, NULL, NULL}
+ {PART_BB_ANIM_NONE, "NONE", 0, "None", ""},
+ {PART_BB_ANIM_TIME, "TIME", 0, "Time", ""},
+ {PART_BB_ANIM_ANGLE, "ANGLE", 0, "Angle", ""},
+ //{PART_BB_ANIM_OFF_TIME, "OFF_TIME", 0, "off_time", ""},
+ //{PART_BB_ANIM_OFF_ANGLE, "OFF_ANGLE", 0, "off_angle", ""},
+ {0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem bb_split_offset_items[] = {
- {PART_BB_OFF_NONE, "NONE", "None", ""},
- {PART_BB_OFF_LINEAR, "LINEAR", "Linear", ""},
- {PART_BB_OFF_RANDOM, "RANDOM", "Random", ""},
- {0, NULL, NULL, NULL}
+ {PART_BB_OFF_NONE, "NONE", 0, "None", ""},
+ {PART_BB_OFF_LINEAR, "LINEAR", 0, "Linear", ""},
+ {PART_BB_OFF_RANDOM, "RANDOM", 0, "Random", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna= RNA_def_struct(brna, "ParticleSettings", "ID");
@@ -571,16 +829,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* flag */
prop= RNA_def_property(srna, "react_start_end", PROP_BOOLEAN, PROP_NONE);
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, 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, 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -601,54 +862,46 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, 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, 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, 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, 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, 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- prop= RNA_def_property(srna, "abs_length", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ABS_LENGTH);
- RNA_def_property_ui_text(prop, "Abs Length", "Use maximum length for children");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
-
- prop= RNA_def_property(srna, "absolute_time", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ABS_TIME);
- RNA_def_property_ui_text(prop, "Absolute Time", "Set all ipos that work on particles to be calculated in absolute/relative time.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
-
- prop= RNA_def_property(srna, "global_time", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GLOB_TIME);
- RNA_def_property_ui_text(prop, "Global Time", "Set all ipos that work on particles to be calculated in global/object time.");
- 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");
@@ -707,17 +960,21 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, 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");
+ RNA_def_property_enum_items(prop, part_reactor_from_items);
+ 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, 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -725,24 +982,28 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* physics modes */
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "phystype");
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ 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, 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, 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -753,11 +1014,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
- //prop= RNA_def_property(srna, "draw_path_length", PROP_BOOLEAN, PROP_NONE);
- //RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PATH_LEN);
- //RNA_def_property_ui_text(prop, "Path length", "Draw path length");
- //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");
@@ -773,15 +1029,10 @@ static void rna_def_particle_settings(BlenderRNA *brna)
//RNA_def_property_ui_text(prop, "Health", "Draw boid health");
//RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
- //prop= RNA_def_property(srna, "timed_path", PROP_BOOLEAN, PROP_NONE);
- //RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_TIMED_PATH);
- //RNA_def_property_ui_text(prop, "Clip with time", "Clip path based on time");
- //RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
-
- //prop= RNA_def_property(srna, "draw_cached_path", PROP_BOOLEAN, PROP_NONE);
- //RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_CACHED_PATH);
- //RNA_def_property_ui_text(prop, "Path", "Draw particle path if the path is baked");
- //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, 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);
@@ -830,12 +1081,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
@@ -849,7 +1102,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ 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);
@@ -887,7 +1140,7 @@ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ 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");
@@ -1003,19 +1256,22 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* general values */
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sta");//optional if prop names are the same
- RNA_def_property_range(prop, -30000.0f, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, -30000.0f, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
+ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
+
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 1.0f, 30000.0f);
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -1032,38 +1288,35 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- prop= RNA_def_property(srna, "keyed_time", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Time", "Keyed key time relative to remaining particle life.");
- 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
- //float rt; TODO:find where rt is used - can't find it in UI
-
prop= RNA_def_property(srna, "amount", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_text(prop, "Amount", "Total number of particles.");
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, 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");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid.");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -1165,7 +1418,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "acc");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
- RNA_def_property_ui_text(prop, "Accelaration", "Constant acceleration");
+ RNA_def_property_ui_text(prop, "Acceleration", "Constant acceleration");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
@@ -1186,19 +1439,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Damp", "Specify the amount of damping");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- /* length */
- //TODO: is this readonly?
- prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "length");
-// RNA_def_property_range(prop, 0.0f, upperLimitf);//TODO: limits
- RNA_def_property_ui_text(prop, "Length", "");
-
- prop= RNA_def_property(srna, "absolute_length", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "abslength");
- RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Max Length", "Absolute maximum path length for children, in blender units.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
-
+ /* 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);
@@ -1247,13 +1488,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent.");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
- //TODO: is this readonly?
- prop= RNA_def_property(srna, "child_spread", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "childspread");
-// RNA_def_property_range(prop, 0.0f, upperLimitf); TODO: limits
- RNA_def_property_ui_text(prop, "Child Spread", "");
- 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");
@@ -1327,6 +1561,18 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
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, 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, 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");
@@ -1347,6 +1593,31 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
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, 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, 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.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Trail Count", "Number of trail particles.");
+ 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);
+ RNA_def_property_int_sdna(prop, NULL, "keyed_loops");
+ RNA_def_property_range(prop, 1.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Loop count", "Number of times the keys are looped.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+
/* boids */
prop= RNA_def_property(srna, "max_velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_vel");
@@ -1389,14 +1660,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Ground Z", "Default Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- /*TODO: not sure how to deal with this
- prop= RNA_def_property(srna, "boid_factor", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_sdna(prop, NULL, "boidfac");
- RNA_def_property_ui_text(prop, "Boid Factor", "");
-
- //char boidrule[8];
- */
-
prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_struct_type(prop, "Group");
@@ -1424,19 +1687,60 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
-
-#if 0
- prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_sdna(prop, NULL, "ipo");
- RNA_def_property_struct_type(prop, "Ipo");
- RNA_def_property_ui_text(prop, "Ipo", "");
-#endif
+
+ /* animation here? */
+ rna_def_animdata_common(srna);
// struct PartDeflect *pd;
// struct PartDeflect *pd2;
}
+static void rna_def_keyed_particle_target(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "KeyedParticleTarget", NULL);
+ RNA_def_struct_ui_text(srna, "Keyed Particle Target", "Target particle system for keyed particles.");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, "rna_KeyedParticleTarget_name_get", "rna_KeyedParticleTarget_name_length", NULL);
+ RNA_def_property_ui_text(prop, "Name", "Keyed particle target name.");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_keyed_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, NC_OBJECT|ND_PARTICLE, "rna_Particle_keyed_reset");
+
+ prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_keyed_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, NC_OBJECT|ND_PARTICLE, "rna_Particle_keyed_redo");
+
+ prop= RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYED_TARGET_VALID);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_ui_text(prop, "Valid", "Keyed particles target is valid.");
+
+
+
+}
static void rna_def_particle_system(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1452,9 +1756,15 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
+ /* access to particle settings is redirected through functions */
+ /* to allow proper id-buttons functionality */
prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "part");
+ //RNA_def_property_pointer_sdna(prop, NULL, "part");
+ RNA_def_property_struct_type(prop, "ParticleSettings");
+ 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, 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");
@@ -1498,34 +1808,33 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* boids */
- prop= RNA_def_property(srna, "boids_surface_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Boids Surface Object", "For boids physics systems, constrain boids to this object's surface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ //prop= RNA_def_property(srna, "boids_surface_object", PROP_POINTER, PROP_NONE);
+ //RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob");
+ //RNA_def_property_flag(prop, PROP_EDITABLE);
+ //RNA_def_property_ui_text(prop, "Boids Surface Object", "For boids physics systems, constrain boids to this object's surface.");
+ //RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* keyed */
- prop= RNA_def_property(srna, "keyed_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Keyed Object", "For keyed physics systems, the object that has the target particle system.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
- prop= RNA_def_property(srna, "keyed_particle_system", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "keyed_psys");
- RNA_def_property_range(prop, 1, INT_MAX);
- RNA_def_property_ui_text(prop, "Keyed Particle System", "For keyed physics systems, index of particle system on the keyed object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ prop= RNA_def_property(srna, "keyed_targets", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "keyed_targets", NULL);
+ RNA_def_property_struct_type(prop, "KeyedParticleTarget");
+ RNA_def_property_ui_text(prop, "Keyed Targets", "Target particle systems for keyed particles");
- prop= RNA_def_property(srna, "keyed_first", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_FIRST_KEYED);
- RNA_def_property_ui_text(prop, "Keyed First", "Set the system to be the starting point of keyed particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ prop= RNA_def_property(srna, "active_keyed_target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyedParticleTarget");
+ RNA_def_property_pointer_funcs(prop, "rna_ParticleSystem_active_keyed_target_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Particle System", "Active particle system being displayed");
+
+ prop= RNA_def_property(srna, "active_keyed_target_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_ParticleSystem_active_keyed_target_index_get", "rna_ParticleSystem_active_keyed_target_index_set", "rna_ParticleSystem_active_keyed_target_index_range");
+ RNA_def_property_ui_text(prop, "Active Particle System Index", "Index of active particle system slot.");
- prop= RNA_def_property(srna, "keyed_timed", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIME);
- RNA_def_property_ui_text(prop, "Keyed Timed", "Use intermediate key times for keyed particles (setting for starting point only).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* billboard */
prop= RNA_def_property(srna, "billboard_normal_uv", PROP_STRING, PROP_NONE);
@@ -1669,6 +1978,13 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
+
+ /* 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, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
}
void RNA_def_particle(BlenderRNA *brna)
@@ -1677,6 +1993,7 @@ void RNA_def_particle(BlenderRNA *brna)
rna_def_particle_key(brna);
rna_def_child_particle(brna);
rna_def_particle(brna);
+ rna_def_keyed_particle_target(brna);
rna_def_particle_system(brna);
rna_def_particle_settings(brna);
}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 8edcc4c72f4..b8863540bdf 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -69,9 +69,9 @@ IDProperty *rna_PoseChannel_idproperties(PointerRNA *ptr, int create)
static void rna_def_pose_channel(BlenderRNA *brna)
{
static EnumPropertyItem prop_rotmode_items[] = {
- {PCHAN_ROT_QUAT, "QUATERNION", "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
- {PCHAN_ROT_EUL, "EULER", "Euler (XYZ)", "Prone to Gimbal Lock"},
- {0, NULL, NULL, NULL}};
+ {PCHAN_ROT_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
+ {PCHAN_ROT_EUL, "EULER", 0, "Euler (XYZ)", "Prone to Gimbal Lock"},
+ {0, NULL, 0, NULL, NULL}};
StructRNA *srna;
PropertyRNA *prop;
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index c38b6342942..a840552b86f 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -75,12 +75,12 @@ void RNA_def_gameproperty(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem gameproperty_type_items[] ={
- {GPROP_BOOL, "BOOL", "Boolean", ""},
- {GPROP_INT, "INT", "Integer", ""},
- {GPROP_FLOAT, "FLOAT", "Float", ""},
- {GPROP_STRING, "STRING", "String", ""},
- {GPROP_TIME, "TIMER", "Timer", ""},
- {0, NULL, NULL, NULL}};
+ {GPROP_BOOL, "BOOL", 0, "Boolean", ""},
+ {GPROP_INT, "INT", 0, "Integer", ""},
+ {GPROP_FLOAT, "FLOAT", 0, "Float", ""},
+ {GPROP_STRING, "STRING", 0, "String", ""},
+ {GPROP_TIME, "TIMER", 0, "Timer", ""},
+ {0, NULL, 0, NULL, NULL}};
/* Base Struct for GameProperty */
srna= RNA_def_struct(brna, "GameProperty", NULL);
diff --git a/source/blender/makesrna/intern/rna_radio.c b/source/blender/makesrna/intern/rna_radio.c
deleted file mode 100644
index 54dbd59b52d..00000000000
--- a/source/blender/makesrna/intern/rna_radio.c
+++ /dev/null
@@ -1,140 +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 (2008).
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "rna_internal.h"
-
-#include "DNA_radio_types.h"
-
-#ifdef RNA_RUNTIME
-
-#else
-
-void RNA_def_radio(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
- static EnumPropertyItem prop_drawtype_items[] = {
- {RAD_WIREFRAME, "WIREFRAME", "Wireframe", "Enables Wireframe draw mode"},
- {RAD_SOLID, "SOLID", "Solid", "Enables Solid draw mode"},
- {RAD_GOURAUD, "GOURAUD", "Gouraud", "Enables Gouraud draw mode"},
- {0, NULL, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "Radiosity", NULL);
- RNA_def_struct_ui_text(srna, "Radiosity", "Settings for radiosity simulation of indirect diffuse lighting.");
- RNA_def_struct_sdna(srna, "Radio");
-
- /* Enums */
- prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "drawtype");
- RNA_def_property_enum_items(prop, prop_drawtype_items);
- RNA_def_property_ui_text(prop, "Draw Mode", "Radiosity draw modes.");
-
- /* Number values */
- prop= RNA_def_property(srna, "hemi_resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "hemires");
- RNA_def_property_range(prop, 100, 1000);
- RNA_def_property_ui_text(prop, "Hemi Resolution", "Sets the size of a hemicube.");
-
- prop= RNA_def_property(srna, "max_iterations", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "maxiter");
- RNA_def_property_range(prop, 0, 10000);
- RNA_def_property_ui_text(prop, "Max Iterations", "Limits the maximum number of radiosity rounds.");
-
- prop= RNA_def_property(srna, "multiplier", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "radfac");
- RNA_def_property_range(prop, 0.001f, 250.0f);
- RNA_def_property_ui_text(prop, "Multiplier", "Multiplies the energy values.");
-
- prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "gamma");
- RNA_def_property_range(prop, 0.2f, 10.0f);
- RNA_def_property_ui_text(prop, "Gamma", "Changes the contrast of the energy values.");
-
- prop= RNA_def_property(srna, "convergence", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "convergence");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Convergence", "Sets the lower threshold of unshot energy.");
-
- prop= RNA_def_property(srna, "element_max", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "elma");
- RNA_def_property_range(prop, 1, 500);
- RNA_def_property_ui_text(prop, "Element Max", "Sets maximum size of an element");
-
- prop= RNA_def_property(srna, "element_min", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "elmi");
- RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Element Min", "Sets minimum size of an element");
-
- prop= RNA_def_property(srna, "patch_max", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pama");
- RNA_def_property_range(prop, 10, 1000);
- RNA_def_property_ui_text(prop, "Patch Max", "Sets maximum size of a patch.");
-
- prop= RNA_def_property(srna, "patch_min", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pami");
- RNA_def_property_range(prop, 10, 1000);
- RNA_def_property_ui_text(prop, "Patch Min", "Sets minimum size of a patch.");
-
- prop= RNA_def_property(srna, "subshoot_patch", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "subshootp");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "SubShoot Patch", "Sets the number of times the environment is tested to detect paths.");
-
- prop= RNA_def_property(srna, "subshoot_element", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "subshoote");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "SubShoot Element", "Sets the number of times the environment is tested to detect elements.");
-
- prop= RNA_def_property(srna, "max_elements", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "maxnode");
- RNA_def_property_range(prop, 1, 250000);
- RNA_def_property_ui_text(prop, "Max Elements", "Sets the maximum allowed number of elements.");
-
- prop= RNA_def_property(srna, "max_subdiv_shoot", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "maxsublamp");
- RNA_def_property_range(prop, 1, 250);
- RNA_def_property_ui_text(prop, "Max Subdiv Shoot", "Sets the maximum number of initial shoot patches that are evaluated");
-
- prop= RNA_def_property(srna, "remove_doubles_limit", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "nodelim");
- RNA_def_property_range(prop, 0, 50);
- RNA_def_property_ui_text(prop, "Remove Doubles Limit", "Sets the range for removing doubles");
-
- /* flag */
- prop= RNA_def_property(srna, "show_limits", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", RAD_SHOWLIMITS);
- RNA_def_property_ui_text(prop, "Show Limits", "Draws patch and element limits");
-
- prop= RNA_def_property(srna, "show_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", RAD_SHOWZ);
- RNA_def_property_ui_text(prop, "Show Z", "Draws limits differently");
-}
-
-#endif
-
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 8ea8844c65f..aeaedd6f81d 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -34,6 +34,8 @@
#ifdef RNA_RUNTIME
+#include "BLI_ghash.h"
+
/* Struct */
static void rna_Struct_identifier_get(PointerRNA *ptr, char *value)
@@ -277,6 +279,53 @@ PointerRNA rna_builtin_properties_get(CollectionPropertyIterator *iter)
return rna_Struct_properties_get(iter);
}
+PointerRNA rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+ IDProperty *group, *idp;
+ PointerRNA propptr;
+
+ memset(&propptr, 0, sizeof(propptr));
+ srna= ptr->type;
+
+ do {
+ if(srna->cont.prophash) {
+ prop= BLI_ghash_lookup(srna->cont.prophash, (void*)key);
+
+ if(prop) {
+ propptr.type= &RNA_Property;
+ propptr.data= prop;
+ return propptr;
+ }
+ }
+
+ for(prop=srna->cont.properties.first; prop; prop=prop->next) {
+ if(!(prop->flag & PROP_BUILTIN) && strcmp(prop->identifier, key)==0) {
+ propptr.type= &RNA_Property;
+ propptr.data= prop;
+ return propptr;
+ }
+ }
+ } while((srna=srna->base));
+
+ if(ptr->data) {
+ group= RNA_struct_idproperties(ptr, 0);
+
+ if(group) {
+ for(idp=group->data.group.first; idp; idp=idp->next) {
+ if(strcmp(idp->name, key) == 0) {
+ propptr.type= &RNA_Property;
+ propptr.data= idp;
+ return propptr;
+ }
+ }
+ }
+ }
+
+ return propptr;
+}
+
PointerRNA rna_builtin_type_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_Struct, ptr->type);
@@ -467,15 +516,25 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr)
return ((StringPropertyRNA*)prop)->maxlength;
}
+static int rna_enum_check_separator(CollectionPropertyIterator *iter, void *data)
+{
+ EnumPropertyItem *item= (EnumPropertyItem*)data;
+
+ return (item->identifier[0] == 0);
+}
+
static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
EnumPropertyRNA *eprop;
-
+ EnumPropertyItem *item= NULL;
+ int totitem, free= 0;
+
rna_idproperty_check(&prop, ptr);
eprop= (EnumPropertyRNA*)prop;
-
- rna_iterator_array_begin(iter, (void*)eprop->item, sizeof(eprop->item[0]), eprop->totitem, NULL);
+
+ RNA_property_enum_items(NULL, ptr, prop, &item, &totitem, &free);
+ rna_iterator_array_begin(iter, (void*)item, sizeof(EnumPropertyItem), totitem, free, rna_enum_check_separator);
}
static void rna_EnumPropertyItem_identifier_get(PointerRNA *ptr, char *value)
@@ -498,6 +557,26 @@ static int rna_EnumPropertyItem_name_length(PointerRNA *ptr)
return strlen(((EnumPropertyItem*)ptr->data)->name);
}
+static void rna_EnumPropertyItem_description_get(PointerRNA *ptr, char *value)
+{
+ EnumPropertyItem *eprop= (EnumPropertyItem*)ptr->data;
+
+ if(eprop->description)
+ strcpy(value, eprop->description);
+ else
+ value[0]= '\0';
+}
+
+static int rna_EnumPropertyItem_description_length(PointerRNA *ptr)
+{
+ EnumPropertyItem *eprop= (EnumPropertyItem*)ptr->data;
+
+ if(eprop->description)
+ return strlen(eprop->description);
+ else
+ return 0;
+}
+
static int rna_EnumPropertyItem_value_get(PointerRNA *ptr)
{
return ((EnumPropertyItem*)ptr->data)->value;
@@ -611,13 +690,13 @@ static void rna_def_struct(BlenderRNA *brna)
prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Properties", "Properties in the struct.");
prop= RNA_def_property(srna, "functions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Function");
- RNA_def_property_collection_funcs(prop, "rna_Struct_functions_begin", "rna_Struct_functions_next", "rna_iterator_listbase_end", "rna_Struct_functions_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Struct_functions_begin", "rna_Struct_functions_next", "rna_iterator_listbase_end", "rna_Struct_functions_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Functions", "");
}
@@ -626,26 +705,26 @@ static void rna_def_property(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem type_items[] = {
- {PROP_BOOLEAN, "BOOLEAN", "Boolean", ""},
- {PROP_INT, "INT", "Integer", ""},
- {PROP_FLOAT, "FLOAT", "Float", ""},
- {PROP_STRING, "STRING", "String", ""},
- {PROP_ENUM, "ENUM", "Enumeration", ""},
- {PROP_POINTER, "POINTER", "Pointer", ""},
- {PROP_COLLECTION, "COLLECTION", "Collection", ""},
- {0, NULL, NULL, NULL}};
+ {PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
+ {PROP_INT, "INT", 0, "Integer", ""},
+ {PROP_FLOAT, "FLOAT", 0, "Float", ""},
+ {PROP_STRING, "STRING", 0, "String", ""},
+ {PROP_ENUM, "ENUM", 0, "Enumeration", ""},
+ {PROP_POINTER, "POINTER", 0, "Pointer", ""},
+ {PROP_COLLECTION, "COLLECTION", 0, "Collection", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem subtype_items[] = {
- {PROP_NONE, "NONE", "None", ""},
- {PROP_UNSIGNED, "UNSIGNED", "Unsigned Number", ""},
- {PROP_FILEPATH, "FILE_PATH", "File Path", ""},
- {PROP_DIRPATH, "DIRECTORY_PATH", "Directory Path", ""},
- {PROP_COLOR, "COLOR", "Color", ""},
- {PROP_VECTOR, "VECTOR", "Vector", ""},
- {PROP_MATRIX, "MATRIX", "Matrix", ""},
- {PROP_ROTATION, "ROTATION", "Rotation", ""},
- {PROP_NEVER_NULL, "NEVER_NULL", "Never Null", ""},
- {PROP_PERCENTAGE, "PERCENTAGE", "Percentage", ""},
- {0, NULL, NULL, NULL}};
+ {PROP_NONE, "NONE", 0, "None", ""},
+ {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned Number", ""},
+ {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
+ {PROP_DIRPATH, "DIRECTORY_PATH", 0, "Directory Path", ""},
+ {PROP_COLOR, "COLOR", 0, "Color", ""},
+ {PROP_VECTOR, "VECTOR", 0, "Vector", ""},
+ {PROP_MATRIX, "MATRIX", 0, "Matrix", ""},
+ {PROP_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {PROP_NEVER_NULL, "NEVER_NULL", 0, "Never Null", ""},
+ {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Property", NULL);
RNA_def_struct_ui_text(srna, "Property Definition", "RNA property definition.");
@@ -719,7 +798,7 @@ static void rna_def_function(BlenderRNA *brna)
prop= RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
/*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Parameters", "Parameters for the function.");
prop= RNA_def_property(srna, "registered", PROP_BOOLEAN, PROP_NONE);
@@ -800,7 +879,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "items", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "EnumPropertyItem");
- RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Items", "Possible values for the property.");
srna= RNA_def_struct(brna, "EnumPropertyItem", NULL);
@@ -812,6 +891,11 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_name_get", "rna_EnumPropertyItem_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Human readable name.");
+ prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_description_get", "rna_EnumPropertyItem_description_length", NULL);
+ RNA_def_property_ui_text(prop, "Description", "Description of the item's purpose.");
+
prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_identifier_get", "rna_EnumPropertyItem_identifier_length", NULL);
@@ -895,7 +979,7 @@ void RNA_def_rna(BlenderRNA *brna)
prop= RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
- RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Structs", "");
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index b7487f46f8d..f52e130d527 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -31,23 +31,34 @@
#include "DNA_scene_types.h"
+#ifdef WITH_FFMPEG
+#include "BKE_writeffmpeg.h"
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+#endif
+
#include "WM_types.h"
/* prop_mode needs to be accessible from transform operator */
EnumPropertyItem prop_mode_items[] ={
- {PROP_SMOOTH, "SMOOTH", "Smooth", ""},
- {PROP_SPHERE, "SPHERE", "Sphere", ""},
- {PROP_ROOT, "ROOT", "Root", ""},
- {PROP_SHARP, "SHARP", "Sharp", ""},
- {PROP_LIN, "LINEAR", "Linear", ""},
- {PROP_CONST, "CONSTANT", "Constant", ""},
- {PROP_RANDOM, "RANDOM", "Random", ""},
- {0, NULL, NULL, NULL}};
+ {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
+ {PROP_ROOT, "ROOT", 0, "Root", ""},
+ {PROP_SHARP, "SHARP", 0, "Sharp", ""},
+ {PROP_LIN, "LINEAR", 0, "Linear", ""},
+ {PROP_CONST, "CONSTANT", 0, "Constant", ""},
+ {PROP_RANDOM, "RANDOM", 0, "Random", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
+#include "DNA_node_types.h"
+
#include "BKE_context.h"
#include "BKE_global.h"
+#include "BKE_node.h"
+
+#include "BLI_threads.h"
PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
{
@@ -57,9 +68,8 @@ PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
}
-static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
+static int layer_set(int lay, const int *values)
{
- Scene *scene= (Scene*)ptr->data;
int i, tot= 0;
/* ensure we always have some layer selected */
@@ -68,12 +78,21 @@ static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
tot++;
if(tot==0)
- return;
+ return lay;
for(i=0; i<20; i++) {
- if(values[i]) scene->lay |= (1<<i);
- else scene->lay &= ~(1<<i);
+ if(values[i]) lay |= (1<<i);
+ else lay &= ~(1<<i);
}
+
+ return lay;
+}
+
+static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
+{
+ Scene *scene= (Scene*)ptr->data;
+
+ scene->lay= layer_set(scene->lay, values);
}
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
@@ -96,6 +115,94 @@ static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
//update_for_newframe();
}
+static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ if(rd->mode & R_FIXED_THREADS)
+ return rd->threads;
+ else
+ return BLI_system_thread_count();
+}
+
+static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
+}
+
+static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ rd->imtype= value;
+#ifdef WITH_FFMPEG
+ ffmpeg_verify_image_type(rd);
+#endif
+}
+
+static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ return rd->actlay;
+}
+
+static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ rd->actlay= value;
+}
+
+static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ *min= 0;
+ *max= BLI_countlist(&rd->layers)-1;
+ *max= MAX2(0, *max);
+}
+
+static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ Scene *scene= (Scene*)ptr->id.data;
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+
+ BLI_strncpy(rl->name, value, sizeof(rl->name));
+
+ if(scene->nodetree) {
+ bNode *node;
+ int index= BLI_findindex(&scene->r.layers, rl);
+
+ for(node= scene->nodetree->nodes.first; node; node= node->next) {
+ if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
+ if(node->custom1==index)
+ BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
+ }
+ }
+ }
+}
+
+static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
+{
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ 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;
+
+ if(scene->nodetree)
+ ntreeCompositForceHidden(scene->nodetree, scene);
+}
+
#else
void rna_def_sculpt(BlenderRNA *brna)
@@ -145,8 +252,34 @@ void rna_def_tool_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem uv_select_mode_items[] = {
+ {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[] = {
+ {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
+ {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
+ {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem snap_element_items[] = {
+ {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
+ {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
+ {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
+ {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem snap_mode_items[] = {
+ {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
+ {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
+ {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
+ {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "ToolSettings", NULL);
- RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_ui_text(srna, "Tool Settings", "");
prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
@@ -157,135 +290,448 @@ void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "VPaint");
RNA_def_property_ui_text(prop, "Vertex Paint", "");
+ /* Transform */
+ prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
+ RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
+
+ prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
+ 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, "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.");
+
+ prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
+ RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
+ RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
+
+ prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
+ RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
+ RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
+
+ prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
+ RNA_def_property_enum_items(prop, snap_element_items);
+ RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
+
+ prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "snap_target");
+ RNA_def_property_enum_items(prop, snap_mode_items);
+ RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
+
+ prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
+ RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
+ RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
+
+ /* UV */
+ prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
+ RNA_def_property_enum_items(prop, uv_select_mode_items);
+ RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
+
+ prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
+ RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
+ RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
+
+ prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
+ RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
+
+ /* Mesh */
+ prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
+ RNA_def_property_enum_items(prop, mesh_select_mode_items);
+ RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
+
+ prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
+ RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
+
+ /* Sculpt */
rna_def_sculpt(brna);
}
+void rna_def_scene_render_layer(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
+ RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Name", "Render layer name.");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ /* layers */
+ 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.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
+
+ 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.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
+
+ /* layer options */
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
+ RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
+ RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
+ RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
+ RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* passes */
+ prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
+ RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
+ RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
+ RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
+ RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
+ RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
+ RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
+ RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
+ RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
+ RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
+ RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
+ RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
+ RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
+ RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
+ RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
+ RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
+ RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
+ RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+}
+
void rna_def_scene_render_data(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem pixel_filter_items[] ={
- {R_FILTER_BOX, "BOX", "Box", ""},
- {R_FILTER_TENT, "TENT", "Tent", ""},
- {R_FILTER_QUAD, "QUADRATIC", "Quadratic", ""},
- {R_FILTER_CUBIC, "CUBIC", "Cubic", ""},
- {R_FILTER_CATROM, "CATMULLROM", "Catmull-Rom", ""},
- {R_FILTER_GAUSS, "GAUSSIAN", "Gaussian", ""},
- {R_FILTER_MITCH, "MITCHELL", "Mitchell-Netravali", ""},
- {0, NULL, NULL, NULL}};
+ {R_FILTER_BOX, "BOX", 0, "Box", ""},
+ {R_FILTER_TENT, "TENT", 0, "Tent", ""},
+ {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
+ {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
+ {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
+ {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
+ {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem alpha_mode_items[] ={
- {R_ADDSKY, "SKY", "Sky", "Transparent pixels are filled with sky color"},
- {R_ALPHAPREMUL, "PREMUL", "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
- {R_ALPHAKEY, "STRAIGHT", "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
- {0, NULL, NULL, NULL}};
+ {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
+ {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
+ {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem color_mode_items[] ={
- {R_PLANESBW, "BW", "BW", "Images are saved with BW (grayscale) data"},
- {R_PLANES24, "RGB", "RGB", "Images are saved with RGB (color) data"},
- {R_PLANES32, "RGBA", "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
- {0, NULL, NULL, NULL}};
-
+ {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
+ {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem display_mode_items[] ={
+ {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
+ {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
+ {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem octree_resolution_items[] = {
- {64, "OCTREE_RES_64", "64", ""},
- {128, "OCTREE_RES_128", "128", ""},
- {256, "OCTREE_RES_256", "256", ""},
- {512, "OCTREE_RES_512", "512", ""},
- {0, NULL, NULL, NULL}};
+ {64, "OCTREE_RES_64", 0, "64", ""},
+ {128, "OCTREE_RES_128", 0, "128", ""},
+ {256, "OCTREE_RES_256", 0, "256", ""},
+ {512, "OCTREE_RES_512", 0, "512", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem fixed_oversample_items[] = {
- {5, "OVERSAMPLE_5", "5", ""},
- {8, "OVERSAMPLE_8", "8", ""},
- {11, "OVERSAMPLE_11", "11", ""},
- {16, "OVERSAMPLE_16", "16", ""},
- {0, NULL, NULL, NULL}};
+ {5, "OVERSAMPLE_5", 0, "5", ""},
+ {8, "OVERSAMPLE_8", 0, "8", ""},
+ {11, "OVERSAMPLE_11", 0, "11", ""},
+ {16, "OVERSAMPLE_16", 0, "16", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem field_order_items[] = {
- {0, "FIELDS_EVENFIRST", "Even", "Even Fields First"},
- {R_ODDFIELD, "FIELDS_ODDFIRST", "Odd", "Odd Fields First"},
- {0, NULL, NULL, NULL}};
+ {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
+ {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem threads_mode_items[] = {
- {0, "THREADS_AUTO", "Auto-detect", ""},
- {R_FIXED_THREADS, "THREADS_FIXED", "Fixed Number", ""},
- {0, NULL, NULL, NULL}};
+ {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
+ {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem stamp_font_size_items[] = {
- {1, "STAMP_FONT_TINY", "Tiny", ""},
- {2, "STAMP_FONT_SMALL", "Small", ""},
- {3, "STAMP_FONT_MEDIUM", "Medium", ""},
- {0, "STAMP_FONT_LARGE", "Large", ""},
- {4, "STAMP_FONT_EXTRALARGE", "Extra Large", ""},
- {0, NULL, NULL, NULL}};
+ {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
+ {2, "STAMP_FONT_SMALL", 0, "Small", ""},
+ {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
+ {0, "STAMP_FONT_LARGE", 0, "Large", ""},
+ {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem image_type_items[] = {
- {R_FRAMESERVER, "FRAMESERVER", "Frame Server", ""},
-#ifdef WITH_FFMPEG
- {R_FFMPEG, "FFMPEG", "FFMpeg", ""},
+ {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, NULL},
+#ifdef WITH_OPENEXR
+ {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
+ {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
#endif
- {R_AVIRAW, "AVIRAW", "AVI Raw", ""},
- {R_AVIJPEG, "AVIJPEG", "AVI JPEG", ""},
+ {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
+ {R_CINEON, "CINEON", 0, "Cineon", ""},
+ {R_DPX, "DPX", 0, "DPX", ""},
+ {0, "", 0, NULL, NULL},
+ {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
+ {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
#ifdef _WIN32
- {R_AVICODEC, "AVICODEC", "AVI Codec", ""},
+ {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
#endif
#ifdef WITH_QUICKTIME
- {R_QUICKTIME, "QUICKTIME", "QuickTime", ""},
+ {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
#endif
- {R_TARGA, "TARGA", "Targa", ""},
- {R_RAWTGA, "RAWTARGA", "Targa Raw", ""},
- {R_PNG, "PNG", "PNG", ""},
- //{R_DDS, "DDS", "DDS", ""}, // XXX not yet implemented
-#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG2000", "JPEG 2000", ""},
-#endif
- {R_BMP, "BMP", "BMP", ""},
- {R_JPEG90, "JPEG", "JPEG", ""},
- {R_HAMX, "HAMX", "HamX", ""},
- {R_IRIS, "IRIS", "Iris", ""},
- {R_RADHDR, "RADHDR", "Radiance HDR", ""},
- {R_CINEON, "CINEON", "Cineon", ""},
- {R_DPX, "DPX", "DPX", ""},
#ifdef __sgi
- {R_MOVIE, "MOVIE", "Movie", ""},
+ {R_MOVIE, "MOVIE", 0, "Movie", ""},
#endif
-#ifdef WITH_OPENEXR
- {R_OPENEXR, "OPENEXR", "OpenEXR", ""},
- {R_MULTILAYER, "MULTILAYER", "MultiLayer", ""},
+#ifdef WITH_FFMPEG
+ {R_H264, "H264", 0, "H.264", ""},
+ {R_XVID, "XVID", 0, "Xvid", ""},
+ // XXX broken
+#if 0
+#ifdef WITH_OGG
+ {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
+#endif
+#endif
+ {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
#endif
- {R_TIFF, "TIFF", "TIFF", ""}, // XXX only with G.have_libtiff
- {0, NULL, NULL, NULL}};
+ {0, "", 0, NULL, NULL},
+ {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef WITH_OPENEXR
static EnumPropertyItem exr_codec_items[] = {
- {0, "NONE", "None", ""},
- {1, "PXR24", "Pxr24 (lossy)", ""},
- {2, "ZIP", "ZIP (lossless)", ""},
- {3, "PIZ", "PIZ (lossless)", ""},
- {4, "RLE", "RLE (lossless)", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {1, "PXR24", 0, "Pxr24 (lossy)", ""},
+ {2, "ZIP", 0, "ZIP (lossless)", ""},
+ {3, "PIZ", 0, "PIZ (lossless)", ""},
+ {4, "RLE", 0, "RLE (lossless)", ""},
+ {0, NULL, 0, NULL, NULL}};
#endif
#ifdef WITH_OPENJPEG
static EnumPropertyItem jp2_preset_items[] = {
- {0, "NO_PRESET", "No Preset", ""},
- {1, "R_JPEG2K_CINE_PRESET", "Cinema 24fps 2048x1080", ""},
- {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", "Cinema 48fps 2048x1080", ""},
- {3, "R_JPEG2K_CINE_PRESET", "Cinema 24fps 4096x2160", ""},
- {4, "R_JPEG2K_CINE_PRESET", "Cine-Scope 24fps 2048x858", ""},
- {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", "Cine-Scope 48fps 2048x858", ""},
- {6, "R_JPEG2K_CINE_PRESET", "Cine-Flat 24fps 1998x1080", ""},
- {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", "Cine-Flat 48fps 1998x1080", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NO_PRESET", 0, "No Preset", ""},
+ {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
+ {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
+ {3, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 4096x2160", ""},
+ {4, "R_JPEG2K_CINE_PRESET", 0, "Cine-Scope 24fps 2048x858", ""},
+ {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
+ {6, "R_JPEG2K_CINE_PRESET", 0, "Cine-Flat 24fps 1998x1080", ""},
+ {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem jp2_depth_items[] = {
- {0, "8", "8", ""},
- {R_JPEG2K_12BIT, "16", "16", ""},
- {R_JPEG2K_16BIT, "32", "32", ""},
- {0, NULL, NULL, NULL}};
+ {0, "8", 0, "8", ""},
+ {R_JPEG2K_12BIT, "16", 0, "16", ""},
+ {R_JPEG2K_16BIT, "32", 0, "32", ""},
+ {0, NULL, 0, NULL, NULL}};
#endif
-
+
+#ifdef WITH_FFMPEG
+ static EnumPropertyItem ffmpeg_format_items[] = {
+ {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
+ {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
+ {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
+ {FFMPEG_AVI, "AVI", 0, "AVI", ""},
+ {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
+ {FFMPEG_DV, "DV", 0, "DV", ""},
+ {FFMPEG_H264, "H264", 0, "H.264", ""},
+ {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
+ // XXX broken
+#if 0
+#ifdef WITH_OGG
+ {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
+#endif
+#endif
+ {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem ffmpeg_codec_items[] = {
+ {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
+ {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
+ {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
+ {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
+ {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
+ {CODEC_ID_H264, "H264", 0, "H.264", ""},
+ {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
+#ifdef WITH_OGG
+ {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
+#endif
+ {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem ffmpeg_audio_codec_items[] = {
+ {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
+ {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
+ {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
+ {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
+ {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
+ {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
+
srna= RNA_def_struct(brna, "SceneRenderData", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_nested(brna, srna, "Scene");
@@ -294,7 +740,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
RNA_def_property_enum_items(prop, color_mode_items);
- RNA_def_property_ui_text(prop, "Color Mode", "What Color Mode images are saved in (BW, RGB, RGBA)");
+ RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels");
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
@@ -311,7 +757,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "size");
RNA_def_property_ui_range(prop, 1, 100, 10, 1);
- RNA_def_property_ui_text(prop, "Resolution %", "Preview scale for render resolution");
+ RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
@@ -342,33 +788,33 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Quality", "Quality setting for JPEG images, AVI Jpeg and SGI movies.");
+ RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Tiff */
prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
- RNA_def_property_ui_text(prop, "16 Bit", "Save 16 bit per channel TIFF");
+ RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Cineon and DPX */
prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
- RNA_def_property_ui_text(prop, "Log", "Convert to log color space");
+ RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineonblack");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "B", "Log conversion reference black");
+ RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "W", "Log conversion reference white");
+ RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
@@ -383,7 +829,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
RNA_def_property_enum_items(prop, exr_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "Set codec settings for OpenEXR");
+ RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
@@ -398,7 +844,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
- RNA_def_property_ui_text(prop, "Preview", "When animation render, save JPG preview images in same directory");
+ RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
@@ -414,25 +860,107 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
RNA_def_property_enum_items(prop, jp2_depth_items);
- RNA_def_property_ui_text(prop, "Depth", "");
+ RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "jpeg_ycc", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
- RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance instead of RGB color channels");
+ RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
+
+#ifdef WITH_FFMPEG
+ /* FFMPEG Video*/
+
+ prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
+ RNA_def_property_enum_items(prop, ffmpeg_format_items);
+ RNA_def_property_ui_text(prop, "Format", "Output file format");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
+ RNA_def_property_enum_items(prop, ffmpeg_codec_items);
+ RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
+ RNA_def_property_range(prop, 1, 14000);
+ RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
+ RNA_def_property_range(prop, 0, 9000);
+ RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
+ RNA_def_property_range(prop, 1, 14000);
+ RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
+ RNA_def_property_range(prop, 0, 100000000);
+ RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
+ RNA_def_property_range(prop, 0, 2000);
+ RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
+ RNA_def_property_range(prop, 0, 16384);
+ RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
+ RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* FFMPEG Audio*/
+
+ prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
+ RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
+ RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
+ RNA_def_property_range(prop, 32, 384);
+ RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
+ RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frs_sec");
RNA_def_property_range(prop, 1, 120);
- RNA_def_property_ui_text(prop, "FPS", "Frames per second.");
+ RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
RNA_def_property_range(prop, 0.1f, 120.0f);
- RNA_def_property_ui_text(prop, "FPS Base", "Frames per second base");
+ RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
@@ -444,7 +972,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, pixel_filter_items);
- RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining AA samples.");
+ RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
@@ -462,33 +990,33 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ocres");
RNA_def_property_enum_items(prop, octree_resolution_items);
- RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator - use higher resolutions for larger scenes.");
+ RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
- RNA_def_property_ui_text(prop, "Anti-Aliasing", "Renders and combines multiple samples per pixel to prevent aliasing.");
+ RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
- RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "The number of fixed samples per pixel for anti-aliasing.");
+ RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
- RNA_def_property_ui_text(prop, "Fields", "Renders image to two fields per frame, for interlaced TV display.");
+ RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, field_order_items);
- RNA_def_property_ui_text(prop, "Field Order", "");
+ RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output");
prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
- RNA_def_property_ui_text(prop, "Fields Still", "Disables the time difference between fields.");
+ RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
@@ -538,21 +1066,17 @@ void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edge Color", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PANORAMA);
- RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "threads");
RNA_def_property_range(prop, 1, 8);
+ RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, threads_mode_items);
- RNA_def_property_ui_text(prop, "Threads Mode", "");
+ RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
@@ -579,14 +1103,14 @@ void rna_def_scene_render_data(BlenderRNA *brna)
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, "do_composite", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
- RNA_def_property_ui_text(prop, "Do Composite", "Process the render result through the compositing pipeline");
+ RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if a compositing nodes are enabled.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "do_sequence", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
- RNA_def_property_ui_text(prop, "Do Sequence", "Process the render (and composited) result through the video sequence editor pipeline");
+ RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
@@ -597,6 +1121,7 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -607,12 +1132,13 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
- RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and used SceneNodes to files in the temp directory (saves memory, allows Full Sampling).");
+ RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
+ RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample).");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
- RNA_def_property_ui_text(prop, "Full Sample","Saves for every OSA sample the entire RenderLayer results (Higher quality sampling but slower).");
+ RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
@@ -620,16 +1146,16 @@ void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
+ RNA_def_property_enum_items(prop, display_mode_items);
+ RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
+
prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");
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);
- prop= RNA_def_property(srna, "stamp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_STAMP_INFO);
- RNA_def_property_ui_text(prop, "Stamp", "Embed metadata into the rendered image");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
@@ -688,31 +1214,42 @@ void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
RNA_def_property_enum_items(prop, stamp_font_size_items);
- RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp info text");
+ RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Stamp Foreground", "");
+ RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Stamp Background", "");
+ RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ 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, "SceneRenderLayer");
+ RNA_def_property_ui_text(prop, "Render Layers", "");
+
+ prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
+ RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "actlay");
+ RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
+ RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
}
void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem unwrapper_items[] = {
- {0, "CONFORMAL", "Conformal", ""},
- {1, "ANGLEBASED", "Angle Based", ""},
- {0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Scene", "ID");
RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
@@ -736,7 +1273,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
@@ -744,15 +1281,10 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
- prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
- 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, "current_frame", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.cfra");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
@@ -781,11 +1313,6 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "unwrapper", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "toolsettings->unwrapper");
- RNA_def_property_enum_items(prop, unwrapper_items);
- RNA_def_property_ui_text(prop, "Unwrapper", "Unwrap algorithm used by the Unwrap tool.");
-
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
@@ -793,10 +1320,6 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ed");
RNA_def_property_struct_type(prop, "SequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
-
- prop= RNA_def_property(srna, "radiosity", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "radio");
- RNA_def_property_ui_text(prop, "Radiosity", "");
prop= RNA_def_property(srna, "keyingsets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
@@ -824,6 +1347,7 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_tool_settings(brna);
rna_def_scene_render_data(brna);
+ rna_def_scene_render_layer(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index e153994e7a6..fb836a98a52 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -33,15 +33,41 @@
#include "DNA_scene_types.h"
EnumPropertyItem region_type_items[] = {
- {RGN_TYPE_WINDOW, "WINDOW", "Window", ""},
- {RGN_TYPE_HEADER, "HEADER", "Header", ""},
- {RGN_TYPE_CHANNELS, "CHANNELS", "Channels", ""},
- {RGN_TYPE_TEMPORARY, "TEMPORARY", "Temporary", ""},
- {RGN_TYPE_UI, "UI", "UI", ""},
- {0, NULL, NULL, NULL}};
+ {RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""},
+ {RGN_TYPE_HEADER, "HEADER", 0, "Header", ""},
+ {RGN_TYPE_CHANNELS, "CHANNELS", 0, "Channels", ""},
+ {RGN_TYPE_TOOLS, "TOOLS", 0, "Tools", ""},
+ {RGN_TYPE_TEMPORARY, "TEMPORARY", 0, "Temporary", ""},
+ {RGN_TYPE_UI, "UI", 0, "UI", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
+#include "WM_api.h"
+#include "WM_types.h"
+
+static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value)
+{
+ bScreen *sc= (bScreen*)ptr->data;
+
+ if(value.data == NULL)
+ return;
+
+ /* exception: can't set screens inside of area/region handers */
+ sc->newscene= value.data;
+}
+
+static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
+{
+ bScreen *sc= (bScreen*)ptr->data;
+
+ /* exception: can't set screens inside of area/region handers */
+ if(sc->newscene) {
+ WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
+ sc->newscene= NULL;
+ }
+}
+
#else
static void rna_def_scrarea(BlenderRNA *brna)
@@ -94,6 +120,9 @@ static void rna_def_bscreen(BlenderRNA *brna)
prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "areabase", NULL);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 265b59c97ae..53bd230870f 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -78,21 +78,21 @@ void rna_def_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem sensor_type_items[] ={
- {SENS_ALWAYS, "ALWAYS", "Always", ""},
- {SENS_TOUCH, "TOUCH", "Touch", ""},
- {SENS_NEAR, "NEAR", "Near", ""},
- {SENS_KEYBOARD, "KEYBOARD", "Keyboard", ""},
- {SENS_PROPERTY, "PROPERTY", "Property", ""},
- {SENS_MOUSE, "MOUSE", "Mouse", ""},
- {SENS_COLLISION, "COLLISION", "Collision", ""},
- {SENS_RADAR, "RADAR", "Radar", ""},
- {SENS_RANDOM, "RANDOM", "Random", ""},
- {SENS_RAY, "RAY", "Ray", ""},
- {SENS_MESSAGE, "MESSAGE", "Message", ""},
- {SENS_JOYSTICK, "JOYSTICK", "joystick", ""},
- {SENS_ACTUATOR, "ACTUATOR", "Actuator", ""},
- {SENS_DELAY, "DELAY", "Delay", ""},
- {0, NULL, NULL, NULL}};
+ {SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
+ {SENS_TOUCH, "TOUCH", 0, "Touch", ""},
+ {SENS_NEAR, "NEAR", 0, "Near", ""},
+ {SENS_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
+ {SENS_PROPERTY, "PROPERTY", 0, "Property", ""},
+ {SENS_MOUSE, "MOUSE", 0, "Mouse", ""},
+ {SENS_COLLISION, "COLLISION", 0, "Collision", ""},
+ {SENS_RADAR, "RADAR", 0, "Radar", ""},
+ {SENS_RANDOM, "RANDOM", 0, "Random", ""},
+ {SENS_RAY, "RAY", 0, "Ray", ""},
+ {SENS_MESSAGE, "MESSAGE", 0, "Message", ""},
+ {SENS_JOYSTICK, "JOYSTICK", 0, "joystick", ""},
+ {SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
+ {SENS_DELAY, "DELAY", 0, "Delay", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Sensor", NULL);
RNA_def_struct_ui_text(srna, "Sensor", "Game engine logic brick to detect events.");
@@ -166,15 +166,15 @@ void rna_def_mouse_sensor(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem mouse_event_items[] ={
- {BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", "Left Button", ""},
- {BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", "Middle Button", ""},
- {BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", "Right Button", ""},
- {BL_SENS_MOUSE_WHEEL_UP, "WHEELUP", "Wheel Up", ""},
- {BL_SENS_MOUSE_WHEEL_DOWN, "WHEELDOWN", "Wheel Down", ""},
- {BL_SENS_MOUSE_MOVEMENT, "MOVEMENT", "Movement", ""},
- {BL_SENS_MOUSE_MOUSEOVER, "MOUSEOVER", "Mouse Over", ""},
- {BL_SENS_MOUSE_MOUSEOVER_ANY, "MOUSEOVERANY", "Mouse Over Any", ""},
- {0, NULL, NULL, NULL}};
+ {BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""},
+ {BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""},
+ {BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""},
+ {BL_SENS_MOUSE_WHEEL_UP, "WHEELUP", 0, "Wheel Up", ""},
+ {BL_SENS_MOUSE_WHEEL_DOWN, "WHEELDOWN", 0, "Wheel Down", ""},
+ {BL_SENS_MOUSE_MOVEMENT, "MOVEMENT", 0, "Movement", ""},
+ {BL_SENS_MOUSE_MOUSEOVER, "MOUSEOVER", 0, "Mouse Over", ""},
+ {BL_SENS_MOUSE_MOUSEOVER_ANY, "MOUSEOVERANY", 0, "Mouse Over Any", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MouseSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events.");
@@ -245,12 +245,12 @@ void rna_def_property_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] ={
- {SENS_PROP_EQUAL, "PROPEQUAL", "Equal", ""},
- {SENS_PROP_NEQUAL, "PROPNEQUAL", "Not Equal", ""},
- {SENS_PROP_INTERVAL, "PROPINTERVAL", "Interval", ""},
- {SENS_PROP_CHANGED, "PROPCHANGED", "Changed", ""},
- /* {SENS_PROP_EXPRESSION, "PROPEXPRESSION", "Expression", ""}, NOT_USED_IN_UI */
- {0, NULL, NULL, NULL}};
+ {SENS_PROP_EQUAL, "PROPEQUAL", 0, "Equal", ""},
+ {SENS_PROP_NEQUAL, "PROPNEQUAL", 0, "Not Equal", ""},
+ {SENS_PROP_INTERVAL, "PROPINTERVAL", 0, "Interval", ""},
+ {SENS_PROP_CHANGED, "PROPCHANGED", 0, "Changed", ""},
+ /* {SENS_PROP_EXPRESSION, "PROPEXPRESSION", 0, "Expression", ""}, NOT_USED_IN_UI */
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "PropertySensor", "Sensor");
RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties.");
@@ -319,9 +319,9 @@ void rna_def_collision_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] ={
- {0, "PROPERTY", "Property", ""},
- {1, "MATERIAL", "Material", ""},
- {0, NULL, NULL, NULL}};
+ {0, "PROPERTY", 0, "Property", ""},
+ {1, "MATERIAL", 0, "Material", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CollisionSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor.");
@@ -346,13 +346,13 @@ void rna_def_radar_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem axis_items[] ={
- {SENS_RAY_X_AXIS, "XAXIS", "+X axis", ""},
- {SENS_RAY_Y_AXIS, "YAXIS", "+Y axis", ""},
- {SENS_RAY_Z_AXIS, "ZAXIS", "+Z axis", ""},
- {SENS_RAY_NEG_X_AXIS, "NEGXAXIS", "-X axis", ""},
- {SENS_RAY_NEG_Y_AXIS, "NEGYAXIS", "-Y axis", ""},
- {SENS_RAY_NEG_Z_AXIS, "NEGZAXIS", "-Z axis", ""},
- {0, NULL, NULL, NULL}};
+ {SENS_RAY_X_AXIS, "XAXIS", 0, "+X axis", ""},
+ {SENS_RAY_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
+ {SENS_RAY_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
+ {SENS_RAY_NEG_X_AXIS, "NEGXAXIS", 0, "-X axis", ""},
+ {SENS_RAY_NEG_Y_AXIS, "NEGYAXIS", 0, "-Y axis", ""},
+ {SENS_RAY_NEG_Z_AXIS, "NEGZAXIS", 0, "-Z axis", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RadarSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Radar Sensor", "Sensor to detect objects in a cone shaped radar emanating from the current object.");
@@ -395,17 +395,17 @@ void rna_def_ray_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem axis_items[] ={
- {SENS_RAY_X_AXIS, "XAXIS", "+X axis", ""},
- {SENS_RAY_Y_AXIS, "YAXIS", "+Y axis", ""},
- {SENS_RAY_Z_AXIS, "ZAXIS", "+Z axis", ""},
- {SENS_RAY_NEG_X_AXIS, "NEGXAXIS", "-X axis", ""},
- {SENS_RAY_NEG_Y_AXIS, "NEGYAXIS", "-Y axis", ""},
- {SENS_RAY_NEG_Z_AXIS, "NEGZAXIS", "-Z axis", ""},
- {0, NULL, NULL, NULL}};
+ {SENS_RAY_X_AXIS, "XAXIS", 0, "+X axis", ""},
+ {SENS_RAY_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
+ {SENS_RAY_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
+ {SENS_RAY_NEG_X_AXIS, "NEGXAXIS", 0, "-X axis", ""},
+ {SENS_RAY_NEG_Y_AXIS, "NEGYAXIS", 0, "-Y axis", ""},
+ {SENS_RAY_NEG_Z_AXIS, "NEGZAXIS", 0, "-Z axis", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_type_items[] ={
- {0, "PROPERTY", "Property", ""},
- {1, "MATERIAL", "Material", ""},
- {0, NULL, NULL, NULL}};
+ {0, "PROPERTY", 0, "Property", ""},
+ {1, "MATERIAL", 0, "Material", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RaySensor", "Sensor");
RNA_def_struct_ui_text(srna, "Ray Sensor", "Sensor to detect intersections with a ray emanating from the current object.");
@@ -457,17 +457,17 @@ void rna_def_joystick_sensor(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem event_type_items[] ={
- {SENS_JOY_BUTTON, "BUTTON", "Button", ""},
- {SENS_JOY_AXIS, "AXIS", "Axis", ""},
- {SENS_JOY_HAT, "HAT", "Hat", ""},
- {0, NULL, NULL, NULL}};
+ {SENS_JOY_BUTTON, "BUTTON", 0, "Button", ""},
+ {SENS_JOY_AXIS, "AXIS", 0, "Axis", ""},
+ {SENS_JOY_HAT, "HAT", 0, "Hat", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem axis_direction_items[] ={
- {SENS_JOY_X_AXIS, "RIGHTAXIS", "Right Axis", ""},
- {SENS_JOY_Y_AXIS, "UPAXIS", "Up Axis", ""},
- {SENS_JOY_NEG_X_AXIS, "LEFTAXIS", "Left Axis", ""},
- {SENS_JOY_NEG_Y_AXIS, "DOWNAXIS", "Down Axis", ""},
- {0, NULL, NULL, NULL}};
+ {SENS_JOY_X_AXIS, "RIGHTAXIS", 0, "Right Axis", ""},
+ {SENS_JOY_Y_AXIS, "UPAXIS", 0, "Up Axis", ""},
+ {SENS_JOY_NEG_X_AXIS, "LEFTAXIS", 0, "Left Axis", ""},
+ {SENS_JOY_NEG_Y_AXIS, "DOWNAXIS", 0, "Down Axis", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "JoystickSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Joystick Sensor", "Sensor to detect joystick events.");
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 357e3bf8bc8..8ca023dc57c 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -36,6 +36,10 @@
#include "BKE_sequence.h"
+#include "MEM_guardedalloc.h"
+
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
static int rna_SequenceEditor_name_length(PointerRNA *ptr)
@@ -48,6 +52,115 @@ static void rna_SequenceEditor_name_get(PointerRNA *ptr, char *str)
strcpy(str, "Sequence Editor");
}
+static void rna_SequenceEditor_start_frame_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ Scene *sce= (Scene*)ptr->id.data;
+ Editing *ed= seq_give_editing(sce, FALSE);
+
+ seq->start= value;
+ calc_sequence_disp(seq);
+
+ if( seq_test_overlap(ed->seqbasep, seq) ) {
+ shuffle_seq(ed->seqbasep, seq);
+ }
+ sort_seq(sce);
+}
+
+static void rna_SequenceEditor_length_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ Scene *sce= (Scene*)ptr->id.data;
+ Editing *ed= seq_give_editing(sce, FALSE);
+
+ seq_tx_set_final_right(seq, seq->start+value);
+ calc_sequence_disp(seq);
+
+ if( seq_test_overlap(ed->seqbasep, seq) ) {
+ shuffle_seq(ed->seqbasep, seq);
+ }
+ sort_seq(sce);
+}
+
+static int rna_SequenceEditor_length_get(PointerRNA *ptr)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ return seq_tx_get_final_right(seq, 1)-seq_tx_get_final_left(seq, 1);
+}
+
+static void rna_SequenceEditor_channel_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ Scene *sce= (Scene*)ptr->id.data;
+ Editing *ed= seq_give_editing(sce, FALSE);
+
+ seq->machine= value;
+
+ if( seq_test_overlap(ed->seqbasep, seq) ) {
+ shuffle_seq(ed->seqbasep, seq);
+ }
+ sort_seq(sce);
+}
+
+/* properties that need to allocate structs */
+static void rna_SequenceEditor_use_color_balance_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ int c;
+
+ if(value) {
+ seq->flag |= SEQ_USE_COLOR_BALANCE;
+ if(seq->strip->color_balance == NULL) {
+ seq->strip->color_balance = MEM_callocN(sizeof(struct StripColorBalance), "StripColorBalance");
+ for (c=0; c<3; c++) {
+ seq->strip->color_balance->lift[c] = 1.0f;
+ seq->strip->color_balance->gamma[c] = 1.0f;
+ seq->strip->color_balance->gain[c] = 1.0f;
+ }
+ }
+ } else {
+ seq->flag ^= SEQ_USE_COLOR_BALANCE;
+ }
+}
+
+static void rna_SequenceEditor_use_proxy_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ if(value) {
+ seq->flag |= SEQ_USE_PROXY;
+ if(seq->strip->proxy == NULL) {
+ seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
+ }
+ } else {
+ seq->flag ^= SEQ_USE_PROXY;
+ }
+}
+
+static void rna_SequenceEditor_use_translation_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ if(value) {
+ seq->flag |= SEQ_USE_TRANSFORM;
+ if(seq->strip->transform == NULL) {
+ seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
+ }
+ } else {
+ seq->flag ^= SEQ_USE_TRANSFORM;
+ }
+}
+
+static void rna_SequenceEditor_use_crop_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ if(value) {
+ seq->flag |= SEQ_USE_CROP;
+ if(seq->strip->crop == NULL) {
+ seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
+ }
+ } else {
+ seq->flag ^= SEQ_USE_CROP;
+ }
+}
/* name functions that ignore the first two characters */
static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
{
@@ -245,41 +358,41 @@ static void rna_def_sequence(BlenderRNA *brna)
FunctionRNA *func;
static const EnumPropertyItem seq_type_items[]= {
- {SEQ_IMAGE, "IMAGE", "Image", ""},
- {SEQ_META, "META", "Meta", ""},
- {SEQ_SCENE, "SCENE", "Scene", ""},
- {SEQ_MOVIE, "MOVIE", "Movie", ""},
- {SEQ_RAM_SOUND, "RAM_SOUND", "Ram Sound", ""},
- {SEQ_HD_SOUND, "HD_SOUND", "HD Sound", ""},
- {SEQ_MOVIE_AND_HD_SOUND, "MOVIE_AND_HD_SOUND", "Movie and HD Sound", ""},
- {SEQ_EFFECT, "REPLACE", "Replace", ""},
- {SEQ_CROSS, "CROSS", "Cross", ""},
- {SEQ_ADD, "ADD", "Add", ""},
- {SEQ_SUB, "SUBTRACT", "Subtract", ""},
- {SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", ""},
- {SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", ""},
- {SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", ""},
- {SEQ_MUL, "MULTIPLY", "Multiply", ""},
- {SEQ_OVERDROP, "OVER_DROP", "Over Drop", ""},
- {SEQ_PLUGIN, "PLUGIN", "plugin", ""},
- {SEQ_WIPE, "WIPE", "Wipe", ""},
- {SEQ_GLOW, "GLOW", "Glow", ""},
- {SEQ_TRANSFORM, "TRANSFORM", "Transform", ""},
- {SEQ_COLOR, "COLOR", "Color", ""},
- {SEQ_SPEED, "SPEED", "Speed", ""},
- {0, NULL, NULL, NULL}};
+ {SEQ_IMAGE, "IMAGE", 0, "Image", ""},
+ {SEQ_META, "META", 0, "Meta", ""},
+ {SEQ_SCENE, "SCENE", 0, "Scene", ""},
+ {SEQ_MOVIE, "MOVIE", 0, "Movie", ""},
+ {SEQ_RAM_SOUND, "RAM_SOUND", 0, "Ram Sound", ""},
+ {SEQ_HD_SOUND, "HD_SOUND", 0, "HD Sound", ""},
+ {SEQ_MOVIE_AND_HD_SOUND, "MOVIE_AND_HD_SOUND", 0, "Movie and HD Sound", ""},
+ {SEQ_EFFECT, "REPLACE", 0, "Replace", ""},
+ {SEQ_CROSS, "CROSS", 0, "Cross", ""},
+ {SEQ_ADD, "ADD", 0, "Add", ""},
+ {SEQ_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+ {SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
+ {SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
+ {SEQ_PLUGIN, "PLUGIN", 0, "plugin", ""},
+ {SEQ_WIPE, "WIPE", 0, "Wipe", ""},
+ {SEQ_GLOW, "GLOW", 0, "Glow", ""},
+ {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
+ {SEQ_COLOR, "COLOR", 0, "Color", ""},
+ {SEQ_SPEED, "SPEED", 0, "Speed", ""},
+ {0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem blend_mode_items[]= {
- {SEQ_BLEND_REPLACE, "REPLACE", "Replace", ""},
- {SEQ_CROSS, "CROSS", "Cross", ""},
- {SEQ_ADD, "ADD", "Add", ""},
- {SEQ_SUB, "SUBTRACT", "Subtract", ""},
- {SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", ""},
- {SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", ""},
- {SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", ""},
- {SEQ_MUL, "MULTIPLY", "Multiply", ""},
- {SEQ_OVERDROP, "OVER_DROP", "Over Drop", ""},
- {0, NULL, NULL, NULL}};
+ {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
+ {SEQ_CROSS, "CROSS", 0, "Cross", ""},
+ {SEQ_ADD, "ADD", 0, "Add", ""},
+ {SEQ_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+ {SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
+ {SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
+ {0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "Sequence", NULL);
RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor.");
@@ -316,10 +429,12 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
RNA_def_property_ui_text(prop, "Mute", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED);
RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
@@ -329,52 +444,61 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "length", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "len");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // computed from other values
+ RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
-
+ RNA_def_property_int_funcs(prop, "rna_SequenceEditor_length_get", "rna_SequenceEditor_length_set",NULL);
+
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "start");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_start_frame_set",NULL); // overlap tests and calc_seq_disp
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "start_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "Start Offset", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "end_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "End offset", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "start_still", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "startstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "end_still", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "endstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "End Still", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "machine");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip.");
+ RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_channel_set",NULL); // overlap test
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
/* blending */
prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, blend_mode_items);
RNA_def_property_ui_text(prop, "Blend Mode", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "blend_opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Blend Opacity", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- /* funcsions */
+ /* functions */
func= RNA_def_function(srna, "getStripElem", "give_stripelem");
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None.");
prop= RNA_def_int(func, "frame", 0, INT_MIN, INT_MAX, "Frame", "The frame to get the strip element from", INT_MIN, INT_MAX);
@@ -407,7 +531,7 @@ void rna_def_editor(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip.");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEdtior_meta_stack_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEdtior_meta_stack_get", 0, 0, 0, 0, 0);
prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
@@ -425,58 +549,71 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "flip_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "flip_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "convert_float", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "multiply_colors", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "mul");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Multiply Colors", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate color balance
RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_color_balance_set");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance");
RNA_def_property_ui_text(prop, "Color Balance", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate transform
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_translation_set");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
RNA_def_property_ui_text(prop, "Transform", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate crop
RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_crop_set");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
RNA_def_property_ui_text(prop, "Crop", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_filter_sound(StructRNA *srna)
@@ -500,8 +637,8 @@ static void rna_def_proxy(StructRNA *srna)
prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate proxy
RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_proxy_set");
prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
@@ -673,19 +810,19 @@ static void rna_def_wipe(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem wipe_type_items[]= {
- {0, "SINGLE", "Single", ""},
- {1, "DOUBLE", "Double", ""},
- /* not used yet {2, "BOX", "Box", ""}, */
- /* not used yet {3, "CROSS", "Cross", ""}, */
- {4, "IRIS", "Iris", ""},
- {5, "CLOCK", "Clock", ""},
- {0, NULL, NULL, NULL}
+ {0, "SINGLE", 0, "Single", ""},
+ {1, "DOUBLE", 0, "Double", ""},
+ /* not used yet {2, "BOX", 0, "Box", ""}, */
+ /* not used yet {3, "CROSS", 0, "Cross", ""}, */
+ {4, "IRIS", 0, "Iris", ""},
+ {5, "CLOCK", 0, "Clock", ""},
+ {0, NULL, 0, NULL, NULL}
};
static const EnumPropertyItem wipe_direction_items[]= {
- {0, "OUT", "Out", ""},
- {1, "IN", "In", ""},
- {0, NULL, NULL, NULL}
+ {0, "OUT", 0, "Out", ""},
+ {1, "IN", 0, "In", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "WipeSequence", "EffectSequence");
@@ -758,16 +895,16 @@ static void rna_def_transform(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem interpolation_items[]= {
- {0, "NONE", "None", "No interpolation."},
- {1, "BILINEAR", "Bilinear", "Bilinear interpolation."},
- {2, "BICUBIC", "Bicubic", "Bicubic interpolation."},
- {0, NULL, NULL, NULL}
+ {0, "NONE", 0, "None", "No interpolation."},
+ {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation."},
+ {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation."},
+ {0, NULL, 0, NULL, NULL}
};
static const EnumPropertyItem translation_unit_items[]= {
- {0, "PIXELS", "Pixels", ""},
- {1, "PERCENT", "Percent", ""},
- {0, NULL, NULL, NULL}
+ {0, "PIXELS", 0, "Pixels", ""},
+ {1, "PERCENT", 0, "Percent", ""},
+ {0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "TransformSequence", "EffectSequence");
@@ -846,6 +983,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_ui_text(prop, "Color", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_speed_control(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 118c39655e8..363a5595b43 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -46,17 +46,17 @@ static void rna_def_sample(BlenderRNA *brna)
/* sound types */
static EnumPropertyItem prop_sample_type_items[] = {
- {SAMPLE_INVALID, "INVALID", "Invalid", ""},
- {SAMPLE_UNKNOWN, "UNKNOWN", "Unknown", ""},
- {SAMPLE_RAW, "RAW", "Raw", ""},
- {SAMPLE_WAV, "WAV", "WAV", "Uncompressed"},
- {SAMPLE_MP2, "MP2", "MP2", "MPEG-1 Audio Layer 2"},
- {SAMPLE_MP3, "MP3", "MP3", "MPEG-1 Audio Layer 3"},
- {SAMPLE_OGG_VORBIS, "OGG_VORBIS", "Ogg Vorbis", ""},
- {SAMPLE_WMA, "WMA", "WMA", "Windows Media Audio"},
- {SAMPLE_ASF, "ASF", "ASF", "Windows Advanced Systems Format"},
- {SAMPLE_AIFF, "AIFF", "AIFF", "Audio Interchange File Format"},
- {0, NULL, NULL, NULL}};
+ {SAMPLE_INVALID, "INVALID", 0, "Invalid", ""},
+ {SAMPLE_UNKNOWN, "UNKNOWN", 0, "Unknown", ""},
+ {SAMPLE_RAW, "RAW", 0, "Raw", ""},
+ {SAMPLE_WAV, "WAV", 0, "WAV", "Uncompressed"},
+ {SAMPLE_MP2, "MP2", 0, "MP2", "MPEG-1 Audio Layer 2"},
+ {SAMPLE_MP3, "MP3", 0, "MP3", "MPEG-1 Audio Layer 3"},
+ {SAMPLE_OGG_VORBIS, "OGG_VORBIS", 0, "Ogg Vorbis", ""},
+ {SAMPLE_WMA, "WMA", 0, "WMA", "Windows Media Audio"},
+ {SAMPLE_ASF, "ASF", 0, "ASF", "Windows Advanced Systems Format"},
+ {SAMPLE_AIFF, "AIFF", 0, "AIFF", "Audio Interchange File Format"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SoundSample", "ID");
RNA_def_struct_sdna(srna, "bSample");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 5de80cce2b5..697548de817 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -30,6 +30,7 @@
#include "rna_internal.h"
+#include "DNA_action_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
@@ -37,32 +38,51 @@
#include "WM_types.h"
EnumPropertyItem space_type_items[] = {
- {SPACE_EMPTY, "EMPTY", "Empty", ""},
- {SPACE_VIEW3D, "VIEW_3D", "3D View", ""},
- {SPACE_IPO, "GRAPH_EDITOR", "Graph Editor", ""},
- {SPACE_OUTLINER, "OUTLINER", "Outliner", ""},
- {SPACE_BUTS, "BUTTONS_WINDOW", "Buttons Window", ""},
- {SPACE_FILE, "FILE_BROWSER", "File Browser", ""},
- {SPACE_IMAGE, "IMAGE_EDITOR", "Image Editor", ""},
- {SPACE_INFO, "USER_PREFERENCES", "User Preferences", ""},
- {SPACE_SEQ, "SEQUENCE_EDITOR", "Sequence Editor", ""},
- {SPACE_TEXT, "TEXT_EDITOR", "Text Editor", ""},
- //{SPACE_IMASEL, "IMAGE_BROWSER", "Image Browser", ""},
- {SPACE_SOUND, "AUDIO_WINDOW", "Audio Window", ""},
- {SPACE_ACTION, "DOPESHEET_EDITOR", "DopeSheet Editor", ""},
- {SPACE_NLA, "NLA_EDITOR", "NLA Editor", ""},
- {SPACE_SCRIPT, "SCRIPTS_WINDOW", "Scripts Window", ""},
- {SPACE_TIME, "TIMELINE", "Timeline", ""},
- {SPACE_NODE, "NODE_EDITOR", "Node Editor", ""},
- {0, NULL, NULL, NULL}};
+ {SPACE_EMPTY, "EMPTY", 0, "Empty", ""},
+ {SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
+ {SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
+ {SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
+ {SPACE_BUTS, "BUTTONS_WINDOW", 0, "Buttons Window", ""},
+ {SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
+ {SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
+ {SPACE_INFO, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
+ {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
+ //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
+ {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""},
+ {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""},
+ {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""},
+ {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""},
+ {SPACE_TIME, "TIMELINE", 0, "Timeline", ""},
+ {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
+ {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+#define DC_RGB {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."}
+#define DC_RGBA {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency."}
+#define DC_ALPHA {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel."}
+#define DC_Z {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)."}
+#ifdef WITH_LCMS
+#define DC_LCMS {SI_COLOR_CORRECTION, "COLOR_CORRECTED", ICON_IMAGE_ALPHA, "Color Corrected", "Display color corrected image."}
+#else
+#define DC_LCMS {0, NULL, 0, NULL, NULL}
+#endif
+#define DC_ZERO {0, NULL, 0, NULL, NULL}
+
+static EnumPropertyItem dc_all_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_Z, DC_LCMS, DC_ZERO};
#ifdef RNA_RUNTIME
#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
+#include "ED_image.h"
+
+#include "IMB_imbuf_types.h"
+
static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
{
SpaceLink *space= (SpaceLink*)ptr->data;
@@ -70,15 +90,14 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
switch(space->spacetype) {
case SPACE_VIEW3D:
return &RNA_Space3DView;
- /*case SPACE_IPO:
+ case SPACE_IPO:
return &RNA_SpaceGraphEditor;
- */
case SPACE_OUTLINER:
return &RNA_SpaceOutliner;
case SPACE_BUTS:
return &RNA_SpaceButtonsWindow;
- /* case SPACE_FILE:
- return &RNA_SpaceFileBrowser;*/
+ case SPACE_FILE:
+ return &RNA_SpaceFileBrowser;
case SPACE_IMAGE:
return &RNA_SpaceImageEditor;
/*case SPACE_INFO:
@@ -90,28 +109,32 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
//case SPACE_IMASEL:
// return &RNA_SpaceImageBrowser;
/*case SPACE_SOUND:
- return &RNA_SpaceAudioWindow;
+ return &RNA_SpaceAudioWindow;*/
case SPACE_ACTION:
return &RNA_SpaceDopeSheetEditor;
case SPACE_NLA:
- return &RNA_SpaceNLAEditor;
- case SPACE_SCRIPT:
+ return &RNA_SpaceNLA;
+ /*case SPACE_SCRIPT:
return &RNA_SpaceScriptsWindow;
case SPACE_TIME:
return &RNA_SpaceTimeline;
case SPACE_NODE:
- return &RNA_SpaceNodeEditor;*/
+ return &RNA_SpaceNodeEditor;
+ case SPACE_LOGIC:
+ return &RNA_SpaceLogicEditor;*/
default:
return &RNA_Space;
}
}
-static PointerRNA rna_SpaceImage_uvedit_get(PointerRNA *ptr)
+/* Space Image Editor */
+
+static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data);
}
-static void rna_SpaceImage_paint_update(bContext *C, PointerRNA *ptr)
+static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr)
{
Scene *scene= CTX_data_scene(C);
@@ -119,6 +142,63 @@ static void rna_SpaceImage_paint_update(bContext *C, PointerRNA *ptr)
brush_check_exists(&scene->toolsettings->imapaint.brush);
}
+static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)(ptr->data);
+ return ED_space_image_show_render(sima);
+}
+
+static int rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)(ptr->data);
+ return ED_space_image_show_paint(sima);
+}
+
+static int rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)(ptr->data);
+ bScreen *sc= (bScreen*)ptr->id.data;
+ return ED_space_image_show_uvedit(sima, sc->scene->obedit);
+}
+
+static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceImage *sima= (SpaceImage*)(ptr->data);
+ bScreen *sc= (bScreen*)ptr->id.data;
+
+ ED_space_image_set(NULL, sima, sc->scene, sc->scene->obedit, (Image*)value.data);
+}
+
+static EnumPropertyItem dc_rgb_items[] = {DC_RGB, DC_LCMS, DC_ZERO};
+static EnumPropertyItem dc_alpha_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_LCMS, DC_ZERO};
+static EnumPropertyItem dc_z_items[] = {DC_RGB, DC_Z, DC_LCMS, DC_ZERO};
+
+static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ SpaceImage *sima= (SpaceImage*)ptr->data;
+ ImBuf *ibuf= ED_space_image_buffer(sima);
+ int zbuf, alpha;
+
+ if(C==NULL) {
+ /* needed for doc generation */
+ return dc_all_items;
+ }
+
+ alpha= ibuf && (ibuf->channels == 4);
+ zbuf= ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1));
+
+ if(alpha && zbuf)
+ return dc_all_items;
+ else if(alpha)
+ return dc_alpha_items;
+ else if(zbuf)
+ return dc_z_items;
+ else
+ return dc_rgb_items;
+}
+
+/* Space Text Editor */
+
void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
{
SpaceText *st= (SpaceText*)(ptr->data);
@@ -135,6 +215,15 @@ void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
st->top= 0;
}
+void rna_SpaceFileBrowser_params_set(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceFile *sfile= (SpaceFile*)(ptr->data);
+
+ sfile->params= value.data;
+}
+
+/* Space Buttons */
+
StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
@@ -169,32 +258,29 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
-#if 0
- static EnumPropertyItem select_mode_items[] = {
- {SI_SELECT_VERTEX, "VERTEX", "Vertex", "Vertex selection mode."},
- //{SI_SELECT_EDGE, "Edge", "Edge", "Edge selection mode."},
- {SI_SELECT_FACE, "FACE", "Face", "Face selection mode."},
- {SI_SELECT_ISLAND, "ISLAND", "Island", "Island selection mode."},
- {0, NULL, NULL, NULL}};
-#endif
-
static EnumPropertyItem sticky_mode_items[] = {
- {SI_STICKY_DISABLE, "DISABLED", "Disabled", "Sticky vertex selection disabled."},
- {SI_STICKY_LOC, "SHARED_LOCATION", "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."},
- {SI_STICKY_VERTEX, "SHARED_VERTEX", "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
- {0, NULL, NULL, NULL}};
+ {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled."},
+ {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."},
+ {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uv_items[] = {
- {SI_UVDT_OUTLINE, "OUTLINE", "Outline", "Draw white edges with black outline."},
- {SI_UVDT_DASH, "DASH", "Dash", "Draw dashed black-white edges."},
- {SI_UVDT_BLACK, "BLACK", "Black", "Draw black edges."},
- {SI_UVDT_WHITE, "WHITE", "White", "Draw white edges."},
- {0, NULL, NULL, NULL}};
+ {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline."},
+ {SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges."},
+ {SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges."},
+ {SI_UVDT_WHITE, "WHITE", 0, "White", "Draw white edges."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uvstretch_items[] = {
- {SI_UVDT_STRETCH_ANGLE, "ANGLE", "Angle", "Angular distortion between UV and 3D angles."},
- {SI_UVDT_STRETCH_AREA, "AREA", "Area", "Area distortion between UV and 3D faces."},
- {0, NULL, NULL, NULL}};
+ {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles."},
+ {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem pivot_items[] = {
+ {V3D_CENTER, "CENTER", ICON_ROTATE, "Bounding Box Center", ""},
+ {V3D_CENTROID, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""},
+ {V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceUVEditor", NULL);
RNA_def_struct_sdna(srna, "SpaceImage");
@@ -202,55 +288,52 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space.");
/* selection */
- /*prop= RNA_def_property(srna, "selection_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "selectmode");
- RNA_def_property_enum_items(prop, select_mode_items);
- RNA_def_property_ui_text(prop, "Selection Mode", "UV selection and display mode.");*/
-
prop= RNA_def_property(srna, "sticky_selection_mode", PROP_ENUM, PROP_NONE);
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_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_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_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_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_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "draw_modified_edges", 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 Modified Edges", "Draw edges from the final mesh after object modifier evaluation.");
+ 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_IMAGE|ND_DISPLAY, NULL);
- /*prop= RNA_def_property(srna, "local_view", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LOCAL_UV);
- RNA_def_property_ui_text(prop, "Local View", "Draw only faces with the currently displayed image assigned.");*/
+ 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_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_IMAGE|ND_DISPLAY, NULL);
/* todo: move edge and face drawing options here from G.f */
- /* editing */
- /*prop= RNA_def_property(srna, "sync_selection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SYNC_UVSEL);
- RNA_def_property_ui_text(prop, "Sync Selection", "Keep UV and edit mode mesh selection in sync.");*/
-
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.");
@@ -262,6 +345,12 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
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.");
+
+ 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_IMAGE|ND_DISPLAY, NULL);
}
static void rna_def_space_outliner(BlenderRNA *brna)
@@ -270,18 +359,18 @@ static void rna_def_space_outliner(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem display_mode_items[] = {
- {0, "ALL_SCENES", "All Scenes", ""},
- {1, "CURRENT_SCENE", "Current Scene", ""},
- {2, "VISIBLE_LAYERS", "Visible Layers", ""},
- {3, "SELECTED", "Selected", ""},
- {4, "ACTIVE", "Active", ""},
- {5, "SAME_TYPES", "Same Types", ""},
- {6, "GROUPS", "Groups", ""},
- {7, "LIBRARIES", "Libraries", ""},
- {10, "SEQUENCE", "Sequence", ""},
- {11, "DATABLOCKS", "Datablocks", ""},
- {12, "USER_PREFERENCES", "User Preferences", ""},
- {0, NULL, NULL, NULL}};
+ {0, "ALL_SCENES", 0, "All Scenes", ""},
+ {1, "CURRENT_SCENE", 0, "Current Scene", ""},
+ {2, "VISIBLE_LAYERS", 0, "Visible Layers", ""},
+ {3, "SELECTED", 0, "Selected", ""},
+ {4, "ACTIVE", 0, "Active", ""},
+ {5, "SAME_TYPES", 0, "Same Types", ""},
+ {6, "GROUPS", 0, "Groups", ""},
+ {7, "LIBRARIES", 0, "Libraries", ""},
+ {10, "SEQUENCE", 0, "Sequence", ""},
+ {11, "DATABLOCKS", 0, "Datablocks", ""},
+ {12, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceOutliner", "Space");
RNA_def_struct_sdna(srna, "SpaceOops");
@@ -312,6 +401,7 @@ static void rna_def_background_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
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_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");
@@ -343,28 +433,28 @@ static void rna_def_space_3dview(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem viewport_shading_items[] = {
- {OB_BOUNDBOX, "BOUNDBOX", "Bounding Box", "Display the object's local bounding boxes only"},
- {OB_WIRE, "WIREFRAME", "Wireframe", "Display the object as wire edges"},
- {OB_SOLID, "SOLID", "Solid", "Display the object solid, lit with default OpenGL lights"},
- {OB_SHADED, "SHADED", "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
- {OB_TEXTURE, "TEXTURED", "Textured", "Display the object solid, with face-assigned textures"},
- {0, NULL, NULL, NULL}};
+ {OB_BOUNDBOX, "BOUNDBOX", 0, "Bounding Box", "Display the object's local bounding boxes only"},
+ {OB_WIRE, "WIREFRAME", 0, "Wireframe", "Display the object as wire edges"},
+ {OB_SOLID, "SOLID", 0, "Solid", "Display the object solid, lit with default OpenGL lights"},
+ {OB_SHADED, "SHADED", 0, "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
+ {OB_TEXTURE, "TEXTURED", 0, "Textured", "Display the object solid, with face-assigned textures"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pivot_items[] = {
- {V3D_CENTER, "BOUNDING_BOX_CENTER", "Bounding Box Center", ""},
- {V3D_CURSOR, "CURSOR", "3D Cursor", ""},
- {V3D_LOCAL, "INDIVIDUAL_CENTERS", "Individual Centers", ""},
- {V3D_CENTROID, "MEDIAN_POINT", "Median Point", ""},
- {V3D_ACTIVE, "ACTIVE_ELEMENT", "Active Element", ""},
- {0, NULL, NULL, NULL}};
+ {V3D_CENTER, "BOUNDING_BOX_CENTER", 0, "Bounding Box Center", ""},
+ {V3D_CURSOR, "CURSOR", 0, "3D Cursor", ""},
+ {V3D_LOCAL, "INDIVIDUAL_CENTERS", 0, "Individual Centers", ""},
+ {V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""},
+ {V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem transform_orientation_items[] = {
- {V3D_MANIP_GLOBAL, "ORIENT_GLOBAL", "Global", "Align the transformation axes to world space"},
- {V3D_MANIP_LOCAL, "ORIENT_LOCAL", "Local", "Align the transformation axes to the selected objects' local space"},
- {V3D_MANIP_NORMAL, "ORIENT_NORMAL", "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"},
- {V3D_MANIP_VIEW, "ORIENT_VIEW", "View", "Align the transformation axes to the window"},
- {V3D_MANIP_CUSTOM, "ORIENT_CUSTOM", "Custom", "Use a custom transform orientation"},
- {0, NULL, NULL, NULL}};
+ {V3D_MANIP_GLOBAL, "ORIENT_GLOBAL", 0, "Global", "Align the transformation axes to world space"},
+ {V3D_MANIP_LOCAL, "ORIENT_LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"},
+ {V3D_MANIP_NORMAL, "ORIENT_NORMAL", 0, "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"},
+ {V3D_MANIP_VIEW, "ORIENT_VIEW", 0, "View", "Align the transformation axes to the window"},
+ {V3D_MANIP_CUSTOM, "ORIENT_CUSTOM", 0, "Custom", "Use a custom transform orientation"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Space3DView", "Space");
RNA_def_struct_sdna(srna, "View3D");
@@ -454,6 +544,10 @@ static void rna_def_space_3dview(BlenderRNA *brna)
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");
+ prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
+ 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");
+
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);
@@ -462,23 +556,28 @@ static void rna_def_space_3dview(BlenderRNA *brna)
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_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_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_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_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_OBJECT|ND_TRANSFORM, NULL);
}
@@ -488,24 +587,23 @@ static void rna_def_space_buttons(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem buttons_context_items[] = {
- {BCONTEXT_SCENE, "SCENE", "Scene", ""},
- {BCONTEXT_WORLD, "WORLD", "World", ""},
- {BCONTEXT_OBJECT, "OBJECT", "Object", ""},
- {BCONTEXT_DATA, "DATA", "Data", ""},
- {BCONTEXT_MATERIAL, "MATERIAL", "Material", ""},
- {BCONTEXT_TEXTURE, "TEXTURE", "Texture", ""},
- {BCONTEXT_PARTICLE, "PARTICLE", "Particle", ""},
- {BCONTEXT_PHYSICS, "PHYSICS", "Physics", ""},
- {BCONTEXT_GAME, "GAME", "Game", ""},
- {BCONTEXT_BONE, "BONE", "Bone", ""},
- {BCONTEXT_MODIFIER, "MODIFIER", "Modifier", ""},
- {BCONTEXT_CONSTRAINT, "CONSTRAINT", "Constraint", ""},
- {0, NULL, NULL, NULL}};
+ {BCONTEXT_SCENE, "SCENE", ICON_SCENE, "Scene", "Scene"},
+ {BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World"},
+ {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object"},
+ {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraint", "Constraint"},
+ {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifier", "Modifier"},
+ {BCONTEXT_DATA, "DATA", 0, "Data", "Data"},
+ {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"},
+ {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
+ {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
+ {BCONTEXT_PARTICLE, "PARTICLE", ICON_PARTICLES, "Particle", "Particle"},
+ {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem panel_alignment_items[] = {
- {1, "HORIZONTAL", "Horizontal", ""},
- {2, "VERTICAL", "Vertical", ""},
- {0, NULL, NULL, NULL}};
+ {1, "HORIZONTAL", 0, "Horizontal", ""},
+ {2, "VERTICAL", 0, "Vertical", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceButtonsWindow", "Space");
RNA_def_struct_sdna(srna, "SpaceButs");
@@ -515,11 +613,13 @@ 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, "Buttons Context", "The type of active data to display and edit in the buttons window");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "panel_alignment", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, panel_alignment_items);
RNA_def_property_ui_text(prop, "Panel Alignment", "Arrangement of the panels within the buttons window");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* pinned data */
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
@@ -534,55 +634,57 @@ static void rna_def_space_image(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem draw_channels_items[] = {
- {0, "COLOR", "Color", "Draw image with RGB colors."},
- {SI_USE_ALPHA, "COLOR_ALPHA", "Color and Alpha", "Draw image with RGB colors and alpha transparency."},
- {SI_SHOW_ALPHA, "ALPHA", "Alpha", "Draw alpha transparency channel."},
- {SI_SHOW_ZBUF, "Z_BUFFER", "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)."},
- {SI_COLOR_CORRECTION, "COLOR_CORRECTED", "Color Corrected", "Display color corrected image."},
- {0, NULL, NULL, NULL}};
-
srna= RNA_def_struct(brna, "SpaceImageEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceImage");
RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data.");
/* image */
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ 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_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_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_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_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_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, draw_channels_items);
+ 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_IMAGE|ND_DISPLAY, NULL);
/* uv */
prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SpaceUVEditor");
- RNA_def_property_pointer_funcs(prop, "rna_SpaceImage_uvedit_get", NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL);
RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings.");
/* paint */
prop= RNA_def_property(srna, "image_painting", PROP_BOOLEAN, PROP_NONE);
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_update(prop, 0, "rna_SpaceImage_paint_update");
+ RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
+ 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);
@@ -597,24 +699,40 @@ static void rna_def_space_image(BlenderRNA *brna)
/* update */
prop= RNA_def_property(srna, "update_automatically", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_ui_text(prop, "Update Automatically", "Update other affected window spaces automatically to reflect changes during interactive operations such as transform.");
+ /* state */
+ prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Show Render", "Show render related properties.");
+
+ prop= RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties.");
+
+ prop= RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Show UV Editor", "Show uv editing related properties.");
+
rna_def_space_image_uv(brna);
}
-
static void rna_def_space_sequencer(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem display_mode_items[] = {
- {SEQ_DRAW_SEQUENCE, "SEQUENCER", "Sequencer", ""},
- {SEQ_DRAW_IMG_IMBUF, "IMAGE", "Image Preview", ""},
- {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", "Luma Waveform", ""},
- {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", "Chroma Vectorscope", ""},
- {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", "Histogram", ""},
- {0, NULL, NULL, NULL}};
+ {SEQ_DRAW_SEQUENCE, "SEQUENCER", 0, "Sequencer", ""},
+ {SEQ_DRAW_IMG_IMBUF, "IMAGE", 0, "Image Preview", ""},
+ {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", 0, "Luma Waveform", ""},
+ {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", 0, "Chroma Vectorscope", ""},
+ {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", 0, "Histogram", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceSeq");
@@ -625,13 +743,13 @@ 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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ 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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ 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);
@@ -639,18 +757,18 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
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, "Transform Markers", "Seperate color channels in preview.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_ui_text(prop, "Seperate Colors", "Seperate color channels in preview.");
+ 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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ 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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
@@ -662,13 +780,13 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ 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, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* not sure we need rna access to these but adding anyway */
@@ -690,11 +808,6 @@ static void rna_def_space_text(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem font_size_items[] = {
- {12, "SCREEN_12", "Screen 12", ""},
- {15, "SCREEN_15", "Screen 15", ""},
- {0, NULL, NULL, NULL}};
-
srna= RNA_def_struct(brna, "SpaceTextEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceText");
RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data.");
@@ -704,28 +817,34 @@ 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_TEXT|NA_EDITED, 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_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_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_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_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.");
prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
@@ -733,9 +852,9 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with.");
RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "font_size", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "lheight");
- RNA_def_property_enum_items(prop, font_size_items);
+ 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_TEXT|ND_DISPLAY, NULL);
@@ -757,16 +876,257 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
}
+static void rna_def_space_dopesheet(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem mode_items[] = {
+ {SACTCONT_DOPESHEET, "DOPESHEET", 0, "DopeSheet", ""},
+ {SACTCONT_ACTION, "ACTION", 0, "Action Editor", ""},
+ {SACTCONT_SHAPEKEY, "SHAPEKEY", 0, "ShapeKey Editor", ""}, // XXX to be depreceated?
+ {SACTCONT_GPENCIL, "GPENCIL", 0, "Grease Pencil", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+
+ srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceAction");
+ RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data.");
+
+ /* mode */
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ 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.");
+
+ /* 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.");
+
+ 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.");
+
+ 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.");
+
+ /* 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.");
+
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_space_graph(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem mode_items[] = {
+ {SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curves", ""},
+ {SIPO_MODE_DRIVERS, "DRIVERS", 0, "Drivers", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+
+ srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceIpo");
+ RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data.");
+
+ /* mode */
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ 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.");
+
+ /* 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.");
+
+ 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.");
+
+ 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.");
+
+ /* 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.");
+
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_space_nla(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceNLA", "Space");
+ RNA_def_struct_sdna(srna, "SpaceNla");
+ RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data.");
+
+ /* display */
+ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ 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.");
+
+ 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.");
+
+ /* editing */
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_fileselect_params(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem file_display_items[] = {
+ {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
+ {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
+ {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem file_sort_items[] = {
+ {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically."},
+ {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension."},
+ {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time."},
+ {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size."},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "FileSelectParams", NULL);
+ RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters.");
+
+ prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "title");
+ RNA_def_property_ui_text(prop, "Title", "Title for the file browser.");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ 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_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_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_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_FILE | ND_PARAMS, 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_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_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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, 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_FILE | ND_PARAMS, NULL);
+
+
+}
+
+static void rna_def_space_filebrowser(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceFileBrowser", "Space");
+ RNA_def_struct_sdna(srna, "SpaceFile");
+ RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data.");
+
+ prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "params");
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceFileBrowser_params_set", NULL);
+ RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser.");
+
+}
+
void RNA_def_space(BlenderRNA *brna)
{
rna_def_space(brna);
rna_def_space_image(brna);
rna_def_space_sequencer(brna);
rna_def_space_text(brna);
+ rna_def_fileselect_params(brna);
+ rna_def_space_filebrowser(brna);
rna_def_space_outliner(brna);
rna_def_background_image(brna);
rna_def_space_3dview(brna);
rna_def_space_buttons(brna);
+ rna_def_space_dopesheet(brna);
+ rna_def_space_graph(brna);
+ rna_def_space_nla(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 360a0938bb2..9ba98d766cc 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -127,12 +127,12 @@ static void rna_def_color_ramp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_interpolation_items[] = {
- {1, "EASE", "Ease", ""},
- {3, "CARDINAL", "Cardinal", ""},
- {0, "LINEAR", "Linear", ""},
- {2, "B_SPLINE", "B-Spline", ""},
- {4, "CONSTANT", "Constant", ""},
- {0, NULL, NULL, NULL}};
+ {1, "EASE", 0, "Ease", ""},
+ {3, "CARDINAL", 0, "Cardinal", ""},
+ {0, "LINEAR", 0, "Linear", ""},
+ {2, "B_SPLINE", 0, "B-Spline", ""},
+ {4, "CONSTANT", 0, "Constant", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ColorRamp", NULL);
RNA_def_struct_sdna(srna, "ColorBand");
@@ -201,21 +201,21 @@ static void rna_def_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_blend_type_items[] = {
- {MTEX_BLEND, "MIX", "Mix", ""},
- {MTEX_ADD, "ADD", "Add", ""},
- {MTEX_SUB, "SUBTRACT", "Subtract", ""},
- {MTEX_MUL, "MULTIPLY", "Multiply", ""},
- {MTEX_SCREEN, "SCREEN", "Screen", ""},
- {MTEX_OVERLAY, "OVERLAY", "Overlay", ""},
- {MTEX_DIFF, "DIFFERENCE", "Difference", ""},
- {MTEX_DIV, "DIVIDE", "Divide", ""},
- {MTEX_DARK, "DARKEN", "Darken", ""},
- {MTEX_LIGHT, "LIGHTEN", "Lighten", ""},
- {MTEX_BLEND_HUE, "HUE", "Hue", ""},
- {MTEX_BLEND_SAT, "SATURATION", "Saturation", ""},
- {MTEX_BLEND_VAL, "VALUE", "Value", ""},
- {MTEX_BLEND_COLOR, "COLOR", "Color", ""},
- {0, NULL, NULL, NULL}};
+ {MTEX_BLEND, "MIX", 0, "Mix", ""},
+ {MTEX_ADD, "ADD", 0, "Add", ""},
+ {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {MTEX_MUL, "MULTIPLY", 0, "Multiply", ""},
+ {MTEX_SCREEN, "SCREEN", 0, "Screen", ""},
+ {MTEX_OVERLAY, "OVERLAY", 0, "Overlay", ""},
+ {MTEX_DIFF, "DIFFERENCE", 0, "Difference", ""},
+ {MTEX_DIV, "DIVIDE", 0, "Divide", ""},
+ {MTEX_DARK, "DARKEN", 0, "Darken", ""},
+ {MTEX_LIGHT, "LIGHTEN", 0, "Lighten", ""},
+ {MTEX_BLEND_HUE, "HUE", 0, "Hue", ""},
+ {MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
+ {MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
+ {MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "TextureSlot", NULL);
RNA_def_struct_sdna(srna, "MTex");
@@ -270,9 +270,9 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "no_rgb", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
- RNA_def_property_ui_text(prop, "No RGB", "Converts texture RGB values to intensity (gray) values.");
+ RNA_def_property_ui_text(prop, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_VECTOR);
@@ -323,10 +323,10 @@ static void rna_def_environment_map_common(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_source_items[] = {
- {ENV_STATIC, "STATIC", "Static", "Calculates environment map only once"},
- {ENV_ANIM, "ANIMATED", "Animated", "Calculates environment map at each rendering"},
- {ENV_LOAD, "LOADED", "Loaded", "Loads saved environment map from disk"},
- {0, NULL, NULL, NULL}};
+ {ENV_STATIC, "STATIC", 0, "Static", "Calculates environment map only once"},
+ {ENV_ANIM, "ANIMATED", 0, "Animated", "Calculates environment map at each rendering"},
+ {ENV_LOAD, "LOADED", 0, "Loaded", "Loads saved environment map from disk"},
+ {0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
@@ -348,9 +348,9 @@ static void rna_def_environment_map(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {ENV_CUBE, "CUBE", "Cube", "Use environment map with six cube sides."},
- {ENV_PLANE, "PLANE", "Plane", "Only one side is rendered, with Z axis pointing in direction of image."},
- {0, NULL, NULL, NULL}};
+ {ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides."},
+ {ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "EnvironmentMap", NULL);
RNA_def_struct_sdna(srna, "EnvMap");
@@ -400,22 +400,22 @@ static void rna_def_environment_map(BlenderRNA *brna)
}
static EnumPropertyItem prop_noise_basis_items[] = {
- {TEX_BLENDER, "BLENDER_ORIGINAL", "Blender Original", ""},
- {TEX_STDPERLIN, "ORIGINAL_PERLIN", "Original Perlin", ""},
- {TEX_NEWPERLIN, "IMPROVED_PERLIN", "Improved Perlin", ""},
- {TEX_VORONOI_F1, "VORONOI_F1", "Voronoi F1", ""},
- {TEX_VORONOI_F2, "VORONOI_F2", "Voronoi F2", ""},
- {TEX_VORONOI_F3, "VORONOI_F3", "Voronoi F3", ""},
- {TEX_VORONOI_F4, "VORONOI_F4", "Voronoi F4", ""},
- {TEX_VORONOI_F2F1, "VORONOI_F2_F1", "Voronoi F2-F1", ""},
- {TEX_VORONOI_CRACKLE, "VORONOI_CRACKLE", "Voronoi Crackle", ""},
- {TEX_CELLNOISE, "CELL_NOISE", "Cell Noise", ""},
- {0, NULL, NULL, NULL}};
+ {TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original", ""},
+ {TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin", ""},
+ {TEX_NEWPERLIN, "IMPROVED_PERLIN", 0, "Improved Perlin", ""},
+ {TEX_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1", ""},
+ {TEX_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2", ""},
+ {TEX_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3", ""},
+ {TEX_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4", ""},
+ {TEX_VORONOI_F2F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", ""},
+ {TEX_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle", ""},
+ {TEX_CELLNOISE, "CELL_NOISE", 0, "Cell Noise", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_noise_type[] = {
- {TEX_NOISESOFT, "SOFT_NOISE", "Soft", ""},
- {TEX_NOISEPERL, "HARD_NOISE", "Hard", ""},
- {0, NULL, NULL, NULL}};
+ {TEX_NOISESOFT, "SOFT_NOISE", 0, "Soft", ""},
+ {TEX_NOISEPERL, "HARD_NOISE", 0, "Hard", ""},
+ {0, NULL, 0, NULL, NULL}};
static void rna_def_texture_clouds(BlenderRNA *brna)
@@ -424,9 +424,9 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_clouds_stype[] = {
- {TEX_DEFAULT, "GREYSCALE", "Greyscale", ""},
- {TEX_COLOR, "COLOR", "Color", ""},
- {0, NULL, NULL, NULL}};
+ {TEX_DEFAULT, "GREYSCALE", 0, "Greyscale", ""},
+ {TEX_COLOR, "COLOR", 0, "Color", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CloudsTexture", "Texture");
RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture.");
@@ -477,17 +477,17 @@ static void rna_def_texture_wood(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_wood_stype[] = {
- {TEX_BAND, "BANDS", "Bands", "Uses standard wood texture in bands"},
- {TEX_RING, "RINGS", "Rings", "Uses wood texture in rings"},
- {TEX_BANDNOISE, "BANDNOISE", "Band Noise", "Adds noise to standard wood"},
- {TEX_RINGNOISE, "RINGNOISE", "Ring Noise", "Adds noise to rings"},
- {0, NULL, NULL, NULL}};
+ {TEX_BAND, "BANDS", 0, "Bands", "Uses standard wood texture in bands"},
+ {TEX_RING, "RINGS", 0, "Rings", "Uses wood texture in rings"},
+ {TEX_BANDNOISE, "BANDNOISE", 0, "Band Noise", "Adds noise to standard wood"},
+ {TEX_RINGNOISE, "RINGNOISE", 0, "Ring Noise", "Adds noise to rings"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_wood_noisebasis2[] = {
- {TEX_SIN, "SIN", "Sine", "Uses a sine wave to produce bands"},
- {TEX_SAW, "SAW", "Saw", "Uses a saw wave to produce bands"},
- {TEX_TRI, "TRI", "Tri", "Uses a triangle wave to produce bands"},
- {0, NULL, NULL, NULL}};
+ {TEX_SIN, "SIN", 0, "Sine", "Uses a sine wave to produce bands"},
+ {TEX_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
+ {TEX_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WoodTexture", "Texture");
RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture.");
@@ -545,16 +545,16 @@ static void rna_def_texture_marble(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_marble_stype[] = {
- {TEX_SOFT, "SOFT", "Soft", "Uses soft marble"},
- {TEX_SHARP, "SHARP", "Sharp", "Uses more clearly defined marble"},
- {TEX_SHARPER, "SHARPER", "Sharper", "Uses very clearly defined marble"},
- {0, NULL, NULL, NULL}};
+ {TEX_SOFT, "SOFT", 0, "Soft", "Uses soft marble"},
+ {TEX_SHARP, "SHARP", 0, "Sharp", "Uses more clearly defined marble"},
+ {TEX_SHARPER, "SHARPER", 0, "Sharper", "Uses very clearly defined marble"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_marble_noisebasis2[] = {
- {TEX_SIN, "SIN", "Sin", "Uses a sine wave to produce bands"},
- {TEX_SAW, "SAW", "Saw", "Uses a saw wave to produce bands"},
- {TEX_TRI, "TRI", "Tri", "Uses a triangle wave to produce bands"},
- {0, NULL, NULL, NULL}};
+ {TEX_SIN, "SIN", 0, "Sin", "Uses a sine wave to produce bands"},
+ {TEX_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
+ {TEX_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MarbleTexture", "Texture");
RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture.");
@@ -643,14 +643,14 @@ static void rna_def_texture_blend(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_blend_progression[] = {
- {TEX_LIN, "LINEAR", "Linear", "Creates a linear progression"},
- {TEX_QUAD, "QUADRATIC", "Quadratic", "Creates a quadratic progression"},
- {TEX_EASE, "EASING", "Easing", "Creates a progression easing from one step to the next"},
- {TEX_DIAG, "DIAGONAL", "Diagonal", "Creates a diagonal progression"},
- {TEX_SPHERE, "SPHERICAL", "Spherical", "Creates a spherical progression"},
- {TEX_HALO, "QUADRATIC_SPHERE", "Quadratic sphere", "Creates a quadratic progression in the shape of a sphere"},
- {TEX_RAD, "RADIAL", "Radial", "Creates a radial progression"},
- {0, NULL, NULL, NULL}};
+ {TEX_LIN, "LINEAR", 0, "Linear", "Creates a linear progression"},
+ {TEX_QUAD, "QUADRATIC", 0, "Quadratic", "Creates a quadratic progression"},
+ {TEX_EASE, "EASING", 0, "Easing", "Creates a progression easing from one step to the next"},
+ {TEX_DIAG, "DIAGONAL", 0, "Diagonal", "Creates a diagonal progression"},
+ {TEX_SPHERE, "SPHERICAL", 0, "Spherical", "Creates a spherical progression"},
+ {TEX_HALO, "QUADRATIC_SPHERE", 0, "Quadratic sphere", "Creates a quadratic progression in the shape of a sphere"},
+ {TEX_RAD, "RADIAL", 0, "Radial", "Creates a radial progression"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BlendTexture", "Texture");
RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture.");
@@ -674,10 +674,10 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_stucci_stype[] = {
- {TEX_PLASTIC, "PLASTIC", "Plastic", "Uses standard stucci"},
- {TEX_WALLIN, "WALL_IN", "Wall in", "Creates Dimples"},
- {TEX_WALLOUT, "WALL_OUT", "Wall out", "Creates Ridges"},
- {0, NULL, NULL, NULL}};
+ {TEX_PLASTIC, "PLASTIC", 0, "Plastic", "Uses standard stucci"},
+ {TEX_WALLIN, "WALL_IN", 0, "Wall in", "Creates Dimples"},
+ {TEX_WALLOUT, "WALL_OUT", 0, "Wall out", "Creates Ridges"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "StucciTexture", "Texture");
RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture.");
@@ -731,12 +731,12 @@ static void rna_def_texture_image(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_image_extension[] = {
- {1, "EXTEND", "Extend", "Extends by repeating edge pixels of the image"},
- {2, "CLIP", "Clip", "Clips to image size and sets exterior pixels as transparent"},
- {4, "CLIP_CUBE", "Clip Cube", "Clips to cubic-shaped area around the image and sets exterior pixels as transparent"},
- {3, "REPEAT", "Repeat", "Causes the image to repeat horizontally and vertically"},
- {5, "CHECKER", "Checker", "Causes the image to repeat in checker board pattern"},
- {0, NULL, NULL, NULL}};
+ {1, "EXTEND", 0, "Extend", "Extends by repeating edge pixels of the image"},
+ {2, "CLIP", 0, "Clip", "Clips to image size and sets exterior pixels as transparent"},
+ {4, "CLIP_CUBE", 0, "Clip Cube", "Clips to cubic-shaped area around the image and sets exterior pixels as transparent"},
+ {3, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
+ {5, "CHECKER", 0, "Checker", "Causes the image to repeat in checker board pattern"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ImageTexture", "Texture");
RNA_def_struct_ui_text(srna, "Image Texture", "");
@@ -920,12 +920,12 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_musgrave_type[] = {
- {TEX_MFRACTAL, "MULTIFRACTAL", "Multifractal", ""},
- {TEX_RIDGEDMF, "RIDGED_MULTIFRACTAL", "Ridged Multifractal", ""},
- {TEX_HYBRIDMF, "HYBRID_MULTIFRACTAL", "Hybrid Multifractal", ""},
- {TEX_FBM, "FBM", "fBM", ""},
- {TEX_HTERRAIN, "HETERO_TERRAIN", "Hetero Terrain", ""},
- {0, NULL, NULL, NULL}};
+ {TEX_MFRACTAL, "MULTIFRACTAL", 0, "Multifractal", ""},
+ {TEX_RIDGEDMF, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal", ""},
+ {TEX_HYBRIDMF, "HYBRID_MULTIFRACTAL", 0, "Hybrid Multifractal", ""},
+ {TEX_FBM, "FBM", 0, "fBM", ""},
+ {TEX_HTERRAIN, "HETERO_TERRAIN", 0, "Hetero Terrain", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MusgraveTexture", "Texture");
RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture.");
@@ -999,22 +999,22 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_distance_metric_items[] = {
- {TEX_DISTANCE, "DISTANCE", "Actual Distance", ""},
- {TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", "Distance Squared", ""},
- {TEX_MANHATTAN, "MANHATTAN", "Manhattan", ""},
- {TEX_CHEBYCHEV, "CHEBYCHEV", "Chebychev", ""},
- {TEX_MINKOVSKY_HALF, "MINKOVSKY_HALF", "Minkovsky 1/2", ""},
- {TEX_MINKOVSKY_FOUR, "MINKOVSKY_FOUR", "Minkovsky 4", ""},
- {TEX_MINKOVSKY, "MINKOVSKY", "Minkovsky", ""},
- {0, NULL, NULL, NULL}};
+ {TEX_DISTANCE, "DISTANCE", 0, "Actual Distance", ""},
+ {TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", 0, "Distance Squared", ""},
+ {TEX_MANHATTAN, "MANHATTAN", 0, "Manhattan", ""},
+ {TEX_CHEBYCHEV, "CHEBYCHEV", 0, "Chebychev", ""},
+ {TEX_MINKOVSKY_HALF, "MINKOVSKY_HALF", 0, "Minkovsky 1/2", ""},
+ {TEX_MINKOVSKY_FOUR, "MINKOVSKY_FOUR", 0, "Minkovsky 4", ""},
+ {TEX_MINKOVSKY, "MINKOVSKY", 0, "Minkovsky", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_coloring_items[] = {
/* XXX: OK names / descriptions? */
- {TEX_INTENSITY, "INTENSITY", "Intensity", "Only calculate intensity."},
- {TEX_COL1, "POSITION", "Position", "Color cells by position."},
- {TEX_COL2, "POSITION_OUTLINE", "Position and Outline", "Use position plus an outline based on F2-F.1"},
- {TEX_COL3, "POSITION_OUTLINE_INTENSITY", "Position, Outline, and Intensity", "Multiply position and outline by intensity."},
- {0, NULL, NULL, NULL}};
+ {TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity."},
+ {TEX_COL1, "POSITION", 0, "Position", "Color cells by position."},
+ {TEX_COL2, "POSITION_OUTLINE", 0, "Position and Outline", "Use position plus an outline based on F2-F.1"},
+ {TEX_COL3, "POSITION_OUTLINE_INTENSITY", 0, "Position, Outline, and Intensity", "Multiply position and outline by intensity."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "VoronoiTexture", "Texture");
RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture.");
@@ -1112,21 +1112,21 @@ static void rna_def_texture(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {0, "NONE", "None", ""},
- {TEX_CLOUDS, "CLOUDS", "Clouds", ""},
- {TEX_WOOD, "WOOD", "Wood", ""},
- {TEX_MARBLE, "MARBLE", "Marble", ""},
- {TEX_MAGIC, "MAGIC", "Magic", ""},
- {TEX_BLEND, "BLEND", "Blend", ""},
- {TEX_STUCCI, "STUCCI", "Stucci", ""},
- {TEX_NOISE, "NOISE", "Noise", ""},
- {TEX_IMAGE, "IMAGE", "Image", ""},
- {TEX_PLUGIN, "PLUGIN", "Plugin", ""},
- {TEX_ENVMAP, "ENVIRONMENT_MAP", "Environment Map", ""},
- {TEX_MUSGRAVE, "MUSGRAVE", "Musgrave", ""},
- {TEX_VORONOI, "VORONOI", "Voronoi", ""},
- {TEX_DISTNOISE, "DISTORTED_NOISE", "Distorted Noise", ""},
- {0, NULL, NULL, NULL}};
+ {0, "NONE", 0, "None", ""},
+ {TEX_CLOUDS, "CLOUDS", 0, "Clouds", ""},
+ {TEX_WOOD, "WOOD", 0, "Wood", ""},
+ {TEX_MARBLE, "MARBLE", 0, "Marble", ""},
+ {TEX_MAGIC, "MAGIC", 0, "Magic", ""},
+ {TEX_BLEND, "BLEND", 0, "Blend", ""},
+ {TEX_STUCCI, "STUCCI", 0, "Stucci", ""},
+ {TEX_NOISE, "NOISE", 0, "Noise", ""},
+ {TEX_IMAGE, "IMAGE", 0, "Image/Movie", ""},
+ {TEX_PLUGIN, "PLUGIN", 0, "Plugin", ""},
+ {TEX_ENVMAP, "ENVIRONMENT_MAP", 0, "Environment Map", ""},
+ {TEX_MUSGRAVE, "MUSGRAVE", 0, "Musgrave", ""},
+ {TEX_VORONOI, "VORONOI", 0, "Voronoi", ""},
+ {TEX_DISTNOISE, "DISTORTED_NOISE", 0, "Distorted Noise", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Texture", "ID");
RNA_def_struct_sdna(srna, "Tex");
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index b6912c44fb7..b10ca6c5e83 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -24,6 +24,8 @@
#include <stdlib.h>
+#include "DNA_screen_types.h"
+
#include "RNA_define.h"
#include "RNA_types.h"
@@ -40,8 +42,6 @@
#include "RNA_access.h"
-#include "DNA_screen_types.h"
-
#include "BLI_dynstr.h"
#include "BKE_context.h"
@@ -170,6 +170,8 @@ static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, voi
if(strcmp(pt->idname, dummypt.idname) == 0) {
if(pt->py_srna)
rna_Panel_unregister(C, pt->py_srna);
+ else
+ BLI_freelinkN(&art->paneltypes, pt);
break;
}
}
@@ -416,12 +418,12 @@ static int rna_UILayout_active_get(struct PointerRNA *ptr)
static void rna_UILayout_active_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetActive(ptr->data, value);
+ uiLayoutSetActive(ptr->data, value);
}
static void rna_UILayout_op_context_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetOperatorContext(ptr->data, value);
+ uiLayoutSetOperatorContext(ptr->data, value);
}
static int rna_UILayout_op_context_get(struct PointerRNA *ptr)
@@ -436,7 +438,7 @@ static int rna_UILayout_enabled_get(struct PointerRNA *ptr)
static void rna_UILayout_enabled_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetEnabled(ptr->data, value);
+ uiLayoutSetEnabled(ptr->data, value);
}
static int rna_UILayout_red_alert_get(struct PointerRNA *ptr)
@@ -446,7 +448,7 @@ static int rna_UILayout_red_alert_get(struct PointerRNA *ptr)
static void rna_UILayout_red_alert_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetRedAlert(ptr->data, value);
+ uiLayoutSetRedAlert(ptr->data, value);
}
static int rna_UILayout_keep_aspect_get(struct PointerRNA *ptr)
@@ -456,7 +458,7 @@ static int rna_UILayout_keep_aspect_get(struct PointerRNA *ptr)
static void rna_UILayout_keep_aspect_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetKeepAspect(ptr->data, value);
+ uiLayoutSetKeepAspect(ptr->data, value);
}
static int rna_UILayout_alignment_get(struct PointerRNA *ptr)
@@ -466,7 +468,7 @@ static int rna_UILayout_alignment_get(struct PointerRNA *ptr)
static void rna_UILayout_alignment_set(struct PointerRNA *ptr, int value)
{
- return uiLayoutSetAlignment(ptr->data, value);
+ uiLayoutSetAlignment(ptr->data, value);
}
static float rna_UILayout_scale_x_get(struct PointerRNA *ptr)
@@ -476,7 +478,7 @@ static float rna_UILayout_scale_x_get(struct PointerRNA *ptr)
static void rna_UILayout_scale_x_set(struct PointerRNA *ptr, float value)
{
- return uiLayoutSetScaleX(ptr->data, value);
+ uiLayoutSetScaleX(ptr->data, value);
}
static float rna_UILayout_scale_y_get(struct PointerRNA *ptr)
@@ -486,7 +488,7 @@ static float rna_UILayout_scale_y_get(struct PointerRNA *ptr)
static void rna_UILayout_scale_y_set(struct PointerRNA *ptr, float value)
{
- return uiLayoutSetScaleY(ptr->data, value);
+ uiLayoutSetScaleY(ptr->data, value);
}
#else // RNA_RUNTIME
@@ -497,23 +499,23 @@ static void rna_def_ui_layout(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem alignment_items[] = {
- {UI_LAYOUT_ALIGN_EXPAND, "EXPAND", "Expand", ""},
- {UI_LAYOUT_ALIGN_LEFT, "LEFT", "Left", ""},
- {UI_LAYOUT_ALIGN_CENTER, "CENTER", "Center", ""},
- {UI_LAYOUT_ALIGN_RIGHT, "RIGHT", "RIght", ""},
- {0, NULL, NULL, NULL}};
+ {UI_LAYOUT_ALIGN_EXPAND, "EXPAND", 0, "Expand", ""},
+ {UI_LAYOUT_ALIGN_LEFT, "LEFT", 0, "Left", ""},
+ {UI_LAYOUT_ALIGN_CENTER, "CENTER", 0, "Center", ""},
+ {UI_LAYOUT_ALIGN_RIGHT, "RIGHT", 0, "RIght", ""},
+ {0, NULL, 0, NULL, NULL}};
/* see WM_types.h */
static EnumPropertyItem operator_context_items[] = {
- {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", "Invoke Default", ""},
- {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", "Invoke Region Window", ""},
- {WM_OP_INVOKE_AREA, "INVOKE_AREA", "Invoke Area", ""},
- {WM_OP_INVOKE_SCREEN, "INVOKE_SCREEN", "Invoke Screen", ""},
- {WM_OP_EXEC_DEFAULT, "EXEC_DEFAULT", "Exec Default", ""},
- {WM_OP_EXEC_REGION_WIN, "EXEC_REGION_WIN", "Exec Region Window", ""},
- {WM_OP_EXEC_AREA, "EXEC_AREA", "Exec Area", ""},
- {WM_OP_EXEC_SCREEN, "EXEC_SCREEN", "Exec Screen", ""},
- {0, NULL, NULL, NULL}};
+ {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""},
+ {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""},
+ {WM_OP_INVOKE_AREA, "INVOKE_AREA", 0, "Invoke Area", ""},
+ {WM_OP_INVOKE_SCREEN, "INVOKE_SCREEN", 0, "Invoke Screen", ""},
+ {WM_OP_EXEC_DEFAULT, "EXEC_DEFAULT", 0, "Exec Default", ""},
+ {WM_OP_EXEC_REGION_WIN, "EXEC_REGION_WIN", 0, "Exec Region Window", ""},
+ {WM_OP_EXEC_AREA, "EXEC_AREA", 0, "Exec Area", ""},
+ {WM_OP_EXEC_SCREEN, "EXEC_SCREEN", 0, "Exec Screen", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UILayout", NULL);
RNA_def_struct_sdna(srna, "uiLayout");
@@ -603,6 +605,14 @@ static void rna_def_panel(BlenderRNA *brna)
prop= RNA_def_property(srna, "context", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->context");
RNA_def_property_flag(prop, PROP_REGISTER);
+
+ prop= RNA_def_property(srna, "default_closed", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_DEFAULT_CLOSED);
+ RNA_def_property_flag(prop, PROP_REGISTER);
+
+ prop= RNA_def_property(srna, "no_header", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_NO_HEADER);
+ RNA_def_property_flag(prop, PROP_REGISTER);
}
static void rna_def_header(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e0d3201a5e7..ffe3751908d 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -128,6 +128,11 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem font_kerning_style[] = {
+ {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances."},
+ {1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances."},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "ThemeFontStyle", NULL);
RNA_def_struct_sdna(srna, "uiFontStyle");
RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font.");
@@ -135,29 +140,40 @@ 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, 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, 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, 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, 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, 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, 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, NC_WINDOW, NULL);
}
-
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
{
StructRNA *srna;
@@ -169,25 +185,33 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "uiStyle");
RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets.");
+ prop= RNA_def_property(srna, "panelzoom", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.5, 2.0);
+ RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas.");
+
prop= RNA_def_property(srna, "paneltitle", PROP_POINTER, PROP_NEVER_NULL);
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, 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, 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, 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, NC_WINDOW, NULL);
}
@@ -203,39 +227,91 @@ 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, 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, 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, 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, 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, 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, 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, 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, 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, NC_WINDOW, NULL);
+}
+
+static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
+ RNA_def_struct_sdna(srna, "uiWidgetStateColors");
+ RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors.");
+
+ 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, 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, 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, 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, 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, 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, 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, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
@@ -244,6 +320,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
PropertyRNA *prop;
rna_def_userdef_theme_ui_wcol(brna);
+ rna_def_userdef_theme_ui_wcol_state(brna);
srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
RNA_def_struct_sdna(srna, "ThemeUI");
@@ -278,6 +355,12 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
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, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
@@ -320,7 +403,18 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
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, 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, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
@@ -868,6 +962,26 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
RNA_def_property_update(prop, NC_WINDOW, NULL);
}
+static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ /* space_buts */
+
+ srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor.");
+
+ rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC);
+
+ 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, NC_WINDOW, NULL);
+}
+
+
static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1298,6 +1412,11 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeNodeEditor");
RNA_def_property_ui_text(prop, "Node Editor", "");
+ prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "tlogic");
+ RNA_def_property_struct_type(prop, "ThemeLogicEditor");
+ RNA_def_property_ui_text(prop, "Logic Editor", "");
+
prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toops");
RNA_def_property_struct_type(prop, "ThemeOutliner");
@@ -1334,6 +1453,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_space_outliner(brna);
rna_def_userdef_theme_space_info(brna);
rna_def_userdef_theme_space_sound(brna);
+ rna_def_userdef_theme_space_logic(brna);
rna_def_userdef_theme_colorset(brna);
rna_def_userdef_themes(brna);
}
@@ -1373,15 +1493,15 @@ static void rna_def_userdef_view(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem view_zoom_styles[] = {
- {USER_ZOOM_CONT, "CONTINUE", "Continue", "Old style zoom, continues while moving mouse up or down."},
- {USER_ZOOM_DOLLY, "DOLLY", "Dolly", "Zooms in and out based on vertical mouse movement."},
- {USER_ZOOM_SCALE, "SCALE", "Scale", "Zooms in and out like scaling the view, mouse movements relative to center."},
- {0, NULL, NULL, NULL}};
+ {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down."},
+ {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement."},
+ {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_rotation_items[] = {
- {0, "TURNTABLE", "Turntable", "Use turntable style rotation in the viewport."},
- {USER_TRACKBALL, "TRACKBALL", "Trackball", "Use trackball style rotation in the viewport."},
- {0, NULL, NULL, NULL}};
+ {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport."},
+ {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesView", NULL);
@@ -1398,23 +1518,28 @@ 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 and objects name and frame number in 3d view.");
+ RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3d view.");
+ 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, 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, 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, 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, NC_WINDOW, NULL);
/* menus */
prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
@@ -1448,7 +1573,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_column_layout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
- RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox and do not flip the contents of any menu.");
+ RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox.");
+
+ prop= RNA_def_property(srna, "directional_menus", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
+ RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction.");
/* snap to grid */
prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
@@ -1599,15 +1728,15 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem auto_key_modes[] = {
- {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", "Add/Replace Keys", ""},
- {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", "Replace Keys", ""},
- {0, NULL, NULL, NULL}};
+ {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace Keys", ""},
+ {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace Keys", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem new_interpolation_types[] = {
- {BEZT_IPO_CONST, "CONSTANT", "Constant", ""},
- {BEZT_IPO_LIN, "LINEAR", "Linear", ""},
- {BEZT_IPO_BEZ, "BEZIER", "Bezier", ""},
- {0, NULL, NULL, NULL}};
+ {BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""},
+ {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
+ {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
@@ -1752,30 +1881,30 @@ static void rna_def_userdef_language(BlenderRNA *brna)
/* hardcoded here, could become dynamic somehow */
static EnumPropertyItem language_items[] = {
- {0, "ENGLISH", "English", ""},
- {1, "JAPANESE", "Japanese", ""},
- {2, "DUTCH", "Dutch", ""},
- {3, "ITALIAN", "Italian", ""},
- {4, "GERMAN", "German", ""},
- {5, "FINNISH", "Finnish", ""},
- {6, "SWEDISH", "Swedish", ""},
- {7, "FRENCH", "French", ""},
- {8, "SPANISH", "Spanish", ""},
- {9, "CATALAN", "Catalan", ""},
- {10, "CZECH", "Czech", ""},
- {11, "BRAZILIAN_PORTUGUESE", "Brazilian Portuguese", ""},
- {12, "SIMPLIFIED_CHINESE", "Simplified Chinese", ""},
- {13, "RUSSIAN", "Russian", ""},
- {14, "CROATIAN", "Croatian", ""},
- {15, "SERBIAN", "Serbian", ""},
- {16, "UKRAINIAN", "Ukrainian", ""},
- {17, "POLISH", "Polish", ""},
- {18, "ROMANIAN", "Romanian", ""},
- {19, "ARABIC", "Arabic", ""},
- {20, "BULGARIAN", "Bulgarian", ""},
- {21, "GREEK", "Greek", ""},
- {22, "KOREAN", "Korean", ""},
- {0, NULL, NULL, NULL}};
+ {0, "ENGLISH", 0, "English", ""},
+ {1, "JAPANESE", 0, "Japanese", ""},
+ {2, "DUTCH", 0, "Dutch", ""},
+ {3, "ITALIAN", 0, "Italian", ""},
+ {4, "GERMAN", 0, "German", ""},
+ {5, "FINNISH", 0, "Finnish", ""},
+ {6, "SWEDISH", 0, "Swedish", ""},
+ {7, "FRENCH", 0, "French", ""},
+ {8, "SPANISH", 0, "Spanish", ""},
+ {9, "CATALAN", 0, "Catalan", ""},
+ {10, "CZECH", 0, "Czech", ""},
+ {11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""},
+ {12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""},
+ {13, "RUSSIAN", 0, "Russian", ""},
+ {14, "CROATIAN", 0, "Croatian", ""},
+ {15, "SERBIAN", 0, "Serbian", ""},
+ {16, "UKRAINIAN", 0, "Ukrainian", ""},
+ {17, "POLISH", 0, "Polish", ""},
+ {18, "ROMANIAN", 0, "Romanian", ""},
+ {19, "ARABIC", 0, "Arabic", ""},
+ {20, "BULGARIAN", 0, "Bulgarian", ""},
+ {21, "GREEK", 0, "Greek", ""},
+ {22, "KOREAN", 0, "Korean", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesLanguage", NULL);
RNA_def_struct_sdna(srna, "UserDef");
@@ -1785,33 +1914,40 @@ 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, 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, NC_WINDOW, NULL);
/* Language Selection */
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, 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, 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, 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, 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, NC_WINDOW, NULL);
}
static void rna_def_userdef_autosave(BlenderRNA *brna)
@@ -1855,28 +1991,28 @@ static void rna_def_userdef_system(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem gl_texture_clamp_items[] = {
- {0, "GL_CLAMP_OFF", "GL Texture Clamp Off", ""},
- {8192, "GL_CLAMP_8192", "GL Texture Clamp 8192", ""},
- {4096, "GL_CLAMP_4096", "GL Texture Clamp 4096", ""},
- {2048, "GL_CLAMP_2048", "GL Texture Clamp 2048", ""},
- {1024, "GL_CLAMP_1024", "GL Texture Clamp 1024", ""},
- {512, "GL_CLAMP_512", "GL Texture Clamp 512", ""},
- {256, "GL_CLAMP_256", "GL Texture Clamp 256", ""},
- {128, "GL_CLAMP_128", "GL Texture Clamp 128", ""},
- {0, NULL, NULL, NULL}};
+ {0, "GL_CLAMP_OFF", 0, "GL Texture Clamp Off", ""},
+ {8192, "GL_CLAMP_8192", 0, "GL Texture Clamp 8192", ""},
+ {4096, "GL_CLAMP_4096", 0, "GL Texture Clamp 4096", ""},
+ {2048, "GL_CLAMP_2048", 0, "GL Texture Clamp 2048", ""},
+ {1024, "GL_CLAMP_1024", 0, "GL Texture Clamp 1024", ""},
+ {512, "GL_CLAMP_512", 0, "GL Texture Clamp 512", ""},
+ {256, "GL_CLAMP_256", 0, "GL Texture Clamp 256", ""},
+ {128, "GL_CLAMP_128", 0, "GL Texture Clamp 128", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_mixing_samples_items[] = {
- {256, "AUDIO_SAMPLES_256", "256", "Set audio mixing buffer size to 256 samples"},
- {512, "AUDIO_SAMPLES_512", "512", "Set audio mixing buffer size to 512 samples"},
- {1024, "AUDIO_SAMPLES_1024", "1024", "Set audio mixing buffer size to 1024 samples"},
- {2048, "AUDIO_SAMPLES_2048", "2048", "Set audio mixing buffer size to 2048 samples"},
- {0, NULL, NULL, NULL}};
+ {256, "AUDIO_SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
+ {512, "AUDIO_SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
+ {1024, "AUDIO_SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
+ {2048, "AUDIO_SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_method_items[] = {
- {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory."},
- {USER_DRAW_OVERLAP, "OVERLAP", "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws."},
- {USER_DRAW_FULL, "FULL", "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
- {0, NULL, NULL, NULL}};
+ {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory."},
+ {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws."},
+ {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
@@ -2001,10 +2137,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, "yafray_export_directory", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "yfexportdir");
- RNA_def_property_ui_text(prop, "Yafray Export Directory", "The default directory for yafray xml export (must exist!).");
-
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.");
@@ -2044,14 +2176,14 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem user_pref_sections[] = {
- {0, "VIEW_CONTROLS", "View & Controls", ""},
- {1, "EDIT_METHODS", "Edit Methods", ""},
- {2, "LANGUAGE_COLORS", "Language & Colors", ""},
- {3, "AUTO_SAVE", "Auto Save", ""},
- {4, "SYSTEM_OPENGL", "System & OpenGL", ""},
- {5, "FILE_PATHS", "File Paths", ""},
- {6, "THEMES", "Themes", ""},
- {0, NULL, NULL, NULL}};
+ {0, "VIEW_CONTROLS", 0, "View & Controls", ""},
+ {1, "EDIT_METHODS", 0, "Edit Methods", ""},
+ {2, "LANGUAGE_COLORS", 0, "Language & Colors", ""},
+ {3, "AUTO_SAVE", 0, "Auto Save", ""},
+ {4, "SYSTEM_OPENGL", 0, "System & OpenGL", ""},
+ {5, "FILE_PATHS", 0, "File Paths", ""},
+ {6, "THEMES", 0, "Themes", ""},
+ {0, NULL, 0, NULL, NULL}};
rna_def_userdef_dothemes(brna);
rna_def_userdef_solidlight(brna);
@@ -2113,11 +2245,6 @@ void RNA_def_userdef(BlenderRNA *brna)
rna_def_userdef_filepaths(brna);
rna_def_userdef_system(brna);
-
-
-
-
-
}
#endif
diff --git a/source/blender/makesrna/intern/rna_vpaint.c b/source/blender/makesrna/intern/rna_vpaint.c
index 44219f032e7..a34099dffb7 100644
--- a/source/blender/makesrna/intern/rna_vpaint.c
+++ b/source/blender/makesrna/intern/rna_vpaint.c
@@ -40,14 +40,14 @@ void RNA_def_vpaint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {0, "MIX", "Mix", "Use mix blending mode while painting."},
- {1, "ADD", "Add", "Use add blending mode while painting."},
- {2, "SUB", "Subtract", "Use subtract blending mode while painting."},
- {3, "MUL", "Multiply", "Use multiply blending mode while painting."},
- {4, "BLUR", "Blur", "Blur the color with surrounding values"},
- {5, "LIGHTEN", "Lighten", "Use lighten blending mode while painting."},
- {6, "DARKEN", "Darken", "Use darken blending mode while painting."},
- {0, NULL, NULL, NULL}};
+ {0, "MIX", 0, "Mix", "Use mix blending mode while painting."},
+ {1, "ADD", 0, "Add", "Use add blending mode while painting."},
+ {2, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
+ {3, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
+ {4, "BLUR", 0, "Blur", "Blur the color with surrounding values"},
+ {5, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
+ {6, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "VPaint", NULL);
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of the Vpaint tool.");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 22ce207c6a9..9c9c256e819 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -30,9 +30,125 @@
#include "rna_internal.h"
#include "DNA_windowmanager_types.h"
+#include "WM_types.h" /* wmEvent */
+
+
+EnumPropertyItem event_value_items[] = {
+ {KM_ANY, "ANY", 0, "Any", ""},
+ {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
+ {KM_PRESS, "PRESS", 0, "Press", ""},
+ {KM_RELEASE, "RELEASE", 0, "Release", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+/* not returned: CAPSLOCKKEY, UNKNOWNKEY, COMMANDKEY, GRLESSKEY */
+EnumPropertyItem event_type_items[] = {
+ {AKEY, "A", 0, "A", ""},
+ {BKEY, "B", 0, "B", ""},
+ {CKEY, "C", 0, "C", ""},
+ {DKEY, "D", 0, "D", ""},
+ {EKEY, "E", 0, "E", ""},
+ {FKEY, "F", 0, "F", ""},
+ {GKEY, "G", 0, "G", ""},
+ {HKEY, "H", 0, "H", ""},
+ {IKEY, "I", 0, "I", ""},
+ {JKEY, "J", 0, "J", ""},
+ {KKEY, "K", 0, "K", ""},
+ {LKEY, "L", 0, "L", ""},
+ {MKEY, "M", 0, "M", ""},
+ {NKEY, "N", 0, "N", ""},
+ {OKEY, "O", 0, "O", ""},
+ {PKEY, "P", 0, "P", ""},
+ {QKEY, "Q", 0, "Q", ""},
+ {RKEY, "R", 0, "R", ""},
+ {SKEY, "S", 0, "S", ""},
+ {TKEY, "T", 0, "T", ""},
+ {UKEY, "U", 0, "U", ""},
+ {VKEY, "V", 0, "V", ""},
+ {WKEY, "W", 0, "W", ""},
+ {XKEY, "X", 0, "X", ""},
+ {YKEY, "Y", 0, "Y", ""},
+ {ZKEY, "Z", 0, "Z", ""},
+
+ {ZEROKEY, "ZERO", 0, "0", ""},
+ {ONEKEY, "ONE", 0, "1", ""},
+ {TWOKEY, "TWO", 0, "2", ""},
+ {THREEKEY, "THREE", 0, "3", ""},
+ {FOURKEY, "FOUR", 0, "4", ""},
+ {FIVEKEY, "FIVE", 0, "5", ""},
+ {SIXKEY, "SIX", 0, "6", ""},
+ {SEVENKEY, "SEVEN", 0, "7", ""},
+ {EIGHTKEY, "EIGHT", 0, "8", ""},
+ {NINEKEY, "NINE", 0, "9", ""},
+
+ {LEFTCTRLKEY, "LEFT_CTRL", 0, "Left Ctrl", ""},
+ {LEFTALTKEY, "LEFT_ALT", 0, "Left Alt", ""},
+ {LEFTSHIFTKEY, "LEFT_SHIFT", 0, "Left Shift", ""},
+ {RIGHTALTKEY, "RIGHT_ALT", 0, "Right Alt", ""},
+ {RIGHTCTRLKEY, "RIGHT_CTRL", 0, "Right Ctrl", ""},
+ {RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, "Right Shift", ""},
+
+ {ESCKEY, "ESC", 0, "Esc", ""},
+ {TABKEY, "TAB", 0, "Tab", ""},
+ {RETKEY, "RET", 0, "Return", ""},
+ {SPACEKEY, "SPACE", 0, "Spacebar", ""},
+ {LINEFEEDKEY, "LINE_FEED", 0, "Line Feed", ""},
+ {BACKSPACEKEY, "BACK_SPACE", 0, "Back Space", ""},
+ {DELKEY, "DEL", 0, "Delete", ""},
+ {SEMICOLONKEY, "SEMI_COLON", 0, ";", ""},
+ {PERIODKEY, "PERIOD", 0, ".", ""},
+ {COMMAKEY, "COMMA", 0, ",", ""},
+ {QUOTEKEY, "QUOTE", 0, "\"", ""},
+ {ACCENTGRAVEKEY, "ACCENT_GRAVE", 0, "`", ""},
+ {MINUSKEY, "MINUS", 0, "-", ""},
+ {SLASHKEY, "SLASH", 0, "/", ""},
+ {BACKSLASHKEY, "BACK_SLASH", 0, "\\", ""},
+ {EQUALKEY, "EQUAL", 0, "=", ""},
+ {LEFTBRACKETKEY, "LEFT_BRACKET", 0, "]", ""},
+ {RIGHTBRACKETKEY, "RIGHT_BRACKET", 0, "[", ""},
+ {LEFTARROWKEY, "LEFT_ARROW", 0, "Left Arrow", ""},
+ {DOWNARROWKEY, "DOWN_ARROW", 0, "Down Arrow", ""},
+ {RIGHTARROWKEY, "RIGHT_ARROW", 0, "Right Arrow", ""},
+ {UPARROWKEY, "UP_ARROW", 0, "Up Arrow", ""},
+ {PAD2, "NUMPAD_2", 0, "Numpad 2", ""},
+ {PAD4, "NUMPAD_4", 0, "Numpad 4", ""},
+ {PAD6, "NUMPAD_6", 0, "Numpad 6", ""},
+ {PAD8, "NUMPAD_8", 0, "Numpad 8", ""},
+ {PAD1, "NUMPAD_1", 0, "Numpad 1", ""},
+ {PAD3, "NUMPAD_3", 0, "Numpad 3", ""},
+ {PAD5, "NUMPAD_5", 0, "Numpad 5", ""},
+ {PAD7, "NUMPAD_7", 0, "Numpad 7", ""},
+ {PAD9, "NUMPAD_9", 0, "Numpad 9", ""},
+ {PADPERIOD, "NUMPAD_PERIOD", 0, "Numpad .", ""},
+ {PADSLASHKEY, "NUMPAD_SLASH", 0, "Numpad /", ""},
+ {PADASTERKEY, "NUMPAD_ASTERIX", 0, "Numpad *", ""},
+ {PAD0, "NUMPAD_0", 0, "Numpad 0", ""},
+ {PADMINUS, "NUMPAD_MINUS", 0, "Numpad -", ""},
+ {PADENTER, "NUMPAD_ENTER", 0, "Numpad Enter", ""},
+ {PADPLUSKEY, "NUMPAD_PLUS", 0, "Numpad +", ""},
+ {F1KEY, "F1", 0, "F1", ""},
+ {F2KEY, "F2", 0, "F2", ""},
+ {F3KEY, "F3", 0, "F3", ""},
+ {F4KEY, "F4", 0, "F4", ""},
+ {F5KEY, "F5", 0, "F5", ""},
+ {F6KEY, "F6", 0, "F6", ""},
+ {F7KEY, "F7", 0, "F7", ""},
+ {F8KEY, "F8", 0, "F8", ""},
+ {F9KEY, "F9", 0, "F9", ""},
+ {F10KEY, "F10", 0, "F10", ""},
+ {F11KEY, "F11", 0, "F11", ""},
+ {F12KEY, "F12", 0, "F12", ""},
+ {PAUSEKEY, "PAUSE", 0, "Pause", ""},
+ {INSERTKEY, "INSERT", 0, "Insert", ""},
+ {HOMEKEY, "HOME", 0, "Home", ""},
+ {PAGEUPKEY, "PAGE_UP", 0, "Page Up", ""},
+ {PAGEDOWNKEY, "PAGE_DOWN", 0, "Page Down", ""},
+ {ENDKEY, "END", 0, "End", ""},
+ {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
+#include "WM_api.h"
+
#include "BKE_idprop.h"
static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr)
@@ -87,6 +203,42 @@ static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
}
+
+static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
+{
+ wmEvent *event= (wmEvent*)ptr->id.data;
+ value[0]= event->ascii;
+ value[1]= '\0';
+}
+
+static int rna_Event_ascii_length(PointerRNA *ptr)
+{
+ wmEvent *event= (wmEvent*)ptr->id.data;
+ return (event->ascii)? 1 : 0;
+}
+
+static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
+{
+ wmWindow *win= (wmWindow*)ptr->data;
+
+ if(value.data == NULL)
+ return;
+
+ /* exception: can't set screens inside of area/region handers */
+ win->newscreen= value.data;
+}
+
+static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
+{
+ wmWindow *win= (wmWindow*)ptr->data;
+
+ /* exception: can't set screens inside of area/region handers */
+ if(win->newscreen) {
+ WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
+ win->newscreen= NULL;
+ }
+}
+
#else
static void rna_def_operator(BlenderRNA *brna)
@@ -146,7 +298,97 @@ static void rna_def_operator_filelist_element(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Name", "the name of a file or directory within a file list");
}
+
+static void rna_def_event(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Event", NULL);
+ RNA_def_struct_ui_text(srna, "Event", "Window Manager Event");
+ RNA_def_struct_sdna(srna, "wmEvent");
+
+ /* strings */
+ prop= RNA_def_property(srna, "ascii", PROP_STRING, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_string_funcs(prop, "rna_Event_ascii_get", "rna_Event_ascii_length", NULL);
+ RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event.");
+
+
+ /* enums */
+ prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "val");
+ RNA_def_property_enum_items(prop, event_value_items);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some.");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, event_type_items);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Type", "");
+
+
+ /* mouse */
+ prop= RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "x");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse X Position", "The window relative vertical location of the mouse.");
+
+ prop= RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "y");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse Y Position", "The window relative horizontal location of the mouse.");
+
+ prop= RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "prevx");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse Previous X Position", "The window relative vertical location of the mouse.");
+
+ prop= RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "prevy");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative horizontal location of the mouse.");
+
+
+ /* modifiers */
+ 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.");
+
+ 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 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 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 shift key is held.");
+}
+static void rna_def_window(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Window", NULL);
+ RNA_def_struct_ui_text(srna, "Window", "Open window.");
+ RNA_def_struct_sdna(srna, "wmWindow");
+
+ prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "Screen");
+ RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Window_screen_update");
+}
static void rna_def_windowmanager(BlenderRNA *brna)
{
@@ -160,6 +402,12 @@ static void rna_def_windowmanager(BlenderRNA *brna)
prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Operator");
RNA_def_property_ui_text(prop, "Operators", "Operator registry.");
+
+ prop= RNA_def_property(srna, "windows", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Window");
+ RNA_def_property_ui_text(prop, "Windows", "Open windows.");
+
+ RNA_api_wm(srna);
}
void RNA_def_wm(BlenderRNA *brna)
@@ -167,6 +415,8 @@ void RNA_def_wm(BlenderRNA *brna)
rna_def_operator(brna);
rna_def_operator_utils(brna);
rna_def_operator_filelist_element(brna);
+ rna_def_event(brna);
+ rna_def_window(brna);
rna_def_windowmanager(brna);
}
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 46a7ef139d5..9ff474b82b0 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -56,7 +56,7 @@ static PointerRNA rna_World_mist_get(PointerRNA *ptr)
static void rna_World_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
World *wo= (World*)ptr->data;
- rna_iterator_array_begin(iter, (void*)wo->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+ rna_iterator_array_begin(iter, (void*)wo->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_World_active_texture_get(PointerRNA *ptr)
@@ -74,13 +74,13 @@ static void rna_def_world_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem texco_items[] = {
- {TEXCO_VIEW, "VIEW", "View", "Uses view vector for the texture coordinates."},
- {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates (interior mist)."},
- {TEXCO_ANGMAP, "ANGMAP", "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes."},
- {TEXCO_H_SPHEREMAP, "SPHERE", "Sphere", "For 360 degree panorama sky, spherical mapped, only top half."},
- {TEXCO_H_TUBEMAP, "TUBE", "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half."},
- {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
- {0, NULL, NULL, NULL}};
+ {TEXCO_VIEW, "VIEW", 0, "View", "Uses view vector for the texture coordinates."},
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates (interior mist)."},
+ {TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes."},
+ {TEXCO_H_SPHEREMAP, "SPHERE", 0, "Sphere", "For 360 degree panorama sky, spherical mapped, only top half."},
+ {TEXCO_H_TUBEMAP, "TUBE", 0, "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half."},
+ {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
@@ -89,19 +89,19 @@ static void rna_def_world_mtex(BlenderRNA *brna)
/* map to */
prop= RNA_def_property(srna, "map_to_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
- RNA_def_property_ui_text(prop, "Map To Blend", "Causes the texture to affect the color progression of the background.");
+ RNA_def_property_ui_text(prop, "Map To Blend", "Affect the color progression of the background.");
prop= RNA_def_property(srna, "map_to_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
- RNA_def_property_ui_text(prop, "Map To Horizon", "Causes the texture to affect the color of the horizon.");
+ RNA_def_property_ui_text(prop, "Map To Horizon", "Affect the color of the horizon.");
prop= RNA_def_property(srna, "map_to_zenith_up", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
- RNA_def_property_ui_text(prop, "Map To Zenith Up", "Causes the texture to affect the color of the zenith above.");
+ RNA_def_property_ui_text(prop, "Map To Zenith Up", "Affect the color of the zenith above.");
prop= RNA_def_property(srna, "map_to_zenith_down", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
- RNA_def_property_ui_text(prop, "Map To Zenith Down", "Causes the texture to affect the color of the zenith below.");
+ RNA_def_property_ui_text(prop, "Map To Zenith Down", "Affect the color of the zenith below.");
/* unused
prop= RNA_def_property(srna, "map_to_mist", PROP_BOOLEAN, PROP_NONE);
@@ -111,7 +111,7 @@ static void rna_def_world_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, texco_items);
- RNA_def_property_ui_text(prop, "Texture Coordinates", "Textures coordinates used to map the texture with.");
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background.");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
@@ -126,27 +126,27 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem blend_mode_items[] = {
- {WO_AOADD, "ADD", "Add", "Add light and shadow."},
- {WO_AOSUB, "SUBTRACT", "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
- {WO_AOADDSUB, "BOTH", "Both", "Both lighten and darken."},
- {0, NULL, NULL, NULL}};
+ {WO_AOADD, "ADD", 0, "Add", "Add light and shadow."},
+ {WO_AOSUB, "SUBTRACT", 0, "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
+ {WO_AOADDSUB, "BOTH", 0, "Both", "Both lighten and darken."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_color_items[] = {
- {WO_AOPLAIN, "PLAIN", "White", "Plain diffuse energy (white.)"},
- {WO_AOSKYCOL, "SKY_COLOR", "Sky Color", "Use horizon and zenith color for diffuse energy."},
- {WO_AOSKYTEX, "SKY_TEXTURE", "Sky Texture", "Does full Sky texture render for diffuse energy."},
- {0, NULL, NULL, NULL}};
+ {WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
+ {WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy."},
+ {WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_sample_method_items[] = {
- {WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""},
- {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", "Fast in high-contrast areas."},
- {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", "Best quality."},
- {0, NULL, NULL, NULL}};
+ {WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
+ {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas."},
+ {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality."},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_gather_method_items[] = {
- {WO_AOGATHER_RAYTRACE, "RAYTRACE", "Raytrace", "Accurate, but slow when noise-free results are required."},
- {WO_AOGATHER_APPROX, "APPROXIMATE", "Approximate", "Inaccurate, but faster and without noise."},
- {0, NULL, NULL, NULL}};
+ {WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required."},
+ {WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WorldAmbientOcclusion", NULL);
RNA_def_struct_sdna(srna, "World");
@@ -155,7 +155,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
- RNA_def_property_ui_text(prop, "Enabled", "");
+ RNA_def_property_ui_text(prop, "Enabled", "Use Ambient Occlusion to add light based on distance between elements, creating the illusion of omnipresent light");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
@@ -168,7 +168,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aoenergy");
RNA_def_property_ui_range(prop, 0, 10, 0.1, 3);
- RNA_def_property_ui_text(prop, "Energy", "Global energy scale for ambient occlusion.");
+ RNA_def_property_ui_text(prop, "Energy", "Amount of enerygy generated by ambient occlusion.");
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
@@ -207,17 +207,17 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aosamp");
RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Samples", "");
+ RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aomix");
RNA_def_property_enum_items(prop, blend_mode_items);
- RNA_def_property_ui_text(prop, "Blend Mode", "Blending mode for how AO mixes with material shading.");
+ RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading.");
prop= RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aocolor");
RNA_def_property_enum_items(prop, prop_color_items);
- RNA_def_property_ui_text(prop, "Color", "");
+ RNA_def_property_ui_text(prop, "Color", "Defines the color of the AO light");
prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
@@ -241,10 +241,10 @@ static void rna_def_world_mist(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem falloff_items[] = {
- {0, "QUADRATIC", "Quadratic", "Mist uses quadratic progression."},
- {1, "LINEAR", "Linear", "Mist uses linear progression."},
- {2, "INVERSE_QUADRATIC", "Inverse Quadratic", "Mist uses inverse quadratic progression."},
- {0, NULL, NULL, NULL}};
+ {0, "QUADRATIC", 0, "Quadratic", "Mist uses quadratic progression."},
+ {1, "LINEAR", 0, "Linear", "Mist uses linear progression."},
+ {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Mist uses inverse quadratic progression."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WorldMistSettings", NULL);
RNA_def_struct_sdna(srna, "World");
@@ -253,34 +253,34 @@ static void rna_def_world_mist(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
- RNA_def_property_ui_text(prop, "Enabled", "Enable mist, occluding objects with the environment color as they are further away.");
+ RNA_def_property_ui_text(prop, "Enabled", "Occlude objects with the environment color as they are further away.");
prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "misi");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist.");
+ RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist effect.");
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "miststa");
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.");
+ RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_NONE);
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", "Depth of the mist.");
+ RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "misthi");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Height", "Factor for a less dense mist with increasing height.");
+ RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height");
prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mistype");
RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Falloff", "Falloff method for mist.");
+ RNA_def_property_ui_text(prop, "Falloff", "Type of transition used to fade mist");
}
static void rna_def_world_stars(BlenderRNA *brna)
@@ -319,7 +319,7 @@ static void rna_def_world_stars(BlenderRNA *brna)
prop= RNA_def_property(srna, "color_randomization", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Color Randomization", "Randomizes star color.");
+ RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors.");
RNA_def_property_update(prop, NC_WORLD, NULL);
/* unused
@@ -335,13 +335,13 @@ void RNA_def_world(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem physics_engine_items[] = {
- {WOPHY_NONE, "NONE", "None", ""},
- //{WOPHY_ENJI, "ENJI", "Enji", ""},
- {WOPHY_SUMO, "SUMO", "Sumo (Deprecated)", ""},
- //{WOPHY_DYNAMO, "DYNAMO", "Dynamo", ""},
- //{WOPHY_ODE, "ODE", "ODE", ""},
- {WOPHY_BULLET, "BULLET", "Bullet", ""},
- {0, NULL, NULL, NULL}};
+ {WOPHY_NONE, "NONE", 0, "None", ""},
+ //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
+ //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
+ //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
+ //{WOPHY_ODE, "ODE", 0, "ODE", ""},
+ {WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "World", "ID");
RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene.");
@@ -377,22 +377,22 @@ void RNA_def_world(BlenderRNA *brna)
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "range");
RNA_def_property_range(prop, 0.2, 5.0);
- RNA_def_property_ui_text(prop, "Range", "The color amount that will be mapped on color 1.0.");
+ RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1.");
/* sky type */
prop= RNA_def_property(srna, "blend_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYBLEND);
- RNA_def_property_ui_text(prop, "Blend Sky", "Renders background with natural progression from horizon to zenith.");
+ RNA_def_property_ui_text(prop, "Blend Sky", "Render background with natural progression from horizon to zenith.");
RNA_def_property_update(prop, NC_WORLD, NULL);
prop= RNA_def_property(srna, "paper_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYPAPER);
- RNA_def_property_ui_text(prop, "Paper Sky", "Flattens blend or texture coordinates.");
+ RNA_def_property_ui_text(prop, "Paper Sky", "Flatten blend or texture coordinates.");
RNA_def_property_update(prop, NC_WORLD, NULL);
prop= RNA_def_property(srna, "real_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
- RNA_def_property_ui_text(prop, "Real Sky", "Renders background with a real horizon.");
+ RNA_def_property_ui_text(prop, "Real Sky", "Render background with a real horizon, relative to the camera angle.");
RNA_def_property_update(prop, NC_WORLD, NULL);
/* physics */
diff --git a/source/blender/nodes/TEX_node.h b/source/blender/nodes/TEX_node.h
index d298f062143..f58d0312961 100644
--- a/source/blender/nodes/TEX_node.h
+++ b/source/blender/nodes/TEX_node.h
@@ -59,6 +59,7 @@ extern bNodeType tex_node_distance;
extern bNodeType tex_node_rotate;
extern bNodeType tex_node_translate;
extern bNodeType tex_node_scale;
+extern bNodeType tex_node_at;
extern bNodeType tex_node_compose;
extern bNodeType tex_node_decompose;
diff --git a/source/blender/radiosity/CMakeLists.txt b/source/blender/radiosity/CMakeLists.txt
deleted file mode 100644
index e76f7409f99..00000000000
--- a/source/blender/radiosity/CMakeLists.txt
+++ /dev/null
@@ -1,36 +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 intern/source/*.c)
-
-SET(INC
- extern/include ../blenlib ../blenkernel ../makesdna ../editors/include
- ../../../intern/guardedalloc ../render/extern/include
- ../render/intern/include ../blenloader ../../../extern/glew/include
-)
-
-BLENDERLIB_NOLIST(blender_radiosity "${SRC}" "${INC}")
-#env.BlenderLib ( 'blender_radiosity', sources, Split(incs), [], libtype='core', priority=50 )
diff --git a/source/blender/radiosity/Makefile b/source/blender/radiosity/Makefile
deleted file mode 100644
index 91a13e2fd57..00000000000
--- a/source/blender/radiosity/Makefile
+++ /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) 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 *****
-#
-# Makes module object directory and bounces make to subdirectories.
-
-SOURCEDIR = source/blender/radiosity
-DIRS = intern
-
-include nan_subdirs.mk
diff --git a/source/blender/radiosity/SConscript b/source/blender/radiosity/SConscript
deleted file mode 100644
index 29854d2ee83..00000000000
--- a/source/blender/radiosity/SConscript
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('intern/source/*.c')
-
-incs = 'extern/include ../blenlib ../blenkernel ../makesdna ../editors/include'
-incs += ' #/intern/guardedalloc ../render/extern/include'
-incs += ' ../render/intern/include ../blenloader #/extern/glew/include'
-
-incs += ' ' + env['BF_OPENGL_INC']
-
-env.BlenderLib ( 'bf_radiosity', sources, Split(incs), [], libtype='core', priority=150 )
diff --git a/source/blender/radiosity/extern/include/radio.h b/source/blender/radiosity/extern/include/radio.h
deleted file mode 100644
index e7f23302880..00000000000
--- a/source/blender/radiosity/extern/include/radio.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* ***************************************
-
-
-
- radio.h nov/dec 1992
- revised for Blender may 1999
-
- $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 RADIO_H
-#define RADIO_H
-#define RADIO_H
-
-/* type include */
-#include "radio_types.h"
-
-extern RadGlobal RG;
-struct View3D;
-struct Scene;
-
-/* radfactors.c */
-extern float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area);
-extern void calcTopfactors(void);
-void calcSidefactors(void);
-extern void initradiosity(void);
-extern void rad_make_hocos(RadView *vw);
-extern void hemizbuf(RadView *vw);
-extern int makeformfactors(RPatch *shoot);
-extern void applyformfactors(RPatch *shoot);
-extern RPatch *findshootpatch(void);
-extern void setnodeflags(RNode *rn, int flag, int set);
-extern void backface_test(RPatch *shoot);
-extern void clear_backface_test(void);
-extern void progressiverad(void);
-extern void minmaxradelem(RNode *rn, float *min, float *max);
-extern void minmaxradelemfilt(RNode *rn, float *min, float *max, float *errmin, float *errmax);
-extern void subdivideshootElements(int it);
-extern void subdivideshootPatches(int it);
-extern void inithemiwindows(void);
-extern void closehemiwindows(void);
-void rad_init_energy(void);
-
-/* radio.c */
-void freeAllRad(struct Scene *scene);
-int rad_phase(void);
-void rad_status_str(char *str);
-void rad_printstatus(void);
-void rad_setlimits(struct Scene *scene);
-void set_radglobal(struct Scene *scene);
-void add_radio(struct Scene *scene);
-void delete_radio(struct Scene *scene);
-int rad_go(struct Scene *scene);
-void rad_subdivshootpatch(struct Scene *scene);
-void rad_subdivshootelem(struct Scene *scene);
-void rad_limit_subdivide(struct Scene *scene);
-
-/* radnode.c */
-extern void setnodelimit(float limit);
-extern float *mallocVert(void);
-extern float *callocVert(void);
-extern void freeVert(float *vert);
-extern int totalRadVert(void);
-extern RNode *mallocNode(void);
-extern RNode *callocNode(void);
-extern void freeNode(RNode *node);
-extern void freeNode_recurs(RNode *node);
-extern RPatch *mallocPatch(void);
-extern RPatch *callocPatch(void);
-extern void freePatch(RPatch *patch);
-extern void replaceAllNode(RNode *, RNode *);
-extern void replaceAllNodeInv(RNode *neighb, RNode *old);
-extern void replaceAllNodeUp(RNode *neighb, RNode *old);
-extern void replaceTestNode(RNode *, RNode **, RNode *, int , float *);
-extern void free_fastAll(void);
-
-/* radnode.c */
-extern void start_fastmalloc(char *str);
-extern int setvertexpointersNode(RNode *neighb, RNode *node, int level, float **v1, float **v2);
-extern float edlen(float *v1, float *v2);
-extern void deleteNodes(RNode *node);
-extern void subdivideTriNode(RNode *node, RNode *edge);
-extern void subdivideNode(RNode *node, RNode *edge);
-extern int comparelevel(RNode *node, RNode *nb, int level);
-
-/* radpreprocess.c */
-extern void splitconnected(void);
-extern int vergedge(const void *v1,const void *v2);
-extern void addedge(float *v1, float *v2, EdSort *es);
-extern void setedgepointers(void);
-extern void rad_collect_meshes(struct Scene *scene, struct View3D *v3d);
-extern void countelem(RNode *rn);
-extern void countglobaldata(void);
-extern void addelem(RNode ***el, RNode *rn, RPatch *rp);
-extern void makeGlobalElemArray(void);
-extern void remakeGlobaldata(void);
-extern void splitpatch(RPatch *old);
-extern void addpatch(RPatch *old, RNode *rn);
-extern void converttopatches(void);
-extern void make_elements(void);
-extern void subdividelamps(void);
-extern void maxsizePatches(void);
-extern void subdiv_elements(void);
-
-/* radpostprocess.c */
-void addaccu(register char *z, register char *t);
-void addaccuweight(register char *z, register char *t, int w);
-void triaweight(Face *face, int *w1, int *w2, int *w3);
-void init_face_tab(void);
-Face *addface(void);
-Face *makeface(float *v1, float *v2, float *v3, float *v4, RNode *rn);
-void anchorQuadface(RNode *rn, float *v1, float *v2, float *v3, float *v4, int flag);
-void anchorTriface(RNode *rn, float *v1, float *v2, float *v3, int flag);
-float *findmiddlevertex(RNode *node, RNode *nb, float *v1, float *v2);
-void make_face_tab(void);
-void filterFaces(void);
-void calcfiltrad(RNode *rn, float *cd);
-void filterNodes(void);
-void removeEqualNodes(short limit);
-void rad_addmesh(struct Scene *scene);
-void rad_replacemesh(struct Scene *scene);
-
-/* raddisplay.c */
-extern char calculatecolor(float col);
-extern void make_node_display(void);
-extern void drawnodeWire(RNode *rn);
-extern void drawsingnodeWire(RNode *rn);
-extern void drawnodeSolid(RNode *rn);
-extern void drawnodeGour(RNode *rn);
-extern void drawpatch(RPatch *patch, unsigned int col);
-extern void drawfaceGour(Face *face);
-extern void drawfaceSolid(Face *face);
-extern void drawfaceWire(Face *face);
-extern void drawsquare(float *cent, float size, short cox, short coy);
-extern void drawlimits(void);
-extern void setcolNode(RNode *rn, unsigned int *col);
-extern void pseudoAmb(void);
-extern void rad_forcedraw(void);
-extern void drawpatch_ext(RPatch *patch, unsigned int col);
-extern void RAD_drawall(int depth_is_on);
-
-/* radrender.c */
-struct Render;
-extern void do_radio_render(struct Render *re);
-void end_radio_render(void);
-
-#endif /* RADIO_H */
-
diff --git a/source/blender/radiosity/extern/include/radio_types.h b/source/blender/radiosity/extern/include/radio_types.h
deleted file mode 100644
index 5a218ee71be..00000000000
--- a/source/blender/radiosity/extern/include/radio_types.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * radio_types.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 *****
- */
-
-/* #include "misc_util.h" */ /* for listbase...*/
-
-
-#ifndef RADIO_TYPES_H
-#define RADIO_TYPES_H
-
-#include "DNA_listBase.h"
-#include "DNA_material_types.h"
-
-struct Render;
-struct CustomData;
-
-#define PI M_PI
-#define RAD_MAXFACETAB 1024
-#define RAD_NEXTFACE(a) if( ((a) & 1023)==0 ) face= RG.facebase[(a)>>10]; else face++;
-
-/* RG.phase */
-#define RAD_SHOOTE 1
-#define RAD_SHOOTP 2
-#define RAD_SOLVE 3
-
-typedef struct RadView {
- float cam[3], tar[3], up[3];
- float wx1, wx2, wy1, wy2;
- float mynear, myfar;
- float viewmat[4][4], winmat[4][4];
- unsigned int *rect, *rectz;
- short rectx, recty;
- int wid;
-
-} RadView;
-
-/* rn->f */
-#define RAD_PATCH 1
-#define RAD_SHOOT 2
-#define RAD_SUBDIV 4
-#define RAD_BACKFACE 8
-#define RAD_TWOSIDED 16
-
-
-typedef struct RNode { /* length: 104 */
- struct RNode *down1, *down2, *up;
- struct RNode *ed1, *ed2, *ed3, *ed4;
- struct RPatch *par;
-
- char lev1, lev2, lev3, lev4; /* edgelevels */
- short type; /* type: 4==QUAD, 3==TRIA */
- short f;
- float *v1, *v2, *v3, *v4;
- float totrad[3], area;
-
- unsigned int col;
- int orig; /* index in custom face data */
-} RNode;
-
-
-typedef struct Face { /* length: 52 */
- float *v1, *v2, *v3, *v4;
- unsigned int col, matindex;
- int orig; /* index in custom face data */
-} Face;
-
-/* rp->f1 */
-#define RAD_NO_SPLIT 1
-
-typedef struct RPatch {
- struct RPatch *next, *prev;
- RNode *first; /* first node==patch */
-
- struct Object *from;
-
- int type; /* 3: TRIA, 4: QUAD */
- short f, f1; /* flags f: if node, only for subdiv */
-
- float ref[3], emit[3], unshot[3];
- float cent[3], norm[3];
- float area;
- int matindex;
-
-} RPatch;
-
-
-typedef struct VeNoCo { /* needed for splitconnected */
- struct VeNoCo *next;
- float *v;
- float *n;
- float *col;
- int flag;
-} VeNoCo;
-
-
-typedef struct EdSort { /* sort edges */
- float *v1, *v2;
- RNode *node;
- int nr;
-} EdSort;
-
-typedef struct {
- struct Radio *radio;
- unsigned int *hemibuf;
- struct ListBase patchbase;
- int totpatch, totelem, totvert, totlamp;
- RNode **elem; /* global array with all pointers */
- VeNoCo *verts; /* temporal vertices from patches */
- float *formfactors; /* 1 factor per element */
- float *topfactors, *sidefactors; /* LUT for delta's */
- int *index; /* LUT for above LUT */
- Face **facebase;
- int totface;
- float min[3], max[3], size[3], cent[3]; /* world */
- float maxsize, totenergy;
- float patchmin, patchmax;
- float elemmin, elemmax;
- float radfactor, lostenergy, igamma; /* radfac is in button, radfactor is calculated */
- int phase;
- struct Render *re; /* for calling hemizbuf correctly */
- /* to preserve materials as used before, max 16 */
- Material *matar[MAXMAT];
- int totmat;
-
- /* for preserving face data */
- int mfdatatot;
- struct CustomData *mfdata;
- struct RNode **mfdatanodes;
-
- /* this part is a copy of struct Radio */
- short hemires, maxiter;
- short drawtype, flag; /* bit 0 en 1: show limits */
- short subshootp, subshoote, nodelim, maxsublamp;
- int maxnode;
- float convergence;
- float radfac, gamma; /* for display */
-
-} RadGlobal;
-
-#endif /* radio_types.h */
-
diff --git a/source/blender/radiosity/intern/Makefile b/source/blender/radiosity/intern/Makefile
deleted file mode 100644
index 456b51cc56e..00000000000
--- a/source/blender/radiosity/intern/Makefile
+++ /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) 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 *****
-#
-# Makes module object directory and bounces make to subdirectories.
-
-SOURCEDIR = source/blender/radiosity/intern
-DIRS = source
-
-include nan_subdirs.mk
diff --git a/source/blender/radiosity/intern/source/raddisplay.c b/source/blender/radiosity/intern/source/raddisplay.c
deleted file mode 100644
index ab9e8eedc28..00000000000
--- a/source/blender/radiosity/intern/source/raddisplay.c
+++ /dev/null
@@ -1,477 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- raddisplay.c nov/dec 1992
- may 1999
-
- - drawing
- - color calculation for display during solving
-
- $Id$
-
- *************************************** */
-
-#include <stdlib.h>
-#include <math.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "BLI_blenlib.h"
-
-#include "DNA_radio_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_space_types.h"
-#include "DNA_view3d_types.h"
-
-#include "BKE_global.h"
-#include "BKE_main.h"
-
-#include "BIF_gl.h"
-
-#include "radio.h"
-
-/* cpack has to be endian-insensitive! (old irisgl function) */
-#define cpack(x) glColor3ub( ((x)&0xFF), (((x)>>8)&0xFF), (((x)>>16)&0xFF) )
-
-char calculatecolor(float col)
-{
- int b;
-
- if(RG.gamma==1.0) {
- b= RG.radfactor*col;
- }
- else if(RG.gamma==2.0) {
- b= RG.radfactor*sqrt(col);
- }
- else {
- b= RG.radfactor*pow(col, RG.igamma);
- }
-
- if(b>255) b=255;
- return b;
-}
-
-void make_node_display()
-{
- RNode *rn, **el;
- int a;
- char *charcol;
-
- RG.igamma= 1.0/RG.gamma;
- RG.radfactor= RG.radfac*pow(64*64, RG.igamma);
-
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- charcol= (char *)&( rn->col );
-
- charcol[3]= calculatecolor(rn->totrad[0]);
- charcol[2]= calculatecolor(rn->totrad[1]);
- charcol[1]= calculatecolor(rn->totrad[2]);
-
- /* gouraudcolor */
- *(rn->v1+3)= 0;
- *(rn->v2+3)= 0;
- *(rn->v3+3)= 0;
- if(rn->v4) *(rn->v4+3)= 0;
- }
-
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- addaccuweight( (char *)&(rn->col), (char *)(rn->v1+3), 16 );
- addaccuweight( (char *)&(rn->col), (char *)(rn->v2+3), 16 );
- addaccuweight( (char *)&(rn->col), (char *)(rn->v3+3), 16 );
- if(rn->v4) addaccuweight( (char *)&(rn->col), (char *)(rn->v4+3), 16 );
- }
-}
-
-void drawnodeWire(RNode *rn)
-{
-
- if(rn->down1) {
- drawnodeWire(rn->down1);
- drawnodeWire(rn->down2);
- }
- else {
- glBegin(GL_LINE_LOOP);
- glVertex3fv(rn->v1);
- glVertex3fv(rn->v2);
- glVertex3fv(rn->v3);
- if(rn->type==4) glVertex3fv(rn->v4);
- glEnd();
- }
-}
-
-void drawsingnodeWire(RNode *rn)
-{
-
- glBegin(GL_LINE_LOOP);
- glVertex3fv(rn->v1);
- glVertex3fv(rn->v2);
- glVertex3fv(rn->v3);
- if(rn->type==4) glVertex3fv(rn->v4);
- glEnd();
-}
-
-void drawnodeSolid(RNode *rn)
-{
- char *cp;
-
- if(rn->down1) {
- drawnodeSolid(rn->down1);
- drawnodeSolid(rn->down2);
- }
- else {
- cp= (char *)&rn->col;
- glColor3ub(cp[3], cp[2], cp[1]);
- glBegin(GL_POLYGON);
- glVertex3fv(rn->v1);
- glVertex3fv(rn->v2);
- glVertex3fv(rn->v3);
- if(rn->type==4) glVertex3fv(rn->v4);
- glEnd();
- }
-}
-
-void drawnodeGour(RNode *rn)
-{
- char *cp;
-
- if(rn->down1) {
- drawnodeGour(rn->down1);
- drawnodeGour(rn->down2);
- }
- else {
- glBegin(GL_POLYGON);
- cp= (char *)(rn->v1+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(rn->v1);
-
- cp= (char *)(rn->v2+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(rn->v2);
-
- cp= (char *)(rn->v3+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(rn->v3);
-
- if(rn->type==4) {
- cp= (char *)(rn->v4+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(rn->v4);
- }
- glEnd();
- }
-}
-
-void drawpatch_ext(RPatch *patch, unsigned int col)
-{
- ScrArea *sa, *oldsa;
- View3D *v3d;
- glDrawBuffer(GL_FRONT);
-
- return; // XXX
-
- cpack(col);
-
- oldsa= NULL; // XXX curarea;
-
-// sa= G.curscreen->areabase.first;
- while(sa) {
- if (sa->spacetype==SPACE_VIEW3D) {
- v3d= sa->spacedata.first;
-
- /* use mywinget() here: otherwise it draws in header */
-// XXX if(sa->win != mywinget()) areawinset(sa->win);
-// XXX persp(PERSP_VIEW);
- if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
- drawnodeWire(patch->first);
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST); // pretty useless?
- }
- sa= sa->next;
- }
-
-// XXX if(oldsa && oldsa!=curarea) areawinset(oldsa->win);
-
- glFlush();
- glDrawBuffer(GL_BACK);
-}
-
-
-void drawfaceGour(Face *face)
-{
- char *cp;
-
- glBegin(GL_POLYGON);
- cp= (char *)(face->v1+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(face->v1);
-
- cp= (char *)(face->v2+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(face->v2);
-
- cp= (char *)(face->v3+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(face->v3);
-
- if(face->v4) {
- cp= (char *)(face->v4+3);
- glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(face->v4);
- }
- glEnd();
-
-}
-
-void drawfaceSolid(Face *face)
-{
- char *cp;
-
- cp= (char *)&face->col;
- glColor3ub(cp[3], cp[2], cp[1]);
-
- glBegin(GL_POLYGON);
- glVertex3fv(face->v1);
- glVertex3fv(face->v2);
- glVertex3fv(face->v3);
- if(face->v4) {
- glVertex3fv(face->v4);
- }
- glEnd();
-
-}
-
-void drawfaceWire(Face *face)
-{
- char *cp;
-
- cp= (char *)&face->col;
- glColor3ub(cp[3], cp[2], cp[1]);
-
- glBegin(GL_LINE_LOOP);
- glVertex3fv(face->v1);
- glVertex3fv(face->v2);
- glVertex3fv(face->v3);
- if(face->v4) {
- glVertex3fv(face->v4);
- }
- glEnd();
-
-}
-
-void drawsquare(float *cent, float size, short cox, short coy)
-{
- float vec[3];
-
- vec[0]= cent[0];
- vec[1]= cent[1];
- vec[2]= cent[2];
-
- glBegin(GL_LINE_LOOP);
- vec[cox]+= .5*size;
- vec[coy]+= .5*size;
- glVertex3fv(vec);
- vec[coy]-= size;
- glVertex3fv(vec);
- vec[cox]-= size;
- glVertex3fv(vec);
- vec[coy]+= size;
- glVertex3fv(vec);
- glEnd();
-}
-
-void drawlimits()
-{
- /* center around cent */
- short cox=0, coy=1;
-
- if((RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ))==RAD_SHOWZ) coy= 2;
- if((RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ))==(RAD_SHOWLIMITS|RAD_SHOWZ)) {
- cox= 1;
- coy= 2;
- }
-
- cpack(0);
- drawsquare(RG.cent, sqrt(RG.patchmax), cox, coy);
- drawsquare(RG.cent, sqrt(RG.patchmin), cox, coy);
-
- drawsquare(RG.cent, sqrt(RG.elemmax), cox, coy);
- drawsquare(RG.cent, sqrt(RG.elemmin), cox, coy);
-
- cpack(0xFFFFFF);
- drawsquare(RG.cent, sqrt(RG.patchmax), cox, coy);
- drawsquare(RG.cent, sqrt(RG.patchmin), cox, coy);
- cpack(0xFFFF00);
- drawsquare(RG.cent, sqrt(RG.elemmax), cox, coy);
- drawsquare(RG.cent, sqrt(RG.elemmin), cox, coy);
-
-}
-
-void setcolNode(RNode *rn, unsigned int *col)
-{
-
- if(rn->down1) {
- setcolNode(rn->down1, col);
- setcolNode(rn->down2, col);
- }
- rn->col= *col;
-
- *((unsigned int *)rn->v1+3)= *col;
- *((unsigned int *)rn->v2+3)= *col;
- *((unsigned int *)rn->v3+3)= *col;
- if(rn->v4) *((unsigned int *)rn->v4+3)= *col;
-}
-
-void pseudoAmb()
-{
- RPatch *rp;
- float fac;
- char col[4];
-
- /* sets pseudo ambient color in the nodes */
-
- rp= RG.patchbase.first;
- while(rp) {
-
- if(rp->emit[0]!=0.0 || rp->emit[1]!=0.0 || rp->emit[2]!=0.0) {
- col[1]= col[2]= col[3]= 255;
- }
- else {
- fac= rp->norm[0]+ rp->norm[1]+ rp->norm[2];
- fac= 225.0*(3+fac)/6.0;
-
- col[3]= fac*rp->ref[0];
- col[2]= fac*rp->ref[1];
- col[1]= fac*rp->ref[2];
- }
-
- setcolNode(rp->first, (unsigned int *)col);
-
- rp= rp->next;
- }
-}
-
-void RAD_drawall(int depth_is_on)
-{
- /* displays elements or faces */
- Face *face = NULL;
- RNode **el;
- RPatch *rp;
- int a;
-
- if(!depth_is_on) {
- glEnable(GL_DEPTH_TEST);
- glClearDepth(1.0); glClear(GL_DEPTH_BUFFER_BIT);
- }
-
- if(RG.totface) {
- if(RG.drawtype==RAD_GOURAUD) {
- glShadeModel(GL_SMOOTH);
- for(a=0; a<RG.totface; a++) {
- RAD_NEXTFACE(a);
-
- drawfaceGour(face);
- }
- }
- else if(RG.drawtype==RAD_SOLID) {
- for(a=0; a<RG.totface; a++) {
- RAD_NEXTFACE(a);
-
- drawfaceSolid(face);
- }
- }
- else {
- cpack(0);
- rp= RG.patchbase.first;
- while(rp) {
- drawsingnodeWire(rp->first);
- rp= rp->next;
- }
- }
- }
- else {
- el= RG.elem;
- if(RG.drawtype==RAD_GOURAUD) {
- glShadeModel(GL_SMOOTH);
- for(a=RG.totelem; a>0; a--, el++) {
- drawnodeGour(*el);
- }
- }
- else if(RG.drawtype==RAD_SOLID) {
- for(a=RG.totelem; a>0; a--, el++) {
- drawnodeSolid(*el);
- }
- }
- else {
- cpack(0);
- for(a=RG.totelem; a>0; a--, el++) {
- drawnodeWire(*el);
- }
- }
- }
- glShadeModel(GL_FLAT);
-
- if(RG.totpatch) {
- if(RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ)) {
- if(depth_is_on) glDisable(GL_DEPTH_TEST);
- drawlimits();
- if(depth_is_on) glEnable(GL_DEPTH_TEST);
- }
- }
- if(!depth_is_on) {
- glDisable(GL_DEPTH_TEST);
- }
-}
-
-void rad_forcedraw()
-{
- ScrArea *sa, *oldsa;
-
- return; // XXX
-
- oldsa= NULL; // XXX curarea;
-
-/// sa= G.curscreen->areabase.first;
- while(sa) {
- if (sa->spacetype==SPACE_VIEW3D) {
- /* use mywinget() here: othwerwise it draws in header */
-// XXX if(sa->win != mywinget()) areawinset(sa->win);
-// XXX scrarea_do_windraw(sa);
- }
- sa= sa->next;
- }
-// XXX screen_swapbuffers();
-
-// XXX if(oldsa && oldsa!=curarea) areawinset(oldsa->win);
-}
-
diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c
deleted file mode 100644
index b87473dd811..00000000000
--- a/source/blender/radiosity/intern/source/radfactors.c
+++ /dev/null
@@ -1,939 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- formfactors.c nov/dec 1992
-
- $Id$
-
- *************************************** */
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_rand.h"
-
-#include "BKE_utildefines.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-
-#include "radio.h"
-#include "RE_render_ext.h" /* for `RE_zbufferall_radio and RE_zbufferall_radio */
-
-/* locals */
-static void rad_setmatrices(RadView *vw);
-static void clearsubflagelem(RNode *rn);
-static void setsubflagelem(RNode *rn);
-
-RadView hemitop, hemiside;
-
-float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area)
-{
- float tvec[3], fac;
- float vec[4][3]; /* vectors of shoot->cent to vertices rp */
- float cross[4][3]; /* cross products of this */
- float rad[4]; /* anlgles between vecs */
-
- /* test for direction */
- VecSubf(tvec, shoot->cent, rp->cent);
- if( tvec[0]*shoot->norm[0]+ tvec[1]*shoot->norm[1]+ tvec[2]*shoot->norm[2]>0.0)
- return 0.0;
-
- if(rp->type==4) {
-
- /* corner vectors */
- VecSubf(vec[0], shoot->cent, rn->v1);
- VecSubf(vec[1], shoot->cent, rn->v2);
- VecSubf(vec[2], shoot->cent, rn->v3);
- VecSubf(vec[3], shoot->cent, rn->v4);
-
- Normalize(vec[0]);
- Normalize(vec[1]);
- Normalize(vec[2]);
- Normalize(vec[3]);
-
- /* cross product */
- Crossf(cross[0], vec[0], vec[1]);
- Crossf(cross[1], vec[1], vec[2]);
- Crossf(cross[2], vec[2], vec[3]);
- Crossf(cross[3], vec[3], vec[0]);
- Normalize(cross[0]);
- Normalize(cross[1]);
- Normalize(cross[2]);
- Normalize(cross[3]);
-
- /* angles */
- rad[0]= vec[0][0]*vec[1][0]+ vec[0][1]*vec[1][1]+ vec[0][2]*vec[1][2];
- rad[1]= vec[1][0]*vec[2][0]+ vec[1][1]*vec[2][1]+ vec[1][2]*vec[2][2];
- rad[2]= vec[2][0]*vec[3][0]+ vec[2][1]*vec[3][1]+ vec[2][2]*vec[3][2];
- rad[3]= vec[3][0]*vec[0][0]+ vec[3][1]*vec[0][1]+ vec[3][2]*vec[0][2];
-
- rad[0]= acos(rad[0]);
- rad[1]= acos(rad[1]);
- rad[2]= acos(rad[2]);
- rad[3]= acos(rad[3]);
-
- /* Stoke formula */
- VecMulf(cross[0], rad[0]);
- VecMulf(cross[1], rad[1]);
- VecMulf(cross[2], rad[2]);
- VecMulf(cross[3], rad[3]);
-
- VECCOPY(tvec, shoot->norm);
- fac= tvec[0]*cross[0][0]+ tvec[1]*cross[0][1]+ tvec[2]*cross[0][2];
- fac+= tvec[0]*cross[1][0]+ tvec[1]*cross[1][1]+ tvec[2]*cross[1][2];
- fac+= tvec[0]*cross[2][0]+ tvec[1]*cross[2][1]+ tvec[2]*cross[2][2];
- fac+= tvec[0]*cross[3][0]+ tvec[1]*cross[3][1]+ tvec[2]*cross[3][2];
- }
- else {
- /* corner vectors */
- VecSubf(vec[0], shoot->cent, rn->v1);
- VecSubf(vec[1], shoot->cent, rn->v2);
- VecSubf(vec[2], shoot->cent, rn->v3);
-
- Normalize(vec[0]);
- Normalize(vec[1]);
- Normalize(vec[2]);
-
- /* cross product */
- Crossf(cross[0], vec[0], vec[1]);
- Crossf(cross[1], vec[1], vec[2]);
- Crossf(cross[2], vec[2], vec[0]);
- Normalize(cross[0]);
- Normalize(cross[1]);
- Normalize(cross[2]);
-
- /* angles */
- rad[0]= vec[0][0]*vec[1][0]+ vec[0][1]*vec[1][1]+ vec[0][2]*vec[1][2];
- rad[1]= vec[1][0]*vec[2][0]+ vec[1][1]*vec[2][1]+ vec[1][2]*vec[2][2];
- rad[2]= vec[2][0]*vec[0][0]+ vec[2][1]*vec[0][1]+ vec[2][2]*vec[0][2];
-
- rad[0]= acos(rad[0]);
- rad[1]= acos(rad[1]);
- rad[2]= acos(rad[2]);
-
- /* Stoke formula */
- VecMulf(cross[0], rad[0]);
- VecMulf(cross[1], rad[1]);
- VecMulf(cross[2], rad[2]);
-
- VECCOPY(tvec, shoot->norm);
- fac= tvec[0]*cross[0][0]+ tvec[1]*cross[0][1]+ tvec[2]*cross[0][2];
- fac+= tvec[0]*cross[1][0]+ tvec[1]*cross[1][1]+ tvec[2]*cross[1][2];
- fac+= tvec[0]*cross[2][0]+ tvec[1]*cross[2][1]+ tvec[2]*cross[2][2];
- }
-
- *area= -fac/(2.0*PI);
- return (*area * (shoot->area/rn->area));
-}
-
-
-void calcTopfactors()
-{
- float xsq , ysq, xysq;
- float n;
- float *fp;
- int a, b, hres;
-
- fp = RG.topfactors;
- hres= RG.hemires/2;
- n= hres;
-
- for (a=0; a<hres; a++) {
-
- ysq= (n- ((float)a+0.5))/n;
- ysq*= ysq;
-
- for ( b=0 ; b<hres ; b++ ) {
-
- xsq= ( n-((float)b+ 0.5) )/n;
- xsq*= xsq;
- xysq= xsq+ ysq+ 1.0 ;
- xysq*= xysq;
-
- *fp++ = 1.0/(xysq* PI* n*n);
- }
- }
-
-}
-
-void calcSidefactors()
-{
- float xsq , ysq, xysq;
- float n, y;
- float *fp;
- int a, b, hres;
-
- fp = RG.sidefactors;
- hres= RG.hemires/2;
- n= hres;
-
- for (a=0; a<hres; a++) {
-
- y= (n- ((float)a+0.5))/n;
- ysq= y*y;
-
- for ( b=0 ; b<hres ; b++ ) {
-
- xsq= ( n-((float)b+ 0.5) )/n;
- xsq*= xsq;
- xysq= xsq+ ysq+ 1.0 ;
- xysq*= xysq;
-
- *fp++ = y/(xysq* PI* n*n);
- }
- }
-
-}
-
-
-void initradiosity()
-{
- /* allocates and makes LUTs for top/side factors */
- /* allocates and makes index array */
- int a, hres2;
-
- if(RG.topfactors) MEM_freeN(RG.topfactors);
- if(RG.sidefactors) MEM_freeN(RG.sidefactors);
- if(RG.index) MEM_freeN(RG.index);
-
- RG.topfactors= MEM_callocN(RG.hemires*RG.hemires, "initradiosity");
- calcTopfactors();
- RG.sidefactors= MEM_callocN(RG.hemires*RG.hemires, "initradiosity1");
- calcSidefactors();
-
- RG.index= MEM_callocN(4*RG.hemires, "initradiosity3");
- hres2= RG.hemires/2;
- for(a=0; a<RG.hemires; a++) {
- RG.index[a]= a<hres2 ? a: (hres2-1-( a % hres2 ));
- }
-
-}
-
-void rad_make_hocos(RadView *vw)
-{
- /* float hoco[4]; */
- /* int a; */
-
- /* for(a=0; a< R.totvert;a++) { */
- /* projectvert(vec, ver->ho); */
- /* ver->clip = testclip(ver->ho); */
-/* */
- /* } */
-}
-
-static void rad_setmatrices(RadView *vw) /* for hemi's */
-{
- float up1[3], len, twist;
-
- i_lookat(vw->cam[0], vw->cam[1], vw->cam[2], vw->tar[0], vw->tar[1], vw->tar[2], 0, vw->viewmat);
- up1[0] = vw->viewmat[0][0]*vw->up[0] + vw->viewmat[1][0]*vw->up[1] + vw->viewmat[2][0]*vw->up[2];
- up1[1] = vw->viewmat[0][1]*vw->up[0] + vw->viewmat[1][1]*vw->up[1] + vw->viewmat[2][1]*vw->up[2];
- up1[2] = vw->viewmat[0][2]*vw->up[0] + vw->viewmat[1][2]*vw->up[1] + vw->viewmat[2][2]*vw->up[2];
-
- len= up1[0]*up1[0]+up1[1]*up1[1];
- if(len>0.0) {
- twist= -atan2(up1[0], up1[1]);
- }
- else twist= 0.0;
-
- i_lookat(vw->cam[0], vw->cam[1], vw->cam[2], vw->tar[0], vw->tar[1], vw->tar[2], (180.0*twist/M_PI), vw->viewmat);
-
- /* window matrix was set in inithemiwindows */
-
-}
-
-
-void hemizbuf(RadView *vw)
-{
- float *factors;
- unsigned int *rz;
- int a, b, inda, hres;
-
- rad_setmatrices(vw);
- RE_zbufferall_radio(vw, RG.elem, RG.totelem, RG.re); /* Render for when we got renderfaces */
-
- /* count factors */
- if(vw->recty==vw->rectx) factors= RG.topfactors;
- else factors= RG.sidefactors;
- hres= RG.hemires/2;
-
- rz= vw->rect;
- for(a=0; a<vw->recty; a++) {
- inda= hres*RG.index[a];
- for(b=0; b<vw->rectx; b++, rz++) {
- if(*rz<RG.totelem) {
- RG.formfactors[*rz]+= factors[inda+RG.index[b]];
- }
- }
- }
-}
-
-int makeformfactors(RPatch *shoot)
-{
- RNode **re;
- float len, vec[3], up[3], side[3], tar[5][3], *fp;
- int a=0, overfl;
-
- if(RG.totelem==0) return 0;
-
- memset(RG.formfactors, 0, 4*RG.totelem);
-
- /* set up hemiview */
- /* first: random upvector */
- do {
- a++;
- vec[0]= (float)BLI_drand();
- vec[1]= (float)BLI_drand();
- vec[2]= (float)BLI_drand();
- Crossf(up, shoot->norm, vec);
- len= Normalize(up);
- /* this safety for input normals that are zero or illegal sized */
- if(a>3) return 0;
- } while(len==0.0 || len>1.0);
-
- VECCOPY(hemitop.up, up);
- VECCOPY(hemiside.up, shoot->norm);
-
- Crossf(side, shoot->norm, up);
-
- /* five targets */
- VecAddf(tar[0], shoot->cent, shoot->norm);
- VecAddf(tar[1], shoot->cent, up);
- VecSubf(tar[2], shoot->cent, up);
- VecAddf(tar[3], shoot->cent, side);
- VecSubf(tar[4], shoot->cent, side);
-
- /* camera */
- VECCOPY(hemiside.cam, shoot->cent);
- VECCOPY(hemitop.cam, shoot->cent);
-
- /* do it! */
- VECCOPY(hemitop.tar, tar[0]);
- hemizbuf(&hemitop);
-
- for(a=1; a<5; a++) {
- VECCOPY(hemiside.tar, tar[a]);
- hemizbuf(&hemiside);
- }
-
- /* convert factors to real radiosity */
- re= RG.elem;
- fp= RG.formfactors;
-
- overfl= 0;
- for(a= RG.totelem; a>0; a--, re++, fp++) {
-
- if(*fp!=0.0) {
-
- *fp *= shoot->area/(*re)->area;
-
- if(*fp>1.0) {
- overfl= 1;
- *fp= 1.0001;
- }
- }
- }
-
- if(overfl) {
- if(shoot->first->down1) {
- splitpatch(shoot);
- return 0;
- }
- }
-
- return 1;
-}
-
-void applyformfactors(RPatch *shoot)
-{
- RPatch *rp;
- RNode **el, *rn;
- float *fp, *ref, unr, ung, unb, r, g, b, w;
- int a;
-
- unr= shoot->unshot[0];
- ung= shoot->unshot[1];
- unb= shoot->unshot[2];
-
- fp= RG.formfactors;
- el= RG.elem;
- for(a=0; a<RG.totelem; a++, el++, fp++) {
- rn= *el;
- if(*fp!= 0.0) {
- rp= rn->par;
- ref= rp->ref;
-
- r= (*fp)*unr*ref[0];
- g= (*fp)*ung*ref[1];
- b= (*fp)*unb*ref[2];
-
- w= rn->area/rp->area;
- rn->totrad[0]+= r;
- rn->totrad[1]+= g;
- rn->totrad[2]+= b;
-
- rp->unshot[0]+= w*r;
- rp->unshot[1]+= w*g;
- rp->unshot[2]+= w*b;
- }
- }
-
- shoot->unshot[0]= shoot->unshot[1]= shoot->unshot[2]= 0.0;
-}
-
-RPatch *findshootpatch()
-{
- RPatch *rp, *shoot;
- float energy, maxenergy;
-
- shoot= 0;
- maxenergy= 0.0;
- rp= RG.patchbase.first;
- while(rp) {
- energy= rp->unshot[0]*rp->area;
- energy+= rp->unshot[1]*rp->area;
- energy+= rp->unshot[2]*rp->area;
-
- if(energy>maxenergy) {
- shoot= rp;
- maxenergy= energy;
- }
- rp= rp->next;
- }
-
- if(shoot) {
- maxenergy/= RG.totenergy;
- if(maxenergy<RG.convergence) return 0;
- }
-
- return shoot;
-}
-
-void setnodeflags(RNode *rn, int flag, int set)
-{
-
- if(rn->down1) {
- setnodeflags(rn->down1, flag, set);
- setnodeflags(rn->down2, flag, set);
- }
- else {
- if(set) rn->f |= flag;
- else rn->f &= ~flag;
- }
-}
-
-void backface_test(RPatch *shoot)
-{
- RPatch *rp;
- float tvec[3];
-
- rp= RG.patchbase.first;
- while(rp) {
- if(rp!=shoot) {
-
- VecSubf(tvec, shoot->cent, rp->cent);
- if( tvec[0]*rp->norm[0]+ tvec[1]*rp->norm[1]+ tvec[2]*rp->norm[2]<0.0) {
- setnodeflags(rp->first, RAD_BACKFACE, 1);
- }
- }
- rp= rp->next;
- }
-}
-
-void clear_backface_test()
-{
- RNode **re;
- int a;
-
- re= RG.elem;
- for(a= RG.totelem-1; a>=0; a--, re++) {
- (*re)->f &= ~RAD_BACKFACE;
- }
-
-}
-
-void rad_init_energy()
-{
- /* call before shooting */
- /* keep patches and elements, clear all data */
- RNode **el, *rn;
- RPatch *rp;
- int a;
-
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- VECCOPY(rn->totrad, rn->par->emit);
- }
-
- RG.totenergy= 0.0;
- rp= RG.patchbase.first;
- while(rp) {
- VECCOPY(rp->unshot, rp->emit);
-
- RG.totenergy+= rp->unshot[0]*rp->area;
- RG.totenergy+= rp->unshot[1]*rp->area;
- RG.totenergy+= rp->unshot[2]*rp->area;
-
- rp->f= 0;
-
- rp= rp->next;
- }
-}
-
-void progressiverad()
-{
- RPatch *shoot;
- float unshot[3];
- int it= 0;
-
- rad_printstatus();
- rad_init_energy();
-
- shoot=findshootpatch();
-
- while( shoot ) {
-
- setnodeflags(shoot->first, RAD_SHOOT, 1);
-
- backface_test(shoot);
-
- drawpatch_ext(shoot, 0x88FF00);
-
- if(shoot->first->f & RAD_TWOSIDED) {
- VECCOPY(unshot, shoot->unshot);
- VecNegf(shoot->norm);
- if(makeformfactors(shoot))
- applyformfactors(shoot);
- VecNegf(shoot->norm);
- VECCOPY(shoot->unshot, unshot);
- }
-
- if( makeformfactors(shoot) ) {
- applyformfactors(shoot);
-
- it++;
- //XXX set_timecursor(it);
- if( (it & 3)==1 ) {
- make_node_display();
- rad_forcedraw();
- }
- setnodeflags(shoot->first, RAD_SHOOT, 0);
- }
-
- clear_backface_test();
-
- //XXX if(blender_test_break()) break;
- if(RG.maxiter && RG.maxiter<=it) break;
-
- shoot=findshootpatch();
-
- }
-
-}
-
-
-/* ************* subdivideshoot *********** */
-
-void minmaxradelem(RNode *rn, float *min, float *max)
-{
- int c;
-
- if(rn->down1) {
- minmaxradelem(rn->down1, min, max);
- minmaxradelem(rn->down2, min, max);
- }
- else {
- for(c=0; c<3; c++) {
- min[c]= MIN2(min[c], rn->totrad[c]);
- max[c]= MAX2(max[c], rn->totrad[c]);
- }
- }
-}
-
-void minmaxradelemfilt(RNode *rn, float *min, float *max, float *errmin, float *errmax)
-{
- float col[3], area;
- int c;
-
- if(rn->down1) {
- minmaxradelemfilt(rn->down1, min, max, errmin, errmax);
- minmaxradelemfilt(rn->down2, min, max, errmin, errmax);
- }
- else {
- VECCOPY(col, rn->totrad);
-
- for(c=0; c<3; c++) {
- min[c]= MIN2(min[c], col[c]);
- max[c]= MAX2(max[c], col[c]);
- }
-
- VecMulf(col, 2.0);
- area= 2.0;
- if(rn->ed1) {
- VecAddf(col, rn->ed1->totrad, col);
- area+= 1.0;
- }
- if(rn->ed2) {
- VecAddf(col, rn->ed2->totrad, col);
- area+= 1.0;
- }
- if(rn->ed3) {
- VecAddf(col, rn->ed3->totrad, col);
- area+= 1.0;
- }
- if(rn->ed4) {
- VecAddf(col, rn->ed4->totrad, col);
- area+= 1.0;
- }
- VecMulf(col, 1.0/area);
-
- for(c=0; c<3; c++) {
- errmin[c]= MIN2(errmin[c], col[c]);
- errmax[c]= MAX2(errmax[c], col[c]);
- }
- }
-}
-
-static void setsubflagelem(RNode *rn)
-{
-
- if(rn->down1) {
- setsubflagelem(rn->down1);
- setsubflagelem(rn->down2);
- }
- else {
- rn->f |= RAD_SUBDIV;
- }
-}
-
-static void clearsubflagelem(RNode *rn)
-{
-
- if(rn->down1) {
- setsubflagelem(rn->down1);
- setsubflagelem(rn->down2);
- }
- else {
- rn->f &= ~RAD_SUBDIV;
- }
-}
-
-void subdivideshootElements(int it)
-{
- RPatch *rp, *shoot;
- RNode **el, *rn;
- float *fp, err, stoke, area, min[3], max[3], errmin[3], errmax[3];
- int a, b, c, d, e, f, contin;
- int maxlamp;
-
- if(RG.maxsublamp==0) maxlamp= RG.totlamp;
- else maxlamp= RG.maxsublamp;
-
- while(it) {
- rad_printstatus();
- rad_init_energy();
- it--;
-
- for(a=0; a<maxlamp; a++) {
- shoot= findshootpatch();
- if(shoot==0) break;
-
- //XXX set_timecursor(a);
- drawpatch_ext(shoot, 0x88FF00);
-
- setnodeflags(shoot->first, RAD_SHOOT, 1);
- if( makeformfactors(shoot) ) {
-
- fp= RG.formfactors;
- el= RG.elem;
- for(b=RG.totelem; b>0; b--, el++) {
- rn= *el;
-
- if( (rn->f & RAD_SUBDIV)==0 && *fp!=0.0) {
- if(rn->par->emit[0]+rn->par->emit[1]+rn->par->emit[2]==0.0) {
-
- stoke= calcStokefactor(shoot, rn->par, rn, &area);
- if(stoke!= 0.0) {
-
- err= *fp/stoke;
-
- /* area error */
- area*=(0.5*RG.hemires*RG.hemires);
-
- if(area>35.0) {
- if(err<0.95 || err>1.05) {
- if(err>0.05) {
- rn->f |= RAD_SUBDIV;
- rn->par->f |= RAD_SUBDIV;
- }
- }
- }
- }
-
- }
- }
-
- fp++;
-
- }
-
- applyformfactors(shoot);
-
- if( (a & 3)==1 ) {
- make_node_display();
- rad_forcedraw();
- }
-
- setnodeflags(shoot->first, RAD_SHOOT, 0);
- }
- else a--;
-
- //XXX if(blender_test_break()) break;
- }
-
- /* test for extreme small color change within a patch with subdivflag */
-
- rp= RG.patchbase.first;
-
- while(rp) {
- if(rp->f & RAD_SUBDIV) { /* rp has elems that need subdiv */
- /* at least 4 levels deep */
- rn= rp->first->down1;
- if(rn) {
- rn= rn->down1;
- if(rn) {
- rn= rn->down1;
- if(rn) rn= rn->down1;
- }
- }
- if(rn) {
- INIT_MINMAX(min, max);
- /* errmin and max are the filtered colors */
- INIT_MINMAX(errmin, errmax);
- minmaxradelemfilt(rp->first, min, max, errmin, errmax);
-
- /* if small difference between colors: no subdiv */
- /* also test for the filtered ones: but with higher critical level */
-
- contin= 0;
- a= abs( calculatecolor(min[0])-calculatecolor(max[0]));
- b= abs( calculatecolor(errmin[0])-calculatecolor(errmax[0]));
- if(a<15 || b<7) {
- c= abs( calculatecolor(min[1])-calculatecolor(max[1]));
- d= abs( calculatecolor(errmin[1])-calculatecolor(errmax[1]));
- if(c<15 || d<7) {
- e= abs( calculatecolor(min[2])-calculatecolor(max[2]));
- f= abs( calculatecolor(errmin[2])-calculatecolor(errmax[2]));
- if(e<15 || f<7) {
- contin= 1;
- clearsubflagelem(rp->first);
- /* printf("%d %d %d %d %d %d\n", a, b, c, d, e, f); */
- }
- }
- }
- if(contin) {
- drawpatch_ext(rp, 0xFFFF);
- }
- }
- }
- rp->f &= ~RAD_SUBDIV;
- rp= rp->next;
- }
-
- contin= 0;
-
- el= RG.elem;
- for(b=RG.totelem; b>0; b--, el++) {
- rn= *el;
- if(rn->f & RAD_SUBDIV) {
- rn->f-= RAD_SUBDIV;
- subdivideNode(rn, 0);
- if(rn->down1) {
- subdivideNode(rn->down1, 0);
- subdivideNode(rn->down2, 0);
- contin= 1;
- }
- }
- }
- makeGlobalElemArray();
-
- //XXX if(contin==0 || blender_test_break()) break;
- }
-
- make_node_display();
-}
-
-void subdivideshootPatches(int it)
-{
- RPatch *rp, *shoot, *next;
- float *fp, err, stoke, area;
- int a, contin;
- int maxlamp;
-
- if(RG.maxsublamp==0) maxlamp= RG.totlamp;
- else maxlamp= RG.maxsublamp;
-
- while(it) {
- rad_printstatus();
- rad_init_energy();
- it--;
-
- for(a=0; a<maxlamp; a++) {
- shoot= findshootpatch();
- if(shoot==0) break;
-
- //XXX set_timecursor(a);
- drawpatch_ext(shoot, 0x88FF00);
-
- setnodeflags(shoot->first, RAD_SHOOT, 1);
-
- if( makeformfactors(shoot) ) {
-
- fp= RG.formfactors;
- rp= RG.patchbase.first;
- while(rp) {
- if(*fp!=0.0 && rp!=shoot) {
-
- stoke= calcStokefactor(shoot, rp, rp->first, &area);
- if(stoke!= 0.0) {
- if(area>.1) { /* does patch receive more than (about)10% of energy? */
- rp->f= RAD_SUBDIV;
- }
- else {
-
- err= *fp/stoke;
-
- /* area error */
- area*=(0.5*RG.hemires*RG.hemires);
-
- if(area>45.0) {
- if(err<0.95 || err>1.05) {
- if(err>0.05) {
-
- rp->f= RAD_SUBDIV;
-
- }
- }
- }
- }
- }
- }
- fp++;
-
- rp= rp->next;
- }
-
- applyformfactors(shoot);
-
- if( (a & 3)==1 ) {
- make_node_display();
- rad_forcedraw();
- }
-
- setnodeflags(shoot->first, RAD_SHOOT, 0);
-
- //XXX if(blender_test_break()) break;
- }
- else a--;
-
- }
-
- contin= 0;
-
- rp= RG.patchbase.first;
- while(rp) {
- next= rp->next;
- if(rp->f & RAD_SUBDIV) {
- if(rp->emit[0]+rp->emit[1]+rp->emit[2]==0.0) {
- contin= 1;
- subdivideNode(rp->first, 0);
- if(rp->first->down1) {
- subdivideNode(rp->first->down1, 0);
- subdivideNode(rp->first->down2, 0);
- }
- }
- }
- rp= next;
- }
-
- converttopatches();
- makeGlobalElemArray();
-
- //XXX if(contin==0 || blender_test_break()) break;
- }
- make_node_display();
-}
-
-void inithemiwindows()
-{
- RadView *vw;
-
- /* the hemiwindows */
- vw= &(hemitop);
- memset(vw, 0, sizeof(RadView));
- vw->rectx= RG.hemires;
- vw->recty= RG.hemires;
- vw->rectz= MEM_mallocN(sizeof(int)*vw->rectx*vw->recty, "initwindows");
- vw->rect= MEM_mallocN(sizeof(int)*vw->rectx*vw->recty, "initwindows");
- vw->mynear= RG.maxsize/2000.0;
- vw->myfar= 2.0*RG.maxsize;
- vw->wx1= -vw->mynear;
- vw->wx2= vw->mynear;
- vw->wy1= -vw->mynear;
- vw->wy2= vw->mynear;
-
- i_window(vw->wx1, vw->wx2, vw->wy1, vw->wy2, vw->mynear, vw->myfar, vw->winmat);
-
- hemiside= hemitop;
-
- vw= &(hemiside);
- vw->recty/= 2;
- vw->wy1= vw->wy2;
- vw->wy2= 0.0;
-
- i_window(vw->wx1, vw->wx2, vw->wy1, vw->wy2, vw->mynear, vw->myfar, vw->winmat);
-
-}
-
-void closehemiwindows()
-{
-
- if(hemiside.rect) MEM_freeN(hemiside.rect);
- if(hemiside.rectz) MEM_freeN(hemiside.rectz);
- hemiside.rectz= 0;
- hemiside.rect= 0;
- hemitop.rectz= 0;
- hemitop.rect= 0;
-}
diff --git a/source/blender/radiosity/intern/source/radio.c b/source/blender/radiosity/intern/source/radio.c
deleted file mode 100644
index 63032b2d603..00000000000
--- a/source/blender/radiosity/intern/source/radio.c
+++ /dev/null
@@ -1,390 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- radio.c nov/dec 1992
- may 1999
-
- $Id$
-
- - mainloop
- - interactivity
-
-
- - PREPROCES
- - collect meshes
- - spitconnected (all faces with different color and normals)
- - setedgepointers (nodes pointing to neighbours)
-
- - EDITING
- - min-max patch en min-max element size
- - using this info patches subdividing
- - lamp subdivide
-
- - if there are too many lamps for subdivide shooting:
- - temporal join patches
-
- - SUBDIVIDE SHOOTING
- - except for last shooting, this defines patch subdivide
- - if subdivided patches still > 2*minsize : continue
- - at the end create as many elements as possible
- - als store if lamp (can still) cause subdivide.
-
- - REFINEMENT SHOOTING
- - test for overflows (shootpatch subdivide)
- - testen for extreme color transitions:
- - if possible: shootpatch subdivide
- - elements subdivide = start over ?
- - continue itterate until ?
-
- - DEFINITIVE SHOOTING
- - user indicates how many faces maximum and duration of itteration.
-
- - POST PROCESS
- - join element- nodes when nothing happens in it (filter nodes, filter faces)
- - define gamma & mul
-
- *************************************** */
-
-#include <math.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-#include "PIL_time.h"
-
-#include "BLI_blenlib.h"
-
-#include "DNA_object_types.h"
-#include "DNA_radio_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-
-#include "BKE_customdata.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-
-#include "radio.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/* locals? This one was already done in radio.h... */
-/* void rad_status_str(char *str); */
-
-RadGlobal RG= {0, 0};
-
-void freeAllRad(Scene *scene)
-{
- Base *base;
- extern int Ntotvert, Ntotnode, Ntotpatch;
-
- /* clear flag that disables drawing the meshes */
- if(scene) {
- base= (scene->base.first);
- while(base) {
- if(base->object->type==OB_MESH) {
- base->flag &= ~OB_RADIO;
- }
- base= base->next;
- }
- }
-
- free_fastAll(); /* verts, nodes, patches */
- RG.patchbase.first= RG.patchbase.last= 0;
- Ntotvert= Ntotnode= Ntotpatch= 0;
-
- closehemiwindows(); /* not real windows anymore... */
- if(RG.elem) MEM_freeN(RG.elem);
- RG.elem= 0;
- if(RG.verts) MEM_freeN(RG.verts);
- RG.verts= 0;
- if(RG.topfactors) MEM_freeN(RG.topfactors);
- RG.topfactors= 0;
- if(RG.sidefactors) MEM_freeN(RG.sidefactors);
- RG.sidefactors= 0;
- if(RG.formfactors) MEM_freeN(RG.formfactors);
- RG.formfactors= 0;
- if(RG.index) MEM_freeN(RG.index);
- RG.index= 0;
- if(RG.facebase) {
- init_face_tab(); /* frees all tables */
- MEM_freeN(RG.facebase);
- RG.facebase= 0;
- }
-
- if(RG.mfdata) {
- CustomData_free(RG.mfdata, RG.mfdatatot);
- MEM_freeN(RG.mfdata);
- MEM_freeN(RG.mfdatanodes);
- RG.mfdatanodes= NULL;
- RG.mfdata= NULL;
- RG.mfdatatot= 0;
- }
- RG.totelem= RG.totpatch= RG.totvert= RG.totface= RG.totlamp= RG.totmat= 0;
-}
-
-int rad_phase()
-{
- int flag= 0;
-
- if(RG.totpatch) flag |= RAD_PHASE_PATCHES;
- if(RG.totface) flag |= RAD_PHASE_FACES;
-
- return flag;
-}
-
-void rad_status_str(char *str)
-{
- extern int totfastmem;
- int tot;
- char *phase;
-
- tot= (RG.totface*sizeof(Face))/1024;
- tot+= totfastmem/1024;
-
- if(RG.phase==RAD_SHOOTE) phase= "Phase: ELEMENT SUBD, ";
- else if(RG.phase==RAD_SHOOTP) phase= "Phase: PATCH SUBD, ";
- else if(RG.phase==RAD_SOLVE) phase= "Phase: SOLVE, ";
- else if(RG.totpatch==0) phase= "Phase: COLLECT MESHES ";
- else if(RG.totface) phase= "Phase: FINISHED, ";
- else phase= "Phase: INIT, ";
-
- if(RG.totpatch==0) strcpy(str, phase);
- else sprintf(str, "%s TotPatch: %d TotElem: %d Emit: %d Faces %d Mem: %d k ", phase, RG.totpatch, RG.totelem, RG.totlamp, RG.totface, tot);
-
- if(RG.phase==RAD_SOLVE) strcat(str, "(press ESC to stop)");
-}
-
-void rad_printstatus()
-{
- /* actions always are started from a buttonswindow */
-// XX if(curarea) {
-// scrarea_do_windraw(curarea);
-// screen_swapbuffers();
-// }
-}
-
-void rad_setlimits(Scene *scene)
-{
- Radio *rad= scene->radio;
- float fac;
-
- fac= 0.0005*rad->pama;
- RG.patchmax= RG.maxsize*fac;
- RG.patchmax*= RG.patchmax;
- fac= 0.0005*rad->pami;
- RG.patchmin= RG.maxsize*fac;
- RG.patchmin*= RG.patchmin;
-
- fac= 0.0005*rad->elma;
- RG.elemmax= RG.maxsize*fac;
- RG.elemmax*= RG.elemmax;
- fac= 0.0005*rad->elmi;
- RG.elemmin= RG.maxsize*fac;
- RG.elemmin*= RG.elemmin;
-}
-
-void set_radglobal(Scene *scene)
-{
- /* always call before any action is performed */
- Radio *rad= scene->radio;
-
- if(RG.radio==0) {
- /* firsttime and to be sure */
- memset(&RG, 0, sizeof(RadGlobal));
- }
-
- if(rad==0) return;
-
- if(rad != RG.radio) {
- if(RG.radio) freeAllRad(scene);
- memset(&RG, 0, sizeof(RadGlobal));
- RG.radio= rad;
- }
-
- RG.hemires= rad->hemires & 0xFFF0;
- RG.drawtype= rad->drawtype;
- RG.flag= rad->flag;
- RG.subshootp= rad->subshootp;
- RG.subshoote= rad->subshoote;
- RG.nodelim= rad->nodelim;
- RG.maxsublamp= rad->maxsublamp;
- RG.maxnode= 2*rad->maxnode; /* in button:max elem, subdividing! */
- RG.convergence= rad->convergence/1000.0;
- RG.radfac= rad->radfac;
- RG.gamma= rad->gamma;
- RG.maxiter= rad->maxiter;
-
- RG.re= NULL; /* struct render, for when call it from render engine */
-
- rad_setlimits(scene);
-}
-
-/* called from buttons.c */
-void add_radio(Scene *scene)
-{
- Radio *rad;
-
- if(scene->radio) MEM_freeN(scene->radio);
- rad= scene->radio= MEM_callocN(sizeof(Radio), "radio");
-
- rad->hemires= 300;
- rad->convergence= 0.1;
- rad->radfac= 30.0;
- rad->gamma= 2.0;
- rad->drawtype= RAD_SOLID;
- rad->subshootp= 1;
- rad->subshoote= 2;
- rad->maxsublamp= 0;
-
- rad->pama= 500;
- rad->pami= 200;
- rad->elma= 100;
- rad->elmi= 20;
- rad->nodelim= 0;
- rad->maxnode= 10000;
- rad->maxiter= 120; // arbitrary
- rad->flag= 2;
- set_radglobal(scene);
-}
-
-void delete_radio(Scene *scene)
-{
- freeAllRad(scene);
- if(scene->radio) MEM_freeN(scene->radio);
- scene->radio= 0;
-
- RG.radio= 0;
-}
-
-int rad_go(Scene *scene) /* return 0 when user escapes */
-{
- double stime= PIL_check_seconds_timer();
- int retval;
-
- if(RG.totface) return 0;
-
- G.afbreek= 0;
-
- set_radglobal(scene);
- initradiosity(); /* LUT's */
- inithemiwindows(); /* views */
-
- maxsizePatches();
-
- setnodelimit(RG.patchmin);
- RG.phase= RAD_SHOOTP;
- subdivideshootPatches(RG.subshootp);
-
- setnodelimit(RG.elemmin);
- RG.phase= RAD_SHOOTE;
- subdivideshootElements(RG.subshoote);
-
- setnodelimit(RG.patchmin);
- subdividelamps();
-
- setnodelimit(RG.elemmin);
-
- RG.phase= RAD_SOLVE;
- subdiv_elements();
-
- progressiverad();
-
- removeEqualNodes(RG.nodelim);
-
- make_face_tab(); /* now anchored */
-
- closehemiwindows();
- RG.phase= 0;
-
- stime= PIL_check_seconds_timer()-stime;
- printf("Radiosity solving time: %dms\n", (int) (stime*1000));
-
- if(G.afbreek==1) retval= 1;
- else retval= 0;
-
- G.afbreek= 0;
-
- return retval;
-}
-
-void rad_subdivshootpatch(Scene *scene)
-{
-
- if(RG.totface) return;
-
- G.afbreek= 0;
-
- set_radglobal(scene);
- initradiosity(); /* LUT's */
- inithemiwindows(); /* views */
-
- subdivideshootPatches(1);
-
- removeEqualNodes(RG.nodelim);
- closehemiwindows();
-
-// XXX allqueue(REDRAWVIEW3D, 1);
-}
-
-void rad_subdivshootelem(Scene *scene)
-{
-
- if(RG.totface) return;
-
- G.afbreek= 0;
-
- set_radglobal(scene);
- initradiosity(); /* LUT's */
- inithemiwindows(); /* views */
-
- subdivideshootElements(1);
-
- removeEqualNodes(RG.nodelim);
- closehemiwindows();
-
-// XXX allqueue(REDRAWVIEW3D, 1);
-}
-
-void rad_limit_subdivide(Scene *scene)
-{
-
- if(scene->radio==0) return;
-
- set_radglobal(scene);
-
- if(RG.totpatch==0) {
- /* printf("exit: no relevant data\n"); */
- return;
- }
-
- maxsizePatches();
-
- init_face_tab(); /* free faces */
-}
diff --git a/source/blender/radiosity/intern/source/radnode.c b/source/blender/radiosity/intern/source/radnode.c
deleted file mode 100644
index fa23ca5da57..00000000000
--- a/source/blender/radiosity/intern/source/radnode.c
+++ /dev/null
@@ -1,1103 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- node.c nov/dec 1992
- may 1999
-
- $Id$
-
- *************************************** */
-
-#include <stdio.h>
-#include <math.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-
-#include "BKE_global.h"
-#include "BKE_main.h"
-
-#include "radio.h"
-
-#include "BLO_sys_types.h" // for intptr_t support
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/* locals */
-static void *malloc_fast(int size);
-static void *calloc_fast(int size);
-static void free_fast(void *poin, int siz);
-static void deleteTriNodes(RNode *node);
-/* lower because of local type define */
-/* void check_mallocgroup(MallocGroup *mg); */
-
-
-/* ********** fastmalloc ************** */
-
-#define MAL_GROUPSIZE 256
-#define MAL_AVAILABLE 1
-#define MAL_FULL 2
-
-
-
-
-ListBase MallocBase= {0, 0};
-int totfastmem= 0;
-
-typedef struct MallocGroup {
- struct MallocGroup *next, *prev;
- short size, flag;
- short curfree, tot;
- char flags[MAL_GROUPSIZE];
- char *data;
-} MallocGroup;
-
-/* one more local */
-void check_mallocgroup(MallocGroup *mg);
-
-void check_mallocgroup(MallocGroup *mg)
-{
- int a;
- char *cp;
-
- if(mg->tot==MAL_GROUPSIZE) {
- mg->flag= MAL_FULL;
- return;
- }
-
- cp= mg->flags;
-
- if(mg->curfree<MAL_GROUPSIZE-1) {
- if(cp[mg->curfree+1]==0) {
- mg->curfree++;
- return;
- }
- }
- if(mg->curfree>0) {
- if(cp[mg->curfree-1]==0) {
- mg->curfree--;
- return;
- }
- }
-
- for(a=0; a<MAL_GROUPSIZE; a++) {
- if(cp[a]==0) {
- mg->curfree= a;
- return;
- }
- }
- printf("fastmalloc: shouldnt be here\n");
-}
-
-static void *malloc_fast(int size)
-{
- MallocGroup *mg;
- void *retval;
-
- mg= MallocBase.last;
- while(mg) {
- if(mg->size==size) {
- if(mg->flag & MAL_AVAILABLE) {
- mg->flags[mg->curfree]= 1;
- mg->tot++;
- retval= mg->data+mg->curfree*mg->size;
- check_mallocgroup(mg);
- return retval;
- }
- }
- mg= mg->prev;
- }
-
- /* no free block found */
- mg= MEM_callocN(sizeof(MallocGroup), "mallocgroup");
- BLI_addtail(&MallocBase, mg);
- mg->data= MEM_mallocN(MAL_GROUPSIZE*size, "mallocgroupdata");
- mg->flag= MAL_AVAILABLE;
- mg->flags[0]= 1;
- mg->curfree= 1;
- mg->size= size;
- mg->tot= 1;
-
- totfastmem+= sizeof(MallocGroup)+MAL_GROUPSIZE*size;
-
- return mg->data;
-}
-
-static void *calloc_fast(int size)
-{
- void *poin;
-
- poin= malloc_fast(size);
- memset(poin, 0, size);
-
- return poin;
-}
-
-static void free_fast(void *poin, int size)
-{
- MallocGroup *mg;
- intptr_t val;
-
- mg= MallocBase.last;
- while(mg) {
- if(mg->size==size) {
- if( ((intptr_t)poin) >= ((intptr_t)mg->data) ) {
- if( ((intptr_t)poin) < ((intptr_t)(mg->data+MAL_GROUPSIZE*size)) ) {
- val= ((intptr_t)poin) - ((intptr_t)mg->data);
- val/= size;
- mg->curfree= val;
- mg->flags[val]= 0;
- mg->flag= MAL_AVAILABLE;
-
- mg->tot--;
- if(mg->tot==0) {
- BLI_remlink(&MallocBase, mg);
- MEM_freeN(mg->data);
- MEM_freeN(mg);
- totfastmem-= sizeof(MallocGroup)+MAL_GROUPSIZE*size;
- }
- return;
- }
- }
- }
- mg= mg->prev;
- }
- printf("fast free: pointer not in memlist %p size %d\n",
- poin, size);
-}
-
-/* security: only one function in a time can use it */
-static char *fastmallocstr= 0;
-
-void free_fastAll()
-{
- MallocGroup *mg;
-
- mg= MallocBase.first;
- while(mg) {
- BLI_remlink(&MallocBase, mg);
- MEM_freeN(mg->data);
- MEM_freeN(mg);
- mg= MallocBase.first;
- }
- totfastmem= 0;
- fastmallocstr= 0;
-}
-
-void start_fastmalloc(char *str)
-{
- if(fastmallocstr) {
-// XXX error("Fastmalloc in use: %s", fastmallocstr);
- return;
- }
- fastmallocstr= str;
-}
-
-/* **************************************** */
-
-float nodelimit;
-
-void setnodelimit(float limit)
-{
- nodelimit= limit;
-
-}
-
-/* ************ memory management *********** */
-
-int Ntotvert=0, Ntotnode=0, Ntotpatch=0;
-
-float *mallocVert()
-{
- Ntotvert++;
- return (float *)malloc_fast(16);
-}
-
-float *callocVert()
-{
- Ntotvert++;
- return (float *)calloc_fast(16);
-}
-
-void freeVert(float *vert)
-{
- free_fast(vert, 16);
- Ntotvert--;
-}
-
-int totalRadVert()
-{
- return Ntotvert;
-}
-
-RNode *mallocNode()
-{
- Ntotnode++;
- return (RNode *)malloc_fast(sizeof(RNode));
-}
-
-RNode *callocNode()
-{
- Ntotnode++;
- return (RNode *)calloc_fast(sizeof(RNode));
-}
-
-void freeNode(RNode *node)
-{
- free_fast(node, sizeof(RNode));
- Ntotnode--;
-}
-
-void freeNode_recurs(RNode *node)
-{
-
- if(node->down1) {
- freeNode_recurs(node->down1);
- freeNode_recurs(node->down2);
- }
-
- node->down1= node->down2= 0;
- freeNode(node);
-
-}
-
-RPatch *mallocPatch()
-{
- Ntotpatch++;
- return (RPatch *)malloc_fast(sizeof(RPatch));
-}
-
-RPatch *callocPatch()
-{
- Ntotpatch++;
- return (RPatch *)calloc_fast(sizeof(RPatch));
-}
-
-void freePatch(RPatch *patch)
-{
- free_fast(patch, sizeof(RPatch));
- Ntotpatch--;
-}
-
-/* ************ SUBDIVIDE *********** */
-
-
-void replaceAllNode(RNode *neighb, RNode *newn)
-{
- /* changes from all neighbours the edgepointers that point to newn->up in new */
- int ok= 0;
-
-
- if(neighb==0) return;
- if(newn->up==0) return;
-
- if(neighb->ed1==newn->up) {
- neighb->ed1= newn;
- ok= 1;
- }
- else if(neighb->ed2==newn->up) {
- neighb->ed2= newn;
- ok= 1;
- }
- else if(neighb->ed3==newn->up) {
- neighb->ed3= newn;
- ok= 1;
- }
- else if(neighb->ed4==newn->up) {
- neighb->ed4= newn;
- ok= 1;
- }
-
- if(ok && neighb->down1) {
- replaceAllNode(neighb->down1, newn);
- replaceAllNode(neighb->down2, newn);
- }
-}
-
-void replaceAllNodeInv(RNode *neighb, RNode *old)
-{
- /* changes from all neighbours the edgepointers that point to old in old->up */
- if(neighb==0) return;
- if(old->up==0) return;
-
- if(neighb->ed1==old) {
- neighb->ed1= old->up;
- }
- else if(neighb->ed2==old) {
- neighb->ed2= old->up;
- }
- else if(neighb->ed3==old) {
- neighb->ed3= old->up;
- }
- else if(neighb->ed4==old) {
- neighb->ed4= old->up;
- }
-
- if(neighb->down1) {
- replaceAllNodeInv(neighb->down1, old);
- replaceAllNodeInv(neighb->down2, old);
- }
-}
-
-void replaceAllNodeUp(RNode *neighb, RNode *old)
-{
- /* changes from all neighbours the edgepointers that point to old in old->up */
- if(neighb==0) return;
- if(old->up==0) return;
- neighb= neighb->up;
- if(neighb==0) return;
-
- if(neighb->ed1==old) {
- neighb->ed1= old->up;
- }
- else if(neighb->ed2==old) {
- neighb->ed2= old->up;
- }
- else if(neighb->ed3==old) {
- neighb->ed3= old->up;
- }
- else if(neighb->ed4==old) {
- neighb->ed4= old->up;
- }
-
- if(neighb->up) {
- replaceAllNodeUp(neighb, old);
- }
-}
-
-
-void replaceTestNode(RNode *neighb, RNode **edpp, RNode *newn, int level, float *vert)
-{
- /* IF neighb->ed points to newn->up
- * IF edgelevels equal
- IF testvert is in neighb->ed
- change pointers both ways
- ELSE
- RETURN
- ELSE
- IF neighb edgelevel is deeper
- change neighb pointer
-
- */
- int ok= 0;
-
- if(neighb==0) return;
- if(newn->up==0) return;
-
- if(neighb->ed1==newn->up) {
- if(neighb->lev1==level) {
- if(vert==neighb->v1 || vert==neighb->v2) {
- *edpp= neighb;
- neighb->ed1= newn;
- }
- else return;
- }
- else if(neighb->lev1>level) {
- neighb->ed1= newn;
- }
- ok= 1;
- }
- else if(neighb->ed2==newn->up) {
- if(neighb->lev2==level) {
- if(vert==neighb->v2 || vert==neighb->v3) {
- *edpp= neighb;
- neighb->ed2= newn;
- }
- else return;
- }
- else if(neighb->lev2>level) {
- neighb->ed2= newn;
- }
- ok= 1;
- }
- else if(neighb->ed3==newn->up) {
- if(neighb->lev3==level) {
- if(neighb->type==3) {
- if(vert==neighb->v3 || vert==neighb->v1) {
- *edpp= neighb;
- neighb->ed3= newn;
- }
- else return;
- }
- else {
- if(vert==neighb->v3 || vert==neighb->v4) {
- *edpp= neighb;
- neighb->ed3= newn;
- }
- else return;
- }
- }
- else if(neighb->lev3>level) {
- neighb->ed3= newn;
- }
- ok= 1;
- }
- else if(neighb->ed4==newn->up) {
- if(neighb->lev4==level) {
- if(vert==neighb->v4 || vert==neighb->v1) {
- *edpp= neighb;
- neighb->ed4= newn;
- }
- else return;
- }
- else if(neighb->lev4>level) {
- neighb->ed4= newn;
- }
- ok= 1;
- }
-
- if(ok && neighb->down1) {
- replaceTestNode(neighb->down1, edpp, newn, level, vert);
- replaceTestNode(neighb->down2, edpp, newn, level, vert);
- }
-
-}
-
-int setvertexpointersNode(RNode *neighb, RNode *node, int level, float **v1, float **v2)
-{
- /* compares edgelevels , if equal it sets the vertexpointers */
-
- if(neighb==0) return 0;
-
- if(neighb->ed1==node) {
- if(neighb->lev1==level) {
- *v1= neighb->v1;
- *v2= neighb->v2;
- return 1;
- }
- }
- else if(neighb->ed2==node) {
- if(neighb->lev2==level) {
- *v1= neighb->v2;
- *v2= neighb->v3;
- return 1;
- }
- }
- else if(neighb->ed3==node) {
- if(neighb->lev3==level) {
- if(neighb->type==3) {
- *v1= neighb->v3;
- *v2= neighb->v1;
- }
- else {
- *v1= neighb->v3;
- *v2= neighb->v4;
- }
- return 1;
- }
- }
- else if(neighb->ed4==node) {
- if(neighb->lev4==level) {
- *v1= neighb->v4;
- *v2= neighb->v1;
- return 1;
- }
- }
- return 0;
-}
-
-float edlen(float *v1, float *v2)
-{
- return (v1[0]-v2[0])*(v1[0]-v2[0])+ (v1[1]-v2[1])*(v1[1]-v2[1])+ (v1[2]-v2[2])*(v1[2]-v2[2]);
-}
-
-
-void subdivideTriNode(RNode *node, RNode *edge)
-{
- RNode *n1, *n2, *up;
- float fu, fv, fl, *v1, *v2; /* , AreaT3Dfl(); ... from arithb... */
- int uvl;
-
- if(node->down1 || node->down2) {
- /* printf("trinode: subd already done\n"); */
- return;
- }
-
- /* defines subdivide direction */
-
- if(edge==0) {
- /* areathreshold */
- if(node->area<nodelimit) return;
-
- fu= edlen(node->v1, node->v2);
- fv= edlen(node->v2, node->v3);
- fl= edlen(node->v3, node->v1);
-
- if(fu>fv && fu>fl) uvl= 1;
- else if(fv>fu && fv>fl) uvl= 2;
- else uvl= 3;
- }
- else {
-
- if(edge==node->ed1) uvl= 1;
- else if(edge==node->ed2) uvl= 2;
- else uvl= 3;
- }
-
- /* should neighbour nodes be deeper? Recursive! */
- n1= 0;
- if(uvl==1) {
- if(node->ed1 && node->ed1->down1==0) n1= node->ed1;
- }
- else if(uvl==2) {
- if(node->ed2 && node->ed2->down1==0) n1= node->ed2;
- }
- else {
- if(node->ed3 && node->ed3->down1==0) n1= node->ed3;
- }
- if(n1) {
- up= node->up;
- while(up) { /* also test for ed4 !!! */
- if(n1->ed1==up || n1->ed2==up || n1->ed3==up || n1->ed4==up) {
- subdivideNode(n1, up);
- break;
- }
- up= up->up;
- }
- }
-
- /* the subdividing */
- n1= mallocNode();
- memcpy(n1, node, sizeof(RNode));
- n2= mallocNode();
- memcpy(n2, node, sizeof(RNode));
-
- n1->up= node;
- n2->up= node;
-
- node->down1= n1;
- node->down2= n2;
-
- /* subdivide edge 1 */
- if(uvl==1) {
-
- /* FIRST NODE gets edge 2 */
- n1->ed3= n2;
- n1->lev3= 0;
- replaceAllNode(n1->ed2, n1);
- n1->lev1++;
- replaceTestNode(n1->ed1, &(n1->ed1), n1, n1->lev1, n1->v2);
-
- /* SECOND NODE gets edge 3 */
- n2->ed2= n1;
- n2->lev2= 0;
- replaceAllNode(n2->ed3, n2);
- n2->lev1++;
- replaceTestNode(n2->ed1, &(n2->ed1), n2, n2->lev1, n2->v1);
-
- /* NEW VERTEX from edge 1 */
- if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v2) {
- n1->v1= v2;
- n2->v2= v2;
- }
- else {
- n1->v1= v1;
- n2->v2= v1;
- }
- }
- else {
- n1->v1= n2->v2= mallocVert();
- n1->v1[0]= 0.5*(node->v1[0]+ node->v2[0]);
- n1->v1[1]= 0.5*(node->v1[1]+ node->v2[1]);
- n1->v1[2]= 0.5*(node->v1[2]+ node->v2[2]);
- n1->v1[3]= node->v1[3]; /* color */
- }
- }
- else if(uvl==2) {
-
- /* FIRST NODE gets edge 1 */
- n1->ed3= n2;
- n1->lev3= 0;
- replaceAllNode(n1->ed1, n1);
- n1->lev2++;
- replaceTestNode(n1->ed2, &(n1->ed2), n1, n1->lev2, n1->v2);
-
- /* SECOND NODE gets edge 3 */
- n2->ed1= n1;
- n2->lev1= 0;
- replaceAllNode(n2->ed3, n2);
- n2->lev2++;
- replaceTestNode(n2->ed2, &(n2->ed2), n2, n2->lev2, n2->v3);
-
- /* NEW VERTEX from edge 2 */
- if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v2) {
- n1->v3= v2;
- n2->v2= v2;
- }
- else {
- n1->v3= v1;
- n2->v2= v1;
- }
- }
- else {
- n1->v3= n2->v2= mallocVert();
- n1->v3[0]= 0.5*(node->v2[0]+ node->v3[0]);
- n1->v3[1]= 0.5*(node->v2[1]+ node->v3[1]);
- n1->v3[2]= 0.5*(node->v2[2]+ node->v3[2]);
- n1->v3[3]= node->v1[3]; /* color */
- }
- }
- else if(uvl==3) {
-
- /* FIRST NODE gets edge 1 */
- n1->ed2= n2;
- n1->lev2= 0;
- replaceAllNode(n1->ed1, n1);
- n1->lev3++;
- replaceTestNode(n1->ed3, &(n1->ed3), n1, n1->lev3, n1->v1);
-
- /* SECOND NODE gets edge 2 */
- n2->ed1= n1;
- n2->lev1= 0;
- replaceAllNode(n2->ed2, n2);
- n2->lev3++;
- replaceTestNode(n2->ed3, &(n2->ed3), n2, n2->lev3, n2->v3);
-
- /* NEW VERTEX from edge 3 */
- if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v1) {
- n1->v3= v2;
- n2->v1= v2;
- }
- else {
- n1->v3= v1;
- n2->v1= v1;
- }
- }
- else {
- n1->v3= n2->v1= mallocVert();
- n1->v3[0]= 0.5*(node->v1[0]+ node->v3[0]);
- n1->v3[1]= 0.5*(node->v1[1]+ node->v3[1]);
- n1->v3[2]= 0.5*(node->v1[2]+ node->v3[2]);
- n1->v3[3]= node->v3[3]; /* color */
- }
- }
- n1->area= AreaT3Dfl(n1->v1, n1->v2, n1->v3);
- n2->area= AreaT3Dfl(n2->v1, n2->v2, n2->v3);
-
-}
-
-
-void subdivideNode(RNode *node, RNode *edge)
-{
- RNode *n1, *n2, *up;
- float fu, fv, *v1, *v2;/*, AreaQ3Dfl(); ... from arithb... */
- int uvl;
-
- if(Ntotnode>RG.maxnode) return;
-
- if(node->type==3) {
- subdivideTriNode(node, edge);
- return;
- }
-
- if(node->down1 || node->down2) {
- /* printf("subdivide Node: already done \n"); */
- return;
- }
-
- /* defines subdivide direction */
-
- if(edge==0) {
- /* areathreshold */
- if(node->area<nodelimit) {
- return;
- }
- fu= fabs(node->v1[0]- node->v2[0])+ fabs(node->v1[1]- node->v2[1]) +fabs(node->v1[2]- node->v2[2]);
- fv= fabs(node->v1[0]- node->v4[0])+ fabs(node->v1[1]- node->v4[1]) +fabs(node->v1[2]- node->v4[2]);
- if(fu>fv) uvl= 1;
- else uvl= 2;
- }
- else {
- if(edge==node->ed1 || edge==node->ed3) uvl= 1;
- else uvl= 2;
- }
-
- /* do neighbour nodes have to be deeper? Recursive! */
- n1= n2= 0;
- if(uvl==1) {
- if(node->ed1 && node->ed1->down1==0) n1= node->ed1;
- if(node->ed3 && node->ed3->down1==0) n2= node->ed3;
- }
- else {
- if(node->ed2 && node->ed2->down1==0) n1= node->ed2;
- if(node->ed4 && node->ed4->down1==0) n2= node->ed4;
- }
- if(n1) {
- up= node->up;
- while(up) {
- if(n1->ed1==up || n1->ed2==up || n1->ed3==up || n1->ed4==up) {
- /* printf("recurs subd\n"); */
- subdivideNode(n1, up);
- break;
- }
- up= up->up;
- }
- }
- if(n2) {
- up= node->up;
- while(up) {
- if(n2->ed1==up || n2->ed2==up || n2->ed3==up || n2->ed4==up) {
- /* printf("recurs subd\n"); */
- subdivideNode(n2, up);
- break;
- }
- up= up->up;
- }
- }
-
- /* the subdividing */
- n1= mallocNode();
- memcpy(n1, node, sizeof(RNode));
- n2= mallocNode();
- memcpy(n2, node, sizeof(RNode));
-
- n1->up= node;
- n2->up= node;
-
- node->down1= n1;
- node->down2= n2;
-
- /* subdivide edge 1 and 3 */
- if(uvl==1) {
-
- /* FIRST NODE gets edge 2 */
- n1->ed4= n2;
- n1->lev4= 0;
- replaceAllNode(n1->ed2, n1);
- n1->lev1++;
- n1->lev3++;
- replaceTestNode(n1->ed1, &(n1->ed1), n1, n1->lev1, n1->v2);
- replaceTestNode(n1->ed3, &(n1->ed3), n1, n1->lev3, n1->v3);
-
- /* SECOND NODE gets edge 4 */
- n2->ed2= n1;
- n2->lev2= 0;
- replaceAllNode(n2->ed4, n2);
- n2->lev1++;
- n2->lev3++;
- replaceTestNode(n2->ed1, &(n2->ed1), n2, n2->lev1, n2->v1);
- replaceTestNode(n2->ed3, &(n2->ed3), n2, n2->lev3, n2->v4);
-
- /* NEW VERTEX from edge 1 */
- if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v2) {
- n1->v1= v2;
- n2->v2= v2;
- }
- else {
- n1->v1= v1;
- n2->v2= v1;
- }
- }
- else {
- n1->v1= n2->v2= mallocVert();
- n1->v1[0]= 0.5*(node->v1[0]+ node->v2[0]);
- n1->v1[1]= 0.5*(node->v1[1]+ node->v2[1]);
- n1->v1[2]= 0.5*(node->v1[2]+ node->v2[2]);
- n1->v1[3]= node->v1[3]; /* color */
- }
-
- /* NEW VERTEX from edge 3 */
- if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v3) {
- n1->v4= v2;
- n2->v3= v2;
- }
- else {
- n1->v4= v1;
- n2->v3= v1;
- }
- }
- else {
- n1->v4= n2->v3= mallocVert();
- n1->v4[0]= 0.5*(node->v3[0]+ node->v4[0]);
- n1->v4[1]= 0.5*(node->v3[1]+ node->v4[1]);
- n1->v4[2]= 0.5*(node->v3[2]+ node->v4[2]);
- n1->v4[3]= node->v4[3]; /* color */
- }
- }
- /* subdivide edge 2 and 4 */
- else if(uvl==2) {
-
- /* FIRST NODE gets edge 1 */
- n1->ed3= n2;
- n1->lev3= 0;
- replaceAllNode(n1->ed1, n1);
- n1->lev2++;
- n1->lev4++;
- replaceTestNode(n1->ed2, &(n1->ed2), n1, n1->lev2, n1->v2);
- replaceTestNode(n1->ed4, &(n1->ed4), n1, n1->lev4, n1->v1);
-
- /* SECOND NODE gets edge 3 */
- n2->ed1= n1;
- n2->lev1= 0;
- replaceAllNode(n2->ed3, n2);
- n2->lev2++;
- n2->lev4++;
- replaceTestNode(n2->ed2, &(n2->ed2), n2, n2->lev2, n2->v3);
- replaceTestNode(n2->ed4, &(n2->ed4), n2, n2->lev4, n2->v4);
-
- /* NEW VERTEX from edge 2 */
- if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v2) {
- n1->v3= v2;
- n2->v2= v2;
- }
- else {
- n1->v3= v1;
- n2->v2= v1;
- }
- }
- else {
- n1->v3= n2->v2= mallocVert();
- n1->v3[0]= 0.5*(node->v2[0]+ node->v3[0]);
- n1->v3[1]= 0.5*(node->v2[1]+ node->v3[1]);
- n1->v3[2]= 0.5*(node->v2[2]+ node->v3[2]);
- n1->v3[3]= node->v3[3]; /* color */
- }
-
- /* NEW VERTEX from edge 4 */
- if( setvertexpointersNode(n1->ed4, n1, n1->lev4, &v1, &v2) ) { /* nodes have equal levels */
- if(v1== n1->v1) {
- n1->v4= v2;
- n2->v1= v2;
- }
- else {
- n1->v4= v1;
- n2->v1= v1;
- }
- }
- else {
- n1->v4= n2->v1= mallocVert();
- n1->v4[0]= 0.5*(node->v1[0]+ node->v4[0]);
- n1->v4[1]= 0.5*(node->v1[1]+ node->v4[1]);
- n1->v4[2]= 0.5*(node->v1[2]+ node->v4[2]);
- n1->v4[3]= node->v4[3]; /* color */
- }
- }
-
- n1->area= AreaQ3Dfl(n1->v1, n1->v2, n1->v3, n1->v4);
- n2->area= AreaQ3Dfl(n2->v1, n2->v2, n2->v3, n2->v4);
-
-}
-
-int comparelevel(RNode *node, RNode *nb, int level)
-{
- /* recursive descent: test with deepest node */
- /* return 1 means equal or higher */
-
- if(nb==0) return 1;
-
- if(nb->down1) {
- return 0;
-
- /* THERE IS AN ERROR HERE, BUT WHAT? (without this function the system
- works too, but is slower) (ton) */
-
- /*
- n1= nb->down1;
- if(n1->ed1==node) return comparelevel(node, n1, level);
- if(n1->ed2==node) return comparelevel(node, n1, level);
- if(n1->ed3==node) return comparelevel(node, n1, level);
- if(n1->ed4==node) return comparelevel(node, n1, level);
- n1= nb->down2;
- if(n1->ed1==node) return comparelevel(node, n1, level);
- if(n1->ed2==node) return comparelevel(node, n1, level);
- if(n1->ed3==node) return comparelevel(node, n1, level);
- if(n1->ed4==node) return comparelevel(node, n1, level);
- printf(" dit kan niet ");
- return 0;
- */
-
- }
-
- if(nb->down1==0) {
- /* if(nb->ed1==node) return (nb->lev1<=level); */
- /* if(nb->ed2==node) return (nb->lev2<=level); */
- /* if(nb->ed3==node) return (nb->lev3<=level); */
- /* if(nb->ed4==node) return (nb->lev4<=level); */
-
- return 1; /* is higher node */
- }
- return 1;
-}
-
-static void deleteTriNodes(RNode *node) /* both children of node */
-{
- RNode *n1, *n2;
-
- /* if neighbour nodes are deeper: no delete */
- /* just test 2 nodes, from the others the level doesn't change */
-
- n1= node->down1;
- n2= node->down2;
-
- if(n1==0 || n2==0) return;
-
- if(n1->down1 || n2->down1) return;
-
- /* at the edges no subdivided node is allowed */
-
- if(n1->ed1 && n1->ed1->down1) return;
- if(n1->ed2 && n1->ed2->down1) return;
- if(n1->ed3 && n1->ed3->down1) return;
-
- if(n2->ed1 && n2->ed1->down1) return;
- if(n2->ed2 && n2->ed2->down1) return;
- if(n2->ed3 && n2->ed3->down1) return;
-
- replaceAllNodeInv(n1->ed1, n1);
- replaceAllNodeInv(n1->ed2, n1);
- replaceAllNodeInv(n1->ed3, n1);
-
- replaceAllNodeUp(n1->ed1, n1);
- replaceAllNodeUp(n1->ed2, n1);
- replaceAllNodeUp(n1->ed3, n1);
-
- replaceAllNodeInv(n2->ed1, n2);
- replaceAllNodeInv(n2->ed2, n2);
- replaceAllNodeInv(n2->ed3, n2);
-
- replaceAllNodeUp(n2->ed1, n2);
- replaceAllNodeUp(n2->ed2, n2);
- replaceAllNodeUp(n2->ed3, n2);
-
- n1->down1= (RNode *)12; /* for debug */
- n2->down1= (RNode *)12;
-
- freeNode(n1);
- freeNode(n2);
- node->down1= node->down2= 0;
-
-}
-
- /* both children of node */
-void deleteNodes(RNode *node)
-{
- RNode *n1, *n2;
-
- /* if neighbour nodes are deeper: no delete */
- /* just test 2 nodes, from the others the level doesn't change */
-
- if(node->type==3) {
- deleteTriNodes(node);
- return;
- }
-
- n1= node->down1;
- n2= node->down2;
-
- if(n1==0 || n2==0) return;
-
- if(n1->down1 || n2->down1) return;
-
- if(n1->ed3==n2) {
-
- /* at the edges no subdivided node is allowed */
-
- if(n1->ed1 && n1->ed1->down1) return;
- if(n1->ed2 && n1->ed2->down1) return;
- if(n1->ed4 && n1->ed4->down1) return;
-
- if(n2->ed2 && n2->ed2->down1) return;
- if(n2->ed3 && n2->ed3->down1) return;
- if(n2->ed4 && n2->ed4->down1) return;
-
- replaceAllNodeInv(n1->ed1, n1);
- replaceAllNodeInv(n1->ed2, n1);
- replaceAllNodeInv(n1->ed4, n1);
-
- replaceAllNodeUp(n1->ed1, n1);
- replaceAllNodeUp(n1->ed2, n1);
- replaceAllNodeUp(n1->ed4, n1);
-
- replaceAllNodeInv(n2->ed2, n2);
- replaceAllNodeInv(n2->ed3, n2);
- replaceAllNodeInv(n2->ed4, n2);
-
- replaceAllNodeUp(n2->ed2, n2);
- replaceAllNodeUp(n2->ed3, n2);
- replaceAllNodeUp(n2->ed4, n2);
-
- n1->down1= (RNode *)12; /* for debug */
- n2->down1= (RNode *)12;
-
- freeNode(n1);
- freeNode(n2);
- node->down1= node->down2= 0;
-
- return;
- }
- else if(n1->ed4==n2) {
-
- if(n1->ed1 && n1->ed1->down1) return;
- if(n1->ed2 && n1->ed2->down1) return;
- if(n1->ed3 && n1->ed3->down1) return;
-
- if(n2->ed1 && n2->ed1->down1) return;
- if(n2->ed3 && n2->ed3->down1) return;
- if(n2->ed4 && n2->ed4->down1) return;
-
- replaceAllNodeInv(n1->ed1, n1);
- replaceAllNodeInv(n1->ed2, n1);
- replaceAllNodeInv(n1->ed3, n1);
-
- replaceAllNodeUp(n1->ed1, n1);
- replaceAllNodeUp(n1->ed2, n1);
- replaceAllNodeUp(n1->ed3, n1);
-
- replaceAllNodeInv(n2->ed1, n2);
- replaceAllNodeInv(n2->ed3, n2);
- replaceAllNodeInv(n2->ed4, n2);
-
- replaceAllNodeUp(n2->ed1, n2);
- replaceAllNodeUp(n2->ed3, n2);
- replaceAllNodeUp(n2->ed4, n2);
-
- n1->down1= (RNode *)12; /* for debug */
- n2->down1= (RNode *)12;
-
- freeNode(n1);
- freeNode(n2);
- node->down1= node->down2= 0;
-
- return;
- }
-
-}
-
-
diff --git a/source/blender/radiosity/intern/source/radpostprocess.c b/source/blender/radiosity/intern/source/radpostprocess.c
deleted file mode 100644
index 6912c737a51..00000000000
--- a/source/blender/radiosity/intern/source/radpostprocess.c
+++ /dev/null
@@ -1,824 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- radpostprocess.c nov/dec 1992
- may 1999
-
- - faces
- - filtering and node-limit
- - apply to meshes
- $Id$
-
- *************************************** */
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_ghash.h"
-
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_object_types.h"
-#include "DNA_radio_types.h"
-#include "DNA_scene_types.h"
-
-#include "BKE_customdata.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_mesh.h"
-#include "BKE_object.h"
-#include "BKE_utildefines.h"
-
-#include "radio.h"
-
-/* locals? not. done in radio.h... */
-/* void rad_addmesh(void); */
-/* void rad_replacemesh(void); */
-
-void addaccu(register char *z, register char *t)
-{
- register int div, mul;
-
- mul= *t;
- div= mul+1;
- (*t)++;
-
- t[1]= (mul*t[1]+z[1])/div;
- t[2]= (mul*t[2]+z[2])/div;
- t[3]= (mul*t[3]+z[3])/div;
-
-}
-
-void addaccuweight(register char *z, register char *t, int w)
-{
- register int div, mul;
-
- if(w==0) w= 1;
-
- mul= *t;
- div= mul+w;
- if(div>255) return;
- (*t)= div;
-
- t[1]= (mul*t[1]+w*z[1])/div;
- t[2]= (mul*t[2]+w*z[2])/div;
- t[3]= (mul*t[3]+w*z[3])/div;
-
-}
-
-void triaweight(Face *face, int *w1, int *w2, int *w3)
-{
- float n1[3], n2[3], n3[3], temp;
-
- n1[0]= face->v2[0]-face->v1[0];
- n1[1]= face->v2[1]-face->v1[1];
- n1[2]= face->v2[2]-face->v1[2];
- n2[0]= face->v3[0]-face->v2[0];
- n2[1]= face->v3[1]-face->v2[1];
- n2[2]= face->v3[2]-face->v2[2];
- n3[0]= face->v1[0]-face->v3[0];
- n3[1]= face->v1[1]-face->v3[1];
- n3[2]= face->v1[2]-face->v3[2];
- Normalize(n1);
- Normalize(n2);
- Normalize(n3);
- temp= 32.0/(PI);
- *w1= 0.5+temp*acos(-n1[0]*n3[0]-n1[1]*n3[1]-n1[2]*n3[2]);
- *w2= 0.5+temp*acos(-n1[0]*n2[0]-n1[1]*n2[1]-n1[2]*n2[2]);
- *w3= 0.5+temp*acos(-n2[0]*n3[0]-n2[1]*n3[1]-n2[2]*n3[2]);
-
-}
-
-
-
-void init_face_tab()
-{
- int a= 0;
-
- if(RG.facebase==0) {
- RG.facebase= MEM_callocN(sizeof(void *)*RAD_MAXFACETAB, "init_face_tab");
- }
- for(a=0; a<RAD_MAXFACETAB; a++) {
- if(RG.facebase[a]==0) break;
- MEM_freeN(RG.facebase[a]);
- RG.facebase[a]= 0;
- }
- RG.totface= 0;
-}
-
-Face *addface()
-{
- Face *face;
- int a;
-
- if(RG.totface<0 || RG.totface>RAD_MAXFACETAB*1024 ) {
- printf("error in addface: %d\n", RG.totface);
- return 0;
- }
- a= RG.totface>>10;
- face= RG.facebase[a];
- if(face==0) {
- face= MEM_callocN(1024*sizeof(Face),"addface");
- RG.facebase[a]= face;
- }
- face+= (RG.totface & 1023);
-
- RG.totface++;
-
- return face;
-
-}
-
-Face * makeface(float *v1, float *v2, float *v3, float *v4, RNode *rn)
-{
- Face *face;
-
- face= addface();
- face->v1= v1;
- face->v2= v2;
- face->v3= v3;
- face->v4= v4;
- face->col= rn->col;
- face->matindex= rn->par->matindex;
- face->orig= rn->orig;
-
- return face;
-}
-
-void anchorQuadface(RNode *rn, float *v1, float *v2, float *v3, float *v4, int flag)
-{
- Face *face;
-
- switch(flag) {
- case 1:
- face = makeface(rn->v1, v1, rn->v4, NULL, rn);
- face = makeface(v1, rn->v3, rn->v4, NULL, rn);
- face = makeface(v1, rn->v2, rn->v3, NULL, rn);
- break;
- case 2:
- face = makeface(rn->v2, v2, rn->v1, NULL, rn);
- face = makeface(v2, rn->v4, rn->v1, NULL, rn);
- face = makeface(v2, rn->v3, rn->v4, NULL, rn);
- break;
- case 4:
- face = makeface(rn->v3, v3, rn->v2, NULL, rn);
- face = makeface(v3, rn->v1, rn->v2, NULL, rn);
- face = makeface(v3, rn->v4, rn->v1, NULL, rn);
- break;
- case 8:
- face = makeface(rn->v4, v4, rn->v3, NULL, rn);
- face = makeface(v4, rn->v2, rn->v3, NULL, rn);
- face = makeface(v4, rn->v1, rn->v2, NULL, rn);
- break;
- case 3:
- face = makeface(rn->v1, v1, rn->v4, NULL, rn);
- face = makeface(v1, v2, rn->v4, NULL, rn);
- face = makeface(v1, rn->v2, v2, NULL, rn);
- face = makeface(v2, rn->v3, rn->v4, NULL, rn);
- break;
- case 6:
- face = makeface(rn->v2, v2, rn->v1, NULL, rn);
- face = makeface(v2, v3, rn->v1, NULL, rn);
- face = makeface(v2, rn->v3, v3, NULL, rn);
- face = makeface(v3, rn->v4, rn->v1, NULL, rn);
- break;
- case 12:
- face = makeface(rn->v3, v3, rn->v2, NULL, rn);
- face = makeface(v3, v4, rn->v2, NULL, rn);
- face = makeface(v3, rn->v4, v4, NULL, rn);
- face = makeface(v4, rn->v1, rn->v2, NULL, rn);
- break;
- case 9:
- face = makeface(rn->v4, v4, rn->v3, NULL, rn);
- face = makeface(v4, v1, rn->v3, NULL, rn);
- face = makeface(v4, rn->v1, v1, NULL, rn);
- face = makeface(v1, rn->v2, rn->v3, NULL, rn);
- break;
- case 5:
- face = makeface(rn->v1, v1, v3, rn->v4, rn);
- face = makeface(v1, rn->v2, rn->v3, v3, rn);
- break;
- case 10:
- face = makeface(rn->v1, rn->v2, v2, v4, rn);
- face = makeface(v4, v2, rn->v3, rn->v4, rn);
- break;
- case 7:
- face = makeface(rn->v1, v1, v3, rn->v4, rn);
- face = makeface(v1, v2, v3, NULL, rn);
- face = makeface(v1, rn->v2, v2, NULL, rn);
- face = makeface(v2, rn->v3, v3, NULL, rn);
- break;
- case 14:
- face = makeface(rn->v2, v2, v4, rn->v1, rn);
- face = makeface(v2, v3, v4, NULL, rn);
- face = makeface(v2, rn->v3, v3, NULL, rn);
- face = makeface(v3, rn->v4, v4, NULL, rn);
- break;
- case 13:
- face = makeface(rn->v3, v3, v1, rn->v2, rn);
- face = makeface(v3, v4, v1, NULL, rn);
- face = makeface(v3, rn->v4, v4, NULL, rn);
- face = makeface(v4, rn->v1, v1, NULL, rn);
- break;
- case 11:
- face = makeface(rn->v4, v4, v2, rn->v3, rn);
- face = makeface(v4, v1, v2, NULL, rn);
- face = makeface(v4, rn->v1, v1, NULL, rn);
- face = makeface(v1, rn->v2, v2, NULL, rn);
- break;
- case 15:
- face = makeface(v1, v2, v3, v4, rn);
- face = makeface(v1, rn->v2, v2, NULL, rn);
- face = makeface(v2, rn->v3, v3, NULL, rn);
- face = makeface(v3, rn->v4, v4, NULL, rn);
- face = makeface(v4, rn->v1, v1, NULL, rn);
- break;
- }
-}
-
-void anchorTriface(RNode *rn, float *v1, float *v2, float *v3, int flag)
-{
- Face *face;
-
- switch(flag) {
- case 1:
- face = makeface(rn->v1, v1, rn->v3, NULL, rn);
- face = makeface(v1, rn->v2, rn->v3, NULL, rn);
- break;
- case 2:
- face = makeface(rn->v2, v2, rn->v1, NULL, rn);
- face = makeface(v2, rn->v3, rn->v1, NULL, rn);
- break;
- case 4:
- face = makeface(rn->v3, v3, rn->v2, NULL, rn);
- face = makeface(v3, rn->v1, rn->v2, NULL, rn);
- break;
- case 3:
- face = makeface(rn->v1, v2, rn->v3, NULL, rn);
- face = makeface(rn->v1, v1, v2, NULL, rn);
- face = makeface(v1, rn->v2, v2, NULL, rn);
- break;
- case 6:
- face = makeface(rn->v2, v3, rn->v1, NULL, rn);
- face = makeface(rn->v2, v2, v3, NULL, rn);
- face = makeface(v2, rn->v3, v3, NULL, rn);
- break;
- case 5:
- face = makeface(rn->v3, v1, rn->v2, NULL, rn);
- face = makeface(rn->v3, v3, v1, NULL, rn);
- face = makeface(v3, rn->v1, v1, NULL, rn);
- break;
-
- case 7:
- face = makeface(v1, v2, v3, NULL, rn);
- face = makeface(rn->v1, v1, v3, NULL, rn);
- face = makeface(rn->v2, v2, v1, NULL, rn);
- face = makeface(rn->v3, v3, v2, NULL, rn);
- break;
- }
-}
-
-
-float *findmiddlevertex(RNode *node, RNode *nb, float *v1, float *v2)
-{
- int test= 0;
-
- if(nb==0) return 0;
-
- if(nb->ed1==node) {
- if(nb->v1==v1 || nb->v1==v2) test++;
- if(nb->v2==v1 || nb->v2==v2) test+=2;
- if(test==1) return nb->v2;
- else if(test==2) return nb->v1;
- }
- else if(nb->ed2==node) {
- if(nb->v2==v1 || nb->v2==v2) test++;
- if(nb->v3==v1 || nb->v3==v2) test+=2;
- if(test==1) return nb->v3;
- else if(test==2) return nb->v2;
- }
- else if(nb->ed3==node) {
- if(nb->type==4) {
- if(nb->v3==v1 || nb->v3==v2) test++;
- if(nb->v4==v1 || nb->v4==v2) test+=2;
- if(test==1) return nb->v4;
- else if(test==2) return nb->v3;
- }
- else {
- if(nb->v3==v1 || nb->v3==v2) test++;
- if(nb->v1==v1 || nb->v1==v2) test+=2;
- if(test==1) return nb->v1;
- else if(test==2) return nb->v3;
- }
- }
- else if(nb->ed4==node) {
- if(nb->v4==v1 || nb->v4==v2) test++;
- if(nb->v1==v1 || nb->v1==v2) test+=2;
- if(test==1) return nb->v1;
- else if(test==2) return nb->v4;
- }
- return 0;
-}
-
-void make_face_tab() /* takes care of anchoring */
-{
- RNode *rn, **el;
- Face *face = NULL;
- float *v1, *v2, *v3, *v4;
- int a, flag, w1, w2, w3;
- char *charcol;
-
- if(RG.totelem==0) return;
-
- init_face_tab();
-
- RG.igamma= 1.0/RG.gamma;
- RG.radfactor= RG.radfac*pow(64*64, RG.igamma);
-
- /* convert face colors */
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- charcol= (char *)&( rn->col );
-
- charcol[3]= calculatecolor(rn->totrad[0]);
- charcol[2]= calculatecolor(rn->totrad[1]);
- charcol[1]= calculatecolor(rn->totrad[2]);
- }
-
- /* check nodes and make faces */
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
-
- rn= *el;
-
- rn->v1[3]= 0.0;
- rn->v2[3]= 0.0;
- rn->v3[3]= 0.0;
- if(rn->v4) rn->v4[3]= 0.0;
-
- /* test edges for subdivide */
- flag= 0;
- v1= v2= v3= v4= 0;
- if(rn->ed1) {
- v1= findmiddlevertex(rn, rn->ed1->down1, rn->v1, rn->v2);
- if(v1) flag |= 1;
- }
- if(rn->ed2) {
- v2= findmiddlevertex(rn, rn->ed2->down1, rn->v2, rn->v3);
- if(v2) flag |= 2;
- }
- if(rn->ed3) {
- if(rn->type==4)
- v3= findmiddlevertex(rn, rn->ed3->down1, rn->v3, rn->v4);
- else
- v3= findmiddlevertex(rn, rn->ed3->down1, rn->v3, rn->v1);
- if(v3) flag |= 4;
- }
- if(rn->ed4) {
- v4= findmiddlevertex(rn, rn->ed4->down1, rn->v4, rn->v1);
- if(v4) flag |= 8;
- }
-
- /* using flag and vertexpointers now Faces can be made */
-
- if(flag==0) {
- makeface(rn->v1, rn->v2, rn->v3, rn->v4, rn);
- }
- else if(rn->type==4) anchorQuadface(rn, v1, v2, v3, v4, flag);
- else anchorTriface(rn, v1, v2, v3, flag);
- }
-
- /* add */
- for(a=0; a<RG.totface; a++) {
-
- RAD_NEXTFACE(a);
-
- if(face->v4) {
- addaccuweight( (char *)&(face->col), (char *)(face->v1+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v2+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v3+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v4+3), 16 );
- }
- else {
- triaweight(face, &w1, &w2, &w3);
- addaccuweight( (char *)&(face->col), (char *)(face->v1+3), w1 );
- addaccuweight( (char *)&(face->col), (char *)(face->v2+3), w2 );
- addaccuweight( (char *)&(face->col), (char *)(face->v3+3), w3 );
- }
- }
-
-}
-
-void filterFaces()
-{
- /* put vertex colors in faces, and put them back */
-
- Face *face = NULL;
- int a, w1, w2, w3;
-
- if(RG.totface==0) return;
-
- /* clear */
- for(a=0; a<RG.totface; a++) {
- RAD_NEXTFACE(a);
- face->col= 0;
- }
-
- /* add: vertices with faces */
- for(a=0; a<RG.totface; a++) {
- RAD_NEXTFACE(a);
-
- if(face->v4) {
- addaccuweight( (char *)(face->v1+3), (char *)&(face->col), 16 );
- addaccuweight( (char *)(face->v2+3), (char *)&(face->col), 16 );
- addaccuweight( (char *)(face->v3+3), (char *)&(face->col), 16 );
- addaccuweight( (char *)(face->v4+3), (char *)&(face->col), 16 );
- }
- else {
- triaweight(face, &w1, &w2, &w3);
- addaccuweight( (char *)(face->v1+3), (char *)&(face->col), w1 );
- addaccuweight( (char *)(face->v2+3), (char *)&(face->col), w2 );
- addaccuweight( (char *)(face->v3+3), (char *)&(face->col), w3 );
- }
- }
-
- /* clear */
- for(a=0; a<RG.totface; a++) {
- RAD_NEXTFACE(a);
- face->v1[3]= 0.0;
- face->v2[3]= 0.0;
- face->v3[3]= 0.0;
- if(face->v4) face->v4[3]= 0.0;
- }
-
-
- /* add: faces with vertices */
- for(a=0; a<RG.totface; a++) {
-
- RAD_NEXTFACE(a);
-
- if(face->v4) {
- addaccuweight( (char *)&(face->col), (char *)(face->v1+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v2+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v3+3), 16 );
- addaccuweight( (char *)&(face->col), (char *)(face->v4+3), 16 );
- }
- else {
- triaweight(face, &w1, &w2, &w3);
- addaccuweight( (char *)&(face->col), (char *)(face->v1+3), w1 );
- addaccuweight( (char *)&(face->col), (char *)(face->v2+3), w2 );
- addaccuweight( (char *)&(face->col), (char *)(face->v3+3), w3 );
- }
- }
-}
-
-void calcfiltrad(RNode *rn, float *cd)
-{
- float area;
-
- cd[0]= 2.0*rn->totrad[0];
- cd[1]= 2.0*rn->totrad[1];
- cd[2]= 2.0*rn->totrad[2];
- area= 2.0;
-
- if(rn->ed1) {
- cd[0]+= rn->ed1->totrad[0];
- cd[1]+= rn->ed1->totrad[1];
- cd[2]+= rn->ed1->totrad[2];
- area+= 1.0;
- }
- if(rn->ed2) {
- cd[0]+= rn->ed2->totrad[0];
- cd[1]+= rn->ed2->totrad[1];
- cd[2]+= rn->ed2->totrad[2];
- area+= 1.0;
- }
- if(rn->ed3) {
- cd[0]+= rn->ed3->totrad[0];
- cd[1]+= rn->ed3->totrad[1];
- cd[2]+= rn->ed3->totrad[2];
- area+= 1.0;
- }
- if(rn->ed4) {
- cd[0]+= rn->ed4->totrad[0];
- cd[1]+= rn->ed4->totrad[1];
- cd[2]+= rn->ed4->totrad[2];
- area+= 1.0;
- }
- cd[0]/= area;
- cd[1]/= area;
- cd[2]/= area;
-
-}
-
-void filterNodes()
-{
- /* colors from nodes in tempblock and back */
-
- RNode *rn, **el;
- float *coldata, *cd;
- int a;
-
- if(RG.totelem==0) return;
- /* the up-nodes need a color */
- el= RG.elem;
- for(a=0; a<RG.totelem; a++, el++) {
- rn= *el;
- if(rn->up) {
- rn->up->totrad[0]= 0.0;
- rn->up->totrad[1]= 0.0;
- rn->up->totrad[2]= 0.0;
- if(rn->up->up) {
- rn->up->up->totrad[0]= 0.0;
- rn->up->up->totrad[1]= 0.0;
- rn->up->up->totrad[2]= 0.0;
- }
- }
- }
- el= RG.elem;
- for(a=0; a<RG.totelem; a++, el++) {
- rn= *el;
- if(rn->up) {
- rn->up->totrad[0]+= 0.5*rn->totrad[0];
- rn->up->totrad[1]+= 0.5*rn->totrad[1];
- rn->up->totrad[2]+= 0.5*rn->totrad[2];
- if(rn->up->up) {
- rn->up->up->totrad[0]+= 0.25*rn->totrad[0];
- rn->up->up->totrad[1]+= 0.25*rn->totrad[1];
- rn->up->up->totrad[2]+= 0.25*rn->totrad[2];
- }
- }
- }
-
- /* add using area */
- cd= coldata= MEM_mallocN(3*4*RG.totelem, "filterNodes");
- el= RG.elem;
- for(a=0; a<RG.totelem; a++, el++) {
- calcfiltrad(*el, cd);
- cd+= 3;
- }
-
- cd= coldata;
- el= RG.elem;
- for(a=0; a<RG.totelem; a++, el++) {
- rn= *el;
- VECCOPY(rn->totrad, cd);
- cd+= 3;
- }
- MEM_freeN(coldata);
-}
-
-void removeEqualNodes(short limit)
-{
- /* nodes with equal colors: remove */
- RNode **el, *rn, *rn1;
- float thresh, f1, f2;
- int a, foundone=1, ok;
- int c1, c2;
-
- if(limit==0) return;
-
- thresh= 1.0/(256.0*RG.radfactor);
- thresh= 3.0*pow(thresh, RG.gamma);
-
-// XXX waitcursor(1);
-
- while(foundone) {
- foundone= 0;
-
- el= RG.elem;
- for(a=RG.totelem; a>1; a--, el++) {
- rn= *el;
- rn1= *(el+1);
-
- if(rn!=rn->par->first && rn1!=rn1->par->first) {
- if(rn->up && rn->up==rn1->up) {
- f1= rn->totrad[0]+ rn->totrad[1]+ rn->totrad[2];
- f2= rn1->totrad[0]+ rn1->totrad[1]+ rn1->totrad[2];
-
- ok= 0;
- if(f1<thresh && f2<thresh) ok= 1;
- else {
- c1= calculatecolor(rn->totrad[0]);
- c2= calculatecolor(rn1->totrad[0]);
-
- if( abs(c1-c2)<=limit ) {
- c1= calculatecolor(rn->totrad[1]);
- c2= calculatecolor(rn1->totrad[1]);
-
- if( abs(c1-c2)<=limit ) {
- c1= calculatecolor(rn->totrad[2]);
- c2= calculatecolor(rn1->totrad[2]);
-
- if( abs(c1-c2)<=limit ) {
- ok= 1;
- }
- }
- }
- }
-
- if(ok) {
- rn->up->totrad[0]= 0.5f*(rn->totrad[0]+rn1->totrad[0]);
- rn->up->totrad[1]= 0.5f*(rn->totrad[1]+rn1->totrad[1]);
- rn->up->totrad[2]= 0.5f*(rn->totrad[2]+rn1->totrad[2]);
- rn1= rn->up;
- deleteNodes(rn1);
- if(rn1->down1) ;
- else {
- foundone++;
- a--; el++;
- }
- }
- }
- }
- }
- if(foundone) {
- makeGlobalElemArray();
- }
- }
-// XXX waitcursor(0);
-}
-
-unsigned int rad_find_or_add_mvert(Mesh *me, MFace *mf, RNode *orignode, float *w, float *radco, GHash *hash)
-{
- MVert *mvert = BLI_ghash_lookup(hash, radco);
-
- if(!mvert) {
- mvert = &me->mvert[me->totvert];
- VECCOPY(mvert->co, radco);
- me->totvert++;
-
- BLI_ghash_insert(hash, radco, mvert);
- }
-
- InterpWeightsQ3Dfl(orignode->v1, orignode->v2, orignode->v3,
- orignode->v4, mvert->co, w);
-
- return (unsigned int)(mvert - me->mvert);
-}
-
-void rad_addmesh(Scene *scene)
-{
- Face *face = NULL;
- Object *ob;
- Mesh *me;
- MVert *mvert;
- MFace *mf;
- RNode *node;
- Material *ma=0;
- GHash *verthash;
- unsigned int *mcol;
- float cent[3], min[3], max[3], w[4][4];
- int a;
-
- if(RG.totface==0)
- return;
-
-// if(RG.totmat==MAXMAT)
-// XXX notice("warning: cannot assign more than 16 materials to 1 mesh");
-
- /* create the mesh */
- ob= add_object(scene, OB_MESH);
-
- me= ob->data;
- me->totvert= totalRadVert();
- me->totface= RG.totface;
- me->flag= 0;
-
- CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, me->totvert);
- CustomData_add_layer(&me->fdata, CD_MFACE, CD_CALLOC, NULL, me->totface);
- CustomData_add_layer(&me->fdata, CD_MCOL, CD_CALLOC, NULL, me->totface);
-
- CustomData_merge(RG.mfdata, &me->fdata, CD_MASK_MESH, CD_CALLOC, me->totface);
- mesh_update_customdata_pointers(me);
-
- /* create materials and set vertex color flag */
- for(a=0; a<RG.totmat; a++) {
- assign_material(ob, RG.matar[a], a+1);
- ma= RG.matar[a];
- if(ma) ma->mode |= MA_VERTEXCOL;
- }
-
- /* create vertices and faces in one go, adding vertices to the end of the
- mvert array if they were not added already */
- me->totvert= 0;
- verthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
-
- mcol= (unsigned int*)me->mcol;
- mf= me->mface;
-
- for(a=0; a<me->totface; a++, mf++, mcol+=4) {
- RAD_NEXTFACE(a);
-
- /* the original node that this node is a subnode of */
- node= RG.mfdatanodes[face->orig];
-
- /* set mverts from the radio data, and compute interpolation weights */
- mf->v1= rad_find_or_add_mvert(me, mf, node, w[0], face->v1, verthash);
- mf->v2= rad_find_or_add_mvert(me, mf, node, w[1], face->v2, verthash);
- mf->v3= rad_find_or_add_mvert(me, mf, node, w[2], face->v3, verthash);
- if(face->v4)
- mf->v4= rad_find_or_add_mvert(me, mf, node, w[3], face->v4, verthash);
-
- /* copy face and interpolate data */
- mf->mat_nr= face->matindex;
-
- CustomData_copy_data(RG.mfdata, &me->fdata, face->orig, a, 1);
- CustomData_interp(RG.mfdata, &me->fdata, &face->orig, NULL, (float*)w, 1, a);
-
- /* load face vertex colors, with alpha added */
- mcol[0]= *((unsigned int*)face->v1+3) | 0x1000000;
- mcol[1]= *((unsigned int*)face->v2+3) | 0x1000000;
- mcol[2]= *((unsigned int*)face->v3+3) | 0x1000000;
- if(face->v4)
- mcol[3]= *((unsigned int*)face->v4+3) | 0x1000000;
-
- /* reorder face indices if needed to make face->v4 == 0 */
- test_index_face(mf, &me->fdata, a, face->v4? 4: 3);
- }
-
- BLI_ghash_free(verthash, NULL, NULL);
-
- /* boundbox and center new */
- 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);
- }
-
- VECCOPY(ob->loc, cent);
-
- /* create edges */
- make_edges(me, 0);
-}
-
-void rad_replacemesh(Scene *scene)
-{
- RPatch *rp;
-
-// XXX deselectall();
-
- rp= RG.patchbase.first;
- while(rp) {
- if( exist_object(rp->from)) {
- if (rp->from->type == OB_MESH) {
- rp->from->flag |= SELECT;
- }
- }
- rp= rp->next;
- }
-
- copy_objectflags(scene);
-// XXX delete_obj(1);
-
- rad_addmesh(scene);
-}
-
diff --git a/source/blender/radiosity/intern/source/radpreprocess.c b/source/blender/radiosity/intern/source/radpreprocess.c
deleted file mode 100644
index 2b3ce1a856b..00000000000
--- a/source/blender/radiosity/intern/source/radpreprocess.c
+++ /dev/null
@@ -1,828 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
-
-
-
- preproces.c nov/dec 1992
- may 1999
-
- - collect from meshes
- - countglobaldata()
- - makeGlobalElemArray()
-
- $Id$
-
- *************************************** */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_view3d_types.h"
-
-#include "BKE_customdata.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_mesh.h"
-#include "BKE_object.h" /* during_script() */
-#include "BKE_utildefines.h"
-
-#include "radio.h"
-
-#include "BLO_sys_types.h" // for intptr_t support
-
-void setparelem(RNode *rn, RPatch *par);
-
-void splitconnected()
-{
- /* Since input meshes can have faces with sharing vertices, the geometry is being tested here.
- * Using normals and colors, faces are split separately. we do this by storing for each
- * vertex a normal and a color
- */
- RPatch *rp;
- RNode *rn;
- VeNoCo *vnc, *next, *vnc1;
- int a;
-
- /* test if we need a split */
-
- rp= RG.patchbase.first;
- while(rp) {
- rn= rp->first;
- if((rp->f1 & RAD_NO_SPLIT)==0) {
- for(a=0; a<rp->type; a++) {
-
- if(a==0) vnc= (VeNoCo *)rn->v1;
- else if(a==1) vnc= (VeNoCo *)rn->v2;
- else if(a==2) vnc= (VeNoCo *)rn->v3;
- else vnc= (VeNoCo *)rn->v4;
-
- if(vnc->flag==0) {
- vnc->n= (float *)rp->norm;
- vnc->col= (float *)rp->ref;
- vnc->flag= 1;
- }
- else { /* is face from this vertex allowed for gouraud? */
- vnc1= vnc;
- while(vnc1) {
- if(VecCompare(vnc1->n, rp->norm, 0.01f)) {
- if(VecCompare(vnc1->col, rp->ref, 0.01f)) {
- break;
- }
- }
- vnc= vnc1;
- vnc1= vnc1->next;
- }
- if(vnc1==0) {
- vnc1= MEM_mallocN(sizeof(VeNoCo), "splitconn");
- vnc1->next= 0;
- vnc1->v= mallocVert();
- vnc->next= vnc1;
- VECCOPY(vnc1->v, vnc->v);
- vnc1->n= (float *)rp->norm;
- vnc1->col= (float *)rp->ref;
- }
- if(a==0) rn->v1= (float *)vnc1;
- else if(a==1) rn->v2= (float *)vnc1;
- else if(a==2) rn->v3= (float *)vnc1;
- else rn->v4= (float *)vnc1;
- }
- }
- }
- rp= rp->next;
- }
- /* adapt vertexpointers from nodes */
-
- rp= RG.patchbase.first;
- while(rp) {
- rn= rp->first;
- rn->v1= ((VeNoCo *)(rn->v1))->v;
- rn->v2= ((VeNoCo *)(rn->v2))->v;
- rn->v3= ((VeNoCo *)(rn->v3))->v;
- if(rp->type==4) rn->v4= ((VeNoCo *)(rn->v4))->v;
-
- rp= rp->next;
- }
-
-
- /* free all */
- vnc= RG.verts;
- for(a=0; a<RG.totvert; a++) {
- vnc1= vnc->next;
- while(vnc1) {
- next= vnc1->next;
- MEM_freeN(vnc1);
- vnc1= next;
- }
- vnc++;
- }
- MEM_freeN(RG.verts);
- RG.verts= 0;
-}
-
-int vergedge(const void *v1,const void *v2)
-{
- int *e1, *e2;
-
- e1= (int *)v1;
- e2= (int *)v2;
-
- if( e1[0] > e2[0] ) return 1;
- else if( e1[0] < e2[0] ) return -1;
- else if( e1[1] > e2[1] ) return 1;
- else if( e1[1] < e2[1] ) return -1;
-
- return 0;
-}
-
-
-void addedge(float *v1, float *v2, EdSort *es)
-{
- if( ((intptr_t)v1)<((intptr_t)v2) ) {
- es->v1= v1;
- es->v2= v2;
- }
- else {
- es->v2= v1;
- es->v1= v2;
- }
-}
-
-static void setedge(RNode *node, RNode *nb, int nr, int nrb)
-{
- switch(nr) {
- case 1:
- node->ed1= nb;
- break;
- case 2:
- node->ed2= nb;
- break;
- case 3:
- node->ed3= nb;
- break;
- case 4:
- node->ed4= nb;
- break;
- }
- switch(nrb) {
- case 1:
- nb->ed1= node;
- break;
- case 2:
- nb->ed2= node;
- break;
- case 3:
- nb->ed3= node;
- break;
- case 4:
- nb->ed4= node;
- break;
- }
-}
-
-void setedgepointers()
-{
- /* make edge-array and sort it */
- /* pairs of edges are put together: fill in pointers in nodes */
- EdSort *es, *esblock;
- RPatch *rp;
- RNode *rn;
- int tot= 0;
-
- rp= RG.patchbase.first;
- while(rp) {
- tot+= rp->type;
- rp= rp->next;
- }
-
- if(tot==0) return;
-
- es=esblock= MEM_mallocN(tot*sizeof(EdSort), "setedgepointers");
- rp= RG.patchbase.first;
- while(rp) {
- rn= rp->first;
- addedge(rn->v1, rn->v2, es);
- es->nr= 1;
- es->node= rn;
- es++;
- addedge(rn->v2, rn->v3, es);
- es->nr= 2;
- es->node= rn;
- es++;
- if(rp->type==3) {
- addedge(rn->v3, rn->v1, es);
- es->nr= 3;
- es->node= rn;
- es++;
- }
- else {
- addedge(rn->v3, rn->v4, es);
- es->nr= 3;
- es->node= rn;
- es++;
- addedge(rn->v4, rn->v1, es);
- es->nr= 4;
- es->node= rn;
- es++;
- }
- rp= rp->next;
- }
-
- qsort(esblock,tot,sizeof(EdSort),vergedge);
-
- es= esblock;
- while(tot>0) {
- if( es->v1== (es+1)->v1 ) {
- if( es->v2== (es+1)->v2 ) {
- setedge(es->node, (es+1)->node, es->nr, (es+1)->nr);
- tot--;
- es++;
- }
- }
- es++;
- tot--;
- }
-
- MEM_freeN(esblock);
-}
-
-static int materialIndex(Material *ma)
-{
- int i = 0;
- for(i=0;i< RG.totmat; i++)
- {
- if (RG.matar[i] == ma) {
- return i;
- }
- }
- return -1;
-}
-
-void rad_collect_meshes(Scene *scene, View3D *v3d)
-{
- extern Material defmaterial;
- Base *base;
- Object *ob;
- Mesh *me;
- MVert *mvert;
- MFace *mface;
- MTFace *tf, *tface;
- Material *ma = NULL, *noma= NULL;
- RPatch *rp;
- RNode *rn;
- VeNoCo *vnc, **nodevert;
- float *vd, *v1, *v2, *v3, *v4 = NULL;
- int a, b, offs, index, mfdatatot;
-
- if (v3d==NULL) {
- printf("Error, trying to collect radiosity meshes with no 3d view\n");
- return;
- }
-
- set_radglobal(scene);
-
- freeAllRad(scene);
-
- start_fastmalloc("Radiosity");
-
- /* count the number of verts */
- RG.totvert= 0;
- RG.totface= 0;
- base= (scene->base.first);
- while(base) {
- if(((base)->flag & SELECT) && ((base)->lay & v3d->lay) ) {
- if(base->object->type==OB_MESH) {
- base->flag |= OB_RADIO;
- me= base->object->data;
- RG.totvert+= me->totvert;
- }
- }
- base= base->next;
- }
- if(RG.totvert==0) {
- if (!during_script()); //XXX error("No vertices");
- return;
- }
- vnc= RG.verts= MEM_callocN(RG.totvert*sizeof(VeNoCo), "radioverts");
-
- RG.min[0]= RG.min[1]= RG.min[2]= 1.0e20f;
- RG.max[0]= RG.max[1]= RG.max[2]= -1.0e20f;
-
- mfdatatot= 0;
-
- /* min-max and material array */
- base= (scene->base.first);
- while(base) {
- if( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) ) {
- if(base->object->type==OB_MESH) {
- me= base->object->data;
- mvert= me->mvert;
- for(a=0; a<me->totvert; a++, mvert++) {
- vd= mallocVert();
- VECCOPY(vd, mvert->co);
- /* Should make MTC its own module... */
- Mat4MulVecfl(base->object->obmat, vd);
-
- vnc->v= vd;
- for(b=0; b<3; b++) {
- RG.min[b]= MIN2(RG.min[b], vd[b]);
- RG.max[b]= MAX2(RG.max[b], vd[b]);
- }
- vnc++;
- }
-
- if(base->object->totcol==0) {
- if(RG.totmat<MAXMAT) {
- if(noma==NULL) {
- noma= add_material("RadioMat");
- RG.matar[RG.totmat]= noma;
- RG.totmat++;
- }
- }
- }
- else {
- for(a=0; a<base->object->totcol; a++) {
- if(RG.totmat >= MAXMAT) break;
-
- ma = give_current_material(base->object, a+1);
-
- if (materialIndex(ma)!=-1) break;
-
- RG.matar[RG.totmat]= ma;
- RG.totmat++;
- }
- }
-
- mfdatatot += me->totface;
- }
- }
- base= base->next;
- }
-
- RG.cent[0]= (RG.min[0]+ RG.max[0])/2;
- RG.cent[1]= (RG.min[1]+ RG.max[1])/2;
- RG.cent[2]= (RG.min[2]+ RG.max[2])/2;
- RG.size[0]= (RG.max[0]- RG.min[0]);
- RG.size[1]= (RG.max[1]- RG.min[1]);
- RG.size[2]= (RG.max[2]- RG.min[2]);
- RG.maxsize= MAX3(RG.size[0],RG.size[1],RG.size[2]);
-
- RG.mfdata= MEM_callocN(sizeof(CustomData), "radiomfdata");
- RG.mfdatanodes= MEM_mallocN(sizeof(RNode*)*mfdatatot, "radiomfdatanodes");
- RG.mfdatatot= mfdatatot;
-
- /* make patches */
-
- RG.totelem= 0;
- RG.totpatch= 0;
- RG.totlamp= 0;
- offs= 0;
-
- base= (scene->base.first);
- while(base) {
- if( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) ) {
- if(base->object->type==OB_MESH) {
- ob= base->object;
- me= ob->data;
- mface= me->mface;
- tface= me->mtface;
-
- index= -1;
-
- CustomData_merge(&me->fdata, RG.mfdata, CD_MASK_DERIVEDMESH,
- CD_DEFAULT, mfdatatot);
-
- for(a=0; a<me->totface; a++, mface++) {
- tf= tface? tface+a: NULL;
-
- if (tf && (tf->mode & TF_INVISIBLE))
- continue;
-
- rp= callocPatch();
- BLI_addtail(&(RG.patchbase), rp);
- rp->from= ob;
-
- if(mface->v4) rp->type= 4;
- else rp->type= 3;
-
- rp->first= rn= callocNode();
-
- if(mface->flag & ME_SMOOTH) rp->f1= RAD_NO_SPLIT;
-
- /* temporal: we store the venoco in the node */
- rn->v1= (float *)(RG.verts+mface->v1+offs);
- v1= (RG.verts+mface->v1+offs)->v;
- rn->v2= (float *)(RG.verts+mface->v2+offs);
- v2= (RG.verts+mface->v2+offs)->v;
- rn->v3= (float *)(RG.verts+mface->v3+offs);
- v3= (RG.verts+mface->v3+offs)->v;
-
- if(mface->v4) {
- rn->v4= (float *)(RG.verts+mface->v4+offs);
- v4= (RG.verts+mface->v4+offs)->v;
- }
- rn->par= rp;
- rn->f= RAD_PATCH; /* this node is a Patch */
- rn->type= rp->type;
-
- if(rn->type==4) {
- rp->area= AreaQ3Dfl(v1, v2, v3, v4);
- CalcNormFloat4(v1, v2, v3, v4, rp->norm);
- }
- else {
- rp->area= AreaT3Dfl(v1, v2, v3);
- CalcNormFloat(v1, v2, v3, rp->norm);
- }
-
- rn->area= rp->area;
-
- /* color and emit */
- if(mface->mat_nr != index) {
- index= mface->mat_nr;
- ma= give_current_material(ob, index+1);
- if(ma==0) ma= &defmaterial;
- }
- rp->ref[0]= ma->r;
- rp->ref[1]= ma->g;
- rp->ref[2]= ma->b;
-
- if(ma->emit) RG.totlamp++;
-
- rp->emit[0]= rp->emit[1]= rp->emit[2]= ma->emit;
- rp->emit[0]*= rp->ref[0];
- rp->emit[1]*= rp->ref[1];
- rp->emit[2]*= rp->ref[2];
-
-// uncommented, this is not satisfying, but i leave it in code for now (ton)
-// if(ma->translucency!=0.0) rn->f |= RAD_TWOSIDED;
-
- nodevert= (VeNoCo **)&(rn->v1);
- for(b=0; b<rp->type; b++) {
- rp->cent[0]+= (*nodevert)->v[0];
- rp->cent[1]+= (*nodevert)->v[1];
- rp->cent[2]+= (*nodevert)->v[2];
- nodevert++;
- }
- rp->cent[0]/= (float)rp->type;
- rp->cent[1]/= (float)rp->type;
- rp->cent[2]/= (float)rp->type;
-
- /* for reconstruction materials */
- rp->matindex= materialIndex(ma);
- if(rp->matindex==-1) rp->matindex= 1;
-
- /* these RNode's are stored now for later use in rad_addmesh
- they should not get deleted before that */
- rn->orig= RG.totelem;
- RG.mfdatanodes[RG.totelem]= rn;
-
- CustomData_copy_data(&me->fdata, RG.mfdata, a, RG.totelem, 1);
-
- RG.totelem++;
- RG.totpatch++;
- }
-
- offs+= me->totvert;
- }
- }
- base= base->next;
- }
-
- splitconnected();
- setedgepointers();
-
- makeGlobalElemArray();
- pseudoAmb();
- rad_setlimits(scene);
-}
-
-void setparelem(RNode *rn, RPatch *par)
-{
-
- if(rn->down1) {
- setparelem(rn->down1, par);
- setparelem(rn->down2, par);
- }
- else {
- rn->par= par;
- }
-}
-
-void countelem(RNode *rn)
-{
-
- if(rn->down1) {
- countelem(rn->down1);
- countelem(rn->down2);
- }
- else RG.totelem++;
-}
-
-void countglobaldata()
-{
- /* counts elements and patches*/
- RPatch *rp;
-
- RG.totelem= RG.totpatch= 0;
-
- rp= RG.patchbase.first;
- while(rp) {
- RG.totpatch++;
- countelem(rp->first);
- rp= rp->next;
- }
-}
-
-void addelem(RNode ***el, RNode *rn, RPatch *rp)
-{
- if(rn->down1) {
- addelem(el, rn->down1, rp);
- addelem(el, rn->down2, rp);
- }
- else {
- rn->par= rp;
- **el= rn;
- (*el)++;
- }
-}
-
-void makeGlobalElemArray()
-{
- /* always called when # of elements change */
- RPatch *rp;
- RNode **el;
-
- countglobaldata();
-
- if(RG.elem) MEM_freeN(RG.elem);
- if(RG.totelem) {
- el= RG.elem= MEM_mallocN(sizeof(void *)*RG.totelem, "makeGlobalElemArray");
- }
- else {
- RG.elem= 0;
- return;
- }
-
- /* recursive adding elements */
- rp= RG.patchbase.first;
- while(rp) {
- addelem(&el, rp->first, rp);
- rp= rp->next;
- }
-
- /* formfactor array */
- if(RG.formfactors) MEM_freeN(RG.formfactors);
- if(RG.totelem)
- RG.formfactors= MEM_mallocN(sizeof(float)*RG.totelem, "formfactors");
- else
- RG.formfactors= 0;
-}
-
-void splitpatch(RPatch *old) /* in case of overflow during shoot */
-{
- RNode *rn;
- float **fpp;
- RPatch *rp;
- int a;
-
- rn= old->first;
- if(rn->down1==0) return;
- rn= rn->down1;
-
- old->unshot[0]/=2.0;
- old->unshot[1]/=2.0;
- old->unshot[2]/=2.0;
- setnodeflags(old->first, 2, 0);
-
- rp= mallocPatch();
- *rp= *old;
- BLI_addhead(&RG.patchbase, rp);
- rp->first= rn;
- rp->area= rn->area;
- rp->cent[0]= rp->cent[1]= rp->cent[2]= 0.0;
- fpp= &(rn->v1);
- for(a=0; a<rp->type; a++) {
- rp->cent[0]+= (*fpp)[0];
- rp->cent[1]+= (*fpp)[1];
- rp->cent[2]+= (*fpp)[2];
- fpp++;
- }
- rp->cent[0]/=(float)rp->type;
- rp->cent[1]/=(float)rp->type;
- rp->cent[2]/=(float)rp->type;
-
- setparelem(rn, rp);
-
- rn= old->first->down2;
-
- rp= mallocPatch();
- *rp= *old;
- BLI_addhead(&RG.patchbase, rp);
- rp->first= rn;
- rp->area= rn->area;
- rp->cent[0]= rp->cent[1]= rp->cent[2]= 0.0;
- fpp= &(rn->v1);
- for(a=0; a<rp->type; a++) {
- rp->cent[0]+= (*fpp)[0];
- rp->cent[1]+= (*fpp)[1];
- rp->cent[2]+= (*fpp)[2];
- fpp++;
- }
- rp->cent[0]/=(float)rp->type;
- rp->cent[1]/=(float)rp->type;
- rp->cent[2]/=(float)rp->type;
-
- setparelem(rn, rp);
-
- BLI_remlink(&RG.patchbase, old);
- freePatch(old);
-}
-
-
-void addpatch(RPatch *old, RNode *rn)
-{
- float **fpp;
- RPatch *rp;
- int a;
-
- if(rn->down1) {
- addpatch(old, rn->down1);
- addpatch(old, rn->down2);
- }
- else {
- rp= mallocPatch();
- *rp= *old;
- BLI_addhead(&RG.patchbase, rp);
- rp->first= rn;
-
- rp->area= rn->area;
- rp->cent[0]= rp->cent[1]= rp->cent[2]= 0.0;
- fpp= &(rn->v1);
- for(a=0; a<rp->type; a++) {
- rp->cent[0]+= (*fpp)[0];
- rp->cent[1]+= (*fpp)[1];
- rp->cent[2]+= (*fpp)[2];
- fpp++;
- }
- rp->cent[0]/=(float)rp->type;
- rp->cent[1]/=(float)rp->type;
- rp->cent[2]/=(float)rp->type;
-
- rn->par= rp;
- }
-}
-
-void converttopatches()
-{
- /* chacks patches list, if node subdivided: new patch */
- RPatch *rp, *next;
-
- rp= RG.patchbase.first;
- while(rp) {
- next= rp->next;
- if(rp->first->down1) {
- addpatch(rp, rp->first);
- BLI_remlink(&RG.patchbase, rp);
- freePatch(rp);
- }
- rp= next;
- }
-
-}
-
-void subdiv_elements()
-{
- RNode **el, *rn;
- int a, toobig= 1;
-
- rad_init_energy();
-
- /* first maxsize elements */
-
- while(toobig) {
- toobig= 0;
-
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- if( rn->totrad[0]==0.0 && rn->totrad[1]==0.0 && rn->totrad[2]==0.0) {
- if(rn->area>RG.elemmin) {
- subdivideNode(rn, 0);
- if(rn->down1 ) {
- toobig= 1;
- if(rn->down1->area>RG.elemmin)
- subdivideNode( rn->down1, 0);
- if(rn->down2->area>RG.elemmin)
- subdivideNode( rn->down2, 0);
- }
- }
- }
- }
- if(toobig) makeGlobalElemArray();
- }
-
- el= RG.elem;
- for(a=RG.totelem; a>0; a--, el++) {
- rn= *el;
- if( rn->totrad[0]==0.0 && rn->totrad[1]==0.0 && rn->totrad[2]==0.0) {
- subdivideNode(rn, 0);
- if( rn->down1 ) {
- subdivideNode( rn->down1, 0);
- subdivideNode( rn->down2, 0);
- }
- }
- }
- makeGlobalElemArray();
-}
-
-void subdividelamps()
-{
- RPatch *rp, *next;
-
- rp= RG.patchbase.first;
- while(rp) {
- next= rp->next;
- if(rp->emit[0]!=0.0 || rp->emit[1]!=0.0 || rp->emit[2]!=0.0) {
- subdivideNode( rp->first, 0);
- if(rp->first->down1) {
- subdivideNode(rp->first->down1, 0);
- subdivideNode(rp->first->down2, 0);
- }
-
- addpatch(rp, rp->first);
- BLI_remlink(&RG.patchbase, rp);
- freePatch(rp);
- }
- rp= next;
- }
-
-}
-
-void maxsizePatches()
-{
- RPatch *rp;
- int toobig= 1;
-
- while(toobig) {
- toobig= 0;
- rp= RG.patchbase.first;
- while(rp) {
- if(rp->area>RG.patchmax) {
- subdivideNode( rp->first, 0);
- if(rp->first->down1) toobig= 1;
- }
- rp= rp->next;
- }
-
- if(toobig) converttopatches();
- }
-
- /* count lamps */
- rp= RG.patchbase.first;
- RG.totlamp= 0;
- while(rp) {
- if(rp->emit[0]!=0.0 || rp->emit[1]!=0.0 || rp->emit[2]!=0.0) {
- RG.totlamp++;
- }
- rp= rp->next;
- }
- makeGlobalElemArray();
-}
-
-
-
diff --git a/source/blender/radiosity/intern/source/radrender.c b/source/blender/radiosity/intern/source/radrender.c
deleted file mode 100644
index d33bbc90ee3..00000000000
--- a/source/blender/radiosity/intern/source/radrender.c
+++ /dev/null
@@ -1,530 +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): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/* radrender.c, aug 2003
- *
- * Most of the code here is copied from radiosity code, to optimize for renderfaces.
- * Shared function calls mostly reside in radfactors.c
- * No adaptive subdivision takes place
- *
- * - do_radio_render(); main call, extern
- * - initradfaces(); add radface structs in render faces, init radio globals
- * -
- * - initradiosity(); LUTs
- * - inithemiwindows();
- * - progressiverad(); main itteration loop
- * - hemi zbuffers
- * - calc rad factors
- *
- * - closehemiwindows();
- * - freeAllRad();
- * - make vertex colors
- *
- * - during render, materials use totrad as ambient replacement
- * - free radfaces
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_rand.h"
-
-#include "BKE_utildefines.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-
-#include "radio.h"
-
-/* the radiosity module uses internal includes from render! */
-#include "renderpipeline.h"
-#include "render_types.h"
-#include "renderdatabase.h"
-
-
-/* only needed now for a print, if its useful move to RG */
-static float maxenergy;
-
-/* find the face with maximum energy to become shooter */
-/* nb: _rr means rad-render version of existing radio call */
-static void findshoot_rr(Render *re, VlakRen **shoot_p, RadFace **shootrf_p)
-{
- RadFace *rf, *shootrf, **radface;
- ObjectRen *obr;
- VlakRen *vlr=NULL, *shoot;
- float energy;
- int a;
-
- shoot= NULL;
- shootrf= NULL;
- maxenergy= 0.0;
-
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- rf->flag &= ~RAD_SHOOT;
-
- energy= rf->unshot[0]*rf->area;
- energy+= rf->unshot[1]*rf->area;
- energy+= rf->unshot[2]*rf->area;
-
- if(energy>maxenergy) {
- shoot= vlr;
- shootrf= rf;
- maxenergy= energy;
- }
- }
- }
- }
-
- if(shootrf) {
- maxenergy/= RG.totenergy;
- if(maxenergy<RG.convergence) {
- *shoot_p= NULL;
- *shootrf_p= NULL;
- return;
- }
- shootrf->flag |= RAD_SHOOT;
- }
-
- *shoot_p= shoot;
- *shootrf_p= shootrf;
-}
-
-static void backface_test_rr(Render *re, VlakRen *shoot, RadFace *shootrf)
-{
- ObjectRen *obr;
- VlakRen *vlr=NULL;
- RadFace *rf, **radface;
- float tvec[3];
- int a;
-
- /* backface testing */
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
- if(vlr != shoot && (radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- VecSubf(tvec, shootrf->cent, rf->cent);
-
- if(tvec[0]*rf->norm[0]+ tvec[1]*rf->norm[1]+ tvec[2]*rf->norm[2] < 0.0)
- rf->flag |= RAD_BACKFACE;
- }
- }
- }
-}
-
-static void clear_backface_test_rr(Render *re)
-{
- ObjectRen *obr;
- VlakRen *vlr=NULL;
- RadFace *rf, **radface;
- int a;
-
- /* backface flag clear */
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- rf->flag &= ~RAD_BACKFACE;
- }
- }
- }
-}
-
-extern RadView hemitop, hemiside; // radfactors.c
-
-/* hemi-zbuffering, delivers formfactors array */
-static void makeformfactors_rr(Render *re, VlakRen *shoot, RadFace *shootrf)
-{
- ObjectRen *obr;
- VlakRen *vlr=NULL;
- RadFace *rf, **radface;
- float len, vec[3], up[3], side[3], tar[5][3], *fp;
- int a;
-
- memset(RG.formfactors, 0, sizeof(float)*RG.totelem);
-
- /* set up hemiview */
- /* first: upvector for hemitop, we use diagonal hemicubes to prevent aliasing */
-
- VecSubf(vec, shoot->v1->co, shootrf->cent);
- Crossf(up, shootrf->norm, vec);
- len= Normalize(up);
-
- VECCOPY(hemitop.up, up);
- VECCOPY(hemiside.up, shootrf->norm);
-
- Crossf(side, shootrf->norm, up);
-
- /* five targets */
- VecAddf(tar[0], shootrf->cent, shootrf->norm);
- VecAddf(tar[1], shootrf->cent, up);
- VecSubf(tar[2], shootrf->cent, up);
- VecAddf(tar[3], shootrf->cent, side);
- VecSubf(tar[4], shootrf->cent, side);
-
- /* camera */
- VECCOPY(hemiside.cam, shootrf->cent);
- VECCOPY(hemitop.cam, shootrf->cent);
-
- /* do it! */
- VECCOPY(hemitop.tar, tar[0]);
- hemizbuf(&hemitop);
-
- for(a=1; a<5; a++) {
- VECCOPY(hemiside.tar, tar[a]);
- hemizbuf(&hemiside);
- }
-
- /* convert factors to real radiosity */
- fp= RG.formfactors;
-
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- if(*fp!=0.0 && rf->area!=0.0) {
- *fp *= shootrf->area/rf->area;
- if(*fp>1.0) *fp= 1.0001;
- }
- fp++;
- }
- }
- }
-}
-
-/* based at RG.formfactors array, distribute shoot energy over other faces */
-static void applyformfactors_rr(Render *re, VlakRen *shoot, RadFace *shootrf)
-{
- ObjectRen *obr;
- VlakRen *vlr=NULL;
- RadFace *rf, **radface;
- float *fp, *ref, unr, ung, unb, r, g, b;
- int a;
-
- unr= shootrf->unshot[0];
- ung= shootrf->unshot[1];
- unb= shootrf->unshot[2];
-
- fp= RG.formfactors;
-
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- if(*fp!= 0.0) {
-
- ref= &(vlr->mat->r);
-
- r= (*fp)*unr*ref[0];
- g= (*fp)*ung*ref[1];
- b= (*fp)*unb*ref[2];
-
- // if(rf->flag & RAD_BACKFACE) {
-
- rf->totrad[0]+= r;
- rf->totrad[1]+= g;
- rf->totrad[2]+= b;
-
- rf->unshot[0]+= r;
- rf->unshot[1]+= g;
- rf->unshot[2]+= b;
- }
- fp++;
- }
- }
- }
- /* shoot energy has been shot */
- shootrf->unshot[0]= shootrf->unshot[1]= shootrf->unshot[2]= 0.0;
-}
-
-
-/* main loop for itterations */
-static void progressiverad_rr(Render *re)
-{
- VlakRen *shoot;
- RadFace *shootrf;
- float unshot[3];
- int it= 0;
-
- findshoot_rr(re, &shoot, &shootrf);
- while( shoot ) {
-
- /* backfaces receive no energy, but are zbuffered... */
- backface_test_rr(re, shoot, shootrf);
-
- /* ...unless it's two sided */
- if(shootrf->flag & RAD_TWOSIDED) {
- VECCOPY(unshot, shootrf->unshot);
- VecNegf(shootrf->norm);
- makeformfactors_rr(re, shoot, shootrf);
- applyformfactors_rr(re, shoot, shootrf);
- VecNegf(shootrf->norm);
- VECCOPY(shootrf->unshot, unshot);
- }
-
- /* hemi-zbuffers */
- makeformfactors_rr(re, shoot, shootrf);
- /* based at RG.formfactors array, distribute shoot energy over other faces */
- applyformfactors_rr(re, shoot, shootrf);
-
- it++;
- re->timecursor(re->tch, it);
-
- clear_backface_test_rr(re);
-
- if(re->test_break(re->tbh)) break;
- if(RG.maxiter && RG.maxiter<=it) break;
-
- findshoot_rr(re, &shoot, &shootrf);
- }
- printf(" Unshot energy:%f\n", 1000.0*maxenergy);
-
- re->timecursor(re->tch, re->scene->r.cfra);
-}
-
-static RadFace *radfaces=NULL;
-
-static void initradfaces(Render *re)
-{
- ObjectRen *obr;
- VlakRen *vlr= NULL;
- RadFace *rf, **radface;
- int a, b;
-
- /* globals */
- RG.totenergy= 0.0;
- RG.totpatch= 0; // we count initial emittors here
- RG.totelem= 0; // total # faces are put here (so we can use radfactors.c calls)
- /* size is needed for hemicube clipping */
- RG.min[0]= RG.min[1]= RG.min[2]= 1.0e20;
- RG.max[0]= RG.max[1]= RG.max[2]= -1.0e20;
-
- /* count first for fast malloc */
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if(vlr->mat->mode & MA_RADIO) {
- if(vlr->mat->emit > 0.0) {
- RG.totpatch++;
- }
- RG.totelem++;
- }
- }
- }
-
-printf(" Rad elems: %d emittors %d\n", RG.totelem, RG.totpatch);
- if(RG.totelem==0 || RG.totpatch==0) return;
-
- /* make/init radfaces */
- rf=radfaces= MEM_callocN(RG.totelem*sizeof(RadFace), "radfaces");
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if(vlr->mat->mode & MA_RADIO) {
-
- /* during render, vlr->n gets flipped/corrected, we cannot have that */
- if (obr->ob->transflag & OB_NEG_SCALE){
- /* The object has negative scale that will cause the normals to flip.
- To counter this unwanted normal flip, swap vertex 2 and 4 for a quad
- or vertex 2 and 3 (see flip_face) for a triangle in the call to CalcNormFloat4
- in order to flip the normals back to the way they were in the original mesh. */
- if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v4->co, vlr->v3->co, vlr->v2->co, rf->norm);
- else CalcNormFloat(vlr->v1->co, vlr->v3->co, vlr->v2->co, rf->norm);
- }else{
- if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co, rf->norm);
- else CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, rf->norm);
- }
-
- rf->totrad[0]= vlr->mat->emit*vlr->mat->r;
- rf->totrad[1]= vlr->mat->emit*vlr->mat->g;
- rf->totrad[2]= vlr->mat->emit*vlr->mat->b;
- VECCOPY(rf->unshot, rf->totrad);
-
- if(vlr->v4) {
- rf->area= AreaQ3Dfl(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co);
- CalcCent4f(rf->cent, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co);
- }
- else {
- rf->area= AreaT3Dfl(vlr->v1->co, vlr->v2->co, vlr->v3->co);
- CalcCent3f(rf->cent, vlr->v1->co, vlr->v2->co, vlr->v3->co);
- }
-
- RG.totenergy+= rf->unshot[0]*rf->area;
- RG.totenergy+= rf->unshot[1]*rf->area;
- RG.totenergy+= rf->unshot[2]*rf->area;
-
- for(b=0; b<3; b++) {
- RG.min[b]= MIN2(RG.min[b], rf->cent[b]);
- RG.max[b]= MAX2(RG.max[b], rf->cent[b]);
- }
-
- // uncommented; this isnt satisfying, but i leave it in the code for now (ton)
- // if(vlr->mat->translucency!=0.0) rf->flag |= RAD_TWOSIDED;
-
- radface=RE_vlakren_get_radface(obr, vlr, 1);
- *radface= rf++;
- }
- }
- }
- RG.size[0]= (RG.max[0]- RG.min[0]);
- RG.size[1]= (RG.max[1]- RG.min[1]);
- RG.size[2]= (RG.max[2]- RG.min[2]);
- RG.maxsize= MAX3(RG.size[0],RG.size[1],RG.size[2]);
-
- /* formfactor array */
- if(RG.formfactors) MEM_freeN(RG.formfactors);
- if(RG.totelem)
- RG.formfactors= MEM_mallocN(sizeof(float)*RG.totelem, "formfactors");
- else
- RG.formfactors= NULL;
-
-}
-
-static void vecaddfac(float *vec, float *v1, float *v2, float fac)
-{
- vec[0]= v1[0] + fac*v2[0];
- vec[1]= v1[1] + fac*v2[1];
- vec[2]= v1[2] + fac*v2[2];
-
-}
-
-/* unused now, doesnt work..., find it in cvs of nov 2005 or older */
-/* static void filter_rad_values(void) */
-
-
-static void make_vertex_rad_values(Render *re)
-{
- ObjectRen *obr;
- VertRen *v1=NULL;
- VlakRen *vlr=NULL;
- RadFace *rf, **radface;
- float *col;
- int a;
-
- RG.igamma= 1.0/RG.gamma;
- RG.radfactor= RG.radfac*pow(64*64, RG.igamma)/128.0; /* compatible with radio-tool */
-
- /* accumulate vertexcolors */
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
-
- /* apply correction */
- rf->totrad[0]= RG.radfactor*pow( rf->totrad[0], RG.igamma);
- rf->totrad[1]= RG.radfactor*pow( rf->totrad[1], RG.igamma);
- rf->totrad[2]= RG.radfactor*pow( rf->totrad[2], RG.igamma);
-
- /* correct rf->rad values for color */
- if(vlr->mat->r > 0.0) rf->totrad[0]/= vlr->mat->r;
- if(vlr->mat->g > 0.0) rf->totrad[1]/= vlr->mat->g;
- if(vlr->mat->b > 0.0) rf->totrad[2]/= vlr->mat->b;
-
- col= RE_vertren_get_rad(obr, vlr->v1, 1);
- vecaddfac(col, col, rf->totrad, rf->area);
- col[3]+= rf->area;
-
- col= RE_vertren_get_rad(obr, vlr->v2, 1);
- vecaddfac(col, col, rf->totrad, rf->area);
- col[3]+= rf->area;
-
- col= RE_vertren_get_rad(obr, vlr->v3, 1);
- vecaddfac(col, col, rf->totrad, rf->area);
- col[3]+= rf->area;
-
- if(vlr->v4) {
- col= RE_vertren_get_rad(obr, vlr->v4, 1);
- vecaddfac(col, col, rf->totrad, rf->area);
- col[3]+= rf->area;
- }
- }
- }
-
- /* make vertex colors */
- for(a=0; a<obr->totvert; a++) {
- if((a & 255)==0) v1= RE_findOrAddVert(obr, a); else v1++;
-
- col= RE_vertren_get_rad(obr, v1, 0);
- if(col && col[3]>0.0) {
- col[0]/= col[3];
- col[1]/= col[3];
- col[2]/= col[3];
- }
- }
- }
-}
-
-/* main call, extern */
-void do_radio_render(Render *re)
-{
- if(re->scene->radio==NULL) add_radio(re->scene);
- freeAllRad(re->scene); /* just in case radio-tool is still used */
-
- set_radglobal(re->scene); /* init the RG struct */
- RG.re= re; /* only used by hemizbuf(), prevents polluting radio code all over */
-
- initradfaces(re); /* add radface structs to render faces */
- if(RG.totenergy>0.0) {
-
- initradiosity(); /* LUT's */
- inithemiwindows(); /* views, need RG.maxsize for clipping */
-
- progressiverad_rr(re); /* main radio loop */
-
- make_vertex_rad_values(re); /* convert face energy to vertex ones */
-
- }
-
- freeAllRad(re->scene); /* luts, hemis, sets vars at zero */
-}
-
-/* free call, after rendering, extern */
-void end_radio_render(void)
-{
- if(radfaces) MEM_freeN(radfaces);
- radfaces= NULL;
-}
-
diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h
index 20eea0c98bd..15b59f2c8cc 100644
--- a/source/blender/render/extern/include/RE_render_ext.h
+++ b/source/blender/render/extern/include/RE_render_ext.h
@@ -47,7 +47,8 @@ struct Render;
struct MTex;
struct ImBuf;
-void RE_zbufferall_radio(struct RadView *vw, struct RNode **rg_elem, int rg_totelem, struct Render *re);
+// RADIO REMOVED, Maybe this will be useful later
+//void RE_zbufferall_radio(struct RadView *vw, struct RNode **rg_elem, int rg_totelem, struct Render *re);
/* particle.c, effect.c, editmesh_modes.c and brush.c, returns 1 if rgb, 0 otherwise */
int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta);
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index d2d0aadcfc5..a047dc63829 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -104,7 +104,6 @@
#include "rendercore.h"
#include "renderdatabase.h"
#include "renderpipeline.h"
-#include "radio.h"
#include "shadbuf.h"
#include "shading.h"
#include "strand.h"
@@ -1247,6 +1246,19 @@ static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float
}
+static void particle_curve(Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, float *loc, float *loc1, int seed)
+{
+ HaloRen *har=0;
+
+ if(ma->mode&MA_WIRE)
+ static_particle_wire(obr, ma, loc, loc1, sd->first, sd->line);
+ else if(ma->material_type == MA_TYPE_HALO) {
+ har= RE_inithalo_particle(re, obr, dm, ma, loc, loc1, sd->orco, sd->uvco, sd->size, 1.0, seed);
+ if(har) har->lay= obr->ob->lay;
+ }
+ else
+ static_particle_strand(re, obr, ma, sd, loc, loc1);
+}
static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, ParticleBillboardData *bb)
{
VlakRen *vlr;
@@ -1369,18 +1381,55 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
mtf->uv[3][1] = uvy;
}
}
-static void render_new_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, float *loc, float *loc1, int seed)
+static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, ParticleBillboardData *bb, ParticleKey *state, int seed, float hasize)
{
- HaloRen *har=0;
+ float loc[3], loc0[3], loc1[3], vel[3];
+
+ VECCOPY(loc, state->co);
- if(ma->mode&MA_WIRE)
- static_particle_wire(obr, ma, loc, loc1, sd->first, sd->line);
- else if(ma->material_type == MA_TYPE_HALO) {
- har= RE_inithalo_particle(re, obr, dm, ma, loc, loc1, sd->orco, sd->uvco, sd->size, 1.0, seed);
- if(har) har->lay= obr->ob->lay;
+ if(ren_as != PART_DRAW_BB)
+ MTC_Mat4MulVecfl(re->viewmat, loc);
+
+ switch(ren_as) {
+ case PART_DRAW_LINE:
+ sd->line = 1;
+ sd->time = 0.0f;
+ sd->size = hasize;
+
+ VECCOPY(vel, state->vel);
+ MTC_Mat4Mul3Vecfl(re->viewmat, vel);
+ Normalize(vel);
+
+ if(part->draw & PART_DRAW_VEL_LENGTH)
+ VecMulf(vel, VecLength(state->vel));
+
+ VECADDFAC(loc0, loc, vel, -part->draw_line[0]);
+ VECADDFAC(loc1, loc, vel, part->draw_line[1]);
+
+ particle_curve(re, obr, dm, ma, sd, loc0, loc1, seed);
+
+ break;
+
+ case PART_DRAW_BB:
+
+ VECCOPY(bb->vec, loc);
+ VECCOPY(bb->vel, state->vel);
+
+ particle_billboard(re, obr, ma, bb);
+
+ break;
+
+ default:
+ {
+ HaloRen *har=0;
+
+ har = RE_inithalo_particle(re, obr, dm, ma, loc, NULL, sd->orco, sd->uvco, hasize, 0.0, seed);
+
+ if(har) har->lay= obr->ob->lay;
+
+ break;
+ }
}
- else
- static_particle_strand(re, obr, ma, sd, loc, loc1);
}
static void get_particle_uvco_mcol(short from, DerivedMesh *dm, float *fuv, int num, ParticleStrandData *sd)
{
@@ -1437,9 +1486,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
StrandBound *sbound= 0;
StrandRen *strand=0;
RNG *rng= 0;
- float loc[3],loc1[3],loc0[3],vel[3],mat[4][4],nmat[3][3],co[3],nor[3],time;
+ float loc[3],loc1[3],loc0[3],mat[4][4],nmat[3][3],co[3],nor[3],time;
float strandlen=0.0f, curlen=0.0f;
- float hasize, pa_size, pa_time, r_tilt, cfra=bsystem_time(re->scene, ob, (float)re->scene->r.cfra, 0.0);
+ float hasize, pa_size, r_tilt, r_length, cfra=bsystem_time(re->scene, ob, (float)re->scene->r.cfra, 0.0);
+ float pa_time, pa_birthtime, pa_dietime;
float random, simplify[2];
int i, a, k, max_k=0, totpart, dosimplify = 0, dosurfacecache = 0;
int totchild=0;
@@ -1463,12 +1513,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
return 1;
/* 2. start initialising things */
- if(part->phystype==PART_PHYS_KEYED){
- if(psys->flag & PSYS_FIRST_KEYED)
- psys_count_keyed_targets(ob,psys);
- else
- return 1;
- }
+ if(part->phystype==PART_PHYS_KEYED)
+ psys_count_keyed_targets(ob,psys);
/* last possibility to bail out! */
psmd= psys_get_modifier(ob,psys);
@@ -1556,10 +1602,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
calc_ipo(part->ipo, cfra);
execute_ipo((ID *)part, part->ipo);
}
-#endif // XXX old animation system
if(part->flag & PART_GLOB_TIME)
- cfra = bsystem_time(re->scene, 0, (float)re->scene->r.cfra, 0.0);
+#endif // XXX old animation system
+ cfra = bsystem_time(re->scene, 0, (float)re->scene->r.cfra, 0.0);
/* 2.4 setup reactors */
if(part->type == PART_REACTOR){
@@ -1655,8 +1701,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if(pa->flag & PARS_UNEXIST) continue;
pa_time=(cfra-pa->time)/pa->lifetime;
- if((part->flag&PART_ABS_TIME) == 0){
+ pa_birthtime = pa->time;
+ pa_dietime = pa->dietime;
#if 0 // XXX old animation system
+ if((part->flag&PART_ABS_TIME) == 0){
if(ma->ipo) {
/* correction for lifetime */
calc_ipo(ma->ipo, 100.0f * pa_time);
@@ -1667,8 +1715,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
calc_ipo(part->ipo, 100.0f*pa_time);
execute_ipo((ID *)part, part->ipo);
}
-#endif // XXX old animation system
}
+#endif // XXX old animation system
hasize = ma->hasize;
@@ -1692,6 +1740,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
pa_size = pa->size;
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];
@@ -1712,10 +1761,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
max_k = (int)cache->steps;
}
- pa_time = psys_get_child_time(psys, cpa, cfra);
+ pa_time = psys_get_child_time(psys, cpa, cfra, &pa_birthtime, &pa_dietime);
- if((part->flag & PART_ABS_TIME) == 0) {
#if 0 // XXX old animation system
+ if((part->flag & PART_ABS_TIME) == 0) {
if(ma->ipo){
/* correction for lifetime */
calc_ipo(ma->ipo, 100.0f * pa_time);
@@ -1726,12 +1775,13 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
calc_ipo(part->ipo, 100.0f * pa_time);
execute_ipo((ID *)part, part->ipo);
}
-#endif // XXX old animation system
}
+#endif // XXX old animation system
pa_size = psys_get_child_size(psys, cpa, cfra, &pa_time);
r_tilt = 2.0f * cpa->rand[2];
+ r_length = cpa->rand[1];
num = cpa->num;
@@ -1857,8 +1907,6 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
strand->totvert++;
}
else{
- sd.first = 0;
- sd.time = time;
sd.size = hasize;
if(k==1){
@@ -1866,10 +1914,15 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
sd.time = 0.0f;
VECSUB(loc0,loc1,loc);
VECADD(loc0,loc1,loc0);
+
+ particle_curve(re, obr, psmd->dm, ma, &sd, loc1, loc0, seed);
}
+ sd.first = 0;
+ sd.time = time;
+
if(k)
- render_new_particle(re, obr, psmd->dm, ma, &sd, loc, loc1, seed);
+ particle_curve(re, obr, psmd->dm, ma, &sd, loc, loc1, seed);
VECCOPY(loc1,loc);
}
@@ -1878,58 +1931,55 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
}
else {
/* render normal particles */
- time=0.0f;
- state.time=cfra;
- if(psys_get_particle_state(re->scene,ob,psys,a,&state,0)==0)
- continue;
-
- VECCOPY(loc,state.co);
- if(part->ren_as!=PART_DRAW_BB)
- MTC_Mat4MulVecfl(re->viewmat,loc);
-
- switch(part->ren_as) {
- case PART_DRAW_LINE:
- sd.line = 1;
- sd.time = 0.0f;
- sd.size = hasize;
+ if(part->trail_count > 1) {
+ float length = part->path_end * (1.0 - part->randlength * r_length);
+ int trail_count = part->trail_count * (1.0 - part->randlength * r_length);
+ float ct = (part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time;
+ float dt = length / (trail_count ? (float)trail_count : 1.0f);
+
+ for(i=0; i < trail_count; i++, ct -= dt) {
+ if(part->draw & PART_ABS_PATH_TIME) {
+ if(ct < pa_birthtime || ct > pa_dietime)
+ continue;
+ }
+ else if(ct < 0.0f || ct > 1.0f)
+ continue;
- VECCOPY(vel,state.vel);
- MTC_Mat4Mul3Vecfl(re->viewmat,vel);
- Normalize(vel);
+ state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : ct;
+ psys_get_particle_on_path(re->scene,ob,psys,a,&state,1);
- if(part->draw & PART_DRAW_VEL_LENGTH)
- VecMulf(vel,VecLength(state.vel));
+ if(psys->parent)
+ Mat4MulVecfl(psys->parent->obmat, state.co);
- VECADDFAC(loc0,loc,vel,-part->draw_line[0]);
- VECADDFAC(loc1,loc,vel,part->draw_line[1]);
+ if(part->ren_as == PART_DRAW_BB) {
+ bb.random = random;
+ bb.size = pa_size;
+ bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt);
+ bb.time = ct;
+ bb.num = a;
+ }
- render_new_particle(re,obr,psmd->dm,ma,&sd,loc0,loc1,seed);
+ particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize);
+ }
+ }
+ else {
+ time=0.0f;
+ state.time=cfra;
+ if(psys_get_particle_state(re->scene,ob,psys,a,&state,0)==0)
+ continue;
- break;
+ if(psys->parent)
+ Mat4MulVecfl(psys->parent->obmat, state.co);
- case PART_DRAW_BB:
+ if(part->ren_as == PART_DRAW_BB) {
bb.random = random;
bb.size = pa_size;
bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt);
bb.time = pa_time;
bb.num = a;
- VECCOPY(bb.vec, loc);
- VECCOPY(bb.vel, state.vel);
-
- particle_billboard(re, obr, ma, &bb);
-
- break;
-
- default:
- {
- HaloRen *har=0;
-
- har = RE_inithalo_particle(re, obr, psmd->dm, ma, loc, NULL, sd.orco, sd.uvco, hasize, 0.0, seed);
-
- if(har) har->lay= obr->ob->lay;
-
- break;
}
+
+ particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize);
}
}
@@ -2532,9 +2582,9 @@ static void init_render_surf(Render *re, ObjectRen *obr)
Curve *cu;
ListBase displist;
DispList *dl;
- Material *matar[32];
+ Material **matar;
float *orco=NULL, *orcobase=NULL, mat[4][4];
- int a, need_orco=0;
+ int a, totmat, need_orco=0;
cu= ob->data;
nu= cu->nurb.first;
@@ -2544,13 +2594,14 @@ static void init_render_surf(Render *re, ObjectRen *obr)
MTC_Mat4Invert(ob->imat, mat);
/* material array */
- memset(matar, 0, 4*32);
- matar[0]= give_render_material(re, ob, 0);
- for(a=0; a<ob->totcol; a++) {
+ totmat= ob->totcol+1;
+ matar= MEM_callocN(sizeof(Material*)*totmat, "init_render_surf matar");
+
+ for(a=0; a<totmat; a++) {
matar[a]= give_render_material(re, ob, a+1);
- if(matar[a] && matar[a]->texco & TEXCO_ORCO) {
+
+ if(matar[a] && matar[a]->texco & TEXCO_ORCO)
need_orco= 1;
- }
}
if(ob->parent && (ob->parent->type==OB_LATTICE)) need_orco= 1;
@@ -2558,19 +2609,17 @@ static void init_render_surf(Render *re, ObjectRen *obr)
if(need_orco) orcobase= orco= get_object_orco(re, ob);
displist.first= displist.last= 0;
- makeDispListSurf(re->scene, ob, &displist, 1);
+ makeDispListSurf(re->scene, ob, &displist, 1, 0);
- dl= displist.first;
/* walk along displaylist and create rendervertices/-faces */
- while(dl) {
- /* watch out: u ^= y, v ^= x !! */
- if(dl->type==DL_SURF) {
+ for(dl=displist.first; dl; dl=dl->next) {
+ /* watch out: u ^= y, v ^= x !! */
+ if(dl->type==DL_SURF)
orco+= 3*dl_surf_to_renderdata(obr, dl, matar, orco, mat);
- }
-
- dl= dl->next;
}
+
freedisplist(&displist);
+ MEM_freeN(matar);
}
static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
@@ -2581,11 +2630,11 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
VlakRen *vlr;
DispList *dl;
ListBase olddl={NULL, NULL};
- Material *matar[32];
+ Material **matar;
float len, *data, *fp, *orco=NULL, *orcobase= NULL;
float n[3], mat[4][4];
int nr, startvert, startvlak, a, b;
- int frontside, need_orco=0;
+ int frontside, need_orco=0, totmat;
cu= ob->data;
if(ob->type==OB_FONT && cu->str==NULL) return;
@@ -2606,13 +2655,14 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
MTC_Mat4Invert(ob->imat, mat);
/* material array */
- memset(matar, 0, 4*32);
- matar[0]= give_render_material(re, ob, 0);
- for(a=0; a<ob->totcol; a++) {
+ totmat= ob->totcol+1;
+ matar= MEM_callocN(sizeof(Material*)*totmat, "init_render_surf matar");
+
+ for(a=0; a<totmat; a++) {
matar[a]= give_render_material(re, ob, a+1);
- if(matar[a]->texco & TEXCO_ORCO) {
+
+ if(matar[a] && matar[a]->texco & TEXCO_ORCO)
need_orco= 1;
- }
}
if(need_orco) orcobase=orco= get_object_orco(re, ob);
@@ -2790,6 +2840,8 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
freedisplist(&cu->disp);
SWAP(ListBase, olddl, cu->disp);
}
+
+ MEM_freeN(matar);
}
/* ------------------------------------------------------------------------- */
@@ -4305,8 +4357,9 @@ void RE_Database_Free(Render *re)
}
free_mesh_orco_hash(re);
-
+#if 0 /* radio can be redone better */
end_radio_render();
+#endif
end_render_materials();
end_render_textures();
@@ -4733,10 +4786,11 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
/* yafray: 'direct' radiosity, environment maps and raytree init not needed for yafray render */
/* although radio mode could be useful at some point, later */
if (re->r.renderer==R_INTERN) {
+#if 0 /* RADIO was removed */
/* RADIO (uses no R anymore) */
if(!re->test_break(re->tbh))
if(re->r.mode & R_RADIO) do_radio_render(re);
-
+#endif
/* raytree */
if(!re->test_break(re->tbh)) {
if(re->r.mode & R_RAYTRACE) {
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index a0185a64659..842adcf8520 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -453,6 +453,7 @@ void RE_SetCamera(Render *re, Object *camera)
cam= camera->data;
if(cam->type==CAM_ORTHO) re->r.mode |= R_ORTHO;
+ if(cam->flag & CAM_PANORAMA) re->r.mode |= R_PANORAMA;
/* solve this too... all time depending stuff is in convertblender.c?
* Need to update the camera early because it's used for projection matrices
@@ -601,7 +602,7 @@ void initparts(Render *re)
yparts= re->r.yparts;
/* mininum part size, but for exr tile saving it was checked already */
- if(!(re->r.scemode & R_EXR_TILE_FILE)) {
+ if(!(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE))) {
if(re->r.mode & R_PANORAMA) {
if(ceil(re->rectx/(float)xparts) < 8)
xparts= 1 + re->rectx/8;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 07560edb76b..3ef50af53c2 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -36,6 +36,7 @@
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_sequence_types.h"
#include "DNA_userdef_types.h"
#include "BKE_utildefines.h"
@@ -46,6 +47,7 @@
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BKE_writeavi.h" /* <------ should be replaced once with generic movie module */
+#include "BKE_pointcache.h"
#include "MEM_guardedalloc.h"
@@ -61,7 +63,6 @@
#include "intern/openexr/openexr_multi.h"
#include "RE_pipeline.h"
-#include "radio.h"
/* internal */
#include "render_types.h"
@@ -1092,14 +1093,14 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy
re->ok= 0;
}
else {
-#ifndef WITH_OPENEXR
+#ifdef WITH_OPENEXR
+ if(re->r.scemode & R_FULL_SAMPLE)
+ re->r.scemode |= R_EXR_TILE_FILE; /* enable automatic */
+#else
/* can't do this without openexr support */
- re->r.scemode &= ~R_EXR_TILE_FILE;
+ re->r.scemode &= ~(R_EXR_TILE_FILE|R_FULL_SAMPLE);
#endif
- if(!(re->r.scemode & R_EXR_TILE_FILE))
- re->r.scemode &= ~R_FULL_SAMPLE; /* clear, so we can use this flag for test both */
-
/* fullsample wants uniform osa levels */
if(source && (re->r.scemode & R_FULL_SAMPLE)) {
/* but, if source has no full sample we disable it */
@@ -1499,7 +1500,7 @@ static void threaded_tile_processor(Render *re)
else if(re->r.scemode & R_FULL_SAMPLE)
re->result= new_full_sample_buffers_exr(re);
else
- re->result= new_render_result(re, &re->disprect, 0, re->r.scemode & R_EXR_TILE_FILE);
+ re->result= new_render_result(re, &re->disprect, 0, re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE));
}
if(re->result==NULL)
@@ -2278,7 +2279,7 @@ static void do_render_all_options(Render *re)
/* ensure no images are in memory from previous animated sequences */
BKE_image_all_free_anim_ibufs(re->r.cfra);
- if(re->r.scemode & R_DOSEQ) {
+ if((re->r.scemode & R_DOSEQ) && re->scene->ed && re->scene->ed->seqbase.first) {
/* note: do_render_seq() frees rect32 when sequencer returns float images */
if(!re->test_break(re->tbh))
; //XXX do_render_seq(re->result, re->r.cfra);
@@ -2299,7 +2300,7 @@ static void do_render_all_options(Render *re)
re->stats_draw(re->sdh, &re->i);
/* stamp image info here */
- if((re->r.scemode & R_STAMP_INFO) && (re->r.stamp & R_STAMP_DRAW)) {
+ if((re->r.stamp & R_STAMP_ALL) && (re->r.stamp & R_STAMP_DRAW)) {
renderresult_stampinfo(re->scene);
re->display_draw(re->ddh, re->result, NULL);
}
@@ -2327,13 +2328,13 @@ static int is_rendering_allowed(Render *re)
re->error(re->erh, "No border area selected.");
return 0;
}
- if(re->r.scemode & R_EXR_TILE_FILE) {
+ if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) {
re->error(re->erh, "Border render and Buffer-save not supported yet");
return 0;
}
}
- if(re->r.scemode & R_EXR_TILE_FILE) {
+ if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) {
char str[FILE_MAX];
render_unique_exr_name(re, str, 0);
@@ -2413,8 +2414,24 @@ static int is_rendering_allowed(Render *re)
return 1;
}
+static void update_physics_cache(Render *re, Scene *scene, int anim_init)
+{
+ PTCacheBaker baker;
+
+ baker.scene = scene;
+ baker.pid = NULL;
+ baker.bake = 0;
+ baker.render = 1;
+ baker.anim_init = 1;
+ baker.quick_step = 1;
+ baker.break_test = re->test_break;
+ baker.break_data = re->tbh;
+ baker.progressbar = NULL;
+
+ BKE_ptcache_make_cache(&baker);
+}
/* evaluating scene options for general Blender render */
-static int render_initialize_from_scene(Render *re, Scene *scene, int anim)
+static int render_initialize_from_scene(Render *re, Scene *scene, int anim, int anim_init)
{
int winx, winy;
rcti disprect;
@@ -2450,6 +2467,9 @@ static int render_initialize_from_scene(Render *re, Scene *scene, int anim)
/* check all scenes involved */
tag_scenes_for_render(re);
+
+ /* make sure dynamics are up to date */
+ update_physics_cache(re, scene, anim_init);
if(scene->r.scemode & R_SINGLE_LAYER)
push_render_result(re);
@@ -2479,7 +2499,7 @@ void RE_BlenderFrame(Render *re, Scene *scene, int frame)
scene->r.cfra= frame;
- if(render_initialize_from_scene(re, scene, 0)) {
+ if(render_initialize_from_scene(re, scene, 0, 0)) {
do_render_all_options(re);
}
@@ -2568,7 +2588,7 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
int nfra;
/* do not fully call for each frame, it initializes & pops output window */
- if(!render_initialize_from_scene(re, scene, 0))
+ if(!render_initialize_from_scene(re, scene, 0, 1))
return;
/* ugly global still... is to prevent renderwin events and signal subsurfs etc to make full resol */
@@ -2599,7 +2619,7 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
char name[FILE_MAX];
/* only border now, todo: camera lens. (ton) */
- render_initialize_from_scene(re, scene, 1);
+ render_initialize_from_scene(re, scene, 1, 0);
if(nfra!=scene->r.cfra) {
/*
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 16f876fdd38..d9fc075c1c4 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -2418,13 +2418,13 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
/* placement */
- if(mtex->projx) texvec[0]= mtex->size[0]*(co[mtex->projx-1]+mtex->ofs[0]);
+ if(mtex->projx && co) 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]);
+ if(mtex->projy && co) 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]);
+ if(mtex->projz && co) texvec[2]= mtex->size[2]*(co[mtex->projz-1]+mtex->ofs[2]);
else texvec[2]= mtex->size[2]*(mtex->ofs[2]);
if(shi->osatex) {
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index b68cecce7bd..0d8f1be8c85 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -49,14 +49,12 @@
#include "DNA_mesh_types.h"
#include "DNA_node_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_material_types.h"
#include "BKE_global.h"
#include "BKE_material.h"
#include "BKE_utildefines.h"
-#include "radio_types.h"
-#include "radio.h" /* needs RG, some root data for radiosity */
-
#include "RE_render_ext.h"
/* local includes */
@@ -2271,140 +2269,6 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
}
}
-typedef struct {
- float *vert;
- float hoco[4];
- int clip;
-} VertBucket;
-
-/* warning, not threaded! */
-static int hashlist_projectvert(float *v1, float winmat[][4], float *hoco)
-{
- static VertBucket bucket[256], *buck;
-
- /* init static bucket */
- if(v1==NULL) {
- memset(bucket, 0, 256*sizeof(VertBucket));
- return 0;
- }
-
- buck= &bucket[ (((intptr_t)v1)/16) & 255 ];
- if(buck->vert==v1) {
- QUATCOPY(hoco, buck->hoco);
- return buck->clip;
- }
-
- projectvert(v1, winmat, hoco);
- buck->clip = testclip(hoco);
- buck->vert= v1;
- QUATCOPY(buck->hoco, hoco);
- return buck->clip;
-}
-
-/* used for booth radio 'tool' as during render */
-void RE_zbufferall_radio(struct RadView *vw, RNode **rg_elem, int rg_totelem, Render *re)
-{
- ZSpan zspan;
- float hoco[4][4], winmat[4][4];
- int a, zvlnr;
- int c1, c2, c3, c4= 0;
-
- if(rg_totelem==0) return;
-
- hashlist_projectvert(NULL, winmat, NULL);
-
- /* needed for projectvert */
- MTC_Mat4MulMat4(winmat, vw->viewmat, vw->winmat);
-
- /* 1.0f for clipping in clippyra()... bad stuff actually */
- zbuf_alloc_span(&zspan, vw->rectx, vw->recty, 1.0f);
- zspan.zmulx= ((float)vw->rectx)/2.0;
- zspan.zmuly= ((float)vw->recty)/2.0;
- zspan.zofsx= -0.5f;
- zspan.zofsy= -0.5f;
-
- /* the buffers */
- zspan.rectz= (int *)vw->rectz;
- zspan.rectp= (int *)vw->rect;
- zspan.recto= MEM_callocN(sizeof(int)*vw->rectx*vw->recty, "radiorecto");
- fillrect(zspan.rectz, vw->rectx, vw->recty, 0x7FFFFFFF);
- fillrect(zspan.rectp, vw->rectx, vw->recty, 0xFFFFFF);
-
- /* filling methods */
- zspan.zbuffunc= zbuffillGL4;
-
- if(rg_elem) { /* radio tool */
- RNode **re, *rn;
-
- re= rg_elem;
- re+= (rg_totelem-1);
- for(a= rg_totelem-1; a>=0; a--, re--) {
- rn= *re;
- if( (rn->f & RAD_SHOOT)==0 ) { /* no shootelement */
-
- if( rn->f & RAD_TWOSIDED) zvlnr= a;
- else if( rn->f & RAD_BACKFACE) zvlnr= 0xFFFFFF;
- else zvlnr= a;
-
- c1= hashlist_projectvert(rn->v1, winmat, hoco[0]);
- c2= hashlist_projectvert(rn->v2, winmat, hoco[1]);
- c3= hashlist_projectvert(rn->v3, winmat, hoco[2]);
-
- if(rn->v4) {
- c4= hashlist_projectvert(rn->v4, winmat, hoco[3]);
- }
-
- if(rn->v4)
- zbufclip4(&zspan, 0, zvlnr, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
- else
- zbufclip(&zspan, 0, zvlnr, hoco[0], hoco[1], hoco[2], c1, c2, c3);
- }
- }
- }
- else { /* radio render */
- ObjectRen *obr;
- VlakRen *vlr=NULL;
- RadFace **radface, *rf;
- int totface=0;
-
- /* note: radio render doesn't support duplis */
- for(obr=re->objecttable.first; obr; obr=obr->next) {
- hashlist_projectvert(NULL, NULL, NULL); /* clear hashlist */
-
- for(a=0; a<obr->totvlak; a++) {
- if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++;
-
- if((radface=RE_vlakren_get_radface(obr, vlr, 0)) && *radface) {
- rf= *radface;
- if( (rf->flag & RAD_SHOOT)==0 ) { /* no shootelement */
-
- if( rf->flag & RAD_TWOSIDED) zvlnr= totface;
- else if( rf->flag & RAD_BACKFACE) zvlnr= 0xFFFFFF; /* receives no energy, but is zbuffered */
- else zvlnr= totface;
-
- c1= hashlist_projectvert(vlr->v1->co, winmat, hoco[0]);
- c2= hashlist_projectvert(vlr->v2->co, winmat, hoco[1]);
- c3= hashlist_projectvert(vlr->v3->co, winmat, hoco[2]);
-
- if(vlr->v4) {
- c4= hashlist_projectvert(vlr->v4->co, winmat, hoco[3]);
- }
-
- if(vlr->v4)
- zbufclip4(&zspan, 0, zvlnr, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
- else
- zbufclip(&zspan, 0, zvlnr, hoco[0], hoco[1], hoco[2], c1, c2, c3);
- }
- totface++;
- }
- }
- }
- }
-
- MEM_freeN(zspan.recto);
- zbuf_free_span(&zspan);
-}
-
void zbuffer_shadow(Render *re, float winmat[][4], LampRen *lar, int *rectz, int size, float jitx, float jity)
{
ZbufProjectCache cache[ZBUF_PROJECT_CACHE_SIZE];
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 7acb2921bec..c72da8fe593 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -65,6 +65,7 @@ void WM_cursor_set (struct wmWindow *win, int curs);
void WM_cursor_modal (struct wmWindow *win, int curs);
void WM_cursor_restore (struct wmWindow *win);
void WM_cursor_wait (int val);
+void WM_cursor_grab (struct wmWindow *win, int val);
void WM_timecursor (struct wmWindow *win, int nr);
void *WM_paint_cursor_activate(struct wmWindowManager *wm, int (*poll)(struct bContext *C), void (*draw)(struct bContext *C, int, int, void *customdata), void *customdata);
@@ -79,7 +80,7 @@ void WM_keymap_tweak (ListBase *lb, short type, short val, int modifier, short
ListBase *WM_keymap_listbase (struct wmWindowManager *wm, const char *nameid,
int spaceid, int regionid);
-char *WM_key_event_string(short type);
+const char *WM_key_event_string(short type);
char *WM_key_event_operator_string(const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, char *str, int len);
/* handlers */
@@ -124,12 +125,15 @@ int WM_operator_filesel (struct bContext *C, struct wmOperator *op, struct wm
/* poll callback, context checks */
int WM_operator_winactive (struct bContext *C);
/* invoke callback, exec + redo popup */
-int WM_operator_redo (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
+int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
int WM_operator_redo_popup (struct bContext *C, struct wmOperator *op);
/* operator api */
void WM_operator_free (struct wmOperator *op);
-wmOperatorType *WM_operatortype_find(const char *idname);
+void WM_operator_stack_clear(struct bContext *C);
+
+wmOperatorType *WM_operatortype_find(const char *idnamem, int quiet);
+wmOperatorType *WM_operatortype_exists(const char *idname);
wmOperatorType *WM_operatortype_first(void);
void WM_operatortype_append (void (*opfunc)(wmOperatorType*));
void WM_operatortype_append_ptr (void (*opfunc)(wmOperatorType*, void *), void *userdata);
@@ -212,8 +216,8 @@ void WM_jobs_stop(struct wmWindowManager *wm, void *owner);
void WM_jobs_stop_all(struct wmWindowManager *wm);
/* clipboard */
-char *WM_clipboard_text_get(int selection);
-void WM_clipboard_text_set(char *buf, int selection);
+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 739cfbcc1ac..ab55f8a4459 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -40,8 +40,9 @@ struct wmWindowManager;
/* ************** wmOperatorType ************************ */
/* flag */
-#define OPTYPE_REGISTER 1
-#define OPTYPE_UNDO 2
+#define OPTYPE_REGISTER 1 /* register operators in stack after finishing */
+#define OPTYPE_UNDO 2 /* do undo push after after */
+#define OPTYPE_BLOCKING 4 /* let blender grab all input from the WM (X11) */
/* context to call operator in for WM_operator_name_call */
/* rna_ui.c contains EnumPropertyItem's of these, keep in sync */
@@ -58,37 +59,6 @@ enum {
WM_OP_EXEC_SCREEN
};
-/* ************** wmEvent ************************ */
-
-/* each event should have full modifier state */
-/* event comes from eventmanager and from keymap */
-typedef struct wmEvent {
- struct wmEvent *next, *prev;
-
- short type; /* event code itself (short, is also in keymap) */
- short val; /* press, release, scrollvalue */
- short x, y; /* mouse pointer position, screen coord */
- short mval[2]; /* region mouse position, name convention pre 2.5 :) */
- short prevx, prevy; /* previous mouse pointer position */
- short unicode; /* future, ghost? */
- char ascii; /* from ghost */
- char pad;
-
- /* modifier states */
- short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
- short keymodifier; /* rawkey modifier */
-
- /* keymap item, set by handler (weak?) */
- const char *keymap_idname;
-
- /* custom data */
- short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
- void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
- short customdatafree;
-
-} wmEvent;
-
-
/* ************** wmKeyMap ************************ */
/* modifier */
@@ -159,6 +129,8 @@ typedef struct wmNotifier {
#define NC_BRUSH (11<<24)
#define NC_TEXT (12<<24)
#define NC_WORLD (13<<24)
+#define NC_FILE (14<<24)
+#define NC_ANIMATION (15<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
@@ -213,6 +185,20 @@ typedef struct wmNotifier {
/* NC_TEXT Text */
#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)
+#define ND_KEYFRAME_PROP (72<<16)
+#define ND_ANIMCHAN_SELECT (73<<16)
+#define ND_ANIMCHAN_EDIT (74<<16)
+#define ND_NLA_SELECT (75<<16)
+#define ND_NLA_EDIT (76<<16)
+#define ND_NLA_ACTCHANGE (77<<16)
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
diff --git a/source/blender/windowmanager/intern/Makefile b/source/blender/windowmanager/intern/Makefile
index 80ae58f9398..8f0f47c52d0 100644
--- a/source/blender/windowmanager/intern/Makefile
+++ b/source/blender/windowmanager/intern/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile 11904 2007-08-31 16:16:33Z sirdude $
+# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 37fdc9fa2c5..7dec14664ae 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -95,6 +95,18 @@ void wm_operator_register(wmWindowManager *wm, wmOperator *op)
}
+void WM_operator_stack_clear(bContext *C)
+{
+ wmWindowManager *wm= CTX_wm_manager(C);
+ wmOperator *op;
+
+ while((op= wm->operators.first)) {
+ BLI_remlink(&wm->operators, op);
+ WM_operator_free(op);
+ }
+
+}
+
/* ****************************************** */
void wm_check(bContext *C)
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 627aebbe875..79830aca12f 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -156,6 +156,12 @@ void WM_cursor_wait(int val)
}
}
+void WM_cursor_grab(wmWindow *win, int val)
+{
+ if(win)
+ GHOST_SetCursorGrab(win->ghostwin, val);
+}
+
/* afer this you can call restore too */
void WM_timecursor(wmWindow *win, int nr)
{
@@ -316,7 +322,7 @@ BEGIN_CURSOR_BLOCK
static char ew_smsk[]={
0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x38, 0x1c,
- 0x3c, 0x3c, 0xfe, 0x7f, 0xff, 0xff, 0x3f, 0xfc,
+ 0x3c, 0x3c, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfe, 0x7f, 0x3c, 0x3c, 0x38, 0x1c,
0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
@@ -943,17 +949,17 @@ END_CURSOR_BLOCK
/********************** Swap Area Cursor ***********************/
BEGIN_CURSOR_BLOCK
static char swap_sbm[]={
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0xff, 0x07,
- 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07,
- 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07,
+ 0xc0, 0xff, 0x40, 0x80, 0x40, 0x80, 0x40, 0x9c,
+ 0x40, 0x98, 0x40, 0x94, 0x00, 0x82, 0xfe, 0x80,
+ 0x7e, 0xfd, 0xbe, 0x01, 0xda, 0x01, 0xe2, 0x01,
+ 0xe2, 0x01, 0xc2, 0x01, 0xfe, 0x01, 0x00, 0x00,
};
static char swap_smsk[]={
- 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff,
- 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0x07,
- 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07,
+ 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff,
+ 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
+ 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
};
static BCursor SwapCursor = {
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index f5c8e535002..3ef6e545dda 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -49,6 +49,7 @@
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_utildefines.h"
+#include "BKE_pointcache.h"
#include "ED_fileselect.h"
#include "ED_screen.h"
@@ -76,7 +77,7 @@ void wm_event_add(wmWindow *win, wmEvent *event_to_add)
BLI_addtail(&win->queue, event);
}
-static void wm_event_free(wmEvent *event)
+void wm_event_free(wmEvent *event)
{
if(event->customdata && event->customdatafree)
MEM_freeN(event->customdata);
@@ -234,6 +235,8 @@ void wm_event_do_notifiers(bContext *C)
for(base= scene->base.first; base; base= base->next) {
object_handle_update(scene, base->object);
}
+
+ BKE_ptcache_quick_cache_all(scene);
}
}
CTX_wm_window_set(C, NULL);
@@ -375,9 +378,13 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
else
WM_operator_free(op);
}
- else if(!(retval & OPERATOR_RUNNING_MODAL)) {
- WM_operator_free(op);
+ else if(retval & OPERATOR_RUNNING_MODAL) {
+ /* grab cursor during blocking modal ops (X11) */
+ if(ot->flag & OPTYPE_BLOCKING)
+ WM_cursor_grab(CTX_wm_window(C), 1);
}
+ else
+ WM_operator_free(op);
}
return retval;
@@ -386,7 +393,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
/* invokes operator in context */
int WM_operator_name_call(bContext *C, const char *opstring, int context, PointerRNA *properties)
{
- wmOperatorType *ot= WM_operatortype_find(opstring);
+ wmOperatorType *ot= WM_operatortype_find(opstring, 0);
wmWindow *window= CTX_wm_window(C);
wmEvent *event;
@@ -545,6 +552,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
}
WM_operator_free(handler->op);
+ WM_cursor_grab(CTX_wm_window(C), 0);
}
else if(handler->ui_remove) {
ScrArea *area= CTX_wm_area(C);
@@ -701,6 +709,8 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
/* remove modal handler, operator itself should have been cancelled and freed */
if(retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) {
+ WM_cursor_grab(CTX_wm_window(C), 0);
+
BLI_remlink(handlers, handler);
wm_event_free_handler(handler);
@@ -713,7 +723,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
printf("wm_handler_operator_call error\n");
}
else {
- wmOperatorType *ot= WM_operatortype_find(event->keymap_idname);
+ wmOperatorType *ot= WM_operatortype_find(event->keymap_idname, 0);
if(ot)
retval= wm_operator_invoke(C, ot, event, properties);
@@ -730,17 +740,20 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve
ScrArea *area= CTX_wm_area(C);
ARegion *region= CTX_wm_region(C);
ARegion *menu= CTX_wm_menu(C);
- int retval;
+ int retval, always_pass;
/* we set context to where ui handler came from */
if(handler->ui_area) CTX_wm_area_set(C, handler->ui_area);
if(handler->ui_region) CTX_wm_region_set(C, handler->ui_region);
if(handler->ui_menu) CTX_wm_menu_set(C, handler->ui_menu);
+ /* in advance to avoid access to freed event on window close */
+ always_pass= wm_event_always_pass(event);
+
retval= handler->ui_handle(C, event, handler->ui_userdata);
/* putting back screen context */
- if((retval != WM_UI_HANDLER_BREAK) || wm_event_always_pass(event)) {
+ if((retval != WM_UI_HANDLER_BREAK) || always_pass) {
CTX_wm_area_set(C, area);
CTX_wm_region_set(C, region);
CTX_wm_menu_set(C, menu);
@@ -773,8 +786,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
case EVT_FILESELECT_OPEN:
case EVT_FILESELECT_FULL_OPEN:
{
- short flag =0; short display =FILE_SHORTDISPLAY; short filter =0; short sort =FILE_SORTALPHA;
- char *path= RNA_string_get_alloc(handler->op->ptr, "filename", NULL, 0);
+ short flag =0; short display =FILE_SHORTDISPLAY; short filter =0; short sort =FILE_SORT_ALPHA;
+ char *dir= NULL; char *path= RNA_string_get_alloc(handler->op->ptr, "filename", NULL, 0);
if(event->val==EVT_FILESELECT_OPEN)
ED_area_newspace(C, handler->op_area, SPACE_FILE);
@@ -792,9 +805,11 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
filter = sfile->params->filter;
display = sfile->params->display;
sort = sfile->params->sort;
+ dir = sfile->params->dir;
}
- ED_fileselect_set_params(sfile, handler->op->type->name, path, flag, display, filter, sort);
+ ED_fileselect_set_params(sfile, handler->op->type->name, dir, path, flag, display, filter, sort);
+ dir = NULL;
MEM_freeN(path);
action= WM_HANDLER_BREAK;
@@ -869,6 +884,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
{
wmEventHandler *handler, *nexthandler;
int action= WM_HANDLER_CONTINUE;
+ int always_pass;
if(handlers==NULL) return action;
@@ -878,6 +894,8 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
/* optional boundbox */
if(handler_boundbox_test(handler, event)) {
+ /* in advance to avoid access to freed event on window close */
+ always_pass= wm_event_always_pass(event);
/* modal+blocking handler */
if(handler->flag & WM_HANDLER_BLOCKING)
@@ -909,7 +927,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
action= wm_handler_operator_call(C, handlers, handler, event, NULL);
}
- if(!wm_event_always_pass(event) && action==WM_HANDLER_BREAK)
+ if(!always_pass && action==WM_HANDLER_BREAK)
break;
}
@@ -1492,4 +1510,3 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
break;
}
}
-
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index d13d8ec6ccc..51389ef890c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -294,8 +294,6 @@ int WM_read_homefile(bContext *C, wmOperator *op)
G.relbase_valid = 0;
if (!from_memory) {
BLI_make_file_string(G.sce, tstr, home, ".B25.blend");
- if(!BLI_exists(tstr))
- BLI_make_file_string(G.sce, tstr, home, ".B.blend");
}
strcpy(scestr, G.sce); /* temporary store */
@@ -336,8 +334,8 @@ int WM_read_homefile(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_WM|ND_FILEREAD, NULL);
CTX_wm_window_set(C, NULL); /* exits queues */
-
- return success;
+
+ return OPERATOR_FINISHED;
}
@@ -577,7 +575,7 @@ void WM_write_file(bContext *C, char *target, ReportList *reports)
// }
if (G.fileflags & G_AUTOPACK) {
- packAll();
+ packAll(G.main, reports);
}
ED_object_exit_editmode(C, 0);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index adbc43e439d..0bc35ffa9b2 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -58,8 +58,6 @@
#include "RE_pipeline.h" /* RE_ free stuff */
-#include "radio.h"
-
#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
#endif
@@ -196,9 +194,6 @@ void WM_exit(bContext *C)
// BIF_freeRetarget();
BIF_freeTemplates(C);
BIF_freeSketch(C);
-
- /* Context should still working here. but radio tool needs cleaning... */
- freeAllRad(CTX_data_scene(C));
free_ttfont(); /* bke_font.h */
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 7528321c7c5..b914e63788d 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -44,6 +44,7 @@
#include "RNA_access.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -153,315 +154,11 @@ ListBase *WM_keymap_listbase(wmWindowManager *wm, const char *nameid, int spacei
/* ***************** get string from key events **************** */
-char *WM_key_event_string(short type)
+const char *WM_key_event_string(short type)
{
- /* not returned: CAPSLOCKKEY, UNKNOWNKEY, COMMANDKEY, GRLESSKEY */
-
- switch(type) {
- case AKEY:
- return "A";
- break;
- case BKEY:
- return "B";
- break;
- case CKEY:
- return "C";
- break;
- case DKEY:
- return "D";
- break;
- case EKEY:
- return "E";
- break;
- case FKEY:
- return "F";
- break;
- case GKEY:
- return "G";
- break;
- case HKEY:
- return "H";
- break;
- case IKEY:
- return "I";
- break;
- case JKEY:
- return "J";
- break;
- case KKEY:
- return "K";
- break;
- case LKEY:
- return "L";
- break;
- case MKEY:
- return "M";
- break;
- case NKEY:
- return "N";
- break;
- case OKEY:
- return "O";
- break;
- case PKEY:
- return "P";
- break;
- case QKEY:
- return "Q";
- break;
- case RKEY:
- return "R";
- break;
- case SKEY:
- return "S";
- break;
- case TKEY:
- return "T";
- break;
- case UKEY:
- return "U";
- break;
- case VKEY:
- return "V";
- break;
- case WKEY:
- return "W";
- break;
- case XKEY:
- return "X";
- break;
- case YKEY:
- return "Y";
- break;
- case ZKEY:
- return "Z";
- break;
-
- case ZEROKEY:
- return "Zero";
- break;
- case ONEKEY:
- return "One";
- break;
- case TWOKEY:
- return "Two";
- break;
- case THREEKEY:
- return "Three";
- break;
- case FOURKEY:
- return "Four";
- break;
- case FIVEKEY:
- return "Five";
- break;
- case SIXKEY:
- return "Six";
- break;
- case SEVENKEY:
- return "Seven";
- break;
- case EIGHTKEY:
- return "Eight";
- break;
- case NINEKEY:
- return "Nine";
- break;
-
- case LEFTCTRLKEY:
- return "Leftctrl";
- break;
- case LEFTALTKEY:
- return "Leftalt";
- break;
- case RIGHTALTKEY:
- return "Rightalt";
- break;
- case RIGHTCTRLKEY:
- return "Rightctrl";
- break;
- case RIGHTSHIFTKEY:
- return "Rightshift";
- break;
- case LEFTSHIFTKEY:
- return "Leftshift";
- break;
-
- case ESCKEY:
- return "Esc";
- break;
- case TABKEY:
- return "Tab";
- break;
- case RETKEY:
- return "Ret";
- break;
- case SPACEKEY:
- return "Space";
- break;
- case LINEFEEDKEY:
- return "Linefeed";
- break;
- case BACKSPACEKEY:
- return "Backspace";
- break;
- case DELKEY:
- return "Del";
- break;
- case SEMICOLONKEY:
- return "Semicolon";
- break;
- case PERIODKEY:
- return "Period";
- break;
- case COMMAKEY:
- return "Comma";
- break;
- case QUOTEKEY:
- return "Quote";
- break;
- case ACCENTGRAVEKEY:
- return "Accentgrave";
- break;
- case MINUSKEY:
- return "Minus";
- break;
- case SLASHKEY:
- return "Slash";
- break;
- case BACKSLASHKEY:
- return "Backslash";
- break;
- case EQUALKEY:
- return "Equal";
- break;
- case LEFTBRACKETKEY:
- return "Leftbracket";
- break;
- case RIGHTBRACKETKEY:
- return "Rightbracket";
- break;
-
- case LEFTARROWKEY:
- return "Leftarrow";
- break;
- case DOWNARROWKEY:
- return "Downarrow";
- break;
- case RIGHTARROWKEY:
- return "Rightarrow";
- break;
- case UPARROWKEY:
- return "Uparrow";
- break;
-
- case PAD2:
- return "Numpad 2";
- break;
- case PAD4:
- return "Numpad 4";
- break;
- case PAD6:
- return "Numpad 6";
- break;
- case PAD8:
- return "Numpad 8";
- break;
- case PAD1:
- return "Numpad 1";
- break;
- case PAD3:
- return "Numpad 3";
- break;
- case PAD5:
- return "Numpad 5";
- break;
- case PAD7:
- return "Numpad 7";
- break;
- case PAD9:
- return "Numpad 9";
- break;
-
- case PADPERIOD:
- return "Numpad .";
- break;
- case PADSLASHKEY:
- return "Numpad /";
- break;
- case PADASTERKEY:
- return "Numpad *";
- break;
-
- case PAD0:
- return "Numpad 0";
- break;
- case PADMINUS:
- return "Numpad -";
- break;
- case PADENTER:
- return "Numpad Enter";
- break;
- case PADPLUSKEY:
- return "Numpad +";
- break;
-
- case F1KEY:
- return "F1";
- break;
- case F2KEY:
- return "F2";
- break;
- case F3KEY:
- return "F3";
- break;
- case F4KEY:
- return "F4";
- break;
- case F5KEY:
- return "F5";
- break;
- case F6KEY:
- return "F6";
- break;
- case F7KEY:
- return "F7";
- break;
- case F8KEY:
- return "F8";
- break;
- case F9KEY:
- return "F9";
- break;
- case F10KEY:
- return "F10";
- break;
- case F11KEY:
- return "F11";
- break;
- case F12KEY:
- return "F12";
- break;
-
- case PAUSEKEY:
- return "Pause";
- break;
- case INSERTKEY:
- return "Insert";
- break;
- case HOMEKEY:
- return "Home";
- break;
- case PAGEUPKEY:
- return "Pageup";
- break;
- case PAGEDOWNKEY:
- return "Pagedown";
- break;
- case ENDKEY:
- return "End";
- break;
- }
+ const char *name= NULL;
+ if(RNA_enum_name(event_type_items, (int)type, &name))
+ return name;
return "";
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 3b6d605df61..d7cac82ef90 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -82,7 +82,22 @@ static ListBase global_ops= {NULL, NULL};
/* ************ operator API, exported ********** */
-wmOperatorType *WM_operatortype_find(const char *idname)
+wmOperatorType *WM_operatortype_find(const char *idname, int quiet)
+{
+ wmOperatorType *ot;
+
+ for(ot= global_ops.first; ot; ot= ot->next) {
+ if(strncmp(ot->idname, idname, OP_MAX_TYPENAME)==0)
+ return ot;
+ }
+
+ if(!quiet)
+ printf("search for unknown operator %s\n", idname);
+
+ return NULL;
+}
+
+wmOperatorType *WM_operatortype_exists(const char *idname)
{
wmOperatorType *ot;
@@ -90,7 +105,6 @@ wmOperatorType *WM_operatortype_find(const char *idname)
if(strncmp(ot->idname, idname, OP_MAX_TYPENAME)==0)
return ot;
}
- printf("search for unknown operator %s\n", idname);
return NULL;
}
@@ -126,7 +140,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *us
int WM_operatortype_remove(const char *idname)
{
- wmOperatorType *ot = WM_operatortype_find(idname);
+ wmOperatorType *ot = WM_operatortype_find(idname, 0);
if (ot==NULL)
return 0;
@@ -145,7 +159,6 @@ char *WM_operator_pystring(wmOperator *op)
const char *arg_name= NULL;
PropertyRNA *prop, *iterprop;
- CollectionPropertyIterator iter;
/* for building the string */
DynStr *dynstr= BLI_dynstr_new();
@@ -155,10 +168,9 @@ char *WM_operator_pystring(wmOperator *op)
BLI_dynstr_appendf(dynstr, "%s(", op->idname);
iterprop= RNA_struct_iterator_property(op->ptr->type);
- RNA_property_collection_begin(op->ptr, iterprop, &iter);
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- prop= iter.ptr.data;
+ RNA_PROP_BEGIN(op->ptr, propptr, iterprop) {
+ prop= propptr.data;
arg_name= RNA_property_identifier(prop);
if (strcmp(arg_name, "rna_type")==0) continue;
@@ -170,8 +182,7 @@ char *WM_operator_pystring(wmOperator *op)
MEM_freeN(buf);
first_iter = 0;
}
-
- RNA_property_collection_end(&iter);
+ RNA_PROP_END;
BLI_dynstr_append(dynstr, ")");
@@ -182,7 +193,7 @@ char *WM_operator_pystring(wmOperator *op)
void WM_operator_properties_create(PointerRNA *ptr, const char *opstring)
{
- wmOperatorType *ot= WM_operatortype_find(opstring);
+ wmOperatorType *ot= WM_operatortype_find(opstring, 0);
if(ot)
RNA_pointer_create(NULL, ot->srna, NULL, ptr);
@@ -291,7 +302,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style);
- uiDefAutoButsRNA(C, layout, &ptr);
+ uiDefAutoButsRNA(C, layout, &ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
@@ -299,7 +310,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
return block;
}
-int WM_operator_redo(bContext *C, wmOperator *op, wmEvent *event)
+int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *event)
{
int retval= OPERATOR_CANCELLED;
@@ -333,7 +344,7 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op)
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1);
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style);
- uiDefAutoButsRNA(C, layout, op->ptr);
+ uiDefAutoButsRNA(C, layout, op->ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
@@ -402,7 +413,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u
name[len]= '|';
}
- if(0==uiSearchItemAdd(items, name, ot))
+ if(0==uiSearchItemAdd(items, name, ot, 0))
break;
}
}
@@ -421,7 +432,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op)
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_RET_1);
but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 10, 180, 19, "");
- uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb);
+ uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL);
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 180, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
@@ -503,7 +514,7 @@ static void WM_OT_read_homefile(wmOperatorType *ot)
static int recentfile_exec(bContext *C, wmOperator *op)
{
- int event= RNA_enum_get(op->ptr, "nr");
+ int event= RNA_int_get(op->ptr, "nr");
// 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?
@@ -557,7 +568,7 @@ static void WM_OT_open_recentfile(wmOperatorType *ot)
ot->exec= recentfile_exec;
ot->poll= WM_operator_winactive;
- RNA_def_property(ot->srna, "nr", PROP_ENUM, PROP_NONE);
+ RNA_def_property(ot->srna, "nr", PROP_INT, PROP_UNSIGNED);
}
/* ********* main file *********** */
@@ -1399,10 +1410,10 @@ void WM_radial_control_string(wmOperator *op, char str[], int maxlen)
void WM_OT_radial_control_partial(wmOperatorType *ot)
{
static EnumPropertyItem prop_mode_items[] = {
- {WM_RADIALCONTROL_SIZE, "SIZE", "Size", ""},
- {WM_RADIALCONTROL_STRENGTH, "STRENGTH", "Strength", ""},
- {WM_RADIALCONTROL_ANGLE, "ANGLE", "Angle", ""},
- {0, NULL, NULL, NULL}};
+ {WM_RADIALCONTROL_SIZE, "SIZE", 0, "Size", ""},
+ {WM_RADIALCONTROL_STRENGTH, "STRENGTH", 0, "Strength", ""},
+ {WM_RADIALCONTROL_ANGLE, "ANGLE", 0, "Angle", ""},
+ {0, NULL, 0, NULL, NULL}};
/* Should be set in custom invoke() */
RNA_def_float(ot->srna, "initial_value", 0, 0, FLT_MAX, "Initial Value", "", 0, FLT_MAX);
@@ -1484,12 +1495,12 @@ static int ten_timer_exec(bContext *C, wmOperator *op)
static void WM_OT_ten_timer(wmOperatorType *ot)
{
static EnumPropertyItem prop_type_items[] = {
- {0, "DRAW", "Draw Region", ""},
- {1, "DRAWSWAP", "Draw Region + Swap", ""},
- {2, "DRAWWINSWAP", "Draw Window + Swap", ""},
- {3, "ANIMSTEP", "Anim Step", ""},
- {4, "UNDO", "Undo/Redo", ""},
- {0, NULL, NULL, NULL}};
+ {0, "DRAW", 0, "Draw Region", ""},
+ {1, "DRAWSWAP", 0, "Draw Region + Swap", ""},
+ {2, "DRAWWINSWAP", 0, "Draw Window + Swap", ""},
+ {3, "ANIMSTEP", 0, "Anim Step", ""},
+ {4, "UNDO", 0, "Undo/Redo", ""},
+ {0, NULL, 0, NULL, NULL}};
ot->name= "Ten Timer";
ot->idname= "WM_OT_ten_timer";
@@ -1546,7 +1557,7 @@ void wm_window_keymap(wmWindowManager *wm)
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, 0, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_CTRL, 0);
/* debug/testing */
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 9bd55e1c5a7..835fdca52fe 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -1,5 +1,5 @@
/**
- * $Id: mywindow.c 9584 2007-01-03 13:45:03Z ton $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index cb6bcb41366..2d320458543 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -595,6 +595,12 @@ void wm_window_process_events(const bContext *C)
PIL_sleep_ms(5);
}
+void wm_window_process_events_nosleep(const bContext *C)
+{
+ if(GHOST_ProcessEvents(g_system, 0))
+ GHOST_DispatchEvents(g_system);
+}
+
/* exported as handle callback to bke blender.c */
void wm_window_testbreak(void)
{
diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h
index 1a1a0d0b71d..3d1b49983ed 100644
--- a/source/blender/windowmanager/wm_cursors.h
+++ b/source/blender/windowmanager/wm_cursors.h
@@ -1,5 +1,5 @@
/**
- * $Id: BIF_cursors.h 7739 2006-06-15 14:22:59Z broken $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index 99853c77a55..9a3bba9af1d 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -82,6 +82,8 @@ enum {
/* wm_event_system.c */
void wm_event_add (wmWindow *win, wmEvent *event_to_add);
void wm_event_free_all (wmWindow *win);
+void wm_event_free (wmEvent *event);
+
/* goes over entire hierarchy: events -> window -> screen -> area -> region */
void wm_event_do_handlers (bContext *C);
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index 7bf08617fb6..45fa9bf6cf7 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -40,6 +40,7 @@ void wm_window_free (bContext *C, wmWindow *win);
void wm_window_title (wmWindowManager *wm, wmWindow *win);
void wm_window_add_ghostwindows (wmWindowManager *wm);
void wm_window_process_events (const bContext *C);
+void wm_window_process_events_nosleep(const bContext *C);
void wm_window_make_drawable(bContext *C, wmWindow *win);
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 221c0a92e09..cd0d551211f 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -151,7 +151,7 @@ IF(WIN32)
COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\ui\\*.*\" \"${TARGETDIR}\\.blender\\ui\"
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\\python25.zip\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python26.zip\" \"${TARGETDIR}\\\"
)
FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
@@ -164,7 +164,8 @@ IF(WIN32)
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\\python25.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python26.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python26_d.dll\" \"${TARGETDIR}\\\"
COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
)
@@ -198,7 +199,7 @@ ADD_DEPENDENCIES(blender makesdna)
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 blender_radiosity)
+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)
@@ -218,9 +219,9 @@ IF(UNIX)
bf_ghost
bf_string
blender_render
- blender_radiosity
blender_ONL
bf_python
+ bf_gen_python
bf_blenkernel
bf_nodes
bf_gpu
@@ -237,7 +238,6 @@ IF(UNIX)
bf_kernel
bf_decimation
bf_elbeem
- bf_yafray
bf_IK
bf_memutil
bf_guardedalloc
@@ -263,12 +263,10 @@ IF(UNIX)
bf_ngnetwork
extern_bullet
bf_loopbacknetwork
- bf_sumo
bf_common
- extern_solid
- extern_qhull
bf_moto
bf_python
+ bf_gen_python
bf_quicktime
extern_binreloc
extern_glew
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 5ffce91ec2d..9bf09a46461 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -77,6 +77,8 @@
#include "WM_api.h"
+#include "RNA_define.h"
+
#include "GPU_draw.h"
#include "GPU_extensions.h"
@@ -310,11 +312,13 @@ int main(int argc, char **argv)
BLI_where_am_i(bprogname, argv[0]);
+ RNA_init();
+
/* Hack - force inclusion of the plugin api functions,
* see blenpluginapi:pluginapi.c
*/
pluginapi_force_ref();
-
+
init_nodesystem();
initglobals(); /* blender.c */
@@ -710,7 +714,7 @@ int main(int argc, char **argv)
//XXX
// FOR TESTING ONLY
a++;
- BPY_run_python_script(C, argv[a], NULL);
+ BPY_run_python_script(C, argv[a], NULL, NULL); // use reports?
#if 0
a++;
if (a < argc) {
@@ -719,7 +723,7 @@ int main(int argc, char **argv)
main_init_screen();
scr_init = 1;
}
- BPY_run_python_script(C, argv[a], NULL);
+ BPY_run_python_script(C, argv[a], NULL, NULL); // use reports?
}
else printf("\nError: you must specify a Python script after '-P '.\n");
#endif
@@ -868,7 +872,7 @@ static void error_cb(char *err)
static void mem_error_cb(char *errorStr)
{
- fprintf(stderr, "%s", errorStr);
+ fputs(errorStr, stderr);
fflush(stderr);
}
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 4ac28e36c48..fb222b419c3 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -65,34 +65,41 @@
#include "SYS_System.h"
- /***/
+#include "GPU_extensions.h"
+#include "Value.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /***/
#include "DNA_view3d_types.h"
#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
#include "BKE_global.h"
#include "BKE_report.h"
+
#include "BKE_utildefines.h"
//XXX #include "BIF_screen.h"
//XXX #include "BIF_scrarea.h"
-#include "BKE_main.h"
+#include "BKE_main.h"
#include "BLI_blenlib.h"
#include "BLO_readfile.h"
#include "DNA_scene_types.h"
/***/
-#include "GPU_extensions.h"
-#include "Value.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
//XXX #include "BSE_headerbuttons.h"
-void update_for_newframe();
+#include "BKE_context.h"
+#include "../../blender/windowmanager/WM_types.h"
+#include "../../blender/windowmanager/wm_window.h"
+#include "../../blender/windowmanager/wm_event_system.h"
#ifdef __cplusplus
}
#endif
+
static BlendFileData *load_game_data(char *filename)
{
ReportList reports;
@@ -111,18 +118,19 @@ static BlendFileData *load_game_data(char *filename)
return bfd;
}
-extern "C" void StartKetsjiShell(struct ScrArea *area,
- struct ARegion *ar,
- char* scenename,
- struct Main* maggie1,
- struct SpaceIpo *sipo,
- int always_use_expand_framing)
+extern "C" void StartKetsjiShell(struct bContext *C, int always_use_expand_framing)
{
+ /* context values */
+ struct wmWindow *win= CTX_wm_window(C);
+ struct ARegion *ar= CTX_wm_region(C);
+ struct Scene *scene= CTX_data_scene(C);
+ struct Main* maggie1= CTX_data_main(C);
+
+
int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
- Scene *scene= NULL; // XXX give as arg
Main* blenderdata = maggie1;
- char* startscenename = scenename;
+ char* startscenename = scene->id.name+2;
char pathname[FILE_MAXDIR+FILE_MAXFILE], oldsce[FILE_MAXDIR+FILE_MAXFILE];
STR_String exitstring = "";
BlendFileData *bfd= NULL;
@@ -142,8 +150,8 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
do
{
- View3D *v3d= (View3D*) area->spacedata.first;
- RegionView3D *rv3d= (RegionView3D*) ar->regiondata;
+ View3D *v3d= CTX_wm_view3d(C);
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
// get some preferences
SYS_SystemHandle syshandle = SYS_GetSystem();
@@ -156,7 +164,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
// create the canvas, rasterizer and rendertools
- RAS_ICanvas* canvas = new KX_BlenderCanvas(area);
+ RAS_ICanvas* canvas = new KX_BlenderCanvas(win, ar);
canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
RAS_IRenderTools* rendertools = new KX_BlenderRenderTools();
RAS_IRasterizer* rasterizer = NULL;
@@ -222,13 +230,12 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
scene->camera= v3d->camera;
}
-
// some blender stuff
MT_CmMatrix4x4 projmat;
MT_CmMatrix4x4 viewmat;
float camzoom;
int i;
-
+
for (i = 0; i < 16; i++)
{
float *viewmat_linear= (float*) rv3d->viewmat;
@@ -236,11 +243,11 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
}
for (i = 0; i < 16; i++)
{
- float *projmat_linear; //XXX = (float*) area->winmat;
+ float *projmat_linear= (float*) rv3d->winmat;
projmat.setElem(i, projmat_linear[i]);
}
- if(v3d->persp==V3D_CAMOB) {
+ if(rv3d->persp==V3D_CAMOB) {
camzoom = (1.41421 + (rv3d->camzoom / 50.0));
camzoom *= camzoom;
}
@@ -331,17 +338,18 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
{
- if (v3d->persp != V3D_CAMOB)
+ if (rv3d->persp != V3D_CAMOB)
{
ketsjiengine->EnableCameraOverride(startscenename);
- ketsjiengine->SetCameraOverrideUseOrtho((v3d->persp == V3D_ORTHO));
+ ketsjiengine->SetCameraOverrideUseOrtho((rv3d->persp == V3D_ORTHO));
ketsjiengine->SetCameraOverrideProjectionMatrix(projmat);
ketsjiengine->SetCameraOverrideViewMatrix(viewmat);
ketsjiengine->SetCameraOverrideClipping(v3d->near, v3d->far);
+ ketsjiengine->SetCameraOverrideLens(v3d->lens);
}
// create a scene converter, create and convert the startingscene
- KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata,sipo, ketsjiengine);
+ KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata, ketsjiengine);
ketsjiengine->SetSceneConverter(sceneconverter);
sceneconverter->addInitFromFrame=false;
if (always_use_expand_framing)
@@ -423,7 +431,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
exitrequested = ketsjiengine->GetExitCode();
// kick the engine
- bool render = ketsjiengine->NextFrame();
+ bool render = ketsjiengine->NextFrame(); // XXX 2.5 Bug, This is never true! FIXME- Campbell
if (render)
{
@@ -431,26 +439,37 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
ketsjiengine->Render();
}
+ wm_window_process_events_nosleep(C);
+
// test for the ESC key
- while (0) //XXX while (qtest())
+ //XXX while (qtest())
+ while(wmEvent *event= (wmEvent *)win->queue.first)
{
- short val;
- unsigned short event = 0; //XXX extern_qread(&val);
+ short val = 0;
+ //unsigned short event = 0; //XXX extern_qread(&val);
- if (keyboarddevice->ConvertBlenderEvent(event,val))
+ if (keyboarddevice->ConvertBlenderEvent(event->type,event->val))
exitrequested = KX_EXIT_REQUEST_BLENDER_ESC;
/* Coordinate conversion... where
* should this really be?
*/
- if (event==MOUSEX) {
- val = 0;//XXX val - scrarea_get_win_x(area);
- } else if (event==MOUSEY) {
- val = 0;//XXX scrarea_get_win_height(area) - (val - scrarea_get_win_y(area)) - 1;
+ if (event->type==MOUSEMOVE) {
+ /* Note nice! XXX 2.5 event hack */
+ val = event->x - ar->winrct.xmin;
+ mousedevice->ConvertBlenderEvent(MOUSEX, val);
+
+ val = ar->winy - (event->y - ar->winrct.ymin) - 1;
+ mousedevice->ConvertBlenderEvent(MOUSEY, val);
+ }
+ else {
+ mousedevice->ConvertBlenderEvent(event->type,event->val);
}
- mousedevice->ConvertBlenderEvent(event,val);
+ BLI_remlink(&win->queue, event);
+ wm_event_free(event);
}
+
}
printf("\nBlender Game Engine Finished\n\n");
exitstring = ketsjiengine->GetExitString();
@@ -557,11 +576,10 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
PyGILState_Release(gilstate);
}
-extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
+extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
struct ARegion *ar,
char* scenename,
struct Main* maggie,
- struct SpaceIpo *sipo,
int always_use_expand_framing)
{
int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
@@ -596,7 +614,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
bool usemat = false;
// create the canvas, rasterizer and rendertools
- RAS_ICanvas* canvas = new KX_BlenderCanvas(area);
+ RAS_ICanvas* canvas = new KX_BlenderCanvas(win, ar);
//canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
RAS_IRenderTools* rendertools = new KX_BlenderRenderTools();
RAS_IRasterizer* rasterizer = NULL;
@@ -649,7 +667,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
cframe=blscene->r.cfra;
startFrame = blscene->r.sfra;
blscene->r.cfra=startFrame;
- update_for_newframe();
+ // update_for_newframe(); // XXX scene_update_for_newframe wont cut it!
ketsjiengine->SetGame2IpoMode(game2ipo,startFrame);
}
@@ -660,7 +678,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
{
// create a scene converter, create and convert the startingscene
- KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie,sipo, ketsjiengine);
+ KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie, ketsjiengine);
ketsjiengine->SetSceneConverter(sceneconverter);
sceneconverter->addInitFromFrame=true;
@@ -723,7 +741,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
// kick the engine
ketsjiengine->NextFrame();
blscene->r.cfra=blscene->r.cfra+1;
- update_for_newframe();
+ // update_for_newframe(); // XXX scene_update_for_newframe wont cut it
}
exitstring = ketsjiengine->GetExitString();
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index 3b690a21584..2874a0273cc 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -19,7 +19,8 @@ SET(INC
../../../source/blender/windowmanager
../../../source/blender
../../../source/blender/include
- ../../../source/blender/makesdna
+ ../../../source/blender/makesdna
+ ../../../source/blender/makesrna
../../../source/gameengine/Rasterizer
../../../source/gameengine/GameLogic
../../../source/gameengine/Expressions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
index 750a1ef3f93..360794ceb33 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
@@ -26,15 +26,18 @@
* ***** END GPL LICENSE BLOCK *****
*/
-//XXX #include "BIF_scrarea.h"
#include "KX_BlenderCanvas.h"
+#include "DNA_screen_types.h"
+#include "stdio.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-KX_BlenderCanvas::KX_BlenderCanvas(struct ScrArea *area) :
-m_area(area)
+
+KX_BlenderCanvas::KX_BlenderCanvas(struct wmWindow *win, ARegion *ar) :
+m_win(win),
+m_ar(ar)
{
}
@@ -50,7 +53,7 @@ void KX_BlenderCanvas::Init()
void KX_BlenderCanvas::SwapBuffers()
{
- BL_SwapBuffers();
+ BL_SwapBuffers(m_win);
}
void KX_BlenderCanvas::BeginFrame()
@@ -93,12 +96,12 @@ void KX_BlenderCanvas::ClearBuffer(int type)
int KX_BlenderCanvas::GetWidth(
) const {
- return 0; //XXX scrarea_get_win_width(m_area);
+ return m_ar->winx;
}
int KX_BlenderCanvas::GetHeight(
) const {
- return 0; //XXX scrarea_get_win_height(m_area);
+ return m_ar->winy;
}
RAS_Rect &
@@ -116,8 +119,8 @@ SetViewPort(
){
int vp_width = (x2 - x1) + 1;
int vp_height = (y2 - y1) + 1;
- int minx = 0;//XXX scrarea_get_win_x(m_area);
- int miny = 0;//XXX scrarea_get_win_y(m_area);
+ int minx = m_ar->winrct.xmin;
+ int miny = m_ar->winrct.ymin;
m_area_rect.SetLeft(minx + x1);
m_area_rect.SetBottom(miny + y1);
@@ -159,9 +162,9 @@ void KX_BlenderCanvas::SetMouseState(RAS_MouseState mousestate)
// (0,0) is top left, (width,height) is bottom right
void KX_BlenderCanvas::SetMousePosition(int x,int y)
{
- int winX = 0;//XXX scrarea_get_win_x(m_area);
- int winY = 0;//XXX scrarea_get_win_y(m_area);
- int winH = 0;//XXX scrarea_get_win_height(m_area);
+ int winX = m_ar->winrct.xmin;
+ int winY = m_ar->winrct.ymin;
+ int winH = m_ar->winy;
BL_warp_pointer(winX + x, winY + (winH-y-1));
}
@@ -170,5 +173,5 @@ void KX_BlenderCanvas::SetMousePosition(int x,int y)
void KX_BlenderCanvas::MakeScreenShot(const char* filename)
{
- BL_MakeScreenShot(m_area, filename);
+ BL_MakeScreenShot(m_ar, filename);
}
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
index bc202a8558c..fd41fb90f2f 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
+++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
@@ -40,7 +40,8 @@
#include "KX_BlenderGL.h"
-struct ScrArea;
+struct ARegion;
+struct wmWindow;
/**
* 2D Blender device context abstraction.
@@ -57,9 +58,9 @@ private:
public:
/* Construct a new canvas.
*
- * @param area The Blender ScrArea to run the game within.
+ * @param area The Blender ARegion to run the game within.
*/
- KX_BlenderCanvas(struct ScrArea* area);
+ KX_BlenderCanvas(struct wmWindow* win, struct ARegion* ar);
~KX_BlenderCanvas();
void
@@ -162,7 +163,8 @@ public:
private:
/** Blender area the game engine is running within */
- struct ScrArea* m_area;
+ struct ARegion* m_ar;
+ struct wmWindow* m_win;
RAS_Rect m_area_rect;
};
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
index de7a7f54fde..5cf696fe146 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
@@ -27,7 +27,14 @@
*/
#include "KX_BlenderGL.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#include "BLF_api.h"
+#ifdef __cplusplus
+}
+#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -58,6 +65,7 @@
#include "DNA_image_types.h"
#include "DNA_view3d_types.h"
#include "DNA_material_types.h"
+#include "DNA_windowmanager_types.h"
#include "BKE_global.h"
#include "BKE_bmfont.h"
@@ -68,7 +76,7 @@ extern "C" {
//XXX #include "BIF_mywindow.h"
//XXX #include "BIF_toolbox.h"
//XXX #include "BIF_graphics.h" /* For CURSOR_NONE CURSOR_WAIT CURSOR_STD */
-
+void wm_window_swap_buffers(wmWindow *win); // wm_window.h
}
/* end of blender block */
@@ -86,8 +94,10 @@ void BL_warp_pointer(int x,int y)
//XXX warp_pointer(x,y);
}
-void BL_SwapBuffers()
+void BL_SwapBuffers(wmWindow *win)
{
+ //wmWindow *window= CTX_wm_window(C);
+ wm_window_swap_buffers(win);
//XXX myswapbuffers();
}
@@ -214,7 +224,7 @@ void BL_NormalMouse()
#define MAX_FILE_LENGTH 512
-void BL_MakeScreenShot(struct ScrArea *area, const char* filename)
+void BL_MakeScreenShot(struct ARegion *ar, const char* filename)
{
char copyfilename[MAX_FILE_LENGTH];
strcpy(copyfilename,filename);
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.h b/source/gameengine/BlenderRoutines/KX_BlenderGL.h
index b891a7343c2..1e65f29d87c 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.h
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.h
@@ -33,14 +33,15 @@
extern "C" {
#endif //__cplusplus
-struct ScrArea;
+struct wmWindow;
+struct ARegion;
// special swapbuffers, that takes care of which area (viewport) needs to be swapped
-void BL_SwapBuffers();
+void BL_SwapBuffers(struct wmWindow *win);
void BL_warp_pointer(int x,int y);
-void BL_MakeScreenShot(struct ScrArea *area, const char* filename);
+void BL_MakeScreenShot(struct ARegion *ar, const char* filename);
void BL_HideMouse();
void BL_NormalMouse();
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
index 17d1bf65ca4..ffff7185fe4 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
@@ -28,8 +28,6 @@
#include "GL/glew.h"
-#include "DNA_scene_types.h"
-
#include "RAS_IRenderTools.h"
#include "RAS_IRasterizer.h"
#include "RAS_LightObject.h"
@@ -41,6 +39,7 @@
#include "KX_BlenderMaterial.h"
#include "KX_RayCast.h"
#include "KX_IPhysicsController.h"
+#include "KX_Light.h"
#include "PHY_IPhysicsEnvironment.h"
@@ -330,21 +329,12 @@ int KX_BlenderRenderTools::applyLights(int objectlayer, const MT_Transform& view
{
// taken from blender source, incompatibility between Blender Object / GameObject
KX_Scene* kxscene = (KX_Scene*)m_auxilaryClientInfo;
- int scenelayer = ~0;
float glviewmat[16];
unsigned int count;
- float vec[4];
-
- vec[3]= 1.0;
+ std::vector<struct RAS_LightObject*>::iterator lit = m_lights.begin();
- if(kxscene && kxscene->GetBlenderScene())
- scenelayer = kxscene->GetBlenderScene()->lay;
-
for(count=0; count<m_numgllights; count++)
glDisable((GLenum)(GL_LIGHT0+count));
-
- //std::vector<struct RAS_LightObject*> m_lights;
- std::vector<struct RAS_LightObject*>::iterator lit = m_lights.begin();
viewmat.getValue(glviewmat);
@@ -353,82 +343,14 @@ int KX_BlenderRenderTools::applyLights(int objectlayer, const MT_Transform& view
for (lit = m_lights.begin(), count = 0; !(lit==m_lights.end()) && count < m_numgllights; ++lit)
{
RAS_LightObject* lightdata = (*lit);
- KX_Scene* lightscene = (KX_Scene*)lightdata->m_scene;
-
- /* only use lights in the same layer as the object */
- if(!(lightdata->m_layer & objectlayer))
- continue;
- /* only use lights in the same scene, and in a visible layer */
- if(kxscene != lightscene || !(lightdata->m_layer & scenelayer))
- continue;
-
- vec[0] = (*(lightdata->m_worldmatrix))(0,3);
- vec[1] = (*(lightdata->m_worldmatrix))(1,3);
- vec[2] = (*(lightdata->m_worldmatrix))(2,3);
- vec[3] = 1;
-
- if(lightdata->m_type==RAS_LightObject::LIGHT_SUN) {
-
- vec[0] = (*(lightdata->m_worldmatrix))(0,2);
- vec[1] = (*(lightdata->m_worldmatrix))(1,2);
- vec[2] = (*(lightdata->m_worldmatrix))(2,2);
- //vec[0]= base->object->obmat[2][0];
- //vec[1]= base->object->obmat[2][1];
- //vec[2]= base->object->obmat[2][2];
- vec[3]= 0.0;
- glLightfv((GLenum)(GL_LIGHT0+count), GL_POSITION, vec);
- }
- else {
- //vec[3]= 1.0;
- glLightfv((GLenum)(GL_LIGHT0+count), GL_POSITION, vec);
- glLightf((GLenum)(GL_LIGHT0+count), GL_CONSTANT_ATTENUATION, 1.0);
- glLightf((GLenum)(GL_LIGHT0+count), GL_LINEAR_ATTENUATION, lightdata->m_att1/lightdata->m_distance);
- // without this next line it looks backward compatible.
- //attennuation still is acceptable
- glLightf((GLenum)(GL_LIGHT0+count), GL_QUADRATIC_ATTENUATION, lightdata->m_att2/(lightdata->m_distance*lightdata->m_distance));
-
- if(lightdata->m_type==RAS_LightObject::LIGHT_SPOT) {
- vec[0] = -(*(lightdata->m_worldmatrix))(0,2);
- vec[1] = -(*(lightdata->m_worldmatrix))(1,2);
- vec[2] = -(*(lightdata->m_worldmatrix))(2,2);
- //vec[0]= -base->object->obmat[2][0];
- //vec[1]= -base->object->obmat[2][1];
- //vec[2]= -base->object->obmat[2][2];
- glLightfv((GLenum)(GL_LIGHT0+count), GL_SPOT_DIRECTION, vec);
- glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_CUTOFF, lightdata->m_spotsize/2.0);
- glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_EXPONENT, 128.0*lightdata->m_spotblend);
- }
- else glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_CUTOFF, 180.0);
- }
-
- if (lightdata->m_nodiffuse)
- {
- vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
- } else {
- vec[0]= lightdata->m_energy*lightdata->m_red;
- vec[1]= lightdata->m_energy*lightdata->m_green;
- vec[2]= lightdata->m_energy*lightdata->m_blue;
- vec[3]= 1.0;
- }
- glLightfv((GLenum)(GL_LIGHT0+count), GL_DIFFUSE, vec);
- if (lightdata->m_nospecular)
- {
- vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
- } else if (lightdata->m_nodiffuse) {
- vec[0]= lightdata->m_energy*lightdata->m_red;
- vec[1]= lightdata->m_energy*lightdata->m_green;
- vec[2]= lightdata->m_energy*lightdata->m_blue;
- vec[3]= 1.0;
- }
- glLightfv((GLenum)(GL_LIGHT0+count), GL_SPECULAR, vec);
- glEnable((GLenum)(GL_LIGHT0+count));
+ KX_LightObject *kxlight = (KX_LightObject*)lightdata->m_light;
- count++;
+ if(kxlight->ApplyLight(kxscene, objectlayer, count))
+ count++;
}
glPopMatrix();
return count;
-
}
void KX_BlenderRenderTools::MotionBlur(RAS_IRasterizer* rasterizer)
diff --git a/source/gameengine/BlenderRoutines/Makefile b/source/gameengine/BlenderRoutines/Makefile
index f5486bae87b..ffa99a0c1b2 100644
--- a/source/gameengine/BlenderRoutines/Makefile
+++ b/source/gameengine/BlenderRoutines/Makefile
@@ -36,8 +36,6 @@ include nan_compile.mk
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
-CPPFLAGS += -I$(NAN_SUMO)/include -I$(NAN_SOLID)/include
-CPPFLAGS += -I$(NAN_SOLID)
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_FUZZICS)/include
@@ -56,6 +54,7 @@ CPPFLAGS += -I../../blender/render/extern/include
CPPFLAGS += -I../../blender/blenloader
CPPFLAGS += -I../../blender/blenfont
CPPFLAGS += -I../../blender/gpu
+CPPFLAGS += -I../../blender/makesrna
CPPFLAGS += -I../Converter
CPPFLAGS += -I../Expressions
CPPFLAGS += -I../GameLogic
@@ -67,7 +66,6 @@ CPPFLAGS += -I../../kernel/gen_system
CPPFLAGS += -I../Network
CPPFLAGS += -I../Network/LoopBackNetwork
CPPFLAGS += -I../Physics/common
-CPPFLAGS += -I../Physics/Sumo
CPPFLAGS += -I.
ifeq ($(OS),windows)
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index a0cc3af3611..fc12f453d86 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -11,7 +11,8 @@ incs += ' #intern/ghost/include'
incs += ' #intern/moto/include #source/gameengine/Ketsji #source/blender/blenlib'
incs += ' #source/blender/blenkernel #source/blender'
incs += ' #source/blender/blenfont #source/blender/editors/include'
-incs += ' #source/blender/makesdna #source/gameengine/Rasterizer #source/gameengine/GameLogic'
+incs += ' #source/blender/makesdna #source/blender/makesrna'
+incs += ' #source/gameengine/Rasterizer #source/gameengine/GameLogic'
incs += ' #source/gameengine/Expressions #source/gameengine/Network'
incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common'
incs += ' #source/gameengine/Physics/Bullet'
@@ -20,11 +21,6 @@ incs += ' #intern/SoundSystem #source/blender/misc #source/blender/blenloader'
incs += ' #extern/glew/include #source/blender/gpu'
incs += ' #source/blender/windowmanager'
-if env['WITH_BF_SOLID']:
- incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/Fuzzics/include'
- incs += ' ' + env['BF_SOLID_INC']
- defs.append('USE_SUMO_SOLID')
-
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt
index fd05858710d..f546a31fb2e 100644
--- a/source/gameengine/CMakeLists.txt
+++ b/source/gameengine/CMakeLists.txt
@@ -38,7 +38,6 @@ ADD_SUBDIRECTORY(Rasterizer)
ADD_SUBDIRECTORY(Rasterizer/RAS_OpenGLRasterizer)
ADD_SUBDIRECTORY(SceneGraph)
ADD_SUBDIRECTORY(Physics/Bullet)
-ADD_SUBDIRECTORY(Physics/Sumo)
ADD_SUBDIRECTORY(VideoTexture)
IF(WITH_PLAYER)
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index e4dd588f06a..bed99a4f502 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -51,11 +51,19 @@
#include "BKE_utildefines.h"
#include "FloatValue.h"
#include "PyObjectPlus.h"
+#include "KX_PyMath.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+extern "C" {
+#include "BKE_animsys.h"
+#include "BKE_action.h"
+#include "RNA_access.h"
+#include "RNA_define.h"
+}
+
BL_ActionActuator::~BL_ActionActuator()
{
if (m_pose)
@@ -359,15 +367,35 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
/* Get the underlying pose from the armature */
obj->GetPose(&m_pose);
-
+
+// 2.4x function,
/* Override the necessary channels with ones from the action */
// XXX extract_pose_from_action(m_pose, m_action, m_localtime);
+
+
+// 2.5x - replacement for extract_pose_from_action(...) above.
+ {
+ struct PointerRNA id_ptr;
+ Object *arm= obj->GetArmatureObject();
+ bPose *pose_back= arm->pose;
+
+ arm->pose= m_pose;
+ RNA_id_pointer_create((ID *)arm, &id_ptr);
+ animsys_evaluate_action(&id_ptr, m_action, NULL, m_localtime);
+
+ arm->pose= pose_back;
+
+// 2.5x - could also do this but looks too high level, constraints use this, it works ok.
+// Object workob; /* evaluate using workob */
+// what_does_obaction((Scene *)obj->GetScene(), obj->GetArmatureObject(), &workob, m_pose, m_action, NULL, m_localtime);
+ }
+ // done getting the pose from the action
+
/* Perform the user override (if any) */
if (m_userpose){
extract_pose_from_pose(m_pose, m_userpose);
-// clear_pose(m_userpose);
- MEM_freeN(m_userpose);
+ game_free_pose(m_userpose); //cant use MEM_freeN(m_userpose) because the channels need freeing too.
m_userpose = NULL;
}
#if 1
@@ -381,7 +409,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
/* Find percentages */
newweight = (m_blendframe/(float)m_blendin);
- // XXX blend_poses(m_pose, m_blendpose, 1.0 - newweight, ACTSTRIPMODE_BLEND);
+ game_blend_poses(m_pose, m_blendpose, 1.0 - newweight);
/* Increment current blending percentage */
m_blendframe = (curtime - m_blendstart)*KX_KetsjiEngine::GetAnimFrameRate();
@@ -418,7 +446,7 @@ PyObject* BL_ActionActuator::PyGetAction(PyObject* args,
ShowDeprecationWarning("getAction()", "the action property");
if (m_action){
- return PyString_FromString(m_action->id.name+2);
+ return PyUnicode_FromString(m_action->id.name+2);
}
Py_RETURN_NONE;
}
@@ -767,22 +795,55 @@ PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* args,
Py_RETURN_NONE;
}
-/*
-PyObject* BL_ActionActuator::PyGetChannel(PyObject* args,
- PyObject* kwds) {
- char *string;
+PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) {
+ char *string= _PyUnicode_AsString(value);
- if (PyArg_ParseTuple(args,"s:getChannel",&string))
- {
- m_propname = string;
+ if (!string) {
+ PyErr_SetString(PyExc_TypeError, "expected a single string");
+ return NULL;
}
- else {
+
+ bPoseChannel *pchan;
+
+
+ // get_pose_channel accounts for NULL pose, run on both incase one exists but
+ // the channel doesnt
+ if( !(pchan=get_pose_channel(m_userpose, string)) &&
+ !(pchan=get_pose_channel(m_pose, string)) )
+ {
+ PyErr_SetString(PyExc_ValueError, "channel doesnt exist");
return NULL;
}
+
+ PyObject *ret = PyTuple_New(3);
- Py_RETURN_NONE;
-}
+ PyObject *list = PyList_New(3);
+ PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->loc[0]));
+ PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->loc[1]));
+ PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->loc[2]));
+ PyTuple_SET_ITEM(ret, 0, list);
+
+ list = PyList_New(3);
+ PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->size[0]));
+ PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->size[1]));
+ PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->size[2]));
+ PyTuple_SET_ITEM(ret, 1, list);
+
+ list = PyList_New(4);
+ PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->quat[0]));
+ PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->quat[1]));
+ PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->quat[2]));
+ PyList_SET_ITEM(list, 3, PyFloat_FromDouble(pchan->quat[3]));
+ PyTuple_SET_ITEM(ret, 2, list);
+
+ return ret;
+/*
+ return Py_BuildValue("([fff][fff][ffff])",
+ pchan->loc[0], pchan->loc[1], pchan->loc[2],
+ pchan->size[0], pchan->size[1], pchan->size[2],
+ pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3] );
*/
+}
/* getType */
const char BL_ActionActuator::GetType_doc[] =
@@ -827,7 +888,7 @@ PyObject* BL_ActionActuator::PySetType(PyObject* args,
PyObject* BL_ActionActuator::PyGetContinue() {
ShowDeprecationWarning("getContinue()", "the continue property");
- return PyInt_FromLong((long)(m_end_reset==0));
+ return PyLong_FromSsize_t((long)(m_end_reset==0));
}
PyObject* BL_ActionActuator::PySetContinue(PyObject* value) {
@@ -857,76 +918,69 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
"\t - matrix : A 4x4 matrix specifying the overriding transformation\n"
"\t as an offset from the bone's rest position.\n")
{
- float matrix[4][4];
+ BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
char *string;
- PyObject* pylist;
- bool error = false;
- int row,col;
- int mode = 0; /* 0 for bone space, 1 for armature/world space */
+ PyObject *pymat= NULL;
+ PyObject *pyloc= NULL, *pysize= NULL, *pyquat= NULL;
+ bPoseChannel *pchan;
- if (!PyArg_ParseTuple(args,"sO|i:setChannel", &string, &pylist, &mode))
- return NULL;
-
- if (pylist->ob_type == &CListValue::Type)
- {
- CListValue* listval = (CListValue*) pylist;
- if (listval->GetCount() == 4)
- {
- for (row=0;row<4;row++) // each row has a 4-vector [x,y,z, w]
- {
- CListValue* vecval = (CListValue*)listval->GetValue(row);
- for (col=0;col<4;col++)
- {
- matrix[row][col] = vecval->GetValue(col)->GetNumber();
-
- }
- }
- }
- else
- {
- error = true;
- }
+ if(PyTuple_Size(args)==2) {
+ if (!PyArg_ParseTuple(args,"sO:setChannel", &string, &pymat)) // matrix
+ return NULL;
}
- else
- {
- // assert the list is long enough...
- int numitems = PyList_Size(pylist);
- if (numitems == 4)
- {
- for (row=0;row<4;row++) // each row has a 4-vector [x,y,z, w]
- {
-
- PyObject* veclist = PyList_GetItem(pylist,row); // here we have a vector4 list
- for (col=0;col<4;col++)
- {
- matrix[row][col] = PyFloat_AsDouble(PyList_GetItem(veclist,col));
-
- }
- }
- }
- else
- {
- error = true;
- }
+ else if(PyTuple_Size(args)==4) {
+ if (!PyArg_ParseTuple(args,"sOOO:setChannel", &string, &pyloc, &pysize, &pyquat)) // loc/size/quat
+ return NULL;
+ }
+ else {
+ PyErr_SetString(PyExc_ValueError, "Expected a string and a 4x4 matrix (2 args) or a string and loc/size/quat sequences (4 args)");
+ return NULL;
}
- if (!error)
- {
-
-/* DO IT HERE */
- bPoseChannel *pchan= verify_pose_channel(m_userpose, string);
-
- Mat4ToQuat(matrix, pchan->quat);
- Mat4ToSize(matrix, pchan->size);
+ if(pymat) {
+ float matrix[4][4];
+ MT_Matrix4x4 mat;
+
+ if(!PyMatTo(pymat, mat))
+ return NULL;
+
+ mat.setValue((const float *)matrix);
+
+ BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
+ obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
+
+ if (!m_userpose) {
+ obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
+ game_copy_pose(&m_userpose, m_pose);
+ }
+ pchan= verify_pose_channel(m_userpose, string); // adds the channel if its not there.
+
VECCOPY (pchan->loc, matrix[3]);
+ Mat4ToSize(matrix, pchan->size);
+ Mat4ToQuat(matrix, pchan->quat);
+ }
+ else {
+ MT_Vector3 loc;
+ MT_Vector3 size;
+ MT_Quaternion quat;
- pchan->flag |= POSE_ROT|POSE_LOC|POSE_SIZE;
-
- if (!m_userpose){
- m_userpose = (bPose*)MEM_callocN(sizeof(bPose), "userPose");
+ if (!PyVecTo(pyloc, loc) || !PyVecTo(pysize, size) || !PyQuatTo(pyquat, quat))
+ return NULL;
+
+ // same as above
+ if (!m_userpose) {
+ obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
+ game_copy_pose(&m_userpose, m_pose);
}
+ pchan= verify_pose_channel(m_userpose, string);
+
+ // for some reason loc.setValue(pchan->loc) fails
+ pchan->loc[0]= loc[0]; pchan->loc[1]= loc[1]; pchan->loc[2]= loc[2];
+ pchan->size[0]= size[0]; pchan->size[1]= size[1]; pchan->size[2]= size[2];
+ pchan->quat[0]= quat[3]; pchan->quat[1]= quat[0]; pchan->quat[2]= quat[1]; pchan->quat[3]= quat[2]; /* notice xyzw -> wxyz is intentional */
}
+ pchan->flag |= POSE_ROT|POSE_LOC|POSE_SIZE;
Py_RETURN_NONE;
}
@@ -951,19 +1005,15 @@ PyTypeObject BL_ActionActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject BL_ActionActuator::Parents[] = {
- &BL_ActionActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef BL_ActionActuator::Methods[] = {
@@ -986,7 +1036,7 @@ PyMethodDef BL_ActionActuator::Methods[] = {
{"getFrame", (PyCFunction) BL_ActionActuator::sPyGetFrame, METH_VARARGS, (PY_METHODCHAR)GetFrame_doc},
{"getProperty", (PyCFunction) BL_ActionActuator::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc},
{"getFrameProperty", (PyCFunction) BL_ActionActuator::sPyGetFrameProperty, METH_VARARGS, (PY_METHODCHAR)GetFrameProperty_doc},
-// {"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_VARARGS},
+ {"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_O},
{"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, (PY_METHODCHAR)GetType_doc},
{"setType", (PyCFunction) BL_ActionActuator::sPySetType, METH_VARARGS, (PY_METHODCHAR)SetType_doc},
{"getContinue", (PyCFunction) BL_ActionActuator::sPyGetContinue, METH_NOARGS, 0},
@@ -1011,37 +1061,24 @@ PyAttributeDef BL_ActionActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* BL_ActionActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* BL_ActionActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int BL_ActionActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
-
-
PyObject* BL_ActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
- return PyString_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
+ return PyUnicode_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
}
int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
- if (!PyString_Check(value))
+ if (!PyUnicode_Check(value))
{
PyErr_SetString(PyExc_ValueError, "actuator.action = val: Action Actuator, expected the string name of the action");
return PY_SET_ATTR_FAIL;
}
bAction *action= NULL;
- STR_String val = PyString_AsString(value);
+ STR_String val = _PyUnicode_AsString(value);
if (val != "")
{
diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h
index b3c15c08f50..e328ce126ca 100644
--- a/source/gameengine/Converter/BL_ActionActuator.h
+++ b/source/gameengine/Converter/BL_ActionActuator.h
@@ -49,9 +49,8 @@ public:
short blendin,
short priority,
short end_reset,
- float stride,
- PyTypeObject* T=&Type)
- : SCA_IActuator(gameobj,T),
+ float stride)
+ : SCA_IActuator(gameobj),
m_lastpos(0, 0, 0),
m_blendframe(0),
@@ -104,7 +103,7 @@ public:
KX_PYMETHOD_DOC(BL_ActionActuator,GetFrame);
KX_PYMETHOD_DOC(BL_ActionActuator,GetProperty);
KX_PYMETHOD_DOC(BL_ActionActuator,GetFrameProperty);
-// KX_PYMETHOD(BL_ActionActuator,GetChannel);
+ KX_PYMETHOD_O(BL_ActionActuator,GetChannel);
KX_PYMETHOD_DOC(BL_ActionActuator,GetType);
KX_PYMETHOD_DOC(BL_ActionActuator,SetType);
KX_PYMETHOD_NOARGS(BL_ActionActuator,GetContinue);
@@ -113,10 +112,6 @@ public:
KX_PYMETHOD_DOC(BL_ActionActuator,setChannel);
- virtual PyObject* py_getattro(PyObject* attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject* attr, PyObject* value);
-
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_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index 6fc5c40d570..f8a9b1b637f 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -38,6 +38,7 @@
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
#include "MT_Matrix4x4.h"
@@ -48,10 +49,12 @@
BL_ArmatureObject::BL_ArmatureObject(
void* sgReplicationInfo,
SG_Callbacks callbacks,
- Object *armature )
+ Object *armature,
+ Scene *scene)
: KX_GameObject(sgReplicationInfo,callbacks),
m_objArma(armature),
+ m_scene(scene), // maybe remove later. needed for where_is_pose
m_framePose(NULL),
m_lastframe(0.0),
m_activeAct(NULL),
@@ -93,9 +96,9 @@ void BL_ArmatureObject::ApplyPose()
{
m_armpose = m_objArma->pose;
m_objArma->pose = m_pose;
-
+ //m_scene->r.cfra++;
if(m_lastapplyframe != m_lastframe) {
- where_is_pose(NULL, m_objArma); // XXX
+ where_is_pose(m_scene, m_objArma); // XXX
m_lastapplyframe = m_lastframe;
}
}
diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h
index d5402cfd126..e1e176840a6 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.h
+++ b/source/gameengine/Converter/BL_ArmatureObject.h
@@ -51,7 +51,8 @@ public:
BL_ArmatureObject(
void* sgReplicationInfo,
SG_Callbacks callbacks,
- Object *armature
+ Object *armature,
+ Scene *scene
);
virtual ~BL_ArmatureObject();
@@ -67,6 +68,7 @@ public:
struct bArmature * GetArmature() { return m_armature; }
const struct bArmature * GetArmature() const { return m_armature; }
+ const struct Scene * GetScene() const { return m_scene; }
Object* GetArmatureObject() {return m_objArma;}
@@ -84,6 +86,7 @@ protected:
struct bPose *m_pose;
struct bPose *m_armpose;
struct bPose *m_framePose;
+ struct Scene *m_scene; // need for where_is_pose
double m_lastframe;
class BL_ActionActuator *m_activeAct;
short m_activePriority;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 5c986752051..084e3472ebd 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -163,7 +163,6 @@ extern "C" {
#include "SG_BBox.h"
#include "SG_Tree.h"
-// defines USE_ODE to choose physics engine
#include "KX_ConvertPhysicsObject.h"
#ifdef USE_BULLET
#include "CcdPhysicsEnvironment.h"
@@ -1610,18 +1609,6 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
break;
#endif
-#ifdef USE_SUMO_SOLID
- case UseSumo:
- KX_ConvertSumoObject(gameobj, meshobj, kxscene, shapeprops, smmaterial, &objprop);
- break;
-#endif
-
-#ifdef USE_ODE
- case UseODE:
- KX_ConvertODEEngineObject(gameobj, meshobj, kxscene, shapeprops, smmaterial, &objprop);
- break;
-#endif //USE_ODE
-
case UseDynamo:
//KX_ConvertDynamoObject(gameobj,meshobj,kxscene,shapeprops, smmaterial, &objprop);
break;
@@ -1795,7 +1782,8 @@ static KX_GameObject *gameobject_from_blenderobject(
gameobj = new BL_ArmatureObject(
kxscene,
KX_Scene::m_callbacks,
- ob // handle
+ ob,
+ blenderscene // handle
);
/* Get the current pose from the armature object and apply it as the rest pose */
break;
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 7aa8714de3a..970539777f4 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -427,21 +427,18 @@ PyTypeObject BL_ShapeActionActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject BL_ShapeActionActuator::Parents[] = {
- &BL_ShapeActionActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
+
PyMethodDef BL_ShapeActionActuator::Methods[] = {
{"setAction", (PyCFunction) BL_ShapeActionActuator::sPySetAction, METH_VARARGS, (PY_METHODCHAR)SetAction_doc},
{"setStart", (PyCFunction) BL_ShapeActionActuator::sPySetStart, METH_VARARGS, (PY_METHODCHAR)SetStart_doc},
@@ -480,19 +477,6 @@ PyAttributeDef BL_ShapeActionActuator::Attributes[] = {
{ NULL } //Sentinel
};
-
-PyObject* BL_ShapeActionActuator::py_getattro(PyObject* attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* BL_ShapeActionActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int BL_ShapeActionActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
-
/* setStart */
const char BL_ShapeActionActuator::GetAction_doc[] =
"getAction()\n"
@@ -501,7 +485,7 @@ const char BL_ShapeActionActuator::GetAction_doc[] =
PyObject* BL_ShapeActionActuator::PyGetAction() {
ShowDeprecationWarning("getAction()", "the action property");
if (m_action){
- return PyString_FromString(m_action->id.name+2);
+ return PyUnicode_FromString(m_action->id.name+2);
}
Py_RETURN_NONE;
}
@@ -860,21 +844,21 @@ PyObject* BL_ShapeActionActuator::PySetType(PyObject* args) {
PyObject* BL_ShapeActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
- return PyString_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
+ return PyUnicode_FromString(self->GetAction() ? self->GetAction()->id.name+2 : "");
}
int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
/* exact copy of BL_ActionActuator's function from here down */
- if (!PyString_Check(value))
+ if (!PyUnicode_Check(value))
{
PyErr_SetString(PyExc_ValueError, "actuator.action = val: Shape Action Actuator, expected the string name of the action");
return PY_SET_ATTR_FAIL;
}
bAction *action= NULL;
- STR_String val = PyString_AsString(value);
+ STR_String val = _PyUnicode_AsString(value);
if (val != "")
{
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h
index d268eef6d23..890fe3f9de9 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.h
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.h
@@ -50,9 +50,8 @@ public:
short playtype,
short blendin,
short priority,
- float stride,
- PyTypeObject* T=&Type)
- : SCA_IActuator(gameobj,T),
+ float stride)
+ : SCA_IActuator(gameobj),
m_lastpos(0, 0, 0),
m_blendframe(0),
@@ -106,10 +105,6 @@ public:
KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetType);
KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetType);
- virtual PyObject* py_getattro(PyObject* attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject* attr, PyObject* value);
-
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/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 44692241e6f..031c2234ea8 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -49,6 +49,7 @@ SET(INC
../../../source/blender
../../../source/blender/include
../../../source/blender/makesdna
+ ../../../source/blender/makesrna
../../../source/gameengine/Rasterizer
../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
../../../source/gameengine/GameLogic
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
index 17bb3dedd36..c3264a2bc37 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
@@ -28,32 +28,30 @@
#include "KX_BlenderScalarInterpolator.h"
+#include <cstring>
+
extern "C" {
#include "DNA_ipo_types.h"
-#include "BKE_ipo.h"
+#include "DNA_action_types.h"
+#include "DNA_anim_types.h"
+#include "BKE_fcurve.h"
}
-static const int BL_MAX_CHANNELS = 32;
-
float BL_ScalarInterpolator::GetValue(float currentTime) const {
- return 0; // XXX IPO_GetFloatValue(m_blender_ipo, m_channel, currentTime);
+ // XXX 2.4x IPO_GetFloatValue(m_blender_adt, m_channel, currentTime);
+ return evaluate_fcurve(m_fcu, currentTime);
}
-
-
-BL_InterpolatorList::BL_InterpolatorList(struct Ipo *ipo) {
- IPO_Channel channels[BL_MAX_CHANNELS];
-
- int num_channels = 0; // XXX IPO_GetChannels(ipo, channels);
-
- int i;
-
- for (i = 0; i != num_channels; ++i) {
- BL_ScalarInterpolator *new_ipo =
- new BL_ScalarInterpolator(ipo, channels[i]);
-
- //assert(new_ipo);
- push_back(new_ipo);
+BL_InterpolatorList::BL_InterpolatorList(struct AnimData *adt) {
+ if(adt->action==NULL)
+ return;
+
+ for(FCurve *fcu= (FCurve *)adt->action->curves.first; fcu; fcu= (FCurve *)fcu->next) {
+ if(fcu->rna_path) {
+ BL_ScalarInterpolator *new_ipo = new BL_ScalarInterpolator(fcu);
+ //assert(new_ipo);
+ push_back(new_ipo);
+ }
}
}
@@ -64,15 +62,13 @@ BL_InterpolatorList::~BL_InterpolatorList() {
}
}
-
-KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(BL_IpoChannel channel) {
- BL_InterpolatorList::iterator i = begin();
- while (!(i == end()) &&
- (static_cast<BL_ScalarInterpolator *>(*i))->GetChannel() !=
- channel) {
- ++i;
+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();
+ if(array_index==fcu->array_index && strcmp(rna_path, fcu->rna_path)==0)
+ return *i;
}
-
- return (i == end()) ? 0 : *i;
+ return NULL;
}
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.h b/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
index 94d15aff6be..396a7d197df 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
@@ -38,29 +38,26 @@ typedef unsigned short BL_IpoChannel;
class BL_ScalarInterpolator : public KX_IScalarInterpolator {
public:
BL_ScalarInterpolator() {} // required for use in STL list
- BL_ScalarInterpolator(struct Ipo *ipo, BL_IpoChannel channel) :
- m_blender_ipo(ipo),
- m_channel(channel)
+ BL_ScalarInterpolator(struct FCurve* fcu) :
+ m_fcu(fcu)
{}
virtual ~BL_ScalarInterpolator() {}
virtual float GetValue(float currentTime) const;
-
- BL_IpoChannel GetChannel() const { return m_channel; }
+ struct FCurve *GetFCurve() { return m_fcu;};
private:
- struct Ipo *m_blender_ipo;
- BL_IpoChannel m_channel;
+ struct FCurve *m_fcu;
};
class BL_InterpolatorList : public std::vector<KX_IScalarInterpolator *> {
public:
- BL_InterpolatorList(struct Ipo *ipo);
+ BL_InterpolatorList(struct AnimData *adt);
~BL_InterpolatorList();
- KX_IScalarInterpolator *GetScalarInterpolator(BL_IpoChannel channel);
+ KX_IScalarInterpolator *GetScalarInterpolator(char *rna_path, int array_index);
};
#endif //__KX_SCALARINTERPOLATOR_H
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index b13e3f7cadb..9e0a710f44f 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -44,21 +44,12 @@
#include "DummyPhysicsEnvironment.h"
-//to decide to use sumo/ode or dummy physics - defines USE_ODE
#include "KX_ConvertPhysicsObject.h"
#ifdef USE_BULLET
#include "CcdPhysicsEnvironment.h"
#endif
-#ifdef USE_ODE
-#include "OdePhysicsEnvironment.h"
-#endif //USE_ODE
-
-#ifdef USE_SUMO_SOLID
-#include "SumoPhysicsEnvironment.h"
-#endif
-
#include "KX_BlenderSceneConverter.h"
#include "KX_BlenderScalarInterpolator.h"
#include "BL_BlenderDataConversion.h"
@@ -94,11 +85,9 @@ extern "C"
KX_BlenderSceneConverter::KX_BlenderSceneConverter(
struct Main* maggie,
- struct SpaceIpo* sipo,
class KX_KetsjiEngine* engine
)
: m_maggie(maggie),
- m_sipo(sipo),
m_ketsjiEngine(engine),
m_alwaysUseExpandFraming(false),
m_usemat(false),
@@ -115,11 +104,11 @@ KX_BlenderSceneConverter::~KX_BlenderSceneConverter()
// delete sumoshapes
- int numipolists = m_map_blender_to_gameipolist.size();
- for (i=0; i<numipolists; i++) {
- BL_InterpolatorList *ipoList= *m_map_blender_to_gameipolist.at(i);
+ int numAdtLists = m_map_blender_to_gameAdtList.size();
+ for (i=0; i<numAdtLists; i++) {
+ BL_InterpolatorList *adtList= *m_map_blender_to_gameAdtList.at(i);
- delete (ipoList);
+ delete (adtList);
}
vector<pair<KX_Scene*,KX_WorldInfo*> >::iterator itw = m_worldinfos.begin();
@@ -147,10 +136,6 @@ KX_BlenderSceneConverter::~KX_BlenderSceneConverter()
delete (*itm).second;
itm++;
}
-
-#ifdef USE_SUMO_SOLID
- KX_ClearSumoSharedShapes();
-#endif
#ifdef USE_BULLET
KX_ClearBulletSharedShapes();
@@ -333,20 +318,7 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename,
destinationscene->SetPhysicsEnvironment(ccdPhysEnv);
break;
}
-#endif
-
-#ifdef USE_SUMO_SOLID
- case UseSumo:
- destinationscene ->SetPhysicsEnvironment(new SumoPhysicsEnvironment());
- break;
-#endif
-#ifdef USE_ODE
-
- case UseODE:
- destinationscene ->SetPhysicsEnvironment(new ODEPhysicsEnvironment());
- break;
-#endif //USE_ODE
-
+#endif
case UseDynamo:
{
}
@@ -575,18 +547,18 @@ void KX_BlenderSceneConverter::RegisterPolyMaterial(RAS_IPolyMaterial *polymat)
void KX_BlenderSceneConverter::RegisterInterpolatorList(
- BL_InterpolatorList *ipoList,
- struct Ipo *for_ipo)
+ BL_InterpolatorList *adtList,
+ struct AnimData *for_adt)
{
- m_map_blender_to_gameipolist.insert(CHashedPtr(for_ipo), ipoList);
+ m_map_blender_to_gameAdtList.insert(CHashedPtr(for_adt), adtList);
}
BL_InterpolatorList *KX_BlenderSceneConverter::FindInterpolatorList(
- struct Ipo *for_ipo)
+ struct AnimData *for_adt)
{
- BL_InterpolatorList **listp = m_map_blender_to_gameipolist[CHashedPtr(for_ipo)];
+ BL_InterpolatorList **listp = m_map_blender_to_gameAdtList[CHashedPtr(for_adt)];
return listp?*listp:NULL;
}
@@ -641,14 +613,14 @@ void KX_BlenderSceneConverter::RegisterWorldInfo(
* When deleting an IPO curve from Python, check if the IPO is being
* edited and if so clear the pointer to the old curve.
*/
-void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo* sipo)
+void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu )
{
- if (!sipo)
+#if 0 //XXX
+ if (!G.sipo)
return;
int i;
-#if 0 //XXX
- EditIpo *ei= (EditIpo *)sipo->editipo;
+ EditIpo *ei= (EditIpo *)G.sipo->editipo;
if (!ei) return;
for(i=0; i<G.sipo->totipo; i++, ei++) {
@@ -753,7 +725,7 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
if( tmpicu->bezt )
MEM_freeN( tmpicu->bezt );
MEM_freeN( tmpicu );
- localDel_ipoCurve( tmpicu ,m_sipo);
+ localDel_ipoCurve( tmpicu );
}
}
} else
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.h b/source/gameengine/Converter/KX_BlenderSceneConverter.h
index f7c1a506457..b65f49c2b59 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.h
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.h
@@ -44,7 +44,6 @@ class BL_InterpolatorList;
class BL_Material;
struct IpoCurve;
struct Main;
-struct SpaceIpo;
struct Scene;
class KX_BlenderSceneConverter : public KX_ISceneConverter
@@ -66,10 +65,9 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
GEN_Map<CHashedPtr,SCA_IActuator*> m_map_blender_to_gameactuator;
GEN_Map<CHashedPtr,SCA_IController*> m_map_blender_to_gamecontroller;
- GEN_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameipolist;
+ GEN_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameAdtList;
Main* m_maggie;
- SpaceIpo* m_sipo;
STR_String m_newfilename;
class KX_KetsjiEngine* m_ketsjiEngine;
@@ -78,13 +76,12 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
bool m_usemat;
bool m_useglslmat;
- void localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo* sipo);
+ void localDel_ipoCurve ( IpoCurve * icu );
// struct Ipo* findIpoForName(char* objName);
public:
KX_BlenderSceneConverter(
Main* maggie,
- SpaceIpo *sipo,
class KX_KetsjiEngine* engine
);
@@ -124,8 +121,8 @@ public:
void RegisterBlenderMaterial(BL_Material *mat);
- void RegisterInterpolatorList(BL_InterpolatorList *ipoList, struct Ipo *for_ipo);
- BL_InterpolatorList *FindInterpolatorList(struct Ipo *for_ipo);
+ void RegisterInterpolatorList(BL_InterpolatorList *adtList, struct AnimData *for_adt);
+ BL_InterpolatorList *FindInterpolatorList(struct AnimData *for_adt);
void RegisterGameActuator(SCA_IActuator *act, struct bActuator *for_actuator);
SCA_IActuator *FindGameActuator(struct bActuator *for_actuator);
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index f19390db8a9..d3a2e1a9ba4 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -71,20 +71,20 @@
#include "STR_HashedString.h"
-static BL_InterpolatorList *GetIpoList(struct Ipo *for_ipo, KX_BlenderSceneConverter *converter) {
- BL_InterpolatorList *ipoList= converter->FindInterpolatorList(for_ipo);
+static BL_InterpolatorList *GetAdtList(struct AnimData *for_adt, KX_BlenderSceneConverter *converter) {
+ BL_InterpolatorList *adtList= converter->FindInterpolatorList(for_adt);
- if (!ipoList) {
- ipoList = new BL_InterpolatorList(for_ipo);
- converter->RegisterInterpolatorList(ipoList, for_ipo);
+ if (!adtList) {
+ adtList = new BL_InterpolatorList(for_adt);
+ converter->RegisterInterpolatorList(adtList, for_adt);
}
- return ipoList;
+ return adtList;
}
void BL_ConvertIpos(struct Object* blenderobject,KX_GameObject* gameobj,KX_BlenderSceneConverter *converter)
{
- if (blenderobject->ipo) {
+ if (blenderobject->adt) {
KX_IpoSGController* ipocontr = new KX_IpoSGController();
gameobj->GetSGNode()->AddSGController(ipocontr);
@@ -120,271 +120,79 @@ void BL_ConvertIpos(struct Object* blenderobject,KX_GameObject* gameobj,KX_Blend
)
);
- BL_InterpolatorList *ipoList= GetIpoList(blenderobject->ipo, converter);
+ BL_InterpolatorList *adtList= GetAdtList(blenderobject->adt, converter);
- // For each active channel in the ipoList add an
+ // For each active channel in the adtList add an
// interpolator to the game object.
- KX_IScalarInterpolator *ipo;
+ KX_IInterpolator *interpolator;
+ KX_IScalarInterpolator *interp;
- ipo = ipoList->GetScalarInterpolator(OB_LOC_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetPosition()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_LOC_X, true);
-
- }
-
- ipo = ipoList->GetScalarInterpolator(OB_LOC_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetPosition()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_LOC_Y, true);
- }
-
- ipo = ipoList->GetScalarInterpolator(OB_LOC_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetPosition()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_LOC_Z, true);
- }
-
- // Master the art of cut & paste programming...
-
- ipo = ipoList->GetScalarInterpolator(OB_DLOC_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaPosition()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DLOC_X, true);
- }
-
- ipo = ipoList->GetScalarInterpolator(OB_DLOC_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaPosition()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DLOC_Y, true);
- }
-
- ipo = ipoList->GetScalarInterpolator(OB_DLOC_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaPosition()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DLOC_Z, true);
- }
-
- // Explore the finesse of reuse and slight modification
-
- ipo = ipoList->GetScalarInterpolator(OB_ROT_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetEulerAngles()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_ROT_X, true);
- }
- ipo = ipoList->GetScalarInterpolator(OB_ROT_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetEulerAngles()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_ROT_Y, true);
- }
- ipo = ipoList->GetScalarInterpolator(OB_ROT_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetEulerAngles()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_ROT_Z, true);
- }
-
- // Hmmm, the need for a macro comes to mind...
-
- ipo = ipoList->GetScalarInterpolator(OB_DROT_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaEulerAngles()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DROT_X, true);
- }
- ipo = ipoList->GetScalarInterpolator(OB_DROT_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaEulerAngles()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DROT_Y, true);
- }
- ipo = ipoList->GetScalarInterpolator(OB_DROT_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaEulerAngles()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DROT_Z, true);
- }
-
- // Hang on, almost there...
-
- ipo = ipoList->GetScalarInterpolator(OB_SIZE_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetScaling()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_SIZE_X, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("location", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetPosition()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_LOC_X+i, true);
+ }
}
- ipo = ipoList->GetScalarInterpolator(OB_SIZE_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetScaling()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_SIZE_Y, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("delta_location", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetDeltaPosition()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_DLOC_X+i, true);
+ }
}
- ipo = ipoList->GetScalarInterpolator(OB_SIZE_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetScaling()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_SIZE_Z, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("rotation", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetEulerAngles()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_ROT_X+i, true);
+ }
}
-
- // The last few...
-
- ipo = ipoList->GetScalarInterpolator(OB_DSIZE_X);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaScaling()[0]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DSIZE_X, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("delta_rotation", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetDeltaEulerAngles()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_DROT_X+i, true);
+ }
}
- ipo = ipoList->GetScalarInterpolator(OB_DSIZE_Y);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaScaling()[1]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DSIZE_Y, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("scale", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetScaling()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_SIZE_X+i, true);
+ }
}
- ipo = ipoList->GetScalarInterpolator(OB_DSIZE_Z);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &(ipocontr->GetIPOTransform().GetDeltaScaling()[2]),
- ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetIPOChannelActive(OB_DSIZE_Z, true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("delta_scale", i))) {
+ interpolator= new KX_ScalarInterpolator(&(ipocontr->GetIPOTransform().GetDeltaScaling()[i]), interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetIPOChannelActive(OB_DSIZE_X+i, true);
+ }
}
{
KX_ObColorIpoSGController* ipocontr_obcol=NULL;
-
- ipo = ipoList->GetScalarInterpolator(OB_COL_R);
- if (ipo)
- {
- if (!ipocontr_obcol)
- {
- ipocontr_obcol = new KX_ObColorIpoSGController();
- gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
- ipocontr_obcol->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr_obcol->m_rgba[0],
- ipo);
- ipocontr_obcol->AddInterpolator(interpolator);
- }
- ipo = ipoList->GetScalarInterpolator(OB_COL_G);
- if (ipo)
- {
- if (!ipocontr_obcol)
- {
- ipocontr_obcol = new KX_ObColorIpoSGController();
- gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
- ipocontr_obcol->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr_obcol->m_rgba[1],
- ipo);
- ipocontr_obcol->AddInterpolator(interpolator);
- }
- ipo = ipoList->GetScalarInterpolator(OB_COL_B);
- if (ipo)
- {
- if (!ipocontr_obcol)
- {
- ipocontr_obcol = new KX_ObColorIpoSGController();
- gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
- ipocontr_obcol->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr_obcol->m_rgba[2],
- ipo);
- ipocontr_obcol->AddInterpolator(interpolator);
- }
- ipo = ipoList->GetScalarInterpolator(OB_COL_A);
- if (ipo)
- {
- if (!ipocontr_obcol)
- {
- ipocontr_obcol = new KX_ObColorIpoSGController();
- gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
- ipocontr_obcol->SetObject(gameobj->GetSGNode());
+
+ for(int i=0; i<4; i++) {
+ if (interp = adtList->GetScalarInterpolator("color", i)) {
+ if (!ipocontr_obcol) {
+ ipocontr_obcol = new KX_ObColorIpoSGController();
+ gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
+ ipocontr_obcol->SetObject(gameobj->GetSGNode());
+ }
+ interpolator= new KX_ScalarInterpolator(&ipocontr_obcol->m_rgba[i], interp);
+ ipocontr_obcol->AddInterpolator(interpolator);
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr_obcol->m_rgba[3],
- ipo);
- ipocontr_obcol->AddInterpolator(interpolator);
}
}
-
-
}
-
-
}
void BL_ConvertLampIpos(struct Lamp* blenderlamp, KX_GameObject *lightobj,KX_BlenderSceneConverter *converter)
{
- if (blenderlamp->ipo) {
+ if (blenderlamp->adt) {
KX_LightIpoSGController* ipocontr = new KX_LightIpoSGController();
lightobj->GetSGNode()->AddSGController(ipocontr);
@@ -396,51 +204,32 @@ void BL_ConvertLampIpos(struct Lamp* blenderlamp, KX_GameObject *lightobj,KX_Ble
ipocontr->m_col_rgb[2] = blenderlamp->b;
ipocontr->m_dist = blenderlamp->dist;
- BL_InterpolatorList *ipoList= GetIpoList(blenderlamp->ipo, converter);
+ BL_InterpolatorList *adtList= GetAdtList(blenderlamp->adt, converter);
- // For each active channel in the ipoList add an
+ // For each active channel in the adtList add an
// interpolator to the game object.
- KX_IScalarInterpolator *ipo;
+ KX_IInterpolator *interpolator;
+ KX_IScalarInterpolator *interp;
- ipo = ipoList->GetScalarInterpolator(LA_ENERGY);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_energy, ipo);
+ if ((interp= adtList->GetScalarInterpolator("energy", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_energy, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyEnergy(true);
}
- ipo = ipoList->GetScalarInterpolator(LA_DIST);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_dist, ipo);
+ if ((interp = adtList->GetScalarInterpolator("distance", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_dist, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyDist(true);
}
-
- ipo = ipoList->GetScalarInterpolator(LA_COL_R);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_col_rgb[0], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyColor(true);
- }
-
- ipo = ipoList->GetScalarInterpolator(LA_COL_G);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_col_rgb[1], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyColor(true);
- }
-
- ipo = ipoList->GetScalarInterpolator(LA_COL_B);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_col_rgb[2], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyColor(true);
+
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("color", i))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_col_rgb[i], interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetModifyColor(true);
+ }
}
}
}
@@ -451,7 +240,7 @@ void BL_ConvertLampIpos(struct Lamp* blenderlamp, KX_GameObject *lightobj,KX_Ble
void BL_ConvertCameraIpos(struct Camera* blendercamera, KX_GameObject *cameraobj,KX_BlenderSceneConverter *converter)
{
- if (blendercamera->ipo) {
+ if (blendercamera->adt) {
KX_CameraIpoSGController* ipocontr = new KX_CameraIpoSGController();
cameraobj->GetSGNode()->AddSGController(ipocontr);
@@ -461,33 +250,28 @@ void BL_ConvertCameraIpos(struct Camera* blendercamera, KX_GameObject *cameraobj
ipocontr->m_clipstart = blendercamera->clipsta;
ipocontr->m_clipend = blendercamera->clipend;
- BL_InterpolatorList *ipoList= GetIpoList(blendercamera->ipo, converter);
+ BL_InterpolatorList *adtList= GetAdtList(blendercamera->adt, converter);
- // For each active channel in the ipoList add an
+ // For each active channel in the adtList add an
// interpolator to the game object.
- KX_IScalarInterpolator *ipo;
+ KX_IInterpolator *interpolator;
+ KX_IScalarInterpolator *interp;
- ipo = ipoList->GetScalarInterpolator(CAM_LENS);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_lens, ipo);
+ if ((interp = adtList->GetScalarInterpolator("lens", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_lens, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyLens(true);
}
- ipo = ipoList->GetScalarInterpolator(CAM_STA);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_clipstart, ipo);
+ if ((interp = adtList->GetScalarInterpolator("clip_start", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_clipstart, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyClipStart(true);
}
- ipo = ipoList->GetScalarInterpolator(CAM_END);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_clipend, ipo);
+ if ((interp = adtList->GetScalarInterpolator("clip_end", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_clipend, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyClipEnd(true);
}
@@ -499,7 +283,7 @@ void BL_ConvertCameraIpos(struct Camera* blendercamera, KX_GameObject *cameraobj
void BL_ConvertWorldIpos(struct World* blenderworld,KX_BlenderSceneConverter *converter)
{
- if (blenderworld->ipo) {
+ if (blenderworld->adt) {
KX_WorldIpoController* ipocontr = new KX_WorldIpoController();
@@ -514,49 +298,30 @@ void BL_ConvertWorldIpos(struct World* blenderworld,KX_BlenderSceneConverter *co
ipocontr->m_mist_rgb[1] = blenderworld->horg;
ipocontr->m_mist_rgb[2] = blenderworld->horb;
- BL_InterpolatorList *ipoList= GetIpoList(blenderworld->ipo, converter);
+ BL_InterpolatorList *adtList= GetAdtList(blenderworld->adt, converter);
- // For each active channel in the ipoList add an
+ // For each active channel in the adtList add an
// interpolator to the game object.
- KX_IScalarInterpolator *ipo;
+ KX_IInterpolator *interpolator;
+ KX_IScalarInterpolator *interp;
- ipo = ipoList->GetScalarInterpolator(WO_HOR_R);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_mist_rgb[0], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyMistColor(true);
- }
-
- ipo = ipoList->GetScalarInterpolator(WO_HOR_G);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_mist_rgb[1], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyMistColor(true);
- }
-
- ipo = ipoList->GetScalarInterpolator(WO_HOR_B);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_mist_rgb[2], ipo);
- ipocontr->AddInterpolator(interpolator);
- ipocontr->SetModifyMistColor(true);
+ for(int i=0; i<3; i++) {
+ if ((interp = adtList->GetScalarInterpolator("horizon_color", i))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_mist_rgb[i], interp);
+ ipocontr->AddInterpolator(interpolator);
+ ipocontr->SetModifyMistColor(true);
+ }
}
- ipo = ipoList->GetScalarInterpolator(WO_MISTDI);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_mist_dist, ipo);
+ if ((interp = adtList->GetScalarInterpolator("mist.depth", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_mist_dist, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyMistDist(true);
}
- ipo = ipoList->GetScalarInterpolator(WO_MISTSTA);
- if (ipo) {
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(&ipocontr->m_mist_start, ipo);
+ if ((interp = adtList->GetScalarInterpolator("mist.start", 0))) {
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_mist_start, interp);
ipocontr->AddInterpolator(interpolator);
ipocontr->SetModifyMistStart(true);
}
@@ -570,12 +335,12 @@ static void ConvertMaterialIpos(
KX_BlenderSceneConverter *converter
)
{
- if (blendermaterial->ipo) {
+ if (blendermaterial->adt) {
KX_MaterialIpoController* ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
- BL_InterpolatorList *ipoList= GetIpoList(blendermaterial->ipo, converter);
+ BL_InterpolatorList *adtList= GetAdtList(blendermaterial->adt, converter);
ipocontr->m_rgba[0] = blendermaterial->r;
@@ -592,163 +357,82 @@ static void ConvertMaterialIpos(
ipocontr->m_ref = blendermaterial->ref;
ipocontr->m_emit = blendermaterial->emit;
ipocontr->m_alpha = blendermaterial->alpha;
- KX_IScalarInterpolator *ipo;
- // --
- ipo = ipoList->GetScalarInterpolator(MA_COL_R);
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_rgba[0],
- ipo);
- ipocontr->AddInterpolator(interpolator);
- }
-
- ipo = ipoList->GetScalarInterpolator(MA_COL_G);
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_rgba[1],
- ipo);
- ipocontr->AddInterpolator(interpolator);
- }
+ KX_IInterpolator *interpolator;
+ KX_IScalarInterpolator *sinterp;
- ipo = ipoList->GetScalarInterpolator(MA_COL_B);
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
+ // --
+ for(int i=0; i<3; i++) {
+ if ((sinterp = adtList->GetScalarInterpolator("diffuse_color", i))) {
+ if (!ipocontr) {
+ ipocontr = new KX_MaterialIpoController(matname_hash);
+ gameobj->GetSGNode()->AddSGController(ipocontr);
+ ipocontr->SetObject(gameobj->GetSGNode());
+ }
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_rgba[i], sinterp);
+ ipocontr->AddInterpolator(interpolator);
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_rgba[2],
- ipo);
- ipocontr->AddInterpolator(interpolator);
}
- ipo = ipoList->GetScalarInterpolator(MA_ALPHA);
- if (ipo) {
+ if ((sinterp = adtList->GetScalarInterpolator("alpha", 0))) {
if (!ipocontr) {
ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_rgba[3],
- ipo);
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_rgba[3], sinterp);
ipocontr->AddInterpolator(interpolator);
}
- // --
- ipo = ipoList->GetScalarInterpolator(MA_SPEC_R );
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_specrgb[0],
- ipo);
- ipocontr->AddInterpolator(interpolator);
- }
-
- ipo = ipoList->GetScalarInterpolator(MA_SPEC_G);
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
+ for(int i=0; i<3; i++) {
+ if ((sinterp = adtList->GetScalarInterpolator("specular_color", i))) {
+ if (!ipocontr) {
+ ipocontr = new KX_MaterialIpoController(matname_hash);
+ gameobj->GetSGNode()->AddSGController(ipocontr);
+ ipocontr->SetObject(gameobj->GetSGNode());
+ }
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_specrgb[i], sinterp);
+ ipocontr->AddInterpolator(interpolator);
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_specrgb[1],
- ipo);
- ipocontr->AddInterpolator(interpolator);
}
- ipo = ipoList->GetScalarInterpolator(MA_SPEC_B);
- if (ipo) {
- if (!ipocontr) {
- ipocontr = new KX_MaterialIpoController(matname_hash);
- gameobj->GetSGNode()->AddSGController(ipocontr);
- ipocontr->SetObject(gameobj->GetSGNode());
- }
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_specrgb[2],
- ipo);
- ipocontr->AddInterpolator(interpolator);
- }
-
- // --
- ipo = ipoList->GetScalarInterpolator(MA_HARD);
- if (ipo) {
+ if ((sinterp = adtList->GetScalarInterpolator("specular_hardness", 0))) {
if (!ipocontr) {
ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_hard,
- ipo);
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_hard, sinterp);
ipocontr->AddInterpolator(interpolator);
}
- ipo = ipoList->GetScalarInterpolator(MA_SPEC);
- if (ipo) {
+ if ((sinterp = adtList->GetScalarInterpolator("specularity", 0))) {
if (!ipocontr) {
ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_spec,
- ipo);
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_spec, sinterp);
ipocontr->AddInterpolator(interpolator);
}
-
- ipo = ipoList->GetScalarInterpolator(MA_REF);
- if (ipo) {
+ if ((sinterp = adtList->GetScalarInterpolator("diffuse_reflection", 0))) {
if (!ipocontr) {
ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_ref,
- ipo);
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_ref, sinterp);
ipocontr->AddInterpolator(interpolator);
}
- ipo = ipoList->GetScalarInterpolator(MA_EMIT);
- if (ipo) {
+ if ((sinterp = adtList->GetScalarInterpolator("emit", 0))) {
if (!ipocontr) {
ipocontr = new KX_MaterialIpoController(matname_hash);
gameobj->GetSGNode()->AddSGController(ipocontr);
ipocontr->SetObject(gameobj->GetSGNode());
}
- KX_IInterpolator *interpolator =
- new KX_ScalarInterpolator(
- &ipocontr->m_emit,
- ipo);
+ interpolator= new KX_ScalarInterpolator(&ipocontr->m_emit, sinterp);
ipocontr->AddInterpolator(interpolator);
}
}
diff --git a/source/gameengine/Converter/Makefile b/source/gameengine/Converter/Makefile
index 938994e8b62..ed95aa968c7 100644
--- a/source/gameengine/Converter/Makefile
+++ b/source/gameengine/Converter/Makefile
@@ -39,8 +39,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_SOLID)/include
+CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I../../blender
@@ -48,6 +47,7 @@ CPPFLAGS += -I../../blender
CPPFLAGS += -I../../blender/windowmanager
CPPFLAGS += -I../../blender/imbuf
CPPFLAGS += -I../../blender/makesdna
+CPPFLAGS += -I../../blender/makesrna
CPPFLAGS += -I../../blender/editors/include
CPPFLAGS += -I../../blender/blenlib
CPPFLAGS += -I../../blender/blenkernel
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index af0d39771de..05ea01c902a 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -19,11 +19,7 @@ incs += ' #source/gameengine/Physics/Dummy'
incs += ' #source/gameengine/Network/LoopBackNetwork'
incs += ' #source/blender/misc #source/blender/blenloader #source/blender/gpu'
incs += ' #source/blender/windowmanager'
-
-if env['WITH_BF_SOLID']:
- incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/Fuzzics/include'
- incs += ' ' + env['BF_SOLID_INC']
- defs.append('USE_SUMO_SOLID')
+incs += ' #source/blender/makesrna'
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp
index d90da8b3a92..6779c2ea780 100644
--- a/source/gameengine/Expressions/BoolValue.cpp
+++ b/source/gameengine/Expressions/BoolValue.cpp
@@ -29,7 +29,6 @@
const STR_String CBoolValue::sTrueString = "TRUE";
const STR_String CBoolValue::sFalseString = "FALSE";
-
CBoolValue::CBoolValue()
/*
pre: false
@@ -210,5 +209,5 @@ CValue* CBoolValue::GetReplica()
PyObject* CBoolValue::ConvertValueToPython()
{
- return PyInt_FromLong(m_bool != 0);
+ return PyBool_FromLong(m_bool != 0);
}
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index e3942b46557..dffd13f64ff 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -32,6 +32,7 @@ SET(INC
../../../intern/string
../../../intern/moto/include
../../../source/gameengine/SceneGraph
+ ../../../source/blender/blenloader
${PYTHON_INC}
)
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index b15b206a38a..96a52aec028 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -636,63 +636,3 @@ void CParser::SetContext(CValue* context)
}
m_identifierContext = context;
}
-
-
-
-
-PyObject* CParserPyMake(PyObject* ignored,PyObject* args)
-{
- char* txt;
- if (!PyArg_ParseTuple(args,"s",&txt))
- return NULL;
- CParser parser;
- CExpression* expr = parser.ProcessText(txt);
- CValue* val = expr->Calculate();
- expr->Release();
- return val->GetProxy();
-}
-
-static PyMethodDef CParserMethods[] =
-{
- { "calc", CParserPyMake , METH_VARARGS},
- { NULL,NULL} // Sentinel
-};
-
-
-#if (PY_VERSION_HEX >= 0x03000000)
-static struct PyModuleDef Expression_module_def = {
- {}, /* m_base */
- "Expression", /* m_name */
- 0, /* m_doc */
- 0, /* m_size */
- CParserMethods, /* m_methods */
- 0, /* m_reload */
- 0, /* m_traverse */
- 0, /* m_clear */
- 0, /* m_free */
-};
-#endif
-
-extern "C" {
- void initExpressionModule(void)
- {
- PyObject *m;
- /* Use existing module where possible
- * be careful not to init any runtime vars after this */
- m = PyImport_ImportModule( "Expression" );
- if(m) {
- Py_DECREF(m);
- //return m;
- }
- else {
- PyErr_Clear();
-
-#if (PY_VERSION_HEX >= 0x03000000)
- PyModule_Create(&Expression_module_def);
-#else
- Py_InitModule("Expression",CParserMethods);
-#endif
- }
- }
-}
-
diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp
index 227518e9439..b782de4bef6 100644
--- a/source/gameengine/Expressions/IntValue.cpp
+++ b/source/gameengine/Expressions/IntValue.cpp
@@ -330,7 +330,7 @@ void CIntValue::SetValue(CValue* newval)
PyObject* CIntValue::ConvertValueToPython()
{
if((m_int > INT_MIN) && (m_int < INT_MAX))
- return PyInt_FromLong(m_int);
+ return PyLong_FromSsize_t(m_int);
else
return PyLong_FromLongLong(m_int);
}
diff --git a/source/gameengine/Expressions/KX_Python.h b/source/gameengine/Expressions/KX_Python.h
index b8006fdf0ed..61f7ef05042 100644
--- a/source/gameengine/Expressions/KX_Python.h
+++ b/source/gameengine/Expressions/KX_Python.h
@@ -32,6 +32,8 @@
//#define USE_DL_EXPORT
#include "Python.h"
+#define USE_MATHUTILS // Blender 2.5x api will use mathutils, for a while we might want to test without it
+
#ifdef __FreeBSD__
#include <osreldate.h>
#if __FreeBSD_version > 500039
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index a0d73c75d60..38b00dcc8fb 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -20,6 +20,8 @@
#include <algorithm>
#include "BoolValue.h"
+#include "BLO_sys_types.h" /* for intptr_t support */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -74,9 +76,9 @@ PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex)
return NULL;
}
- if (PyString_Check(pyindex))
+ if (PyUnicode_Check(pyindex))
{
- CValue *item = ((CListValue*) list)->FindValue(PyString_AsString(pyindex));
+ CValue *item = ((CListValue*) list)->FindValue(_PyUnicode_AsString(pyindex));
if (item) {
PyObject* pyobj = item->ConvertValueToPython();
if(pyobj)
@@ -85,14 +87,14 @@ PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex)
return item->GetProxy();
}
}
- else if (PyInt_Check(pyindex))
+ else if (PyLong_Check(pyindex))
{
- int index = PyInt_AsLong(pyindex);
+ int index = PyLong_AsSsize_t(pyindex);
return listvalue_buffer_item(self, index); /* wont add a ref */
}
PyObject *pyindex_str = PyObject_Repr(pyindex); /* new ref */
- PyErr_Format(PyExc_KeyError, "CList[key]: '%s' key not in list", PyString_AsString(pyindex_str));
+ PyErr_Format(PyExc_KeyError, "CList[key]: '%s' key not in list", _PyUnicode_AsString(pyindex_str));
Py_DECREF(pyindex_str);
return NULL;
}
@@ -209,6 +211,30 @@ static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other)
return listval_new->NewProxy(true); /* python owns this list */
}
+static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
+{
+ CListValue *self= static_cast<CListValue *>(BGE_PROXY_REF(self_v));
+
+ if (self==NULL) {
+ PyErr_SetString(PyExc_SystemError, "val in CList, "BGE_PROXY_ERROR_MSG);
+ return -1;
+ }
+
+ if (PyUnicode_Check(value)) {
+ if (self->FindValue((const char *)_PyUnicode_AsString(value))) {
+ return 1;
+ }
+ }
+ else if (PyObject_TypeCheck(value, &CValue::Type)) { /* not dict like at all but this worked before __contains__ was used */
+ CValue *item= static_cast<CValue *>(BGE_PROXY_REF(value));
+ for (int i=0; i < self->GetCount(); i++)
+ if (self->GetValue(i) == item) // Com
+ return 1;
+
+ } // not using CheckEqual
+
+ return 0;
+}
static PySequenceMethods listvalue_as_sequence = {
@@ -225,6 +251,7 @@ static PySequenceMethods listvalue_as_sequence = {
NULL, /*sq_ass_item*/
NULL, /*sq_ass_slice*/
#endif
+ (objobjproc)listvalue_buffer_contains, /* sq_contains */
};
@@ -262,23 +289,19 @@ PyTypeObject CListValue::Type = {
0, /*tp_hash*/
0, /*tp_call */
0,
- py_base_getattro,
- py_base_setattro,
- 0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject CListValue::Parents[] = {
- &CListValue::Type,
+ NULL,
+ NULL,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
-
PyMethodDef CListValue::Methods[] = {
/* List style access */
{"append", (PyCFunction)CListValue::sPyappend,METH_O},
@@ -300,21 +323,12 @@ PyAttributeDef CListValue::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* CListValue::py_getattro(PyObject* attr) {
- py_getattro_up(CValue);
-}
-
-PyObject* CListValue::py_getattro_dict() {
- py_getattro_dict_up(CValue);
-}
-
-
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
-CListValue::CListValue(PyTypeObject *T )
-: CPropValue(T)
+CListValue::CListValue()
+: CPropValue()
{
m_bReleaseContents=true;
}
@@ -499,7 +513,7 @@ PyObject* CListValue::Pyreverse()
bool CListValue::CheckEqual(CValue* first,CValue* second)
{
bool result = false;
-
+
CValue* eqval = ((CValue*)first)->Calc(VALUE_EQL_OPERATOR,(CValue*)second);
if (eqval==NULL)
@@ -528,9 +542,9 @@ PyObject* CListValue::Pyindex(PyObject *value)
for (int i=0;i<numelem;i++)
{
CValue* elem = GetValue(i);
- if (CheckEqual(checkobj,elem))
+ if (checkobj==elem || CheckEqual(checkobj,elem))
{
- result = PyInt_FromLong(i);
+ result = PyLong_FromSsize_t(i);
break;
}
}
@@ -553,21 +567,21 @@ PyObject* CListValue::Pycount(PyObject* value)
if (checkobj==NULL) { /* in this case just return that there are no items in the list */
PyErr_Clear();
- return PyInt_FromLong(0);
+ return PyLong_FromSsize_t(0);
}
int numelem = GetCount();
for (int i=0;i<numelem;i++)
{
CValue* elem = GetValue(i);
- if (CheckEqual(checkobj,elem))
+ if (checkobj==elem || CheckEqual(checkobj,elem))
{
numfound ++;
}
}
checkobj->Release();
- return PyInt_FromLong(numfound);
+ return PyLong_FromSsize_t(numfound);
}
/* Matches python dict.get(key, [default]) */
@@ -594,7 +608,7 @@ PyObject* CListValue::Pyget(PyObject *args)
/* Matches python dict.has_key() */
PyObject* CListValue::Pyhas_key(PyObject* value)
{
- if (PyString_Check(value) && FindValue((const char *)PyString_AsString(value)))
+ if (PyUnicode_Check(value) && FindValue((const char *)_PyUnicode_AsString(value)))
Py_RETURN_TRUE;
Py_RETURN_FALSE;
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h
index 68e900e25e0..98e6f216f11 100644
--- a/source/gameengine/Expressions/ListValue.h
+++ b/source/gameengine/Expressions/ListValue.h
@@ -24,7 +24,7 @@ class CListValue : public CPropValue
//PLUGIN_DECLARE_SERIAL (CListValue,CValue)
public:
- CListValue(PyTypeObject *T = &Type);
+ CListValue();
virtual ~CListValue();
void AddConfigurationData(CValue* menuvalue);
@@ -60,8 +60,6 @@ public:
bool CheckEqual(CValue* first,CValue* second);
- virtual PyObject* py_getattro(PyObject* attr);
- virtual PyObject* py_getattro_dict();
virtual PyObject* py_repr(void) {
PyObject *py_proxy= this->GetProxy();
PyObject *py_list= PySequence_List(py_proxy);
diff --git a/source/gameengine/Expressions/Makefile b/source/gameengine/Expressions/Makefile
index f46c0037200..09512c3ae87 100644
--- a/source/gameengine/Expressions/Makefile
+++ b/source/gameengine/Expressions/Makefile
@@ -37,6 +37,7 @@ CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
CPPFLAGS += -I../../blender/makesdna
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_MOTO)/include
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index defb6853e67..729fff31052 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -74,11 +74,13 @@ PyTypeObject PyObjectPlus::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ NULL // no subtype
};
@@ -91,6 +93,88 @@ PyObjectPlus::~PyObjectPlus()
// assert(ob_refcnt==0);
}
+
+PyObject *PyObjectPlus::py_base_repr(PyObject *self) // This should be the entry in Type.
+{
+ PyObjectPlus *self_plus= BGE_PROXY_REF(self);
+ if(self_plus==NULL) {
+ PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ return NULL;
+ }
+
+ return self_plus->py_repr();
+}
+
+
+PyObject * PyObjectPlus::py_base_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ PyTypeObject *base_type;
+ PyObjectPlus_Proxy *base = NULL;
+
+ if (!PyArg_ParseTuple(args, "O:Base PyObjectPlus", &base))
+ return NULL;
+
+ /* the 'base' PyObject may be subclassed (multiple times even)
+ * we need to find the first C++ defined class to check 'type'
+ * is a subclass of the base arguments type.
+ *
+ * This way we can share one tp_new function for every PyObjectPlus
+ *
+ * eg.
+ *
+ * # CustomOb is called 'type' in this C code
+ * class CustomOb(GameTypes.KX_GameObject):
+ * pass
+ *
+ * # this calls py_base_new(...), the type of 'CustomOb' is checked to be a subclass of the 'cont.owner' type
+ * ob = CustomOb(cont.owner)
+ *
+ * */
+ base_type= Py_TYPE(base);
+ while(base_type && !BGE_PROXY_CHECK_TYPE(base_type))
+ base_type= base_type->tp_base;
+
+ if(base_type==NULL || !BGE_PROXY_CHECK_TYPE(base_type)) {
+ PyErr_SetString(PyExc_TypeError, "can't subclass from a blender game type because the argument given is not a game class or subclass");
+ return NULL;
+ }
+
+ /* use base_type rather then Py_TYPE(base) because we could alredy be subtyped */
+ if(!PyType_IsSubtype(type, base_type)) {
+ PyErr_Format(PyExc_TypeError, "can't subclass blender game type <%s> from <%s> because it is not a subclass", base_type->tp_name, type->tp_name);
+ return NULL;
+ }
+
+ /* invalidate the existing base and return a new subclassed one,
+ * this is a bit dodgy in that it also attaches its self to the existing object
+ * which is not really 'correct' python OO but for our use its OK. */
+
+ PyObjectPlus_Proxy *ret = (PyObjectPlus_Proxy *) type->tp_alloc(type, 0); /* starts with 1 ref, used for the return ref' */
+ ret->ref= base->ref;
+ base->ref= NULL; /* invalidate! disallow further access */
+
+ ret->py_owns= base->py_owns;
+
+ ret->ref->m_proxy= NULL;
+
+ /* 'base' may be free'd after this func finished but not necessarily
+ * there is no reference to the BGE data now so it will throw an error on access */
+ Py_DECREF(base);
+
+ ret->ref->m_proxy= (PyObject *)ret; /* no need to add a ref because one is added when creating. */
+ Py_INCREF(ret); /* we return a new ref but m_proxy holds a ref so we need to add one */
+
+
+ /* 'ret' will have 2 references.
+ * - One ref is needed because ret->ref->m_proxy holds a refcount to the current proxy.
+ * - Another is needed for returning the value.
+ *
+ * So we should be ok with 2 refs, but for some reason this crashes. so adding a new ref...
+ * */
+
+ return (PyObject *)ret;
+}
+
void PyObjectPlus::py_base_dealloc(PyObject *self) // python wrapper
{
PyObjectPlus *self_plus= BGE_PROXY_REF(self);
@@ -99,143 +183,56 @@ void PyObjectPlus::py_base_dealloc(PyObject *self) // python wrapper
self_plus->m_proxy = NULL; /* Need this to stop ~PyObjectPlus from decrefing m_proxy otherwise its decref'd twice and py-debug crashes */
delete self_plus;
}
-
+
BGE_PROXY_REF(self)= NULL; // not really needed
}
+
+#if 0
+ /* is ok normally but not for subtyping, use tp_free instead. */
PyObject_DEL( self );
+#else
+ Py_TYPE(self)->tp_free(self);
+#endif
};
-PyObjectPlus::PyObjectPlus(PyTypeObject *T) : SG_QList() // constructor
+PyObjectPlus::PyObjectPlus() : SG_QList() // constructor
{
- MT_assert(T != NULL);
m_proxy= NULL;
};
-
+
/*------------------------------
* PyObjectPlus Methods -- Every class, even the abstract one should have a Methods
------------------------------*/
PyMethodDef PyObjectPlus::Methods[] = {
- {"isA", (PyCFunction) sPyisA, METH_O},
{NULL, NULL} /* Sentinel */
};
+#define attr_invalid (&(PyObjectPlus::Attributes[0]))
PyAttributeDef PyObjectPlus::Attributes[] = {
KX_PYATTRIBUTE_RO_FUNCTION("invalid", PyObjectPlus, pyattr_get_invalid),
{NULL} //Sentinel
};
-PyObject* PyObjectPlus::pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
-{
- Py_RETURN_FALSE;
-}
-/*------------------------------
- * PyObjectPlus Parents -- Every class, even the abstract one should have parents
-------------------------------*/
-PyParentObject PyObjectPlus::Parents[] = {&PyObjectPlus::Type, NULL};
-/*------------------------------
- * PyObjectPlus attributes -- attributes
-------------------------------*/
-
-
-/* This should be the entry in Type since it takes the C++ class from PyObjectPlus_Proxy */
-PyObject *PyObjectPlus::py_base_getattro(PyObject * self, PyObject *attr)
+PyObject* PyObjectPlus::pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- PyObjectPlus *self_plus= BGE_PROXY_REF(self);
- if(self_plus==NULL) {
- if(!strcmp("invalid", PyString_AsString(attr))) {
- Py_RETURN_TRUE;
- }
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
- return NULL;
- }
-
- PyObject *ret= self_plus->py_getattro(attr);
-
- /* Attribute not found, was this a __dict__ lookup?, otherwise set an error if none is set */
- if(ret==NULL) {
- char *attr_str= PyString_AsString(attr);
-
- if (strcmp(attr_str, "__dict__")==0)
- {
- /* the error string will probably not
- * be set but just incase clear it */
- PyErr_Clear();
- ret= self_plus->py_getattro_dict();
- }
- else if (!PyErr_Occurred()) {
- /* We looked for an attribute but it wasnt found
- * since py_getattro didnt set the error, set it here */
- PyErr_Format(PyExc_AttributeError, "'%s' object has no attribute '%s'", self->ob_type->tp_name, attr_str);
- }
- }
- return ret;
+ return PyBool_FromLong(self_v ? 1:0);
}
-/* This should be the entry in Type since it takes the C++ class from PyObjectPlus_Proxy */
-int PyObjectPlus::py_base_setattro(PyObject *self, PyObject *attr, PyObject *value)
+/* note, this is called as a python 'getset, where the PyAttributeDef is the closure */
+PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef *attrdef)
{
- PyObjectPlus *self_plus= BGE_PROXY_REF(self);
- if(self_plus==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
- return -1;
- }
-
- if (value==NULL)
- return self_plus->py_delattro(attr);
-
- return self_plus->py_setattro(attr, value);
-}
+ void *self= (void *)(BGE_PROXY_REF(self_py));
+ if(self==NULL) {
+ if(attrdef == attr_invalid)
+ Py_RETURN_TRUE; // dont bother running the function
-PyObject *PyObjectPlus::py_base_repr(PyObject *self) // This should be the entry in Type.
-{
-
- PyObjectPlus *self_plus= BGE_PROXY_REF(self);
- if(self_plus==NULL) {
PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
return NULL;
}
-
- return self_plus->py_repr();
-}
-PyObject *PyObjectPlus::py_getattro(PyObject* attr)
-{
- PyObject *descr = PyDict_GetItem(Type.tp_dict, attr); \
- if (descr == NULL) {
- return NULL; /* py_base_getattro sets the error, this way we can avoid setting the error at many levels */
- } else {
- /* Copied from py_getattro_up */
- if (PyCObject_Check(descr)) {
- return py_get_attrdef((void *)this, (const PyAttributeDef*)PyCObject_AsVoidPtr(descr));
- } else if (descr->ob_type->tp_descr_get) {
- return PyCFunction_New(((PyMethodDescrObject *)descr)->d_method, this->m_proxy);
- } else {
- return NULL;
- }
- /* end py_getattro_up copy */
- }
-}
-
-PyObject* PyObjectPlus::py_getattro_dict() {
- return py_getattr_dict(NULL, Type.tp_dict);
-}
-int PyObjectPlus::py_delattro(PyObject* attr)
-{
- PyErr_SetString(PyExc_AttributeError, "attribute cant be deleted");
- return 1;
-}
-
-int PyObjectPlus::py_setattro(PyObject *attr, PyObject* value)
-{
- PyErr_SetString(PyExc_AttributeError, "attribute cant be set");
- return PY_SET_ATTR_MISSING;
-}
-
-PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef)
-{
if (attrdef->m_type == KX_PYATTRIBUTE_TYPE_DUMMY)
{
// fake attribute, ignore
@@ -259,14 +256,14 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
{
bool *val = reinterpret_cast<bool*>(ptr);
ptr += sizeof(bool);
- PyList_SET_ITEM(resultlist,i,PyInt_FromLong(*val));
+ PyList_SET_ITEM(resultlist,i,PyLong_FromSsize_t(*val));
break;
}
case KX_PYATTRIBUTE_TYPE_SHORT:
{
short int *val = reinterpret_cast<short int*>(ptr);
ptr += sizeof(short int);
- PyList_SET_ITEM(resultlist,i,PyInt_FromLong(*val));
+ PyList_SET_ITEM(resultlist,i,PyLong_FromSsize_t(*val));
break;
}
case KX_PYATTRIBUTE_TYPE_ENUM:
@@ -281,7 +278,7 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
{
int *val = reinterpret_cast<int*>(ptr);
ptr += sizeof(int);
- PyList_SET_ITEM(resultlist,i,PyInt_FromLong(*val));
+ PyList_SET_ITEM(resultlist,i,PyLong_FromSsize_t(*val));
break;
}
case KX_PYATTRIBUTE_TYPE_FLOAT:
@@ -305,12 +302,12 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
case KX_PYATTRIBUTE_TYPE_BOOL:
{
bool *val = reinterpret_cast<bool*>(ptr);
- return PyInt_FromLong(*val);
+ return PyLong_FromSsize_t(*val);
}
case KX_PYATTRIBUTE_TYPE_SHORT:
{
short int *val = reinterpret_cast<short int*>(ptr);
- return PyInt_FromLong(*val);
+ return PyLong_FromSsize_t(*val);
}
case KX_PYATTRIBUTE_TYPE_ENUM:
// enum are like int, just make sure the field size is the same
@@ -322,7 +319,7 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
case KX_PYATTRIBUTE_TYPE_INT:
{
int *val = reinterpret_cast<int*>(ptr);
- return PyInt_FromLong(*val);
+ return PyLong_FromSsize_t(*val);
}
case KX_PYATTRIBUTE_TYPE_FLOAT:
{
@@ -331,18 +328,23 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
}
case KX_PYATTRIBUTE_TYPE_VECTOR:
{
- PyObject* resultlist = PyList_New(3);
MT_Vector3 *val = reinterpret_cast<MT_Vector3*>(ptr);
+#ifdef USE_MATHUTILS
+ float fval[3]= {(*val)[0], (*val)[1], (*val)[2]};
+ return newVectorObject(fval, 3, Py_NEW, NULL);
+#else
+ PyObject* resultlist = PyList_New(3);
for (unsigned int i=0; i<3; i++)
{
PyList_SET_ITEM(resultlist,i,PyFloat_FromDouble((*val)[i]));
}
return resultlist;
+#endif
}
case KX_PYATTRIBUTE_TYPE_STRING:
{
STR_String *val = reinterpret_cast<STR_String*>(ptr);
- return PyString_FromString(*val);
+ return PyUnicode_FromString(*val);
}
default:
return NULL;
@@ -350,8 +352,15 @@ PyObject *PyObjectPlus::py_get_attrdef(void *self, const PyAttributeDef *attrdef
}
}
-int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyObject *value)
+/* note, this is called as a python getset */
+int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAttributeDef *attrdef)
{
+ void *self= (void *)(BGE_PROXY_REF(self_py));
+ if(self==NULL) {
+ PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ return PY_SET_ATTR_FAIL;
+ }
+
void *undoBuffer = NULL;
void *sourceBuffer = NULL;
size_t bufferSize = 0;
@@ -416,9 +425,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
{
bool *var = reinterpret_cast<bool*>(ptr);
ptr += sizeof(bool);
- if (PyInt_Check(item))
+ if (PyLong_Check(item))
{
- *var = (PyInt_AsLong(item) != 0);
+ *var = (PyLong_AsSsize_t(item) != 0);
}
else if (PyBool_Check(item))
{
@@ -435,9 +444,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
{
short int *var = reinterpret_cast<short int*>(ptr);
ptr += sizeof(short int);
- if (PyInt_Check(item))
+ if (PyLong_Check(item))
{
- long val = PyInt_AsLong(item);
+ long val = PyLong_AsSsize_t(item);
if (attrdef->m_clamp)
{
if (val < attrdef->m_imin)
@@ -471,9 +480,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
{
int *var = reinterpret_cast<int*>(ptr);
ptr += sizeof(int);
- if (PyInt_Check(item))
+ if (PyLong_Check(item))
{
- long val = PyInt_AsLong(item);
+ long val = PyLong_AsSsize_t(item);
if (attrdef->m_clamp)
{
if (val < attrdef->m_imin)
@@ -606,9 +615,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
case KX_PYATTRIBUTE_TYPE_BOOL:
{
bool *var = reinterpret_cast<bool*>(ptr);
- if (PyInt_Check(value))
+ if (PyLong_Check(value))
{
- *var = (PyInt_AsLong(value) != 0);
+ *var = (PyLong_AsSsize_t(value) != 0);
}
else if (PyBool_Check(value))
{
@@ -624,9 +633,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
case KX_PYATTRIBUTE_TYPE_SHORT:
{
short int *var = reinterpret_cast<short int*>(ptr);
- if (PyInt_Check(value))
+ if (PyLong_Check(value))
{
- long val = PyInt_AsLong(value);
+ long val = PyLong_AsSsize_t(value);
if (attrdef->m_clamp)
{
if (val < attrdef->m_imin)
@@ -659,9 +668,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
case KX_PYATTRIBUTE_TYPE_INT:
{
int *var = reinterpret_cast<int*>(ptr);
- if (PyInt_Check(value))
+ if (PyLong_Check(value))
{
- long val = PyInt_AsLong(value);
+ long val = PyLong_AsSsize_t(value);
if (attrdef->m_clamp)
{
if (val < attrdef->m_imin)
@@ -746,9 +755,9 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
case KX_PYATTRIBUTE_TYPE_STRING:
{
STR_String *var = reinterpret_cast<STR_String*>(ptr);
- if (PyString_Check(value))
+ if (PyUnicode_Check(value))
{
- char *val = PyString_AsString(value);
+ char *val = _PyUnicode_AsString(value);
if (attrdef->m_clamp)
{
if (strlen(val) < attrdef->m_imin)
@@ -829,48 +838,6 @@ PyObject *PyObjectPlus::py_repr(void)
return NULL;
}
-/*------------------------------
- * PyObjectPlus isA -- the isA functions
-------------------------------*/
-bool PyObjectPlus::isA(PyTypeObject *T) // if called with a Type, use "typename"
-{
- int i;
- PyParentObject P;
- PyParentObject *Ps = GetParents();
-
- for (P = Ps[i=0]; P != NULL; P = Ps[i++])
- if (P==T)
- return true;
-
- return false;
-}
-
-
-bool PyObjectPlus::isA(const char *mytypename) // check typename of each parent
-{
- int i;
- PyParentObject P;
- PyParentObject *Ps = GetParents();
-
- for (P = Ps[i=0]; P != NULL; P = Ps[i++])
- if (strcmp(P->tp_name, mytypename)==0)
- return true;
-
- return false;
-}
-
-PyObject *PyObjectPlus::PyisA(PyObject *value) // Python wrapper for isA
-{
- if (PyType_Check(value)) {
- return PyBool_FromLong(isA((PyTypeObject *)value));
- } else if (PyString_Check(value)) {
- return PyBool_FromLong(isA(PyString_AsString(value)));
- }
- PyErr_SetString(PyExc_TypeError, "object.isA(value): expected a type or a string");
- return NULL;
-}
-
-
void PyObjectPlus::ProcessReplica()
{
/* Clear the proxy, will be created again if needed with GetProxy()
@@ -895,27 +862,6 @@ void PyObjectPlus::InvalidateProxy() // check typename of each parent
}
}
-/* Utility function called by the macro py_getattro_up()
- * for getting ob.__dict__() values from our PyObject
- * this is used by python for doing dir() on an object, so its good
- * if we return a list of attributes and methods.
- *
- * Other then making dir() useful the value returned from __dict__() is not useful
- * since every value is a Py_None
- * */
-PyObject *py_getattr_dict(PyObject *pydict, PyObject *tp_dict)
-{
- if(pydict==NULL) { /* incase calling __dict__ on the parent of this object raised an error */
- PyErr_Clear();
- pydict = PyDict_New();
- }
-
- PyDict_Update(pydict, tp_dict);
- return pydict;
-}
-
-
-
PyObject *PyObjectPlus::GetProxy_Ext(PyObjectPlus *self, PyTypeObject *tp)
{
if (self->m_proxy==NULL)
@@ -986,7 +932,7 @@ void PyObjectPlus::ShowDeprecationWarning_func(const char* old_way,const char* n
co_filename= PyObject_GetAttrString(f_code, "co_filename");
if (co_filename) {
- printf("\t%s:%d\n", PyString_AsString(co_filename), (int)PyInt_AsLong(f_lineno));
+ printf("\t%s:%d\n", _PyUnicode_AsString(co_filename), (int)PyLong_AsSsize_t(f_lineno));
Py_DECREF(f_lineno);
Py_DECREF(f_code);
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 369c00782cc..a18df9d36a9 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -45,21 +45,15 @@
* Python defines
------------------------------*/
-
-
-#if PY_VERSION_HEX > 0x03000000
-#define PyString_FromString PyUnicode_FromString
-#define PyString_FromFormat PyUnicode_FromFormat
-#define PyString_Check PyUnicode_Check
-#define PyString_Size PyUnicode_GetSize
-
-#define PyInt_FromLong PyLong_FromSsize_t
-#define PyInt_AsLong PyLong_AsSsize_t
-#define PyString_AsString _PyUnicode_AsString
-#define PyInt_Check PyLong_Check
-#define PyInt_AS_LONG PyLong_AsLong // TODO - check this one
+#ifdef USE_MATHUTILS
+extern "C" {
+#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */
+}
#endif
+extern "C" {
+#include "../../blender/python/intern/bpy_compat.h"
+}
/*
@@ -113,8 +107,8 @@ typedef struct {
if ((m_ignore_deprecation_warnings || wlink.warn_done)==0) \
{ \
ShowDeprecationWarning_func(old_way, new_way); \
+ \
WarnLink *wlink_last= GetDeprecationWarningLinkLast(); \
- ShowDeprecationWarning_func(old_way, new_way); \
wlink.warn_done = true; \
wlink.link = NULL; \
\
@@ -141,7 +135,7 @@ typedef struct {
#define BGE_PROXY_PYOWNS(_self) (((PyObjectPlus_Proxy *)_self)->py_owns)
/* Note, sometimes we dont care what BGE type this is as long as its a proxy */
-#define BGE_PROXY_CHECK_TYPE(_self) ((_self)->ob_type->tp_dealloc == PyObjectPlus::py_base_dealloc)
+#define BGE_PROXY_CHECK_TYPE(_type) ((_type)->tp_dealloc == PyObjectPlus::py_base_dealloc)
// This must be the first line of each
@@ -151,41 +145,10 @@ typedef struct {
static PyTypeObject Type; \
static PyMethodDef Methods[]; \
static PyAttributeDef Attributes[]; \
- static PyParentObject Parents[]; \
virtual PyTypeObject *GetType(void) {return &Type;}; \
- virtual PyParentObject *GetParents(void) {return Parents;} \
virtual PyObject *GetProxy() {return GetProxy_Ext(this, &Type);}; \
virtual PyObject *NewProxy(bool py_owns) {return NewProxy_Ext(this, &Type, py_owns);}; \
-
-
-
- // This defines the py_getattro_up macro
- // which allows attribute and method calls
- // to be properly passed up the hierarchy.
- //
- // Note, PyDict_GetItem() WONT set an exception!
- // let the py_base_getattro function do this.
-
-#define py_getattro_up(Parent) \
- \
- PyObject *descr = PyDict_GetItem(Type.tp_dict, attr); \
- \
- if(descr) { \
- if (PyCObject_Check(descr)) { \
- return py_get_attrdef((void *)this, (const PyAttributeDef*)PyCObject_AsVoidPtr(descr)); \
- } else if (descr->ob_type->tp_descr_get) { \
- return PyCFunction_New(((PyMethodDescrObject *)descr)->d_method, this->m_proxy); \
- } else { \
- return NULL; \
- } \
- } else { \
- return Parent::py_getattro(attr); \
- }
-
-#define py_getattro_dict_up(Parent) \
- return py_getattr_dict(Parent::py_getattro_dict(), Type.tp_dict);
-
/*
* nonzero values are an error for setattr
* however because of the nested lookups we need to know if the errors
@@ -197,29 +160,6 @@ typedef struct {
#define PY_SET_ATTR_MISSING -1
#define PY_SET_ATTR_SUCCESS 0
-#define py_setattro_up(Parent) \
- PyObject *descr = PyDict_GetItem(Type.tp_dict, attr); \
- \
- if(descr) { \
- if (PyCObject_Check(descr)) { \
- const PyAttributeDef* attrdef= reinterpret_cast<const PyAttributeDef *>(PyCObject_AsVoidPtr(descr)); \
- if (attrdef->m_access == KX_PYATTRIBUTE_RO) { \
- PyErr_Format(PyExc_AttributeError, "\"%s\" is read only", PyString_AsString(attr)); \
- return PY_SET_ATTR_FAIL; \
- } \
- else { \
- return py_set_attrdef((void *)this, attrdef, value); \
- } \
- } else { \
- PyErr_Format(PyExc_AttributeError, "\"%s\" cannot be set", PyString_AsString(attr)); \
- return PY_SET_ATTR_FAIL; \
- } \
- } else { \
- PyErr_Clear(); \
- return Parent::py_setattro(attr, value); \
- }
-
-
/**
* These macros are helpfull when embedding Python routines. The second
* macro is one that also requires a documentation string
@@ -489,7 +429,7 @@ class PyObjectPlus : public SG_QList
Py_Header; // Always start with Py_Header
public:
- PyObjectPlus(PyTypeObject *T);
+ PyObjectPlus();
PyObject *m_proxy; /* actually a PyObjectPlus_Proxy */
@@ -497,30 +437,19 @@ public:
/* These static functions are referenced by ALL PyObjectPlus_Proxy types
* they take the C++ reference from the PyObjectPlus_Proxy and call
- * its own virtual py_getattro, py_setattro etc. functions.
+ * its own virtual py_repr, py_base_dealloc ,etc. functions.
*/
+
+ static PyObject* py_base_new(PyTypeObject *type, PyObject *args, PyObject *kwds); /* allows subclassing */
static void py_base_dealloc(PyObject *self);
- static PyObject* py_base_getattro(PyObject * self, PyObject *attr);
- static int py_base_setattro(PyObject *self, PyObject *attr, PyObject *value);
static PyObject* py_base_repr(PyObject *self);
/* These are all virtual python methods that are defined in each class
* Our own fake subclassing calls these on each class, then calls the parent */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_delattro(PyObject *attr);
- virtual int py_setattro(PyObject *attr, PyObject *value);
virtual PyObject* py_repr(void);
- static PyObject* py_get_attrdef(void *self, const PyAttributeDef *attrdef);
- static int py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyObject *value);
-
- /* isA() methods, shonky replacement for pythons issubclass()
- * which we cant use because we have our own subclass system */
- bool isA(PyTypeObject *T);
- bool isA(const char *mytypename);
-
- KX_PYMETHOD_O(PyObjectPlus,isA);
+ static PyObject* py_get_attrdef(PyObject *self_py, const PyAttributeDef *attrdef);
+ static int py_set_attrdef(PyObject *self_py, PyObject *value, const PyAttributeDef *attrdef);
/* Kindof dumb, always returns True, the false case is checked for, before this function gets accessed */
static PyObject* pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript
index b5c69eafe6b..07cab62c020 100644
--- a/source/gameengine/Expressions/SConscript
+++ b/source/gameengine/Expressions/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.cpp')
-incs ='. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/SceneGraph'
+incs ='. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
incs += ' ' + env['BF_PYTHON_INC']
cxxflags = []
diff --git a/source/gameengine/Expressions/StringValue.h b/source/gameengine/Expressions/StringValue.h
index 52f8a580f4d..c580e8fd23a 100644
--- a/source/gameengine/Expressions/StringValue.h
+++ b/source/gameengine/Expressions/StringValue.h
@@ -40,7 +40,7 @@ public:
virtual void SetValue(CValue* newval) { m_strString = newval->GetText(); SetModified(true); };
virtual CValue* GetReplica();
virtual PyObject* ConvertValueToPython() {
- return PyString_FromString(m_strString.Ptr());
+ return PyUnicode_FromString(m_strString.Ptr());
}
private:
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index e6ef9733da8..d8c81f56f66 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -54,15 +54,17 @@ PyTypeObject CValue::Type = {
py_base_repr,
0,
0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
- 0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject CValue::Parents[] = {
- &CValue::Type,
- NULL
+ NULL,
+ NULL,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef CValue::Methods[] = {
@@ -74,7 +76,7 @@ PyObject* CValue::PyGetName()
{
ShowDeprecationWarning("getName()", "the name property");
- return PyString_FromString(this->GetName());
+ return PyUnicode_FromString(this->GetName());
}
/*#define CVALUE_DEBUG*/
@@ -100,8 +102,8 @@ std::vector<SmartCValueRef> gRefList;
//int gRefCountValue;
#endif
-CValue::CValue(PyTypeObject *T)
- : PyObjectPlus(T),
+CValue::CValue()
+ : PyObjectPlus(),
#else
CValue::CValue()
:
@@ -553,33 +555,9 @@ PyAttributeDef CValue::Attributes[] = {
{ NULL } //Sentinel
};
-
-PyObject* CValue::py_getattro(PyObject *attr)
-{
- char *attr_str= PyString_AsString(attr);
- CValue* resultattr = GetProperty(attr_str);
- if (resultattr)
- {
- /* only show the wanting here because python inspects for __class__ and KX_MeshProxy uses CValues name attr */
- ShowDeprecationWarning("val = ob.attr", "val = ob['attr']");
-
- PyObject* pyconvert = resultattr->ConvertValueToPython();
-
- if (pyconvert)
- return pyconvert;
- else
- return resultattr->GetProxy();
- }
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* CValue::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef) {
CValue * self = static_cast<CValue *> (self_v);
- return PyString_FromString(self->GetName());
+ return PyUnicode_FromString(self->GetName());
}
CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix)
@@ -623,30 +601,23 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix)
{
vallie = new CFloatValue( (float)PyFloat_AsDouble(pyobj) );
} else
+#if PY_VERSION_HEX < 0x03000000
if (PyInt_Check(pyobj))
{
vallie = new CIntValue( (cInt)PyInt_AS_LONG(pyobj) );
} else
+#endif
if (PyLong_Check(pyobj))
{
vallie = new CIntValue( (cInt)PyLong_AsLongLong(pyobj) );
} else
- if (PyString_Check(pyobj))
+ if (PyUnicode_Check(pyobj))
{
- vallie = new CStringValue(PyString_AsString(pyobj),"");
+ vallie = new CStringValue(_PyUnicode_AsString(pyobj),"");
} else
- if (BGE_PROXY_CHECK_TYPE(pyobj)) /* Note, dont let these get assigned to GameObject props, must check elsewhere */
+ if (PyObject_TypeCheck(pyobj, &CValue::Type)) /* Note, dont let these get assigned to GameObject props, must check elsewhere */
{
- if (BGE_PROXY_REF(pyobj) && (BGE_PROXY_REF(pyobj))->isA(&CValue::Type))
- {
- vallie = (static_cast<CValue *>(BGE_PROXY_REF(pyobj)))->AddRef();
- } else {
-
- if(BGE_PROXY_REF(pyobj)) /* this is not a CValue */
- PyErr_Format(PyExc_TypeError, "%sgame engine python type cannot be used as a property", error_prefix);
- else /* PyObjectPlus_Proxy has been removed, cant use */
- PyErr_Format(PyExc_SystemError, "%s"BGE_PROXY_ERROR_MSG, error_prefix);
- }
+ vallie = (static_cast<CValue *>(BGE_PROXY_REF(pyobj)))->AddRef();
} else
{
/* return an error value from the caller */
@@ -656,57 +627,6 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix)
}
-int CValue::py_delattro(PyObject *attr)
-{
- ShowDeprecationWarning("del ob.attr", "del ob['attr']");
-
- char *attr_str= PyString_AsString(attr);
- if (RemoveProperty(attr_str))
- return 0;
-
- PyErr_Format(PyExc_AttributeError, "attribute \"%s\" dosnt exist", attr_str);
- return PY_SET_ATTR_MISSING;
-}
-
-int CValue::py_setattro(PyObject *attr, PyObject* pyobj)
-{
- ShowDeprecationWarning("ob.attr = val", "ob['attr'] = val");
-
- char *attr_str= PyString_AsString(attr);
- CValue* oldprop = GetProperty(attr_str);
- CValue* vallie;
-
- /* Dissallow python to assign GameObjects, Scenes etc as values */
- if ((BGE_PROXY_CHECK_TYPE(pyobj)==0) && (vallie = ConvertPythonToValue(pyobj, "cvalue.attr = value: ")))
- {
- if (oldprop)
- oldprop->SetValue(vallie);
- else
- SetProperty(attr_str, vallie);
-
- vallie->Release();
- }
- else {
- // ConvertPythonToValue sets the error message
- // must return missing so KX_GameObect knows this
- // attribute was not a function or bult in attribute,
- //
- // CValue attributes override internal attributes
- // so if it exists as a CValue attribute already,
- // assume your trying to set it to a differnt CValue attribute
- // otherwise return PY_SET_ATTR_MISSING so children
- // classes know they can set it without conflict
-
- if (GetProperty(attr_str))
- return PY_SET_ATTR_COERCE_FAIL; /* failed to set an existing attribute */
- else
- return PY_SET_ATTR_MISSING; /* allow the KX_GameObject dict to set */
- }
-
- //PyObjectPlus::py_setattro(attr,value);
- return PY_SET_ATTR_SUCCESS;
-};
-
PyObject* CValue::ConvertKeysToPython( void )
{
PyObject *pylist = PyList_New( 0 );
@@ -717,7 +637,7 @@ PyObject* CValue::ConvertKeysToPython( void )
std::map<STR_String,CValue*>::iterator it;
for (it= m_pNamedPropertyArray->begin(); (it != m_pNamedPropertyArray->end()); it++)
{
- pystr = PyString_FromString( (*it).first );
+ pystr = PyUnicode_FromString( (*it).first );
PyList_Append(pylist, pystr);
Py_DECREF( pystr );
}
@@ -725,54 +645,6 @@ PyObject* CValue::ConvertKeysToPython( void )
return pylist;
}
-/*
-PyObject* CValue::PyMake(PyObject* ignored,PyObject* args)
-{
-
- //if (!PyArg_ParseTuple(args,"s:make",&name)) return NULL;
- Py_RETURN_NONE;//new CValue();
-}
-*/
-
-#if (PY_VERSION_HEX >= 0x03000000)
-static struct PyModuleDef CValue_module_def = {
- {}, /* m_base */
- "CValue", /* m_name */
- 0, /* m_doc */
- 0, /* m_size */
- CValueMethods, /* m_methods */
- 0, /* m_reload */
- 0, /* m_traverse */
- 0, /* m_clear */
- 0, /* m_free */
-};
-#endif
-
-extern "C" {
- void initCValue(void)
- {
- PyObject *m;
- /* Use existing module where possible
- * be careful not to init any runtime vars after this */
- m = PyImport_ImportModule( "CValue" );
- if(m) {
- Py_DECREF(m);
- //return m;
- }
- else {
- PyErr_Clear();
-
-#if (PY_VERSION_HEX >= 0x03000000)
- PyModule_Create(&CValue_module_def);
-#else
- Py_InitModule("CValue",CValueMethods);
-#endif
- }
- }
-}
-
-
-
#endif //NO_EXP_PYTHON_EMBEDDING
///////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 29ef19b46c9..8c9f99b335e 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -215,26 +215,18 @@ public:
// Construction / Destruction
#ifndef NO_EXP_PYTHON_EMBEDDING
- CValue(PyTypeObject *T = &Type);
+ CValue();
//static PyObject* PyMake(PyObject*,PyObject*);
virtual PyObject *py_repr(void)
{
- return PyString_FromString((const char*)GetText());
+ return PyUnicode_FromString((const char*)GetText());
}
-
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
virtual PyObject* ConvertValueToPython() {
return NULL;
}
virtual CValue* ConvertPythonToValue(PyObject* pyobj, const char *error_prefix);
-
-
- virtual int py_delattro(PyObject *attr);
- virtual int py_setattro(PyObject *attr, PyObject* value);
static PyObject * pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
@@ -417,8 +409,8 @@ class CPropValue : public CValue
public:
#ifndef NO_EXP_PYTHON_EMBEDDING
- CPropValue(PyTypeObject* T=&Type) :
- CValue(T),
+ CPropValue() :
+ CValue(),
#else
CPropValue() :
#endif //NO_EXP_PYTHON_EMBEDDING
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index d83179d4f80..6140702534c 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -158,12 +158,13 @@ bool SCA_Joystick::aAxisIsPositive(int axis_single)
bool SCA_Joystick::aAnyButtonPressIsPositive(void)
{
+#ifndef DISABLE_SDL
/* this is needed for the "all events" option
* so we know if there are no buttons pressed */
for (int i=0; i<m_buttonmax; i++)
if (SDL_JoystickGetButton(m_private->m_joystick, i))
return true;
-
+#endif
return false;
}
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
index caed85b9938..04d46e259d3 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
@@ -42,9 +42,8 @@ SCA_2DFilterActuator::SCA_2DFilterActuator(
float float_arg,
int int_arg,
RAS_IRasterizer* rasterizer,
- RAS_IRenderTools* rendertools,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T),
+ RAS_IRenderTools* rendertools)
+ : SCA_IActuator(gameobj),
m_type(type),
m_disableMotionBlur(flag),
m_float_arg(float_arg),
@@ -124,23 +123,17 @@ PyTypeObject SCA_2DFilterActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-PyParentObject SCA_2DFilterActuator::Parents[] = {
- &SCA_2DFilterActuator::Type,
- &SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_IActuator::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
PyMethodDef SCA_2DFilterActuator::Methods[] = {
/* add python functions to deal with m_msg... */
{NULL,NULL}
@@ -154,18 +147,3 @@ PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("value", 0.0, 100.0, SCA_2DFilterActuator, m_float_arg),
{ NULL } //Sentinel
};
-
-PyObject* SCA_2DFilterActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* SCA_2DFilterActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int SCA_2DFilterActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.h b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
index 13b9997a010..c357c4f3e37 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.h
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
@@ -56,23 +56,12 @@ public:
float float_arg,
int int_arg,
RAS_IRasterizer* rasterizer,
- RAS_IRenderTools* rendertools,
- PyTypeObject* T=&Type
- );
+ RAS_IRenderTools* rendertools);
void SetShaderText(const char *text);
virtual ~SCA_2DFilterActuator();
virtual bool Update();
virtual CValue* GetReplica();
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
};
#endif
diff --git a/source/gameengine/GameLogic/SCA_ANDController.cpp b/source/gameengine/GameLogic/SCA_ANDController.cpp
index 87f7c612e7c..78e1350428e 100644
--- a/source/gameengine/GameLogic/SCA_ANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_ANDController.cpp
@@ -42,10 +42,9 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_ANDController::SCA_ANDController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_ANDController::SCA_ANDController(SCA_IObject* gameobj)
:
- SCA_IController(gameobj,T)
+ SCA_IController(gameobj)
{
}
@@ -116,19 +115,15 @@ PyTypeObject SCA_ANDController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_ANDController::Parents[] = {
- &SCA_ANDController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_ANDController::Methods[] = {
@@ -139,12 +134,4 @@ PyAttributeDef SCA_ANDController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_ANDController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_ANDController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ANDController.h b/source/gameengine/GameLogic/SCA_ANDController.h
index 9a359d57cb4..cb16d7fca01 100644
--- a/source/gameengine/GameLogic/SCA_ANDController.h
+++ b/source/gameengine/GameLogic/SCA_ANDController.h
@@ -39,18 +39,10 @@ class SCA_ANDController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_ANDController(SCA_IObject* gameobj,PyTypeObject* T=&Type);
+ SCA_ANDController(SCA_IObject* gameobj);
virtual ~SCA_ANDController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_ANDCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
index 4dad65c5a25..bdcc923e1d9 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
@@ -40,9 +40,8 @@
SCA_ActuatorSensor::SCA_ActuatorSensor(SCA_EventManager* eventmgr,
SCA_IObject* gameobj,
- const STR_String& actname,
- PyTypeObject* T )
- : SCA_ISensor(gameobj,eventmgr,T),
+ const STR_String& actname)
+ : SCA_ISensor(gameobj,eventmgr),
m_checkactname(actname)
{
m_actuator = GetParent()->FindActuator(m_checkactname);
@@ -138,19 +137,15 @@ PyTypeObject SCA_ActuatorSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_ActuatorSensor::Parents[] = {
- &SCA_ActuatorSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_ActuatorSensor::Methods[] = {
@@ -166,18 +161,6 @@ PyAttributeDef SCA_ActuatorSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_ActuatorSensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_ActuatorSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_ActuatorSensor::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_ISensor);
-}
-
int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*)
{
SCA_ActuatorSensor* sensor = reinterpret_cast<SCA_ActuatorSensor*>(self);
@@ -197,7 +180,7 @@ const char SCA_ActuatorSensor::GetActuator_doc[] =
PyObject* SCA_ActuatorSensor::PyGetActuator()
{
ShowDeprecationWarning("getActuator()", "the actuator property");
- return PyString_FromString(m_checkactname);
+ return PyUnicode_FromString(m_checkactname);
}
/* 4. setActuator */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index 6655e08dc70..cf8e735cad4 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -46,8 +46,7 @@ class SCA_ActuatorSensor : public SCA_ISensor
public:
SCA_ActuatorSensor(class SCA_EventManager* eventmgr,
SCA_IObject* gameobj,
- const STR_String& actname,
- PyTypeObject* T=&Type );
+ const STR_String& actname);
virtual ~SCA_ActuatorSensor();
virtual CValue* GetReplica();
@@ -61,10 +60,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* 3. setProperty */
KX_PYMETHOD_DOC_VARARGS(SCA_ActuatorSensor,SetActuator);
/* 4. getProperty */
diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
index ff02680f191..ddb54c580b8 100644
--- a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
@@ -48,9 +48,8 @@
/* ------------------------------------------------------------------------- */
SCA_AlwaysSensor::SCA_AlwaysSensor(class SCA_EventManager* eventmgr,
- SCA_IObject* gameobj,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T)
+ SCA_IObject* gameobj)
+ : SCA_ISensor(gameobj,eventmgr)
{
//SetDrawColor(255,0,0);
Init();
@@ -121,19 +120,15 @@ PyTypeObject SCA_AlwaysSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_AlwaysSensor::Parents[] = {
- &SCA_AlwaysSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_AlwaysSensor::Methods[] = {
@@ -144,12 +139,4 @@ PyAttributeDef SCA_AlwaysSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_AlwaysSensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_AlwaysSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.h b/source/gameengine/GameLogic/SCA_AlwaysSensor.h
index 0f85a641ef1..d58e05564d1 100644
--- a/source/gameengine/GameLogic/SCA_AlwaysSensor.h
+++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.h
@@ -39,22 +39,12 @@ class SCA_AlwaysSensor : public SCA_ISensor
bool m_alwaysresult;
public:
SCA_AlwaysSensor(class SCA_EventManager* eventmgr,
- SCA_IObject* gameobj,
- PyTypeObject* T =&Type);
+ SCA_IObject* gameobj);
virtual ~SCA_AlwaysSensor();
virtual CValue* GetReplica();
virtual bool Evaluate();
virtual bool IsPositiveTrigger();
virtual void Init();
-
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_ALWAYSSENSOR
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
index dcdae0b4e75..11c6996a0a1 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
@@ -51,9 +51,8 @@ SCA_DelaySensor::SCA_DelaySensor(class SCA_EventManager* eventmgr,
SCA_IObject* gameobj,
int delay,
int duration,
- bool repeat,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T),
+ bool repeat)
+ : SCA_ISensor(gameobj,eventmgr),
m_repeat(repeat),
m_delay(delay),
m_duration(duration)
@@ -147,19 +146,15 @@ PyTypeObject SCA_DelaySensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_DelaySensor::Parents[] = {
- &SCA_DelaySensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_DelaySensor::Methods[] = {
@@ -183,19 +178,6 @@ PyAttributeDef SCA_DelaySensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_DelaySensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_DelaySensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_DelaySensor::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_ISensor);
-}
-
-
const char SCA_DelaySensor::SetDelay_doc[] =
"setDelay(delay)\n"
"\t- delay: length of the initial OFF period as number of frame\n"
@@ -262,7 +244,7 @@ const char SCA_DelaySensor::GetDelay_doc[] =
PyObject* SCA_DelaySensor::PyGetDelay()
{
ShowDeprecationWarning("getDelay()", "the delay property");
- return PyInt_FromLong(m_delay);
+ return PyLong_FromSsize_t(m_delay);
}
const char SCA_DelaySensor::GetDuration_doc[] =
@@ -271,7 +253,7 @@ const char SCA_DelaySensor::GetDuration_doc[] =
PyObject* SCA_DelaySensor::PyGetDuration()
{
ShowDeprecationWarning("getDuration()", "the duration property");
- return PyInt_FromLong(m_duration);
+ return PyLong_FromSsize_t(m_duration);
}
const char SCA_DelaySensor::GetRepeat_doc[] =
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.h b/source/gameengine/GameLogic/SCA_DelaySensor.h
index 5ccb33f8a16..8270e8959b7 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.h
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.h
@@ -47,8 +47,7 @@ public:
SCA_IObject* gameobj,
int delay,
int duration,
- bool repeat,
- PyTypeObject* T =&Type);
+ bool repeat);
virtual ~SCA_DelaySensor();
virtual CValue* GetReplica();
virtual bool Evaluate();
@@ -59,10 +58,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
/* setProperty */
KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDelay);
diff --git a/source/gameengine/GameLogic/SCA_ExpressionController.cpp b/source/gameengine/GameLogic/SCA_ExpressionController.cpp
index 8e044b89c71..60969300474 100644
--- a/source/gameengine/GameLogic/SCA_ExpressionController.cpp
+++ b/source/gameengine/GameLogic/SCA_ExpressionController.cpp
@@ -46,9 +46,8 @@
/* ------------------------------------------------------------------------- */
SCA_ExpressionController::SCA_ExpressionController(SCA_IObject* gameobj,
- const STR_String& exprtext,
- PyTypeObject* T)
- :SCA_IController(gameobj,T),
+ const STR_String& exprtext)
+ :SCA_IController(gameobj),
m_exprText(exprtext),
m_exprCache(NULL)
{
diff --git a/source/gameengine/GameLogic/SCA_ExpressionController.h b/source/gameengine/GameLogic/SCA_ExpressionController.h
index 6a34d7b2dff..705f6dfc415 100644
--- a/source/gameengine/GameLogic/SCA_ExpressionController.h
+++ b/source/gameengine/GameLogic/SCA_ExpressionController.h
@@ -42,8 +42,7 @@ class SCA_ExpressionController : public SCA_IController
public:
SCA_ExpressionController(SCA_IObject* gameobj,
- const STR_String& exprtext,
- PyTypeObject* T=&Type );
+ const STR_String& exprtext);
virtual ~SCA_ExpressionController();
virtual CValue* GetReplica();
@@ -54,14 +53,6 @@ public:
* so that self references are removed before the controller itself is released
*/
virtual void Delete();
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
-// virtual PyObject* py_getattro(PyObject *attr);
-// virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_EXPRESSIONCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_IActuator.cpp b/source/gameengine/GameLogic/SCA_IActuator.cpp
index be7c2651686..0fda75590c1 100644
--- a/source/gameengine/GameLogic/SCA_IActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_IActuator.cpp
@@ -34,9 +34,8 @@
using namespace std;
-SCA_IActuator::SCA_IActuator(SCA_IObject* gameobj,
- PyTypeObject* T) :
- SCA_ILogicBrick(gameobj,T),
+SCA_IActuator::SCA_IActuator(SCA_IObject* gameobj) :
+ SCA_ILogicBrick(gameobj),
m_links(0),
m_posevent(false),
m_negevent(false)
diff --git a/source/gameengine/GameLogic/SCA_IActuator.h b/source/gameengine/GameLogic/SCA_IActuator.h
index 27afcbc386b..13c718ee837 100644
--- a/source/gameengine/GameLogic/SCA_IActuator.h
+++ b/source/gameengine/GameLogic/SCA_IActuator.h
@@ -61,8 +61,7 @@ public:
* This class also inherits the default copy constructors
*/
- SCA_IActuator(SCA_IObject* gameobj,
- PyTypeObject* T =&Type);
+ SCA_IActuator(SCA_IObject* gameobj);
/**
* UnlinkObject(...)
diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp
index f2c3c83a2d9..7cbb728753a 100644
--- a/source/gameengine/GameLogic/SCA_IController.cpp
+++ b/source/gameengine/GameLogic/SCA_IController.cpp
@@ -37,10 +37,9 @@
#include <config.h>
#endif
-SCA_IController::SCA_IController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_IController::SCA_IController(SCA_IObject* gameobj)
:
- SCA_ILogicBrick(gameobj,T),
+ SCA_ILogicBrick(gameobj),
m_statemask(0),
m_justActivated(false)
{
@@ -216,17 +215,15 @@ PyTypeObject SCA_IController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_IController::Parents[] = {
- &SCA_IController::Type,
- &CValue::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_ILogicBrick::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_IController::Methods[] = {
@@ -248,22 +245,6 @@ PyAttributeDef SCA_IController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_IController::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ILogicBrick);
-}
-
-PyObject* SCA_IController::py_getattro_dict() {
- py_getattro_dict_up(SCA_ILogicBrick);
-}
-
-int SCA_IController::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ILogicBrick);
-}
-
-
-
PyObject* SCA_IController::PyGetActuators()
{
ShowDeprecationWarning("getActuators()", "the actuators property");
@@ -281,7 +262,7 @@ PyObject* SCA_IController::PyGetSensor(PyObject* value)
{
ShowDeprecationWarning("getSensor(string)", "the sensors[string] property");
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
if (scriptArg==NULL) {
PyErr_SetString(PyExc_TypeError, "controller.getSensor(string): Python Controller, expected a string (sensor name)");
return NULL;
@@ -305,7 +286,7 @@ PyObject* SCA_IController::PyGetActuator(PyObject* value)
{
ShowDeprecationWarning("getActuator(string)", "the actuators[string] property");
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
if (scriptArg==NULL) {
PyErr_SetString(PyExc_TypeError, "controller.getActuator(string): Python Controller, expected a string (actuator name)");
return NULL;
@@ -340,13 +321,13 @@ PyObject* SCA_IController::PyGetSensors()
PyObject* SCA_IController::PyGetState()
{
ShowDeprecationWarning("getState()", "the state property");
- return PyInt_FromLong(m_statemask);
+ 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);
- return PyInt_FromLong(self->m_statemask);
+ return PyLong_FromSsize_t(self->m_statemask);
}
PyObject* SCA_IController::pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
diff --git a/source/gameengine/GameLogic/SCA_IController.h b/source/gameengine/GameLogic/SCA_IController.h
index a52c57ab3ed..523878bee26 100644
--- a/source/gameengine/GameLogic/SCA_IController.h
+++ b/source/gameengine/GameLogic/SCA_IController.h
@@ -47,7 +47,7 @@ protected:
bool m_justActivated;
bool m_bookmark;
public:
- SCA_IController(SCA_IObject* gameobj,PyTypeObject* T);
+ SCA_IController(SCA_IObject* gameobj);
virtual ~SCA_IController();
virtual void Trigger(class SCA_LogicManager* logicmgr)=0;
void LinkToSensor(SCA_ISensor* sensor);
@@ -98,10 +98,6 @@ public:
}
}
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
KX_PYMETHOD_NOARGS(SCA_IController,GetSensors);
KX_PYMETHOD_NOARGS(SCA_IController,GetActuators);
KX_PYMETHOD_O(SCA_IController,GetSensor);
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
index 2dc80f54568..ccb79a2d49f 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
@@ -35,10 +35,9 @@
SCA_LogicManager* SCA_ILogicBrick::m_sCurrentLogicManager = NULL;
-SCA_ILogicBrick::SCA_ILogicBrick(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_ILogicBrick::SCA_ILogicBrick(SCA_IObject* gameobj)
:
- CValue(T),
+ CValue(),
m_gameobj(gameobj),
m_Execute_Priority(0),
m_Execute_Ueber_Priority(0),
@@ -194,23 +193,17 @@ PyTypeObject SCA_ILogicBrick::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject SCA_ILogicBrick::Parents[] = {
- &SCA_ILogicBrick::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef SCA_ILogicBrick::Methods[] = {
// --> Deprecated
{"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_NOARGS},
@@ -245,21 +238,6 @@ int SCA_ILogicBrick::CheckProperty(void *self, const PyAttributeDef *attrdef)
return 0;
}
-PyObject* SCA_ILogicBrick::py_getattro(PyObject *attr)
-{
- py_getattro_up(CValue);
-}
-
-PyObject* SCA_ILogicBrick::py_getattro_dict() {
- py_getattro_dict_up(CValue);
-}
-
-int SCA_ILogicBrick::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(CValue);
-}
-
-
PyObject* SCA_ILogicBrick::PyGetOwner()
{
ShowDeprecationWarning("getOwner()", "the owner property");
@@ -296,7 +274,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* args)
PyObject* SCA_ILogicBrick::PyGetExecutePriority()
{
ShowDeprecationWarning("getExecutePriority()", "the executePriority property");
- return PyInt_FromLong(m_Execute_Priority);
+ return PyLong_FromSsize_t(m_Execute_Priority);
}
@@ -326,5 +304,5 @@ bool SCA_ILogicBrick::PyArgToBool(int boolArg)
PyObject* SCA_ILogicBrick::BoolToPyArg(bool boolarg)
{
- return PyInt_FromLong(boolarg? KX_TRUE: KX_FALSE);
+ return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE);
}
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index 779e5397a6a..50679856802 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -53,7 +53,7 @@ protected:
CValue* GetEvent();
public:
- SCA_ILogicBrick(SCA_IObject* gameobj,PyTypeObject* T );
+ SCA_ILogicBrick(SCA_IObject* gameobj);
virtual ~SCA_ILogicBrick();
void SetExecutePriority(int execute_Priority);
@@ -121,10 +121,6 @@ public:
}
virtual bool LessComparedTo(SCA_ILogicBrick* other);
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
static class SCA_LogicManager* m_sCurrentLogicManager;
diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp
index 9876f2512c0..6cd11f9e553 100644
--- a/source/gameengine/GameLogic/SCA_IObject.cpp
+++ b/source/gameengine/GameLogic/SCA_IObject.cpp
@@ -41,8 +41,11 @@
MT_Point3 SCA_IObject::m_sDummy=MT_Point3(0,0,0);
SG_QList SCA_IObject::m_activeBookmarkedControllers;
-SCA_IObject::SCA_IObject(PyTypeObject* T): CValue(T), m_initState(0), m_state(0), m_firstState(NULL)
-
+SCA_IObject::SCA_IObject():
+ CValue(),
+ m_initState(0),
+ m_state(0),
+ m_firstState(NULL)
{
m_suspended = false;
}
@@ -218,51 +221,6 @@ SCA_IActuator* SCA_IObject::FindActuator(const STR_String& actuatorname)
}
-
-#if 0
-const MT_Point3& SCA_IObject::ConvertPythonPylist(PyObject* pylist)
-{
- bool error = false;
- m_sDummy = MT_Vector3(0,0,0);
- if (pylist->ob_type == &CListValue::Type)
- {
- CListValue* listval = (CListValue*) pylist;
- int numelem = listval->GetCount();
- if ( numelem <= 3)
- {
- int index;
- for (index = 0;index<numelem;index++)
- {
- m_sDummy[index] = listval->GetValue(index)->GetNumber();
- }
- } else
- {
- error = true;
- }
-
- } else
- {
-
- // assert the list is long enough...
- int numitems = PyList_Size(pylist);
- if (numitems <= 3)
- {
- int index;
- for (index=0;index<numitems;index++)
- {
- m_sDummy[index] = PyFloat_AsDouble(PyList_GetItem(pylist,index));
- }
- }
- else
- {
- error = true;
- }
-
- }
- return m_sDummy;
-}
-#endif
-
void SCA_IObject::Suspend()
{
if ((!m_ignore_activity_culling)
@@ -346,23 +304,17 @@ PyTypeObject SCA_IObject::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject SCA_IObject::Parents[] = {
- &SCA_IObject::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef SCA_IObject::Methods[] = {
//{"setOrientation", (PyCFunction) SCA_IObject::sPySetOrientation, METH_VARARGS},
//{"getOrientation", (PyCFunction) SCA_IObject::sPyGetOrientation, METH_VARARGS},
@@ -372,12 +324,3 @@ PyMethodDef SCA_IObject::Methods[] = {
PyAttributeDef SCA_IObject::Attributes[] = {
{ NULL } //Sentinel
};
-
-
-PyObject* SCA_IObject::py_getattro(PyObject *attr) {
- py_getattro_up(CValue);
-}
-
-PyObject* SCA_IObject::py_getattro_dict() {
- py_getattro_dict_up(CValue);
-}
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h
index eae427741ca..3060410dc6b 100644
--- a/source/gameengine/GameLogic/SCA_IObject.h
+++ b/source/gameengine/GameLogic/SCA_IObject.h
@@ -105,7 +105,7 @@ protected:
public:
- SCA_IObject(PyTypeObject* T=&Type);
+ SCA_IObject();
virtual ~SCA_IObject();
SCA_ControllerList& GetControllers()
@@ -199,15 +199,12 @@ public:
unsigned int GetState(void) { return m_state; }
// const class MT_Point3& ConvertPythonPylist(PyObject* pylist);
-
- // here come the python forwarded methods
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
virtual int GetGameObjectType() {return -1;}
typedef enum ObjectTypes {
OBJ_ARMATURE=0,
+ OBJ_CAMERA=1,
}ObjectTypes;
};
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 2783bf14600..4c1e0bd01c4 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -50,9 +50,8 @@ void SCA_ISensor::ReParent(SCA_IObject* parent)
SCA_ISensor::SCA_ISensor(SCA_IObject* gameobj,
- class SCA_EventManager* eventmgr,
- PyTypeObject* T ) :
- SCA_ILogicBrick(gameobj,T)
+ class SCA_EventManager* eventmgr) :
+ SCA_ILogicBrick(gameobj)
{
m_links = 0;
m_suspended = false;
@@ -301,7 +300,7 @@ PyObject* SCA_ISensor::PyIsPositive()
{
ShowDeprecationWarning("isPositive()", "the read-only positive property");
int retval = GetState();
- return PyInt_FromLong(retval);
+ return PyLong_FromSsize_t(retval);
}
const char SCA_ISensor::IsTriggered_doc[] =
@@ -314,7 +313,7 @@ PyObject* SCA_ISensor::PyIsTriggered()
int retval = 0;
if (SCA_PythonController::m_sCurrentController)
retval = SCA_PythonController::m_sCurrentController->IsTriggered(this);
- return PyInt_FromLong(retval);
+ return PyLong_FromSsize_t(retval);
}
/**
@@ -355,7 +354,7 @@ const char SCA_ISensor::GetFrequency_doc[] =
PyObject* SCA_ISensor::PyGetFrequency()
{
ShowDeprecationWarning("getFrequency()", "the frequency property");
- return PyInt_FromLong(m_pulse_frequency);
+ return PyLong_FromSsize_t(m_pulse_frequency);
}
/**
@@ -489,19 +488,17 @@ PyTypeObject SCA_ISensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_ISensor::Parents[] = {
- &SCA_ISensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
+
PyMethodDef SCA_ISensor::Methods[] = {
//Deprecated functions ----->
{"isPositive", (PyCFunction) SCA_ISensor::sPyIsPositive,
@@ -548,19 +545,6 @@ PyAttributeDef SCA_ISensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_ISensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ILogicBrick);
-}
-
-PyObject* SCA_ISensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ILogicBrick);
-}
-
-int SCA_ISensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ILogicBrick);
-}
PyObject* SCA_ISensor::pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
@@ -568,13 +552,13 @@ PyObject* SCA_ISensor::pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_D
int retval = 0;
if (SCA_PythonController::m_sCurrentController)
retval = SCA_PythonController::m_sCurrentController->IsTriggered(self);
- return PyInt_FromLong(retval);
+ return PyLong_FromSsize_t(retval);
}
PyObject* SCA_ISensor::pyattr_get_positive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_ISensor* self= static_cast<SCA_ISensor*>(self_v);
- return PyInt_FromLong(self->GetState());
+ return PyLong_FromSsize_t(self->GetState());
}
int SCA_ISensor::pyattr_check_level(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h
index 9bbd6ed41e4..81864ab6a34 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.h
+++ b/source/gameengine/GameLogic/SCA_ISensor.h
@@ -101,8 +101,7 @@ public:
};
SCA_ISensor(SCA_IObject* gameobj,
- class SCA_EventManager* eventmgr,
- PyTypeObject* T );;
+ class SCA_EventManager* eventmgr);;
~SCA_ISensor();
virtual void ReParent(SCA_IObject* parent);
@@ -173,10 +172,6 @@ public:
{ return !m_links; }
/* Python functions: */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
//Deprecated functions ----->
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsPositive);
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 336529667d7..f55921e648b 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -46,9 +46,8 @@ SCA_JoystickSensor::SCA_JoystickSensor(class SCA_JoystickManager* eventmgr,
short int joymode,
int axis, int axisf,int prec,
int button,
- int hat, int hatf, bool allevents,
- PyTypeObject* T )
- :SCA_ISensor(gameobj,eventmgr,T),
+ int hat, int hatf, bool allevents)
+ :SCA_ISensor(gameobj,eventmgr),
m_pJoystickMgr(eventmgr),
m_axis(axis),
m_axisf(axisf),
@@ -269,23 +268,17 @@ PyTypeObject SCA_JoystickSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-PyParentObject SCA_JoystickSensor::Parents[] = {
- &SCA_JoystickSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
PyMethodDef SCA_JoystickSensor::Methods[] = {
//Deprecated functions ------>
{"getIndex", (PyCFunction) SCA_JoystickSensor::sPyGetIndex, METH_NOARGS, (PY_METHODCHAR)GetIndex_doc},
@@ -328,20 +321,6 @@ PyAttributeDef SCA_JoystickSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_JoystickSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_JoystickSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_JoystickSensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ISensor);
-}
-
/* get index ---------------------------------------------------------- */
const char SCA_JoystickSensor::GetIndex_doc[] =
@@ -349,7 +328,7 @@ const char SCA_JoystickSensor::GetIndex_doc[] =
"\tReturns the joystick index to use.\n";
PyObject* SCA_JoystickSensor::PyGetIndex( ) {
ShowDeprecationWarning("getIndex()", "the index property");
- return PyInt_FromLong(m_joyindex);
+ return PyLong_FromSsize_t(m_joyindex);
}
@@ -359,7 +338,7 @@ const char SCA_JoystickSensor::SetIndex_doc[] =
"\tSets the joystick index to use.\n";
PyObject* SCA_JoystickSensor::PySetIndex( PyObject* value ) {
ShowDeprecationWarning("setIndex()", "the index property");
- int index = PyInt_AsLong( value ); /* -1 on error, will raise an error in this case */
+ 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;
@@ -410,7 +389,7 @@ PyObject* SCA_JoystickSensor::PyGetAxisValue( ) {
PyObject *list= PyList_New(axis_index);
while(axis_index--) {
- PyList_SET_ITEM(list, axis_index, PyInt_FromLong(joy->GetAxisPosition(axis_index)));
+ PyList_SET_ITEM(list, axis_index, PyLong_FromSsize_t(joy->GetAxisPosition(axis_index)));
}
return list;
@@ -423,7 +402,7 @@ const char SCA_JoystickSensor::GetThreshold_doc[] =
"\tReturns the threshold of the axis.\n";
PyObject* SCA_JoystickSensor::PyGetThreshold( ) {
ShowDeprecationWarning("getThreshold()", "the threshold property");
- return PyInt_FromLong(m_precision);
+ return PyLong_FromSsize_t(m_precision);
}
@@ -447,7 +426,7 @@ const char SCA_JoystickSensor::GetButton_doc[] =
"\tReturns the current button this sensor is checking.\n";
PyObject* SCA_JoystickSensor::PyGetButton( ) {
ShowDeprecationWarning("getButton()", "the button property");
- return PyInt_FromLong(m_button);
+ return PyLong_FromSsize_t(m_button);
}
/* set button -------------------------------------------------------- */
@@ -456,7 +435,7 @@ const char SCA_JoystickSensor::SetButton_doc[] =
"\tSets the button the sensor reacts to.\n";
PyObject* SCA_JoystickSensor::PySetButton( PyObject* value ) {
ShowDeprecationWarning("setButton()", "the button property");
- int button = PyInt_AsLong(value);
+ int button = PyLong_AsSsize_t(value);
if(button==-1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError, "expected an int");
return NULL;
@@ -487,7 +466,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
if(joy) {
for (i=0; i < joy->GetNumberOfButtons(); i++) {
if (joy->aButtonPressIsPositive(i)) {
- value = PyInt_FromLong(i);
+ value = PyLong_FromSsize_t(i);
PyList_Append(ls, value);
Py_DECREF(value);
}
@@ -549,7 +528,7 @@ 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 PyInt_FromLong( joy ? joy->GetNumberOfAxes() : 0 );
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 );
}
@@ -559,7 +538,7 @@ const char SCA_JoystickSensor::NumberOfButtons_doc[] =
PyObject* SCA_JoystickSensor::PyNumberOfButtons( ) {
ShowDeprecationWarning("getNumButtons()", "the numButtons property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
- return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 );
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 );
}
@@ -569,7 +548,7 @@ const char SCA_JoystickSensor::NumberOfHats_doc[] =
PyObject* SCA_JoystickSensor::PyNumberOfHats( ) {
ShowDeprecationWarning("getNumHats()", "the numHats property");
SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
- return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 );
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
}
const char SCA_JoystickSensor::Connected_doc[] =
@@ -591,7 +570,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYAT
PyObject *list= PyList_New(axis_index);
while(axis_index--) {
- PyList_SET_ITEM(list, axis_index, PyInt_FromLong(joy->GetAxisPosition(axis_index)));
+ PyList_SET_ITEM(list, axis_index, PyLong_FromSsize_t(joy->GetAxisPosition(axis_index)));
}
return list;
@@ -607,7 +586,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYAT
return NULL;
}
- return PyInt_FromLong(joy->GetAxisPosition(self->m_axis-1));
+ return PyLong_FromSsize_t(joy->GetAxisPosition(self->m_axis-1));
}
PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
@@ -619,7 +598,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATT
PyObject *list= PyList_New(hat_index);
while(hat_index--) {
- PyList_SET_ITEM(list, hat_index, PyInt_FromLong(joy->GetHat(hat_index)));
+ PyList_SET_ITEM(list, hat_index, PyLong_FromSsize_t(joy->GetHat(hat_index)));
}
return list;
@@ -630,28 +609,28 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATT
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
- return PyInt_FromLong(joy->GetHat(self->m_hat-1));
+ return PyLong_FromSsize_t(joy->GetHat(self->m_hat-1));
}
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 = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
- return PyInt_FromLong( joy ? joy->GetNumberOfAxes() : 0 );
+ 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 = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
- return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 );
+ 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 = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
- return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 );
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
}
PyObject* SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index e6a1d2eef32..32f8ce567d2 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -106,8 +106,7 @@ public:
short int joymode,
int axis, int axisf,int prec,
int button,
- int hat, int hatf, bool allevents,
- PyTypeObject* T=&Type );
+ int hat, int hatf, bool allevents);
virtual ~SCA_JoystickSensor();
virtual CValue* GetReplica();
@@ -123,10 +122,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* Joystick Index */
KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetIndex);
KX_PYMETHOD_DOC_O(SCA_JoystickSensor,SetIndex);
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index f8ee8ed8b41..999e34dfa36 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -48,9 +48,8 @@ SCA_KeyboardSensor::SCA_KeyboardSensor(SCA_KeyboardManager* keybdmgr,
bool bAllKeys,
const STR_String& targetProp,
const STR_String& toggleProp,
- SCA_IObject* gameobj,
- PyTypeObject* T )
- :SCA_ISensor(gameobj,keybdmgr,T),
+ SCA_IObject* gameobj)
+ :SCA_ISensor(gameobj,keybdmgr),
m_pKeyboardMgr(keybdmgr),
m_hotkey(hotkey),
m_qual(qual),
@@ -418,7 +417,7 @@ const char SCA_KeyboardSensor::GetKey_doc[] =
PyObject* SCA_KeyboardSensor::PyGetKey()
{
ShowDeprecationWarning("getKey()", "the key property");
- return PyInt_FromLong(m_hotkey);
+ return PyLong_FromSsize_t(m_hotkey);
}
/** 2. SetKey: change the key to look at */
@@ -450,7 +449,7 @@ const char SCA_KeyboardSensor::GetHold1_doc[] =
PyObject* SCA_KeyboardSensor::PyGetHold1()
{
ShowDeprecationWarning("getHold1()", "the hold1 property");
- return PyInt_FromLong(m_qual);
+ return PyLong_FromSsize_t(m_qual);
}
/** 4. SetHold1: change the first bucky bit */
@@ -482,7 +481,7 @@ const char SCA_KeyboardSensor::GetHold2_doc[] =
PyObject* SCA_KeyboardSensor::PyGetHold2()
{
ShowDeprecationWarning("getHold2()", "the hold2 property");
- return PyInt_FromLong(m_qual2);
+ return PyLong_FromSsize_t(m_qual2);
}
/** 6. SetHold2: change the second bucky bit */
@@ -532,8 +531,8 @@ PyObject* SCA_KeyboardSensor::PyGetPressedKeys()
|| (inevent.m_status == SCA_InputEvent::KX_JUSTRELEASED))
{
PyObject* keypair = PyList_New(2);
- PyList_SET_ITEM(keypair,0,PyInt_FromLong(i));
- PyList_SET_ITEM(keypair,1,PyInt_FromLong(inevent.m_status));
+ 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++;
@@ -572,8 +571,8 @@ PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys()
|| (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED))
{
PyObject* keypair = PyList_New(2);
- PyList_SET_ITEM(keypair,0,PyInt_FromLong(i));
- PyList_SET_ITEM(keypair,1,PyInt_FromLong(inevent.m_status));
+ 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++;
@@ -592,12 +591,12 @@ 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")
{
- if (!PyInt_Check(value)) {
+ if (!PyLong_Check(value)) {
PyErr_SetString(PyExc_ValueError, "sensor.getKeyStatus(int): Keyboard Sensor, expected an int");
return NULL;
}
- int keycode = PyInt_AsLong(value);
+ int keycode = PyLong_AsSsize_t(value);
if ((keycode < SCA_IInputDevice::KX_BEGINKEY)
|| (keycode > SCA_IInputDevice::KX_ENDKEY)){
@@ -607,7 +606,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) keycode);
- return PyInt_FromLong(inevent.m_status);
+ return PyLong_FromSsize_t(inevent.m_status);
}
/* ------------------------------------------------------------------------- */
@@ -631,19 +630,15 @@ PyTypeObject SCA_KeyboardSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_KeyboardSensor::Parents[] = {
- &SCA_KeyboardSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_KeyboardSensor::Methods[] = {
@@ -672,20 +667,6 @@ PyAttributeDef SCA_KeyboardSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_KeyboardSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_KeyboardSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_KeyboardSensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ISensor);
-}
-
PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
@@ -701,8 +682,8 @@ PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBU
if (inevent.m_status != SCA_InputEvent::KX_NO_INPUTSTATUS)
{
PyObject* keypair = PyList_New(2);
- PyList_SET_ITEM(keypair,0,PyInt_FromLong(i));
- PyList_SET_ITEM(keypair,1,PyInt_FromLong(inevent.m_status));
+ PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i));
+ PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status));
PyList_Append(resultlist,keypair);
}
}
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index 033225cd9be..3185b386d41 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -94,8 +94,7 @@ public:
bool bAllKeys,
const STR_String& targetProp,
const STR_String& toggleProp,
- SCA_IObject* gameobj,
- PyTypeObject* T=&Type );
+ SCA_IObject* gameobj);
virtual ~SCA_KeyboardSensor();
virtual CValue* GetReplica();
virtual void Init();
@@ -110,10 +109,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
//Deprecated functions ----->
/** 1. GetKey : check which key this sensor looks at */
KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetKey);
diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp
index 83271288154..b782c6dfb93 100644
--- a/source/gameengine/GameLogic/SCA_LogicManager.cpp
+++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp
@@ -307,6 +307,7 @@ void SCA_LogicManager::AddTriggeredController(SCA_IController* controller, SCA_I
controller->Activate(m_triggeredControllerSet);
// so that the controller knows which sensor has activited it
// only needed for python controller
+ // Note that this is safe even if the controller is subclassed.
if (controller->GetType() == &SCA_PythonController::Type)
{
SCA_PythonController* pythonController = (SCA_PythonController*)controller;
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index c5e1c3c0441..49fa19dce38 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -49,9 +49,8 @@
SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr,
int startx,int starty,
short int mousemode,
- SCA_IObject* gameobj,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T),
+ SCA_IObject* gameobj)
+ : SCA_ISensor(gameobj,eventmgr),
m_pMouseMgr(eventmgr),
m_x(startx),
m_y(starty)
@@ -254,7 +253,7 @@ const char SCA_MouseSensor::GetXPosition_doc[] =
"\tpixels\n";
PyObject* SCA_MouseSensor::PyGetXPosition() {
ShowDeprecationWarning("getXPosition()", "the position property");
- return PyInt_FromLong(m_x);
+ return PyLong_FromSsize_t(m_x);
}
/* get y position ---------------------------------------------------------- */
@@ -265,7 +264,7 @@ const char SCA_MouseSensor::GetYPosition_doc[] =
"\tpixels\n";
PyObject* SCA_MouseSensor::PyGetYPosition() {
ShowDeprecationWarning("getYPosition()", "the position property");
- return PyInt_FromLong(m_y);
+ return PyLong_FromSsize_t(m_y);
}
//<----- Deprecated
@@ -273,9 +272,9 @@ 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")
{
- if (PyInt_Check(value))
+ if (PyLong_Check(value))
{
- int button = PyInt_AsLong(value);
+ int button = PyLong_AsSsize_t(value);
if ((button < SCA_IInputDevice::KX_LEFTMOUSE)
|| (button > SCA_IInputDevice::KX_RIGHTMOUSE)){
@@ -285,7 +284,7 @@ KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, getButtonStatus,
SCA_IInputDevice* mousedev = m_pMouseMgr->GetInputDevice();
const SCA_InputEvent& event = mousedev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) button);
- return PyInt_FromLong(event.m_status);
+ return PyLong_FromSsize_t(event.m_status);
}
Py_RETURN_NONE;
@@ -312,19 +311,15 @@ PyTypeObject SCA_MouseSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_MouseSensor::Parents[] = {
- &SCA_MouseSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_MouseSensor::Methods[] = {
@@ -342,18 +337,4 @@ PyAttributeDef SCA_MouseSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_MouseSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_MouseSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_MouseSensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ISensor);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h
index 6d6302b514a..47f0378bf69 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.h
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.h
@@ -92,8 +92,7 @@ class SCA_MouseSensor : public SCA_ISensor
SCA_MouseSensor(class SCA_MouseManager* keybdmgr,
int startx,int starty,
short int mousemode,
- SCA_IObject* gameobj,
- PyTypeObject* T=&Type );
+ SCA_IObject* gameobj);
virtual ~SCA_MouseSensor();
virtual CValue* GetReplica();
@@ -109,10 +108,6 @@ class SCA_MouseSensor : public SCA_ISensor
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
//Deprecated functions ----->
/* read x-coordinate */
KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetXPosition);
diff --git a/source/gameengine/GameLogic/SCA_NANDController.cpp b/source/gameengine/GameLogic/SCA_NANDController.cpp
index d27aea5e6f7..c00e5d6e617 100644
--- a/source/gameengine/GameLogic/SCA_NANDController.cpp
+++ b/source/gameengine/GameLogic/SCA_NANDController.cpp
@@ -42,10 +42,9 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_NANDController::SCA_NANDController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_NANDController::SCA_NANDController(SCA_IObject* gameobj)
:
- SCA_IController(gameobj,T)
+ SCA_IController(gameobj)
{
}
@@ -116,19 +115,15 @@ PyTypeObject SCA_NANDController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_NANDController::Parents[] = {
- &SCA_NANDController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_NANDController::Methods[] = {
@@ -139,12 +134,4 @@ PyAttributeDef SCA_NANDController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_NANDController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_NANDController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_NANDController.h b/source/gameengine/GameLogic/SCA_NANDController.h
index 0ae0ff19745..36a145e5f2b 100644
--- a/source/gameengine/GameLogic/SCA_NANDController.h
+++ b/source/gameengine/GameLogic/SCA_NANDController.h
@@ -39,7 +39,7 @@ class SCA_NANDController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_NANDController(SCA_IObject* gameobj,PyTypeObject* T=&Type);
+ SCA_NANDController(SCA_IObject* gameobj);
virtual ~SCA_NANDController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
@@ -47,10 +47,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_NANDCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_NORController.cpp b/source/gameengine/GameLogic/SCA_NORController.cpp
index 6c9141636b2..9762d44fd5d 100644
--- a/source/gameengine/GameLogic/SCA_NORController.cpp
+++ b/source/gameengine/GameLogic/SCA_NORController.cpp
@@ -42,10 +42,9 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_NORController::SCA_NORController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_NORController::SCA_NORController(SCA_IObject* gameobj)
:
- SCA_IController(gameobj,T)
+ SCA_IController(gameobj)
{
}
@@ -116,19 +115,15 @@ PyTypeObject SCA_NORController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_NORController::Parents[] = {
- &SCA_NORController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_NORController::Methods[] = {
@@ -139,12 +134,4 @@ PyAttributeDef SCA_NORController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_NORController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_NORController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_NORController.h b/source/gameengine/GameLogic/SCA_NORController.h
index 06cbb70a489..b96232375d6 100644
--- a/source/gameengine/GameLogic/SCA_NORController.h
+++ b/source/gameengine/GameLogic/SCA_NORController.h
@@ -39,18 +39,10 @@ class SCA_NORController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_NORController(SCA_IObject* gameobj,PyTypeObject* T=&Type);
+ SCA_NORController(SCA_IObject* gameobj);
virtual ~SCA_NORController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_NORCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_ORController.cpp b/source/gameengine/GameLogic/SCA_ORController.cpp
index 42c0a67d657..a526dd8353c 100644
--- a/source/gameengine/GameLogic/SCA_ORController.cpp
+++ b/source/gameengine/GameLogic/SCA_ORController.cpp
@@ -42,9 +42,8 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_ORController::SCA_ORController(SCA_IObject* gameobj,
- PyTypeObject* T)
- :SCA_IController(gameobj, T)
+SCA_ORController::SCA_ORController(SCA_IObject* gameobj)
+ :SCA_IController(gameobj)
{
}
@@ -110,19 +109,15 @@ PyTypeObject SCA_ORController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_ORController::Parents[] = {
- &SCA_ORController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_ORController::Methods[] = {
@@ -133,13 +128,4 @@ PyAttributeDef SCA_ORController::Attributes[] = {
{ NULL } //Sentinel
};
-
-PyObject* SCA_ORController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_ORController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ORController.h b/source/gameengine/GameLogic/SCA_ORController.h
index 66f772c739e..09d31a85190 100644
--- a/source/gameengine/GameLogic/SCA_ORController.h
+++ b/source/gameengine/GameLogic/SCA_ORController.h
@@ -39,18 +39,11 @@ class SCA_ORController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_ORController(SCA_IObject* gameobj, PyTypeObject* T=&Type);
+ SCA_ORController(SCA_IObject* gameobj);
virtual ~SCA_ORController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
};
#endif //__KX_ORCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
index 4faa4b55d4a..215e30eceaf 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
@@ -42,8 +42,8 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_PropertyActuator::SCA_PropertyActuator(SCA_IObject* gameobj,SCA_IObject* sourceObj,const STR_String& propname,const STR_String& expr,int acttype,PyTypeObject* T )
- : SCA_IActuator(gameobj,T),
+SCA_PropertyActuator::SCA_PropertyActuator(SCA_IObject* gameobj,SCA_IObject* sourceObj,const STR_String& propname,const STR_String& expr,int acttype)
+ : SCA_IActuator(gameobj),
m_type(acttype),
m_propname(propname),
m_exprtxt(expr),
@@ -244,19 +244,15 @@ PyTypeObject SCA_PropertyActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_PropertyActuator::Parents[] = {
- &SCA_PropertyActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_PropertyActuator::Methods[] = {
@@ -276,18 +272,6 @@ PyAttributeDef SCA_PropertyActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_PropertyActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* SCA_PropertyActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int SCA_PropertyActuator::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_IActuator);
-}
-
/* 1. setProperty */
const char SCA_PropertyActuator::SetProperty_doc[] =
"setProperty(name)\n"
@@ -322,7 +306,7 @@ const char SCA_PropertyActuator::GetProperty_doc[] =
PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getProperty()", "the 'propName' property");
- return PyString_FromString(m_propname);
+ return PyUnicode_FromString(m_propname);
}
/* 3. setValue */
@@ -352,7 +336,7 @@ const char SCA_PropertyActuator::GetValue_doc[] =
PyObject* SCA_PropertyActuator::PyGetValue(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getValue()", "the value property");
- return PyString_FromString(m_exprtxt);
+ return PyUnicode_FromString(m_exprtxt);
}
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.h b/source/gameengine/GameLogic/SCA_PropertyActuator.h
index a8df08dfc6e..8fb2e7a7bc5 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.h
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.h
@@ -64,9 +64,7 @@ public:
SCA_IObject* sourceObj,
const STR_String& propname,
const STR_String& expr,
- int acttype,
- PyTypeObject* T=&Type
- );
+ int acttype);
~SCA_PropertyActuator();
@@ -86,10 +84,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// python wrapped methods
KX_PYMETHOD_DOC(SCA_PropertyActuator,SetProperty);
KX_PYMETHOD_DOC(SCA_PropertyActuator,GetProperty);
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index 3b343af3cba..6d2e1a0aca5 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -48,9 +48,8 @@ SCA_PropertySensor::SCA_PropertySensor(SCA_EventManager* eventmgr,
const STR_String& propname,
const STR_String& propval,
const STR_String& propmaxval,
- KX_PROPSENSOR_TYPE checktype,
- PyTypeObject* T )
- : SCA_ISensor(gameobj,eventmgr,T),
+ KX_PROPSENSOR_TYPE checktype)
+ : SCA_ISensor(gameobj,eventmgr),
m_checktype(checktype),
m_checkpropval(propval),
m_checkpropmaxval(propmaxval),
@@ -319,19 +318,15 @@ PyTypeObject SCA_PropertySensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_PropertySensor::Parents[] = {
- &SCA_PropertySensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_PropertySensor::Methods[] = {
@@ -353,19 +348,6 @@ PyAttributeDef SCA_PropertySensor::Attributes[] = {
{ NULL } //Sentinel
};
-
-PyObject* SCA_PropertySensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_PropertySensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_PropertySensor::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_ISensor);
-}
-
/* 1. getType */
const char SCA_PropertySensor::GetType_doc[] =
"getType()\n"
@@ -373,7 +355,7 @@ const char SCA_PropertySensor::GetType_doc[] =
PyObject* SCA_PropertySensor::PyGetType()
{
ShowDeprecationWarning("getType()", "the mode property");
- return PyInt_FromLong(m_checktype);
+ return PyLong_FromSsize_t(m_checktype);
}
/* 2. setType */
@@ -407,7 +389,7 @@ const char SCA_PropertySensor::GetProperty_doc[] =
PyObject* SCA_PropertySensor::PyGetProperty()
{
ShowDeprecationWarning("getProperty()", "the 'propName' property");
- return PyString_FromString(m_checkpropname);
+ return PyUnicode_FromString(m_checkpropname);
}
/* 4. setProperty */
@@ -444,7 +426,7 @@ const char SCA_PropertySensor::GetValue_doc[] =
PyObject* SCA_PropertySensor::PyGetValue()
{
ShowDeprecationWarning("getValue()", "the value property");
- return PyString_FromString(m_checkpropval);
+ return PyUnicode_FromString(m_checkpropval);
}
/* 6. setValue */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h
index 538ecd65949..3513fcdf5ae 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.h
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.h
@@ -67,8 +67,7 @@ public:
const STR_String& propname,
const STR_String& propval,
const STR_String& propmaxval,
- KX_PROPSENSOR_TYPE checktype,
- PyTypeObject* T=&Type );
+ KX_PROPSENSOR_TYPE checktype);
/**
* For property sensor, it is used to release the pre-calculated expression
@@ -89,10 +88,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* 1. getType */
KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetType);
/* 2. setType */
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index 80e4f54c9c5..ffd95f00699 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -47,10 +47,8 @@
SCA_PythonController* SCA_PythonController::m_sCurrentController = NULL;
-SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj,
- int mode,
- PyTypeObject* T)
- : SCA_IController(gameobj, T),
+SCA_PythonController::SCA_PythonController(SCA_IObject* gameobj, int mode)
+ : SCA_IController(gameobj),
m_bytecode(NULL),
m_function(NULL),
m_function_argc(0),
@@ -150,7 +148,7 @@ void SCA_PythonController::SetDictionary(PyObject* pythondictionary)
/* Without __file__ set the sys.argv[0] is used for the filename
* which ends up with lines from the blender binary being printed in the console */
- PyDict_SetItemString(m_pythondictionary, "__file__", PyString_FromString(m_scriptName.Ptr()));
+ PyDict_SetItemString(m_pythondictionary, "__file__", PyUnicode_FromString(m_scriptName.Ptr()));
}
@@ -180,16 +178,16 @@ SCA_IActuator* SCA_PythonController::LinkedActuatorFromPy(PyObject *value)
std::vector<SCA_IActuator*> lacts = m_sCurrentController->GetLinkedActuators();
std::vector<SCA_IActuator*>::iterator it;
- if (PyString_Check(value)) {
+ if (PyUnicode_Check(value)) {
/* get the actuator from the name */
- char *name= PyString_AsString(value);
+ char *name= _PyUnicode_AsString(value);
for(it = lacts.begin(); it!= lacts.end(); ++it) {
if( name == (*it)->GetName() ) {
return *it;
}
}
}
- else if (BGE_PROXY_CHECK_TYPE(value)) {
+ else if (PyObject_TypeCheck(value, &SCA_IActuator::Type)) {
PyObjectPlus *value_plus= BGE_PROXY_REF(value);
for(it = lacts.begin(); it!= lacts.end(); ++it) {
if( static_cast<SCA_IActuator*>(value_plus) == (*it) ) {
@@ -200,7 +198,7 @@ SCA_IActuator* SCA_PythonController::LinkedActuatorFromPy(PyObject *value)
/* set the exception */
PyObject *value_str = PyObject_Repr(value); /* new ref */
- PyErr_Format(PyExc_ValueError, "'%s' not in this python controllers actuator list", PyString_AsString(value_str));
+ PyErr_Format(PyExc_ValueError, "'%s' not in this python controllers actuator list", _PyUnicode_AsString(value_str));
Py_DECREF(value_str);
return false;
@@ -245,19 +243,17 @@ PyTypeObject SCA_PythonController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_IController::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-PyParentObject SCA_PythonController::Parents[] = {
- &SCA_PythonController::Type,
- &SCA_IController::Type,
- &CValue::Type,
- NULL
-};
PyMethodDef SCA_PythonController::Methods[] = {
{"activate", (PyCFunction) SCA_PythonController::sPyActivate, METH_O},
{"deactivate", (PyCFunction) SCA_PythonController::sPyDeActivate, METH_O},
@@ -490,22 +486,6 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
m_sCurrentController = NULL;
}
-
-
-PyObject* SCA_PythonController::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_PythonController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
-int SCA_PythonController::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IController);
-}
-
PyObject* SCA_PythonController::PyActivate(PyObject *value)
{
if(m_sCurrentController != this) {
@@ -540,13 +520,13 @@ PyObject* SCA_PythonController::PyDeActivate(PyObject *value)
PyObject* SCA_PythonController::PyGetScript()
{
ShowDeprecationWarning("getScript()", "the script property");
- return PyString_FromString(m_scriptText);
+ return PyUnicode_FromString(m_scriptText);
}
/* 2. setScript */
PyObject* SCA_PythonController::PySetScript(PyObject* value)
{
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
ShowDeprecationWarning("setScript()", "the script property");
@@ -565,15 +545,20 @@ PyObject* SCA_PythonController::PySetScript(PyObject* value)
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)))));
+ // static_cast<void *>(dynamic_cast<Derived *>(obj)) - static_cast<void *>(obj)
+
SCA_PythonController* self= static_cast<SCA_PythonController*>(self_v);
- return PyString_FromString(self->m_scriptText);
+ return PyUnicode_FromString(self->m_scriptText);
}
+
+
int SCA_PythonController::pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
SCA_PythonController* self= static_cast<SCA_PythonController*>(self_v);
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
if (scriptArg==NULL) {
PyErr_SetString(PyExc_TypeError, "controller.script = string: Python Controller, expected a string script text");
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index 0c2af79c3a3..9311b3f355e 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -72,7 +72,7 @@ class SCA_PythonController : public SCA_IController
//virtual CValue* AddRef();
//virtual int Release(); // Release a reference to this value (when reference count reaches 0, the value is removed from the heap)
- SCA_PythonController(SCA_IObject* gameobj, int mode, PyTypeObject* T = &Type);
+ SCA_PythonController(SCA_IObject* gameobj, int mode);
virtual ~SCA_PythonController();
virtual CValue* GetReplica();
@@ -96,10 +96,6 @@ class SCA_PythonController : public SCA_IController
static PyObject* sPyAddActiveActuator(PyObject* self,
PyObject* args);
static SCA_IActuator* LinkedActuatorFromPy(PyObject *value);
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
KX_PYMETHOD_O(SCA_PythonController,Activate);
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index a722590dd10..e903d10f9a5 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -50,9 +50,8 @@ SCA_RandomActuator::SCA_RandomActuator(SCA_IObject *gameobj,
SCA_RandomActuator::KX_RANDOMACT_MODE mode,
float para1,
float para2,
- const STR_String &propName,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T),
+ const STR_String &propName)
+ : SCA_IActuator(gameobj),
m_propname(propName),
m_parameter1(para1),
m_parameter2(para2),
@@ -332,19 +331,15 @@ PyTypeObject SCA_RandomActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_RandomActuator::Parents[] = {
- &SCA_RandomActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_RandomActuator::Methods[] = {
@@ -384,14 +379,14 @@ PyAttributeDef SCA_RandomActuator::Attributes[] = {
PyObject* SCA_RandomActuator::pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_RandomActuator* act = static_cast<SCA_RandomActuator*>(self);
- return PyInt_FromLong(act->m_base->GetSeed());
+ return PyLong_FromSsize_t(act->m_base->GetSeed());
}
int SCA_RandomActuator::pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
SCA_RandomActuator* act = static_cast<SCA_RandomActuator*>(self);
- if (PyInt_Check(value)) {
- int ival = PyInt_AsLong(value);
+ if (PyLong_Check(value)) {
+ int ival = PyLong_AsSsize_t(value);
act->m_base->SetSeed(ival);
return PY_SET_ATTR_SUCCESS;
} else {
@@ -400,19 +395,6 @@ int SCA_RandomActuator::pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_
}
}
-PyObject* SCA_RandomActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* SCA_RandomActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int SCA_RandomActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
/* 1. setSeed */
const char SCA_RandomActuator::SetSeed_doc[] =
"setSeed(seed)\n"
@@ -439,7 +421,7 @@ const char SCA_RandomActuator::GetSeed_doc[] =
PyObject* SCA_RandomActuator::PyGetSeed()
{
ShowDeprecationWarning("getSeed()", "the seed property");
- return PyInt_FromLong(m_base->GetSeed());
+ return PyLong_FromSsize_t(m_base->GetSeed());
}
/* 4. getPara1 */
@@ -473,7 +455,7 @@ const char SCA_RandomActuator::GetDistribution_doc[] =
PyObject* SCA_RandomActuator::PyGetDistribution()
{
ShowDeprecationWarning("getDistribution()", "the distribution property");
- return PyInt_FromLong(m_distribution);
+ return PyLong_FromSsize_t(m_distribution);
}
/* 9. setProperty */
@@ -508,7 +490,7 @@ const char SCA_RandomActuator::GetProperty_doc[] =
PyObject* SCA_RandomActuator::PyGetProperty()
{
ShowDeprecationWarning("getProperty()", "the 'propName' property");
- return PyString_FromString(m_propname);
+ return PyUnicode_FromString(m_propname);
}
/* 11. setBoolConst */
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h
index 59863589b60..c7d3fe21217 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.h
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.h
@@ -85,8 +85,7 @@ class SCA_RandomActuator : public SCA_IActuator
KX_RANDOMACT_MODE mode,
float para1,
float para2,
- const STR_String &propName,
- PyTypeObject* T=&Type);
+ const STR_String &propName);
virtual ~SCA_RandomActuator();
virtual bool Update();
@@ -97,10 +96,6 @@ class SCA_RandomActuator : public SCA_IActuator
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
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);
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index d5cbeef01ae..e036a77707e 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -46,9 +46,8 @@
SCA_RandomSensor::SCA_RandomSensor(SCA_EventManager* eventmgr,
SCA_IObject* gameobj,
- int startseed,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T)
+ int startseed)
+ : SCA_ISensor(gameobj,eventmgr)
{
m_basegenerator = new SCA_RandomNumberGenerator(startseed);
Init();
@@ -147,19 +146,15 @@ PyTypeObject SCA_RandomSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_RandomSensor::Parents[] = {
- &SCA_RandomSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_RandomSensor::Methods[] = {
@@ -177,19 +172,6 @@ PyAttributeDef SCA_RandomSensor::Attributes[] = {
{NULL} //Sentinel
};
-PyObject* SCA_RandomSensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* SCA_RandomSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int SCA_RandomSensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ISensor);
-}
-
/* 1. setSeed */
const char SCA_RandomSensor::SetSeed_doc[] =
"setSeed(seed)\n"
@@ -216,7 +198,7 @@ const char SCA_RandomSensor::GetSeed_doc[] =
"\tequal series.\n";
PyObject* SCA_RandomSensor::PyGetSeed() {
ShowDeprecationWarning("getSeed()", "the seed property");
- return PyInt_FromLong(m_basegenerator->GetSeed());
+ return PyLong_FromSsize_t(m_basegenerator->GetSeed());
}
/* 3. getLastDraw */
@@ -225,24 +207,24 @@ const char SCA_RandomSensor::GetLastDraw_doc[] =
"\tReturn the last value that was drawn.\n";
PyObject* SCA_RandomSensor::PyGetLastDraw() {
ShowDeprecationWarning("getLastDraw()", "the lastDraw property");
- return PyInt_FromLong(m_lastdraw);
+ 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);
- return PyInt_FromLong(self->m_basegenerator->GetSeed());
+ return PyLong_FromSsize_t(self->m_basegenerator->GetSeed());
}
int SCA_RandomSensor::pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
SCA_RandomSensor* self= static_cast<SCA_RandomSensor*>(self_v);
- if (!PyInt_Check(value)) {
+ if (!PyLong_Check(value)) {
PyErr_SetString(PyExc_TypeError, "sensor.seed = int: Random Sensor, expected an integer");
return PY_SET_ATTR_FAIL;
}
- self->m_basegenerator->SetSeed(PyInt_AsLong(value));
+ self->m_basegenerator->SetSeed(PyLong_AsSsize_t(value));
return PY_SET_ATTR_SUCCESS;
}
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h
index b2bf2440966..5e66c36cccf 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.h
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.h
@@ -48,8 +48,7 @@ class SCA_RandomSensor : public SCA_ISensor
public:
SCA_RandomSensor(class SCA_EventManager* rndmgr,
SCA_IObject* gameobj,
- int startseed,
- PyTypeObject* T=&Type);
+ int startseed);
virtual ~SCA_RandomSensor();
virtual CValue* GetReplica();
virtual void ProcessReplica();
@@ -61,10 +60,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* 1. setSeed */
KX_PYMETHOD_DOC_VARARGS(SCA_RandomSensor,SetSeed);
/* 2. getSeed */
diff --git a/source/gameengine/GameLogic/SCA_XNORController.cpp b/source/gameengine/GameLogic/SCA_XNORController.cpp
index aee8e26c21a..527adc70cc6 100644
--- a/source/gameengine/GameLogic/SCA_XNORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XNORController.cpp
@@ -42,10 +42,9 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_XNORController::SCA_XNORController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_XNORController::SCA_XNORController(SCA_IObject* gameobj)
:
- SCA_IController(gameobj,T)
+ SCA_IController(gameobj)
{
}
@@ -120,19 +119,15 @@ PyTypeObject SCA_XNORController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_XNORController::Parents[] = {
- &SCA_XNORController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_XNORController::Methods[] = {
@@ -143,12 +138,4 @@ PyAttributeDef SCA_XNORController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_XNORController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_XNORController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_XNORController.h b/source/gameengine/GameLogic/SCA_XNORController.h
index 4aad5763cb0..18e77fae665 100644
--- a/source/gameengine/GameLogic/SCA_XNORController.h
+++ b/source/gameengine/GameLogic/SCA_XNORController.h
@@ -39,7 +39,7 @@ class SCA_XNORController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_XNORController(SCA_IObject* gameobj,PyTypeObject* T=&Type);
+ SCA_XNORController(SCA_IObject* gameobj);
virtual ~SCA_XNORController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
@@ -48,9 +48,6 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_XNORCONTROLLER
diff --git a/source/gameengine/GameLogic/SCA_XORController.cpp b/source/gameengine/GameLogic/SCA_XORController.cpp
index 5afb3a750f5..c0916224fe6 100644
--- a/source/gameengine/GameLogic/SCA_XORController.cpp
+++ b/source/gameengine/GameLogic/SCA_XORController.cpp
@@ -42,10 +42,9 @@
/* Native functions */
/* ------------------------------------------------------------------------- */
-SCA_XORController::SCA_XORController(SCA_IObject* gameobj,
- PyTypeObject* T)
+SCA_XORController::SCA_XORController(SCA_IObject* gameobj)
:
- SCA_IController(gameobj,T)
+ SCA_IController(gameobj)
{
}
@@ -120,19 +119,15 @@ PyTypeObject SCA_XORController::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject SCA_XORController::Parents[] = {
- &SCA_XORController::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IController::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef SCA_XORController::Methods[] = {
@@ -143,12 +138,4 @@ PyAttributeDef SCA_XORController::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* SCA_XORController::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IController);
-}
-
-PyObject* SCA_XORController::py_getattro_dict() {
- py_getattro_dict_up(SCA_IController);
-}
-
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_XORController.h b/source/gameengine/GameLogic/SCA_XORController.h
index feb9f2ed07c..2607a533661 100644
--- a/source/gameengine/GameLogic/SCA_XORController.h
+++ b/source/gameengine/GameLogic/SCA_XORController.h
@@ -39,18 +39,10 @@ class SCA_XORController : public SCA_IController
Py_Header;
//virtual void Trigger(class SCA_LogicManager* logicmgr);
public:
- SCA_XORController(SCA_IObject* gameobj,PyTypeObject* T=&Type);
+ SCA_XORController(SCA_IObject* gameobj);
virtual ~SCA_XORController();
virtual CValue* GetReplica();
virtual void Trigger(SCA_LogicManager* logicmgr);
-
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
-
};
#endif //__KX_XORCONTROLLER
diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp
deleted file mode 100644
index b1e2b5af0e6..00000000000
--- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp
+++ /dev/null
@@ -1,412 +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 *****
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "GL/glew.h"
-
-#include "GPC_PolygonMaterial.h"
-#include "MT_Vector3.h"
-#include "RAS_IRasterizer.h"
-#include "RAS_GLExtensionManager.h"
-
-/* This list includes only data type definitions */
-#include "DNA_object_types.h"
-#include "DNA_material_types.h"
-#include "DNA_image_types.h"
-#include "DNA_lamp_types.h"
-#include "DNA_group_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_camera_types.h"
-#include "DNA_property_types.h"
-#include "DNA_text_types.h"
-#include "DNA_sensor_types.h"
-#include "DNA_controller_types.h"
-#include "DNA_actuator_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_world_types.h"
-
-#include "BKE_global.h"
-#include "BKE_image.h"
-#include "BKE_mesh.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "IMB_imbuf_types.h"
-/* end of blender include block */
-
-static Image *fCurpage=0;
-static int fCurtile=0, fCurmode=0, fCurTileXRep=0, fCurTileYRep=0;
-static short fTexWindx, fTexWindy, fTexWinsx, fTexWinsy;
-static int fDoMipMap = 1;
-static int fLinearMipMap=1;
-static int fAlphamode= -1;
-
- /* (n&(n-1)) zeros the least significant bit of n */
-static int is_pow2(int num) {
- return ((num)&(num-1))==0;
-}
-static int smaller_pow2(int num) {
- while (!is_pow2(num))
- num= num&(num-1);
- return num;
-}
-
-static void my_make_repbind(Image *ima)
-{
- if(ima==0 || ima->ibufs.first==0) return;
-
- if(ima->repbind) {
- glDeleteTextures(ima->totbind, (GLuint*)ima->repbind);
- delete (ima->repbind);
- ima->repbind= 0;
- }
- ima->totbind= ima->xrep*ima->yrep;
- if(ima->totbind>1) {
- ima->repbind= (unsigned int *) malloc(sizeof(int)*ima->totbind);
- for (int i=0;i<ima->totbind;i++)
- ((int*)ima->repbind)[i] = 0;
- }
-}
-
-extern "C" int set_tpage(MTFace *tface);
-
-int set_tpage(MTFace *tface)
-{
- static MTFace *lasttface= 0;
- Image *ima;
- unsigned int *rect, *bind;
- int tpx, tpy, tilemode, tileXRep,tileYRep;
-
- /* disable */
- if(tface==0) {
- if(lasttface==0) return 0;
-
- lasttface= 0;
- fCurtile= 0;
- fCurpage= 0;
- if(fCurmode!=0) {
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- }
- fCurmode= 0;
- fCurTileXRep=0;
- fCurTileYRep=0;
- fAlphamode= -1;
-
- glDisable(GL_BLEND);
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- return 0;
- }
- lasttface= tface;
-
- if( fAlphamode != tface->transp) {
- fAlphamode= tface->transp;
-
- if(fAlphamode) {
- if(fAlphamode==TF_ADD) {
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE);
- glDisable ( GL_ALPHA_TEST );
- /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */
- }
- else if(fAlphamode==TF_ALPHA) {
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glDisable ( GL_ALPHA_TEST );
- /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */
- }
- else if (fAlphamode==TF_CLIP){
- glDisable(GL_BLEND);
- glEnable ( GL_ALPHA_TEST );
- glAlphaFunc(GL_GREATER, 0.5f);
- }
- /* else { */
- /* glBlendFunc(GL_ONE, GL_ONE); */
- /* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */
- /* } */
- }
- else glDisable(GL_BLEND);
- }
-
- ima= (struct Image *) tface->tpage;
-
- /* Enable or disable environment mapping */
- if (ima && (ima->flag & IMA_REFLECT)){
-
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
-
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- }
- else{
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- }
-
- tilemode= tface->mode & TF_TILES;
- tileXRep = 0;
- tileYRep = 0;
- if (ima)
- {
- tileXRep = ima->xrep;
- tileYRep = ima->yrep;
- }
-
-
- if(ima==fCurpage && fCurtile==tface->tile && tilemode==fCurmode && fCurTileXRep==tileXRep && fCurTileYRep == tileYRep) return ima!=0;
-
- if(tilemode!=fCurmode || fCurTileXRep!=tileXRep || fCurTileYRep != tileYRep)
- {
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
-
- if(tilemode && ima!=0)
- glScalef(ima->xrep, ima->yrep, 1.0);
-
- glMatrixMode(GL_MODELVIEW);
- }
-
- if(ima==0 || ima->ok==0) {
- glDisable(GL_TEXTURE_2D);
-
- fCurtile= tface->tile;
- fCurpage= 0;
- fCurmode= tilemode;
- fCurTileXRep = tileXRep;
- fCurTileYRep = tileYRep;
-
- return 0;
- }
-
- ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
-
- if(ibuf==0) {
- ima->ok= 0;
-
- fCurtile= tface->tile;
- fCurpage= 0;
- fCurmode= tilemode;
- fCurTileXRep = tileXRep;
- fCurTileYRep = tileYRep;
-
- glDisable(GL_TEXTURE_2D);
- return 0;
- }
-
- if(ima->tpageflag & IMA_TWINANIM) fCurtile= ima->lastframe;
- else fCurtile= tface->tile;
-
- if(tilemode) {
-
- if(ima->repbind==0) my_make_repbind(ima);
-
- if(fCurtile>=ima->totbind) fCurtile= 0;
-
- /* this happens when you change repeat buttons */
- if(ima->repbind) bind= ima->repbind+fCurtile;
- else bind= &ima->bindcode;
-
- if(*bind==0) {
-
- fTexWindx= ibuf->x/ima->xrep;
- fTexWindy= ibuf->y/ima->yrep;
-
- if(fCurtile>=ima->xrep*ima->yrep) fCurtile= ima->xrep*ima->yrep-1;
-
- fTexWinsy= fCurtile / ima->xrep;
- fTexWinsx= fCurtile - fTexWinsy*ima->xrep;
-
- fTexWinsx*= fTexWindx;
- fTexWinsy*= fTexWindy;
-
- tpx= fTexWindx;
- tpy= fTexWindy;
-
- rect= ibuf->rect + fTexWinsy*ibuf->x + fTexWinsx;
- }
- }
- else {
- bind= &ima->bindcode;
-
- if(*bind==0) {
- tpx= ibuf->x;
- tpy= ibuf->y;
- rect= ibuf->rect;
- }
- }
-
- if(*bind==0) {
- int rectw= tpx, recth= tpy;
- unsigned int *tilerect= NULL, *scalerect= NULL;
-
- /*
- * Maarten:
- * According to Ton this code is not needed anymore. It was used only
- * in really old Blenders.
- * Reevan:
- * Actually it is needed for backwards compatibility. Simpledemo 6 does not display correctly without it.
- */
-#if 1
- if (tilemode) {
- int y;
-
- tilerect= (unsigned int*)MEM_mallocN(rectw*recth*sizeof(*tilerect), "tilerect");
- for (y=0; y<recth; y++) {
- unsigned int *rectrow= &rect[y*ibuf->x];
- unsigned int *tilerectrow= &tilerect[y*rectw];
-
- memcpy(tilerectrow, rectrow, tpx*sizeof(*rectrow));
- }
-
- rect= tilerect;
- }
-#endif
- if (!is_pow2(rectw) || !is_pow2(recth)) {
- rectw= smaller_pow2(rectw);
- recth= smaller_pow2(recth);
-
- scalerect= (unsigned int *)MEM_mallocN(rectw*recth*sizeof(*scalerect), "scalerect");
- gluScaleImage(GL_RGBA, tpx, tpy, GL_UNSIGNED_BYTE, rect, rectw, recth, GL_UNSIGNED_BYTE, scalerect);
- rect= scalerect;
- }
-
- glGenTextures(1, (GLuint*)bind);
-
- /*
- if(G.f & G_DEBUG) {
- printf("var1: %s\n", ima->id.name+2);
- printf("var1: %d, var2: %d\n", *bind, tpx);
- printf("var1: %d, var2: %d\n", fCurtile, tilemode);
- }
- */
- glBindTexture( GL_TEXTURE_2D, *bind);
-
- if (!fDoMipMap)
- {
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rectw, recth, 0, GL_RGBA, GL_UNSIGNED_BYTE, rect);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- } else
- {
- int minfilter= fLinearMipMap?GL_LINEAR_MIPMAP_LINEAR:GL_LINEAR_MIPMAP_NEAREST;
-
- gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, rectw, recth, GL_RGBA, GL_UNSIGNED_BYTE, rect);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- if (tilerect)
- MEM_freeN(tilerect);
- if (scalerect)
- MEM_freeN(scalerect);
- }
- else glBindTexture( GL_TEXTURE_2D, *bind);
-
-
-
- glEnable(GL_TEXTURE_2D);
-
- fCurpage= ima;
- fCurmode= tilemode;
- fCurTileXRep = tileXRep;
- fCurTileYRep = tileYRep;
-
- return 1;
-}
-
-#if 0
-GPC_PolygonMaterial::GPC_PolygonMaterial(const STR_String& texname, bool ba, const STR_String& matname,
- int tile, int tileXrep, int tileYrep, int mode, bool transparant, bool zsort,
- int lightlayer, bool bIsTriangle, void* clientobject, void* tpage) :
- RAS_IPolyMaterial(texname, ba, matname, tile, tileXrep, tileYrep, mode,
- transparant, zsort, lightlayer, bIsTriangle, clientobject), m_tface((struct MTFace*)tpage)
-{
- // clear local caching info
- my_set_tpage(0);
-}
-
-
-GPC_PolygonMaterial::~GPC_PolygonMaterial(void)
-{
-}
-
-
-void GPC_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingInfo) const
-{
- if (GetCachingInfo() != cachingInfo)
- {
- if (!cachingInfo)
- {
- my_set_tpage(0);
- }
- cachingInfo = GetCachingInfo();
-
- if ((m_drawingmode & 4)&& (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) )
- {
- update_realtime_texture((struct MTFace*) m_tface, rasty->GetTime());
- my_set_tpage(m_tface);
- rasty->EnableTextures(true);
- } else
- {
- my_set_tpage(0);
- rasty->EnableTextures(false);
- }
-
- //TF_TWOSIDE == 512, todo, make this a ketsji enum
- if(m_drawingmode & 512) {
- rasty->SetCullFace(false);
- }
-
- else
- {
- rasty->SetCullFace(true);//glEnable(GL_CULL_FACE);
- //else glDisable(GL_CULL_FACE);
- }
- }
- rasty->SetSpecularity(m_specular[0],m_specular[1],m_specular[2],m_specularity);
- rasty->SetShinyness(m_shininess);
- rasty->SetDiffuse(m_diffuse[0], m_diffuse[1],m_diffuse[2], 1.0);
-}
-
-#endif
-void GPC_PolygonMaterial::SetMipMappingEnabled(bool enabled)
-{
- fDoMipMap = enabled ? 1 : 0;
-}
diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.h b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.h
deleted file mode 100644
index 212decd078c..00000000000
--- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.h
+++ /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) 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 __GPC_POLYGONMATERIAL
-#define __GPC_POLYGONMATERIAL
-
-#include "RAS_IPolygonMaterial.h"
-
-namespace GPC_PolygonMaterial
-{
- void SetMipMappingEnabled(bool enabled = false);
-};
-
-#if 0
-class GPC_PolygonMaterial : public RAS_IPolyMaterial
-{
- struct MTFace* m_tface;
-
-public:
- GPC_PolygonMaterial(const STR_String& texname, bool ba, const STR_String& matname,
- int tile, int tileXrep, int tileYrep, int mode, bool transparant, bool zsort,
- int lightlayer, bool bIsTriangle, void* clientobject, void* tpage);
-
- virtual ~GPC_PolygonMaterial(void);
-
- /**
- * Returns the caching information for this material,
- * This can be used to speed up the rasterizing process.
- * @return The caching information.
- */
- virtual TCachingInfo GetCachingInfo(void) const;
-
- /**
- * Activates the material in the (OpenGL) rasterizer.
- * On entry, the cachingInfo contains info about the last activated material.
- * On exit, the cachingInfo should contain updated info about this material.
- * @param rasty The rasterizer in which the material should be active.
- * @param cachingInfo The information about the material used to speed up rasterizing.
- */
- virtual void Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingInfo) const;
-
- /**
- * Returns the Blender texture face structure that is used for this material.
- * @return The material's texture face.
- */
- MTFace* GetMTFace(void) const;
-
- static void SetMipMappingEnabled(bool enabled = false);
-};
-
-
-inline MTFace* GPC_PolygonMaterial::GetMTFace(void) const
-{
- return m_tface;
-}
-
-inline GPC_PolygonMaterial::TCachingInfo GPC_PolygonMaterial::GetCachingInfo(void) const
-{
- return GetMTFace();
-}
-#endif
-#endif // __GPC_POLYGONMATERIAL_H
-
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index c5c9dcc6c0f..24fca3feb8b 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -29,8 +29,6 @@
#include "GL/glew.h"
-#include "DNA_scene_types.h"
-
#include "RAS_IRenderTools.h"
#include "RAS_IRasterizer.h"
#include "RAS_LightObject.h"
@@ -42,6 +40,7 @@
#include "KX_BlenderMaterial.h"
#include "KX_RayCast.h"
#include "KX_IPhysicsController.h"
+#include "KX_Light.h"
#include "PHY_IPhysicsEnvironment.h"
@@ -387,21 +386,12 @@ int GPC_RenderTools::applyLights(int objectlayer, const MT_Transform& viewmat)
{
// taken from blender source, incompatibility between Blender Object / GameObject
KX_Scene* kxscene = (KX_Scene*)m_auxilaryClientInfo;
- int scenelayer = ~0;
float glviewmat[16];
unsigned int count;
- float vec[4];
-
- vec[3]= 1.0;
+ std::vector<struct RAS_LightObject*>::iterator lit = m_lights.begin();
- if(kxscene && kxscene->GetBlenderScene())
- scenelayer = kxscene->GetBlenderScene()->lay;
-
for(count=0; count<m_numgllights; count++)
glDisable((GLenum)(GL_LIGHT0+count));
-
- //std::vector<struct RAS_LightObject*> m_lights;
- std::vector<struct RAS_LightObject*>::iterator lit = m_lights.begin();
viewmat.getValue(glviewmat);
@@ -410,82 +400,14 @@ int GPC_RenderTools::applyLights(int objectlayer, const MT_Transform& viewmat)
for (lit = m_lights.begin(), count = 0; !(lit==m_lights.end()) && count < m_numgllights; ++lit)
{
RAS_LightObject* lightdata = (*lit);
- KX_Scene* lightscene = (KX_Scene*)lightdata->m_scene;
-
- /* only use lights in the same layer as the object */
- if(!(lightdata->m_layer & objectlayer))
- continue;
- /* only use lights in the same scene, and in a visible layer */
- if(kxscene != lightscene || !(lightdata->m_layer & scenelayer))
- continue;
-
- vec[0] = (*(lightdata->m_worldmatrix))(0,3);
- vec[1] = (*(lightdata->m_worldmatrix))(1,3);
- vec[2] = (*(lightdata->m_worldmatrix))(2,3);
- vec[3] = 1;
-
- if(lightdata->m_type==RAS_LightObject::LIGHT_SUN) {
-
- vec[0] = (*(lightdata->m_worldmatrix))(0,2);
- vec[1] = (*(lightdata->m_worldmatrix))(1,2);
- vec[2] = (*(lightdata->m_worldmatrix))(2,2);
- //vec[0]= base->object->obmat[2][0];
- //vec[1]= base->object->obmat[2][1];
- //vec[2]= base->object->obmat[2][2];
- vec[3]= 0.0;
- glLightfv((GLenum)(GL_LIGHT0+count), GL_POSITION, vec);
- }
- else {
- //vec[3]= 1.0;
- glLightfv((GLenum)(GL_LIGHT0+count), GL_POSITION, vec);
- glLightf((GLenum)(GL_LIGHT0+count), GL_CONSTANT_ATTENUATION, 1.0);
- glLightf((GLenum)(GL_LIGHT0+count), GL_LINEAR_ATTENUATION, lightdata->m_att1/lightdata->m_distance);
- // without this next line it looks backward compatible.
- //attennuation still is acceptable
- glLightf((GLenum)(GL_LIGHT0+count), GL_QUADRATIC_ATTENUATION, lightdata->m_att2/(lightdata->m_distance*lightdata->m_distance));
-
- if(lightdata->m_type==RAS_LightObject::LIGHT_SPOT) {
- vec[0] = -(*(lightdata->m_worldmatrix))(0,2);
- vec[1] = -(*(lightdata->m_worldmatrix))(1,2);
- vec[2] = -(*(lightdata->m_worldmatrix))(2,2);
- //vec[0]= -base->object->obmat[2][0];
- //vec[1]= -base->object->obmat[2][1];
- //vec[2]= -base->object->obmat[2][2];
- glLightfv((GLenum)(GL_LIGHT0+count), GL_SPOT_DIRECTION, vec);
- glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_CUTOFF, lightdata->m_spotsize/2.0);
- glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_EXPONENT, 128.0*lightdata->m_spotblend);
- }
- else glLightf((GLenum)(GL_LIGHT0+count), GL_SPOT_CUTOFF, 180.0);
- }
-
- if (lightdata->m_nodiffuse)
- {
- vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
- } else {
- vec[0]= lightdata->m_energy*lightdata->m_red;
- vec[1]= lightdata->m_energy*lightdata->m_green;
- vec[2]= lightdata->m_energy*lightdata->m_blue;
- vec[3]= 1.0;
- }
- glLightfv((GLenum)(GL_LIGHT0+count), GL_DIFFUSE, vec);
- if (lightdata->m_nospecular)
- {
- vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
- } else if (lightdata->m_nodiffuse) {
- vec[0]= lightdata->m_energy*lightdata->m_red;
- vec[1]= lightdata->m_energy*lightdata->m_green;
- vec[2]= lightdata->m_energy*lightdata->m_blue;
- vec[3]= 1.0;
- }
- glLightfv((GLenum)(GL_LIGHT0+count), GL_SPECULAR, vec);
- glEnable((GLenum)(GL_LIGHT0+count));
+ KX_LightObject *kxlight = (KX_LightObject*)lightdata->m_light;
- count++;
+ if(kxlight->ApplyLight(kxscene, objectlayer, count))
+ count++;
}
glPopMatrix();
return count;
-
}
void GPC_RenderTools::MotionBlur(RAS_IRasterizer* rasterizer)
diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile
index 84b4a4170a9..4a952856739 100644
--- a/source/gameengine/GamePlayer/common/Makefile
+++ b/source/gameengine/GamePlayer/common/Makefile
@@ -50,8 +50,6 @@ CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_FUZZICS)/include
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_SUMO)/include
-CPPFLAGS += -I$(NAN_SOLID)/include
CPPFLAGS += -I$(NAN_PNG)/include
CPPFLAGS += -I$(NAN_ZLIB)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
@@ -69,7 +67,6 @@ CPPFLAGS += -I../../../gameengine/Network/LoopBackNetwork
CPPFLAGS += -I../../../gameengine/Rasterizer
CPPFLAGS += -I../../../gameengine/SceneGraph
CPPFLAGS += -I../../../gameengine/Rasterizer/RAS_OpenGLRasterizer
-CPPFLAGS += -I../../../gameengine/Physics/Sumo
CPPFLAGS += -I../../../gameengine/Physics/common
###############################
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index e96b2c5400b..f899385c841 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -59,11 +59,6 @@ incs = ['.',
# 'unix/GPU_System.cpp']
# gp_common_env.Append ( CPPPATH = ['unix'])
-if env['WITH_BF_SOLID']:
- incs.append('#source/gameengine/Physics/Sumo')
- incs.append('#source/gameengine/Physics/Sumo/Fuzzics/include')
- incs += Split(env['BF_SOLID_INC'])
-
incs += Split(env['BF_PYTHON_INC'])
incs += Split(env['BF_PNG_INC'])
incs += Split(env['BF_ZLIB_INC'])
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp b/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
index a5dec02c753..0ef087efbfe 100644
--- a/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
+++ b/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
@@ -44,9 +44,6 @@
#include "NG_LoopBackNetworkDeviceInterface.h"
#include "SND_DeviceManager.h"
#include "KX_BlenderSceneConverter.h"
-#ifdef USE_SUMO_SOLID
- #include "SM_Scene.h"
-#endif
#include "KX_KetsjiEngine.h"
#include "GPC_RenderTools.h"
diff --git a/source/gameengine/GamePlayer/common/unix/Makefile b/source/gameengine/GamePlayer/common/unix/Makefile
index 90342c7b735..08c52ddc904 100644
--- a/source/gameengine/GamePlayer/common/unix/Makefile
+++ b/source/gameengine/GamePlayer/common/unix/Makefile
@@ -57,10 +57,8 @@ CPPFLAGS += -I../../../../gameengine/Rasterizer/RAS_OpenGLRasterizer
CPPFLAGS += -I../../../../gameengine/SceneGraph
CPPFLAGS += -I$(NAN_FUZZICS)/include
-CPPFLAGS += -I$(NAN_SUMO)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_SOLID)/include
# Blender stuff
CPPFLAGS += -I../../../../blender/blenkernel
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index 71961f27339..0d4abf1e1fe 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -51,6 +51,7 @@ SET(INC
../../../../source/blender
../../../../source/blender/include
../../../../source/blender/makesdna
+ ../../../../source/blender/makesrna
../../../../source/gameengine/Rasterizer
../../../../source/gameengine/GameLogic
../../../../source/gameengine/Expressions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index bdee8a78cfe..e5932180fe1 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -663,7 +663,7 @@ bool GPG_Application::startEngine(void)
*/
// create a scene converter, create and convert the stratingscene
- m_sceneconverter = new KX_BlenderSceneConverter(m_maggie,0, m_ketsjiengine);
+ m_sceneconverter = new KX_BlenderSceneConverter(m_maggie, m_ketsjiengine);
if (m_sceneconverter)
{
STR_String startscenename = m_startSceneName.Ptr();
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index b69188e5476..2433c587179 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -86,6 +86,8 @@ extern "C"
#include "BKE_main.h"
#include "BKE_utildefines.h"
+#include "RNA_define.h"
+
#ifdef WIN32
#include <windows.h>
#ifdef NDEBUG
@@ -344,6 +346,8 @@ int main(int argc, char** argv)
*/
#endif // __APPLE__
+ RNA_init();
+
init_nodesystem();
initglobals();
diff --git a/source/gameengine/GamePlayer/ghost/Makefile b/source/gameengine/GamePlayer/ghost/Makefile
index c82edca0d45..49ad9457ee3 100644
--- a/source/gameengine/GamePlayer/ghost/Makefile
+++ b/source/gameengine/GamePlayer/ghost/Makefile
@@ -68,6 +68,7 @@ CPPFLAGS += -I../../../blender/blenlib
CPPFLAGS += -I../../../blender/blenloader
CPPFLAGS += -I../../../blender/imbuf
CPPFLAGS += -I../../../blender/makesdna
+CPPFLAGS += -I../../../blender/makesrna
CPPFLAGS += -I../../../blender/readblenfile
CPPFLAGS += -I../../../blender/gpu
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index 1cb7c9f2457..19234cb663c 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -26,6 +26,7 @@ incs = ['.',
'#source/blender',
'#source/blender/include',
'#source/blender/makesdna',
+ '#source/blender/makesrna',
'#source/gameengine/BlenderRoutines',
'#source/gameengine/Rasterizer',
'#source/gameengine/GameLogic',
@@ -40,10 +41,6 @@ incs = ['.',
'#source/blender/gpu',
'#extern/glew/include']
-if env['WITH_BF_SOLID']:
- incs.append(['#source/gameengine/Physics/Sumo', '#source/gameengine/Physics/Sumo/Fuzzics/include'])
- incs += Split(env['BF_SOLID_INC'])
-
incs += Split(env['BF_PYTHON_INC'])
cxxflags = []
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index c5c517c8a65..8bde5dd3a51 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -113,8 +113,8 @@ bool BL_Shader::Ok()const
return (mShader !=0 && mOk && mUse);
}
-BL_Shader::BL_Shader(PyTypeObject *T)
-: PyObjectPlus(T),
+BL_Shader::BL_Shader()
+: PyObjectPlus(),
mShader(0),
mPass(1),
mOk(0),
@@ -728,17 +728,6 @@ void BL_Shader::SetUniform(int uniform, const int* val, int len)
}
}
-
-PyObject* BL_Shader::py_getattro(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* BL_Shader::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-
PyMethodDef BL_Shader::Methods[] =
{
// creation
@@ -792,21 +781,17 @@ PyTypeObject BL_Shader::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-PyParentObject BL_Shader::Parents[] = {
- &BL_Shader::Type,
- &PyObjectPlus::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProgram)" )
{
if(mShader !=0 && mOk )
@@ -848,17 +833,17 @@ KX_PYMETHODDEF_DOC( BL_Shader, delSource, "delSource( )" )
KX_PYMETHODDEF_DOC( BL_Shader, isValid, "isValid()" )
{
- return PyInt_FromLong( ( mShader !=0 && mOk ) );
+ return PyLong_FromSsize_t( ( mShader !=0 && mOk ) );
}
KX_PYMETHODDEF_DOC( BL_Shader, getVertexProg ,"getVertexProg( )" )
{
- return PyString_FromString(vertProg?vertProg:"");
+ return PyUnicode_FromString(vertProg?vertProg:"");
}
KX_PYMETHODDEF_DOC( BL_Shader, getFragmentProg ,"getFragmentProg( )" )
{
- return PyString_FromString(fragProg?fragProg:"");
+ return PyUnicode_FromString(fragProg?fragProg:"");
}
KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()")
@@ -1223,7 +1208,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformiv, "setUniformiv( uniform_name, (list2
for(unsigned int i=0; (i<list_size && i<4); i++)
{
PyObject *item = PySequence_GetItem(listPtr, i);
- array_data[i] = PyInt_AsLong(item);
+ array_data[i] = PyLong_AsSsize_t(item);
Py_DECREF(item);
}
diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h
index 7db40e778ae..42969996b3e 100644
--- a/source/gameengine/Ketsji/BL_Shader.h
+++ b/source/gameengine/Ketsji/BL_Shader.h
@@ -120,7 +120,7 @@ private:
void ClearUniforms();
public:
- BL_Shader(PyTypeObject *T=&Type);
+ BL_Shader();
virtual ~BL_Shader();
// Unused for now tangent is set as
@@ -202,9 +202,7 @@ public:
void SetUniform(int uniform, const int val);
// Python interface
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual PyObject* py_repr(void) { return PyString_FromFormat("BL_Shader\n\tvertex shader:%s\n\n\tfragment shader%s\n\n", vertProg, fragProg); }
+ virtual PyObject* py_repr(void) { return PyUnicode_FromFormat("BL_Shader\n\tvertex shader:%s\n\n\tfragment shader%s\n\n", vertProg, fragProg); }
// -----------------------------------
KX_PYMETHOD_DOC( BL_Shader, setSource );
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 4aaa49a8493..ee1ff2c6502 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -53,7 +53,8 @@ SET(INC
../../../source/gameengine/Ketsji
../../../source/blender/blenlib
../../../source/blender/blenkernel
- ../../../source/blender/python/api2_2x
+ ../../../source/blender/python
+ ../../../source/blender/python/generic
../../../source/blender
../../../source/blender/include
../../../source/blender/makesdna
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
index 63773352d96..7cb287d02b2 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
@@ -41,9 +41,8 @@ KX_NetworkMessageActuator::KX_NetworkMessageActuator(
const STR_String &toPropName,
const STR_String &subject,
int bodyType,
- const STR_String &body,
- PyTypeObject* T) :
- SCA_IActuator(gameobj,T),
+ const STR_String &body) :
+ SCA_IActuator(gameobj),
m_networkscene(networkscene),
m_toPropName(toPropName),
m_subject(subject),
@@ -118,19 +117,15 @@ PyTypeObject KX_NetworkMessageActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_NetworkMessageActuator::Parents[] = {
- &KX_NetworkMessageActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_NetworkMessageActuator::Methods[] = {
@@ -155,18 +150,6 @@ PyAttributeDef KX_NetworkMessageActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_NetworkMessageActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_NetworkMessageActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_NetworkMessageActuator::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_IActuator);
-}
-
// Deprecated ----->
// 1. SetToPropName
PyObject* KX_NetworkMessageActuator::PySetToPropName(
@@ -240,4 +223,4 @@ PyObject* KX_NetworkMessageActuator::PySetBody(
Py_RETURN_NONE;
}
-// <----- Deprecated \ No newline at end of file
+// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
index cf92fd46fe0..b4f55f2a466 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
@@ -50,8 +50,7 @@ public:
const STR_String &toPropName,
const STR_String &subject,
int bodyType,
- const STR_String &body,
- PyTypeObject* T=&Type);
+ const STR_String &body);
virtual ~KX_NetworkMessageActuator();
virtual bool Update();
@@ -61,10 +60,6 @@ public:
/* Python interface ------------------------------------------- */
/* ------------------------------------------------------------ */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// Deprecated ----->
KX_PYMETHOD(KX_NetworkMessageActuator, SetToPropName);
KX_PYMETHOD(KX_NetworkMessageActuator, SetSubject);
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
index 8ddcd87b66f..78dda1f6db7 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
@@ -50,10 +50,9 @@ KX_NetworkMessageSensor::KX_NetworkMessageSensor(
class KX_NetworkEventManager* eventmgr, // our eventmanager
class NG_NetworkScene *NetworkScene, // our scene
SCA_IObject* gameobj, // the sensor controlling object
- const STR_String &subject,
- PyTypeObject* T
+ const STR_String &subject
) :
- SCA_ISensor(gameobj,eventmgr,T),
+ SCA_ISensor(gameobj,eventmgr),
m_Networkeventmgr(eventmgr),
m_NetworkScene(NetworkScene),
m_subject(subject),
@@ -182,19 +181,15 @@ PyTypeObject KX_NetworkMessageSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_NetworkMessageSensor::Parents[] = {
- &KX_NetworkMessageSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_NetworkMessageSensor::Methods[] = {
@@ -226,18 +221,6 @@ PyAttributeDef KX_NetworkMessageSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_NetworkMessageSensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* KX_NetworkMessageSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int KX_NetworkMessageSensor::py_setattro(PyObject *attr, PyObject *value) {
- return SCA_ISensor::py_setattro(attr, value);
-}
-
PyObject* KX_NetworkMessageSensor::pyattr_get_bodies(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_NetworkMessageSensor *self = static_cast<KX_NetworkMessageSensor*>(self_v);
@@ -267,7 +250,7 @@ const char KX_NetworkMessageSensor::SetSubjectFilterText_doc[] =
PyObject* KX_NetworkMessageSensor::PySetSubjectFilterText(PyObject* value)
{
ShowDeprecationWarning("setSubjectFilterText()", "subject");
- char* Subject = PyString_AsString(value);
+ char* Subject = _PyUnicode_AsString(value);
if (Subject==NULL) {
PyErr_SetString(PyExc_TypeError, "sensor.tsetSubjectFilterText(string): KX_NetworkMessageSensor, expected a string message");
return NULL;
@@ -285,7 +268,7 @@ const char KX_NetworkMessageSensor::GetFrameMessageCount_doc[] =
PyObject* KX_NetworkMessageSensor::PyGetFrameMessageCount()
{
ShowDeprecationWarning("getFrameMessageCount()", "frameMessageCount");
- return PyInt_FromLong(long(m_frame_message_count));
+ return PyLong_FromSsize_t(long(m_frame_message_count));
}
// 3. Get the message bodies
@@ -311,7 +294,7 @@ const char KX_NetworkMessageSensor::GetSubject_doc[] =
PyObject* KX_NetworkMessageSensor::PyGetSubject()
{
ShowDeprecationWarning("getSubject()", "subject");
- return PyString_FromString(m_subject ? m_subject : "");
+ return PyUnicode_FromString(m_subject ? m_subject : "");
}
// 5. Get the message subjects
@@ -328,4 +311,4 @@ PyObject* KX_NetworkMessageSensor::PyGetSubjects()
return (new CListValue())->NewProxy(true);
}
}
-// <----- Deprecated \ No newline at end of file
+// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
index 53183f33826..ade87697303 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
@@ -57,8 +57,7 @@ public:
KX_NetworkEventManager* eventmgr, // our eventmanager
NG_NetworkScene *NetworkScene, // our scene
SCA_IObject* gameobj, // the sensor controlling object
- const STR_String &subject,
- PyTypeObject* T=&Type
+ const STR_String &subject
);
virtual ~KX_NetworkMessageSensor();
@@ -72,10 +71,6 @@ public:
/* Python interface -------------------------------------------- */
/* ------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// Deprecated ----->
KX_PYMETHOD_DOC_O(KX_NetworkMessageSensor, SetSubjectFilterText);
KX_PYMETHOD_DOC_NOARGS(KX_NetworkMessageSensor, GetFrameMessageCount);
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 30057fc039d..314becc702d 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -42,10 +42,8 @@ BL_BlenderShader *KX_BlenderMaterial::mLastBlenderShader = NULL;
//static PyObject *gTextureDict = 0;
-KX_BlenderMaterial::KX_BlenderMaterial(
- PyTypeObject *T
- )
-: PyObjectPlus(T),
+KX_BlenderMaterial::KX_BlenderMaterial()
+: PyObjectPlus(),
RAS_IPolyMaterial(),
mMaterial(NULL),
mShader(0),
@@ -813,36 +811,17 @@ PyTypeObject KX_BlenderMaterial::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-PyParentObject KX_BlenderMaterial::Parents[] = {
- &KX_BlenderMaterial::Type,
- &PyObjectPlus::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-PyObject* KX_BlenderMaterial::py_getattro(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* KX_BlenderMaterial::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-int KX_BlenderMaterial::py_setattro(PyObject *attr, PyObject *pyvalue)
-{
- return PyObjectPlus::py_setattro(attr, pyvalue);
-}
-
-
KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
{
if( !GLEW_ARB_fragment_shader) {
@@ -912,7 +891,7 @@ void KX_BlenderMaterial::SetBlenderGLSLShader(int layer)
KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getMaterialIndex, "getMaterialIndex()")
{
- return PyInt_FromLong( GetMaterialIndex() );
+ return PyLong_FromSsize_t( GetMaterialIndex() );
}
KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getTexture, "getTexture( index )" )
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h
index b29f2df98db..1f5edc1d7d1 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.h
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h
@@ -23,9 +23,7 @@ class KX_BlenderMaterial : public PyObjectPlus, public RAS_IPolyMaterial
Py_Header;
public:
// --------------------------------
- KX_BlenderMaterial(
- PyTypeObject* T=&Type
- );
+ KX_BlenderMaterial();
void Initialize(
class KX_Scene* scene,
BL_Material* mat,
@@ -83,10 +81,7 @@ public:
);
// --------------------------------
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
- virtual PyObject* py_repr(void) { return PyString_FromString(mMaterial->matname.ReadPtr()); }
+ virtual PyObject* py_repr(void) { return PyUnicode_FromString(mMaterial->matname.ReadPtr()); }
KX_PYMETHOD_DOC( KX_BlenderMaterial, getShader );
KX_PYMETHOD_DOC( KX_BlenderMaterial, getMaterialIndex );
diff --git a/source/gameengine/Ketsji/KX_CDActuator.cpp b/source/gameengine/Ketsji/KX_CDActuator.cpp
index 8511526fd5f..bfca81f45d9 100644
--- a/source/gameengine/Ketsji/KX_CDActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CDActuator.cpp
@@ -48,9 +48,8 @@ KX_CDActuator::KX_CDActuator(SCA_IObject* gameobject,
KX_CDACT_TYPE type,
int track,
short start,
- short end,
- PyTypeObject* T)
- : SCA_IActuator(gameobject,T)
+ short end)
+ : SCA_IActuator(gameobject)
{
m_soundscene = soundscene;
m_type = type;
@@ -171,25 +170,17 @@ PyTypeObject KX_CDActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_CDActuator::Parents[] = {
- &KX_CDActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_CDActuator::Methods[] = {
// Deprecated ----->
{"setGain",(PyCFunction) KX_CDActuator::sPySetGain,METH_VARARGS,NULL},
@@ -217,22 +208,6 @@ int KX_CDActuator::pyattr_setGain(void *self, const struct KX_PYATTRIBUTE_DEF *a
return PY_SET_ATTR_SUCCESS;
}
-PyObject* KX_CDActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_CDActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_CDActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
-
KX_PYMETHODDEF_DOC_NOARGS(KX_CDActuator, startCD,
"startCD()\n"
"\tStarts the CD playing.\n")
@@ -273,8 +248,8 @@ KX_PYMETHODDEF_DOC_O(KX_CDActuator, playTrack,
"playTrack(trackNumber)\n"
"\tPlays the track selected.\n")
{
- if (PyInt_Check(value)) {
- int track = PyInt_AsLong(value);
+ if (PyLong_Check(value)) {
+ int track = PyLong_AsSsize_t(value);
SND_CDObject::Instance()->SetPlaymode(SND_CD_TRACK);
SND_CDObject::Instance()->SetTrack(track);
SND_CDObject::Instance()->SetPlaystate(SND_MUST_PLAY);
diff --git a/source/gameengine/Ketsji/KX_CDActuator.h b/source/gameengine/Ketsji/KX_CDActuator.h
index 2fd05ab72e5..b01ad73777e 100644
--- a/source/gameengine/Ketsji/KX_CDActuator.h
+++ b/source/gameengine/Ketsji/KX_CDActuator.h
@@ -68,8 +68,7 @@ public:
KX_CDACT_TYPE type,
int track,
short start,
- short end,
- PyTypeObject* T=&Type);
+ short end);
~KX_CDActuator();
@@ -81,10 +80,6 @@ public:
/* Python interface --------------------------------------------------- */
/* -------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// Deprecated ----->
KX_PYMETHOD_VARARGS(KX_CDActuator,SetGain);
KX_PYMETHOD_VARARGS(KX_CDActuator,GetGain);
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index ba4d6e22872..f762699f780 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -42,10 +42,9 @@ KX_Camera::KX_Camera(void* sgReplicationInfo,
SG_Callbacks callbacks,
const RAS_CameraData& camdata,
bool frustum_culling,
- bool delete_node,
- PyTypeObject *T)
+ bool delete_node)
:
- KX_GameObject(sgReplicationInfo,callbacks,T),
+ KX_GameObject(sgReplicationInfo,callbacks),
m_camdata(camdata),
m_dirty(true),
m_normalized(false),
@@ -547,42 +546,23 @@ PyTypeObject KX_Camera::Type = {
0,
0,
py_base_repr,
- 0,0,
+ 0,
+ &KX_GameObject::Sequence,
&KX_GameObject::Mapping,
0,0,0,
- py_base_getattro,
- py_base_setattro,
- 0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-
-
-
-PyParentObject KX_Camera::Parents[] = {
- &KX_Camera::Type,
- &KX_GameObject::Type,
- &SCA_IObject::Type,
- &CValue::Type,
- NULL
+ NULL,
+ NULL,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &KX_GameObject::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-PyObject* KX_Camera::py_getattro(PyObject *attr)
-{
- py_getattro_up(KX_GameObject);
-}
-
-PyObject* KX_Camera::py_getattro_dict() {
- py_getattro_dict_up(KX_GameObject);
-}
-
-int KX_Camera::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(KX_GameObject);
-}
-
KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, sphereInsideFrustum,
"sphereInsideFrustum(center, radius) -> Integer\n"
"\treturns INSIDE, OUTSIDE or INTERSECT if the given sphere is\n"
@@ -608,7 +588,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, sphereInsideFrustum,
MT_Point3 center;
if (PyVecTo(pycenter, center))
{
- return PyInt_FromLong(SphereInsideFrustum(center, radius)); /* new ref */
+ return PyLong_FromSsize_t(SphereInsideFrustum(center, radius)); /* new ref */
}
}
@@ -659,7 +639,7 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, boxInsideFrustum,
return NULL;
}
- return PyInt_FromLong(BoxInsideFrustum(box)); /* new ref */
+ return PyLong_FromSsize_t(BoxInsideFrustum(box)); /* new ref */
}
KX_PYMETHODDEF_DOC_O(KX_Camera, pointInsideFrustum,
@@ -681,7 +661,7 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, pointInsideFrustum,
MT_Point3 point;
if (PyVecTo(value, point))
{
- return PyInt_FromLong(PointInsideFrustum(point)); /* new ref */
+ return PyLong_FromSsize_t(PointInsideFrustum(point)); /* new ref */
}
PyErr_SetString(PyExc_TypeError, "camera.pointInsideFrustum(point): KX_Camera, expected point argument.");
@@ -949,11 +929,11 @@ PyObject* KX_Camera::pyattr_get_world_to_camera(void *self_v, const KX_PYATTRIBU
PyObject* KX_Camera::pyattr_get_INSIDE(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
-{ return PyInt_FromLong(INSIDE); }
+{ return PyLong_FromSsize_t(INSIDE); }
PyObject* KX_Camera::pyattr_get_OUTSIDE(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
-{ return PyInt_FromLong(OUTSIDE); }
+{ return PyLong_FromSsize_t(OUTSIDE); }
PyObject* KX_Camera::pyattr_get_INTERSECT(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
-{ return PyInt_FromLong(INTERSECT); }
+{ return PyLong_FromSsize_t(INTERSECT); }
bool ConvertPythonToCamera(PyObject * value, KX_Camera **object, bool py_none_ok, const char *error_prefix)
@@ -975,14 +955,14 @@ bool ConvertPythonToCamera(PyObject * value, KX_Camera **object, bool py_none_ok
}
}
- if (PyString_Check(value)) {
- STR_String value_str = PyString_AsString(value);
+ if (PyUnicode_Check(value)) {
+ STR_String value_str = _PyUnicode_AsString(value);
*object = KX_GetActiveScene()->FindCamera(value_str);
if (*object) {
return true;
} else {
- PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_Camera in this scene", error_prefix, PyString_AsString(value));
+ PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_Camera in this scene", error_prefix, _PyUnicode_AsString(value));
return false;
}
}
@@ -1139,7 +1119,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenRay,
PyTuple_SET_ITEM(argValue, 0, PyObjectFrom(vect));
PyTuple_SET_ITEM(argValue, 1, PyFloat_FromDouble(dist));
if (propName)
- PyTuple_SET_ITEM(argValue, 2, PyString_FromString(propName));
+ PyTuple_SET_ITEM(argValue, 2, PyUnicode_FromString(propName));
PyObject* ret= this->PyrayCastTo(argValue,NULL);
Py_DECREF(argValue);
diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h
index aef21cd91e4..74c8e6d4e4f 100644
--- a/source/gameengine/Ketsji/KX_Camera.h
+++ b/source/gameengine/Ketsji/KX_Camera.h
@@ -143,7 +143,7 @@ public:
enum { INSIDE, INTERSECT, OUTSIDE } ;
- KX_Camera(void* sgReplicationInfo,SG_Callbacks callbacks,const RAS_CameraData& camdata, bool frustum_culling = true, bool delete_node = false, PyTypeObject *T = &Type);
+ KX_Camera(void* sgReplicationInfo,SG_Callbacks callbacks,const RAS_CameraData& camdata, bool frustum_culling = true, bool delete_node = false);
virtual ~KX_Camera();
/**
@@ -265,6 +265,7 @@ public:
*/
int GetViewportTop() const;
+ virtual int GetGameObjectType() { return OBJ_CAMERA; }
KX_PYMETHOD_DOC_VARARGS(KX_Camera, sphereInsideFrustum);
KX_PYMETHOD_DOC_O(KX_Camera, boxInsideFrustum);
@@ -282,10 +283,6 @@ public:
KX_PYMETHOD_DOC_O(KX_Camera, getScreenPosition);
KX_PYMETHOD_DOC_VARARGS(KX_Camera, getScreenVect);
KX_PYMETHOD_DOC_VARARGS(KX_Camera, getScreenRay);
-
- virtual PyObject* py_getattro(PyObject *attr); /* lens, near, far, projection_matrix */
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
static PyObject* pyattr_get_perspective(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_perspective(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp
index f8557dac2c4..3d3b68ed85d 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp
@@ -56,10 +56,9 @@ KX_CameraActuator::KX_CameraActuator(
float hght,
float minhght,
float maxhght,
- bool xytog,
- PyTypeObject* T
+ bool xytog
):
- SCA_IActuator(gameobj, T),
+ SCA_IActuator(gameobj),
m_ob (obj),
m_height (hght),
m_minHeight (minhght),
@@ -385,19 +384,15 @@ PyTypeObject KX_CameraActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_CameraActuator::Parents[] = {
- &KX_CameraActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_CameraActuator::Methods[] = {
@@ -424,18 +419,6 @@ PyAttributeDef KX_CameraActuator::Attributes[] = {
{NULL}
};
-PyObject* KX_CameraActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_CameraActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_CameraActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
-
/* get obj ---------------------------------------------------------- */
const char KX_CameraActuator::GetObject_doc[] =
"getObject(name_only = 1)\n"
@@ -454,7 +437,7 @@ PyObject* KX_CameraActuator::PyGetObject(PyObject* args)
Py_RETURN_NONE;
if (ret_name_only)
- return PyString_FromString(m_ob->GetName().ReadPtr());
+ return PyUnicode_FromString(m_ob->GetName().ReadPtr());
else
return m_ob->GetProxy();
}
@@ -579,7 +562,7 @@ const char KX_CameraActuator::GetXY_doc[] =
PyObject* KX_CameraActuator::PyGetXY()
{
ShowDeprecationWarning("getXY()", "the xy property");
- return PyInt_FromLong(m_x);
+ return PyLong_FromSsize_t(m_x);
}
PyObject* KX_CameraActuator::pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h
index efa4e2f38d7..057c6fed770 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.h
+++ b/source/gameengine/Ketsji/KX_CameraActuator.h
@@ -91,9 +91,7 @@ private :
float hght,
float minhght,
float maxhght,
- bool xytog,
- PyTypeObject* T=&Type
-
+ bool xytog
);
@@ -120,10 +118,6 @@ private :
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
/* set object to look at */
KX_PYMETHOD_DOC_O(KX_CameraActuator,SetObject);
/* get current object */
diff --git a/source/gameengine/Ketsji/KX_ClientObjectInfo.h b/source/gameengine/Ketsji/KX_ClientObjectInfo.h
index 077ac96f0ac..1898dc71ef8 100644
--- a/source/gameengine/Ketsji/KX_ClientObjectInfo.h
+++ b/source/gameengine/Ketsji/KX_ClientObjectInfo.h
@@ -30,9 +30,6 @@
#define __KX_CLIENTOBJECT_INFO_H
/* Note, the way this works with/without sumo is a bit odd */
-#ifdef USE_SUMO_SOLID
-#include <SM_Object.h>
-#endif //USE_SUMO_SOLID
#include <list>
@@ -42,9 +39,6 @@ class KX_GameObject;
* Client Type and Additional Info. This structure can be use instead of a bare void* pointer, for safeness, and additional info for callbacks
*/
struct KX_ClientObjectInfo
-#ifdef USE_SUMO_SOLID
- : public SM_ClientObject
-#endif
{
enum clienttype {
STATIC,
@@ -59,18 +53,12 @@ struct KX_ClientObjectInfo
std::list<SCA_ISensor*> m_sensors;
public:
KX_ClientObjectInfo(KX_GameObject *gameobject, clienttype type = STATIC, void *auxilary_info = NULL) :
-#ifdef USE_SUMO_SOLID
- SM_ClientObject(),
-#endif
m_type(type),
m_gameobject(gameobject),
m_auxilary_info(auxilary_info)
{}
KX_ClientObjectInfo(const KX_ClientObjectInfo &copy) :
-#ifdef USE_SUMO_SOLID
- SM_ClientObject(copy),
-#endif
m_type(copy.m_type),
m_gameobject(copy.m_gameobject),
m_auxilary_info(copy.m_auxilary_info)
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index bd03dea486b..d09eae647c8 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -54,9 +54,8 @@ KX_ConstraintActuator::KX_ConstraintActuator(SCA_IObject *gameobj,
int locrotxyz,
int time,
int option,
- char *property,
- PyTypeObject* T) :
- SCA_IActuator(gameobj, T),
+ char *property) :
+ SCA_IActuator(gameobj),
m_refDirVector(refDir),
m_currentTime(0)
{
@@ -581,19 +580,15 @@ PyTypeObject KX_ConstraintActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_ConstraintActuator::Parents[] = {
- &KX_ConstraintActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_ConstraintActuator::Methods[] = {
@@ -639,21 +634,6 @@ PyAttributeDef KX_ConstraintActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_ConstraintActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_ConstraintActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_ConstraintActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
int KX_ConstraintActuator::pyattr_check_direction(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_ConstraintActuator* act = static_cast<KX_ConstraintActuator*>(self);
@@ -691,7 +671,7 @@ const char KX_ConstraintActuator::GetDamp_doc[] =
"\tReturns the damping parameter.\n";
PyObject* KX_ConstraintActuator::PyGetDamp(){
ShowDeprecationWarning("getDamp()", "the damp property");
- return PyInt_FromLong(m_posDampTime);
+ return PyLong_FromSsize_t(m_posDampTime);
}
/* 2. setRotDamp */
@@ -718,7 +698,7 @@ const char KX_ConstraintActuator::GetRotDamp_doc[] =
"\tReturns the damping time for application of the constraint.\n";
PyObject* KX_ConstraintActuator::PyGetRotDamp(){
ShowDeprecationWarning("getRotDamp()", "the rotDamp property");
- return PyInt_FromLong(m_rotDampTime);
+ return PyLong_FromSsize_t(m_rotDampTime);
}
/* 2. setDirection */
@@ -791,7 +771,7 @@ const char KX_ConstraintActuator::GetOption_doc[] =
"\tReturns the option parameter.\n";
PyObject* KX_ConstraintActuator::PyGetOption(){
ShowDeprecationWarning("getOption()", "the option property");
- return PyInt_FromLong(m_option);
+ return PyLong_FromSsize_t(m_option);
}
/* 2. setTime */
@@ -820,7 +800,7 @@ const char KX_ConstraintActuator::GetTime_doc[] =
"\tReturns the time parameter.\n";
PyObject* KX_ConstraintActuator::PyGetTime(){
ShowDeprecationWarning("getTime()", "the time property");
- return PyInt_FromLong(m_activeTime);
+ return PyLong_FromSsize_t(m_activeTime);
}
/* 2. setProperty */
@@ -849,7 +829,7 @@ const char KX_ConstraintActuator::GetProperty_doc[] =
"\tReturns the property parameter.\n";
PyObject* KX_ConstraintActuator::PyGetProperty(){
ShowDeprecationWarning("getProperty()", "the 'property' property");
- return PyString_FromString(m_property.Ptr());
+ return PyUnicode_FromString(m_property.Ptr());
}
/* 4. setDistance */
@@ -978,7 +958,7 @@ const char KX_ConstraintActuator::GetLimit_doc[] =
"\tReturns the type of constraint.\n";
PyObject* KX_ConstraintActuator::PyGetLimit() {
ShowDeprecationWarning("setLimit()", "the limit property");
- return PyInt_FromLong(m_locrot);
+ return PyLong_FromSsize_t(m_locrot);
}
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h
index 40607b44947..677904aedc9 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.h
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h
@@ -126,8 +126,7 @@ protected:
int locrot,
int time,
int option,
- char *property,
- PyTypeObject* T=&Type);
+ char *property);
virtual ~KX_ConstraintActuator();
virtual CValue* GetReplica() {
KX_ConstraintActuator* replica = new KX_ConstraintActuator(*this);
@@ -141,10 +140,6 @@ protected:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
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);
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
index c5cf67af67d..ec7bb470235 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
@@ -38,8 +38,8 @@
KX_ConstraintWrapper::KX_ConstraintWrapper(
PHY_ConstraintType ctype,
int constraintId,
- PHY_IPhysicsEnvironment* physenv,PyTypeObject *T) :
- PyObjectPlus(T),
+ PHY_IPhysicsEnvironment* physenv) :
+ PyObjectPlus(),
m_constraintId(constraintId),
m_constraintType(ctype),
m_physenv(physenv)
@@ -51,7 +51,7 @@ KX_ConstraintWrapper::~KX_ConstraintWrapper()
PyObject* KX_ConstraintWrapper::PyGetConstraintId()
{
- return PyInt_FromLong(m_constraintId);
+ return PyLong_FromSsize_t(m_constraintId);
}
@@ -99,37 +99,17 @@ PyTypeObject KX_ConstraintWrapper::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_ConstraintWrapper::Parents[] = {
- &KX_ConstraintWrapper::Type,
- NULL
-};
-
-//here you can search for existing data members (like mass,friction etc.)
-PyObject* KX_ConstraintWrapper::py_getattro(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* KX_ConstraintWrapper::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-int KX_ConstraintWrapper::py_setattro(PyObject *attr,PyObject* value)
-{
- py_setattro_up(PyObjectPlus);
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
-
-
PyMethodDef KX_ConstraintWrapper::Methods[] = {
{"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_NOARGS},
{"setParam",(PyCFunction) KX_ConstraintWrapper::sPySetParam, METH_VARARGS},
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
index 03813e0f167..74670944415 100644
--- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h
+++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h
@@ -35,11 +35,8 @@
class KX_ConstraintWrapper : public PyObjectPlus
{
Py_Header;
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
public:
- KX_ConstraintWrapper(PHY_ConstraintType ctype,int constraintId,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
+ KX_ConstraintWrapper(PHY_ConstraintType ctype,int constraintId,class PHY_IPhysicsEnvironment* physenv);
virtual ~KX_ConstraintWrapper ();
int getConstraintId() { return m_constraintId;};
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
index 74042366bae..9d3b9cdaf74 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
@@ -32,11 +32,8 @@
/* These are defined by the build system... */
//but the build system is broken, because it doesn't allow for 2 or more defines at once.
//Please leave Sumo _AND_ Bullet enabled
-//#define USE_SUMO_SOLID // scons defines this
#define USE_BULLET
-//#define USE_ODE
-
//on visual studio 7/8, always enable BULLET for now
//you can have multiple physics engines running anyway, and
//the scons build system doesn't really support this at the moment.
@@ -148,20 +145,6 @@ struct KX_ObjectProperties
} m_boundobject;
};
-#ifdef USE_ODE
-
-
-void KX_ConvertODEEngineObject(KX_GameObject* gameobj,
- RAS_MeshObject* meshobj,
- KX_Scene* kxscene,
- struct PHY_ShapeProps* shapeprops,
- struct PHY_MaterialProps* smmaterial,
- struct KX_ObjectProperties* objprop);
-
-
-#endif //USE_ODE
-
-
void KX_ConvertDynamoObject(KX_GameObject* gameobj,
RAS_MeshObject* meshobj,
KX_Scene* kxscene,
@@ -169,19 +152,6 @@ void KX_ConvertDynamoObject(KX_GameObject* gameobj,
struct PHY_MaterialProps* smmaterial,
struct KX_ObjectProperties* objprop);
-#ifdef USE_SUMO_SOLID
-
-void KX_ConvertSumoObject( class KX_GameObject* gameobj,
- class RAS_MeshObject* meshobj,
- class KX_Scene* kxscene,
- struct PHY_ShapeProps* shapeprops,
- struct PHY_MaterialProps* smmaterial,
- struct KX_ObjectProperties* objprop);
-
-void KX_ClearSumoSharedShapes();
-bool KX_ReInstanceShapeFromMesh(RAS_MeshObject* meshobj);
-
-#endif
#ifdef USE_BULLET
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 51c41c0686d..64b5760de28 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -32,7 +32,6 @@
#include "MT_assert.h"
-// defines USE_ODE to choose physics engine
#include "KX_ConvertPhysicsObject.h"
#include "BL_DeformableGameObject.h"
#include "RAS_MeshObject.h"
@@ -56,597 +55,6 @@ extern "C"{
#include "BKE_DerivedMesh.h"
}
-#ifdef USE_ODE
-
-#include "KX_OdePhysicsController.h"
-#include "OdePhysicsEnvironment.h"
-#endif //USE_ODE
-
-
-// USE_SUMO_SOLID is defined in headerfile KX_ConvertPhysicsObject.h
-#ifdef USE_SUMO_SOLID
-
-
-#include "SumoPhysicsEnvironment.h"
-#include "KX_SumoPhysicsController.h"
-
-
-// sumo physics specific
-#include "SM_Object.h"
-#include "SM_FhObject.h"
-#include "SM_Scene.h"
-#include "SM_ClientObjectInfo.h"
-
-#include "KX_SumoPhysicsController.h"
-
-struct KX_PhysicsInstance
-{
- DT_VertexBaseHandle m_vertexbase;
- RAS_DisplayArray* m_darray;
- RAS_IPolyMaterial* m_material;
-
- KX_PhysicsInstance(DT_VertexBaseHandle vertex_base, RAS_DisplayArray *darray, RAS_IPolyMaterial* mat)
- : m_vertexbase(vertex_base),
- m_darray(darray),
- m_material(mat)
- {
- }
-
- ~KX_PhysicsInstance()
- {
- DT_DeleteVertexBase(m_vertexbase);
- }
-};
-
-static GEN_Map<GEN_HashedPtr,DT_ShapeHandle> map_gamemesh_to_sumoshape;
-static GEN_Map<GEN_HashedPtr, KX_PhysicsInstance*> map_gamemesh_to_instance;
-
-// forward declarations
-static void BL_RegisterSumoObject(KX_GameObject* gameobj,class SM_Scene* sumoScene,class SM_Object* sumoObj,const STR_String& matname,bool isDynamic,bool isActor);
-static DT_ShapeHandle CreateShapeFromMesh(RAS_MeshObject* meshobj, bool polytope);
-
-void KX_ConvertSumoObject( KX_GameObject* gameobj,
- RAS_MeshObject* meshobj,
- KX_Scene* kxscene,
- PHY_ShapeProps* kxshapeprops,
- PHY_MaterialProps* kxmaterial,
- struct KX_ObjectProperties* objprop)
-
-
-{
- SM_ShapeProps* smprop = new SM_ShapeProps;
-
- smprop->m_ang_drag = kxshapeprops->m_ang_drag;
- smprop->m_do_anisotropic = kxshapeprops->m_do_anisotropic;
- smprop->m_do_fh = kxshapeprops->m_do_fh;
- smprop->m_do_rot_fh = kxshapeprops->m_do_rot_fh ;
- smprop->m_friction_scaling[0] = kxshapeprops->m_friction_scaling[0];
- smprop->m_friction_scaling[1] = kxshapeprops->m_friction_scaling[1];
- smprop->m_friction_scaling[2] = kxshapeprops->m_friction_scaling[2];
- smprop->m_inertia = MT_Vector3(1., 1., 1.) * kxshapeprops->m_inertia;
- smprop->m_lin_drag = kxshapeprops->m_lin_drag;
- smprop->m_mass = kxshapeprops->m_mass;
- smprop->m_radius = objprop->m_radius;
-
-
- SM_MaterialProps* smmaterial = new SM_MaterialProps;
-
- smmaterial->m_fh_damping = kxmaterial->m_fh_damping;
- smmaterial->m_fh_distance = kxmaterial->m_fh_distance;
- smmaterial->m_fh_normal = kxmaterial->m_fh_normal;
- smmaterial->m_fh_spring = kxmaterial->m_fh_spring;
- smmaterial->m_friction = kxmaterial->m_friction;
- smmaterial->m_restitution = kxmaterial->m_restitution;
-
- SumoPhysicsEnvironment* sumoEnv =
- (SumoPhysicsEnvironment*)kxscene->GetPhysicsEnvironment();
-
- SM_Scene* sceneptr = sumoEnv->GetSumoScene();
-
- SM_Object* sumoObj=NULL;
-
- if (objprop->m_dyna && objprop->m_isactor)
- {
- DT_ShapeHandle shape = NULL;
- bool polytope = false;
- switch (objprop->m_boundclass)
- {
- case KX_BOUNDBOX:
- shape = DT_NewBox(objprop->m_boundobject.box.m_extends[0],
- objprop->m_boundobject.box.m_extends[1],
- objprop->m_boundobject.box.m_extends[2]);
- smprop->m_inertia.scale(objprop->m_boundobject.box.m_extends[0]*objprop->m_boundobject.box.m_extends[0],
- objprop->m_boundobject.box.m_extends[1]*objprop->m_boundobject.box.m_extends[1],
- objprop->m_boundobject.box.m_extends[2]*objprop->m_boundobject.box.m_extends[2]);
- smprop->m_inertia *= smprop->m_mass/MT_Vector3(objprop->m_boundobject.box.m_extends).length();
- break;
- case KX_BOUNDCYLINDER:
- shape = DT_NewCylinder(smprop->m_radius, objprop->m_boundobject.c.m_height);
- smprop->m_inertia.scale(smprop->m_mass*smprop->m_radius*smprop->m_radius,
- smprop->m_mass*smprop->m_radius*smprop->m_radius,
- smprop->m_mass*objprop->m_boundobject.c.m_height*objprop->m_boundobject.c.m_height);
- break;
- case KX_BOUNDCONE:
- shape = DT_NewCone(objprop->m_radius, objprop->m_boundobject.c.m_height);
- smprop->m_inertia.scale(smprop->m_mass*smprop->m_radius*smprop->m_radius,
- smprop->m_mass*smprop->m_radius*smprop->m_radius,
- smprop->m_mass*objprop->m_boundobject.c.m_height*objprop->m_boundobject.c.m_height);
- break;
- /* Dynamic mesh objects. WARNING! slow. */
- case KX_BOUNDPOLYTOPE:
- polytope = true;
- // fall through
- case KX_BOUNDMESH:
- if (meshobj && meshobj->NumPolygons() > 0)
- {
- if ((shape = CreateShapeFromMesh(meshobj, polytope)))
- {
- // TODO: calculate proper inertia
- smprop->m_inertia *= smprop->m_mass*smprop->m_radius*smprop->m_radius;
- break;
- }
- }
- /* If CreateShapeFromMesh fails, fall through and use sphere */
- default:
- case KX_BOUNDSPHERE:
- shape = DT_NewSphere(objprop->m_radius);
- smprop->m_inertia *= smprop->m_mass*smprop->m_radius*smprop->m_radius;
- break;
-
- }
-
- sumoObj = new SM_Object(shape, !objprop->m_ghost?smmaterial:NULL,smprop,NULL);
-
- sumoObj->setRigidBody(objprop->m_angular_rigidbody?true:false);
-
- BL_RegisterSumoObject(gameobj,sceneptr,sumoObj,"",true, true);
-
- }
- else {
- // non physics object
- if (meshobj)
- {
- int numpolys = meshobj->NumPolygons();
- {
-
- DT_ShapeHandle complexshape=0;
- bool polytope = false;
-
- switch (objprop->m_boundclass)
- {
- case KX_BOUNDBOX:
- complexshape = DT_NewBox(objprop->m_boundobject.box.m_extends[0], objprop->m_boundobject.box.m_extends[1], objprop->m_boundobject.box.m_extends[2]);
- break;
- case KX_BOUNDSPHERE:
- complexshape = DT_NewSphere(objprop->m_boundobject.c.m_radius);
- break;
- case KX_BOUNDCYLINDER:
- complexshape = DT_NewCylinder(objprop->m_boundobject.c.m_radius, objprop->m_boundobject.c.m_height);
- break;
- case KX_BOUNDCONE:
- complexshape = DT_NewCone(objprop->m_boundobject.c.m_radius, objprop->m_boundobject.c.m_height);
- break;
- case KX_BOUNDPOLYTOPE:
- polytope = true;
- // fall through
- default:
- case KX_BOUNDMESH:
- if (numpolys>0)
- {
- complexshape = CreateShapeFromMesh(meshobj, polytope);
- //std::cout << "Convert Physics Mesh: " << meshobj->GetName() << std::endl;
-/* if (!complexshape)
- {
- // Something has to be done here - if the object has no polygons, it will not be able to have
- // sensors attached to it.
- DT_Vector3 pt = {0., 0., 0.};
- complexshape = DT_NewSphere(1.0);
- objprop->m_ghost = evilObject = true;
- } */
- }
- break;
- }
-
- if (complexshape)
- {
- SM_Object *dynamicParent = NULL;
-
- if (objprop->m_dynamic_parent)
- {
- // problem is how to find the dynamic parent
- // in the scenegraph
- KX_SumoPhysicsController* sumoctrl =
- (KX_SumoPhysicsController*)
- objprop->m_dynamic_parent->GetPhysicsController();
-
- if (sumoctrl)
- {
- dynamicParent = sumoctrl->GetSumoObject();
- }
-
- MT_assert(dynamicParent);
- }
-
-
- sumoObj = new SM_Object(complexshape,!objprop->m_ghost?smmaterial:NULL,NULL, dynamicParent);
- const STR_String& matname=meshobj->GetMaterialName(0);
-
-
- BL_RegisterSumoObject(gameobj,sceneptr,
- sumoObj,
- matname,
- objprop->m_dyna,
- objprop->m_isactor);
- }
- }
- }
- }
-
- // physics object get updated here !
-
-
- // lazy evaluation because we might not support scaling !gameobj->UpdateTransform();
-
- if (objprop->m_in_active_layer && sumoObj)
- {
- sceneptr->add(*sumoObj);
- }
-
-}
-
-
-
-static void BL_RegisterSumoObject(
- KX_GameObject* gameobj,
- class SM_Scene* sumoScene,
- class SM_Object* sumoObj,
- const STR_String& matname,
- bool isDynamic,
- bool isActor)
-{
- PHY_IMotionState* motionstate = new KX_MotionState(gameobj->GetSGNode());
-
- // need easy access, not via 'node' etc.
- KX_SumoPhysicsController* physicscontroller = new KX_SumoPhysicsController(sumoScene,sumoObj,motionstate,isDynamic);
- gameobj->SetPhysicsController(physicscontroller,isDynamic);
-
-
- if (!gameobj->getClientInfo())
- std::cout << "BL_RegisterSumoObject: WARNING: Object " << gameobj->GetName() << " has no client info" << std::endl;
- physicscontroller->setNewClientInfo(gameobj->getClientInfo());
-
-
- gameobj->GetSGNode()->AddSGController(physicscontroller);
-
- gameobj->getClientInfo()->m_type = (isActor ? KX_ClientObjectInfo::ACTOR : KX_ClientObjectInfo::STATIC);
-
- // store materialname in auxinfo, needed for touchsensors
- gameobj->getClientInfo()->m_auxilary_info = (matname.Length() ? (void*)(matname.ReadPtr()+2) : NULL);
-
- physicscontroller->SetObject(gameobj->GetSGNode());
-}
-
-static DT_ShapeHandle InstancePhysicsComplex(RAS_MeshObject* meshobj, RAS_DisplayArray *darray, RAS_IPolyMaterial *mat)
-{
- // instance a mesh from a single vertex array & material
- const RAS_TexVert *vertex_array = &darray->m_vertex[0];
- DT_VertexBaseHandle vertex_base = DT_NewVertexBase(vertex_array[0].getXYZ(), sizeof(RAS_TexVert));
-
- DT_ShapeHandle shape = DT_NewComplexShape(vertex_base);
-
- std::vector<DT_Index> indices;
- for (int p = 0; p < meshobj->NumPolygons(); p++)
- {
- RAS_Polygon* poly = meshobj->GetPolygon(p);
-
- // only add polygons that have the collisionflag set
- if (poly->IsCollider())
- {
- DT_Begin();
- DT_VertexIndex(poly->GetVertexOffset(0));
- DT_VertexIndex(poly->GetVertexOffset(1));
- DT_VertexIndex(poly->GetVertexOffset(2));
- DT_End();
-
- // tesselate
- if (poly->VertexCount() == 4)
- {
- DT_Begin();
- DT_VertexIndex(poly->GetVertexOffset(0));
- DT_VertexIndex(poly->GetVertexOffset(2));
- DT_VertexIndex(poly->GetVertexOffset(3));
- DT_End();
- }
- }
- }
-
- //DT_VertexIndices(indices.size(), &indices[0]);
- DT_EndComplexShape();
-
- map_gamemesh_to_instance.insert(GEN_HashedPtr(meshobj), new KX_PhysicsInstance(vertex_base, darray, mat));
- return shape;
-}
-
-static DT_ShapeHandle InstancePhysicsPolytope(RAS_MeshObject* meshobj, RAS_DisplayArray *darray, RAS_IPolyMaterial *mat)
-{
- // instance a mesh from a single vertex array & material
- const RAS_TexVert *vertex_array = &darray->m_vertex[0];
- DT_VertexBaseHandle vertex_base = DT_NewVertexBase(vertex_array[0].getXYZ(), sizeof(RAS_TexVert));
-
- std::vector<DT_Index> indices;
- for (int p = 0; p < meshobj->NumPolygons(); p++)
- {
- RAS_Polygon* poly = meshobj->GetPolygon(p);
-
- // only add polygons that have the collisionflag set
- if (poly->IsCollider())
- {
- indices.push_back(poly->GetVertexOffset(0));
- indices.push_back(poly->GetVertexOffset(1));
- indices.push_back(poly->GetVertexOffset(2));
-
- if (poly->VertexCount() == 4)
- indices.push_back(poly->GetVertexOffset(3));
- }
- }
-
- DT_ShapeHandle shape = DT_NewPolytope(vertex_base);
- DT_VertexIndices(indices.size(), &indices[0]);
- DT_EndPolytope();
-
- map_gamemesh_to_instance.insert(GEN_HashedPtr(meshobj), new KX_PhysicsInstance(vertex_base, darray, mat));
- return shape;
-}
-
-// This will have to be a method in a class somewhere...
-// Update SOLID with a changed physics mesh.
-// not used... yet.
-bool KX_ReInstanceShapeFromMesh(RAS_MeshObject* meshobj)
-{
- KX_PhysicsInstance *instance = *map_gamemesh_to_instance[GEN_HashedPtr(meshobj)];
- if (instance)
- {
- const RAS_TexVert *vertex_array = &instance->m_darray->m_vertex[0];
- DT_ChangeVertexBase(instance->m_vertexbase, vertex_array[0].getXYZ());
- return true;
- }
- return false;
-}
-
-static DT_ShapeHandle CreateShapeFromMesh(RAS_MeshObject* meshobj, bool polytope)
-{
-
- DT_ShapeHandle *shapeptr = map_gamemesh_to_sumoshape[GEN_HashedPtr(meshobj)];
- // Mesh has already been converted: reuse
- if (shapeptr)
- {
- return *shapeptr;
- }
-
- // Mesh has no polygons!
- int numpolys = meshobj->NumPolygons();
- if (!numpolys)
- {
- return NULL;
- }
-
- // Count the number of collision polygons and check they all come from the same
- // vertex array
- int numvalidpolys = 0;
- RAS_DisplayArray *darray = NULL;
- RAS_IPolyMaterial *poly_material = NULL;
- bool reinstance = true;
-
- for (int p=0; p<numpolys; p++)
- {
- RAS_Polygon* poly = meshobj->GetPolygon(p);
-
- // only add polygons that have the collisionflag set
- if (poly->IsCollider())
- {
- // check polygon is from the same vertex array
- if (poly->GetDisplayArray() != darray)
- {
- if (darray == NULL)
- darray = poly->GetDisplayArray();
- else
- {
- reinstance = false;
- darray = NULL;
- }
- }
-
- // check poly is from the same material
- if (poly->GetMaterial()->GetPolyMaterial() != poly_material)
- {
- if (poly_material)
- {
- reinstance = false;
- poly_material = NULL;
- }
- else
- poly_material = poly->GetMaterial()->GetPolyMaterial();
- }
-
- // count the number of collision polys
- numvalidpolys++;
-
- // We have one collision poly, and we can't reinstance, so we
- // might as well break here.
- if (!reinstance)
- break;
- }
- }
-
- // No collision polygons
- if (numvalidpolys < 1)
- return NULL;
-
- DT_ShapeHandle shape;
- if (reinstance)
- {
- if (polytope)
- shape = InstancePhysicsPolytope(meshobj, darray, poly_material);
- else
- shape = InstancePhysicsComplex(meshobj, darray, poly_material);
- }
- else
- {
- if (polytope)
- {
- std::cout << "CreateShapeFromMesh: " << meshobj->GetName() << " is not suitable for polytope." << std::endl;
- if (!poly_material)
- std::cout << " Check mesh materials." << std::endl;
- if (darray == NULL)
- std::cout << " Check number of vertices." << std::endl;
- }
-
- shape = DT_NewComplexShape(NULL);
-
- numvalidpolys = 0;
-
- for (int p2=0; p2<numpolys; p2++)
- {
- RAS_Polygon* poly = meshobj->GetPolygon(p2);
-
- // only add polygons that have the collisionflag set
- if (poly->IsCollider())
- { /* We have to tesselate here because SOLID can only raycast triangles */
- DT_Begin();
- /* V1, V2, V3 */
- DT_Vertex(poly->GetVertex(2)->getXYZ());
- DT_Vertex(poly->GetVertex(1)->getXYZ());
- DT_Vertex(poly->GetVertex(0)->getXYZ());
-
- numvalidpolys++;
- DT_End();
-
- if (poly->VertexCount() == 4)
- {
- DT_Begin();
- /* V1, V3, V4 */
- DT_Vertex(poly->GetVertex(3)->getXYZ());
- DT_Vertex(poly->GetVertex(2)->getXYZ());
- DT_Vertex(poly->GetVertex(0)->getXYZ());
-
- numvalidpolys++;
- DT_End();
- }
-
- }
- }
-
- DT_EndComplexShape();
- }
-
- if (numvalidpolys > 0)
- {
- map_gamemesh_to_sumoshape.insert(GEN_HashedPtr(meshobj),shape);
- return shape;
- }
-
- delete shape;
- return NULL;
-}
-
-void KX_ClearSumoSharedShapes()
-{
- int numshapes = map_gamemesh_to_sumoshape.size();
- int i;
- for (i=0;i<numshapes ;i++)
- {
- DT_ShapeHandle shape = *map_gamemesh_to_sumoshape.at(i);
- DT_DeleteShape(shape);
- }
-
- map_gamemesh_to_sumoshape.clear();
-
- for (i=0; i < map_gamemesh_to_instance.size(); i++)
- delete *map_gamemesh_to_instance.at(i);
-
- map_gamemesh_to_instance.clear();
-}
-
-
-
-
-
-#endif //USE_SUMO_SOLID
-
-
-#ifdef USE_ODE
-
-void KX_ConvertODEEngineObject(KX_GameObject* gameobj,
- RAS_MeshObject* meshobj,
- KX_Scene* kxscene,
- struct PHY_ShapeProps* shapeprops,
- struct PHY_MaterialProps* smmaterial,
- struct KX_ObjectProperties* objprop)
-{
-
- // not yet, future extension :)
- bool dyna=objprop->m_dyna;
- bool fullRigidBody= ( objprop->m_dyna && objprop->m_angular_rigidbody) != 0;
- bool phantom = objprop->m_ghost;
- class PHY_IMotionState* motionstate = new KX_MotionState(gameobj->GetSGNode());
-
- class ODEPhysicsEnvironment* odeEnv =
- (ODEPhysicsEnvironment*)kxscene->GetPhysicsEnvironment();
-
- dxSpace* space = odeEnv->GetOdeSpace();
- dxWorld* world = odeEnv->GetOdeWorld();
-
- bool isSphere = false;
-
- switch (objprop->m_boundclass)
- {
- case KX_BOUNDBOX:
- {
-
- KX_OdePhysicsController* physicscontroller =
- new KX_OdePhysicsController(
- dyna,
- fullRigidBody,
- phantom,
- motionstate,
- space,
- world,
- shapeprops->m_mass,
- smmaterial->m_friction,
- smmaterial->m_restitution,
- isSphere,
- objprop->m_boundobject.box.m_center,
- objprop->m_boundobject.box.m_extends,
- objprop->m_boundobject.c.m_radius
- );
-
- gameobj->SetPhysicsController(physicscontroller);
- physicscontroller->setNewClientInfo(gameobj->getClientInfo());
- gameobj->GetSGNode()->AddSGController(physicscontroller);
-
- bool isActor = objprop->m_isactor;
- STR_String materialname;
- if (meshobj)
- materialname = meshobj->GetMaterialName(0);
-
- const char* matname = materialname.ReadPtr();
-
-
- physicscontroller->SetObject(gameobj->GetSGNode());
-
- break;
- }
- default:
- {
- }
- };
-
-}
-
-
-#endif // USE_ODE
-
-
#ifdef USE_BULLET
#include "CcdPhysicsEnvironment.h"
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp
index 28bf12f5e87..560c7fa4bb4 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.cpp
+++ b/source/gameengine/Ketsji/KX_GameActuator.cpp
@@ -49,9 +49,8 @@ KX_GameActuator::KX_GameActuator(SCA_IObject *gameobj,
const STR_String& filename,
const STR_String& loadinganimationname,
KX_Scene* scene,
- KX_KetsjiEngine* ketsjiengine,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T)
+ KX_KetsjiEngine* ketsjiengine)
+ : SCA_IActuator(gameobj)
{
m_mode = mode;
m_filename = filename;
@@ -224,26 +223,17 @@ PyTypeObject KX_GameActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_GameActuator::Parents[] =
-{
- &KX_GameActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_GameActuator::Methods[] =
{
// Deprecated ----->
@@ -259,21 +249,6 @@ PyAttributeDef KX_GameActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_GameActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_GameActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_GameActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
// Deprecated ----->
/* getFile */
const char KX_GameActuator::GetFile_doc[] =
@@ -282,7 +257,7 @@ const char KX_GameActuator::GetFile_doc[] =
PyObject* KX_GameActuator::PyGetFile(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getFile()", "the fileName property");
- return PyString_FromString(m_filename);
+ return PyUnicode_FromString(m_filename);
}
/* setFile */
diff --git a/source/gameengine/Ketsji/KX_GameActuator.h b/source/gameengine/Ketsji/KX_GameActuator.h
index b2b1d6ec2b9..cabbf827b40 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.h
+++ b/source/gameengine/Ketsji/KX_GameActuator.h
@@ -65,8 +65,7 @@ protected:
const STR_String& filename,
const STR_String& loadinganimationname,
KX_Scene* scene,
- KX_KetsjiEngine* ketsjiEngine,
- PyTypeObject* T=&Type);
+ KX_KetsjiEngine* ketsjiEngine);
virtual ~KX_GameActuator();
virtual CValue* GetReplica();
@@ -77,10 +76,6 @@ protected:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// Deprecated functions ----->
KX_PYMETHOD_DOC(KX_GameActuator,GetFile);
KX_PYMETHOD_DOC(KX_GameActuator,SetFile);
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 7f417b325c8..bf80eec36d9 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -86,10 +86,8 @@ static MT_Matrix3x3 dummy_orientation = MT_Matrix3x3( 1.0, 0.0, 0.0,
KX_GameObject::KX_GameObject(
void* sgReplicationInfo,
- SG_Callbacks callbacks,
- PyTypeObject* T
-) :
- SCA_IObject(T),
+ SG_Callbacks callbacks)
+ : SCA_IObject(),
m_bDyna(false),
m_layer(0),
m_pBlenderObject(NULL),
@@ -983,7 +981,17 @@ void KX_GameObject::NodeSetLocalOrientation(const MT_Matrix3x3& rot)
GetSGNode()->SetLocalOrientation(rot);
}
+void KX_GameObject::NodeSetGlobalOrientation(const MT_Matrix3x3& rot)
+{
+ // check on valid node in case a python controller holds a reference to a deleted object
+ if (!GetSGNode())
+ return;
+ if (GetSGNode()->GetSGParent())
+ GetSGNode()->SetLocalOrientation(GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot);
+ else
+ GetSGNode()->SetLocalOrientation(rot);
+}
void KX_GameObject::NodeSetLocalScale(const MT_Vector3& scale)
{
@@ -1062,7 +1070,13 @@ const MT_Matrix3x3& KX_GameObject::NodeGetWorldOrientation() const
return GetSGNode()->GetWorldOrientation();
}
-
+const MT_Matrix3x3& KX_GameObject::NodeGetLocalOrientation() const
+{
+ // check on valid node in case a python controller holds a reference to a deleted object
+ if (!GetSGNode())
+ return dummy_orientation;
+ return GetSGNode()->GetLocalOrientation();
+}
const MT_Vector3& KX_GameObject::NodeGetWorldScaling() const
{
@@ -1073,7 +1087,14 @@ const MT_Vector3& KX_GameObject::NodeGetWorldScaling() const
return GetSGNode()->GetWorldScaling();
}
+const MT_Vector3& KX_GameObject::NodeGetLocalScaling() const
+{
+ // check on valid node in case a python controller holds a reference to a deleted object
+ if (!GetSGNode())
+ return dummy_scaling;
+ return GetSGNode()->GetLocalScale();
+}
const MT_Point3& KX_GameObject::NodeGetWorldPosition() const
{
@@ -1084,6 +1105,16 @@ const MT_Point3& KX_GameObject::NodeGetWorldPosition() const
return dummy_point;
}
+const MT_Point3& KX_GameObject::NodeGetLocalPosition() const
+{
+ // check on valid node in case a python controller holds a reference to a deleted object
+ if (GetSGNode())
+ return GetSGNode()->GetLocalPosition();
+ else
+ return dummy_point;
+}
+
+
/* Suspend/ resume: for the dynamic behaviour, there is a simple
* method. For the residual motion, there is not. I wonder what the
* correct solution is for Sumo. Remove from the motion-update tree?
@@ -1151,6 +1182,181 @@ CListValue* KX_GameObject::GetChildrenRecursive()
return list;
}
+#ifdef USE_MATHUTILS
+
+/* These require an SGNode */
+#define MATHUTILS_VEC_CB_POS_LOCAL 1
+#define MATHUTILS_VEC_CB_POS_GLOBAL 2
+#define MATHUTILS_VEC_CB_SCALE_LOCAL 3
+#define MATHUTILS_VEC_CB_SCALE_GLOBAL 4
+#define MATHUTILS_VEC_CB_INERTIA_LOCAL 5
+
+static int mathutils_kxgameob_vector_cb_index= -1; /* index for our callbacks */
+
+static int mathutils_kxgameob_generic_check(PyObject *self_v)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ return 1;
+}
+
+static int mathutils_kxgameob_vector_get(PyObject *self_v, int subtype, float *vec_from)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ switch(subtype) {
+ case MATHUTILS_VEC_CB_POS_LOCAL:
+ self->NodeGetLocalPosition().getValue(vec_from);
+ break;
+ case MATHUTILS_VEC_CB_POS_GLOBAL:
+ self->NodeGetWorldPosition().getValue(vec_from);
+ break;
+ case MATHUTILS_VEC_CB_SCALE_LOCAL:
+ self->NodeGetLocalScaling().getValue(vec_from);
+ break;
+ case MATHUTILS_VEC_CB_SCALE_GLOBAL:
+ self->NodeGetWorldScaling().getValue(vec_from);
+ break;
+ case MATHUTILS_VEC_CB_INERTIA_LOCAL:
+ if(!self->GetPhysicsController()) return 0;
+ self->GetPhysicsController()->GetLocalInertia().getValue(vec_from);
+ break;
+ }
+
+ return 1;
+}
+
+static int mathutils_kxgameob_vector_set(PyObject *self_v, int subtype, float *vec_to)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ switch(subtype) {
+ case MATHUTILS_VEC_CB_POS_LOCAL:
+ self->NodeSetLocalPosition(MT_Point3(vec_to));
+ self->NodeUpdateGS(0.f);
+ break;
+ case MATHUTILS_VEC_CB_POS_GLOBAL:
+ self->NodeSetWorldPosition(MT_Point3(vec_to));
+ self->NodeUpdateGS(0.f);
+ break;
+ case MATHUTILS_VEC_CB_SCALE_LOCAL:
+ self->NodeSetLocalScale(MT_Point3(vec_to));
+ self->NodeUpdateGS(0.f);
+ break;
+ case MATHUTILS_VEC_CB_SCALE_GLOBAL:
+ break;
+ case MATHUTILS_VEC_CB_INERTIA_LOCAL:
+ /* read only */
+ break;
+ }
+
+ return 1;
+}
+
+static int mathutils_kxgameob_vector_get_index(PyObject *self_v, int subtype, float *vec_from, int index)
+{
+ float f[4];
+ /* lazy, avoid repeteing the case statement */
+ if(!mathutils_kxgameob_vector_get(self_v, subtype, f))
+ return 0;
+
+ vec_from[index]= f[index];
+ return 1;
+}
+
+static int mathutils_kxgameob_vector_set_index(PyObject *self_v, int subtype, float *vec_to, int index)
+{
+ float f= vec_to[index];
+
+ /* lazy, avoid repeteing the case statement */
+ if(!mathutils_kxgameob_vector_get(self_v, subtype, vec_to))
+ return 0;
+
+ vec_to[index]= f;
+ mathutils_kxgameob_vector_set(self_v, subtype, vec_to);
+
+ return 1;
+}
+
+Mathutils_Callback mathutils_kxgameob_vector_cb = {
+ mathutils_kxgameob_generic_check,
+ mathutils_kxgameob_vector_get,
+ mathutils_kxgameob_vector_set,
+ mathutils_kxgameob_vector_get_index,
+ mathutils_kxgameob_vector_set_index
+};
+
+/* Matrix */
+#define MATHUTILS_MAT_CB_ORI_LOCAL 1
+#define MATHUTILS_MAT_CB_ORI_GLOBAL 2
+
+static int mathutils_kxgameob_matrix_cb_index= -1; /* index for our callbacks */
+
+static int mathutils_kxgameob_matrix_get(PyObject *self_v, int subtype, float *mat_from)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ switch(subtype) {
+ case MATHUTILS_MAT_CB_ORI_LOCAL:
+ self->NodeGetLocalOrientation().getValue3x3(mat_from);
+ break;
+ case MATHUTILS_MAT_CB_ORI_GLOBAL:
+ self->NodeGetWorldOrientation().getValue3x3(mat_from);
+ break;
+ }
+
+ return 1;
+}
+
+
+static int mathutils_kxgameob_matrix_set(PyObject *self_v, int subtype, float *mat_to)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ MT_Matrix3x3 mat3x3;
+ switch(subtype) {
+ case MATHUTILS_MAT_CB_ORI_LOCAL:
+ mat3x3.setValue3x3(mat_to);
+ self->NodeSetLocalOrientation(mat3x3);
+ self->NodeUpdateGS(0.f);
+ break;
+ case MATHUTILS_MAT_CB_ORI_GLOBAL:
+ mat3x3.setValue3x3(mat_to);
+ self->NodeSetLocalOrientation(mat3x3);
+ self->NodeUpdateGS(0.f);
+ break;
+ }
+
+ return 1;
+}
+
+Mathutils_Callback mathutils_kxgameob_matrix_cb = {
+ mathutils_kxgameob_generic_check,
+ mathutils_kxgameob_matrix_get,
+ mathutils_kxgameob_matrix_set,
+ NULL,
+ NULL
+};
+
+
+void KX_GameObject_Mathutils_Callback_Init(void)
+{
+ // register mathutils callbacks, ok to run more then once.
+ mathutils_kxgameob_vector_cb_index= Mathutils_RegisterCallback(&mathutils_kxgameob_vector_cb);
+ mathutils_kxgameob_matrix_cb_index= Mathutils_RegisterCallback(&mathutils_kxgameob_matrix_cb);
+}
+
+#endif // USE_MATHUTILS
/* ------- python stuff ---------------------------------------------------*/
@@ -1287,15 +1493,15 @@ PyObject* KX_GameObject::PyGetPosition()
return PyObjectFrom(NodeGetWorldPosition());
}
-PyObject *KX_GameObject::Map_GetItem(PyObject *self_v, PyObject *item)
+static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
{
KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
- const char *attr_str= PyString_AsString(item);
+ const char *attr_str= _PyUnicode_AsString(item);
CValue* resultattr;
PyObject* pyconvert;
if (self==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, "BGE_PROXY_ERROR_MSG);
return NULL;
}
@@ -1321,15 +1527,15 @@ PyObject *KX_GameObject::Map_GetItem(PyObject *self_v, PyObject *item)
}
-int KX_GameObject::Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
+static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
{
KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
- const char *attr_str= PyString_AsString(key);
+ const char *attr_str= _PyUnicode_AsString(key);
if(attr_str==NULL)
PyErr_Clear();
if (self==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, "BGE_PROXY_ERROR_MSG);
return -1;
}
@@ -1356,7 +1562,7 @@ int KX_GameObject::Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
int set= 0;
/* as CValue */
- if(attr_str && BGE_PROXY_CHECK_TYPE(val)==0) /* dont allow GameObjects for eg to be assigned to CValue props */
+ if(attr_str && PyObject_TypeCheck(val, &PyObjectPlus::Type)==0) /* dont allow GameObjects for eg to be assigned to CValue props */
{
CValue* vallie = self->ConvertPythonToValue(val, ""); /* error unused */
@@ -1409,11 +1615,40 @@ int KX_GameObject::Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
return 0; /* success */
}
-/* Cant set the len otherwise it can evaluate as false */
+static int Seq_Contains(PyObject *self_v, PyObject *value)
+{
+ KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
+
+ if (self==NULL) {
+ PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, "BGE_PROXY_ERROR_MSG);
+ return -1;
+ }
+
+ if(PyUnicode_Check(value) && self->GetProperty(_PyUnicode_AsString(value)))
+ return 1;
+
+ if (self->m_attr_dict && PyDict_GetItem(self->m_attr_dict, value))
+ return 1;
+
+ return 0;
+}
+
+
PyMappingMethods KX_GameObject::Mapping = {
(lenfunc)NULL , /*inquiry mp_length */
- (binaryfunc)KX_GameObject::Map_GetItem, /*binaryfunc mp_subscript */
- (objobjargproc)KX_GameObject::Map_SetItem, /*objobjargproc mp_ass_subscript */
+ (binaryfunc)Map_GetItem, /*binaryfunc mp_subscript */
+ (objobjargproc)Map_SetItem, /*objobjargproc mp_ass_subscript */
+};
+
+PySequenceMethods KX_GameObject::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 */
};
PyTypeObject KX_GameObject::Type = {
@@ -1433,31 +1668,27 @@ PyTypeObject KX_GameObject::Type = {
0,
0,
py_base_repr,
- 0,0,
+ 0,
+ &Sequence,
&Mapping,
0,0,0,
- py_base_getattro,
- py_base_setattro,
- 0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-
-
-
-PyParentObject KX_GameObject::Parents[] = {
- &KX_GameObject::Type,
+ NULL,
+ NULL,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IObject::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyObject* KX_GameObject::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
- return PyString_FromString(self->GetName().ReadPtr());
+ return PyUnicode_FromString(self->GetName().ReadPtr());
}
PyObject* KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
@@ -1564,7 +1795,11 @@ 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((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL);
+#else
return PyObjectFrom(self->NodeGetWorldPosition());
+#endif
}
int KX_GameObject::pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -1582,10 +1817,11 @@ 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);
- if (self->GetSGNode())
- return PyObjectFrom(self->GetSGNode()->GetLocalPosition());
- else
- return PyObjectFrom(dummy_point);
+#ifdef USE_MATHUTILS
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL);
+#else
+ return PyObjectFrom(self->NodeGetLocalPosition());
+#endif
}
int KX_GameObject::pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -1603,17 +1839,23 @@ 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((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL);
+#else
if (self->GetPhysicsController())
- {
return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia());
- }
return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f);
+#endif
}
PyObject* KX_GameObject::pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+#ifdef USE_MATHUTILS
+ 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());
+#endif
}
int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -1625,12 +1867,7 @@ int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUT
if (!PyOrientationTo(value, rot, "gameOb.worldOrientation = sequence: KX_GameObject, "))
return PY_SET_ATTR_FAIL;
- if (self->GetSGNode() && self->GetSGNode()->GetSGParent()) {
- self->NodeSetLocalOrientation(self->GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot);
- }
- else {
- self->NodeSetLocalOrientation(rot);
- }
+ self->NodeSetGlobalOrientation(rot);
self->NodeUpdateGS(0.f);
return PY_SET_ATTR_SUCCESS;
@@ -1638,11 +1875,12 @@ 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((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);
- if (self->GetSGNode())
- return PyObjectFrom(self->GetSGNode()->GetLocalOrientation());
- else
- return PyObjectFrom(dummy_orientation);
+ return PyObjectFrom(self->NodeGetLocalOrientation());
+#endif
}
int KX_GameObject::pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -1662,16 +1900,21 @@ 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((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL);
+#else
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);
- if (self->GetSGNode())
- return PyObjectFrom(self->GetSGNode()->GetLocalScale());
- else
- return PyObjectFrom(dummy_scaling);
+#ifdef USE_MATHUTILS
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL);
+#else
+ return PyObjectFrom(self->NodeGetLocalScaling());
+#endif
}
int KX_GameObject::pyattr_set_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -1718,13 +1961,13 @@ PyObject* KX_GameObject::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
int state = 0;
state |= self->GetState();
- return PyInt_FromLong(state);
+ return PyLong_FromSsize_t(state);
}
int KX_GameObject::pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
{
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
- int state_i = PyInt_AsLong(value);
+ int state_i = PyLong_AsSsize_t(value);
unsigned int state = 0;
if (state_i == -1 && PyErr_Occurred()) {
@@ -1795,128 +2038,6 @@ PyObject* KX_GameObject::pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_
return self->m_attr_dict;
}
-/* We need these because the macros have a return in them */
-PyObject* KX_GameObject::py_getattro__internal(PyObject *attr)
-{
- py_getattro_up(SCA_IObject);
-}
-
-int KX_GameObject::py_setattro__internal(PyObject *attr, PyObject *value) // py_setattro method
-{
- py_setattro_up(SCA_IObject);
-}
-
-
-PyObject* KX_GameObject::py_getattro(PyObject *attr)
-{
- PyObject *object= py_getattro__internal(attr);
-
- if (object==NULL && m_attr_dict)
- {
- /* backup the exception incase the attr doesnt exist in the dict either */
- PyObject *err_type, *err_value, *err_tb;
- PyErr_Fetch(&err_type, &err_value, &err_tb);
-
- object= PyDict_GetItem(m_attr_dict, attr);
- if (object) {
- Py_INCREF(object);
-
- PyErr_Clear();
- Py_XDECREF( err_type );
- Py_XDECREF( err_value );
- Py_XDECREF( err_tb );
- }
- else {
- PyErr_Restore(err_type, err_value, err_tb); /* use the error from the parent function */
- }
- }
- return object;
-}
-
-PyObject* KX_GameObject::py_getattro_dict() {
- //py_getattro_dict_up(SCA_IObject);
- PyObject *dict= py_getattr_dict(SCA_IObject::py_getattro_dict(), Type.tp_dict);
- if(dict==NULL)
- return NULL;
-
- /* normally just return this but KX_GameObject has some more items */
-
-
- /* Not super fast getting as a list then making into dict keys but its only for dir() */
- PyObject *list= ConvertKeysToPython();
- if(list)
- {
- int i;
- for(i=0; i<PyList_Size(list); i++)
- PyDict_SetItem(dict, PyList_GET_ITEM(list, i), Py_None);
- }
- else
- PyErr_Clear();
-
- Py_DECREF(list);
-
- /* Add m_attr_dict if we have it */
- if(m_attr_dict)
- PyDict_Update(dict, m_attr_dict);
-
- return dict;
-}
-
-int KX_GameObject::py_setattro(PyObject *attr, PyObject *value) // py_setattro method
-{
- int ret= py_setattro__internal(attr, value);
-
- if (ret==PY_SET_ATTR_SUCCESS) {
- /* remove attribute in our own dict to avoid double ups */
- /* NOTE: Annoying that we also do this for setting builtin attributes like mass and visibility :/ */
- if (m_attr_dict) {
- if (PyDict_DelItem(m_attr_dict, attr) != 0)
- PyErr_Clear();
- }
- }
-
- if (ret==PY_SET_ATTR_COERCE_FAIL) {
- /* CValue attribute exists, remove CValue and add PyDict value */
- RemoveProperty(PyString_AsString(attr));
- ret= PY_SET_ATTR_MISSING;
- }
-
- if (ret==PY_SET_ATTR_MISSING) {
- /* Lazy initialization */
- if (m_attr_dict==NULL)
- m_attr_dict = PyDict_New();
-
- if (PyDict_SetItem(m_attr_dict, attr, value)==0) {
- PyErr_Clear();
- ret= PY_SET_ATTR_SUCCESS;
- }
- else {
- PyErr_Format(PyExc_AttributeError, "gameOb.myAttr = value: KX_GameObject, failed assigning value to internal dictionary");
- ret= PY_SET_ATTR_FAIL;
- }
- }
-
- return ret;
-}
-
-
-int KX_GameObject::py_delattro(PyObject *attr)
-{
- ShowDeprecationWarning("del ob.attr", "del ob['attr'] for user defined properties");
-
- char *attr_str= PyString_AsString(attr);
-
- if (RemoveProperty(attr_str)) // XXX - should call CValues instead but its only 2 lines here
- return PY_SET_ATTR_SUCCESS;
-
- if (m_attr_dict && (PyDict_DelItem(m_attr_dict, attr) == 0))
- return PY_SET_ATTR_SUCCESS;
-
- PyErr_Format(PyExc_AttributeError, "del gameOb.myAttr: KX_GameObject, attribute \"%s\" dosnt exist", attr_str);
- return PY_SET_ATTR_MISSING;
-}
-
-
PyObject* KX_GameObject::PyApplyForce(PyObject* args)
{
int local = 0;
@@ -2060,7 +2181,7 @@ PyObject* KX_GameObject::PySetOcclusion(PyObject* args)
PyObject* KX_GameObject::PyGetVisible()
{
ShowDeprecationWarning("getVisible()", "the visible property");
- return PyInt_FromLong(m_bVisible);
+ return PyLong_FromSsize_t(m_bVisible);
}
PyObject* KX_GameObject::PyGetState()
@@ -2068,13 +2189,13 @@ PyObject* KX_GameObject::PyGetState()
ShowDeprecationWarning("getState()", "the state property");
int state = 0;
state |= GetState();
- return PyInt_FromLong(state);
+ return PyLong_FromSsize_t(state);
}
PyObject* KX_GameObject::PySetState(PyObject* value)
{
ShowDeprecationWarning("setState()", "the state property");
- int state_i = PyInt_AsLong(value);
+ int state_i = PyLong_AsSsize_t(value);
unsigned int state = 0;
if (state_i == -1 && PyErr_Occurred()) {
@@ -2207,7 +2328,7 @@ PyObject* KX_GameObject::PyGetChildrenRecursive()
PyObject* KX_GameObject::PyGetMesh(PyObject* args)
{
- ShowDeprecationWarning("getMesh()", "the meshes property");
+ ShowDeprecationWarning("getMesh()", "the meshes property (now a list of meshes)");
int mesh = 0;
@@ -2380,7 +2501,7 @@ PyObject* KX_GameObject::PyGetPhysicsId()
{
physid= (uint_ptr)ctrl->GetUserData();
}
- return PyInt_FromLong((long)physid);
+ return PyLong_FromSsize_t((long)physid);
}
PyObject* KX_GameObject::PyGetPropertyNames()
@@ -2756,8 +2877,8 @@ PyObject* KX_GameObject::Pyget(PyObject *args)
return NULL;
- if(PyString_Check(key)) {
- CValue *item = GetProperty(PyString_AsString(key));
+ if(PyUnicode_Check(key)) {
+ CValue *item = GetProperty(_PyUnicode_AsString(key));
if (item) {
ret = item->ConvertValueToPython();
if(ret)
@@ -2779,16 +2900,11 @@ PyObject* KX_GameObject::Pyget(PyObject *args)
/* Matches python dict.has_key() */
PyObject* KX_GameObject::Pyhas_key(PyObject* value)
{
- if(PyString_Check(value) && GetProperty(PyString_AsString(value)))
- Py_RETURN_TRUE;
-
- if (m_attr_dict && PyDict_GetItem(m_attr_dict, value))
- Py_RETURN_TRUE;
-
- Py_RETURN_FALSE;
+ // 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
* --------------------------------------------------------------------- */
@@ -2831,13 +2947,13 @@ bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py
}
}
- if (PyString_Check(value)) {
- *object = (KX_GameObject*)SCA_ILogicBrick::m_sCurrentLogicManager->GetGameObjectByName(STR_String( PyString_AsString(value) ));
+ if (PyUnicode_Check(value)) {
+ *object = (KX_GameObject*)SCA_ILogicBrick::m_sCurrentLogicManager->GetGameObjectByName(STR_String( _PyUnicode_AsString(value) ));
if (*object) {
return true;
} else {
- PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_GameObject in this scene", error_prefix, PyString_AsString(value));
+ PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_GameObject in this scene", error_prefix, _PyUnicode_AsString(value));
return false;
}
}
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index dbdea97031d..947cc9959ff 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -63,6 +63,10 @@ struct Object;
/* utility conversion function */
bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix);
+#ifdef USE_MATHUTILS
+void KX_GameObject_Mathutils_Callback_Init(void);
+#endif
+
/**
* KX_GameObject is the main class for dynamic objects.
*/
@@ -185,8 +189,7 @@ public:
KX_GameObject(
void* sgReplicationInfo,
- SG_Callbacks callbacks,
- PyTypeObject* T=&Type
+ SG_Callbacks callbacks
);
virtual
@@ -393,6 +396,7 @@ public:
void NodeSetLocalPosition(const MT_Point3& trans );
void NodeSetLocalOrientation(const MT_Matrix3x3& rot );
+ void NodeSetGlobalOrientation(const MT_Matrix3x3& rot );
void NodeSetLocalScale( const MT_Vector3& scale );
@@ -406,21 +410,13 @@ public:
double time
);
- const
- MT_Matrix3x3&
- NodeGetWorldOrientation(
- ) const;
-
- const
- MT_Vector3&
- NodeGetWorldScaling(
- ) const;
-
- const
- MT_Point3&
- NodeGetWorldPosition(
- ) const;
+ const MT_Matrix3x3& NodeGetWorldOrientation( ) const;
+ const MT_Vector3& NodeGetWorldScaling( ) const;
+ const MT_Point3& NodeGetWorldPosition( ) const;
+ const MT_Matrix3x3& NodeGetLocalOrientation( ) const;
+ const MT_Vector3& NodeGetLocalScaling( ) const;
+ const MT_Point3& NodeGetLocalPosition( ) const;
/**
* @section scene graph node accessor functions.
@@ -811,22 +807,10 @@ public:
/**
* @section Python interface functions.
*/
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value); // py_setattro method
- virtual int py_delattro(PyObject *attr);
virtual PyObject* py_repr(void)
{
- return PyString_FromString(GetName().ReadPtr());
+ return PyUnicode_FromString(GetName().ReadPtr());
}
-
-
- /* quite annoying that we need these but the bloody
- * py_getattro_up and py_setattro_up macro's have a returns in them! */
- PyObject* py_getattro__internal(PyObject *attr);
- int py_setattro__internal(PyObject *attr, PyObject *value); // py_setattro method
-
KX_PYMETHOD_NOARGS(KX_GameObject,GetPosition);
KX_PYMETHOD_O(KX_GameObject,SetPosition);
@@ -917,10 +901,8 @@ public:
static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
/* getitem/setitem */
- static Py_ssize_t Map_Len(PyObject* self);
static PyMappingMethods Mapping;
- static PyObject* Map_GetItem(PyObject *self_v, PyObject *item);
- static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val);
+ static PySequenceMethods Sequence;
private :
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index 3ec0598ac03..73a370a1681 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -70,9 +70,8 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj,
int acttype,
bool ipo_as_force,
bool ipo_add,
- bool ipo_local,
- PyTypeObject* T)
- : SCA_IActuator(gameobj,T),
+ bool ipo_local)
+ : SCA_IActuator(gameobj),
m_bNegativeEvent(false),
m_startframe (starttime),
m_endframe(endtime),
@@ -429,19 +428,15 @@ PyTypeObject KX_IpoActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_IpoActuator::Parents[] = {
- &KX_IpoActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_IpoActuator::Methods[] = {
@@ -477,18 +472,6 @@ PyAttributeDef KX_IpoActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_IpoActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_IpoActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_IpoActuator::py_setattro(PyObject *attr, PyObject *value) // py_setattro method
-{
- py_setattro_up(SCA_IActuator);
-}
/* set --------------------------------------------------------------------- */
const char KX_IpoActuator::Set_doc[] =
@@ -689,7 +672,7 @@ const char KX_IpoActuator::GetType_doc[] =
"\tReturns the operation mode of the actuator.\n";
PyObject* KX_IpoActuator::PyGetType() {
ShowDeprecationWarning("getType()", "the mode property");
- return PyInt_FromLong(m_type);
+ return PyLong_FromSsize_t(m_type);
}
/* 10. setForceIpoActsLocal: */
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h
index 9ea597def1e..01051ca82dc 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.h
+++ b/source/gameengine/Ketsji/KX_IpoActuator.h
@@ -121,8 +121,7 @@ public:
int acttype,
bool ipo_as_force,
bool ipo_add,
- bool ipo_local,
- PyTypeObject* T=&Type);
+ bool ipo_local);
virtual ~KX_IpoActuator() {};
virtual CValue* GetReplica() {
@@ -138,10 +137,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
//KX_PYMETHOD_DOC
KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,Set);
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index b30b79e7f23..cc0f50d9e7a 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -61,10 +61,6 @@
#include "KX_PyConstraintBinding.h"
#include "PHY_IPhysicsEnvironment.h"
-#ifdef USE_SUMO_SOLID
-#include "SumoPhysicsEnvironment.h"
-#endif
-
#include "SND_Scene.h"
#include "SND_IAudioDevice.h"
@@ -400,9 +396,9 @@ void KX_KetsjiEngine::StartEngine(bool clearIpo)
World* world = m_scenes[0]->GetBlenderScene()->world;
if (world)
{
- m_ticrate = world->ticrate;
- m_maxLogicFrame = world->maxlogicstep;
- m_maxPhysicsFrame = world->maxphystep;
+ 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
{
@@ -1078,6 +1074,11 @@ void KX_KetsjiEngine::SetCameraOverrideClipping(float near, float far)
m_overrideCamFar = far;
}
+void KX_KetsjiEngine::SetCameraOverrideLens(float lens)
+{
+ m_overrideCamLens = lens;
+}
+
void KX_KetsjiEngine::GetSceneViewport(KX_Scene *scene, KX_Camera* cam, RAS_Rect& area, RAS_Rect& viewport)
{
// In this function we make sure the rasterizer settings are upto
@@ -1351,6 +1352,8 @@ void KX_KetsjiEngine::PostProcessScene(KX_Scene* scene)
KX_Camera* activecam = NULL;
RAS_CameraData camdata = RAS_CameraData();
+ if (override_camera) camdata.m_lens = m_overrideCamLens;
+
activecam = new KX_Camera(scene,KX_Scene::m_callbacks,camdata);
activecam->SetName("__default__cam__");
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index 6fa379e551a..abba23ca376 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -129,6 +129,7 @@ private:
MT_CmMatrix4x4 m_overrideCamViewMat;
float m_overrideCamNear;
float m_overrideCamFar;
+ float m_overrideCamLens;
bool m_stereo;
int m_curreye;
@@ -253,6 +254,7 @@ public:
void SetCameraOverrideProjectionMatrix(const MT_CmMatrix4x4& mat);
void SetCameraOverrideViewMatrix(const MT_CmMatrix4x4& mat);
void SetCameraOverrideClipping(float near, float far);
+ void SetCameraOverrideLens(float lens);
/**
* Sets display of all frames.
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index fe575384a35..fb385f8a9a2 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -35,6 +35,8 @@
#pragma warning (disable : 4786)
#endif
+#include "GL/glew.h"
+
#include "KX_Light.h"
#include "KX_Camera.h"
#include "RAS_IRasterizer.h"
@@ -43,21 +45,19 @@
#include "KX_PyMath.h"
#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
#include "GPU_material.h"
KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
class RAS_IRenderTools* rendertools,
const RAS_LightObject& lightobj,
- bool glsl,
- PyTypeObject* T
- )
- :
- KX_GameObject(sgReplicationInfo,callbacks,T),
- m_rendertools(rendertools)
+ bool glsl)
+ : KX_GameObject(sgReplicationInfo,callbacks),
+ m_rendertools(rendertools)
{
m_lightobj = lightobj;
- m_lightobj.m_worldmatrix = GetOpenGLMatrixPtr();
m_lightobj.m_scene = sgReplicationInfo;
+ m_lightobj.m_light = this;
m_rendertools->AddLight(&m_lightobj);
m_glsl = glsl;
m_blenderscene = ((KX_Scene*)sgReplicationInfo)->GetBlenderScene();
@@ -84,12 +84,102 @@ CValue* KX_LightObject::GetReplica()
replica->ProcessReplica();
- replica->m_lightobj.m_worldmatrix = replica->GetOpenGLMatrixPtr();
+ replica->m_lightobj.m_light = replica;
m_rendertools->AddLight(&replica->m_lightobj);
return replica;
}
+bool KX_LightObject::ApplyLight(KX_Scene *kxscene, int oblayer, int slot)
+{
+ KX_Scene* lightscene = (KX_Scene*)m_lightobj.m_scene;
+ float vec[4];
+ int scenelayer = ~0;
+
+ if(kxscene && kxscene->GetBlenderScene())
+ scenelayer = kxscene->GetBlenderScene()->lay;
+
+ /* only use lights in the same layer as the object */
+ if(!(m_lightobj.m_layer & oblayer))
+ return false;
+ /* only use lights in the same scene, and in a visible layer */
+ if(kxscene != lightscene || !(m_lightobj.m_layer & scenelayer))
+ return false;
+
+ // lights don't get their openGL matrix updated, do it now
+ if(GetSGNode()->IsDirty())
+ GetOpenGLMatrix();
+
+ MT_CmMatrix4x4& worldmatrix= *GetOpenGLMatrixPtr();
+
+ vec[0] = worldmatrix(0,3);
+ vec[1] = worldmatrix(1,3);
+ vec[2] = worldmatrix(2,3);
+ vec[3] = 1.0f;
+
+ if(m_lightobj.m_type==RAS_LightObject::LIGHT_SUN) {
+
+ vec[0] = worldmatrix(0,2);
+ vec[1] = worldmatrix(1,2);
+ vec[2] = worldmatrix(2,2);
+ //vec[0]= base->object->obmat[2][0];
+ //vec[1]= base->object->obmat[2][1];
+ //vec[2]= base->object->obmat[2][2];
+ vec[3]= 0.0;
+ glLightfv((GLenum)(GL_LIGHT0+slot), GL_POSITION, vec);
+ }
+ else {
+ //vec[3]= 1.0;
+ glLightfv((GLenum)(GL_LIGHT0+slot), GL_POSITION, vec);
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_CONSTANT_ATTENUATION, 1.0);
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_LINEAR_ATTENUATION, m_lightobj.m_att1/m_lightobj.m_distance);
+ // without this next line it looks backward compatible.
+ //attennuation still is acceptable
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_QUADRATIC_ATTENUATION, m_lightobj.m_att2/(m_lightobj.m_distance*m_lightobj.m_distance));
+
+ if(m_lightobj.m_type==RAS_LightObject::LIGHT_SPOT) {
+ vec[0] = -worldmatrix(0,2);
+ vec[1] = -worldmatrix(1,2);
+ vec[2] = -worldmatrix(2,2);
+ //vec[0]= -base->object->obmat[2][0];
+ //vec[1]= -base->object->obmat[2][1];
+ //vec[2]= -base->object->obmat[2][2];
+ glLightfv((GLenum)(GL_LIGHT0+slot), GL_SPOT_DIRECTION, vec);
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, m_lightobj.m_spotsize/2.0);
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_EXPONENT, 128.0*m_lightobj.m_spotblend);
+ }
+ else
+ glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, 180.0);
+ }
+
+ if (m_lightobj.m_nodiffuse) {
+ vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
+ }
+ else {
+ vec[0]= m_lightobj.m_energy*m_lightobj.m_red;
+ vec[1]= m_lightobj.m_energy*m_lightobj.m_green;
+ vec[2]= m_lightobj.m_energy*m_lightobj.m_blue;
+ vec[3]= 1.0;
+ }
+
+ glLightfv((GLenum)(GL_LIGHT0+slot), GL_DIFFUSE, vec);
+ if(m_lightobj.m_nospecular)
+ {
+ vec[0] = vec[1] = vec[2] = vec[3] = 0.0;
+ }
+ else if (m_lightobj.m_nodiffuse) {
+ vec[0]= m_lightobj.m_energy*m_lightobj.m_red;
+ vec[1]= m_lightobj.m_energy*m_lightobj.m_green;
+ vec[2]= m_lightobj.m_energy*m_lightobj.m_blue;
+ vec[3]= 1.0;
+ }
+
+ glLightfv((GLenum)(GL_LIGHT0+slot), GL_SPECULAR, vec);
+ glEnable((GLenum)(GL_LIGHT0+slot));
+
+ return true;
+}
+
GPULamp *KX_LightObject::GetGPULamp()
{
if(m_glsl)
@@ -178,11 +268,6 @@ void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras)
/* Python Integration Hooks */
/* ------------------------------------------------------------------------- */
-PyObject* KX_LightObject::py_getattro_dict() {
- py_getattro_dict_up(KX_GameObject);
-}
-
-
PyTypeObject KX_LightObject::Type = {
#if (PY_VERSION_HEX >= 0x02060000)
PyVarObject_HEAD_INIT(NULL, 0)
@@ -200,21 +285,21 @@ PyTypeObject KX_LightObject::Type = {
0,
0,
py_base_repr,
- 0,0,
+ 0,
+ &KX_GameObject::Sequence,
&KX_GameObject::Mapping,
0,0,0,
- py_base_getattro,
- py_base_setattro,
- 0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_LightObject::Parents[] = {
- &KX_LightObject::Type,
- &KX_GameObject::Type,
- &SCA_IObject::Type,
- &CValue::Type,
- NULL
+ NULL,
+ NULL,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &KX_GameObject::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_LightObject::Methods[] = {
@@ -266,11 +351,11 @@ PyObject* KX_LightObject::pyattr_get_typeconst(void *self_v, const KX_PYATTRIBUT
const char* type = attrdef->m_name;
if(strcmp(type, "SPOT")) {
- retvalue = PyInt_FromLong(RAS_LightObject::LIGHT_SPOT);
+ retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_SPOT);
} else if (strcmp(type, "SUN")) {
- retvalue = PyInt_FromLong(RAS_LightObject::LIGHT_SUN);
+ retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_SUN);
} else if (strcmp(type, "NORMAL")) {
- retvalue = PyInt_FromLong(RAS_LightObject::LIGHT_NORMAL);
+ retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_NORMAL);
}
return retvalue;
@@ -279,13 +364,13 @@ PyObject* KX_LightObject::pyattr_get_typeconst(void *self_v, const KX_PYATTRIBUT
PyObject* KX_LightObject::pyattr_get_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_LightObject* self = static_cast<KX_LightObject*>(self_v);
- return PyInt_FromLong(self->m_lightobj.m_type);
+ return PyLong_FromSsize_t(self->m_lightobj.m_type);
}
int KX_LightObject::pyattr_set_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value)
{
KX_LightObject* self = static_cast<KX_LightObject*>(self_v);
- int val = PyInt_AsLong(value);
+ int val = PyLong_AsSsize_t(value);
if((val==-1 && PyErr_Occurred()) || val<0 || val>2) {
PyErr_SetString(PyExc_ValueError, "light.type= val: KX_LightObject, expected an int between 0 and 2");
return PY_SET_ATTR_FAIL;
@@ -305,14 +390,3 @@ int KX_LightObject::pyattr_set_type(void* self_v, const KX_PYATTRIBUTE_DEF *attr
return PY_SET_ATTR_SUCCESS;
}
-
-
-PyObject* KX_LightObject::py_getattro(PyObject *attr)
-{
- py_getattro_up(KX_GameObject);
-}
-
-int KX_LightObject::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(KX_GameObject);
-}
diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h
index 35f25515e3b..0b7ccbe81ab 100644
--- a/source/gameengine/Ketsji/KX_Light.h
+++ b/source/gameengine/Ketsji/KX_Light.h
@@ -49,22 +49,21 @@ protected:
Scene* m_blenderscene;
public:
- KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, bool glsl, PyTypeObject *T = &Type);
+ KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, bool glsl);
virtual ~KX_LightObject();
virtual CValue* GetReplica();
RAS_LightObject* GetLightData() { return &m_lightobj;}
- /* GLSL shadow */
+ /* OpenGL Light */
+ bool ApplyLight(KX_Scene *kxscene, int oblayer, int slot);
+
+ /* GLSL Light */
struct GPULamp *GetGPULamp();
bool HasShadowBuffer();
int GetShadowLayer();
void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans);
void UnbindShadowBuffer(class RAS_IRasterizer *ras);
void Update();
-
- virtual PyObject* py_getattro(PyObject *attr); /* lens, near, far, projection_matrix */
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
/* attributes */
static PyObject* pyattr_get_color(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index 11effa1ca98..96e8f61e4c8 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -62,18 +62,15 @@ PyTypeObject KX_MeshProxy::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_MeshProxy::Parents[] = {
- &KX_MeshProxy::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- &PyObjectPlus::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_MeshProxy::Methods[] = {
@@ -106,24 +103,8 @@ void KX_MeshProxy::SetMeshModified(bool v)
m_meshobj->SetMeshModified(v);
}
-
-PyObject* KX_MeshProxy::py_getattro(PyObject *attr)
-{
- py_getattro_up(CValue);
-}
-
-PyObject* KX_MeshProxy::py_getattro_dict() {
- py_getattro_dict_up(CValue);
-}
-
-int KX_MeshProxy::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(CValue);
-}
-
-
KX_MeshProxy::KX_MeshProxy(RAS_MeshObject* mesh)
- : CValue(&Type), m_meshobj(mesh)
+ : CValue(), m_meshobj(mesh)
{
}
@@ -150,14 +131,14 @@ PyObject* KX_MeshProxy::PyGetNumMaterials(PyObject* args, PyObject* kwds)
{
int num = m_meshobj->NumMaterials();
ShowDeprecationWarning("getNumMaterials()", "the numMaterials property");
- return PyInt_FromLong(num);
+ return PyLong_FromSsize_t(num);
}
PyObject* KX_MeshProxy::PyGetNumPolygons()
{
int num = m_meshobj->NumPolygons();
ShowDeprecationWarning("getNumPolygons()", "the numPolygons property");
- return PyInt_FromLong(num);
+ return PyLong_FromSsize_t(num);
}
PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds)
@@ -173,7 +154,7 @@ PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds)
return NULL;
}
- return PyString_FromString(matname.Ptr());
+ return PyUnicode_FromString(matname.Ptr());
}
@@ -191,7 +172,7 @@ PyObject* KX_MeshProxy::PyGetTextureName(PyObject* args, PyObject* kwds)
return NULL;
}
- return PyString_FromString(matname.Ptr());
+ return PyUnicode_FromString(matname.Ptr());
}
@@ -214,7 +195,7 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* args, PyObject* kwds)
length = m_meshobj->NumVertices(mat);
}
- return PyInt_FromLong(length);
+ return PyLong_FromSsize_t(length);
}
@@ -304,12 +285,12 @@ PyObject* KX_MeshProxy::pyattr_get_materials(void *self_v, const KX_PYATTRIBUTE_
PyObject * KX_MeshProxy::pyattr_get_numMaterials(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) {
KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv);
- return PyInt_FromLong(self->m_meshobj->NumMaterials());
+ return PyLong_FromSsize_t(self->m_meshobj->NumMaterials());
}
PyObject * KX_MeshProxy::pyattr_get_numPolygons(void * selfv, const KX_PYATTRIBUTE_DEF * attrdef) {
KX_MeshProxy * self = static_cast<KX_MeshProxy *> (selfv);
- return PyInt_FromLong(self->m_meshobj->NumPolygons());
+ return PyLong_FromSsize_t(self->m_meshobj->NumPolygons());
}
/* a close copy of ConvertPythonToGameObject but for meshes */
@@ -332,13 +313,13 @@ bool ConvertPythonToMesh(PyObject * value, RAS_MeshObject **object, bool py_none
}
}
- if (PyString_Check(value)) {
- *object = (RAS_MeshObject*)SCA_ILogicBrick::m_sCurrentLogicManager->GetMeshByName(STR_String( PyString_AsString(value) ));
+ if (PyUnicode_Check(value)) {
+ *object = (RAS_MeshObject*)SCA_ILogicBrick::m_sCurrentLogicManager->GetMeshByName(STR_String( _PyUnicode_AsString(value) ));
if (*object) {
return true;
} else {
- PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_MeshProxy in this scene", error_prefix, PyString_AsString(value));
+ PyErr_Format(PyExc_ValueError, "%s, requested name \"%s\" did not match any KX_MeshProxy in this scene", error_prefix, _PyUnicode_AsString(value));
return false;
}
}
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h
index bfdd4be4118..4b6543677ad 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.h
+++ b/source/gameengine/Ketsji/KX_MeshProxy.h
@@ -56,9 +56,6 @@ public:
virtual CValue* GetReplica();
// stuff for python integration
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
KX_PYMETHOD(KX_MeshProxy,GetNumMaterials); // Deprecated
KX_PYMETHOD(KX_MeshProxy,GetMaterialName);
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
index fde10a493db..ba4b47cb03f 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
@@ -63,9 +63,8 @@ KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr,
int focusmode,
KX_Scene* kxscene,
KX_KetsjiEngine *kxengine,
- SCA_IObject* gameobj,
- PyTypeObject* T)
- : SCA_MouseSensor(eventmgr, startx, starty, mousemode, gameobj, T),
+ SCA_IObject* gameobj)
+ : SCA_MouseSensor(eventmgr, startx, starty, mousemode, gameobj),
m_focusmode(focusmode),
m_kxscene(kxscene),
m_kxengine(kxengine)
@@ -356,20 +355,15 @@ PyTypeObject KX_MouseFocusSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_MouseFocusSensor::Parents[] = {
- &KX_MouseFocusSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_MouseSensor::Type,
- &SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_MouseFocusSensor::Methods[] = {
@@ -393,15 +387,6 @@ PyAttributeDef KX_MouseFocusSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_MouseFocusSensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_MouseSensor);
-}
-
-PyObject* KX_MouseFocusSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_MouseSensor);
-}
-
-
const char KX_MouseFocusSensor::GetHitObject_doc[] =
"getHitObject()\n"
"\tReturns the object that was hit by this ray.\n";
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index 29d674eb305..dfada7a59cc 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -56,8 +56,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
int focusmode,
KX_Scene* kxscene,
KX_KetsjiEngine* kxengine,
- SCA_IObject* gameobj,
- PyTypeObject* T=&Type );
+ SCA_IObject* gameobj);
virtual ~KX_MouseFocusSensor() { ; };
virtual CValue* GetReplica() {
@@ -89,8 +88,6 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetRayTarget);
KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetRaySource);
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index 44842b7f5b3..1a211a64b35 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -48,15 +48,13 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr,
bool bFindMaterial,
const STR_String& touchedpropname,
class KX_Scene* scene,
- PHY_IPhysicsController* ctrl,
- PyTypeObject* T)
+ PHY_IPhysicsController* ctrl)
:KX_TouchSensor(eventmgr,
gameobj,
bFindMaterial,
false,
- touchedpropname,
- /* scene, */
- T),
+ touchedpropname
+ /*, scene */),
m_Margin(margin),
m_ResetMargin(resetmargin)
@@ -272,26 +270,17 @@ PyTypeObject KX_NearSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_NearSensor::Parents[] = {
- &KX_NearSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&KX_TouchSensor::Type,
- &SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_NearSensor::Methods[] = {
//No methods
{NULL,NULL} //Sentinel
@@ -302,18 +291,3 @@ PyAttributeDef KX_NearSensor::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW_CHECK("resetDistance", 0, 100, KX_NearSensor, m_ResetMargin, CheckResetDistance),
{NULL} //Sentinel
};
-
-
-PyObject* KX_NearSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(KX_TouchSensor);
-}
-
-PyObject* KX_NearSensor::py_getattro_dict() {
- py_getattro_dict_up(KX_TouchSensor);
-}
-
-int KX_NearSensor::py_setattro(PyObject*attr, PyObject* value)
-{
- py_setattro_up(KX_TouchSensor);
-}
diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h
index 63099e181a0..f3c1d74805c 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.h
+++ b/source/gameengine/Ketsji/KX_NearSensor.h
@@ -54,8 +54,7 @@ public:
bool bFindMaterial,
const STR_String& touchedpropname,
class KX_Scene* scene,
- PHY_IPhysicsController* ctrl,
- PyTypeObject* T=&Type);
+ PHY_IPhysicsController* ctrl);
/*
public:
KX_NearSensor(class SCA_EventManager* eventmgr,
@@ -64,8 +63,7 @@ public:
double resetmargin,
bool bFindMaterial,
const STR_String& touchedpropname,
- class KX_Scene* scene,
- PyTypeObject* T=&Type);
+ class KX_Scene* scene);
*/
virtual ~KX_NearSensor();
virtual void SynchronizeTransform();
@@ -83,9 +81,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
//No methods
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
index eaae04d406d..ae340d12be4 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
@@ -53,10 +53,9 @@ KX_ObjectActuator(
const MT_Vector3& linV,
const MT_Vector3& angV,
const short damping,
- const KX_LocalFlags& flag,
- PyTypeObject* T
+ const KX_LocalFlags& flag
) :
- SCA_IActuator(gameobj,T),
+ SCA_IActuator(gameobj),
m_force(force),
m_torque(torque),
m_dloc(dloc),
@@ -342,19 +341,15 @@ PyTypeObject KX_ObjectActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_ObjectActuator::Parents[] = {
- &KX_ObjectActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_ObjectActuator::Methods[] = {
@@ -396,9 +391,14 @@ PyAttributeDef KX_ObjectActuator::Attributes[] = {
KX_PYATTRIBUTE_BOOL_RW("useLocalDLoc", KX_ObjectActuator, m_bitLocalFlag.DLoc),
KX_PYATTRIBUTE_VECTOR_RW_CHECK("dRot", -1000, 1000, false, KX_ObjectActuator, m_drot, PyUpdateFuzzyFlags),
KX_PYATTRIBUTE_BOOL_RW("useLocalDRot", KX_ObjectActuator, m_bitLocalFlag.DRot),
+#ifdef USE_MATHUTILS
+ KX_PYATTRIBUTE_RW_FUNCTION("linV", KX_ObjectActuator, pyattr_get_linV, pyattr_set_linV),
+ KX_PYATTRIBUTE_RW_FUNCTION("angV", KX_ObjectActuator, pyattr_get_angV, pyattr_set_angV),
+#else
KX_PYATTRIBUTE_VECTOR_RW_CHECK("linV", -1000, 1000, false, KX_ObjectActuator, m_linear_velocity, PyUpdateFuzzyFlags),
- KX_PYATTRIBUTE_BOOL_RW("useLocalLinV", KX_ObjectActuator, m_bitLocalFlag.LinearVelocity),
KX_PYATTRIBUTE_VECTOR_RW_CHECK("angV", -1000, 1000, false, KX_ObjectActuator, m_angular_velocity, PyUpdateFuzzyFlags),
+#endif
+ KX_PYATTRIBUTE_BOOL_RW("useLocalLinV", KX_ObjectActuator, m_bitLocalFlag.LinearVelocity),
KX_PYATTRIBUTE_BOOL_RW("useLocalAngV", KX_ObjectActuator, m_bitLocalFlag.AngularVelocity),
KX_PYATTRIBUTE_SHORT_RW("damping", 0, 1000, false, KX_ObjectActuator, m_damping),
KX_PYATTRIBUTE_RW_FUNCTION("forceLimitX", KX_ObjectActuator, pyattr_get_forceLimitX, pyattr_set_forceLimitX),
@@ -409,21 +409,130 @@ PyAttributeDef KX_ObjectActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_ObjectActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
+/* Attribute get/set functions */
+
+#ifdef USE_MATHUTILS
+
+/* These require an SGNode */
+#define MATHUTILS_VEC_CB_LINV 1
+#define MATHUTILS_VEC_CB_ANGV 2
+
+static int mathutils_kxobactu_vector_cb_index= -1; /* index for our callbacks */
+
+static int mathutils_obactu_generic_check(PyObject *self_v)
+{
+ KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ return 1;
+}
+
+static int mathutils_obactu_vector_get(PyObject *self_v, int subtype, float *vec_from)
+{
+ KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ switch(subtype) {
+ case MATHUTILS_VEC_CB_LINV:
+ self->m_linear_velocity.getValue(vec_from);
+ break;
+ case MATHUTILS_VEC_CB_ANGV:
+ self->m_angular_velocity.getValue(vec_from);
+ break;
+ }
+
+ return 1;
}
+static int mathutils_obactu_vector_set(PyObject *self_v, int subtype, float *vec_to)
+{
+ KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(self_v);
+ if(self==NULL)
+ return 0;
+
+ switch(subtype) {
+ case MATHUTILS_VEC_CB_LINV:
+ self->m_linear_velocity.setValue(vec_to);
+ break;
+ case MATHUTILS_VEC_CB_ANGV:
+ self->m_angular_velocity.setValue(vec_to);
+ break;
+ }
-PyObject* KX_ObjectActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
+ return 1;
}
-int KX_ObjectActuator::py_setattro(PyObject *attr, PyObject *value)
+static int mathutils_obactu_vector_get_index(PyObject *self_v, int subtype, float *vec_from, int index)
{
- py_setattro_up(SCA_IActuator);
+ float f[4];
+ /* lazy, avoid repeteing the case statement */
+ if(!mathutils_obactu_vector_get(self_v, subtype, f))
+ return 0;
+
+ vec_from[index]= f[index];
+ return 1;
}
-/* Attribute get/set functions */
+static int mathutils_obactu_vector_set_index(PyObject *self_v, int subtype, float *vec_to, int index)
+{
+ float f= vec_to[index];
+
+ /* lazy, avoid repeteing the case statement */
+ if(!mathutils_obactu_vector_get(self_v, subtype, vec_to))
+ return 0;
+
+ vec_to[index]= f;
+ mathutils_obactu_vector_set(self_v, subtype, vec_to);
+
+ return 1;
+}
+
+Mathutils_Callback mathutils_obactu_vector_cb = {
+ mathutils_obactu_generic_check,
+ mathutils_obactu_vector_get,
+ mathutils_obactu_vector_set,
+ mathutils_obactu_vector_get_index,
+ mathutils_obactu_vector_set_index
+};
+
+PyObject* KX_ObjectActuator::pyattr_get_linV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+{
+ 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)
+{
+ KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>(self_v);
+ if (!PyVecTo(value, self->m_linear_velocity))
+ return PY_SET_ATTR_FAIL;
+
+ return PY_SET_ATTR_SUCCESS;
+}
+
+PyObject* KX_ObjectActuator::pyattr_get_angV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+{
+ 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)
+{
+ KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>(self_v);
+ if (!PyVecTo(value, self->m_angular_velocity))
+ return PY_SET_ATTR_FAIL;
+
+ return PY_SET_ATTR_SUCCESS;
+}
+
+
+void KX_ObjectActuator_Mathutils_Callback_Init(void)
+{
+ // register mathutils callbacks, ok to run more then once.
+ mathutils_kxobactu_vector_cb_index= Mathutils_RegisterCallback(&mathutils_obactu_vector_cb);
+}
+
+#endif // USE_MATHUTILS
PyObject* KX_ObjectActuator::pyattr_get_forceLimitX(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
@@ -446,7 +555,7 @@ int KX_ObjectActuator::pyattr_set_forceLimitX(void *self_v, const KX_PYATTRIBUTE
{
self->m_drot[0] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 0));
self->m_dloc[0] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 1));
- self->m_bitLocalFlag.Torque = (PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 2)) != 0);
+ self->m_bitLocalFlag.Torque = (PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2)) != 0);
if (!PyErr_Occurred())
{
@@ -482,7 +591,7 @@ int KX_ObjectActuator::pyattr_set_forceLimitY(void *self_v, const KX_PYATTRIBUTE
{
self->m_drot[1] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 0));
self->m_dloc[1] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 1));
- self->m_bitLocalFlag.DLoc = (PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 2)) != 0);
+ self->m_bitLocalFlag.DLoc = (PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2)) != 0);
if (!PyErr_Occurred())
{
@@ -518,7 +627,7 @@ int KX_ObjectActuator::pyattr_set_forceLimitZ(void *self_v, const KX_PYATTRIBUTE
{
self->m_drot[2] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 0));
self->m_dloc[2] = PyFloat_AsDouble(PySequence_Fast_GET_ITEM(value, 1));
- self->m_bitLocalFlag.DRot = (PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 2)) != 0);
+ self->m_bitLocalFlag.DRot = (PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2)) != 0);
if (!PyErr_Occurred())
{
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h
index f9bd2a0c748..20aec9e0e86 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.h
@@ -35,6 +35,10 @@
#include "SCA_IActuator.h"
#include "MT_Vector3.h"
+#ifdef USE_MATHUTILS
+void KX_ObjectActuator_Mathutils_Callback_Init(void);
+#endif
+
class KX_GameObject;
//
@@ -131,8 +135,7 @@ public:
const MT_Vector3& linV,
const MT_Vector3& angV,
const short damping,
- const KX_LocalFlags& flag,
- PyTypeObject* T=&Type
+ const KX_LocalFlags& flag
);
~KX_ObjectActuator();
CValue* GetReplica();
@@ -159,10 +162,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForce);
KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForce);
@@ -197,6 +196,13 @@ public:
static PyObject* pyattr_get_reference(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_reference(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#ifdef USE_MATHUTILS
+ static PyObject* pyattr_get_linV(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_linV(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ static PyObject* pyattr_get_angV(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_angV(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+#endif
+
// This lets the attribute macros use UpdateFuzzyFlags()
static int PyUpdateFuzzyFlags(void *self, const PyAttributeDef *attrdef)
{
diff --git a/source/gameengine/Ketsji/KX_OdePhysicsController.cpp b/source/gameengine/Ketsji/KX_OdePhysicsController.cpp
deleted file mode 100644
index dc6990267d4..00000000000
--- a/source/gameengine/Ketsji/KX_OdePhysicsController.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#include "KX_ConvertPhysicsObject.h"
-
-#ifdef USE_ODE
-
-#include "KX_OdePhysicsController.h"
-#include "KX_GameObject.h"
-#include "KX_MotionState.h"
-
-#include "MT_assert.h"
-
-#include "PHY_IPhysicsEnvironment.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-KX_OdePhysicsController::KX_OdePhysicsController(
- bool dyna,
- bool fullRigidBody,
- bool phantom,
- class PHY_IMotionState* motionstate,
- struct dxSpace* space,
- struct dxWorld* world,
- float mass,
- float friction,
- float restitution,
- bool implicitsphere,
- float center[3],
- float extends[3],
- float radius
- )
-: KX_IPhysicsController(dyna,false,(PHY_IPhysicsController*)this),
-ODEPhysicsController(
-dyna,fullRigidBody,phantom,motionstate,
-space,world,mass,friction,restitution,
-implicitsphere,center,extends,radius)
-{
-};
-
-
-bool KX_OdePhysicsController::Update(double time)
-{
- return SynchronizeMotionStates(time);
-}
-
-void KX_OdePhysicsController::SetObject (SG_IObject* object)
-{
- SG_Controller::SetObject(object);
-
- // cheating here...
- KX_GameObject* gameobj = (KX_GameObject*) object->GetSGClientObject();
- gameobj->SetPhysicsController(this);
-
-}
-
-
-
-void KX_OdePhysicsController::applyImpulse(const MT_Point3& attach, const MT_Vector3& impulse)
-{
- ODEPhysicsController::applyImpulse(attach[0],attach[1],attach[2],impulse[0],impulse[1],impulse[2]);
-}
-
-
-
-void KX_OdePhysicsController::RelativeTranslate(const MT_Vector3& dloc,bool local)
-{
- ODEPhysicsController::RelativeTranslate(dloc[0],dloc[1],dloc[2],local);
-
-}
-void KX_OdePhysicsController::RelativeRotate(const MT_Matrix3x3& drot,bool local)
-{
- double oldmat[12];
- drot.getValue(oldmat);
- float newmat[9];
- float *m = &newmat[0];
- double *orgm = &oldmat[0];
-
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++;
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++;
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++;
-
- ODEPhysicsController::RelativeRotate(newmat,local);
-
-}
-
-void KX_OdePhysicsController::ApplyTorque(const MT_Vector3& torque,bool local)
-{
- ODEPhysicsController::ApplyTorque(torque[0],torque[1],torque[2],local);
-
-}
-void KX_OdePhysicsController::ApplyForce(const MT_Vector3& force,bool local)
-{
- ODEPhysicsController::ApplyForce(force[0],force[1],force[2],local);
-
-}
-MT_Vector3 KX_OdePhysicsController::GetLinearVelocity()
-{
- return MT_Vector3(0,0,0);
-}
-
-MT_Vector3 KX_OdePhysicsController::GetVelocity(const MT_Point3& pos)
-{
- return MT_Vector3(0,0,0);
-}
-
-void KX_OdePhysicsController::SetAngularVelocity(const MT_Vector3& ang_vel,bool local)
-{
-
-}
-void KX_OdePhysicsController::SetLinearVelocity(const MT_Vector3& lin_vel,bool local)
-{
- ODEPhysicsController::SetLinearVelocity(lin_vel[0],lin_vel[1],lin_vel[2],local);
-}
-
-void KX_OdePhysicsController::setOrientation(const MT_Matrix3x3& rot)
-{
- MT_Quaternion orn = rot.getRotation();
- ODEPhysicsController::setOrientation(orn[0],orn[1],orn[2],orn[3]);
-}
-
-void KX_OdePhysicsController::getOrientation(MT_Quaternion& orn)
-{
- float florn[4];
- florn[0]=orn[0];
- florn[1]=orn[1];
- florn[2]=orn[2];
- florn[3]=orn[3];
- ODEPhysicsController::getOrientation(florn[0],florn[1],florn[2],florn[3]);
- orn[0] = florn[0];
- orn[1] = florn[1];
- orn[2] = florn[2];
- orn[3] = florn[3];
-
-
-}
-
-void KX_OdePhysicsController::setPosition(const MT_Point3& pos)
-{
- ODEPhysicsController::setPosition(pos[0],pos[1],pos[2]);
-}
-
-void KX_OdePhysicsController::setScaling(const MT_Vector3& scaling)
-{
-}
-
-MT_Scalar KX_OdePhysicsController::GetMass()
-{
- return ODEPhysicsController::getMass();
-}
-
-MT_Scalar KX_OdePhysicsController::GetRadius()
-{
- return MT_Scalar(0.f);
-}
-
-MT_Vector3 KX_OdePhysicsController::getReactionForce()
-{
- return MT_Vector3(0,0,0);
-}
-void KX_OdePhysicsController::setRigidBody(bool rigid)
-{
-
-}
-
-void KX_OdePhysicsController::SuspendDynamics(bool)
-{
- ODEPhysicsController::SuspendDynamics();
-}
-void KX_OdePhysicsController::RestoreDynamics()
-{
- ODEPhysicsController::RestoreDynamics();
-}
-
-
-SG_Controller* KX_OdePhysicsController::GetReplica(class SG_Node* destnode)
-{
- PHY_IMotionState* motionstate = new KX_MotionState(destnode);
- KX_OdePhysicsController* copyctrl = new KX_OdePhysicsController(*this);
-
- // nlin: copied from KX_SumoPhysicsController.cpp. Not 100% sure what this does....
- // furthermore, the parentctrl is not used in ODEPhysicsController::PostProcessReplica, but
- // maybe it can/should be used in the future...
-
- // begin copy block ------------------------------------------------------------------
-
- //parentcontroller is here be able to avoid collisions between parent/child
-
- PHY_IPhysicsController* parentctrl = NULL;
-
- if (destnode != destnode->GetRootSGParent())
- {
- KX_GameObject* clientgameobj = (KX_GameObject*) destnode->GetRootSGParent()->GetSGClientObject();
- if (clientgameobj)
- {
- parentctrl = (KX_OdePhysicsController*)clientgameobj->GetPhysicsController();
- } else
- {
- // it could be a false node, try the children
- NodeList::const_iterator childit;
- for (
- childit = destnode->GetSGChildren().begin();
- childit!= destnode->GetSGChildren().end();
- ++childit
- ) {
- KX_GameObject* clientgameobj = static_cast<KX_GameObject*>( (*childit)->GetSGClientObject());
- if (clientgameobj)
- {
- parentctrl = (KX_OdePhysicsController*)clientgameobj->GetPhysicsController();
- }
- }
- }
- }
- // end copy block ------------------------------------------------------------------
-
- copyctrl->PostProcessReplica(motionstate, this);
-
- return copyctrl;
-
-}
-
-void KX_OdePhysicsController::resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ)
-{
-}
-
-
-void KX_OdePhysicsController::SetSumoTransform(bool nondynaonly)
-{
-
-}
- // todo: remove next line !
-void KX_OdePhysicsController::SetSimulatedTime(double time)
-{
-
-}
-
-#endif //USE_ODE
diff --git a/source/gameengine/Ketsji/KX_OdePhysicsController.h b/source/gameengine/Ketsji/KX_OdePhysicsController.h
deleted file mode 100644
index 8c3974c38a3..00000000000
--- a/source/gameengine/Ketsji/KX_OdePhysicsController.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __KX_ODEPHYSICSCONTROLLER_H
-#define __KX_ODEPHYSICSCONTROLLER_H
-
-#include "KX_IPhysicsController.h"
-#include "OdePhysicsController.h"
-
-/**
- Physics Controller, a special kind of Scene Graph Transformation Controller.
- It get's callbacks from Physics in case a transformation change took place.
- Each time the scene graph get's updated, the controller get's a chance
- in the 'Update' method to reflect changed.
-*/
-
-class KX_OdePhysicsController : public KX_IPhysicsController, public ODEPhysicsController
-
-{
-
-public:
- KX_OdePhysicsController(
- bool dyna,
- bool fullRigidBody,
- bool phantom,
- class PHY_IMotionState* motionstate,
- struct dxSpace* space,
- struct dxWorld* world,
- float mass,
- float friction,
- float restitution,
- bool implicitsphere,
- float center[3],
- float extends[3],
- float radius);
-
- virtual ~KX_OdePhysicsController() {};
-
- virtual void applyImpulse(const MT_Point3& attach, const MT_Vector3& impulse);
- virtual void SetObject (SG_IObject* object);
-
- virtual void RelativeTranslate(const MT_Vector3& dloc,bool local);
- virtual void RelativeRotate(const MT_Matrix3x3& drot,bool local);
- virtual void ApplyTorque(const MT_Vector3& torque,bool local);
- virtual void ApplyForce(const MT_Vector3& force,bool local);
- virtual MT_Vector3 GetLinearVelocity();
- virtual MT_Vector3 GetVelocity(const MT_Point3& pos);
- virtual void SetAngularVelocity(const MT_Vector3& ang_vel,bool local);
- virtual void SetLinearVelocity(const MT_Vector3& lin_vel,bool local);
- virtual void resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ);
- virtual void getOrientation(MT_Quaternion& orn);
- virtual void setOrientation(const MT_Matrix3x3& orn);
- virtual void setPosition(const MT_Point3& pos);
- virtual void setScaling(const MT_Vector3& scaling);
- virtual void SetTransform() {}
- virtual MT_Scalar GetMass();
- virtual MT_Vector3 getReactionForce();
- virtual void setRigidBody(bool rigid);
- virtual void AddCompoundChild(KX_IPhysicsController* child) { }
- virtual void RemoveCompoundChild(KX_IPhysicsController* child) { }
-
- virtual void SuspendDynamics(bool);
- virtual void RestoreDynamics();
- virtual MT_Scalar GetRadius();
-
- virtual SG_Controller* GetReplica(class SG_Node* destnode);
-
- virtual float GetLinVelocityMin() { return ODEPhysicsController::GetLinVelocityMin(); }
- virtual void SetLinVelocityMin(float val) { ODEPhysicsController::SetLinVelocityMin(val); }
- virtual float GetLinVelocityMax() { return ODEPhysicsController::GetLinVelocityMax(); }
- virtual void SetLinVelocityMax(float val) { ODEPhysicsController::SetLinVelocityMax(val); }
-
- virtual void SetSumoTransform(bool nondynaonly);
- // todo: remove next line !
- virtual void SetSimulatedTime(double time);
-
- // call from scene graph to update
- virtual bool Update(double time);
-
- void
- SetOption(
- int option,
- int value
- ){
- // intentionally empty
- };
-
-};
-
-#endif //__KX_ODEPHYSICSCONTROLLER_H
-
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp
index cd2ed456c48..befa2aaff56 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp
@@ -50,9 +50,8 @@ KX_ParentActuator::KX_ParentActuator(SCA_IObject *gameobj,
int mode,
bool addToCompound,
bool ghost,
- SCA_IObject *ob,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T),
+ SCA_IObject *ob)
+ : SCA_IActuator(gameobj),
m_mode(mode),
m_addToCompound(addToCompound),
m_ghost(ghost),
@@ -157,19 +156,15 @@ PyTypeObject KX_ParentActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_ParentActuator::Parents[] = {
- &KX_ParentActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_ParentActuator::Methods[] = {
@@ -217,18 +212,6 @@ int KX_ParentActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUTE
}
-PyObject* KX_ParentActuator::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_ParentActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_ParentActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
-
/* Deprecated -----> */
/* 1. setObject */
const char KX_ParentActuator::SetObject_doc[] =
@@ -273,7 +256,7 @@ PyObject* KX_ParentActuator::PyGetObject(PyObject* args)
Py_RETURN_NONE;
if (ret_name_only)
- return PyString_FromString(m_ob->GetName().ReadPtr());
+ return PyUnicode_FromString(m_ob->GetName().ReadPtr());
else
return m_ob->GetProxy();
}
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h
index 148375e994c..aeb39eabf89 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.h
+++ b/source/gameengine/Ketsji/KX_ParentActuator.h
@@ -68,8 +68,7 @@ class KX_ParentActuator : public SCA_IActuator
int mode,
bool addToCompound,
bool ghost,
- SCA_IObject *ob,
- PyTypeObject* T=&Type);
+ SCA_IObject *ob);
virtual ~KX_ParentActuator();
virtual bool Update();
@@ -82,10 +81,6 @@ class KX_ParentActuator : public SCA_IActuator
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
/* 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);
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
index c968e50957e..7bce311f1b6 100644
--- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
@@ -39,8 +39,8 @@
KX_PhysicsObjectWrapper::KX_PhysicsObjectWrapper(
PHY_IPhysicsController* ctrl,
- PHY_IPhysicsEnvironment* physenv,PyTypeObject *T) :
- PyObjectPlus(T),
+ PHY_IPhysicsEnvironment* physenv) :
+ PyObjectPlus(),
m_ctrl(ctrl),
m_physenv(physenv)
{
@@ -129,46 +129,17 @@ PyTypeObject KX_PhysicsObjectWrapper::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_PhysicsObjectWrapper::Parents[] = {
- &KX_PhysicsObjectWrapper::Type,
- NULL
-};
-
-PyObject* KX_PhysicsObjectWrapper::py_getattro(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* KX_PhysicsObjectWrapper::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-int KX_PhysicsObjectWrapper::py_setattro(PyObject *attr,PyObject *pyobj)
-{
- int result = 1;
-
- if (PyInt_Check(pyobj))
- {
- result = 0;
- }
- if (PyString_Check(pyobj))
- {
- result = 0;
- }
- if (result)
- result = PyObjectPlus::py_setattro(attr,pyobj);
-
- return result;
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
PyMethodDef KX_PhysicsObjectWrapper::Methods[] = {
{"setPosition",(PyCFunction) KX_PhysicsObjectWrapper::sPySetPosition, METH_VARARGS},
{"setLinearVelocity",(PyCFunction) KX_PhysicsObjectWrapper::sPySetLinearVelocity, METH_VARARGS},
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
index 1b59686babc..fa6fd1d1f2a 100644
--- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
+++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
@@ -35,12 +35,8 @@
class KX_PhysicsObjectWrapper : public PyObjectPlus
{
Py_Header;
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
public:
- KX_PhysicsObjectWrapper(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
+ KX_PhysicsObjectWrapper(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsEnvironment* physenv);
virtual ~KX_PhysicsObjectWrapper();
KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetPosition);
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp
index b56b5500c39..a1571b17756 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.cpp
+++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp
@@ -55,18 +55,15 @@ PyTypeObject KX_PolyProxy::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_PolyProxy::Parents[] = {
- &KX_PolyProxy::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- &PyObjectPlus::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_PolyProxy::Methods[] = {
@@ -98,16 +95,17 @@ PyAttributeDef KX_PolyProxy::Attributes[] = {
{ NULL } //Sentinel
};
+#if 0
PyObject* KX_PolyProxy::py_getattro(PyObject *attr)
{
- char *attr_str= PyString_AsString(attr);
+ char *attr_str= _PyUnicode_AsString(attr);
if (!strcmp(attr_str, "matname"))
{
- return PyString_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetMaterialName());
+ return PyUnicode_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetMaterialName());
}
if (!strcmp(attr_str, "texture"))
{
- return PyString_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetTextureName());
+ return PyUnicode_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetTextureName());
}
if (!strcmp(attr_str, "material"))
{
@@ -136,38 +134,35 @@ PyObject* KX_PolyProxy::py_getattro(PyObject *attr)
// found it
break;
}
- return PyInt_FromLong(matid);
+ return PyLong_FromSsize_t(matid);
}
if (!strcmp(attr_str, "v1"))
{
- return PyInt_FromLong(m_polygon->GetVertexOffset(0));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(0));
}
if (!strcmp(attr_str, "v2"))
{
- return PyInt_FromLong(m_polygon->GetVertexOffset(1));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(1));
}
if (!strcmp(attr_str, "v3"))
{
- return PyInt_FromLong(m_polygon->GetVertexOffset(2));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(2));
}
if (!strcmp(attr_str, "v4"))
{
- return PyInt_FromLong(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffset(3):0));
+ return PyLong_FromSsize_t(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffset(3):0));
}
if (!strcmp(attr_str, "visible"))
{
- return PyInt_FromLong(m_polygon->IsVisible());
+ return PyLong_FromSsize_t(m_polygon->IsVisible());
}
if (!strcmp(attr_str, "collide"))
{
- return PyInt_FromLong(m_polygon->IsCollider());
+ return PyLong_FromSsize_t(m_polygon->IsCollider());
}
- py_getattro_up(CValue);
-}
-
-PyObject* KX_PolyProxy::py_getattro_dict() {
- py_getattro_dict_up(CValue);
+ // py_getattro_up(CValue); // XXX -- todo, make all these attributes
}
+#endif
KX_PolyProxy::KX_PolyProxy(const RAS_MeshObject*mesh, RAS_Polygon* polygon)
: m_polygon(polygon),
@@ -204,37 +199,37 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getMaterialIndex,
// found it
break;
}
- return PyInt_FromLong(matid);
+ return PyLong_FromSsize_t(matid);
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getNumVertex,
"getNumVertex() : returns the number of vertex of the polygon, 3 or 4\n")
{
- return PyInt_FromLong(m_polygon->VertexCount());
+ return PyLong_FromSsize_t(m_polygon->VertexCount());
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, isVisible,
"isVisible() : returns whether the polygon is visible or not\n")
{
- return PyInt_FromLong(m_polygon->IsVisible());
+ return PyLong_FromSsize_t(m_polygon->IsVisible());
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, isCollider,
"isCollider() : returns whether the polygon is receives collision or not\n")
{
- return PyInt_FromLong(m_polygon->IsCollider());
+ return PyLong_FromSsize_t(m_polygon->IsCollider());
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getMaterialName,
"getMaterialName() : returns the polygon material name, \"NoMaterial\" if no material\n")
{
- return PyString_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetMaterialName());
+ return PyUnicode_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetMaterialName());
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getTextureName,
"getTexturelName() : returns the polygon texture name, \"NULL\" if no texture\n")
{
- return PyString_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetTextureName());
+ return PyUnicode_FromString(m_polygon->GetMaterial()->GetPolyMaterial()->GetTextureName());
}
KX_PYMETHODDEF_DOC(KX_PolyProxy, getVertexIndex,
@@ -255,9 +250,9 @@ KX_PYMETHODDEF_DOC(KX_PolyProxy, getVertexIndex,
}
if (index < m_polygon->VertexCount())
{
- return PyInt_FromLong(m_polygon->GetVertexOffset(index));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(index));
}
- return PyInt_FromLong(0);
+ return PyLong_FromSsize_t(0);
}
KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getMesh,
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.h b/source/gameengine/Ketsji/KX_PolyProxy.h
index d8fd36fec6c..e619617d312 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.h
+++ b/source/gameengine/Ketsji/KX_PolyProxy.h
@@ -52,8 +52,6 @@ public:
// stuff for python integration
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
KX_PYMETHOD_DOC_NOARGS(KX_PolyProxy,getMaterialIndex)
KX_PYMETHOD_DOC_NOARGS(KX_PolyProxy,getNumVertex)
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index 506c167a905..9bc84127572 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -51,8 +51,8 @@
#include "KX_PyMath.h"
-KX_PolygonMaterial::KX_PolygonMaterial(PyTypeObject *T)
- : PyObjectPlus(T),
+KX_PolygonMaterial::KX_PolygonMaterial()
+ : PyObjectPlus(),
RAS_IPolyMaterial(),
m_tface(NULL),
@@ -115,7 +115,7 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI
PyObject *ret = PyObject_CallMethod(m_pymaterial, "activate", "(NNO)", pyRasty, pyCachingInfo, (PyObject*) this->m_proxy);
if (ret)
{
- bool value = PyInt_AsLong(ret);
+ bool value = PyLong_AsSsize_t(ret);
Py_DECREF(ret);
dopass = value;
}
@@ -255,33 +255,17 @@ PyTypeObject KX_PolygonMaterial::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_PolygonMaterial::Parents[] = {
- &KX_PolygonMaterial::Type,
- &PyObjectPlus::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-PyObject* KX_PolygonMaterial::py_getattro(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* KX_PolygonMaterial::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-int KX_PolygonMaterial::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(PyObjectPlus);
-}
-
KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setCustomMaterial, "setCustomMaterial(material)")
{
PyObject *material;
@@ -347,13 +331,13 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, activate, "activate(rasty, cachingInfo)")
PyObject* KX_PolygonMaterial::pyattr_get_texture(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_PolygonMaterial* self= static_cast<KX_PolygonMaterial*>(self_v);
- return PyString_FromString(self->m_texturename.ReadPtr());
+ return PyUnicode_FromString(self->m_texturename.ReadPtr());
}
PyObject* KX_PolygonMaterial::pyattr_get_material(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_PolygonMaterial* self= static_cast<KX_PolygonMaterial*>(self_v);
- return PyString_FromString(self->m_materialname.ReadPtr());
+ return PyUnicode_FromString(self->m_materialname.ReadPtr());
}
/* this does not seem useful */
@@ -370,7 +354,7 @@ PyObject* KX_PolygonMaterial::pyattr_get_gl_texture(void *self_v, const KX_PYATT
if (self->m_tface && self->m_tface->tpage)
bindcode= self->m_tface->tpage->bindcode;
- return PyInt_FromLong(bindcode);
+ return PyLong_FromSsize_t(bindcode);
}
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.h b/source/gameengine/Ketsji/KX_PolygonMaterial.h
index 89ecb026da9..266b4d7e789 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.h
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.h
@@ -57,7 +57,7 @@ private:
mutable int m_pass;
public:
- KX_PolygonMaterial(PyTypeObject *T = &Type);
+ KX_PolygonMaterial();
void Initialize(const STR_String &texname,
Material* ma,
int materialindex,
@@ -116,10 +116,7 @@ public:
KX_PYMETHOD_DOC(KX_PolygonMaterial, setCustomMaterial);
KX_PYMETHOD_DOC(KX_PolygonMaterial, loadProgram);
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
- virtual PyObject* py_repr(void) { return PyString_FromString(m_material ? ((ID *)m_material)->name+2 : ""); }
+ virtual PyObject* py_repr(void) { return PyUnicode_FromString(m_material ? ((ID *)m_material)->name+2 : ""); }
static PyObject* pyattr_get_texture(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_material(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
index a098d99864f..94e8d1fd583 100644
--- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
+++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
@@ -630,6 +630,7 @@ PyObject* initPythonConstraintBinding()
#if (PY_VERSION_HEX >= 0x03000000)
m = PyModule_Create(&PhysicsConstraints_module_def);
+ PyDict_SetItemString(PySys_GetObject("modules"), PhysicsConstraints_module_def.m_name, m);
#else
m = Py_InitModule4("PhysicsConstraints", physicsconstraints_methods,
PhysicsConstraints_module_documentation,
@@ -639,7 +640,7 @@ PyObject* initPythonConstraintBinding()
// Add some symbolic constants to the module
d = PyModule_GetDict(m);
- ErrorObject = PyString_FromString("PhysicsConstraints.error");
+ ErrorObject = PyUnicode_FromString("PhysicsConstraints.error");
PyDict_SetItemString(d, "error", ErrorObject);
Py_DECREF(ErrorObject);
diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp
index 051d7ae7dba..6d33c38190c 100644
--- a/source/gameengine/Ketsji/KX_PyMath.cpp
+++ b/source/gameengine/Ketsji/KX_PyMath.cpp
@@ -46,35 +46,6 @@
#include "KX_Python.h"
#include "KX_PyMath.h"
-bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank)
-{
- if (!pymat)
- return false;
-
- unsigned int y;
- if (PySequence_Check(pymat))
- {
- unsigned int rows = PySequence_Size(pymat);
- if (rows != rank)
- return false;
-
- bool ismatrix = true;
- for (y = 0; y < rank && ismatrix; y++)
- {
- PyObject *pyrow = PySequence_GetItem(pymat, y); /* new ref */
- if (PySequence_Check(pyrow))
- {
- if (((unsigned int)PySequence_Size(pyrow)) != rank)
- ismatrix = false;
- } else
- ismatrix = false;
- Py_DECREF(pyrow);
- }
- return ismatrix;
- }
- return false;
-}
-
bool PyOrientationTo(PyObject* pyval, MT_Matrix3x3 &rot, const char *error_prefix)
{
int size= PySequence_Size(pyval);
@@ -82,7 +53,7 @@ bool PyOrientationTo(PyObject* pyval, MT_Matrix3x3 &rot, const char *error_prefi
if (size == 4)
{
MT_Quaternion qrot;
- if (PyVecTo(pyval, qrot))
+ if (PyQuatTo(pyval, qrot))
{
rot.setRotation(qrot);
return true;
@@ -108,14 +79,27 @@ bool PyOrientationTo(PyObject* pyval, MT_Matrix3x3 &rot, const char *error_prefi
return false;
}
+bool PyQuatTo(PyObject* pyval, MT_Quaternion &qrot)
+{
+ if(!PyVecTo(pyval, qrot))
+ return false;
+
+ /* annoying!, Blender/Mathutils have the W axis first! */
+ MT_Scalar w= qrot[0]; /* from python, this is actually the W */
+ qrot[0]= qrot[1];
+ qrot[1]= qrot[2];
+ qrot[2]= qrot[3];
+ qrot[3]= w;
+
+ return true;
+}
+
PyObject* PyObjectFrom(const MT_Matrix4x4 &mat)
{
-#if 0
- return Py_BuildValue("[[ffff][ffff][ffff][ffff]]",
- mat[0][0], mat[0][1], mat[0][2], mat[0][3],
- mat[1][0], mat[1][1], mat[1][2], mat[1][3],
- mat[2][0], mat[2][1], mat[2][2], mat[2][3],
- mat[3][0], mat[3][1], mat[3][2], mat[3][3]);
+#ifdef USE_MATHUTILS
+ float fmat[16];
+ mat.getValue(fmat);
+ return newMatrixObject(fmat, 4, 4, Py_NEW, NULL);
#else
PyObject *list = PyList_New(4);
PyObject *sublist;
@@ -136,11 +120,10 @@ PyObject* PyObjectFrom(const MT_Matrix4x4 &mat)
PyObject* PyObjectFrom(const MT_Matrix3x3 &mat)
{
-#if 0
- return Py_BuildValue("[[fff][fff][fff]]",
- mat[0][0], mat[0][1], mat[0][2],
- mat[1][0], mat[1][1], mat[1][2],
- mat[2][0], mat[2][1], mat[2][2]);
+#ifdef USE_MATHUTILS
+ float fmat[9];
+ mat.getValue3x3(fmat);
+ return newMatrixObject(fmat, 3, 3, Py_NEW, NULL);
#else
PyObject *list = PyList_New(3);
PyObject *sublist;
@@ -158,11 +141,20 @@ PyObject* PyObjectFrom(const MT_Matrix3x3 &mat)
#endif
}
+#ifdef USE_MATHUTILS
+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_WRAP, NULL);
+}
+#endif
+
PyObject* PyObjectFrom(const MT_Tuple4 &vec)
{
-#if 0
- return Py_BuildValue("[ffff]",
- vec[0], vec[1], vec[2], vec[3]);
+#ifdef USE_MATHUTILS
+ float fvec[4]= {vec[0], vec[1], vec[2], vec[3]};
+ return newVectorObject(fvec, 4, Py_WRAP, NULL);
#else
PyObject *list = PyList_New(4);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
@@ -175,9 +167,9 @@ PyObject* PyObjectFrom(const MT_Tuple4 &vec)
PyObject* PyObjectFrom(const MT_Tuple3 &vec)
{
-#if 0
- return Py_BuildValue("[fff]",
- vec[0], vec[1], vec[2]);
+#ifdef USE_MATHUTILS
+ float fvec[3]= {vec[0], vec[1], vec[2]};
+ return newVectorObject(fvec, 3, Py_WRAP, NULL);
#else
PyObject *list = PyList_New(3);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
@@ -189,9 +181,9 @@ PyObject* PyObjectFrom(const MT_Tuple3 &vec)
PyObject* PyObjectFrom(const MT_Tuple2 &vec)
{
-#if 0
- return Py_BuildValue("[ff]",
- vec[0], vec[1]);
+#ifdef USE_MATHUTILS
+ float fvec[2]= {vec[0], vec[1]};
+ 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 a7ce4bc6930..9ee11c9e745 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -42,6 +42,12 @@
#include "KX_Python.h"
#include "PyObjectPlus.h"
+#ifdef USE_MATHUTILS
+extern "C" {
+#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */
+}
+#endif
+
inline unsigned int Size(const MT_Matrix4x4&) { return 4; }
inline unsigned int Size(const MT_Matrix3x3&) { return 3; }
inline unsigned int Size(const MT_Tuple2&) { return 2; }
@@ -98,7 +104,38 @@ bool PyMatTo(PyObject* pymat, T& mat)
template<class T>
bool PyVecTo(PyObject* pyval, T& vec)
{
-
+#ifdef USE_MATHUTILS
+ /* no need for BaseMath_ReadCallback() here, reading the sequences will do this */
+
+ if(VectorObject_Check(pyval)) {
+ VectorObject *pyvec= (VectorObject *)pyval;
+ if (pyvec->size != Size(vec)) {
+ PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", pyvec->size, Size(vec));
+ return false;
+ }
+ vec.getValue((float *) pyvec->vec);
+ return true;
+ }
+ else if(QuaternionObject_Check(pyval)) {
+ QuaternionObject *pyquat= (QuaternionObject *)pyval;
+ 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.getValue((float *) pyquat->quat);
+ return true;
+ }
+ else if(EulerObject_Check(pyval)) {
+ EulerObject *pyeul= (EulerObject *)pyval;
+ if (3 != Size(vec)) {
+ PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 3, Size(vec));
+ return false;
+ }
+ vec.getValue((float *) pyeul->eul);
+ return true;
+ } else
+#endif
if(PyTuple_Check(pyval))
{
unsigned int numitems = PyTuple_GET_SIZE(pyval);
@@ -117,7 +154,7 @@ bool PyVecTo(PyObject* pyval, T& vec)
return true;
}
- else if (BGE_PROXY_CHECK_TYPE(pyval))
+ else if (PyObject_TypeCheck(pyval, &PyObjectPlus::Type))
{ /* note, include this check because PySequence_Check does too much introspection
* on the PyObject (like getting its __class__, on a BGE type this means searching up
* the parent list each time only to discover its not a sequence.
@@ -159,6 +196,9 @@ bool PyVecTo(PyObject* pyval, T& vec)
return false;
}
+
+bool PyQuatTo(PyObject* pyval, MT_Quaternion &qrot);
+
bool PyOrientationTo(PyObject* pyval, MT_Matrix3x3 &mat, const char *error_prefix);
/**
@@ -181,15 +221,16 @@ PyObject* PyObjectFrom(const MT_Tuple2 &vec);
*/
PyObject* PyObjectFrom(const MT_Tuple3 &vec);
+#ifdef USE_MATHUTILS
/**
- * Converts an MT_Tuple4 to a python object.
+ * Converts an MT_Quaternion to a python object.
*/
-PyObject* PyObjectFrom(const MT_Tuple4 &pos);
+PyObject* PyObjectFrom(const MT_Quaternion &qrot);
+#endif
/**
- * True if the given PyObject can be converted to an MT_Matrix
- * @param rank = 3 (for MT_Matrix3x3) or 4 (for MT_Matrix4x4)
+ * Converts an MT_Tuple4 to a python object.
*/
-bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank);
+PyObject* PyObjectFrom(const MT_Tuple4 &pos);
#endif
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index fc3e48f504c..ac49b49c130 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -42,6 +42,13 @@
#pragma warning (disable : 4786)
#endif //WIN32
+extern "C" {
+ #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
+ #include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
+ #include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use.
+ #include "BGL.h"
+}
+
#include "KX_PythonInit.h"
//python physics binding
#include "KX_PyConstraintBinding.h"
@@ -70,6 +77,7 @@
#include "MT_Vector3.h"
#include "MT_Point3.h"
#include "ListValue.h"
+#include "InputParser.h"
#include "KX_Scene.h"
#include "SND_DeviceManager.h"
@@ -81,23 +89,11 @@
#include "PyObjectPlus.h"
-//XXX
-#if 0
-
#include "KX_PythonInitTypes.h"
/* we only need this to get a list of libraries from the main struct */
#include "DNA_ID.h"
-extern "C" {
- #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
-#if PY_VERSION_HEX < 0x03000000
- #include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
- #include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use.
- #include "BGL.h"
-#endif
-}
-#endif
#include "marshal.h" /* python header for loading/saving dicts */
@@ -134,10 +130,10 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons
}
/* Macro for building the keyboard translation */
-//#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, PyInt_FromLong(SCA_IInputDevice::KX_##name))
-#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, item=PyInt_FromLong(name)); Py_DECREF(item)
+//#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, PyLong_FromSsize_t(SCA_IInputDevice::KX_##name))
+#define KX_MACRO_addToDict(dict, name) PyDict_SetItemString(dict, #name, item=PyLong_FromSsize_t(name)); Py_DECREF(item)
/* For the defines for types from logic bricks, we do stuff explicitly... */
-#define KX_MACRO_addTypesToDict(dict, name, name2) PyDict_SetItemString(dict, #name, item=PyInt_FromLong(name2)); Py_DECREF(item)
+#define KX_MACRO_addTypesToDict(dict, name, name2) PyDict_SetItemString(dict, #name, item=PyLong_FromSsize_t(name2)); Py_DECREF(item)
// temporarily python stuff, will be put in another place later !
@@ -185,7 +181,7 @@ static PyObject* gPyExpandPath(PyObject*, PyObject* args)
BLI_strncpy(expanded, filename, FILE_MAXDIR + FILE_MAXFILE);
BLI_convertstringcode(expanded, gp_GamePythonPath);
- return PyString_FromString(expanded);
+ return PyUnicode_FromString(expanded);
}
static char gPySendMessage_doc[] =
@@ -310,7 +306,7 @@ static PyObject* gPySetMaxLogicFrame(PyObject*, PyObject* args)
static PyObject* gPyGetMaxLogicFrame(PyObject*)
{
- return PyInt_FromLong(KX_KetsjiEngine::GetMaxLogicFrame());
+ return PyLong_FromSsize_t(KX_KetsjiEngine::GetMaxLogicFrame());
}
static PyObject* gPySetMaxPhysicsFrame(PyObject*, PyObject* args)
@@ -325,7 +321,7 @@ static PyObject* gPySetMaxPhysicsFrame(PyObject*, PyObject* args)
static PyObject* gPyGetMaxPhysicsFrame(PyObject*)
{
- return PyInt_FromLong(KX_KetsjiEngine::GetMaxPhysicsFrame());
+ return PyLong_FromSsize_t(KX_KetsjiEngine::GetMaxPhysicsFrame());
}
static PyObject* gPySetPhysicsTicRate(PyObject*, PyObject* args)
@@ -390,7 +386,7 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
while ((dirp = readdir(dp)) != NULL) {
if (BLI_testextensie(dirp->d_name, ".blend")) {
- value = PyString_FromString(dirp->d_name);
+ value = PyUnicode_FromString(dirp->d_name);
PyList_Append(list, value);
Py_DECREF(value);
}
@@ -502,6 +498,32 @@ 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, (PY_METHODCHAR)gPyExpandPath_doc},
{"sendMessage", (PyCFunction)gPySendMessage, METH_VARARGS, (PY_METHODCHAR)gPySendMessage_doc},
@@ -530,19 +552,20 @@ static struct PyMethodDef game_methods[] = {
{"getAverageFrameRate", (PyCFunction) gPyGetAverageFrameRate, METH_NOARGS, (PY_METHODCHAR)"Gets the estimated average frame rate"},
{"getBlendFileList", (PyCFunction)gPyGetBlendFileList, METH_VARARGS, (PY_METHODCHAR)"Gets a list of blend files in the same directory as the current blend file"},
{"PrintGLInfo", (PyCFunction)pyPrintExt, METH_NOARGS, (PY_METHODCHAR)"Prints GL Extension Info"},
+ {"EvalExpression", (PyCFunction)gEvalExpression, METH_O, (PY_METHODCHAR)"Evaluate a string as a game logic expression"},
{NULL, (PyCFunction) NULL, 0, NULL }
};
static PyObject* gPyGetWindowHeight(PyObject*, PyObject* args)
{
- return PyInt_FromLong((gp_Canvas ? gp_Canvas->GetHeight() : 0));
+ return PyLong_FromSsize_t((gp_Canvas ? gp_Canvas->GetHeight() : 0));
}
static PyObject* gPyGetWindowWidth(PyObject*, PyObject* args)
{
- return PyInt_FromLong((gp_Canvas ? gp_Canvas->GetWidth() : 0));
+ return PyLong_FromSsize_t((gp_Canvas ? gp_Canvas->GetWidth() : 0));
}
@@ -870,7 +893,7 @@ static PyObject* gPyGetGLSLMaterialSetting(PyObject*,
}
enabled = ((G.fileflags & flag) != 0);
- return PyInt_FromLong(enabled);
+ return PyLong_FromSsize_t(enabled);
}
#define KX_TEXFACE_MATERIAL 0
@@ -914,7 +937,7 @@ static PyObject* gPyGetMaterialType(PyObject*)
else
flag = KX_TEXFACE_MATERIAL;
- return PyInt_FromLong(flag);
+ return PyLong_FromSsize_t(flag);
}
static PyObject* gPyDrawLine(PyObject*, PyObject* args)
@@ -1036,6 +1059,7 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
// Create the module and add the functions
#if (PY_VERSION_HEX >= 0x03000000)
m = PyModule_Create(&GameLogic_module_def);
+ PyDict_SetItemString(PySys_GetObject("modules"), GameLogic_module_def.m_name, m);
#else
m = Py_InitModule4("GameLogic", game_methods,
GameLogic_module_documentation,
@@ -1051,7 +1075,7 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
PyDict_SetItemString(d, "globalDict", item=PyDict_New()); Py_DECREF(item);
- ErrorObject = PyString_FromString("GameLogic.error");
+ ErrorObject = PyUnicode_FromString("GameLogic.error");
PyDict_SetItemString(d, "error", ErrorObject);
Py_DECREF(ErrorObject);
@@ -1338,7 +1362,7 @@ PyObject *KXpy_import(PyObject *self, PyObject *args)
/* check for builtin modules */
m = PyImport_AddModule("sys");
l = PyObject_GetAttrString(m, "builtin_module_names");
- n = PyString_FromString(name);
+ n = PyUnicode_FromString(name);
if (PySequence_Contains(l, n)) {
return PyImport_ImportModuleEx(name, globals, locals, fromlist);
@@ -1352,10 +1376,9 @@ PyObject *KXpy_import(PyObject *self, PyObject *args)
}
/* Import blender texts as python modules */
- /* XXX 2.5
- * m= bpy_text_import(name, &found);
+ m= bpy_text_import(name, &found);
if (m)
- return m; */
+ return m;
if(found==0) /* if its found but could not import then it has its own error */
PyErr_Format(PyExc_ImportError, "Import of external Module %.20s not allowed.", name);
@@ -1379,9 +1402,9 @@ PyObject *KXpy_reload(PyObject *self, PyObject *args) {
if( !PyArg_ParseTuple( args, "O:bpy_reload_meth", &module ) )
return NULL;
- /* XXX 2.5 newmodule= bpy_text_reimport( module, &found );
+ newmodule= bpy_text_reimport( module, &found );
if (newmodule)
- return newmodule; */
+ return newmodule;
if (found==0) /* if its found but could not import then it has its own error */
PyErr_SetString(PyExc_ImportError, "reload(module): failed to reload from blenders internal text");
@@ -1462,8 +1485,8 @@ void setSandbox(TPythonSecurityLevel level)
*/
default:
/* Allow importing internal text, from bpy_internal_import.py */
- /* XXX 2.5 PyDict_SetItemString(d, "reload", item=PyCFunction_New(bpy_reload_meth, NULL)); Py_DECREF(item); */
- /* XXX 2.5 PyDict_SetItemString(d, "__import__", item=PyCFunction_New(bpy_import_meth, NULL)); Py_DECREF(item); */
+ PyDict_SetItemString(d, "reload", item=PyCFunction_New(bpy_reload_meth, NULL)); Py_DECREF(item);
+ PyDict_SetItemString(d, "__import__", item=PyCFunction_New(bpy_import_meth, NULL)); Py_DECREF(item);
break;
}
}
@@ -1515,7 +1538,7 @@ static void initPySysObjects__append(PyObject *sys_path, char *filename)
BLI_split_dirfile_basic(filename, expanded, NULL); /* get the dir part of filename only */
BLI_convertstringcode(expanded, gp_GamePythonPath); /* filename from lib->filename is (always?) absolute, so this may not be needed but it wont hurt */
BLI_cleanup_file(gp_GamePythonPath, expanded); /* Dont use BLI_cleanup_dir because it adds a slash - BREAKS WIN32 ONLY */
- item= PyString_FromString(expanded);
+ item= PyUnicode_FromString(expanded);
// printf("SysPath - '%s', '%s', '%s'\n", expanded, filename, gp_GamePythonPath);
@@ -1599,16 +1622,26 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
Py_FrozenFlag=1;
Py_Initialize();
+ if(argv && first_time) { /* browser plugins dont currently set this */
#if (PY_VERSION_HEX < 0x03000000)
- if(argv && first_time) /* browser plugins dont currently set this */
PySys_SetArgv(argc, argv);
+#else
+ int i;
+ PyObject *py_argv= PyList_New(argc);
+
+ for (i=0; i<argc; i++)
+ PyList_SET_ITEM(py_argv, i, PyUnicode_FromString(argv[i]));
+
+ PySys_SetObject("argv", py_argv);
+ Py_DECREF(py_argv);
#endif
+ }
//importBlenderModules()
setSandbox(level);
- /* XXX 2.5 initPyTypes(); */
+ initPyTypes();
- /* XXX 2.5 bpy_import_main_set(maggie); */
+ bpy_import_main_set(maggie);
initPySysObjects(maggie);
@@ -1626,7 +1659,7 @@ void exitGamePlayerPythonScripting()
restorePySysObjects(); /* get back the original sys.path and clear the backup */
Py_Finalize();
- /* XXX 2.5 bpy_import_main_set(NULL); */
+ bpy_import_main_set(NULL);
PyObjectPlus::ClearDeprecationWarning();
}
@@ -1645,9 +1678,9 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
Py_FrozenFlag=1;
setSandbox(level);
- /* XXX 2.5 initPyTypes(); */
+ initPyTypes();
- /* XXX 2.5 bpy_import_main_set(maggie); */
+ bpy_import_main_set(maggie);
initPySysObjects(maggie);
@@ -1660,7 +1693,7 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
void exitGamePythonScripting()
{
restorePySysObjects(); /* get back the original sys.path and clear the backup */
- /* XXX 2.5 bpy_import_main_set(NULL); */
+ bpy_import_main_set(NULL);
PyObjectPlus::ClearDeprecationWarning();
}
@@ -1702,6 +1735,7 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas)
// Create the module and add the functions
#if (PY_VERSION_HEX >= 0x03000000)
m = PyModule_Create(&Rasterizer_module_def);
+ PyDict_SetItemString(PySys_GetObject("modules"), Rasterizer_module_def.m_name, m);
#else
m = Py_InitModule4("Rasterizer", rasterizer_methods,
Rasterizer_module_documentation,
@@ -1711,7 +1745,7 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas)
// Add some symbolic constants to the module
d = PyModule_GetDict(m);
- ErrorObject = PyString_FromString("Rasterizer.error");
+ ErrorObject = PyUnicode_FromString("Rasterizer.error");
PyDict_SetItemString(d, "error", ErrorObject);
Py_DECREF(ErrorObject);
@@ -1789,10 +1823,10 @@ static PyObject* gPyEventToCharacter(PyObject*, PyObject* args)
if(IsPrintable(event)) {
char ch[2] = {'\0', '\0'};
ch[0] = ToCharacter(event, (bool)shift);
- return PyString_FromString(ch);
+ return PyUnicode_FromString(ch);
}
else {
- return PyString_FromString("");
+ return PyUnicode_FromString("");
}
}
@@ -1836,6 +1870,7 @@ PyObject* initGameKeys()
// Create the module and add the functions
#if (PY_VERSION_HEX >= 0x03000000)
m = PyModule_Create(&GameKeys_module_def);
+ PyDict_SetItemString(PySys_GetObject("modules"), GameKeys_module_def.m_name, m);
#else
m = Py_InitModule4("GameKeys", gamekeys_methods,
GameKeys_module_documentation,
@@ -1970,26 +2005,20 @@ PyObject* initGameKeys()
return d;
}
-#if PY_VERSION_HEX < 0x03000000
PyObject* initMathutils()
{
- return NULL; //XXX Mathutils_Init("Mathutils"); // Use as a top level module in BGE
+ return Mathutils_Init("Mathutils"); // Use as a top level module in BGE
}
PyObject* initGeometry()
{
- return NULL; // XXX Geometry_Init("Geometry"); // Use as a top level module in BGE
+ return Geometry_Init("Geometry"); // Use as a top level module in BGE
}
PyObject* initBGL()
{
- return NULL; // XXX 2.5 BGL_Init("BGL"); // Use as a top level module in BGE
+ return BGL_Init("BGL"); // Use as a top level module in BGE
}
-#else // TODO Py3k conversion
-PyObject* initMathutils() {Py_INCREF(Py_None);return Py_None;}
-PyObject* initGeometry() {Py_INCREF(Py_None);return Py_None;}
-PyObject* initBGL() {Py_INCREF(Py_None);return Py_None;}
-#endif
void KX_SetActiveScene(class KX_Scene* scene)
{
@@ -2022,11 +2051,17 @@ int saveGamePythonConfig( char **marshal_buffer)
if (pyGlobalDictMarshal) {
// for testing only
// PyObject_Print(pyGlobalDictMarshal, stderr, 0);
-
+ char *marshal_cstring;
+
+#if PY_VERSION_HEX < 0x03000000
+ marshal_cstring = _PyUnicode_AsString(pyGlobalDictMarshal);
marshal_length= PyString_Size(pyGlobalDictMarshal);
+#else // py3 uses byte arrays
+ marshal_cstring = PyBytes_AsString(pyGlobalDictMarshal);
+ marshal_length= PyBytes_Size(pyGlobalDictMarshal);
+#endif
*marshal_buffer = new char[marshal_length + 1];
- memcpy(*marshal_buffer, PyString_AsString(pyGlobalDictMarshal), marshal_length);
-
+ memcpy(*marshal_buffer, marshal_cstring, marshal_length);
Py_DECREF(pyGlobalDictMarshal);
} else {
printf("Error, GameLogic.globalDict could not be marshal'd\n");
@@ -2103,5 +2138,5 @@ void setGamePythonPath(char *path)
// engine but loading blend files within the BGE wont overwrite gp_GamePythonPathOrig
void resetGamePythonPath()
{
- gp_GamePythonPathOrig[0] == '\0';
+ gp_GamePythonPathOrig[0] = '\0';
}
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index 83c4dcbb34c..8ff0bfd5379 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -87,69 +87,54 @@
#include "SCA_RandomActuator.h"
#include "SCA_IController.h"
-
-void initPyObjectPlusType(PyTypeObject **parents)
+static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *attributes, int init_getset)
{
- int i;
-
- for (i=0; parents[i]; i++) {
- if(PyType_Ready(parents[i]) < 0) {
- /* This is very very unlikely */
- printf("Error, pytype could not initialize, Blender may crash \"%s\"\n", parents[i]->tp_name);
- return;
- }
+ PyAttributeDef *attr;
-#if 0
- PyObject_Print(reinterpret_cast<PyObject *>parents[i], stderr, 0);
- fprintf(stderr, "\n");
- PyObject_Print(parents[i]->tp_dict, stderr, 0);
- fprintf(stderr, "\n\n");
-#endif
+ if(init_getset) {
+ /* we need to do this for all types before calling PyType_Ready
+ * since they will call the parents PyType_Ready and those might not have initialized vars yet */
- }
+ //if(tp->tp_base==NULL)
+ // printf("Debug: No Parents - '%s'\n" , tp->tp_name);
- PyObject *dict= NULL;
+ if(tp->tp_getset==NULL && attributes->m_name) {
+ PyGetSetDef *attr_getset;
+ int attr_tot= 0;
- while(i) {
- i--;
+ for(attr= attributes; attr->m_name; attr++, attr_tot++) {};
- if (dict) {
- PyDict_Update(parents[i]->tp_dict, dict);
- }
- dict= parents[i]->tp_dict;
+ tp->tp_getset = attr_getset = reinterpret_cast<PyGetSetDef *>(PyMem_Malloc((attr_tot+1) * sizeof(PyGetSetDef))); // XXX - Todo, free
-#if 1
- PyObject_Print(reinterpret_cast<PyObject *>(parents[i]), stderr, 0);
- fprintf(stderr, "\n");
- PyObject_Print(parents[i]->tp_dict, stderr, 0);
- fprintf(stderr, "\n\n");
-#endif
- }
-}
+ for(attr= attributes; attr->m_name; attr++, attr_getset++) {
+ attr_getset->name= (char *)attr->m_name;
+ attr_getset->doc= NULL;
+ attr_getset->get= reinterpret_cast<getter>(PyObjectPlus::py_get_attrdef);
+ if(attr->m_access==KX_PYATTRIBUTE_RO)
+ attr_getset->set= NULL;
+ else
+ attr_getset->set= reinterpret_cast<setter>(PyObjectPlus::py_set_attrdef);
+ attr_getset->closure= reinterpret_cast<void *>(attr);
+ }
-static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *attributes)
-{
- PyAttributeDef *attr;
- PyObject *item;
-
- PyType_Ready(tp);
- PyDict_SetItemString(dict, tp->tp_name, reinterpret_cast<PyObject *>(tp));
+ memset(attr_getset, 0, sizeof(PyGetSetDef));
+ }
+ } else {
- /* store attr defs in the tp_dict for to avoid string lookups */
- for(attr= attributes; attr->m_name; attr++) {
- item= PyCObject_FromVoidPtr(attr, NULL);
- PyDict_SetItemString(tp->tp_dict, attr->m_name, item);
- Py_DECREF(item);
+ PyObject *item;
+
+ PyType_Ready(tp);
+ PyDict_SetItemString(dict, tp->tp_name, reinterpret_cast<PyObject *>(tp));
}
}
-#define PyType_Ready_Attr(d, n) PyType_Ready_ADD(d, &n::Type, n::Attributes)
+#define PyType_Ready_Attr(d, n, i) PyType_Ready_ADD(d, &n::Type, n::Attributes, i)
void initPyTypes(void)
{
@@ -165,72 +150,82 @@ void initPyTypes(void)
PyDict_SetItemString(PySys_GetObject((char *)"modules"), (char *)"GameTypes", mod);
Py_DECREF(mod);
- PyType_Ready_Attr(dict, BL_ActionActuator);
- PyType_Ready_Attr(dict, BL_Shader);
- PyType_Ready_Attr(dict, BL_ShapeActionActuator);
- PyType_Ready_Attr(dict, CListValue);
- PyType_Ready_Attr(dict, CValue);
- PyType_Ready_Attr(dict, KX_BlenderMaterial);
- PyType_Ready_Attr(dict, KX_CDActuator);
- PyType_Ready_Attr(dict, KX_Camera);
- PyType_Ready_Attr(dict, KX_CameraActuator);
- PyType_Ready_Attr(dict, KX_ConstraintActuator);
- PyType_Ready_Attr(dict, KX_ConstraintWrapper);
- PyType_Ready_Attr(dict, KX_GameActuator);
- PyType_Ready_Attr(dict, KX_GameObject);
- PyType_Ready_Attr(dict, KX_IpoActuator);
- PyType_Ready_Attr(dict, KX_LightObject);
- PyType_Ready_Attr(dict, KX_MeshProxy);
- PyType_Ready_Attr(dict, KX_MouseFocusSensor);
- PyType_Ready_Attr(dict, KX_NearSensor);
- PyType_Ready_Attr(dict, KX_NetworkMessageActuator);
- PyType_Ready_Attr(dict, KX_NetworkMessageSensor);
- PyType_Ready_Attr(dict, KX_ObjectActuator);
- PyType_Ready_Attr(dict, KX_ParentActuator);
- PyType_Ready_Attr(dict, KX_PhysicsObjectWrapper);
- PyType_Ready_Attr(dict, KX_PolyProxy);
- PyType_Ready_Attr(dict, KX_PolygonMaterial);
- PyType_Ready_Attr(dict, KX_RadarSensor);
- PyType_Ready_Attr(dict, KX_RaySensor);
- PyType_Ready_Attr(dict, KX_SCA_AddObjectActuator);
- PyType_Ready_Attr(dict, KX_SCA_DynamicActuator);
- PyType_Ready_Attr(dict, KX_SCA_EndObjectActuator);
- PyType_Ready_Attr(dict, KX_SCA_ReplaceMeshActuator);
- PyType_Ready_Attr(dict, KX_Scene);
- PyType_Ready_Attr(dict, KX_SceneActuator);
- PyType_Ready_Attr(dict, KX_SoundActuator);
- PyType_Ready_Attr(dict, KX_StateActuator);
- PyType_Ready_Attr(dict, KX_TouchSensor);
- PyType_Ready_Attr(dict, KX_TrackToActuator);
- PyType_Ready_Attr(dict, KX_VehicleWrapper);
- PyType_Ready_Attr(dict, KX_VertexProxy);
- PyType_Ready_Attr(dict, KX_VisibilityActuator);
- PyType_Ready_Attr(dict, PyObjectPlus);
- PyType_Ready_Attr(dict, SCA_2DFilterActuator);
- PyType_Ready_Attr(dict, SCA_ANDController);
- PyType_Ready_Attr(dict, SCA_ActuatorSensor);
- PyType_Ready_Attr(dict, SCA_AlwaysSensor);
- PyType_Ready_Attr(dict, SCA_DelaySensor);
- PyType_Ready_Attr(dict, SCA_ILogicBrick);
- PyType_Ready_Attr(dict, SCA_IObject);
- PyType_Ready_Attr(dict, SCA_ISensor);
- PyType_Ready_Attr(dict, SCA_JoystickSensor);
- PyType_Ready_Attr(dict, SCA_KeyboardSensor);
- PyType_Ready_Attr(dict, SCA_MouseSensor);
- PyType_Ready_Attr(dict, SCA_NANDController);
- PyType_Ready_Attr(dict, SCA_NORController);
- PyType_Ready_Attr(dict, SCA_ORController);
- PyType_Ready_Attr(dict, SCA_PropertyActuator);
- PyType_Ready_Attr(dict, SCA_PropertySensor);
- PyType_Ready_Attr(dict, SCA_PythonController);
- PyType_Ready_Attr(dict, SCA_RandomActuator);
- PyType_Ready_Attr(dict, SCA_RandomSensor);
- PyType_Ready_Attr(dict, SCA_XNORController);
- PyType_Ready_Attr(dict, SCA_XORController);
- PyType_Ready_Attr(dict, SCA_IController);
+ for(int init_getset= 1; init_getset > -1; init_getset--) { /* run twice, once to init the getsets another to run PyType_Ready */
+ PyType_Ready_Attr(dict, BL_ActionActuator, init_getset);
+ PyType_Ready_Attr(dict, BL_Shader, init_getset);
+ PyType_Ready_Attr(dict, BL_ShapeActionActuator, init_getset);
+ PyType_Ready_Attr(dict, CListValue, init_getset);
+ PyType_Ready_Attr(dict, CValue, init_getset);
+ PyType_Ready_Attr(dict, KX_BlenderMaterial, init_getset);
+ PyType_Ready_Attr(dict, KX_CDActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_Camera, init_getset);
+ PyType_Ready_Attr(dict, KX_CameraActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_ConstraintActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_ConstraintWrapper, init_getset);
+ PyType_Ready_Attr(dict, KX_GameActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_GameObject, init_getset);
+ PyType_Ready_Attr(dict, KX_IpoActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_LightObject, init_getset);
+ PyType_Ready_Attr(dict, KX_MeshProxy, init_getset);
+ PyType_Ready_Attr(dict, KX_MouseFocusSensor, init_getset);
+ PyType_Ready_Attr(dict, KX_NearSensor, init_getset);
+ PyType_Ready_Attr(dict, KX_NetworkMessageActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_NetworkMessageSensor, init_getset);
+ PyType_Ready_Attr(dict, KX_ObjectActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_ParentActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_PhysicsObjectWrapper, init_getset);
+ PyType_Ready_Attr(dict, KX_PolyProxy, init_getset);
+ PyType_Ready_Attr(dict, KX_PolygonMaterial, init_getset);
+ PyType_Ready_Attr(dict, KX_RadarSensor, init_getset);
+ PyType_Ready_Attr(dict, KX_RaySensor, init_getset);
+ PyType_Ready_Attr(dict, KX_SCA_AddObjectActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_SCA_DynamicActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_SCA_EndObjectActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_SCA_ReplaceMeshActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_Scene, init_getset);
+ PyType_Ready_Attr(dict, KX_SceneActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_SoundActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_StateActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_TouchSensor, init_getset);
+ PyType_Ready_Attr(dict, KX_TrackToActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_VehicleWrapper, init_getset);
+ PyType_Ready_Attr(dict, KX_VertexProxy, init_getset);
+ PyType_Ready_Attr(dict, KX_VisibilityActuator, init_getset);
+ PyType_Ready_Attr(dict, PyObjectPlus, init_getset);
+ PyType_Ready_Attr(dict, SCA_2DFilterActuator, init_getset);
+ PyType_Ready_Attr(dict, SCA_ANDController, init_getset);
+ PyType_Ready_Attr(dict, SCA_ActuatorSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_AlwaysSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_DelaySensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_ILogicBrick, init_getset);
+ PyType_Ready_Attr(dict, SCA_IObject, init_getset);
+ PyType_Ready_Attr(dict, SCA_ISensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_JoystickSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_KeyboardSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_MouseSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_NANDController, init_getset);
+ PyType_Ready_Attr(dict, SCA_NORController, init_getset);
+ PyType_Ready_Attr(dict, SCA_ORController, init_getset);
+ PyType_Ready_Attr(dict, SCA_PropertyActuator, init_getset);
+ PyType_Ready_Attr(dict, SCA_PropertySensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_PythonController, init_getset);
+ PyType_Ready_Attr(dict, SCA_RandomActuator, init_getset);
+ PyType_Ready_Attr(dict, SCA_RandomSensor, init_getset);
+ PyType_Ready_Attr(dict, SCA_XNORController, init_getset);
+ PyType_Ready_Attr(dict, SCA_XORController, init_getset);
+ PyType_Ready_Attr(dict, SCA_IController, init_getset);
+ }
+
+
/* Normal python type */
PyType_Ready(&KX_PythonSeq_Type);
+
+#ifdef USE_MATHUTILS
+ /* Init mathutils callbacks */
+ KX_GameObject_Mathutils_Callback_Init();
+ KX_ObjectActuator_Mathutils_Callback_Init();
+#endif
}
-#endif \ No newline at end of file
+#endif
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp
index cc8021fc2e4..5b4d77156db 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.cpp
+++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp
@@ -57,7 +57,7 @@ static Py_ssize_t KX_PythonSeq_len( PyObject * self )
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
if(self_plus==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ PyErr_SetString(PyExc_SystemError, "len(seq): "BGE_PROXY_ERROR_MSG);
return -1;
}
@@ -84,7 +84,7 @@ static PyObject *KX_PythonSeq_getIndex(PyObject* self, int index)
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
if(self_plus==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ PyErr_SetString(PyExc_SystemError, "val = seq[i]: "BGE_PROXY_ERROR_MSG);
return NULL;
}
@@ -145,25 +145,9 @@ static PyObject *KX_PythonSeq_getIndex(PyObject* self, int index)
return NULL;
}
-
-static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
+static PyObjectPlus * KX_PythonSeq_subscript__internal(PyObject *self, char *key)
{
PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
- char *name = NULL;
-
- if(self_plus==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
- return NULL;
- }
-
- if (PyInt_Check(key)) {
- return KX_PythonSeq_getIndex(self, PyInt_AS_LONG( key ));
- } else if ( PyString_Check(key) ) {
- name = PyString_AsString( key );
- } else {
- PyErr_SetString( PyExc_TypeError, "expected a string or an index" );
- return NULL;
- }
switch(((KX_PythonSeq *)self)->type) {
case KX_PYGENSEQ_CONT_TYPE_SENSORS:
@@ -172,8 +156,9 @@ static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
SCA_ISensor* sensor;
for (unsigned int index=0;index<linkedsensors.size();index++) {
sensor = linkedsensors[index];
- if (sensor->GetName() == name)
- return sensor->GetProxy();
+ if (sensor->GetName() == key)
+ return static_cast<PyObjectPlus *>(sensor);
+
}
break;
}
@@ -183,8 +168,8 @@ static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
SCA_IActuator* actuator;
for (unsigned int index=0;index<linkedactuators.size();index++) {
actuator = linkedactuators[index];
- if (actuator->GetName() == name)
- return actuator->GetProxy();
+ if (actuator->GetName() == key)
+ return static_cast<PyObjectPlus *>(actuator);
}
break;
}
@@ -194,8 +179,8 @@ static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
SCA_ISensor *sensor;
for (unsigned int index=0;index<linkedsensors.size();index++) {
sensor= linkedsensors[index];
- if (sensor->GetName() == name)
- return sensor->GetProxy();
+ if (sensor->GetName() == key)
+ return static_cast<PyObjectPlus *>(sensor);
}
break;
}
@@ -205,8 +190,8 @@ static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
SCA_IController *controller;
for (unsigned int index=0;index<linkedcontrollers.size();index++) {
controller= linkedcontrollers[index];
- if (controller->GetName() == name)
- return controller->GetProxy();
+ if (controller->GetName() == key)
+ return static_cast<PyObjectPlus *>(controller);
}
break;
}
@@ -216,23 +201,105 @@ static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
SCA_IActuator *actuator;
for (unsigned int index=0;index<linkedactuators.size();index++) {
actuator= linkedactuators[index];
- if (actuator->GetName() == name)
- return actuator->GetProxy();
+ if (actuator->GetName() == key)
+ return static_cast<PyObjectPlus *>(actuator);
}
break;
}
}
- PyErr_Format( PyExc_KeyError, "requested item \"%s\" does not exist", name);
return NULL;
}
+
+static PyObject * KX_PythonSeq_subscript(PyObject * self, PyObject *key)
+{
+ PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
+
+ if(self_plus==NULL) {
+ PyErr_SetString(PyExc_SystemError, "val = seq[key], KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
+ return NULL;
+ }
+
+ if (PyLong_Check(key)) {
+ return KX_PythonSeq_getIndex(self, PyLong_AsSsize_t( key ));
+ }
+ else if ( PyUnicode_Check(key) ) {
+ char *name = _PyUnicode_AsString(key);
+ PyObjectPlus *ret = KX_PythonSeq_subscript__internal(self, name);
+
+ if(ret) {
+ return ret->GetProxy();
+ } else {
+ PyErr_Format( PyExc_KeyError, "requested item \"%s\" does not exist", name);
+ return NULL;
+ }
+ }
+ else {
+ PyErr_SetString( PyExc_TypeError, "expected a string or an index" );
+ return NULL;
+ }
+}
+
+
+static int KX_PythonSeq_contains(PyObject *self, PyObject *key)
+{
+ PyObjectPlus *self_plus= BGE_PROXY_REF(((KX_PythonSeq *)self)->base);
+
+ if(self_plus==NULL) {
+ PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: "BGE_PROXY_ERROR_MSG);
+ return -1;
+ }
+ if(!PyUnicode_Check(key)) {
+ PyErr_SetString(PyExc_SystemError, "key in seq, KX_PythonSeq: key must be a string");
+ return -1;
+ }
+
+ if(KX_PythonSeq_subscript__internal(self, _PyUnicode_AsString(key)))
+ return 1;
+
+ return 0;
+}
+
+/* Matches python dict.get(key, [default]) */
+PyObject* KX_PythonSeq_get(PyObject * self, PyObject *args)
+{
+ char *key;
+ PyObject* def = Py_None;
+ PyObjectPlus* ret_plus;
+
+ if (!PyArg_ParseTuple(args, "s|O:get", &key, &def))
+ return NULL;
+
+ if((ret_plus = KX_PythonSeq_subscript__internal(self, key)))
+ return ret_plus->GetProxy();
+
+ Py_INCREF(def);
+ return def;
+}
+
+PySequenceMethods KX_PythonSeq_as_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)KX_PythonSeq_contains, /* sq_contains */
+};
+
static PyMappingMethods KX_PythonSeq_as_mapping = {
KX_PythonSeq_len, /* mp_length */
KX_PythonSeq_subscript, /* mp_subscript */
0, /* mp_ass_subscript */
};
+PyMethodDef KX_PythonSeq_methods[] = {
+ // dict style access for props
+ {"get",(PyCFunction) KX_PythonSeq_get, METH_VARARGS},
+ {NULL,NULL} //Sentinel
+};
/*
* Initialize the interator index
@@ -241,7 +308,7 @@ static PyMappingMethods KX_PythonSeq_as_mapping = {
static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self)
{
if(BGE_PROXY_REF(self->base)==NULL) {
- PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
+ PyErr_SetString(PyExc_SystemError, "for i in seq: "BGE_PROXY_ERROR_MSG);
return NULL;
}
@@ -313,13 +380,17 @@ PyTypeObject KX_PythonSeq_Type = {
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
+#if PY_VERSION_HEX >= 0x03000000 // TODO - richcmp
+ NULL,
+#else
( cmpfunc ) KX_PythonSeq_compare, /* cmpfunc tp_compare; */
+#endif
( reprfunc ) KX_PythonSeq_repr, /* reprfunc tp_repr; */
/* Method suites for standard classes */
NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
+ &KX_PythonSeq_as_sequence, /* PySequenceMethods *tp_as_sequence; */
&KX_PythonSeq_as_mapping, /* PyMappingMethods *tp_as_mapping; */
/* More standard operations (here for binary compatibility) */
@@ -357,7 +428,7 @@ PyTypeObject KX_PythonSeq_Type = {
( iternextfunc ) KX_PythonSeq_nextIter, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
+ KX_PythonSeq_methods, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp
index 064dc9126ac..e39d3756b71 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.cpp
+++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp
@@ -49,8 +49,7 @@ KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr,
double resetmargin,
bool bFindMaterial,
const STR_String& touchedpropname,
- class KX_Scene* kxscene,
- PyTypeObject* T)
+ class KX_Scene* kxscene)
: KX_NearSensor(
eventmgr,
@@ -61,8 +60,8 @@ KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr,
bFindMaterial,
touchedpropname,
kxscene,
- physCtrl,
- T),
+ physCtrl),
+
m_coneradius(coneradius),
m_coneheight(coneheight),
m_axis(axis)
@@ -245,21 +244,15 @@ PyTypeObject KX_RadarSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_RadarSensor::Parents[] = {
- &KX_RadarSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&KX_NearSensor::Type,
- &KX_TouchSensor::Type,
- &SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_RadarSensor::Methods[] = {
@@ -283,16 +276,3 @@ PyAttributeDef KX_RadarSensor::Attributes[] = {
{NULL} //Sentinel
};
-PyObject* KX_RadarSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(KX_NearSensor);
-}
-
-PyObject* KX_RadarSensor::py_getattro_dict() {
- py_getattro_dict_up(KX_NearSensor);
-}
-
-int KX_RadarSensor::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(KX_NearSensor);
-}
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h
index 2e5a0e68bed..344be0e399f 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.h
+++ b/source/gameengine/Ketsji/KX_RadarSensor.h
@@ -70,8 +70,7 @@ public:
double resetmargin,
bool bFindMaterial,
const STR_String& touchedpropname,
- class KX_Scene* kxscene,
- PyTypeObject* T = &Type);
+ class KX_Scene* kxscene);
KX_RadarSensor();
virtual ~KX_RadarSensor();
virtual void SynchronizeTransform();
@@ -89,9 +88,7 @@ public:
KX_RADAR_AXIS_NEG_Z
};
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
+ /* python */
virtual sensortype GetSensorType() { return ST_RADAR; }
//Deprecated ----->
diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp
index 78a61e9d95e..3f27496df71 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.cpp
+++ b/source/gameengine/Ketsji/KX_RaySensor.cpp
@@ -55,9 +55,8 @@ KX_RaySensor::KX_RaySensor(class SCA_EventManager* eventmgr,
bool bXRay,
double distance,
int axis,
- KX_Scene* ketsjiScene,
- PyTypeObject* T)
- : SCA_ISensor(gameobj,eventmgr, T),
+ KX_Scene* ketsjiScene)
+ : SCA_ISensor(gameobj,eventmgr),
m_propertyname(propname),
m_bFindMaterial(bFindMaterial),
m_bXRay(bXRay),
@@ -336,20 +335,16 @@ PyTypeObject KX_RaySensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-
-};
-
-PyParentObject KX_RaySensor::Parents[] = {
- &KX_RaySensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
+
};
PyMethodDef KX_RaySensor::Methods[] = {
@@ -447,18 +442,4 @@ PyObject* KX_RaySensor::PyGetHitNormal()
return retVal;
}
-
-
-PyObject* KX_RaySensor::py_getattro(PyObject *attr) {
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* KX_RaySensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int KX_RaySensor::py_setattro(PyObject *attr, PyObject *value) {
- py_setattro_up(SCA_ISensor);
-}
-
// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h
index 9efb046742f..530c8ce54e5 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.h
+++ b/source/gameengine/Ketsji/KX_RaySensor.h
@@ -62,8 +62,7 @@ public:
bool bXRay,
double distance,
int axis,
- class KX_Scene* ketsjiScene,
- PyTypeObject* T = &Type);
+ class KX_Scene* ketsjiScene);
virtual ~KX_RaySensor();
virtual CValue* GetReplica();
@@ -84,11 +83,6 @@ public:
KX_RAY_AXIS_NEG_Y,
KX_RAY_AXIS_NEG_Z
};
-
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
// Deprecated ----->
KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitObject);
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
index 75435b97797..239c4a0be67 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
@@ -55,10 +55,9 @@ KX_SCA_AddObjectActuator::KX_SCA_AddObjectActuator(SCA_IObject *gameobj,
const float *linvel,
bool linv_local,
const float *angvel,
- bool angv_local,
- PyTypeObject* T)
+ bool angv_local)
:
- SCA_IActuator(gameobj, T),
+ SCA_IActuator(gameobj),
m_OriginalObject(original),
m_scene(scene),
@@ -187,20 +186,17 @@ PyTypeObject KX_SCA_AddObjectActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_SCA_AddObjectActuator::Parents[] = {
- &KX_SCA_AddObjectActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
+
PyMethodDef KX_SCA_AddObjectActuator::Methods[] = {
// ---> deprecated
{"setTime", (PyCFunction) KX_SCA_AddObjectActuator::sPySetTime, METH_O, (PY_METHODCHAR)SetTime_doc},
@@ -263,21 +259,6 @@ PyObject* KX_SCA_AddObjectActuator::pyattr_get_objectLastCreated(void *self, con
return actuator->m_lastCreatedObject->GetProxy();
}
-
-PyObject* KX_SCA_AddObjectActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SCA_AddObjectActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SCA_AddObjectActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
/* 1. setObject */
const char KX_SCA_AddObjectActuator::SetObject_doc[] =
"setObject(object)\n"
@@ -316,7 +297,7 @@ const char KX_SCA_AddObjectActuator::SetTime_doc[] =
PyObject* KX_SCA_AddObjectActuator::PySetTime(PyObject* value)
{
ShowDeprecationWarning("setTime()", "the time property");
- int deltatime = PyInt_AsLong(value);
+ int deltatime = PyLong_AsSsize_t(value);
if (deltatime==-1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError, "expected an int");
return NULL;
@@ -339,7 +320,7 @@ const char KX_SCA_AddObjectActuator::GetTime_doc[] =
PyObject* KX_SCA_AddObjectActuator::PyGetTime()
{
ShowDeprecationWarning("getTime()", "the time property");
- return PyInt_FromLong(m_timeProp);
+ return PyLong_FromSsize_t(m_timeProp);
}
@@ -361,7 +342,7 @@ PyObject* KX_SCA_AddObjectActuator::PyGetObject(PyObject* args)
Py_RETURN_NONE;
if (ret_name_only)
- return PyString_FromString(m_OriginalObject->GetName().ReadPtr());
+ return PyUnicode_FromString(m_OriginalObject->GetName().ReadPtr());
else
return m_OriginalObject->GetProxy();
}
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
index 6746b7d1bc6..3151e7a89ca 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
@@ -88,8 +88,7 @@ public:
const float *linvel,
bool linv_local,
const float *angvel,
- bool angv_local,
- PyTypeObject* T=&Type
+ bool angv_local
);
~KX_SCA_AddObjectActuator(void);
@@ -110,10 +109,6 @@ public:
virtual bool
Update();
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
SCA_IObject*
GetLastCreatedObject(
) const ;
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
index a50764a54e6..423fd0db7f2 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
@@ -47,9 +47,7 @@
/* Integration hooks ------------------------------------------------------- */
- PyTypeObject
-
-KX_SCA_DynamicActuator::Type = {
+PyTypeObject KX_SCA_DynamicActuator::Type = {
#if (PY_VERSION_HEX >= 0x02060000)
PyVarObject_HEAD_INIT(NULL, 0)
#else
@@ -66,22 +64,17 @@ KX_SCA_DynamicActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_SCA_DynamicActuator::Parents[] = {
- &KX_SCA_DynamicActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
PyMethodDef KX_SCA_DynamicActuator::Methods[] = {
// ---> deprecated
KX_PYMETHODTABLE(KX_SCA_DynamicActuator, setOperation),
@@ -96,21 +89,6 @@ PyAttributeDef KX_SCA_DynamicActuator::Attributes[] = {
};
-PyObject* KX_SCA_DynamicActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SCA_DynamicActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SCA_DynamicActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
/* 1. setOperation */
KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, setOperation,
"setOperation(operation?)\n"
@@ -142,7 +120,7 @@ KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation,
)
{
ShowDeprecationWarning("getOperation()", "the mode property");
- return PyInt_FromLong((long)m_dyn_operation);
+ return PyLong_FromSsize_t((long)m_dyn_operation);
}
@@ -152,10 +130,9 @@ KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation,
KX_SCA_DynamicActuator::KX_SCA_DynamicActuator(SCA_IObject *gameobj,
short dyn_operation,
- float setmass,
- PyTypeObject* T) :
+ float setmass) :
- SCA_IActuator(gameobj, T),
+ SCA_IActuator(gameobj),
m_dyn_operation(dyn_operation),
m_setmass(setmass)
{
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
index 4add707f8cd..8b598c9ecfa 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
@@ -50,8 +50,7 @@ class KX_SCA_DynamicActuator : public SCA_IActuator
KX_SCA_DynamicActuator(
SCA_IObject* gameobj,
short dyn_operation,
- float setmass,
- PyTypeObject* T=&Type
+ float setmass
);
~KX_SCA_DynamicActuator(
@@ -73,11 +72,6 @@ class KX_SCA_DynamicActuator : public SCA_IActuator
KX_DYN_SET_MASS,
};
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* 1. setOperation */
KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,setOperation);
KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,getOperation);
diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
index 728254e7f48..47c5c3aeeeb 100644
--- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
@@ -43,9 +43,8 @@
#endif
KX_SCA_EndObjectActuator::KX_SCA_EndObjectActuator(SCA_IObject *gameobj,
- SCA_IScene* scene,
- PyTypeObject* T):
- SCA_IActuator(gameobj, T),
+ SCA_IScene* scene):
+ SCA_IActuator(gameobj),
m_scene(scene)
{
// intentionally empty
@@ -108,24 +107,17 @@ PyTypeObject KX_SCA_EndObjectActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-PyParentObject KX_SCA_EndObjectActuator::Parents[] = {
- &KX_SCA_EndObjectActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_SCA_EndObjectActuator::Methods[] = {
{NULL,NULL} //Sentinel
};
@@ -134,13 +126,4 @@ PyAttributeDef KX_SCA_EndObjectActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_SCA_EndObjectActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SCA_EndObjectActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
/* eof */
diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h
index 70d72f1f8da..782a24b1ef1 100644
--- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h
@@ -47,8 +47,7 @@ class KX_SCA_EndObjectActuator : public SCA_IActuator
public:
KX_SCA_EndObjectActuator(
SCA_IObject* gameobj,
- SCA_IScene* scene,
- PyTypeObject* T=&Type
+ SCA_IScene* scene
);
~KX_SCA_EndObjectActuator();
@@ -63,9 +62,6 @@ class KX_SCA_EndObjectActuator : public SCA_IActuator
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
}; /* end of class KX_EditObjectActuator : public SCA_PropertyActuator */
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
index 00842d7012a..2884bb76565 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
@@ -50,9 +50,7 @@
/* Integration hooks ------------------------------------------------------- */
- PyTypeObject
-
-KX_SCA_ReplaceMeshActuator::Type = {
+PyTypeObject KX_SCA_ReplaceMeshActuator::Type = {
#if (PY_VERSION_HEX >= 0x02060000)
PyVarObject_HEAD_INIT(NULL, 0)
#else
@@ -69,23 +67,17 @@ KX_SCA_ReplaceMeshActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_SCA_ReplaceMeshActuator::Parents[] = {
- &KX_SCA_ReplaceMeshActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_SCA_ReplaceMeshActuator::Methods[] = {
KX_PYMETHODTABLE(KX_SCA_ReplaceMeshActuator, instantReplaceMesh),
// Deprecated ----->
@@ -99,20 +91,6 @@ PyAttributeDef KX_SCA_ReplaceMeshActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_SCA_ReplaceMeshActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SCA_ReplaceMeshActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SCA_ReplaceMeshActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
PyObject* KX_SCA_ReplaceMeshActuator::pyattr_get_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_SCA_ReplaceMeshActuator* actuator = static_cast<KX_SCA_ReplaceMeshActuator*>(self);
@@ -161,7 +139,7 @@ KX_PYMETHODDEF_DOC(KX_SCA_ReplaceMeshActuator, getMesh,
if (!m_mesh)
Py_RETURN_NONE;
- return PyString_FromString(const_cast<char *>(m_mesh->GetName().ReadPtr()));
+ return PyUnicode_FromString(const_cast<char *>(m_mesh->GetName().ReadPtr()));
}
@@ -178,10 +156,9 @@ KX_PYMETHODDEF_DOC(KX_SCA_ReplaceMeshActuator, instantReplaceMesh,
KX_SCA_ReplaceMeshActuator::KX_SCA_ReplaceMeshActuator(SCA_IObject *gameobj,
class RAS_MeshObject *mesh,
- SCA_IScene* scene,
- PyTypeObject* T) :
+ SCA_IScene* scene) :
- SCA_IActuator(gameobj, T),
+ SCA_IActuator(gameobj),
m_mesh(mesh),
m_scene(scene)
{
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
index 0e7f7852701..6a68bd88cc5 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
@@ -55,9 +55,7 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
KX_SCA_ReplaceMeshActuator(
SCA_IObject* gameobj,
RAS_MeshObject *mesh,
- SCA_IScene* scene,
- PyTypeObject* T=&Type
- );
+ SCA_IScene* scene);
~KX_SCA_ReplaceMeshActuator(
);
@@ -71,10 +69,7 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
void InstantReplaceMesh();
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
+ /* python api */
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);
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index c0d8a7090c4..51f5276e075 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -138,7 +138,7 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice,
class SND_IAudioDevice* adi,
const STR_String& sceneName,
Scene *scene):
- PyObjectPlus(&KX_Scene::Type),
+ PyObjectPlus(),
m_keyboardmgr(NULL),
m_mousemgr(NULL),
m_sceneConverter(NULL),
@@ -1629,17 +1629,15 @@ PyTypeObject KX_Scene::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_Scene::Parents[] = {
- &KX_Scene::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_Scene::Methods[] = {
@@ -1654,7 +1652,7 @@ PyMethodDef KX_Scene::Methods[] = {
PyObject* KX_Scene::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_Scene* self= static_cast<KX_Scene*>(self_v);
- return PyString_FromString(self->GetName().ReadPtr());
+ return PyUnicode_FromString(self->GetName().ReadPtr());
}
PyObject* KX_Scene::pyattr_get_objects(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
@@ -1730,72 +1728,6 @@ PyAttributeDef KX_Scene::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_Scene::py_getattro__internal(PyObject *attr)
-{
- py_getattro_up(PyObjectPlus);
-}
-
-int KX_Scene::py_setattro__internal(PyObject *attr, PyObject *value)
-{
- py_setattro_up(PyObjectPlus);
-}
-
-PyObject* KX_Scene::py_getattro(PyObject *attr)
-{
- PyObject *object = py_getattro__internal(attr);
-
- if (object==NULL)
- {
- PyErr_Clear();
- object = PyDict_GetItem(m_attr_dict, attr);
- if(object) {
- Py_INCREF(object);
- }
- else {
- PyErr_Format(PyExc_AttributeError, "value = scene.myAttr: KX_Scene, attribute \"%s\" not found", PyString_AsString(attr));
- }
- }
-
- return object;
-}
-
-PyObject* KX_Scene::py_getattro_dict() {
- //py_getattro_dict_up(PyObjectPlus);
-
- PyObject *dict= py_getattr_dict(PyObjectPlus::py_getattro_dict(), Type.tp_dict);
- if(dict==NULL)
- return NULL;
-
- /* normally just return this but KX_Scene has some more items */
-
- PyDict_Update(dict, m_attr_dict);
- return dict;
-}
-
-int KX_Scene::py_setattro(PyObject *attr, PyObject *value)
-{
- int ret= py_setattro__internal(attr, value);
-
- if (ret==PY_SET_ATTR_MISSING) {
- if (PyDict_SetItem(m_attr_dict, attr, value)==0) {
- PyErr_Clear();
- ret= PY_SET_ATTR_SUCCESS;
- }
- else {
- PyErr_SetString(PyExc_AttributeError, "scene.UserAttr = value: KX_Scenes, failed assigning value to internal dictionary");
- ret= PY_SET_ATTR_FAIL;
- }
- }
-
- return ret;
-}
-
-int KX_Scene::py_delattro(PyObject *attr)
-{
- PyDict_DelItem(m_attr_dict, attr);
- return 0;
-}
-
KX_PYMETHODDEF_DOC_NOARGS(KX_Scene, getLightList,
"getLightList() -> list [KX_Light]\n"
"Returns a list of all lights in the scene.\n"
@@ -1820,7 +1752,7 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_Scene, getName,
)
{
ShowDeprecationWarning("getName()", "the name property");
- return PyString_FromString(GetName());
+ return PyUnicode_FromString(GetName());
}
KX_PYMETHODDEF_DOC(KX_Scene, addObject,
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 79d3f7fd828..2792f1f5fe4 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -563,15 +563,7 @@ public:
static PyObject* pyattr_get_active_camera(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_active_camera(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
- virtual PyObject* py_getattro(PyObject *attr); /* name, active_camera, gravity, suspended, viewport, framing, activity_culling, activity_culling_radius */
- virtual PyObject* py_getattro_dict();
-
- virtual int py_setattro(PyObject *attr, PyObject *value);
- virtual int py_delattro(PyObject *attr);
- virtual PyObject* py_repr(void) { return PyString_FromString(GetName().ReadPtr()); }
-
- PyObject* py_getattro__internal(PyObject *attr);
- int py_setattro__internal(PyObject *attr, PyObject *pyvalue);
+ virtual PyObject* py_repr(void) { return PyUnicode_FromString(GetName().ReadPtr()); }
/**
* Sets the time the scene was suspended
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index 1b790ec9824..5528e58ef77 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -49,9 +49,8 @@ KX_SceneActuator::KX_SceneActuator(SCA_IObject *gameobj,
KX_Scene *scene,
KX_KetsjiEngine* ketsjiEngine,
const STR_String& nextSceneName,
- KX_Camera* camera,
- PyTypeObject* T)
- : SCA_IActuator(gameobj, T)
+ KX_Camera* camera)
+ : SCA_IActuator(gameobj)
{
m_mode = mode;
m_scene = scene;
@@ -134,7 +133,7 @@ bool KX_SceneActuator::Update()
{
// if no camera is set and the parent object is a camera, use it as the camera
SCA_IObject* parent = GetParent();
- if (parent->isA(&KX_Camera::Type))
+ if (parent->GetGameObjectType()==SCA_IObject::OBJ_CAMERA)
{
m_scene->SetActiveCamera((KX_Camera*)parent);
}
@@ -239,26 +238,17 @@ PyTypeObject KX_SceneActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_SceneActuator::Parents[] =
-{
- &KX_SceneActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_SceneActuator::Methods[] =
{
//Deprecated functions ------>
@@ -280,20 +270,6 @@ PyAttributeDef KX_SceneActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_SceneActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SceneActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SceneActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
PyObject* KX_SceneActuator::pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_SceneActuator* actuator = static_cast<KX_SceneActuator*>(self);
@@ -355,7 +331,7 @@ const char KX_SceneActuator::GetUseRestart_doc[] =
PyObject* KX_SceneActuator::PyGetUseRestart()
{
ShowDeprecationWarning("getUseRestart()", "the useRestart property");
- return PyInt_FromLong(!(m_restart == 0));
+ return PyLong_FromSsize_t(!(m_restart == 0));
}
@@ -391,7 +367,7 @@ const char KX_SceneActuator::GetScene_doc[] =
PyObject* KX_SceneActuator::PyGetScene()
{
ShowDeprecationWarning("getScene()", "the scene property");
- return PyString_FromString(m_nextSceneName);
+ return PyUnicode_FromString(m_nextSceneName);
}
@@ -432,7 +408,7 @@ PyObject* KX_SceneActuator::PyGetCamera()
{
ShowDeprecationWarning("getCamera()", "the camera property");
if (m_camera) {
- return PyString_FromString(m_camera->GetName());
+ return PyUnicode_FromString(m_camera->GetName());
}
else {
Py_RETURN_NONE;
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h
index 2412dd02590..86de3395d1e 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.h
+++ b/source/gameengine/Ketsji/KX_SceneActuator.h
@@ -77,8 +77,7 @@ class KX_SceneActuator : public SCA_IActuator
KX_Scene* scene,
KX_KetsjiEngine* ketsjiEngine,
const STR_String& nextSceneName,
- KX_Camera* camera,
- PyTypeObject* T=&Type);
+ KX_Camera* camera);
virtual ~KX_SceneActuator();
virtual CValue* GetReplica();
@@ -92,10 +91,6 @@ class KX_SceneActuator : public SCA_IActuator
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
/* 1. set */
/* Removed */
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 5c02a2db646..673f42283dd 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -50,9 +50,8 @@ KX_SoundActuator::KX_SoundActuator(SCA_IObject* gameobj,
SND_Scene* sndscene,
KX_SOUNDACT_TYPE type,
short start,
- short end,
- PyTypeObject* T)
- : SCA_IActuator(gameobj,T)
+ short end)
+ : SCA_IActuator(gameobj)
{
m_soundObject = sndobj;
m_soundScene = sndscene;
@@ -112,7 +111,7 @@ bool KX_SoundActuator::Update(double curtime, bool frame)
return false;
// actual audio device playing state
- bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false;
+ bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED && m_soundObject->GetPlaystate() != SND_INITIAL) ? true : false;
if (m_pino)
{
@@ -194,7 +193,7 @@ bool KX_SoundActuator::Update(double curtime, bool frame)
}
}
// verify that the sound is still playing
- isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false;
+ isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED && m_soundObject->GetPlaystate() != SND_INITIAL) ? true : false;
if (isplaying)
{
@@ -250,25 +249,17 @@ PyTypeObject KX_SoundActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_SoundActuator::Parents[] = {
- &KX_SoundActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_SoundActuator::Methods[] = {
// Deprecated ----->
{"setFilename", (PyCFunction) KX_SoundActuator::sPySetFilename, METH_VARARGS,NULL},
@@ -340,25 +331,13 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_SoundActuator, stopSound,
}
/* Atribute setting and getting -------------------------------------------- */
-PyObject* KX_SoundActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_SoundActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_SoundActuator::py_setattro(PyObject *attr, PyObject* value) {
- py_setattro_up(SCA_IActuator);
-}
PyObject* KX_SoundActuator::pyattr_get_filename(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
{
KX_SoundActuator * actuator = static_cast<KX_SoundActuator *> (self);
if (!actuator->m_soundObject)
{
- return PyString_FromString("");
+ return PyUnicode_FromString("");
}
STR_String objectname = actuator->m_soundObject->GetObjectName();
char* name = objectname.Ptr();
@@ -367,7 +346,7 @@ PyObject* KX_SoundActuator::pyattr_get_filename(void *self, const struct KX_PYAT
PyErr_SetString(PyExc_RuntimeError, "value = actuator.fileName: KX_SoundActuator, unable to get sound fileName");
return NULL;
} else
- return PyString_FromString(name);
+ return PyUnicode_FromString(name);
}
PyObject* KX_SoundActuator::pyattr_get_gain(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
@@ -402,7 +381,7 @@ PyObject* KX_SoundActuator::pyattr_get_looping(void *self, const struct KX_PYATT
{
KX_SoundActuator * actuator = static_cast<KX_SoundActuator *> (self);
int looping = (actuator->m_soundObject) ? actuator->m_soundObject->GetLoopMode() : (int)SND_LOOP_OFF;
- PyObject* result = PyInt_FromLong(looping);
+ PyObject* result = PyLong_FromSsize_t(looping);
return result;
}
@@ -580,7 +559,7 @@ PyObject* KX_SoundActuator::PyGetFilename()
ShowDeprecationWarning("getFilename()", "the fileName property");
if (!m_soundObject)
{
- return PyString_FromString("");
+ return PyUnicode_FromString("");
}
STR_String objectname = m_soundObject->GetObjectName();
char* name = objectname.Ptr();
@@ -589,7 +568,7 @@ PyObject* KX_SoundActuator::PyGetFilename()
PyErr_SetString(PyExc_RuntimeError, "Unable to get sound fileName");
return NULL;
} else
- return PyString_FromString(name);
+ return PyUnicode_FromString(name);
}
PyObject* KX_SoundActuator::PySetGain(PyObject* args)
@@ -689,7 +668,7 @@ PyObject* KX_SoundActuator::PyGetLooping()
{
ShowDeprecationWarning("getLooping()", "the looping property");
int looping = (m_soundObject) ? m_soundObject->GetLoopMode() : (int)SND_LOOP_OFF;
- PyObject* result = PyInt_FromLong(looping);
+ PyObject* result = PyLong_FromSsize_t(looping);
return result;
}
@@ -777,7 +756,7 @@ PyObject* KX_SoundActuator::PySetType(PyObject* args)
PyObject* KX_SoundActuator::PyGetType()
{
ShowDeprecationWarning("getType()", "the mode property");
- return PyInt_FromLong(m_type);
+ return PyLong_FromSsize_t(m_type);
}
// <-----
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h
index a7491355667..adafee0a30b 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.h
+++ b/source/gameengine/Ketsji/KX_SoundActuator.h
@@ -66,8 +66,7 @@ public:
class SND_Scene* sndscene,
KX_SOUNDACT_TYPE type,
short start,
- short end,
- PyTypeObject* T=&Type);
+ short end);
~KX_SoundActuator();
@@ -81,10 +80,6 @@ public:
/* Python interface --------------------------------------------------- */
/* -------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
-
KX_PYMETHOD_DOC_NOARGS(KX_SoundActuator, startSound);
KX_PYMETHOD_DOC_NOARGS(KX_SoundActuator, pauseSound);
KX_PYMETHOD_DOC_NOARGS(KX_SoundActuator, stopSound);
diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp
index f6979eee0f4..9815d6274aa 100644
--- a/source/gameengine/Ketsji/KX_StateActuator.cpp
+++ b/source/gameengine/Ketsji/KX_StateActuator.cpp
@@ -38,10 +38,9 @@
KX_StateActuator::KX_StateActuator(
SCA_IObject* gameobj,
int operation,
- unsigned int mask,
- PyTypeObject* T
+ unsigned int mask
)
- : SCA_IActuator(gameobj,T),
+ : SCA_IActuator(gameobj),
m_operation(operation),
m_mask(mask)
{
@@ -154,24 +153,18 @@ PyTypeObject KX_StateActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject
-KX_StateActuator::Parents[] = {
- &KX_StateActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-PyMethodDef
-KX_StateActuator::Methods[] = {
+PyMethodDef KX_StateActuator::Methods[] = {
// deprecated -->
{"setOperation", (PyCFunction) KX_StateActuator::sPySetOperation,
METH_VARARGS, (PY_METHODCHAR)SetOperation_doc},
@@ -187,20 +180,6 @@ PyAttributeDef KX_StateActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_StateActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_StateActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_StateActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
/* set operation ---------------------------------------------------------- */
const char
diff --git a/source/gameengine/Ketsji/KX_StateActuator.h b/source/gameengine/Ketsji/KX_StateActuator.h
index a4191a4c5fd..ce86c4b44fe 100644
--- a/source/gameengine/Ketsji/KX_StateActuator.h
+++ b/source/gameengine/Ketsji/KX_StateActuator.h
@@ -66,9 +66,8 @@ class KX_StateActuator : public SCA_IActuator
KX_StateActuator(
SCA_IObject* gameobj,
int operation,
- unsigned int mask,
- PyTypeObject* T=&Type
- );
+ unsigned int mask
+ );
virtual
~KX_StateActuator(
@@ -89,10 +88,6 @@ class KX_StateActuator : public SCA_IActuator
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
//KX_PYMETHOD_DOC
KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetOperation);
KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetMask);
diff --git a/source/gameengine/Ketsji/KX_SumoPhysicsController.cpp b/source/gameengine/Ketsji/KX_SumoPhysicsController.cpp
deleted file mode 100644
index fc053f05e63..00000000000
--- a/source/gameengine/Ketsji/KX_SumoPhysicsController.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-#include "KX_ConvertPhysicsObject.h"
-
-#ifdef USE_SUMO_SOLID
-
-#ifdef WIN32
-#pragma warning (disable : 4786)
-#endif
-
-#include "KX_SumoPhysicsController.h"
-#include "SG_Spatial.h"
-#include "SM_Scene.h"
-#include "KX_GameObject.h"
-#include "KX_MotionState.h"
-#include "KX_ClientObjectInfo.h"
-
-#include "PHY_IPhysicsEnvironment.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-void KX_SumoPhysicsController::applyImpulse(const MT_Point3& attach, const MT_Vector3& impulse)
-{
- SumoPhysicsController::applyImpulse(attach[0],attach[1],attach[2],impulse[0],impulse[1],impulse[2]);
-}
-void KX_SumoPhysicsController::RelativeTranslate(const MT_Vector3& dloc,bool local)
-{
- SumoPhysicsController::RelativeTranslate(dloc[0],dloc[1],dloc[2],local);
-
-}
-void KX_SumoPhysicsController::RelativeRotate(const MT_Matrix3x3& drot,bool local)
-{
- float oldmat[12];
- drot.getValue(oldmat);
-/* float newmat[9];
- float *m = &newmat[0];
- double *orgm = &oldmat[0];
-
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++;
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++;
- *m++ = *orgm++;*m++ = *orgm++;*m++ = *orgm++;orgm++; */
-
- SumoPhysicsController::RelativeRotate(oldmat,local);
-}
-
-void KX_SumoPhysicsController::SetLinearVelocity(const MT_Vector3& lin_vel,bool local)
-{
- SumoPhysicsController::SetLinearVelocity(lin_vel[0],lin_vel[1],lin_vel[2],local);
-
-}
-
-void KX_SumoPhysicsController::SetAngularVelocity(const MT_Vector3& ang_vel,bool local)
-{
- SumoPhysicsController::SetAngularVelocity(ang_vel[0],ang_vel[1],ang_vel[2],local);
-}
-
-MT_Vector3 KX_SumoPhysicsController::GetVelocity(const MT_Point3& pos)
-{
-
- float linvel[3];
- SumoPhysicsController::GetVelocity(pos[0],pos[1],pos[2],linvel[0],linvel[1],linvel[2]);
-
- return MT_Vector3 (linvel);
-}
-
-MT_Vector3 KX_SumoPhysicsController::GetLinearVelocity()
-{
- return GetVelocity(MT_Point3(0,0,0));
-
-}
-
-void KX_SumoPhysicsController::resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ)
-{
- SumoPhysicsController::resolveCombinedVelocities(linvelX,linvelY,linvelZ,angVelX,angVelY,angVelZ);
-}
-
-void KX_SumoPhysicsController::ApplyTorque(const MT_Vector3& torque,bool local)
-{
- SumoPhysicsController::ApplyTorque(torque[0],torque[1],torque[2],local);
-
-}
-
-void KX_SumoPhysicsController::ApplyForce(const MT_Vector3& force,bool local)
-{
- SumoPhysicsController::ApplyForce(force[0],force[1],force[2],local);
-}
-
-bool KX_SumoPhysicsController::Update(double time)
-{
- return SynchronizeMotionStates(time);
-}
-
-void KX_SumoPhysicsController::SetSimulatedTime(double time)
-{
-
-}
-
-void KX_SumoPhysicsController::SetSumoTransform(bool nondynaonly)
-{
- SumoPhysicsController::setSumoTransform(nondynaonly);
-
-}
-
-void KX_SumoPhysicsController::SuspendDynamics(bool)
-{
- SumoPhysicsController::SuspendDynamics();
-}
-
-void KX_SumoPhysicsController::RestoreDynamics()
-{
- SumoPhysicsController::RestoreDynamics();
-}
-
-SG_Controller* KX_SumoPhysicsController::GetReplica(SG_Node* destnode)
-{
-
- PHY_IMotionState* motionstate = new KX_MotionState(destnode);
-
- KX_SumoPhysicsController* physicsreplica = new KX_SumoPhysicsController(*this);
-
- //parentcontroller is here be able to avoid collisions between parent/child
-
- PHY_IPhysicsController* parentctrl = NULL;
-
- if (destnode != destnode->GetRootSGParent())
- {
- KX_GameObject* clientgameobj = (KX_GameObject*) destnode->GetRootSGParent()->GetSGClientObject();
- if (clientgameobj)
- {
- parentctrl = (KX_SumoPhysicsController*)clientgameobj->GetPhysicsController();
- } else
- {
- // it could be a false node, try the children
- NodeList::const_iterator childit;
- for (
- childit = destnode->GetSGChildren().begin();
- childit!= destnode->GetSGChildren().end();
- ++childit
- ) {
- KX_GameObject *clientgameobj = static_cast<KX_GameObject*>( (*childit)->GetSGClientObject());
- if (clientgameobj)
- {
- parentctrl = (KX_SumoPhysicsController*)clientgameobj->GetPhysicsController();
- }
- }
- }
- }
-
- physicsreplica->PostProcessReplica(motionstate,parentctrl);
-
- return physicsreplica;
-}
-
-
-void KX_SumoPhysicsController::SetObject (SG_IObject* object)
-{
- SG_Controller::SetObject(object);
-
- // cheating here...
-//should not be necessary, is it for duplicates ?
-
-KX_GameObject* gameobj = (KX_GameObject*) object->GetSGClientObject();
-gameobj->SetPhysicsController(this,gameobj->IsDynamic());
-GetSumoObject()->setClientObject(gameobj->getClientInfo());
-}
-
-void KX_SumoPhysicsController::setMargin(float collisionMargin)
-{
- SumoPhysicsController::SetMargin(collisionMargin);
-}
-
-
-void KX_SumoPhysicsController::setOrientation(const MT_Matrix3x3& rot)
-{
- MT_Quaternion orn = rot.getRotation();
- SumoPhysicsController::setOrientation(
- orn[0],orn[1],orn[2],orn[3]);
-
-}
-void KX_SumoPhysicsController::getOrientation(MT_Quaternion& orn)
-{
-
- float quat[4];
-
- SumoPhysicsController::getOrientation(quat[0],quat[1],quat[2],quat[3]);
-
- orn = MT_Quaternion(quat);
-
-}
-
-void KX_SumoPhysicsController::setPosition(const MT_Point3& pos)
-{
- SumoPhysicsController::setPosition(pos[0],pos[1],pos[2]);
-
-}
-
-void KX_SumoPhysicsController::setScaling(const MT_Vector3& scaling)
-{
- SumoPhysicsController::setScaling(scaling[0],scaling[1],scaling[2]);
-
-}
-
-MT_Scalar KX_SumoPhysicsController::GetMass()
-{
- return SumoPhysicsController::getMass();
-}
-
-void KX_SumoPhysicsController::SetMass(MT_Scalar newmass)
-{
-}
-
-MT_Vector3 KX_SumoPhysicsController::GetLocalInertia()
-{
- return MT_Vector3(0.f, 0.f, 0.f); // \todo
-}
-
-MT_Scalar KX_SumoPhysicsController::GetRadius()
-{
- return SumoPhysicsController::GetRadius();
-}
-
-MT_Vector3 KX_SumoPhysicsController::getReactionForce()
-{
- float force[3];
- SumoPhysicsController::getReactionForce(force[0],force[1],force[2]);
- return MT_Vector3(force);
-
-}
-
-void KX_SumoPhysicsController::setRigidBody(bool rigid)
-{
- SumoPhysicsController::setRigidBody(rigid);
-
-}
-
-
-KX_SumoPhysicsController::~KX_SumoPhysicsController()
-{
-
-
-}
-
-
-#endif//USE_SUMO_SOLID
diff --git a/source/gameengine/Ketsji/KX_SumoPhysicsController.h b/source/gameengine/Ketsji/KX_SumoPhysicsController.h
deleted file mode 100644
index 278994c6ae7..00000000000
--- a/source/gameengine/Ketsji/KX_SumoPhysicsController.h
+++ /dev/null
@@ -1,122 +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 *****
- */
-#ifndef __KX_SUMOPHYSICSCONTROLLER_H
-#define __KX_SUMOPHYSICSCONTROLLER_H
-
-#include "PHY_IPhysicsController.h"
-
-/**
- Physics Controller, a special kind of Scene Graph Transformation Controller.
- It get's callbacks from Sumo in case a transformation change took place.
- Each time the scene graph get's updated, the controller get's a chance
- in the 'Update' method to reflect changed.
-*/
-
-#include "SumoPhysicsController.h"
-#include "KX_IPhysicsController.h"
-
-class KX_SumoPhysicsController : public KX_IPhysicsController,
- public SumoPhysicsController
-
-{
-
-
-public:
- KX_SumoPhysicsController(
- class SM_Scene* sumoScene,
- class SM_Object* sumoObj,
- class PHY_IMotionState* motionstate
- ,bool dyna)
- : KX_IPhysicsController(dyna,false,false,NULL) ,
- SumoPhysicsController(sumoScene,/*solidscene,*/sumoObj,motionstate,dyna)
- {
- };
- virtual ~KX_SumoPhysicsController();
-
- void applyImpulse(const MT_Point3& attach, const MT_Vector3& impulse);
- virtual void SetObject (SG_IObject* object);
- virtual void setMargin (float collisionMargin);
-
- void RelativeTranslate(const MT_Vector3& dloc,bool local);
- void RelativeRotate(const MT_Matrix3x3& drot,bool local);
- void ApplyTorque(const MT_Vector3& torque,bool local);
- void ApplyForce(const MT_Vector3& force,bool local);
- MT_Vector3 GetLinearVelocity();
- MT_Vector3 GetAngularVelocity() // to keep compiler happy
- { return MT_Vector3(0.0,0.0,0.0); }
- MT_Vector3 GetVelocity(const MT_Point3& pos);
- void SetAngularVelocity(const MT_Vector3& ang_vel,bool local);
- void SetLinearVelocity(const MT_Vector3& lin_vel,bool local);
- void resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ);
-
-
- void SuspendDynamics(bool);
- void RestoreDynamics();
- virtual void AddCompoundChild(KX_IPhysicsController* child) { }
- virtual void RemoveCompoundChild(KX_IPhysicsController* child) { }
-
- virtual void getOrientation(MT_Quaternion& orn);
- virtual void setOrientation(const MT_Matrix3x3& orn);
- virtual void SetTransform() {}
-
- virtual void setPosition(const MT_Point3& pos);
- virtual void setScaling(const MT_Vector3& scaling);
- virtual MT_Scalar GetMass();
- virtual void SetMass(MT_Scalar newmass);
- virtual MT_Vector3 GetLocalInertia();
- virtual MT_Scalar GetRadius();
- virtual MT_Vector3 getReactionForce();
- virtual void setRigidBody(bool rigid);
-
- virtual float GetLinVelocityMin() { return SumoPhysicsController::GetLinVelocityMin(); }
- virtual void SetLinVelocityMin(float val) { SumoPhysicsController::SetLinVelocityMin(val); }
- virtual float GetLinVelocityMax() { return SumoPhysicsController::GetLinVelocityMax(); }
- virtual void SetLinVelocityMax(float val) { SumoPhysicsController::SetLinVelocityMax(val); }
-
- virtual SG_Controller* GetReplica(class SG_Node* destnode);
-
-
- void SetSumoTransform(bool nondynaonly);
- // todo: remove next line !
- virtual void SetSimulatedTime(double time);
-
- // call from scene graph to update
- virtual bool Update(double time);
-
- void
- SetOption(
- int option,
- int value
- ){
- // intentionally empty
- };
-};
-
-#endif //__KX_SUMOPHYSICSCONTROLLER_H
-
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index c06acd4a873..b0cf172c27a 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -97,8 +97,8 @@ bool KX_TouchSensor::Evaluate()
return result;
}
-KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj,bool bFindMaterial,bool bTouchPulse,const STR_String& touchedpropname,PyTypeObject* T)
-:SCA_ISensor(gameobj,eventmgr,T),
+KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj,bool bFindMaterial,bool bTouchPulse,const STR_String& touchedpropname)
+:SCA_ISensor(gameobj,eventmgr),
m_touchedpropname(touchedpropname),
m_bFindMaterial(bFindMaterial),
m_bTouchPulse(bTouchPulse),
@@ -310,19 +310,15 @@ PyTypeObject KX_TouchSensor::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_TouchSensor::Parents[] = {
- &KX_TouchSensor::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_ISensor::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_TouchSensor::Methods[] = {
@@ -348,20 +344,6 @@ PyAttributeDef KX_TouchSensor::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_TouchSensor::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_ISensor);
-}
-
-PyObject* KX_TouchSensor::py_getattro_dict() {
- py_getattro_dict_up(SCA_ISensor);
-}
-
-int KX_TouchSensor::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_ISensor);
-}
-
/* Python API */
/* 1. setProperty */
@@ -374,7 +356,7 @@ const char KX_TouchSensor::SetProperty_doc[] =
PyObject* KX_TouchSensor::PySetProperty(PyObject* value)
{
ShowDeprecationWarning("setProperty()", "the propName property");
- char *nameArg= PyString_AsString(value);
+ char *nameArg= _PyUnicode_AsString(value);
if (nameArg==NULL) {
PyErr_SetString(PyExc_ValueError, "expected a ");
return NULL;
@@ -392,7 +374,7 @@ const char KX_TouchSensor::GetProperty_doc[] =
PyObject* KX_TouchSensor::PyGetProperty() {
ShowDeprecationWarning("getProperty()", "the propName property");
- return PyString_FromString(m_touchedpropname);
+ return PyUnicode_FromString(m_touchedpropname);
}
const char KX_TouchSensor::GetHitObject_doc[] =
@@ -433,7 +415,7 @@ const char KX_TouchSensor::GetTouchMaterial_doc[] =
PyObject* KX_TouchSensor::PyGetTouchMaterial()
{
ShowDeprecationWarning("getTouchMaterial()", "the useMaterial property");
- return PyInt_FromLong(m_bFindMaterial);
+ return PyLong_FromSsize_t(m_bFindMaterial);
}
/* 6. setTouchMaterial */
@@ -446,7 +428,7 @@ const char KX_TouchSensor::SetTouchMaterial_doc[] =
PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject *value)
{
ShowDeprecationWarning("setTouchMaterial()", "the useMaterial property");
- int pulseArg = PyInt_AsLong(value);
+ int pulseArg = PyLong_AsSsize_t(value);
if(pulseArg ==-1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError, "expected a bool");
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h
index 476c63e89db..6cbf5b15e3b 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.h
+++ b/source/gameengine/Ketsji/KX_TouchSensor.h
@@ -79,8 +79,7 @@ public:
class KX_GameObject* gameobj,
bool bFindMaterial,
bool bTouchPulse,
- const STR_String& touchedpropname,
- PyTypeObject* T=&Type) ;
+ const STR_String& touchedpropname) ;
virtual ~KX_TouchSensor();
virtual CValue* GetReplica();
@@ -121,10 +120,6 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
//Deprecated ----->
/* 1. setProperty */
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index 5a50d0fb944..e8a06d8d619 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -59,10 +59,8 @@ KX_TrackToActuator::KX_TrackToActuator(SCA_IObject *gameobj,
int time,
bool allow3D,
int trackflag,
- int upflag,
- PyTypeObject* T)
- :
- SCA_IActuator(gameobj, T)
+ int upflag)
+ : SCA_IActuator(gameobj)
{
m_time = time;
m_allow3D = allow3D;
@@ -74,7 +72,6 @@ KX_TrackToActuator::KX_TrackToActuator(SCA_IObject *gameobj,
if (m_object)
m_object->RegisterActuator(this);
- if (gameobj->isA(&KX_GameObject::Type))
{
// if the object is vertex parented, don't check parent orientation as the link is broken
if (!((KX_GameObject*)gameobj)->IsVertexParent()){
@@ -450,25 +447,17 @@ PyTypeObject KX_TrackToActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-
-
-PyParentObject KX_TrackToActuator::Parents[] = {
- &KX_TrackToActuator::Type,
- &SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_IActuator::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
-
PyMethodDef KX_TrackToActuator::Methods[] = {
// ---> deprecated
{"setTime", (PyCFunction) KX_TrackToActuator::sPySetTime, METH_VARARGS, (PY_METHODCHAR)SetTime_doc},
@@ -518,20 +507,6 @@ int KX_TrackToActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUT
}
-PyObject* KX_TrackToActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_TrackToActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_TrackToActuator::py_setattro(PyObject *attr, PyObject* value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
/* 1. setObject */
const char KX_TrackToActuator::SetObject_doc[] =
"setObject(object)\n"
@@ -576,7 +551,7 @@ PyObject* KX_TrackToActuator::PyGetObject(PyObject* args)
Py_RETURN_NONE;
if (ret_name_only)
- return PyString_FromString(m_object->GetName());
+ return PyUnicode_FromString(m_object->GetName());
else
return m_object->GetProxy();
}
@@ -613,7 +588,7 @@ const char KX_TrackToActuator::GetTime_doc[] =
PyObject* KX_TrackToActuator::PyGetTime()
{
ShowDeprecationWarning("getTime()", "the timer property");
- return PyInt_FromLong(m_time);
+ return PyLong_FromSsize_t(m_time);
}
@@ -625,7 +600,7 @@ const char KX_TrackToActuator::GetUse3D_doc[] =
PyObject* KX_TrackToActuator::PyGetUse3D()
{
ShowDeprecationWarning("setTime()", "the use3D property");
- return PyInt_FromLong(!(m_allow3D == 0));
+ return PyLong_FromSsize_t(!(m_allow3D == 0));
}
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h
index c4cc2b1f062..801e695bb9b 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.h
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.h
@@ -56,7 +56,7 @@ class KX_TrackToActuator : public SCA_IActuator
public:
KX_TrackToActuator(SCA_IObject* gameobj, SCA_IObject *ob, int time,
- bool threedee,int trackflag,int upflag, PyTypeObject* T=&Type);
+ bool threedee,int trackflag,int upflag);
virtual ~KX_TrackToActuator();
virtual CValue* GetReplica() {
KX_TrackToActuator* replica = new KX_TrackToActuator(*this);
@@ -70,9 +70,6 @@ class KX_TrackToActuator : public SCA_IActuator
virtual bool Update(double curtime, bool frame);
/* Python part */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject* value);
/* These are used to get and set m_ob */
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
index 8146d04a878..7001bfc8b7e 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
@@ -16,8 +16,8 @@
KX_VehicleWrapper::KX_VehicleWrapper(
PHY_IVehicle* vehicle,
- PHY_IPhysicsEnvironment* physenv,PyTypeObject *T) :
- PyObjectPlus(T),
+ PHY_IPhysicsEnvironment* physenv) :
+ PyObjectPlus(),
m_vehicle(vehicle),
m_physenv(physenv)
{
@@ -127,13 +127,13 @@ PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* args)
PyObject* KX_VehicleWrapper::PyGetNumWheels(PyObject* args)
{
- return PyInt_FromLong(m_vehicle->GetNumWheels());
+ return PyLong_FromSsize_t(m_vehicle->GetNumWheels());
}
PyObject* KX_VehicleWrapper::PyGetConstraintId(PyObject* args)
{
- return PyInt_FromLong(m_vehicle->GetUserConstraintId());
+ return PyLong_FromSsize_t(m_vehicle->GetUserConstraintId());
}
@@ -264,7 +264,7 @@ PyObject* KX_VehicleWrapper::PySetSteeringValue(PyObject* args)
PyObject* KX_VehicleWrapper::PyGetConstraintType(PyObject* args)
{
- return PyInt_FromLong(m_vehicle->GetUserConstraintType());
+ return PyLong_FromSsize_t(m_vehicle->GetUserConstraintType());
}
@@ -289,35 +289,17 @@ PyTypeObject KX_VehicleWrapper::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_VehicleWrapper::Parents[] = {
- &KX_VehicleWrapper::Type,
- &PyObjectPlus::Type,
- NULL
-};
-
-PyObject* KX_VehicleWrapper::py_getattro(PyObject *attr)
-{
- //here you can search for existing data members (like mass,friction etc.)
- py_getattro_up(PyObjectPlus);
-}
-
-PyObject* KX_VehicleWrapper::py_getattro_dict() {
- py_getattro_dict_up(PyObjectPlus);
-}
-
-int KX_VehicleWrapper::py_setattro(PyObject *attr,PyObject* value)
-{
- py_setattro_up(PyObjectPlus);
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &PyObjectPlus::Type,
+ 0,0,0,0,0,0,
+ py_base_new
};
-
PyMethodDef KX_VehicleWrapper::Methods[] = {
{"addWheel",(PyCFunction) KX_VehicleWrapper::sPyAddWheel, METH_VARARGS},
{"getNumWheels",(PyCFunction) KX_VehicleWrapper::sPyGetNumWheels, METH_VARARGS},
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.h b/source/gameengine/Ketsji/KX_VehicleWrapper.h
index c2b5e3d9251..d7f2da5cd7c 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.h
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.h
@@ -12,14 +12,11 @@ class PHY_IMotionState;
class KX_VehicleWrapper : public PyObjectPlus
{
Py_Header;
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
std::vector<PHY_IMotionState*> m_motionStates;
public:
- KX_VehicleWrapper(PHY_IVehicle* vehicle,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
+ KX_VehicleWrapper(PHY_IVehicle* vehicle,class PHY_IPhysicsEnvironment* physenv);
virtual ~KX_VehicleWrapper ();
int getConstraintId();
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index 4b0ad083473..cb8c891969d 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -53,18 +53,15 @@ PyTypeObject KX_VertexProxy::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-};
-
-PyParentObject KX_VertexProxy::Parents[] = {
- &KX_VertexProxy::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&CValue::Type,
- &PyObjectPlus::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
PyMethodDef KX_VertexProxy::Methods[] = {
@@ -85,37 +82,38 @@ PyMethodDef KX_VertexProxy::Methods[] = {
PyAttributeDef KX_VertexProxy::Attributes[] = {
//KX_PYATTRIBUTE_TODO("DummyProps"),
-
+
KX_PYATTRIBUTE_DUMMY("x"),
KX_PYATTRIBUTE_DUMMY("y"),
KX_PYATTRIBUTE_DUMMY("z"),
-
+
KX_PYATTRIBUTE_DUMMY("r"),
KX_PYATTRIBUTE_DUMMY("g"),
KX_PYATTRIBUTE_DUMMY("b"),
KX_PYATTRIBUTE_DUMMY("a"),
-
+
KX_PYATTRIBUTE_DUMMY("u"),
KX_PYATTRIBUTE_DUMMY("v"),
-
+
KX_PYATTRIBUTE_DUMMY("u2"),
KX_PYATTRIBUTE_DUMMY("v2"),
-
+
KX_PYATTRIBUTE_DUMMY("XYZ"),
KX_PYATTRIBUTE_DUMMY("UV"),
-
+
KX_PYATTRIBUTE_DUMMY("color"),
KX_PYATTRIBUTE_DUMMY("colour"),
-
+
KX_PYATTRIBUTE_DUMMY("normal"),
-
+
{ NULL } //Sentinel
};
+#if 0
PyObject*
KX_VertexProxy::py_getattro(PyObject *attr)
{
- char *attr_str= PyString_AsString(attr);
+ char *attr_str= _PyUnicode_AsString(attr);
if (attr_str[1]=='\0') { // Group single letters
// pos
if (attr_str[0]=='x')
@@ -141,8 +139,8 @@ KX_VertexProxy::py_getattro(PyObject *attr)
if (attr_str[0]=='v')
return PyFloat_FromDouble(m_vertex->getUV1()[1]);
}
-
-
+
+
if (!strcmp(attr_str, "XYZ"))
return PyObjectFrom(MT_Vector3(m_vertex->getXYZ()));
@@ -156,22 +154,21 @@ KX_VertexProxy::py_getattro(PyObject *attr)
color /= 255.0;
return PyObjectFrom(color);
}
-
+
if (!strcmp(attr_str, "normal"))
{
return PyObjectFrom(MT_Vector3(m_vertex->getNormal()));
}
-
+
py_getattro_up(CValue);
}
+#endif
-PyObject* KX_VertexProxy::py_getattro_dict() {
- py_getattro_dict_up(CValue);
-}
+#if 0
int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
{
- char *attr_str= PyString_AsString(attr);
+ char *attr_str= _PyUnicode_AsString(attr);
if (PySequence_Check(pyvalue))
{
if (!strcmp(attr_str, "XYZ"))
@@ -185,7 +182,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
}
return PY_SET_ATTR_FAIL;
}
-
+
if (!strcmp(attr_str, "UV"))
{
MT_Point2 vec;
@@ -197,7 +194,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
}
return PY_SET_ATTR_FAIL;
}
-
+
if (!strcmp(attr_str, "color") || !strcmp(attr_str, "colour"))
{
MT_Vector4 vec;
@@ -209,7 +206,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
}
return PY_SET_ATTR_FAIL;
}
-
+
if (!strcmp(attr_str, "normal"))
{
MT_Vector3 vec;
@@ -222,7 +219,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
return PY_SET_ATTR_FAIL;
}
}
-
+
if (PyFloat_Check(pyvalue))
{
float val = PyFloat_AsDouble(pyvalue);
@@ -235,7 +232,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
m_mesh->SetMeshModified(true);
return PY_SET_ATTR_SUCCESS;
}
-
+
if (!strcmp(attr_str, "y"))
{
pos.y() = val;
@@ -243,7 +240,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
m_mesh->SetMeshModified(true);
return PY_SET_ATTR_SUCCESS;
}
-
+
if (!strcmp(attr_str, "z"))
{
pos.z() = val;
@@ -251,7 +248,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
m_mesh->SetMeshModified(true);
return PY_SET_ATTR_SUCCESS;
}
-
+
// uv
MT_Point2 uv = m_vertex->getUV1();
if (!strcmp(attr_str, "u"))
@@ -287,7 +284,7 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
m_mesh->SetMeshModified(true);
return PY_SET_ATTR_SUCCESS;
}
-
+
// col
unsigned int icol = *((const unsigned int *)m_vertex->getRGBA());
unsigned char *cp = (unsigned char*) &icol;
@@ -321,9 +318,10 @@ int KX_VertexProxy::py_setattro(PyObject *attr, PyObject *pyvalue)
return PY_SET_ATTR_SUCCESS;
}
}
-
+
return CValue::py_setattro(attr, pyvalue);
}
+#endif
KX_VertexProxy::KX_VertexProxy(KX_MeshProxy*mesh, RAS_TexVert* vertex)
: m_vertex(vertex),
@@ -339,7 +337,7 @@ KX_VertexProxy::~KX_VertexProxy()
// stuff for cvalue related things
CValue* KX_VertexProxy::Calc(VALUE_OPERATOR, CValue *) { return NULL;}
-CValue* KX_VertexProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
+CValue* KX_VertexProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
STR_String sVertexName="vertex";
const STR_String & KX_VertexProxy::GetText() {return sVertexName;};
double KX_VertexProxy::GetNumber() { return -1;}
@@ -348,7 +346,7 @@ void KX_VertexProxy::SetName(const char *) { };
CValue* KX_VertexProxy::GetReplica() { return NULL;}
// stuff for python integration
-
+
PyObject* KX_VertexProxy::PyGetXYZ()
{
return PyObjectFrom(MT_Point3(m_vertex->getXYZ()));
@@ -359,7 +357,7 @@ PyObject* KX_VertexProxy::PySetXYZ(PyObject* value)
MT_Point3 vec;
if (!PyVecTo(value, vec))
return NULL;
-
+
m_vertex->SetXYZ(vec);
m_mesh->SetMeshModified(true);
Py_RETURN_NONE;
@@ -375,7 +373,7 @@ PyObject* KX_VertexProxy::PySetNormal(PyObject* value)
MT_Vector3 vec;
if (!PyVecTo(value, vec))
return NULL;
-
+
m_vertex->SetNormal(vec);
m_mesh->SetMeshModified(true);
Py_RETURN_NONE;
@@ -385,18 +383,18 @@ PyObject* KX_VertexProxy::PySetNormal(PyObject* value)
PyObject* KX_VertexProxy::PyGetRGBA()
{
int *rgba = (int *) m_vertex->getRGBA();
- return PyInt_FromLong(*rgba);
+ return PyLong_FromSsize_t(*rgba);
}
PyObject* KX_VertexProxy::PySetRGBA(PyObject* value)
{
- if PyInt_Check(value) {
- int rgba = PyInt_AsLong(value);
+ if PyLong_Check(value) {
+ int rgba = PyLong_AsSsize_t(value);
m_vertex->SetRGBA(rgba);
m_mesh->SetMeshModified(true);
Py_RETURN_NONE;
}
- else {
+ else {
MT_Vector4 vec;
if (PyVecTo(value, vec))
{
@@ -405,7 +403,7 @@ PyObject* KX_VertexProxy::PySetRGBA(PyObject* value)
Py_RETURN_NONE;
}
}
-
+
PyErr_SetString(PyExc_TypeError, "vert.setRGBA(value): KX_VertexProxy, expected a 4D vector or an int");
return NULL;
}
@@ -421,7 +419,7 @@ PyObject* KX_VertexProxy::PySetUV(PyObject* value)
MT_Point2 vec;
if (!PyVecTo(value, vec))
return NULL;
-
+
m_vertex->SetUV(vec);
m_mesh->SetMeshModified(true);
Py_RETURN_NONE;
@@ -436,14 +434,14 @@ PyObject* KX_VertexProxy::PySetUV2(PyObject* args)
{
MT_Point2 vec;
unsigned int unit= RAS_TexVert::SECOND_UV;
-
+
PyObject* list= NULL;
if(!PyArg_ParseTuple(args, "O|i:setUV2", &list, &unit))
return NULL;
-
+
if (!PyVecTo(list, vec))
return NULL;
-
+
m_vertex->SetFlag((m_vertex->getFlag()|RAS_TexVert::SECOND_UV));
m_vertex->SetUnit(unit);
m_vertex->SetUV2(vec);
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.h b/source/gameengine/Ketsji/KX_VertexProxy.h
index 42db5fbc322..13c57e9f556 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.h
+++ b/source/gameengine/Ketsji/KX_VertexProxy.h
@@ -53,9 +53,6 @@ public:
// stuff for python integration
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
KX_PYMETHOD_NOARGS(KX_VertexProxy,GetXYZ);
KX_PYMETHOD_O(KX_VertexProxy,SetXYZ);
diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
index d848065ad73..3561ccde9d9 100644
--- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
+++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
@@ -39,10 +39,9 @@ KX_VisibilityActuator::KX_VisibilityActuator(
SCA_IObject* gameobj,
bool visible,
bool occlusion,
- bool recursive,
- PyTypeObject* T
+ bool recursive
)
- : SCA_IActuator(gameobj,T),
+ : SCA_IActuator(gameobj),
m_visible(visible),
m_occlusion(occlusion),
m_recursive(recursive)
@@ -108,25 +107,18 @@ PyTypeObject KX_VisibilityActuator::Type = {
0,
0,
py_base_repr,
- 0,0,0,0,0,0,
- py_base_getattro,
- py_base_setattro,
0,0,0,0,0,0,0,0,0,
- Methods
-
-};
-
-PyParentObject
-KX_VisibilityActuator::Parents[] = {
- &KX_VisibilityActuator::Type,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
&SCA_IActuator::Type,
- &SCA_ILogicBrick::Type,
- &CValue::Type,
- NULL
+ 0,0,0,0,0,0,
+ py_base_new
};
-PyMethodDef
-KX_VisibilityActuator::Methods[] = {
+PyMethodDef KX_VisibilityActuator::Methods[] = {
// Deprecated ----->
{"set", (PyCFunction) KX_VisibilityActuator::sPySetVisible, METH_VARARGS,
(PY_METHODCHAR) SetVisible_doc},
@@ -141,21 +133,6 @@ PyAttributeDef KX_VisibilityActuator::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject* KX_VisibilityActuator::py_getattro(PyObject *attr)
-{
- py_getattro_up(SCA_IActuator);
-}
-
-PyObject* KX_VisibilityActuator::py_getattro_dict() {
- py_getattro_dict_up(SCA_IActuator);
-}
-
-int KX_VisibilityActuator::py_setattro(PyObject *attr, PyObject *value)
-{
- py_setattro_up(SCA_IActuator);
-}
-
-
/* set visibility ---------------------------------------------------------- */
const char
KX_VisibilityActuator::SetVisible_doc[] =
diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.h b/source/gameengine/Ketsji/KX_VisibilityActuator.h
index 45aba50f645..3ad50c6cea2 100644
--- a/source/gameengine/Ketsji/KX_VisibilityActuator.h
+++ b/source/gameengine/Ketsji/KX_VisibilityActuator.h
@@ -48,9 +48,7 @@ class KX_VisibilityActuator : public SCA_IActuator
SCA_IObject* gameobj,
bool visible,
bool occlusion,
- bool recursive,
- PyTypeObject* T=&Type
- );
+ bool recursive);
virtual
~KX_VisibilityActuator(
@@ -69,10 +67,6 @@ class KX_VisibilityActuator : public SCA_IActuator
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* py_getattro(PyObject *attr);
- virtual PyObject* py_getattro_dict();
- virtual int py_setattro(PyObject *attr, PyObject *value);
-
// Deprecated ----->
KX_PYMETHOD_DOC_VARARGS(KX_VisibilityActuator,SetVisible);
// <-----
diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile
index bdc0b335b02..8e91eb6ff9a 100644
--- a/source/gameengine/Ketsji/Makefile
+++ b/source/gameengine/Ketsji/Makefile
@@ -41,10 +41,10 @@ CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
CPPFLAGS += -I../../blender/python
-CPPFLAGS += -I../../blender/python/api2_2x
+CPPFLAGS += -I../../blender/python/generic
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_SOLID)/include
CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I../Rasterizer/RAS_OpenGLRasterizer
@@ -54,14 +54,11 @@ CPPFLAGS += -I../../kernel/gen_system
CPPFLAGS += -I../Network -IKXNetwork
CPPFLAGS += -I../Physics/common
CPPFLAGS += -I../Physics/Dummy
-CPPFLAGS += -I../Physics/Sumo
-CPPFLAGS += -I../Physics/BlOde
CPPFLAGS += -I../Physics/Bullet
CPPFLAGS += -I.
CPPFLAGS += -I../Converter
CPPFLAGS += -I../../blender/blenkernel
CPPFLAGS += -I../../blender/blenlib
-CPPFLAGS += -I../../blender/editors/include
CPPFLAGS += -I../../blender/makesdna
CPPFLAGS += -I../../blender/imbuf
CPPFLAGS += -I../../blender/gpu
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 5ab15c9eab3..b09267b79ff 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -6,32 +6,7 @@ Import ('env')
sources = env.Glob('*.cpp')
defs = ''
-# XXX 2.5
-# Mathutils C files.
-"""
-if not env['BF_PYTHON_VERSION'].startswith('3'):
- # TODO - py3 support
- sources.extend([\
- '#source/blender/python/api2_2x/Mathutils.c',\
- '#source/blender/python/api2_2x/Geometry.c',\
- '#source/blender/python/api2_2x/euler.c',\
- '#source/blender/python/api2_2x/matrix.c',\
- '#source/blender/python/api2_2x/quat.c',\
- '#source/blender/python/api2_2x/vector.c',\
- '#source/blender/python/api2_2x/constant.c',\
- ])
-
- sources.extend([\
- '#source/blender/python/api2_2x/BGL.c'
- ])
-
-sources.extend([\
- '#source/blender/python/api2_2x/bpy_internal_import.c'
-])
-"""
-
-
-incs = '. #source/blender/python/api2_2x' # Only for Mathutils! and bpy_internal_import.h, be very careful
+incs = '. #source/blender/python/generic' # Only for Mathutils! and bpy_internal_import.h, be very careful
incs += ' #source/kernel/gen_system #intern/string #intern/guardedalloc'
incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer'
@@ -43,16 +18,9 @@ incs += ' #source/blender/blenkernel #source/blender #source/blender/editors/inc
incs += ' #source/blender/makesdna #source/blender/python #source/gameengine/Rasterizer'
incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/gameengine/Network'
incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
-incs += ' #source/gameengine/Physics/BlOde #source/gameengine/Physics/Dummy'
+incs += ' #source/gameengine/Physics/Dummy'
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
-if env['WITH_BF_SOLID']:
- incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include'
- incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
- incs += ' ' + env['BF_SOLID_INC']
- defs += ' USE_SUMO_SOLID'
-
-
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
diff --git a/source/gameengine/Physics/BlOde/Makefile b/source/gameengine/Physics/BlOde/Makefile
deleted file mode 100644
index 1fbbf198377..00000000000
--- a/source/gameengine/Physics/BlOde/Makefile
+++ /dev/null
@@ -1,48 +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 = blode
-DIR = $(OCGDIR)/gameengine/blphys/$(LIBNAME)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO)/include -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_ODE)/include
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-CPPFLAGS += -I../../Physics/common
-CPPFLAGS += -I../../Physics/Dummy
-# nlin: fix this, should put in NAN_ODE dir
-#CPPFLAGS += -I./ode/ode/include
diff --git a/source/gameengine/Physics/BlOde/OdePhysicsController.cpp b/source/gameengine/Physics/BlOde/OdePhysicsController.cpp
deleted file mode 100644
index 5efd0994311..00000000000
--- a/source/gameengine/Physics/BlOde/OdePhysicsController.cpp
+++ /dev/null
@@ -1,625 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#define USE_ODE
-#ifdef USE_ODE
-
-#include "OdePhysicsController.h"
-#include "PHY_IMotionState.h"
-
-#include <ode/ode.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-///////////////////////////////////////////////////////////////////////////
-//
-// general to-do list for ODE physics. This is maintained in doxygen format.
-//
-/// \todo determine assignment time for bounding spheres.
-///
-/// it appears you have to select "sphere" for bounding volume AND "draw bounds"
-/// in order for a bounding sphere to be generated. otherwise a box is generated.
-/// determine exactly when and how the bounding volumes are generated and make
-/// this consistent.
-/// }
-///
-/// \todo bounding sphere size incorrect
-///
-/// it appears NOT to use the size of the shown bounding sphere (button "draw bounds").
-/// it appears instead to use the size of the "size" dynamic parameter in the
-/// gamebuttons but this "size" draws an incorrectly-sized circle on screen for the
-/// bounding sphere (leftover skewed size calculation from sumo?) so figure out WHERE
-/// its getting the radius from.
-///
-/// \todo ODE collisions must fire collision actuator
-///
-/// See OdePhysicsEnvironment::OdeNearCallback. If a sensor was created to check
-/// for the presence of this collision, then in the NearCallback you need to
-/// take appropriate action regarding the sensor - something like checking its
-/// controller and if needed firing its actuator. Need to find similar code in
-/// Fuzzics which fires collision controllers/actuators.
-///
-/// \todo Are ghost collisions possible?
-///
-/// How do ghost collisions work? Do they require collision detection through ODE
-/// and NON-CREATION of contact-joint in OdeNearCallback? Currently OdeNearCallback
-/// creates joints ALWAYS for collisions.
-///
-/// \todo Why is KX_GameObject::addLinearVelocity commented out?
-///
-/// Try putting this code back in.
-///
-/// \todo Too many non-dynamic actors bogs down ODE physics
-///
-/// Lots of "geoms" (ODE static geometry) probably slows down ode. Try a test file
-/// with lots of static geometry - the game performance in Blender says it is
-/// spending all its time in physics, and I bet all that time is in collision
-/// detection. It's ode's non-hierarchical collision detection.
-/// try making a separate ode test program (not within blender) with 1000 geoms and
-/// see how fast it is. if it is really slow, there is the culprit.
-/// isnt someone working on an improved ODE collision detector? check
-/// ode mailing list.
-///
-///
-/// \todo support collision of dynas with non-dynamic triangle meshes
-///
-/// ODE has trimesh-collision support but only for trimeshes without a transform
-/// matrix. update ODE tricollider to support a transform matrix. this will allow
-/// moving trimeshes non-dynamically (e.g. through Ipos). then collide trimeshes
-/// with dynas. this allows dynamic primitives (spheres, boxes) to collide with
-/// non-dynamic or kinematically controlled tri-meshes. full dynamic trimesh to
-/// dynamic trimesh support is hard because it requires (a) collision and penetration
-/// depth for trimesh to trimesh and (hard to compute) (b) an intertia tensor
-/// (easy to compute).
-///
-/// a triangle mesh collision geometry should be created when the blender
-/// bounding volume (F9, EDITBUTTONS) is set to "polyheder", since this is
-/// currently the place where sphere/box selection is made
-///
-/// \todo specify ODE ERP+CFM in blender interface
-///
-/// when ODE physics selected, have to be able to set global cfm and erp.
-/// per-joint erp/cfm could be handled in constraint window.
-///
-/// \todo moving infinite mass objects should impart extra impulse to objects they collide with
-///
-/// currently ODE's ERP pushes them apart but doesn't account for their motion.
-/// you have to detect if one body in a collision is a non-dyna. This
-/// requires adding a new accessor method to
-/// KX_IPhysicsInterfaceController to access the hidden m_isDyna variable,
-/// currently it can only be written, not read). If one of the bodies in a
-/// collision is a non-dyna, then impart an extra impulse based on the
-/// motion of the static object (using its last 2 frames as an approximation
-/// of its linear and angular velocity). Linear velocity is easy to
-/// approximate, but angular? you have orientation at this frame and
-/// orientation at previous frame. The question is what is the angular
-/// velocity which would have taken you from the previous frame's orientation
-/// to this frame's orientation?
-///
-/// \todo allow tweaking bounding volume size
-///
-/// the scene converter currently uses the blender bounding volume of the selected
-/// object as the geometry for ODE collision purposes. this is good and automatic
-/// intuitive - lets you choose between cube, sphere, mesh. but you need to be able
-/// to tweak this size for physics.
-///
-/// \todo off center meshes totally wrong for ode
-///
-/// ode uses x, y, z extents regradless of center. then places geom at center of object.
-/// but visual geom is not necessarily at center. need to detect off-center situations.
-/// then do what? treat it as an encapsulated off-center mass, or recenter it?
-///
-/// i.o.w. recalculate center, or recalculate mass distribution (using encapsulation)?
-///
-/// \todo allow off-center mass
-///
-/// using ode geometry encapsulators
-///
-/// \todo allow entering compound geoms for complex collision shapes specified as a union of simpler shapes
-///
-/// The collision shape for arbitrary triangle meshes can probably in general be
-///well approximated by a compound ODE geometry object, which is merely a combination
-///of many primitives (capsule, sphere, box). I eventually want to add the ability
-///to associate compound geometry objects with Blender gameobjects. I think one
-///way of doing this would be to add a new button in the GameButtons, "RigidBodyCompound".
-///If the object is "Dynamic" + "RigidBody", then the object's bounding volume (sphere,
-///box) is created. If an object is "Dynamic" + "RigidBodyCompound", then the object itself
-///will merely create a "wrapper" compound object, with the actual geometry objects
-///being created from the object's children in Blender. E.g. if I wanted to make a
-///compound collision object consisting of a sphere and 2 boxes, I would create a
-///parent gameobject with the actual triangle mesh, and set its GameButtons to
-///"RigidBodyCompound". I would then create 3 children of this object, 1 sphere and
-///2 boxes, and set the GameButtons for the children to be "RigidBody". Then at
-///scene conversion time, the scene converter sees "RigidBodyCompound" for the
-///top-level object, then appropriately traverses the children and creates the compound
-///collision geometry consisting of 2 boxes and a sphere. In this way, arbitrary
-///mesh-mesh collision becomes much less necessary - the artist can (or must,
-///depending on your point of view!) approximate the collision shape for arbitrary
-///meshes with a combination of one or more primitive shapes. I think using the
-///parent/child relationship in Blender and a new button "RigidBodyCompound" for the
-///parent object of a compound is a feasible way of doing this in Blender.
-///
-///See ODE demo test_boxstack and look at the code when you drop a compound object
-///with the "X" key.
-///
-/// \todo add visual specification of constraints
-///
-/// extend the armature constraint system. by using empties and constraining one empty
-/// to "copy location" of another, you can get a p2p constraint between the two empties.
-/// by making the two empties each a parent of a blender object, you effectively have
-/// a p2p constraint between 2 blender bodies. the scene converter can detect these
-/// empties, detect the constraint, and generate an ODE constraint.
-///
-/// then add a new constraint type "hinge" and "slider" to correspond to ODE joints.
-/// e.g. a slider would be a constraint which restricts the axis of its object to lie
-/// along the same line as another axis of a different object. e.g. you constrain x-axis
-/// of one empty to lie along the same line as the z-axis of another empty; this gives
-/// a slider joint.
-///
-/// open questions: how to handle powered joints? to what extent should/must constraints
-/// be enforced during modeling? use CCD-style algorithm in modeler to enforce constraints?
-/// how about ODE powered constraints e.g. motors?
-///
-/// \todo enable suspension of bodies
-/// ODE offers native support for suspending dynas. but what about suspending non-dynas
-/// (e.g. geoms)? suspending geoms is also necessary to ease the load of ODE's (simple?)
-/// collision detector. suspending dynas and geoms is important for the activity culling,
-/// which apparently works at a simple level. perhaps suspension should actually
-/// remove or insert geoms/dynas into the ODE space/world? is this operation (insertion/
-/// removal) fast enough at run-time? test it. if fast enough, then suspension=remove from
-/// ODE simulation, awakening=insertion into ODE simulation.
-///
-/// \todo python interface for tweaking constraints via python
-///
-/// \todo raytesting to support gameengine sensors that need it
-///
-/// \todo investigate compatibility issues with old Blender 2.25 physics engine (sumo/fuzzics)
-/// is it possible to have compatibility? how hard is it? how important is it?
-
-
-ODEPhysicsController::ODEPhysicsController(bool dyna, bool fullRigidBody,
- bool phantom, class PHY_IMotionState* motionstate, struct dxSpace* space,
- struct dxWorld* world, float mass,float friction,float restitution,
- bool implicitsphere,float center[3],float extents[3],float radius)
- :
- m_OdeDyna(dyna),
- m_firstTime(true),
- m_bFullRigidBody(fullRigidBody),
- m_bPhantom(phantom),
- m_bKinematic(false),
- m_bPrevKinematic(false),
- m_MotionState(motionstate),
- m_OdeSuspendDynamics(false),
- m_space(space),
- m_world(world),
- m_mass(mass),
- m_friction(friction),
- m_restitution(restitution),
- m_bodyId(0),
- m_geomId(0),
- m_implicitsphere(implicitsphere),
- m_radius(radius)
-{
- m_center[0] = center[0];
- m_center[1] = center[1];
- m_center[2] = center[2];
- m_extends[0] = extents[0];
- m_extends[1] = extents[1];
- m_extends[2] = extents[2];
-};
-
-
-ODEPhysicsController::~ODEPhysicsController()
-{
- if (m_geomId)
- {
- dGeomDestroy (m_geomId);
- }
-}
-
-float ODEPhysicsController::getMass()
-{
- dMass mass;
- dBodyGetMass(m_bodyId,&mass);
- return mass.mass;
-}
-
-//////////////////////////////////////////////////////////////////////
-/// \todo Impart some extra impulse to dynamic objects when they collide with kinematically controlled "static" objects (ODE geoms), by using last 2 frames as 1st order approximation to the linear/angular velocity, and computing an appropriate impulse. Sumo (old physics engine) did this, see for details.
-/// \todo handle scaling of static ODE geoms or fail with error message if Ipo tries to change scale of a static geom object
-
-bool ODEPhysicsController::SynchronizeMotionStates(float time)
-{
- /**
- 'Late binding' of the rigidbody, because the World Scaling is not available until the scenegraph is traversed
- */
-
-
- if (m_firstTime)
- {
- m_firstTime=false;
-
- m_MotionState->calculateWorldTransformations();
-
- dQuaternion worldquat;
- float worldpos[3];
-
-#ifdef dDOUBLE
- m_MotionState->getWorldOrientation((float)worldquat[1],
- (float)worldquat[2],(float)worldquat[3],(float)worldquat[0]);
-#else
- m_MotionState->getWorldOrientation(worldquat[1],
- worldquat[2],worldquat[3],worldquat[0]);
-#endif
- m_MotionState->getWorldPosition(worldpos[0],worldpos[1],worldpos[2]);
-
- float scaling[3];
- m_MotionState->getWorldScaling(scaling[0],scaling[1],scaling[2]);
-
- if (!m_bPhantom)
- {
- if (m_implicitsphere)
- {
- m_geomId = dCreateSphere (m_space,m_radius*scaling[0]);
- } else
- {
- m_geomId = dCreateBox (m_space, m_extends[0]*scaling[0],m_extends[1]*scaling[1],m_extends[2]*scaling[2]);
- }
- } else
- {
- m_geomId=0;
- }
-
- if (m_geomId)
- dGeomSetData(m_geomId,this);
-
- if (!this->m_OdeDyna)
- {
- if (!m_bPhantom)
- {
- dGeomSetPosition (this->m_geomId,worldpos[0],worldpos[1],worldpos[2]);
- dMatrix3 R;
- dQtoR (worldquat, R);
- dGeomSetRotation (this->m_geomId,R);
- }
- } else
- {
- //it's dynamic, so create a 'model'
- m_bodyId = dBodyCreate(this->m_world);
- dBodySetPosition (m_bodyId,worldpos[0],worldpos[1],worldpos[2]);
- dBodySetQuaternion (this->m_bodyId,worldquat);
- //this contains both scalar mass and inertia tensor
- dMass m;
- float length=1,width=1,height=1;
- dMassSetBox (&m,1,m_extends[0]*scaling[0],m_extends[1]*scaling[1],m_extends[2]*scaling[2]);
- dMassAdjust (&m,this->m_mass);
- dBodySetMass (m_bodyId,&m);
-
- if (!m_bPhantom)
- {
- dGeomSetBody (m_geomId,m_bodyId);
- }
-
-
- }
-
- if (this->m_OdeDyna && !m_bFullRigidBody)
- {
- // ?? huh? what to do here?
- }
- }
-
-
-
- if (m_OdeDyna)
- {
- if (this->m_OdeSuspendDynamics)
- {
- return false;
- }
-
- const float* worldPos = (float *)dBodyGetPosition(m_bodyId);
- m_MotionState->setWorldPosition(worldPos[0],worldPos[1],worldPos[2]);
-
- const float* worldquat = (float *)dBodyGetQuaternion(m_bodyId);
- m_MotionState->setWorldOrientation(worldquat[1],worldquat[2],worldquat[3],worldquat[0]);
- }
- else {
- // not a dyna, so dynamics (i.e. this controller) has not updated
- // anything. BUT! an Ipo or something else might have changed the
- // position/orientation of this geometry.
- // so update the static geom position
-
- /// \todo impart some extra impulse to colliding objects!
- dQuaternion worldquat;
- float worldpos[3];
-
-#ifdef dDOUBLE
- m_MotionState->getWorldOrientation((float)worldquat[1],
- (float)worldquat[2],(float)worldquat[3],(float)worldquat[0]);
-#else
- m_MotionState->getWorldOrientation(worldquat[1],
- worldquat[2],worldquat[3],worldquat[0]);
-#endif
- m_MotionState->getWorldPosition(worldpos[0],worldpos[1],worldpos[2]);
-
- float scaling[3];
- m_MotionState->getWorldScaling(scaling[0],scaling[1],scaling[2]);
-
- /// \todo handle scaling! what if Ipo changes scale of object?
- // Must propagate to geom... is scaling geoms possible with ODE? Also
- // what about scaling trimeshes, that is certainly difficult...
- dGeomSetPosition (this->m_geomId,worldpos[0],worldpos[1],worldpos[2]);
- dMatrix3 R;
- dQtoR (worldquat, R);
- dGeomSetRotation (this->m_geomId,R);
- }
-
- return false; //it update the worldpos
-}
-
-PHY_IMotionState* ODEPhysicsController::GetMotionState()
-{
- return m_MotionState;
-}
-
-
-// kinematic methods
-void ODEPhysicsController::RelativeTranslate(float dlocX,float dlocY,float dlocZ,bool local)
-{
-
-}
-void ODEPhysicsController::RelativeRotate(const float drot[9],bool local)
-{
-}
-void ODEPhysicsController::setOrientation(float quatImag0,float quatImag1,float quatImag2,float quatReal)
-{
-
- dQuaternion worldquat;
- worldquat[0] = quatReal;
- worldquat[1] = quatImag0;
- worldquat[2] = quatImag1;
- worldquat[3] = quatImag2;
-
- if (!this->m_OdeDyna)
- {
- dMatrix3 R;
- dQtoR (worldquat, R);
- dGeomSetRotation (this->m_geomId,R);
- } else
- {
- dBodySetQuaternion (m_bodyId,worldquat);
- this->m_MotionState->setWorldOrientation(quatImag0,quatImag1,quatImag2,quatReal);
- }
-
-}
-
-void ODEPhysicsController::getOrientation(float &quatImag0,float &quatImag1,float &quatImag2,float &quatReal)
-{
- float q[4];
- this->m_MotionState->getWorldOrientation(q[0],q[1],q[2],q[3]);
- quatImag0=q[0];
- quatImag1=q[1];
- quatImag2=q[2];
- quatReal=q[3];
-}
-
-void ODEPhysicsController::getPosition(PHY__Vector3& pos) const
-{
- m_MotionState->getWorldPosition(pos[0],pos[1],pos[2]);
-
-}
-
-void ODEPhysicsController::setPosition(float posX,float posY,float posZ)
-{
- if (!m_bPhantom)
- {
- if (!this->m_OdeDyna)
- {
- dGeomSetPosition (m_geomId, posX, posY, posZ);
- } else
- {
- dBodySetPosition (m_bodyId, posX, posY, posZ);
- }
- }
-}
-void ODEPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
-{
-}
-
-// physics methods
-void ODEPhysicsController::ApplyTorque(float torqueX,float torqueY,float torqueZ,bool local)
-{
- if (m_OdeDyna) {
- if(local) {
- dBodyAddRelTorque(m_bodyId, torqueX, torqueY, torqueZ);
- } else {
- dBodyAddTorque (m_bodyId, torqueX, torqueY, torqueZ);
- }
- }
-}
-
-void ODEPhysicsController::ApplyForce(float forceX,float forceY,float forceZ,bool local)
-{
- if (m_OdeDyna) {
- if(local) {
- dBodyAddRelForce(m_bodyId, forceX, forceY, forceZ);
- } else {
- dBodyAddForce (m_bodyId, forceX, forceY, forceZ);
- }
- }
-}
-
-void ODEPhysicsController::SetAngularVelocity(float ang_velX,float ang_velY,float ang_velZ,bool local)
-{
- if (m_OdeDyna) {
- if(local) {
- // TODO: translate angular vel into local frame, then apply
- } else {
- dBodySetAngularVel (m_bodyId, ang_velX,ang_velY,ang_velZ);
- }
- }
-}
-
-void ODEPhysicsController::SetLinearVelocity(float lin_velX,float lin_velY,float lin_velZ,bool local)
-{
- if (m_OdeDyna)
- {
- dVector3 vel = {lin_velX,lin_velY,lin_velZ, 1.0};
- if (local)
- {
- dMatrix3 worldmat;
- dVector3 localvel;
- dQuaternion worldquat;
-
-#ifdef dDOUBLE
- m_MotionState->getWorldOrientation((float)worldquat[1],
- (float)worldquat[2], (float)worldquat[3],(float)worldquat[0]);
-#else
- m_MotionState->getWorldOrientation(worldquat[1],worldquat[2],
- worldquat[3],worldquat[0]);
-#endif
- dQtoR (worldquat, worldmat);
-
- dMULTIPLY0_331 (localvel,worldmat,vel);
- dBodySetLinearVel (m_bodyId, localvel[0],localvel[1],localvel[2]);
-
- } else
- {
- dBodySetLinearVel (m_bodyId, lin_velX,lin_velY,lin_velZ);
- }
- }
-}
-
-void ODEPhysicsController::applyImpulse(float attachX,float attachY,float attachZ, float impulseX,float impulseY,float impulseZ)
-{
- if (m_OdeDyna)
- {
- //apply linear and angular effect
- const dReal* linvel = dBodyGetLinearVel(m_bodyId);
- float mass = getMass();
- if (mass >= 0.00001f)
- {
- float massinv = 1.f/mass;
- float newvel[3];
- newvel[0]=linvel[0]+impulseX*massinv;
- newvel[1]=linvel[1]+impulseY*massinv;
- newvel[2]=linvel[2]+impulseZ*massinv;
- dBodySetLinearVel(m_bodyId,newvel[0],newvel[1],newvel[2]);
-
- const float* worldPos = (float *)dBodyGetPosition(m_bodyId);
-
- const float* angvelc = (float *)dBodyGetAngularVel(m_bodyId);
- float angvel[3];
- angvel[0]=angvelc[0];
- angvel[1]=angvelc[1];
- angvel[2]=angvelc[2];
-
- dVector3 impulse;
- impulse[0]=impulseX;
- impulse[1]=impulseY;
- impulse[2]=impulseZ;
-
- dVector3 ap;
- ap[0]=attachX-worldPos[0];
- ap[1]=attachY-worldPos[1];
- ap[2]=attachZ-worldPos[2];
-
- dCROSS(angvel,+=,ap,impulse);
- dBodySetAngularVel(m_bodyId,angvel[0],angvel[1],angvel[2]);
-
- }
-
- }
-
-}
-
-void ODEPhysicsController::SuspendDynamics()
-{
-
-}
-
-void ODEPhysicsController::RestoreDynamics()
-{
-
-}
-
-
-/**
- reading out information from physics
-*/
-void ODEPhysicsController::GetLinearVelocity(float& linvX,float& linvY,float& linvZ)
-{
- if (m_OdeDyna)
- {
- const float* vel = (float *)dBodyGetLinearVel(m_bodyId);
- linvX = vel[0];
- linvY = vel[1];
- linvZ = vel[2];
- } else
- {
- linvX = 0.f;
- linvY = 0.f;
- linvZ = 0.f;
-
- }
-}
-/**
- GetVelocity parameters are in geometric coordinates (Origin is not center of mass!).
-*/
-void ODEPhysicsController::GetVelocity(const float posX,const float posY,const float posZ,float& linvX,float& linvY,float& linvZ)
-{
-
-}
-
-
-void ODEPhysicsController::getReactionForce(float& forceX,float& forceY,float& forceZ)
-{
-
-}
-void ODEPhysicsController::setRigidBody(bool rigid)
-{
-
-}
-
-
-void ODEPhysicsController::PostProcessReplica(class PHY_IMotionState* motionstate,class PHY_IPhysicsController* parentctrl)
-{
- m_MotionState = motionstate;
- m_bKinematic = false;
- m_bPrevKinematic = false;
- m_firstTime = true;
-}
-
-
-void ODEPhysicsController::SetSimulatedTime(float time)
-{
-}
-
-
-void ODEPhysicsController::WriteMotionStateToDynamics(bool nondynaonly)
-{
-
-}
-#endif
diff --git a/source/gameengine/Physics/BlOde/OdePhysicsController.h b/source/gameengine/Physics/BlOde/OdePhysicsController.h
deleted file mode 100644
index 544d11da2ca..00000000000
--- a/source/gameengine/Physics/BlOde/OdePhysicsController.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 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 __ODE_PHYSICSCONTROLLER_H
-#define __ODE_PHYSICSCONTROLLER_H
-
-
-#include "PHY_IPhysicsController.h"
-
-/**
- ODE Physics Controller, a special kind of a PhysicsController.
- A Physics Controller is a special kind of Scene Graph Transformation Controller.
- Each time the scene graph get's updated, the controller get's a chance
- in the 'Update' method to reflect changes.
-*/
-
-class ODEPhysicsController : public PHY_IPhysicsController
-
-{
-
- bool m_OdeDyna;
-
-public:
- ODEPhysicsController(
- bool dyna,
- bool fullRigidBody,
- bool phantom,
- class PHY_IMotionState* motionstate,
- struct dxSpace* space,
- struct dxWorld* world,
- float mass,
- float friction,
- float restitution,
- bool implicitsphere,
- float center[3],
- float extends[3],
- float radius);
-
- virtual ~ODEPhysicsController();
-
- // kinematic methods
- virtual void RelativeTranslate(float dlocX,float dlocY,float dlocZ,bool local);
- virtual void RelativeRotate(const float drot[9],bool local);
- virtual void getOrientation(float &quatImag0,float &quatImag1,float &quatImag2,float &quatReal);
- virtual void setOrientation(float quatImag0,float quatImag1,float quatImag2,float quatReal);
- virtual void setPosition(float posX,float posY,float posZ);
- virtual void getPosition(PHY__Vector3& pos) const;
-
- virtual void setScaling(float scaleX,float scaleY,float scaleZ);
-
- // physics methods
- virtual void ApplyTorque(float torqueX,float torqueY,float torqueZ,bool local);
- virtual void ApplyForce(float forceX,float forceY,float forceZ,bool local);
- virtual void SetAngularVelocity(float ang_velX,float ang_velY,float ang_velZ,bool local);
- virtual void SetLinearVelocity(float lin_velX,float lin_velY,float lin_velZ,bool local);
- virtual void applyImpulse(float attachX,float attachY,float attachZ, float impulseX,float impulseY,float impulseZ);
- virtual void SetActive(bool active){};
- virtual void SuspendDynamics();
- virtual void RestoreDynamics();
- virtual void resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ)
- {
- //todo ?
- }
-
-
- /**
- reading out information from physics
- */
- virtual void GetLinearVelocity(float& linvX,float& linvY,float& linvZ);
- /**
- GetVelocity parameters are in geometric coordinates (Origin is not center of mass!).
- */
- virtual void GetVelocity(const float posX,const float posY,const float posZ,float& linvX,float& linvY,float& linvZ);
- virtual float getMass();
- virtual void getReactionForce(float& forceX,float& forceY,float& forceZ);
- virtual void setRigidBody(bool rigid);
-
-
- virtual void PostProcessReplica(class PHY_IMotionState* motionstate,class PHY_IPhysicsController* parentctrl);
-
- // \todo remove next line !
- virtual void SetSimulatedTime(float time);
-
-
- virtual void WriteDynamicsToMotionState() {};
- virtual void WriteMotionStateToDynamics(bool nondynaonly);
- virtual class PHY_IMotionState* GetMotionState();
-
- /**
- call from Scene Graph Node to 'update'.
- */
- virtual bool SynchronizeMotionStates(float time);
-
- virtual void calcXform(){}
- virtual void SetMargin(float margin) {}
- virtual float GetMargin() const {return 0.f;}
- virtual float GetRadius() const {return 0.f;}
- virtual void SetRadius(float margin) {}
-
- // clientinfo for raycasts for example
- virtual void* getNewClientInfo() { return m_clientInfo;}
- virtual void setNewClientInfo(void* clientinfo) {m_clientInfo = clientinfo;};
- void* m_clientInfo;
-
- struct dxBody* GetOdeBodyId() { return m_bodyId; }
-
- float getFriction() { return m_friction;}
- float getRestitution() { return m_restitution;}
-
- float GetLinVelocityMin() const { return 0.f; }
- void SetLinVelocityMin(float val) { }
- float GetLinVelocityMax() const { return 0.f; }
- void SetLinVelocityMax(float val) { }
-
-
-private:
-
- bool m_firstTime;
- bool m_bFullRigidBody;
- bool m_bPhantom; // special flag for objects that are not affected by physics 'resolver'
-
- // data to calculate fake velocities for kinematic objects (non-dynas)
- bool m_bKinematic;
- bool m_bPrevKinematic;
-
-
- float m_lastTime;
- bool m_OdeSuspendDynamics;
- class PHY_IMotionState* m_MotionState;
-
- //Ode specific members
- struct dxBody* m_bodyId;
- struct dxGeom* m_geomId;
- struct dxSpace* m_space;
- struct dxWorld* m_world;
- float m_mass;
- float m_friction;
- float m_restitution;
- bool m_implicitsphere;
- float m_center[3];
- float m_extends[3];
- float m_radius;
-};
-
-#endif //__ODE_PHYSICSCONTROLLER_H
-
diff --git a/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp b/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
deleted file mode 100644
index 54e97858b7f..00000000000
--- a/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 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 "OdePhysicsEnvironment.h"
-#include "PHY_IMotionState.h"
-#include "OdePhysicsController.h"
-
-#include <ode/ode.h>
-#include <../ode/src/joint.h>
-#include <ode/odemath.h>
-
-ODEPhysicsEnvironment::ODEPhysicsEnvironment()
-{
- m_OdeWorld = dWorldCreate();
- m_OdeSpace = dHashSpaceCreate();
- m_OdeContactGroup = dJointGroupCreate (0);
- dWorldSetCFM (m_OdeWorld,1e-5f);
-
- m_JointGroup = dJointGroupCreate(0);
-
- setFixedTimeStep(true,1.f/60.f);
-}
-
-
-
-ODEPhysicsEnvironment::~ODEPhysicsEnvironment()
-{
- dJointGroupDestroy (m_OdeContactGroup);
- dJointGroupDestroy (m_JointGroup);
-
- dSpaceDestroy (m_OdeSpace);
- dWorldDestroy (m_OdeWorld);
-}
-
-
-
-void ODEPhysicsEnvironment::setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)
-{
- m_useFixedTimeStep = useFixedTimeStep;
-
- if (useFixedTimeStep)
- {
- m_fixedTimeStep = fixedTimeStep;
- } else
- {
- m_fixedTimeStep = 0.f;
- }
- m_currentTime = 0.f;
-
- //todo:implement fixed timestepping
-
-}
-float ODEPhysicsEnvironment::getFixedTimeStep()
-{
- return m_fixedTimeStep;
-}
-
-
-
-bool ODEPhysicsEnvironment::proceedDeltaTime(double curTime,float timeStep1,float interval)
-{
-
- float deltaTime = timeStep1;
- int numSteps = 1;
-
- if (m_useFixedTimeStep)
- {
- m_currentTime += timeStep1;
- // equal to subSampling (might be a little smaller).
- numSteps = (int)(m_currentTime / m_fixedTimeStep);
- m_currentTime -= m_fixedTimeStep * (float)numSteps;
- deltaTime = m_fixedTimeStep;
- //todo: experiment by smoothing the remaining time over the substeps
- }
-
- for (int i=0;i<numSteps;i++)
- {
- // ode collision update
- dSpaceCollide (m_OdeSpace,this,&ODEPhysicsEnvironment::OdeNearCallback);
-
- int m_odeContacts = GetNumOdeContacts();
-
- //physics integrator + resolver update
- //dWorldStep (m_OdeWorld,deltaTime);
- //dWorldQuickStep (m_OdeWorld,deltaTime);
- //dWorldID w, dReal stepsize)
-
- //clear collision points
- this->ClearOdeContactGroup();
- }
- return true;
-}
-
-void ODEPhysicsEnvironment::setGravity(float x,float y,float z)
-{
- dWorldSetGravity (m_OdeWorld,x,y,z);
-}
-
-
-
-int ODEPhysicsEnvironment::createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type,
- float pivotX,float pivotY,float pivotZ,float axisX,float axisY,float axisZ)
-{
-
- int constraintid = 0;
- ODEPhysicsController* dynactrl = (ODEPhysicsController*)ctrl;
- ODEPhysicsController* dynactrl2 = (ODEPhysicsController*)ctrl2;
-
- switch (type)
- {
- case PHY_POINT2POINT_CONSTRAINT:
- {
- if (dynactrl)
- {
- dJointID jointid = dJointCreateBall (m_OdeWorld,m_JointGroup);
- struct dxBody* bodyid1 = dynactrl->GetOdeBodyId();
- struct dxBody* bodyid2=0;
- const dReal* pos = dBodyGetPosition(bodyid1);
- const dReal* R = dBodyGetRotation(bodyid1);
- dReal offset[3] = {pivotX,pivotY,pivotZ};
- dReal newoffset[3];
- dMULTIPLY0_331 (newoffset,R,offset);
- newoffset[0] += pos[0];
- newoffset[1] += pos[1];
- newoffset[2] += pos[2];
-
-
- if (dynactrl2)
- bodyid2 = dynactrl2->GetOdeBodyId();
-
- dJointAttach (jointid, bodyid1, bodyid2);
-
- dJointSetBallAnchor (jointid, newoffset[0], newoffset[1], newoffset[2]);
-
- constraintid = (int) jointid;
- }
- break;
- }
- case PHY_LINEHINGE_CONSTRAINT:
- {
- if (dynactrl)
- {
- dJointID jointid = dJointCreateHinge (m_OdeWorld,m_JointGroup);
- struct dxBody* bodyid1 = dynactrl->GetOdeBodyId();
- struct dxBody* bodyid2=0;
- const dReal* pos = dBodyGetPosition(bodyid1);
- const dReal* R = dBodyGetRotation(bodyid1);
- dReal offset[3] = {pivotX,pivotY,pivotZ};
- dReal axisset[3] = {axisX,axisY,axisZ};
-
- dReal newoffset[3];
- dReal newaxis[3];
- dMULTIPLY0_331 (newaxis,R,axisset);
-
- dMULTIPLY0_331 (newoffset,R,offset);
- newoffset[0] += pos[0];
- newoffset[1] += pos[1];
- newoffset[2] += pos[2];
-
-
- if (dynactrl2)
- bodyid2 = dynactrl2->GetOdeBodyId();
-
- dJointAttach (jointid, bodyid1, bodyid2);
-
- dJointSetHingeAnchor (jointid, newoffset[0], newoffset[1], newoffset[2]);
- dJointSetHingeAxis(jointid,newaxis[0],newaxis[1],newaxis[2]);
-
- constraintid = (int) jointid;
- }
- break;
- }
- default:
- {
- //not yet
- }
- }
-
- return constraintid;
-
-}
-
-void ODEPhysicsEnvironment::removeConstraint(void *constraintid)
-{
- if (constraintid)
- {
- dJointDestroy((dJointID) constraintid);
- }
-}
-
-PHY_IPhysicsController* ODEPhysicsEnvironment::rayTest(PHY_IRayCastFilterCallback &filterCallback,float fromX,float fromY,float fromZ, float toX,float toY,float toZ)
-{
-
- //m_OdeWorld
- //collision detection / raytesting
- return NULL;
-}
-
-
-void ODEPhysicsEnvironment::OdeNearCallback (void *data, dGeomID o1, dGeomID o2)
-{
- // \todo if this is a registered collision sensor
- // fire the callback
-
- int i;
- // if (o1->body && o2->body) return;
- ODEPhysicsEnvironment* env = (ODEPhysicsEnvironment*) data;
- dBodyID b1,b2;
-
- b1 = dGeomGetBody(o1);
- b2 = dGeomGetBody(o2);
- // exit without doing anything if the two bodies are connected by a joint
- if (b1 && b2 && dAreConnected (b1,b2)) return;
-
- ODEPhysicsController * ctrl1 =(ODEPhysicsController *)dGeomGetData(o1);
- ODEPhysicsController * ctrl2 =(ODEPhysicsController *)dGeomGetData(o2);
- float friction=ctrl1->getFriction();
- float restitution = ctrl1->getRestitution();
- //for friction, take minimum
-
- friction=(friction < ctrl2->getFriction() ?
- friction :ctrl2->getFriction());
-
- //restitution:take minimum
- restitution = restitution < ctrl2->getRestitution()?
- restitution : ctrl2->getRestitution();
-
- dContact contact[3]; // up to 3 contacts per box
- for (i=0; i<3; i++) {
- contact[i].surface.mode = dContactBounce; //dContactMu2;
- contact[i].surface.mu = friction;//dInfinity;
- contact[i].surface.mu2 = 0;
- contact[i].surface.bounce = restitution;//0.5;
- contact[i].surface.bounce_vel = 0.1f;
- contact[i].surface.slip1=0.0;
- }
-
- if (int numc = dCollide (o1,o2,3,&contact[0].geom,sizeof(dContact))) {
- // dMatrix3 RI;
- // dRSetIdentity (RI);
- // const dReal ss[3] = {0.02,0.02,0.02};
- for (i=0; i<numc; i++) {
- dJointID c = dJointCreateContact (env->m_OdeWorld,env->m_OdeContactGroup,contact+i);
- dJointAttach (c,b1,b2);
- }
- }
-}
-
-
-void ODEPhysicsEnvironment::ClearOdeContactGroup()
-{
- dJointGroupEmpty (m_OdeContactGroup);
-}
-
-int ODEPhysicsEnvironment::GetNumOdeContacts()
-{
- return m_OdeContactGroup->num;
-}
-
diff --git a/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h b/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
deleted file mode 100644
index 54e4f7f90e1..00000000000
--- a/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * The contents of this file may be used under the terms of either the GNU
- * General Public License Version 2 or later (the "GPL", see
- * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or
- * later (the "BL", see http://www.blender.org/BL/ ) which has to be
- * bought from the Blender Foundation to become active, in which case the
- * above mentioned GPL option does not apply.
- *
- * The Original Code is Copyright (C) 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 _ODEPHYSICSENVIRONMENT
-#define _ODEPHYSICSENVIRONMENT
-
-
-#include "PHY_IPhysicsEnvironment.h"
-
-/**
-* Physics Environment takes care of stepping the simulation and is a container for physics entities (rigidbodies,constraints, materials etc.)
-* A derived class may be able to 'construct' entities by loading and/or converting
-*/
-class ODEPhysicsEnvironment : public PHY_IPhysicsEnvironment
-{
-
- bool m_useFixedTimeStep;
- float m_fixedTimeStep;
- float m_currentTime;
-
-public:
- ODEPhysicsEnvironment();
- virtual ~ODEPhysicsEnvironment();
- virtual void beginFrame() {}
- virtual void endFrame() {}
-
-
-// Perform an integration step of duration 'timeStep'.
- virtual bool proceedDeltaTime(double curTime,float timeStep,float interval);
- virtual void setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep);
- virtual float getFixedTimeStep();
-
- virtual void setGravity(float x,float y,float z);
- virtual int createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type,
- float pivotX,float pivotY,float pivotZ,
- float axisX,float axisY,float axisZ);
-
- virtual void removeConstraint(void * constraintid);
- virtual PHY_IPhysicsController* rayTest(PHY_IRayCastFilterCallback &filterCallback,float fromX,float fromY,float fromZ, float toX,float toY,float toZ);
- virtual bool cullingTest(PHY_CullingCallback callback, void* userData, PHY__Vector4* planes, int nplanes, int occlusionRes) { return false; }
-
-
- //gamelogic callbacks
- virtual void addSensor(PHY_IPhysicsController* ctrl) {}
- virtual void removeSensor(PHY_IPhysicsController* ctrl) {}
- virtual void addTouchCallback(int response_class, PHY_ResponseCallback callback, void *user)
- {
- }
- virtual bool requestCollisionCallback(PHY_IPhysicsController* ctrl) {return false;}
- virtual bool removeCollisionCallback(PHY_IPhysicsController* ctrl) {return false;}
- virtual PHY_IPhysicsController* CreateSphereController(float radius,const PHY__Vector3& position) {return 0;}
- virtual PHY_IPhysicsController* CreateConeController(float coneradius,float coneheight) { return 0;}
-
-
-
- struct dxWorld* GetOdeWorld() { return m_OdeWorld; };
- struct dxSpace* GetOdeSpace() { return m_OdeSpace;};
-
-private:
-
-
- // ODE physics response
- struct dxWorld* m_OdeWorld;
- // ODE collision detection
- struct dxSpace* m_OdeSpace;
- void ClearOdeContactGroup();
- struct dxJointGroup* m_OdeContactGroup;
- struct dxJointGroup* m_JointGroup;
-
- static void OdeNearCallback(void *data, struct dxGeom* o1, struct dxGeom* o2);
- int GetNumOdeContacts();
-
-};
-
-#endif //_ODEPHYSICSENVIRONMENT
-
diff --git a/source/gameengine/Physics/BlOde/SConscript b/source/gameengine/Physics/BlOde/SConscript
deleted file mode 100644
index 90e949d2d86..00000000000
--- a/source/gameengine/Physics/BlOde/SConscript
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
-
-phy_ode_env = library_env.Copy ()
-
-source_files = ['OdePhysicsController.cpp',
- 'OdePhysicsEnvironment.cpp']
-
-phy_ode_env.Append (CPPPATH=['.',
- '../common',
- ])
-phy_ode_env.Append (CPPPATH=user_options_dict['ODE_INCLUDE'])
-
-phy_ode_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Ode', source=source_files)
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index d22c09b4d3e..3c41a856660 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -979,6 +979,7 @@ void CcdPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
if (m_object && m_object->getCollisionShape())
{
+ m_object->activate(true); // without this, sleeping objects scale wont be applied in bullet if python changes the scale - Campbell.
m_object->getCollisionShape()->setLocalScaling(m_cci.m_scaling);
//printf("no inertia recalc for fixed objects with mass=0\n");
@@ -1016,14 +1017,21 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
}
if (body)
{
- //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(0,0,1);
- body->setAngularFactor(tmpFac);
- body->applyTorque(torque);
- body->setAngularFactor(angFac);
- }
+ if (m_cci.m_bRigid)
+ {
+ body->applyTorque(torque);
+ }
+ else
+ {
+ //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(0,0,1);
+ body->setAngularFactor(tmpFac);
+ body->applyTorque(torque);
+ body->setAngularFactor(angFac);
+ }
+ }
}
}
diff --git a/source/gameengine/Physics/Dummy/Makefile b/source/gameengine/Physics/Dummy/Makefile
index b0c1b855322..c016a0bebcb 100644
--- a/source/gameengine/Physics/Dummy/Makefile
+++ b/source/gameengine/Physics/Dummy/Makefile
@@ -39,7 +39,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO)/include -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../Physics/common
CPPFLAGS += -I../../Physics/Dummy
diff --git a/source/gameengine/Physics/Makefile b/source/gameengine/Physics/Makefile
index b192e497f35..da0d4cafd2e 100644
--- a/source/gameengine/Physics/Makefile
+++ b/source/gameengine/Physics/Makefile
@@ -32,7 +32,6 @@ include nan_definitions.mk
SOURCEDIR = source/gameengine/Physics
DIR = $(OCGDIR)/gameengine/blphys
-DIRS = common Sumo Dummy Bullet
-#DIRS += BlOde
+DIRS = common Dummy Bullet
include nan_subdirs.mk
diff --git a/source/gameengine/Physics/Sumo/CMakeLists.txt b/source/gameengine/Physics/Sumo/CMakeLists.txt
deleted file mode 100644
index c57a4af6706..00000000000
--- a/source/gameengine/Physics/Sumo/CMakeLists.txt
+++ /dev/null
@@ -1,46 +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 *****
-
-SET(SRC
- SumoPHYCallbackBridge.cpp
- SumoPhysicsController.cpp
- SumoPhysicsEnvironment.cpp
- Fuzzics/src/SM_FhObject.cpp
- Fuzzics/src/SM_Object.cpp
- Fuzzics/src/SM_Scene.cpp
- Fuzzics/src/SM_MotionState.cpp
-)
-
-SET(INC
- .
- ../common
- Fuzzics/include
- ../../../../intern/moto/include
- ../../../../extern/solid
-)
-
-BLENDERLIB(bf_sumo "${SRC}" "${INC}")
-#env.BlenderLib ( 'bf_sumo', sources, incs, [], libtype=['game2','player'], priority=[30, 70] , compileflags=cflags)
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/Makefile b/source/gameengine/Physics/Sumo/Fuzzics/Makefile
deleted file mode 100644
index 5ed2c31a1d0..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/Makefile
+++ /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) 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 *****
-#
-# Bounces make to subdirectories.
-
-SOURCEDIR = source/gameengine/Physics/Sumo/Fuzzics
-DIRS = src
-
-include nan_subdirs.mk
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h
deleted file mode 100644
index 42b5ab48ab6..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef SM_CALLBACK_H
-#define SM_CALLBACK_H
-
-class SM_Callback {
-public:
- virtual void do_me() = 0;
- virtual ~SM_Callback() {}
-};
-
-#endif
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_ClientObjectInfo.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_ClientObjectInfo.h
deleted file mode 100644
index 6749e7957ec..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_ClientObjectInfo.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __SM_CLIENTOBJECT_INFO_H
-#define __SM_CLIENTOBJECT_INFO_H
-
-/**
- * Client Type and Additional Info. This structure can be use instead of a bare void* pointer, for safeness, and additional info for callbacks
- */
-
-struct SM_ClientObjectInfo
-{
- int m_type;
- void* m_clientobject1;
- void* m_auxilary_info;
-};
-
-#endif //__SM_CLIENTOBJECT_INFO_H
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Debug.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Debug.h
deleted file mode 100644
index 48d5906e53d..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Debug.h
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-#ifndef __SM_DEBUG_H__
-#define __SM_DEBUG_H__
-
-/* Comment this to disable all SUMO debugging printfs */
-
-#define SM_DEBUG
-
-#ifdef SM_DEBUG
-
-#include <stdio.h>
-
-/* Uncomment this to printf all ray casts */
-//#define SM_DEBUG_RAYCAST
-
-/* Uncomment this to printf collision callbacks */
-//#define SM_DEBUG_BOING
-
-/* Uncomment this to printf Xform matrix calculations */
-//#define SM_DEBUG_XFORM
-
-#endif /* SM_DEBUG */
-
-#endif /* __SM_DEBUG_H__ */
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_FhObject.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_FhObject.h
deleted file mode 100644
index b03612ed15e..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_FhObject.h
+++ /dev/null
@@ -1,56 +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 *****
- */
-#ifndef SM_FHOBJECT_H
-#define SM_FHOBJECT_H
-
-#include "SM_Object.h"
-
-class SM_FhObject : public SM_Object {
-public:
- virtual ~SM_FhObject();
- SM_FhObject(DT_ShapeHandle rayshape, MT_Vector3 ray, SM_Object *parent_object);
-
- const MT_Vector3& getRay() const { return m_ray; }
- MT_Point3 getSpot() const { return getPosition() + m_ray; }
- const MT_Vector3& getRayDirection() const { return m_ray_direction; }
- SM_Object *getParentObject() const { return m_parent_object; }
-
- static DT_Bool ray_hit(void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data);
-
-private:
- MT_Vector3 m_ray;
- MT_Vector3 m_ray_direction;
- SM_Object *m_parent_object;
-};
-
-#endif
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h
deleted file mode 100644
index fdc45af5225..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h
+++ /dev/null
@@ -1,77 +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 *****
- */
-#ifndef SM_MOTIONSTATE_H
-#define SM_MOTIONSTATE_H
-
-#include "MT_Transform.h"
-
-class SM_MotionState {
-public:
- SM_MotionState() :
- m_time(0.0),
- m_pos(0.0, 0.0, 0.0),
- m_orn(0.0, 0.0, 0.0, 1.0),
- m_lin_vel(0.0, 0.0, 0.0),
- m_ang_vel(0.0, 0.0, 0.0)
- {}
-
- void setPosition(const MT_Point3& pos) { m_pos = pos; }
- void setOrientation(const MT_Quaternion& orn) { m_orn = orn; }
- void setLinearVelocity(const MT_Vector3& lin_vel) { m_lin_vel = lin_vel; }
- void setAngularVelocity(const MT_Vector3& ang_vel) { m_ang_vel = ang_vel; }
- void setTime(MT_Scalar time) { m_time = time; }
-
- const MT_Point3& getPosition() const { return m_pos; }
- const MT_Quaternion& getOrientation() const { return m_orn; }
- const MT_Vector3& getLinearVelocity() const { return m_lin_vel; }
- const MT_Vector3& getAngularVelocity() const { return m_ang_vel; }
-
- MT_Scalar getTime() const { return m_time; }
-
- void integrateMidpoint(MT_Scalar timeStep, const SM_MotionState &prev_state, const MT_Vector3 &velocity, const MT_Quaternion& ang_vel);
- void integrateBackward(MT_Scalar timeStep, const MT_Vector3 &velocity, const MT_Quaternion& ang_vel);
- void integrateForward(MT_Scalar timeStep, const SM_MotionState &prev_state);
-
- void lerp(const SM_MotionState &prev, const SM_MotionState &next);
- void lerp(MT_Scalar t, const SM_MotionState &other);
-
- virtual MT_Transform getTransform() const {
- return MT_Transform(m_pos, m_orn);
- }
-
-protected:
- MT_Scalar m_time;
- MT_Point3 m_pos;
- MT_Quaternion m_orn;
- MT_Vector3 m_lin_vel;
- MT_Vector3 m_ang_vel;
-};
-
-#endif
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
deleted file mode 100644
index 2d748a0f251..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
+++ /dev/null
@@ -1,393 +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 *****
- */
-#ifndef SM_OBJECT_H
-#define SM_OBJECT_H
-
-#include <vector>
-
-#include <SOLID/SOLID.h>
-
-#include "SM_Callback.h"
-#include "SM_MotionState.h"
-#include <stdio.h>
-
-class SM_FhObject;
-
-/** Properties of dynamic objects */
-struct SM_ShapeProps {
- MT_Scalar m_mass; ///< Total mass
- MT_Scalar m_radius; ///< Bound sphere size
- MT_Vector3 m_inertia; ///< Inertia, should be a tensor some time
- MT_Scalar m_lin_drag; ///< Linear drag (air, water) 0 = concrete, 1 = vacuum
- MT_Scalar m_ang_drag; ///< Angular drag
- MT_Scalar m_friction_scaling[3]; ///< Scaling for anisotropic friction. Component in range [0, 1]
- bool m_do_anisotropic; ///< Should I do anisotropic friction?
- bool m_do_fh; ///< Should the object have a linear Fh spring?
- bool m_do_rot_fh; ///< Should the object have an angular Fh spring?
-};
-
-
-/** Properties of collidable objects (non-ghost objects) */
-struct SM_MaterialProps {
- MT_Scalar m_restitution; ///< restitution of energy after a collision 0 = inelastic, 1 = elastic
- MT_Scalar m_friction; ///< Coulomb friction (= ratio between the normal en maximum friction force)
- MT_Scalar m_fh_spring; ///< Spring constant (both linear and angular)
- MT_Scalar m_fh_damping; ///< Damping factor (linear and angular) in range [0, 1]
- MT_Scalar m_fh_distance; ///< The range above the surface where Fh is active.
- bool m_fh_normal; ///< Should the object slide off slopes?
-};
-
-class SM_ClientObject
-{
-public:
- SM_ClientObject() {}
- virtual ~SM_ClientObject() {}
-
- virtual bool hasCollisionCallback() = 0;
-};
-
-/**
- * SM_Object is an internal part of the Sumo physics engine.
- *
- * It encapsulates an object in the physics scene, and is responsible
- * for calculating the collision response of objects.
- */
-class SM_Object
-{
-public:
- SM_Object() ;
- SM_Object(
- DT_ShapeHandle shape,
- const SM_MaterialProps *materialProps,
- const SM_ShapeProps *shapeProps,
- SM_Object *dynamicParent
- );
- virtual ~SM_Object();
-
- bool isDynamic() const;
-
- /* nzc experimental. There seem to be two places where kinematics
- * are evaluated: proceedKinematic (called from SM_Scene) and
- * proceed() in this object. I'll just try and bunge these out for
- * now. */
-
- void suspend(void);
- void resume(void);
-
- void suspendDynamics();
-
- void restoreDynamics();
-
- bool isGhost() const;
-
- void suspendMaterial();
-
- void restoreMaterial();
-
- SM_FhObject *getFhObject() const;
-
- void registerCallback(SM_Callback& callback);
-
- void calcXform();
- void notifyClient();
- void updateInvInertiaTensor();
-
-
- // Save the current state information for use in the
- // velocity computation in the next frame.
-
- void proceedKinematic(MT_Scalar timeStep);
-
- void saveReactionForce(MT_Scalar timeStep) ;
-
- void clearForce() ;
-
- void clearMomentum() ;
-
- void setMargin(MT_Scalar margin) ;
-
- MT_Scalar getMargin() const ;
-
- const SM_MaterialProps *getMaterialProps() const ;
-
- const SM_ShapeProps *getShapeProps() const ;
-
- void setPosition(const MT_Point3& pos);
- void setOrientation(const MT_Quaternion& orn);
- void setScaling(const MT_Vector3& scaling);
-
- /**
- * set an external velocity. This velocity complements
- * the physics velocity. So setting it does not override the
- * physics velocity. It is your responsibility to clear
- * this external velocity. This velocity is not subject to
- * friction or damping.
- */
- void setExternalLinearVelocity(const MT_Vector3& lin_vel) ;
- void addExternalLinearVelocity(const MT_Vector3& lin_vel) ;
-
- /** Override the physics velocity */
- void addLinearVelocity(const MT_Vector3& lin_vel);
- void setLinearVelocity(const MT_Vector3& lin_vel);
-
- /**
- * Set an external angular velocity. This velocity complemetns
- * the physics angular velocity so does not override it. It is
- * your responsibility to clear this velocity. This velocity
- * is not subject to friction or damping.
- */
- void setExternalAngularVelocity(const MT_Vector3& ang_vel) ;
- void addExternalAngularVelocity(const MT_Vector3& ang_vel);
-
- /** Override the physics angular velocity */
- void addAngularVelocity(const MT_Vector3& ang_vel);
- void setAngularVelocity(const MT_Vector3& ang_vel);
-
- /** Clear the external velocities */
- void clearCombinedVelocities();
-
- /**
- * Tell the physics system to combine the external velocity
- * with the physics velocity.
- */
- void resolveCombinedVelocities(
- const MT_Vector3 & lin_vel,
- const MT_Vector3 & ang_vel
- ) ;
-
-
-
- MT_Scalar getInvMass() const;
-
- const MT_Vector3& getInvInertia() const ;
-
- const MT_Matrix3x3& getInvInertiaTensor() const;
-
- void applyForceField(const MT_Vector3& accel) ;
-
- void applyCenterForce(const MT_Vector3& force) ;
-
- void applyTorque(const MT_Vector3& torque) ;
-
- /**
- * Apply an impulse to the object. The impulse will be split into
- * angular and linear components.
- * @param attach point to apply the impulse to (in world coordinates)
- */
- void applyImpulse(const MT_Point3& attach, const MT_Vector3& impulse) ;
-
- /**
- * Applies an impulse through the center of this object. (ie the angular
- * velocity will not change.
- */
- void applyCenterImpulse(const MT_Vector3& impulse);
- /**
- * Applies an angular impulse.
- */
- void applyAngularImpulse(const MT_Vector3& impulse);
-
- MT_Point3 getWorldCoord(const MT_Point3& local) const;
- MT_Point3 getLocalCoord(const MT_Point3& world) const;
-
- MT_Vector3 getVelocity(const MT_Point3& local) const;
-
-
- const MT_Vector3& getReactionForce() const ;
-
- void getMatrix(double *m) const ;
-
- const double *getMatrix() const ;
-
- // Still need this???
- const MT_Transform& getScaledTransform() const;
-
- DT_ObjectHandle getObjectHandle() const ;
- DT_ShapeHandle getShapeHandle() const ;
-
- SM_Object *getDynamicParent() ;
-
- void integrateForces(MT_Scalar timeStep);
- void integrateMomentum(MT_Scalar timeSteo);
-
- void setRigidBody(bool is_rigid_body) ;
-
- bool isRigidBody() const ;
-
- // This is the callback for handling collisions of dynamic objects
- static
- DT_Bool
- boing(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data
- );
-
- static
- DT_Bool
- fix(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data
- );
-
-
- SM_ClientObject *getClientObject() { return m_client_object; }
- void setClientObject(SM_ClientObject *client_object) { m_client_object = client_object; }
- void setPhysicsClientObject(void* physicsClientObject)
- {
- m_physicsClientObject = physicsClientObject;
- }
- void* getPhysicsClientObject() {
- return m_physicsClientObject;
- }
- void relax();
-
- SM_MotionState &getCurrentFrame();
- SM_MotionState &getPreviousFrame();
- SM_MotionState &getNextFrame();
-
- const SM_MotionState &getCurrentFrame() const;
- const SM_MotionState &getPreviousFrame() const;
- const SM_MotionState &getNextFrame() const;
-
- // Motion state functions
- const MT_Point3& getPosition() const;
- const MT_Quaternion& getOrientation() const;
- const MT_Vector3& getLinearVelocity() const;
- const MT_Vector3& getAngularVelocity() const;
-
- MT_Scalar getTime() const;
-
- void setTime(MT_Scalar time);
-
- void interpolate(MT_Scalar timeStep);
- void endFrame();
-
-private:
- friend class Contact;
- // Tweak parameters
- static MT_Scalar ImpulseThreshold;
-
- // return the actual linear_velocity of this object this
- // is the addition of m_combined_lin_vel and m_lin_vel.
-
- const
- MT_Vector3
- actualLinVelocity(
- ) const ;
-
- const
- MT_Vector3
- actualAngVelocity(
- ) const ;
-
- void dynamicCollision(const MT_Point3 &local2,
- const MT_Vector3 &normal,
- MT_Scalar dist,
- const MT_Vector3 &rel_vel,
- MT_Scalar restitution,
- MT_Scalar friction_factor,
- MT_Scalar invMass
- );
-
- typedef std::vector<SM_Callback *> T_CallbackList;
-
-
- T_CallbackList m_callbackList; // Each object can have multiple callbacks from the client (=game engine)
- SM_Object *m_dynamicParent; // Collisions between parent and children are ignored
-
- // as the collision callback now has only information
- // on an SM_Object, there must be a way that the SM_Object client
- // can identify it's clientdata after a collision
- SM_ClientObject *m_client_object;
-
- void* m_physicsClientObject;
-
- DT_ShapeHandle m_shape; // Shape for collision detection
-
- // Material and shape properties are not owned by this class.
-
- const SM_MaterialProps *m_materialProps;
- const SM_MaterialProps *m_materialPropsBackup; // Backup in case the object temporarily becomes a ghost.
- const SM_ShapeProps *m_shapeProps;
- const SM_ShapeProps *m_shapePropsBackup; // Backup in case the object's dynamics is temporarily suspended
- DT_ObjectHandle m_object; // A handle to the corresponding object in SOLID.
- MT_Scalar m_margin; // Offset for the object's shape (also for collision detection)
- MT_Vector3 m_scaling; // Non-uniform scaling of the object's shape
-
- double m_ogl_matrix[16]; // An OpenGL-type 4x4 matrix
- MT_Transform m_xform; // The object's local coordinate system
- MT_Transform m_prev_xform; // The object's local coordinate system in the previous frame
- SM_MotionState m_prev_state; // The object's motion state in the previous frame
- MT_Scalar m_timeStep; // The duration of the last frame
-
- MT_Vector3 m_reaction_impulse; // The accumulated impulse resulting from collisions
- MT_Vector3 m_reaction_force; // The reaction force derived from the reaction impulse
-
- MT_Vector3 m_lin_mom; // Linear momentum (linear velocity times mass)
- MT_Vector3 m_ang_mom; // Angular momentum (angualr velocity times inertia)
- MT_Vector3 m_force; // Force on center of mass (afffects linear momentum)
- MT_Vector3 m_torque; // Torque around center of mass (affects angular momentum)
-
- SM_MotionState m_frames[3];
-
- MT_Vector3 m_error; // Error in position:- amount object must be moved to prevent intersection with scene
-
- // Here are the values of externally set linear and angular
- // velocity. These are updated from the outside
- // (actuators and python) each frame and combined with the
- // physics values. At the end of each frame (at the end of a
- // call to proceed) they are set to zero. This allows the
- // outside world to contribute to the velocity of an object
- // but still have it react to physics.
-
- MT_Vector3 m_combined_lin_vel;
- MT_Vector3 m_combined_ang_vel;
-
- // The force and torque are the accumulated forces and torques applied by the client (game logic, python).
-
- SM_FhObject *m_fh_object; // The ray object used for Fh
- bool m_suspended; // Is this object frozen?
-
- // Mass properties
- MT_Scalar m_inv_mass; // 1/mass
- MT_Vector3 m_inv_inertia; // [1/inertia_x, 1/inertia_y, 1/inertia_z]
- MT_Matrix3x3 m_inv_inertia_tensor; // Inverse Inertia Tensor
-
- bool m_kinematic; // Have I been displaced (translated, rotated, scaled) in this frame?
- bool m_prev_kinematic; // Have I been displaced (translated, rotated, scaled) in the previous frame?
- bool m_is_rigid_body; // Should friction give me a change in angular momentum?
- int m_static; // temporarily static.
-
-};
-
-#endif
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Props.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Props.h
deleted file mode 100644
index 81b4cb55b45..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Props.h
+++ /dev/null
@@ -1,58 +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 *****
- */
-#ifndef SM_PROPSH
-#define SM_PROPSH
-
-#include <MT_Scalar.h>
-
-// Properties of dynamic objects
-struct SM_ShapeProps {
- MT_Scalar m_mass; // Total mass
- MT_Scalar m_inertia; // Inertia, should be a tensor some time
- MT_Scalar m_lin_drag; // Linear drag (air, water) 0 = concrete, 1 = vacuum
- MT_Scalar m_ang_drag; // Angular drag
- MT_Scalar m_friction_scaling[3]; // Scaling for anisotropic friction. Component in range [0, 1]
- bool m_do_anisotropic; // Should I do anisotropic friction?
- bool m_do_fh; // Should the object have a linear Fh spring?
- bool m_do_rot_fh; // Should the object have an angular Fh spring?
-};
-
-
-// Properties of collidable objects (non-ghost objects)
-struct SM_MaterialProps {
- MT_Scalar m_restitution; // restitution of energie after a collision 0 = inelastic, 1 = elastic
- MT_Scalar m_friction; // Coulomb friction (= ratio between the normal en maximum friction force)
- MT_Scalar m_fh_spring; // Spring constant (both linear and angular)
- MT_Scalar m_fh_damping; // Damping factor (linear and angular) in range [0, 1]
- MT_Scalar m_fh_distance; // The range above the surface where Fh is active.
- bool m_fh_normal; // Should the object slide off slopes?
-};
-
-#endif //SM_PROPSH
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
deleted file mode 100644
index 3d8eef2bae0..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * $Id$
- * Copyright (C) 2001 NaN Technologies B.V.
- * The physics scene.
- *
- * ***** 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 SM_SCENE_H
-#define SM_SCENE_H
-
-#ifdef WIN32
-#pragma warning (disable : 4786)
-#endif
-
-#include <vector>
-#include <set>
-#include <utility> //needed for pair
-
-#include <SOLID/SOLID.h>
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-
-#include "SM_Object.h"
-
-enum
-{
- FH_RESPONSE,
- SENSOR_RESPONSE, /* Touch Sensors */
- CAMERA_RESPONSE, /* Visibility Culling */
- OBJECT_RESPONSE, /* Object Dynamic Geometry Response */
- STATIC_RESPONSE, /* Static Geometry Response */
-
- NUM_RESPONSE
-};
-
-class SM_Scene {
-public:
- SM_Scene();
-
- ~SM_Scene();
-
- DT_RespTableHandle getRespTableHandle() const {
- return m_respTable;
- }
-
- const MT_Vector3& getForceField() const {
- return m_forceField;
- }
-
- MT_Vector3& getForceField() {
- return m_forceField;
- }
-
- void setForceField(const MT_Vector3& forceField) {
- m_forceField = forceField;
- }
-
- void addTouchCallback(int response_class, DT_ResponseCallback callback, void *user);
-
- void addSensor(SM_Object& object);
- void add(SM_Object& object);
- void remove(SM_Object& object);
-
- void notifyCollision(SM_Object *obj1, SM_Object *obj2);
-
- void setSecondaryRespTable(DT_RespTableHandle secondaryRespTable);
- DT_RespTableHandle getSecondaryRespTable() { return m_secondaryRespTable; }
-
- void requestCollisionCallback(SM_Object &object);
-
- void beginFrame();
- void endFrame();
-
- // Perform an integration step of duration 'timeStep'.
- // 'subSampling' is the maximum duration of a substep, i.e.,
- // The maximum time interval between two collision checks.
- // 'subSampling' can be used to control aliasing effects
- // (fast moving objects traversing through walls and such).
- bool proceed(MT_Scalar curtime, MT_Scalar ticrate);
- void proceed(MT_Scalar subStep);
-
- /**
- * Test whether any objects lie on the line defined by from and
- * to. The search returns the first such bject starting at from,
- * or NULL if there was none.
- * @returns A reference to the object, or NULL if there was none.
- * @param ignore_client Do not look for collisions with this
- * object. This can be useful to avoid self-hits if
- * starting from the location of an object.
- * @param from The start point, in world coordinates, of the search.
- * @param to The end point, in world coordinates, of the search.
- * @param result A store to return the point where intersection
- * took place (if there was an intersection).
- * @param normal A store to return the normal of the hit object on
- * the location of the intersection, if it took place.
- */
- SM_Object *rayTest(void *ignore_client,
- const MT_Point3& from, const MT_Point3& to,
- MT_Point3& result, MT_Vector3& normal) const;
-
-private:
-
- // Clear the user set velocities.
- void clearObjectCombinedVelocities();
- // This is the callback for handling collisions of dynamic objects
- static
- DT_Bool
- boing(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data
- );
-
- /** internal type */
- typedef std::vector<SM_Object *> T_ObjectList;
-
- /** Handle to the scene in SOLID */
- DT_SceneHandle m_scene;
- /** Following response table contains the callbacks for the dynmics */
- DT_RespTableHandle m_respTable;
- DT_ResponseClass m_ResponseClass[NUM_RESPONSE];
- /**
- * Following response table contains callbacks for the client (=
- * game engine) */
- DT_RespTableHandle m_secondaryRespTable; // Handle
- DT_ResponseClass m_secondaryResponseClass[NUM_RESPONSE];
-
- /**
- * Following resposne table contains callbacks for fixing the simulation
- * ie making sure colliding objects do not intersect.
- */
- DT_RespTableHandle m_fixRespTable;
- DT_ResponseClass m_fixResponseClass[NUM_RESPONSE];
-
- /** The acceleration from the force field */
- MT_Vector3 m_forceField;
-
- /**
- * The list of objects that receive motion updates and do
- * collision tests. */
- T_ObjectList m_objectList;
-
- unsigned int m_frames;
-};
-
-#endif
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/sample/Makefile b/source/gameengine/Physics/Sumo/Fuzzics/sample/Makefile
deleted file mode 100644
index 672dff39028..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/sample/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-# Copyright (C) 2001 NaN Technologies B.V.
-
-DIR = $(OCGDIR)/sumo
-ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)particle $(DIR)/$(DEBUG_DIR)particle0
-
-include nan_compile.mk
-
-CPPFLAGS = -I../../include -I../include -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(OPENGL_HEADERS)
-
-clean::
- @$(RM) $(DIR)/particle $(DIR)/particle0
- @$(RM) $(DIR)/debug/particle $(DIR)/debug/particle0
-
-LDFLAGS = -L$(DIR) -L/usr/X11R6/lib
-OGL_LDLIBS = -lglut -lGLU -lGL -pthread
-LDLIBS = -lfuzzics -lsolid $(NAN_MOTO)/lib/libmoto.a $(OGL_LDLIBS)
-
-$(DIR)/$(DEBUG_DIR)particle: particle.o $(DIR)/$(DEBUG_DIR)libfuzzics.a $(DIR)/$(DEBUG_DIR)libsolid.a
- $(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
-
-$(DIR)/$(DEBUG_DIR)particle0: particle0.o $(DIR)/$(DEBUG_DIR)libfuzzics.a $(DIR)/$(DEBUG_DIR)libsolid.a
- $(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/sample/particle.cpp b/source/gameengine/Physics/Sumo/Fuzzics/sample/particle.cpp
deleted file mode 100644
index d7aca326b42..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/sample/particle.cpp
+++ /dev/null
@@ -1,709 +0,0 @@
-//#define FAKE_IT
-#define USE_COMPLEX
-#define QUADS
-
-#include <algorithm>
-#include <new>
-#include <GL/glut.h>
-
-#include "MT_MinMax.h"
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-#include "MT_Quaternion.h"
-#include "MT_Matrix3x3.h"
-#include "MT_Transform.h"
-
-#include "SM_Object.h"
-#include "SM_FhObject.h"
-#include "SM_Scene.h"
-
-#include <SOLID/SOLID.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-const MT_Scalar bowl_curv = 0.10;
-const MT_Scalar timeStep = 0.02;
-const MT_Scalar ground_margin = 0.0;
-const MT_Scalar sphere_radius = 0.5;
-
-const MT_Vector3 gravity(0, -9.8, 0);
-
-static MT_Scalar DISTANCE = 5;
-
-static MT_Scalar ele = 0, azi = 0;
-static MT_Point3 eye(0, 0, DISTANCE);
-static MT_Point3 center(0, 0, 0);
-
-inline double irnd() { return 2 * MT_random() - 1; }
-
-static const double SCALE_BOTTOM = 0.5;
-static const double SCALE_FACTOR = 2.0;
-
-SM_ShapeProps g_shapeProps = {
- 1.0, // mass
- 1.0, // inertia
- 0.1, // linear drag
- 0.1, // angular drag
- { 1.0, 0.0, 0.0 }, // anisotropic friction
- false, // do anisotropic friction?
- true, // do fh?
- true // do rot fh?
-};
-
-SM_MaterialProps g_materialProps = {
- 0.7, // restitution
- 0.0, // friction
- 10.0, // Fh spring constant
- 1.0, // Fh damping
- 0.5, // Fh distance
- true // Fh leveling
-};
-
-
-void toggleIdle();
-
-
-void newRandom();
-
-void coordSystem() {
- glDisable(GL_LIGHTING);
- glBegin(GL_LINES);
- glColor3f(1, 0, 0);
- glVertex3d(0, 0, 0);
- glVertex3d(10, 0, 0);
- glColor3f(0, 1, 0);
- glVertex3d(0, 0, 0);
- glVertex3d(0, 10, 0);
- glColor3f(0, 0, 1);
- glVertex3d(0, 0, 0);
- glVertex3d(0, 0, 10);
- glEnd();
- glEnable(GL_LIGHTING);
-}
-
-
-void display_bbox(const MT_Point3& min, const MT_Point3& max) {
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- glColor3f(0, 1, 1);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glBegin(GL_QUAD_STRIP);
- glVertex3d(min[0], min[1], min[2]);
- glVertex3d(min[0], min[1], max[2]);
- glVertex3d(max[0], min[1], min[2]);
- glVertex3d(max[0], min[1], max[2]);
- glVertex3d(max[0], max[1], min[2]);
- glVertex3d(max[0], max[1], max[2]);
- glVertex3d(min[0], max[1], min[2]);
- glVertex3d(min[0], max[1], max[2]);
- glVertex3d(min[0], min[1], min[2]);
- glVertex3d(min[0], min[1], max[2]);
- glEnd();
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- glEnable(GL_LIGHTING);
- glEnable(GL_DEPTH_TEST);
-}
-
-
-
-
-class GLShape {
-public:
- virtual void paint(GLdouble *m) const = 0;
-};
-
-
-class GLSphere : public GLShape {
- MT_Scalar radius;
-public:
- GLSphere(MT_Scalar r) : radius(r) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- glutSolidSphere(radius, 20, 20);
- glPopMatrix();
- }
-};
-
-
-class GLBox : public GLShape {
- MT_Vector3 extent;
-public:
- GLBox(MT_Scalar x, MT_Scalar y, MT_Scalar z) :
- extent(x, y, z) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- glPushMatrix();
- glScaled(extent[0], extent[1], extent[2]);
- glutSolidCube(1.0);
- glPopMatrix();
- glPopMatrix();
- }
-};
-
-
-class GLCone : public GLShape {
- MT_Scalar bottomRadius;
- MT_Scalar height;
- mutable GLuint displayList;
-
-public:
- GLCone(MT_Scalar r, MT_Scalar h) :
- bottomRadius(r),
- height(h),
- displayList(0) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- if (displayList) glCallList(displayList);
- else {
- GLUquadricObj *quadObj = gluNewQuadric();
- displayList = glGenLists(1);
- glNewList(displayList, GL_COMPILE_AND_EXECUTE);
- glPushMatrix();
- glRotatef(-90.0, 1.0, 0.0, 0.0);
- glTranslatef(0.0, 0.0, -1.0);
- gluQuadricDrawStyle(quadObj, (GLenum)GLU_FILL);
- gluQuadricNormals(quadObj, (GLenum)GLU_SMOOTH);
- gluCylinder(quadObj, bottomRadius, 0, height, 15, 10);
- glPopMatrix();
- glEndList();
- }
- glPopMatrix();
- }
-};
-
-class GLCylinder : public GLShape {
- MT_Scalar radius;
- MT_Scalar height;
- mutable GLuint displayList;
-
-public:
- GLCylinder(MT_Scalar r, MT_Scalar h) :
- radius(r),
- height(h),
- displayList(0) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- if (displayList) glCallList(displayList);
- else {
- GLUquadricObj *quadObj = gluNewQuadric();
- displayList = glGenLists(1);
- glNewList(displayList, GL_COMPILE_AND_EXECUTE);
- glPushMatrix();
- glRotatef(-90.0, 1.0, 0.0, 0.0);
- glTranslatef(0.0, 0.0, -1.0);
- gluQuadricDrawStyle(quadObj, (GLenum)GLU_FILL);
- gluQuadricNormals(quadObj, (GLenum)GLU_SMOOTH);
- gluCylinder(quadObj, radius, radius, height, 15, 10);
- glPopMatrix ();
- glEndList();
- }
- glPopMatrix();
- }
-};
-
-class Object;
-
-class Callback : public SM_Callback {
-public:
- Callback(Object& object) : m_object(object) {}
-
- virtual void do_me();
-
-private:
- Object& m_object;
-};
-
-
-class Object {
-public:
- Object(GLShape *gl_shape, SM_Object& object) :
- m_gl_shape(gl_shape),
- m_object(object),
- m_callback(*this)
- {
- m_object.registerCallback(m_callback);
- }
-
- ~Object() {}
-
- void paint() {
- if (m_gl_shape) {
- m_gl_shape->paint(m);
- // display_bbox(m_bbox.lower(), m_bbox.upper());
- }
- }
-
- void print_reaction_force() const {
- std::cout << m_object.getReactionForce() << std::endl;
- }
-
- MT_Vector3 getAhead() {
- return MT_Vector3(&m[4]);
- }
-
- MT_Vector3 getUp() {
- return MT_Vector3(&m[8]);
- }
-
- void clearMomentum() {
- m_object.clearMomentum();
- }
-
- void setMargin(MT_Scalar margin) {
- m_object.setMargin(margin);
- }
-
- void setScaling(const MT_Vector3& scaling) {
- m_object.setScaling(scaling);
- }
-
- const MT_Point3& getPosition() {
- return m_object.getPosition();
- }
-
- void setPosition(const MT_Point3& pos) {
- m_object.setPosition(pos);
- }
-
- void setOrientation(const MT_Quaternion& orn) {
- m_object.setOrientation(orn);
- }
-
- void applyCenterForce(const MT_Vector3& force) {
- m_object.applyCenterForce(force);
- }
-
- void applyTorque(const MT_Vector3& torque) {
- m_object.applyTorque(torque);
- }
-
- MT_Point3 getWorldCoord(const MT_Point3& local) const {
- return m_object.getWorldCoord(local);
- }
-
- MT_Vector3 getLinearVelocity() const {
- return m_object.getLinearVelocity();
- }
-
- MT_Vector3 getAngularVelocity() const {
- return m_object.getAngularVelocity();
- }
-
- void setMatrix() {
- m_object.calcXform();
- m_object.getMatrix(m);
- }
-
- const double *getMatrix() {
- m_object.calcXform();
- return m_object.getMatrix();
- }
-
-private:
- GLShape *m_gl_shape;
- SM_Object& m_object;
- DT_Scalar m[16];
- Callback m_callback;
-};
-
-
-
-const MT_Scalar SPACE_SIZE = 2;
-
-static GLSphere gl_sphere(sphere_radius);
-static GLBox gl_ground(50.0, 0.0, 50.0);
-
-
-
-#ifdef USE_COMPLEX
-
-const int GRID_SCALE = 10;
-const MT_Scalar GRID_UNIT = 25.0 / GRID_SCALE;
-
-DT_ShapeHandle createComplex() {
- DT_ShapeHandle shape = DT_NewComplexShape();
- for (int i0 = -GRID_SCALE; i0 != GRID_SCALE; ++i0) {
- for (int j0 = -GRID_SCALE; j0 != GRID_SCALE; ++j0) {
- int i1 = i0 + 1;
- int j1 = j0 + 1;
-#ifdef QUADS
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, bowl_curv * i0*i0, GRID_UNIT * j0);
- DT_Vertex(GRID_UNIT * i0, bowl_curv * i0*i0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, bowl_curv * i1*i1, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, bowl_curv * i1*i1, GRID_UNIT * j0);
- DT_End();
-#else
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j0);
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j1);
- DT_End();
-
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j0);
- DT_End();
-#endif
-
- }
- }
- DT_EndComplexShape();
- return shape;
-}
-
-
-static DT_ShapeHandle ground_shape = createComplex();
-
-#else
-
-static DT_ShapeHandle ground_shape = DT_Box(50, 0, 50);
-
-#endif
-
-static SM_Object sm_ground(ground_shape, &g_materialProps, 0, 0);
-static Object ground(&gl_ground, sm_ground);
-
-static SM_Object sm_sphere(DT_Sphere(0.0), &g_materialProps, &g_shapeProps, 0);
-static Object object(&gl_sphere, sm_sphere);
-
-
-static SM_Scene g_scene;
-
-
-bool g_hit = false;
-MT_Point3 g_spot;
-MT_Vector3 g_normal;
-
-
-void Callback::do_me()
-{
- m_object.setMatrix();
- m_object.print_reaction_force();
-}
-
-void myinit(void) {
-
- GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
- GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
- GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
-
- /* light_position is NOT default value */
- GLfloat light_position0[] = { 1.0, 1.0, 1.0, 0.0 };
- GLfloat light_position1[] = { -1.0, -1.0, -1.0, 0.0 };
-
- glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
- glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
- glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
-
- glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);
- glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse);
- glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);
- glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
-
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHT1);
-
- glShadeModel(GL_SMOOTH);
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
-
- // glEnable(GL_CULL_FACE);
- // glCullFace(GL_BACK);
-
- ground.setPosition(MT_Point3(0, -10, 0));
- ground.setOrientation(MT_Quaternion(0, 0, 0, 1));
- ground.setMatrix();
- center.setValue(0.0, 0.0, 0.0);
- sm_ground.setMargin(ground_margin);
-
- g_scene.setForceField(gravity);
- g_scene.add(sm_ground);
-
- object.setMargin(sphere_radius);
-
- g_scene.add(sm_sphere);
-
-
- newRandom();
-}
-
-
-//MT_Point3 cp1, cp2;
-//bool intersection;
-
-void display(void) {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- ground.paint();
- object.paint();
-
- if (g_hit) {
- glDisable(GL_LIGHTING);
- glColor3f(1, 0, 0);
-
- glPointSize(5);
- glBegin(GL_POINTS);
- glVertex3d(g_spot[0], g_spot[1], g_spot[2]);
- glEnd();
- glPointSize(1);
-
- glColor3f(1, 1, 0);
- glBegin(GL_LINES);
- glVertex3d(g_spot[0], g_spot[1], g_spot[2]);
- glVertex3d(g_spot[0] + g_normal[0],
- g_spot[1] + g_normal[1],
- g_spot[2] + g_normal[2]);
- glEnd();
- glEnable(GL_LIGHTING);
- }
-
-
-
-#ifdef COLLISION
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- glColor3f(1, 1, 0);
- if (intersection) {
- glPointSize(5);
- glBegin(GL_POINTS);
- glVertex3d(cp1[0], cp1[1], cp1[2]);
- glEnd();
- glPointSize(1);
- }
- else {
- glBegin(GL_LINES);
- glVertex3d(cp1[0], cp1[1], cp1[2]);
- glVertex3d(cp2[0], cp2[1], cp2[2]);
- glEnd();
- }
- glEnable(GL_LIGHTING);
- glEnable(GL_DEPTH_TEST);
-#endif
-
- glFlush();
- glutSwapBuffers();
-}
-
-
-
-
-
-void newRandom() {
- object.setPosition(MT_Point3(0, 0, 0));
- object.setOrientation(MT_Quaternion::random());
- object.clearMomentum();
- object.setMatrix();
-
- display();
-}
-
-void moveAndDisplay() {
- g_scene.proceed(timeStep, 0.01);
-
- display();
- g_hit = false;
-}
-
-
-void turn_left() {
- object.applyTorque(5.0 * object.getUp());
-}
-
-void turn_right() {
- object.applyTorque(-5.0 * object.getUp());
-}
-
-void forward() {
- object.applyCenterForce(10.0 * object.getAhead());
-}
-
-void backward() {
- object.applyCenterForce(-10.0 * object.getAhead());
-}
-
-void jump() {
- object.applyCenterForce(MT_Vector3(0.0, 200.0, 0.0));
-}
-
-
-void toggleIdle() {
- static bool idle = true;
- if (idle) {
- glutIdleFunc(moveAndDisplay);
- idle = false;
- }
- else {
- glutIdleFunc(NULL);
- idle = true;
- }
-}
-
-
-void setCamera() {
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 200.0);
- MT_Scalar rele = MT_radians(ele);
- MT_Scalar razi = MT_radians(azi);
- eye.setValue(DISTANCE * sin(razi) * cos(rele),
- DISTANCE * sin(rele),
- DISTANCE * cos(razi) * cos(rele));
- gluLookAt(eye[0], eye[1], eye[2],
- center[0], center[1], center[2],
- 0, 1, 0);
- glMatrixMode(GL_MODELVIEW);
- display();
-}
-
-const MT_Scalar STEPSIZE = 5;
-
-void stepLeft() { azi -= STEPSIZE; if (azi < 0) azi += 360; setCamera(); }
-void stepRight() { azi += STEPSIZE; if (azi >= 360) azi -= 360; setCamera(); }
-void stepFront() { ele += STEPSIZE; if (azi >= 360) azi -= 360; setCamera(); }
-void stepBack() { ele -= STEPSIZE; if (azi < 0) azi += 360; setCamera(); }
-void zoomIn() { DISTANCE -= 1; setCamera(); }
-void zoomOut() { DISTANCE += 1; setCamera(); }
-
-
-void myReshape(int w, int h) {
- glViewport(0, 0, w, h);
- setCamera();
-}
-
-void myKeyboard(unsigned char key, int x, int y)
-{
- switch (key)
- {
- case 'w': forward(); break;
- case 's': backward(); break;
- case 'a': turn_left(); break;
- case 'd': turn_right(); break;
- case 'e': jump(); break;
- case 'l' : stepLeft(); break;
- case 'r' : stepRight(); break;
- case 'f' : stepFront(); break;
- case 'b' : stepBack(); break;
- case 'z' : zoomIn(); break;
- case 'x' : zoomOut(); break;
- case 'i' : toggleIdle(); break;
- case ' ' : newRandom(); break;
- default:
-// std::cout << "unused key : " << key << std::endl;
- break;
- }
-}
-
-void mySpecial(int key, int x, int y)
-{
- switch (key)
- {
- case GLUT_KEY_LEFT : stepLeft(); break;
- case GLUT_KEY_RIGHT : stepRight(); break;
- case GLUT_KEY_UP : stepFront(); break;
- case GLUT_KEY_DOWN : stepBack(); break;
- case GLUT_KEY_PAGE_UP : zoomIn(); break;
- case GLUT_KEY_PAGE_DOWN : zoomOut(); break;
- case GLUT_KEY_HOME : toggleIdle(); break;
- default:
-// std::cout << "unused (special) key : " << key << std::endl;
- break;
- }
-}
-
-void goodbye( void)
-{
- g_scene.remove(sm_ground);
- g_scene.remove(sm_sphere);
-
- std::cout << "goodbye ..." << std::endl;
- exit(0);
-}
-
-void menu(int choice)
-{
-
- static int fullScreen = 0;
- static int px, py, sx, sy;
-
- switch(choice) {
- case 1:
- if (fullScreen == 1) {
- glutPositionWindow(px,py);
- glutReshapeWindow(sx,sy);
- glutChangeToMenuEntry(1,"Full Screen",1);
- fullScreen = 0;
- } else {
- px=glutGet((GLenum)GLUT_WINDOW_X);
- py=glutGet((GLenum)GLUT_WINDOW_Y);
- sx=glutGet((GLenum)GLUT_WINDOW_WIDTH);
- sy=glutGet((GLenum)GLUT_WINDOW_HEIGHT);
- glutFullScreen();
- glutChangeToMenuEntry(1,"Close Full Screen",1);
- fullScreen = 1;
- }
- break;
- case 2:
- toggleIdle();
- break;
- case 3:
- goodbye();
- break;
- default:
- break;
- }
-}
-
-void createMenu()
-{
- glutCreateMenu(menu);
- glutAddMenuEntry("Full Screen", 1);
- glutAddMenuEntry("Toggle Idle (Start/Stop)", 2);
- glutAddMenuEntry("Quit", 3);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-}
-
-int main(int argc, char **argv) {
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(500, 500);
- glutCreateWindow("Physics demo");
-
- myinit();
- glutKeyboardFunc(myKeyboard);
- glutSpecialFunc(mySpecial);
- glutReshapeFunc(myReshape);
- createMenu();
- glutIdleFunc(NULL);
-
- glutDisplayFunc(display);
- glutMainLoop();
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/sample/particle0.cpp b/source/gameengine/Physics/Sumo/Fuzzics/sample/particle0.cpp
deleted file mode 100644
index cdf0a2d8f64..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/sample/particle0.cpp
+++ /dev/null
@@ -1,695 +0,0 @@
-//#define FAKE_IT
-#define USE_COMPLEX
-#define QUADS
-
-#include <algorithm>
-#include <new>
-#include <GL/glut.h>
-
-#include "MT_MinMax.h"
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-#include "MT_Quaternion.h"
-#include "MT_Matrix3x3.h"
-#include "MT_Transform.h"
-
-#include "SM_Object.h"
-#include "SM_Scene.h"
-
-#include "solid.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-const MT_Scalar bowl_curv = 0.10;
-const MT_Scalar timeStep = 0.04;
-const MT_Scalar ground_margin = 0.0;
-const MT_Scalar sphere_radius = 0.5;
-
-const MT_Vector3 gravity(0, -9.8, 0);
-
-static MT_Scalar DISTANCE = 5;
-
-static MT_Scalar ele = 0, azi = 0;
-static MT_Point3 eye(0, 0, DISTANCE);
-static MT_Point3 center(0, 0, 0);
-
-inline double irnd() { return 2 * MT_random() - 1; }
-
-static const double SCALE_BOTTOM = 0.5;
-static const double SCALE_FACTOR = 2.0;
-
-SM_ShapeProps g_shapeProps = {
- 1.0, // mass
- 1.0, // inertia
- 0.9, // linear drag
- 0.9 // angular drag
-};
-
-SM_MaterialProps g_materialProps = {
- 0.7, // restitution
- 0.0, // friction
- 0.0, // spring constant
- 0.0 // damping
-};
-
-
-void toggleIdle();
-
-
-void newRandom();
-
-void coordSystem() {
- glDisable(GL_LIGHTING);
- glBegin(GL_LINES);
- glColor3f(1, 0, 0);
- glVertex3d(0, 0, 0);
- glVertex3d(10, 0, 0);
- glColor3f(0, 1, 0);
- glVertex3d(0, 0, 0);
- glVertex3d(0, 10, 0);
- glColor3f(0, 0, 1);
- glVertex3d(0, 0, 0);
- glVertex3d(0, 0, 10);
- glEnd();
- glEnable(GL_LIGHTING);
-}
-
-
-void display_bbox(const MT_Point3& min, const MT_Point3& max) {
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- glColor3f(0, 1, 1);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glBegin(GL_QUAD_STRIP);
- glVertex3d(min[0], min[1], min[2]);
- glVertex3d(min[0], min[1], max[2]);
- glVertex3d(max[0], min[1], min[2]);
- glVertex3d(max[0], min[1], max[2]);
- glVertex3d(max[0], max[1], min[2]);
- glVertex3d(max[0], max[1], max[2]);
- glVertex3d(min[0], max[1], min[2]);
- glVertex3d(min[0], max[1], max[2]);
- glVertex3d(min[0], min[1], min[2]);
- glVertex3d(min[0], min[1], max[2]);
- glEnd();
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- glEnable(GL_LIGHTING);
- glEnable(GL_DEPTH_TEST);
-}
-
-
-
-
-class GLShape {
-public:
- virtual void paint(GLdouble *m) const = 0;
-};
-
-
-class GLSphere : public GLShape {
- MT_Scalar radius;
-public:
- GLSphere(MT_Scalar r) : radius(r) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- glutSolidSphere(radius, 20, 20);
- glPopMatrix();
- }
-};
-
-
-class GLBox : public GLShape {
- MT_Vector3 extent;
-public:
- GLBox(MT_Scalar x, MT_Scalar y, MT_Scalar z) :
- extent(x, y, z) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- glPushMatrix();
- glScaled(extent[0], extent[1], extent[2]);
- glutSolidCube(1.0);
- glPopMatrix();
- glPopMatrix();
- }
-};
-
-
-class GLCone : public GLShape {
- MT_Scalar bottomRadius;
- MT_Scalar height;
- mutable GLuint displayList;
-
-public:
- GLCone(MT_Scalar r, MT_Scalar h) :
- bottomRadius(r),
- height(h),
- displayList(0) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- if (displayList) glCallList(displayList);
- else {
- GLUquadricObj *quadObj = gluNewQuadric();
- displayList = glGenLists(1);
- glNewList(displayList, GL_COMPILE_AND_EXECUTE);
- glPushMatrix();
- glRotatef(-90.0, 1.0, 0.0, 0.0);
- glTranslatef(0.0, 0.0, -1.0);
- gluQuadricDrawStyle(quadObj, (GLenum)GLU_FILL);
- gluQuadricNormals(quadObj, (GLenum)GLU_SMOOTH);
- gluCylinder(quadObj, bottomRadius, 0, height, 15, 10);
- glPopMatrix();
- glEndList();
- }
- glPopMatrix();
- }
-};
-
-class GLCylinder : public GLShape {
- MT_Scalar radius;
- MT_Scalar height;
- mutable GLuint displayList;
-
-public:
- GLCylinder(MT_Scalar r, MT_Scalar h) :
- radius(r),
- height(h),
- displayList(0) {}
-
- void paint(GLdouble *m) const {
- glPushMatrix();
- glLoadMatrixd(m);
- coordSystem();
- if (displayList) glCallList(displayList);
- else {
- GLUquadricObj *quadObj = gluNewQuadric();
- displayList = glGenLists(1);
- glNewList(displayList, GL_COMPILE_AND_EXECUTE);
- glPushMatrix();
- glRotatef(-90.0, 1.0, 0.0, 0.0);
- glTranslatef(0.0, 0.0, -1.0);
- gluQuadricDrawStyle(quadObj, (GLenum)GLU_FILL);
- gluQuadricNormals(quadObj, (GLenum)GLU_SMOOTH);
- gluCylinder(quadObj, radius, radius, height, 15, 10);
- glPopMatrix ();
- glEndList();
- }
- glPopMatrix();
- }
-};
-
-class Object;
-
-class Callback : public SM_Callback {
-public:
- Callback(Object& object) : m_object(object) {}
-
- virtual void do_me();
-
-private:
- Object& m_object;
-};
-
-
-class Object {
-public:
- Object(GLShape *gl_shape, SM_Object& object) :
- m_gl_shape(gl_shape),
- m_object(object),
- m_callback(*this)
- {
- m_object.registerCallback(m_callback);
- }
-
- ~Object() {}
-
- void paint() {
- m_gl_shape->paint(m);
- // display_bbox(m_bbox.lower(), m_bbox.upper());
- }
-
- MT_Vector3 getAhead() {
- return MT_Vector3(-m[8], -m[9], -m[10]);
- }
-
- void clearMomentum() {
- m_object.clearMomentum();
- }
-
- void setMargin(MT_Scalar margin) {
- m_object.setMargin(margin);
- }
-
- void setScaling(const MT_Vector3& scaling) {
- m_object.setScaling(scaling);
- }
-
- void setPosition(const MT_Point3& pos) {
- m_object.setPosition(pos);
- }
-
- void setOrientation(const MT_Quaternion& orn) {
- m_object.setOrientation(orn);
- }
-
- void applyCenterForce(const MT_Vector3& force) {
- m_object.applyCenterForce(force);
- }
-
- void applyTorque(const MT_Vector3& torque) {
- m_object.applyTorque(torque);
- }
-
- MT_Point3 getWorldCoord(const MT_Point3& local) const {
- return m_object.getWorldCoord(local);
- }
-
- MT_Vector3 getLinearVelocity() const {
- return m_object.getLinearVelocity();
- }
-
- void setMatrix() {
- m_object.getMatrix(m);
- }
-
-private:
- GLShape *m_gl_shape;
- SM_Object& m_object;
- DT_Scalar m[16];
- Callback m_callback;
-};
-
-
-void Callback::do_me()
-{
- m_object.setMatrix();
-}
-
-
-const MT_Scalar SPACE_SIZE = 2;
-
-static GLSphere gl_sphere(sphere_radius);
-static GLBox gl_ground(50.0, 0.0, 50.0);
-
-
-
-#ifdef USE_COMPLEX
-
-const int GRID_SCALE = 10;
-const MT_Scalar GRID_UNIT = 25.0 / GRID_SCALE;
-
-DT_ShapeHandle createComplex() {
- DT_ShapeHandle shape = DT_NewComplexShape();
- for (int i0 = -GRID_SCALE; i0 != GRID_SCALE; ++i0) {
- for (int j0 = -GRID_SCALE; j0 != GRID_SCALE; ++j0) {
- int i1 = i0 + 1;
- int j1 = j0 + 1;
-#ifdef QUADS
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, bowl_curv * i0*i0, GRID_UNIT * j0);
- DT_Vertex(GRID_UNIT * i0, bowl_curv * i0*i0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, bowl_curv * i1*i1, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, bowl_curv * i1*i1, GRID_UNIT * j0);
- DT_End();
-#else
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j0);
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j1);
- DT_End();
-
- DT_Begin();
- DT_Vertex(GRID_UNIT * i0, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j1);
- DT_Vertex(GRID_UNIT * i1, 0, GRID_UNIT * j0);
- DT_End();
-#endif
-
- }
- }
- DT_EndComplexShape();
- return shape;
-}
-
-
-static DT_ShapeHandle ground_shape = createComplex();
-
-#else
-
-static DT_ShapeHandle ground_shape = DT_Box(50, 0, 50);
-
-#endif
-
-static SM_Object sm_ground(ground_shape, &g_materialProps, 0, 0);
-static Object ground(&gl_ground, sm_ground);
-
-static SM_Object sm_sphere(DT_Sphere(0.0), &g_materialProps, &g_shapeProps, 0);
-static Object object(&gl_sphere, sm_sphere);
-
-
-static SM_Object sm_ray(DT_Ray(0.0, -1.0, 0.0), 0, 0, 0);
-
-static SM_Scene g_scene;
-
-
-void myinit(void) {
-
- GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
- GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
- GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
-
- /* light_position is NOT default value */
- GLfloat light_position0[] = { 1.0, 1.0, 1.0, 0.0 };
- GLfloat light_position1[] = { -1.0, -1.0, -1.0, 0.0 };
-
- glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
- glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
- glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
-
- glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);
- glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse);
- glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);
- glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
-
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHT1);
-
- glShadeModel(GL_SMOOTH);
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
-
- // glEnable(GL_CULL_FACE);
- // glCullFace(GL_BACK);
-
- g_scene.setForceField(gravity);
- g_scene.add(sm_ground);
- sm_ground.setMargin(ground_margin);
-
- new(&object) Object(&gl_sphere, sm_sphere);
-
-
- object.setMargin(sphere_radius);
-
- g_scene.add(sm_sphere);
-
- ground.setPosition(MT_Point3(0, -10, 0));
- ground.setOrientation(MT_Quaternion(0, 0, 0, 1));
- ground.setMatrix();
- center.setValue(0.0, 0.0, 0.0);
-
- newRandom();
-}
-
-
-//MT_Point3 cp1, cp2;
-//bool intersection;
-
-bool g_hit = false;
-MT_Point3 g_spot;
-MT_Vector3 g_normal;
-
-
-void display(void) {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- ground.paint();
- object.paint();
-
- if (g_hit) {
- glPointSize(5);
- glBegin(GL_POINTS);
- glVertex3d(g_spot[0], g_spot[1], g_spot[2]);
- glEnd();
- glPointSize(1);
- }
-
-
-
-#ifdef COLLISION
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- glColor3f(1, 1, 0);
- if (intersection) {
- glPointSize(5);
- glBegin(GL_POINTS);
- glVertex3d(cp1[0], cp1[1], cp1[2]);
- glEnd();
- glPointSize(1);
- }
- else {
- glBegin(GL_LINES);
- glVertex3d(cp1[0], cp1[1], cp1[2]);
- glVertex3d(cp2[0], cp2[1], cp2[2]);
- glEnd();
- }
- glEnable(GL_LIGHTING);
- glEnable(GL_DEPTH_TEST);
-#endif
-
- glFlush();
- glutSwapBuffers();
-}
-
-
-
-
-
-void newRandom() {
- object.setPosition(MT_Point3(0, 0, 0));
- object.clearMomentum();
- object.setMatrix();
-
- display();
-}
-
-void moveAndDisplay() {
- g_scene.proceed(timeStep, 0.01);
-
- MT_Vector3 normal(0, 1, 0);
-
- MT_Point3 from = object.getWorldCoord(MT_Point3(0, 0, 0));
- MT_Point3 to = from - normal * 10.0;
-
- g_hit = DT_ObjectRayTest(sm_ground.getObjectHandle(),
- from.getValue(),
- to.getValue(), g_spot.getValue(),
- g_normal.getValue());
-
- // Scrap
-#define DO_FH
-#ifdef DO_FH
- MT_Scalar dist = MT_distance(from, g_spot);
- if (dist < 5.0) {
- MT_Vector3 lin_vel = object.getLinearVelocity();
- MT_Scalar lin_vel_normal = lin_vel.dot(normal);
-
- MT_Scalar spring_extent = dist + lin_vel_normal * (timeStep * 0.5);
-
- MT_Scalar f_spring = (5.0 - spring_extent) * 3.0;
- object.applyCenterForce(normal * f_spring);
- object.applyCenterForce(-lin_vel_normal * normal);
- }
-
-#endif
-
-
- display();
-}
-
-
-void turn_left() {
- object.applyTorque(MT_Vector3(0.0, 10.0, 0.0));
-}
-
-void turn_right() {
- object.applyTorque(MT_Vector3(0.0, -10.0, 0.0));
-}
-
-void forward() {
- object.applyCenterForce(20.0 * object.getAhead());
-}
-
-void backward() {
- object.applyCenterForce(-20.0 * object.getAhead());
-}
-
-void jump() {
- object.applyCenterForce(MT_Vector3(0.0, 200.0, 0.0));
-}
-
-
-void toggleIdle() {
- static bool idle = true;
- if (idle) {
- glutIdleFunc(moveAndDisplay);
- idle = false;
- }
- else {
- glutIdleFunc(NULL);
- idle = true;
- }
-}
-
-
-void setCamera() {
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 200.0);
- MT_Scalar rele = MT_radians(ele);
- MT_Scalar razi = MT_radians(azi);
- eye.setValue(DISTANCE * sin(razi) * cos(rele),
- DISTANCE * sin(rele),
- DISTANCE * cos(razi) * cos(rele));
- gluLookAt(eye[0], eye[1], eye[2],
- center[0], center[1], center[2],
- 0, 1, 0);
- glMatrixMode(GL_MODELVIEW);
- display();
-}
-
-const MT_Scalar STEPSIZE = 5;
-
-void stepLeft() { azi -= STEPSIZE; if (azi < 0) azi += 360; setCamera(); }
-void stepRight() { azi += STEPSIZE; if (azi >= 360) azi -= 360; setCamera(); }
-void stepFront() { ele += STEPSIZE; if (azi >= 360) azi -= 360; setCamera(); }
-void stepBack() { ele -= STEPSIZE; if (azi < 0) azi += 360; setCamera(); }
-void zoomIn() { DISTANCE -= 1; setCamera(); }
-void zoomOut() { DISTANCE += 1; setCamera(); }
-
-
-void myReshape(int w, int h) {
- glViewport(0, 0, w, h);
- setCamera();
-}
-
-void myKeyboard(unsigned char key, int x, int y)
-{
- switch (key)
- {
- case 'w': forward(); break;
- case 's': backward(); break;
- case 'a': turn_left(); break;
- case 'd': turn_right(); break;
- case 'e': jump(); break;
- case 'l' : stepLeft(); break;
- case 'r' : stepRight(); break;
- case 'f' : stepFront(); break;
- case 'b' : stepBack(); break;
- case 'z' : zoomIn(); break;
- case 'x' : zoomOut(); break;
- case 'i' : toggleIdle(); break;
- case ' ' : newRandom(); break;
- default:
-// std::cout << "unused key : " << key << std::endl;
- break;
- }
-}
-
-void mySpecial(int key, int x, int y)
-{
- switch (key)
- {
- case GLUT_KEY_LEFT : stepLeft(); break;
- case GLUT_KEY_RIGHT : stepRight(); break;
- case GLUT_KEY_UP : stepFront(); break;
- case GLUT_KEY_DOWN : stepBack(); break;
- case GLUT_KEY_PAGE_UP : zoomIn(); break;
- case GLUT_KEY_PAGE_DOWN : zoomOut(); break;
- case GLUT_KEY_HOME : toggleIdle(); break;
- default:
-// std::cout << "unused (special) key : " << key << std::endl;
- break;
- }
-}
-
-void goodbye( void)
-{
- g_scene.remove(sm_ground);
- g_scene.remove(sm_sphere);
-
- std::cout << "goodbye ..." << std::endl;
- exit(0);
-}
-
-void menu(int choice)
-{
-
- static int fullScreen = 0;
- static int px, py, sx, sy;
-
- switch(choice) {
- case 1:
- if (fullScreen == 1) {
- glutPositionWindow(px,py);
- glutReshapeWindow(sx,sy);
- glutChangeToMenuEntry(1,"Full Screen",1);
- fullScreen = 0;
- } else {
- px=glutGet((GLenum)GLUT_WINDOW_X);
- py=glutGet((GLenum)GLUT_WINDOW_Y);
- sx=glutGet((GLenum)GLUT_WINDOW_WIDTH);
- sy=glutGet((GLenum)GLUT_WINDOW_HEIGHT);
- glutFullScreen();
- glutChangeToMenuEntry(1,"Close Full Screen",1);
- fullScreen = 1;
- }
- break;
- case 2:
- toggleIdle();
- break;
- case 3:
- goodbye();
- break;
- default:
- break;
- }
-}
-
-void createMenu()
-{
- glutCreateMenu(menu);
- glutAddMenuEntry("Full Screen", 1);
- glutAddMenuEntry("Toggle Idle (Start/Stop)", 2);
- glutAddMenuEntry("Quit", 3);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-}
-
-int main(int argc, char **argv) {
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(500, 500);
- glutCreateWindow("Physics demo");
-
- myinit();
- glutKeyboardFunc(myKeyboard);
- glutSpecialFunc(mySpecial);
- glutReshapeFunc(myReshape);
- createMenu();
- glutIdleFunc(NULL);
-
- glutDisplayFunc(display);
- glutMainLoop();
- return 0;
-}
-
-
-
-
-
-
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/Makefile b/source/gameengine/Physics/Sumo/Fuzzics/src/Makefile
deleted file mode 100644
index b2744c5496a..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/src/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# $Id$
-# Copyright (C) 2001 NaN Technologies B.V.
-
-LIBNAME = fuzzics
-DIR = $(OCGDIR)/gameengine/blphys/$(LIBNAME)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../include -I$(NAN_MOTO)/include -I../../include
-CPPFLAGS += -I$(NAN_SOLID)/include
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_FhObject.cpp b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_FhObject.cpp
deleted file mode 100644
index d866cdb4922..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_FhObject.cpp
+++ /dev/null
@@ -1,180 +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 *****
- */
-#include "SM_FhObject.h"
-#include "MT_MinMax.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-SM_FhObject::SM_FhObject(DT_ShapeHandle rayshape, MT_Vector3 ray, SM_Object *parent_object) :
- SM_Object(rayshape, NULL, NULL, NULL),
- m_ray(ray),
- m_ray_direction(ray.normalized()),
- m_parent_object(parent_object)
-{
-}
-
-SM_FhObject::~SM_FhObject()
-{
- DT_DeleteShape(getShapeHandle());
-}
-
-DT_Bool SM_FhObject::ray_hit(void *client_data,
- void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data)
-{
-
- SM_FhObject *fh_object = dynamic_cast<SM_FhObject *>((SM_Object *)client_object2);
- if (!fh_object)
- {
- std::swap(client_object1, client_object2);
- fh_object = dynamic_cast<SM_FhObject *>((SM_Object *)client_object2);
- }
-
- SM_Object *hit_object = (SM_Object *)client_object1;
- const SM_MaterialProps *matProps = hit_object->getMaterialProps();
-
- if ((matProps == 0) || (matProps->m_fh_distance < MT_EPSILON)) {
- return DT_CONTINUE;
- }
-
- SM_Object *cl_object = fh_object->getParentObject();
-
- assert(fh_object);
-
- if (hit_object == cl_object) {
- // Shot myself in the foot...
- return DT_CONTINUE;
- }
-
- const SM_ShapeProps *shapeProps = cl_object->getShapeProps();
-
- // Exit if the client object is not dynamic.
- if (shapeProps == 0) {
- return DT_CONTINUE;
- }
-
- MT_Point3 lspot;
- MT_Vector3 normal;
-
- DT_Vector3 from, to, dnormal;
- DT_Scalar dlspot;
- fh_object->getPosition().getValue(from);
- fh_object->getSpot().getValue(to);
-
-
- if (DT_ObjectRayCast(hit_object->getObjectHandle(),
- from,
- to,
- 1.,
- &dlspot,
- dnormal)) {
-
- lspot = fh_object->getPosition() + (fh_object->getSpot() - fh_object->getPosition()) * dlspot;
- const MT_Vector3& ray_dir = fh_object->getRayDirection();
- MT_Scalar dist = MT_distance(fh_object->getPosition(), lspot) -
- cl_object->getMargin() - shapeProps->m_radius;
-
- normal = MT_Vector3(dnormal).safe_normalized();
-
- if (dist < matProps->m_fh_distance) {
-
- if (shapeProps->m_do_fh) {
- lspot -= hit_object->getPosition();
- MT_Vector3 rel_vel = cl_object->getLinearVelocity() - hit_object->getVelocity(lspot);
- MT_Scalar rel_vel_ray = ray_dir.dot(rel_vel);
- MT_Scalar spring_extent = 1.0 - dist / matProps->m_fh_distance;
-
- MT_Scalar i_spring = spring_extent * matProps->m_fh_spring;
- MT_Scalar i_damp = rel_vel_ray * matProps->m_fh_damping;
-
- cl_object->addLinearVelocity(-(i_spring + i_damp) * ray_dir);
- if (matProps->m_fh_normal) {
- cl_object->addLinearVelocity(
- (i_spring + i_damp) *
- (normal - normal.dot(ray_dir) * ray_dir));
- }
-
- MT_Vector3 lateral = rel_vel - rel_vel_ray * ray_dir;
- const SM_ShapeProps *shapeProps = cl_object->getShapeProps();
-
- if (shapeProps->m_do_anisotropic) {
- MT_Matrix3x3 lcs(cl_object->getOrientation());
- MT_Vector3 loc_lateral = lateral * lcs;
- const MT_Vector3& friction_scaling =
- shapeProps->m_friction_scaling;
-
- loc_lateral.scale(friction_scaling[0],
- friction_scaling[1],
- friction_scaling[2]);
- lateral = lcs * loc_lateral;
- }
-
-
- MT_Scalar rel_vel_lateral = lateral.length();
-
- if (rel_vel_lateral > MT_EPSILON) {
- MT_Scalar friction_factor = matProps->m_friction;
- MT_Scalar max_friction = friction_factor * MT_max(MT_Scalar(0.0), i_spring);
-
- MT_Scalar rel_mom_lateral = rel_vel_lateral /
- cl_object->getInvMass();
-
- MT_Vector3 friction =
- (rel_mom_lateral > max_friction) ?
- -lateral * (max_friction / rel_vel_lateral) :
- -lateral;
-
- cl_object->applyCenterImpulse(friction);
- }
- }
-
- if (shapeProps->m_do_rot_fh) {
- const double *ogl_mat = cl_object->getMatrix();
- MT_Vector3 up(&ogl_mat[8]);
- MT_Vector3 t_spring = up.cross(normal) * matProps->m_fh_spring;
- MT_Vector3 ang_vel = cl_object->getAngularVelocity();
-
- // only rotations that tilt relative to the normal are damped
- ang_vel -= ang_vel.dot(normal) * normal;
-
- MT_Vector3 t_damp = ang_vel * matProps->m_fh_damping;
-
- cl_object->addAngularVelocity(t_spring - t_damp);
- }
- }
- }
-
- return DT_CONTINUE;
-}
-
-
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_MotionState.cpp b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_MotionState.cpp
deleted file mode 100644
index b8f4e0c591c..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_MotionState.cpp
+++ /dev/null
@@ -1,100 +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 *****
- */
-#include <MT_Scalar.h>
-#include <MT_Vector3.h>
-#include <MT_Quaternion.h>
-
-#include "SM_MotionState.h"
-
-void SM_MotionState::integrateMidpoint(MT_Scalar timeStep, const SM_MotionState &prev_state, const MT_Vector3 &velocity, const MT_Quaternion& ang_vel)
-{
- m_pos += (prev_state.getLinearVelocity() + velocity) * (timeStep * 0.5);
- m_orn += (prev_state.getAngularVelocity() * prev_state.getOrientation() + ang_vel * m_orn) * (timeStep * 0.25);
- m_orn.normalize();
-}
-
-void SM_MotionState::integrateBackward(MT_Scalar timeStep, const MT_Vector3 &velocity, const MT_Quaternion& ang_vel)
-{
- m_pos += velocity * timeStep;
- m_orn += ang_vel * m_orn * (timeStep * 0.5);
- m_orn.normalize();
-}
-
-void SM_MotionState::integrateForward(MT_Scalar timeStep, const SM_MotionState &prev_state)
-{
- m_pos += prev_state.getLinearVelocity() * timeStep;
- m_orn += prev_state.getAngularVelocity() * m_orn * (timeStep * 0.5);
- m_orn.normalize();
-}
-
-/*
-// Newtonian lerp: interpolate based on Newtonian motion
-void SM_MotionState::nlerp(const SM_MotionState &prev, const SM_MotionState &next)
-{
- MT_Scalar dt = next.getTime() - prev.getTime();
- MT_Scalar t = getTime() - prev.getTime();
- MT_Vector3 dx = next.getPosition() - prev.getPosition();
- MT_Vector3 a = dx/(dt*dt) - prev.getLinearVelocity()/dt;
-
- m_pos = prev.getPosition() + prev.getLinearVelocity()*t + a*t*t;
-}
-*/
-
-void SM_MotionState::lerp(const SM_MotionState &prev, const SM_MotionState &next)
-{
- MT_Scalar dt = next.getTime() - prev.getTime();
- if (MT_fuzzyZero(dt))
- {
- *this = next;
- return;
- }
-
- MT_Scalar x = (getTime() - prev.getTime())/dt;
-
- m_pos = x*next.getPosition() + (1-x)*prev.getPosition();
-
- m_orn = prev.getOrientation().slerp(next.getOrientation(), 1-x);
-
- m_lin_vel = x*next.getLinearVelocity() + (1-x)*prev.getLinearVelocity();
- m_ang_vel = x*next.getAngularVelocity() + (1-x)*prev.getAngularVelocity();
-}
-
-void SM_MotionState::lerp(MT_Scalar t, const SM_MotionState &other)
-{
- MT_Scalar x = (t - getTime())/(other.getTime() - getTime());
- m_pos = (1-x)*m_pos + x*other.getPosition();
-
- m_orn = other.getOrientation().slerp(m_orn, x);
-
- m_lin_vel = (1-x)*m_lin_vel + x*other.getLinearVelocity();
- m_ang_vel = (1-x)*m_ang_vel + x*other.getAngularVelocity();
-
- m_time = t;
-}
-
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
deleted file mode 100644
index 4b2c7cae008..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
+++ /dev/null
@@ -1,1298 +0,0 @@
-/**
- * $Id$
- * Copyright (C) 2001 NaN Technologies B.V.
- * The basic physics object.
- *
- * ***** 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 *****
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef WIN32
-// This warning tells us about truncation of __long__ stl-generated names.
-// It can occasionally cause DevStudio to have internal compiler warnings.
-#pragma warning( disable : 4786 )
-#endif
-
-#include "MT_assert.h"
-
-#include "SM_Object.h"
-#include "SM_Scene.h"
-#include "SM_FhObject.h"
-#include "SM_Debug.h"
-
-#include "MT_MinMax.h"
-
-MT_Scalar SM_Object::ImpulseThreshold = -1.0;
-
-struct Contact
-{
- SM_Object *obj1;
- SM_Object *obj2;
- MT_Vector3 normal;
- MT_Point3 pos;
-
- // Sort objects by height
- bool operator()(const Contact *a, const Contact *b)
- {
- return a->pos[2] < b->pos[2];
- }
-
- Contact(SM_Object *o1, SM_Object *o2, const MT_Vector3 nor, const MT_Point3 p)
- : obj1(o1),
- obj2(o2),
- normal(nor),
- pos(p)
- {
- }
-
- Contact()
- {
- }
-
- void resolve()
- {
- if (obj1->m_static || obj2->m_static)
- {
- if (obj1->isDynamic())
- {
- if (obj1->m_static && obj2->m_static)
- {
- if (obj1->m_static < obj2->m_static)
- {
- obj2->m_error -= normal;
- obj2->m_static = obj1->m_static + 1;
- }
- else
- {
- obj1->m_error += normal;
- obj1->m_static = obj2->m_static + 1;
- }
- }
- else
- {
- if (obj1->m_static)
- {
- obj2->m_error -= normal;
- obj2->m_static = obj1->m_static + 1;
- }
- else
- {
- obj1->m_error += normal;
- obj1->m_static = obj2->m_static + 1;
- }
- }
- }
- else
- {
- obj2->m_error -= normal;
- obj2->m_static = 1;
- }
- }
- else
- {
- // This distinction between dynamic and non-dynamic objects should not be
- // necessary. Non-dynamic objects are assumed to have infinite mass.
- if (obj1->isDynamic()) {
- MT_Vector3 error = normal * 0.5f;
- obj1->m_error += error;
- obj2->m_error -= error;
- }
- else {
- // Same again but now obj1 is non-dynamic
- obj2->m_error -= normal;
- obj2->m_static = obj1->m_static + 1;
- }
- }
-
- }
-
-
- typedef std::set<Contact*, Contact> Set;
-};
-
-static Contact::Set contacts;
-
-SM_Object::SM_Object(
- DT_ShapeHandle shape,
- const SM_MaterialProps *materialProps,
- const SM_ShapeProps *shapeProps,
- SM_Object *dynamicParent) :
-
- m_dynamicParent(dynamicParent),
- m_client_object(0),
- m_physicsClientObject(0),
- m_shape(shape),
- m_materialProps(materialProps),
- m_materialPropsBackup(0),
- m_shapeProps(shapeProps),
- m_shapePropsBackup(0),
- m_margin(0.0),
- m_scaling(1.0, 1.0, 1.0),
- m_reaction_impulse(0.0, 0.0, 0.0),
- m_reaction_force(0.0, 0.0, 0.0),
- m_lin_mom(0.0, 0.0, 0.0),
- m_ang_mom(0.0, 0.0, 0.0),
- m_force(0.0, 0.0, 0.0),
- m_torque(0.0, 0.0, 0.0),
- m_error(0.0, 0.0, 0.0),
- m_combined_lin_vel (0.0, 0.0, 0.0),
- m_combined_ang_vel (0.0, 0.0, 0.0),
- m_fh_object(0),
- m_inv_mass(0.0),
- m_inv_inertia(0., 0., 0.),
- m_kinematic(false),
- m_prev_kinematic(false),
- m_is_rigid_body(false),
- m_static(0)
-{
- m_object = DT_CreateObject(this, shape);
- m_xform.setIdentity();
- m_xform.getValue(m_ogl_matrix);
- if (shapeProps)
- {
- if (shapeProps->m_do_fh || shapeProps->m_do_rot_fh)
- {
- DT_Vector3 zero = {0., 0., 0.}, ray = {0.0, 0.0, -10.0};
- m_fh_object = new SM_FhObject(DT_NewLineSegment(zero, ray), MT_Vector3(ray), this);
- //printf("SM_Object:: WARNING! fh disabled.\n");
- }
- m_inv_mass = 1. / shapeProps->m_mass;
- m_inv_inertia = MT_Vector3(1./shapeProps->m_inertia[0], 1./shapeProps->m_inertia[1], 1./shapeProps->m_inertia[2]);
- }
- updateInvInertiaTensor();
- m_suspended = false;
-}
-
-
- void
-SM_Object::
-integrateForces(
- MT_Scalar timeStep
-){
- if (!m_suspended) {
- m_prev_state = getNextFrame();
- m_prev_state.setLinearVelocity(actualLinVelocity());
- m_prev_state.setAngularVelocity(actualAngVelocity());
- if (isDynamic()) {
- // Integrate momentum (forward Euler)
- m_lin_mom += m_force * timeStep;
- m_ang_mom += m_torque * timeStep;
- // Drain momentum because of air/water resistance
- m_lin_mom *= pow(m_shapeProps->m_lin_drag, timeStep);
- m_ang_mom *= pow(m_shapeProps->m_ang_drag, timeStep);
- // Set velocities according momentum
- getNextFrame().setLinearVelocity(m_lin_mom * m_inv_mass);
- getNextFrame().setAngularVelocity(m_inv_inertia_tensor * m_ang_mom);
- }
- }
-
-};
-
- void
-SM_Object::
-integrateMomentum(
- MT_Scalar timeStep
-){
- // Integrate position and orientation
-
- // only do it for objects with linear and/or angular velocity
- // else clients with hierarchies may get into trouble
- if (!actualLinVelocity().fuzzyZero() || !actualAngVelocity().fuzzyZero())
- {
-
- // those MIDPOINT and BACKWARD integration methods are
- // in this form not ok with some testfiles !
- // For a release build please use forward euler unless completely tested
-
-//#define MIDPOINT
-//#define BACKWARD
-#ifdef MIDPOINT
-// Midpoint rule
- getNextFrame().integrateMidpoint(timeStep, m_prev_state, actualLinVelocity(), actualAngVelocity());
-#elif defined BACKWARD
-// Backward Euler
- getNextFrame().integrateBackward(timeStep, actualLinVelocity(), actualAngVelocity());
-#else
-// Forward Euler
- getNextFrame().integrateForward(timeStep, m_prev_state);
-#endif
-
- calcXform();
- notifyClient();
-
- }
-}
-
-/**
- * dynamicCollision computes the response to a collision.
- *
- * @param local2 the contact point in local coordinates.
- * @param normal the contact normal.
- * @param dist the penetration depth of the contact. (unused)
- * @param rel_vel the relative velocity of the objects
- * @param restitution the amount of momentum conserved in the collision. Range: 0.0 - 1.0
- * @param friction_factor the amount of friction between the two surfaces.
- * @param invMass the inverse mass of the collision objects (1.0 / mass)
- */
-void SM_Object::dynamicCollision(const MT_Point3 &local2,
- const MT_Vector3 &normal,
- MT_Scalar dist,
- const MT_Vector3 &rel_vel,
- MT_Scalar restitution,
- MT_Scalar friction_factor,
- MT_Scalar invMass
-)
-{
- /**
- * rel_vel_normal is the relative velocity in the contact normal direction.
- */
- MT_Scalar rel_vel_normal = normal.dot(rel_vel);
-
- /**
- * if rel_vel_normal > 0, the objects are moving apart!
- */
- if (rel_vel_normal < -MT_EPSILON) {
- /**
- * if rel_vel_normal < ImpulseThreshold, scale the restitution down.
- * This should improve the simulation where the object is stacked.
- */
- restitution *= MT_min(MT_Scalar(1.0), rel_vel_normal/ImpulseThreshold);
-
- MT_Scalar impulse = -(1.0 + restitution) * rel_vel_normal;
-
- if (isRigidBody())
- {
- MT_Vector3 temp = getInvInertiaTensor() * local2.cross(normal);
- impulse /= invMass + normal.dot(temp.cross(local2));
-
- /**
- * Apply impulse at the collision point.
- * Take rotational inertia into account.
- */
- applyImpulse(local2 + getNextFrame().getPosition(), impulse * normal);
- } else {
- /**
- * Apply impulse through object center. (no rotation.)
- */
- impulse /= invMass;
- applyCenterImpulse( impulse * normal );
- }
-
- MT_Vector3 external = m_combined_lin_vel + m_combined_ang_vel.cross(local2);
- MT_Vector3 lateral = rel_vel - external - normal * (rel_vel_normal - external.dot(normal));
-#if 0
- // test - only do friction on the physics part of the
- // velocity.
- vel1 -= obj1->m_combined_lin_vel;
- vel2 -= obj2->m_combined_lin_vel;
-
- // This should look familiar....
- rel_vel = vel2 - vel1;
- rel_vel_normal = normal.dot(rel_vel);
-#endif
- /**
- * The friction part starts here!!!!!!!!
- *
- * Compute the lateral component of the relative velocity
- * lateral actually points in the opposite direction, i.e.,
- * into the direction of the friction force.
- */
- if (m_shapeProps->m_do_anisotropic) {
-
- /**
- * For anisotropic friction we scale the lateral component,
- * rather than compute a direction-dependent fricition
- * factor. For this the lateral component is transformed to
- * local coordinates.
- */
-
- MT_Matrix3x3 lcs(getNextFrame().getOrientation());
-
- /**
- * We cannot use m_xform.getBasis() for the matrix, since
- * it might contain a non-uniform scaling.
- * OPT: it's a bit daft to compute the matrix since the
- * quaternion itself can be used to do the transformation.
- */
- MT_Vector3 loc_lateral = lateral * lcs;
-
- /**
- * lcs is orthogonal so lcs.inversed() == lcs.transposed(),
- * and lcs.transposed() * lateral == lateral * lcs.
- */
- const MT_Vector3& friction_scaling =
- m_shapeProps->m_friction_scaling;
-
- // Scale the local lateral...
- loc_lateral.scale(friction_scaling[0],
- friction_scaling[1],
- friction_scaling[2]);
- // ... and transform it back to global coordinates
- lateral = lcs * loc_lateral;
- }
-
- /**
- * A tiny Coulomb friction primer:
- * The Coulomb friction law states that the magnitude of the
- * maximum possible friction force depends linearly on the
- * magnitude of the normal force.
- *
- * \f[
- F_max_friction = friction_factor * F_normal
- \f]
- *
- * (NB: independent of the contact area!!)
- *
- * The friction factor depends on the material.
- * We use impulses rather than forces but let us not be
- * bothered by this.
- */
- MT_Scalar rel_vel_lateral = lateral.length();
-
- if (rel_vel_lateral > MT_EPSILON) {
- lateral /= rel_vel_lateral;
-
- // Compute the maximum friction impulse
- MT_Scalar max_friction =
- friction_factor * MT_max(MT_Scalar(0.0), impulse);
-
- // I guess the GEN_max is not necessary, so let's check it
-
- MT_assert(impulse >= 0.0);
-
- /**
- * Here's the trick. We compute the impulse to make the
- * lateral velocity zero. (Make the objects stick together
- * at the contact point. If this impulse is larger than
- * the maximum possible friction impulse, then shrink its
- * magnitude to the maximum friction.
- */
-
- if (isRigidBody()) {
-
- /**
- * For rigid bodies we take the inertia into account,
- * since the friction impulse is going to change the
- * angular momentum as well.
- */
- MT_Vector3 temp = getInvInertiaTensor() * local2.cross(lateral);
- MT_Scalar impulse_lateral = rel_vel_lateral /
- (invMass + lateral.dot(temp.cross(local2)));
-
- MT_Scalar friction = MT_min(impulse_lateral, max_friction);
- applyImpulse(local2 + getNextFrame().getPosition(), -lateral * friction);
- }
- else {
- MT_Scalar impulse_lateral = rel_vel_lateral / invMass;
-
- MT_Scalar friction = MT_min(impulse_lateral, max_friction);
- applyCenterImpulse( -friction * lateral);
- }
-
-
- }
-
- //calcXform();
- //notifyClient();
-
- }
-}
-
-static void AddCallback(SM_Scene *scene, SM_Object *obj1, SM_Object *obj2)
-{
- // If we have callbacks on either of the client objects, do a collision test
- // and add a callback if they intersect.
- DT_Vector3 v;
- if ((obj1->getClientObject() && obj1->getClientObject()->hasCollisionCallback()) ||
- (obj2->getClientObject() && obj2->getClientObject()->hasCollisionCallback()) &&
- DT_GetIntersect(obj1->getObjectHandle(), obj2->getObjectHandle(), v))
- scene->notifyCollision(obj1, obj2);
-}
-
-DT_Bool SM_Object::boing(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data
-){
- SM_Scene *scene = (SM_Scene *)client_data;
- SM_Object *obj1 = (SM_Object *)object1;
- SM_Object *obj2 = (SM_Object *)object2;
-
- // at this point it is unknown whether we are really intersecting (broad phase)
-
- DT_Vector3 p1, p2;
- if (!obj2->isDynamic()) {
- std::swap(obj1, obj2);
- }
-
- // If one of the objects is a ghost then ignore it for the dynamics
- if (obj1->isGhost() || obj2->isGhost()) {
- AddCallback(scene, obj1, obj2);
- return DT_CONTINUE;
- }
-
- // Objects do not collide with parent objects
- if (obj1->getDynamicParent() == obj2 || obj2->getDynamicParent() == obj1) {
- AddCallback(scene, obj1, obj2);
- return DT_CONTINUE;
- }
-
- if (!obj2->isDynamic()) {
- AddCallback(scene, obj1, obj2);
- return DT_CONTINUE;
- }
-
- // Get collision data from SOLID
- if (!DT_GetPenDepth(obj1->getObjectHandle(), obj2->getObjectHandle(), p1, p2))
- return DT_CONTINUE;
-
- MT_Point3 local1(p1), local2(p2);
- MT_Vector3 normal(local2 - local1);
- MT_Scalar dist = normal.length();
-
- if (dist < MT_EPSILON)
- return DT_CONTINUE;
-
- // Now we are definitely intersecting.
-
- // Set callbacks for game engine.
- if ((obj1->getClientObject() && obj1->getClientObject()->hasCollisionCallback()) ||
- (obj2->getClientObject() && obj2->getClientObject()->hasCollisionCallback()))
- scene->notifyCollision(obj1, obj2);
-
- local1 -= obj1->getNextFrame().getPosition();
- local2 -= obj2->getNextFrame().getPosition();
-
- // Calculate collision parameters
- MT_Vector3 rel_vel = obj1->getVelocity(local1) - obj2->getVelocity(local2);
-
- MT_Scalar restitution =
- MT_min(obj1->getMaterialProps()->m_restitution,
- obj2->getMaterialProps()->m_restitution);
-
- MT_Scalar friction_factor =
- MT_min(obj1->getMaterialProps()->m_friction,
- obj2->getMaterialProps()->m_friction);
-
- MT_Scalar invMass = obj1->getInvMass() + obj2->getInvMass();
-
- normal /= dist;
-
- // Calculate reactions
- if (obj1->isDynamic())
- obj1->dynamicCollision(local1, normal, dist, rel_vel, restitution, friction_factor, invMass);
-
- if (obj2->isDynamic())
- {
- obj2->dynamicCollision(local2, -normal, dist, -rel_vel, restitution, friction_factor, invMass);
- if (!obj1->isDynamic() || obj1->m_static)
- obj2->m_static = obj1->m_static + 1;
- }
-
- return DT_CONTINUE;
-}
-
-DT_Bool SM_Object::fix(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *coll_data
-){
- SM_Object *obj1 = (SM_Object *)object1;
- SM_Object *obj2 = (SM_Object *)object2;
-
- // If one of the objects is a ghost then ignore it for the dynamics
- if (obj1->isGhost() || obj2->isGhost()) {
- return DT_CONTINUE;
- }
-
- if (obj1->getDynamicParent() == obj2 || obj2->getDynamicParent() == obj1) {
- return DT_CONTINUE;
- }
-
- if (!obj2->isDynamic()) {
- std::swap(obj1, obj2);
- }
-
- if (!obj2->isDynamic()) {
- return DT_CONTINUE;
- }
-
- // obj1 points to a dynamic object
- DT_Vector3 p1, p2;
- if (!DT_GetPenDepth(obj1->getObjectHandle(), obj2->getObjectHandle(), p1, p2))
- return DT_CONTINUE;
- MT_Point3 local1(p1), local2(p2);
- // Get collision data from SOLID
- MT_Vector3 normal(local2 - local1);
-
- MT_Scalar dist = normal.dot(normal);
- if (dist < MT_EPSILON || dist > obj2->m_shapeProps->m_radius*obj2->m_shapeProps->m_radius)
- return DT_CONTINUE;
-
-
- if ((obj1->m_static || !obj1->isDynamic()) && obj1->m_static < obj2->m_static)
- {
- obj2->m_static = obj1->m_static + 1;
- } else if (obj2->m_static && obj2->m_static < obj1->m_static)
- {
- obj1->m_static = obj2->m_static + 1;
- }
-
- contacts.insert(new Contact(obj1, obj2, normal, MT_Point3(local1 + 0.5*(local2 - local1))));
-
-
- return DT_CONTINUE;
-}
-
-void SM_Object::relax(void)
-{
- for (Contact::Set::iterator csit = contacts.begin() ; csit != contacts.end(); ++csit)
- {
- (*csit)->resolve();
- delete (*csit);
- }
-
- contacts.clear();
- if (m_error.fuzzyZero())
- return;
- //std::cout << "SM_Object::relax: { " << m_error << " }" << std::endl;
-
- getNextFrame().setPosition(getNextFrame().getPosition() + m_error);
- m_error.setValue(0., 0., 0.);
- //calcXform();
- //notifyClient();
-}
-
-SM_Object::SM_Object() :
- m_dynamicParent(0),
- m_client_object(0),
- m_physicsClientObject(0),
- m_shape(0),
- m_materialProps(0),
- m_materialPropsBackup(0),
- m_shapeProps(0),
- m_shapePropsBackup(0),
- m_object(0),
- m_margin(0.0),
- m_scaling(1.0, 1.0, 1.0),
- m_reaction_impulse(0.0, 0.0, 0.0),
- m_reaction_force(0.0, 0.0, 0.0),
- m_lin_mom(0.0, 0.0, 0.0),
- m_ang_mom(0.0, 0.0, 0.0),
- m_force(0.0, 0.0, 0.0),
- m_torque(0.0, 0.0, 0.0),
- m_error(0.0, 0.0, 0.0),
- m_combined_lin_vel (0.0, 0.0, 0.0),
- m_combined_ang_vel (0.0, 0.0, 0.0),
- m_fh_object(0),
- m_kinematic(false),
- m_prev_kinematic(false),
- m_is_rigid_body(false)
-{
- // warning no initialization of variables done by moto.
-}
-
-SM_Object::
-~SM_Object() {
- if (m_fh_object)
- delete m_fh_object;
-
- DT_DestroyObject(m_object);
- m_object = NULL;
-}
-
- bool
-SM_Object::
-isDynamic(
-) const {
- return m_shapeProps != 0;
-}
-
-/* nzc experimental. There seem to be two places where kinematics
- * are evaluated: proceedKinematic (called from SM_Scene) and
- * proceed() in this object. I'll just try and bunge these out for
- * now. */
- void
-SM_Object::
-suspend(
-){
- if (!m_suspended) {
- m_suspended = true;
- suspendDynamics();
- }
-}
-
- void
-SM_Object::
-resume(
-) {
- if (m_suspended) {
- m_suspended = false;
- restoreDynamics();
- }
-}
-
- void
-SM_Object::
-suspendDynamics(
-) {
- if (m_shapeProps) {
- m_shapePropsBackup = m_shapeProps;
- m_shapeProps = 0;
- }
-}
-
- void
-SM_Object::
-restoreDynamics(
-) {
- if (m_shapePropsBackup) {
- m_shapeProps = m_shapePropsBackup;
- m_shapePropsBackup = 0;
- }
-}
-
- bool
-SM_Object::
-isGhost(
-) const {
- return m_materialProps == 0;
-}
-
- void
-SM_Object::
-suspendMaterial(
-) {
- if (m_materialProps) {
- m_materialPropsBackup = m_materialProps;
- m_materialProps = 0;
- }
-}
-
- void
-SM_Object::
-restoreMaterial(
-) {
- if (m_materialPropsBackup) {
- m_materialProps = m_materialPropsBackup;
- m_materialPropsBackup = 0;
- }
-}
-
- SM_FhObject *
-SM_Object::
-getFhObject(
-) const {
- return m_fh_object;
-}
-
- void
-SM_Object::
-registerCallback(
- SM_Callback& callback
-) {
- m_callbackList.push_back(&callback);
-}
-
-// Set the local coordinate system according to the current state
- void
-SM_Object::
-calcXform() {
-#ifdef SM_DEBUG_XFORM
- printf("SM_Object::calcXform m_pos = { %-0.5f, %-0.5f, %-0.5f }\n",
- m_pos[0], m_pos[1], m_pos[2]);
- printf(" m_orn = { %-0.5f, %-0.5f, %-0.5f, %-0.5f }\n",
- m_orn[0], m_orn[1], m_orn[2], m_orn[3]);
- printf(" m_scaling = { %-0.5f, %-0.5f, %-0.5f }\n",
- m_scaling[0], m_scaling[1], m_scaling[2]);
-#endif
- m_xform.setOrigin(getNextFrame().getPosition());
- m_xform.setBasis(MT_Matrix3x3(getNextFrame().getOrientation(), m_scaling));
- m_xform.getValue(m_ogl_matrix);
-
- /* Blender has been known to crash here.
- This usually means SM_Object *this has been deleted more than once. */
- DT_SetMatrixd(m_object, m_ogl_matrix);
- if (m_fh_object) {
- m_fh_object->setPosition(getNextFrame().getPosition());
- m_fh_object->calcXform();
- }
- updateInvInertiaTensor();
-#ifdef SM_DEBUG_XFORM
- printf("\n | %-0.5f %-0.5f %-0.5f %-0.5f |\n",
- m_ogl_matrix[0], m_ogl_matrix[4], m_ogl_matrix[ 8], m_ogl_matrix[12]);
- printf( " | %-0.5f %-0.5f %-0.5f %-0.5f |\n",
- m_ogl_matrix[1], m_ogl_matrix[5], m_ogl_matrix[ 9], m_ogl_matrix[13]);
- printf( "m_ogl_matrix = | %-0.5f %-0.5f %-0.5f %-0.5f |\n",
- m_ogl_matrix[2], m_ogl_matrix[6], m_ogl_matrix[10], m_ogl_matrix[14]);
- printf( " | %-0.5f %-0.5f %-0.5f %-0.5f |\n\n",
- m_ogl_matrix[3], m_ogl_matrix[7], m_ogl_matrix[11], m_ogl_matrix[15]);
-#endif
-}
-
- void
-SM_Object::updateInvInertiaTensor()
-{
- m_inv_inertia_tensor = m_xform.getBasis().scaled(m_inv_inertia[0], m_inv_inertia[1], m_inv_inertia[2]) * m_xform.getBasis().transposed();
-}
-
-// Call callbacks to notify the client of a change of placement
- void
-SM_Object::
-notifyClient() {
- T_CallbackList::iterator i;
- for (i = m_callbackList.begin(); i != m_callbackList.end(); ++i) {
- (*i)->do_me();
- }
-}
-
-
-// Save the current state information for use in the velocity computation in the next frame.
- void
-SM_Object::
-proceedKinematic(
- MT_Scalar timeStep
-) {
- /* nzc: need to bunge this for the logic bubbling as well? */
- if (!m_suspended) {
- m_prev_kinematic = m_kinematic;
- if (m_kinematic) {
- m_prev_xform = m_xform;
- m_timeStep = timeStep;
- calcXform();
- m_kinematic = false;
- }
- }
-}
-
- void
-SM_Object::
-saveReactionForce(
- MT_Scalar timeStep
-) {
- if (isDynamic()) {
- m_reaction_force = m_reaction_impulse / timeStep;
- m_reaction_impulse.setValue(0.0, 0.0, 0.0);
- }
-}
-
- void
-SM_Object::
-clearForce(
-) {
- m_force.setValue(0.0, 0.0, 0.0);
- m_torque.setValue(0.0, 0.0, 0.0);
-}
-
- void
-SM_Object::
-clearMomentum(
-) {
- m_lin_mom.setValue(0.0, 0.0, 0.0);
- m_ang_mom.setValue(0.0, 0.0, 0.0);
-}
-
- void
-SM_Object::
-setMargin(
- MT_Scalar margin
-) {
- m_margin = margin;
- DT_SetMargin(m_object, margin);
-}
-
- MT_Scalar
-SM_Object::
-getMargin(
-) const {
- return m_margin;
-}
-
-const
- SM_MaterialProps *
-SM_Object::
-getMaterialProps(
-) const {
- return m_materialProps;
-}
-
-const
- SM_ShapeProps *
-SM_Object::
-getShapeProps(
-) const {
- return m_shapeProps;
-}
-
- void
-SM_Object::
-setPosition(
- const MT_Point3& pos
-){
- m_kinematic = true;
- getNextFrame().setPosition(pos);
- endFrame();
-}
-
- void
-SM_Object::
-setOrientation(
- const MT_Quaternion& orn
-){
- MT_assert(!orn.fuzzyZero());
- m_kinematic = true;
- getNextFrame().setOrientation(orn);
- endFrame();
-}
-
- void
-SM_Object::
-setScaling(
- const MT_Vector3& scaling
-){
- m_kinematic = true;
- m_scaling = scaling;
-}
-
-/**
- * Functions to handle linear velocity
- */
-
- void
-SM_Object::
-setExternalLinearVelocity(
- const MT_Vector3& lin_vel
-) {
- m_combined_lin_vel=lin_vel;
-}
-
- void
-SM_Object::
-addExternalLinearVelocity(
- const MT_Vector3& lin_vel
-) {
- m_combined_lin_vel+=lin_vel;
-}
-
- void
-SM_Object::
-addLinearVelocity(
- const MT_Vector3& lin_vel
-){
- setLinearVelocity(getNextFrame().getLinearVelocity() + lin_vel);
-}
-
- void
-SM_Object::
-setLinearVelocity(
- const MT_Vector3& lin_vel
-){
- getNextFrame().setLinearVelocity(lin_vel);
- if (m_shapeProps) {
- m_lin_mom = getNextFrame().getLinearVelocity() * m_shapeProps->m_mass;
- }
-}
-
-/**
- * Functions to handle angular velocity
- */
-
- void
-SM_Object::
-setExternalAngularVelocity(
- const MT_Vector3& ang_vel
-) {
- m_combined_ang_vel = ang_vel;
-}
-
- void
-SM_Object::
-addExternalAngularVelocity(
- const MT_Vector3& ang_vel
-) {
- m_combined_ang_vel += ang_vel;
-}
-
- void
-SM_Object::
-setAngularVelocity(
- const MT_Vector3& ang_vel
-) {
- getNextFrame().setAngularVelocity(ang_vel);
- if (m_shapeProps) {
- m_ang_mom = getNextFrame().getAngularVelocity() * m_shapeProps->m_inertia;
- }
-}
-
- void
-SM_Object::
-addAngularVelocity(
- const MT_Vector3& ang_vel
-) {
- setAngularVelocity(getNextFrame().getAngularVelocity() + ang_vel);
-}
-
-
- void
-SM_Object::
-clearCombinedVelocities(
-) {
- m_combined_lin_vel = MT_Vector3(0,0,0);
- m_combined_ang_vel = MT_Vector3(0,0,0);
-}
-
- void
-SM_Object::
-resolveCombinedVelocities(
- const MT_Vector3 & lin_vel,
- const MT_Vector3 & ang_vel
-) {
-
- // Different behaviours for dynamic and non-dynamic
- // objects. For non-dynamic we just set the velocity to
- // zero. For dynmic the physics velocity has to be
- // taken into account. We must make an arbitrary decision
- // on how to resolve the 2 velocities. Choices are
- // Add the physics velocity to the linear velocity. Objects
- // will just keep on moving in the direction they were
- // last set in - untill external forces affect them.
- // Set the combinbed linear and physics velocity to zero.
- // Set the physics velocity in the direction of the set velocity
- // zero.
- if (isDynamic()) {
-
-#if 1
- getNextFrame().setLinearVelocity(getNextFrame().getLinearVelocity() + lin_vel);
- getNextFrame().setAngularVelocity(getNextFrame().getAngularVelocity() + ang_vel);
-#else
-
- //compute the component of the physics velocity in the
- // direction of the set velocity and set it to zero.
- MT_Vector3 lin_vel_norm = lin_vel.normalized();
-
- setLinearVelocity(getNextFrame().getLinearVelocity() - (getNextFrame().getLinearVelocity().dot(lin_vel_norm) * lin_vel_norm));
-#endif
- m_lin_mom = getNextFrame().getLinearVelocity() * m_shapeProps->m_mass;
- m_ang_mom = getNextFrame().getAngularVelocity() * m_shapeProps->m_inertia;
- clearCombinedVelocities();
-
- }
-
-}
-
-
- MT_Scalar
-SM_Object::
-getInvMass(
-) const {
- return m_inv_mass;
- // OPT: cache the result of this division rather than compute it each call
-}
-
- const MT_Vector3&
-SM_Object::
-getInvInertia(
-) const {
- return m_inv_inertia;
- // OPT: cache the result of this division rather than compute it each call
-}
-
- const MT_Matrix3x3&
-SM_Object::
-getInvInertiaTensor(
-) const {
- return m_inv_inertia_tensor;
-}
-
- void
-SM_Object::
-applyForceField(
- const MT_Vector3& accel
-) {
- if (m_shapeProps) {
- m_force += m_shapeProps->m_mass * accel; // F = m * a
- }
-}
-
- void
-SM_Object::
-applyCenterForce(
- const MT_Vector3& force
-) {
- m_force += force;
-}
-
- void
-SM_Object::
-applyTorque(
- const MT_Vector3& torque
-) {
- m_torque += torque;
-}
-
- void
-SM_Object::
-applyImpulse(
- const MT_Point3& attach, const MT_Vector3& impulse
-) {
- applyCenterImpulse(impulse); // Change in linear momentum
- applyAngularImpulse((attach - getNextFrame().getPosition()).cross(impulse)); // Change in angular momentump
-}
-
- void
-SM_Object::
-applyCenterImpulse(
- const MT_Vector3& impulse
-) {
- if (m_shapeProps) {
- m_lin_mom += impulse;
- m_reaction_impulse += impulse;
- getNextFrame().setLinearVelocity(m_lin_mom * m_inv_mass);
-
- // The linear velocity is immedialtely updated since otherwise
- // simultaneous collisions will get a double impulse.
- }
-}
-
- void
-SM_Object::
-applyAngularImpulse(
- const MT_Vector3& impulse
-) {
- if (m_shapeProps) {
- m_ang_mom += impulse;
- getNextFrame().setAngularVelocity( m_inv_inertia_tensor * m_ang_mom);
- }
-}
-
- MT_Point3
-SM_Object::
-getWorldCoord(
- const MT_Point3& local
-) const {
- return m_xform(local);
-}
-
- MT_Vector3
-SM_Object::
-getVelocity(
- const MT_Point3& local
-) const {
- if (m_prev_kinematic && !isDynamic())
- {
- // For displaced objects the velocity is faked using the previous state.
- // Dynamic objects get their own velocity, not the faked velocity.
- // (Dynamic objects shouldn't be displaced in the first place!!)
- return (m_xform(local) - m_prev_xform(local)) / m_timeStep;
- }
-
- // NB: m_xform.getBasis() * local == m_xform(local) - m_xform.getOrigin()
- return actualLinVelocity() + actualAngVelocity().cross(local);
-}
-
-
-const
- MT_Vector3&
-SM_Object::
-getReactionForce(
-) const {
- return m_reaction_force;
-}
-
- void
-SM_Object::
-getMatrix(
- double *m
-) const {
- std::copy(&m_ogl_matrix[0], &m_ogl_matrix[16], &m[0]);
-}
-
-const
- double *
-SM_Object::
-getMatrix(
-) const {
- return m_ogl_matrix;
-}
-
-// Still need this???
-const
- MT_Transform&
-SM_Object::
-getScaledTransform(
-) const {
- return m_xform;
-}
-
- DT_ObjectHandle
-SM_Object::
-getObjectHandle(
-) const {
- return m_object;
-}
-
- DT_ShapeHandle
-SM_Object::
-getShapeHandle(
-) const {
- return m_shape;
-}
-
- SM_Object *
-SM_Object::
-getDynamicParent(
-) {
- return m_dynamicParent;
-}
-
- void
-SM_Object::
-setRigidBody(
- bool is_rigid_body
-) {
- m_is_rigid_body = is_rigid_body;
-}
-
- bool
-SM_Object::
-isRigidBody(
-) const {
- return m_is_rigid_body;
-}
-
-const
- MT_Vector3
-SM_Object::
-actualLinVelocity(
-) const {
- return m_combined_lin_vel + getNextFrame().getLinearVelocity();
-};
-
-const
- MT_Vector3
-SM_Object::
-actualAngVelocity(
-) const {
- return m_combined_ang_vel + getNextFrame().getAngularVelocity();
-}
-
-
-SM_MotionState&
-SM_Object::
-getCurrentFrame()
-{
- return m_frames[1];
-}
-
-SM_MotionState&
-SM_Object::
-getPreviousFrame()
-{
- return m_frames[0];
-}
-
-SM_MotionState &
-SM_Object::
-getNextFrame()
-{
- return m_frames[2];
-}
-
-const SM_MotionState &
-SM_Object::
-getCurrentFrame() const
-{
- return m_frames[1];
-}
-
-const SM_MotionState &
-SM_Object::
-getPreviousFrame() const
-{
- return m_frames[0];
-}
-
-const SM_MotionState &
-SM_Object::
-getNextFrame() const
-{
- return m_frames[2];
-}
-
-
-const MT_Point3&
-SM_Object::
-getPosition() const
-{
- return m_frames[1].getPosition();
-}
-
-const MT_Quaternion&
-SM_Object::
-getOrientation() const
-{
- return m_frames[1].getOrientation();
-}
-
-const MT_Vector3&
-SM_Object::
-getLinearVelocity() const
-{
- return m_frames[1].getLinearVelocity();
-}
-
-const MT_Vector3&
-SM_Object::
-getAngularVelocity() const
-{
- return m_frames[1].getAngularVelocity();
-}
-
-void
-SM_Object::
-interpolate(MT_Scalar timeStep)
-{
- if (!actualLinVelocity().fuzzyZero() || !actualAngVelocity().fuzzyZero())
- {
- getCurrentFrame().setTime(timeStep);
- getCurrentFrame().lerp(getPreviousFrame(), getNextFrame());
- notifyClient();
- }
-}
-
-void
-SM_Object::
-endFrame()
-{
- getPreviousFrame() = getNextFrame();
- getCurrentFrame() = getNextFrame();
- m_static = 0;
-}
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp
deleted file mode 100644
index f0791bbf89f..00000000000
--- a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/**
- * $Id$
- * Copyright (C) 2001 NaN Technologies B.V.
- * The physics scene.
- *
- * ***** 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 *****
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef WIN32
-#pragma warning(disable : 4786) // shut off 255 char limit debug template warning
-#endif
-
-#include "SM_Scene.h"
-#include "SM_Object.h"
-#include "SM_FhObject.h"
-
-#include "SM_Debug.h"
-
-#include <algorithm>
-
-SM_Scene::SM_Scene() :
- m_scene(DT_CreateScene()),
- m_respTable(DT_CreateRespTable()),
- m_secondaryRespTable(DT_CreateRespTable()),
- m_fixRespTable(DT_CreateRespTable()),
- m_forceField(0.0, 0.0, 0.0),
- m_frames(0)
-{
- for (int i = 0 ; i < NUM_RESPONSE; i++)
- {
- m_ResponseClass[i] = DT_GenResponseClass(m_respTable);
- m_secondaryResponseClass[i] = DT_GenResponseClass(m_secondaryRespTable);
- m_fixResponseClass[i] = DT_GenResponseClass(m_fixRespTable);
- }
-
- /* Sensor */
- DT_AddPairResponse(m_respTable, m_ResponseClass[SENSOR_RESPONSE], m_ResponseClass[SENSOR_RESPONSE], 0, DT_NO_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[SENSOR_RESPONSE], m_ResponseClass[STATIC_RESPONSE], SM_Scene::boing, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[SENSOR_RESPONSE], m_ResponseClass[OBJECT_RESPONSE], SM_Scene::boing, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[SENSOR_RESPONSE], m_ResponseClass[FH_RESPONSE], 0, DT_NO_RESPONSE, this);
-
- /* Static */
- DT_AddPairResponse(m_respTable, m_ResponseClass[STATIC_RESPONSE], m_ResponseClass[SENSOR_RESPONSE], SM_Scene::boing, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[STATIC_RESPONSE], m_ResponseClass[STATIC_RESPONSE], 0, DT_NO_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[STATIC_RESPONSE], m_ResponseClass[OBJECT_RESPONSE], SM_Object::boing, DT_BROAD_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[STATIC_RESPONSE], m_ResponseClass[FH_RESPONSE], SM_FhObject::ray_hit, DT_SIMPLE_RESPONSE, this);
-
- /* Object */
- DT_AddPairResponse(m_respTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[SENSOR_RESPONSE], SM_Scene::boing, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[STATIC_RESPONSE], SM_Object::boing, DT_BROAD_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[OBJECT_RESPONSE], SM_Object::boing, DT_BROAD_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[FH_RESPONSE], SM_FhObject::ray_hit, DT_SIMPLE_RESPONSE, this);
-
- /* Fh Object */
- DT_AddPairResponse(m_respTable, m_ResponseClass[FH_RESPONSE], m_ResponseClass[SENSOR_RESPONSE], 0, DT_NO_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[FH_RESPONSE], m_ResponseClass[STATIC_RESPONSE], SM_FhObject::ray_hit, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[FH_RESPONSE], m_ResponseClass[OBJECT_RESPONSE], SM_FhObject::ray_hit, DT_SIMPLE_RESPONSE, this);
- DT_AddPairResponse(m_respTable, m_ResponseClass[FH_RESPONSE], m_ResponseClass[FH_RESPONSE], 0, DT_NO_RESPONSE, this);
-
- /* Object (Fix Pass) */
- DT_AddPairResponse(m_fixRespTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[SENSOR_RESPONSE], 0, DT_NO_RESPONSE, this);
- DT_AddPairResponse(m_fixRespTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[STATIC_RESPONSE], SM_Object::fix, DT_BROAD_RESPONSE, this);
- DT_AddPairResponse(m_fixRespTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[OBJECT_RESPONSE], SM_Object::fix, DT_BROAD_RESPONSE, this);
- DT_AddPairResponse(m_fixRespTable, m_ResponseClass[OBJECT_RESPONSE], m_ResponseClass[FH_RESPONSE], 0, DT_NO_RESPONSE, this);
-}
-
-void SM_Scene::addTouchCallback(int response_class, DT_ResponseCallback callback, void *user)
-{
- DT_AddClassResponse(m_secondaryRespTable, m_secondaryResponseClass[response_class], callback, DT_BROAD_RESPONSE, user);
-}
-
-void SM_Scene::addSensor(SM_Object& object)
-{
- T_ObjectList::iterator i =
- std::find(m_objectList.begin(), m_objectList.end(), &object);
- if (i == m_objectList.end())
- {
- object.calcXform();
- m_objectList.push_back(&object);
- DT_AddObject(m_scene, object.getObjectHandle());
- DT_SetResponseClass(m_respTable, object.getObjectHandle(), m_ResponseClass[SENSOR_RESPONSE]);
- DT_SetResponseClass(m_secondaryRespTable, object.getObjectHandle(), m_secondaryResponseClass [SENSOR_RESPONSE]);
- DT_SetResponseClass(m_fixRespTable, object.getObjectHandle(), m_fixResponseClass[SENSOR_RESPONSE]);
- }
-}
-
-void SM_Scene::add(SM_Object& object) {
- object.calcXform();
- m_objectList.push_back(&object);
- DT_AddObject(m_scene, object.getObjectHandle());
- if (object.isDynamic()) {
- DT_SetResponseClass(m_respTable, object.getObjectHandle(), m_ResponseClass[OBJECT_RESPONSE]);
- DT_SetResponseClass(m_secondaryRespTable, object.getObjectHandle(), m_secondaryResponseClass[OBJECT_RESPONSE]);
- DT_SetResponseClass(m_fixRespTable, object.getObjectHandle(), m_fixResponseClass[OBJECT_RESPONSE]);
- } else {
- DT_SetResponseClass(m_respTable, object.getObjectHandle(), m_ResponseClass[STATIC_RESPONSE]);
- DT_SetResponseClass(m_secondaryRespTable, object.getObjectHandle(), m_secondaryResponseClass[STATIC_RESPONSE]);
- DT_SetResponseClass(m_fixRespTable, object.getObjectHandle(), m_fixResponseClass[STATIC_RESPONSE]);
- }
-
- SM_FhObject *fh_object = object.getFhObject();
-
- if (fh_object) {
- DT_AddObject(m_scene, fh_object->getObjectHandle());
- DT_SetResponseClass(m_respTable, fh_object->getObjectHandle(), m_ResponseClass[FH_RESPONSE]);
- DT_SetResponseClass(m_secondaryRespTable, fh_object->getObjectHandle(), m_secondaryResponseClass[FH_RESPONSE]);
- DT_SetResponseClass(m_fixRespTable, fh_object->getObjectHandle(), m_fixResponseClass[FH_RESPONSE]);
- }
-}
-
-void SM_Scene::requestCollisionCallback(SM_Object &object)
-{
- DT_SetResponseClass(m_respTable, object.getObjectHandle(), m_ResponseClass[OBJECT_RESPONSE]);
- DT_SetResponseClass(m_secondaryRespTable, object.getObjectHandle(), m_secondaryResponseClass[OBJECT_RESPONSE]);
-// DT_SetResponseClass(m_fixRespTable, object.getObjectHandle(), m_fixResponseClass[OBJECT_RESPONSE]);
-}
-
-void SM_Scene::remove(SM_Object& object) {
- //std::cout << "SM_Scene::remove this =" << this << "object = " << &object << std::endl;
- T_ObjectList::iterator i =
- std::find(m_objectList.begin(), m_objectList.end(), &object);
- if (!(i == m_objectList.end()))
- {
- std::swap(*i, m_objectList.back());
- m_objectList.pop_back();
- DT_RemoveObject(m_scene, object.getObjectHandle());
-
- SM_FhObject *fh_object = object.getFhObject();
-
- if (fh_object) {
- DT_RemoveObject(m_scene, fh_object->getObjectHandle());
- }
- }
- else {
- // tried to remove an object that is not in the scene
- //assert(false);
- }
-}
-
-void SM_Scene::beginFrame()
-{
- T_ObjectList::iterator i;
- // Apply a forcefield (such as gravity)
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i)
- (*i)->applyForceField(m_forceField);
-
-}
-
-void SM_Scene::endFrame()
-{
- T_ObjectList::iterator i;
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i)
- (*i)->clearForce();
-}
-
-bool SM_Scene::proceed(MT_Scalar curtime, MT_Scalar ticrate)
-{
- if (!m_frames)
- {
- if (ticrate > 0.)
- m_frames = (unsigned int)(curtime*ticrate) + 1.0;
- else
- m_frames = (unsigned int)(curtime*65536.0);
- }
-
- // Divide the timeStep into a number of subsamples of size roughly
- // equal to subS (might be a little smaller).
- MT_Scalar subStep;
- int num_samples;
- int frames = m_frames;
-
- // Compute the number of steps to do this update.
- if (ticrate > 0.0)
- {
- // Fixed time step
- subStep = 1.0/ticrate;
- num_samples = (unsigned int)(curtime*ticrate + 1.0) - m_frames;
-
- if (num_samples > 4)
- {
- std::cout << "Dropping physics frames! frames:" << num_samples << " substep: " << subStep << std::endl;
- MT_Scalar tr = ticrate;
- do
- {
- frames = frames / 2;
- tr = tr / 2.0;
- num_samples = (unsigned int)(curtime*tr + 1.0) - frames;
- subStep *= 2.0;
- } while (num_samples > 8);
- std::cout << " frames:" << num_samples << " substep: " << subStep << std::endl;
- }
- }
- else
- {
- // Variable time step. (old update)
- // Integrate at least 100 Hz
- MT_Scalar timeStep = curtime - m_frames/65536.0;
- subStep = timeStep > 0.01 ? 0.01 : timeStep;
- num_samples = int(timeStep * 0.01);
- if (num_samples < 1)
- num_samples = 1;
- }
-
- // Do a physics timestep.
- T_ObjectList::iterator i;
- if (num_samples > 0)
- {
- // Do the integration steps per object.
- for (int step = 0; step != num_samples; ++step)
- {
- MT_Scalar time;
- if (ticrate > 0.)
- time = MT_Scalar(frames + step + 1) * subStep;
- else
- time = MT_Scalar(m_frames)/65536.0 + MT_Scalar(step + 1)*subStep;
-
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i) {
- (*i)->endFrame();
- // Apply a forcefield (such as gravity)
- (*i)->integrateForces(subStep);
- // And second we update the object positions by performing
- // an integration step for each object
- (*i)->integrateMomentum(subStep);
- }
-
- // So now first we let the physics scene respond to
- // new forces, velocities set externally.
- // The collsion and friction impulses are computed here.
- // Collision phase
- DT_Test(m_scene, m_respTable);
-
- // Contact phase
- DT_Test(m_scene, m_fixRespTable);
-
- // Finish this timestep by saving al state information for the next
- // timestep and clearing the accumulated forces.
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i) {
- (*i)->relax();
- (*i)->proceedKinematic(subStep);
- (*i)->saveReactionForce(subStep);
- (*i)->getNextFrame().setTime(time);
- //(*i)->clearForce();
- }
- }
- }
-
- if (ticrate > 0)
- {
- // Interpolate between time steps.
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i)
- (*i)->interpolate(curtime);
-
- //only update the m_frames after an actual physics timestep
- if (num_samples)
- {
- m_frames = (unsigned int)(curtime*ticrate) + 1.0;
- }
- }
- else
- {
- m_frames = (unsigned int)(curtime*65536.0);
- }
-
- return num_samples != 0;
-}
-
-void SM_Scene::notifyCollision(SM_Object *obj1, SM_Object *obj2)
-{
- // For each pair of object that collided, call the corresponding callback.
- if (m_secondaryRespTable)
- DT_CallResponse(m_secondaryRespTable, obj1->getObjectHandle(), obj2->getObjectHandle(), 0);
-}
-
-
-SM_Object *SM_Scene::rayTest(void *ignore_client,
- const MT_Point3& from, const MT_Point3& to,
- MT_Point3& result, MT_Vector3& normal) const {
-#ifdef SM_DEBUG_RAYCAST
- std::cout << "ray: { " << from << " } - { " << to << " }" << std::endl;
-#endif
-
- DT_Vector3 n, dfrom, dto;
- DT_Scalar param;
- from.getValue(dfrom);
- to.getValue(dto);
- SM_Object *hit_object = (SM_Object *)
- DT_RayCast(m_scene, ignore_client, dfrom, dto, 1., &param, n);
-
- if (hit_object) {
- //result = hit_object->getWorldCoord(from + (to - from)*param);
- result = from + (to - from) * param;
- normal.setValue(n);
-#ifdef SM_DEBUG_RAYCAST
- std::cout << "ray: { " << from << " } -> { " << to << " }: { " << result
- << " } (" << param << "), normal = { " << normal << " }" << std::endl;
-#endif
- }
-
- return hit_object;
-}
-
-void SM_Scene::clearObjectCombinedVelocities() {
-
- T_ObjectList::iterator i;
-
- for (i = m_objectList.begin(); i != m_objectList.end(); ++i) {
-
- (*i)->clearCombinedVelocities();
-
- }
-
-}
-
-
-void SM_Scene::setSecondaryRespTable(DT_RespTableHandle secondaryRespTable) {
- m_secondaryRespTable = secondaryRespTable;
-}
-
-
-DT_Bool SM_Scene::boing(
- void *client_data,
- void *object1,
- void *object2,
- const DT_CollData *
-){
- SM_Scene *scene = (SM_Scene *)client_data;
- SM_Object *obj1 = (SM_Object *)object1;
- SM_Object *obj2 = (SM_Object *)object2;
-
- scene->notifyCollision(obj1, obj2); // Record this collision for client callbacks
-
-#ifdef SM_DEBUG_BOING
- printf("SM_Scene::boing\n");
-#endif
-
- return DT_CONTINUE;
-}
-
-SM_Scene::~SM_Scene()
-{
- //std::cout << "SM_Scene::~ SM_Scene(): destroy " << this << std::endl;
-// if (m_objectList.begin() != m_objectList.end())
-// std::cout << "SM_Scene::~SM_Scene: There are still objects in the Sumo scene!" << std::endl;
- for (T_ObjectList::iterator it = m_objectList.begin() ; it != m_objectList.end() ; it++)
- delete *it;
-
- DT_DestroyRespTable(m_respTable);
- DT_DestroyRespTable(m_secondaryRespTable);
- DT_DestroyRespTable(m_fixRespTable);
- DT_DestroyScene(m_scene);
-}
diff --git a/source/gameengine/Physics/Sumo/Makefile b/source/gameengine/Physics/Sumo/Makefile
deleted file mode 100644
index 69efc4d84eb..00000000000
--- a/source/gameengine/Physics/Sumo/Makefile
+++ /dev/null
@@ -1,50 +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 *****
-#
-#
-
-SOURCEDIR = source/gameengine/Physics/Sumo
-LIBNAME = sumo
-DIR = $(OCGDIR)/gameengine/blphys/$(LIBNAME)
-DIRS = Fuzzics
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_SOLID)/include
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-CPPFLAGS += -I../../Physics/common
-CPPFLAGS += -I../../Physics/Dummy
-
-include nan_subdirs.mk
diff --git a/source/gameengine/Physics/Sumo/SConscript b/source/gameengine/Physics/Sumo/SConscript
deleted file mode 100644
index a228a986af2..00000000000
--- a/source/gameengine/Physics/Sumo/SConscript
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = ['SumoPHYCallbackBridge.cpp',
- 'SumoPhysicsController.cpp',
- 'SumoPhysicsEnvironment.cpp',
- 'Fuzzics/src/SM_FhObject.cpp',
- 'Fuzzics/src/SM_Object.cpp',
- 'Fuzzics/src/SM_Scene.cpp',
- 'Fuzzics/src/SM_MotionState.cpp'
- ]
-
-incs =['.',
- '../common',
- 'Fuzzics/include',
- '#/intern/moto/include'
- ]
-incs += [env['BF_SOLID_INC']]
-
-cflags = []
-if env['OURPLATFORM']=='win32-vc':
- cflags.append('/GR')
- cflags.append('/O1')
-
-env.BlenderLib ( 'bf_sumo', sources, incs, [], libtype=['core','player'], priority=[400, 55] , compileflags=cflags)
diff --git a/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.cpp b/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.cpp
deleted file mode 100644
index 1992bbe3421..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include "SumoPHYCallbackBridge.h"
-#include "PHY_IPhysicsController.h"
-#include "SM_Object.h"
-
-
-SumoPHYCallbackBridge::SumoPHYCallbackBridge(void* clientData,PHY_ResponseCallback phyCallback)
-:m_orgClientData(clientData),
-m_phyCallback(phyCallback)
-{
-
-}
-DT_Bool SumoPHYCallbackBridge::StaticSolidToPHYCallback(void *client_data,
- void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data)
-{
- SumoPHYCallbackBridge* bridge = static_cast<SumoPHYCallbackBridge*>(client_data);
- bridge->SolidToPHY(client_object1,client_object2,coll_data);
- return false;
-}
-
-DT_Bool SumoPHYCallbackBridge::SolidToPHY(void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data)
-{
-
- SM_Object* smObject1 = static_cast<SM_Object*>(client_object1);
- SM_Object* smObject2 = static_cast<SM_Object*>(client_object2);
-
- PHY_IPhysicsController* ctrl1 = static_cast<PHY_IPhysicsController*>(smObject1->getPhysicsClientObject());
- PHY_IPhysicsController* ctrl2 = static_cast<PHY_IPhysicsController*>(smObject2->getPhysicsClientObject());
-
- if (!ctrl1 || !ctrl2)
- {
- //todo: check which objects are not linked up properly
- return false;
- }
- if (coll_data)
- {
- PHY_CollData phyCollData;
-
- phyCollData.m_point1[0] = coll_data->point1[0];
- phyCollData.m_point1[1] = coll_data->point1[1];
- phyCollData.m_point1[2] = coll_data->point1[2];
- phyCollData.m_point1[3] = 0.f;
-
- phyCollData.m_point2[0] = coll_data->point2[0];
- phyCollData.m_point2[1] = coll_data->point2[1];
- phyCollData.m_point2[2] = coll_data->point2[2];
- phyCollData.m_point2[3] = 0.f;
-
- phyCollData.m_normal[0] = coll_data->normal[0];
- phyCollData.m_normal[1] = coll_data->normal[1];
- phyCollData.m_normal[2] = coll_data->normal[2];
- phyCollData.m_normal[3] = 0.f;
-
-
- return m_phyCallback(m_orgClientData,
- ctrl1,ctrl2,&phyCollData);
- }
-
- return m_phyCallback(m_orgClientData,
- ctrl1,ctrl2,0);
-
-}
-
diff --git a/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.h b/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.h
deleted file mode 100644
index cc980f3961d..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPHYCallbackBridge.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef SUMO_PHY_CALLBACK_BRIDGE_H
-#define SUMO_PHY_CALLBACK_BRIDGE_H
-
-#include <SOLID/SOLID.h>
-#include "PHY_DynamicTypes.h"
-
-class SumoPHYCallbackBridge
-{
- void* m_orgClientData;
- PHY_ResponseCallback m_phyCallback;
-
-public:
-
- SumoPHYCallbackBridge(void* clientData,PHY_ResponseCallback phyCallback);
-
- static DT_Bool StaticSolidToPHYCallback(void *client_data,
- void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data);
-
- DT_Bool SolidToPHY(void *client_object1,
- void *client_object2,
- const DT_CollData *coll_data);
-
-
-};
-
-#endif //SUMO_PHY_CALLBACK_BRIDGE_H
diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp b/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp
deleted file mode 100644
index 56caa9236bf..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp
+++ /dev/null
@@ -1,495 +0,0 @@
-/**
- * @file $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 "SumoPhysicsController.h"
-#include "PHY_IMotionState.h"
-#include "SM_Object.h"
-#include "MT_Quaternion.h"
-
-
-SumoPhysicsController::SumoPhysicsController(
- class SM_Scene* sumoScene,
- class SM_Object* sumoObj,
- class PHY_IMotionState* motionstate,
-
- bool dyna)
- :
- m_sumoObj(sumoObj) ,
- m_sumoScene(sumoScene),
- m_bFirstTime(true),
- m_bDyna(dyna),
- m_MotionState(motionstate)
-{
- if (m_sumoObj)
- {
-
- PHY__Vector3 pos1;
- getPosition(pos1);
- MT_Point3 pos(pos1);
-
- //temp debugging check
- //assert(pos.length() < 100000.f);
-
- //need this to do the upcast after the solid/sumo collision callback
- m_sumoObj->setPhysicsClientObject(this);
- //if it is a dyna, register for a callback
- m_sumoObj->registerCallback(*this);
- }
-};
-
-
-
-SumoPhysicsController::~SumoPhysicsController()
-{
- if (m_sumoObj)
- {
- m_sumoScene->remove(*m_sumoObj);
-
- delete m_sumoObj;
- m_sumoObj = NULL;
- }
-}
-
-float SumoPhysicsController::getMass()
-{
- if (m_sumoObj)
- {
- const SM_ShapeProps *shapeprops = m_sumoObj->getShapeProps();
- if(shapeprops!=NULL) return shapeprops->m_mass;
- }
- return 0.f;
-}
-
-bool SumoPhysicsController::SynchronizeMotionStates(float)
-{
- if (m_bFirstTime)
- {
- setSumoTransform(!m_bFirstTime);
- m_bFirstTime = false;
- }
- return false;
-}
-
-
-
-
-void SumoPhysicsController::GetWorldOrientation(MT_Matrix3x3& mat)
-{
- float orn[4];
- m_MotionState->getWorldOrientation(orn[0],orn[1],orn[2],orn[3]);
- MT_Quaternion quat(orn);
- mat.setRotation(quat);
-
-}
-
-void SumoPhysicsController::getPosition(PHY__Vector3& pos) const
-{
- assert(m_sumoObj);
-
- pos[0] = m_sumoObj->getPosition()[0];
- pos[1] = m_sumoObj->getPosition()[0];
- pos[2] = m_sumoObj->getPosition()[0];
-
- //m_MotionState->getWorldPosition(pos[0],pos[1],pos[2]);
-}
-
-void SumoPhysicsController::GetWorldPosition(MT_Point3& pos)
-{
-// assert(m_sumoObj);
-
-// pos[0] = m_sumoObj->getPosition()[0];
-// pos[1] = m_sumoObj->getPosition()[0];
-// pos[2] = m_sumoObj->getPosition()[0];
-
- float worldpos[3];
- m_MotionState->getWorldPosition(worldpos[0],worldpos[1],worldpos[2]);
- pos[0]=worldpos[0];
- pos[1]=worldpos[1];
- pos[2]=worldpos[2];
-}
-
-void SumoPhysicsController::GetWorldScaling(MT_Vector3& scale)
-{
- float worldscale[3];
- m_MotionState->getWorldScaling(worldscale[0],worldscale[1],worldscale[2]);
- scale[0]=worldscale[0];
- scale[1]=worldscale[1];
- scale[2]=worldscale[2];
-}
-
-
- // kinematic methods
-void SumoPhysicsController::RelativeTranslate(float dlocX,float dlocY,float dlocZ,bool local)
-{
- if (m_sumoObj)
- {
- MT_Matrix3x3 mat;
- GetWorldOrientation(mat);
- MT_Vector3 dloc(dlocX,dlocY,dlocZ);
-
- MT_Point3 newpos = m_sumoObj->getPosition();
-
- newpos += (local ? mat * dloc : dloc);
- m_sumoObj->setPosition(newpos);
- }
-
-}
-void SumoPhysicsController::RelativeRotate(const float drot[12],bool local)
-{
- if (m_sumoObj )
- {
- MT_Matrix3x3 drotmat(drot);
- MT_Matrix3x3 currentOrn;
- GetWorldOrientation(currentOrn);
-
- m_sumoObj->setOrientation(m_sumoObj->getOrientation()*(local ?
- drotmat : (currentOrn.inverse() * drotmat * currentOrn)).getRotation());
- }
-
-}
-void SumoPhysicsController::setOrientation(float quatImag0,float quatImag1,float quatImag2,float quatReal)
-{
- m_sumoObj->setOrientation(MT_Quaternion(quatImag0,quatImag1,quatImag2,quatReal));
-}
-
-void SumoPhysicsController::getOrientation(float &quatImag0,float &quatImag1,float &quatImag2,float &quatReal)
-{
- const MT_Quaternion& q = m_sumoObj->getOrientation();
- quatImag0 = q[0];
- quatImag1 = q[1];
- quatImag2 = q[2];
- quatReal = q[3];
-}
-
-void SumoPhysicsController::setPosition(float posX,float posY,float posZ)
-{
- m_sumoObj->setPosition(MT_Point3(posX,posY,posZ));
-}
-
-void SumoPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
-{
- if (!m_bDyna)
- m_sumoObj->setScaling(MT_Vector3(scaleX,scaleY,scaleZ));
-}
-
- // physics methods
-void SumoPhysicsController::ApplyTorque(float torqueX,float torqueY,float torqueZ,bool local)
-{
- if (m_sumoObj)
- {
- MT_Vector3 torque(torqueX,torqueY,torqueZ);
-
- MT_Matrix3x3 orn;
- GetWorldOrientation(orn);
- m_sumoObj->applyTorque(local ?
- orn * torque :
- torque);
- }
-}
-
-void SumoPhysicsController::ApplyForce(float forceX,float forceY,float forceZ,bool local)
-{
- if (m_sumoObj)
- {
- MT_Vector3 force(forceX,forceY,forceZ);
-
- MT_Matrix3x3 orn;
- GetWorldOrientation(orn);
-
- m_sumoObj->applyCenterForce(local ?
- orn * force :
- force);
- }
-}
-
-void SumoPhysicsController::SetAngularVelocity(float ang_velX,float ang_velY,float ang_velZ,bool local)
-{
- if (m_sumoObj)
- {
- MT_Vector3 ang_vel(ang_velX,ang_velY,ang_velZ);
-
- MT_Matrix3x3 orn;
- GetWorldOrientation(orn);
-
- m_sumoObj->setExternalAngularVelocity(local ?
- orn * ang_vel :
- ang_vel);
- }
-}
-
-void SumoPhysicsController::SetLinearVelocity(float lin_velX,float lin_velY,float lin_velZ,bool local)
-{
- if (m_sumoObj )
- {
- MT_Matrix3x3 orn;
- GetWorldOrientation(orn);
-
- MT_Vector3 lin_vel(lin_velX,lin_velY,lin_velZ);
- m_sumoObj->setExternalLinearVelocity(local ?
- orn * lin_vel :
- lin_vel);
- }
-}
-
-void SumoPhysicsController::resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ)
-{
- if (m_sumoObj)
- m_sumoObj->resolveCombinedVelocities(MT_Vector3(linvelX,linvelY,linvelZ),MT_Vector3(angVelX,angVelY,angVelZ));
-}
-
-
-
-
-void SumoPhysicsController::applyImpulse(float attachX,float attachY,float attachZ, float impulseX,float impulseY,float impulseZ)
-{
- if (m_sumoObj)
- {
- MT_Point3 attach(attachX,attachY,attachZ);
- MT_Vector3 impulse(impulseX,impulseY,impulseZ);
- m_sumoObj->applyImpulse(attach,impulse);
- }
-
-}
-
-void SumoPhysicsController::SuspendDynamics()
-{
- m_suspendDynamics=true;
-
- if (m_sumoObj)
- {
- m_sumoObj->suspendDynamics();
- m_sumoObj->setLinearVelocity(MT_Vector3(0,0,0));
- m_sumoObj->setAngularVelocity(MT_Vector3(0,0,0));
- m_sumoObj->calcXform();
- }
-}
-
-void SumoPhysicsController::RestoreDynamics()
-{
- m_suspendDynamics=false;
-
- if (m_sumoObj)
- {
- m_sumoObj->restoreDynamics();
- }
-}
-
-
-/**
- reading out information from physics
-*/
-void SumoPhysicsController::GetLinearVelocity(float& linvX,float& linvY,float& linvZ)
-{
- if (m_sumoObj)
- {
- // get velocity from the physics object (m_sumoObj)
- const MT_Vector3& vel = m_sumoObj->getLinearVelocity();
- linvX = vel[0];
- linvY = vel[1];
- linvZ = vel[2];
- }
- else
- {
- linvX = 0.f;
- linvY = 0.f;
- linvZ = 0.f;
- }
-}
-
-/**
- GetVelocity parameters are in geometric coordinates (Origin is not center of mass!).
-*/
-void SumoPhysicsController::GetVelocity(const float posX,const float posY,const float posZ,float& linvX,float& linvY,float& linvZ)
-{
- if (m_sumoObj)
- {
- MT_Point3 pos(posX,posY,posZ);
- // get velocity from the physics object (m_sumoObj)
- const MT_Vector3& vel = m_sumoObj->getVelocity(pos);
- linvX = vel[0];
- linvY = vel[1];
- linvZ = vel[2];
- }
- else
- {
- linvX = 0.f;
- linvY = 0.f;
- linvZ = 0.f;
-
- }
-}
-
-void SumoPhysicsController::getReactionForce(float& forceX,float& forceY,float& forceZ)
-{
- const MT_Vector3& force = m_sumoObj->getReactionForce();
- forceX = force[0];
- forceY = force[1];
- forceZ = force[2];
-}
-
-void SumoPhysicsController::setRigidBody(bool rigid)
-{
- m_sumoObj->setRigidBody(rigid);
-}
-
-void SumoPhysicsController::PostProcessReplica(class PHY_IMotionState* motionstate,class PHY_IPhysicsController* parentctrl)
-{
- m_MotionState = motionstate;
-
- SM_Object* dynaparent=0;
- SumoPhysicsController* sumoparentctrl = (SumoPhysicsController* )parentctrl;
-
- if (sumoparentctrl)
- {
- dynaparent = sumoparentctrl->GetSumoObject();
- }
-
- SM_Object* orgsumoobject = m_sumoObj;
-
-
- m_sumoObj = new SM_Object(
- orgsumoobject->getShapeHandle(),
- orgsumoobject->getMaterialProps(),
- orgsumoobject->getShapeProps(),
- dynaparent);
-
- m_sumoObj->setRigidBody(orgsumoobject->isRigidBody());
-
- m_sumoObj->setMargin(orgsumoobject->getMargin());
- m_sumoObj->setPosition(orgsumoobject->getPosition());
- m_sumoObj->setOrientation(orgsumoobject->getOrientation());
- //if it is a dyna, register for a callback
- m_sumoObj->registerCallback(*this);
-
- m_sumoScene->add(* (m_sumoObj));
-}
-
-PHY_IMotionState* SumoPhysicsController::GetMotionState()
-{
- return m_MotionState;
-}
-
-void SumoPhysicsController::SetSimulatedTime(float)
-{
-}
-
-
-void SumoPhysicsController::WriteMotionStateToDynamics(bool)
-{
-
-}
-// this is the actual callback from sumo, and the position/orientation
-//is written to the scenegraph, using the motionstate abstraction
-
-void SumoPhysicsController::do_me()
-{
- MT_assert(m_sumoObj);
- const MT_Point3& pos = m_sumoObj->getPosition();
- const MT_Quaternion& orn = m_sumoObj->getOrientation();
-
- MT_assert(m_MotionState);
- m_MotionState->setWorldPosition(pos[0],pos[1],pos[2]);
- m_MotionState->setWorldOrientation(orn[0],orn[1],orn[2],orn[3]);
-}
-
-
-void SumoPhysicsController::setSumoTransform(bool nondynaonly)
-{
- if (!nondynaonly || !m_bDyna)
- {
- if (m_sumoObj)
- {
- MT_Point3 pos;
- GetWorldPosition(pos);
-
- m_sumoObj->setPosition(pos);
- if (m_bDyna)
- {
- m_sumoObj->setScaling(MT_Vector3(1,1,1));
- } else
- {
- MT_Vector3 scale;
- GetWorldScaling(scale);
- m_sumoObj->setScaling(scale);
- }
- MT_Matrix3x3 orn;
- GetWorldOrientation(orn);
- m_sumoObj->setOrientation(orn.getRotation());
- m_sumoObj->calcXform();
- }
- }
-}
-
-
- // clientinfo for raycasts for example
-void* SumoPhysicsController::getNewClientInfo()
-{
- if (m_sumoObj)
- return m_sumoObj->getClientObject();
- return 0;
-
-}
-void SumoPhysicsController::setNewClientInfo(void* clientinfo)
-{
- if (m_sumoObj)
- {
- SM_ClientObject* clOb = static_cast<SM_ClientObject*> (clientinfo);
- m_sumoObj->setClientObject(clOb);
- }
-
-}
-
-void SumoPhysicsController::calcXform()
-{
- if (m_sumoObj)
- m_sumoObj->calcXform();
-}
-
-void SumoPhysicsController::SetMargin(float margin)
-{
- if (m_sumoObj)
- m_sumoObj->setMargin(margin);
-}
-
-float SumoPhysicsController::GetMargin() const
-{
- if (m_sumoObj)
- m_sumoObj->getMargin();
- return 0.f;
-}
-
-float SumoPhysicsController::GetRadius() const
-{
- if (m_sumoObj && m_sumoObj->getShapeProps())
- {
- return m_sumoObj->getShapeProps()->m_radius;
- }
- return 0.f;
-
-}
diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsController.h b/source/gameengine/Physics/Sumo/SumoPhysicsController.h
deleted file mode 100644
index adf29649f18..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPhysicsController.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * @file $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 __SUMO_PHYSICSCONTROLLER_H
-#define __SUMO_PHYSICSCONTROLLER_H
-
-#include "PHY_IPhysicsController.h"
-#include "SM_Scene.h"
-#include "SM_Callback.h"
-
-/**
- * Sumo Physics Controller, a special kind of a PhysicsController.
- * A Physics Controller is a special kind of Scene Graph Transformation Controller.
- * Each time the scene graph get's updated, the controller get's a chance
- * in the 'Update' method to reflect changes.
- *
- * Sumo uses the SOLID library for collision detection.
- */
-class SumoPhysicsController : public PHY_IPhysicsController , public SM_Callback
-
-
-{
-
-
-public:
- SumoPhysicsController(
- class SM_Scene* sumoScene,
- class SM_Object* sumoObj,
- class PHY_IMotionState* motionstate,
- bool dyna);
-
- virtual ~SumoPhysicsController();
-
- /**
- * @name Kinematic Methods.
- */
- /*@{*/
- virtual void RelativeTranslate(float dlocX,float dlocY,float dlocZ,bool local);
- /**
- * @param drot a 3x4 matrix. This will treated as a 3x3 rotation matrix.
- * @warning RelativeRotate expects a 3x4 matrix. The fourth column is padding.
- */
- virtual void RelativeRotate(const float drot[12],bool local);
- virtual void getOrientation(float &quatImag0,float &quatImag1,float &quatImag2,float &quatReal);
- virtual void setOrientation(float quatImag0,float quatImag1,float quatImag2,float quatReal);
- virtual void setPosition(float posX,float posY,float posZ);
- virtual void getPosition(PHY__Vector3& pos) const;
-
- virtual void setScaling(float scaleX,float scaleY,float scaleZ);
- /*@}*/
-
- /**
- * @name Physics Methods
- */
- /*@{*/
- virtual void ApplyTorque(float torqueX,float torqueY,float torqueZ,bool local);
- virtual void ApplyForce(float forceX,float forceY,float forceZ,bool local);
- virtual void SetAngularVelocity(float ang_velX,float ang_velY,float ang_velZ,bool local);
- virtual void SetLinearVelocity(float lin_velX,float lin_velY,float lin_velZ,bool local);
- virtual void resolveCombinedVelocities(float linvelX,float linvelY,float linvelZ,float angVelX,float angVelY,float angVelZ);
- virtual void applyImpulse(float attachX,float attachY,float attachZ, float impulseX,float impulseY,float impulseZ);
- virtual void SetActive(bool active){};
- virtual void SuspendDynamics();
- virtual void RestoreDynamics();
- /*@}*/
-
-
- /**
- * reading out information from physics
- */
- virtual void GetLinearVelocity(float& linvX,float& linvY,float& linvZ);
- /**
- * GetVelocity parameters are in geometric coordinates (Origin is not center of mass!).
- */
- virtual void GetVelocity(const float posX,const float posY,const float posZ,float& linvX,float& linvY,float& linvZ);
- virtual float getMass();
- virtual void getReactionForce(float& forceX,float& forceY,float& forceZ);
- virtual void setRigidBody(bool rigid);
-
-
- virtual void PostProcessReplica(class PHY_IMotionState* motionstate,class PHY_IPhysicsController* parentctrl);
-
- // TODO: remove next line !
- virtual void SetSimulatedTime(float time);
-
- virtual void WriteDynamicsToMotionState() {};
- virtual void WriteMotionStateToDynamics(bool nondynaonly);
- virtual class PHY_IMotionState* GetMotionState();
-
- /**
- * call from Scene Graph Node to 'update'.
- */
- virtual bool SynchronizeMotionStates(float time);
-
- virtual void calcXform();
- virtual void SetMargin(float margin) ;
- virtual float GetMargin() const;
- virtual float GetRadius() const ;
- virtual void SetRadius(float margin) { SetMargin(margin); }
-
-
- // clientinfo for raycasts for example
- virtual void* getNewClientInfo();
- virtual void setNewClientInfo(void* clientinfo);
-
- float getFriction() { return m_friction;}
- float getRestitution() { return m_restitution;}
-
- /**
- * Sumo callback
- */
- virtual void do_me();
-
- class SM_Object* GetSumoObject ()
- {
- return m_sumoObj;
- };
-
- void GetWorldOrientation(class MT_Matrix3x3& mat);
- void GetWorldPosition(MT_Point3& pos);
- void GetWorldScaling(MT_Vector3& scale);
-
- float GetLinVelocityMin() const { return 0.f; }
- void SetLinVelocityMin(float val) { }
- float GetLinVelocityMax() const { return 0.f; }
- void SetLinVelocityMax(float val) { }
-
-
-// void SetSumoObject(class SM_Object* sumoObj) {
-// m_sumoObj = sumoObj;
-// }
-// void SetSumoScene(class SM_Scene* sumoScene) {
-// m_sumoScene = sumoScene;
-// }
-
- void setSumoTransform(bool nondynaonly);
-
-
-private:
- class SM_Object* m_sumoObj;
- class SM_Scene* m_sumoScene; // needed for replication
- bool m_bFirstTime;
- bool m_bDyna;
-
- float m_friction;
- float m_restitution;
-
-
- bool m_suspendDynamics;
-
- bool m_firstTime;
- bool m_bFullRigidBody;
- bool m_bPhantom; // special flag for objects that are not affected by physics 'resolver'
-
- // data to calculate fake velocities for kinematic objects (non-dynas)
- bool m_bKinematic;
- bool m_bPrevKinematic;
-
- float m_lastTime;
-
- class PHY_IMotionState* m_MotionState;
-
-
-};
-
-#endif //__SUMO_PHYSICSCONTROLLER_H
-
diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
deleted file mode 100644
index b4daf0a3f80..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
+++ /dev/null
@@ -1,264 +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 *****
- */
-#include <string.h> // memset
-#include "SumoPhysicsEnvironment.h"
-#include "PHY_IMotionState.h"
-#include "SumoPhysicsController.h"
-#include "SM_Scene.h"
-#include "SumoPHYCallbackBridge.h"
-#include <SOLID/SOLID.h>
-
-SumoPhysicsEnvironment::SumoPhysicsEnvironment()
-{
- m_fixedTimeStep = 1.f/60.f;
- m_useFixedTimeStep = true;
- m_currentTime = 0.f;
-
- m_sumoScene = new SM_Scene();
-}
-
-
-
-SumoPhysicsEnvironment::~SumoPhysicsEnvironment()
-{
- delete m_sumoScene;
-}
-
-
-
-void SumoPhysicsEnvironment::beginFrame()
-{
- m_sumoScene->beginFrame();
-}
-
-void SumoPhysicsEnvironment::endFrame()
-{
- m_sumoScene->endFrame();
-}
-
-void SumoPhysicsEnvironment::setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)
-{
- m_useFixedTimeStep = useFixedTimeStep;
- if (m_useFixedTimeStep)
- {
- m_fixedTimeStep = fixedTimeStep;
- } else
- {
- m_fixedTimeStep = 0.f;
- }
- //reset current time ?
- m_currentTime = 0.f;
-}
-float SumoPhysicsEnvironment::getFixedTimeStep()
-{
- return m_fixedTimeStep;
-}
-
-
-bool SumoPhysicsEnvironment::proceedDeltaTime(double curTime,float timeStep,float interval)
-{
-
- bool result = false;
- if (m_useFixedTimeStep)
- {
- m_currentTime += timeStep;
- float ticrate = 1.f/m_fixedTimeStep;
-
- result = m_sumoScene->proceed(curTime, ticrate);
- } else
- {
- m_currentTime += timeStep;
- result = m_sumoScene->proceed(m_currentTime, timeStep);
- }
- return result;
-}
-
-void SumoPhysicsEnvironment::setGravity(float x,float y,float z)
-{
- m_sumoScene->setForceField(MT_Vector3(x,y,z));
-}
-
-int SumoPhysicsEnvironment::createConstraint(
- class PHY_IPhysicsController* ctrl,
- class PHY_IPhysicsController* ctrl2,
- PHY_ConstraintType type,
- float pivotX,float pivotY,float pivotZ,
- float axisX,float axisY,float axisZ,
- float axis1X,float axis1Y,float axis1Z,
- float axis2X,float axis2Y,float axis2Z,
- int flag
- )
-{
- int constraintid = 0;
- return constraintid;
-}
-
-void SumoPhysicsEnvironment::removeConstraint(int constraintid)
-{
- if (constraintid)
- {
- }
-}
-
-PHY_IPhysicsController* SumoPhysicsEnvironment::rayTest(PHY_IRayCastFilterCallback &filterCallback,
- float fromX,float fromY,float fromZ,
- float toX,float toY,float toZ)
-{
- SumoPhysicsController* ignoreCtr = static_cast<SumoPhysicsController*> (filterCallback.m_ignoreController);
-
- //collision detection / raytesting
- MT_Point3 hit, normal;
- PHY_RayCastResult result;
-
- SM_Object* sm_ignore = 0;
- if (ignoreCtr)
- sm_ignore = ignoreCtr->GetSumoObject();
-
- memset(&result, 0, sizeof(result));
-
- SM_Object* smOb = m_sumoScene->rayTest(sm_ignore,MT_Point3(fromX, fromY, fromZ),MT_Point3(toX, toY, toZ), hit, normal);
- if (smOb)
- {
- result.m_controller = (PHY_IPhysicsController *) smOb->getPhysicsClientObject();
- result.m_hitPoint[0] = hit[0];
- result.m_hitPoint[1] = hit[1];
- result.m_hitPoint[2] = hit[2];
- result.m_hitNormal[0] = normal[0];
- result.m_hitNormal[1] = normal[1];
- result.m_hitNormal[2] = normal[2];
- filterCallback.reportHit(&result);
- }
- return result.m_controller;
-}
-//gamelogic callbacks
-void SumoPhysicsEnvironment::addSensor(PHY_IPhysicsController* ctrl)
-{
- SumoPhysicsController* smctrl = dynamic_cast<SumoPhysicsController*>(ctrl);
- SM_Object* smObject = smctrl->GetSumoObject();
- assert(smObject);
- if (smObject)
- {
- m_sumoScene->addSensor(*smObject);
- }
-}
-void SumoPhysicsEnvironment::removeSensor(PHY_IPhysicsController* ctrl)
-{
- SumoPhysicsController* smctrl = dynamic_cast<SumoPhysicsController*>(ctrl);
- SM_Object* smObject = smctrl->GetSumoObject();
- assert(smObject);
- if (smObject)
- {
- m_sumoScene->remove(*smObject);
- }
-}
-
-
-void SumoPhysicsEnvironment::addTouchCallback(int response_class, PHY_ResponseCallback callback, void *user)
-{
-
- int sumoRespClass = 0;
-
- //map PHY_ convention into SM_ convention
- switch (response_class)
- {
- case PHY_FH_RESPONSE:
- sumoRespClass = FH_RESPONSE;
- break;
- case PHY_SENSOR_RESPONSE:
- sumoRespClass = SENSOR_RESPONSE;
- break;
- case PHY_CAMERA_RESPONSE:
- sumoRespClass =CAMERA_RESPONSE;
- break;
- case PHY_OBJECT_RESPONSE:
- sumoRespClass = OBJECT_RESPONSE;
- break;
- case PHY_STATIC_RESPONSE:
- sumoRespClass = PHY_STATIC_RESPONSE;
- break;
- case PHY_BROADPH_RESPONSE:
- return;
- default:
- assert(0);
- return;
- }
-
- SumoPHYCallbackBridge* bridge = new SumoPHYCallbackBridge(user,callback);
-
- m_sumoScene->addTouchCallback(sumoRespClass,SumoPHYCallbackBridge::StaticSolidToPHYCallback,bridge);
-}
-bool SumoPhysicsEnvironment::requestCollisionCallback(PHY_IPhysicsController* ctrl)
-{
- SumoPhysicsController* smctrl = dynamic_cast<SumoPhysicsController*>(ctrl);
- MT_assert(smctrl);
- SM_Object* smObject = smctrl->GetSumoObject();
- MT_assert(smObject);
- if (smObject)
- {
- //assert(smObject->getPhysicsClientObject() == ctrl);
- smObject->setPhysicsClientObject(ctrl);
-
- m_sumoScene->requestCollisionCallback(*smObject);
- return true;
- }
- return false;
-}
-
-bool SumoPhysicsEnvironment::removeCollisionCallback(PHY_IPhysicsController* ctrl)
-{
- // intentionally empty
- return false;
-}
-
-PHY_IPhysicsController* SumoPhysicsEnvironment::CreateSphereController(float radius,const PHY__Vector3& position)
-{
- DT_ShapeHandle shape = DT_NewSphere(0.0);
- SM_Object* ob = new SM_Object(shape,0,0,0);
- ob->setPosition(MT_Point3(position));
- //testing
- MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(90));
- ob->setOrientation(rotquatje);
-
- PHY_IPhysicsController* ctrl = new SumoPhysicsController(m_sumoScene,ob,0,false);
- ctrl->SetMargin(radius);
- return ctrl;
-}
-PHY_IPhysicsController* SumoPhysicsEnvironment::CreateConeController(float coneradius,float coneheight)
-{
- DT_ShapeHandle shape = DT_NewCone(coneradius,coneheight);
- SM_Object* ob = new SM_Object(shape,0,0,0);
- ob->setPosition(MT_Point3(0.f,0.f,0.f));
- MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(90));
- ob->setOrientation(rotquatje);
-
- PHY_IPhysicsController* ctrl = new SumoPhysicsController(m_sumoScene,ob,0,false);
-
- return ctrl;
-}
-
diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
deleted file mode 100644
index 5ae33eb4b0e..00000000000
--- a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
+++ /dev/null
@@ -1,110 +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 *****
- */
-#ifndef _SUMOPhysicsEnvironment
-#define _SUMOPhysicsEnvironment
-
-#include "MT_Scalar.h"
-
-#include "PHY_IPhysicsEnvironment.h"
-class SumoPHYCallbackBridge;
-#include <vector>
-/**
-* Physics Environment takes care of stepping the simulation and is a container for physics entities (rigidbodies,constraints, materials etc.)
-* A derived class may be able to 'construct' entities by loading and/or converting
-*/
-class SumoPhysicsEnvironment : public PHY_IPhysicsEnvironment
-{
-
- class SM_Scene* m_sumoScene;
- float m_currentTime;
- float m_fixedTimeStep;
- bool m_useFixedTimeStep;
-
- std::vector<SumoPHYCallbackBridge*> m_callbacks;
-
-public:
- SumoPhysicsEnvironment();
- virtual ~SumoPhysicsEnvironment();
- virtual void beginFrame();
- virtual void endFrame();
-// Perform an integration step of duration 'timeStep'.
- virtual bool proceedDeltaTime(double curTime,float timeStep,float interval);
- virtual void setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep);
- virtual float getFixedTimeStep();
-
- virtual void setGravity(float x,float y,float z);
- virtual int createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type,
- float pivotX,float pivotY,float pivotZ,
- float axisX,float axisY,float axisZ,
- float axis1X=0,float axis1Y=0,float axis1Z=0,
- float axis2X=0,float axis2Y=0,float axis2Z=0,int flag=0
-
- );
-
- virtual void removeConstraint(int constraintid);
-
- //complex constraint for vehicles
- virtual PHY_IVehicle* getVehicleConstraint(int constraintId)
- {
- return 0;
- }
-
- virtual PHY_IPhysicsController* rayTest(PHY_IRayCastFilterCallback &filterCallback,float fromX,float fromY,float fromZ, float toX,float toY,float toZ);
- virtual bool cullingTest(PHY_CullingCallback callback, void* userData, PHY__Vector4 *planes, int nplanes, int occlusionRes) { return false; }
-
-
- //gamelogic callbacks
- virtual void addSensor(PHY_IPhysicsController* ctrl);
- virtual void removeSensor(PHY_IPhysicsController* ctrl);
- virtual void addTouchCallback(int response_class, PHY_ResponseCallback callback, void *user);
- virtual bool requestCollisionCallback(PHY_IPhysicsController* ctrl);
- virtual bool removeCollisionCallback(PHY_IPhysicsController* ctrl);
- virtual PHY_IPhysicsController* CreateSphereController(float radius,const PHY__Vector3& position);
- virtual PHY_IPhysicsController* CreateConeController(float coneradius,float coneheight);
-
- virtual float getConstraintParam(int constraintId,int param)
- {
- return 0.f;
- }
- virtual void setConstraintParam(int constraintId,int param,float value,float value1)
- {
- }
- SM_Scene* GetSumoScene()
- {
- return m_sumoScene;
- }
-
-protected:
- // 60Hz (Default)
- static MT_Scalar PhysicsTicRate;
-
-};
-
-#endif //_SUMOPhysicsEnvironment
-
diff --git a/source/gameengine/Physics/Sumo/convert.txt b/source/gameengine/Physics/Sumo/convert.txt
deleted file mode 100644
index 81f8f602cde..00000000000
--- a/source/gameengine/Physics/Sumo/convert.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-static DT_ShapeHandle CreateShapeFromMesh(RAS_MeshObject* meshobj)
-{
- DT_ShapeHandle shape = DT_NewComplexShape();
- int numpolys = meshobj->NumPolygons();
- int numvalidpolys = 0;
-
- for (int p=0; p<numpolys; p++)
- {
- RAS_Polygon* poly = meshobj->GetPolygon(p);
-
- // only add polygons that have the collisionflag set
- if (poly->IsCollider())
- {
- DT_Begin();
- for (int v=0; v<poly->VertexCount(); v++) {
- MT_Point3 pt = meshobj->GetVertex(poly->GetVertexIndexBase().m_vtxarray,
- poly->GetVertexIndexBase().m_indexarray[v],
- poly->GetMaterial()->GetPolyMaterial())->xyz();
- DT_Vertex(pt[0],pt[1],pt[2]);
- }
- DT_End();
-
- numvalidpolys++;
- }
- }
-
- DT_EndComplexShape();
-
- if (numvalidpolys==0) {
- delete shape;
- return NULL;
- } else {
- return shape;
- }
-}
diff --git a/source/gameengine/Physics/Sumo/include/interpolator.h b/source/gameengine/Physics/Sumo/include/interpolator.h
deleted file mode 100644
index 055c242edc7..00000000000
--- a/source/gameengine/Physics/Sumo/include/interpolator.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef INTERPOLATOR_H
-#define INTERPOLATOR_H
-
-#include "solid_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-DT_DECLARE_HANDLE(IP_IpoHandle);
-
-typedef struct IP_ControlPoint {
- DT_Scalar m_key;
- DT_Scalar m_keyValue;
-} IP_ControlPoint;
-
-IP_IpoHandle IP_CreateLinear(const IP_ControlPoint *cpoints, int num_cpoints);
-
-void IP_DeleteInterpolator(IP_IpoHandle ipo);
-
-DT_Scalar IP_GetValue(IP_IpoHandle ipo, DT_Scalar key);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/source/gameengine/Physics/common/Makefile b/source/gameengine/Physics/common/Makefile
index e3edd426c36..f2dd0134b71 100644
--- a/source/gameengine/Physics/common/Makefile
+++ b/source/gameengine/Physics/common/Makefile
@@ -40,7 +40,7 @@ CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO)/include -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
CPPFLAGS += -I../../blender
# these two needed because of blenkernel
CPPFLAGS += -I../../blender/makesdna
diff --git a/source/gameengine/PyDoc/API_intro.py b/source/gameengine/PyDoc/API_intro.py
index ad37e34fbac..578b56eb2b0 100644
--- a/source/gameengine/PyDoc/API_intro.py
+++ b/source/gameengine/PyDoc/API_intro.py
@@ -6,22 +6,29 @@ The Blender Game Engine Python API Reference
See U{release notes<http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine>} for updates, changes and new functionality in the Game Engine Python API.
- Top Module:
- -----------
-
- - L{GameLogic}
- - L{GameKeys}
- - L{GameTypes}
- - L{Mathutils}
- - L{Geometry}
- - L{BGL}
+ Blender Game Engine Modules:
+ ----------------------------
+
+ Modules that include methods for accessing GameEngine data and functions.
+
+ - L{GameLogic} utility functons for game logic.
+ - L{GameKeys} keyboard input and event conversion.
+ - L{Rasterizer} display and rendering.
+ - L{GameTypes} contains all the python types spesific to the GameEngine.
Undocumented modules:
---------------------
- VideoTexture
- - CValue
- - Expression
- PhysicsConstraints
+
+ Additional Modules:
+ -------------------
+
+ These modules have no GameEngine spesific functionality but are useful in many cases.
+
+ - L{Mathutils}
+ - L{Geometry}
+ - L{BGL}
Introduction:
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index 3ec30a63c58..46f00fa7ea6 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -271,7 +271,7 @@ Documentation for the GameLogic Module.
@var KX_PARENT_REMOVE:
@var KX_PARENT_SET:
-@group Shader: MODELMATRIX*, MODELVIEWMATRIX*, VIEWMATRIX*, CAM_POS, CONSTANT_TIMER
+@group Shader: MODELMATRIX*, MODELVIEWMATRIX*, VIEWMATRIX*, CAM_POS, CONSTANT_TIMER, SHD_TANGENT
@var VIEWMATRIX:
@var VIEWMATRIX_INVERSE:
@var VIEWMATRIX_INVERSETRANSPOSE:
@@ -285,8 +285,8 @@ Documentation for the GameLogic Module.
@var MODELVIEWMATRIX_INVERSETRANSPOSE:
@var MODELVIEWMATRIX_TRANSPOSE:
@var CAM_POS: Current camera position
-@var CONSTANT_TIMER: Current camera position
-@var SHD_TANGENT: Current camera position
+@var CONSTANT_TIMER: User a timer for the uniform value.
+@var SHD_TANGENT: Not yet documented.
@group Blender Material: BL_*
@var BL_DST_ALPHA:
@@ -302,6 +302,13 @@ Documentation for the GameLogic Module.
@var BL_ZERO:
@group Deprecated: addActiveActuator
+
+@var globalDict: A dictionary that is saved between loading blend files so you can use
+ it to store inventory and other variables you want to store between
+ scenes and blend files. It can also be written to a file and loaded
+ later on with the game load/save actuators.
+ note: only python built in types such as int/string/bool/float/tuples/lists
+ can be saved, GameObjects, Actuators etc will not work as expectred.
"""
import GameTypes
@@ -441,6 +448,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 4ab175a8f6c..63dd1a7fabf 100644
--- a/source/gameengine/PyDoc/GameTypes.py
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -336,15 +336,23 @@ class BL_ActionActuator(SCA_IActuator):
@ivar framePropName: The name of the property that is set to the current frame number.
@type framePropName: string
"""
- def setChannel(channel, matrix, mode = False):
+ def setChannel(channel, matrix):
"""
- @param channel: A string specifying the name of the bone channel.
+ Alternative to the 2 arguments, 4 arguments (channel, matrix, loc, size, quat) are also supported.
+
+ @param channel: A string specifying the name of the bone channel, created if missing.
@type channel: string
@param matrix: A 4x4 matrix specifying the overriding transformation
as an offset from the bone's rest position.
@type matrix: list [[float]]
- @param mode: True for armature/world space, False for bone space
- @type mode: boolean
+ """
+
+ def getChannel(channel):
+ """
+ @param channel: A string specifying the name of the bone channel. error raised if missing.
+ @type channel: string
+ @rtype: tuple
+ @return: (loc, size, quat)
"""
#{ Deprecated
diff --git a/source/gameengine/Rasterizer/RAS_LightObject.h b/source/gameengine/Rasterizer/RAS_LightObject.h
index 6b63a891981..b45a35e4266 100644
--- a/source/gameengine/Rasterizer/RAS_LightObject.h
+++ b/source/gameengine/Rasterizer/RAS_LightObject.h
@@ -39,8 +39,9 @@ struct RAS_LightObject
LIGHT_NORMAL
};
bool m_modified;
- int m_layer;
+ int m_layer;
void *m_scene;
+ void *m_light;
float m_energy;
float m_distance;
@@ -55,7 +56,6 @@ struct RAS_LightObject
float m_spotblend;
LightType m_type;
- MT_CmMatrix4x4* m_worldmatrix;
bool m_nodiffuse;
bool m_nospecular;
diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript
index 864e4c3ebee..592b138583f 100644
--- a/source/gameengine/SConscript
+++ b/source/gameengine/SConscript
@@ -18,13 +18,5 @@ SConscript(['BlenderRoutines/SConscript',
'VideoTexture/SConscript'
])
-if env['WITH_BF_SOLID']:
- SConscript(['Physics/Sumo/SConscript'])
-
if env['WITH_BF_PLAYER']:
SConscript(['GamePlayer/SConscript'])
-
-#if user_options_dict['USE_PHYSICS'] == 'solid':
-# SConscript(['Physics/Sumo/SConscript'])
-#elif user_options_dict['USE_PHYSICS'] == 'ode':
-# SConscript(['Physics/BlOde/SConscript'])
diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.cpp b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
index 6b23105a278..6d26e5b6d35 100644
--- a/source/gameengine/VideoTexture/FilterBlueScreen.cpp
+++ b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
@@ -81,17 +81,17 @@ static int setColor (PyFilter * self, PyObject * value, void * closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 3
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 2)))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 2)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 3 ints");
return -1;
}
// set color
- getFilter(self)->setColor((unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
- (unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1))),
- (unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 2))));
+ getFilter(self)->setColor((unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+ (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1))),
+ (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2))));
// success
return 0;
}
@@ -108,15 +108,15 @@ static int setLimits (PyFilter * self, PyObject * value, void * closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 2
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1)))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 ints");
return -1;
}
// set limits
- getFilter(self)->setLimits((unsigned short)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
- (unsigned short)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1))));
+ getFilter(self)->setLimits((unsigned short)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+ (unsigned short)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1))));
// success
return 0;
}
diff --git a/source/gameengine/VideoTexture/FilterColor.cpp b/source/gameengine/VideoTexture/FilterColor.cpp
index 5ff1f7f11ce..eb86f520e02 100644
--- a/source/gameengine/VideoTexture/FilterColor.cpp
+++ b/source/gameengine/VideoTexture/FilterColor.cpp
@@ -147,10 +147,10 @@ static int setMatrix (PyFilter * self, PyObject * value, void * closure)
for (int c = 0; valid && c < 5; ++c)
{
// item must be int
- valid = PyInt_Check(PySequence_Fast_GET_ITEM(row, c));
+ valid = PyLong_Check(PySequence_Fast_GET_ITEM(row, c));
// if it is valid, save it in matrix
if (valid)
- mat[r][c] = short(PyInt_AsLong(PySequence_Fast_GET_ITEM(row, c)));
+ mat[r][c] = short(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(row, c)));
}
}
// if parameter is not valid, report error
@@ -286,10 +286,10 @@ static int setLevels (PyFilter * self, PyObject * value, void * closure)
for (int c = 0; valid && c < 2; ++c)
{
// item must be int
- valid = PyInt_Check(PySequence_Fast_GET_ITEM(row, c));
+ valid = PyLong_Check(PySequence_Fast_GET_ITEM(row, c));
// if it is valid, save it in matrix
if (valid)
- lev[r][c] = (unsigned short)(PyInt_AsLong(PySequence_Fast_GET_ITEM(row, c)));
+ lev[r][c] = (unsigned short)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(row, c)));
}
}
// if parameter is not valid, report error
diff --git a/source/gameengine/VideoTexture/FilterNormal.cpp b/source/gameengine/VideoTexture/FilterNormal.cpp
index 9a2b1e90d5a..002be6c3189 100644
--- a/source/gameengine/VideoTexture/FilterNormal.cpp
+++ b/source/gameengine/VideoTexture/FilterNormal.cpp
@@ -72,13 +72,13 @@ static PyObject * getColor (PyFilter * self, void * closure)
static int setColor (PyFilter * self, PyObject * value, void * closure)
{
// check validity of parameter
- if (value == NULL || !PyInt_Check(value))
+ if (value == NULL || !PyLong_Check(value))
{
PyErr_SetString(PyExc_TypeError, "filt.colorIdx = int: VideoTexture.FilterNormal, expected the value must be a int");
return -1;
}
// set color index
- getFilter(self)->setColor((unsigned short)(PyInt_AsLong(value)));
+ getFilter(self)->setColor((unsigned short)(PyLong_AsSsize_t(value)));
// success
return 0;
}
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index c4fb1fefd9c..d8be08e0eb5 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -331,19 +331,19 @@ static int setBackground (PyImage * self, PyObject * value, void * closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 4
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 2))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 3)))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 2))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 3)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 4 integer between 0 and 255");
return -1;
}
// set background color
- getImageRender(self)->setBackground((unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
- (unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1))),
- (unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 2))),
- (unsigned char)(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 3))));
+ getImageRender(self)->setBackground((unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+ (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1))),
+ (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2))),
+ (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 3))));
// success
return 0;
}
diff --git a/source/gameengine/VideoTexture/ImageViewport.cpp b/source/gameengine/VideoTexture/ImageViewport.cpp
index d2c23e758f6..55b14396280 100644
--- a/source/gameengine/VideoTexture/ImageViewport.cpp
+++ b/source/gameengine/VideoTexture/ImageViewport.cpp
@@ -218,16 +218,16 @@ static int ImageViewport_setPosition (PyImage * self, PyObject * value, void * c
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 2
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1)))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 ints");
return -1;
}
// set position
GLint pos [] = {
- GLint(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
- GLint(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1)))
+ GLint(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+ GLint(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1)))
};
getImageViewport(self)->setPosition(pos);
// success
@@ -246,16 +246,16 @@ int ImageViewport_setCaptureSize (PyImage * self, PyObject * value, void * closu
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 2
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1)))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+ || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 ints");
return -1;
}
// set capture size
short size [] = {
- short(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
- short(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1)))
+ short(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+ short(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1)))
};
getImageViewport(self)->setCaptureSize(size);
// success
diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp
index 5d449a158d8..5de7a9e80a9 100644
--- a/source/gameengine/VideoTexture/VideoBase.cpp
+++ b/source/gameengine/VideoTexture/VideoBase.cpp
@@ -167,13 +167,13 @@ PyObject * Video_getRepeat (PyImage * self, void * closure)
int Video_setRepeat (PyImage * self, PyObject * value, void * closure)
{
// check validity of parameter
- if (value == NULL || !PyInt_Check(value))
+ if (value == NULL || !PyLong_Check(value))
{
PyErr_SetString(PyExc_TypeError, "The value must be an int");
return -1;
}
// set repeat
- getVideo(self)->setRepeat(int(PyInt_AsLong(value)));
+ getVideo(self)->setRepeat(int(PyLong_AsSsize_t(value)));
// success
return 0;
}
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index 1a5481488c0..cf4ea88c1b5 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -1095,13 +1095,13 @@ PyObject * VideoFFmpeg_getPreseek (PyImage *self, void * closure)
int VideoFFmpeg_setPreseek (PyImage * self, PyObject * value, void * closure)
{
// check validity of parameter
- if (value == NULL || !PyInt_Check(value))
+ if (value == NULL || !PyLong_Check(value))
{
PyErr_SetString(PyExc_TypeError, "The value must be an integer");
return -1;
}
// set preseek
- getFFmpeg(self)->setPreseek(PyInt_AsLong(value));
+ getFFmpeg(self)->setPreseek(PyLong_AsSsize_t(value));
// success
return 0;
}
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp
index 1dcc72c8f7d..22171f69321 100644
--- a/source/gameengine/VideoTexture/blendVideoTex.cpp
+++ b/source/gameengine/VideoTexture/blendVideoTex.cpp
@@ -67,7 +67,7 @@ static PyObject * getMaterialID (PyObject *self, PyObject *args)
// get last error description
static PyObject * getLastError (PyObject *self, PyObject *args)
{
- return PyString_FromString(Exception::m_lastError.c_str());
+ return PyUnicode_FromString(Exception::m_lastError.c_str());
}
// set log file
@@ -204,6 +204,7 @@ PyObject* initVideoTexture(void)
#if (PY_VERSION_HEX >= 0x03000000)
m = PyModule_Create(&VideoTexture_module_def);
+ PyDict_SetItemString(PySys_GetObject("modules"), VideoTexture_module_def.m_name, m);
#else
m = Py_InitModule4("VideoTexture", moduleMethods,
"Module that allows to play video files on textures in GameBlender.",
diff --git a/source/nan_compile.mk b/source/nan_compile.mk
index bd6dd6e1baa..bc264fe5c1d 100644
--- a/source/nan_compile.mk
+++ b/source/nan_compile.mk
@@ -71,21 +71,6 @@ DBG_CCFLAGS += -g
# OS dependent parts ---------------------------------------------------
-ifeq ($(OS),beos)
- CC = gcc
- CCC = g++
- CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
- CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
- REL_CFLAGS += -O2
- REL_CCFLAGS += -O2
- NAN_DEPEND = true
- OPENGL_HEADERS = .
- CPPFLAGS += -D__BeOS
- AR = ar
- ARFLAGS = ruv
- ARFLAGSQUIET = ru
-endif
-
ifeq ($(OS),darwin)
CC = gcc
CCC = g++
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index b9e623ed4e4..fc0f3a7aa19 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -91,7 +91,6 @@ endif
export BF_PROFILE ?= false
export NAN_USE_BULLET ?= true
export NAN_BULLET2 ?= $(LCGDIR)/bullet2
- export NAN_SUMO ?= $(SRCHOME)/gameengine/Physics/Sumo
export NAN_FUZZICS ?= $(SRCHOME)/gameengine/Physics/Sumo/Fuzzics
export NAN_BLENKEY ?= $(LCGDIR)/blenkey
export NAN_DECIMATION ?= $(LCGDIR)/decimation
@@ -131,45 +130,6 @@ endif
endif
# Platform Dependent settings go below:
- ifeq ($(OS),beos)
-
- export ID = $(USER)
- export HOST = $(HOSTNAME)
- export NAN_PYTHON ?= $(LCGDIR)/python
- export NAN_PYTHON_VERSION ?= 2.3
- export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
- export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
- export NAN_OPENAL ?= $(LCGDIR)/openal
- export NAN_JPEG ?= $(LCGDIR)/jpeg
- export NAN_PNG ?= $(LCGDIR)/png
- export NAN_TIFF ?= $(LCGDIR)/tiff
- export NAN_ODE ?= $(LCGDIR)/ode
- export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
- export NAN_MESA ?= /usr/src/Mesa-3.1
- export NAN_ZLIB ?= $(LCGDIR)/zlib
- export NAN_NSPR ?= $(LCGDIR)/nspr
- export NAN_FREETYPE ?= $(LCGDIR)/freetype
- export NAN_GETTEXT ?= $(LCGDIR)/gettext
- export NAN_SDL ?= $(shell sdl-config --prefix)
- export NAN_SDLLIBS ?= $(shell sdl-config --libs)
- export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
-
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
- # Location of MOZILLA/Netscape header files...
- export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
- export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
- # Will fall back to look in NAN_MOZILLA_INC/nspr and NAN_MOZILLA_LIB
- # if this is not set.
-
- export NAN_BUILDINFO ?= true
- # Be paranoid regarding library creation (do not update archives)
- export NAN_PARANOID ?= true
-
- # l10n
- #export INTERNATIONAL ?= true
-
- else
ifeq ($(OS),darwin)
export ID = $(shell whoami)
@@ -347,7 +307,7 @@ endif
export FREEDESKTOP ?= true
export NAN_PYTHON ?= /usr
- export NAN_PYTHON_VERSION ?= 2.5
+ export NAN_PYTHON_VERSION ?= 2.6
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
export NAN_OPENAL ?= /usr
@@ -589,7 +549,6 @@ endif
endif # irix
endif # freebsd
endif # darwin
- endif # beos
endif # CONFIG_GUESS
diff --git a/source/nan_link.mk b/source/nan_link.mk
index 42b17b425b3..63c9a578498 100644
--- a/source/nan_link.mk
+++ b/source/nan_link.mk
@@ -49,10 +49,6 @@ endif
# default (overriden by windows)
SOEXT = .so
-ifeq ($(OS),beos)
- LLIBS = -L/boot/develop/lib/x86/ -lGL -lbe -L/boot/home/config/lib/
-endif
-
ifeq ($(OS),darwin)
LLIBS += -lGLU -lGL
LLIBS += -lz -lstdc++
diff --git a/tools/Blender.py b/tools/Blender.py
index b7b70caf17f..306bce91bc8 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -50,6 +50,7 @@ blenderdeps = [] # don't manipulate this one outside this module!
possible_types = ['core'] # can be set in ie. SConstruct
libs = {}
+vcp = []
def getresources():
return resources
@@ -409,7 +410,8 @@ class BlenderEnvironment(SConsEnvironment):
SConsEnvironment.Default(self, res)
resources.append(res)
- def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
+ def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
+ global vcp
if not self or not libname or not sources:
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
self.Exit()
@@ -455,12 +457,24 @@ class BlenderEnvironment(SConsEnvironment):
targetdir = '#'+targetdir
lib = lenv.Library(target= targetdir, source=sources)
SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build
+ if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ #if targetdir[0] == '#':
+ # targetdir = targetdir[1:-1]
+ print "! ",targetdir+ '.vcproj' # + self['MSVSPROJECTSUFFIX']
+ vcproject = self.MSVSProject(target = targetdir + '.vcproj', # + self['MSVSPROJECTSUFFIX'],
+ srcs = sources,
+ buildtarget = lib,
+ variant = 'Release',
+ auto_build_solution=0)
+ vcp.append(vcproject)
+ SConsEnvironment.Default(self, vcproject)
else:
print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC
# note: libs is a global
add_lib_to_dict(self, libs, libtype, libname, priority)
def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''):
+ global vcp
print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
lenv = self.Clone()
if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']:
@@ -501,6 +515,12 @@ class BlenderEnvironment(SConsEnvironment):
brs = lenv.Command(f, prog, [bsc])
SConsEnvironment.Default(self, brs)
SConsEnvironment.Default(self, prog)
+ if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc') and progname == 'blender':
+ print "! ",builddir + "/" + progname + '.sln'
+ sln = self.MSVSProject(target = builddir + "/" + progname + '.sln',
+ projects= vcp,
+ variant = 'Release')
+ SConsEnvironment.Default(self, sln)
program_list.append(prog)
if lenv['OURPLATFORM']=='darwin':
lenv['BINARYKIND'] = binarykind
diff --git a/tools/btools.py b/tools/btools.py
index 1a27d9e0547..ea0b09a9634 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -44,9 +44,8 @@ def validate_arguments(args, bc):
'WITH_BF_INTERNATIONAL',
'BF_GETTEXT', 'BF_GETTEXT_INC', 'BF_GETTEXT_LIB', 'BF_GETTEXT_LIBPATH',
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
- 'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB',
- 'WITH_BF_GAMEENGINE', 'WITH_BF_SOLID', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
- 'BF_SOLID', 'BF_SOLID_INC', 'BF_WINTAB', 'BF_WINTAB_INC',
+ 'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
+ 'BF_WINTAB', 'BF_WINTAB_INC',
'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
@@ -65,6 +64,7 @@ def validate_arguments(args, bc):
'WITH_BF_LCMS', 'BF_LCMS_LIB',
'WITH_BF_DOCS',
'BF_NUMJOBS',
+ 'BF_MSVS',
]
# Have options here that scons expects to be lists
@@ -158,7 +158,7 @@ def read_opts(cfg, args):
(BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
(BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
-
+ ('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
('BF_OPENAL', 'base path for OpenAL', ''),
('BF_OPENAL_INC', 'include path for python headers', ''),
@@ -249,21 +249,13 @@ def read_opts(cfg, args):
('BF_ICONV_LIB', 'iconv library', ''),
('BF_ICONV_LIBPATH', 'iconv library path', ''),
- (BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , True)),
-
- (BoolVariable('WITH_BF_ODE', 'Use ODE if true', True)),
- ('BF_ODE', 'ODE base path', ''),
- ('BF_ODE_INC', 'ODE include path' , ''),
- ('BF_ODE_LIB', 'ODE library', ''),
+ (BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , False)),
(BoolVariable('WITH_BF_BULLET', 'Use Bullet if true', True)),
('BF_BULLET', 'Bullet base dir', ''),
('BF_BULLET_INC', 'Bullet include path', ''),
('BF_BULLET_LIB', 'Bullet library', ''),
- (BoolVariable('WITH_BF_SOLID', 'Use Sumo/Solid deprecated physics system if true', True)),
- ('BF_SOLID', 'Solid base dir', '#/extern/solid'),
- ('BF_SOLID_INC', 'Solid include path', ''),
('BF_WINTAB', 'WinTab base dir', ''),
('BF_WINTAB_INC', 'WinTab include dir', ''),
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
@@ -364,7 +356,8 @@ def read_opts(cfg, args):
(BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
- ('BF_NUMJOBS', 'Number of build processes to spawn', '1')
+ ('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
+ ('BF_MSVS', 'Generate MSVS project files and solution', False)
) # end of opts.AddOptions()
@@ -404,9 +397,13 @@ def NSIS_Installer(target=None, source=None, env=None):
ns = open("00.sconsblender.nsi","r")
+
ns_cnt = str(ns.read())
ns.close()
+ # set Python version we compile against
+ ns_cnt = string.replace(ns_cnt, "[PYTHON_VERSION]", env['BF_PYTHON_VERSION'])
+
# do root
rootlist = []
rootdir = os.listdir(inst_dir+"\\")